voiptime-components 1.0.17 → 1.0.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +123 -0
- package/dist/index.es.js +1068 -902
- package/dist/index.umd.js +1 -1
- package/package.json +1 -1
- package/src/assets/main.scss +1 -0
package/dist/index.es.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { createElementBlock as
|
|
2
|
-
const
|
|
1
|
+
import { createElementBlock as v, openBlock as p, createElementVNode as h, createStaticVNode as je, defineComponent as te, computed as S, createBlock as ne, createCommentVNode as W, resolveDynamicComponent as Ne, useSlots as $e, resolveDirective as Fe, withDirectives as Se, normalizeClass as z, renderSlot as de, Teleport as Ze, normalizeStyle as se, withModifiers as he, toDisplayString as ee, watch as ve, Fragment as re, renderList as ie, vModelSelect as pt, createVNode as F, withCtx as ue, createTextVNode as ge, ref as P, provide as Ye, onMounted as fe, onUnmounted as Ve, nextTick as ht, inject as Ue, createApp as mt, h as ye, mergeModels as Re, useModel as vt, reactive as ft, unref as X } from "vue";
|
|
2
|
+
const D = (t, e) => {
|
|
3
3
|
const o = t.__vccOpts || t;
|
|
4
|
-
for (const [n,
|
|
5
|
-
o[n] =
|
|
4
|
+
for (const [n, l] of e)
|
|
5
|
+
o[n] = l;
|
|
6
6
|
return o;
|
|
7
|
-
},
|
|
7
|
+
}, _t = {}, gt = {
|
|
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(),
|
|
14
|
+
function wt(t, e) {
|
|
15
|
+
return p(), v("svg", gt, e[0] || (e[0] = [
|
|
16
16
|
h("path", {
|
|
17
17
|
d: "M14 8L10 12L6 8",
|
|
18
18
|
stroke: "currentColor",
|
|
@@ -22,15 +22,15 @@ function kt(t, e) {
|
|
|
22
22
|
}, null, -1)
|
|
23
23
|
]));
|
|
24
24
|
}
|
|
25
|
-
const
|
|
25
|
+
const Ct = /* @__PURE__ */ D(_t, [["render", wt]]), kt = {}, bt = {
|
|
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(),
|
|
32
|
+
function yt(t, e) {
|
|
33
|
+
return p(), v("svg", bt, e[0] || (e[0] = [
|
|
34
34
|
h("path", {
|
|
35
35
|
d: "M6 12L10 8L14 12",
|
|
36
36
|
stroke: "currentColor",
|
|
@@ -40,15 +40,15 @@ function Mt(t, e) {
|
|
|
40
40
|
}, null, -1)
|
|
41
41
|
]));
|
|
42
42
|
}
|
|
43
|
-
const
|
|
43
|
+
const xt = /* @__PURE__ */ D(kt, [["render", yt]]), Mt = {}, Lt = {
|
|
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(),
|
|
50
|
+
function $t(t, e) {
|
|
51
|
+
return p(), v("svg", Lt, e[0] || (e[0] = [
|
|
52
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",
|
|
@@ -62,15 +62,15 @@ function It(t, e) {
|
|
|
62
62
|
}, null, -1)
|
|
63
63
|
]));
|
|
64
64
|
}
|
|
65
|
-
const
|
|
65
|
+
const St = /* @__PURE__ */ D(Mt, [["render", $t]]), Vt = {}, It = {
|
|
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(),
|
|
72
|
+
function Bt(t, e) {
|
|
73
|
+
return p(), v("svg", It, e[0] || (e[0] = [
|
|
74
74
|
h("path", {
|
|
75
75
|
d: "M8.60352 6L12.6035 10L8.60352 14",
|
|
76
76
|
stroke: "currentColor",
|
|
@@ -80,15 +80,15 @@ function Tt(t, e) {
|
|
|
80
80
|
}, null, -1)
|
|
81
81
|
]));
|
|
82
82
|
}
|
|
83
|
-
const
|
|
83
|
+
const Tt = /* @__PURE__ */ D(Vt, [["render", Bt]]), Et = {}, Rt = {
|
|
84
84
|
width: "21",
|
|
85
85
|
height: "20",
|
|
86
86
|
viewBox: "0 0 21 20",
|
|
87
87
|
fill: "none",
|
|
88
88
|
xmlns: "http://www.w3.org/2000/svg"
|
|
89
89
|
};
|
|
90
|
-
function
|
|
91
|
-
return p(),
|
|
90
|
+
function zt(t, e) {
|
|
91
|
+
return p(), v("svg", Rt, e[0] || (e[0] = [
|
|
92
92
|
h("path", {
|
|
93
93
|
d: "M12.3984 14L8.39844 10L12.3984 6",
|
|
94
94
|
stroke: "currentColor",
|
|
@@ -98,15 +98,15 @@ function Wt(t, e) {
|
|
|
98
98
|
}, null, -1)
|
|
99
99
|
]));
|
|
100
100
|
}
|
|
101
|
-
const
|
|
101
|
+
const Ht = /* @__PURE__ */ D(Et, [["render", zt]]), Wt = {}, Dt = {
|
|
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(),
|
|
108
|
+
function Pt(t, e) {
|
|
109
|
+
return p(), v("svg", Dt, e[0] || (e[0] = [
|
|
110
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",
|
|
@@ -116,15 +116,15 @@ function Ot(t, e) {
|
|
|
116
116
|
}, null, -1)
|
|
117
117
|
]));
|
|
118
118
|
}
|
|
119
|
-
const
|
|
119
|
+
const At = /* @__PURE__ */ D(Wt, [["render", Pt]]), Ot = {}, jt = {
|
|
120
120
|
width: "20",
|
|
121
121
|
height: "20",
|
|
122
122
|
viewBox: "0 0 20 20",
|
|
123
123
|
fill: "none",
|
|
124
124
|
xmlns: "http://www.w3.org/2000/svg"
|
|
125
125
|
};
|
|
126
|
-
function
|
|
127
|
-
return p(),
|
|
126
|
+
function Nt(t, e) {
|
|
127
|
+
return p(), v("svg", jt, e[0] || (e[0] = [
|
|
128
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",
|
|
@@ -140,15 +140,15 @@ function Zt(t, e) {
|
|
|
140
140
|
}, null, -1)
|
|
141
141
|
]));
|
|
142
142
|
}
|
|
143
|
-
const
|
|
143
|
+
const Ft = /* @__PURE__ */ D(Ot, [["render", Nt]]), Zt = {}, Yt = {
|
|
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(),
|
|
150
|
+
function Ut(t, e) {
|
|
151
|
+
return p(), v("svg", Yt, e[0] || (e[0] = [
|
|
152
152
|
h("path", {
|
|
153
153
|
d: "M8 3V5.2225M8 5.2225V10.7775M8 5.2225L9.875 4.25M8 5.2225L6.125 4.25M8 10.7775V13M8 10.7775L6.125 11.75M8 10.7775L9.875 11.75M13 8H10.7775M10.7775 8H5.2225M10.7775 8L11.75 9.875M10.7775 8L11.75 6.125M5.2225 8H3M5.2225 8L4.25 6.125M5.2225 8L4.25 9.875",
|
|
154
154
|
stroke: "currentColor",
|
|
@@ -164,15 +164,15 @@ function Xt(t, e) {
|
|
|
164
164
|
}, null, -1)
|
|
165
165
|
]));
|
|
166
166
|
}
|
|
167
|
-
const
|
|
167
|
+
const Xt = /* @__PURE__ */ D(Zt, [["render", Ut]]), Kt = {}, qt = {
|
|
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(),
|
|
174
|
+
function Gt(t, e) {
|
|
175
|
+
return p(), v("svg", qt, e[0] || (e[0] = [
|
|
176
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",
|
|
@@ -182,15 +182,15 @@ function Qt(t, e) {
|
|
|
182
182
|
}, null, -1)
|
|
183
183
|
]));
|
|
184
184
|
}
|
|
185
|
-
const
|
|
185
|
+
const Jt = /* @__PURE__ */ D(Kt, [["render", Gt]]), Qt = {}, en = {
|
|
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(),
|
|
192
|
+
function tn(t, e) {
|
|
193
|
+
return p(), v("svg", en, e[0] || (e[0] = [
|
|
194
194
|
h("path", {
|
|
195
195
|
"fill-rule": "evenodd",
|
|
196
196
|
"clip-rule": "evenodd",
|
|
@@ -205,15 +205,15 @@ function on(t, e) {
|
|
|
205
205
|
}, null, -1)
|
|
206
206
|
]));
|
|
207
207
|
}
|
|
208
|
-
const
|
|
208
|
+
const nn = /* @__PURE__ */ D(Qt, [["render", tn]]), on = {}, ln = {
|
|
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(),
|
|
215
|
+
function sn(t, e) {
|
|
216
|
+
return p(), v("svg", ln, e[0] || (e[0] = [
|
|
217
217
|
h("path", {
|
|
218
218
|
"fill-rule": "evenodd",
|
|
219
219
|
"clip-rule": "evenodd",
|
|
@@ -222,15 +222,15 @@ function an(t, e) {
|
|
|
222
222
|
}, null, -1)
|
|
223
223
|
]));
|
|
224
224
|
}
|
|
225
|
-
const
|
|
225
|
+
const rn = /* @__PURE__ */ D(on, [["render", sn]]), an = {}, cn = {
|
|
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(),
|
|
232
|
+
function dn(t, e) {
|
|
233
|
+
return p(), v("svg", cn, e[0] || (e[0] = [
|
|
234
234
|
h("path", {
|
|
235
235
|
"fill-rule": "evenodd",
|
|
236
236
|
"clip-rule": "evenodd",
|
|
@@ -239,15 +239,15 @@ function pn(t, e) {
|
|
|
239
239
|
}, null, -1)
|
|
240
240
|
]));
|
|
241
241
|
}
|
|
242
|
-
const
|
|
242
|
+
const un = /* @__PURE__ */ D(an, [["render", dn]]), pn = {}, hn = {
|
|
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(),
|
|
249
|
+
function mn(t, e) {
|
|
250
|
+
return p(), v("svg", hn, e[0] || (e[0] = [
|
|
251
251
|
h("path", {
|
|
252
252
|
d: "M6 14L10 10M10 10L14 6M10 10L6 6M10 10L14 14",
|
|
253
253
|
stroke: "currentColor",
|
|
@@ -257,15 +257,15 @@ function fn(t, e) {
|
|
|
257
257
|
}, null, -1)
|
|
258
258
|
]));
|
|
259
259
|
}
|
|
260
|
-
const
|
|
260
|
+
const vn = /* @__PURE__ */ D(pn, [["render", mn]]), fn = {}, _n = {
|
|
261
261
|
width: "20",
|
|
262
262
|
height: "20",
|
|
263
263
|
viewBox: "0 0 20 20",
|
|
264
264
|
fill: "none",
|
|
265
265
|
xmlns: "http://www.w3.org/2000/svg"
|
|
266
266
|
};
|
|
267
|
-
function
|
|
268
|
-
return p(),
|
|
267
|
+
function gn(t, e) {
|
|
268
|
+
return p(), v("svg", _n, e[0] || (e[0] = [
|
|
269
269
|
h("path", {
|
|
270
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
271
|
stroke: "currentColor",
|
|
@@ -275,15 +275,15 @@ function wn(t, e) {
|
|
|
275
275
|
}, null, -1)
|
|
276
276
|
]));
|
|
277
277
|
}
|
|
278
|
-
const
|
|
278
|
+
const wn = /* @__PURE__ */ D(fn, [["render", gn]]), Cn = {}, kn = {
|
|
279
279
|
width: "20",
|
|
280
280
|
height: "20",
|
|
281
281
|
viewBox: "0 0 20 20",
|
|
282
282
|
fill: "none",
|
|
283
283
|
xmlns: "http://www.w3.org/2000/svg"
|
|
284
284
|
};
|
|
285
|
-
function
|
|
286
|
-
return p(),
|
|
285
|
+
function bn(t, e) {
|
|
286
|
+
return p(), v("svg", kn, e[0] || (e[0] = [
|
|
287
287
|
h("path", {
|
|
288
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
289
|
stroke: "currentColor",
|
|
@@ -293,15 +293,15 @@ function xn(t, e) {
|
|
|
293
293
|
}, null, -1)
|
|
294
294
|
]));
|
|
295
295
|
}
|
|
296
|
-
const
|
|
296
|
+
const yn = /* @__PURE__ */ D(Cn, [["render", bn]]), xn = {}, Mn = {
|
|
297
297
|
width: "20",
|
|
298
298
|
height: "20",
|
|
299
299
|
viewBox: "0 0 20 20",
|
|
300
300
|
fill: "none",
|
|
301
301
|
xmlns: "http://www.w3.org/2000/svg"
|
|
302
302
|
};
|
|
303
|
-
function
|
|
304
|
-
return p(),
|
|
303
|
+
function Ln(t, e) {
|
|
304
|
+
return p(), v("svg", Mn, e[0] || (e[0] = [
|
|
305
305
|
h("path", {
|
|
306
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
307
|
stroke: "currentColor",
|
|
@@ -316,27 +316,27 @@ function Sn(t, e) {
|
|
|
316
316
|
}, null, -1)
|
|
317
317
|
]));
|
|
318
318
|
}
|
|
319
|
-
const
|
|
319
|
+
const $n = /* @__PURE__ */ D(xn, [["render", Ln]]), Sn = {}, Vn = {
|
|
320
320
|
width: "20",
|
|
321
321
|
height: "20",
|
|
322
322
|
viewBox: "0 0 20 20",
|
|
323
323
|
fill: "none",
|
|
324
324
|
xmlns: "http://www.w3.org/2000/svg"
|
|
325
325
|
};
|
|
326
|
-
function
|
|
327
|
-
return p(),
|
|
328
|
-
|
|
326
|
+
function In(t, e) {
|
|
327
|
+
return p(), v("svg", Vn, e[0] || (e[0] = [
|
|
328
|
+
je('<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
329
|
]));
|
|
330
330
|
}
|
|
331
|
-
const
|
|
331
|
+
const Bn = /* @__PURE__ */ D(Sn, [["render", In]]), Tn = {}, En = {
|
|
332
332
|
width: "20",
|
|
333
333
|
height: "20",
|
|
334
334
|
viewBox: "0 0 20 20",
|
|
335
335
|
fill: "none",
|
|
336
336
|
xmlns: "http://www.w3.org/2000/svg"
|
|
337
337
|
};
|
|
338
|
-
function
|
|
339
|
-
return p(),
|
|
338
|
+
function Rn(t, e) {
|
|
339
|
+
return p(), v("svg", En, e[0] || (e[0] = [
|
|
340
340
|
h("path", {
|
|
341
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
342
|
stroke: "currentColor",
|
|
@@ -346,15 +346,15 @@ function Hn(t, e) {
|
|
|
346
346
|
}, null, -1)
|
|
347
347
|
]));
|
|
348
348
|
}
|
|
349
|
-
const
|
|
349
|
+
const zn = /* @__PURE__ */ D(Tn, [["render", Rn]]), Hn = {}, Wn = {
|
|
350
350
|
width: "20",
|
|
351
351
|
height: "20",
|
|
352
352
|
viewBox: "0 0 20 20",
|
|
353
353
|
fill: "none",
|
|
354
354
|
xmlns: "http://www.w3.org/2000/svg"
|
|
355
355
|
};
|
|
356
|
-
function
|
|
357
|
-
return p(),
|
|
356
|
+
function Dn(t, e) {
|
|
357
|
+
return p(), v("svg", Wn, e[0] || (e[0] = [
|
|
358
358
|
h("path", {
|
|
359
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
360
|
stroke: "currentColor",
|
|
@@ -374,15 +374,15 @@ function An(t, e) {
|
|
|
374
374
|
}, null, -1)
|
|
375
375
|
]));
|
|
376
376
|
}
|
|
377
|
-
const
|
|
377
|
+
const Pn = /* @__PURE__ */ D(Hn, [["render", Dn]]), An = {}, On = {
|
|
378
378
|
width: "20",
|
|
379
379
|
height: "20",
|
|
380
380
|
viewBox: "0 0 20 20",
|
|
381
381
|
fill: "none",
|
|
382
382
|
xmlns: "http://www.w3.org/2000/svg"
|
|
383
383
|
};
|
|
384
|
-
function
|
|
385
|
-
return p(),
|
|
384
|
+
function jn(t, e) {
|
|
385
|
+
return p(), v("svg", On, e[0] || (e[0] = [
|
|
386
386
|
h("path", {
|
|
387
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
388
|
stroke: "currentColor",
|
|
@@ -399,27 +399,27 @@ function Fn(t, e) {
|
|
|
399
399
|
}, null, -1)
|
|
400
400
|
]));
|
|
401
401
|
}
|
|
402
|
-
const
|
|
402
|
+
const Nn = /* @__PURE__ */ D(An, [["render", jn]]), Fn = {}, Zn = {
|
|
403
403
|
width: "20",
|
|
404
404
|
height: "20",
|
|
405
405
|
viewBox: "0 0 20 20",
|
|
406
406
|
fill: "none",
|
|
407
407
|
xmlns: "http://www.w3.org/2000/svg"
|
|
408
408
|
};
|
|
409
|
-
function
|
|
410
|
-
return p(),
|
|
411
|
-
|
|
409
|
+
function Yn(t, e) {
|
|
410
|
+
return p(), v("svg", Zn, e[0] || (e[0] = [
|
|
411
|
+
je('<circle cx="4.5" cy="12.5" r="1.5" stroke="currentColor" stroke-width="1.5"></circle><circle cx="9.5" cy="8.5" r="1.5" transform="rotate(-180 9.5 8.5)" stroke="currentColor" stroke-width="1.5"></circle><circle cx="14.5" cy="12.5" r="1.5" stroke="currentColor" stroke-width="1.5"></circle><path d="M4.55469 10.5V2" stroke="currentColor" stroke-width="1.5"></path><path d="M9.44531 9.5L9.44531 18" stroke="currentColor" stroke-width="1.5"></path><path d="M14.5547 10.5V2" stroke="currentColor" stroke-width="1.5"></path><path d="M4.55469 18V15.5" stroke="currentColor" stroke-width="1.5"></path><path d="M9.44531 2L9.44531 5.5" stroke="currentColor" stroke-width="1.5"></path><path d="M14.5547 18V15.5" stroke="currentColor" stroke-width="1.5"></path>', 9)
|
|
412
412
|
]));
|
|
413
413
|
}
|
|
414
|
-
const
|
|
414
|
+
const Un = /* @__PURE__ */ D(Fn, [["render", Yn]]), Xn = {}, Kn = {
|
|
415
415
|
width: "20",
|
|
416
416
|
height: "20",
|
|
417
417
|
viewBox: "0 0 20 20",
|
|
418
418
|
fill: "none",
|
|
419
419
|
xmlns: "http://www.w3.org/2000/svg"
|
|
420
420
|
};
|
|
421
|
-
function
|
|
422
|
-
return p(),
|
|
421
|
+
function qn(t, e) {
|
|
422
|
+
return p(), v("svg", Kn, e[0] || (e[0] = [
|
|
423
423
|
h("path", {
|
|
424
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
425
|
stroke: "currentColor",
|
|
@@ -436,50 +436,50 @@ function Jn(t, e) {
|
|
|
436
436
|
}, null, -1)
|
|
437
437
|
]));
|
|
438
438
|
}
|
|
439
|
-
const
|
|
439
|
+
const Gn = /* @__PURE__ */ D(Xn, [["render", qn]]), Jn = {
|
|
440
440
|
// arrow icons
|
|
441
|
-
arrowDown:
|
|
442
|
-
arrowTop:
|
|
443
|
-
arrowRight:
|
|
444
|
-
arrowLeft:
|
|
445
|
-
arrowReload:
|
|
441
|
+
arrowDown: Ct,
|
|
442
|
+
arrowTop: xt,
|
|
443
|
+
arrowRight: Tt,
|
|
444
|
+
arrowLeft: Ht,
|
|
445
|
+
arrowReload: St,
|
|
446
446
|
// table icons
|
|
447
|
-
columnInsert:
|
|
448
|
-
freeze:
|
|
449
|
-
unfreeze:
|
|
450
|
-
columnsMove:
|
|
451
|
-
empty:
|
|
447
|
+
columnInsert: At,
|
|
448
|
+
freeze: Ft,
|
|
449
|
+
unfreeze: Xt,
|
|
450
|
+
columnsMove: nn,
|
|
451
|
+
empty: Jt,
|
|
452
452
|
// actions icons
|
|
453
|
-
listBullet:
|
|
454
|
-
listBulletHorizontal:
|
|
455
|
-
close:
|
|
453
|
+
listBullet: rn,
|
|
454
|
+
listBulletHorizontal: un,
|
|
455
|
+
close: vn,
|
|
456
456
|
// filter icons
|
|
457
|
-
filterSave:
|
|
458
|
-
filterReset:
|
|
459
|
-
filterNew:
|
|
460
|
-
filterMultiselect:
|
|
461
|
-
filterExchange:
|
|
462
|
-
filterEdit:
|
|
463
|
-
filterDateCheck:
|
|
464
|
-
filterAdvanced:
|
|
465
|
-
filterAdd:
|
|
466
|
-
},
|
|
457
|
+
filterSave: wn,
|
|
458
|
+
filterReset: yn,
|
|
459
|
+
filterNew: $n,
|
|
460
|
+
filterMultiselect: Bn,
|
|
461
|
+
filterExchange: zn,
|
|
462
|
+
filterEdit: Pn,
|
|
463
|
+
filterDateCheck: Nn,
|
|
464
|
+
filterAdvanced: Un,
|
|
465
|
+
filterAdd: Gn
|
|
466
|
+
}, G = /* @__PURE__ */ te({
|
|
467
467
|
__name: "VIcon",
|
|
468
468
|
props: {
|
|
469
469
|
name: {}
|
|
470
470
|
},
|
|
471
471
|
setup(t) {
|
|
472
|
-
const e = t, o =
|
|
473
|
-
return (n,
|
|
472
|
+
const e = t, o = S(() => Jn[e.name]);
|
|
473
|
+
return (n, l) => o.value ? (p(), ne(Ne(o.value), { key: 0 })) : W("", !0);
|
|
474
474
|
}
|
|
475
|
-
}),
|
|
476
|
-
function
|
|
477
|
-
return p(),
|
|
475
|
+
}), Qn = {}, eo = { class: "vt-loader" };
|
|
476
|
+
function to(t, e) {
|
|
477
|
+
return p(), v("span", eo);
|
|
478
478
|
}
|
|
479
|
-
const
|
|
479
|
+
const Xe = /* @__PURE__ */ D(Qn, [["render", to]]), no = ["disabled", "type", "data-placement"], oo = {
|
|
480
480
|
key: 2,
|
|
481
481
|
class: "vt-button__content"
|
|
482
|
-
},
|
|
482
|
+
}, we = /* @__PURE__ */ te({
|
|
483
483
|
__name: "VButton",
|
|
484
484
|
props: {
|
|
485
485
|
type: { default: "default" },
|
|
@@ -493,54 +493,54 @@ const Ke = /* @__PURE__ */ P(to, [["render", oo]]), lo = ["disabled", "type", "d
|
|
|
493
493
|
},
|
|
494
494
|
emits: ["click"],
|
|
495
495
|
setup(t, { emit: e }) {
|
|
496
|
-
const o = t, n = e,
|
|
497
|
-
var
|
|
498
|
-
const
|
|
499
|
-
return ((
|
|
500
|
-
}),
|
|
496
|
+
const o = t, n = e, l = $e(), s = S(() => !!(o.icon && o.shape)), i = S(() => {
|
|
497
|
+
var C, L;
|
|
498
|
+
const r = l.default ? l.default({}) : null;
|
|
499
|
+
return ((L = (C = r == null ? void 0 : r[0]) == null ? void 0 : C.children) == null ? void 0 : L.toString()) ?? "";
|
|
500
|
+
}), c = S(() => [
|
|
501
501
|
"vt-button",
|
|
502
502
|
`vt-button--${o.type}`,
|
|
503
503
|
{
|
|
504
504
|
[`vt-button--${o.shape}`]: o.shape,
|
|
505
|
-
"vt-button--icon-only":
|
|
505
|
+
"vt-button--icon-only": s.value,
|
|
506
506
|
"vt-button--disabled": o.disabled || o.loading,
|
|
507
507
|
"vt-button--loading": o.loading
|
|
508
508
|
}
|
|
509
|
-
]),
|
|
510
|
-
!o.disabled && !o.loading && n("click",
|
|
509
|
+
]), a = S(() => s.value && o.tooltip ? i.value : null), u = (r) => {
|
|
510
|
+
!o.disabled && !o.loading && n("click", r);
|
|
511
511
|
};
|
|
512
|
-
return (
|
|
513
|
-
const
|
|
514
|
-
return
|
|
515
|
-
class:
|
|
512
|
+
return (r, C) => {
|
|
513
|
+
const L = Fe("tooltip");
|
|
514
|
+
return Se((p(), v("button", {
|
|
515
|
+
class: z(c.value),
|
|
516
516
|
disabled: o.disabled || o.loading,
|
|
517
517
|
type: o.htmlType,
|
|
518
518
|
"data-placement": o.tooltipPlacement,
|
|
519
519
|
onClick: u
|
|
520
520
|
}, [
|
|
521
|
-
o.loading ? (p(),
|
|
521
|
+
o.loading ? (p(), ne(Xe, {
|
|
522
522
|
key: 0,
|
|
523
523
|
class: "vt-button__icon"
|
|
524
|
-
})) : o.icon ? (p(),
|
|
524
|
+
})) : o.icon ? (p(), ne(G, {
|
|
525
525
|
key: 1,
|
|
526
526
|
name: o.icon,
|
|
527
527
|
class: "vt-button__icon"
|
|
528
|
-
}, null, 8, ["name"])) :
|
|
529
|
-
|
|
530
|
-
|
|
528
|
+
}, null, 8, ["name"])) : W("", !0),
|
|
529
|
+
s.value ? W("", !0) : (p(), v("span", oo, [
|
|
530
|
+
de(r.$slots, "default")
|
|
531
531
|
]))
|
|
532
|
-
], 10,
|
|
533
|
-
[
|
|
532
|
+
], 10, no)), [
|
|
533
|
+
[L, a.value]
|
|
534
534
|
]);
|
|
535
535
|
};
|
|
536
536
|
}
|
|
537
|
-
}),
|
|
537
|
+
}), lo = {
|
|
538
538
|
key: 0,
|
|
539
539
|
class: "vt-modal__header"
|
|
540
|
-
},
|
|
540
|
+
}, so = {
|
|
541
541
|
key: 0,
|
|
542
542
|
class: "vt-modal__title"
|
|
543
|
-
},
|
|
543
|
+
}, ro = { class: "vt-modal__content" }, Ke = /* @__PURE__ */ te({
|
|
544
544
|
__name: "VModal",
|
|
545
545
|
props: {
|
|
546
546
|
modelValue: { type: Boolean },
|
|
@@ -552,42 +552,42 @@ const Ke = /* @__PURE__ */ P(to, [["render", oo]]), lo = ["disabled", "type", "d
|
|
|
552
552
|
},
|
|
553
553
|
emits: ["update:modelValue", "close"],
|
|
554
554
|
setup(t, { emit: e }) {
|
|
555
|
-
const o = t, n = e,
|
|
555
|
+
const o = t, n = e, l = S(() => ["vt-modal__container", `vt-modal__container--${o.size}`]), s = S(() => ({
|
|
556
556
|
zIndex: o.zIndex
|
|
557
|
-
})),
|
|
557
|
+
})), i = () => {
|
|
558
558
|
n("update:modelValue", !1), n("close");
|
|
559
|
-
},
|
|
560
|
-
o.closeOnBackdropClick &&
|
|
559
|
+
}, c = () => {
|
|
560
|
+
o.closeOnBackdropClick && i();
|
|
561
561
|
};
|
|
562
|
-
return (
|
|
563
|
-
|
|
562
|
+
return (a, u) => (p(), ne(Ze, { to: "body" }, [
|
|
563
|
+
a.modelValue ? (p(), v("div", {
|
|
564
564
|
key: 0,
|
|
565
565
|
class: "vt-modal__backdrop",
|
|
566
|
-
style:
|
|
567
|
-
onClick:
|
|
566
|
+
style: se(s.value),
|
|
567
|
+
onClick: c
|
|
568
568
|
}, [
|
|
569
569
|
h("div", {
|
|
570
|
-
class:
|
|
570
|
+
class: z(l.value),
|
|
571
571
|
onClick: u[0] || (u[0] = he(() => {
|
|
572
572
|
}, ["stop"]))
|
|
573
573
|
}, [
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
574
|
+
a.title || a.showCloseButton ? (p(), v("div", lo, [
|
|
575
|
+
a.title ? (p(), v("h2", so, ee(a.title), 1)) : W("", !0),
|
|
576
|
+
a.showCloseButton ? (p(), ne(G, {
|
|
577
577
|
key: 1,
|
|
578
578
|
name: "close",
|
|
579
579
|
class: "vt-modal__close",
|
|
580
|
-
onClick:
|
|
581
|
-
})) :
|
|
582
|
-
])) :
|
|
583
|
-
h("div",
|
|
584
|
-
|
|
580
|
+
onClick: i
|
|
581
|
+
})) : W("", !0)
|
|
582
|
+
])) : W("", !0),
|
|
583
|
+
h("div", ro, [
|
|
584
|
+
de(a.$slots, "default")
|
|
585
585
|
])
|
|
586
586
|
], 2)
|
|
587
|
-
], 4)) :
|
|
587
|
+
], 4)) : W("", !0)
|
|
588
588
|
]));
|
|
589
589
|
}
|
|
590
|
-
}),
|
|
590
|
+
}), io = { class: "vt-pagination" }, ao = { class: "vt-pagination__info" }, co = { class: "vt-pagination__rows-per-page" }, uo = ["value"], po = { class: "vt-pagination__navigation" }, ho = ["disabled"], mo = ["onClick"], vo = ["disabled"], fo = /* @__PURE__ */ te({
|
|
591
591
|
__name: "VPagination",
|
|
592
592
|
props: {
|
|
593
593
|
totalItems: {},
|
|
@@ -598,102 +598,102 @@ const Ke = /* @__PURE__ */ P(to, [["render", oo]]), lo = ["disabled", "type", "d
|
|
|
598
598
|
},
|
|
599
599
|
emits: ["update:currentPage", "update:pageSize", "pageChange", "reloadData"],
|
|
600
600
|
setup(t, { emit: e }) {
|
|
601
|
-
const o = t, n = e,
|
|
601
|
+
const o = t, n = e, l = S({
|
|
602
602
|
get: () => o.currentPage,
|
|
603
|
-
set: (
|
|
604
|
-
}),
|
|
603
|
+
set: (b) => n("update:currentPage", b)
|
|
604
|
+
}), s = S({
|
|
605
605
|
get: () => o.pageSize,
|
|
606
|
-
set: (
|
|
607
|
-
}),
|
|
608
|
-
const
|
|
609
|
-
if (
|
|
610
|
-
for (let
|
|
611
|
-
|
|
606
|
+
set: (b) => n("update:pageSize", b)
|
|
607
|
+
}), i = S(() => Math.ceil(o.totalItems / s.value)), c = S(() => o.totalItems === 0 ? 0 : (l.value - 1) * s.value + 1), a = S(() => Math.min(l.value * s.value, o.totalItems)), u = S(() => l.value <= 1), r = S(() => l.value >= i.value), C = S(() => {
|
|
608
|
+
const b = [], I = i.value, V = l.value, K = o.maxVisiblePages;
|
|
609
|
+
if (I <= K)
|
|
610
|
+
for (let q = 1; q <= I; q++)
|
|
611
|
+
b.push(q);
|
|
612
612
|
else {
|
|
613
|
-
|
|
614
|
-
const
|
|
615
|
-
|
|
616
|
-
for (let
|
|
617
|
-
|
|
618
|
-
|
|
613
|
+
b.push(1);
|
|
614
|
+
const q = Math.max(2, V - Math.floor(K / 2)), Q = Math.min(I - 1, V + Math.floor(K / 2));
|
|
615
|
+
q > 2 && b.push("...");
|
|
616
|
+
for (let U = q; U <= Q; U++)
|
|
617
|
+
b.push(U);
|
|
618
|
+
Q < I - 1 && b.push("..."), I > 1 && b.push(I);
|
|
619
619
|
}
|
|
620
|
-
return
|
|
621
|
-
}),
|
|
620
|
+
return b;
|
|
621
|
+
}), L = () => {
|
|
622
622
|
n("pageChange", {
|
|
623
|
-
page:
|
|
624
|
-
pageSize:
|
|
623
|
+
page: l.value,
|
|
624
|
+
pageSize: s.value
|
|
625
625
|
});
|
|
626
|
-
},
|
|
627
|
-
typeof
|
|
628
|
-
}, q = () => {
|
|
629
|
-
u.value || (s.value--, $());
|
|
630
|
-
}, U = () => {
|
|
631
|
-
c.value || (s.value++, $());
|
|
632
|
-
}, G = () => {
|
|
633
|
-
s.value = 1, $();
|
|
626
|
+
}, j = (b) => {
|
|
627
|
+
typeof b == "number" && b !== l.value && (l.value = b, L());
|
|
634
628
|
}, Y = () => {
|
|
635
|
-
|
|
629
|
+
u.value || (l.value--, L());
|
|
630
|
+
}, N = () => {
|
|
631
|
+
r.value || (l.value++, L());
|
|
632
|
+
}, R = () => {
|
|
633
|
+
l.value = 1, L();
|
|
634
|
+
}, A = () => {
|
|
635
|
+
n("reloadData", l.value);
|
|
636
636
|
};
|
|
637
|
-
return
|
|
637
|
+
return ve(
|
|
638
638
|
() => o.totalItems,
|
|
639
639
|
() => {
|
|
640
|
-
|
|
640
|
+
l.value > i.value && i.value > 0 && (l.value = i.value, L());
|
|
641
641
|
}
|
|
642
|
-
), (
|
|
643
|
-
h("div",
|
|
644
|
-
h("div",
|
|
645
|
-
|
|
642
|
+
), (b, I) => (p(), v("div", io, [
|
|
643
|
+
h("div", ao, [
|
|
644
|
+
h("div", co, [
|
|
645
|
+
I[1] || (I[1] = h("label", {
|
|
646
646
|
for: "rowsSelect",
|
|
647
647
|
class: "vt-pagination__label"
|
|
648
648
|
}, "Рядків на сторінку:", -1)),
|
|
649
|
-
|
|
649
|
+
Se(h("select", {
|
|
650
650
|
id: "rowsSelect",
|
|
651
|
-
"onUpdate:modelValue":
|
|
652
|
-
onChange:
|
|
651
|
+
"onUpdate:modelValue": I[0] || (I[0] = (V) => s.value = V),
|
|
652
|
+
onChange: R,
|
|
653
653
|
class: "vt-pagination__select"
|
|
654
654
|
}, [
|
|
655
|
-
(p(!0),
|
|
656
|
-
key:
|
|
657
|
-
value:
|
|
658
|
-
},
|
|
655
|
+
(p(!0), v(re, null, ie(b.pageSizeOptions, (V) => (p(), v("option", {
|
|
656
|
+
key: V,
|
|
657
|
+
value: V
|
|
658
|
+
}, ee(V), 9, uo))), 128))
|
|
659
659
|
], 544), [
|
|
660
|
-
[
|
|
660
|
+
[pt, s.value]
|
|
661
661
|
])
|
|
662
662
|
]),
|
|
663
|
-
h("span", null,
|
|
663
|
+
h("span", null, ee(c.value) + " - " + ee(a.value) + " з " + ee(b.totalItems), 1)
|
|
664
664
|
]),
|
|
665
|
-
h("div",
|
|
665
|
+
h("div", po, [
|
|
666
666
|
h("button", {
|
|
667
|
-
onClick:
|
|
667
|
+
onClick: Y,
|
|
668
668
|
disabled: u.value,
|
|
669
|
-
class:
|
|
669
|
+
class: z({ "vt-pagination__nav-button": !0, "has-items": !u.value })
|
|
670
670
|
}, [
|
|
671
|
-
F(
|
|
672
|
-
], 10,
|
|
673
|
-
(p(!0),
|
|
674
|
-
key:
|
|
675
|
-
onClick: (K) =>
|
|
676
|
-
class:
|
|
677
|
-
"vt-pagination__nav-button--active":
|
|
671
|
+
F(G, { name: "arrowLeft" })
|
|
672
|
+
], 10, ho),
|
|
673
|
+
(p(!0), v(re, null, ie(C.value, (V) => (p(), v("button", {
|
|
674
|
+
key: V,
|
|
675
|
+
onClick: (K) => j(V),
|
|
676
|
+
class: z(["vt-pagination__nav-button", {
|
|
677
|
+
"vt-pagination__nav-button--active": V === l.value
|
|
678
678
|
}])
|
|
679
|
-
},
|
|
679
|
+
}, ee(V), 11, mo))), 128)),
|
|
680
680
|
h("button", {
|
|
681
|
-
onClick:
|
|
682
|
-
disabled:
|
|
683
|
-
class:
|
|
681
|
+
onClick: N,
|
|
682
|
+
disabled: r.value,
|
|
683
|
+
class: z({ "vt-pagination__nav-button": !0, "has-items": !r.value })
|
|
684
684
|
}, [
|
|
685
|
-
F(
|
|
686
|
-
], 10,
|
|
685
|
+
F(G, { name: "arrowRight" })
|
|
686
|
+
], 10, vo)
|
|
687
687
|
]),
|
|
688
688
|
h("div", null, [
|
|
689
|
-
F(
|
|
689
|
+
F(we, {
|
|
690
690
|
icon: "arrowReload",
|
|
691
691
|
shape: "circle",
|
|
692
692
|
tooltip: "",
|
|
693
693
|
tooltipPlacement: "left",
|
|
694
|
-
onClick:
|
|
694
|
+
onClick: A
|
|
695
695
|
}, {
|
|
696
|
-
default:
|
|
696
|
+
default: ue(() => I[2] || (I[2] = [
|
|
697
697
|
ge("Оновити дані ", -1)
|
|
698
698
|
])),
|
|
699
699
|
_: 1,
|
|
@@ -702,7 +702,7 @@ const Ke = /* @__PURE__ */ P(to, [["render", oo]]), lo = ["disabled", "type", "d
|
|
|
702
702
|
])
|
|
703
703
|
]));
|
|
704
704
|
}
|
|
705
|
-
}),
|
|
705
|
+
}), _o = ["for"], go = ["id", "name", "value", "checked", "disabled", "required", ".indeterminate"], pe = /* @__PURE__ */ te({
|
|
706
706
|
__name: "VCheckbox",
|
|
707
707
|
props: {
|
|
708
708
|
modelValue: { type: Boolean, default: void 0 },
|
|
@@ -720,58 +720,58 @@ const Ke = /* @__PURE__ */ P(to, [["render", oo]]), lo = ["disabled", "type", "d
|
|
|
720
720
|
},
|
|
721
721
|
emits: ["update:modelValue", "change", "focus", "blur"],
|
|
722
722
|
setup(t, { emit: e }) {
|
|
723
|
-
const o = t, n = e,
|
|
723
|
+
const o = t, n = e, l = () => `vt-checkbox-${Math.random().toString(36).substr(2, 9)}`, s = S(() => o.id || l()), i = S(() => o.modelValue ?? o.checked), c = (r) => {
|
|
724
724
|
if (o.disabled) return;
|
|
725
|
-
const
|
|
726
|
-
n("update:modelValue",
|
|
727
|
-
},
|
|
728
|
-
n("focus",
|
|
729
|
-
}, u = (
|
|
730
|
-
n("blur",
|
|
725
|
+
const L = r.target.checked;
|
|
726
|
+
n("update:modelValue", L), n("change", L, r);
|
|
727
|
+
}, a = (r) => {
|
|
728
|
+
n("focus", r);
|
|
729
|
+
}, u = (r) => {
|
|
730
|
+
n("blur", r);
|
|
731
731
|
};
|
|
732
|
-
return (
|
|
733
|
-
class:
|
|
732
|
+
return (r, C) => (p(), v("label", {
|
|
733
|
+
class: z([
|
|
734
734
|
"vt-checkbox",
|
|
735
|
-
`vt-checkbox--${
|
|
736
|
-
`vt-checkbox--${
|
|
735
|
+
`vt-checkbox--${r.size}`,
|
|
736
|
+
`vt-checkbox--${r.variant}`,
|
|
737
737
|
{
|
|
738
|
-
"vt-checkbox--disabled":
|
|
739
|
-
"vt-checkbox--double":
|
|
738
|
+
"vt-checkbox--disabled": r.disabled,
|
|
739
|
+
"vt-checkbox--double": r.isDouble
|
|
740
740
|
}
|
|
741
741
|
]),
|
|
742
|
-
for:
|
|
742
|
+
for: s.value
|
|
743
743
|
}, [
|
|
744
744
|
h("input", {
|
|
745
|
-
id:
|
|
746
|
-
name:
|
|
747
|
-
value:
|
|
748
|
-
checked:
|
|
749
|
-
disabled:
|
|
750
|
-
required:
|
|
751
|
-
".indeterminate":
|
|
745
|
+
id: s.value,
|
|
746
|
+
name: r.name,
|
|
747
|
+
value: r.value,
|
|
748
|
+
checked: i.value,
|
|
749
|
+
disabled: r.disabled,
|
|
750
|
+
required: r.required,
|
|
751
|
+
".indeterminate": r.indeterminate,
|
|
752
752
|
type: "checkbox",
|
|
753
753
|
class: "vt-checkbox__input",
|
|
754
|
-
onChange:
|
|
755
|
-
onFocus:
|
|
754
|
+
onChange: c,
|
|
755
|
+
onFocus: a,
|
|
756
756
|
onBlur: u
|
|
757
|
-
}, null, 40,
|
|
757
|
+
}, null, 40, go),
|
|
758
758
|
h("div", {
|
|
759
|
-
class:
|
|
759
|
+
class: z([
|
|
760
760
|
"vt-checkbox__box",
|
|
761
761
|
{
|
|
762
|
-
"vt-checkbox__box--checked":
|
|
763
|
-
"vt-checkbox__box--indeterminate":
|
|
764
|
-
"vt-checkbox__box--double":
|
|
765
|
-
"vt-checkbox__box--disabled":
|
|
762
|
+
"vt-checkbox__box--checked": i.value && !r.indeterminate && !r.isDouble,
|
|
763
|
+
"vt-checkbox__box--indeterminate": r.indeterminate,
|
|
764
|
+
"vt-checkbox__box--double": r.isDouble && i.value,
|
|
765
|
+
"vt-checkbox__box--disabled": r.disabled
|
|
766
766
|
}
|
|
767
767
|
])
|
|
768
768
|
}, [
|
|
769
|
-
!
|
|
769
|
+
!r.indeterminate && !r.isDouble ? (p(), v("svg", {
|
|
770
770
|
key: 0,
|
|
771
|
-
class:
|
|
771
|
+
class: z([
|
|
772
772
|
"vt-checkbox__checkmark",
|
|
773
773
|
{
|
|
774
|
-
"vt-checkbox__checkmark--checked":
|
|
774
|
+
"vt-checkbox__checkmark--checked": i.value
|
|
775
775
|
}
|
|
776
776
|
]),
|
|
777
777
|
width: "10",
|
|
@@ -779,20 +779,20 @@ const Ke = /* @__PURE__ */ P(to, [["render", oo]]), lo = ["disabled", "type", "d
|
|
|
779
779
|
viewBox: "0 0 10 9",
|
|
780
780
|
fill: "none",
|
|
781
781
|
xmlns: "http://www.w3.org/2000/svg"
|
|
782
|
-
},
|
|
782
|
+
}, C[0] || (C[0] = [
|
|
783
783
|
h("path", {
|
|
784
784
|
d: "M1 5L3.58264 7.58264C3.80112 7.80112 4.16348 7.77113 4.34306 7.51971L9 1",
|
|
785
785
|
stroke: "currentColor",
|
|
786
786
|
"stroke-width": "2",
|
|
787
787
|
"stroke-linecap": "round"
|
|
788
788
|
}, null, -1)
|
|
789
|
-
]), 2)) :
|
|
790
|
-
|
|
789
|
+
]), 2)) : W("", !0),
|
|
790
|
+
r.isDouble && i.value ? (p(), v("svg", {
|
|
791
791
|
key: 1,
|
|
792
|
-
class:
|
|
792
|
+
class: z([
|
|
793
793
|
"vt-checkbox__checkmark",
|
|
794
794
|
{
|
|
795
|
-
"vt-checkbox__checkmark--checked":
|
|
795
|
+
"vt-checkbox__checkmark--checked": i.value
|
|
796
796
|
}
|
|
797
797
|
]),
|
|
798
798
|
width: "13",
|
|
@@ -800,7 +800,7 @@ const Ke = /* @__PURE__ */ P(to, [["render", oo]]), lo = ["disabled", "type", "d
|
|
|
800
800
|
viewBox: "0 0 13 6",
|
|
801
801
|
fill: "none",
|
|
802
802
|
xmlns: "http://www.w3.org/2000/svg"
|
|
803
|
-
},
|
|
803
|
+
}, C[1] || (C[1] = [
|
|
804
804
|
h("path", {
|
|
805
805
|
d: "M6 3L8.25 5L12 1",
|
|
806
806
|
stroke: "currentColor",
|
|
@@ -815,199 +815,199 @@ const Ke = /* @__PURE__ */ P(to, [["render", oo]]), lo = ["disabled", "type", "d
|
|
|
815
815
|
"stroke-linecap": "round",
|
|
816
816
|
"stroke-linejoin": "round"
|
|
817
817
|
}, null, -1)
|
|
818
|
-
]), 2)) :
|
|
819
|
-
|
|
818
|
+
]), 2)) : W("", !0),
|
|
819
|
+
r.indeterminate ? (p(), v("div", {
|
|
820
820
|
key: 2,
|
|
821
|
-
class:
|
|
821
|
+
class: z([
|
|
822
822
|
"vt-checkbox__indeterminate-mark",
|
|
823
823
|
{
|
|
824
|
-
"vt-checkbox__indeterminate-mark--visible":
|
|
824
|
+
"vt-checkbox__indeterminate-mark--visible": r.indeterminate
|
|
825
825
|
}
|
|
826
826
|
])
|
|
827
|
-
}, null, 2)) :
|
|
827
|
+
}, null, 2)) : W("", !0)
|
|
828
828
|
], 2),
|
|
829
|
-
|
|
829
|
+
r.label || r.$slots.label || r.$slots.default ? (p(), v("span", {
|
|
830
830
|
key: 0,
|
|
831
|
-
class:
|
|
831
|
+
class: z([
|
|
832
832
|
"vt-checkbox__label",
|
|
833
833
|
{
|
|
834
|
-
"vt-checkbox__label--disabled":
|
|
834
|
+
"vt-checkbox__label--disabled": r.disabled
|
|
835
835
|
}
|
|
836
836
|
])
|
|
837
837
|
}, [
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
ge(
|
|
838
|
+
de(r.$slots, "label", {}, () => [
|
|
839
|
+
de(r.$slots, "default", {}, () => [
|
|
840
|
+
ge(ee(r.label), 1)
|
|
841
841
|
])
|
|
842
842
|
])
|
|
843
|
-
], 2)) :
|
|
844
|
-
], 10,
|
|
843
|
+
], 2)) : W("", !0)
|
|
844
|
+
], 10, _o));
|
|
845
845
|
}
|
|
846
846
|
});
|
|
847
|
-
function
|
|
848
|
-
const e =
|
|
849
|
-
const
|
|
850
|
-
if (
|
|
851
|
-
const u = Math.max(800 -
|
|
852
|
-
return Math.max(Math.floor(u /
|
|
847
|
+
function wo(t) {
|
|
848
|
+
const e = S(() => [...t].sort((l, s) => l.pinnedLeft && !s.pinnedLeft ? -1 : !l.pinnedLeft && s.pinnedLeft || l.pinnedRight && !s.pinnedRight ? 1 : !l.pinnedRight && s.pinnedRight ? -1 : 0)), o = () => {
|
|
849
|
+
const l = e.value.length, s = e.value.filter((r) => r.width || r.minWidth), i = s.reduce((r, C) => r + (C.width || C.minWidth || 0), 0), c = l - s.length;
|
|
850
|
+
if (c === 0) return 150;
|
|
851
|
+
const u = Math.max(800 - i, c * 80);
|
|
852
|
+
return Math.max(Math.floor(u / c), 120);
|
|
853
853
|
};
|
|
854
854
|
return {
|
|
855
855
|
sortedColumns: e,
|
|
856
856
|
getDefaultColumnWidth: o,
|
|
857
|
-
getStickyOffset: (
|
|
858
|
-
const
|
|
859
|
-
let
|
|
860
|
-
if (
|
|
861
|
-
|
|
862
|
-
for (let u = 0; u <
|
|
863
|
-
const
|
|
864
|
-
|
|
857
|
+
getStickyOffset: (l, s, i = !1) => {
|
|
858
|
+
const c = e.value;
|
|
859
|
+
let a = 0;
|
|
860
|
+
if (l === "left") {
|
|
861
|
+
i && (a += 50);
|
|
862
|
+
for (let u = 0; u < s; u++) {
|
|
863
|
+
const r = c[u];
|
|
864
|
+
r.pinnedLeft && (a += r.width || r.minWidth || o());
|
|
865
865
|
}
|
|
866
866
|
} else
|
|
867
|
-
for (let u =
|
|
868
|
-
const
|
|
869
|
-
|
|
867
|
+
for (let u = c.length - 1; u > s; u--) {
|
|
868
|
+
const r = c[u];
|
|
869
|
+
r.pinnedRight && (a += r.width || r.minWidth || o());
|
|
870
870
|
}
|
|
871
|
-
return
|
|
871
|
+
return a;
|
|
872
872
|
}
|
|
873
873
|
};
|
|
874
874
|
}
|
|
875
|
-
function
|
|
875
|
+
function Co(t) {
|
|
876
876
|
const e = () => {
|
|
877
|
-
const
|
|
878
|
-
return t.maxHeight && (
|
|
879
|
-
}, o = (
|
|
877
|
+
const s = {};
|
|
878
|
+
return t.maxHeight && (s.maxHeight = `${t.maxHeight}px`), s;
|
|
879
|
+
}, o = (s, i, c, a) => {
|
|
880
880
|
const u = {};
|
|
881
|
-
if (
|
|
882
|
-
u.width = `${
|
|
883
|
-
else if (
|
|
884
|
-
u.minWidth = `${
|
|
881
|
+
if (s.width)
|
|
882
|
+
u.width = `${s.width}px`, u.minWidth = `${s.width}px`, u.maxWidth = `${s.width}px`;
|
|
883
|
+
else if (s.minWidth)
|
|
884
|
+
u.minWidth = `${s.minWidth}px`, u.width = `${s.minWidth}px`, u.maxWidth = "none";
|
|
885
885
|
else {
|
|
886
|
-
const
|
|
887
|
-
u.width = `${
|
|
886
|
+
const r = a();
|
|
887
|
+
u.width = `${r}px`, u.minWidth = "80px", u.maxWidth = "none";
|
|
888
888
|
}
|
|
889
|
-
return
|
|
889
|
+
return s.pinnedLeft ? (u.position = "sticky", u.left = `${c("left", i, t.selectable)}px`, u.zIndex = "10") : s.pinnedRight && (u.position = "sticky", u.right = `${c("right", i, !1)}px`, u.zIndex = "10"), u;
|
|
890
890
|
};
|
|
891
891
|
return {
|
|
892
892
|
getTableWrapperStyle: e,
|
|
893
893
|
getColumnStyle: o,
|
|
894
|
-
getHeaderStyle: (
|
|
895
|
-
const u = o(
|
|
896
|
-
return t.maxHeight && (u.position = "sticky", u.top = "0",
|
|
894
|
+
getHeaderStyle: (s, i, c, a) => {
|
|
895
|
+
const u = o(s, i, c, a);
|
|
896
|
+
return t.maxHeight && (u.position = "sticky", u.top = "0", s.pinnedLeft || s.pinnedRight ? u.zIndex = "12" : u.zIndex = "11"), u;
|
|
897
897
|
},
|
|
898
|
-
getFooterStyle: (
|
|
899
|
-
const u = o(
|
|
900
|
-
return t.maxHeight && (u.position = "sticky", u.bottom = "0",
|
|
898
|
+
getFooterStyle: (s, i, c, a) => {
|
|
899
|
+
const u = o(s, i, c, a);
|
|
900
|
+
return t.maxHeight && (u.position = "sticky", u.bottom = "0", s.pinnedLeft || s.pinnedRight ? u.zIndex = "12" : u.zIndex = "11"), u;
|
|
901
901
|
}
|
|
902
902
|
};
|
|
903
903
|
}
|
|
904
|
-
function
|
|
905
|
-
const t =
|
|
904
|
+
function ko() {
|
|
905
|
+
const t = P({
|
|
906
906
|
resizingCol: null,
|
|
907
907
|
startX: 0,
|
|
908
908
|
startWidth: 0
|
|
909
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`;
|
|
910
910
|
return {
|
|
911
|
-
onMouseDown: (n,
|
|
912
|
-
n.preventDefault(), n.stopPropagation(), t.value.resizingCol =
|
|
913
|
-
const
|
|
914
|
-
const { resizingCol:
|
|
915
|
-
if (!
|
|
916
|
-
document.querySelectorAll(`[data-resizer="${
|
|
917
|
-
|
|
911
|
+
onMouseDown: (n, l, s, i) => {
|
|
912
|
+
n.preventDefault(), n.stopPropagation(), t.value.resizingCol = l, t.value.startX = n.clientX, t.value.startWidth = l.width || l.minWidth || s(l.prop);
|
|
913
|
+
const c = (u) => {
|
|
914
|
+
const { resizingCol: r, startX: C, startWidth: L } = t.value;
|
|
915
|
+
if (!r) return;
|
|
916
|
+
document.querySelectorAll(`[data-resizer="${r.prop}"]`).forEach((A) => {
|
|
917
|
+
A.classList.add("vt-table__resizer--active");
|
|
918
918
|
});
|
|
919
|
-
const
|
|
920
|
-
|
|
921
|
-
},
|
|
919
|
+
const j = u.clientX - C, Y = r.minWidth || 50, N = r.maxWidth || 1e3, R = Math.max(Math.min(L + j, N), Y);
|
|
920
|
+
r.width = R;
|
|
921
|
+
}, a = () => {
|
|
922
922
|
const { resizingCol: u } = t.value;
|
|
923
|
-
document.removeEventListener("mousemove",
|
|
924
|
-
|
|
925
|
-
}),
|
|
923
|
+
document.removeEventListener("mousemove", c), document.removeEventListener("mouseup", a), document.body.style.cursor = "", document.body.style.userSelect = "", document.body.classList.remove("vt-table-resizing"), u && (document.querySelectorAll(`[data-resizer="${u.prop}"]`).forEach((r) => {
|
|
924
|
+
r.classList.remove("vt-table__resizer--active");
|
|
925
|
+
}), i && u.width && i(u.width)), t.value.resizingCol = null;
|
|
926
926
|
};
|
|
927
|
-
document.addEventListener("mousemove",
|
|
927
|
+
document.addEventListener("mousemove", c), document.addEventListener("mouseup", a), document.body.style.cursor = e, document.body.style.userSelect = "none", document.body.classList.add("vt-table-resizing");
|
|
928
928
|
},
|
|
929
929
|
resizeState: t
|
|
930
930
|
};
|
|
931
931
|
}
|
|
932
|
-
function
|
|
933
|
-
var
|
|
934
|
-
const
|
|
935
|
-
(
|
|
936
|
-
const
|
|
937
|
-
if (
|
|
938
|
-
const
|
|
939
|
-
return
|
|
940
|
-
}),
|
|
941
|
-
const
|
|
942
|
-
if (
|
|
943
|
-
|
|
932
|
+
function bo(t, e, o, n) {
|
|
933
|
+
var oe;
|
|
934
|
+
const l = t.selectionKey || "id", s = P([]), i = P(null), c = P(!1);
|
|
935
|
+
(oe = t.defaultSelection) != null && oe.length && (s.value = [...t.defaultSelection]);
|
|
936
|
+
const a = (k) => k[l], u = (k) => c.value ? !0 : s.value.some((m) => a(m) === a(k)), r = S(() => e.value.filter((k) => u(k)).length), C = S(() => e.value.length > 0 && r.value === e.value.length), L = S(() => {
|
|
937
|
+
if (c.value) return !1;
|
|
938
|
+
const k = r.value;
|
|
939
|
+
return k > 0 && k < e.value.length;
|
|
940
|
+
}), j = S(() => c.value ? !0 : C.value && !L.value), Y = S(() => c.value), N = (k, m) => {
|
|
941
|
+
const y = a(k), M = s.value.some((_) => a(_) === a(k)), d = m !== void 0 ? m : !M;
|
|
942
|
+
if (c.value && !d) {
|
|
943
|
+
c.value = !1, n != null && n.value && (s.value = n.value.filter((_) => a(_) !== y)), U(k, !1);
|
|
944
944
|
return;
|
|
945
945
|
}
|
|
946
|
-
|
|
947
|
-
},
|
|
948
|
-
switch (
|
|
946
|
+
c.value && d || (d && !M ? s.value.push(k) : !d && M && (s.value = s.value.filter((_) => a(_) !== y)), t.selectOnClickRow && m === void 0 && K(d ? k : null), U(k, d));
|
|
947
|
+
}, R = () => {
|
|
948
|
+
switch (A()) {
|
|
949
949
|
case "none":
|
|
950
950
|
case "partial":
|
|
951
|
-
|
|
951
|
+
b();
|
|
952
952
|
break;
|
|
953
953
|
case "allVisible":
|
|
954
|
-
|
|
954
|
+
I();
|
|
955
955
|
break;
|
|
956
956
|
case "absoluteAll":
|
|
957
|
-
|
|
957
|
+
V();
|
|
958
958
|
break;
|
|
959
959
|
}
|
|
960
|
-
},
|
|
961
|
-
const
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
}), e.value.forEach((
|
|
965
|
-
|
|
966
|
-
}),
|
|
967
|
-
}, B = () => {
|
|
968
|
-
r.value = !0, n != null && n.value ? l.value = [...n.value] : l.value = [...e.value], H(void 0, void 0, !0);
|
|
960
|
+
}, A = () => c.value ? "absoluteAll" : C.value ? "allVisible" : r.value > 0 ? "partial" : "none", b = () => {
|
|
961
|
+
const k = [], m = new Set(s.value.map((y) => a(y)));
|
|
962
|
+
s.value.forEach((y) => {
|
|
963
|
+
k.push(y);
|
|
964
|
+
}), e.value.forEach((y) => {
|
|
965
|
+
m.has(a(y)) || k.push(y);
|
|
966
|
+
}), s.value = k, c.value = !1, U();
|
|
969
967
|
}, I = () => {
|
|
970
|
-
|
|
971
|
-
},
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
968
|
+
c.value = !0, n != null && n.value ? s.value = [...n.value] : s.value = [...e.value], U(void 0, void 0, !0);
|
|
969
|
+
}, V = () => {
|
|
970
|
+
s.value = [], c.value = !1, i.value = null, U();
|
|
971
|
+
}, K = (k) => {
|
|
972
|
+
const m = i.value;
|
|
973
|
+
i.value = k, o("current-change", {
|
|
974
|
+
currentRow: i.value,
|
|
975
|
+
oldCurrentRow: m
|
|
976
976
|
});
|
|
977
|
-
},
|
|
978
|
-
|
|
979
|
-
},
|
|
980
|
-
const
|
|
981
|
-
selection: [...
|
|
982
|
-
row:
|
|
983
|
-
selected:
|
|
984
|
-
isAllSelected:
|
|
977
|
+
}, q = () => [...s.value], Q = (k) => {
|
|
978
|
+
s.value = [...k], c.value = !1, U();
|
|
979
|
+
}, U = (k, m, y = !1) => {
|
|
980
|
+
const M = {
|
|
981
|
+
selection: [...s.value],
|
|
982
|
+
row: k,
|
|
983
|
+
selected: m,
|
|
984
|
+
isAllSelected: y || c.value
|
|
985
985
|
};
|
|
986
|
-
o("selection-change",
|
|
986
|
+
o("selection-change", M);
|
|
987
987
|
};
|
|
988
|
-
return
|
|
988
|
+
return ve(
|
|
989
989
|
() => t.defaultSelection,
|
|
990
|
-
(
|
|
991
|
-
|
|
990
|
+
(k) => {
|
|
991
|
+
k != null && k.length && (s.value = [...k]);
|
|
992
992
|
}
|
|
993
993
|
), {
|
|
994
|
-
selectedRows:
|
|
995
|
-
currentRow:
|
|
994
|
+
selectedRows: s,
|
|
995
|
+
currentRow: i,
|
|
996
996
|
isRowSelected: u,
|
|
997
|
-
isAllSelected:
|
|
998
|
-
isIndeterminate:
|
|
999
|
-
isDoubleCheck:
|
|
1000
|
-
isFullSelection:
|
|
1001
|
-
toggleRowSelection:
|
|
1002
|
-
toggleAllSelection:
|
|
1003
|
-
clearSelection:
|
|
997
|
+
isAllSelected: j,
|
|
998
|
+
isIndeterminate: L,
|
|
999
|
+
isDoubleCheck: Y,
|
|
1000
|
+
isFullSelection: c,
|
|
1001
|
+
toggleRowSelection: N,
|
|
1002
|
+
toggleAllSelection: R,
|
|
1003
|
+
clearSelection: V,
|
|
1004
1004
|
setCurrentRow: K,
|
|
1005
|
-
getSelectionRows:
|
|
1006
|
-
setSelectionRows:
|
|
1007
|
-
selectAbsolutelyAll:
|
|
1005
|
+
getSelectionRows: q,
|
|
1006
|
+
setSelectionRows: Q,
|
|
1007
|
+
selectAbsolutelyAll: I
|
|
1008
1008
|
};
|
|
1009
1009
|
}
|
|
1010
|
-
function
|
|
1010
|
+
function yo(t, e) {
|
|
1011
1011
|
if (!t)
|
|
1012
1012
|
return String(e.value ?? "");
|
|
1013
1013
|
try {
|
|
@@ -1017,63 +1017,238 @@ function Mo(t, e) {
|
|
|
1017
1017
|
return console.error("Error rendering table slot:", o), String(e.value ?? "");
|
|
1018
1018
|
}
|
|
1019
1019
|
}
|
|
1020
|
-
const
|
|
1020
|
+
const xo = (t, e, o = "asc") => {
|
|
1021
1021
|
if (t == null && e == null) return 0;
|
|
1022
1022
|
if (t == null) return o === "asc" ? 1 : -1;
|
|
1023
1023
|
if (e == null) return o === "asc" ? -1 : 1;
|
|
1024
1024
|
if (t === e) return 0;
|
|
1025
1025
|
let n = 0;
|
|
1026
|
-
const
|
|
1027
|
-
return !isNaN(
|
|
1026
|
+
const l = Number(t), s = Number(e);
|
|
1027
|
+
return !isNaN(l) && !isNaN(s) ? n = l - s : ze(t) && ze(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, {
|
|
1028
1028
|
numeric: !0,
|
|
1029
1029
|
sensitivity: "base"
|
|
1030
1030
|
}), o === "desc" ? -n : n;
|
|
1031
|
-
},
|
|
1031
|
+
}, ze = (t) => t instanceof Date ? !isNaN(t.getTime()) : typeof t == "string" && /\d{4}-\d{2}-\d{2}|\//.test(t) ? !isNaN(new Date(t).getTime()) : !1, Mo = (t, e, o) => {
|
|
1032
1032
|
t.sortable && o({
|
|
1033
1033
|
prop: t.prop,
|
|
1034
1034
|
direction: e
|
|
1035
1035
|
});
|
|
1036
|
-
},
|
|
1036
|
+
}, He = (t, e) => {
|
|
1037
1037
|
const o = (e == null ? void 0 : e.prop) === t.prop, n = e == null ? void 0 : e.direction;
|
|
1038
1038
|
return {
|
|
1039
1039
|
asc: ["vt-th__sort-icon", o && n === "asc" && "vt-th__sortable-active"].filter(Boolean).join(" "),
|
|
1040
1040
|
desc: ["vt-th__sort-icon", o && n === "desc" && "vt-th__sortable-active"].filter(Boolean).join(" ")
|
|
1041
1041
|
};
|
|
1042
|
-
},
|
|
1042
|
+
}, Lo = (t, e, o) => {
|
|
1043
1043
|
if (!e) return [...t];
|
|
1044
|
-
const n = o.find((
|
|
1044
|
+
const n = o.find((s) => s.prop === e.prop);
|
|
1045
1045
|
if (!(n != null && n.sortable)) return [...t];
|
|
1046
|
-
const
|
|
1047
|
-
return [...t].sort((
|
|
1048
|
-
const
|
|
1049
|
-
return
|
|
1046
|
+
const l = n.sortMethod || xo;
|
|
1047
|
+
return [...t].sort((s, i) => {
|
|
1048
|
+
const c = s[n.prop], a = i[n.prop];
|
|
1049
|
+
return l(c, a, e.direction);
|
|
1050
1050
|
});
|
|
1051
|
-
}
|
|
1052
|
-
|
|
1051
|
+
}, qe = Symbol("dropdown-context"), Ge = /* @__PURE__ */ te({
|
|
1052
|
+
__name: "VDropdown",
|
|
1053
|
+
props: {
|
|
1054
|
+
trigger: { default: "hover" },
|
|
1055
|
+
placement: { default: "bottom-start" },
|
|
1056
|
+
disabled: { type: Boolean, default: !1 },
|
|
1057
|
+
splitButton: { type: Boolean, default: !1 },
|
|
1058
|
+
hideOnClick: { type: Boolean, default: !0 },
|
|
1059
|
+
showTimeout: { default: 250 },
|
|
1060
|
+
hideTimeout: { default: 150 },
|
|
1061
|
+
tabindex: { default: 0 }
|
|
1062
|
+
},
|
|
1063
|
+
emits: ["visible-change", "click", "command"],
|
|
1064
|
+
setup(t, { expose: e, emit: o }) {
|
|
1065
|
+
const n = t, l = o, s = P(), i = P(), c = P(), a = P(!1), u = P(null), r = P([]), C = P({
|
|
1066
|
+
position: "absolute",
|
|
1067
|
+
top: "0px",
|
|
1068
|
+
left: "0px",
|
|
1069
|
+
zIndex: 2e3,
|
|
1070
|
+
transformOrigin: "center top"
|
|
1071
|
+
});
|
|
1072
|
+
$e();
|
|
1073
|
+
const L = (m) => {
|
|
1074
|
+
const y = [];
|
|
1075
|
+
let M = m.parentElement;
|
|
1076
|
+
for (; M && M !== document.body; ) {
|
|
1077
|
+
const d = window.getComputedStyle(M), _ = d.overflowY, w = d.overflowX;
|
|
1078
|
+
(["scroll", "auto"].includes(_) || ["scroll", "auto"].includes(w) || M.scrollHeight > M.clientHeight || M.scrollWidth > M.clientWidth) && y.push(M), M = M.parentElement;
|
|
1079
|
+
}
|
|
1080
|
+
return y.push(window), y;
|
|
1081
|
+
}, j = async () => {
|
|
1082
|
+
if (await ht(), !i.value || !c.value) return;
|
|
1083
|
+
const m = i.value.getBoundingClientRect(), y = c.value.getBoundingClientRect();
|
|
1084
|
+
let M = 0, d = 0;
|
|
1085
|
+
switch (n.placement) {
|
|
1086
|
+
case "bottom":
|
|
1087
|
+
M = m.bottom + window.scrollY + 5, d = m.left + window.scrollX + (m.width - y.width) / 2;
|
|
1088
|
+
break;
|
|
1089
|
+
case "bottom-start":
|
|
1090
|
+
M = m.bottom + window.scrollY + 5, d = m.left + window.scrollX;
|
|
1091
|
+
break;
|
|
1092
|
+
case "bottom-end":
|
|
1093
|
+
M = m.bottom + window.scrollY + 5, d = m.right + window.scrollX - y.width;
|
|
1094
|
+
break;
|
|
1095
|
+
case "top":
|
|
1096
|
+
M = m.top + window.scrollY - y.height - 5, d = m.left + window.scrollX + (m.width - y.width) / 2;
|
|
1097
|
+
break;
|
|
1098
|
+
case "top-start":
|
|
1099
|
+
M = m.top + window.scrollY - y.height - 5, d = m.left + window.scrollX;
|
|
1100
|
+
break;
|
|
1101
|
+
case "top-end":
|
|
1102
|
+
M = m.top + window.scrollY - y.height - 5, d = m.right + window.scrollX - y.width;
|
|
1103
|
+
break;
|
|
1104
|
+
}
|
|
1105
|
+
d + y.width > window.innerWidth && (d = window.innerWidth - y.width - 10), d < 10 && (d = 10), M + y.height > window.innerHeight + window.scrollY && (M = m.top + window.scrollY - y.height - 5), M < window.scrollY + 10 && (M = window.scrollY + 10), C.value.top = `${M}px`, C.value.left = `${d}px`;
|
|
1106
|
+
}, Y = () => {
|
|
1107
|
+
i.value && (r.value = L(i.value), r.value.forEach((m) => {
|
|
1108
|
+
m.addEventListener("scroll", k, { passive: !0 });
|
|
1109
|
+
}), window.addEventListener("resize", k));
|
|
1110
|
+
}, N = () => {
|
|
1111
|
+
r.value.forEach((m) => {
|
|
1112
|
+
m.removeEventListener("scroll", k);
|
|
1113
|
+
}), window.removeEventListener("resize", k), r.value = [];
|
|
1114
|
+
}, R = () => {
|
|
1115
|
+
n.disabled || a.value || (b(), u.value = window.setTimeout(
|
|
1116
|
+
async () => {
|
|
1117
|
+
a.value = !0, await j(), Y(), l("visible-change", !0);
|
|
1118
|
+
},
|
|
1119
|
+
n.trigger === "hover" ? n.showTimeout : 0
|
|
1120
|
+
));
|
|
1121
|
+
}, A = () => {
|
|
1122
|
+
a.value && (b(), u.value = window.setTimeout(
|
|
1123
|
+
() => {
|
|
1124
|
+
a.value = !1, N(), l("visible-change", !1);
|
|
1125
|
+
},
|
|
1126
|
+
n.trigger === "hover" ? n.hideTimeout : 0
|
|
1127
|
+
));
|
|
1128
|
+
}, b = () => {
|
|
1129
|
+
u.value && (window.clearTimeout(u.value), u.value = null);
|
|
1130
|
+
};
|
|
1131
|
+
Ye(qe, {
|
|
1132
|
+
handleCommand: (m) => {
|
|
1133
|
+
console.log("VDropdown handleCommand called:", m), l("command", m), n.hideOnClick && A();
|
|
1134
|
+
},
|
|
1135
|
+
hideOnClick: n.hideOnClick
|
|
1136
|
+
});
|
|
1137
|
+
const V = (m) => {
|
|
1138
|
+
n.disabled || (console.log("VDropdown click triggered"), l("click", m), n.trigger === "click" && (a.value ? A() : R()));
|
|
1139
|
+
}, K = () => {
|
|
1140
|
+
n.trigger === "hover" && R();
|
|
1141
|
+
}, q = () => {
|
|
1142
|
+
n.trigger === "hover" && A();
|
|
1143
|
+
}, Q = () => {
|
|
1144
|
+
n.trigger === "hover" && b();
|
|
1145
|
+
}, U = () => {
|
|
1146
|
+
n.trigger === "hover" && A();
|
|
1147
|
+
}, oe = (m) => {
|
|
1148
|
+
var M, d;
|
|
1149
|
+
if (!a.value) return;
|
|
1150
|
+
const y = m.target;
|
|
1151
|
+
(M = s.value) != null && M.contains(y) || (d = c.value) != null && d.contains(y) || A();
|
|
1152
|
+
}, k = () => {
|
|
1153
|
+
a.value && j();
|
|
1154
|
+
};
|
|
1155
|
+
return e({
|
|
1156
|
+
show: R,
|
|
1157
|
+
hide: A,
|
|
1158
|
+
visible: a
|
|
1159
|
+
}), fe(() => {
|
|
1160
|
+
document.addEventListener("click", oe);
|
|
1161
|
+
}), Ve(() => {
|
|
1162
|
+
document.removeEventListener("click", oe), N(), b();
|
|
1163
|
+
}), (m, y) => (p(), v("div", {
|
|
1164
|
+
ref_key: "dropdownRef",
|
|
1165
|
+
ref: s,
|
|
1166
|
+
class: "vt-dropdown",
|
|
1167
|
+
onClick: V,
|
|
1168
|
+
onMouseenter: K,
|
|
1169
|
+
onMouseleave: q
|
|
1170
|
+
}, [
|
|
1171
|
+
h("div", {
|
|
1172
|
+
ref_key: "triggerRef",
|
|
1173
|
+
ref: i,
|
|
1174
|
+
class: "vt-dropdown__trigger"
|
|
1175
|
+
}, [
|
|
1176
|
+
de(m.$slots, "default")
|
|
1177
|
+
], 512),
|
|
1178
|
+
a.value ? (p(), ne(Ze, {
|
|
1179
|
+
key: 0,
|
|
1180
|
+
to: "body"
|
|
1181
|
+
}, [
|
|
1182
|
+
h("div", {
|
|
1183
|
+
ref_key: "menuRef",
|
|
1184
|
+
ref: c,
|
|
1185
|
+
style: se(C.value),
|
|
1186
|
+
class: "vt-dropdown-menu",
|
|
1187
|
+
onMouseenter: Q,
|
|
1188
|
+
onMouseleave: U,
|
|
1189
|
+
onClick: y[0] || (y[0] = he(() => {
|
|
1190
|
+
}, ["stop"]))
|
|
1191
|
+
}, [
|
|
1192
|
+
de(m.$slots, "dropdown")
|
|
1193
|
+
], 36)
|
|
1194
|
+
])) : W("", !0)
|
|
1195
|
+
], 544));
|
|
1196
|
+
}
|
|
1197
|
+
}), Me = /* @__PURE__ */ te({
|
|
1198
|
+
__name: "VDropdownItem",
|
|
1199
|
+
props: {
|
|
1200
|
+
command: {},
|
|
1201
|
+
disabled: { type: Boolean },
|
|
1202
|
+
divided: { type: Boolean },
|
|
1203
|
+
icon: {}
|
|
1204
|
+
},
|
|
1205
|
+
emits: ["click"],
|
|
1206
|
+
setup(t, { emit: e }) {
|
|
1207
|
+
const o = t, n = e, l = Ue(qe);
|
|
1208
|
+
l || console.warn("VDropdownItem must be used within VDropdown");
|
|
1209
|
+
const s = (i) => {
|
|
1210
|
+
o.disabled || (console.log("VDropdownItem click:", o.command), n("click", i), o.command !== void 0 && l && (console.log("Calling handleCommand with:", o.command), l.handleCommand(o.command)));
|
|
1211
|
+
};
|
|
1212
|
+
return (i, c) => (p(), v("li", {
|
|
1213
|
+
class: z(["vt-dropdown-item", {
|
|
1214
|
+
"is-disabled": i.disabled,
|
|
1215
|
+
"vt-dropdown-item--divided": i.divided
|
|
1216
|
+
}]),
|
|
1217
|
+
onClick: s
|
|
1218
|
+
}, [
|
|
1219
|
+
i.icon ? (p(), v("i", {
|
|
1220
|
+
key: 0,
|
|
1221
|
+
class: z([i.icon, "vt-dropdown-item__icon"])
|
|
1222
|
+
}, null, 2)) : W("", !0),
|
|
1223
|
+
de(i.$slots, "default")
|
|
1224
|
+
], 2));
|
|
1225
|
+
}
|
|
1226
|
+
});
|
|
1227
|
+
class $o {
|
|
1053
1228
|
constructor() {
|
|
1054
1229
|
this.modalStack = [], this.baseZIndex = 1e3;
|
|
1055
1230
|
}
|
|
1056
1231
|
open(e = {}) {
|
|
1057
1232
|
const o = `modal-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`, n = document.createElement("div");
|
|
1058
1233
|
n.setAttribute("data-vt-modal", o), document.body.appendChild(n);
|
|
1059
|
-
const
|
|
1234
|
+
const l = P(!0), s = this.baseZIndex + this.modalStack.length * 10, i = mt({
|
|
1060
1235
|
setup() {
|
|
1061
|
-
const
|
|
1062
|
-
|
|
1063
|
-
|
|
1236
|
+
const a = () => {
|
|
1237
|
+
l.value = !1, setTimeout(() => {
|
|
1238
|
+
ce.closeById(o);
|
|
1064
1239
|
}, 100);
|
|
1065
1240
|
};
|
|
1066
1241
|
return () => ye(
|
|
1067
|
-
|
|
1242
|
+
Ke,
|
|
1068
1243
|
{
|
|
1069
|
-
modelValue:
|
|
1070
|
-
"onUpdate:modelValue":
|
|
1244
|
+
modelValue: l.value,
|
|
1245
|
+
"onUpdate:modelValue": a,
|
|
1071
1246
|
title: e.title,
|
|
1072
1247
|
size: e.size || "medium",
|
|
1073
1248
|
showCloseButton: e.showCloseButton !== !1,
|
|
1074
1249
|
closeOnBackdropClick: e.closeOnBackdropClick !== !1,
|
|
1075
|
-
onClose:
|
|
1076
|
-
zIndex:
|
|
1250
|
+
onClose: a,
|
|
1251
|
+
zIndex: s
|
|
1077
1252
|
},
|
|
1078
1253
|
{
|
|
1079
1254
|
default: () => e.component ? ye(e.component, e.props || {}) : e.content ? ye("div", { innerHTML: e.content }) : null
|
|
@@ -1081,14 +1256,14 @@ class Io {
|
|
|
1081
1256
|
);
|
|
1082
1257
|
}
|
|
1083
1258
|
});
|
|
1084
|
-
|
|
1085
|
-
const
|
|
1259
|
+
i.mount(n);
|
|
1260
|
+
const c = {
|
|
1086
1261
|
id: o,
|
|
1087
|
-
app:
|
|
1262
|
+
app: i,
|
|
1088
1263
|
container: n,
|
|
1089
|
-
isOpen:
|
|
1264
|
+
isOpen: l
|
|
1090
1265
|
};
|
|
1091
|
-
return this.modalStack.push(
|
|
1266
|
+
return this.modalStack.push(c), o;
|
|
1092
1267
|
}
|
|
1093
1268
|
close() {
|
|
1094
1269
|
if (this.modalStack.length > 0) {
|
|
@@ -1118,24 +1293,24 @@ class Io {
|
|
|
1118
1293
|
recalculateZIndices() {
|
|
1119
1294
|
}
|
|
1120
1295
|
}
|
|
1121
|
-
const
|
|
1296
|
+
const ce = new $o(), So = {
|
|
1122
1297
|
install(t) {
|
|
1123
|
-
t.config.globalProperties.$modal =
|
|
1124
|
-
closeAll: () =>
|
|
1125
|
-
getCount: () =>
|
|
1126
|
-
closeById: (e) =>
|
|
1298
|
+
t.config.globalProperties.$modal = ce, t.config.globalProperties.$modalStack = {
|
|
1299
|
+
closeAll: () => ce.closeAll(),
|
|
1300
|
+
getCount: () => ce.getOpenModalsCount(),
|
|
1301
|
+
closeById: (e) => ce.closeById(e)
|
|
1127
1302
|
};
|
|
1128
1303
|
}
|
|
1129
|
-
},
|
|
1304
|
+
}, Vo = { class: "vt-columns-selector-body" }, Io = { class: "vt-columns-selector" }, Bo = { class: "vt-columns-selector__panel" }, To = ["draggable", "onDragstart", "onDragover", "onDrop"], Eo = {
|
|
1130
1305
|
key: 0,
|
|
1131
1306
|
class: "vt-columns-selector__panel-item-pinned"
|
|
1132
|
-
},
|
|
1307
|
+
}, Ro = { class: "vt-columns-selector__available" }, zo = ["onClick"], Ho = {
|
|
1133
1308
|
key: 0,
|
|
1134
1309
|
class: "vt-columns-selector__group-columns"
|
|
1135
|
-
},
|
|
1310
|
+
}, Wo = {
|
|
1136
1311
|
key: 0,
|
|
1137
1312
|
class: "vt-columns-selector__pinned-note"
|
|
1138
|
-
},
|
|
1313
|
+
}, Do = { class: "vt-modal__content-button" }, Po = /* @__PURE__ */ te({
|
|
1139
1314
|
__name: "VTableColumnSelector",
|
|
1140
1315
|
props: {
|
|
1141
1316
|
columns: {},
|
|
@@ -1143,191 +1318,191 @@ const ae = new Io(), Vo = {
|
|
|
1143
1318
|
},
|
|
1144
1319
|
emits: ["update-columns"],
|
|
1145
1320
|
setup(t, { emit: e }) {
|
|
1146
|
-
const o = t, n = e,
|
|
1321
|
+
const o = t, n = e, l = P([]), s = P(/* @__PURE__ */ new Set()), i = P(-1), c = P(-1), a = P("before"), u = S(() => {
|
|
1147
1322
|
const d = {};
|
|
1148
|
-
return o.columnsSelector.forEach((
|
|
1149
|
-
if (
|
|
1323
|
+
return o.columnsSelector.forEach((_) => {
|
|
1324
|
+
if (_.name === "removed")
|
|
1150
1325
|
return;
|
|
1151
|
-
const
|
|
1152
|
-
|
|
1326
|
+
const w = _.columns.map((T) => T.prop), $ = l.value.filter((T) => w.includes(T.prop));
|
|
1327
|
+
$.length === 0 ? d[_.name] = { checked: !1, indeterminate: !1 } : $.length === _.columns.length ? d[_.name] = { checked: !0, indeterminate: !1 } : d[_.name] = { checked: !1, indeterminate: !0 };
|
|
1153
1328
|
}), d;
|
|
1154
|
-
}),
|
|
1155
|
-
const d =
|
|
1156
|
-
let
|
|
1157
|
-
for (let
|
|
1158
|
-
d[
|
|
1159
|
-
let
|
|
1160
|
-
for (let
|
|
1161
|
-
if (d[
|
|
1162
|
-
|
|
1329
|
+
}), r = S(() => o.columnsSelector.filter((d) => d.name !== "removed")), C = (d) => d.pinnedLeft || d.pinnedRight, L = (d) => !C(d), j = () => {
|
|
1330
|
+
const d = l.value;
|
|
1331
|
+
let _ = -1;
|
|
1332
|
+
for (let $ = 0; $ < d.length; $++)
|
|
1333
|
+
d[$].pinnedLeft && (_ = $);
|
|
1334
|
+
let w = d.length;
|
|
1335
|
+
for (let $ = 0; $ < d.length; $++)
|
|
1336
|
+
if (d[$].pinnedRight) {
|
|
1337
|
+
w = $;
|
|
1163
1338
|
break;
|
|
1164
1339
|
}
|
|
1165
1340
|
return {
|
|
1166
|
-
minIndex:
|
|
1167
|
-
maxIndex:
|
|
1341
|
+
minIndex: _ + 1,
|
|
1342
|
+
maxIndex: w - 1
|
|
1168
1343
|
};
|
|
1169
|
-
},
|
|
1170
|
-
const
|
|
1171
|
-
return !(d <
|
|
1172
|
-
},
|
|
1173
|
-
const
|
|
1174
|
-
if (
|
|
1344
|
+
}, Y = (d) => {
|
|
1345
|
+
const _ = j();
|
|
1346
|
+
return !(d < _.minIndex || d > _.maxIndex + 1);
|
|
1347
|
+
}, N = (d, _) => {
|
|
1348
|
+
const w = l.value[_];
|
|
1349
|
+
if (!L(w)) {
|
|
1175
1350
|
d.preventDefault();
|
|
1176
1351
|
return;
|
|
1177
1352
|
}
|
|
1178
|
-
|
|
1179
|
-
},
|
|
1180
|
-
if (
|
|
1353
|
+
i.value = _, d.dataTransfer && (d.dataTransfer.effectAllowed = "move", d.dataTransfer.setData("text/plain", w.prop)), document.body.style.cursor = "grabbing";
|
|
1354
|
+
}, R = (d, _) => {
|
|
1355
|
+
if (i.value === -1) return;
|
|
1181
1356
|
d.preventDefault();
|
|
1182
|
-
const
|
|
1183
|
-
let
|
|
1184
|
-
|
|
1185
|
-
},
|
|
1357
|
+
const w = d.currentTarget.getBoundingClientRect(), $ = d.clientY, T = w.top + w.height / 2;
|
|
1358
|
+
let E = _, J = "before";
|
|
1359
|
+
$ < T ? (E = _, J = "before") : (E = _ + 1, J = "after"), i.value < E && E--, Y(E) ? (c.value = _, a.value = J, d.dataTransfer.dropEffect = "move") : (c.value = -1, d.dataTransfer.dropEffect = "none");
|
|
1360
|
+
}, A = () => {
|
|
1186
1361
|
setTimeout(() => {
|
|
1187
|
-
|
|
1362
|
+
i.value === -1 && (c.value = -1);
|
|
1188
1363
|
}, 50);
|
|
1189
|
-
},
|
|
1190
|
-
if (d.preventDefault(),
|
|
1191
|
-
|
|
1364
|
+
}, b = (d, _) => {
|
|
1365
|
+
if (d.preventDefault(), i.value === -1 || c.value === -1) {
|
|
1366
|
+
V();
|
|
1192
1367
|
return;
|
|
1193
1368
|
}
|
|
1194
|
-
const
|
|
1195
|
-
let
|
|
1196
|
-
if (
|
|
1197
|
-
|
|
1369
|
+
const w = d.currentTarget.getBoundingClientRect(), $ = d.clientY, T = w.top + w.height / 2;
|
|
1370
|
+
let E = _;
|
|
1371
|
+
if ($ >= T && (E = _ + 1), i.value < E && E--, !Y(E) || E === i.value) {
|
|
1372
|
+
V();
|
|
1198
1373
|
return;
|
|
1199
1374
|
}
|
|
1200
|
-
const
|
|
1201
|
-
|
|
1202
|
-
}, B = () => {
|
|
1203
|
-
I();
|
|
1375
|
+
const J = [...l.value], [Ce] = J.splice(i.value, 1);
|
|
1376
|
+
J.splice(E, 0, Ce), l.value = J, V();
|
|
1204
1377
|
}, I = () => {
|
|
1205
|
-
|
|
1378
|
+
V();
|
|
1379
|
+
}, V = () => {
|
|
1380
|
+
i.value = -1, c.value = -1, a.value = "before", document.body.style.cursor = "";
|
|
1206
1381
|
}, K = (d) => {
|
|
1207
|
-
const
|
|
1208
|
-
return
|
|
1209
|
-
},
|
|
1210
|
-
|
|
1211
|
-
d.name !== "removed" &&
|
|
1382
|
+
const _ = ["vt-columns-selector__panel-item"];
|
|
1383
|
+
return i.value === d && _.push("vt-columns-selector__panel-item--dragging"), c.value === d && a.value === "before" && _.push("vt-columns-selector__panel-item--drop-before"), c.value === d && a.value === "after" && _.push("vt-columns-selector__panel-item--drop-after"), _;
|
|
1384
|
+
}, q = () => {
|
|
1385
|
+
l.value = [...o.columns.map((d) => ({ ...d }))], o.columnsSelector.forEach((d) => {
|
|
1386
|
+
d.name !== "removed" && s.value.add(d.name);
|
|
1212
1387
|
});
|
|
1213
|
-
},
|
|
1214
|
-
if (
|
|
1215
|
-
|
|
1388
|
+
}, Q = (d, _) => {
|
|
1389
|
+
if (_)
|
|
1390
|
+
l.value.some((w) => w.prop === d.prop) || l.value.push({ ...d });
|
|
1216
1391
|
else {
|
|
1217
|
-
if (
|
|
1392
|
+
if (C(d))
|
|
1218
1393
|
return;
|
|
1219
|
-
|
|
1394
|
+
l.value = l.value.filter((w) => w.prop !== d.prop);
|
|
1220
1395
|
}
|
|
1221
|
-
},
|
|
1222
|
-
if (
|
|
1223
|
-
d.columns.forEach((
|
|
1224
|
-
|
|
1396
|
+
}, U = (d, _) => {
|
|
1397
|
+
if (_)
|
|
1398
|
+
d.columns.forEach((w) => {
|
|
1399
|
+
l.value.some(($) => $.prop === w.prop) || l.value.push({ ...w });
|
|
1225
1400
|
});
|
|
1226
1401
|
else {
|
|
1227
|
-
const
|
|
1228
|
-
d.columns.forEach((
|
|
1229
|
-
const
|
|
1230
|
-
|
|
1231
|
-
}),
|
|
1232
|
-
(
|
|
1402
|
+
const w = [];
|
|
1403
|
+
d.columns.forEach(($) => {
|
|
1404
|
+
const T = l.value.find((E) => E.prop === $.prop);
|
|
1405
|
+
T && !C(T) && w.push(T);
|
|
1406
|
+
}), l.value = l.value.filter(
|
|
1407
|
+
($) => !w.some((T) => T.prop === $.prop)
|
|
1233
1408
|
);
|
|
1234
1409
|
}
|
|
1235
|
-
},
|
|
1236
|
-
const
|
|
1237
|
-
return !
|
|
1238
|
-
},
|
|
1239
|
-
|
|
1240
|
-
},
|
|
1241
|
-
n("update-columns", [...
|
|
1242
|
-
},
|
|
1243
|
-
|
|
1410
|
+
}, oe = (d) => l.value.some((_) => _.prop === d.prop), k = (d) => {
|
|
1411
|
+
const _ = l.value.find((w) => w.prop === d.prop);
|
|
1412
|
+
return !_ || !C(_);
|
|
1413
|
+
}, m = (d) => {
|
|
1414
|
+
s.value.has(d) ? s.value.delete(d) : s.value.add(d);
|
|
1415
|
+
}, y = () => {
|
|
1416
|
+
n("update-columns", [...l.value]), ce.close();
|
|
1417
|
+
}, M = () => {
|
|
1418
|
+
ce.close();
|
|
1244
1419
|
};
|
|
1245
|
-
return
|
|
1246
|
-
|
|
1247
|
-
}), (d,
|
|
1248
|
-
h("div",
|
|
1249
|
-
h("div",
|
|
1250
|
-
(p(!0),
|
|
1251
|
-
key:
|
|
1252
|
-
class:
|
|
1253
|
-
draggable:
|
|
1254
|
-
onDragstart: (
|
|
1255
|
-
onDragover: (
|
|
1256
|
-
onDragleave:
|
|
1257
|
-
onDrop: (
|
|
1258
|
-
onDragend:
|
|
1420
|
+
return fe(() => {
|
|
1421
|
+
q();
|
|
1422
|
+
}), (d, _) => (p(), v("div", Vo, [
|
|
1423
|
+
h("div", Io, [
|
|
1424
|
+
h("div", Bo, [
|
|
1425
|
+
(p(!0), v(re, null, ie(l.value, (w, $) => (p(), v("div", {
|
|
1426
|
+
key: w.prop,
|
|
1427
|
+
class: z(K($)),
|
|
1428
|
+
draggable: L(w),
|
|
1429
|
+
onDragstart: (T) => N(T, $),
|
|
1430
|
+
onDragover: (T) => R(T, $),
|
|
1431
|
+
onDragleave: A,
|
|
1432
|
+
onDrop: (T) => b(T, $),
|
|
1433
|
+
onDragend: I
|
|
1259
1434
|
}, [
|
|
1260
|
-
F(
|
|
1261
|
-
name:
|
|
1262
|
-
class:
|
|
1435
|
+
F(G, {
|
|
1436
|
+
name: L(w) ? "columnsMove" : "freeze",
|
|
1437
|
+
class: z(["vt-columns-selector__panel-item-icon", { "vt-columns-selector__panel-item-icon--draggable": L(w) }])
|
|
1263
1438
|
}, null, 8, ["name", "class"]),
|
|
1264
|
-
F(
|
|
1265
|
-
label:
|
|
1439
|
+
F(pe, {
|
|
1440
|
+
label: w.label,
|
|
1266
1441
|
checked: !0,
|
|
1267
|
-
disabled:
|
|
1268
|
-
onChange: (
|
|
1269
|
-
onClick:
|
|
1442
|
+
disabled: C(w),
|
|
1443
|
+
onChange: (T) => Q(w, T),
|
|
1444
|
+
onClick: _[0] || (_[0] = he(() => {
|
|
1270
1445
|
}, ["stop"]))
|
|
1271
1446
|
}, null, 8, ["label", "disabled", "onChange"]),
|
|
1272
|
-
|
|
1273
|
-
], 42,
|
|
1447
|
+
C(w) ? (p(), v("span", Eo, "pinned")) : W("", !0)
|
|
1448
|
+
], 42, To))), 128))
|
|
1274
1449
|
]),
|
|
1275
|
-
h("div",
|
|
1276
|
-
(p(!0),
|
|
1277
|
-
var
|
|
1278
|
-
return p(),
|
|
1279
|
-
key:
|
|
1450
|
+
h("div", Ro, [
|
|
1451
|
+
(p(!0), v(re, null, ie(r.value, (w) => {
|
|
1452
|
+
var $, T;
|
|
1453
|
+
return p(), v("div", {
|
|
1454
|
+
key: w.name,
|
|
1280
1455
|
class: "vt-columns-selector__group"
|
|
1281
1456
|
}, [
|
|
1282
1457
|
h("div", {
|
|
1283
1458
|
class: "vt-columns-selector__group-header",
|
|
1284
|
-
onClick: (
|
|
1459
|
+
onClick: (E) => m(w.name)
|
|
1285
1460
|
}, [
|
|
1286
|
-
F(
|
|
1287
|
-
label:
|
|
1288
|
-
checked: ((
|
|
1289
|
-
indeterminate: ((
|
|
1290
|
-
onChange: (
|
|
1291
|
-
onClick:
|
|
1461
|
+
F(pe, {
|
|
1462
|
+
label: w.label,
|
|
1463
|
+
checked: (($ = u.value[w.name]) == null ? void 0 : $.checked) || !1,
|
|
1464
|
+
indeterminate: ((T = u.value[w.name]) == null ? void 0 : T.indeterminate) || !1,
|
|
1465
|
+
onChange: (E) => U(w, E),
|
|
1466
|
+
onClick: _[1] || (_[1] = he(() => {
|
|
1292
1467
|
}, ["stop"]))
|
|
1293
1468
|
}, null, 8, ["label", "checked", "indeterminate", "onChange"]),
|
|
1294
|
-
|
|
1469
|
+
w.icon ? (p(), ne(G, {
|
|
1295
1470
|
key: 0,
|
|
1296
|
-
name:
|
|
1471
|
+
name: w.icon,
|
|
1297
1472
|
class: "vt-columns-selector__group-icon"
|
|
1298
|
-
}, null, 8, ["name"])) :
|
|
1299
|
-
], 8,
|
|
1300
|
-
|
|
1301
|
-
(p(!0),
|
|
1302
|
-
key:
|
|
1473
|
+
}, null, 8, ["name"])) : W("", !0)
|
|
1474
|
+
], 8, zo),
|
|
1475
|
+
s.value.has(w.name) ? (p(), v("div", Ho, [
|
|
1476
|
+
(p(!0), v(re, null, ie(w.columns, (E) => (p(), v("div", {
|
|
1477
|
+
key: E.prop,
|
|
1303
1478
|
class: "vt-columns-selector__group-column"
|
|
1304
1479
|
}, [
|
|
1305
|
-
F(
|
|
1306
|
-
label:
|
|
1307
|
-
checked:
|
|
1308
|
-
disabled: !
|
|
1309
|
-
onChange: (
|
|
1480
|
+
F(pe, {
|
|
1481
|
+
label: E.label,
|
|
1482
|
+
checked: oe(E),
|
|
1483
|
+
disabled: !k(E),
|
|
1484
|
+
onChange: (J) => Q(E, J)
|
|
1310
1485
|
}, null, 8, ["label", "checked", "disabled", "onChange"]),
|
|
1311
|
-
|
|
1486
|
+
k(E) ? W("", !0) : (p(), v("span", Wo, " (закріплена) "))
|
|
1312
1487
|
]))), 128))
|
|
1313
|
-
])) :
|
|
1488
|
+
])) : W("", !0)
|
|
1314
1489
|
]);
|
|
1315
1490
|
}), 128))
|
|
1316
1491
|
])
|
|
1317
1492
|
]),
|
|
1318
|
-
h("div",
|
|
1319
|
-
F(
|
|
1320
|
-
default:
|
|
1493
|
+
h("div", Do, [
|
|
1494
|
+
F(we, { onClick: M }, {
|
|
1495
|
+
default: ue(() => _[2] || (_[2] = [
|
|
1321
1496
|
ge("Скасувати", -1)
|
|
1322
1497
|
])),
|
|
1323
1498
|
_: 1,
|
|
1324
1499
|
__: [2]
|
|
1325
1500
|
}),
|
|
1326
|
-
F(
|
|
1501
|
+
F(we, {
|
|
1327
1502
|
type: "primary",
|
|
1328
|
-
onClick:
|
|
1503
|
+
onClick: y
|
|
1329
1504
|
}, {
|
|
1330
|
-
default:
|
|
1505
|
+
default: ue(() => _[3] || (_[3] = [
|
|
1331
1506
|
ge("Зберегти", -1)
|
|
1332
1507
|
])),
|
|
1333
1508
|
_: 1,
|
|
@@ -1336,7 +1511,7 @@ const ae = new Io(), Vo = {
|
|
|
1336
1511
|
])
|
|
1337
1512
|
]));
|
|
1338
1513
|
}
|
|
1339
|
-
}),
|
|
1514
|
+
}), Ao = { class: "vt-table-header-actions" }, Oo = /* @__PURE__ */ te({
|
|
1340
1515
|
__name: "ColumnActions",
|
|
1341
1516
|
props: {
|
|
1342
1517
|
column: {},
|
|
@@ -1345,109 +1520,105 @@ const ae = new Io(), Vo = {
|
|
|
1345
1520
|
},
|
|
1346
1521
|
emits: ["pin", "update-columns"],
|
|
1347
1522
|
setup(t, { emit: e }) {
|
|
1348
|
-
const o = t, n = e,
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
},
|
|
1363
|
-
var z, H;
|
|
1364
|
-
!((z = l.value) != null && z.contains(M.target)) && !((H = s.value) != null && H.contains(M.target)) && N();
|
|
1365
|
-
}, U = () => {
|
|
1366
|
-
K() ? (n("pin", o.column, "none"), console.log(`Колонка "${o.column.label}" відкріплена`)) : (n("pin", o.column, "left"), console.log(`Колонка "${o.column.label}" прикріплена зліва`)), N();
|
|
1367
|
-
}, G = (M) => ({
|
|
1523
|
+
const o = t, n = e, l = () => !!(o.column.pinnedLeft || o.column.pinnedRight), s = (r) => {
|
|
1524
|
+
switch (console.log("ColumnActions - Command received:", r, typeof r), String(r)) {
|
|
1525
|
+
case "pin":
|
|
1526
|
+
console.log("Executing pin command"), i();
|
|
1527
|
+
break;
|
|
1528
|
+
case "columns":
|
|
1529
|
+
console.log("Executing columns command"), u();
|
|
1530
|
+
break;
|
|
1531
|
+
default:
|
|
1532
|
+
console.warn("Unknown command:", r);
|
|
1533
|
+
}
|
|
1534
|
+
}, i = () => {
|
|
1535
|
+
const r = l();
|
|
1536
|
+
console.log("handlePin called, isPinned:", r), r ? n("pin", o.column, "none") : n("pin", o.column, "left");
|
|
1537
|
+
}, c = (r) => ({
|
|
1368
1538
|
name: "removed",
|
|
1369
1539
|
label: "Видалені колонки",
|
|
1370
1540
|
order: 999,
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
}), d || (d = o.allColumns.find((f) => f.prop === V)), d && Q.push(d);
|
|
1541
|
+
columns: r
|
|
1542
|
+
}), a = (r) => {
|
|
1543
|
+
var N;
|
|
1544
|
+
const C = new Set(r.map((R) => R.prop)), L = /* @__PURE__ */ new Set();
|
|
1545
|
+
(N = o.columnsSelector) == null || N.forEach((R) => {
|
|
1546
|
+
R.columns.forEach((A) => L.add(A.prop));
|
|
1547
|
+
}), o.allColumns.forEach((R) => L.add(R.prop));
|
|
1548
|
+
const j = [];
|
|
1549
|
+
L.forEach((R) => {
|
|
1550
|
+
var A;
|
|
1551
|
+
if (!C.has(R)) {
|
|
1552
|
+
let b;
|
|
1553
|
+
(A = o.columnsSelector) == null || A.forEach((I) => {
|
|
1554
|
+
const V = I.columns.find((K) => K.prop === R);
|
|
1555
|
+
V && (b = V);
|
|
1556
|
+
}), b || (b = o.allColumns.find((I) => I.prop === R)), b && j.push(b);
|
|
1388
1557
|
}
|
|
1389
1558
|
});
|
|
1390
|
-
const
|
|
1391
|
-
|
|
1392
|
-
},
|
|
1393
|
-
|
|
1394
|
-
|
|
1559
|
+
const Y = [...o.columnsSelector || []];
|
|
1560
|
+
return j.length > 0 && Y.push(c(j)), Y;
|
|
1561
|
+
}, u = () => {
|
|
1562
|
+
console.log("handleToggleVisibility called");
|
|
1563
|
+
const r = a(o.allColumns);
|
|
1564
|
+
ce.open({
|
|
1565
|
+
component: Po,
|
|
1395
1566
|
title: "Управління колонками таблиці",
|
|
1396
1567
|
props: {
|
|
1397
1568
|
columns: o.allColumns,
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
"onUpdate-columns": (M) => {
|
|
1402
|
-
console.log("ColumnActions отримав оновлені колонки:", M), n("update-columns", M), Y(M);
|
|
1569
|
+
columnsSelector: r,
|
|
1570
|
+
"onUpdate-columns": (C) => {
|
|
1571
|
+
n("update-columns", C);
|
|
1403
1572
|
}
|
|
1404
1573
|
},
|
|
1405
1574
|
size: "large",
|
|
1406
1575
|
closeOnBackdropClick: !1
|
|
1407
|
-
})
|
|
1408
|
-
}
|
|
1409
|
-
return
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
}
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1576
|
+
});
|
|
1577
|
+
};
|
|
1578
|
+
return (r, C) => (p(), ne(Ge, {
|
|
1579
|
+
trigger: "click",
|
|
1580
|
+
placement: "bottom-start",
|
|
1581
|
+
onCommand: s
|
|
1582
|
+
}, {
|
|
1583
|
+
dropdown: ue(() => [
|
|
1584
|
+
F(Me, { command: "pin" }, {
|
|
1585
|
+
default: ue(() => [
|
|
1586
|
+
F(G, {
|
|
1587
|
+
name: l() ? "unfreeze" : "freeze"
|
|
1588
|
+
}, null, 8, ["name"]),
|
|
1589
|
+
h("div", null, ee(l() ? "Розморозити" : "Заморозити"), 1)
|
|
1590
|
+
]),
|
|
1591
|
+
_: 1
|
|
1592
|
+
}),
|
|
1593
|
+
F(Me, { command: "columns" }, {
|
|
1594
|
+
default: ue(() => [
|
|
1595
|
+
F(G, { name: "columnInsert" }),
|
|
1596
|
+
C[0] || (C[0] = h("div", null, "Колонки", -1))
|
|
1597
|
+
]),
|
|
1598
|
+
_: 1,
|
|
1599
|
+
__: [0]
|
|
1600
|
+
})
|
|
1601
|
+
]),
|
|
1602
|
+
default: ue(() => [
|
|
1603
|
+
h("div", Ao, [
|
|
1604
|
+
F(G, { name: "listBullet" })
|
|
1435
1605
|
])
|
|
1436
|
-
]
|
|
1437
|
-
|
|
1606
|
+
]),
|
|
1607
|
+
_: 1
|
|
1608
|
+
}));
|
|
1438
1609
|
}
|
|
1439
|
-
}),
|
|
1610
|
+
}), jo = { class: "vt-table" }, No = { class: "vt-th__content" }, Fo = { class: "vt-th__content" }, Zo = { class: "vt-th__label" }, Yo = {
|
|
1440
1611
|
key: 0,
|
|
1441
1612
|
class: "vt-th__sortable"
|
|
1442
|
-
},
|
|
1613
|
+
}, Uo = ["data-resizer", "onMousedown"], Xo = {
|
|
1443
1614
|
key: 0,
|
|
1444
1615
|
class: "vt-table__empty-row"
|
|
1445
|
-
},
|
|
1616
|
+
}, Ko = ["colspan"], qo = { class: "vt-table__empty-content" }, Go = ["onClick"], Jo = { class: "vt-table__cell-content" }, Qo = { class: "vt-table__cell-content vt-table__cell-content--ellipsis" }, el = { key: 1 }, tl = ["data-resizer", "onMousedown"], nl = {
|
|
1446
1617
|
key: 0,
|
|
1447
1618
|
class: "vt-table__summary"
|
|
1448
|
-
},
|
|
1619
|
+
}, ol = { class: "vt-table__cell-content vt-table__cell-content--summary" }, xe = 50, ll = /* @__PURE__ */ te({
|
|
1449
1620
|
__name: "VTable",
|
|
1450
|
-
props: /* @__PURE__ */
|
|
1621
|
+
props: /* @__PURE__ */ Re({
|
|
1451
1622
|
data: {},
|
|
1452
1623
|
maxHeight: { default: void 0 },
|
|
1453
1624
|
rowKey: { default: "id" },
|
|
@@ -1469,338 +1640,330 @@ const ae = new Io(), Vo = {
|
|
|
1469
1640
|
},
|
|
1470
1641
|
columnsModifiers: {}
|
|
1471
1642
|
}),
|
|
1472
|
-
emits: /* @__PURE__ */
|
|
1643
|
+
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"]),
|
|
1473
1644
|
setup(t, { expose: e, emit: o }) {
|
|
1474
|
-
const n = t,
|
|
1475
|
-
let
|
|
1476
|
-
const
|
|
1477
|
-
|
|
1645
|
+
const n = t, l = o, s = vt(t, "columns"), i = P({}), c = P(), a = ft([]), u = P(n.defaultSort || null), r = S(() => Lo(n.data || [], u.value, a)), C = S(() => s.value !== void 0), L = S(() => n.data && n.data.length > 0), j = P(!1), Y = P(0);
|
|
1646
|
+
let N;
|
|
1647
|
+
const R = (f, g) => n.rowKey && f[n.rowKey] != null ? String(f[n.rowKey]) : String(g), A = () => {
|
|
1648
|
+
C.value && s.value ? a.splice(0, a.length, ...s.value) : n.columns && n.columns.length > 0 && a.splice(0, a.length, ...n.columns);
|
|
1478
1649
|
};
|
|
1479
|
-
|
|
1480
|
-
() =>
|
|
1481
|
-
(
|
|
1482
|
-
|
|
1650
|
+
ve(
|
|
1651
|
+
() => s.value,
|
|
1652
|
+
(f) => {
|
|
1653
|
+
f && C.value && a.splice(0, a.length, ...f);
|
|
1483
1654
|
},
|
|
1484
1655
|
{ deep: !0 }
|
|
1485
|
-
),
|
|
1656
|
+
), ve(
|
|
1486
1657
|
() => n.columns,
|
|
1487
|
-
(
|
|
1488
|
-
|
|
1658
|
+
(f) => {
|
|
1659
|
+
f && !C.value && a.splice(0, a.length, ...f);
|
|
1489
1660
|
},
|
|
1490
1661
|
{ deep: !0 }
|
|
1491
|
-
),
|
|
1492
|
-
const { sortedColumns:
|
|
1662
|
+
), Ye("vt-table-columns", a);
|
|
1663
|
+
const { sortedColumns: b, getDefaultColumnWidth: I, getStickyOffset: V } = wo(a), { getTableWrapperStyle: K, getColumnStyle: q, getHeaderStyle: Q, getFooterStyle: U } = Co(n), { onMouseDown: oe } = ko(), k = S(() => n.allData || n.data), m = n.selectable ? bo(n, r, l, k) : null, y = () => ({
|
|
1493
1664
|
width: `${xe}px`,
|
|
1494
1665
|
minWidth: `${xe}px`,
|
|
1495
1666
|
maxWidth: `${xe}px`,
|
|
1496
1667
|
left: "0px",
|
|
1497
1668
|
position: "sticky",
|
|
1498
1669
|
zIndex: 10
|
|
1499
|
-
}),
|
|
1500
|
-
const
|
|
1670
|
+
}), M = () => {
|
|
1671
|
+
const f = y();
|
|
1501
1672
|
return n.maxHeight ? {
|
|
1502
|
-
...
|
|
1673
|
+
...f,
|
|
1503
1674
|
top: "0px",
|
|
1504
1675
|
zIndex: 11
|
|
1505
|
-
} :
|
|
1676
|
+
} : f;
|
|
1506
1677
|
}, d = () => {
|
|
1507
|
-
const
|
|
1678
|
+
const f = y();
|
|
1508
1679
|
return n.maxHeight ? {
|
|
1509
|
-
...
|
|
1680
|
+
...f,
|
|
1510
1681
|
bottom: "0px",
|
|
1511
1682
|
zIndex: 11
|
|
1512
|
-
} :
|
|
1513
|
-
},
|
|
1514
|
-
if (!
|
|
1515
|
-
const
|
|
1516
|
-
|
|
1517
|
-
const
|
|
1518
|
-
|
|
1519
|
-
|
|
1683
|
+
} : f;
|
|
1684
|
+
}, _ = () => {
|
|
1685
|
+
if (!c.value || j.value) return;
|
|
1686
|
+
const f = c.value, g = f.scrollTop, B = f.scrollHeight, H = f.clientHeight, O = 30;
|
|
1687
|
+
N && clearTimeout(N), N = setTimeout(() => {
|
|
1688
|
+
const _e = g - Y.value > 1, x = B - g - H <= O, le = B - g - H <= 5;
|
|
1689
|
+
Y.value = g, _e && (x || le) && (j.value = !0, l("infinity-scroll"), setTimeout(() => {
|
|
1690
|
+
j.value = !1;
|
|
1520
1691
|
}, 1e3));
|
|
1521
1692
|
}, 50);
|
|
1522
|
-
},
|
|
1523
|
-
|
|
1693
|
+
}, w = () => {
|
|
1694
|
+
j.value = !1;
|
|
1524
1695
|
};
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
}),
|
|
1528
|
-
|
|
1696
|
+
fe(() => {
|
|
1697
|
+
c.value && c.value.addEventListener("scroll", _);
|
|
1698
|
+
}), Ve(() => {
|
|
1699
|
+
N && clearTimeout(N), c.value && c.value.removeEventListener("scroll", _);
|
|
1529
1700
|
});
|
|
1530
|
-
const
|
|
1531
|
-
|
|
1532
|
-
var
|
|
1533
|
-
((
|
|
1534
|
-
column:
|
|
1535
|
-
direction: ((
|
|
1536
|
-
prop:
|
|
1537
|
-
sortedData:
|
|
1701
|
+
const $ = (f, g) => {
|
|
1702
|
+
Mo(f, g, (B) => {
|
|
1703
|
+
var H, O;
|
|
1704
|
+
((H = u.value) == null ? void 0 : H.prop) === f.prop && u.value.direction === g ? u.value = null : u.value = B, l("sort-change", {
|
|
1705
|
+
column: f,
|
|
1706
|
+
direction: ((O = u.value) == null ? void 0 : O.direction) || null,
|
|
1707
|
+
prop: f.prop,
|
|
1708
|
+
sortedData: r.value
|
|
1538
1709
|
});
|
|
1539
1710
|
});
|
|
1540
|
-
},
|
|
1541
|
-
const
|
|
1542
|
-
pinnedLeft:
|
|
1543
|
-
pinnedRight:
|
|
1711
|
+
}, T = (f, g) => {
|
|
1712
|
+
const B = {
|
|
1713
|
+
pinnedLeft: g === "left",
|
|
1714
|
+
pinnedRight: g === "right"
|
|
1544
1715
|
};
|
|
1545
|
-
|
|
1546
|
-
},
|
|
1547
|
-
|
|
1548
|
-
},
|
|
1549
|
-
const
|
|
1550
|
-
if (
|
|
1551
|
-
if (Object.assign(
|
|
1552
|
-
const
|
|
1553
|
-
if (
|
|
1554
|
-
const
|
|
1555
|
-
|
|
1716
|
+
J(f.prop, B), l("column-pin", { column: { ...f, ...B }, position: g });
|
|
1717
|
+
}, E = (f) => {
|
|
1718
|
+
a.splice(0, a.length, ...f), C.value && (s.value = [...f]), l("columns-change", [...f]);
|
|
1719
|
+
}, J = (f, g) => {
|
|
1720
|
+
const B = a.findIndex((H) => H.prop === f);
|
|
1721
|
+
if (B !== -1) {
|
|
1722
|
+
if (Object.assign(a[B], g), C.value && s.value) {
|
|
1723
|
+
const H = s.value.findIndex((O) => O.prop === f);
|
|
1724
|
+
if (H !== -1) {
|
|
1725
|
+
const O = [...s.value];
|
|
1726
|
+
O[H] = { ...O[H], ...g }, s.value = O;
|
|
1556
1727
|
}
|
|
1557
1728
|
}
|
|
1558
|
-
|
|
1729
|
+
l("columns-change", [...a]);
|
|
1559
1730
|
}
|
|
1560
|
-
},
|
|
1561
|
-
|
|
1562
|
-
},
|
|
1563
|
-
|
|
1564
|
-
},
|
|
1565
|
-
|
|
1566
|
-
}, Ie = (
|
|
1567
|
-
|
|
1568
|
-
},
|
|
1569
|
-
const
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
column: { ...
|
|
1573
|
-
width:
|
|
1574
|
-
oldWidth:
|
|
1731
|
+
}, Ce = (f, g, B) => {
|
|
1732
|
+
l("row-click", { row: f, column: g, event: B }), n.highlightCurrentRow && m && m.setCurrentRow(f);
|
|
1733
|
+
}, Je = (f, g, B) => {
|
|
1734
|
+
B.stopPropagation(), m && m.toggleRowSelection(g, f);
|
|
1735
|
+
}, Qe = (f, g) => {
|
|
1736
|
+
g.stopPropagation(), m && m.toggleAllSelection();
|
|
1737
|
+
}, Ie = (f, g) => {
|
|
1738
|
+
f && (i.value[g] = f);
|
|
1739
|
+
}, Be = (f, g) => {
|
|
1740
|
+
const B = g.width || I();
|
|
1741
|
+
oe(f, g, I, (H) => {
|
|
1742
|
+
J(g.prop, { width: H }), l("column-resize", {
|
|
1743
|
+
column: { ...g, width: H },
|
|
1744
|
+
width: H,
|
|
1745
|
+
oldWidth: B
|
|
1575
1746
|
});
|
|
1576
1747
|
});
|
|
1577
|
-
},
|
|
1578
|
-
if (!
|
|
1579
|
-
const
|
|
1580
|
-
return
|
|
1581
|
-
},
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
}, nt = L(() => {
|
|
1585
|
-
if (!n.showSummary || !$.value) return {};
|
|
1586
|
-
const v = i;
|
|
1748
|
+
}, et = (f, g) => q(f, g, V, I), tt = (f, g) => Q(f, g, V, I), nt = (f, g) => U(f, g, V, I), ot = (f, g) => {
|
|
1749
|
+
if (!g || !g.prop) return "";
|
|
1750
|
+
const B = f[g.prop];
|
|
1751
|
+
return B == null ? "" : String(B);
|
|
1752
|
+
}, lt = S(() => {
|
|
1753
|
+
if (!n.showSummary || !L.value) return {};
|
|
1754
|
+
const f = a;
|
|
1587
1755
|
if (typeof n.summaryMethod == "function") {
|
|
1588
|
-
const
|
|
1589
|
-
return
|
|
1590
|
-
(
|
|
1756
|
+
const g = n.summaryMethod({ columns: f, data: r.value });
|
|
1757
|
+
return f.reduce(
|
|
1758
|
+
(B, H, O) => (B[H.prop] = g[O], B),
|
|
1591
1759
|
{}
|
|
1592
1760
|
);
|
|
1593
1761
|
}
|
|
1594
|
-
return
|
|
1595
|
-
(
|
|
1596
|
-
const
|
|
1597
|
-
return
|
|
1762
|
+
return f.reduce(
|
|
1763
|
+
(g, B) => {
|
|
1764
|
+
const H = r.value.map((O) => O[B.prop]);
|
|
1765
|
+
return g[B.prop] = H.every((O) => typeof O == "number") ? H.reduce((O, me) => O + me, 0) : "", g;
|
|
1598
1766
|
},
|
|
1599
1767
|
{}
|
|
1600
1768
|
);
|
|
1601
|
-
}),
|
|
1602
|
-
|
|
1603
|
-
}, st = () => {
|
|
1604
|
-
C && C.toggleAllSelection();
|
|
1605
|
-
}, rt = () => {
|
|
1606
|
-
C && C.selectAbsolutelyAll();
|
|
1769
|
+
}), st = S(() => n.showSummary && L.value), rt = (f, g) => {
|
|
1770
|
+
m && m.toggleRowSelection(f, g);
|
|
1607
1771
|
}, it = () => {
|
|
1608
|
-
|
|
1609
|
-
}, at = () =>
|
|
1610
|
-
|
|
1772
|
+
m && m.toggleAllSelection();
|
|
1773
|
+
}, at = () => {
|
|
1774
|
+
m && m.selectAbsolutelyAll();
|
|
1775
|
+
}, ct = () => {
|
|
1776
|
+
m && m.clearSelection();
|
|
1777
|
+
}, dt = () => m ? m.getSelectionRows() : [], ut = (f) => {
|
|
1778
|
+
m && m.setSelectionRows(f);
|
|
1611
1779
|
};
|
|
1612
|
-
return
|
|
1613
|
-
|
|
1780
|
+
return fe(() => {
|
|
1781
|
+
A();
|
|
1614
1782
|
}), e({
|
|
1615
|
-
toggleRowSelection:
|
|
1616
|
-
toggleAllSelection:
|
|
1617
|
-
selectAbsolutelyAll:
|
|
1618
|
-
clearSelection:
|
|
1619
|
-
getSelectionRows:
|
|
1620
|
-
setSelectionRows:
|
|
1621
|
-
resetInfinityScroll:
|
|
1622
|
-
}), (
|
|
1623
|
-
var
|
|
1624
|
-
const
|
|
1625
|
-
return p(),
|
|
1783
|
+
toggleRowSelection: rt,
|
|
1784
|
+
toggleAllSelection: it,
|
|
1785
|
+
selectAbsolutelyAll: at,
|
|
1786
|
+
clearSelection: ct,
|
|
1787
|
+
getSelectionRows: dt,
|
|
1788
|
+
setSelectionRows: ut,
|
|
1789
|
+
resetInfinityScroll: w
|
|
1790
|
+
}), (f, g) => {
|
|
1791
|
+
var H, O, me, _e;
|
|
1792
|
+
const B = Fe("tooltip");
|
|
1793
|
+
return p(), v("div", {
|
|
1626
1794
|
ref_key: "tableWrapperRef",
|
|
1627
|
-
ref:
|
|
1795
|
+
ref: c,
|
|
1628
1796
|
class: "vt-table-wrapper",
|
|
1629
|
-
style:
|
|
1630
|
-
onScroll:
|
|
1797
|
+
style: se(X(K)()),
|
|
1798
|
+
onScroll: _
|
|
1631
1799
|
}, [
|
|
1632
|
-
|
|
1633
|
-
h("table",
|
|
1800
|
+
de(f.$slots, "default"),
|
|
1801
|
+
h("table", jo, [
|
|
1634
1802
|
h("thead", null, [
|
|
1635
1803
|
h("tr", null, [
|
|
1636
|
-
n.selectable ? (p(),
|
|
1804
|
+
n.selectable ? (p(), v("th", {
|
|
1637
1805
|
key: 0,
|
|
1638
|
-
class:
|
|
1806
|
+
class: z(["vt-table__th vt-table__th--selection", {
|
|
1639
1807
|
"vt-table__th--sticky": n.maxHeight,
|
|
1640
1808
|
"vt-table__th--pinned-left": !0
|
|
1641
1809
|
}]),
|
|
1642
|
-
style:
|
|
1810
|
+
style: se(M())
|
|
1643
1811
|
}, [
|
|
1644
|
-
h("div",
|
|
1645
|
-
F(
|
|
1646
|
-
checked: (
|
|
1647
|
-
indeterminate: (
|
|
1648
|
-
"is-double": (
|
|
1649
|
-
onChange:
|
|
1812
|
+
h("div", No, [
|
|
1813
|
+
F(pe, {
|
|
1814
|
+
checked: (H = X(m)) == null ? void 0 : H.isAllSelected.value,
|
|
1815
|
+
indeterminate: (O = X(m)) == null ? void 0 : O.isIndeterminate.value,
|
|
1816
|
+
"is-double": (_e = (me = X(m)) == null ? void 0 : me.isDoubleCheck) == null ? void 0 : _e.value,
|
|
1817
|
+
onChange: Qe
|
|
1650
1818
|
}, null, 8, ["checked", "indeterminate", "is-double"])
|
|
1651
1819
|
])
|
|
1652
|
-
], 6)) :
|
|
1653
|
-
(p(!0),
|
|
1654
|
-
key:
|
|
1820
|
+
], 6)) : W("", !0),
|
|
1821
|
+
(p(!0), v(re, null, ie(X(b), (x, le) => (p(), v("th", {
|
|
1822
|
+
key: x.prop,
|
|
1655
1823
|
ref_for: !0,
|
|
1656
|
-
ref: (
|
|
1657
|
-
style:
|
|
1658
|
-
class:
|
|
1824
|
+
ref: (ae) => Ie(ae, x.prop),
|
|
1825
|
+
style: se(tt(x, le)),
|
|
1826
|
+
class: z([
|
|
1659
1827
|
"vt-table__th",
|
|
1660
1828
|
{
|
|
1661
1829
|
"vt-table__th--sticky": n.maxHeight,
|
|
1662
|
-
"vt-table__th--pinned-left":
|
|
1663
|
-
"vt-table__th--pinned-right":
|
|
1664
|
-
"vt-table__th--sortable":
|
|
1830
|
+
"vt-table__th--pinned-left": x.pinnedLeft,
|
|
1831
|
+
"vt-table__th--pinned-right": x.pinnedRight,
|
|
1832
|
+
"vt-table__th--sortable": x.sortable
|
|
1665
1833
|
}
|
|
1666
1834
|
])
|
|
1667
1835
|
}, [
|
|
1668
|
-
h("div",
|
|
1669
|
-
h("div",
|
|
1670
|
-
|
|
1671
|
-
F(
|
|
1836
|
+
h("div", Fo, [
|
|
1837
|
+
h("div", Zo, ee(x.label), 1),
|
|
1838
|
+
x.sortable ? (p(), v("div", Yo, [
|
|
1839
|
+
F(G, {
|
|
1672
1840
|
name: "arrowTop",
|
|
1673
|
-
class:
|
|
1674
|
-
onClick: he((
|
|
1841
|
+
class: z(X(He)(x, u.value).asc),
|
|
1842
|
+
onClick: he((ae) => $(x, "asc"), ["stop"])
|
|
1675
1843
|
}, null, 8, ["class", "onClick"]),
|
|
1676
|
-
F(
|
|
1844
|
+
F(G, {
|
|
1677
1845
|
name: "arrowDown",
|
|
1678
|
-
class:
|
|
1679
|
-
onClick: he((
|
|
1846
|
+
class: z(X(He)(x, u.value).desc),
|
|
1847
|
+
onClick: he((ae) => $(x, "desc"), ["stop"])
|
|
1680
1848
|
}, null, 8, ["class", "onClick"])
|
|
1681
|
-
])) :
|
|
1682
|
-
|
|
1849
|
+
])) : W("", !0),
|
|
1850
|
+
x.actionColumn ? (p(), ne(Oo, {
|
|
1683
1851
|
key: 1,
|
|
1684
|
-
column:
|
|
1685
|
-
"all-columns":
|
|
1852
|
+
column: x,
|
|
1853
|
+
"all-columns": X(b),
|
|
1686
1854
|
columnsSelector: n.columnsSelector,
|
|
1687
|
-
onPin:
|
|
1688
|
-
onUpdateColumns:
|
|
1689
|
-
}, null, 8, ["column", "all-columns", "columnsSelector"])) :
|
|
1855
|
+
onPin: T,
|
|
1856
|
+
onUpdateColumns: E
|
|
1857
|
+
}, null, 8, ["column", "all-columns", "columnsSelector"])) : W("", !0)
|
|
1690
1858
|
]),
|
|
1691
1859
|
h("div", {
|
|
1692
1860
|
class: "vt-table__resizer",
|
|
1693
|
-
"data-resizer":
|
|
1694
|
-
onMousedown: (
|
|
1695
|
-
}, null, 40,
|
|
1861
|
+
"data-resizer": x.prop,
|
|
1862
|
+
onMousedown: (ae) => Be(ae, x)
|
|
1863
|
+
}, null, 40, Uo)
|
|
1696
1864
|
], 6))), 128))
|
|
1697
1865
|
])
|
|
1698
1866
|
]),
|
|
1699
1867
|
h("tbody", null, [
|
|
1700
|
-
|
|
1701
|
-
var
|
|
1702
|
-
return p(),
|
|
1703
|
-
key:
|
|
1704
|
-
class:
|
|
1868
|
+
L.value ? (p(!0), v(re, { key: 1 }, ie(r.value, (x, le) => {
|
|
1869
|
+
var ae, Te, Ee;
|
|
1870
|
+
return p(), v("tr", {
|
|
1871
|
+
key: R(x, le),
|
|
1872
|
+
class: z([
|
|
1705
1873
|
"vt-table__row",
|
|
1706
1874
|
{
|
|
1707
|
-
"vt-table__row--selected": (
|
|
1708
|
-
"vt-table__row--current": ((
|
|
1875
|
+
"vt-table__row--selected": (ae = X(m)) == null ? void 0 : ae.isRowSelected(x),
|
|
1876
|
+
"vt-table__row--current": ((Te = X(m)) == null ? void 0 : Te.currentRow.value) === x,
|
|
1709
1877
|
"vt-table__row--clickable": n.selectOnClickRow || n.highlightCurrentRow
|
|
1710
1878
|
}
|
|
1711
1879
|
]),
|
|
1712
|
-
onClick: (
|
|
1880
|
+
onClick: (Z) => Ce(x, X(b)[0], Z)
|
|
1713
1881
|
}, [
|
|
1714
|
-
n.selectable ? (p(),
|
|
1882
|
+
n.selectable ? (p(), v("td", {
|
|
1715
1883
|
key: 0,
|
|
1716
|
-
class:
|
|
1884
|
+
class: z(["vt-table__td vt-table__td--selection", {
|
|
1717
1885
|
"vt-table__td--pinned-left": !0
|
|
1718
1886
|
}]),
|
|
1719
|
-
style:
|
|
1887
|
+
style: se(y())
|
|
1720
1888
|
}, [
|
|
1721
|
-
h("div",
|
|
1722
|
-
F(
|
|
1723
|
-
checked: (
|
|
1724
|
-
onChange: (
|
|
1889
|
+
h("div", Jo, [
|
|
1890
|
+
F(pe, {
|
|
1891
|
+
checked: (Ee = X(m)) == null ? void 0 : Ee.isRowSelected(x),
|
|
1892
|
+
onChange: (Z, ke) => Je(Z, x, ke)
|
|
1725
1893
|
}, null, 8, ["checked", "onChange"])
|
|
1726
1894
|
])
|
|
1727
|
-
], 4)) :
|
|
1728
|
-
(p(!0),
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
"vt-table__td"
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
])
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
], 6));
|
|
1755
|
-
return Ee.memo = Te, Ee;
|
|
1756
|
-
}, _, 0), 128))
|
|
1757
|
-
], 10, Jo);
|
|
1758
|
-
}), 128)) : (p(), m("tr", Xo, [
|
|
1895
|
+
], 4)) : W("", !0),
|
|
1896
|
+
(p(!0), v(re, null, ie(X(b), (Z, ke) => (p(), v("td", {
|
|
1897
|
+
key: `${R(x, le)}-${Z.prop}`,
|
|
1898
|
+
ref_for: !0,
|
|
1899
|
+
ref: (be) => Ie(be, Z.prop),
|
|
1900
|
+
style: se(et(Z, ke)),
|
|
1901
|
+
class: z([
|
|
1902
|
+
"vt-table__td",
|
|
1903
|
+
{
|
|
1904
|
+
"vt-table__td--pinned-left": Z.pinnedLeft,
|
|
1905
|
+
"vt-table__td--pinned-right": Z.pinnedRight
|
|
1906
|
+
}
|
|
1907
|
+
])
|
|
1908
|
+
}, [
|
|
1909
|
+
Se((p(), v("div", Qo, [
|
|
1910
|
+
Z.renderSlot ? (p(), ne(Ne(() => X(yo)(Z.renderSlot, { row: x, column: Z, value: x[Z.prop], index: le })), { key: 0 })) : (p(), v("span", el, ee(x[Z.prop]), 1))
|
|
1911
|
+
])), [
|
|
1912
|
+
[B, Z.showOverflowTooltip ? ot(x, Z) : null]
|
|
1913
|
+
]),
|
|
1914
|
+
h("div", {
|
|
1915
|
+
class: "vt-table__resizer",
|
|
1916
|
+
"data-resizer": Z.prop,
|
|
1917
|
+
onMousedown: (be) => Be(be, Z)
|
|
1918
|
+
}, null, 40, tl)
|
|
1919
|
+
], 6))), 128))
|
|
1920
|
+
], 10, Go);
|
|
1921
|
+
}), 128)) : (p(), v("tr", Xo, [
|
|
1759
1922
|
h("td", {
|
|
1760
|
-
colspan:
|
|
1923
|
+
colspan: X(b).length + (n.selectable ? 1 : 0),
|
|
1761
1924
|
class: "vt-table__empty-cell"
|
|
1762
1925
|
}, [
|
|
1763
|
-
h("div",
|
|
1764
|
-
F(
|
|
1926
|
+
h("div", qo, [
|
|
1927
|
+
F(G, {
|
|
1765
1928
|
name: "empty",
|
|
1766
1929
|
class: "vt-table__empty-icon"
|
|
1767
1930
|
}),
|
|
1768
|
-
|
|
1931
|
+
g[0] || (g[0] = h("span", { class: "vt-table__empty-text" }, "Немає даних!", -1))
|
|
1769
1932
|
])
|
|
1770
|
-
], 8,
|
|
1933
|
+
], 8, Ko)
|
|
1771
1934
|
]))
|
|
1772
1935
|
]),
|
|
1773
|
-
|
|
1936
|
+
st.value ? (p(), v("tfoot", nl, [
|
|
1774
1937
|
h("tr", null, [
|
|
1775
|
-
n.selectable ? (p(),
|
|
1938
|
+
n.selectable ? (p(), v("td", {
|
|
1776
1939
|
key: 0,
|
|
1777
|
-
class:
|
|
1940
|
+
class: z(["vt-table__td", {
|
|
1778
1941
|
"vt-table__td--pinned-left": !0
|
|
1779
1942
|
}]),
|
|
1780
|
-
style:
|
|
1781
|
-
},
|
|
1943
|
+
style: se(d())
|
|
1944
|
+
}, g[1] || (g[1] = [
|
|
1782
1945
|
h("div", { class: "vt-table__cell-content vt-table__cell-content--summary" }, null, -1)
|
|
1783
|
-
]), 4)) :
|
|
1784
|
-
(p(!0),
|
|
1785
|
-
key:
|
|
1786
|
-
style:
|
|
1787
|
-
class:
|
|
1946
|
+
]), 4)) : W("", !0),
|
|
1947
|
+
(p(!0), v(re, null, ie(X(b), (x, le) => (p(), v("td", {
|
|
1948
|
+
key: x.prop,
|
|
1949
|
+
style: se(nt(x, le)),
|
|
1950
|
+
class: z([
|
|
1788
1951
|
"vt-table__td",
|
|
1789
1952
|
{
|
|
1790
|
-
"vt-table__td--pinned-left":
|
|
1791
|
-
"vt-table__td--pinned-right":
|
|
1953
|
+
"vt-table__td--pinned-left": x.pinnedLeft,
|
|
1954
|
+
"vt-table__td--pinned-right": x.pinnedRight
|
|
1792
1955
|
}
|
|
1793
1956
|
])
|
|
1794
1957
|
}, [
|
|
1795
|
-
h("div",
|
|
1958
|
+
h("div", ol, ee(lt.value[x.prop]), 1)
|
|
1796
1959
|
], 6))), 128))
|
|
1797
1960
|
])
|
|
1798
|
-
])) :
|
|
1961
|
+
])) : W("", !0)
|
|
1799
1962
|
])
|
|
1800
1963
|
], 36);
|
|
1801
1964
|
};
|
|
1802
1965
|
}
|
|
1803
|
-
}),
|
|
1966
|
+
}), sl = /* @__PURE__ */ te({
|
|
1804
1967
|
__name: "VTableColumn",
|
|
1805
1968
|
props: {
|
|
1806
1969
|
prop: {},
|
|
@@ -1818,11 +1981,11 @@ const ae = new Io(), Vo = {
|
|
|
1818
1981
|
sortMethod: {}
|
|
1819
1982
|
},
|
|
1820
1983
|
setup(t) {
|
|
1821
|
-
const e = t, o =
|
|
1984
|
+
const e = t, o = $e(), n = Ue("vt-table-columns");
|
|
1822
1985
|
n || console.error(
|
|
1823
1986
|
"VTableColumn: не знайдено контекст таблиці. Переконайтеся, що компонент використовується всередині VTable."
|
|
1824
1987
|
);
|
|
1825
|
-
const
|
|
1988
|
+
const l = () => ({
|
|
1826
1989
|
prop: e.prop,
|
|
1827
1990
|
label: e.label,
|
|
1828
1991
|
width: e.width,
|
|
@@ -1837,13 +2000,13 @@ const ae = new Io(), Vo = {
|
|
|
1837
2000
|
// Зберігаємо слот - пріоритет: назва колонки -> default -> slot
|
|
1838
2001
|
renderSlot: o[e.prop] ?? o.default ?? o.slot
|
|
1839
2002
|
});
|
|
1840
|
-
let
|
|
1841
|
-
return
|
|
2003
|
+
let s = -1;
|
|
2004
|
+
return fe(() => {
|
|
1842
2005
|
if (n) {
|
|
1843
|
-
const
|
|
1844
|
-
n.push(
|
|
2006
|
+
const i = l();
|
|
2007
|
+
n.push(i), s = n.length - 1;
|
|
1845
2008
|
}
|
|
1846
|
-
}),
|
|
2009
|
+
}), ve(
|
|
1847
2010
|
() => [
|
|
1848
2011
|
e.width,
|
|
1849
2012
|
e.minWidth,
|
|
@@ -1857,27 +2020,27 @@ const ae = new Io(), Vo = {
|
|
|
1857
2020
|
e.label
|
|
1858
2021
|
],
|
|
1859
2022
|
() => {
|
|
1860
|
-
if (n &&
|
|
1861
|
-
const
|
|
1862
|
-
if (
|
|
1863
|
-
const
|
|
1864
|
-
...
|
|
1865
|
-
renderSlot:
|
|
2023
|
+
if (n && s !== -1) {
|
|
2024
|
+
const i = n.findIndex((c) => c.prop === e.prop);
|
|
2025
|
+
if (i !== -1) {
|
|
2026
|
+
const c = n[i], a = {
|
|
2027
|
+
...l(),
|
|
2028
|
+
renderSlot: c.renderSlot
|
|
1866
2029
|
// Зберігаємо існуючий renderSlot
|
|
1867
2030
|
};
|
|
1868
|
-
n[
|
|
2031
|
+
n[i] = a;
|
|
1869
2032
|
}
|
|
1870
2033
|
}
|
|
1871
2034
|
},
|
|
1872
2035
|
{ deep: !0 }
|
|
1873
|
-
),
|
|
2036
|
+
), Ve(() => {
|
|
1874
2037
|
if (n) {
|
|
1875
|
-
const
|
|
1876
|
-
|
|
2038
|
+
const i = n.findIndex((c) => c.prop === e.prop);
|
|
2039
|
+
i > -1 && n.splice(i, 1);
|
|
1877
2040
|
}
|
|
1878
|
-
}), (
|
|
2041
|
+
}), (i, c) => null;
|
|
1879
2042
|
}
|
|
1880
|
-
}),
|
|
2043
|
+
}), We = (t, e) => {
|
|
1881
2044
|
const o = document.createElement("div");
|
|
1882
2045
|
o.className = `vt-tooltip vt-tooltip--${e}`, o.innerText = t, Object.assign(o.style, {
|
|
1883
2046
|
position: "absolute",
|
|
@@ -1944,45 +2107,45 @@ const ae = new Io(), Vo = {
|
|
|
1944
2107
|
}
|
|
1945
2108
|
return o.appendChild(n), o;
|
|
1946
2109
|
}, Le = (t, e, o) => {
|
|
1947
|
-
const n = e.getBoundingClientRect(),
|
|
1948
|
-
let
|
|
2110
|
+
const n = e.getBoundingClientRect(), l = t.getBoundingClientRect(), s = window.pageXOffset || document.documentElement.scrollLeft, i = window.pageYOffset || document.documentElement.scrollTop;
|
|
2111
|
+
let c = 0, a = 0;
|
|
1949
2112
|
switch (o) {
|
|
1950
2113
|
case "top":
|
|
1951
|
-
|
|
2114
|
+
c = n.top + i - l.height - 8, a = n.left + s + (n.width - l.width) / 2;
|
|
1952
2115
|
break;
|
|
1953
2116
|
case "bottom":
|
|
1954
|
-
|
|
2117
|
+
c = n.bottom + i + 8, a = n.left + s + (n.width - l.width) / 2;
|
|
1955
2118
|
break;
|
|
1956
2119
|
case "left":
|
|
1957
|
-
|
|
2120
|
+
c = n.top + i + (n.height - l.height) / 2, a = n.left + s - l.width - 8;
|
|
1958
2121
|
break;
|
|
1959
2122
|
case "right":
|
|
1960
|
-
|
|
2123
|
+
c = n.top + i + (n.height - l.height) / 2, a = n.right + s + 8;
|
|
1961
2124
|
break;
|
|
1962
2125
|
}
|
|
1963
|
-
const u = window.innerWidth,
|
|
1964
|
-
|
|
1965
|
-
},
|
|
2126
|
+
const u = window.innerWidth, r = window.innerHeight;
|
|
2127
|
+
a < 8 ? a = 8 : a + l.width > u - 8 && (a = u - l.width - 8), c < i + 8 ? o === "top" ? c = n.bottom + i + 8 : c = i + 8 : c + l.height > i + r - 8 && (o === "bottom" ? c = n.top + i - l.height - 8 : c = i + r - l.height - 8), t.style.top = `${c}px`, t.style.left = `${a}px`;
|
|
2128
|
+
}, De = (t, e, o) => {
|
|
1966
2129
|
t.parentElement || document.body.appendChild(t), t.style.visibility = "visible", Le(t, e, o), requestAnimationFrame(() => {
|
|
1967
2130
|
t.style.opacity = "1";
|
|
1968
2131
|
});
|
|
1969
|
-
},
|
|
2132
|
+
}, Pe = (t) => {
|
|
1970
2133
|
t.style.opacity = "0", t.style.visibility = "hidden";
|
|
1971
|
-
},
|
|
2134
|
+
}, Ae = (t) => t.scrollWidth > t.clientWidth || t.scrollHeight > t.clientHeight, Oe = (t) => !!t.closest(".vt-table, table"), rl = {
|
|
1972
2135
|
mounted(t, e) {
|
|
1973
|
-
var
|
|
1974
|
-
const o = (
|
|
2136
|
+
var a;
|
|
2137
|
+
const o = (a = e.value) == null ? void 0 : a.trim();
|
|
1975
2138
|
if (!o) return;
|
|
1976
|
-
const n = t.dataset.placement || "top",
|
|
1977
|
-
t.__tooltipEl =
|
|
1978
|
-
const
|
|
1979
|
-
(
|
|
1980
|
-
},
|
|
1981
|
-
|
|
1982
|
-
},
|
|
1983
|
-
|
|
2139
|
+
const n = t.dataset.placement || "top", l = We(o, n);
|
|
2140
|
+
t.__tooltipEl = l;
|
|
2141
|
+
const s = () => {
|
|
2142
|
+
(Oe(t) ? Ae(t) : !0) && De(l, t, n);
|
|
2143
|
+
}, i = () => {
|
|
2144
|
+
Pe(l);
|
|
2145
|
+
}, c = () => {
|
|
2146
|
+
l.style.opacity === "1" && Le(l, t, n);
|
|
1984
2147
|
};
|
|
1985
|
-
t.__mouseenterHandler =
|
|
2148
|
+
t.__mouseenterHandler = s, t.__mouseleaveHandler = i, t.__scrollHandler = c, t.addEventListener("mouseenter", s), t.addEventListener("mouseleave", i), window.addEventListener("scroll", c, !0), window.addEventListener("resize", c);
|
|
1986
2149
|
},
|
|
1987
2150
|
updated(t, e) {
|
|
1988
2151
|
var n;
|
|
@@ -1990,47 +2153,50 @@ const ae = new Io(), Vo = {
|
|
|
1990
2153
|
if (t.__tooltipEl)
|
|
1991
2154
|
o ? t.__tooltipEl.firstChild.textContent = o : (t.__tooltipEl.parentElement && t.__tooltipEl.parentElement.removeChild(t.__tooltipEl), delete t.__tooltipEl);
|
|
1992
2155
|
else if (o) {
|
|
1993
|
-
const
|
|
1994
|
-
t.__tooltipEl =
|
|
1995
|
-
const
|
|
1996
|
-
(
|
|
1997
|
-
},
|
|
1998
|
-
|
|
1999
|
-
},
|
|
2000
|
-
|
|
2156
|
+
const l = t.dataset.placement || "top", s = We(o, l);
|
|
2157
|
+
t.__tooltipEl = s;
|
|
2158
|
+
const i = () => {
|
|
2159
|
+
(Oe(t) ? Ae(t) : !0) && De(s, t, l);
|
|
2160
|
+
}, c = () => {
|
|
2161
|
+
Pe(s);
|
|
2162
|
+
}, a = () => {
|
|
2163
|
+
s.style.opacity === "1" && Le(s, t, l);
|
|
2001
2164
|
};
|
|
2002
|
-
t.__mouseenterHandler =
|
|
2165
|
+
t.__mouseenterHandler = i, t.__mouseleaveHandler = c, t.__scrollHandler = a, t.addEventListener("mouseenter", i), t.addEventListener("mouseleave", c), window.addEventListener("scroll", a, !0), window.addEventListener("resize", a);
|
|
2003
2166
|
}
|
|
2004
2167
|
},
|
|
2005
2168
|
beforeUnmount(t) {
|
|
2006
2169
|
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);
|
|
2007
2170
|
}
|
|
2008
|
-
},
|
|
2171
|
+
}, cl = {
|
|
2009
2172
|
sortable: !0,
|
|
2010
2173
|
actionColumn: !1,
|
|
2011
2174
|
showOverflowTooltip: !0,
|
|
2012
2175
|
visible: !0,
|
|
2013
2176
|
pinnedLeft: !1,
|
|
2014
2177
|
pinnedRight: !1
|
|
2015
|
-
},
|
|
2178
|
+
}, il = {
|
|
2016
2179
|
install(t, e = {}) {
|
|
2017
2180
|
const { prefix: o = "V", modal: n = !0 } = e;
|
|
2018
|
-
t.component(`${o}Button`,
|
|
2181
|
+
t.component(`${o}Button`, we), t.component(`${o}Icon`, G), t.component(`${o}Loader`, Xe), t.component(`${o}Modal`, Ke), t.component(`${o}Pagination`, fo), t.component(`${o}Checkbox`, pe), t.component(`${o}Table`, ll), t.component(`${o}TableColumn`, sl), t.component(`${o}Dropdown`, Ge), t.component(`${o}DropdownItem`, Me), t.directive("tooltip", rl), n && t.use(So);
|
|
2019
2182
|
}
|
|
2020
|
-
},
|
|
2183
|
+
}, dl = il.install;
|
|
2021
2184
|
export {
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
il as
|
|
2185
|
+
cl as DEFAULT_COLUMN_CONFIG,
|
|
2186
|
+
qe as DropdownContextKey,
|
|
2187
|
+
we as VButton,
|
|
2188
|
+
pe as VCheckbox,
|
|
2189
|
+
Ge as VDropdown,
|
|
2190
|
+
Me as VDropdownItem,
|
|
2191
|
+
G as VIcon,
|
|
2192
|
+
Xe as VLoader,
|
|
2193
|
+
Ke as VModal,
|
|
2194
|
+
So as VModalPlugin,
|
|
2195
|
+
fo as VPagination,
|
|
2196
|
+
ll as VTable,
|
|
2197
|
+
sl as VTableColumn,
|
|
2198
|
+
il as default,
|
|
2199
|
+
dl as install,
|
|
2200
|
+
ce as modalManager,
|
|
2201
|
+
rl as tooltipDirective
|
|
2036
2202
|
};
|