voiptime-components 0.0.20 → 0.0.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +1 -1
- package/dist/index.d.ts +14 -3
- package/dist/index.es.js +993 -804
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { createElementBlock as
|
|
2
|
-
const
|
|
3
|
-
const o =
|
|
4
|
-
for (const [n, s] of
|
|
1
|
+
import { createElementBlock as m, openBlock as p, createElementVNode as h, createStaticVNode as Ae, defineComponent as le, computed as x, createBlock as ae, createCommentVNode as D, resolveDynamicComponent as Oe, useSlots as je, resolveDirective as Fe, withDirectives as Le, normalizeClass as z, renderSlot as pe, Teleport as st, normalizeStyle as re, withModifiers as he, toDisplayString as te, watch as me, Fragment as ne, renderList as oe, vModelSelect as rt, createVNode as Z, withCtx as xe, createTextVNode as _e, ref as A, createApp as it, h as be, onMounted as ve, onUnmounted as $e, nextTick as at, mergeModels as Re, useModel as ct, reactive as ut, provide as dt, unref as q, inject as pt } from "vue";
|
|
2
|
+
const H = (t, e) => {
|
|
3
|
+
const o = t.__vccOpts || t;
|
|
4
|
+
for (const [n, s] of e)
|
|
5
5
|
o[n] = s;
|
|
6
6
|
return o;
|
|
7
|
-
},
|
|
7
|
+
}, ht = {}, 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 vt(t, e) {
|
|
15
|
+
return p(), m("svg", mt, e[0] || (e[0] = [
|
|
16
|
+
h("path", {
|
|
17
17
|
d: "M14 8L10 12L6 8",
|
|
18
18
|
stroke: "currentColor",
|
|
19
19
|
"stroke-width": "1.5",
|
|
@@ -22,16 +22,16 @@ function ht(e, t) {
|
|
|
22
22
|
}, null, -1)
|
|
23
23
|
]));
|
|
24
24
|
}
|
|
25
|
-
const
|
|
25
|
+
const ft = /* @__PURE__ */ H(ht, [["render", vt]]), _t = {}, gt = {
|
|
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 Ct(t, e) {
|
|
33
|
+
return p(), m("svg", gt, e[0] || (e[0] = [
|
|
34
|
+
h("path", {
|
|
35
35
|
d: "M6 12L10 8L14 12",
|
|
36
36
|
stroke: "currentColor",
|
|
37
37
|
"stroke-width": "1.5",
|
|
@@ -40,38 +40,38 @@ function gt(e, t) {
|
|
|
40
40
|
}, null, -1)
|
|
41
41
|
]));
|
|
42
42
|
}
|
|
43
|
-
const
|
|
43
|
+
const wt = /* @__PURE__ */ H(_t, [["render", Ct]]), kt = {}, bt = {
|
|
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 yt(t, e) {
|
|
51
|
+
return p(), m("svg", bt, e[0] || (e[0] = [
|
|
52
|
+
h("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
|
+
h("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 xt = /* @__PURE__ */ H(kt, [["render", yt]]), Mt = {}, Lt = {
|
|
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 $t(t, e) {
|
|
73
|
+
return p(), m("svg", Lt, e[0] || (e[0] = [
|
|
74
|
+
h("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 Mt(e, t) {
|
|
|
80
80
|
}, null, -1)
|
|
81
81
|
]));
|
|
82
82
|
}
|
|
83
|
-
const
|
|
83
|
+
const St = /* @__PURE__ */ H(Mt, [["render", $t]]), It = {}, Vt = {
|
|
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 Bt(
|
|
91
|
-
return p(),
|
|
92
|
-
|
|
90
|
+
function Bt(t, e) {
|
|
91
|
+
return p(), m("svg", Vt, e[0] || (e[0] = [
|
|
92
|
+
h("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 Bt(e, t) {
|
|
|
98
98
|
}, null, -1)
|
|
99
99
|
]));
|
|
100
100
|
}
|
|
101
|
-
const Rt = /* @__PURE__ */
|
|
101
|
+
const Rt = /* @__PURE__ */ H(It, [["render", Bt]]), Tt = {}, Et = {
|
|
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 zt(t, e) {
|
|
109
|
+
return p(), m("svg", Et, e[0] || (e[0] = [
|
|
110
|
+
h("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 Et(e, t) {
|
|
|
116
116
|
}, null, -1)
|
|
117
117
|
]));
|
|
118
118
|
}
|
|
119
|
-
const
|
|
119
|
+
const Ht = /* @__PURE__ */ H(Tt, [["render", zt]]), Wt = {}, Dt = {
|
|
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 Pt(
|
|
127
|
-
return p(),
|
|
128
|
-
|
|
126
|
+
function Pt(t, e) {
|
|
127
|
+
return p(), m("svg", Dt, e[0] || (e[0] = [
|
|
128
|
+
h("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
|
+
h("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 Pt(e, t) {
|
|
|
140
140
|
}, null, -1)
|
|
141
141
|
]));
|
|
142
142
|
}
|
|
143
|
-
const
|
|
143
|
+
const At = /* @__PURE__ */ H(Wt, [["render", Pt]]), Ot = {}, jt = {
|
|
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 Ft(t, e) {
|
|
151
|
+
return p(), m("svg", jt, e[0] || (e[0] = [
|
|
152
|
+
h("path", {
|
|
153
153
|
d: "M8 3V5.2225M8 5.2225V10.7775M8 5.2225L9.875 4.25M8 5.2225L6.125 4.25M8 10.7775V13M8 10.7775L6.125 11.75M8 10.7775L9.875 11.75M13 8H10.7775M10.7775 8H5.2225M10.7775 8L11.75 9.875M10.7775 8L11.75 6.125M5.2225 8H3M5.2225 8L4.25 6.125M5.2225 8L4.25 9.875",
|
|
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
|
+
h("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,16 +164,16 @@ function jt(e, t) {
|
|
|
164
164
|
}, null, -1)
|
|
165
165
|
]));
|
|
166
166
|
}
|
|
167
|
-
const Nt = /* @__PURE__ */
|
|
167
|
+
const Nt = /* @__PURE__ */ H(Ot, [["render", Ft]]), Zt = {}, Ut = {
|
|
168
168
|
xmlns: "http://www.w3.org/2000/svg",
|
|
169
169
|
width: "60",
|
|
170
170
|
height: "60",
|
|
171
171
|
viewBox: "0 0 60 60",
|
|
172
172
|
fill: "none"
|
|
173
173
|
};
|
|
174
|
-
function
|
|
175
|
-
return p(),
|
|
176
|
-
|
|
174
|
+
function qt(t, e) {
|
|
175
|
+
return p(), m("svg", Ut, e[0] || (e[0] = [
|
|
176
|
+
h("path", {
|
|
177
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
178
|
stroke: "currentColor",
|
|
179
179
|
"stroke-width": "2",
|
|
@@ -182,22 +182,22 @@ function Ut(e, t) {
|
|
|
182
182
|
}, null, -1)
|
|
183
183
|
]));
|
|
184
184
|
}
|
|
185
|
-
const
|
|
185
|
+
const Xt = /* @__PURE__ */ H(Zt, [["render", qt]]), Gt = {}, Kt = {
|
|
186
186
|
width: "20",
|
|
187
187
|
height: "20",
|
|
188
188
|
viewBox: "0 0 20 20",
|
|
189
189
|
fill: "none",
|
|
190
190
|
xmlns: "http://www.w3.org/2000/svg"
|
|
191
191
|
};
|
|
192
|
-
function
|
|
193
|
-
return p(),
|
|
194
|
-
|
|
192
|
+
function Yt(t, e) {
|
|
193
|
+
return p(), m("svg", Kt, e[0] || (e[0] = [
|
|
194
|
+
h("path", {
|
|
195
195
|
"fill-rule": "evenodd",
|
|
196
196
|
"clip-rule": "evenodd",
|
|
197
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",
|
|
198
198
|
fill: "currentColor"
|
|
199
199
|
}, null, -1),
|
|
200
|
-
|
|
200
|
+
h("path", {
|
|
201
201
|
"fill-rule": "evenodd",
|
|
202
202
|
"clip-rule": "evenodd",
|
|
203
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",
|
|
@@ -205,16 +205,16 @@ function Kt(e, t) {
|
|
|
205
205
|
}, null, -1)
|
|
206
206
|
]));
|
|
207
207
|
}
|
|
208
|
-
const
|
|
208
|
+
const Jt = /* @__PURE__ */ H(Gt, [["render", Yt]]), Qt = {}, en = {
|
|
209
209
|
width: "20",
|
|
210
210
|
height: "20",
|
|
211
211
|
viewBox: "0 0 20 20",
|
|
212
212
|
fill: "none",
|
|
213
213
|
xmlns: "http://www.w3.org/2000/svg"
|
|
214
214
|
};
|
|
215
|
-
function
|
|
216
|
-
return p(),
|
|
217
|
-
|
|
215
|
+
function tn(t, e) {
|
|
216
|
+
return p(), m("svg", en, e[0] || (e[0] = [
|
|
217
|
+
h("path", {
|
|
218
218
|
"fill-rule": "evenodd",
|
|
219
219
|
"clip-rule": "evenodd",
|
|
220
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",
|
|
@@ -222,16 +222,16 @@ function en(e, t) {
|
|
|
222
222
|
}, null, -1)
|
|
223
223
|
]));
|
|
224
224
|
}
|
|
225
|
-
const
|
|
225
|
+
const nn = /* @__PURE__ */ H(Qt, [["render", tn]]), on = {}, ln = {
|
|
226
226
|
width: "21",
|
|
227
227
|
height: "20",
|
|
228
228
|
viewBox: "0 0 21 20",
|
|
229
229
|
fill: "none",
|
|
230
230
|
xmlns: "http://www.w3.org/2000/svg"
|
|
231
231
|
};
|
|
232
|
-
function
|
|
233
|
-
return p(),
|
|
234
|
-
|
|
232
|
+
function sn(t, e) {
|
|
233
|
+
return p(), m("svg", ln, e[0] || (e[0] = [
|
|
234
|
+
h("path", {
|
|
235
235
|
"fill-rule": "evenodd",
|
|
236
236
|
"clip-rule": "evenodd",
|
|
237
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",
|
|
@@ -239,16 +239,16 @@ function ln(e, t) {
|
|
|
239
239
|
}, null, -1)
|
|
240
240
|
]));
|
|
241
241
|
}
|
|
242
|
-
const
|
|
242
|
+
const rn = /* @__PURE__ */ H(on, [["render", sn]]), an = {}, cn = {
|
|
243
243
|
width: "20",
|
|
244
244
|
height: "20",
|
|
245
245
|
viewBox: "0 0 20 20",
|
|
246
246
|
fill: "none",
|
|
247
247
|
xmlns: "http://www.w3.org/2000/svg"
|
|
248
248
|
};
|
|
249
|
-
function
|
|
250
|
-
return p(),
|
|
251
|
-
|
|
249
|
+
function un(t, e) {
|
|
250
|
+
return p(), m("svg", cn, e[0] || (e[0] = [
|
|
251
|
+
h("path", {
|
|
252
252
|
d: "M6 14L10 10M10 10L14 6M10 10L6 6M10 10L14 14",
|
|
253
253
|
stroke: "currentColor",
|
|
254
254
|
"stroke-width": "1.5",
|
|
@@ -257,37 +257,226 @@ function cn(e, t) {
|
|
|
257
257
|
}, null, -1)
|
|
258
258
|
]));
|
|
259
259
|
}
|
|
260
|
-
const
|
|
260
|
+
const dn = /* @__PURE__ */ H(an, [["render", un]]), pn = {}, hn = {
|
|
261
|
+
width: "20",
|
|
262
|
+
height: "20",
|
|
263
|
+
viewBox: "0 0 20 20",
|
|
264
|
+
fill: "none",
|
|
265
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
266
|
+
};
|
|
267
|
+
function mn(t, e) {
|
|
268
|
+
return p(), m("svg", hn, e[0] || (e[0] = [
|
|
269
|
+
h("path", {
|
|
270
|
+
d: "M9.31732 16.8976L7.50065 17.5026V10.4193L3.76732 6.3126C3.48852 6.00588 3.33403 5.60627 3.33398 5.19177V3.33594H16.6673V5.14594C16.6672 5.58793 16.4916 6.01178 16.179 6.32427L12.5007 10.0026V12.5026M12.5007 15.8359L14.1673 17.5026L17.5007 14.1693",
|
|
271
|
+
stroke: "currentColor",
|
|
272
|
+
"stroke-width": "1.5",
|
|
273
|
+
"stroke-linecap": "round",
|
|
274
|
+
"stroke-linejoin": "round"
|
|
275
|
+
}, null, -1)
|
|
276
|
+
]));
|
|
277
|
+
}
|
|
278
|
+
const vn = /* @__PURE__ */ H(pn, [["render", mn]]), fn = {}, _n = {
|
|
279
|
+
width: "20",
|
|
280
|
+
height: "20",
|
|
281
|
+
viewBox: "0 0 20 20",
|
|
282
|
+
fill: "none",
|
|
283
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
284
|
+
};
|
|
285
|
+
function gn(t, e) {
|
|
286
|
+
return p(), m("svg", _n, e[0] || (e[0] = [
|
|
287
|
+
h("path", {
|
|
288
|
+
d: "M11.4657 16.1809L7.50065 17.5026V10.4193L3.76732 6.3126C3.48852 6.00588 3.33403 5.60627 3.33398 5.19177V3.33594H16.6673V5.14594C16.6672 5.58793 16.4916 6.01178 16.179 6.32427L12.5007 10.0026V11.2526M18.334 18.3359L14.1673 14.1693M14.1673 18.3359L18.334 14.1693",
|
|
289
|
+
stroke: "currentColor",
|
|
290
|
+
"stroke-width": "1.5",
|
|
291
|
+
"stroke-linecap": "round",
|
|
292
|
+
"stroke-linejoin": "round"
|
|
293
|
+
}, null, -1)
|
|
294
|
+
]));
|
|
295
|
+
}
|
|
296
|
+
const Cn = /* @__PURE__ */ H(fn, [["render", gn]]), wn = {}, kn = {
|
|
297
|
+
width: "20",
|
|
298
|
+
height: "20",
|
|
299
|
+
viewBox: "0 0 20 20",
|
|
300
|
+
fill: "none",
|
|
301
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
302
|
+
};
|
|
303
|
+
function bn(t, e) {
|
|
304
|
+
return p(), m("svg", kn, e[0] || (e[0] = [
|
|
305
|
+
h("path", {
|
|
306
|
+
d: "M9.4676 15.1809L5.5026 16.5026V9.41927L1.76927 5.3126C1.49048 5.00588 1.33598 4.60627 1.33594 4.19177V2.33594H14.6693V4.14594C14.6692 4.58793 14.4935 5.01178 14.1809 5.32427L10.5026 9.0026V10.2526",
|
|
307
|
+
stroke: "currentColor",
|
|
308
|
+
"stroke-width": "1.5",
|
|
309
|
+
"stroke-linecap": "round",
|
|
310
|
+
"stroke-linejoin": "round"
|
|
311
|
+
}, null, -1),
|
|
312
|
+
h("path", {
|
|
313
|
+
d: "M15.5 16.6591L13.857 17.9057C13.7756 17.9719 13.6868 18.0032 13.5906 17.9997C13.4944 17.9962 13.4093 17.9685 13.3353 17.9167C13.2613 17.865 13.204 17.7951 13.1635 17.7071C13.1229 17.6192 13.121 17.5236 13.1577 17.4203L13.7904 15.3795L12.1808 14.2433C12.092 14.1844 12.0365 14.1072 12.0143 14.0116C11.9921 13.916 11.9958 13.8277 12.0254 13.7468C12.055 13.6659 12.1068 13.5942 12.1808 13.5315C12.2548 13.4688 12.3436 13.4377 12.4472 13.438H14.4343L15.0782 11.3199C15.1152 11.217 15.1726 11.1378 15.2504 11.0825C15.3283 11.0272 15.4115 10.9997 15.5 11C15.5885 11.0003 15.6718 11.0279 15.75 11.083C15.8281 11.138 15.8854 11.217 15.9218 11.3199L16.5657 13.438H18.5528C18.6564 13.438 18.7452 13.4693 18.8192 13.5319C18.8932 13.5946 18.945 13.6662 18.9746 13.7468C19.0042 13.8274 19.0079 13.9157 18.9857 14.0116C18.9635 14.1075 18.908 14.1847 18.8192 14.2433L17.2096 15.3795L17.8423 17.4203C17.8793 17.5233 17.8775 17.6189 17.837 17.7071C17.7964 17.7954 17.739 17.8653 17.6647 17.9167C17.5904 17.9682 17.5053 17.9959 17.4094 17.9997C17.3135 18.0035 17.2247 17.9722 17.143 17.9057L15.5 16.6591Z",
|
|
314
|
+
stroke: "currentColor",
|
|
315
|
+
"stroke-width": "1.5"
|
|
316
|
+
}, null, -1)
|
|
317
|
+
]));
|
|
318
|
+
}
|
|
319
|
+
const yn = /* @__PURE__ */ H(wn, [["render", bn]]), xn = {}, Mn = {
|
|
320
|
+
width: "20",
|
|
321
|
+
height: "20",
|
|
322
|
+
viewBox: "0 0 20 20",
|
|
323
|
+
fill: "none",
|
|
324
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
325
|
+
};
|
|
326
|
+
function Ln(t, e) {
|
|
327
|
+
return p(), m("svg", Mn, e[0] || (e[0] = [
|
|
328
|
+
Ae('<path d="M10.5 5.5H17.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"></path><path d="M10.5 10H17.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"></path><path d="M10.5 15H17.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"></path><path d="M3 15.083L4.042 16.125L7.167 13" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M3 6.083L4.042 7.125L7.167 4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>', 5)
|
|
329
|
+
]));
|
|
330
|
+
}
|
|
331
|
+
const $n = /* @__PURE__ */ H(xn, [["render", Ln]]), Sn = {}, In = {
|
|
332
|
+
width: "20",
|
|
333
|
+
height: "20",
|
|
334
|
+
viewBox: "0 0 20 20",
|
|
335
|
+
fill: "none",
|
|
336
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
337
|
+
};
|
|
338
|
+
function Vn(t, e) {
|
|
339
|
+
return p(), m("svg", In, e[0] || (e[0] = [
|
|
340
|
+
h("path", {
|
|
341
|
+
d: "M16.6673 5.83594L6.66732 5.83594M16.6673 5.83594L13.7507 8.7526M16.6673 5.83594L13.7507 2.91927M14.1673 14.1693L3.33398 14.1693M3.33398 14.1693L6.25065 17.0859M3.33398 14.1693L6.25065 11.2526",
|
|
342
|
+
stroke: "currentColor",
|
|
343
|
+
"stroke-width": "1.5",
|
|
344
|
+
"stroke-linecap": "round",
|
|
345
|
+
"stroke-linejoin": "round"
|
|
346
|
+
}, null, -1)
|
|
347
|
+
]));
|
|
348
|
+
}
|
|
349
|
+
const Bn = /* @__PURE__ */ H(Sn, [["render", Vn]]), Rn = {}, Tn = {
|
|
350
|
+
width: "20",
|
|
351
|
+
height: "20",
|
|
352
|
+
viewBox: "0 0 20 20",
|
|
353
|
+
fill: "none",
|
|
354
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
355
|
+
};
|
|
356
|
+
function En(t, e) {
|
|
357
|
+
return p(), m("svg", Tn, e[0] || (e[0] = [
|
|
358
|
+
h("path", {
|
|
359
|
+
d: "M11.1667 10.9167V9.66667L14.845 5.98833C15.1576 5.67585 15.3332 5.25199 15.3333 4.81V3H2V4.85583C2.00004 5.27033 2.15454 5.66994 2.43333 5.97667L6.16667 10.0833V17.1667C6.16667 17.1667 7.37495 16.7639 8.14917 16.5058",
|
|
360
|
+
stroke: "currentColor",
|
|
361
|
+
"stroke-width": "1.5",
|
|
362
|
+
"stroke-linecap": "round",
|
|
363
|
+
"stroke-linejoin": "round"
|
|
364
|
+
}, null, -1),
|
|
365
|
+
h("path", {
|
|
366
|
+
d: "M15.4116 11.3639L11.4924 15.283C11.4138 15.3616 11.3636 15.4642 11.3498 15.5746L11.0994 17.5789C11.059 17.9025 11.3341 18.1776 11.6577 18.1371L13.6622 17.8861C13.7725 17.8722 13.8751 17.8221 13.9537 17.7435L17.8724 13.8248C18.0676 13.6296 18.0676 13.313 17.8724 13.1177L16.1187 11.364C15.9234 11.1687 15.6068 11.1687 15.4116 11.3639Z",
|
|
367
|
+
stroke: "currentColor",
|
|
368
|
+
"stroke-width": "1.5"
|
|
369
|
+
}, null, -1),
|
|
370
|
+
h("path", {
|
|
371
|
+
d: "M14 12L16.4608 14.4608",
|
|
372
|
+
stroke: "currentColor",
|
|
373
|
+
"stroke-width": "1.5"
|
|
374
|
+
}, null, -1)
|
|
375
|
+
]));
|
|
376
|
+
}
|
|
377
|
+
const zn = /* @__PURE__ */ H(Rn, [["render", En]]), Hn = {}, Wn = {
|
|
378
|
+
width: "20",
|
|
379
|
+
height: "20",
|
|
380
|
+
viewBox: "0 0 20 20",
|
|
381
|
+
fill: "none",
|
|
382
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
383
|
+
};
|
|
384
|
+
function Dn(t, e) {
|
|
385
|
+
return p(), m("svg", Wn, e[0] || (e[0] = [
|
|
386
|
+
h("path", {
|
|
387
|
+
d: "M6.2832 15.8359H3.3332C3.11222 15.8359 2.90029 15.7482 2.74404 15.5919C2.58778 15.4356 2.5 15.2237 2.5 15.0027V4.16954C2.49995 4.06009 2.52146 3.9517 2.56331 3.85056C2.60516 3.74943 2.66652 3.65753 2.7439 3.58012C2.82127 3.50271 2.91314 3.4413 3.01426 3.3994C3.11537 3.3575 3.22375 3.33594 3.3332 3.33594H16.6668C16.7763 3.33594 16.8846 3.3575 16.9857 3.3994C17.0869 3.4413 17.1787 3.50271 17.2561 3.58012C17.3335 3.65753 17.3948 3.74943 17.4367 3.85056C17.4785 3.9517 17.5001 4.06009 17.5 4.16954V15.0027C17.5 15.2237 17.4122 15.4356 17.256 15.5919C17.0997 15.7482 16.8878 15.8359 16.6668 15.8359H5.38347",
|
|
388
|
+
stroke: "currentColor",
|
|
389
|
+
"stroke-width": "1.5",
|
|
390
|
+
"stroke-linecap": "round",
|
|
391
|
+
"stroke-linejoin": "round"
|
|
392
|
+
}, null, -1),
|
|
393
|
+
h("path", {
|
|
394
|
+
d: "M6.66406 2.5V5M13.3305 2.5V5M8.33046 10.8332L9.16406 11.6668L11.6641 9.1668",
|
|
395
|
+
stroke: "currentColor",
|
|
396
|
+
"stroke-width": "1.5",
|
|
397
|
+
"stroke-linecap": "round",
|
|
398
|
+
"stroke-linejoin": "round"
|
|
399
|
+
}, null, -1)
|
|
400
|
+
]));
|
|
401
|
+
}
|
|
402
|
+
const Pn = /* @__PURE__ */ H(Hn, [["render", Dn]]), An = {}, On = {
|
|
403
|
+
width: "20",
|
|
404
|
+
height: "20",
|
|
405
|
+
viewBox: "0 0 20 20",
|
|
406
|
+
fill: "none",
|
|
407
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
408
|
+
};
|
|
409
|
+
function jn(t, e) {
|
|
410
|
+
return p(), m("svg", On, e[0] || (e[0] = [
|
|
411
|
+
Ae('<circle cx="4.5" cy="12.5" r="1.5" stroke="currentColor" stroke-width="1.5"></circle><circle cx="9.5" cy="8.5" r="1.5" transform="rotate(-180 9.5 8.5)" stroke="currentColor" stroke-width="1.5"></circle><circle cx="14.5" cy="12.5" r="1.5" stroke="currentColor" stroke-width="1.5"></circle><path d="M4.55469 10.5V2" stroke="currentColor" stroke-width="1.5"></path><path d="M9.44531 9.5L9.44531 18" stroke="currentColor" stroke-width="1.5"></path><path d="M14.5547 10.5V2" stroke="currentColor" stroke-width="1.5"></path><path d="M4.55469 18V15.5" stroke="currentColor" stroke-width="1.5"></path><path d="M9.44531 2L9.44531 5.5" stroke="currentColor" stroke-width="1.5"></path><path d="M14.5547 18V15.5" stroke="currentColor" stroke-width="1.5"></path>', 9)
|
|
412
|
+
]));
|
|
413
|
+
}
|
|
414
|
+
const Fn = /* @__PURE__ */ H(An, [["render", jn]]), Nn = {}, Zn = {
|
|
415
|
+
width: "20",
|
|
416
|
+
height: "20",
|
|
417
|
+
viewBox: "0 0 20 20",
|
|
418
|
+
fill: "none",
|
|
419
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
420
|
+
};
|
|
421
|
+
function Un(t, e) {
|
|
422
|
+
return p(), m("svg", Zn, e[0] || (e[0] = [
|
|
423
|
+
h("path", {
|
|
424
|
+
d: "M9.4676 15.1809L5.5026 16.5026V9.41927L1.76927 5.3126C1.49048 5.00588 1.33598 4.60627 1.33594 4.19177V2.33594H14.6693V4.14594C14.6692 4.58793 14.4935 5.01178 14.1809 5.32427L10.5026 9.0026V10.2526",
|
|
425
|
+
stroke: "currentColor",
|
|
426
|
+
"stroke-width": "1.5",
|
|
427
|
+
"stroke-linecap": "round",
|
|
428
|
+
"stroke-linejoin": "round"
|
|
429
|
+
}, null, -1),
|
|
430
|
+
h("path", {
|
|
431
|
+
d: "M16 16.8926V11M13.0537 13.9463H18.9463",
|
|
432
|
+
stroke: "currentColor",
|
|
433
|
+
"stroke-width": "1.5",
|
|
434
|
+
"stroke-linecap": "round",
|
|
435
|
+
"stroke-linejoin": "round"
|
|
436
|
+
}, null, -1)
|
|
437
|
+
]));
|
|
438
|
+
}
|
|
439
|
+
const qn = /* @__PURE__ */ H(Nn, [["render", Un]]), Xn = {
|
|
261
440
|
// arrow icons
|
|
262
|
-
arrowDown:
|
|
263
|
-
arrowTop:
|
|
264
|
-
arrowRight:
|
|
441
|
+
arrowDown: ft,
|
|
442
|
+
arrowTop: wt,
|
|
443
|
+
arrowRight: St,
|
|
265
444
|
arrowLeft: Rt,
|
|
266
|
-
arrowReload:
|
|
445
|
+
arrowReload: xt,
|
|
267
446
|
// table icons
|
|
268
|
-
columnInsert:
|
|
269
|
-
freeze:
|
|
447
|
+
columnInsert: Ht,
|
|
448
|
+
freeze: At,
|
|
270
449
|
unfreeze: Nt,
|
|
271
|
-
columnsMove:
|
|
272
|
-
empty:
|
|
450
|
+
columnsMove: Jt,
|
|
451
|
+
empty: Xt,
|
|
273
452
|
// actions icons
|
|
274
|
-
listBullet:
|
|
275
|
-
listBulletHorizontal:
|
|
276
|
-
close:
|
|
453
|
+
listBullet: nn,
|
|
454
|
+
listBulletHorizontal: rn,
|
|
455
|
+
close: dn,
|
|
456
|
+
// filter icons
|
|
457
|
+
filterSave: vn,
|
|
458
|
+
filterReset: Cn,
|
|
459
|
+
filterNew: yn,
|
|
460
|
+
filterMultiselect: $n,
|
|
461
|
+
filterExchange: Bn,
|
|
462
|
+
filterEdit: zn,
|
|
463
|
+
filterDateCheck: Pn,
|
|
464
|
+
filterAdvanced: Fn,
|
|
465
|
+
filterAdd: qn
|
|
277
466
|
}, Y = /* @__PURE__ */ le({
|
|
278
467
|
__name: "VIcon",
|
|
279
468
|
props: {
|
|
280
469
|
name: {}
|
|
281
470
|
},
|
|
282
|
-
setup(
|
|
283
|
-
const
|
|
284
|
-
return (n, s) => o.value ? (p(),
|
|
471
|
+
setup(t) {
|
|
472
|
+
const e = t, o = x(() => Xn[e.name]);
|
|
473
|
+
return (n, s) => o.value ? (p(), ae(Oe(o.value), { key: 0 })) : D("", !0);
|
|
285
474
|
}
|
|
286
|
-
}),
|
|
287
|
-
function
|
|
288
|
-
return p(),
|
|
475
|
+
}), Gn = {}, Kn = { class: "vt-loader" };
|
|
476
|
+
function Yn(t, e) {
|
|
477
|
+
return p(), m("span", Kn);
|
|
289
478
|
}
|
|
290
|
-
const Ne = /* @__PURE__ */
|
|
479
|
+
const Ne = /* @__PURE__ */ H(Gn, [["render", Yn]]), Jn = ["disabled", "type", "data-placement"], Qn = {
|
|
291
480
|
key: 2,
|
|
292
481
|
class: "vt-button__content"
|
|
293
482
|
}, ge = /* @__PURE__ */ le({
|
|
@@ -303,12 +492,12 @@ const Ne = /* @__PURE__ */ K(pn, [["render", hn]]), vn = ["disabled", "type", "d
|
|
|
303
492
|
htmlType: { default: "button" }
|
|
304
493
|
},
|
|
305
494
|
emits: ["click"],
|
|
306
|
-
setup(
|
|
307
|
-
const o =
|
|
308
|
-
var
|
|
495
|
+
setup(t, { emit: e }) {
|
|
496
|
+
const o = t, n = e, s = je(), l = x(() => !!(o.icon && o.shape)), a = x(() => {
|
|
497
|
+
var b, M;
|
|
309
498
|
const c = s.default ? s.default({}) : null;
|
|
310
|
-
return ((
|
|
311
|
-
}),
|
|
499
|
+
return ((M = (b = c == null ? void 0 : c[0]) == null ? void 0 : b.children) == null ? void 0 : M.toString()) ?? "";
|
|
500
|
+
}), r = x(() => [
|
|
312
501
|
"vt-button",
|
|
313
502
|
`vt-button--${o.type}`,
|
|
314
503
|
{
|
|
@@ -317,41 +506,41 @@ const Ne = /* @__PURE__ */ K(pn, [["render", hn]]), vn = ["disabled", "type", "d
|
|
|
317
506
|
"vt-button--disabled": o.disabled || o.loading,
|
|
318
507
|
"vt-button--loading": o.loading
|
|
319
508
|
}
|
|
320
|
-
]),
|
|
509
|
+
]), i = x(() => l.value && o.tooltip ? a.value : null), u = (c) => {
|
|
321
510
|
!o.disabled && !o.loading && n("click", c);
|
|
322
511
|
};
|
|
323
|
-
return (c,
|
|
324
|
-
const
|
|
325
|
-
return
|
|
326
|
-
class:
|
|
512
|
+
return (c, b) => {
|
|
513
|
+
const M = Fe("tooltip");
|
|
514
|
+
return Le((p(), m("button", {
|
|
515
|
+
class: z(r.value),
|
|
327
516
|
disabled: o.disabled || o.loading,
|
|
328
517
|
type: o.htmlType,
|
|
329
518
|
"data-placement": o.tooltipPlacement,
|
|
330
519
|
onClick: u
|
|
331
520
|
}, [
|
|
332
|
-
o.loading ? (p(),
|
|
521
|
+
o.loading ? (p(), ae(Ne, {
|
|
333
522
|
key: 0,
|
|
334
523
|
class: "vt-button__icon"
|
|
335
|
-
})) : o.icon ? (p(),
|
|
524
|
+
})) : o.icon ? (p(), ae(Y, {
|
|
336
525
|
key: 1,
|
|
337
526
|
name: o.icon,
|
|
338
527
|
class: "vt-button__icon"
|
|
339
|
-
}, null, 8, ["name"])) :
|
|
340
|
-
l.value ?
|
|
528
|
+
}, null, 8, ["name"])) : D("", !0),
|
|
529
|
+
l.value ? D("", !0) : (p(), m("span", Qn, [
|
|
341
530
|
pe(c.$slots, "default")
|
|
342
531
|
]))
|
|
343
|
-
], 10,
|
|
344
|
-
[
|
|
532
|
+
], 10, Jn)), [
|
|
533
|
+
[M, i.value]
|
|
345
534
|
]);
|
|
346
535
|
};
|
|
347
536
|
}
|
|
348
|
-
}),
|
|
537
|
+
}), eo = {
|
|
349
538
|
key: 0,
|
|
350
539
|
class: "vt-modal__header"
|
|
351
|
-
},
|
|
540
|
+
}, to = {
|
|
352
541
|
key: 0,
|
|
353
542
|
class: "vt-modal__title"
|
|
354
|
-
},
|
|
543
|
+
}, no = { class: "vt-modal__content" }, Ze = /* @__PURE__ */ le({
|
|
355
544
|
__name: "VModal",
|
|
356
545
|
props: {
|
|
357
546
|
modelValue: { type: Boolean },
|
|
@@ -362,43 +551,43 @@ const Ne = /* @__PURE__ */ K(pn, [["render", hn]]), vn = ["disabled", "type", "d
|
|
|
362
551
|
zIndex: { default: 1e3 }
|
|
363
552
|
},
|
|
364
553
|
emits: ["update:modelValue", "close"],
|
|
365
|
-
setup(
|
|
366
|
-
const o =
|
|
554
|
+
setup(t, { emit: e }) {
|
|
555
|
+
const o = t, n = e, s = x(() => ["vt-modal__container", `vt-modal__container--${o.size}`]), l = x(() => ({
|
|
367
556
|
zIndex: o.zIndex
|
|
368
|
-
})),
|
|
557
|
+
})), a = () => {
|
|
369
558
|
n("update:modelValue", !1), n("close");
|
|
370
|
-
},
|
|
371
|
-
o.closeOnBackdropClick &&
|
|
559
|
+
}, r = () => {
|
|
560
|
+
o.closeOnBackdropClick && a();
|
|
372
561
|
};
|
|
373
|
-
return (
|
|
374
|
-
|
|
562
|
+
return (i, u) => (p(), ae(st, { to: "body" }, [
|
|
563
|
+
i.modelValue ? (p(), m("div", {
|
|
375
564
|
key: 0,
|
|
376
565
|
class: "vt-modal__backdrop",
|
|
377
|
-
style:
|
|
378
|
-
onClick:
|
|
566
|
+
style: re(l.value),
|
|
567
|
+
onClick: r
|
|
379
568
|
}, [
|
|
380
|
-
|
|
381
|
-
class:
|
|
382
|
-
onClick: u[0] || (u[0] =
|
|
569
|
+
h("div", {
|
|
570
|
+
class: z(s.value),
|
|
571
|
+
onClick: u[0] || (u[0] = he(() => {
|
|
383
572
|
}, ["stop"]))
|
|
384
573
|
}, [
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
574
|
+
i.title || i.showCloseButton ? (p(), m("div", eo, [
|
|
575
|
+
i.title ? (p(), m("h2", to, te(i.title), 1)) : D("", !0),
|
|
576
|
+
i.showCloseButton ? (p(), ae(Y, {
|
|
388
577
|
key: 1,
|
|
389
578
|
name: "close",
|
|
390
579
|
class: "vt-modal__close",
|
|
391
|
-
onClick:
|
|
392
|
-
})) :
|
|
393
|
-
])) :
|
|
394
|
-
|
|
395
|
-
pe(
|
|
580
|
+
onClick: a
|
|
581
|
+
})) : D("", !0)
|
|
582
|
+
])) : D("", !0),
|
|
583
|
+
h("div", no, [
|
|
584
|
+
pe(i.$slots, "default")
|
|
396
585
|
])
|
|
397
586
|
], 2)
|
|
398
|
-
], 4)) :
|
|
587
|
+
], 4)) : D("", !0)
|
|
399
588
|
]));
|
|
400
589
|
}
|
|
401
|
-
}),
|
|
590
|
+
}), oo = { class: "vt-pagination" }, lo = { class: "vt-pagination__info" }, so = { class: "vt-pagination__rows-per-page" }, ro = ["value"], io = { class: "vt-pagination__navigation" }, ao = ["disabled"], co = ["onClick"], uo = ["disabled"], po = /* @__PURE__ */ le({
|
|
402
591
|
__name: "VPagination",
|
|
403
592
|
props: {
|
|
404
593
|
totalItems: {},
|
|
@@ -408,95 +597,95 @@ const Ne = /* @__PURE__ */ K(pn, [["render", hn]]), vn = ["disabled", "type", "d
|
|
|
408
597
|
maxVisiblePages: { default: 6 }
|
|
409
598
|
},
|
|
410
599
|
emits: ["update:currentPage", "update:pageSize", "pageChange", "reloadData"],
|
|
411
|
-
setup(
|
|
412
|
-
const o =
|
|
600
|
+
setup(t, { emit: e }) {
|
|
601
|
+
const o = t, n = e, s = x({
|
|
413
602
|
get: () => o.currentPage,
|
|
414
|
-
set: (
|
|
603
|
+
set: (L) => n("update:currentPage", L)
|
|
415
604
|
}), l = x({
|
|
416
605
|
get: () => o.pageSize,
|
|
417
|
-
set: (
|
|
418
|
-
}),
|
|
419
|
-
const
|
|
420
|
-
if (
|
|
421
|
-
for (let y = 1; y <=
|
|
422
|
-
|
|
606
|
+
set: (L) => n("update:pageSize", L)
|
|
607
|
+
}), a = x(() => Math.ceil(o.totalItems / l.value)), r = x(() => o.totalItems === 0 ? 0 : (s.value - 1) * l.value + 1), i = x(() => Math.min(s.value * l.value, o.totalItems)), u = x(() => s.value <= 1), c = x(() => s.value >= a.value), b = x(() => {
|
|
608
|
+
const L = [], W = a.value, B = s.value, G = o.maxVisiblePages;
|
|
609
|
+
if (W <= G)
|
|
610
|
+
for (let y = 1; y <= W; y++)
|
|
611
|
+
L.push(y);
|
|
423
612
|
else {
|
|
424
|
-
|
|
425
|
-
const y = Math.max(2,
|
|
426
|
-
y > 2 &&
|
|
613
|
+
L.push(1);
|
|
614
|
+
const y = Math.max(2, B - Math.floor(G / 2)), E = Math.min(W - 1, B + Math.floor(G / 2));
|
|
615
|
+
y > 2 && L.push("...");
|
|
427
616
|
for (let $ = y; $ <= E; $++)
|
|
428
|
-
|
|
429
|
-
E <
|
|
617
|
+
L.push($);
|
|
618
|
+
E < W - 1 && L.push("..."), W > 1 && L.push(W);
|
|
430
619
|
}
|
|
431
|
-
return
|
|
432
|
-
}),
|
|
620
|
+
return L;
|
|
621
|
+
}), M = () => {
|
|
433
622
|
n("pageChange", {
|
|
434
623
|
page: s.value,
|
|
435
624
|
pageSize: l.value
|
|
436
625
|
});
|
|
437
|
-
},
|
|
438
|
-
typeof
|
|
439
|
-
}, j = () => {
|
|
440
|
-
u.value || (s.value--, S());
|
|
441
|
-
}, Q = () => {
|
|
442
|
-
c.value || (s.value++, S());
|
|
626
|
+
}, X = (L) => {
|
|
627
|
+
typeof L == "number" && L !== s.value && (s.value = L, M());
|
|
443
628
|
}, F = () => {
|
|
444
|
-
|
|
629
|
+
u.value || (s.value--, M());
|
|
630
|
+
}, Q = () => {
|
|
631
|
+
c.value || (s.value++, M());
|
|
632
|
+
}, U = () => {
|
|
633
|
+
s.value = 1, M();
|
|
445
634
|
}, N = () => {
|
|
446
635
|
n("reloadData", s.value);
|
|
447
636
|
};
|
|
448
|
-
return
|
|
637
|
+
return me(
|
|
449
638
|
() => o.totalItems,
|
|
450
639
|
() => {
|
|
451
|
-
s.value >
|
|
640
|
+
s.value > a.value && a.value > 0 && (s.value = a.value, M());
|
|
452
641
|
}
|
|
453
|
-
), (
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
642
|
+
), (L, W) => (p(), m("div", oo, [
|
|
643
|
+
h("div", lo, [
|
|
644
|
+
h("div", so, [
|
|
645
|
+
W[1] || (W[1] = h("label", {
|
|
457
646
|
for: "rowsSelect",
|
|
458
647
|
class: "vt-pagination__label"
|
|
459
648
|
}, "Рядків на сторінку:", -1)),
|
|
460
|
-
|
|
649
|
+
Le(h("select", {
|
|
461
650
|
id: "rowsSelect",
|
|
462
|
-
"onUpdate:modelValue":
|
|
463
|
-
onChange:
|
|
651
|
+
"onUpdate:modelValue": W[0] || (W[0] = (B) => l.value = B),
|
|
652
|
+
onChange: U,
|
|
464
653
|
class: "vt-pagination__select"
|
|
465
654
|
}, [
|
|
466
|
-
(p(!0),
|
|
467
|
-
key:
|
|
468
|
-
value:
|
|
469
|
-
}, te(
|
|
655
|
+
(p(!0), m(ne, null, oe(L.pageSizeOptions, (B) => (p(), m("option", {
|
|
656
|
+
key: B,
|
|
657
|
+
value: B
|
|
658
|
+
}, te(B), 9, ro))), 128))
|
|
470
659
|
], 544), [
|
|
471
|
-
[
|
|
660
|
+
[rt, l.value]
|
|
472
661
|
])
|
|
473
662
|
]),
|
|
474
|
-
|
|
663
|
+
h("span", null, te(r.value) + " - " + te(i.value) + " з " + te(L.totalItems), 1)
|
|
475
664
|
]),
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
onClick:
|
|
665
|
+
h("div", io, [
|
|
666
|
+
h("button", {
|
|
667
|
+
onClick: F,
|
|
479
668
|
disabled: u.value,
|
|
480
|
-
class:
|
|
669
|
+
class: z({ "vt-pagination__nav-button": !0, "has-items": !u.value })
|
|
481
670
|
}, [
|
|
482
671
|
Z(Y, { name: "arrowLeft" })
|
|
483
|
-
], 10,
|
|
484
|
-
(p(!0),
|
|
485
|
-
key:
|
|
486
|
-
onClick: (
|
|
487
|
-
class:
|
|
488
|
-
"vt-pagination__nav-button--active":
|
|
672
|
+
], 10, ao),
|
|
673
|
+
(p(!0), m(ne, null, oe(b.value, (B) => (p(), m("button", {
|
|
674
|
+
key: B,
|
|
675
|
+
onClick: (G) => X(B),
|
|
676
|
+
class: z(["vt-pagination__nav-button", {
|
|
677
|
+
"vt-pagination__nav-button--active": B === s.value
|
|
489
678
|
}])
|
|
490
|
-
}, te(
|
|
491
|
-
|
|
679
|
+
}, te(B), 11, co))), 128)),
|
|
680
|
+
h("button", {
|
|
492
681
|
onClick: Q,
|
|
493
682
|
disabled: c.value,
|
|
494
|
-
class:
|
|
683
|
+
class: z({ "vt-pagination__nav-button": !0, "has-items": !c.value })
|
|
495
684
|
}, [
|
|
496
685
|
Z(Y, { name: "arrowRight" })
|
|
497
|
-
], 10,
|
|
686
|
+
], 10, uo)
|
|
498
687
|
]),
|
|
499
|
-
|
|
688
|
+
h("div", null, [
|
|
500
689
|
Z(ge, {
|
|
501
690
|
icon: "arrowReload",
|
|
502
691
|
shape: "circle",
|
|
@@ -504,7 +693,7 @@ const Ne = /* @__PURE__ */ K(pn, [["render", hn]]), vn = ["disabled", "type", "d
|
|
|
504
693
|
tooltipPlacement: "left",
|
|
505
694
|
onClick: N
|
|
506
695
|
}, {
|
|
507
|
-
default: xe(() =>
|
|
696
|
+
default: xe(() => W[2] || (W[2] = [
|
|
508
697
|
_e("Оновити дані ", -1)
|
|
509
698
|
])),
|
|
510
699
|
_: 1,
|
|
@@ -513,7 +702,7 @@ const Ne = /* @__PURE__ */ K(pn, [["render", hn]]), vn = ["disabled", "type", "d
|
|
|
513
702
|
])
|
|
514
703
|
]));
|
|
515
704
|
}
|
|
516
|
-
}),
|
|
705
|
+
}), ho = ["for"], mo = ["id", "name", "value", "checked", "disabled", "required", ".indeterminate"], ue = /* @__PURE__ */ le({
|
|
517
706
|
__name: "VCheckbox",
|
|
518
707
|
props: {
|
|
519
708
|
modelValue: { type: Boolean, default: void 0 },
|
|
@@ -530,18 +719,18 @@ const Ne = /* @__PURE__ */ K(pn, [["render", hn]]), vn = ["disabled", "type", "d
|
|
|
530
719
|
isDouble: { type: Boolean, default: !1 }
|
|
531
720
|
},
|
|
532
721
|
emits: ["update:modelValue", "change", "focus", "blur"],
|
|
533
|
-
setup(
|
|
534
|
-
const o =
|
|
722
|
+
setup(t, { emit: e }) {
|
|
723
|
+
const o = t, n = e, s = () => `vt-checkbox-${Math.random().toString(36).substr(2, 9)}`, l = x(() => o.id || s()), a = x(() => o.modelValue ?? o.checked), r = (c) => {
|
|
535
724
|
if (o.disabled) return;
|
|
536
|
-
const
|
|
537
|
-
n("update:modelValue",
|
|
538
|
-
},
|
|
725
|
+
const M = c.target.checked;
|
|
726
|
+
n("update:modelValue", M), n("change", M, c);
|
|
727
|
+
}, i = (c) => {
|
|
539
728
|
n("focus", c);
|
|
540
729
|
}, u = (c) => {
|
|
541
730
|
n("blur", c);
|
|
542
731
|
};
|
|
543
|
-
return (c,
|
|
544
|
-
class:
|
|
732
|
+
return (c, b) => (p(), m("label", {
|
|
733
|
+
class: z([
|
|
545
734
|
"vt-checkbox",
|
|
546
735
|
`vt-checkbox--${c.size}`,
|
|
547
736
|
`vt-checkbox--${c.variant}`,
|
|
@@ -552,37 +741,37 @@ const Ne = /* @__PURE__ */ K(pn, [["render", hn]]), vn = ["disabled", "type", "d
|
|
|
552
741
|
]),
|
|
553
742
|
for: l.value
|
|
554
743
|
}, [
|
|
555
|
-
|
|
744
|
+
h("input", {
|
|
556
745
|
id: l.value,
|
|
557
746
|
name: c.name,
|
|
558
747
|
value: c.value,
|
|
559
|
-
checked:
|
|
748
|
+
checked: a.value,
|
|
560
749
|
disabled: c.disabled,
|
|
561
750
|
required: c.required,
|
|
562
751
|
".indeterminate": c.indeterminate,
|
|
563
752
|
type: "checkbox",
|
|
564
753
|
class: "vt-checkbox__input",
|
|
565
|
-
onChange:
|
|
566
|
-
onFocus:
|
|
754
|
+
onChange: r,
|
|
755
|
+
onFocus: i,
|
|
567
756
|
onBlur: u
|
|
568
|
-
}, null, 40,
|
|
569
|
-
|
|
570
|
-
class:
|
|
757
|
+
}, null, 40, mo),
|
|
758
|
+
h("div", {
|
|
759
|
+
class: z([
|
|
571
760
|
"vt-checkbox__box",
|
|
572
761
|
{
|
|
573
|
-
"vt-checkbox__box--checked":
|
|
762
|
+
"vt-checkbox__box--checked": a.value && !c.indeterminate && !c.isDouble,
|
|
574
763
|
"vt-checkbox__box--indeterminate": c.indeterminate,
|
|
575
|
-
"vt-checkbox__box--double": c.isDouble &&
|
|
764
|
+
"vt-checkbox__box--double": c.isDouble && a.value,
|
|
576
765
|
"vt-checkbox__box--disabled": c.disabled
|
|
577
766
|
}
|
|
578
767
|
])
|
|
579
768
|
}, [
|
|
580
|
-
!c.indeterminate && !c.isDouble ? (p(),
|
|
769
|
+
!c.indeterminate && !c.isDouble ? (p(), m("svg", {
|
|
581
770
|
key: 0,
|
|
582
|
-
class:
|
|
771
|
+
class: z([
|
|
583
772
|
"vt-checkbox__checkmark",
|
|
584
773
|
{
|
|
585
|
-
"vt-checkbox__checkmark--checked":
|
|
774
|
+
"vt-checkbox__checkmark--checked": a.value
|
|
586
775
|
}
|
|
587
776
|
]),
|
|
588
777
|
width: "10",
|
|
@@ -590,20 +779,20 @@ const Ne = /* @__PURE__ */ K(pn, [["render", hn]]), vn = ["disabled", "type", "d
|
|
|
590
779
|
viewBox: "0 0 10 9",
|
|
591
780
|
fill: "none",
|
|
592
781
|
xmlns: "http://www.w3.org/2000/svg"
|
|
593
|
-
},
|
|
594
|
-
|
|
782
|
+
}, b[0] || (b[0] = [
|
|
783
|
+
h("path", {
|
|
595
784
|
d: "M1 5L3.58264 7.58264C3.80112 7.80112 4.16348 7.77113 4.34306 7.51971L9 1",
|
|
596
785
|
stroke: "currentColor",
|
|
597
786
|
"stroke-width": "2",
|
|
598
787
|
"stroke-linecap": "round"
|
|
599
788
|
}, null, -1)
|
|
600
|
-
]), 2)) :
|
|
601
|
-
c.isDouble &&
|
|
789
|
+
]), 2)) : D("", !0),
|
|
790
|
+
c.isDouble && a.value ? (p(), m("svg", {
|
|
602
791
|
key: 1,
|
|
603
|
-
class:
|
|
792
|
+
class: z([
|
|
604
793
|
"vt-checkbox__checkmark",
|
|
605
794
|
{
|
|
606
|
-
"vt-checkbox__checkmark--checked":
|
|
795
|
+
"vt-checkbox__checkmark--checked": a.value
|
|
607
796
|
}
|
|
608
797
|
]),
|
|
609
798
|
width: "13",
|
|
@@ -611,35 +800,35 @@ const Ne = /* @__PURE__ */ K(pn, [["render", hn]]), vn = ["disabled", "type", "d
|
|
|
611
800
|
viewBox: "0 0 13 6",
|
|
612
801
|
fill: "none",
|
|
613
802
|
xmlns: "http://www.w3.org/2000/svg"
|
|
614
|
-
},
|
|
615
|
-
|
|
803
|
+
}, b[1] || (b[1] = [
|
|
804
|
+
h("path", {
|
|
616
805
|
d: "M6 3L8.25 5L12 1",
|
|
617
806
|
stroke: "currentColor",
|
|
618
807
|
"stroke-width": "2",
|
|
619
808
|
"stroke-linecap": "round",
|
|
620
809
|
"stroke-linejoin": "round"
|
|
621
810
|
}, null, -1),
|
|
622
|
-
|
|
811
|
+
h("path", {
|
|
623
812
|
d: "M1 3L3.25 5L7 1",
|
|
624
813
|
stroke: "currentColor",
|
|
625
814
|
"stroke-width": "2",
|
|
626
815
|
"stroke-linecap": "round",
|
|
627
816
|
"stroke-linejoin": "round"
|
|
628
817
|
}, null, -1)
|
|
629
|
-
]), 2)) :
|
|
630
|
-
c.indeterminate ? (p(),
|
|
818
|
+
]), 2)) : D("", !0),
|
|
819
|
+
c.indeterminate ? (p(), m("div", {
|
|
631
820
|
key: 2,
|
|
632
|
-
class:
|
|
821
|
+
class: z([
|
|
633
822
|
"vt-checkbox__indeterminate-mark",
|
|
634
823
|
{
|
|
635
824
|
"vt-checkbox__indeterminate-mark--visible": c.indeterminate
|
|
636
825
|
}
|
|
637
826
|
])
|
|
638
|
-
}, null, 2)) :
|
|
827
|
+
}, null, 2)) : D("", !0)
|
|
639
828
|
], 2),
|
|
640
|
-
c.label || c.$slots.label || c.$slots.default ? (p(),
|
|
829
|
+
c.label || c.$slots.label || c.$slots.default ? (p(), m("span", {
|
|
641
830
|
key: 0,
|
|
642
|
-
class:
|
|
831
|
+
class: z([
|
|
643
832
|
"vt-checkbox__label",
|
|
644
833
|
{
|
|
645
834
|
"vt-checkbox__label--disabled": c.disabled
|
|
@@ -651,264 +840,264 @@ const Ne = /* @__PURE__ */ K(pn, [["render", hn]]), vn = ["disabled", "type", "d
|
|
|
651
840
|
_e(te(c.label), 1)
|
|
652
841
|
])
|
|
653
842
|
])
|
|
654
|
-
], 2)) :
|
|
655
|
-
], 10,
|
|
843
|
+
], 2)) : D("", !0)
|
|
844
|
+
], 10, ho));
|
|
656
845
|
}
|
|
657
846
|
});
|
|
658
|
-
function
|
|
659
|
-
const
|
|
660
|
-
const s =
|
|
661
|
-
if (
|
|
662
|
-
const u = Math.max(800 -
|
|
663
|
-
return Math.max(Math.floor(u /
|
|
847
|
+
function vo(t) {
|
|
848
|
+
const e = x(() => [...t].sort((s, l) => s.pinnedLeft && !l.pinnedLeft ? -1 : !s.pinnedLeft && l.pinnedLeft || s.pinnedRight && !l.pinnedRight ? 1 : !s.pinnedRight && l.pinnedRight ? -1 : 0)), o = () => {
|
|
849
|
+
const s = e.value.length, l = e.value.filter((c) => c.width || c.minWidth), a = l.reduce((c, b) => c + (b.width || b.minWidth || 0), 0), r = s - l.length;
|
|
850
|
+
if (r === 0) return 150;
|
|
851
|
+
const u = Math.max(800 - a, r * 80);
|
|
852
|
+
return Math.max(Math.floor(u / r), 120);
|
|
664
853
|
};
|
|
665
854
|
return {
|
|
666
|
-
sortedColumns:
|
|
855
|
+
sortedColumns: e,
|
|
667
856
|
getDefaultColumnWidth: o,
|
|
668
|
-
getStickyOffset: (s, l,
|
|
669
|
-
const
|
|
670
|
-
let
|
|
857
|
+
getStickyOffset: (s, l, a = !1) => {
|
|
858
|
+
const r = e.value;
|
|
859
|
+
let i = 0;
|
|
671
860
|
if (s === "left") {
|
|
672
|
-
|
|
861
|
+
a && (i += 50);
|
|
673
862
|
for (let u = 0; u < l; u++) {
|
|
674
|
-
const c =
|
|
675
|
-
c.pinnedLeft && (
|
|
863
|
+
const c = r[u];
|
|
864
|
+
c.pinnedLeft && (i += c.width || c.minWidth || o());
|
|
676
865
|
}
|
|
677
866
|
} else
|
|
678
|
-
for (let u =
|
|
679
|
-
const c =
|
|
680
|
-
c.pinnedRight && (
|
|
867
|
+
for (let u = r.length - 1; u > l; u--) {
|
|
868
|
+
const c = r[u];
|
|
869
|
+
c.pinnedRight && (i += c.width || c.minWidth || o());
|
|
681
870
|
}
|
|
682
|
-
return
|
|
871
|
+
return i;
|
|
683
872
|
}
|
|
684
873
|
};
|
|
685
874
|
}
|
|
686
|
-
function
|
|
687
|
-
const
|
|
875
|
+
function fo(t) {
|
|
876
|
+
const e = () => {
|
|
688
877
|
const l = {};
|
|
689
|
-
return
|
|
690
|
-
}, o = (l, r, i
|
|
878
|
+
return t.maxHeight && (l.maxHeight = `${t.maxHeight}px`), l;
|
|
879
|
+
}, o = (l, a, r, i) => {
|
|
691
880
|
const u = {};
|
|
692
881
|
if (l.width)
|
|
693
882
|
u.width = `${l.width}px`, u.minWidth = `${l.width}px`, u.maxWidth = `${l.width}px`;
|
|
694
883
|
else if (l.minWidth)
|
|
695
884
|
u.minWidth = `${l.minWidth}px`, u.width = `${l.minWidth}px`, u.maxWidth = "none";
|
|
696
885
|
else {
|
|
697
|
-
const c =
|
|
886
|
+
const c = i();
|
|
698
887
|
u.width = `${c}px`, u.minWidth = "80px", u.maxWidth = "none";
|
|
699
888
|
}
|
|
700
|
-
return l.pinnedLeft ? (u.position = "sticky", u.left = `${
|
|
889
|
+
return l.pinnedLeft ? (u.position = "sticky", u.left = `${r("left", a, t.selectable)}px`, u.zIndex = "10") : l.pinnedRight && (u.position = "sticky", u.right = `${r("right", a, !1)}px`, u.zIndex = "10"), u;
|
|
701
890
|
};
|
|
702
891
|
return {
|
|
703
|
-
getTableWrapperStyle:
|
|
892
|
+
getTableWrapperStyle: e,
|
|
704
893
|
getColumnStyle: o,
|
|
705
|
-
getHeaderStyle: (l, r, i
|
|
706
|
-
const u = o(l, r, i
|
|
707
|
-
return
|
|
894
|
+
getHeaderStyle: (l, a, r, i) => {
|
|
895
|
+
const u = o(l, a, r, i);
|
|
896
|
+
return t.maxHeight && (u.position = "sticky", u.top = "0", l.pinnedLeft || l.pinnedRight ? u.zIndex = "12" : u.zIndex = "11"), u;
|
|
708
897
|
},
|
|
709
|
-
getFooterStyle: (l, r, i
|
|
710
|
-
const u = o(l, r, i
|
|
711
|
-
return
|
|
898
|
+
getFooterStyle: (l, a, r, i) => {
|
|
899
|
+
const u = o(l, a, r, i);
|
|
900
|
+
return t.maxHeight && (u.position = "sticky", u.bottom = "0", l.pinnedLeft || l.pinnedRight ? u.zIndex = "12" : u.zIndex = "11"), u;
|
|
712
901
|
}
|
|
713
902
|
};
|
|
714
903
|
}
|
|
715
|
-
function
|
|
716
|
-
const
|
|
904
|
+
function _o() {
|
|
905
|
+
const t = A({
|
|
717
906
|
resizingCol: null,
|
|
718
907
|
startX: 0,
|
|
719
908
|
startWidth: 0
|
|
720
|
-
}),
|
|
909
|
+
}), e = `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`;
|
|
721
910
|
return {
|
|
722
|
-
onMouseDown: (n, s, l,
|
|
723
|
-
n.preventDefault(), n.stopPropagation(),
|
|
724
|
-
const
|
|
725
|
-
const { resizingCol: c, startX:
|
|
911
|
+
onMouseDown: (n, s, l, a) => {
|
|
912
|
+
n.preventDefault(), n.stopPropagation(), t.value.resizingCol = s, t.value.startX = n.clientX, t.value.startWidth = s.width || s.minWidth || l(s.prop);
|
|
913
|
+
const r = (u) => {
|
|
914
|
+
const { resizingCol: c, startX: b, startWidth: M } = t.value;
|
|
726
915
|
if (!c) return;
|
|
727
916
|
document.querySelectorAll(`[data-resizer="${c.prop}"]`).forEach((N) => {
|
|
728
917
|
N.classList.add("vt-table__resizer--active");
|
|
729
918
|
});
|
|
730
|
-
const
|
|
731
|
-
c.width =
|
|
732
|
-
},
|
|
733
|
-
const { resizingCol: u } =
|
|
734
|
-
document.removeEventListener("mousemove",
|
|
919
|
+
const X = u.clientX - b, F = c.minWidth || 50, Q = c.maxWidth || 1e3, U = Math.max(Math.min(M + X, Q), F);
|
|
920
|
+
c.width = U;
|
|
921
|
+
}, i = () => {
|
|
922
|
+
const { resizingCol: u } = t.value;
|
|
923
|
+
document.removeEventListener("mousemove", r), document.removeEventListener("mouseup", i), document.body.style.cursor = "", document.body.style.userSelect = "", document.body.classList.remove("vt-table-resizing"), u && (document.querySelectorAll(`[data-resizer="${u.prop}"]`).forEach((c) => {
|
|
735
924
|
c.classList.remove("vt-table__resizer--active");
|
|
736
|
-
}),
|
|
925
|
+
}), a && u.width && a(u.width)), t.value.resizingCol = null;
|
|
737
926
|
};
|
|
738
|
-
document.addEventListener("mousemove",
|
|
927
|
+
document.addEventListener("mousemove", r), document.addEventListener("mouseup", i), document.body.style.cursor = e, document.body.style.userSelect = "none", document.body.classList.add("vt-table-resizing");
|
|
739
928
|
},
|
|
740
|
-
resizeState:
|
|
929
|
+
resizeState: t
|
|
741
930
|
};
|
|
742
931
|
}
|
|
743
|
-
function
|
|
932
|
+
function go(t, e, o, n) {
|
|
744
933
|
var J;
|
|
745
|
-
const s =
|
|
746
|
-
(J =
|
|
747
|
-
const
|
|
748
|
-
if (
|
|
749
|
-
const
|
|
750
|
-
return
|
|
751
|
-
}),
|
|
752
|
-
const
|
|
753
|
-
if (
|
|
754
|
-
|
|
934
|
+
const s = t.selectionKey || "id", l = A([]), a = A(null), r = A(!1);
|
|
935
|
+
(J = t.defaultSelection) != null && J.length && (l.value = [...t.defaultSelection]);
|
|
936
|
+
const i = (v) => v[s], u = (v) => r.value ? !0 : l.value.some((O) => i(O) === i(v)), c = x(() => e.value.filter((v) => u(v)).length), b = x(() => e.value.length > 0 && c.value === e.value.length), M = x(() => {
|
|
937
|
+
if (r.value) return !1;
|
|
938
|
+
const v = c.value;
|
|
939
|
+
return v > 0 && v < e.value.length;
|
|
940
|
+
}), X = x(() => r.value ? !0 : b.value && !M.value), F = x(() => r.value), Q = (v, O) => {
|
|
941
|
+
const R = i(v), K = l.value.some((_) => i(_) === i(v)), d = O !== void 0 ? O : !K;
|
|
942
|
+
if (r.value && !d) {
|
|
943
|
+
r.value = !1, n != null && n.value && (l.value = n.value.filter((_) => i(_) !== R)), $(v, !1);
|
|
755
944
|
return;
|
|
756
945
|
}
|
|
757
|
-
|
|
758
|
-
},
|
|
946
|
+
r.value && d || (d && !K ? l.value.push(v) : !d && K && (l.value = l.value.filter((_) => i(_) !== R)), t.selectOnClickRow && O === void 0 && G(d ? v : null), $(v, d));
|
|
947
|
+
}, U = () => {
|
|
759
948
|
switch (N()) {
|
|
760
949
|
case "none":
|
|
761
950
|
case "partial":
|
|
762
|
-
|
|
951
|
+
L();
|
|
763
952
|
break;
|
|
764
953
|
case "allVisible":
|
|
765
|
-
|
|
954
|
+
W();
|
|
766
955
|
break;
|
|
767
956
|
case "absoluteAll":
|
|
768
|
-
|
|
957
|
+
B();
|
|
769
958
|
break;
|
|
770
959
|
}
|
|
771
|
-
}, N = () =>
|
|
772
|
-
const
|
|
773
|
-
l.value.forEach((
|
|
774
|
-
|
|
775
|
-
}),
|
|
776
|
-
|
|
777
|
-
}), l.value =
|
|
778
|
-
},
|
|
779
|
-
|
|
780
|
-
},
|
|
781
|
-
l.value = [],
|
|
782
|
-
},
|
|
783
|
-
const
|
|
784
|
-
|
|
785
|
-
currentRow:
|
|
786
|
-
oldCurrentRow:
|
|
960
|
+
}, N = () => r.value ? "absoluteAll" : b.value ? "allVisible" : c.value > 0 ? "partial" : "none", L = () => {
|
|
961
|
+
const v = [], O = new Set(l.value.map((R) => i(R)));
|
|
962
|
+
l.value.forEach((R) => {
|
|
963
|
+
v.push(R);
|
|
964
|
+
}), e.value.forEach((R) => {
|
|
965
|
+
O.has(i(R)) || v.push(R);
|
|
966
|
+
}), l.value = v, r.value = !1, $();
|
|
967
|
+
}, W = () => {
|
|
968
|
+
r.value = !0, n != null && n.value ? l.value = [...n.value] : l.value = [...e.value], $(void 0, void 0, !0);
|
|
969
|
+
}, B = () => {
|
|
970
|
+
l.value = [], r.value = !1, a.value = null, $();
|
|
971
|
+
}, G = (v) => {
|
|
972
|
+
const O = a.value;
|
|
973
|
+
a.value = v, o("current-change", {
|
|
974
|
+
currentRow: a.value,
|
|
975
|
+
oldCurrentRow: O
|
|
787
976
|
});
|
|
788
|
-
}, y = () => [...l.value], E = (
|
|
789
|
-
l.value = [...
|
|
790
|
-
}, $ = (
|
|
791
|
-
const
|
|
977
|
+
}, y = () => [...l.value], E = (v) => {
|
|
978
|
+
l.value = [...v], r.value = !1, $();
|
|
979
|
+
}, $ = (v, O, R = !1) => {
|
|
980
|
+
const K = {
|
|
792
981
|
selection: [...l.value],
|
|
793
|
-
row:
|
|
794
|
-
selected:
|
|
795
|
-
isAllSelected:
|
|
982
|
+
row: v,
|
|
983
|
+
selected: O,
|
|
984
|
+
isAllSelected: R || r.value
|
|
796
985
|
};
|
|
797
|
-
o("selection-change",
|
|
986
|
+
o("selection-change", K);
|
|
798
987
|
};
|
|
799
|
-
return
|
|
800
|
-
() =>
|
|
801
|
-
(
|
|
802
|
-
|
|
988
|
+
return me(
|
|
989
|
+
() => t.defaultSelection,
|
|
990
|
+
(v) => {
|
|
991
|
+
v != null && v.length && (l.value = [...v]);
|
|
803
992
|
}
|
|
804
993
|
), {
|
|
805
994
|
selectedRows: l,
|
|
806
|
-
currentRow:
|
|
995
|
+
currentRow: a,
|
|
807
996
|
isRowSelected: u,
|
|
808
|
-
isAllSelected:
|
|
809
|
-
isIndeterminate:
|
|
810
|
-
isDoubleCheck:
|
|
811
|
-
isFullSelection:
|
|
997
|
+
isAllSelected: X,
|
|
998
|
+
isIndeterminate: M,
|
|
999
|
+
isDoubleCheck: F,
|
|
1000
|
+
isFullSelection: r,
|
|
812
1001
|
toggleRowSelection: Q,
|
|
813
|
-
toggleAllSelection:
|
|
814
|
-
clearSelection:
|
|
815
|
-
setCurrentRow:
|
|
1002
|
+
toggleAllSelection: U,
|
|
1003
|
+
clearSelection: B,
|
|
1004
|
+
setCurrentRow: G,
|
|
816
1005
|
getSelectionRows: y,
|
|
817
1006
|
setSelectionRows: E,
|
|
818
|
-
selectAbsolutelyAll:
|
|
1007
|
+
selectAbsolutelyAll: W
|
|
819
1008
|
};
|
|
820
1009
|
}
|
|
821
|
-
function
|
|
822
|
-
if (!
|
|
823
|
-
return String(
|
|
1010
|
+
function Co(t, e) {
|
|
1011
|
+
if (!t)
|
|
1012
|
+
return String(e.value ?? "");
|
|
824
1013
|
try {
|
|
825
|
-
const o = e
|
|
1014
|
+
const o = t(e);
|
|
826
1015
|
return o;
|
|
827
1016
|
} catch (o) {
|
|
828
|
-
return console.error("Error rendering table slot:", o), String(
|
|
1017
|
+
return console.error("Error rendering table slot:", o), String(e.value ?? "");
|
|
829
1018
|
}
|
|
830
1019
|
}
|
|
831
|
-
const
|
|
832
|
-
if (
|
|
833
|
-
if (
|
|
834
|
-
if (
|
|
835
|
-
if (
|
|
1020
|
+
const wo = (t, e, o = "asc") => {
|
|
1021
|
+
if (t == null && e == null) return 0;
|
|
1022
|
+
if (t == null) return o === "asc" ? 1 : -1;
|
|
1023
|
+
if (e == null) return o === "asc" ? -1 : 1;
|
|
1024
|
+
if (t === e) return 0;
|
|
836
1025
|
let n = 0;
|
|
837
|
-
const s = Number(
|
|
838
|
-
return !isNaN(s) && !isNaN(l) ? n = s - l :
|
|
1026
|
+
const s = Number(t), l = Number(e);
|
|
1027
|
+
return !isNaN(s) && !isNaN(l) ? n = s - l : Te(t) && Te(e) ? n = new Date(t).getTime() - new Date(e).getTime() : typeof t == "boolean" && typeof e == "boolean" ? n = t === e ? 0 : t ? -1 : 1 : n = String(t).localeCompare(String(e), void 0, {
|
|
839
1028
|
numeric: !0,
|
|
840
1029
|
sensitivity: "base"
|
|
841
1030
|
}), o === "desc" ? -n : n;
|
|
842
|
-
},
|
|
843
|
-
|
|
844
|
-
prop:
|
|
845
|
-
direction:
|
|
1031
|
+
}, Te = (t) => t instanceof Date ? !isNaN(t.getTime()) : typeof t == "string" && /\d{4}-\d{2}-\d{2}|\//.test(t) ? !isNaN(new Date(t).getTime()) : !1, ko = (t, e, o) => {
|
|
1032
|
+
t.sortable && o({
|
|
1033
|
+
prop: t.prop,
|
|
1034
|
+
direction: e
|
|
846
1035
|
});
|
|
847
|
-
}, Ee = (
|
|
848
|
-
const o = (
|
|
1036
|
+
}, Ee = (t, e) => {
|
|
1037
|
+
const o = (e == null ? void 0 : e.prop) === t.prop, n = e == null ? void 0 : e.direction;
|
|
849
1038
|
return {
|
|
850
1039
|
asc: ["vt-th__sort-icon", o && n === "asc" && "vt-th__sortable-active"].filter(Boolean).join(" "),
|
|
851
1040
|
desc: ["vt-th__sort-icon", o && n === "desc" && "vt-th__sortable-active"].filter(Boolean).join(" ")
|
|
852
1041
|
};
|
|
853
|
-
},
|
|
854
|
-
if (!
|
|
855
|
-
const n = o.find((l) => l.prop ===
|
|
856
|
-
if (!(n != null && n.sortable)) return [...
|
|
857
|
-
const s = n.sortMethod ||
|
|
858
|
-
return [...
|
|
859
|
-
const
|
|
860
|
-
return s(
|
|
1042
|
+
}, bo = (t, e, o) => {
|
|
1043
|
+
if (!e) return [...t];
|
|
1044
|
+
const n = o.find((l) => l.prop === e.prop);
|
|
1045
|
+
if (!(n != null && n.sortable)) return [...t];
|
|
1046
|
+
const s = n.sortMethod || wo;
|
|
1047
|
+
return [...t].sort((l, a) => {
|
|
1048
|
+
const r = l[n.prop], i = a[n.prop];
|
|
1049
|
+
return s(r, i, e.direction);
|
|
861
1050
|
});
|
|
862
1051
|
};
|
|
863
|
-
class
|
|
1052
|
+
class yo {
|
|
864
1053
|
constructor() {
|
|
865
1054
|
this.modalStack = [], this.baseZIndex = 1e3;
|
|
866
1055
|
}
|
|
867
|
-
open(
|
|
1056
|
+
open(e = {}) {
|
|
868
1057
|
const o = `modal-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`, n = document.createElement("div");
|
|
869
1058
|
n.setAttribute("data-vt-modal", o), document.body.appendChild(n);
|
|
870
|
-
const s =
|
|
1059
|
+
const s = A(!0), l = this.baseZIndex + this.modalStack.length * 10, a = it({
|
|
871
1060
|
setup() {
|
|
872
|
-
const
|
|
1061
|
+
const i = () => {
|
|
873
1062
|
s.value = !1, setTimeout(() => {
|
|
874
|
-
|
|
1063
|
+
ie.closeById(o);
|
|
875
1064
|
}, 100);
|
|
876
1065
|
};
|
|
877
|
-
return () =>
|
|
1066
|
+
return () => be(
|
|
878
1067
|
Ze,
|
|
879
1068
|
{
|
|
880
1069
|
modelValue: s.value,
|
|
881
|
-
"onUpdate:modelValue":
|
|
882
|
-
title:
|
|
883
|
-
size:
|
|
884
|
-
showCloseButton:
|
|
885
|
-
closeOnBackdropClick:
|
|
886
|
-
onClose:
|
|
1070
|
+
"onUpdate:modelValue": i,
|
|
1071
|
+
title: e.title,
|
|
1072
|
+
size: e.size || "medium",
|
|
1073
|
+
showCloseButton: e.showCloseButton !== !1,
|
|
1074
|
+
closeOnBackdropClick: e.closeOnBackdropClick !== !1,
|
|
1075
|
+
onClose: i,
|
|
887
1076
|
zIndex: l
|
|
888
1077
|
},
|
|
889
1078
|
{
|
|
890
|
-
default: () =>
|
|
1079
|
+
default: () => e.component ? be(e.component, e.props || {}) : e.content ? be("div", { innerHTML: e.content }) : null
|
|
891
1080
|
}
|
|
892
1081
|
);
|
|
893
1082
|
}
|
|
894
1083
|
});
|
|
895
|
-
|
|
896
|
-
const
|
|
1084
|
+
a.mount(n);
|
|
1085
|
+
const r = {
|
|
897
1086
|
id: o,
|
|
898
|
-
app:
|
|
1087
|
+
app: a,
|
|
899
1088
|
container: n,
|
|
900
1089
|
isOpen: s
|
|
901
1090
|
};
|
|
902
|
-
return this.modalStack.push(
|
|
1091
|
+
return this.modalStack.push(r), o;
|
|
903
1092
|
}
|
|
904
1093
|
close() {
|
|
905
1094
|
if (this.modalStack.length > 0) {
|
|
906
|
-
const
|
|
907
|
-
this.closeById(
|
|
1095
|
+
const e = this.modalStack[this.modalStack.length - 1];
|
|
1096
|
+
this.closeById(e.id);
|
|
908
1097
|
}
|
|
909
1098
|
}
|
|
910
|
-
closeById(
|
|
911
|
-
const o = this.modalStack.findIndex((n) => n.id ===
|
|
1099
|
+
closeById(e) {
|
|
1100
|
+
const o = this.modalStack.findIndex((n) => n.id === e);
|
|
912
1101
|
if (o !== -1) {
|
|
913
1102
|
const n = this.modalStack[o];
|
|
914
1103
|
this.cleanupModal(n), this.modalStack.splice(o, 1), this.recalculateZIndices();
|
|
@@ -916,219 +1105,219 @@ class Dn {
|
|
|
916
1105
|
}
|
|
917
1106
|
closeAll() {
|
|
918
1107
|
for (; this.modalStack.length > 0; ) {
|
|
919
|
-
const
|
|
920
|
-
|
|
1108
|
+
const e = this.modalStack.pop();
|
|
1109
|
+
e && this.cleanupModal(e);
|
|
921
1110
|
}
|
|
922
1111
|
}
|
|
923
1112
|
getOpenModalsCount() {
|
|
924
1113
|
return this.modalStack.length;
|
|
925
1114
|
}
|
|
926
|
-
cleanupModal(
|
|
927
|
-
|
|
1115
|
+
cleanupModal(e) {
|
|
1116
|
+
e.app && e.app.unmount(), e.container && e.container.parentNode && document.body.removeChild(e.container);
|
|
928
1117
|
}
|
|
929
1118
|
recalculateZIndices() {
|
|
930
1119
|
}
|
|
931
1120
|
}
|
|
932
|
-
const
|
|
933
|
-
install(
|
|
934
|
-
|
|
935
|
-
closeAll: () =>
|
|
936
|
-
getCount: () =>
|
|
937
|
-
closeById: (
|
|
1121
|
+
const ie = new yo(), xo = {
|
|
1122
|
+
install(t) {
|
|
1123
|
+
t.config.globalProperties.$modal = ie, t.config.globalProperties.$modalStack = {
|
|
1124
|
+
closeAll: () => ie.closeAll(),
|
|
1125
|
+
getCount: () => ie.getOpenModalsCount(),
|
|
1126
|
+
closeById: (e) => ie.closeById(e)
|
|
938
1127
|
};
|
|
939
1128
|
}
|
|
940
|
-
},
|
|
1129
|
+
}, Mo = { class: "vt-columns-selector-body" }, Lo = { class: "vt-columns-selector" }, $o = { class: "vt-columns-selector__panel" }, So = ["draggable", "onDragstart", "onDragover", "onDrop"], Io = {
|
|
941
1130
|
key: 0,
|
|
942
1131
|
class: "vt-columns-selector__panel-item-pinned"
|
|
943
|
-
},
|
|
1132
|
+
}, Vo = { class: "vt-columns-selector__available" }, Bo = ["onClick"], Ro = {
|
|
944
1133
|
key: 0,
|
|
945
1134
|
class: "vt-columns-selector__group-columns"
|
|
946
|
-
},
|
|
1135
|
+
}, To = {
|
|
947
1136
|
key: 0,
|
|
948
1137
|
class: "vt-columns-selector__pinned-note"
|
|
949
|
-
},
|
|
1138
|
+
}, Eo = { class: "vt-modal__content-button" }, zo = /* @__PURE__ */ le({
|
|
950
1139
|
__name: "VTableColumnSelector",
|
|
951
1140
|
props: {
|
|
952
1141
|
columns: {},
|
|
953
1142
|
columnsSelector: { default: () => [] }
|
|
954
1143
|
},
|
|
955
1144
|
emits: ["update-columns"],
|
|
956
|
-
setup(
|
|
957
|
-
const o =
|
|
1145
|
+
setup(t, { emit: e }) {
|
|
1146
|
+
const o = t, n = e, s = A([]), l = A(/* @__PURE__ */ new Set()), a = A(-1), r = A(-1), i = A("before"), u = x(() => {
|
|
958
1147
|
const d = {};
|
|
959
|
-
return o.columnsSelector.forEach((
|
|
960
|
-
if (
|
|
1148
|
+
return o.columnsSelector.forEach((_) => {
|
|
1149
|
+
if (_.name === "removed")
|
|
961
1150
|
return;
|
|
962
|
-
const g =
|
|
963
|
-
|
|
1151
|
+
const g = _.columns.map((V) => V.prop), k = s.value.filter((V) => g.includes(V.prop));
|
|
1152
|
+
k.length === 0 ? d[_.name] = { checked: !1, indeterminate: !1 } : k.length === _.columns.length ? d[_.name] = { checked: !0, indeterminate: !1 } : d[_.name] = { checked: !1, indeterminate: !0 };
|
|
964
1153
|
}), d;
|
|
965
|
-
}), c = x(() => o.columnsSelector.filter((d) => d.name !== "removed")),
|
|
1154
|
+
}), c = x(() => o.columnsSelector.filter((d) => d.name !== "removed")), b = (d) => d.pinnedLeft || d.pinnedRight, M = (d) => !b(d), X = () => {
|
|
966
1155
|
const d = s.value;
|
|
967
|
-
let
|
|
968
|
-
for (let
|
|
969
|
-
d[
|
|
1156
|
+
let _ = -1;
|
|
1157
|
+
for (let k = 0; k < d.length; k++)
|
|
1158
|
+
d[k].pinnedLeft && (_ = k);
|
|
970
1159
|
let g = d.length;
|
|
971
|
-
for (let
|
|
972
|
-
if (d[
|
|
973
|
-
g =
|
|
1160
|
+
for (let k = 0; k < d.length; k++)
|
|
1161
|
+
if (d[k].pinnedRight) {
|
|
1162
|
+
g = k;
|
|
974
1163
|
break;
|
|
975
1164
|
}
|
|
976
1165
|
return {
|
|
977
|
-
minIndex:
|
|
1166
|
+
minIndex: _ + 1,
|
|
978
1167
|
maxIndex: g - 1
|
|
979
1168
|
};
|
|
980
|
-
},
|
|
981
|
-
const
|
|
982
|
-
return !(d <
|
|
983
|
-
}, Q = (d,
|
|
984
|
-
const g = s.value[
|
|
985
|
-
if (!
|
|
1169
|
+
}, F = (d) => {
|
|
1170
|
+
const _ = X();
|
|
1171
|
+
return !(d < _.minIndex || d > _.maxIndex + 1);
|
|
1172
|
+
}, Q = (d, _) => {
|
|
1173
|
+
const g = s.value[_];
|
|
1174
|
+
if (!M(g)) {
|
|
986
1175
|
d.preventDefault();
|
|
987
1176
|
return;
|
|
988
1177
|
}
|
|
989
|
-
|
|
990
|
-
},
|
|
991
|
-
if (
|
|
1178
|
+
a.value = _, d.dataTransfer && (d.dataTransfer.effectAllowed = "move", d.dataTransfer.setData("text/plain", g.prop)), document.body.style.cursor = "grabbing";
|
|
1179
|
+
}, U = (d, _) => {
|
|
1180
|
+
if (a.value === -1) return;
|
|
992
1181
|
d.preventDefault();
|
|
993
|
-
const g = d.currentTarget.getBoundingClientRect(),
|
|
994
|
-
let
|
|
995
|
-
|
|
1182
|
+
const g = d.currentTarget.getBoundingClientRect(), k = d.clientY, V = g.top + g.height / 2;
|
|
1183
|
+
let S = _, ee = "before";
|
|
1184
|
+
k < V ? (S = _, ee = "before") : (S = _ + 1, ee = "after"), a.value < S && S--, F(S) ? (r.value = _, i.value = ee, d.dataTransfer.dropEffect = "move") : (r.value = -1, d.dataTransfer.dropEffect = "none");
|
|
996
1185
|
}, N = () => {
|
|
997
1186
|
setTimeout(() => {
|
|
998
|
-
|
|
1187
|
+
a.value === -1 && (r.value = -1);
|
|
999
1188
|
}, 50);
|
|
1000
|
-
},
|
|
1001
|
-
if (d.preventDefault(),
|
|
1002
|
-
|
|
1189
|
+
}, L = (d, _) => {
|
|
1190
|
+
if (d.preventDefault(), a.value === -1 || r.value === -1) {
|
|
1191
|
+
B();
|
|
1003
1192
|
return;
|
|
1004
1193
|
}
|
|
1005
|
-
const g = d.currentTarget.getBoundingClientRect(),
|
|
1006
|
-
let
|
|
1007
|
-
if (
|
|
1008
|
-
|
|
1194
|
+
const g = d.currentTarget.getBoundingClientRect(), k = d.clientY, V = g.top + g.height / 2;
|
|
1195
|
+
let S = _;
|
|
1196
|
+
if (k >= V && (S = _ + 1), a.value < S && S--, !F(S) || S === a.value) {
|
|
1197
|
+
B();
|
|
1009
1198
|
return;
|
|
1010
1199
|
}
|
|
1011
|
-
const ee = [...s.value], [Ce] = ee.splice(
|
|
1012
|
-
ee.splice(
|
|
1013
|
-
},
|
|
1014
|
-
|
|
1015
|
-
},
|
|
1016
|
-
|
|
1017
|
-
},
|
|
1018
|
-
const
|
|
1019
|
-
return
|
|
1200
|
+
const ee = [...s.value], [Ce] = ee.splice(a.value, 1);
|
|
1201
|
+
ee.splice(S, 0, Ce), s.value = ee, B();
|
|
1202
|
+
}, W = () => {
|
|
1203
|
+
B();
|
|
1204
|
+
}, B = () => {
|
|
1205
|
+
a.value = -1, r.value = -1, i.value = "before", document.body.style.cursor = "";
|
|
1206
|
+
}, G = (d) => {
|
|
1207
|
+
const _ = ["vt-columns-selector__panel-item"];
|
|
1208
|
+
return a.value === d && _.push("vt-columns-selector__panel-item--dragging"), r.value === d && i.value === "before" && _.push("vt-columns-selector__panel-item--drop-before"), r.value === d && i.value === "after" && _.push("vt-columns-selector__panel-item--drop-after"), _;
|
|
1020
1209
|
}, y = () => {
|
|
1021
1210
|
s.value = [...o.columns.map((d) => ({ ...d }))], o.columnsSelector.forEach((d) => {
|
|
1022
1211
|
d.name !== "removed" && l.value.add(d.name);
|
|
1023
1212
|
});
|
|
1024
|
-
}, E = (d,
|
|
1025
|
-
if (
|
|
1213
|
+
}, E = (d, _) => {
|
|
1214
|
+
if (_)
|
|
1026
1215
|
s.value.some((g) => g.prop === d.prop) || s.value.push({ ...d });
|
|
1027
1216
|
else {
|
|
1028
|
-
if (
|
|
1217
|
+
if (b(d))
|
|
1029
1218
|
return;
|
|
1030
1219
|
s.value = s.value.filter((g) => g.prop !== d.prop);
|
|
1031
1220
|
}
|
|
1032
|
-
}, $ = (d,
|
|
1033
|
-
if (
|
|
1221
|
+
}, $ = (d, _) => {
|
|
1222
|
+
if (_)
|
|
1034
1223
|
d.columns.forEach((g) => {
|
|
1035
|
-
s.value.some((
|
|
1224
|
+
s.value.some((k) => k.prop === g.prop) || s.value.push({ ...g });
|
|
1036
1225
|
});
|
|
1037
1226
|
else {
|
|
1038
1227
|
const g = [];
|
|
1039
|
-
d.columns.forEach((
|
|
1040
|
-
const
|
|
1041
|
-
|
|
1228
|
+
d.columns.forEach((k) => {
|
|
1229
|
+
const V = s.value.find((S) => S.prop === k.prop);
|
|
1230
|
+
V && !b(V) && g.push(V);
|
|
1042
1231
|
}), s.value = s.value.filter(
|
|
1043
|
-
(
|
|
1232
|
+
(k) => !g.some((V) => V.prop === k.prop)
|
|
1044
1233
|
);
|
|
1045
1234
|
}
|
|
1046
|
-
}, J = (d) => s.value.some((
|
|
1047
|
-
const
|
|
1048
|
-
return !
|
|
1049
|
-
},
|
|
1235
|
+
}, J = (d) => s.value.some((_) => _.prop === d.prop), v = (d) => {
|
|
1236
|
+
const _ = s.value.find((g) => g.prop === d.prop);
|
|
1237
|
+
return !_ || !b(_);
|
|
1238
|
+
}, O = (d) => {
|
|
1050
1239
|
l.value.has(d) ? l.value.delete(d) : l.value.add(d);
|
|
1051
|
-
},
|
|
1052
|
-
n("update-columns", [...s.value]),
|
|
1053
|
-
},
|
|
1054
|
-
|
|
1240
|
+
}, R = () => {
|
|
1241
|
+
n("update-columns", [...s.value]), ie.close();
|
|
1242
|
+
}, K = () => {
|
|
1243
|
+
ie.close();
|
|
1055
1244
|
};
|
|
1056
1245
|
return ve(() => {
|
|
1057
1246
|
y();
|
|
1058
|
-
}), (d,
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
(p(!0),
|
|
1247
|
+
}), (d, _) => (p(), m("div", Mo, [
|
|
1248
|
+
h("div", Lo, [
|
|
1249
|
+
h("div", $o, [
|
|
1250
|
+
(p(!0), m(ne, null, oe(s.value, (g, k) => (p(), m("div", {
|
|
1062
1251
|
key: g.prop,
|
|
1063
|
-
class:
|
|
1064
|
-
draggable:
|
|
1065
|
-
onDragstart: (
|
|
1066
|
-
onDragover: (
|
|
1252
|
+
class: z(G(k)),
|
|
1253
|
+
draggable: M(g),
|
|
1254
|
+
onDragstart: (V) => Q(V, k),
|
|
1255
|
+
onDragover: (V) => U(V, k),
|
|
1067
1256
|
onDragleave: N,
|
|
1068
|
-
onDrop: (
|
|
1069
|
-
onDragend:
|
|
1257
|
+
onDrop: (V) => L(V, k),
|
|
1258
|
+
onDragend: W
|
|
1070
1259
|
}, [
|
|
1071
1260
|
Z(Y, {
|
|
1072
|
-
name:
|
|
1073
|
-
class:
|
|
1261
|
+
name: M(g) ? "columnsMove" : "freeze",
|
|
1262
|
+
class: z(["vt-columns-selector__panel-item-icon", { "vt-columns-selector__panel-item-icon--draggable": M(g) }])
|
|
1074
1263
|
}, null, 8, ["name", "class"]),
|
|
1075
1264
|
Z(ue, {
|
|
1076
1265
|
label: g.label,
|
|
1077
1266
|
checked: !0,
|
|
1078
|
-
disabled:
|
|
1079
|
-
onChange: (
|
|
1080
|
-
onClick:
|
|
1267
|
+
disabled: b(g),
|
|
1268
|
+
onChange: (V) => E(g, V),
|
|
1269
|
+
onClick: _[0] || (_[0] = he(() => {
|
|
1081
1270
|
}, ["stop"]))
|
|
1082
1271
|
}, null, 8, ["label", "disabled", "onChange"]),
|
|
1083
|
-
|
|
1084
|
-
], 42,
|
|
1272
|
+
b(g) ? (p(), m("span", Io, "pinned")) : D("", !0)
|
|
1273
|
+
], 42, So))), 128))
|
|
1085
1274
|
]),
|
|
1086
|
-
|
|
1087
|
-
(p(!0),
|
|
1088
|
-
var
|
|
1089
|
-
return p(),
|
|
1275
|
+
h("div", Vo, [
|
|
1276
|
+
(p(!0), m(ne, null, oe(c.value, (g) => {
|
|
1277
|
+
var k, V;
|
|
1278
|
+
return p(), m("div", {
|
|
1090
1279
|
key: g.name,
|
|
1091
1280
|
class: "vt-columns-selector__group"
|
|
1092
1281
|
}, [
|
|
1093
|
-
|
|
1282
|
+
h("div", {
|
|
1094
1283
|
class: "vt-columns-selector__group-header",
|
|
1095
|
-
onClick: (
|
|
1284
|
+
onClick: (S) => O(g.name)
|
|
1096
1285
|
}, [
|
|
1097
1286
|
Z(ue, {
|
|
1098
1287
|
label: g.label,
|
|
1099
|
-
checked: ((
|
|
1100
|
-
indeterminate: ((
|
|
1101
|
-
onChange: (
|
|
1102
|
-
onClick:
|
|
1288
|
+
checked: ((k = u.value[g.name]) == null ? void 0 : k.checked) || !1,
|
|
1289
|
+
indeterminate: ((V = u.value[g.name]) == null ? void 0 : V.indeterminate) || !1,
|
|
1290
|
+
onChange: (S) => $(g, S),
|
|
1291
|
+
onClick: _[1] || (_[1] = he(() => {
|
|
1103
1292
|
}, ["stop"]))
|
|
1104
1293
|
}, null, 8, ["label", "checked", "indeterminate", "onChange"]),
|
|
1105
|
-
g.icon ? (p(),
|
|
1294
|
+
g.icon ? (p(), ae(Y, {
|
|
1106
1295
|
key: 0,
|
|
1107
1296
|
name: g.icon,
|
|
1108
1297
|
class: "vt-columns-selector__group-icon"
|
|
1109
|
-
}, null, 8, ["name"])) :
|
|
1110
|
-
], 8,
|
|
1111
|
-
l.value.has(g.name) ? (p(),
|
|
1112
|
-
(p(!0),
|
|
1113
|
-
key:
|
|
1298
|
+
}, null, 8, ["name"])) : D("", !0)
|
|
1299
|
+
], 8, Bo),
|
|
1300
|
+
l.value.has(g.name) ? (p(), m("div", Ro, [
|
|
1301
|
+
(p(!0), m(ne, null, oe(g.columns, (S) => (p(), m("div", {
|
|
1302
|
+
key: S.prop,
|
|
1114
1303
|
class: "vt-columns-selector__group-column"
|
|
1115
1304
|
}, [
|
|
1116
1305
|
Z(ue, {
|
|
1117
|
-
label:
|
|
1118
|
-
checked: J(
|
|
1119
|
-
disabled: !
|
|
1120
|
-
onChange: (ee) => E(
|
|
1306
|
+
label: S.label,
|
|
1307
|
+
checked: J(S),
|
|
1308
|
+
disabled: !v(S),
|
|
1309
|
+
onChange: (ee) => E(S, ee)
|
|
1121
1310
|
}, null, 8, ["label", "checked", "disabled", "onChange"]),
|
|
1122
|
-
|
|
1311
|
+
v(S) ? D("", !0) : (p(), m("span", To, " (закріплена) "))
|
|
1123
1312
|
]))), 128))
|
|
1124
|
-
])) :
|
|
1313
|
+
])) : D("", !0)
|
|
1125
1314
|
]);
|
|
1126
1315
|
}), 128))
|
|
1127
1316
|
])
|
|
1128
1317
|
]),
|
|
1129
|
-
|
|
1130
|
-
Z(ge, { onClick:
|
|
1131
|
-
default: xe(() =>
|
|
1318
|
+
h("div", Eo, [
|
|
1319
|
+
Z(ge, { onClick: K }, {
|
|
1320
|
+
default: xe(() => _[2] || (_[2] = [
|
|
1132
1321
|
_e("Скасувати", -1)
|
|
1133
1322
|
])),
|
|
1134
1323
|
_: 1,
|
|
@@ -1136,9 +1325,9 @@ const ae = new Dn(), An = {
|
|
|
1136
1325
|
}),
|
|
1137
1326
|
Z(ge, {
|
|
1138
1327
|
type: "primary",
|
|
1139
|
-
onClick:
|
|
1328
|
+
onClick: R
|
|
1140
1329
|
}, {
|
|
1141
|
-
default: xe(() =>
|
|
1330
|
+
default: xe(() => _[3] || (_[3] = [
|
|
1142
1331
|
_e("Зберегти", -1)
|
|
1143
1332
|
])),
|
|
1144
1333
|
_: 1,
|
|
@@ -1147,7 +1336,7 @@ const ae = new Dn(), An = {
|
|
|
1147
1336
|
])
|
|
1148
1337
|
]));
|
|
1149
1338
|
}
|
|
1150
|
-
}),
|
|
1339
|
+
}), Ho = /* @__PURE__ */ le({
|
|
1151
1340
|
__name: "ColumnActions",
|
|
1152
1341
|
props: {
|
|
1153
1342
|
column: {},
|
|
@@ -1155,54 +1344,54 @@ const ae = new Dn(), An = {
|
|
|
1155
1344
|
columnsSelector: {}
|
|
1156
1345
|
},
|
|
1157
1346
|
emits: ["pin", "update-columns"],
|
|
1158
|
-
setup(
|
|
1159
|
-
const o =
|
|
1347
|
+
setup(t, { emit: e }) {
|
|
1348
|
+
const o = t, n = e, s = A(), l = A(), a = A(), r = A(!1), i = A(!1), u = A([]), c = async () => {
|
|
1160
1349
|
if (await at(), !s.value || !l.value) return;
|
|
1161
1350
|
const y = l.value.getBoundingClientRect(), E = s.value, $ = E.offsetWidth, J = y.left + y.width / 2;
|
|
1162
1351
|
E.style.top = `${y.bottom - 20}px`, E.style.left = `${J - $ / 2}px`;
|
|
1163
|
-
const
|
|
1164
|
-
|
|
1165
|
-
},
|
|
1166
|
-
y.stopPropagation(), !
|
|
1167
|
-
},
|
|
1168
|
-
|
|
1169
|
-
},
|
|
1170
|
-
|
|
1171
|
-
|
|
1352
|
+
const v = E.getBoundingClientRect();
|
|
1353
|
+
v.right > window.innerWidth && (E.style.left = `${window.innerWidth - $ - 8}px`), v.left < 0 && (E.style.left = "8px");
|
|
1354
|
+
}, b = (y) => {
|
|
1355
|
+
y.stopPropagation(), !i.value && (r.value ? X() : M());
|
|
1356
|
+
}, M = () => {
|
|
1357
|
+
i.value || (r.value = !0, c(), a.value && (a.value.style.zIndex = "22"));
|
|
1358
|
+
}, X = () => {
|
|
1359
|
+
i.value = !0, r.value = !1, a.value && a.value.style.removeProperty("z-index"), setTimeout(() => {
|
|
1360
|
+
i.value = !1;
|
|
1172
1361
|
}, 100);
|
|
1173
|
-
},
|
|
1362
|
+
}, F = (y) => {
|
|
1174
1363
|
var E, $;
|
|
1175
|
-
!((E = l.value) != null && E.contains(y.target)) && !(($ = s.value) != null && $.contains(y.target)) &&
|
|
1364
|
+
!((E = l.value) != null && E.contains(y.target)) && !(($ = s.value) != null && $.contains(y.target)) && X();
|
|
1176
1365
|
}, Q = () => {
|
|
1177
|
-
|
|
1178
|
-
},
|
|
1366
|
+
G() ? (n("pin", o.column, "none"), console.log(`Колонка "${o.column.label}" відкріплена`)) : (n("pin", o.column, "left"), console.log(`Колонка "${o.column.label}" прикріплена зліва`)), X();
|
|
1367
|
+
}, U = (y) => ({
|
|
1179
1368
|
name: "removed",
|
|
1180
1369
|
label: "Видалені колонки",
|
|
1181
1370
|
order: 999,
|
|
1182
1371
|
// Найвищий порядок, щоб відображались останніми
|
|
1183
1372
|
columns: y
|
|
1184
1373
|
}), N = (y) => {
|
|
1185
|
-
var
|
|
1186
|
-
const E = new Set(y.map((
|
|
1187
|
-
(
|
|
1188
|
-
|
|
1189
|
-
}), o.allColumns.forEach((
|
|
1374
|
+
var O;
|
|
1375
|
+
const E = new Set(y.map((R) => R.prop)), $ = /* @__PURE__ */ new Set();
|
|
1376
|
+
(O = o.columnsSelector) == null || O.forEach((R) => {
|
|
1377
|
+
R.columns.forEach((K) => $.add(K.prop));
|
|
1378
|
+
}), o.allColumns.forEach((R) => $.add(R.prop));
|
|
1190
1379
|
const J = [];
|
|
1191
|
-
$.forEach((
|
|
1192
|
-
var
|
|
1193
|
-
if (!E.has(
|
|
1380
|
+
$.forEach((R) => {
|
|
1381
|
+
var K;
|
|
1382
|
+
if (!E.has(R)) {
|
|
1194
1383
|
let d;
|
|
1195
|
-
(
|
|
1196
|
-
const g =
|
|
1384
|
+
(K = o.columnsSelector) == null || K.forEach((_) => {
|
|
1385
|
+
const g = _.columns.find((k) => k.prop === R);
|
|
1197
1386
|
g && (d = g);
|
|
1198
|
-
}), d || (d = o.allColumns.find((
|
|
1387
|
+
}), d || (d = o.allColumns.find((_) => _.prop === R)), d && J.push(d);
|
|
1199
1388
|
}
|
|
1200
1389
|
});
|
|
1201
|
-
const
|
|
1202
|
-
J.length > 0 &&
|
|
1203
|
-
},
|
|
1204
|
-
N(o.allColumns),
|
|
1205
|
-
component:
|
|
1390
|
+
const v = [...o.columnsSelector || []];
|
|
1391
|
+
J.length > 0 && v.push(U(J)), u.value = v;
|
|
1392
|
+
}, L = () => {
|
|
1393
|
+
N(o.allColumns), ie.open({
|
|
1394
|
+
component: zo,
|
|
1206
1395
|
title: "Управління колонками таблиці",
|
|
1207
1396
|
props: {
|
|
1208
1397
|
columns: o.allColumns,
|
|
@@ -1215,50 +1404,50 @@ const ae = new Dn(), An = {
|
|
|
1215
1404
|
},
|
|
1216
1405
|
size: "large",
|
|
1217
1406
|
closeOnBackdropClick: !1
|
|
1218
|
-
}),
|
|
1219
|
-
},
|
|
1407
|
+
}), X();
|
|
1408
|
+
}, W = () => o.column.pinnedLeft, B = () => o.column.pinnedRight, G = () => W() || B();
|
|
1220
1409
|
return ve(() => {
|
|
1221
|
-
document.addEventListener("click",
|
|
1410
|
+
document.addEventListener("click", F), l.value && (a.value = l.value.closest("th")), N(o.allColumns);
|
|
1222
1411
|
}), $e(() => {
|
|
1223
|
-
document.removeEventListener("click",
|
|
1224
|
-
}), (y, E) => (p(),
|
|
1412
|
+
document.removeEventListener("click", F);
|
|
1413
|
+
}), (y, E) => (p(), m("div", {
|
|
1225
1414
|
ref_key: "triggerRef",
|
|
1226
1415
|
ref: l,
|
|
1227
1416
|
class: "vt-table-header-actions",
|
|
1228
|
-
onClick:
|
|
1417
|
+
onClick: b
|
|
1229
1418
|
}, [
|
|
1230
1419
|
Z(Y, { name: "listBullet" }),
|
|
1231
|
-
|
|
1420
|
+
r.value ? (p(), m("ul", {
|
|
1232
1421
|
key: 0,
|
|
1233
1422
|
ref_key: "menuRef",
|
|
1234
1423
|
ref: s,
|
|
1235
|
-
class:
|
|
1424
|
+
class: z(["dropdown-menu", "vt-table-dropdown", { visible: r.value }])
|
|
1236
1425
|
}, [
|
|
1237
|
-
|
|
1426
|
+
h("li", { onClick: Q }, [
|
|
1238
1427
|
Z(Y, {
|
|
1239
|
-
name:
|
|
1428
|
+
name: G() ? "unfreeze" : "freeze"
|
|
1240
1429
|
}, null, 8, ["name"]),
|
|
1241
|
-
|
|
1430
|
+
h("span", null, te(G() ? "Розморозити" : "Заморозити"), 1)
|
|
1242
1431
|
]),
|
|
1243
|
-
|
|
1432
|
+
h("li", { onClick: L }, [
|
|
1244
1433
|
Z(Y, { name: "columnInsert" }),
|
|
1245
|
-
E[0] || (E[0] =
|
|
1434
|
+
E[0] || (E[0] = h("span", null, "Колонки", -1))
|
|
1246
1435
|
])
|
|
1247
|
-
], 2)) :
|
|
1436
|
+
], 2)) : D("", !0)
|
|
1248
1437
|
], 512));
|
|
1249
1438
|
}
|
|
1250
|
-
}),
|
|
1439
|
+
}), Wo = { class: "vt-table" }, Do = { class: "vt-th__content" }, Po = { class: "vt-th__content" }, Ao = { class: "vt-th__label" }, Oo = {
|
|
1251
1440
|
key: 0,
|
|
1252
1441
|
class: "vt-th__sortable"
|
|
1253
|
-
},
|
|
1442
|
+
}, jo = ["data-resizer", "onMousedown"], Fo = {
|
|
1254
1443
|
key: 0,
|
|
1255
1444
|
class: "vt-table__empty-row"
|
|
1256
|
-
},
|
|
1445
|
+
}, No = ["colspan"], Zo = { class: "vt-table__empty-content" }, Uo = ["onClick"], qo = { class: "vt-table__cell-content" }, Xo = { class: "vt-table__cell-content vt-table__cell-content--ellipsis" }, Go = { key: 1 }, Ko = ["data-resizer", "onMousedown"], Yo = {
|
|
1257
1446
|
key: 0,
|
|
1258
1447
|
class: "vt-table__summary"
|
|
1259
|
-
},
|
|
1448
|
+
}, Jo = { class: "vt-table__cell-content vt-table__cell-content--summary" }, ye = 50, Qo = /* @__PURE__ */ le({
|
|
1260
1449
|
__name: "VTable",
|
|
1261
|
-
props: /* @__PURE__ */
|
|
1450
|
+
props: /* @__PURE__ */ Re({
|
|
1262
1451
|
data: {},
|
|
1263
1452
|
maxHeight: {},
|
|
1264
1453
|
defaultSort: {},
|
|
@@ -1276,339 +1465,339 @@ const ae = new Dn(), An = {
|
|
|
1276
1465
|
columns: { required: !1 },
|
|
1277
1466
|
columnsModifiers: {}
|
|
1278
1467
|
}),
|
|
1279
|
-
emits: /* @__PURE__ */
|
|
1280
|
-
setup(
|
|
1281
|
-
const n =
|
|
1282
|
-
let
|
|
1468
|
+
emits: /* @__PURE__ */ Re(["sort-change", "selection-change", "current-change", "row-click", "update:columns", "column-pin", "column-resize", "column-visibility", "column-sort", "columns-change", "infinity-scroll"], ["update:columns"]),
|
|
1469
|
+
setup(t, { expose: e, emit: o }) {
|
|
1470
|
+
const n = t, s = ct(t, "columns"), l = o, a = A({}), r = A(), i = ut([]), u = A(n.defaultSort || null), c = x(() => s.value !== void 0), b = x(() => n.data && n.data.length > 0), M = A(!1), X = A(0);
|
|
1471
|
+
let F = null;
|
|
1283
1472
|
const Q = () => {
|
|
1284
|
-
c.value && s.value ?
|
|
1473
|
+
c.value && s.value ? i.splice(0, i.length, ...s.value) : n.columns && i.splice(0, i.length, ...n.columns);
|
|
1285
1474
|
};
|
|
1286
|
-
|
|
1475
|
+
me(
|
|
1287
1476
|
() => s.value,
|
|
1288
|
-
(
|
|
1289
|
-
|
|
1477
|
+
(f) => {
|
|
1478
|
+
f && c.value && i.splice(0, i.length, ...f);
|
|
1290
1479
|
},
|
|
1291
1480
|
{ deep: !0 }
|
|
1292
|
-
),
|
|
1481
|
+
), me(
|
|
1293
1482
|
() => n.columns,
|
|
1294
|
-
(
|
|
1295
|
-
|
|
1483
|
+
(f) => {
|
|
1484
|
+
f && !c.value && i.splice(0, i.length, ...f);
|
|
1296
1485
|
},
|
|
1297
1486
|
{ deep: !0 }
|
|
1298
|
-
),
|
|
1299
|
-
const { sortedColumns:
|
|
1487
|
+
), dt("vt-table-columns", i);
|
|
1488
|
+
const { sortedColumns: U, getDefaultColumnWidth: N, getStickyOffset: L } = vo(i), { getTableWrapperStyle: W, getColumnStyle: B, getHeaderStyle: G, getFooterStyle: y } = fo(n), { onMouseDown: E } = _o(), $ = x(() => bo(n.data, u.value, i)), J = x(() => n.allData || n.data), v = n.selectable ? go(n, $, l, J) : null, O = () => ({
|
|
1300
1489
|
width: `${ye}px`,
|
|
1301
1490
|
minWidth: `${ye}px`,
|
|
1302
1491
|
maxWidth: `${ye}px`,
|
|
1303
1492
|
left: "0px",
|
|
1304
1493
|
position: "sticky",
|
|
1305
1494
|
zIndex: 10
|
|
1306
|
-
}),
|
|
1307
|
-
const
|
|
1495
|
+
}), R = () => {
|
|
1496
|
+
const f = O();
|
|
1308
1497
|
return n.maxHeight ? {
|
|
1309
|
-
...
|
|
1498
|
+
...f,
|
|
1310
1499
|
top: "0px",
|
|
1311
1500
|
zIndex: 11
|
|
1312
1501
|
// Вищий z-index для header
|
|
1313
|
-
} :
|
|
1314
|
-
},
|
|
1315
|
-
const
|
|
1502
|
+
} : f;
|
|
1503
|
+
}, K = () => {
|
|
1504
|
+
const f = O();
|
|
1316
1505
|
return n.maxHeight ? {
|
|
1317
|
-
...
|
|
1506
|
+
...f,
|
|
1318
1507
|
bottom: "0px",
|
|
1319
1508
|
zIndex: 11
|
|
1320
1509
|
// Вищий z-index для footer
|
|
1321
|
-
} :
|
|
1510
|
+
} : f;
|
|
1322
1511
|
}, d = () => {
|
|
1323
|
-
if (!
|
|
1324
|
-
const
|
|
1325
|
-
|
|
1326
|
-
const fe = C -
|
|
1327
|
-
|
|
1328
|
-
|
|
1512
|
+
if (!r.value || M.value) return;
|
|
1513
|
+
const f = r.value, C = f.scrollTop, I = f.scrollHeight, T = f.clientHeight, P = 30;
|
|
1514
|
+
F && clearTimeout(F), F = setTimeout(() => {
|
|
1515
|
+
const fe = C - X.value > 1, w = I - C - T <= P, ce = I - C - T <= 5;
|
|
1516
|
+
X.value = C, fe && (w || ce) && (M.value = !0, l("infinity-scroll"), setTimeout(() => {
|
|
1517
|
+
M.value = !1;
|
|
1329
1518
|
}, 1e3));
|
|
1330
1519
|
}, 50);
|
|
1331
|
-
},
|
|
1332
|
-
|
|
1520
|
+
}, _ = () => {
|
|
1521
|
+
M.value = !1;
|
|
1333
1522
|
};
|
|
1334
1523
|
ve(() => {
|
|
1335
|
-
|
|
1524
|
+
r.value && r.value.addEventListener("scroll", d);
|
|
1336
1525
|
}), $e(() => {
|
|
1337
|
-
|
|
1526
|
+
F && clearTimeout(F), r.value && r.value.removeEventListener("scroll", d);
|
|
1338
1527
|
});
|
|
1339
|
-
const g = (
|
|
1340
|
-
|
|
1341
|
-
var
|
|
1342
|
-
((
|
|
1343
|
-
column:
|
|
1528
|
+
const g = (f, C) => {
|
|
1529
|
+
ko(f, C, (I) => {
|
|
1530
|
+
var T, P;
|
|
1531
|
+
((T = u.value) == null ? void 0 : T.prop) === f.prop && u.value.direction === C ? u.value = null : u.value = I, l("sort-change", {
|
|
1532
|
+
column: f,
|
|
1344
1533
|
direction: ((P = u.value) == null ? void 0 : P.direction) || null,
|
|
1345
|
-
prop:
|
|
1534
|
+
prop: f.prop,
|
|
1346
1535
|
sortedData: $.value
|
|
1347
1536
|
});
|
|
1348
1537
|
});
|
|
1349
|
-
},
|
|
1538
|
+
}, k = (f, C) => {
|
|
1350
1539
|
const I = {
|
|
1351
1540
|
pinnedLeft: C === "left",
|
|
1352
1541
|
pinnedRight: C === "right"
|
|
1353
1542
|
};
|
|
1354
|
-
|
|
1355
|
-
},
|
|
1356
|
-
|
|
1357
|
-
},
|
|
1358
|
-
const I =
|
|
1543
|
+
S(f.prop, I), l("column-pin", { column: { ...f, ...I }, position: C });
|
|
1544
|
+
}, V = (f) => {
|
|
1545
|
+
i.splice(0, i.length, ...f), c.value && (s.value = [...f]), l("columns-change", [...f]);
|
|
1546
|
+
}, S = (f, C) => {
|
|
1547
|
+
const I = i.findIndex((T) => T.prop === f);
|
|
1359
1548
|
if (I !== -1) {
|
|
1360
|
-
if (Object.assign(
|
|
1361
|
-
const
|
|
1362
|
-
if (
|
|
1549
|
+
if (Object.assign(i[I], C), c.value && s.value) {
|
|
1550
|
+
const T = s.value.findIndex((P) => P.prop === f);
|
|
1551
|
+
if (T !== -1) {
|
|
1363
1552
|
const P = [...s.value];
|
|
1364
|
-
P[
|
|
1553
|
+
P[T] = { ...P[T], ...C }, s.value = P;
|
|
1365
1554
|
}
|
|
1366
1555
|
}
|
|
1367
|
-
l("columns-change", [...
|
|
1556
|
+
l("columns-change", [...i]);
|
|
1368
1557
|
} else
|
|
1369
1558
|
console.error(
|
|
1370
1559
|
"Колонку не знайдено:",
|
|
1371
|
-
|
|
1560
|
+
f,
|
|
1372
1561
|
"Доступні колонки:",
|
|
1373
|
-
|
|
1562
|
+
i.map((T) => T.prop)
|
|
1374
1563
|
);
|
|
1375
|
-
}, ee = (
|
|
1376
|
-
l("row-click", { row:
|
|
1377
|
-
}, Ce = (
|
|
1378
|
-
I.stopPropagation(),
|
|
1379
|
-
},
|
|
1380
|
-
C.stopPropagation(),
|
|
1381
|
-
},
|
|
1382
|
-
|
|
1383
|
-
}, Ie = (
|
|
1564
|
+
}, ee = (f, C, I) => {
|
|
1565
|
+
l("row-click", { row: f, column: C, event: I }), n.highlightCurrentRow && v && v.setCurrentRow(f);
|
|
1566
|
+
}, Ce = (f, C, I) => {
|
|
1567
|
+
I.stopPropagation(), v && v.toggleRowSelection(C, f);
|
|
1568
|
+
}, Ue = (f, C) => {
|
|
1569
|
+
C.stopPropagation(), v && v.toggleAllSelection();
|
|
1570
|
+
}, Se = (f, C) => {
|
|
1571
|
+
f && (a.value[C] = f);
|
|
1572
|
+
}, Ie = (f, C) => {
|
|
1384
1573
|
const I = C.width || N();
|
|
1385
|
-
E(
|
|
1386
|
-
|
|
1387
|
-
column: { ...C, width:
|
|
1388
|
-
width:
|
|
1574
|
+
E(f, C, N, (T) => {
|
|
1575
|
+
S(C.prop, { width: T }), l("column-resize", {
|
|
1576
|
+
column: { ...C, width: T },
|
|
1577
|
+
width: T,
|
|
1389
1578
|
oldWidth: I
|
|
1390
1579
|
});
|
|
1391
1580
|
});
|
|
1392
|
-
},
|
|
1581
|
+
}, qe = (f, C) => B(f, C, L, N), Xe = (f, C) => G(f, C, L, N), Ge = (f, C) => y(f, C, L, N), Ke = (f, C) => {
|
|
1393
1582
|
if (!C || !C.prop) return "";
|
|
1394
|
-
const I =
|
|
1583
|
+
const I = f[C.prop];
|
|
1395
1584
|
return I == null ? "" : String(I);
|
|
1396
|
-
},
|
|
1397
|
-
if (!n.showSummary || !
|
|
1398
|
-
const
|
|
1585
|
+
}, Ye = x(() => {
|
|
1586
|
+
if (!n.showSummary || !b.value) return {};
|
|
1587
|
+
const f = i;
|
|
1399
1588
|
if (typeof n.summaryMethod == "function") {
|
|
1400
|
-
const C = n.summaryMethod({ columns:
|
|
1401
|
-
return
|
|
1402
|
-
(I,
|
|
1589
|
+
const C = n.summaryMethod({ columns: f, data: $.value });
|
|
1590
|
+
return f.reduce(
|
|
1591
|
+
(I, T, P) => (I[T.prop] = C[P], I),
|
|
1403
1592
|
{}
|
|
1404
1593
|
);
|
|
1405
1594
|
}
|
|
1406
|
-
return
|
|
1595
|
+
return f.reduce(
|
|
1407
1596
|
(C, I) => {
|
|
1408
|
-
const
|
|
1409
|
-
return C[I.prop] =
|
|
1597
|
+
const T = $.value.map((P) => P[I.prop]);
|
|
1598
|
+
return C[I.prop] = T.every((P) => typeof P == "number") ? T.reduce((P, de) => P + de, 0) : "", C;
|
|
1410
1599
|
},
|
|
1411
1600
|
{}
|
|
1412
1601
|
);
|
|
1413
|
-
}),
|
|
1414
|
-
|
|
1415
|
-
}, Qe = () => {
|
|
1416
|
-
m && m.toggleAllSelection();
|
|
1602
|
+
}), Je = x(() => n.showSummary && b.value), Qe = (f, C) => {
|
|
1603
|
+
v && v.toggleRowSelection(f, C);
|
|
1417
1604
|
}, et = () => {
|
|
1418
|
-
|
|
1605
|
+
v && v.toggleAllSelection();
|
|
1419
1606
|
}, tt = () => {
|
|
1420
|
-
|
|
1421
|
-
}, nt = () =>
|
|
1422
|
-
|
|
1607
|
+
v && v.selectAbsolutelyAll();
|
|
1608
|
+
}, nt = () => {
|
|
1609
|
+
v && v.clearSelection();
|
|
1610
|
+
}, ot = () => v ? v.getSelectionRows() : [], lt = (f) => {
|
|
1611
|
+
v && v.setSelectionRows(f);
|
|
1423
1612
|
};
|
|
1424
1613
|
return ve(() => {
|
|
1425
1614
|
Q();
|
|
1426
|
-
}),
|
|
1427
|
-
toggleRowSelection:
|
|
1428
|
-
toggleAllSelection:
|
|
1429
|
-
selectAbsolutelyAll:
|
|
1430
|
-
clearSelection:
|
|
1431
|
-
getSelectionRows:
|
|
1432
|
-
setSelectionRows:
|
|
1433
|
-
resetInfinityScroll:
|
|
1615
|
+
}), e({
|
|
1616
|
+
toggleRowSelection: Qe,
|
|
1617
|
+
toggleAllSelection: et,
|
|
1618
|
+
selectAbsolutelyAll: tt,
|
|
1619
|
+
clearSelection: nt,
|
|
1620
|
+
getSelectionRows: ot,
|
|
1621
|
+
setSelectionRows: lt,
|
|
1622
|
+
resetInfinityScroll: _
|
|
1434
1623
|
// Додаємо метод для скидання infinity scroll
|
|
1435
|
-
}), (
|
|
1436
|
-
var
|
|
1437
|
-
const I =
|
|
1438
|
-
return p(),
|
|
1624
|
+
}), (f, C) => {
|
|
1625
|
+
var T, P, de, fe;
|
|
1626
|
+
const I = Fe("tooltip");
|
|
1627
|
+
return p(), m("div", {
|
|
1439
1628
|
ref_key: "tableWrapperRef",
|
|
1440
|
-
ref:
|
|
1629
|
+
ref: r,
|
|
1441
1630
|
class: "vt-table-wrapper",
|
|
1442
|
-
style:
|
|
1631
|
+
style: re(q(W)()),
|
|
1443
1632
|
onScroll: d
|
|
1444
1633
|
}, [
|
|
1445
|
-
pe(
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
n.selectable ? (p(),
|
|
1634
|
+
pe(f.$slots, "default"),
|
|
1635
|
+
h("table", Wo, [
|
|
1636
|
+
h("thead", null, [
|
|
1637
|
+
h("tr", null, [
|
|
1638
|
+
n.selectable ? (p(), m("th", {
|
|
1450
1639
|
key: 0,
|
|
1451
|
-
class:
|
|
1640
|
+
class: z(["vt-table__th vt-table__th--selection", {
|
|
1452
1641
|
"vt-table__th--sticky": n.maxHeight,
|
|
1453
1642
|
"vt-table__th--pinned-left": !0
|
|
1454
1643
|
}]),
|
|
1455
|
-
style:
|
|
1644
|
+
style: re(R())
|
|
1456
1645
|
}, [
|
|
1457
|
-
|
|
1646
|
+
h("div", Do, [
|
|
1458
1647
|
Z(ue, {
|
|
1459
|
-
checked: (
|
|
1460
|
-
indeterminate: (P =
|
|
1461
|
-
"is-double": (fe = (de =
|
|
1462
|
-
onChange:
|
|
1648
|
+
checked: (T = q(v)) == null ? void 0 : T.isAllSelected.value,
|
|
1649
|
+
indeterminate: (P = q(v)) == null ? void 0 : P.isIndeterminate.value,
|
|
1650
|
+
"is-double": (fe = (de = q(v)) == null ? void 0 : de.isDoubleCheck) == null ? void 0 : fe.value,
|
|
1651
|
+
onChange: Ue
|
|
1463
1652
|
}, null, 8, ["checked", "indeterminate", "is-double"])
|
|
1464
1653
|
])
|
|
1465
|
-
], 6)) :
|
|
1466
|
-
(p(!0),
|
|
1467
|
-
key:
|
|
1654
|
+
], 6)) : D("", !0),
|
|
1655
|
+
(p(!0), m(ne, null, oe(q(U), (w, ce) => (p(), m("th", {
|
|
1656
|
+
key: w.prop,
|
|
1468
1657
|
ref_for: !0,
|
|
1469
|
-
ref: (se) =>
|
|
1470
|
-
style:
|
|
1471
|
-
class:
|
|
1658
|
+
ref: (se) => Se(se, w.prop),
|
|
1659
|
+
style: re(Xe(w, ce)),
|
|
1660
|
+
class: z([
|
|
1472
1661
|
"vt-table__th",
|
|
1473
1662
|
{
|
|
1474
1663
|
"vt-table__th--sticky": n.maxHeight,
|
|
1475
|
-
"vt-table__th--pinned-left":
|
|
1476
|
-
"vt-table__th--pinned-right":
|
|
1477
|
-
"vt-table__th--sortable":
|
|
1664
|
+
"vt-table__th--pinned-left": w.pinnedLeft,
|
|
1665
|
+
"vt-table__th--pinned-right": w.pinnedRight,
|
|
1666
|
+
"vt-table__th--sortable": w.sortable
|
|
1478
1667
|
}
|
|
1479
1668
|
])
|
|
1480
1669
|
}, [
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1670
|
+
h("div", Po, [
|
|
1671
|
+
h("div", Ao, te(w.label), 1),
|
|
1672
|
+
w.sortable ? (p(), m("div", Oo, [
|
|
1484
1673
|
Z(Y, {
|
|
1485
1674
|
name: "arrowTop",
|
|
1486
|
-
class:
|
|
1487
|
-
onClick:
|
|
1675
|
+
class: z(q(Ee)(w, u.value).asc),
|
|
1676
|
+
onClick: he((se) => g(w, "asc"), ["stop"])
|
|
1488
1677
|
}, null, 8, ["class", "onClick"]),
|
|
1489
1678
|
Z(Y, {
|
|
1490
1679
|
name: "arrowDown",
|
|
1491
|
-
class:
|
|
1492
|
-
onClick:
|
|
1680
|
+
class: z(q(Ee)(w, u.value).desc),
|
|
1681
|
+
onClick: he((se) => g(w, "desc"), ["stop"])
|
|
1493
1682
|
}, null, 8, ["class", "onClick"])
|
|
1494
|
-
])) :
|
|
1495
|
-
|
|
1683
|
+
])) : D("", !0),
|
|
1684
|
+
w.actionColumn ? (p(), ae(Ho, {
|
|
1496
1685
|
key: 1,
|
|
1497
|
-
column:
|
|
1498
|
-
"all-columns": U
|
|
1686
|
+
column: w,
|
|
1687
|
+
"all-columns": q(U),
|
|
1499
1688
|
columnsSelector: n.columnsSelector,
|
|
1500
|
-
onPin:
|
|
1501
|
-
onUpdateColumns:
|
|
1502
|
-
}, null, 8, ["column", "all-columns", "columnsSelector"])) :
|
|
1689
|
+
onPin: k,
|
|
1690
|
+
onUpdateColumns: V
|
|
1691
|
+
}, null, 8, ["column", "all-columns", "columnsSelector"])) : D("", !0)
|
|
1503
1692
|
]),
|
|
1504
|
-
|
|
1693
|
+
h("div", {
|
|
1505
1694
|
class: "vt-table__resizer",
|
|
1506
|
-
"data-resizer":
|
|
1507
|
-
onMousedown: (se) => Ie(se,
|
|
1508
|
-
}, null, 40,
|
|
1695
|
+
"data-resizer": w.prop,
|
|
1696
|
+
onMousedown: (se) => Ie(se, w)
|
|
1697
|
+
}, null, 40, jo)
|
|
1509
1698
|
], 6))), 128))
|
|
1510
1699
|
])
|
|
1511
1700
|
]),
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
var se,
|
|
1515
|
-
return p(),
|
|
1516
|
-
key:
|
|
1517
|
-
class:
|
|
1701
|
+
h("tbody", null, [
|
|
1702
|
+
b.value ? (p(!0), m(ne, { key: 1 }, oe($.value, (w, ce) => {
|
|
1703
|
+
var se, Ve, Be;
|
|
1704
|
+
return p(), m("tr", {
|
|
1705
|
+
key: w.id,
|
|
1706
|
+
class: z([
|
|
1518
1707
|
"vt-table__row",
|
|
1519
1708
|
{
|
|
1520
|
-
"vt-table__row--selected": (se =
|
|
1521
|
-
"vt-table__row--current": ((
|
|
1709
|
+
"vt-table__row--selected": (se = q(v)) == null ? void 0 : se.isRowSelected(w),
|
|
1710
|
+
"vt-table__row--current": ((Ve = q(v)) == null ? void 0 : Ve.currentRow.value) === w,
|
|
1522
1711
|
"vt-table__row--clickable": n.selectOnClickRow || n.highlightCurrentRow
|
|
1523
1712
|
}
|
|
1524
1713
|
]),
|
|
1525
|
-
onClick: (
|
|
1714
|
+
onClick: (j) => ee(w, q(U)[0], j)
|
|
1526
1715
|
}, [
|
|
1527
|
-
n.selectable ? (p(),
|
|
1716
|
+
n.selectable ? (p(), m("td", {
|
|
1528
1717
|
key: 0,
|
|
1529
|
-
class:
|
|
1718
|
+
class: z(["vt-table__td vt-table__td--selection", {
|
|
1530
1719
|
"vt-table__td--pinned-left": !0
|
|
1531
1720
|
}]),
|
|
1532
|
-
style:
|
|
1721
|
+
style: re(O())
|
|
1533
1722
|
}, [
|
|
1534
|
-
|
|
1723
|
+
h("div", qo, [
|
|
1535
1724
|
Z(ue, {
|
|
1536
|
-
checked: (
|
|
1537
|
-
onChange: (
|
|
1725
|
+
checked: (Be = q(v)) == null ? void 0 : Be.isRowSelected(w),
|
|
1726
|
+
onChange: (j, we) => Ce(j, w, we)
|
|
1538
1727
|
}, null, 8, ["checked", "onChange"])
|
|
1539
1728
|
])
|
|
1540
|
-
], 4)) :
|
|
1541
|
-
(p(!0),
|
|
1542
|
-
key:
|
|
1729
|
+
], 4)) : D("", !0),
|
|
1730
|
+
(p(!0), m(ne, null, oe(q(U), (j, we) => (p(), m("td", {
|
|
1731
|
+
key: j.prop,
|
|
1543
1732
|
ref_for: !0,
|
|
1544
|
-
ref: (
|
|
1545
|
-
style:
|
|
1546
|
-
class:
|
|
1733
|
+
ref: (ke) => Se(ke, j.prop),
|
|
1734
|
+
style: re(qe(j, we)),
|
|
1735
|
+
class: z([
|
|
1547
1736
|
"vt-table__td",
|
|
1548
1737
|
{
|
|
1549
|
-
"vt-table__td--pinned-left":
|
|
1550
|
-
"vt-table__td--pinned-right":
|
|
1738
|
+
"vt-table__td--pinned-left": j.pinnedLeft,
|
|
1739
|
+
"vt-table__td--pinned-right": j.pinnedRight
|
|
1551
1740
|
}
|
|
1552
1741
|
])
|
|
1553
1742
|
}, [
|
|
1554
|
-
|
|
1555
|
-
|
|
1743
|
+
Le((p(), m("div", Xo, [
|
|
1744
|
+
j.renderSlot ? (p(), ae(Oe(() => q(Co)(j.renderSlot, { row: w, column: j, value: w[j.prop], index: ce })), { key: 0 })) : (p(), m("span", Go, te(w[j.prop]), 1))
|
|
1556
1745
|
])), [
|
|
1557
|
-
[I,
|
|
1746
|
+
[I, j.showOverflowTooltip ? Ke(w, j) : null]
|
|
1558
1747
|
]),
|
|
1559
|
-
|
|
1748
|
+
h("div", {
|
|
1560
1749
|
class: "vt-table__resizer",
|
|
1561
|
-
"data-resizer":
|
|
1562
|
-
onMousedown: (
|
|
1563
|
-
}, null, 40,
|
|
1750
|
+
"data-resizer": j.prop,
|
|
1751
|
+
onMousedown: (ke) => Ie(ke, j)
|
|
1752
|
+
}, null, 40, Ko)
|
|
1564
1753
|
], 6))), 128))
|
|
1565
|
-
], 10,
|
|
1566
|
-
}), 128)) : (p(),
|
|
1567
|
-
|
|
1568
|
-
colspan: U
|
|
1754
|
+
], 10, Uo);
|
|
1755
|
+
}), 128)) : (p(), m("tr", Fo, [
|
|
1756
|
+
h("td", {
|
|
1757
|
+
colspan: q(U).length + (n.selectable ? 1 : 0),
|
|
1569
1758
|
class: "vt-table__empty-cell"
|
|
1570
1759
|
}, [
|
|
1571
|
-
|
|
1760
|
+
h("div", Zo, [
|
|
1572
1761
|
Z(Y, {
|
|
1573
1762
|
name: "empty",
|
|
1574
1763
|
class: "vt-table__empty-icon"
|
|
1575
1764
|
}),
|
|
1576
|
-
C[0] || (C[0] =
|
|
1765
|
+
C[0] || (C[0] = h("span", { class: "vt-table__empty-text" }, "Немає даних!", -1))
|
|
1577
1766
|
])
|
|
1578
|
-
], 8,
|
|
1767
|
+
], 8, No)
|
|
1579
1768
|
]))
|
|
1580
1769
|
]),
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
n.selectable ? (p(),
|
|
1770
|
+
Je.value ? (p(), m("tfoot", Yo, [
|
|
1771
|
+
h("tr", null, [
|
|
1772
|
+
n.selectable ? (p(), m("td", {
|
|
1584
1773
|
key: 0,
|
|
1585
|
-
class:
|
|
1774
|
+
class: z(["vt-table__td", {
|
|
1586
1775
|
"vt-table__td--pinned-left": !0
|
|
1587
1776
|
}]),
|
|
1588
|
-
style:
|
|
1777
|
+
style: re(K())
|
|
1589
1778
|
}, C[1] || (C[1] = [
|
|
1590
|
-
|
|
1591
|
-
]), 4)) :
|
|
1592
|
-
(p(!0),
|
|
1593
|
-
key:
|
|
1594
|
-
style:
|
|
1595
|
-
class:
|
|
1779
|
+
h("div", { class: "vt-table__cell-content vt-table__cell-content--summary" }, null, -1)
|
|
1780
|
+
]), 4)) : D("", !0),
|
|
1781
|
+
(p(!0), m(ne, null, oe(q(U), (w, ce) => (p(), m("td", {
|
|
1782
|
+
key: w.prop,
|
|
1783
|
+
style: re(Ge(w, ce)),
|
|
1784
|
+
class: z([
|
|
1596
1785
|
"vt-table__td",
|
|
1597
1786
|
{
|
|
1598
|
-
"vt-table__td--pinned-left":
|
|
1599
|
-
"vt-table__td--pinned-right":
|
|
1787
|
+
"vt-table__td--pinned-left": w.pinnedLeft,
|
|
1788
|
+
"vt-table__td--pinned-right": w.pinnedRight
|
|
1600
1789
|
}
|
|
1601
1790
|
])
|
|
1602
1791
|
}, [
|
|
1603
|
-
|
|
1792
|
+
h("div", Jo, te(Ye.value[w.prop]), 1)
|
|
1604
1793
|
], 6))), 128))
|
|
1605
1794
|
])
|
|
1606
|
-
])) :
|
|
1795
|
+
])) : D("", !0)
|
|
1607
1796
|
])
|
|
1608
1797
|
], 36);
|
|
1609
1798
|
};
|
|
1610
1799
|
}
|
|
1611
|
-
}),
|
|
1800
|
+
}), el = /* @__PURE__ */ le({
|
|
1612
1801
|
__name: "VTableColumn",
|
|
1613
1802
|
props: {
|
|
1614
1803
|
prop: {},
|
|
@@ -1625,69 +1814,69 @@ const ae = new Dn(), An = {
|
|
|
1625
1814
|
renderSlot: {},
|
|
1626
1815
|
sortMethod: {}
|
|
1627
1816
|
},
|
|
1628
|
-
setup(
|
|
1629
|
-
const
|
|
1817
|
+
setup(t) {
|
|
1818
|
+
const e = t, o = je(), n = pt("vt-table-columns");
|
|
1630
1819
|
n || console.error(
|
|
1631
1820
|
"VTableColumn: не знайдено контекст таблиці. Переконайтеся, що компонент використовується всередині VTable."
|
|
1632
1821
|
);
|
|
1633
1822
|
const s = () => ({
|
|
1634
|
-
prop:
|
|
1635
|
-
label:
|
|
1636
|
-
width:
|
|
1637
|
-
minWidth:
|
|
1638
|
-
maxWidth:
|
|
1639
|
-
sortable:
|
|
1640
|
-
pinnedLeft:
|
|
1641
|
-
pinnedRight:
|
|
1642
|
-
actionColumn:
|
|
1643
|
-
showOverflowTooltip:
|
|
1644
|
-
selectable:
|
|
1823
|
+
prop: e.prop,
|
|
1824
|
+
label: e.label,
|
|
1825
|
+
width: e.width,
|
|
1826
|
+
minWidth: e.minWidth,
|
|
1827
|
+
maxWidth: e.maxWidth,
|
|
1828
|
+
sortable: e.sortable,
|
|
1829
|
+
pinnedLeft: e.pinnedLeft,
|
|
1830
|
+
pinnedRight: e.pinnedRight,
|
|
1831
|
+
actionColumn: e.actionColumn,
|
|
1832
|
+
showOverflowTooltip: e.showOverflowTooltip,
|
|
1833
|
+
selectable: e.selectable,
|
|
1645
1834
|
// Зберігаємо слот - пріоритет: назва колонки -> default -> slot
|
|
1646
|
-
renderSlot: o[
|
|
1835
|
+
renderSlot: o[e.prop] ?? o.default ?? o.slot
|
|
1647
1836
|
});
|
|
1648
1837
|
let l = -1;
|
|
1649
1838
|
return ve(() => {
|
|
1650
1839
|
if (n) {
|
|
1651
|
-
const
|
|
1652
|
-
n.push(
|
|
1840
|
+
const a = s();
|
|
1841
|
+
n.push(a), l = n.length - 1;
|
|
1653
1842
|
}
|
|
1654
|
-
}),
|
|
1843
|
+
}), me(
|
|
1655
1844
|
() => [
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1845
|
+
e.width,
|
|
1846
|
+
e.minWidth,
|
|
1847
|
+
e.maxWidth,
|
|
1848
|
+
e.sortable,
|
|
1849
|
+
e.pinnedLeft,
|
|
1850
|
+
e.pinnedRight,
|
|
1851
|
+
e.actionColumn,
|
|
1852
|
+
e.showOverflowTooltip,
|
|
1853
|
+
e.selectable,
|
|
1854
|
+
e.label
|
|
1666
1855
|
],
|
|
1667
1856
|
() => {
|
|
1668
1857
|
if (n && l !== -1) {
|
|
1669
|
-
const
|
|
1670
|
-
if (
|
|
1671
|
-
const
|
|
1858
|
+
const a = n.findIndex((r) => r.prop === e.prop);
|
|
1859
|
+
if (a !== -1) {
|
|
1860
|
+
const r = n[a], i = {
|
|
1672
1861
|
...s(),
|
|
1673
|
-
renderSlot:
|
|
1862
|
+
renderSlot: r.renderSlot
|
|
1674
1863
|
// Зберігаємо існуючий renderSlot
|
|
1675
1864
|
};
|
|
1676
|
-
n[
|
|
1865
|
+
n[a] = i;
|
|
1677
1866
|
}
|
|
1678
1867
|
}
|
|
1679
1868
|
},
|
|
1680
1869
|
{ deep: !0 }
|
|
1681
1870
|
), $e(() => {
|
|
1682
1871
|
if (n) {
|
|
1683
|
-
const
|
|
1684
|
-
|
|
1872
|
+
const a = n.findIndex((r) => r.prop === e.prop);
|
|
1873
|
+
a > -1 && n.splice(a, 1);
|
|
1685
1874
|
}
|
|
1686
|
-
}), (
|
|
1875
|
+
}), (a, r) => null;
|
|
1687
1876
|
}
|
|
1688
|
-
}),
|
|
1877
|
+
}), ze = (t, e) => {
|
|
1689
1878
|
const o = document.createElement("div");
|
|
1690
|
-
o.className = `vt-tooltip vt-tooltip--${
|
|
1879
|
+
o.className = `vt-tooltip vt-tooltip--${e}`, o.innerText = t, Object.assign(o.style, {
|
|
1691
1880
|
position: "absolute",
|
|
1692
1881
|
background: "rgba(0, 0, 0, 0.8)",
|
|
1693
1882
|
color: "white",
|
|
@@ -1705,14 +1894,14 @@ const ae = new Dn(), An = {
|
|
|
1705
1894
|
wordWrap: "break-word",
|
|
1706
1895
|
whiteSpace: "normal",
|
|
1707
1896
|
boxShadow: "0 2px 8px rgba(0, 0, 0, 0.2)"
|
|
1708
|
-
}),
|
|
1897
|
+
}), t.length < 50 && (o.style.whiteSpace = "nowrap");
|
|
1709
1898
|
const n = document.createElement("div");
|
|
1710
1899
|
switch (n.className = "vt-tooltip__arrow", Object.assign(n.style, {
|
|
1711
1900
|
position: "absolute",
|
|
1712
1901
|
width: "0",
|
|
1713
1902
|
height: "0",
|
|
1714
1903
|
borderStyle: "solid"
|
|
1715
|
-
}),
|
|
1904
|
+
}), e) {
|
|
1716
1905
|
case "top":
|
|
1717
1906
|
Object.assign(n.style, {
|
|
1718
1907
|
top: "100%",
|
|
@@ -1751,86 +1940,86 @@ const ae = new Dn(), An = {
|
|
|
1751
1940
|
break;
|
|
1752
1941
|
}
|
|
1753
1942
|
return o.appendChild(n), o;
|
|
1754
|
-
},
|
|
1755
|
-
const n =
|
|
1756
|
-
let
|
|
1943
|
+
}, Me = (t, e, o) => {
|
|
1944
|
+
const n = e.getBoundingClientRect(), s = t.getBoundingClientRect(), l = window.pageXOffset || document.documentElement.scrollLeft, a = window.pageYOffset || document.documentElement.scrollTop;
|
|
1945
|
+
let r = 0, i = 0;
|
|
1757
1946
|
switch (o) {
|
|
1758
1947
|
case "top":
|
|
1759
|
-
|
|
1948
|
+
r = n.top + a - s.height - 8, i = n.left + l + (n.width - s.width) / 2;
|
|
1760
1949
|
break;
|
|
1761
1950
|
case "bottom":
|
|
1762
|
-
|
|
1951
|
+
r = n.bottom + a + 8, i = n.left + l + (n.width - s.width) / 2;
|
|
1763
1952
|
break;
|
|
1764
1953
|
case "left":
|
|
1765
|
-
|
|
1954
|
+
r = n.top + a + (n.height - s.height) / 2, i = n.left + l - s.width - 8;
|
|
1766
1955
|
break;
|
|
1767
1956
|
case "right":
|
|
1768
|
-
|
|
1957
|
+
r = n.top + a + (n.height - s.height) / 2, i = n.right + l + 8;
|
|
1769
1958
|
break;
|
|
1770
1959
|
}
|
|
1771
1960
|
const u = window.innerWidth, c = window.innerHeight;
|
|
1772
|
-
|
|
1773
|
-
},
|
|
1774
|
-
|
|
1775
|
-
|
|
1961
|
+
i < 8 ? i = 8 : i + s.width > u - 8 && (i = u - s.width - 8), r < a + 8 ? o === "top" ? r = n.bottom + a + 8 : r = a + 8 : r + s.height > a + c - 8 && (o === "bottom" ? r = n.top + a - s.height - 8 : r = a + c - s.height - 8), t.style.top = `${r}px`, t.style.left = `${i}px`;
|
|
1962
|
+
}, He = (t, e, o) => {
|
|
1963
|
+
t.parentElement || document.body.appendChild(t), t.style.visibility = "visible", Me(t, e, o), requestAnimationFrame(() => {
|
|
1964
|
+
t.style.opacity = "1";
|
|
1776
1965
|
});
|
|
1777
|
-
},
|
|
1778
|
-
|
|
1779
|
-
},
|
|
1780
|
-
mounted(
|
|
1781
|
-
var
|
|
1782
|
-
const o = (
|
|
1966
|
+
}, We = (t) => {
|
|
1967
|
+
t.style.opacity = "0", t.style.visibility = "hidden";
|
|
1968
|
+
}, De = (t) => t.scrollWidth > t.clientWidth || t.scrollHeight > t.clientHeight, Pe = (t) => !!t.closest(".vt-table, table"), tl = {
|
|
1969
|
+
mounted(t, e) {
|
|
1970
|
+
var i;
|
|
1971
|
+
const o = (i = e.value) == null ? void 0 : i.trim();
|
|
1783
1972
|
if (!o) return;
|
|
1784
|
-
const n =
|
|
1785
|
-
|
|
1973
|
+
const n = t.dataset.placement || "top", s = ze(o, n);
|
|
1974
|
+
t.__tooltipEl = s;
|
|
1786
1975
|
const l = () => {
|
|
1787
|
-
(
|
|
1976
|
+
(Pe(t) ? De(t) : !0) && He(s, t, n);
|
|
1977
|
+
}, a = () => {
|
|
1978
|
+
We(s);
|
|
1788
1979
|
}, r = () => {
|
|
1789
|
-
|
|
1790
|
-
}, i = () => {
|
|
1791
|
-
s.style.opacity === "1" && Se(s, e, n);
|
|
1980
|
+
s.style.opacity === "1" && Me(s, t, n);
|
|
1792
1981
|
};
|
|
1793
|
-
|
|
1982
|
+
t.__mouseenterHandler = l, t.__mouseleaveHandler = a, t.__scrollHandler = r, t.addEventListener("mouseenter", l), t.addEventListener("mouseleave", a), window.addEventListener("scroll", r, !0), window.addEventListener("resize", r);
|
|
1794
1983
|
},
|
|
1795
|
-
updated(
|
|
1984
|
+
updated(t, e) {
|
|
1796
1985
|
var n;
|
|
1797
|
-
const o = (n =
|
|
1798
|
-
if (
|
|
1799
|
-
o ?
|
|
1986
|
+
const o = (n = e.value) == null ? void 0 : n.trim();
|
|
1987
|
+
if (t.__tooltipEl)
|
|
1988
|
+
o ? t.__tooltipEl.firstChild.textContent = o : (t.__tooltipEl.parentElement && t.__tooltipEl.parentElement.removeChild(t.__tooltipEl), delete t.__tooltipEl);
|
|
1800
1989
|
else if (o) {
|
|
1801
|
-
const s =
|
|
1802
|
-
|
|
1803
|
-
const
|
|
1804
|
-
(
|
|
1990
|
+
const s = t.dataset.placement || "top", l = ze(o, s);
|
|
1991
|
+
t.__tooltipEl = l;
|
|
1992
|
+
const a = () => {
|
|
1993
|
+
(Pe(t) ? De(t) : !0) && He(l, t, s);
|
|
1994
|
+
}, r = () => {
|
|
1995
|
+
We(l);
|
|
1805
1996
|
}, i = () => {
|
|
1806
|
-
|
|
1807
|
-
}, a = () => {
|
|
1808
|
-
l.style.opacity === "1" && Se(l, e, s);
|
|
1997
|
+
l.style.opacity === "1" && Me(l, t, s);
|
|
1809
1998
|
};
|
|
1810
|
-
|
|
1999
|
+
t.__mouseenterHandler = a, t.__mouseleaveHandler = r, t.__scrollHandler = i, t.addEventListener("mouseenter", a), t.addEventListener("mouseleave", r), window.addEventListener("scroll", i, !0), window.addEventListener("resize", i);
|
|
1811
2000
|
}
|
|
1812
2001
|
},
|
|
1813
|
-
beforeUnmount(
|
|
1814
|
-
|
|
2002
|
+
beforeUnmount(t) {
|
|
2003
|
+
t.__tooltipEl && t.__tooltipEl.parentElement && (t.__tooltipEl.parentElement.removeChild(t.__tooltipEl), delete t.__tooltipEl), t.__mouseenterHandler && (t.removeEventListener("mouseenter", t.__mouseenterHandler), delete t.__mouseenterHandler), t.__mouseleaveHandler && (t.removeEventListener("mouseleave", t.__mouseleaveHandler), delete t.__mouseleaveHandler), t.__scrollHandler && (window.removeEventListener("scroll", t.__scrollHandler, !0), window.removeEventListener("resize", t.__scrollHandler), delete t.__scrollHandler);
|
|
1815
2004
|
}
|
|
1816
|
-
},
|
|
1817
|
-
install(
|
|
1818
|
-
const { prefix: o = "V", modal: n = !0 } =
|
|
1819
|
-
|
|
2005
|
+
}, nl = {
|
|
2006
|
+
install(t, e = {}) {
|
|
2007
|
+
const { prefix: o = "V", modal: n = !0 } = e;
|
|
2008
|
+
t.component(`${o}Button`, ge), t.component(`${o}Icon`, Y), t.component(`${o}Loader`, Ne), t.component(`${o}Modal`, Ze), t.component(`${o}Pagination`, po), t.component(`${o}Checkbox`, ue), t.component(`${o}Table`, Qo), t.component(`${o}TableColumn`, el), t.directive("tooltip", tl), n && t.use(xo);
|
|
1820
2009
|
}
|
|
1821
|
-
},
|
|
2010
|
+
}, ll = nl.install;
|
|
1822
2011
|
export {
|
|
1823
2012
|
ge as VButton,
|
|
1824
2013
|
ue as VCheckbox,
|
|
1825
2014
|
Y as VIcon,
|
|
1826
2015
|
Ne as VLoader,
|
|
1827
2016
|
Ze as VModal,
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
2017
|
+
xo as VModalPlugin,
|
|
2018
|
+
po as VPagination,
|
|
2019
|
+
Qo as VTable,
|
|
2020
|
+
el as VTableColumn,
|
|
2021
|
+
nl as default,
|
|
2022
|
+
ll as install,
|
|
2023
|
+
ie as modalManager,
|
|
2024
|
+
tl as tooltipDirective
|
|
1836
2025
|
};
|