voiptime-components 0.0.13 → 0.0.15
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 +141 -100
- package/dist/index.es.js +1017 -932
- package/package.json +9 -9
package/dist/index.es.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { createElementBlock as
|
|
2
|
-
const
|
|
3
|
-
const
|
|
4
|
-
for (const [
|
|
5
|
-
n
|
|
6
|
-
return
|
|
7
|
-
},
|
|
1
|
+
import { createElementBlock as f, openBlock as p, createElementVNode as _, defineComponent as le, computed as x, createBlock as ce, createCommentVNode as H, resolveDynamicComponent as Ae, useSlots as Oe, resolveDirective as je, withDirectives as Me, normalizeClass as W, renderSlot as me, Teleport as lt, normalizeStyle as ae, withModifiers as he, toDisplayString as te, watch as ve, Fragment as ne, renderList as oe, vModelSelect as st, createVNode as Z, withCtx as xe, createTextVNode as _e, ref as D, createApp as it, h as ke, onMounted as fe, onUnmounted as $e, nextTick as at, mergeModels as Te, useModel as rt, reactive as ct, provide as ut, unref as q, inject as dt } from "vue";
|
|
2
|
+
const K = (e, t) => {
|
|
3
|
+
const o = e.__vccOpts || e;
|
|
4
|
+
for (const [n, s] of t)
|
|
5
|
+
o[n] = s;
|
|
6
|
+
return o;
|
|
7
|
+
}, pt = {}, mt = {
|
|
8
8
|
width: "20",
|
|
9
9
|
height: "20",
|
|
10
10
|
viewBox: "0 0 20 20",
|
|
11
11
|
fill: "none",
|
|
12
12
|
xmlns: "http://www.w3.org/2000/svg"
|
|
13
13
|
};
|
|
14
|
-
function
|
|
15
|
-
return p(),
|
|
16
|
-
|
|
14
|
+
function ht(e, t) {
|
|
15
|
+
return p(), f("svg", mt, t[0] || (t[0] = [
|
|
16
|
+
_("path", {
|
|
17
17
|
d: "M14 8L10 12L6 8",
|
|
18
18
|
stroke: "currentColor",
|
|
19
19
|
"stroke-width": "1.5",
|
|
@@ -22,16 +22,16 @@ function Qe(e, t) {
|
|
|
22
22
|
}, null, -1)
|
|
23
23
|
]));
|
|
24
24
|
}
|
|
25
|
-
const
|
|
25
|
+
const vt = /* @__PURE__ */ K(pt, [["render", ht]]), ft = {}, _t = {
|
|
26
26
|
width: "20",
|
|
27
27
|
height: "20",
|
|
28
28
|
viewBox: "0 0 20 20",
|
|
29
29
|
fill: "none",
|
|
30
30
|
xmlns: "http://www.w3.org/2000/svg"
|
|
31
31
|
};
|
|
32
|
-
function
|
|
33
|
-
return p(),
|
|
34
|
-
|
|
32
|
+
function gt(e, t) {
|
|
33
|
+
return p(), f("svg", _t, t[0] || (t[0] = [
|
|
34
|
+
_("path", {
|
|
35
35
|
d: "M6 12L10 8L14 12",
|
|
36
36
|
stroke: "currentColor",
|
|
37
37
|
"stroke-width": "1.5",
|
|
@@ -40,38 +40,38 @@ function ot(e, t) {
|
|
|
40
40
|
}, null, -1)
|
|
41
41
|
]));
|
|
42
42
|
}
|
|
43
|
-
const
|
|
43
|
+
const Ct = /* @__PURE__ */ K(ft, [["render", gt]]), bt = {}, wt = {
|
|
44
44
|
width: "14",
|
|
45
45
|
height: "15",
|
|
46
46
|
viewBox: "0 0 14 15",
|
|
47
47
|
fill: "none",
|
|
48
48
|
xmlns: "http://www.w3.org/2000/svg"
|
|
49
49
|
};
|
|
50
|
-
function
|
|
51
|
-
return p(),
|
|
52
|
-
|
|
50
|
+
function kt(e, t) {
|
|
51
|
+
return p(), f("svg", wt, t[0] || (t[0] = [
|
|
52
|
+
_("path", {
|
|
53
53
|
d: "M11.8789 4.90517L11.2561 4.20124C10.4045 3.33504 9.28504 2.7626 8.06789 2.5709C6.85074 2.3792 5.60245 2.57874 4.5127 3.13917C3.42296 3.69961 2.55134 4.59032 2.03031 5.67593C1.50928 6.76155 1.36732 7.98272 1.626 9.15387C1.88469 10.325 2.52987 11.3821 3.46351 12.1645C4.39716 12.9469 5.56821 13.4119 6.79871 13.4887C8.02921 13.5655 9.25189 13.25 10.2809 12.5901C11.31 11.9302 12.0891 10.962 12.5 9.83266",
|
|
54
54
|
stroke: "currentColor",
|
|
55
55
|
"stroke-width": "1.5",
|
|
56
56
|
"stroke-miterlimit": "10",
|
|
57
57
|
"stroke-linecap": "round"
|
|
58
58
|
}, null, -1),
|
|
59
|
-
|
|
59
|
+
_("path", {
|
|
60
60
|
d: "M8.5157 6.5C8.07025 6.5 7.84716 5.96143 8.16215 5.64645L10.3086 3.5L12.455 1.35355C12.77 1.03857 13.3086 1.26165 13.3086 1.70711V6C13.3086 6.27614 13.0847 6.5 12.8086 6.5L8.5157 6.5Z",
|
|
61
61
|
fill: "currentColor"
|
|
62
62
|
}, null, -1)
|
|
63
63
|
]));
|
|
64
64
|
}
|
|
65
|
-
const
|
|
65
|
+
const yt = /* @__PURE__ */ K(bt, [["render", kt]]), xt = {}, St = {
|
|
66
66
|
width: "21",
|
|
67
67
|
height: "20",
|
|
68
68
|
viewBox: "0 0 21 20",
|
|
69
69
|
fill: "none",
|
|
70
70
|
xmlns: "http://www.w3.org/2000/svg"
|
|
71
71
|
};
|
|
72
|
-
function
|
|
73
|
-
return p(),
|
|
74
|
-
|
|
72
|
+
function Mt(e, t) {
|
|
73
|
+
return p(), f("svg", St, t[0] || (t[0] = [
|
|
74
|
+
_("path", {
|
|
75
75
|
d: "M8.60352 6L12.6035 10L8.60352 14",
|
|
76
76
|
stroke: "currentColor",
|
|
77
77
|
"stroke-width": "1.5",
|
|
@@ -80,16 +80,16 @@ function dt(e, t) {
|
|
|
80
80
|
}, null, -1)
|
|
81
81
|
]));
|
|
82
82
|
}
|
|
83
|
-
const
|
|
83
|
+
const $t = /* @__PURE__ */ K(xt, [["render", Mt]]), Lt = {}, It = {
|
|
84
84
|
width: "21",
|
|
85
85
|
height: "20",
|
|
86
86
|
viewBox: "0 0 21 20",
|
|
87
87
|
fill: "none",
|
|
88
88
|
xmlns: "http://www.w3.org/2000/svg"
|
|
89
89
|
};
|
|
90
|
-
function
|
|
91
|
-
return p(),
|
|
92
|
-
|
|
90
|
+
function Bt(e, t) {
|
|
91
|
+
return p(), f("svg", It, t[0] || (t[0] = [
|
|
92
|
+
_("path", {
|
|
93
93
|
d: "M12.3984 14L8.39844 10L12.3984 6",
|
|
94
94
|
stroke: "currentColor",
|
|
95
95
|
"stroke-width": "1.5",
|
|
@@ -98,16 +98,16 @@ function vt(e, t) {
|
|
|
98
98
|
}, null, -1)
|
|
99
99
|
]));
|
|
100
100
|
}
|
|
101
|
-
const
|
|
101
|
+
const Rt = /* @__PURE__ */ K(Lt, [["render", Bt]]), Tt = {}, zt = {
|
|
102
102
|
width: "20",
|
|
103
103
|
height: "20",
|
|
104
104
|
viewBox: "0 0 20 20",
|
|
105
105
|
fill: "none",
|
|
106
106
|
xmlns: "http://www.w3.org/2000/svg"
|
|
107
107
|
};
|
|
108
|
-
function
|
|
109
|
-
return p(),
|
|
110
|
-
|
|
108
|
+
function Et(e, t) {
|
|
109
|
+
return p(), f("svg", zt, t[0] || (t[0] = [
|
|
110
|
+
_("path", {
|
|
111
111
|
d: "M12.5 1.66406L11.1783 2.94156C10.6233 3.47906 10.345 3.7474 10 3.7474C9.655 3.7474 9.37667 3.47906 8.82167 2.94156L7.5 1.66406M14.5833 5.83073C15.7533 5.83073 16.3392 5.83073 16.7592 6.11156C16.9412 6.23319 17.0975 6.3895 17.2192 6.57156C17.5 6.99156 17.5 7.5774 17.5 8.7474V15.4141C17.5 16.5841 17.5 17.1699 17.2192 17.5899C17.0975 17.772 16.9412 17.9283 16.7592 18.0499C16.3392 18.3307 15.7533 18.3307 14.5833 18.3307C13.4133 18.3307 12.8275 18.3307 12.4075 18.0499C12.2254 17.9283 12.0691 17.772 11.9475 17.5899C11.6667 17.1699 11.6667 16.5841 11.6667 15.4141V8.7474C11.6667 7.5774 11.6667 6.99156 11.9475 6.57156C12.0691 6.3895 12.2254 6.23319 12.4075 6.11156C12.8275 5.83073 13.4133 5.83073 14.5833 5.83073ZM5.41667 5.83073C6.58667 5.83073 7.1725 5.83073 7.5925 6.11156C7.77456 6.23319 7.93087 6.3895 8.0525 6.57156C8.33333 6.99156 8.33333 7.5774 8.33333 8.7474V15.4141C8.33333 16.5841 8.33333 17.1699 8.0525 17.5899C7.93087 17.772 7.77456 17.9283 7.5925 18.0499C7.1725 18.3307 6.58667 18.3307 5.41667 18.3307C4.24667 18.3307 3.66083 18.3307 3.24083 18.0499C3.05877 17.9283 2.90246 17.772 2.78083 17.5899C2.5 17.1699 2.5 16.5841 2.5 15.4141V8.7474C2.5 7.5774 2.5 6.99156 2.78083 6.57156C2.90246 6.3895 3.05877 6.23319 3.24083 6.11156C3.66083 5.83073 4.24667 5.83073 5.41667 5.83073Z",
|
|
112
112
|
stroke: "currentColor",
|
|
113
113
|
"stroke-width": "1.5",
|
|
@@ -116,23 +116,23 @@ function Ct(e, t) {
|
|
|
116
116
|
}, null, -1)
|
|
117
117
|
]));
|
|
118
118
|
}
|
|
119
|
-
const
|
|
119
|
+
const Wt = /* @__PURE__ */ K(Tt, [["render", Et]]), Vt = {}, Ht = {
|
|
120
120
|
width: "20",
|
|
121
121
|
height: "20",
|
|
122
122
|
viewBox: "0 0 20 20",
|
|
123
123
|
fill: "none",
|
|
124
124
|
xmlns: "http://www.w3.org/2000/svg"
|
|
125
125
|
};
|
|
126
|
-
function
|
|
127
|
-
return p(),
|
|
128
|
-
|
|
126
|
+
function Pt(e, t) {
|
|
127
|
+
return p(), f("svg", Ht, t[0] || (t[0] = [
|
|
128
|
+
_("path", {
|
|
129
129
|
d: "M8 3V5.2225M8 5.2225V10.7775M8 5.2225L9.875 4.25M8 5.2225L6.125 4.25M8 10.7775V13M8 10.7775L6.125 11.75M8 10.7775L9.875 11.75M13 8H10.7775M10.7775 8H5.2225M10.7775 8L11.75 9.875M10.7775 8L11.75 6.125M5.2225 8H3M5.2225 8L4.25 6.125M5.2225 8L4.25 9.875",
|
|
130
130
|
stroke: "currentColor",
|
|
131
131
|
"stroke-width": "1.5",
|
|
132
132
|
"stroke-linecap": "round",
|
|
133
133
|
"stroke-linejoin": "round"
|
|
134
134
|
}, null, -1),
|
|
135
|
-
|
|
135
|
+
_("path", {
|
|
136
136
|
d: "M12 14.7143L13.1151 15.6701C13.3268 15.8515 13.646 15.8247 13.8246 15.6105L16 13",
|
|
137
137
|
stroke: "currentColor",
|
|
138
138
|
"stroke-width": "1.5",
|
|
@@ -140,23 +140,23 @@ function yt(e, t) {
|
|
|
140
140
|
}, null, -1)
|
|
141
141
|
]));
|
|
142
142
|
}
|
|
143
|
-
const
|
|
143
|
+
const Dt = /* @__PURE__ */ K(Vt, [["render", Pt]]), At = {}, Ot = {
|
|
144
144
|
width: "20",
|
|
145
145
|
height: "20",
|
|
146
146
|
viewBox: "0 0 20 20",
|
|
147
147
|
fill: "none",
|
|
148
148
|
xmlns: "http://www.w3.org/2000/svg"
|
|
149
149
|
};
|
|
150
|
-
function
|
|
151
|
-
return p(),
|
|
152
|
-
|
|
150
|
+
function jt(e, t) {
|
|
151
|
+
return p(), f("svg", Ot, t[0] || (t[0] = [
|
|
152
|
+
_("path", {
|
|
153
153
|
d: "M8 3V5.2225M8 5.2225V10.7775M8 5.2225L9.875 4.25M8 5.2225L6.125 4.25M8 10.7775V13M8 10.7775L6.125 11.75M8 10.7775L9.875 11.75M13 8H10.7775M10.7775 8H5.2225M10.7775 8L11.75 9.875M10.7775 8L11.75 6.125M5.2225 8H3M5.2225 8L4.25 6.125M5.2225 8L4.25 9.875",
|
|
154
154
|
stroke: "currentColor",
|
|
155
155
|
"stroke-width": "1.5",
|
|
156
156
|
"stroke-linecap": "round",
|
|
157
157
|
"stroke-linejoin": "round"
|
|
158
158
|
}, null, -1),
|
|
159
|
-
|
|
159
|
+
_("path", {
|
|
160
160
|
d: "M13 16L14.5 14.5M16 13L14.5 14.5M14.5 14.5L13 13M14.5 14.5L16 16",
|
|
161
161
|
stroke: "currentColor",
|
|
162
162
|
"stroke-width": "1.5",
|
|
@@ -164,22 +164,40 @@ function Mt(e, t) {
|
|
|
164
164
|
}, null, -1)
|
|
165
165
|
]));
|
|
166
166
|
}
|
|
167
|
-
const
|
|
167
|
+
const Nt = /* @__PURE__ */ K(At, [["render", jt]]), Zt = {}, Ft = {
|
|
168
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
169
|
+
width: "60",
|
|
170
|
+
height: "60",
|
|
171
|
+
viewBox: "0 0 60 60",
|
|
172
|
+
fill: "none"
|
|
173
|
+
};
|
|
174
|
+
function Ut(e, t) {
|
|
175
|
+
return p(), f("svg", Ft, t[0] || (t[0] = [
|
|
176
|
+
_("path", {
|
|
177
|
+
d: "M24.195 7H18.625C17.1332 7 15.7024 7.59263 14.6475 8.64752C13.5926 9.70242 13 11.1332 13 12.625V46.375C13 47.8668 13.5926 49.2976 14.6475 50.3525C15.7024 51.4074 17.1332 52 18.625 52H41.125C42.6168 52 44.0476 51.4074 45.1025 50.3525C46.1574 49.2976 46.75 47.8668 46.75 46.375V29.5M24.195 7C27.3025 7 29.875 9.5175 29.875 12.625V18.25C29.875 19.7418 30.4676 21.1726 31.5225 22.2275C32.5774 23.2824 34.0082 23.875 35.5 23.875H41.125C42.6168 23.875 44.0476 24.4676 45.1025 25.5225C46.1574 26.5774 46.75 28.0082 46.75 29.5M24.195 7C33.42 7 46.75 20.4 46.75 29.5",
|
|
178
|
+
stroke: "currentColor",
|
|
179
|
+
"stroke-width": "2",
|
|
180
|
+
"stroke-linecap": "round",
|
|
181
|
+
"stroke-linejoin": "round"
|
|
182
|
+
}, null, -1)
|
|
183
|
+
]));
|
|
184
|
+
}
|
|
185
|
+
const qt = /* @__PURE__ */ K(Zt, [["render", Ut]]), Xt = {}, Gt = {
|
|
168
186
|
width: "20",
|
|
169
187
|
height: "20",
|
|
170
188
|
viewBox: "0 0 20 20",
|
|
171
189
|
fill: "none",
|
|
172
190
|
xmlns: "http://www.w3.org/2000/svg"
|
|
173
191
|
};
|
|
174
|
-
function
|
|
175
|
-
return p(),
|
|
176
|
-
|
|
192
|
+
function Kt(e, t) {
|
|
193
|
+
return p(), f("svg", Gt, t[0] || (t[0] = [
|
|
194
|
+
_("path", {
|
|
177
195
|
"fill-rule": "evenodd",
|
|
178
196
|
"clip-rule": "evenodd",
|
|
179
197
|
d: "M6.99479 8.75521C6.55276 8.75521 6.12884 8.57961 5.81628 8.26705C5.50372 7.95449 5.32812 7.53057 5.32812 7.08854C5.32812 6.64651 5.50372 6.22259 5.81628 5.91003C6.12884 5.59747 6.55276 5.42187 6.99479 5.42188C7.43682 5.42187 7.86074 5.59747 8.1733 5.91003C8.48586 6.22259 8.66146 6.64651 8.66146 7.08854C8.66146 7.53057 8.48586 7.95449 8.1733 8.26705C7.86074 8.57961 7.43682 8.75521 6.99479 8.75521ZM6.99479 14.5885C6.55276 14.5885 6.12884 14.4129 5.81628 14.1004C5.50372 13.7878 5.32812 13.3639 5.32812 12.9219C5.32812 12.4798 5.50372 12.0559 5.81628 11.7434C6.12884 11.4308 6.55276 11.2552 6.99479 11.2552C7.43682 11.2552 7.86074 11.4308 8.1733 11.7434C8.48586 12.0559 8.66146 12.4798 8.66146 12.9219C8.66146 13.3639 8.48586 13.7878 8.1733 14.1004C7.86074 14.4129 7.43682 14.5885 6.99479 14.5885Z",
|
|
180
198
|
fill: "currentColor"
|
|
181
199
|
}, null, -1),
|
|
182
|
-
|
|
200
|
+
_("path", {
|
|
183
201
|
"fill-rule": "evenodd",
|
|
184
202
|
"clip-rule": "evenodd",
|
|
185
203
|
d: "M12.9948 8.75521C12.5528 8.75521 12.1288 8.57961 11.8163 8.26705C11.5037 7.95449 11.3281 7.53057 11.3281 7.08854C11.3281 6.64651 11.5037 6.22259 11.8163 5.91003C12.1288 5.59747 12.5528 5.42187 12.9948 5.42188C13.4368 5.42187 13.8607 5.59747 14.1733 5.91003C14.4859 6.22259 14.6615 6.64651 14.6615 7.08854C14.6615 7.53057 14.4859 7.95449 14.1733 8.26705C13.8607 8.57961 13.4368 8.75521 12.9948 8.75521ZM12.9948 14.5885C12.5528 14.5885 12.1288 14.4129 11.8163 14.1004C11.5037 13.7878 11.3281 13.3639 11.3281 12.9219C11.3281 12.4798 11.5037 12.0559 11.8163 11.7434C12.1288 11.4308 12.5528 11.2552 12.9948 11.2552C13.4368 11.2552 13.8607 11.4308 14.1733 11.7434C14.4859 12.0559 14.6615 12.4798 14.6615 12.9219C14.6615 13.3639 14.4859 13.7878 14.1733 14.1004C13.8607 14.4129 13.4368 14.5885 12.9948 14.5885Z",
|
|
@@ -187,16 +205,16 @@ function Bt(e, t) {
|
|
|
187
205
|
}, null, -1)
|
|
188
206
|
]));
|
|
189
207
|
}
|
|
190
|
-
const
|
|
208
|
+
const Yt = /* @__PURE__ */ K(Xt, [["render", Kt]]), Jt = {}, Qt = {
|
|
191
209
|
width: "20",
|
|
192
210
|
height: "20",
|
|
193
211
|
viewBox: "0 0 20 20",
|
|
194
212
|
fill: "none",
|
|
195
213
|
xmlns: "http://www.w3.org/2000/svg"
|
|
196
214
|
};
|
|
197
|
-
function
|
|
198
|
-
return p(),
|
|
199
|
-
|
|
215
|
+
function en(e, t) {
|
|
216
|
+
return p(), f("svg", Qt, t[0] || (t[0] = [
|
|
217
|
+
_("path", {
|
|
200
218
|
"fill-rule": "evenodd",
|
|
201
219
|
"clip-rule": "evenodd",
|
|
202
220
|
d: "M10.1667 5.83333C9.72464 5.83333 9.30072 5.65774 8.98816 5.34518C8.67559 5.03262 8.5 4.60869 8.5 4.16667C8.5 3.72464 8.67559 3.30072 8.98816 2.98816C9.30072 2.67559 9.72464 2.5 10.1667 2.5C10.6087 2.5 11.0326 2.67559 11.3452 2.98816C11.6577 3.30072 11.8333 3.72464 11.8333 4.16667C11.8333 4.60869 11.6577 5.03262 11.3452 5.34518C11.0326 5.65774 10.6087 5.83333 10.1667 5.83333ZM10.1667 11.6667C9.72464 11.6667 9.30072 11.4911 8.98816 11.1785C8.67559 10.8659 8.5 10.442 8.5 10C8.5 9.55797 8.67559 9.13405 8.98816 8.82149C9.30072 8.50893 9.72464 8.33333 10.1667 8.33333C10.6087 8.33333 11.0326 8.50893 11.3452 8.82149C11.6577 9.13405 11.8333 9.55797 11.8333 10C11.8333 10.442 11.6577 10.8659 11.3452 11.1785C11.0326 11.4911 10.6087 11.6667 10.1667 11.6667ZM10.1667 17.5C9.72464 17.5 9.30072 17.3244 8.98816 17.0118C8.67559 16.6993 8.5 16.2754 8.5 15.8333C8.5 15.3913 8.67559 14.9674 8.98816 14.6548C9.30072 14.3423 9.72464 14.1667 10.1667 14.1667C10.6087 14.1667 11.0326 14.3423 11.3452 14.6548C11.6577 14.9674 11.8333 15.3913 11.8333 15.8333C11.8333 16.2754 11.6577 16.6993 11.3452 17.0118C11.0326 17.3244 10.6087 17.5 10.1667 17.5Z",
|
|
@@ -204,16 +222,16 @@ function Wt(e, t) {
|
|
|
204
222
|
}, null, -1)
|
|
205
223
|
]));
|
|
206
224
|
}
|
|
207
|
-
const
|
|
225
|
+
const tn = /* @__PURE__ */ K(Jt, [["render", en]]), nn = {}, on = {
|
|
208
226
|
width: "21",
|
|
209
227
|
height: "20",
|
|
210
228
|
viewBox: "0 0 21 20",
|
|
211
229
|
fill: "none",
|
|
212
230
|
xmlns: "http://www.w3.org/2000/svg"
|
|
213
231
|
};
|
|
214
|
-
function
|
|
215
|
-
return p(),
|
|
216
|
-
|
|
232
|
+
function ln(e, t) {
|
|
233
|
+
return p(), f("svg", on, t[0] || (t[0] = [
|
|
234
|
+
_("path", {
|
|
217
235
|
"fill-rule": "evenodd",
|
|
218
236
|
"clip-rule": "evenodd",
|
|
219
237
|
d: "M6.33333 9.83333C6.33333 10.2754 6.15774 10.6993 5.84518 11.0118C5.53262 11.3244 5.10869 11.5 4.66667 11.5C4.22464 11.5 3.80072 11.3244 3.48816 11.0118C3.17559 10.6993 3 10.2754 3 9.83333C3 9.39131 3.17559 8.96738 3.48816 8.65482C3.80072 8.34226 4.22464 8.16667 4.66667 8.16667C5.10869 8.16667 5.53262 8.34226 5.84518 8.65482C6.15774 8.96738 6.33333 9.39131 6.33333 9.83333ZM12.1667 9.83333C12.1667 10.2754 11.9911 10.6993 11.6785 11.0118C11.3659 11.3244 10.942 11.5 10.5 11.5C10.058 11.5 9.63405 11.3244 9.32149 11.0118C9.00893 10.6993 8.83333 10.2754 8.83333 9.83333C8.83333 9.39131 9.00893 8.96738 9.32149 8.65482C9.63405 8.34226 10.058 8.16667 10.5 8.16667C10.942 8.16667 11.3659 8.34226 11.6785 8.65482C11.9911 8.96738 12.1667 9.39131 12.1667 9.83333ZM18 9.83333C18 10.2754 17.8244 10.6993 17.5118 11.0118C17.1993 11.3244 16.7754 11.5 16.3333 11.5C15.8913 11.5 15.4674 11.3244 15.1548 11.0118C14.8423 10.6993 14.6667 10.2754 14.6667 9.83333C14.6667 9.39131 14.8423 8.96738 15.1548 8.65482C15.4674 8.34226 15.8913 8.16667 16.3333 8.16667C16.7754 8.16667 17.1993 8.34226 17.5118 8.65482C17.8244 8.96738 18 9.39131 18 9.83333Z",
|
|
@@ -221,16 +239,16 @@ function Ht(e, t) {
|
|
|
221
239
|
}, null, -1)
|
|
222
240
|
]));
|
|
223
241
|
}
|
|
224
|
-
const
|
|
242
|
+
const sn = /* @__PURE__ */ K(nn, [["render", ln]]), an = {}, rn = {
|
|
225
243
|
width: "20",
|
|
226
244
|
height: "20",
|
|
227
245
|
viewBox: "0 0 20 20",
|
|
228
246
|
fill: "none",
|
|
229
247
|
xmlns: "http://www.w3.org/2000/svg"
|
|
230
248
|
};
|
|
231
|
-
function
|
|
232
|
-
return p(),
|
|
233
|
-
|
|
249
|
+
function cn(e, t) {
|
|
250
|
+
return p(), f("svg", rn, t[0] || (t[0] = [
|
|
251
|
+
_("path", {
|
|
234
252
|
d: "M6 14L10 10M10 10L14 6M10 10L6 6M10 10L14 14",
|
|
235
253
|
stroke: "currentColor",
|
|
236
254
|
"stroke-width": "1.5",
|
|
@@ -239,39 +257,40 @@ function Nt(e, t) {
|
|
|
239
257
|
}, null, -1)
|
|
240
258
|
]));
|
|
241
259
|
}
|
|
242
|
-
const
|
|
260
|
+
const un = /* @__PURE__ */ K(an, [["render", cn]]), dn = {
|
|
243
261
|
// arrow icons
|
|
244
|
-
arrowDown:
|
|
245
|
-
arrowTop:
|
|
246
|
-
arrowRight:
|
|
247
|
-
arrowLeft:
|
|
248
|
-
arrowReload:
|
|
262
|
+
arrowDown: vt,
|
|
263
|
+
arrowTop: Ct,
|
|
264
|
+
arrowRight: $t,
|
|
265
|
+
arrowLeft: Rt,
|
|
266
|
+
arrowReload: yt,
|
|
249
267
|
// table icons
|
|
250
|
-
columnInsert:
|
|
251
|
-
freeze:
|
|
252
|
-
unfreeze:
|
|
253
|
-
columnsMove:
|
|
268
|
+
columnInsert: Wt,
|
|
269
|
+
freeze: Dt,
|
|
270
|
+
unfreeze: Nt,
|
|
271
|
+
columnsMove: Yt,
|
|
272
|
+
empty: qt,
|
|
254
273
|
// actions icons
|
|
255
|
-
listBullet:
|
|
256
|
-
listBulletHorizontal:
|
|
257
|
-
close:
|
|
258
|
-
},
|
|
274
|
+
listBullet: tn,
|
|
275
|
+
listBulletHorizontal: sn,
|
|
276
|
+
close: un
|
|
277
|
+
}, Y = /* @__PURE__ */ le({
|
|
259
278
|
__name: "VIcon",
|
|
260
279
|
props: {
|
|
261
280
|
name: {}
|
|
262
281
|
},
|
|
263
282
|
setup(e) {
|
|
264
|
-
const t = e,
|
|
265
|
-
return (
|
|
283
|
+
const t = e, o = x(() => dn[t.name]);
|
|
284
|
+
return (n, s) => o.value ? (p(), ce(Ae(o.value), { key: 0 })) : H("", !0);
|
|
266
285
|
}
|
|
267
|
-
}),
|
|
268
|
-
function
|
|
269
|
-
return p(),
|
|
286
|
+
}), pn = {}, mn = { class: "vt-loader" };
|
|
287
|
+
function hn(e, t) {
|
|
288
|
+
return p(), f("span", mn);
|
|
270
289
|
}
|
|
271
|
-
const
|
|
290
|
+
const Ne = /* @__PURE__ */ K(pn, [["render", hn]]), vn = ["disabled", "type", "data-placement"], fn = {
|
|
272
291
|
key: 2,
|
|
273
292
|
class: "vt-button__content"
|
|
274
|
-
},
|
|
293
|
+
}, ge = /* @__PURE__ */ le({
|
|
275
294
|
__name: "VButton",
|
|
276
295
|
props: {
|
|
277
296
|
type: { default: "default" },
|
|
@@ -285,50 +304,54 @@ const ze = /* @__PURE__ */ X(Ut, [["render", Xt]]), Gt = ["disabled", "type", "d
|
|
|
285
304
|
},
|
|
286
305
|
emits: ["click"],
|
|
287
306
|
setup(e, { emit: t }) {
|
|
288
|
-
const
|
|
307
|
+
const o = e, n = t, s = Oe(), l = x(() => !!(o.icon && o.shape)), r = x(() => {
|
|
308
|
+
var k, S;
|
|
309
|
+
const c = s.default ? s.default({}) : null;
|
|
310
|
+
return ((S = (k = c == null ? void 0 : c[0]) == null ? void 0 : k.children) == null ? void 0 : S.toString()) ?? "";
|
|
311
|
+
}), i = x(() => [
|
|
289
312
|
"vt-button",
|
|
290
|
-
`vt-button--${
|
|
313
|
+
`vt-button--${o.type}`,
|
|
291
314
|
{
|
|
292
|
-
[`vt-button--${
|
|
293
|
-
"vt-button--icon-only":
|
|
294
|
-
"vt-button--disabled":
|
|
295
|
-
"vt-button--loading":
|
|
315
|
+
[`vt-button--${o.shape}`]: o.shape,
|
|
316
|
+
"vt-button--icon-only": l.value,
|
|
317
|
+
"vt-button--disabled": o.disabled || o.loading,
|
|
318
|
+
"vt-button--loading": o.loading
|
|
296
319
|
}
|
|
297
|
-
]),
|
|
298
|
-
!
|
|
320
|
+
]), a = x(() => l.value && o.tooltip ? r.value : null), u = (c) => {
|
|
321
|
+
!o.disabled && !o.loading && n("click", c);
|
|
299
322
|
};
|
|
300
|
-
return (c,
|
|
301
|
-
const
|
|
302
|
-
return
|
|
303
|
-
class:
|
|
304
|
-
disabled:
|
|
305
|
-
type:
|
|
306
|
-
"data-placement":
|
|
323
|
+
return (c, k) => {
|
|
324
|
+
const S = je("tooltip");
|
|
325
|
+
return Me((p(), f("button", {
|
|
326
|
+
class: W(i.value),
|
|
327
|
+
disabled: o.disabled || o.loading,
|
|
328
|
+
type: o.htmlType,
|
|
329
|
+
"data-placement": o.tooltipPlacement,
|
|
307
330
|
onClick: u
|
|
308
331
|
}, [
|
|
309
|
-
|
|
332
|
+
o.loading ? (p(), ce(Ne, {
|
|
310
333
|
key: 0,
|
|
311
334
|
class: "vt-button__icon"
|
|
312
|
-
})) :
|
|
335
|
+
})) : o.icon ? (p(), ce(Y, {
|
|
313
336
|
key: 1,
|
|
314
|
-
name:
|
|
337
|
+
name: o.icon,
|
|
315
338
|
class: "vt-button__icon"
|
|
316
|
-
}, null, 8, ["name"])) :
|
|
317
|
-
|
|
318
|
-
|
|
339
|
+
}, null, 8, ["name"])) : H("", !0),
|
|
340
|
+
l.value ? H("", !0) : (p(), f("span", fn, [
|
|
341
|
+
me(c.$slots, "default")
|
|
319
342
|
]))
|
|
320
|
-
], 10,
|
|
321
|
-
[
|
|
343
|
+
], 10, vn)), [
|
|
344
|
+
[S, a.value]
|
|
322
345
|
]);
|
|
323
346
|
};
|
|
324
347
|
}
|
|
325
|
-
}),
|
|
348
|
+
}), _n = {
|
|
326
349
|
key: 0,
|
|
327
350
|
class: "vt-modal__header"
|
|
328
|
-
},
|
|
351
|
+
}, gn = {
|
|
329
352
|
key: 0,
|
|
330
353
|
class: "vt-modal__title"
|
|
331
|
-
},
|
|
354
|
+
}, Cn = { class: "vt-modal__content" }, Ze = /* @__PURE__ */ le({
|
|
332
355
|
__name: "VModal",
|
|
333
356
|
props: {
|
|
334
357
|
modelValue: { type: Boolean },
|
|
@@ -340,42 +363,42 @@ const ze = /* @__PURE__ */ X(Ut, [["render", Xt]]), Gt = ["disabled", "type", "d
|
|
|
340
363
|
},
|
|
341
364
|
emits: ["update:modelValue", "close"],
|
|
342
365
|
setup(e, { emit: t }) {
|
|
343
|
-
const
|
|
344
|
-
zIndex:
|
|
345
|
-
})),
|
|
346
|
-
|
|
347
|
-
},
|
|
348
|
-
|
|
366
|
+
const o = e, n = t, s = x(() => ["vt-modal__container", `vt-modal__container--${o.size}`]), l = x(() => ({
|
|
367
|
+
zIndex: o.zIndex
|
|
368
|
+
})), r = () => {
|
|
369
|
+
n("update:modelValue", !1), n("close");
|
|
370
|
+
}, i = () => {
|
|
371
|
+
o.closeOnBackdropClick && r();
|
|
349
372
|
};
|
|
350
|
-
return (
|
|
351
|
-
|
|
373
|
+
return (a, u) => (p(), ce(lt, { to: "body" }, [
|
|
374
|
+
a.modelValue ? (p(), f("div", {
|
|
352
375
|
key: 0,
|
|
353
376
|
class: "vt-modal__backdrop",
|
|
354
|
-
style:
|
|
355
|
-
onClick:
|
|
377
|
+
style: ae(l.value),
|
|
378
|
+
onClick: i
|
|
356
379
|
}, [
|
|
357
|
-
|
|
358
|
-
class:
|
|
359
|
-
onClick: u[0] || (u[0] =
|
|
380
|
+
_("div", {
|
|
381
|
+
class: W(s.value),
|
|
382
|
+
onClick: u[0] || (u[0] = he(() => {
|
|
360
383
|
}, ["stop"]))
|
|
361
384
|
}, [
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
385
|
+
a.title || a.showCloseButton ? (p(), f("div", _n, [
|
|
386
|
+
a.title ? (p(), f("h2", gn, te(a.title), 1)) : H("", !0),
|
|
387
|
+
a.showCloseButton ? (p(), ce(Y, {
|
|
365
388
|
key: 1,
|
|
366
389
|
name: "close",
|
|
367
390
|
class: "vt-modal__close",
|
|
368
|
-
onClick:
|
|
369
|
-
})) :
|
|
370
|
-
])) :
|
|
371
|
-
|
|
372
|
-
|
|
391
|
+
onClick: r
|
|
392
|
+
})) : H("", !0)
|
|
393
|
+
])) : H("", !0),
|
|
394
|
+
_("div", Cn, [
|
|
395
|
+
me(a.$slots, "default")
|
|
373
396
|
])
|
|
374
397
|
], 2)
|
|
375
|
-
], 4)) :
|
|
398
|
+
], 4)) : H("", !0)
|
|
376
399
|
]));
|
|
377
400
|
}
|
|
378
|
-
}),
|
|
401
|
+
}), bn = { class: "vt-pagination" }, wn = { class: "vt-pagination__info" }, kn = { class: "vt-pagination__rows-per-page" }, yn = ["value"], xn = { class: "vt-pagination__navigation" }, Sn = ["disabled"], Mn = ["onClick"], $n = ["disabled"], Ln = /* @__PURE__ */ le({
|
|
379
402
|
__name: "VPagination",
|
|
380
403
|
props: {
|
|
381
404
|
totalItems: {},
|
|
@@ -386,103 +409,103 @@ const ze = /* @__PURE__ */ X(Ut, [["render", Xt]]), Gt = ["disabled", "type", "d
|
|
|
386
409
|
},
|
|
387
410
|
emits: ["update:currentPage", "update:pageSize", "pageChange", "reloadData"],
|
|
388
411
|
setup(e, { emit: t }) {
|
|
389
|
-
const
|
|
390
|
-
get: () =>
|
|
391
|
-
set: (
|
|
392
|
-
}),
|
|
393
|
-
get: () =>
|
|
394
|
-
set: (
|
|
395
|
-
}),
|
|
396
|
-
const
|
|
397
|
-
if (
|
|
398
|
-
for (let
|
|
399
|
-
|
|
412
|
+
const o = e, n = t, s = x({
|
|
413
|
+
get: () => o.currentPage,
|
|
414
|
+
set: (M) => n("update:currentPage", M)
|
|
415
|
+
}), l = x({
|
|
416
|
+
get: () => o.pageSize,
|
|
417
|
+
set: (M) => n("update:pageSize", M)
|
|
418
|
+
}), r = x(() => Math.ceil(o.totalItems / l.value)), i = x(() => o.totalItems === 0 ? 0 : (s.value - 1) * l.value + 1), a = x(() => Math.min(s.value * l.value, o.totalItems)), u = x(() => s.value <= 1), c = x(() => s.value >= r.value), k = x(() => {
|
|
419
|
+
const M = [], V = r.value, T = s.value, X = o.maxVisiblePages;
|
|
420
|
+
if (V <= X)
|
|
421
|
+
for (let y = 1; y <= V; y++)
|
|
422
|
+
M.push(y);
|
|
400
423
|
else {
|
|
401
|
-
|
|
402
|
-
const
|
|
403
|
-
|
|
404
|
-
for (let
|
|
405
|
-
|
|
406
|
-
|
|
424
|
+
M.push(1);
|
|
425
|
+
const y = Math.max(2, T - Math.floor(X / 2)), E = Math.min(V - 1, T + Math.floor(X / 2));
|
|
426
|
+
y > 2 && M.push("...");
|
|
427
|
+
for (let $ = y; $ <= E; $++)
|
|
428
|
+
M.push($);
|
|
429
|
+
E < V - 1 && M.push("..."), V > 1 && M.push(V);
|
|
407
430
|
}
|
|
408
|
-
return
|
|
409
|
-
}),
|
|
410
|
-
|
|
411
|
-
page:
|
|
412
|
-
pageSize:
|
|
431
|
+
return M;
|
|
432
|
+
}), S = () => {
|
|
433
|
+
n("pageChange", {
|
|
434
|
+
page: s.value,
|
|
435
|
+
pageSize: l.value
|
|
413
436
|
});
|
|
414
|
-
},
|
|
415
|
-
typeof
|
|
437
|
+
}, F = (M) => {
|
|
438
|
+
typeof M == "number" && M !== s.value && (s.value = M, S());
|
|
439
|
+
}, j = () => {
|
|
440
|
+
u.value || (s.value--, S());
|
|
441
|
+
}, Q = () => {
|
|
442
|
+
c.value || (s.value++, S());
|
|
443
|
+
}, U = () => {
|
|
444
|
+
s.value = 1, S();
|
|
416
445
|
}, N = () => {
|
|
417
|
-
|
|
418
|
-
}, K = () => {
|
|
419
|
-
c.value || (l.value++, $());
|
|
420
|
-
}, Y = () => {
|
|
421
|
-
l.value = 1, $();
|
|
422
|
-
}, q = () => {
|
|
423
|
-
o("reloadData", l.value);
|
|
446
|
+
n("reloadData", s.value);
|
|
424
447
|
};
|
|
425
|
-
return
|
|
426
|
-
() =>
|
|
448
|
+
return ve(
|
|
449
|
+
() => o.totalItems,
|
|
427
450
|
() => {
|
|
428
|
-
|
|
451
|
+
s.value > r.value && r.value > 0 && (s.value = r.value, S());
|
|
429
452
|
}
|
|
430
|
-
), (
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
453
|
+
), (M, V) => (p(), f("div", bn, [
|
|
454
|
+
_("div", wn, [
|
|
455
|
+
_("div", kn, [
|
|
456
|
+
V[1] || (V[1] = _("label", {
|
|
434
457
|
for: "rowsSelect",
|
|
435
458
|
class: "vt-pagination__label"
|
|
436
459
|
}, "Рядків на сторінку:", -1)),
|
|
437
|
-
|
|
460
|
+
Me(_("select", {
|
|
438
461
|
id: "rowsSelect",
|
|
439
|
-
"onUpdate:modelValue":
|
|
440
|
-
onChange:
|
|
462
|
+
"onUpdate:modelValue": V[0] || (V[0] = (T) => l.value = T),
|
|
463
|
+
onChange: U,
|
|
441
464
|
class: "vt-pagination__select"
|
|
442
465
|
}, [
|
|
443
|
-
(p(!0),
|
|
444
|
-
key:
|
|
445
|
-
value:
|
|
446
|
-
},
|
|
466
|
+
(p(!0), f(ne, null, oe(M.pageSizeOptions, (T) => (p(), f("option", {
|
|
467
|
+
key: T,
|
|
468
|
+
value: T
|
|
469
|
+
}, te(T), 9, yn))), 128))
|
|
447
470
|
], 544), [
|
|
448
|
-
[
|
|
471
|
+
[st, l.value]
|
|
449
472
|
])
|
|
450
473
|
]),
|
|
451
|
-
|
|
474
|
+
_("span", null, te(i.value) + " - " + te(a.value) + " з " + te(M.totalItems), 1)
|
|
452
475
|
]),
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
onClick:
|
|
476
|
+
_("div", xn, [
|
|
477
|
+
_("button", {
|
|
478
|
+
onClick: j,
|
|
456
479
|
disabled: u.value,
|
|
457
|
-
class:
|
|
480
|
+
class: W({ "vt-pagination__nav-button": !0, "has-items": !u.value })
|
|
458
481
|
}, [
|
|
459
|
-
|
|
460
|
-
], 10,
|
|
461
|
-
(p(!0),
|
|
462
|
-
key:
|
|
463
|
-
onClick: (
|
|
464
|
-
class:
|
|
465
|
-
"vt-pagination__nav-button--active":
|
|
482
|
+
Z(Y, { name: "arrowLeft" })
|
|
483
|
+
], 10, Sn),
|
|
484
|
+
(p(!0), f(ne, null, oe(k.value, (T) => (p(), f("button", {
|
|
485
|
+
key: T,
|
|
486
|
+
onClick: (X) => F(T),
|
|
487
|
+
class: W(["vt-pagination__nav-button", {
|
|
488
|
+
"vt-pagination__nav-button--active": T === s.value
|
|
466
489
|
}])
|
|
467
|
-
},
|
|
468
|
-
|
|
469
|
-
onClick:
|
|
490
|
+
}, te(T), 11, Mn))), 128)),
|
|
491
|
+
_("button", {
|
|
492
|
+
onClick: Q,
|
|
470
493
|
disabled: c.value,
|
|
471
|
-
class:
|
|
494
|
+
class: W({ "vt-pagination__nav-button": !0, "has-items": !c.value })
|
|
472
495
|
}, [
|
|
473
|
-
|
|
474
|
-
], 10,
|
|
496
|
+
Z(Y, { name: "arrowRight" })
|
|
497
|
+
], 10, $n)
|
|
475
498
|
]),
|
|
476
|
-
|
|
477
|
-
|
|
499
|
+
_("div", null, [
|
|
500
|
+
Z(ge, {
|
|
478
501
|
icon: "arrowReload",
|
|
479
502
|
shape: "circle",
|
|
480
503
|
tooltip: "",
|
|
481
504
|
tooltipPlacement: "left",
|
|
482
|
-
onClick:
|
|
505
|
+
onClick: N
|
|
483
506
|
}, {
|
|
484
|
-
default:
|
|
485
|
-
|
|
507
|
+
default: xe(() => V[2] || (V[2] = [
|
|
508
|
+
_e("Оновити дані ", -1)
|
|
486
509
|
])),
|
|
487
510
|
_: 1,
|
|
488
511
|
__: [2]
|
|
@@ -490,7 +513,7 @@ const ze = /* @__PURE__ */ X(Ut, [["render", Xt]]), Gt = ["disabled", "type", "d
|
|
|
490
513
|
])
|
|
491
514
|
]));
|
|
492
515
|
}
|
|
493
|
-
}),
|
|
516
|
+
}), In = ["for"], Bn = ["id", "name", "value", "checked", "disabled", "required", ".indeterminate"], de = /* @__PURE__ */ le({
|
|
494
517
|
__name: "VCheckbox",
|
|
495
518
|
props: {
|
|
496
519
|
modelValue: { type: Boolean, default: void 0 },
|
|
@@ -508,17 +531,17 @@ const ze = /* @__PURE__ */ X(Ut, [["render", Xt]]), Gt = ["disabled", "type", "d
|
|
|
508
531
|
},
|
|
509
532
|
emits: ["update:modelValue", "change", "focus", "blur"],
|
|
510
533
|
setup(e, { emit: t }) {
|
|
511
|
-
const
|
|
512
|
-
if (
|
|
513
|
-
const
|
|
514
|
-
|
|
515
|
-
},
|
|
516
|
-
|
|
534
|
+
const o = e, n = t, s = () => `vt-checkbox-${Math.random().toString(36).substr(2, 9)}`, l = x(() => o.id || s()), r = x(() => o.modelValue ?? o.checked), i = (c) => {
|
|
535
|
+
if (o.disabled) return;
|
|
536
|
+
const S = c.target.checked;
|
|
537
|
+
n("update:modelValue", S), n("change", S, c);
|
|
538
|
+
}, a = (c) => {
|
|
539
|
+
n("focus", c);
|
|
517
540
|
}, u = (c) => {
|
|
518
|
-
|
|
541
|
+
n("blur", c);
|
|
519
542
|
};
|
|
520
|
-
return (c,
|
|
521
|
-
class:
|
|
543
|
+
return (c, k) => (p(), f("label", {
|
|
544
|
+
class: W([
|
|
522
545
|
"vt-checkbox",
|
|
523
546
|
`vt-checkbox--${c.size}`,
|
|
524
547
|
`vt-checkbox--${c.variant}`,
|
|
@@ -527,39 +550,39 @@ const ze = /* @__PURE__ */ X(Ut, [["render", Xt]]), Gt = ["disabled", "type", "d
|
|
|
527
550
|
"vt-checkbox--double": c.isDouble
|
|
528
551
|
}
|
|
529
552
|
]),
|
|
530
|
-
for:
|
|
553
|
+
for: l.value
|
|
531
554
|
}, [
|
|
532
|
-
|
|
533
|
-
id:
|
|
555
|
+
_("input", {
|
|
556
|
+
id: l.value,
|
|
534
557
|
name: c.name,
|
|
535
558
|
value: c.value,
|
|
536
|
-
checked:
|
|
559
|
+
checked: r.value,
|
|
537
560
|
disabled: c.disabled,
|
|
538
561
|
required: c.required,
|
|
539
562
|
".indeterminate": c.indeterminate,
|
|
540
563
|
type: "checkbox",
|
|
541
564
|
class: "vt-checkbox__input",
|
|
542
|
-
onChange:
|
|
543
|
-
onFocus:
|
|
565
|
+
onChange: i,
|
|
566
|
+
onFocus: a,
|
|
544
567
|
onBlur: u
|
|
545
|
-
}, null, 40,
|
|
546
|
-
|
|
547
|
-
class:
|
|
568
|
+
}, null, 40, Bn),
|
|
569
|
+
_("div", {
|
|
570
|
+
class: W([
|
|
548
571
|
"vt-checkbox__box",
|
|
549
572
|
{
|
|
550
|
-
"vt-checkbox__box--checked":
|
|
573
|
+
"vt-checkbox__box--checked": r.value && !c.indeterminate && !c.isDouble,
|
|
551
574
|
"vt-checkbox__box--indeterminate": c.indeterminate,
|
|
552
|
-
"vt-checkbox__box--double": c.isDouble &&
|
|
575
|
+
"vt-checkbox__box--double": c.isDouble && r.value,
|
|
553
576
|
"vt-checkbox__box--disabled": c.disabled
|
|
554
577
|
}
|
|
555
578
|
])
|
|
556
579
|
}, [
|
|
557
|
-
!c.indeterminate && !c.isDouble ? (p(),
|
|
580
|
+
!c.indeterminate && !c.isDouble ? (p(), f("svg", {
|
|
558
581
|
key: 0,
|
|
559
|
-
class:
|
|
582
|
+
class: W([
|
|
560
583
|
"vt-checkbox__checkmark",
|
|
561
584
|
{
|
|
562
|
-
"vt-checkbox__checkmark--checked":
|
|
585
|
+
"vt-checkbox__checkmark--checked": r.value
|
|
563
586
|
}
|
|
564
587
|
]),
|
|
565
588
|
width: "10",
|
|
@@ -567,20 +590,20 @@ const ze = /* @__PURE__ */ X(Ut, [["render", Xt]]), Gt = ["disabled", "type", "d
|
|
|
567
590
|
viewBox: "0 0 10 9",
|
|
568
591
|
fill: "none",
|
|
569
592
|
xmlns: "http://www.w3.org/2000/svg"
|
|
570
|
-
},
|
|
571
|
-
|
|
593
|
+
}, k[0] || (k[0] = [
|
|
594
|
+
_("path", {
|
|
572
595
|
d: "M1 5L3.58264 7.58264C3.80112 7.80112 4.16348 7.77113 4.34306 7.51971L9 1",
|
|
573
596
|
stroke: "currentColor",
|
|
574
597
|
"stroke-width": "2",
|
|
575
598
|
"stroke-linecap": "round"
|
|
576
599
|
}, null, -1)
|
|
577
|
-
]), 2)) :
|
|
578
|
-
c.isDouble &&
|
|
600
|
+
]), 2)) : H("", !0),
|
|
601
|
+
c.isDouble && r.value ? (p(), f("svg", {
|
|
579
602
|
key: 1,
|
|
580
|
-
class:
|
|
603
|
+
class: W([
|
|
581
604
|
"vt-checkbox__checkmark",
|
|
582
605
|
{
|
|
583
|
-
"vt-checkbox__checkmark--checked":
|
|
606
|
+
"vt-checkbox__checkmark--checked": r.value
|
|
584
607
|
}
|
|
585
608
|
]),
|
|
586
609
|
width: "13",
|
|
@@ -588,285 +611,295 @@ const ze = /* @__PURE__ */ X(Ut, [["render", Xt]]), Gt = ["disabled", "type", "d
|
|
|
588
611
|
viewBox: "0 0 13 6",
|
|
589
612
|
fill: "none",
|
|
590
613
|
xmlns: "http://www.w3.org/2000/svg"
|
|
591
|
-
},
|
|
592
|
-
|
|
614
|
+
}, k[1] || (k[1] = [
|
|
615
|
+
_("path", {
|
|
593
616
|
d: "M6 3L8.25 5L12 1",
|
|
594
617
|
stroke: "currentColor",
|
|
595
618
|
"stroke-width": "2",
|
|
596
619
|
"stroke-linecap": "round",
|
|
597
620
|
"stroke-linejoin": "round"
|
|
598
621
|
}, null, -1),
|
|
599
|
-
|
|
622
|
+
_("path", {
|
|
600
623
|
d: "M1 3L3.25 5L7 1",
|
|
601
624
|
stroke: "currentColor",
|
|
602
625
|
"stroke-width": "2",
|
|
603
626
|
"stroke-linecap": "round",
|
|
604
627
|
"stroke-linejoin": "round"
|
|
605
628
|
}, null, -1)
|
|
606
|
-
]), 2)) :
|
|
607
|
-
c.indeterminate ? (p(),
|
|
629
|
+
]), 2)) : H("", !0),
|
|
630
|
+
c.indeterminate ? (p(), f("div", {
|
|
608
631
|
key: 2,
|
|
609
|
-
class:
|
|
632
|
+
class: W([
|
|
610
633
|
"vt-checkbox__indeterminate-mark",
|
|
611
634
|
{
|
|
612
635
|
"vt-checkbox__indeterminate-mark--visible": c.indeterminate
|
|
613
636
|
}
|
|
614
637
|
])
|
|
615
|
-
}, null, 2)) :
|
|
638
|
+
}, null, 2)) : H("", !0)
|
|
616
639
|
], 2),
|
|
617
|
-
c.label || c.$slots.label || c.$slots.default ? (p(),
|
|
640
|
+
c.label || c.$slots.label || c.$slots.default ? (p(), f("span", {
|
|
618
641
|
key: 0,
|
|
619
|
-
class:
|
|
642
|
+
class: W([
|
|
620
643
|
"vt-checkbox__label",
|
|
621
644
|
{
|
|
622
645
|
"vt-checkbox__label--disabled": c.disabled
|
|
623
646
|
}
|
|
624
647
|
])
|
|
625
648
|
}, [
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
649
|
+
me(c.$slots, "label", {}, () => [
|
|
650
|
+
me(c.$slots, "default", {}, () => [
|
|
651
|
+
_e(te(c.label), 1)
|
|
629
652
|
])
|
|
630
653
|
])
|
|
631
|
-
], 2)) :
|
|
632
|
-
], 10,
|
|
654
|
+
], 2)) : H("", !0)
|
|
655
|
+
], 10, In));
|
|
633
656
|
}
|
|
634
657
|
});
|
|
635
|
-
function
|
|
636
|
-
const t =
|
|
637
|
-
const
|
|
638
|
-
if (
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
return Math.max(Math.floor(u / a), 120);
|
|
658
|
+
function Rn(e) {
|
|
659
|
+
const t = x(() => [...e].sort((s, l) => s.pinnedLeft && !l.pinnedLeft ? -1 : !s.pinnedLeft && l.pinnedLeft || s.pinnedRight && !l.pinnedRight ? 1 : !s.pinnedRight && l.pinnedRight ? -1 : 0)), o = () => {
|
|
660
|
+
const s = t.value.length, l = t.value.filter((c) => c.width || c.minWidth), r = l.reduce((c, k) => c + (k.width || k.minWidth || 0), 0), i = s - l.length;
|
|
661
|
+
if (i === 0) return 150;
|
|
662
|
+
const u = Math.max(800 - r, i * 80);
|
|
663
|
+
return Math.max(Math.floor(u / i), 120);
|
|
642
664
|
};
|
|
643
665
|
return {
|
|
644
666
|
sortedColumns: t,
|
|
645
|
-
getDefaultColumnWidth:
|
|
646
|
-
getStickyOffset: (
|
|
647
|
-
const
|
|
648
|
-
let
|
|
649
|
-
if (
|
|
650
|
-
|
|
651
|
-
for (let u = 0; u <
|
|
652
|
-
const c =
|
|
653
|
-
c.pinnedLeft && (
|
|
667
|
+
getDefaultColumnWidth: o,
|
|
668
|
+
getStickyOffset: (s, l, r = !1) => {
|
|
669
|
+
const i = t.value;
|
|
670
|
+
let a = 0;
|
|
671
|
+
if (s === "left") {
|
|
672
|
+
r && (a += 50);
|
|
673
|
+
for (let u = 0; u < l; u++) {
|
|
674
|
+
const c = i[u];
|
|
675
|
+
c.pinnedLeft && (a += c.width || c.minWidth || o());
|
|
654
676
|
}
|
|
655
677
|
} else
|
|
656
|
-
for (let u =
|
|
657
|
-
const c =
|
|
658
|
-
c.pinnedRight && (
|
|
678
|
+
for (let u = i.length - 1; u > l; u--) {
|
|
679
|
+
const c = i[u];
|
|
680
|
+
c.pinnedRight && (a += c.width || c.minWidth || o());
|
|
659
681
|
}
|
|
660
|
-
return
|
|
682
|
+
return a;
|
|
661
683
|
}
|
|
662
684
|
};
|
|
663
685
|
}
|
|
664
|
-
function
|
|
686
|
+
function Tn(e) {
|
|
665
687
|
const t = () => {
|
|
666
|
-
const
|
|
667
|
-
return e.maxHeight && (
|
|
668
|
-
},
|
|
688
|
+
const l = {};
|
|
689
|
+
return e.maxHeight && (l.maxHeight = `${e.maxHeight}px`), l;
|
|
690
|
+
}, o = (l, r, i, a) => {
|
|
669
691
|
const u = {};
|
|
670
|
-
if (
|
|
671
|
-
u.width = `${
|
|
672
|
-
else if (
|
|
673
|
-
u.minWidth = `${
|
|
692
|
+
if (l.width)
|
|
693
|
+
u.width = `${l.width}px`, u.minWidth = `${l.width}px`, u.maxWidth = `${l.width}px`;
|
|
694
|
+
else if (l.minWidth)
|
|
695
|
+
u.minWidth = `${l.minWidth}px`, u.width = `${l.minWidth}px`, u.maxWidth = "none";
|
|
674
696
|
else {
|
|
675
|
-
const c =
|
|
697
|
+
const c = a();
|
|
676
698
|
u.width = `${c}px`, u.minWidth = "80px", u.maxWidth = "none";
|
|
677
699
|
}
|
|
678
|
-
return
|
|
700
|
+
return l.pinnedLeft ? (u.position = "sticky", u.left = `${i("left", r, e.selectable)}px`, u.zIndex = "10") : l.pinnedRight && (u.position = "sticky", u.right = `${i("right", r, !1)}px`, u.zIndex = "10"), u;
|
|
679
701
|
};
|
|
680
702
|
return {
|
|
681
703
|
getTableWrapperStyle: t,
|
|
682
|
-
getColumnStyle:
|
|
683
|
-
getHeaderStyle: (
|
|
684
|
-
const u =
|
|
685
|
-
return e.maxHeight && (u.position = "sticky", u.top = "0",
|
|
704
|
+
getColumnStyle: o,
|
|
705
|
+
getHeaderStyle: (l, r, i, a) => {
|
|
706
|
+
const u = o(l, r, i, a);
|
|
707
|
+
return e.maxHeight && (u.position = "sticky", u.top = "0", l.pinnedLeft || l.pinnedRight ? u.zIndex = "12" : u.zIndex = "11"), u;
|
|
686
708
|
},
|
|
687
|
-
getFooterStyle: (
|
|
688
|
-
const u =
|
|
689
|
-
return e.maxHeight && (u.position = "sticky", u.bottom = "0",
|
|
709
|
+
getFooterStyle: (l, r, i, a) => {
|
|
710
|
+
const u = o(l, r, i, a);
|
|
711
|
+
return e.maxHeight && (u.position = "sticky", u.bottom = "0", l.pinnedLeft || l.pinnedRight ? u.zIndex = "12" : u.zIndex = "11"), u;
|
|
690
712
|
}
|
|
691
713
|
};
|
|
692
714
|
}
|
|
693
|
-
function
|
|
694
|
-
const e =
|
|
715
|
+
function zn() {
|
|
716
|
+
const e = D({
|
|
695
717
|
resizingCol: null,
|
|
696
718
|
startX: 0,
|
|
697
719
|
startWidth: 0
|
|
698
720
|
}), t = `url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'><path d='M5 13L2 10L5 7' stroke='%23828282' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/><path d='M15 7L18 10L15 13' stroke='%23828282' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/><path d='M10 3L10 17' stroke='%23828282' stroke-width='3' stroke-linecap='round'/></svg>") 10 10, col-resize`;
|
|
699
721
|
return {
|
|
700
|
-
onMouseDown: (
|
|
701
|
-
|
|
702
|
-
const
|
|
703
|
-
const { resizingCol: c, startX:
|
|
704
|
-
if (!c)
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
q.classList.add("vt-table__resizer--active");
|
|
722
|
+
onMouseDown: (n, s, l, r) => {
|
|
723
|
+
n.preventDefault(), n.stopPropagation(), e.value.resizingCol = s, e.value.startX = n.clientX, e.value.startWidth = s.width || s.minWidth || l(s.prop);
|
|
724
|
+
const i = (u) => {
|
|
725
|
+
const { resizingCol: c, startX: k, startWidth: S } = e.value;
|
|
726
|
+
if (!c) return;
|
|
727
|
+
document.querySelectorAll(`[data-resizer="${c.prop}"]`).forEach((N) => {
|
|
728
|
+
N.classList.add("vt-table__resizer--active");
|
|
708
729
|
});
|
|
709
|
-
const
|
|
710
|
-
c.width =
|
|
711
|
-
},
|
|
730
|
+
const F = u.clientX - k, j = c.minWidth || 50, Q = c.maxWidth || 1e3, U = Math.max(Math.min(S + F, Q), j);
|
|
731
|
+
c.width = U;
|
|
732
|
+
}, a = () => {
|
|
712
733
|
const { resizingCol: u } = e.value;
|
|
713
|
-
document.removeEventListener("mousemove",
|
|
734
|
+
document.removeEventListener("mousemove", i), document.removeEventListener("mouseup", a), document.body.style.cursor = "", document.body.style.userSelect = "", document.body.classList.remove("vt-table-resizing"), u && (document.querySelectorAll(`[data-resizer="${u.prop}"]`).forEach((c) => {
|
|
714
735
|
c.classList.remove("vt-table__resizer--active");
|
|
715
|
-
}),
|
|
736
|
+
}), r && u.width && r(u.width)), e.value.resizingCol = null;
|
|
716
737
|
};
|
|
717
|
-
document.addEventListener("mousemove",
|
|
738
|
+
document.addEventListener("mousemove", i), document.addEventListener("mouseup", a), document.body.style.cursor = t, document.body.style.userSelect = "none", document.body.classList.add("vt-table-resizing");
|
|
718
739
|
},
|
|
719
740
|
resizeState: e
|
|
720
741
|
};
|
|
721
742
|
}
|
|
722
|
-
function
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
return
|
|
730
|
-
}
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
743
|
+
function En(e, t) {
|
|
744
|
+
if (!e)
|
|
745
|
+
return String(t.value ?? "");
|
|
746
|
+
try {
|
|
747
|
+
const o = e(t);
|
|
748
|
+
return o;
|
|
749
|
+
} catch (o) {
|
|
750
|
+
return console.error("Error rendering table slot:", o), String(t.value ?? "");
|
|
751
|
+
}
|
|
752
|
+
}
|
|
753
|
+
function Wn(e, t, o, n) {
|
|
754
|
+
var J;
|
|
755
|
+
const s = e.selectionKey || "id", l = D([]), r = D(null), i = D(!1);
|
|
756
|
+
(J = e.defaultSelection) != null && J.length && (l.value = [...e.defaultSelection]);
|
|
757
|
+
const a = (m) => m[s], u = (m) => i.value ? !0 : l.value.some((A) => a(A) === a(m)), c = x(() => t.value.filter((m) => u(m)).length), k = x(() => t.value.length > 0 && c.value === t.value.length), S = x(() => {
|
|
758
|
+
if (i.value) return !1;
|
|
759
|
+
const m = c.value;
|
|
760
|
+
return m > 0 && m < t.value.length;
|
|
761
|
+
}), F = x(() => i.value ? !0 : k.value && !S.value), j = x(() => i.value), Q = (m, A) => {
|
|
762
|
+
const z = a(m), G = l.value.some((v) => a(v) === a(m)), d = A !== void 0 ? A : !G;
|
|
763
|
+
if (i.value && !d) {
|
|
764
|
+
i.value = !1, n != null && n.value && (l.value = n.value.filter((v) => a(v) !== z)), $(m, !1);
|
|
734
765
|
return;
|
|
735
766
|
}
|
|
736
|
-
|
|
737
|
-
},
|
|
738
|
-
switch (
|
|
767
|
+
i.value && d || (d && !G ? l.value.push(m) : !d && G && (l.value = l.value.filter((v) => a(v) !== z)), e.selectOnClickRow && A === void 0 && X(d ? m : null), $(m, d));
|
|
768
|
+
}, U = () => {
|
|
769
|
+
switch (N()) {
|
|
739
770
|
case "none":
|
|
740
771
|
case "partial":
|
|
741
|
-
|
|
772
|
+
M();
|
|
742
773
|
break;
|
|
743
774
|
case "allVisible":
|
|
744
|
-
|
|
775
|
+
V();
|
|
745
776
|
break;
|
|
746
777
|
case "absoluteAll":
|
|
747
|
-
|
|
778
|
+
T();
|
|
748
779
|
break;
|
|
749
780
|
}
|
|
750
|
-
},
|
|
751
|
-
const
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
}), t.value.forEach((
|
|
755
|
-
|
|
756
|
-
}),
|
|
757
|
-
},
|
|
758
|
-
|
|
759
|
-
},
|
|
760
|
-
|
|
761
|
-
},
|
|
762
|
-
const
|
|
763
|
-
|
|
764
|
-
currentRow:
|
|
765
|
-
oldCurrentRow:
|
|
781
|
+
}, N = () => i.value ? "absoluteAll" : k.value ? "allVisible" : c.value > 0 ? "partial" : "none", M = () => {
|
|
782
|
+
const m = [], A = new Set(l.value.map((z) => a(z)));
|
|
783
|
+
l.value.forEach((z) => {
|
|
784
|
+
m.push(z);
|
|
785
|
+
}), t.value.forEach((z) => {
|
|
786
|
+
A.has(a(z)) || m.push(z);
|
|
787
|
+
}), l.value = m, i.value = !1, $();
|
|
788
|
+
}, V = () => {
|
|
789
|
+
i.value = !0, n != null && n.value ? l.value = [...n.value] : l.value = [...t.value], $(void 0, void 0, !0);
|
|
790
|
+
}, T = () => {
|
|
791
|
+
l.value = [], i.value = !1, r.value = null, $();
|
|
792
|
+
}, X = (m) => {
|
|
793
|
+
const A = r.value;
|
|
794
|
+
r.value = m, o("current-change", {
|
|
795
|
+
currentRow: r.value,
|
|
796
|
+
oldCurrentRow: A
|
|
766
797
|
});
|
|
767
|
-
},
|
|
768
|
-
|
|
769
|
-
},
|
|
770
|
-
const
|
|
771
|
-
selection: [...
|
|
772
|
-
row:
|
|
773
|
-
selected:
|
|
774
|
-
isAllSelected:
|
|
798
|
+
}, y = () => [...l.value], E = (m) => {
|
|
799
|
+
l.value = [...m], i.value = !1, $();
|
|
800
|
+
}, $ = (m, A, z = !1) => {
|
|
801
|
+
const G = {
|
|
802
|
+
selection: [...l.value],
|
|
803
|
+
row: m,
|
|
804
|
+
selected: A,
|
|
805
|
+
isAllSelected: z || i.value
|
|
775
806
|
};
|
|
776
|
-
|
|
807
|
+
o("selection-change", G);
|
|
777
808
|
};
|
|
778
|
-
return
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
809
|
+
return ve(
|
|
810
|
+
() => e.defaultSelection,
|
|
811
|
+
(m) => {
|
|
812
|
+
m != null && m.length && (l.value = [...m]);
|
|
813
|
+
}
|
|
814
|
+
), {
|
|
815
|
+
selectedRows: l,
|
|
816
|
+
currentRow: r,
|
|
783
817
|
isRowSelected: u,
|
|
784
|
-
isAllSelected:
|
|
785
|
-
isIndeterminate:
|
|
786
|
-
isDoubleCheck:
|
|
787
|
-
isFullSelection:
|
|
788
|
-
toggleRowSelection:
|
|
789
|
-
toggleAllSelection:
|
|
790
|
-
clearSelection:
|
|
791
|
-
setCurrentRow:
|
|
792
|
-
getSelectionRows:
|
|
793
|
-
setSelectionRows:
|
|
794
|
-
selectAbsolutelyAll:
|
|
818
|
+
isAllSelected: F,
|
|
819
|
+
isIndeterminate: S,
|
|
820
|
+
isDoubleCheck: j,
|
|
821
|
+
isFullSelection: i,
|
|
822
|
+
toggleRowSelection: Q,
|
|
823
|
+
toggleAllSelection: U,
|
|
824
|
+
clearSelection: T,
|
|
825
|
+
setCurrentRow: X,
|
|
826
|
+
getSelectionRows: y,
|
|
827
|
+
setSelectionRows: E,
|
|
828
|
+
selectAbsolutelyAll: V
|
|
795
829
|
};
|
|
796
830
|
}
|
|
797
|
-
const
|
|
798
|
-
if (e == null && t == null)
|
|
799
|
-
|
|
800
|
-
if (
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
return 0;
|
|
806
|
-
let o = 0;
|
|
807
|
-
const l = Number(e), s = Number(t);
|
|
808
|
-
return !isNaN(l) && !isNaN(s) ? o = l - s : ke(e) && ke(t) ? o = new Date(e).getTime() - new Date(t).getTime() : typeof e == "boolean" && typeof t == "boolean" ? o = e === t ? 0 : e ? -1 : 1 : o = String(e).localeCompare(String(t), void 0, {
|
|
831
|
+
const Vn = (e, t, o = "asc") => {
|
|
832
|
+
if (e == null && t == null) return 0;
|
|
833
|
+
if (e == null) return o === "asc" ? 1 : -1;
|
|
834
|
+
if (t == null) return o === "asc" ? -1 : 1;
|
|
835
|
+
if (e === t) return 0;
|
|
836
|
+
let n = 0;
|
|
837
|
+
const s = Number(e), l = Number(t);
|
|
838
|
+
return !isNaN(s) && !isNaN(l) ? n = s - l : ze(e) && ze(t) ? n = new Date(e).getTime() - new Date(t).getTime() : typeof e == "boolean" && typeof t == "boolean" ? n = e === t ? 0 : e ? -1 : 1 : n = String(e).localeCompare(String(t), void 0, {
|
|
809
839
|
numeric: !0,
|
|
810
840
|
sensitivity: "base"
|
|
811
|
-
}),
|
|
812
|
-
},
|
|
813
|
-
e.sortable &&
|
|
841
|
+
}), o === "desc" ? -n : n;
|
|
842
|
+
}, ze = (e) => e instanceof Date ? !isNaN(e.getTime()) : typeof e == "string" && /\d{4}-\d{2}-\d{2}|\//.test(e) ? !isNaN(new Date(e).getTime()) : !1, Hn = (e, t, o) => {
|
|
843
|
+
e.sortable && o({
|
|
814
844
|
prop: e.prop,
|
|
815
845
|
direction: t
|
|
816
846
|
});
|
|
817
|
-
},
|
|
818
|
-
const
|
|
847
|
+
}, Ee = (e, t) => {
|
|
848
|
+
const o = (t == null ? void 0 : t.prop) === e.prop, n = t == null ? void 0 : t.direction;
|
|
819
849
|
return {
|
|
820
|
-
asc: ["vt-th__sort-icon",
|
|
821
|
-
desc: ["vt-th__sort-icon",
|
|
850
|
+
asc: ["vt-th__sort-icon", o && n === "asc" && "vt-th__sortable-active"].filter(Boolean).join(" "),
|
|
851
|
+
desc: ["vt-th__sort-icon", o && n === "desc" && "vt-th__sortable-active"].filter(Boolean).join(" ")
|
|
822
852
|
};
|
|
823
|
-
},
|
|
824
|
-
if (!t)
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
const a = s[o.prop], r = i[o.prop];
|
|
832
|
-
return l(a, r, t.direction);
|
|
853
|
+
}, Pn = (e, t, o) => {
|
|
854
|
+
if (!t) return [...e];
|
|
855
|
+
const n = o.find((l) => l.prop === t.prop);
|
|
856
|
+
if (!(n != null && n.sortable)) return [...e];
|
|
857
|
+
const s = n.sortMethod || Vn;
|
|
858
|
+
return [...e].sort((l, r) => {
|
|
859
|
+
const i = l[n.prop], a = r[n.prop];
|
|
860
|
+
return s(i, a, t.direction);
|
|
833
861
|
});
|
|
834
862
|
};
|
|
835
|
-
class
|
|
836
|
-
|
|
837
|
-
|
|
863
|
+
class Dn {
|
|
864
|
+
constructor() {
|
|
865
|
+
this.modalStack = [], this.baseZIndex = 1e3;
|
|
866
|
+
}
|
|
838
867
|
open(t = {}) {
|
|
839
|
-
const
|
|
840
|
-
|
|
841
|
-
const
|
|
868
|
+
const o = `modal-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`, n = document.createElement("div");
|
|
869
|
+
n.setAttribute("data-vt-modal", o), document.body.appendChild(n);
|
|
870
|
+
const s = D(!0), l = this.baseZIndex + this.modalStack.length * 10, r = it({
|
|
842
871
|
setup() {
|
|
843
|
-
const
|
|
844
|
-
|
|
845
|
-
|
|
872
|
+
const a = () => {
|
|
873
|
+
s.value = !1, setTimeout(() => {
|
|
874
|
+
re.closeById(o);
|
|
846
875
|
}, 100);
|
|
847
876
|
};
|
|
848
|
-
return () =>
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
877
|
+
return () => ke(
|
|
878
|
+
Ze,
|
|
879
|
+
{
|
|
880
|
+
modelValue: s.value,
|
|
881
|
+
"onUpdate:modelValue": a,
|
|
882
|
+
title: t.title,
|
|
883
|
+
size: t.size || "medium",
|
|
884
|
+
showCloseButton: t.showCloseButton !== !1,
|
|
885
|
+
closeOnBackdropClick: t.closeOnBackdropClick !== !1,
|
|
886
|
+
onClose: a,
|
|
887
|
+
zIndex: l
|
|
888
|
+
},
|
|
889
|
+
{
|
|
890
|
+
default: () => t.component ? ke(t.component, t.props || {}) : t.content ? ke("div", { innerHTML: t.content }) : null
|
|
891
|
+
}
|
|
892
|
+
);
|
|
860
893
|
}
|
|
861
894
|
});
|
|
862
|
-
|
|
863
|
-
const
|
|
864
|
-
id:
|
|
865
|
-
app:
|
|
866
|
-
container:
|
|
867
|
-
isOpen:
|
|
895
|
+
r.mount(n);
|
|
896
|
+
const i = {
|
|
897
|
+
id: o,
|
|
898
|
+
app: r,
|
|
899
|
+
container: n,
|
|
900
|
+
isOpen: s
|
|
868
901
|
};
|
|
869
|
-
return this.modalStack.push(
|
|
902
|
+
return this.modalStack.push(i), o;
|
|
870
903
|
}
|
|
871
904
|
close() {
|
|
872
905
|
if (this.modalStack.length > 0) {
|
|
@@ -875,10 +908,10 @@ class Cn {
|
|
|
875
908
|
}
|
|
876
909
|
}
|
|
877
910
|
closeById(t) {
|
|
878
|
-
const
|
|
879
|
-
if (
|
|
880
|
-
const
|
|
881
|
-
this.cleanupModal(
|
|
911
|
+
const o = this.modalStack.findIndex((n) => n.id === t);
|
|
912
|
+
if (o !== -1) {
|
|
913
|
+
const n = this.modalStack[o];
|
|
914
|
+
this.cleanupModal(n), this.modalStack.splice(o, 1), this.recalculateZIndices();
|
|
882
915
|
}
|
|
883
916
|
}
|
|
884
917
|
closeAll() {
|
|
@@ -896,24 +929,24 @@ class Cn {
|
|
|
896
929
|
recalculateZIndices() {
|
|
897
930
|
}
|
|
898
931
|
}
|
|
899
|
-
const
|
|
932
|
+
const re = new Dn(), An = {
|
|
900
933
|
install(e) {
|
|
901
|
-
e.config.globalProperties.$modal =
|
|
902
|
-
closeAll: () =>
|
|
903
|
-
getCount: () =>
|
|
904
|
-
closeById: (t) =>
|
|
934
|
+
e.config.globalProperties.$modal = re, e.config.globalProperties.$modalStack = {
|
|
935
|
+
closeAll: () => re.closeAll(),
|
|
936
|
+
getCount: () => re.getOpenModalsCount(),
|
|
937
|
+
closeById: (t) => re.closeById(t)
|
|
905
938
|
};
|
|
906
939
|
}
|
|
907
|
-
},
|
|
940
|
+
}, On = { class: "vt-columns-selector-body" }, jn = { class: "vt-columns-selector" }, Nn = { class: "vt-columns-selector__panel" }, Zn = ["draggable", "onDragstart", "onDragover", "onDrop"], Fn = {
|
|
908
941
|
key: 0,
|
|
909
942
|
class: "vt-columns-selector__panel-item-pinned"
|
|
910
|
-
},
|
|
943
|
+
}, Un = { class: "vt-columns-selector__available" }, qn = ["onClick"], Xn = {
|
|
911
944
|
key: 0,
|
|
912
945
|
class: "vt-columns-selector__group-columns"
|
|
913
|
-
},
|
|
946
|
+
}, Gn = {
|
|
914
947
|
key: 0,
|
|
915
948
|
class: "vt-columns-selector__pinned-note"
|
|
916
|
-
},
|
|
949
|
+
}, Kn = { class: "vt-modal__content-button" }, Yn = /* @__PURE__ */ le({
|
|
917
950
|
__name: "VTableColumnSelector",
|
|
918
951
|
props: {
|
|
919
952
|
columns: {},
|
|
@@ -921,189 +954,192 @@ const se = new Cn(), bn = {
|
|
|
921
954
|
},
|
|
922
955
|
emits: ["update-columns"],
|
|
923
956
|
setup(e, { emit: t }) {
|
|
924
|
-
const
|
|
957
|
+
const o = e, n = t, s = D([]), l = D(/* @__PURE__ */ new Set()), r = D(-1), i = D(-1), a = D("before"), u = x(() => {
|
|
925
958
|
const d = {};
|
|
926
|
-
return
|
|
927
|
-
if (
|
|
959
|
+
return o.columnsSelector.forEach((v) => {
|
|
960
|
+
if (v.name === "removed")
|
|
928
961
|
return;
|
|
929
|
-
const
|
|
930
|
-
w.length === 0 ? d[
|
|
962
|
+
const g = v.columns.map((B) => B.prop), w = s.value.filter((B) => g.includes(B.prop));
|
|
963
|
+
w.length === 0 ? d[v.name] = { checked: !1, indeterminate: !1 } : w.length === v.columns.length ? d[v.name] = { checked: !0, indeterminate: !1 } : d[v.name] = { checked: !1, indeterminate: !0 };
|
|
931
964
|
}), d;
|
|
932
|
-
}), c =
|
|
933
|
-
const d =
|
|
934
|
-
let
|
|
965
|
+
}), c = x(() => o.columnsSelector.filter((d) => d.name !== "removed")), k = (d) => d.pinnedLeft || d.pinnedRight, S = (d) => !k(d), F = () => {
|
|
966
|
+
const d = s.value;
|
|
967
|
+
let v = -1;
|
|
935
968
|
for (let w = 0; w < d.length; w++)
|
|
936
|
-
d[w].pinnedLeft && (
|
|
937
|
-
let
|
|
969
|
+
d[w].pinnedLeft && (v = w);
|
|
970
|
+
let g = d.length;
|
|
938
971
|
for (let w = 0; w < d.length; w++)
|
|
939
972
|
if (d[w].pinnedRight) {
|
|
940
|
-
|
|
973
|
+
g = w;
|
|
941
974
|
break;
|
|
942
975
|
}
|
|
943
976
|
return {
|
|
944
|
-
minIndex:
|
|
945
|
-
maxIndex:
|
|
977
|
+
minIndex: v + 1,
|
|
978
|
+
maxIndex: g - 1
|
|
946
979
|
};
|
|
947
|
-
},
|
|
948
|
-
const
|
|
949
|
-
return !(d <
|
|
950
|
-
},
|
|
951
|
-
const
|
|
952
|
-
if (
|
|
980
|
+
}, j = (d) => {
|
|
981
|
+
const v = F();
|
|
982
|
+
return !(d < v.minIndex || d > v.maxIndex + 1);
|
|
983
|
+
}, Q = (d, v) => {
|
|
984
|
+
const g = s.value[v];
|
|
985
|
+
if (!S(g)) {
|
|
953
986
|
d.preventDefault();
|
|
954
987
|
return;
|
|
955
988
|
}
|
|
956
|
-
|
|
957
|
-
},
|
|
958
|
-
if (
|
|
989
|
+
r.value = v, d.dataTransfer && (d.dataTransfer.effectAllowed = "move", d.dataTransfer.setData("text/plain", g.prop)), document.body.style.cursor = "grabbing";
|
|
990
|
+
}, U = (d, v) => {
|
|
991
|
+
if (r.value === -1) return;
|
|
959
992
|
d.preventDefault();
|
|
960
|
-
const
|
|
961
|
-
let
|
|
962
|
-
w <
|
|
963
|
-
},
|
|
993
|
+
const g = d.currentTarget.getBoundingClientRect(), w = d.clientY, B = g.top + g.height / 2;
|
|
994
|
+
let I = v, ee = "before";
|
|
995
|
+
w < B ? (I = v, ee = "before") : (I = v + 1, ee = "after"), r.value < I && I--, j(I) ? (i.value = v, a.value = ee, d.dataTransfer.dropEffect = "move") : (i.value = -1, d.dataTransfer.dropEffect = "none");
|
|
996
|
+
}, N = () => {
|
|
964
997
|
setTimeout(() => {
|
|
965
|
-
|
|
998
|
+
r.value === -1 && (i.value = -1);
|
|
966
999
|
}, 50);
|
|
967
|
-
},
|
|
968
|
-
if (d.preventDefault(),
|
|
969
|
-
|
|
1000
|
+
}, M = (d, v) => {
|
|
1001
|
+
if (d.preventDefault(), r.value === -1 || i.value === -1) {
|
|
1002
|
+
T();
|
|
970
1003
|
return;
|
|
971
1004
|
}
|
|
972
|
-
const
|
|
973
|
-
let
|
|
974
|
-
if (w >=
|
|
975
|
-
|
|
1005
|
+
const g = d.currentTarget.getBoundingClientRect(), w = d.clientY, B = g.top + g.height / 2;
|
|
1006
|
+
let I = v;
|
|
1007
|
+
if (w >= B && (I = v + 1), r.value < I && I--, !j(I) || I === r.value) {
|
|
1008
|
+
T();
|
|
976
1009
|
return;
|
|
977
1010
|
}
|
|
978
|
-
const ee = [...
|
|
979
|
-
ee.splice(
|
|
980
|
-
},
|
|
981
|
-
|
|
982
|
-
},
|
|
983
|
-
|
|
984
|
-
},
|
|
985
|
-
const
|
|
986
|
-
return
|
|
987
|
-
},
|
|
988
|
-
|
|
989
|
-
d.name !== "removed" &&
|
|
1011
|
+
const ee = [...s.value], [Ce] = ee.splice(r.value, 1);
|
|
1012
|
+
ee.splice(I, 0, Ce), s.value = ee, T();
|
|
1013
|
+
}, V = () => {
|
|
1014
|
+
T();
|
|
1015
|
+
}, T = () => {
|
|
1016
|
+
r.value = -1, i.value = -1, a.value = "before", document.body.style.cursor = "";
|
|
1017
|
+
}, X = (d) => {
|
|
1018
|
+
const v = ["vt-columns-selector__panel-item"];
|
|
1019
|
+
return r.value === d && v.push("vt-columns-selector__panel-item--dragging"), i.value === d && a.value === "before" && v.push("vt-columns-selector__panel-item--drop-before"), i.value === d && a.value === "after" && v.push("vt-columns-selector__panel-item--drop-after"), v;
|
|
1020
|
+
}, y = () => {
|
|
1021
|
+
s.value = [...o.columns.map((d) => ({ ...d }))], o.columnsSelector.forEach((d) => {
|
|
1022
|
+
d.name !== "removed" && l.value.add(d.name);
|
|
990
1023
|
});
|
|
991
|
-
},
|
|
992
|
-
if (
|
|
993
|
-
|
|
1024
|
+
}, E = (d, v) => {
|
|
1025
|
+
if (v)
|
|
1026
|
+
s.value.some((g) => g.prop === d.prop) || s.value.push({ ...d });
|
|
994
1027
|
else {
|
|
995
|
-
if (
|
|
1028
|
+
if (k(d))
|
|
996
1029
|
return;
|
|
997
|
-
|
|
1030
|
+
s.value = s.value.filter((g) => g.prop !== d.prop);
|
|
998
1031
|
}
|
|
999
|
-
},
|
|
1000
|
-
if (
|
|
1001
|
-
d.columns.forEach((
|
|
1002
|
-
|
|
1032
|
+
}, $ = (d, v) => {
|
|
1033
|
+
if (v)
|
|
1034
|
+
d.columns.forEach((g) => {
|
|
1035
|
+
s.value.some((w) => w.prop === g.prop) || s.value.push({ ...g });
|
|
1003
1036
|
});
|
|
1004
1037
|
else {
|
|
1005
|
-
const
|
|
1038
|
+
const g = [];
|
|
1006
1039
|
d.columns.forEach((w) => {
|
|
1007
|
-
const
|
|
1008
|
-
|
|
1009
|
-
}),
|
|
1010
|
-
(w) => !
|
|
1040
|
+
const B = s.value.find((I) => I.prop === w.prop);
|
|
1041
|
+
B && !k(B) && g.push(B);
|
|
1042
|
+
}), s.value = s.value.filter(
|
|
1043
|
+
(w) => !g.some((B) => B.prop === w.prop)
|
|
1011
1044
|
);
|
|
1012
1045
|
}
|
|
1013
|
-
},
|
|
1014
|
-
const
|
|
1015
|
-
return !
|
|
1016
|
-
},
|
|
1017
|
-
|
|
1018
|
-
},
|
|
1019
|
-
|
|
1020
|
-
},
|
|
1021
|
-
|
|
1046
|
+
}, J = (d) => s.value.some((v) => v.prop === d.prop), m = (d) => {
|
|
1047
|
+
const v = s.value.find((g) => g.prop === d.prop);
|
|
1048
|
+
return !v || !k(v);
|
|
1049
|
+
}, A = (d) => {
|
|
1050
|
+
l.value.has(d) ? l.value.delete(d) : l.value.add(d);
|
|
1051
|
+
}, z = () => {
|
|
1052
|
+
n("update-columns", [...s.value]), re.close();
|
|
1053
|
+
}, G = () => {
|
|
1054
|
+
re.close();
|
|
1022
1055
|
};
|
|
1023
|
-
return
|
|
1024
|
-
|
|
1025
|
-
}), (d,
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
(p(!0),
|
|
1029
|
-
key:
|
|
1030
|
-
class:
|
|
1031
|
-
draggable:
|
|
1032
|
-
onDragstart: (
|
|
1033
|
-
onDragover: (
|
|
1034
|
-
onDragleave:
|
|
1035
|
-
onDrop: (
|
|
1036
|
-
onDragend:
|
|
1056
|
+
return fe(() => {
|
|
1057
|
+
y();
|
|
1058
|
+
}), (d, v) => (p(), f("div", On, [
|
|
1059
|
+
_("div", jn, [
|
|
1060
|
+
_("div", Nn, [
|
|
1061
|
+
(p(!0), f(ne, null, oe(s.value, (g, w) => (p(), f("div", {
|
|
1062
|
+
key: g.prop,
|
|
1063
|
+
class: W(X(w)),
|
|
1064
|
+
draggable: S(g),
|
|
1065
|
+
onDragstart: (B) => Q(B, w),
|
|
1066
|
+
onDragover: (B) => U(B, w),
|
|
1067
|
+
onDragleave: N,
|
|
1068
|
+
onDrop: (B) => M(B, w),
|
|
1069
|
+
onDragend: V
|
|
1037
1070
|
}, [
|
|
1038
|
-
|
|
1039
|
-
name:
|
|
1040
|
-
class:
|
|
1071
|
+
Z(Y, {
|
|
1072
|
+
name: S(g) ? "columnsMove" : "freeze",
|
|
1073
|
+
class: W(["vt-columns-selector__panel-item-icon", { "vt-columns-selector__panel-item-icon--draggable": S(g) }])
|
|
1041
1074
|
}, null, 8, ["name", "class"]),
|
|
1042
|
-
|
|
1043
|
-
label:
|
|
1075
|
+
Z(de, {
|
|
1076
|
+
label: g.label,
|
|
1044
1077
|
checked: !0,
|
|
1045
|
-
disabled:
|
|
1046
|
-
onChange: (
|
|
1047
|
-
onClick:
|
|
1078
|
+
disabled: k(g),
|
|
1079
|
+
onChange: (B) => E(g, B),
|
|
1080
|
+
onClick: v[0] || (v[0] = he(() => {
|
|
1048
1081
|
}, ["stop"]))
|
|
1049
1082
|
}, null, 8, ["label", "disabled", "onChange"]),
|
|
1050
|
-
|
|
1051
|
-
], 42,
|
|
1083
|
+
k(g) ? (p(), f("span", Fn, "pinned")) : H("", !0)
|
|
1084
|
+
], 42, Zn))), 128))
|
|
1052
1085
|
]),
|
|
1053
|
-
|
|
1054
|
-
(p(!0),
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
class: "vt-columns-selector__group-header",
|
|
1060
|
-
onClick: (w) => B(C.name)
|
|
1086
|
+
_("div", Un, [
|
|
1087
|
+
(p(!0), f(ne, null, oe(c.value, (g) => {
|
|
1088
|
+
var w, B;
|
|
1089
|
+
return p(), f("div", {
|
|
1090
|
+
key: g.name,
|
|
1091
|
+
class: "vt-columns-selector__group"
|
|
1061
1092
|
}, [
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
indeterminate: u.value[C.name]?.indeterminate || !1,
|
|
1066
|
-
onChange: (w) => D(C, w),
|
|
1067
|
-
onClick: g[1] || (g[1] = ce(() => {
|
|
1068
|
-
}, ["stop"]))
|
|
1069
|
-
}, null, 8, ["label", "checked", "indeterminate", "onChange"]),
|
|
1070
|
-
C.icon ? (p(), ie(G, {
|
|
1071
|
-
key: 0,
|
|
1072
|
-
name: C.icon,
|
|
1073
|
-
class: "vt-columns-selector__group-icon"
|
|
1074
|
-
}, null, 8, ["name"])) : V("", !0)
|
|
1075
|
-
], 8, Mn),
|
|
1076
|
-
s.value.has(C.name) ? (p(), h("div", Ln, [
|
|
1077
|
-
(p(!0), h(te, null, ne(C.columns, (w) => (p(), h("div", {
|
|
1078
|
-
key: w.prop,
|
|
1079
|
-
class: "vt-columns-selector__group-column"
|
|
1093
|
+
_("div", {
|
|
1094
|
+
class: "vt-columns-selector__group-header",
|
|
1095
|
+
onClick: (I) => A(g.name)
|
|
1080
1096
|
}, [
|
|
1081
|
-
|
|
1082
|
-
label:
|
|
1083
|
-
checked:
|
|
1084
|
-
|
|
1085
|
-
onChange: (I) =>
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1097
|
+
Z(de, {
|
|
1098
|
+
label: g.label,
|
|
1099
|
+
checked: ((w = u.value[g.name]) == null ? void 0 : w.checked) || !1,
|
|
1100
|
+
indeterminate: ((B = u.value[g.name]) == null ? void 0 : B.indeterminate) || !1,
|
|
1101
|
+
onChange: (I) => $(g, I),
|
|
1102
|
+
onClick: v[1] || (v[1] = he(() => {
|
|
1103
|
+
}, ["stop"]))
|
|
1104
|
+
}, null, 8, ["label", "checked", "indeterminate", "onChange"]),
|
|
1105
|
+
g.icon ? (p(), ce(Y, {
|
|
1106
|
+
key: 0,
|
|
1107
|
+
name: g.icon,
|
|
1108
|
+
class: "vt-columns-selector__group-icon"
|
|
1109
|
+
}, null, 8, ["name"])) : H("", !0)
|
|
1110
|
+
], 8, qn),
|
|
1111
|
+
l.value.has(g.name) ? (p(), f("div", Xn, [
|
|
1112
|
+
(p(!0), f(ne, null, oe(g.columns, (I) => (p(), f("div", {
|
|
1113
|
+
key: I.prop,
|
|
1114
|
+
class: "vt-columns-selector__group-column"
|
|
1115
|
+
}, [
|
|
1116
|
+
Z(de, {
|
|
1117
|
+
label: I.label,
|
|
1118
|
+
checked: J(I),
|
|
1119
|
+
disabled: !m(I),
|
|
1120
|
+
onChange: (ee) => E(I, ee)
|
|
1121
|
+
}, null, 8, ["label", "checked", "disabled", "onChange"]),
|
|
1122
|
+
m(I) ? H("", !0) : (p(), f("span", Gn, " (закріплена) "))
|
|
1123
|
+
]))), 128))
|
|
1124
|
+
])) : H("", !0)
|
|
1125
|
+
]);
|
|
1126
|
+
}), 128))
|
|
1091
1127
|
])
|
|
1092
1128
|
]),
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
default:
|
|
1096
|
-
|
|
1129
|
+
_("div", Kn, [
|
|
1130
|
+
Z(ge, { onClick: G }, {
|
|
1131
|
+
default: xe(() => v[2] || (v[2] = [
|
|
1132
|
+
_e("Скасувати", -1)
|
|
1097
1133
|
])),
|
|
1098
1134
|
_: 1,
|
|
1099
1135
|
__: [2]
|
|
1100
1136
|
}),
|
|
1101
|
-
|
|
1137
|
+
Z(ge, {
|
|
1102
1138
|
type: "primary",
|
|
1103
|
-
onClick:
|
|
1139
|
+
onClick: z
|
|
1104
1140
|
}, {
|
|
1105
|
-
default:
|
|
1106
|
-
|
|
1141
|
+
default: xe(() => v[3] || (v[3] = [
|
|
1142
|
+
_e("Зберегти", -1)
|
|
1107
1143
|
])),
|
|
1108
1144
|
_: 1,
|
|
1109
1145
|
__: [3]
|
|
@@ -1111,7 +1147,7 @@ const se = new Cn(), bn = {
|
|
|
1111
1147
|
])
|
|
1112
1148
|
]));
|
|
1113
1149
|
}
|
|
1114
|
-
}),
|
|
1150
|
+
}), Jn = /* @__PURE__ */ le({
|
|
1115
1151
|
__name: "ColumnActions",
|
|
1116
1152
|
props: {
|
|
1117
1153
|
column: {},
|
|
@@ -1120,103 +1156,109 @@ const se = new Cn(), bn = {
|
|
|
1120
1156
|
},
|
|
1121
1157
|
emits: ["pin", "update-columns"],
|
|
1122
1158
|
setup(e, { emit: t }) {
|
|
1123
|
-
const
|
|
1124
|
-
if (await
|
|
1125
|
-
const
|
|
1126
|
-
|
|
1127
|
-
const
|
|
1128
|
-
|
|
1129
|
-
},
|
|
1130
|
-
|
|
1131
|
-
},
|
|
1132
|
-
|
|
1133
|
-
},
|
|
1134
|
-
|
|
1135
|
-
|
|
1159
|
+
const o = e, n = t, s = D(), l = D(), r = D(), i = D(!1), a = D(!1), u = D([]), c = async () => {
|
|
1160
|
+
if (await at(), !s.value || !l.value) return;
|
|
1161
|
+
const y = l.value.getBoundingClientRect(), E = s.value, $ = E.offsetWidth, J = y.left + y.width / 2;
|
|
1162
|
+
E.style.top = `${y.bottom - 20}px`, E.style.left = `${J - $ / 2}px`;
|
|
1163
|
+
const m = E.getBoundingClientRect();
|
|
1164
|
+
m.right > window.innerWidth && (E.style.left = `${window.innerWidth - $ - 8}px`), m.left < 0 && (E.style.left = "8px");
|
|
1165
|
+
}, k = (y) => {
|
|
1166
|
+
y.stopPropagation(), !a.value && (i.value ? F() : S());
|
|
1167
|
+
}, S = () => {
|
|
1168
|
+
a.value || (i.value = !0, c(), r.value && (r.value.style.zIndex = "22"));
|
|
1169
|
+
}, F = () => {
|
|
1170
|
+
a.value = !0, i.value = !1, r.value && r.value.style.removeProperty("z-index"), setTimeout(() => {
|
|
1171
|
+
a.value = !1;
|
|
1136
1172
|
}, 100);
|
|
1137
|
-
},
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1173
|
+
}, j = (y) => {
|
|
1174
|
+
var E, $;
|
|
1175
|
+
!((E = l.value) != null && E.contains(y.target)) && !(($ = s.value) != null && $.contains(y.target)) && F();
|
|
1176
|
+
}, Q = () => {
|
|
1177
|
+
X() ? (n("pin", o.column, "none"), console.log(`Колонка "${o.column.label}" відкріплена`)) : (n("pin", o.column, "left"), console.log(`Колонка "${o.column.label}" прикріплена зліва`)), F();
|
|
1178
|
+
}, U = (y) => ({
|
|
1142
1179
|
name: "removed",
|
|
1143
1180
|
label: "Видалені колонки",
|
|
1144
1181
|
order: 999,
|
|
1145
1182
|
// Найвищий порядок, щоб відображались останніми
|
|
1146
|
-
columns:
|
|
1147
|
-
}),
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1183
|
+
columns: y
|
|
1184
|
+
}), N = (y) => {
|
|
1185
|
+
var A;
|
|
1186
|
+
const E = new Set(y.map((z) => z.prop)), $ = /* @__PURE__ */ new Set();
|
|
1187
|
+
(A = o.columnsSelector) == null || A.forEach((z) => {
|
|
1188
|
+
z.columns.forEach((G) => $.add(G.prop));
|
|
1189
|
+
}), o.allColumns.forEach((z) => $.add(z.prop));
|
|
1190
|
+
const J = [];
|
|
1191
|
+
$.forEach((z) => {
|
|
1192
|
+
var G;
|
|
1193
|
+
if (!E.has(z)) {
|
|
1194
|
+
let d;
|
|
1195
|
+
(G = o.columnsSelector) == null || G.forEach((v) => {
|
|
1196
|
+
const g = v.columns.find((w) => w.prop === z);
|
|
1197
|
+
g && (d = g);
|
|
1198
|
+
}), d || (d = o.allColumns.find((v) => v.prop === z)), d && J.push(d);
|
|
1160
1199
|
}
|
|
1161
1200
|
});
|
|
1162
|
-
const
|
|
1163
|
-
|
|
1164
|
-
},
|
|
1165
|
-
|
|
1166
|
-
component:
|
|
1201
|
+
const m = [...o.columnsSelector || []];
|
|
1202
|
+
J.length > 0 && m.push(U(J)), u.value = m;
|
|
1203
|
+
}, M = () => {
|
|
1204
|
+
N(o.allColumns), re.open({
|
|
1205
|
+
component: Yn,
|
|
1167
1206
|
title: "Управління колонками таблиці",
|
|
1168
1207
|
props: {
|
|
1169
|
-
columns:
|
|
1208
|
+
columns: o.allColumns,
|
|
1170
1209
|
// Передаємо всі колонки
|
|
1171
1210
|
columnsSelector: u.value,
|
|
1172
1211
|
// Передаємо оновлені доступні колонки
|
|
1173
|
-
"onUpdate-columns": (
|
|
1174
|
-
console.log("ColumnActions отримав оновлені колонки:",
|
|
1212
|
+
"onUpdate-columns": (y) => {
|
|
1213
|
+
console.log("ColumnActions отримав оновлені колонки:", y), n("update-columns", y), N(y);
|
|
1175
1214
|
}
|
|
1176
1215
|
},
|
|
1177
1216
|
size: "large",
|
|
1178
1217
|
closeOnBackdropClick: !1
|
|
1179
|
-
}),
|
|
1180
|
-
},
|
|
1181
|
-
return
|
|
1182
|
-
document.addEventListener("click",
|
|
1183
|
-
}),
|
|
1184
|
-
document.removeEventListener("click",
|
|
1185
|
-
}), (
|
|
1218
|
+
}), F();
|
|
1219
|
+
}, V = () => o.column.pinnedLeft, T = () => o.column.pinnedRight, X = () => V() || T();
|
|
1220
|
+
return fe(() => {
|
|
1221
|
+
document.addEventListener("click", j), l.value && (r.value = l.value.closest("th")), N(o.allColumns);
|
|
1222
|
+
}), $e(() => {
|
|
1223
|
+
document.removeEventListener("click", j);
|
|
1224
|
+
}), (y, E) => (p(), f("div", {
|
|
1186
1225
|
ref_key: "triggerRef",
|
|
1187
|
-
ref:
|
|
1226
|
+
ref: l,
|
|
1188
1227
|
class: "vt-table-header-actions",
|
|
1189
|
-
onClick:
|
|
1228
|
+
onClick: k
|
|
1190
1229
|
}, [
|
|
1191
|
-
|
|
1192
|
-
|
|
1230
|
+
Z(Y, { name: "listBullet" }),
|
|
1231
|
+
i.value ? (p(), f("ul", {
|
|
1193
1232
|
key: 0,
|
|
1194
1233
|
ref_key: "menuRef",
|
|
1195
|
-
ref:
|
|
1196
|
-
class:
|
|
1234
|
+
ref: s,
|
|
1235
|
+
class: W(["dropdown-menu", "vt-table-dropdown", { visible: i.value }])
|
|
1197
1236
|
}, [
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
name:
|
|
1237
|
+
_("li", { onClick: Q }, [
|
|
1238
|
+
Z(Y, {
|
|
1239
|
+
name: X() ? "unfreeze" : "freeze"
|
|
1201
1240
|
}, null, 8, ["name"]),
|
|
1202
|
-
|
|
1241
|
+
_("span", null, te(X() ? "Розморозити" : "Заморозити"), 1)
|
|
1203
1242
|
]),
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1243
|
+
_("li", { onClick: M }, [
|
|
1244
|
+
Z(Y, { name: "columnInsert" }),
|
|
1245
|
+
E[0] || (E[0] = _("span", null, "Колонки", -1))
|
|
1207
1246
|
])
|
|
1208
|
-
], 2)) :
|
|
1247
|
+
], 2)) : H("", !0)
|
|
1209
1248
|
], 512));
|
|
1210
1249
|
}
|
|
1211
|
-
}),
|
|
1250
|
+
}), Qn = { class: "vt-table" }, eo = { class: "vt-th__content" }, to = { class: "vt-th__content" }, no = { class: "vt-th__label" }, oo = {
|
|
1212
1251
|
key: 0,
|
|
1213
1252
|
class: "vt-th__sortable"
|
|
1214
|
-
},
|
|
1253
|
+
}, lo = ["data-resizer", "onMousedown"], so = {
|
|
1254
|
+
key: 0,
|
|
1255
|
+
class: "vt-table__empty-row"
|
|
1256
|
+
}, io = ["colspan"], ao = { class: "vt-table__empty-content" }, ro = ["onClick"], co = { class: "vt-table__cell-content" }, uo = { class: "vt-table__cell-content vt-table__cell-content--ellipsis" }, po = { key: 1 }, mo = ["data-resizer", "onMousedown"], ho = {
|
|
1215
1257
|
key: 0,
|
|
1216
1258
|
class: "vt-table__summary"
|
|
1217
|
-
},
|
|
1259
|
+
}, vo = { class: "vt-table__cell-content vt-table__cell-content--summary" }, ye = 50, fo = /* @__PURE__ */ le({
|
|
1218
1260
|
__name: "VTable",
|
|
1219
|
-
props: /* @__PURE__ */
|
|
1261
|
+
props: /* @__PURE__ */ Te({
|
|
1220
1262
|
data: {},
|
|
1221
1263
|
maxHeight: {},
|
|
1222
1264
|
defaultSort: {},
|
|
@@ -1234,306 +1276,347 @@ const se = new Cn(), bn = {
|
|
|
1234
1276
|
columns: { required: !1 },
|
|
1235
1277
|
columnsModifiers: {}
|
|
1236
1278
|
}),
|
|
1237
|
-
emits: /* @__PURE__ */
|
|
1238
|
-
setup(e, { expose: t, emit:
|
|
1239
|
-
const
|
|
1240
|
-
|
|
1279
|
+
emits: /* @__PURE__ */ Te(["sort-change", "selection-change", "current-change", "row-click", "update:columns", "column-pin", "column-resize", "column-visibility", "column-sort", "columns-change", "infinity-scroll"], ["update:columns"]),
|
|
1280
|
+
setup(e, { expose: t, emit: o }) {
|
|
1281
|
+
const n = e, s = rt(e, "columns"), l = o, r = D({}), i = D(), a = ct([]), u = D(n.defaultSort || null), c = x(() => s.value !== void 0), k = x(() => n.data && n.data.length > 0), S = D(!1), F = D(0);
|
|
1282
|
+
let j = null;
|
|
1283
|
+
const Q = () => {
|
|
1284
|
+
c.value && s.value ? a.splice(0, a.length, ...s.value) : n.columns && a.splice(0, a.length, ...n.columns);
|
|
1241
1285
|
};
|
|
1242
|
-
|
|
1243
|
-
() =>
|
|
1244
|
-
(
|
|
1245
|
-
|
|
1286
|
+
ve(
|
|
1287
|
+
() => s.value,
|
|
1288
|
+
(h) => {
|
|
1289
|
+
h && c.value && a.splice(0, a.length, ...h);
|
|
1246
1290
|
},
|
|
1247
1291
|
{ deep: !0 }
|
|
1248
|
-
),
|
|
1249
|
-
() =>
|
|
1250
|
-
(
|
|
1251
|
-
|
|
1292
|
+
), ve(
|
|
1293
|
+
() => n.columns,
|
|
1294
|
+
(h) => {
|
|
1295
|
+
h && !c.value && a.splice(0, a.length, ...h);
|
|
1252
1296
|
},
|
|
1253
1297
|
{ deep: !0 }
|
|
1254
|
-
),
|
|
1255
|
-
const { sortedColumns:
|
|
1256
|
-
width: `${
|
|
1257
|
-
minWidth: `${
|
|
1258
|
-
maxWidth: `${
|
|
1298
|
+
), ut("vt-table-columns", a);
|
|
1299
|
+
const { sortedColumns: U, getDefaultColumnWidth: N, getStickyOffset: M } = Rn(a), { getTableWrapperStyle: V, getColumnStyle: T, getHeaderStyle: X, getFooterStyle: y } = Tn(n), { onMouseDown: E } = zn(), $ = x(() => Pn(n.data, u.value, a)), J = x(() => n.allData || n.data), m = n.selectable ? Wn(n, $, l, J) : null, A = () => ({
|
|
1300
|
+
width: `${ye}px`,
|
|
1301
|
+
minWidth: `${ye}px`,
|
|
1302
|
+
maxWidth: `${ye}px`,
|
|
1259
1303
|
left: "0px",
|
|
1260
1304
|
position: "sticky",
|
|
1261
1305
|
zIndex: 10
|
|
1262
|
-
}),
|
|
1263
|
-
const
|
|
1264
|
-
return
|
|
1265
|
-
...
|
|
1306
|
+
}), z = () => {
|
|
1307
|
+
const h = A();
|
|
1308
|
+
return n.maxHeight ? {
|
|
1309
|
+
...h,
|
|
1266
1310
|
top: "0px",
|
|
1267
1311
|
zIndex: 11
|
|
1268
1312
|
// Вищий z-index для header
|
|
1269
|
-
} :
|
|
1270
|
-
},
|
|
1271
|
-
const
|
|
1272
|
-
return
|
|
1273
|
-
...
|
|
1313
|
+
} : h;
|
|
1314
|
+
}, G = () => {
|
|
1315
|
+
const h = A();
|
|
1316
|
+
return n.maxHeight ? {
|
|
1317
|
+
...h,
|
|
1274
1318
|
bottom: "0px",
|
|
1275
1319
|
zIndex: 11
|
|
1276
1320
|
// Вищий z-index для footer
|
|
1277
|
-
} :
|
|
1278
|
-
},
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1321
|
+
} : h;
|
|
1322
|
+
}, d = () => {
|
|
1323
|
+
if (!i.value || S.value) return;
|
|
1324
|
+
const h = i.value, C = h.scrollTop, L = h.scrollHeight, R = h.clientHeight, P = 30;
|
|
1325
|
+
j && clearTimeout(j), j = setTimeout(() => {
|
|
1326
|
+
const ue = C - F.value, pe = ue > 1, b = L - C - R <= P, se = L - C - R <= 5;
|
|
1327
|
+
console.log("Scroll debug:", {
|
|
1328
|
+
scrollDiff: ue,
|
|
1329
|
+
isScrollingDown: pe,
|
|
1330
|
+
isNearBottom: b,
|
|
1331
|
+
isAtBottom: se,
|
|
1332
|
+
scrollTop: C,
|
|
1333
|
+
lastScrollTop: F.value,
|
|
1334
|
+
remaining: L - C - R
|
|
1335
|
+
}), F.value = C, pe && (b || se) && (S.value = !0, l("infinity-scroll"), setTimeout(() => {
|
|
1336
|
+
S.value = !1;
|
|
1337
|
+
}, 1e3));
|
|
1338
|
+
}, 50);
|
|
1339
|
+
}, v = () => {
|
|
1340
|
+
S.value = !1;
|
|
1341
|
+
};
|
|
1342
|
+
fe(() => {
|
|
1343
|
+
i.value && i.value.addEventListener("scroll", d);
|
|
1344
|
+
}), $e(() => {
|
|
1345
|
+
j && clearTimeout(j), i.value && i.value.removeEventListener("scroll", d);
|
|
1346
|
+
});
|
|
1347
|
+
const g = (h, C) => {
|
|
1348
|
+
Hn(h, C, (L) => {
|
|
1349
|
+
var R, P;
|
|
1350
|
+
((R = u.value) == null ? void 0 : R.prop) === h.prop && u.value.direction === C ? u.value = null : u.value = L, l("sort-change", {
|
|
1351
|
+
column: h,
|
|
1352
|
+
direction: ((P = u.value) == null ? void 0 : P.direction) || null,
|
|
1353
|
+
prop: h.prop,
|
|
1354
|
+
sortedData: $.value
|
|
1285
1355
|
});
|
|
1286
1356
|
});
|
|
1287
|
-
},
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
pinnedRight: b === "right"
|
|
1357
|
+
}, w = (h, C) => {
|
|
1358
|
+
const L = {
|
|
1359
|
+
pinnedLeft: C === "left",
|
|
1360
|
+
pinnedRight: C === "right"
|
|
1292
1361
|
};
|
|
1293
|
-
|
|
1294
|
-
},
|
|
1295
|
-
|
|
1296
|
-
},
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
y[_] = { ...y[_], ...b }, console.log("Оновлюємо через defineModel:", y), l.value = y;
|
|
1362
|
+
I(h.prop, L), l("column-pin", { column: { ...h, ...L }, position: C });
|
|
1363
|
+
}, B = (h) => {
|
|
1364
|
+
a.splice(0, a.length, ...h), c.value && (s.value = [...h]), l("columns-change", [...h]);
|
|
1365
|
+
}, I = (h, C) => {
|
|
1366
|
+
const L = a.findIndex((R) => R.prop === h);
|
|
1367
|
+
if (L !== -1) {
|
|
1368
|
+
if (Object.assign(a[L], C), c.value && s.value) {
|
|
1369
|
+
const R = s.value.findIndex((P) => P.prop === h);
|
|
1370
|
+
if (R !== -1) {
|
|
1371
|
+
const P = [...s.value];
|
|
1372
|
+
P[R] = { ...P[R], ...C }, s.value = P;
|
|
1305
1373
|
}
|
|
1306
1374
|
}
|
|
1307
|
-
|
|
1375
|
+
l("columns-change", [...a]);
|
|
1308
1376
|
} else
|
|
1309
1377
|
console.error(
|
|
1310
1378
|
"Колонку не знайдено:",
|
|
1311
|
-
|
|
1379
|
+
h,
|
|
1312
1380
|
"Доступні колонки:",
|
|
1313
|
-
|
|
1381
|
+
a.map((R) => R.prop)
|
|
1314
1382
|
);
|
|
1315
|
-
},
|
|
1316
|
-
|
|
1317
|
-
},
|
|
1318
|
-
|
|
1319
|
-
},
|
|
1320
|
-
|
|
1321
|
-
},
|
|
1322
|
-
|
|
1323
|
-
},
|
|
1324
|
-
const
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
column: { ...
|
|
1328
|
-
width:
|
|
1329
|
-
oldWidth:
|
|
1383
|
+
}, ee = (h, C, L) => {
|
|
1384
|
+
l("row-click", { row: h, column: C, event: L }), n.highlightCurrentRow && m && m.setCurrentRow(h);
|
|
1385
|
+
}, Ce = (h, C, L) => {
|
|
1386
|
+
L.stopPropagation(), m && m.toggleRowSelection(C, h);
|
|
1387
|
+
}, Fe = (h, C) => {
|
|
1388
|
+
C.stopPropagation(), m && m.toggleAllSelection();
|
|
1389
|
+
}, Le = (h, C) => {
|
|
1390
|
+
h && (r.value[C] = h);
|
|
1391
|
+
}, Ie = (h, C) => {
|
|
1392
|
+
const L = C.width || N();
|
|
1393
|
+
E(h, C, N, (R) => {
|
|
1394
|
+
I(C.prop, { width: R }), l("column-resize", {
|
|
1395
|
+
column: { ...C, width: R },
|
|
1396
|
+
width: R,
|
|
1397
|
+
oldWidth: L
|
|
1330
1398
|
});
|
|
1331
1399
|
});
|
|
1332
|
-
},
|
|
1333
|
-
if (!
|
|
1334
|
-
const
|
|
1335
|
-
return
|
|
1336
|
-
},
|
|
1337
|
-
if (!
|
|
1338
|
-
const
|
|
1339
|
-
if (typeof
|
|
1340
|
-
const
|
|
1341
|
-
return
|
|
1342
|
-
(
|
|
1400
|
+
}, Ue = (h, C) => T(h, C, M, N), qe = (h, C) => X(h, C, M, N), Xe = (h, C) => y(h, C, M, N), Ge = (h, C) => {
|
|
1401
|
+
if (!C || !C.prop) return "";
|
|
1402
|
+
const L = h[C.prop];
|
|
1403
|
+
return L == null ? "" : String(L);
|
|
1404
|
+
}, Ke = x(() => {
|
|
1405
|
+
if (!n.showSummary || !k.value) return {};
|
|
1406
|
+
const h = a;
|
|
1407
|
+
if (typeof n.summaryMethod == "function") {
|
|
1408
|
+
const C = n.summaryMethod({ columns: h, data: $.value });
|
|
1409
|
+
return h.reduce(
|
|
1410
|
+
(L, R, P) => (L[R.prop] = C[P], L),
|
|
1343
1411
|
{}
|
|
1344
1412
|
);
|
|
1345
1413
|
}
|
|
1346
|
-
return
|
|
1347
|
-
(
|
|
1348
|
-
const
|
|
1349
|
-
return
|
|
1414
|
+
return h.reduce(
|
|
1415
|
+
(C, L) => {
|
|
1416
|
+
const R = $.value.map((P) => P[L.prop]);
|
|
1417
|
+
return C[L.prop] = R.every((P) => typeof P == "number") ? R.reduce((P, ue) => P + ue, 0) : "", C;
|
|
1350
1418
|
},
|
|
1351
1419
|
{}
|
|
1352
1420
|
);
|
|
1353
|
-
}),
|
|
1354
|
-
|
|
1355
|
-
},
|
|
1356
|
-
|
|
1357
|
-
},
|
|
1358
|
-
|
|
1359
|
-
},
|
|
1360
|
-
|
|
1361
|
-
},
|
|
1362
|
-
|
|
1421
|
+
}), Ye = x(() => n.showSummary && k.value), Je = (h, C) => {
|
|
1422
|
+
m && m.toggleRowSelection(h, C);
|
|
1423
|
+
}, Qe = () => {
|
|
1424
|
+
m && m.toggleAllSelection();
|
|
1425
|
+
}, et = () => {
|
|
1426
|
+
m && m.selectAbsolutelyAll();
|
|
1427
|
+
}, tt = () => {
|
|
1428
|
+
m && m.clearSelection();
|
|
1429
|
+
}, nt = () => m ? m.getSelectionRows() : [], ot = (h) => {
|
|
1430
|
+
m && m.setSelectionRows(h);
|
|
1363
1431
|
};
|
|
1364
|
-
return
|
|
1365
|
-
|
|
1432
|
+
return fe(() => {
|
|
1433
|
+
Q();
|
|
1366
1434
|
}), t({
|
|
1367
|
-
toggleRowSelection:
|
|
1368
|
-
toggleAllSelection:
|
|
1369
|
-
selectAbsolutelyAll:
|
|
1370
|
-
clearSelection:
|
|
1371
|
-
getSelectionRows:
|
|
1372
|
-
setSelectionRows:
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1435
|
+
toggleRowSelection: Je,
|
|
1436
|
+
toggleAllSelection: Qe,
|
|
1437
|
+
selectAbsolutelyAll: et,
|
|
1438
|
+
clearSelection: tt,
|
|
1439
|
+
getSelectionRows: nt,
|
|
1440
|
+
setSelectionRows: ot,
|
|
1441
|
+
resetInfinityScroll: v
|
|
1442
|
+
// Додаємо метод для скидання infinity scroll
|
|
1443
|
+
}), (h, C) => {
|
|
1444
|
+
var R, P, ue, pe;
|
|
1445
|
+
const L = je("tooltip");
|
|
1446
|
+
return p(), f("div", {
|
|
1376
1447
|
ref_key: "tableWrapperRef",
|
|
1377
|
-
ref:
|
|
1448
|
+
ref: i,
|
|
1378
1449
|
class: "vt-table-wrapper",
|
|
1379
|
-
style:
|
|
1450
|
+
style: ae(q(V)()),
|
|
1451
|
+
onScroll: d
|
|
1380
1452
|
}, [
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1453
|
+
me(h.$slots, "default"),
|
|
1454
|
+
_("table", Qn, [
|
|
1455
|
+
_("thead", null, [
|
|
1456
|
+
_("tr", null, [
|
|
1457
|
+
n.selectable ? (p(), f("th", {
|
|
1386
1458
|
key: 0,
|
|
1387
|
-
class:
|
|
1388
|
-
"vt-table__th--sticky":
|
|
1459
|
+
class: W(["vt-table__th vt-table__th--selection", {
|
|
1460
|
+
"vt-table__th--sticky": n.maxHeight,
|
|
1389
1461
|
"vt-table__th--pinned-left": !0
|
|
1390
1462
|
}]),
|
|
1391
|
-
style:
|
|
1463
|
+
style: ae(z())
|
|
1392
1464
|
}, [
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
checked:
|
|
1396
|
-
indeterminate:
|
|
1397
|
-
"is-double":
|
|
1398
|
-
onChange:
|
|
1465
|
+
_("div", eo, [
|
|
1466
|
+
Z(de, {
|
|
1467
|
+
checked: (R = q(m)) == null ? void 0 : R.isAllSelected.value,
|
|
1468
|
+
indeterminate: (P = q(m)) == null ? void 0 : P.isIndeterminate.value,
|
|
1469
|
+
"is-double": (pe = (ue = q(m)) == null ? void 0 : ue.isDoubleCheck) == null ? void 0 : pe.value,
|
|
1470
|
+
onChange: Fe
|
|
1399
1471
|
}, null, 8, ["checked", "indeterminate", "is-double"])
|
|
1400
1472
|
])
|
|
1401
|
-
], 6)) :
|
|
1402
|
-
(p(!0),
|
|
1403
|
-
key:
|
|
1473
|
+
], 6)) : H("", !0),
|
|
1474
|
+
(p(!0), f(ne, null, oe(q(U), (b, se) => (p(), f("th", {
|
|
1475
|
+
key: b.prop,
|
|
1404
1476
|
ref_for: !0,
|
|
1405
|
-
ref: (
|
|
1406
|
-
style:
|
|
1407
|
-
class:
|
|
1477
|
+
ref: (ie) => Le(ie, b.prop),
|
|
1478
|
+
style: ae(qe(b, se)),
|
|
1479
|
+
class: W([
|
|
1408
1480
|
"vt-table__th",
|
|
1409
1481
|
{
|
|
1410
|
-
"vt-table__th--sticky":
|
|
1411
|
-
"vt-table__th--pinned-left":
|
|
1412
|
-
"vt-table__th--pinned-right":
|
|
1413
|
-
"vt-table__th--sortable":
|
|
1482
|
+
"vt-table__th--sticky": n.maxHeight,
|
|
1483
|
+
"vt-table__th--pinned-left": b.pinnedLeft,
|
|
1484
|
+
"vt-table__th--pinned-right": b.pinnedRight,
|
|
1485
|
+
"vt-table__th--sortable": b.sortable
|
|
1414
1486
|
}
|
|
1415
1487
|
])
|
|
1416
1488
|
}, [
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1489
|
+
_("div", to, [
|
|
1490
|
+
_("div", no, te(b.label), 1),
|
|
1491
|
+
b.sortable ? (p(), f("div", oo, [
|
|
1492
|
+
Z(Y, {
|
|
1421
1493
|
name: "arrowTop",
|
|
1422
|
-
class:
|
|
1423
|
-
onClick:
|
|
1494
|
+
class: W(q(Ee)(b, u.value).asc),
|
|
1495
|
+
onClick: he((ie) => g(b, "asc"), ["stop"])
|
|
1424
1496
|
}, null, 8, ["class", "onClick"]),
|
|
1425
|
-
|
|
1497
|
+
Z(Y, {
|
|
1426
1498
|
name: "arrowDown",
|
|
1427
|
-
class:
|
|
1428
|
-
onClick:
|
|
1499
|
+
class: W(q(Ee)(b, u.value).desc),
|
|
1500
|
+
onClick: he((ie) => g(b, "desc"), ["stop"])
|
|
1429
1501
|
}, null, 8, ["class", "onClick"])
|
|
1430
|
-
])) :
|
|
1431
|
-
|
|
1502
|
+
])) : H("", !0),
|
|
1503
|
+
b.actionColumn ? (p(), ce(Jn, {
|
|
1432
1504
|
key: 1,
|
|
1433
|
-
column:
|
|
1434
|
-
"all-columns": U
|
|
1435
|
-
columnsSelector:
|
|
1436
|
-
onPin:
|
|
1437
|
-
onUpdateColumns:
|
|
1438
|
-
}, null, 8, ["column", "all-columns", "columnsSelector"])) :
|
|
1505
|
+
column: b,
|
|
1506
|
+
"all-columns": q(U),
|
|
1507
|
+
columnsSelector: n.columnsSelector,
|
|
1508
|
+
onPin: w,
|
|
1509
|
+
onUpdateColumns: B
|
|
1510
|
+
}, null, 8, ["column", "all-columns", "columnsSelector"])) : H("", !0)
|
|
1439
1511
|
]),
|
|
1440
|
-
|
|
1512
|
+
_("div", {
|
|
1441
1513
|
class: "vt-table__resizer",
|
|
1442
|
-
"data-resizer":
|
|
1443
|
-
onMousedown: (
|
|
1444
|
-
}, null, 40,
|
|
1514
|
+
"data-resizer": b.prop,
|
|
1515
|
+
onMousedown: (ie) => Ie(ie, b)
|
|
1516
|
+
}, null, 40, lo)
|
|
1445
1517
|
], 6))), 128))
|
|
1446
1518
|
])
|
|
1447
1519
|
]),
|
|
1448
|
-
|
|
1449
|
-
(p(!0),
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
"vt-table__row
|
|
1455
|
-
"vt-table__row--current": U(v)?.currentRow.value === _,
|
|
1456
|
-
"vt-table__row--clickable": o.selectOnClickRow || o.highlightCurrentRow
|
|
1457
|
-
}
|
|
1458
|
-
]),
|
|
1459
|
-
onClick: (y) => d(_, U($)[0], y)
|
|
1460
|
-
}, [
|
|
1461
|
-
o.selectable ? (p(), h("td", {
|
|
1462
|
-
key: 0,
|
|
1463
|
-
class: E(["vt-table__td vt-table__td--selection", {
|
|
1464
|
-
"vt-table__td--pinned-left": !0
|
|
1465
|
-
}]),
|
|
1466
|
-
style: le(T())
|
|
1467
|
-
}, [
|
|
1468
|
-
f("div", An, [
|
|
1469
|
-
j(ae, {
|
|
1470
|
-
checked: U(v)?.isRowSelected(_),
|
|
1471
|
-
onChange: (y, J) => g(y, _, J)
|
|
1472
|
-
}, null, 8, ["checked", "onChange"])
|
|
1473
|
-
])
|
|
1474
|
-
], 4)) : V("", !0),
|
|
1475
|
-
(p(!0), h(te, null, ne(U($), (y, J) => (p(), h("td", {
|
|
1476
|
-
key: y.prop,
|
|
1477
|
-
ref_for: !0,
|
|
1478
|
-
ref: (ve) => w(ve, y.prop),
|
|
1479
|
-
style: le(O(y, J)),
|
|
1480
|
-
class: E([
|
|
1481
|
-
"vt-table__td",
|
|
1520
|
+
_("tbody", null, [
|
|
1521
|
+
k.value ? (p(!0), f(ne, { key: 1 }, oe($.value, (b, se) => {
|
|
1522
|
+
var ie, Be, Re;
|
|
1523
|
+
return p(), f("tr", {
|
|
1524
|
+
key: b.id,
|
|
1525
|
+
class: W([
|
|
1526
|
+
"vt-table__row",
|
|
1482
1527
|
{
|
|
1483
|
-
"vt-
|
|
1484
|
-
"vt-
|
|
1528
|
+
"vt-table__row--selected": (ie = q(m)) == null ? void 0 : ie.isRowSelected(b),
|
|
1529
|
+
"vt-table__row--current": ((Be = q(m)) == null ? void 0 : Be.currentRow.value) === b,
|
|
1530
|
+
"vt-table__row--clickable": n.selectOnClickRow || n.highlightCurrentRow
|
|
1485
1531
|
}
|
|
1486
|
-
])
|
|
1487
|
-
}, [
|
|
1488
|
-
be((p(), h("div", On, [
|
|
1489
|
-
y.renderSlot ? (p(), ie(Ie(y.renderSlot), {
|
|
1490
|
-
key: 0,
|
|
1491
|
-
row: _,
|
|
1492
|
-
column: y,
|
|
1493
|
-
value: _[y.prop]
|
|
1494
|
-
}, null, 8, ["row", "column", "value"])) : (p(), h("span", jn, Q(_[y.prop]), 1))
|
|
1495
|
-
])), [
|
|
1496
|
-
[R, y.showOverflowTooltip ? We(_, y) : null]
|
|
1497
1532
|
]),
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1533
|
+
onClick: (O) => ee(b, q(U)[0], O)
|
|
1534
|
+
}, [
|
|
1535
|
+
n.selectable ? (p(), f("td", {
|
|
1536
|
+
key: 0,
|
|
1537
|
+
class: W(["vt-table__td vt-table__td--selection", {
|
|
1538
|
+
"vt-table__td--pinned-left": !0
|
|
1539
|
+
}]),
|
|
1540
|
+
style: ae(A())
|
|
1541
|
+
}, [
|
|
1542
|
+
_("div", co, [
|
|
1543
|
+
Z(de, {
|
|
1544
|
+
checked: (Re = q(m)) == null ? void 0 : Re.isRowSelected(b),
|
|
1545
|
+
onChange: (O, be) => Ce(O, b, be)
|
|
1546
|
+
}, null, 8, ["checked", "onChange"])
|
|
1547
|
+
])
|
|
1548
|
+
], 4)) : H("", !0),
|
|
1549
|
+
(p(!0), f(ne, null, oe(q(U), (O, be) => (p(), f("td", {
|
|
1550
|
+
key: O.prop,
|
|
1551
|
+
ref_for: !0,
|
|
1552
|
+
ref: (we) => Le(we, O.prop),
|
|
1553
|
+
style: ae(Ue(O, be)),
|
|
1554
|
+
class: W([
|
|
1555
|
+
"vt-table__td",
|
|
1556
|
+
{
|
|
1557
|
+
"vt-table__td--pinned-left": O.pinnedLeft,
|
|
1558
|
+
"vt-table__td--pinned-right": O.pinnedRight
|
|
1559
|
+
}
|
|
1560
|
+
])
|
|
1561
|
+
}, [
|
|
1562
|
+
Me((p(), f("div", uo, [
|
|
1563
|
+
O.renderSlot ? (p(), ce(Ae(() => q(En)(O.renderSlot, { row: b, column: O, value: b[O.prop], index: se })), { key: 0 })) : (p(), f("span", po, te(b[O.prop]), 1))
|
|
1564
|
+
])), [
|
|
1565
|
+
[L, O.showOverflowTooltip ? Ge(b, O) : null]
|
|
1566
|
+
]),
|
|
1567
|
+
_("div", {
|
|
1568
|
+
class: "vt-table__resizer",
|
|
1569
|
+
"data-resizer": O.prop,
|
|
1570
|
+
onMousedown: (we) => Ie(we, O)
|
|
1571
|
+
}, null, 40, mo)
|
|
1572
|
+
], 6))), 128))
|
|
1573
|
+
], 10, ro);
|
|
1574
|
+
}), 128)) : (p(), f("tr", so, [
|
|
1575
|
+
_("td", {
|
|
1576
|
+
colspan: q(U).length + (n.selectable ? 1 : 0),
|
|
1577
|
+
class: "vt-table__empty-cell"
|
|
1578
|
+
}, [
|
|
1579
|
+
_("div", ao, [
|
|
1580
|
+
Z(Y, {
|
|
1581
|
+
name: "empty",
|
|
1582
|
+
class: "vt-table__empty-icon"
|
|
1583
|
+
}),
|
|
1584
|
+
C[0] || (C[0] = _("span", { class: "vt-table__empty-text" }, "Немає даних!", -1))
|
|
1585
|
+
])
|
|
1586
|
+
], 8, io)
|
|
1587
|
+
]))
|
|
1505
1588
|
]),
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1589
|
+
Ye.value ? (p(), f("tfoot", ho, [
|
|
1590
|
+
_("tr", null, [
|
|
1591
|
+
n.selectable ? (p(), f("td", {
|
|
1509
1592
|
key: 0,
|
|
1510
|
-
class:
|
|
1593
|
+
class: W(["vt-table__td", {
|
|
1511
1594
|
"vt-table__td--pinned-left": !0
|
|
1512
1595
|
}]),
|
|
1513
|
-
style:
|
|
1514
|
-
},
|
|
1515
|
-
|
|
1516
|
-
]), 4)) :
|
|
1517
|
-
(p(!0),
|
|
1518
|
-
key:
|
|
1519
|
-
style:
|
|
1520
|
-
class:
|
|
1596
|
+
style: ae(G())
|
|
1597
|
+
}, C[1] || (C[1] = [
|
|
1598
|
+
_("div", { class: "vt-table__cell-content vt-table__cell-content--summary" }, null, -1)
|
|
1599
|
+
]), 4)) : H("", !0),
|
|
1600
|
+
(p(!0), f(ne, null, oe(q(U), (b, se) => (p(), f("td", {
|
|
1601
|
+
key: b.prop,
|
|
1602
|
+
style: ae(Xe(b, se)),
|
|
1603
|
+
class: W([
|
|
1521
1604
|
"vt-table__td",
|
|
1522
1605
|
{
|
|
1523
|
-
"vt-table__td--pinned-left":
|
|
1524
|
-
"vt-table__td--pinned-right":
|
|
1606
|
+
"vt-table__td--pinned-left": b.pinnedLeft,
|
|
1607
|
+
"vt-table__td--pinned-right": b.pinnedRight
|
|
1525
1608
|
}
|
|
1526
1609
|
])
|
|
1527
1610
|
}, [
|
|
1528
|
-
|
|
1611
|
+
_("div", vo, te(Ke.value[b.prop]), 1)
|
|
1529
1612
|
], 6))), 128))
|
|
1530
1613
|
])
|
|
1531
|
-
])) :
|
|
1614
|
+
])) : H("", !0)
|
|
1532
1615
|
])
|
|
1533
|
-
],
|
|
1616
|
+
], 36);
|
|
1534
1617
|
};
|
|
1535
1618
|
}
|
|
1536
|
-
}),
|
|
1619
|
+
}), _o = /* @__PURE__ */ le({
|
|
1537
1620
|
__name: "VTableColumn",
|
|
1538
1621
|
props: {
|
|
1539
1622
|
prop: {},
|
|
@@ -1551,11 +1634,11 @@ const se = new Cn(), bn = {
|
|
|
1551
1634
|
sortMethod: {}
|
|
1552
1635
|
},
|
|
1553
1636
|
setup(e) {
|
|
1554
|
-
const t = e,
|
|
1555
|
-
|
|
1637
|
+
const t = e, o = Oe(), n = dt("vt-table-columns");
|
|
1638
|
+
n || console.error(
|
|
1556
1639
|
"VTableColumn: не знайдено контекст таблиці. Переконайтеся, що компонент використовується всередині VTable."
|
|
1557
1640
|
);
|
|
1558
|
-
const
|
|
1641
|
+
const s = () => ({
|
|
1559
1642
|
prop: t.prop,
|
|
1560
1643
|
label: t.label,
|
|
1561
1644
|
width: t.width,
|
|
@@ -1568,15 +1651,15 @@ const se = new Cn(), bn = {
|
|
|
1568
1651
|
showOverflowTooltip: t.showOverflowTooltip,
|
|
1569
1652
|
selectable: t.selectable,
|
|
1570
1653
|
// Зберігаємо слот - пріоритет: назва колонки -> default -> slot
|
|
1571
|
-
renderSlot:
|
|
1654
|
+
renderSlot: o[t.prop] ?? o.default ?? o.slot
|
|
1572
1655
|
});
|
|
1573
|
-
let
|
|
1574
|
-
return
|
|
1575
|
-
if (
|
|
1576
|
-
const
|
|
1577
|
-
|
|
1656
|
+
let l = -1;
|
|
1657
|
+
return fe(() => {
|
|
1658
|
+
if (n) {
|
|
1659
|
+
const r = s();
|
|
1660
|
+
n.push(r), l = n.length - 1;
|
|
1578
1661
|
}
|
|
1579
|
-
}),
|
|
1662
|
+
}), ve(
|
|
1580
1663
|
() => [
|
|
1581
1664
|
t.width,
|
|
1582
1665
|
t.minWidth,
|
|
@@ -1590,29 +1673,29 @@ const se = new Cn(), bn = {
|
|
|
1590
1673
|
t.label
|
|
1591
1674
|
],
|
|
1592
1675
|
() => {
|
|
1593
|
-
if (
|
|
1594
|
-
const
|
|
1595
|
-
if (
|
|
1596
|
-
const
|
|
1597
|
-
...
|
|
1598
|
-
renderSlot:
|
|
1676
|
+
if (n && l !== -1) {
|
|
1677
|
+
const r = n.findIndex((i) => i.prop === t.prop);
|
|
1678
|
+
if (r !== -1) {
|
|
1679
|
+
const i = n[r], a = {
|
|
1680
|
+
...s(),
|
|
1681
|
+
renderSlot: i.renderSlot
|
|
1599
1682
|
// Зберігаємо існуючий renderSlot
|
|
1600
1683
|
};
|
|
1601
|
-
|
|
1684
|
+
n[r] = a;
|
|
1602
1685
|
}
|
|
1603
1686
|
}
|
|
1604
1687
|
},
|
|
1605
1688
|
{ deep: !0 }
|
|
1606
|
-
),
|
|
1607
|
-
if (
|
|
1608
|
-
const
|
|
1609
|
-
|
|
1689
|
+
), $e(() => {
|
|
1690
|
+
if (n) {
|
|
1691
|
+
const r = n.findIndex((i) => i.prop === t.prop);
|
|
1692
|
+
r > -1 && n.splice(r, 1);
|
|
1610
1693
|
}
|
|
1611
|
-
}), (
|
|
1694
|
+
}), (r, i) => null;
|
|
1612
1695
|
}
|
|
1613
|
-
}),
|
|
1614
|
-
const
|
|
1615
|
-
|
|
1696
|
+
}), We = (e, t) => {
|
|
1697
|
+
const o = document.createElement("div");
|
|
1698
|
+
o.className = `vt-tooltip vt-tooltip--${t}`, o.innerText = e, Object.assign(o.style, {
|
|
1616
1699
|
position: "absolute",
|
|
1617
1700
|
background: "rgba(0, 0, 0, 0.8)",
|
|
1618
1701
|
color: "white",
|
|
@@ -1630,16 +1713,16 @@ const se = new Cn(), bn = {
|
|
|
1630
1713
|
wordWrap: "break-word",
|
|
1631
1714
|
whiteSpace: "normal",
|
|
1632
1715
|
boxShadow: "0 2px 8px rgba(0, 0, 0, 0.2)"
|
|
1633
|
-
}), e.length < 50 && (
|
|
1634
|
-
const
|
|
1635
|
-
switch (
|
|
1716
|
+
}), e.length < 50 && (o.style.whiteSpace = "nowrap");
|
|
1717
|
+
const n = document.createElement("div");
|
|
1718
|
+
switch (n.className = "vt-tooltip__arrow", Object.assign(n.style, {
|
|
1636
1719
|
position: "absolute",
|
|
1637
1720
|
width: "0",
|
|
1638
1721
|
height: "0",
|
|
1639
1722
|
borderStyle: "solid"
|
|
1640
1723
|
}), t) {
|
|
1641
1724
|
case "top":
|
|
1642
|
-
Object.assign(
|
|
1725
|
+
Object.assign(n.style, {
|
|
1643
1726
|
top: "100%",
|
|
1644
1727
|
left: "50%",
|
|
1645
1728
|
marginLeft: "-5px",
|
|
@@ -1648,7 +1731,7 @@ const se = new Cn(), bn = {
|
|
|
1648
1731
|
});
|
|
1649
1732
|
break;
|
|
1650
1733
|
case "bottom":
|
|
1651
|
-
Object.assign(
|
|
1734
|
+
Object.assign(n.style, {
|
|
1652
1735
|
bottom: "100%",
|
|
1653
1736
|
left: "50%",
|
|
1654
1737
|
marginLeft: "-5px",
|
|
@@ -1657,7 +1740,7 @@ const se = new Cn(), bn = {
|
|
|
1657
1740
|
});
|
|
1658
1741
|
break;
|
|
1659
1742
|
case "left":
|
|
1660
|
-
Object.assign(
|
|
1743
|
+
Object.assign(n.style, {
|
|
1661
1744
|
top: "50%",
|
|
1662
1745
|
left: "100%",
|
|
1663
1746
|
marginTop: "-5px",
|
|
@@ -1666,7 +1749,7 @@ const se = new Cn(), bn = {
|
|
|
1666
1749
|
});
|
|
1667
1750
|
break;
|
|
1668
1751
|
case "right":
|
|
1669
|
-
Object.assign(
|
|
1752
|
+
Object.assign(n.style, {
|
|
1670
1753
|
top: "50%",
|
|
1671
1754
|
right: "100%",
|
|
1672
1755
|
marginTop: "-5px",
|
|
@@ -1675,85 +1758,87 @@ const se = new Cn(), bn = {
|
|
|
1675
1758
|
});
|
|
1676
1759
|
break;
|
|
1677
1760
|
}
|
|
1678
|
-
return
|
|
1679
|
-
},
|
|
1680
|
-
const
|
|
1681
|
-
let
|
|
1682
|
-
switch (
|
|
1761
|
+
return o.appendChild(n), o;
|
|
1762
|
+
}, Se = (e, t, o) => {
|
|
1763
|
+
const n = t.getBoundingClientRect(), s = e.getBoundingClientRect(), l = window.pageXOffset || document.documentElement.scrollLeft, r = window.pageYOffset || document.documentElement.scrollTop;
|
|
1764
|
+
let i = 0, a = 0;
|
|
1765
|
+
switch (o) {
|
|
1683
1766
|
case "top":
|
|
1684
|
-
|
|
1767
|
+
i = n.top + r - s.height - 8, a = n.left + l + (n.width - s.width) / 2;
|
|
1685
1768
|
break;
|
|
1686
1769
|
case "bottom":
|
|
1687
|
-
|
|
1770
|
+
i = n.bottom + r + 8, a = n.left + l + (n.width - s.width) / 2;
|
|
1688
1771
|
break;
|
|
1689
1772
|
case "left":
|
|
1690
|
-
|
|
1773
|
+
i = n.top + r + (n.height - s.height) / 2, a = n.left + l - s.width - 8;
|
|
1691
1774
|
break;
|
|
1692
1775
|
case "right":
|
|
1693
|
-
|
|
1776
|
+
i = n.top + r + (n.height - s.height) / 2, a = n.right + l + 8;
|
|
1694
1777
|
break;
|
|
1695
1778
|
}
|
|
1696
1779
|
const u = window.innerWidth, c = window.innerHeight;
|
|
1697
|
-
|
|
1698
|
-
},
|
|
1699
|
-
e.parentElement || document.body.appendChild(e), e.style.visibility = "visible",
|
|
1780
|
+
a < 8 ? a = 8 : a + s.width > u - 8 && (a = u - s.width - 8), i < r + 8 ? o === "top" ? i = n.bottom + r + 8 : i = r + 8 : i + s.height > r + c - 8 && (o === "bottom" ? i = n.top + r - s.height - 8 : i = r + c - s.height - 8), e.style.top = `${i}px`, e.style.left = `${a}px`;
|
|
1781
|
+
}, Ve = (e, t, o) => {
|
|
1782
|
+
e.parentElement || document.body.appendChild(e), e.style.visibility = "visible", Se(e, t, o), requestAnimationFrame(() => {
|
|
1700
1783
|
e.style.opacity = "1";
|
|
1701
1784
|
});
|
|
1702
|
-
},
|
|
1785
|
+
}, He = (e) => {
|
|
1703
1786
|
e.style.opacity = "0", e.style.visibility = "hidden";
|
|
1704
|
-
},
|
|
1787
|
+
}, Pe = (e) => e.scrollWidth > e.clientWidth || e.scrollHeight > e.clientHeight, De = (e) => !!e.closest(".vt-table, table"), go = {
|
|
1705
1788
|
mounted(e, t) {
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
e.
|
|
1710
|
-
|
|
1711
|
-
|
|
1789
|
+
var a;
|
|
1790
|
+
const o = (a = t.value) == null ? void 0 : a.trim();
|
|
1791
|
+
if (!o) return;
|
|
1792
|
+
const n = e.dataset.placement || "top", s = We(o, n);
|
|
1793
|
+
e.__tooltipEl = s;
|
|
1794
|
+
const l = () => {
|
|
1795
|
+
(De(e) ? Pe(e) : !0) && Ve(s, e, n);
|
|
1796
|
+
}, r = () => {
|
|
1797
|
+
He(s);
|
|
1712
1798
|
}, i = () => {
|
|
1713
|
-
|
|
1714
|
-
}, a = () => {
|
|
1715
|
-
l.style.opacity === "1" && Ce(l, e, o);
|
|
1799
|
+
s.style.opacity === "1" && Se(s, e, n);
|
|
1716
1800
|
};
|
|
1717
|
-
e.__mouseenterHandler =
|
|
1801
|
+
e.__mouseenterHandler = l, e.__mouseleaveHandler = r, e.__scrollHandler = i, e.addEventListener("mouseenter", l), e.addEventListener("mouseleave", r), window.addEventListener("scroll", i, !0), window.addEventListener("resize", i);
|
|
1718
1802
|
},
|
|
1719
1803
|
updated(e, t) {
|
|
1720
|
-
|
|
1804
|
+
var n;
|
|
1805
|
+
const o = (n = t.value) == null ? void 0 : n.trim();
|
|
1721
1806
|
if (e.__tooltipEl)
|
|
1722
|
-
|
|
1723
|
-
else if (
|
|
1724
|
-
const
|
|
1807
|
+
o ? e.__tooltipEl.firstChild.textContent = o : (e.__tooltipEl.parentElement && e.__tooltipEl.parentElement.removeChild(e.__tooltipEl), delete e.__tooltipEl);
|
|
1808
|
+
else if (o) {
|
|
1809
|
+
const s = e.dataset.placement || "top", l = We(o, s);
|
|
1725
1810
|
e.__tooltipEl = l;
|
|
1726
|
-
const
|
|
1727
|
-
(
|
|
1811
|
+
const r = () => {
|
|
1812
|
+
(De(e) ? Pe(e) : !0) && Ve(l, e, s);
|
|
1728
1813
|
}, i = () => {
|
|
1729
|
-
|
|
1814
|
+
He(l);
|
|
1730
1815
|
}, a = () => {
|
|
1731
|
-
l.style.opacity === "1" &&
|
|
1816
|
+
l.style.opacity === "1" && Se(l, e, s);
|
|
1732
1817
|
};
|
|
1733
|
-
e.__mouseenterHandler =
|
|
1818
|
+
e.__mouseenterHandler = r, e.__mouseleaveHandler = i, e.__scrollHandler = a, e.addEventListener("mouseenter", r), e.addEventListener("mouseleave", i), window.addEventListener("scroll", a, !0), window.addEventListener("resize", a);
|
|
1734
1819
|
}
|
|
1735
1820
|
},
|
|
1736
1821
|
beforeUnmount(e) {
|
|
1737
1822
|
e.__tooltipEl && e.__tooltipEl.parentElement && (e.__tooltipEl.parentElement.removeChild(e.__tooltipEl), delete e.__tooltipEl), e.__mouseenterHandler && (e.removeEventListener("mouseenter", e.__mouseenterHandler), delete e.__mouseenterHandler), e.__mouseleaveHandler && (e.removeEventListener("mouseleave", e.__mouseleaveHandler), delete e.__mouseleaveHandler), e.__scrollHandler && (window.removeEventListener("scroll", e.__scrollHandler, !0), window.removeEventListener("resize", e.__scrollHandler), delete e.__scrollHandler);
|
|
1738
1823
|
}
|
|
1739
|
-
},
|
|
1824
|
+
}, Co = {
|
|
1740
1825
|
install(e, t = {}) {
|
|
1741
|
-
const { prefix:
|
|
1742
|
-
e.component(`${
|
|
1826
|
+
const { prefix: o = "V", modal: n = !0 } = t;
|
|
1827
|
+
e.component(`${o}Button`, ge), e.component(`${o}Icon`, Y), e.component(`${o}Loader`, Ne), e.component(`${o}Modal`, Ze), e.component(`${o}Pagination`, Ln), e.component(`${o}Checkbox`, de), e.component(`${o}Table`, fo), e.component(`${o}TableColumn`, _o), e.directive("tooltip", go), n && e.use(An);
|
|
1743
1828
|
}
|
|
1744
|
-
},
|
|
1829
|
+
}, wo = Co.install;
|
|
1745
1830
|
export {
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1831
|
+
ge as VButton,
|
|
1832
|
+
de as VCheckbox,
|
|
1833
|
+
Y as VIcon,
|
|
1834
|
+
Ne as VLoader,
|
|
1835
|
+
Ze as VModal,
|
|
1836
|
+
An as VModalPlugin,
|
|
1837
|
+
Ln as VPagination,
|
|
1838
|
+
fo as VTable,
|
|
1839
|
+
_o as VTableColumn,
|
|
1840
|
+
Co as default,
|
|
1841
|
+
wo as install,
|
|
1842
|
+
re as modalManager,
|
|
1843
|
+
go as tooltipDirective
|
|
1759
1844
|
};
|