voiptime-components 0.0.14 → 0.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +1 -1
- package/dist/index.d.ts +10 -1
- package/dist/index.es.js +237 -232
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { createElementBlock as f, openBlock as p, createElementVNode as _, defineComponent as
|
|
1
|
+
import { createElementBlock as f, openBlock as p, createElementVNode as _, defineComponent as le, computed as x, createBlock as ce, createCommentVNode as H, resolveDynamicComponent as Ae, useSlots as Oe, resolveDirective as je, withDirectives as Me, normalizeClass as W, renderSlot as me, Teleport as lt, normalizeStyle as ae, withModifiers as he, toDisplayString as te, watch as ve, Fragment as ne, renderList as oe, vModelSelect as st, createVNode as Z, withCtx as xe, createTextVNode as _e, ref as D, createApp as it, h as ke, onMounted as fe, onUnmounted as $e, nextTick as at, mergeModels as Te, useModel as rt, reactive as ct, provide as ut, unref as q, inject as dt } from "vue";
|
|
2
2
|
const K = (e, t) => {
|
|
3
3
|
const o = e.__vccOpts || e;
|
|
4
4
|
for (const [n, s] of t)
|
|
5
5
|
o[n] = s;
|
|
6
6
|
return o;
|
|
7
|
-
},
|
|
7
|
+
}, pt = {}, mt = {
|
|
8
8
|
width: "20",
|
|
9
9
|
height: "20",
|
|
10
10
|
viewBox: "0 0 20 20",
|
|
11
11
|
fill: "none",
|
|
12
12
|
xmlns: "http://www.w3.org/2000/svg"
|
|
13
13
|
};
|
|
14
|
-
function
|
|
15
|
-
return p(), f("svg",
|
|
14
|
+
function ht(e, t) {
|
|
15
|
+
return p(), f("svg", mt, t[0] || (t[0] = [
|
|
16
16
|
_("path", {
|
|
17
17
|
d: "M14 8L10 12L6 8",
|
|
18
18
|
stroke: "currentColor",
|
|
@@ -22,15 +22,15 @@ function mt(e, t) {
|
|
|
22
22
|
}, null, -1)
|
|
23
23
|
]));
|
|
24
24
|
}
|
|
25
|
-
const
|
|
25
|
+
const vt = /* @__PURE__ */ K(pt, [["render", ht]]), ft = {}, _t = {
|
|
26
26
|
width: "20",
|
|
27
27
|
height: "20",
|
|
28
28
|
viewBox: "0 0 20 20",
|
|
29
29
|
fill: "none",
|
|
30
30
|
xmlns: "http://www.w3.org/2000/svg"
|
|
31
31
|
};
|
|
32
|
-
function
|
|
33
|
-
return p(), f("svg",
|
|
32
|
+
function gt(e, t) {
|
|
33
|
+
return p(), f("svg", _t, t[0] || (t[0] = [
|
|
34
34
|
_("path", {
|
|
35
35
|
d: "M6 12L10 8L14 12",
|
|
36
36
|
stroke: "currentColor",
|
|
@@ -40,15 +40,15 @@ function _t(e, t) {
|
|
|
40
40
|
}, null, -1)
|
|
41
41
|
]));
|
|
42
42
|
}
|
|
43
|
-
const
|
|
43
|
+
const Ct = /* @__PURE__ */ K(ft, [["render", gt]]), bt = {}, wt = {
|
|
44
44
|
width: "14",
|
|
45
45
|
height: "15",
|
|
46
46
|
viewBox: "0 0 14 15",
|
|
47
47
|
fill: "none",
|
|
48
48
|
xmlns: "http://www.w3.org/2000/svg"
|
|
49
49
|
};
|
|
50
|
-
function
|
|
51
|
-
return p(), f("svg",
|
|
50
|
+
function kt(e, t) {
|
|
51
|
+
return p(), f("svg", wt, t[0] || (t[0] = [
|
|
52
52
|
_("path", {
|
|
53
53
|
d: "M11.8789 4.90517L11.2561 4.20124C10.4045 3.33504 9.28504 2.7626 8.06789 2.5709C6.85074 2.3792 5.60245 2.57874 4.5127 3.13917C3.42296 3.69961 2.55134 4.59032 2.03031 5.67593C1.50928 6.76155 1.36732 7.98272 1.626 9.15387C1.88469 10.325 2.52987 11.3821 3.46351 12.1645C4.39716 12.9469 5.56821 13.4119 6.79871 13.4887C8.02921 13.5655 9.25189 13.25 10.2809 12.5901C11.31 11.9302 12.0891 10.962 12.5 9.83266",
|
|
54
54
|
stroke: "currentColor",
|
|
@@ -62,15 +62,15 @@ function wt(e, t) {
|
|
|
62
62
|
}, null, -1)
|
|
63
63
|
]));
|
|
64
64
|
}
|
|
65
|
-
const
|
|
65
|
+
const yt = /* @__PURE__ */ K(bt, [["render", kt]]), xt = {}, St = {
|
|
66
66
|
width: "21",
|
|
67
67
|
height: "20",
|
|
68
68
|
viewBox: "0 0 21 20",
|
|
69
69
|
fill: "none",
|
|
70
70
|
xmlns: "http://www.w3.org/2000/svg"
|
|
71
71
|
};
|
|
72
|
-
function
|
|
73
|
-
return p(), f("svg",
|
|
72
|
+
function Mt(e, t) {
|
|
73
|
+
return p(), f("svg", St, t[0] || (t[0] = [
|
|
74
74
|
_("path", {
|
|
75
75
|
d: "M8.60352 6L12.6035 10L8.60352 14",
|
|
76
76
|
stroke: "currentColor",
|
|
@@ -80,15 +80,15 @@ function St(e, t) {
|
|
|
80
80
|
}, null, -1)
|
|
81
81
|
]));
|
|
82
82
|
}
|
|
83
|
-
const
|
|
83
|
+
const $t = /* @__PURE__ */ K(xt, [["render", Mt]]), Lt = {}, It = {
|
|
84
84
|
width: "21",
|
|
85
85
|
height: "20",
|
|
86
86
|
viewBox: "0 0 21 20",
|
|
87
87
|
fill: "none",
|
|
88
88
|
xmlns: "http://www.w3.org/2000/svg"
|
|
89
89
|
};
|
|
90
|
-
function
|
|
91
|
-
return p(), f("svg",
|
|
90
|
+
function Bt(e, t) {
|
|
91
|
+
return p(), f("svg", It, t[0] || (t[0] = [
|
|
92
92
|
_("path", {
|
|
93
93
|
d: "M12.3984 14L8.39844 10L12.3984 6",
|
|
94
94
|
stroke: "currentColor",
|
|
@@ -98,15 +98,15 @@ function It(e, t) {
|
|
|
98
98
|
}, null, -1)
|
|
99
99
|
]));
|
|
100
100
|
}
|
|
101
|
-
const
|
|
101
|
+
const Rt = /* @__PURE__ */ K(Lt, [["render", Bt]]), Tt = {}, zt = {
|
|
102
102
|
width: "20",
|
|
103
103
|
height: "20",
|
|
104
104
|
viewBox: "0 0 20 20",
|
|
105
105
|
fill: "none",
|
|
106
106
|
xmlns: "http://www.w3.org/2000/svg"
|
|
107
107
|
};
|
|
108
|
-
function
|
|
109
|
-
return p(), f("svg",
|
|
108
|
+
function Et(e, t) {
|
|
109
|
+
return p(), f("svg", zt, t[0] || (t[0] = [
|
|
110
110
|
_("path", {
|
|
111
111
|
d: "M12.5 1.66406L11.1783 2.94156C10.6233 3.47906 10.345 3.7474 10 3.7474C9.655 3.7474 9.37667 3.47906 8.82167 2.94156L7.5 1.66406M14.5833 5.83073C15.7533 5.83073 16.3392 5.83073 16.7592 6.11156C16.9412 6.23319 17.0975 6.3895 17.2192 6.57156C17.5 6.99156 17.5 7.5774 17.5 8.7474V15.4141C17.5 16.5841 17.5 17.1699 17.2192 17.5899C17.0975 17.772 16.9412 17.9283 16.7592 18.0499C16.3392 18.3307 15.7533 18.3307 14.5833 18.3307C13.4133 18.3307 12.8275 18.3307 12.4075 18.0499C12.2254 17.9283 12.0691 17.772 11.9475 17.5899C11.6667 17.1699 11.6667 16.5841 11.6667 15.4141V8.7474C11.6667 7.5774 11.6667 6.99156 11.9475 6.57156C12.0691 6.3895 12.2254 6.23319 12.4075 6.11156C12.8275 5.83073 13.4133 5.83073 14.5833 5.83073ZM5.41667 5.83073C6.58667 5.83073 7.1725 5.83073 7.5925 6.11156C7.77456 6.23319 7.93087 6.3895 8.0525 6.57156C8.33333 6.99156 8.33333 7.5774 8.33333 8.7474V15.4141C8.33333 16.5841 8.33333 17.1699 8.0525 17.5899C7.93087 17.772 7.77456 17.9283 7.5925 18.0499C7.1725 18.3307 6.58667 18.3307 5.41667 18.3307C4.24667 18.3307 3.66083 18.3307 3.24083 18.0499C3.05877 17.9283 2.90246 17.772 2.78083 17.5899C2.5 17.1699 2.5 16.5841 2.5 15.4141V8.7474C2.5 7.5774 2.5 6.99156 2.78083 6.57156C2.90246 6.3895 3.05877 6.23319 3.24083 6.11156C3.66083 5.83073 4.24667 5.83073 5.41667 5.83073Z",
|
|
112
112
|
stroke: "currentColor",
|
|
@@ -116,15 +116,15 @@ function zt(e, t) {
|
|
|
116
116
|
}, null, -1)
|
|
117
117
|
]));
|
|
118
118
|
}
|
|
119
|
-
const
|
|
119
|
+
const Wt = /* @__PURE__ */ K(Tt, [["render", Et]]), Vt = {}, Ht = {
|
|
120
120
|
width: "20",
|
|
121
121
|
height: "20",
|
|
122
122
|
viewBox: "0 0 20 20",
|
|
123
123
|
fill: "none",
|
|
124
124
|
xmlns: "http://www.w3.org/2000/svg"
|
|
125
125
|
};
|
|
126
|
-
function
|
|
127
|
-
return p(), f("svg",
|
|
126
|
+
function Pt(e, t) {
|
|
127
|
+
return p(), f("svg", Ht, t[0] || (t[0] = [
|
|
128
128
|
_("path", {
|
|
129
129
|
d: "M8 3V5.2225M8 5.2225V10.7775M8 5.2225L9.875 4.25M8 5.2225L6.125 4.25M8 10.7775V13M8 10.7775L6.125 11.75M8 10.7775L9.875 11.75M13 8H10.7775M10.7775 8H5.2225M10.7775 8L11.75 9.875M10.7775 8L11.75 6.125M5.2225 8H3M5.2225 8L4.25 6.125M5.2225 8L4.25 9.875",
|
|
130
130
|
stroke: "currentColor",
|
|
@@ -140,15 +140,15 @@ function Ht(e, t) {
|
|
|
140
140
|
}, null, -1)
|
|
141
141
|
]));
|
|
142
142
|
}
|
|
143
|
-
const
|
|
143
|
+
const Dt = /* @__PURE__ */ K(Vt, [["render", Pt]]), At = {}, Ot = {
|
|
144
144
|
width: "20",
|
|
145
145
|
height: "20",
|
|
146
146
|
viewBox: "0 0 20 20",
|
|
147
147
|
fill: "none",
|
|
148
148
|
xmlns: "http://www.w3.org/2000/svg"
|
|
149
149
|
};
|
|
150
|
-
function
|
|
151
|
-
return p(), f("svg",
|
|
150
|
+
function jt(e, t) {
|
|
151
|
+
return p(), f("svg", Ot, t[0] || (t[0] = [
|
|
152
152
|
_("path", {
|
|
153
153
|
d: "M8 3V5.2225M8 5.2225V10.7775M8 5.2225L9.875 4.25M8 5.2225L6.125 4.25M8 10.7775V13M8 10.7775L6.125 11.75M8 10.7775L9.875 11.75M13 8H10.7775M10.7775 8H5.2225M10.7775 8L11.75 9.875M10.7775 8L11.75 6.125M5.2225 8H3M5.2225 8L4.25 6.125M5.2225 8L4.25 9.875",
|
|
154
154
|
stroke: "currentColor",
|
|
@@ -164,15 +164,15 @@ function Ot(e, t) {
|
|
|
164
164
|
}, null, -1)
|
|
165
165
|
]));
|
|
166
166
|
}
|
|
167
|
-
const
|
|
167
|
+
const Nt = /* @__PURE__ */ K(At, [["render", jt]]), Zt = {}, Ft = {
|
|
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(), f("svg",
|
|
174
|
+
function Ut(e, t) {
|
|
175
|
+
return p(), f("svg", Ft, t[0] || (t[0] = [
|
|
176
176
|
_("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 Ft(e, t) {
|
|
|
182
182
|
}, null, -1)
|
|
183
183
|
]));
|
|
184
184
|
}
|
|
185
|
-
const
|
|
185
|
+
const qt = /* @__PURE__ */ K(Zt, [["render", Ut]]), Xt = {}, Gt = {
|
|
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(), f("svg",
|
|
192
|
+
function Kt(e, t) {
|
|
193
|
+
return p(), f("svg", Gt, t[0] || (t[0] = [
|
|
194
194
|
_("path", {
|
|
195
195
|
"fill-rule": "evenodd",
|
|
196
196
|
"clip-rule": "evenodd",
|
|
@@ -205,15 +205,15 @@ function Gt(e, t) {
|
|
|
205
205
|
}, null, -1)
|
|
206
206
|
]));
|
|
207
207
|
}
|
|
208
|
-
const
|
|
208
|
+
const Yt = /* @__PURE__ */ K(Xt, [["render", Kt]]), Jt = {}, Qt = {
|
|
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(), f("svg",
|
|
215
|
+
function en(e, t) {
|
|
216
|
+
return p(), f("svg", Qt, t[0] || (t[0] = [
|
|
217
217
|
_("path", {
|
|
218
218
|
"fill-rule": "evenodd",
|
|
219
219
|
"clip-rule": "evenodd",
|
|
@@ -222,15 +222,15 @@ function Qt(e, t) {
|
|
|
222
222
|
}, null, -1)
|
|
223
223
|
]));
|
|
224
224
|
}
|
|
225
|
-
const
|
|
225
|
+
const tn = /* @__PURE__ */ K(Jt, [["render", en]]), nn = {}, on = {
|
|
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(), f("svg",
|
|
232
|
+
function ln(e, t) {
|
|
233
|
+
return p(), f("svg", on, t[0] || (t[0] = [
|
|
234
234
|
_("path", {
|
|
235
235
|
"fill-rule": "evenodd",
|
|
236
236
|
"clip-rule": "evenodd",
|
|
@@ -239,15 +239,15 @@ function on(e, t) {
|
|
|
239
239
|
}, null, -1)
|
|
240
240
|
]));
|
|
241
241
|
}
|
|
242
|
-
const
|
|
242
|
+
const sn = /* @__PURE__ */ K(nn, [["render", ln]]), an = {}, rn = {
|
|
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(), f("svg",
|
|
249
|
+
function cn(e, t) {
|
|
250
|
+
return p(), f("svg", rn, t[0] || (t[0] = [
|
|
251
251
|
_("path", {
|
|
252
252
|
d: "M6 14L10 10M10 10L14 6M10 10L6 6M10 10L14 14",
|
|
253
253
|
stroke: "currentColor",
|
|
@@ -257,40 +257,40 @@ function rn(e, t) {
|
|
|
257
257
|
}, null, -1)
|
|
258
258
|
]));
|
|
259
259
|
}
|
|
260
|
-
const
|
|
260
|
+
const un = /* @__PURE__ */ K(an, [["render", cn]]), dn = {
|
|
261
261
|
// arrow icons
|
|
262
|
-
arrowDown:
|
|
263
|
-
arrowTop:
|
|
264
|
-
arrowRight:
|
|
265
|
-
arrowLeft:
|
|
266
|
-
arrowReload:
|
|
262
|
+
arrowDown: vt,
|
|
263
|
+
arrowTop: Ct,
|
|
264
|
+
arrowRight: $t,
|
|
265
|
+
arrowLeft: Rt,
|
|
266
|
+
arrowReload: yt,
|
|
267
267
|
// table icons
|
|
268
|
-
columnInsert:
|
|
269
|
-
freeze:
|
|
270
|
-
unfreeze:
|
|
271
|
-
columnsMove:
|
|
272
|
-
empty:
|
|
268
|
+
columnInsert: Wt,
|
|
269
|
+
freeze: Dt,
|
|
270
|
+
unfreeze: Nt,
|
|
271
|
+
columnsMove: Yt,
|
|
272
|
+
empty: qt,
|
|
273
273
|
// actions icons
|
|
274
|
-
listBullet:
|
|
275
|
-
listBulletHorizontal:
|
|
276
|
-
close:
|
|
277
|
-
}, Y = /* @__PURE__ */
|
|
274
|
+
listBullet: tn,
|
|
275
|
+
listBulletHorizontal: sn,
|
|
276
|
+
close: un
|
|
277
|
+
}, Y = /* @__PURE__ */ le({
|
|
278
278
|
__name: "VIcon",
|
|
279
279
|
props: {
|
|
280
280
|
name: {}
|
|
281
281
|
},
|
|
282
282
|
setup(e) {
|
|
283
|
-
const t = e, o = x(() =>
|
|
284
|
-
return (n, s) => o.value ? (p(), ce(
|
|
283
|
+
const t = e, o = x(() => dn[t.name]);
|
|
284
|
+
return (n, s) => o.value ? (p(), ce(Ae(o.value), { key: 0 })) : H("", !0);
|
|
285
285
|
}
|
|
286
|
-
}),
|
|
287
|
-
function
|
|
288
|
-
return p(), f("span",
|
|
286
|
+
}), pn = {}, mn = { class: "vt-loader" };
|
|
287
|
+
function hn(e, t) {
|
|
288
|
+
return p(), f("span", mn);
|
|
289
289
|
}
|
|
290
|
-
const
|
|
290
|
+
const Ne = /* @__PURE__ */ K(pn, [["render", hn]]), vn = ["disabled", "type", "data-placement"], fn = {
|
|
291
291
|
key: 2,
|
|
292
292
|
class: "vt-button__content"
|
|
293
|
-
}, ge = /* @__PURE__ */
|
|
293
|
+
}, ge = /* @__PURE__ */ le({
|
|
294
294
|
__name: "VButton",
|
|
295
295
|
props: {
|
|
296
296
|
type: { default: "default" },
|
|
@@ -304,7 +304,7 @@ const je = /* @__PURE__ */ K(dn, [["render", mn]]), hn = ["disabled", "type", "d
|
|
|
304
304
|
},
|
|
305
305
|
emits: ["click"],
|
|
306
306
|
setup(e, { emit: t }) {
|
|
307
|
-
const o = e, n = t, s =
|
|
307
|
+
const o = e, n = t, s = Oe(), l = x(() => !!(o.icon && o.shape)), r = x(() => {
|
|
308
308
|
var k, S;
|
|
309
309
|
const c = s.default ? s.default({}) : null;
|
|
310
310
|
return ((S = (k = c == null ? void 0 : c[0]) == null ? void 0 : k.children) == null ? void 0 : S.toString()) ?? "";
|
|
@@ -321,7 +321,7 @@ const je = /* @__PURE__ */ K(dn, [["render", mn]]), hn = ["disabled", "type", "d
|
|
|
321
321
|
!o.disabled && !o.loading && n("click", c);
|
|
322
322
|
};
|
|
323
323
|
return (c, k) => {
|
|
324
|
-
const S =
|
|
324
|
+
const S = je("tooltip");
|
|
325
325
|
return Me((p(), f("button", {
|
|
326
326
|
class: W(i.value),
|
|
327
327
|
disabled: o.disabled || o.loading,
|
|
@@ -329,7 +329,7 @@ const je = /* @__PURE__ */ K(dn, [["render", mn]]), hn = ["disabled", "type", "d
|
|
|
329
329
|
"data-placement": o.tooltipPlacement,
|
|
330
330
|
onClick: u
|
|
331
331
|
}, [
|
|
332
|
-
o.loading ? (p(), ce(
|
|
332
|
+
o.loading ? (p(), ce(Ne, {
|
|
333
333
|
key: 0,
|
|
334
334
|
class: "vt-button__icon"
|
|
335
335
|
})) : o.icon ? (p(), ce(Y, {
|
|
@@ -337,21 +337,21 @@ const je = /* @__PURE__ */ K(dn, [["render", mn]]), hn = ["disabled", "type", "d
|
|
|
337
337
|
name: o.icon,
|
|
338
338
|
class: "vt-button__icon"
|
|
339
339
|
}, null, 8, ["name"])) : H("", !0),
|
|
340
|
-
l.value ? H("", !0) : (p(), f("span",
|
|
340
|
+
l.value ? H("", !0) : (p(), f("span", fn, [
|
|
341
341
|
me(c.$slots, "default")
|
|
342
342
|
]))
|
|
343
|
-
], 10,
|
|
343
|
+
], 10, vn)), [
|
|
344
344
|
[S, a.value]
|
|
345
345
|
]);
|
|
346
346
|
};
|
|
347
347
|
}
|
|
348
|
-
}),
|
|
348
|
+
}), _n = {
|
|
349
349
|
key: 0,
|
|
350
350
|
class: "vt-modal__header"
|
|
351
|
-
},
|
|
351
|
+
}, gn = {
|
|
352
352
|
key: 0,
|
|
353
353
|
class: "vt-modal__title"
|
|
354
|
-
},
|
|
354
|
+
}, Cn = { class: "vt-modal__content" }, Ze = /* @__PURE__ */ le({
|
|
355
355
|
__name: "VModal",
|
|
356
356
|
props: {
|
|
357
357
|
modelValue: { type: Boolean },
|
|
@@ -370,7 +370,7 @@ const je = /* @__PURE__ */ K(dn, [["render", mn]]), hn = ["disabled", "type", "d
|
|
|
370
370
|
}, i = () => {
|
|
371
371
|
o.closeOnBackdropClick && r();
|
|
372
372
|
};
|
|
373
|
-
return (a, u) => (p(), ce(
|
|
373
|
+
return (a, u) => (p(), ce(lt, { to: "body" }, [
|
|
374
374
|
a.modelValue ? (p(), f("div", {
|
|
375
375
|
key: 0,
|
|
376
376
|
class: "vt-modal__backdrop",
|
|
@@ -382,8 +382,8 @@ const je = /* @__PURE__ */ K(dn, [["render", mn]]), hn = ["disabled", "type", "d
|
|
|
382
382
|
onClick: u[0] || (u[0] = he(() => {
|
|
383
383
|
}, ["stop"]))
|
|
384
384
|
}, [
|
|
385
|
-
a.title || a.showCloseButton ? (p(), f("div",
|
|
386
|
-
a.title ? (p(), f("h2",
|
|
385
|
+
a.title || a.showCloseButton ? (p(), f("div", _n, [
|
|
386
|
+
a.title ? (p(), f("h2", gn, te(a.title), 1)) : H("", !0),
|
|
387
387
|
a.showCloseButton ? (p(), ce(Y, {
|
|
388
388
|
key: 1,
|
|
389
389
|
name: "close",
|
|
@@ -391,14 +391,14 @@ const je = /* @__PURE__ */ K(dn, [["render", mn]]), hn = ["disabled", "type", "d
|
|
|
391
391
|
onClick: r
|
|
392
392
|
})) : H("", !0)
|
|
393
393
|
])) : H("", !0),
|
|
394
|
-
_("div",
|
|
394
|
+
_("div", Cn, [
|
|
395
395
|
me(a.$slots, "default")
|
|
396
396
|
])
|
|
397
397
|
], 2)
|
|
398
398
|
], 4)) : H("", !0)
|
|
399
399
|
]));
|
|
400
400
|
}
|
|
401
|
-
}),
|
|
401
|
+
}), bn = { class: "vt-pagination" }, wn = { class: "vt-pagination__info" }, kn = { class: "vt-pagination__rows-per-page" }, yn = ["value"], xn = { class: "vt-pagination__navigation" }, Sn = ["disabled"], Mn = ["onClick"], $n = ["disabled"], Ln = /* @__PURE__ */ le({
|
|
402
402
|
__name: "VPagination",
|
|
403
403
|
props: {
|
|
404
404
|
totalItems: {},
|
|
@@ -416,13 +416,13 @@ const je = /* @__PURE__ */ K(dn, [["render", mn]]), hn = ["disabled", "type", "d
|
|
|
416
416
|
get: () => o.pageSize,
|
|
417
417
|
set: (M) => n("update:pageSize", M)
|
|
418
418
|
}), r = x(() => Math.ceil(o.totalItems / l.value)), i = x(() => o.totalItems === 0 ? 0 : (s.value - 1) * l.value + 1), a = x(() => Math.min(s.value * l.value, o.totalItems)), u = x(() => s.value <= 1), c = x(() => s.value >= r.value), k = x(() => {
|
|
419
|
-
const M = [], V = r.value, T = s.value,
|
|
420
|
-
if (V <=
|
|
419
|
+
const M = [], V = r.value, T = s.value, X = o.maxVisiblePages;
|
|
420
|
+
if (V <= X)
|
|
421
421
|
for (let y = 1; y <= V; y++)
|
|
422
422
|
M.push(y);
|
|
423
423
|
else {
|
|
424
424
|
M.push(1);
|
|
425
|
-
const y = Math.max(2, T - Math.floor(
|
|
425
|
+
const y = Math.max(2, T - Math.floor(X / 2)), E = Math.min(V - 1, T + Math.floor(X / 2));
|
|
426
426
|
y > 2 && M.push("...");
|
|
427
427
|
for (let $ = y; $ <= E; $++)
|
|
428
428
|
M.push($);
|
|
@@ -450,9 +450,9 @@ const je = /* @__PURE__ */ K(dn, [["render", mn]]), hn = ["disabled", "type", "d
|
|
|
450
450
|
() => {
|
|
451
451
|
s.value > r.value && r.value > 0 && (s.value = r.value, S());
|
|
452
452
|
}
|
|
453
|
-
), (M, V) => (p(), f("div",
|
|
454
|
-
_("div",
|
|
455
|
-
_("div",
|
|
453
|
+
), (M, V) => (p(), f("div", bn, [
|
|
454
|
+
_("div", wn, [
|
|
455
|
+
_("div", kn, [
|
|
456
456
|
V[1] || (V[1] = _("label", {
|
|
457
457
|
for: "rowsSelect",
|
|
458
458
|
class: "vt-pagination__label"
|
|
@@ -463,38 +463,38 @@ const je = /* @__PURE__ */ K(dn, [["render", mn]]), hn = ["disabled", "type", "d
|
|
|
463
463
|
onChange: U,
|
|
464
464
|
class: "vt-pagination__select"
|
|
465
465
|
}, [
|
|
466
|
-
(p(!0), f(
|
|
466
|
+
(p(!0), f(ne, null, oe(M.pageSizeOptions, (T) => (p(), f("option", {
|
|
467
467
|
key: T,
|
|
468
468
|
value: T
|
|
469
|
-
}, te(T), 9,
|
|
469
|
+
}, te(T), 9, yn))), 128))
|
|
470
470
|
], 544), [
|
|
471
|
-
[
|
|
471
|
+
[st, l.value]
|
|
472
472
|
])
|
|
473
473
|
]),
|
|
474
474
|
_("span", null, te(i.value) + " - " + te(a.value) + " з " + te(M.totalItems), 1)
|
|
475
475
|
]),
|
|
476
|
-
_("div",
|
|
476
|
+
_("div", xn, [
|
|
477
477
|
_("button", {
|
|
478
478
|
onClick: j,
|
|
479
479
|
disabled: u.value,
|
|
480
480
|
class: W({ "vt-pagination__nav-button": !0, "has-items": !u.value })
|
|
481
481
|
}, [
|
|
482
482
|
Z(Y, { name: "arrowLeft" })
|
|
483
|
-
], 10,
|
|
484
|
-
(p(!0), f(
|
|
483
|
+
], 10, Sn),
|
|
484
|
+
(p(!0), f(ne, null, oe(k.value, (T) => (p(), f("button", {
|
|
485
485
|
key: T,
|
|
486
|
-
onClick: (
|
|
486
|
+
onClick: (X) => F(T),
|
|
487
487
|
class: W(["vt-pagination__nav-button", {
|
|
488
488
|
"vt-pagination__nav-button--active": T === s.value
|
|
489
489
|
}])
|
|
490
|
-
}, te(T), 11,
|
|
490
|
+
}, te(T), 11, Mn))), 128)),
|
|
491
491
|
_("button", {
|
|
492
492
|
onClick: Q,
|
|
493
493
|
disabled: c.value,
|
|
494
494
|
class: W({ "vt-pagination__nav-button": !0, "has-items": !c.value })
|
|
495
495
|
}, [
|
|
496
496
|
Z(Y, { name: "arrowRight" })
|
|
497
|
-
], 10,
|
|
497
|
+
], 10, $n)
|
|
498
498
|
]),
|
|
499
499
|
_("div", null, [
|
|
500
500
|
Z(ge, {
|
|
@@ -513,7 +513,7 @@ const je = /* @__PURE__ */ K(dn, [["render", mn]]), hn = ["disabled", "type", "d
|
|
|
513
513
|
])
|
|
514
514
|
]));
|
|
515
515
|
}
|
|
516
|
-
}),
|
|
516
|
+
}), In = ["for"], Bn = ["id", "name", "value", "checked", "disabled", "required", ".indeterminate"], de = /* @__PURE__ */ le({
|
|
517
517
|
__name: "VCheckbox",
|
|
518
518
|
props: {
|
|
519
519
|
modelValue: { type: Boolean, default: void 0 },
|
|
@@ -565,7 +565,7 @@ const je = /* @__PURE__ */ K(dn, [["render", mn]]), hn = ["disabled", "type", "d
|
|
|
565
565
|
onChange: i,
|
|
566
566
|
onFocus: a,
|
|
567
567
|
onBlur: u
|
|
568
|
-
}, null, 40,
|
|
568
|
+
}, null, 40, Bn),
|
|
569
569
|
_("div", {
|
|
570
570
|
class: W([
|
|
571
571
|
"vt-checkbox__box",
|
|
@@ -652,10 +652,10 @@ const je = /* @__PURE__ */ K(dn, [["render", mn]]), hn = ["disabled", "type", "d
|
|
|
652
652
|
])
|
|
653
653
|
])
|
|
654
654
|
], 2)) : H("", !0)
|
|
655
|
-
], 10,
|
|
655
|
+
], 10, In));
|
|
656
656
|
}
|
|
657
657
|
});
|
|
658
|
-
function
|
|
658
|
+
function Rn(e) {
|
|
659
659
|
const t = x(() => [...e].sort((s, l) => s.pinnedLeft && !l.pinnedLeft ? -1 : !s.pinnedLeft && l.pinnedLeft || s.pinnedRight && !l.pinnedRight ? 1 : !s.pinnedRight && l.pinnedRight ? -1 : 0)), o = () => {
|
|
660
660
|
const s = t.value.length, l = t.value.filter((c) => c.width || c.minWidth), r = l.reduce((c, k) => c + (k.width || k.minWidth || 0), 0), i = s - l.length;
|
|
661
661
|
if (i === 0) return 150;
|
|
@@ -683,7 +683,7 @@ function Bn(e) {
|
|
|
683
683
|
}
|
|
684
684
|
};
|
|
685
685
|
}
|
|
686
|
-
function
|
|
686
|
+
function Tn(e) {
|
|
687
687
|
const t = () => {
|
|
688
688
|
const l = {};
|
|
689
689
|
return e.maxHeight && (l.maxHeight = `${e.maxHeight}px`), l;
|
|
@@ -712,7 +712,7 @@ function Rn(e) {
|
|
|
712
712
|
}
|
|
713
713
|
};
|
|
714
714
|
}
|
|
715
|
-
function
|
|
715
|
+
function zn() {
|
|
716
716
|
const e = D({
|
|
717
717
|
resizingCol: null,
|
|
718
718
|
startX: 0,
|
|
@@ -740,7 +740,17 @@ function Tn() {
|
|
|
740
740
|
resizeState: e
|
|
741
741
|
};
|
|
742
742
|
}
|
|
743
|
-
function
|
|
743
|
+
function En(e, t) {
|
|
744
|
+
if (!e)
|
|
745
|
+
return String(t.value ?? "");
|
|
746
|
+
try {
|
|
747
|
+
const o = e(t);
|
|
748
|
+
return o;
|
|
749
|
+
} catch (o) {
|
|
750
|
+
return console.error("Error rendering table slot:", o), String(t.value ?? "");
|
|
751
|
+
}
|
|
752
|
+
}
|
|
753
|
+
function Wn(e, t, o, n) {
|
|
744
754
|
var J;
|
|
745
755
|
const s = e.selectionKey || "id", l = D([]), r = D(null), i = D(!1);
|
|
746
756
|
(J = e.defaultSelection) != null && J.length && (l.value = [...e.defaultSelection]);
|
|
@@ -754,7 +764,7 @@ function zn(e, t, o, n) {
|
|
|
754
764
|
i.value = !1, n != null && n.value && (l.value = n.value.filter((v) => a(v) !== z)), $(m, !1);
|
|
755
765
|
return;
|
|
756
766
|
}
|
|
757
|
-
i.value && d || (d && !G ? l.value.push(m) : !d && G && (l.value = l.value.filter((v) => a(v) !== z)), e.selectOnClickRow && A === void 0 &&
|
|
767
|
+
i.value && d || (d && !G ? l.value.push(m) : !d && G && (l.value = l.value.filter((v) => a(v) !== z)), e.selectOnClickRow && A === void 0 && X(d ? m : null), $(m, d));
|
|
758
768
|
}, U = () => {
|
|
759
769
|
switch (N()) {
|
|
760
770
|
case "none":
|
|
@@ -779,7 +789,7 @@ function zn(e, t, o, n) {
|
|
|
779
789
|
i.value = !0, n != null && n.value ? l.value = [...n.value] : l.value = [...t.value], $(void 0, void 0, !0);
|
|
780
790
|
}, T = () => {
|
|
781
791
|
l.value = [], i.value = !1, r.value = null, $();
|
|
782
|
-
},
|
|
792
|
+
}, X = (m) => {
|
|
783
793
|
const A = r.value;
|
|
784
794
|
r.value = m, o("current-change", {
|
|
785
795
|
currentRow: r.value,
|
|
@@ -812,52 +822,52 @@ function zn(e, t, o, n) {
|
|
|
812
822
|
toggleRowSelection: Q,
|
|
813
823
|
toggleAllSelection: U,
|
|
814
824
|
clearSelection: T,
|
|
815
|
-
setCurrentRow:
|
|
825
|
+
setCurrentRow: X,
|
|
816
826
|
getSelectionRows: y,
|
|
817
827
|
setSelectionRows: E,
|
|
818
828
|
selectAbsolutelyAll: V
|
|
819
829
|
};
|
|
820
830
|
}
|
|
821
|
-
const
|
|
831
|
+
const Vn = (e, t, o = "asc") => {
|
|
822
832
|
if (e == null && t == null) return 0;
|
|
823
833
|
if (e == null) return o === "asc" ? 1 : -1;
|
|
824
834
|
if (t == null) return o === "asc" ? -1 : 1;
|
|
825
835
|
if (e === t) return 0;
|
|
826
836
|
let n = 0;
|
|
827
837
|
const s = Number(e), l = Number(t);
|
|
828
|
-
return !isNaN(s) && !isNaN(l) ? n = s - l :
|
|
838
|
+
return !isNaN(s) && !isNaN(l) ? n = s - l : ze(e) && ze(t) ? n = new Date(e).getTime() - new Date(t).getTime() : typeof e == "boolean" && typeof t == "boolean" ? n = e === t ? 0 : e ? -1 : 1 : n = String(e).localeCompare(String(t), void 0, {
|
|
829
839
|
numeric: !0,
|
|
830
840
|
sensitivity: "base"
|
|
831
841
|
}), o === "desc" ? -n : n;
|
|
832
|
-
},
|
|
842
|
+
}, ze = (e) => e instanceof Date ? !isNaN(e.getTime()) : typeof e == "string" && /\d{4}-\d{2}-\d{2}|\//.test(e) ? !isNaN(new Date(e).getTime()) : !1, Hn = (e, t, o) => {
|
|
833
843
|
e.sortable && o({
|
|
834
844
|
prop: e.prop,
|
|
835
845
|
direction: t
|
|
836
846
|
});
|
|
837
|
-
},
|
|
847
|
+
}, Ee = (e, t) => {
|
|
838
848
|
const o = (t == null ? void 0 : t.prop) === e.prop, n = t == null ? void 0 : t.direction;
|
|
839
849
|
return {
|
|
840
850
|
asc: ["vt-th__sort-icon", o && n === "asc" && "vt-th__sortable-active"].filter(Boolean).join(" "),
|
|
841
851
|
desc: ["vt-th__sort-icon", o && n === "desc" && "vt-th__sortable-active"].filter(Boolean).join(" ")
|
|
842
852
|
};
|
|
843
|
-
},
|
|
853
|
+
}, Pn = (e, t, o) => {
|
|
844
854
|
if (!t) return [...e];
|
|
845
855
|
const n = o.find((l) => l.prop === t.prop);
|
|
846
856
|
if (!(n != null && n.sortable)) return [...e];
|
|
847
|
-
const s = n.sortMethod ||
|
|
857
|
+
const s = n.sortMethod || Vn;
|
|
848
858
|
return [...e].sort((l, r) => {
|
|
849
859
|
const i = l[n.prop], a = r[n.prop];
|
|
850
860
|
return s(i, a, t.direction);
|
|
851
861
|
});
|
|
852
862
|
};
|
|
853
|
-
class
|
|
863
|
+
class Dn {
|
|
854
864
|
constructor() {
|
|
855
865
|
this.modalStack = [], this.baseZIndex = 1e3;
|
|
856
866
|
}
|
|
857
867
|
open(t = {}) {
|
|
858
868
|
const o = `modal-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`, n = document.createElement("div");
|
|
859
869
|
n.setAttribute("data-vt-modal", o), document.body.appendChild(n);
|
|
860
|
-
const s = D(!0), l = this.baseZIndex + this.modalStack.length * 10, r =
|
|
870
|
+
const s = D(!0), l = this.baseZIndex + this.modalStack.length * 10, r = it({
|
|
861
871
|
setup() {
|
|
862
872
|
const a = () => {
|
|
863
873
|
s.value = !1, setTimeout(() => {
|
|
@@ -865,7 +875,7 @@ class Hn {
|
|
|
865
875
|
}, 100);
|
|
866
876
|
};
|
|
867
877
|
return () => ke(
|
|
868
|
-
|
|
878
|
+
Ze,
|
|
869
879
|
{
|
|
870
880
|
modelValue: s.value,
|
|
871
881
|
"onUpdate:modelValue": a,
|
|
@@ -919,7 +929,7 @@ class Hn {
|
|
|
919
929
|
recalculateZIndices() {
|
|
920
930
|
}
|
|
921
931
|
}
|
|
922
|
-
const re = new
|
|
932
|
+
const re = new Dn(), An = {
|
|
923
933
|
install(e) {
|
|
924
934
|
e.config.globalProperties.$modal = re, e.config.globalProperties.$modalStack = {
|
|
925
935
|
closeAll: () => re.closeAll(),
|
|
@@ -927,16 +937,16 @@ const re = new Hn(), Pn = {
|
|
|
927
937
|
closeById: (t) => re.closeById(t)
|
|
928
938
|
};
|
|
929
939
|
}
|
|
930
|
-
},
|
|
940
|
+
}, On = { class: "vt-columns-selector-body" }, jn = { class: "vt-columns-selector" }, Nn = { class: "vt-columns-selector__panel" }, Zn = ["draggable", "onDragstart", "onDragover", "onDrop"], Fn = {
|
|
931
941
|
key: 0,
|
|
932
942
|
class: "vt-columns-selector__panel-item-pinned"
|
|
933
|
-
},
|
|
943
|
+
}, Un = { class: "vt-columns-selector__available" }, qn = ["onClick"], Xn = {
|
|
934
944
|
key: 0,
|
|
935
945
|
class: "vt-columns-selector__group-columns"
|
|
936
|
-
},
|
|
946
|
+
}, Gn = {
|
|
937
947
|
key: 0,
|
|
938
948
|
class: "vt-columns-selector__pinned-note"
|
|
939
|
-
},
|
|
949
|
+
}, Kn = { class: "vt-modal__content-button" }, Yn = /* @__PURE__ */ le({
|
|
940
950
|
__name: "VTableColumnSelector",
|
|
941
951
|
props: {
|
|
942
952
|
columns: {},
|
|
@@ -1004,7 +1014,7 @@ const re = new Hn(), Pn = {
|
|
|
1004
1014
|
T();
|
|
1005
1015
|
}, T = () => {
|
|
1006
1016
|
r.value = -1, i.value = -1, a.value = "before", document.body.style.cursor = "";
|
|
1007
|
-
},
|
|
1017
|
+
}, X = (d) => {
|
|
1008
1018
|
const v = ["vt-columns-selector__panel-item"];
|
|
1009
1019
|
return r.value === d && v.push("vt-columns-selector__panel-item--dragging"), i.value === d && a.value === "before" && v.push("vt-columns-selector__panel-item--drop-before"), i.value === d && a.value === "after" && v.push("vt-columns-selector__panel-item--drop-after"), v;
|
|
1010
1020
|
}, y = () => {
|
|
@@ -1045,12 +1055,12 @@ const re = new Hn(), Pn = {
|
|
|
1045
1055
|
};
|
|
1046
1056
|
return fe(() => {
|
|
1047
1057
|
y();
|
|
1048
|
-
}), (d, v) => (p(), f("div",
|
|
1049
|
-
_("div",
|
|
1050
|
-
_("div",
|
|
1051
|
-
(p(!0), f(
|
|
1058
|
+
}), (d, v) => (p(), f("div", On, [
|
|
1059
|
+
_("div", jn, [
|
|
1060
|
+
_("div", Nn, [
|
|
1061
|
+
(p(!0), f(ne, null, oe(s.value, (g, w) => (p(), f("div", {
|
|
1052
1062
|
key: g.prop,
|
|
1053
|
-
class: W(
|
|
1063
|
+
class: W(X(w)),
|
|
1054
1064
|
draggable: S(g),
|
|
1055
1065
|
onDragstart: (B) => Q(B, w),
|
|
1056
1066
|
onDragover: (B) => U(B, w),
|
|
@@ -1070,11 +1080,11 @@ const re = new Hn(), Pn = {
|
|
|
1070
1080
|
onClick: v[0] || (v[0] = he(() => {
|
|
1071
1081
|
}, ["stop"]))
|
|
1072
1082
|
}, null, 8, ["label", "disabled", "onChange"]),
|
|
1073
|
-
k(g) ? (p(), f("span",
|
|
1074
|
-
], 42,
|
|
1083
|
+
k(g) ? (p(), f("span", Fn, "pinned")) : H("", !0)
|
|
1084
|
+
], 42, Zn))), 128))
|
|
1075
1085
|
]),
|
|
1076
|
-
_("div",
|
|
1077
|
-
(p(!0), f(
|
|
1086
|
+
_("div", Un, [
|
|
1087
|
+
(p(!0), f(ne, null, oe(c.value, (g) => {
|
|
1078
1088
|
var w, B;
|
|
1079
1089
|
return p(), f("div", {
|
|
1080
1090
|
key: g.name,
|
|
@@ -1097,9 +1107,9 @@ const re = new Hn(), Pn = {
|
|
|
1097
1107
|
name: g.icon,
|
|
1098
1108
|
class: "vt-columns-selector__group-icon"
|
|
1099
1109
|
}, null, 8, ["name"])) : H("", !0)
|
|
1100
|
-
], 8,
|
|
1101
|
-
l.value.has(g.name) ? (p(), f("div",
|
|
1102
|
-
(p(!0), f(
|
|
1110
|
+
], 8, qn),
|
|
1111
|
+
l.value.has(g.name) ? (p(), f("div", Xn, [
|
|
1112
|
+
(p(!0), f(ne, null, oe(g.columns, (I) => (p(), f("div", {
|
|
1103
1113
|
key: I.prop,
|
|
1104
1114
|
class: "vt-columns-selector__group-column"
|
|
1105
1115
|
}, [
|
|
@@ -1109,14 +1119,14 @@ const re = new Hn(), Pn = {
|
|
|
1109
1119
|
disabled: !m(I),
|
|
1110
1120
|
onChange: (ee) => E(I, ee)
|
|
1111
1121
|
}, null, 8, ["label", "checked", "disabled", "onChange"]),
|
|
1112
|
-
m(I) ? H("", !0) : (p(), f("span",
|
|
1122
|
+
m(I) ? H("", !0) : (p(), f("span", Gn, " (закріплена) "))
|
|
1113
1123
|
]))), 128))
|
|
1114
1124
|
])) : H("", !0)
|
|
1115
1125
|
]);
|
|
1116
1126
|
}), 128))
|
|
1117
1127
|
])
|
|
1118
1128
|
]),
|
|
1119
|
-
_("div",
|
|
1129
|
+
_("div", Kn, [
|
|
1120
1130
|
Z(ge, { onClick: G }, {
|
|
1121
1131
|
default: xe(() => v[2] || (v[2] = [
|
|
1122
1132
|
_e("Скасувати", -1)
|
|
@@ -1137,7 +1147,7 @@ const re = new Hn(), Pn = {
|
|
|
1137
1147
|
])
|
|
1138
1148
|
]));
|
|
1139
1149
|
}
|
|
1140
|
-
}),
|
|
1150
|
+
}), Jn = /* @__PURE__ */ le({
|
|
1141
1151
|
__name: "ColumnActions",
|
|
1142
1152
|
props: {
|
|
1143
1153
|
column: {},
|
|
@@ -1147,7 +1157,7 @@ const re = new Hn(), Pn = {
|
|
|
1147
1157
|
emits: ["pin", "update-columns"],
|
|
1148
1158
|
setup(e, { emit: t }) {
|
|
1149
1159
|
const o = e, n = t, s = D(), l = D(), r = D(), i = D(!1), a = D(!1), u = D([]), c = async () => {
|
|
1150
|
-
if (await
|
|
1160
|
+
if (await at(), !s.value || !l.value) return;
|
|
1151
1161
|
const y = l.value.getBoundingClientRect(), E = s.value, $ = E.offsetWidth, J = y.left + y.width / 2;
|
|
1152
1162
|
E.style.top = `${y.bottom - 20}px`, E.style.left = `${J - $ / 2}px`;
|
|
1153
1163
|
const m = E.getBoundingClientRect();
|
|
@@ -1164,7 +1174,7 @@ const re = new Hn(), Pn = {
|
|
|
1164
1174
|
var E, $;
|
|
1165
1175
|
!((E = l.value) != null && E.contains(y.target)) && !(($ = s.value) != null && $.contains(y.target)) && F();
|
|
1166
1176
|
}, Q = () => {
|
|
1167
|
-
|
|
1177
|
+
X() ? (n("pin", o.column, "none"), console.log(`Колонка "${o.column.label}" відкріплена`)) : (n("pin", o.column, "left"), console.log(`Колонка "${o.column.label}" прикріплена зліва`)), F();
|
|
1168
1178
|
}, U = (y) => ({
|
|
1169
1179
|
name: "removed",
|
|
1170
1180
|
label: "Видалені колонки",
|
|
@@ -1192,7 +1202,7 @@ const re = new Hn(), Pn = {
|
|
|
1192
1202
|
J.length > 0 && m.push(U(J)), u.value = m;
|
|
1193
1203
|
}, M = () => {
|
|
1194
1204
|
N(o.allColumns), re.open({
|
|
1195
|
-
component:
|
|
1205
|
+
component: Yn,
|
|
1196
1206
|
title: "Управління колонками таблиці",
|
|
1197
1207
|
props: {
|
|
1198
1208
|
columns: o.allColumns,
|
|
@@ -1206,7 +1216,7 @@ const re = new Hn(), Pn = {
|
|
|
1206
1216
|
size: "large",
|
|
1207
1217
|
closeOnBackdropClick: !1
|
|
1208
1218
|
}), F();
|
|
1209
|
-
}, V = () => o.column.pinnedLeft, T = () => o.column.pinnedRight,
|
|
1219
|
+
}, V = () => o.column.pinnedLeft, T = () => o.column.pinnedRight, X = () => V() || T();
|
|
1210
1220
|
return fe(() => {
|
|
1211
1221
|
document.addEventListener("click", j), l.value && (r.value = l.value.closest("th")), N(o.allColumns);
|
|
1212
1222
|
}), $e(() => {
|
|
@@ -1226,9 +1236,9 @@ const re = new Hn(), Pn = {
|
|
|
1226
1236
|
}, [
|
|
1227
1237
|
_("li", { onClick: Q }, [
|
|
1228
1238
|
Z(Y, {
|
|
1229
|
-
name:
|
|
1239
|
+
name: X() ? "unfreeze" : "freeze"
|
|
1230
1240
|
}, null, 8, ["name"]),
|
|
1231
|
-
_("span", null, te(
|
|
1241
|
+
_("span", null, te(X() ? "Розморозити" : "Заморозити"), 1)
|
|
1232
1242
|
]),
|
|
1233
1243
|
_("li", { onClick: M }, [
|
|
1234
1244
|
Z(Y, { name: "columnInsert" }),
|
|
@@ -1237,18 +1247,18 @@ const re = new Hn(), Pn = {
|
|
|
1237
1247
|
], 2)) : H("", !0)
|
|
1238
1248
|
], 512));
|
|
1239
1249
|
}
|
|
1240
|
-
}),
|
|
1250
|
+
}), Qn = { class: "vt-table" }, eo = { class: "vt-th__content" }, to = { class: "vt-th__content" }, no = { class: "vt-th__label" }, oo = {
|
|
1241
1251
|
key: 0,
|
|
1242
1252
|
class: "vt-th__sortable"
|
|
1243
|
-
},
|
|
1253
|
+
}, lo = ["data-resizer", "onMousedown"], so = {
|
|
1244
1254
|
key: 0,
|
|
1245
1255
|
class: "vt-table__empty-row"
|
|
1246
|
-
},
|
|
1256
|
+
}, io = ["colspan"], ao = { class: "vt-table__empty-content" }, ro = ["onClick"], co = { class: "vt-table__cell-content" }, uo = { class: "vt-table__cell-content vt-table__cell-content--ellipsis" }, po = { key: 1 }, mo = ["data-resizer", "onMousedown"], ho = {
|
|
1247
1257
|
key: 0,
|
|
1248
1258
|
class: "vt-table__summary"
|
|
1249
|
-
},
|
|
1259
|
+
}, vo = { class: "vt-table__cell-content vt-table__cell-content--summary" }, ye = 50, fo = /* @__PURE__ */ le({
|
|
1250
1260
|
__name: "VTable",
|
|
1251
|
-
props: /* @__PURE__ */
|
|
1261
|
+
props: /* @__PURE__ */ Te({
|
|
1252
1262
|
data: {},
|
|
1253
1263
|
maxHeight: {},
|
|
1254
1264
|
defaultSort: {},
|
|
@@ -1266,9 +1276,9 @@ const re = new Hn(), Pn = {
|
|
|
1266
1276
|
columns: { required: !1 },
|
|
1267
1277
|
columnsModifiers: {}
|
|
1268
1278
|
}),
|
|
1269
|
-
emits: /* @__PURE__ */
|
|
1279
|
+
emits: /* @__PURE__ */ Te(["sort-change", "selection-change", "current-change", "row-click", "update:columns", "column-pin", "column-resize", "column-visibility", "column-sort", "columns-change", "infinity-scroll"], ["update:columns"]),
|
|
1270
1280
|
setup(e, { expose: t, emit: o }) {
|
|
1271
|
-
const n = e, s =
|
|
1281
|
+
const n = e, s = rt(e, "columns"), l = o, r = D({}), i = D(), a = ct([]), u = D(n.defaultSort || null), c = x(() => s.value !== void 0), k = x(() => n.data && n.data.length > 0), S = D(!1), F = D(0);
|
|
1272
1282
|
let j = null;
|
|
1273
1283
|
const Q = () => {
|
|
1274
1284
|
c.value && s.value ? a.splice(0, a.length, ...s.value) : n.columns && a.splice(0, a.length, ...n.columns);
|
|
@@ -1285,8 +1295,8 @@ const re = new Hn(), Pn = {
|
|
|
1285
1295
|
h && !c.value && a.splice(0, a.length, ...h);
|
|
1286
1296
|
},
|
|
1287
1297
|
{ deep: !0 }
|
|
1288
|
-
),
|
|
1289
|
-
const { sortedColumns: U, getDefaultColumnWidth: N, getStickyOffset: M } =
|
|
1298
|
+
), ut("vt-table-columns", a);
|
|
1299
|
+
const { sortedColumns: U, getDefaultColumnWidth: N, getStickyOffset: M } = Rn(a), { getTableWrapperStyle: V, getColumnStyle: T, getHeaderStyle: X, getFooterStyle: y } = Tn(n), { onMouseDown: E } = zn(), $ = x(() => Pn(n.data, u.value, a)), J = x(() => n.allData || n.data), m = n.selectable ? Wn(n, $, l, J) : null, A = () => ({
|
|
1290
1300
|
width: `${ye}px`,
|
|
1291
1301
|
minWidth: `${ye}px`,
|
|
1292
1302
|
maxWidth: `${ye}px`,
|
|
@@ -1313,16 +1323,16 @@ const re = new Hn(), Pn = {
|
|
|
1313
1323
|
if (!i.value || S.value) return;
|
|
1314
1324
|
const h = i.value, C = h.scrollTop, L = h.scrollHeight, R = h.clientHeight, P = 30;
|
|
1315
1325
|
j && clearTimeout(j), j = setTimeout(() => {
|
|
1316
|
-
const ue = C - F.value, pe = ue > 1, b = L - C - R <= P,
|
|
1326
|
+
const ue = C - F.value, pe = ue > 1, b = L - C - R <= P, se = L - C - R <= 5;
|
|
1317
1327
|
console.log("Scroll debug:", {
|
|
1318
1328
|
scrollDiff: ue,
|
|
1319
1329
|
isScrollingDown: pe,
|
|
1320
1330
|
isNearBottom: b,
|
|
1321
|
-
isAtBottom:
|
|
1331
|
+
isAtBottom: se,
|
|
1322
1332
|
scrollTop: C,
|
|
1323
1333
|
lastScrollTop: F.value,
|
|
1324
1334
|
remaining: L - C - R
|
|
1325
|
-
}), F.value = C, pe && (b ||
|
|
1335
|
+
}), F.value = C, pe && (b || se) && (S.value = !0, l("infinity-scroll"), setTimeout(() => {
|
|
1326
1336
|
S.value = !1;
|
|
1327
1337
|
}, 1e3));
|
|
1328
1338
|
}, 50);
|
|
@@ -1335,7 +1345,7 @@ const re = new Hn(), Pn = {
|
|
|
1335
1345
|
j && clearTimeout(j), i.value && i.value.removeEventListener("scroll", d);
|
|
1336
1346
|
});
|
|
1337
1347
|
const g = (h, C) => {
|
|
1338
|
-
|
|
1348
|
+
Hn(h, C, (L) => {
|
|
1339
1349
|
var R, P;
|
|
1340
1350
|
((R = u.value) == null ? void 0 : R.prop) === h.prop && u.value.direction === C ? u.value = null : u.value = L, l("sort-change", {
|
|
1341
1351
|
column: h,
|
|
@@ -1374,7 +1384,7 @@ const re = new Hn(), Pn = {
|
|
|
1374
1384
|
l("row-click", { row: h, column: C, event: L }), n.highlightCurrentRow && m && m.setCurrentRow(h);
|
|
1375
1385
|
}, Ce = (h, C, L) => {
|
|
1376
1386
|
L.stopPropagation(), m && m.toggleRowSelection(C, h);
|
|
1377
|
-
},
|
|
1387
|
+
}, Fe = (h, C) => {
|
|
1378
1388
|
C.stopPropagation(), m && m.toggleAllSelection();
|
|
1379
1389
|
}, Le = (h, C) => {
|
|
1380
1390
|
h && (r.value[C] = h);
|
|
@@ -1387,11 +1397,11 @@ const re = new Hn(), Pn = {
|
|
|
1387
1397
|
oldWidth: L
|
|
1388
1398
|
});
|
|
1389
1399
|
});
|
|
1390
|
-
},
|
|
1400
|
+
}, Ue = (h, C) => T(h, C, M, N), qe = (h, C) => X(h, C, M, N), Xe = (h, C) => y(h, C, M, N), Ge = (h, C) => {
|
|
1391
1401
|
if (!C || !C.prop) return "";
|
|
1392
1402
|
const L = h[C.prop];
|
|
1393
1403
|
return L == null ? "" : String(L);
|
|
1394
|
-
},
|
|
1404
|
+
}, Ke = x(() => {
|
|
1395
1405
|
if (!n.showSummary || !k.value) return {};
|
|
1396
1406
|
const h = a;
|
|
1397
1407
|
if (typeof n.summaryMethod == "function") {
|
|
@@ -1408,40 +1418,40 @@ const re = new Hn(), Pn = {
|
|
|
1408
1418
|
},
|
|
1409
1419
|
{}
|
|
1410
1420
|
);
|
|
1411
|
-
}),
|
|
1421
|
+
}), Ye = x(() => n.showSummary && k.value), Je = (h, C) => {
|
|
1412
1422
|
m && m.toggleRowSelection(h, C);
|
|
1413
|
-
}, Je = () => {
|
|
1414
|
-
m && m.toggleAllSelection();
|
|
1415
1423
|
}, Qe = () => {
|
|
1416
|
-
m && m.
|
|
1424
|
+
m && m.toggleAllSelection();
|
|
1417
1425
|
}, et = () => {
|
|
1426
|
+
m && m.selectAbsolutelyAll();
|
|
1427
|
+
}, tt = () => {
|
|
1418
1428
|
m && m.clearSelection();
|
|
1419
|
-
},
|
|
1429
|
+
}, nt = () => m ? m.getSelectionRows() : [], ot = (h) => {
|
|
1420
1430
|
m && m.setSelectionRows(h);
|
|
1421
1431
|
};
|
|
1422
1432
|
return fe(() => {
|
|
1423
1433
|
Q();
|
|
1424
1434
|
}), t({
|
|
1425
|
-
toggleRowSelection:
|
|
1426
|
-
toggleAllSelection:
|
|
1427
|
-
selectAbsolutelyAll:
|
|
1428
|
-
clearSelection:
|
|
1429
|
-
getSelectionRows:
|
|
1430
|
-
setSelectionRows:
|
|
1435
|
+
toggleRowSelection: Je,
|
|
1436
|
+
toggleAllSelection: Qe,
|
|
1437
|
+
selectAbsolutelyAll: et,
|
|
1438
|
+
clearSelection: tt,
|
|
1439
|
+
getSelectionRows: nt,
|
|
1440
|
+
setSelectionRows: ot,
|
|
1431
1441
|
resetInfinityScroll: v
|
|
1432
1442
|
// Додаємо метод для скидання infinity scroll
|
|
1433
1443
|
}), (h, C) => {
|
|
1434
1444
|
var R, P, ue, pe;
|
|
1435
|
-
const L =
|
|
1445
|
+
const L = je("tooltip");
|
|
1436
1446
|
return p(), f("div", {
|
|
1437
1447
|
ref_key: "tableWrapperRef",
|
|
1438
1448
|
ref: i,
|
|
1439
1449
|
class: "vt-table-wrapper",
|
|
1440
|
-
style: ae(
|
|
1450
|
+
style: ae(q(V)()),
|
|
1441
1451
|
onScroll: d
|
|
1442
1452
|
}, [
|
|
1443
1453
|
me(h.$slots, "default"),
|
|
1444
|
-
_("table",
|
|
1454
|
+
_("table", Qn, [
|
|
1445
1455
|
_("thead", null, [
|
|
1446
1456
|
_("tr", null, [
|
|
1447
1457
|
n.selectable ? (p(), f("th", {
|
|
@@ -1452,20 +1462,20 @@ const re = new Hn(), Pn = {
|
|
|
1452
1462
|
}]),
|
|
1453
1463
|
style: ae(z())
|
|
1454
1464
|
}, [
|
|
1455
|
-
_("div",
|
|
1465
|
+
_("div", eo, [
|
|
1456
1466
|
Z(de, {
|
|
1457
|
-
checked: (R =
|
|
1458
|
-
indeterminate: (P =
|
|
1459
|
-
"is-double": (pe = (ue =
|
|
1460
|
-
onChange:
|
|
1467
|
+
checked: (R = q(m)) == null ? void 0 : R.isAllSelected.value,
|
|
1468
|
+
indeterminate: (P = q(m)) == null ? void 0 : P.isIndeterminate.value,
|
|
1469
|
+
"is-double": (pe = (ue = q(m)) == null ? void 0 : ue.isDoubleCheck) == null ? void 0 : pe.value,
|
|
1470
|
+
onChange: Fe
|
|
1461
1471
|
}, null, 8, ["checked", "indeterminate", "is-double"])
|
|
1462
1472
|
])
|
|
1463
1473
|
], 6)) : H("", !0),
|
|
1464
|
-
(p(!0), f(
|
|
1474
|
+
(p(!0), f(ne, null, oe(q(U), (b, se) => (p(), f("th", {
|
|
1465
1475
|
key: b.prop,
|
|
1466
1476
|
ref_for: !0,
|
|
1467
1477
|
ref: (ie) => Le(ie, b.prop),
|
|
1468
|
-
style: ae(
|
|
1478
|
+
style: ae(qe(b, se)),
|
|
1469
1479
|
class: W([
|
|
1470
1480
|
"vt-table__th",
|
|
1471
1481
|
{
|
|
@@ -1476,24 +1486,24 @@ const re = new Hn(), Pn = {
|
|
|
1476
1486
|
}
|
|
1477
1487
|
])
|
|
1478
1488
|
}, [
|
|
1479
|
-
_("div",
|
|
1480
|
-
_("div",
|
|
1481
|
-
b.sortable ? (p(), f("div",
|
|
1489
|
+
_("div", to, [
|
|
1490
|
+
_("div", no, te(b.label), 1),
|
|
1491
|
+
b.sortable ? (p(), f("div", oo, [
|
|
1482
1492
|
Z(Y, {
|
|
1483
1493
|
name: "arrowTop",
|
|
1484
|
-
class: W(
|
|
1494
|
+
class: W(q(Ee)(b, u.value).asc),
|
|
1485
1495
|
onClick: he((ie) => g(b, "asc"), ["stop"])
|
|
1486
1496
|
}, null, 8, ["class", "onClick"]),
|
|
1487
1497
|
Z(Y, {
|
|
1488
1498
|
name: "arrowDown",
|
|
1489
|
-
class: W(
|
|
1499
|
+
class: W(q(Ee)(b, u.value).desc),
|
|
1490
1500
|
onClick: he((ie) => g(b, "desc"), ["stop"])
|
|
1491
1501
|
}, null, 8, ["class", "onClick"])
|
|
1492
1502
|
])) : H("", !0),
|
|
1493
|
-
b.actionColumn ? (p(), ce(
|
|
1503
|
+
b.actionColumn ? (p(), ce(Jn, {
|
|
1494
1504
|
key: 1,
|
|
1495
1505
|
column: b,
|
|
1496
|
-
"all-columns":
|
|
1506
|
+
"all-columns": q(U),
|
|
1497
1507
|
columnsSelector: n.columnsSelector,
|
|
1498
1508
|
onPin: w,
|
|
1499
1509
|
onUpdateColumns: B
|
|
@@ -1503,24 +1513,24 @@ const re = new Hn(), Pn = {
|
|
|
1503
1513
|
class: "vt-table__resizer",
|
|
1504
1514
|
"data-resizer": b.prop,
|
|
1505
1515
|
onMousedown: (ie) => Ie(ie, b)
|
|
1506
|
-
}, null, 40,
|
|
1516
|
+
}, null, 40, lo)
|
|
1507
1517
|
], 6))), 128))
|
|
1508
1518
|
])
|
|
1509
1519
|
]),
|
|
1510
1520
|
_("tbody", null, [
|
|
1511
|
-
k.value ? (p(!0), f(
|
|
1512
|
-
var
|
|
1521
|
+
k.value ? (p(!0), f(ne, { key: 1 }, oe($.value, (b, se) => {
|
|
1522
|
+
var ie, Be, Re;
|
|
1513
1523
|
return p(), f("tr", {
|
|
1514
1524
|
key: b.id,
|
|
1515
1525
|
class: W([
|
|
1516
1526
|
"vt-table__row",
|
|
1517
1527
|
{
|
|
1518
|
-
"vt-table__row--selected": (
|
|
1519
|
-
"vt-table__row--current": ((
|
|
1528
|
+
"vt-table__row--selected": (ie = q(m)) == null ? void 0 : ie.isRowSelected(b),
|
|
1529
|
+
"vt-table__row--current": ((Be = q(m)) == null ? void 0 : Be.currentRow.value) === b,
|
|
1520
1530
|
"vt-table__row--clickable": n.selectOnClickRow || n.highlightCurrentRow
|
|
1521
1531
|
}
|
|
1522
1532
|
]),
|
|
1523
|
-
onClick: (O) => ee(b,
|
|
1533
|
+
onClick: (O) => ee(b, q(U)[0], O)
|
|
1524
1534
|
}, [
|
|
1525
1535
|
n.selectable ? (p(), f("td", {
|
|
1526
1536
|
key: 0,
|
|
@@ -1529,18 +1539,18 @@ const re = new Hn(), Pn = {
|
|
|
1529
1539
|
}]),
|
|
1530
1540
|
style: ae(A())
|
|
1531
1541
|
}, [
|
|
1532
|
-
_("div",
|
|
1542
|
+
_("div", co, [
|
|
1533
1543
|
Z(de, {
|
|
1534
|
-
checked: (
|
|
1544
|
+
checked: (Re = q(m)) == null ? void 0 : Re.isRowSelected(b),
|
|
1535
1545
|
onChange: (O, be) => Ce(O, b, be)
|
|
1536
1546
|
}, null, 8, ["checked", "onChange"])
|
|
1537
1547
|
])
|
|
1538
1548
|
], 4)) : H("", !0),
|
|
1539
|
-
(p(!0), f(
|
|
1549
|
+
(p(!0), f(ne, null, oe(q(U), (O, be) => (p(), f("td", {
|
|
1540
1550
|
key: O.prop,
|
|
1541
1551
|
ref_for: !0,
|
|
1542
1552
|
ref: (we) => Le(we, O.prop),
|
|
1543
|
-
style: ae(
|
|
1553
|
+
style: ae(Ue(O, be)),
|
|
1544
1554
|
class: W([
|
|
1545
1555
|
"vt-table__td",
|
|
1546
1556
|
{
|
|
@@ -1549,39 +1559,34 @@ const re = new Hn(), Pn = {
|
|
|
1549
1559
|
}
|
|
1550
1560
|
])
|
|
1551
1561
|
}, [
|
|
1552
|
-
Me((p(), f("div",
|
|
1553
|
-
O.renderSlot ? (p(), ce(
|
|
1554
|
-
key: 0,
|
|
1555
|
-
row: b,
|
|
1556
|
-
column: O,
|
|
1557
|
-
value: b[O.prop]
|
|
1558
|
-
}, null, 8, ["row", "column", "value"])) : (p(), f("span", co, te(b[O.prop]), 1))
|
|
1562
|
+
Me((p(), f("div", uo, [
|
|
1563
|
+
O.renderSlot ? (p(), ce(Ae(() => q(En)(O.renderSlot, { row: b, column: O, value: b[O.prop], index: se })), { key: 0 })) : (p(), f("span", po, te(b[O.prop]), 1))
|
|
1559
1564
|
])), [
|
|
1560
|
-
[L, O.showOverflowTooltip ?
|
|
1565
|
+
[L, O.showOverflowTooltip ? Ge(b, O) : null]
|
|
1561
1566
|
]),
|
|
1562
1567
|
_("div", {
|
|
1563
1568
|
class: "vt-table__resizer",
|
|
1564
1569
|
"data-resizer": O.prop,
|
|
1565
1570
|
onMousedown: (we) => Ie(we, O)
|
|
1566
|
-
}, null, 40,
|
|
1571
|
+
}, null, 40, mo)
|
|
1567
1572
|
], 6))), 128))
|
|
1568
|
-
], 10,
|
|
1569
|
-
}), 128)) : (p(), f("tr",
|
|
1573
|
+
], 10, ro);
|
|
1574
|
+
}), 128)) : (p(), f("tr", so, [
|
|
1570
1575
|
_("td", {
|
|
1571
|
-
colspan:
|
|
1576
|
+
colspan: q(U).length + (n.selectable ? 1 : 0),
|
|
1572
1577
|
class: "vt-table__empty-cell"
|
|
1573
1578
|
}, [
|
|
1574
|
-
_("div",
|
|
1579
|
+
_("div", ao, [
|
|
1575
1580
|
Z(Y, {
|
|
1576
1581
|
name: "empty",
|
|
1577
1582
|
class: "vt-table__empty-icon"
|
|
1578
1583
|
}),
|
|
1579
1584
|
C[0] || (C[0] = _("span", { class: "vt-table__empty-text" }, "Немає даних!", -1))
|
|
1580
1585
|
])
|
|
1581
|
-
], 8,
|
|
1586
|
+
], 8, io)
|
|
1582
1587
|
]))
|
|
1583
1588
|
]),
|
|
1584
|
-
|
|
1589
|
+
Ye.value ? (p(), f("tfoot", ho, [
|
|
1585
1590
|
_("tr", null, [
|
|
1586
1591
|
n.selectable ? (p(), f("td", {
|
|
1587
1592
|
key: 0,
|
|
@@ -1592,9 +1597,9 @@ const re = new Hn(), Pn = {
|
|
|
1592
1597
|
}, C[1] || (C[1] = [
|
|
1593
1598
|
_("div", { class: "vt-table__cell-content vt-table__cell-content--summary" }, null, -1)
|
|
1594
1599
|
]), 4)) : H("", !0),
|
|
1595
|
-
(p(!0), f(
|
|
1600
|
+
(p(!0), f(ne, null, oe(q(U), (b, se) => (p(), f("td", {
|
|
1596
1601
|
key: b.prop,
|
|
1597
|
-
style: ae(
|
|
1602
|
+
style: ae(Xe(b, se)),
|
|
1598
1603
|
class: W([
|
|
1599
1604
|
"vt-table__td",
|
|
1600
1605
|
{
|
|
@@ -1603,7 +1608,7 @@ const re = new Hn(), Pn = {
|
|
|
1603
1608
|
}
|
|
1604
1609
|
])
|
|
1605
1610
|
}, [
|
|
1606
|
-
_("div",
|
|
1611
|
+
_("div", vo, te(Ke.value[b.prop]), 1)
|
|
1607
1612
|
], 6))), 128))
|
|
1608
1613
|
])
|
|
1609
1614
|
])) : H("", !0)
|
|
@@ -1611,7 +1616,7 @@ const re = new Hn(), Pn = {
|
|
|
1611
1616
|
], 36);
|
|
1612
1617
|
};
|
|
1613
1618
|
}
|
|
1614
|
-
}),
|
|
1619
|
+
}), _o = /* @__PURE__ */ le({
|
|
1615
1620
|
__name: "VTableColumn",
|
|
1616
1621
|
props: {
|
|
1617
1622
|
prop: {},
|
|
@@ -1629,7 +1634,7 @@ const re = new Hn(), Pn = {
|
|
|
1629
1634
|
sortMethod: {}
|
|
1630
1635
|
},
|
|
1631
1636
|
setup(e) {
|
|
1632
|
-
const t = e, o =
|
|
1637
|
+
const t = e, o = Oe(), n = dt("vt-table-columns");
|
|
1633
1638
|
n || console.error(
|
|
1634
1639
|
"VTableColumn: не знайдено контекст таблиці. Переконайтеся, що компонент використовується всередині VTable."
|
|
1635
1640
|
);
|
|
@@ -1688,7 +1693,7 @@ const re = new Hn(), Pn = {
|
|
|
1688
1693
|
}
|
|
1689
1694
|
}), (r, i) => null;
|
|
1690
1695
|
}
|
|
1691
|
-
}),
|
|
1696
|
+
}), We = (e, t) => {
|
|
1692
1697
|
const o = document.createElement("div");
|
|
1693
1698
|
o.className = `vt-tooltip vt-tooltip--${t}`, o.innerText = e, Object.assign(o.style, {
|
|
1694
1699
|
position: "absolute",
|
|
@@ -1773,23 +1778,23 @@ const re = new Hn(), Pn = {
|
|
|
1773
1778
|
}
|
|
1774
1779
|
const u = window.innerWidth, c = window.innerHeight;
|
|
1775
1780
|
a < 8 ? a = 8 : a + s.width > u - 8 && (a = u - s.width - 8), i < r + 8 ? o === "top" ? i = n.bottom + r + 8 : i = r + 8 : i + s.height > r + c - 8 && (o === "bottom" ? i = n.top + r - s.height - 8 : i = r + c - s.height - 8), e.style.top = `${i}px`, e.style.left = `${a}px`;
|
|
1776
|
-
},
|
|
1781
|
+
}, Ve = (e, t, o) => {
|
|
1777
1782
|
e.parentElement || document.body.appendChild(e), e.style.visibility = "visible", Se(e, t, o), requestAnimationFrame(() => {
|
|
1778
1783
|
e.style.opacity = "1";
|
|
1779
1784
|
});
|
|
1780
|
-
},
|
|
1785
|
+
}, He = (e) => {
|
|
1781
1786
|
e.style.opacity = "0", e.style.visibility = "hidden";
|
|
1782
|
-
},
|
|
1787
|
+
}, Pe = (e) => e.scrollWidth > e.clientWidth || e.scrollHeight > e.clientHeight, De = (e) => !!e.closest(".vt-table, table"), go = {
|
|
1783
1788
|
mounted(e, t) {
|
|
1784
1789
|
var a;
|
|
1785
1790
|
const o = (a = t.value) == null ? void 0 : a.trim();
|
|
1786
1791
|
if (!o) return;
|
|
1787
|
-
const n = e.dataset.placement || "top", s =
|
|
1792
|
+
const n = e.dataset.placement || "top", s = We(o, n);
|
|
1788
1793
|
e.__tooltipEl = s;
|
|
1789
1794
|
const l = () => {
|
|
1790
|
-
(
|
|
1795
|
+
(De(e) ? Pe(e) : !0) && Ve(s, e, n);
|
|
1791
1796
|
}, r = () => {
|
|
1792
|
-
|
|
1797
|
+
He(s);
|
|
1793
1798
|
}, i = () => {
|
|
1794
1799
|
s.style.opacity === "1" && Se(s, e, n);
|
|
1795
1800
|
};
|
|
@@ -1801,12 +1806,12 @@ const re = new Hn(), Pn = {
|
|
|
1801
1806
|
if (e.__tooltipEl)
|
|
1802
1807
|
o ? e.__tooltipEl.firstChild.textContent = o : (e.__tooltipEl.parentElement && e.__tooltipEl.parentElement.removeChild(e.__tooltipEl), delete e.__tooltipEl);
|
|
1803
1808
|
else if (o) {
|
|
1804
|
-
const s = e.dataset.placement || "top", l =
|
|
1809
|
+
const s = e.dataset.placement || "top", l = We(o, s);
|
|
1805
1810
|
e.__tooltipEl = l;
|
|
1806
1811
|
const r = () => {
|
|
1807
|
-
(
|
|
1812
|
+
(De(e) ? Pe(e) : !0) && Ve(l, e, s);
|
|
1808
1813
|
}, i = () => {
|
|
1809
|
-
|
|
1814
|
+
He(l);
|
|
1810
1815
|
}, a = () => {
|
|
1811
1816
|
l.style.opacity === "1" && Se(l, e, s);
|
|
1812
1817
|
};
|
|
@@ -1816,24 +1821,24 @@ const re = new Hn(), Pn = {
|
|
|
1816
1821
|
beforeUnmount(e) {
|
|
1817
1822
|
e.__tooltipEl && e.__tooltipEl.parentElement && (e.__tooltipEl.parentElement.removeChild(e.__tooltipEl), delete e.__tooltipEl), e.__mouseenterHandler && (e.removeEventListener("mouseenter", e.__mouseenterHandler), delete e.__mouseenterHandler), e.__mouseleaveHandler && (e.removeEventListener("mouseleave", e.__mouseleaveHandler), delete e.__mouseleaveHandler), e.__scrollHandler && (window.removeEventListener("scroll", e.__scrollHandler, !0), window.removeEventListener("resize", e.__scrollHandler), delete e.__scrollHandler);
|
|
1818
1823
|
}
|
|
1819
|
-
},
|
|
1824
|
+
}, Co = {
|
|
1820
1825
|
install(e, t = {}) {
|
|
1821
1826
|
const { prefix: o = "V", modal: n = !0 } = t;
|
|
1822
|
-
e.component(`${o}Button`, ge), e.component(`${o}Icon`, Y), e.component(`${o}Loader`,
|
|
1827
|
+
e.component(`${o}Button`, ge), e.component(`${o}Icon`, Y), e.component(`${o}Loader`, Ne), e.component(`${o}Modal`, Ze), e.component(`${o}Pagination`, Ln), e.component(`${o}Checkbox`, de), e.component(`${o}Table`, fo), e.component(`${o}TableColumn`, _o), e.directive("tooltip", go), n && e.use(An);
|
|
1823
1828
|
}
|
|
1824
|
-
},
|
|
1829
|
+
}, wo = Co.install;
|
|
1825
1830
|
export {
|
|
1826
1831
|
ge as VButton,
|
|
1827
1832
|
de as VCheckbox,
|
|
1828
1833
|
Y as VIcon,
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1834
|
+
Ne as VLoader,
|
|
1835
|
+
Ze as VModal,
|
|
1836
|
+
An as VModalPlugin,
|
|
1837
|
+
Ln as VPagination,
|
|
1838
|
+
fo as VTable,
|
|
1839
|
+
_o as VTableColumn,
|
|
1840
|
+
Co as default,
|
|
1841
|
+
wo as install,
|
|
1837
1842
|
re as modalManager,
|
|
1838
|
-
|
|
1843
|
+
go as tooltipDirective
|
|
1839
1844
|
};
|