voiptime-components 0.0.14 → 0.0.16
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 +502 -515
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { createElementBlock as
|
|
1
|
+
import { createElementBlock as _, openBlock as m, createElementVNode as v, defineComponent as le, computed as x, createBlock as re, createCommentVNode as H, resolveDynamicComponent as ot, useSlots as Ae, resolveDirective as Oe, withDirectives as Me, normalizeClass as W, renderSlot as pe, Teleport as lt, normalizeStyle as ie, withModifiers as me, toDisplayString as te, watch as he, Fragment as ne, renderList as oe, vModelSelect as st, createVNode as N, withCtx as xe, createTextVNode as _e, ref as D, createApp as it, h as ke, onMounted as ve, 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
|
|
16
|
-
|
|
14
|
+
function ht(e, t) {
|
|
15
|
+
return m(), _("svg", mt, t[0] || (t[0] = [
|
|
16
|
+
v("path", {
|
|
17
17
|
d: "M14 8L10 12L6 8",
|
|
18
18
|
stroke: "currentColor",
|
|
19
19
|
"stroke-width": "1.5",
|
|
@@ -22,16 +22,16 @@ 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
|
|
34
|
-
|
|
32
|
+
function gt(e, t) {
|
|
33
|
+
return m(), _("svg", _t, t[0] || (t[0] = [
|
|
34
|
+
v("path", {
|
|
35
35
|
d: "M6 12L10 8L14 12",
|
|
36
36
|
stroke: "currentColor",
|
|
37
37
|
"stroke-width": "1.5",
|
|
@@ -40,38 +40,38 @@ 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
|
|
52
|
-
|
|
50
|
+
function kt(e, t) {
|
|
51
|
+
return m(), _("svg", wt, t[0] || (t[0] = [
|
|
52
|
+
v("path", {
|
|
53
53
|
d: "M11.8789 4.90517L11.2561 4.20124C10.4045 3.33504 9.28504 2.7626 8.06789 2.5709C6.85074 2.3792 5.60245 2.57874 4.5127 3.13917C3.42296 3.69961 2.55134 4.59032 2.03031 5.67593C1.50928 6.76155 1.36732 7.98272 1.626 9.15387C1.88469 10.325 2.52987 11.3821 3.46351 12.1645C4.39716 12.9469 5.56821 13.4119 6.79871 13.4887C8.02921 13.5655 9.25189 13.25 10.2809 12.5901C11.31 11.9302 12.0891 10.962 12.5 9.83266",
|
|
54
54
|
stroke: "currentColor",
|
|
55
55
|
"stroke-width": "1.5",
|
|
56
56
|
"stroke-miterlimit": "10",
|
|
57
57
|
"stroke-linecap": "round"
|
|
58
58
|
}, null, -1),
|
|
59
|
-
|
|
59
|
+
v("path", {
|
|
60
60
|
d: "M8.5157 6.5C8.07025 6.5 7.84716 5.96143 8.16215 5.64645L10.3086 3.5L12.455 1.35355C12.77 1.03857 13.3086 1.26165 13.3086 1.70711V6C13.3086 6.27614 13.0847 6.5 12.8086 6.5L8.5157 6.5Z",
|
|
61
61
|
fill: "currentColor"
|
|
62
62
|
}, null, -1)
|
|
63
63
|
]));
|
|
64
64
|
}
|
|
65
|
-
const
|
|
65
|
+
const yt = /* @__PURE__ */ K(bt, [["render", kt]]), xt = {}, St = {
|
|
66
66
|
width: "21",
|
|
67
67
|
height: "20",
|
|
68
68
|
viewBox: "0 0 21 20",
|
|
69
69
|
fill: "none",
|
|
70
70
|
xmlns: "http://www.w3.org/2000/svg"
|
|
71
71
|
};
|
|
72
|
-
function
|
|
73
|
-
return
|
|
74
|
-
|
|
72
|
+
function Mt(e, t) {
|
|
73
|
+
return m(), _("svg", St, t[0] || (t[0] = [
|
|
74
|
+
v("path", {
|
|
75
75
|
d: "M8.60352 6L12.6035 10L8.60352 14",
|
|
76
76
|
stroke: "currentColor",
|
|
77
77
|
"stroke-width": "1.5",
|
|
@@ -80,16 +80,16 @@ function 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
|
|
92
|
-
|
|
90
|
+
function Bt(e, t) {
|
|
91
|
+
return m(), _("svg", It, t[0] || (t[0] = [
|
|
92
|
+
v("path", {
|
|
93
93
|
d: "M12.3984 14L8.39844 10L12.3984 6",
|
|
94
94
|
stroke: "currentColor",
|
|
95
95
|
"stroke-width": "1.5",
|
|
@@ -98,16 +98,16 @@ function 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
|
|
110
|
-
|
|
108
|
+
function Et(e, t) {
|
|
109
|
+
return m(), _("svg", zt, t[0] || (t[0] = [
|
|
110
|
+
v("path", {
|
|
111
111
|
d: "M12.5 1.66406L11.1783 2.94156C10.6233 3.47906 10.345 3.7474 10 3.7474C9.655 3.7474 9.37667 3.47906 8.82167 2.94156L7.5 1.66406M14.5833 5.83073C15.7533 5.83073 16.3392 5.83073 16.7592 6.11156C16.9412 6.23319 17.0975 6.3895 17.2192 6.57156C17.5 6.99156 17.5 7.5774 17.5 8.7474V15.4141C17.5 16.5841 17.5 17.1699 17.2192 17.5899C17.0975 17.772 16.9412 17.9283 16.7592 18.0499C16.3392 18.3307 15.7533 18.3307 14.5833 18.3307C13.4133 18.3307 12.8275 18.3307 12.4075 18.0499C12.2254 17.9283 12.0691 17.772 11.9475 17.5899C11.6667 17.1699 11.6667 16.5841 11.6667 15.4141V8.7474C11.6667 7.5774 11.6667 6.99156 11.9475 6.57156C12.0691 6.3895 12.2254 6.23319 12.4075 6.11156C12.8275 5.83073 13.4133 5.83073 14.5833 5.83073ZM5.41667 5.83073C6.58667 5.83073 7.1725 5.83073 7.5925 6.11156C7.77456 6.23319 7.93087 6.3895 8.0525 6.57156C8.33333 6.99156 8.33333 7.5774 8.33333 8.7474V15.4141C8.33333 16.5841 8.33333 17.1699 8.0525 17.5899C7.93087 17.772 7.77456 17.9283 7.5925 18.0499C7.1725 18.3307 6.58667 18.3307 5.41667 18.3307C4.24667 18.3307 3.66083 18.3307 3.24083 18.0499C3.05877 17.9283 2.90246 17.772 2.78083 17.5899C2.5 17.1699 2.5 16.5841 2.5 15.4141V8.7474C2.5 7.5774 2.5 6.99156 2.78083 6.57156C2.90246 6.3895 3.05877 6.23319 3.24083 6.11156C3.66083 5.83073 4.24667 5.83073 5.41667 5.83073Z",
|
|
112
112
|
stroke: "currentColor",
|
|
113
113
|
"stroke-width": "1.5",
|
|
@@ -116,23 +116,23 @@ function 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
|
|
128
|
-
|
|
126
|
+
function Pt(e, t) {
|
|
127
|
+
return m(), _("svg", Ht, t[0] || (t[0] = [
|
|
128
|
+
v("path", {
|
|
129
129
|
d: "M8 3V5.2225M8 5.2225V10.7775M8 5.2225L9.875 4.25M8 5.2225L6.125 4.25M8 10.7775V13M8 10.7775L6.125 11.75M8 10.7775L9.875 11.75M13 8H10.7775M10.7775 8H5.2225M10.7775 8L11.75 9.875M10.7775 8L11.75 6.125M5.2225 8H3M5.2225 8L4.25 6.125M5.2225 8L4.25 9.875",
|
|
130
130
|
stroke: "currentColor",
|
|
131
131
|
"stroke-width": "1.5",
|
|
132
132
|
"stroke-linecap": "round",
|
|
133
133
|
"stroke-linejoin": "round"
|
|
134
134
|
}, null, -1),
|
|
135
|
-
|
|
135
|
+
v("path", {
|
|
136
136
|
d: "M12 14.7143L13.1151 15.6701C13.3268 15.8515 13.646 15.8247 13.8246 15.6105L16 13",
|
|
137
137
|
stroke: "currentColor",
|
|
138
138
|
"stroke-width": "1.5",
|
|
@@ -140,23 +140,23 @@ function 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
|
|
152
|
-
|
|
150
|
+
function jt(e, t) {
|
|
151
|
+
return m(), _("svg", Ot, t[0] || (t[0] = [
|
|
152
|
+
v("path", {
|
|
153
153
|
d: "M8 3V5.2225M8 5.2225V10.7775M8 5.2225L9.875 4.25M8 5.2225L6.125 4.25M8 10.7775V13M8 10.7775L6.125 11.75M8 10.7775L9.875 11.75M13 8H10.7775M10.7775 8H5.2225M10.7775 8L11.75 9.875M10.7775 8L11.75 6.125M5.2225 8H3M5.2225 8L4.25 6.125M5.2225 8L4.25 9.875",
|
|
154
154
|
stroke: "currentColor",
|
|
155
155
|
"stroke-width": "1.5",
|
|
156
156
|
"stroke-linecap": "round",
|
|
157
157
|
"stroke-linejoin": "round"
|
|
158
158
|
}, null, -1),
|
|
159
|
-
|
|
159
|
+
v("path", {
|
|
160
160
|
d: "M13 16L14.5 14.5M16 13L14.5 14.5M14.5 14.5L13 13M14.5 14.5L16 16",
|
|
161
161
|
stroke: "currentColor",
|
|
162
162
|
"stroke-width": "1.5",
|
|
@@ -164,16 +164,16 @@ function 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
|
|
176
|
-
|
|
174
|
+
function Ut(e, t) {
|
|
175
|
+
return m(), _("svg", Ft, t[0] || (t[0] = [
|
|
176
|
+
v("path", {
|
|
177
177
|
d: "M24.195 7H18.625C17.1332 7 15.7024 7.59263 14.6475 8.64752C13.5926 9.70242 13 11.1332 13 12.625V46.375C13 47.8668 13.5926 49.2976 14.6475 50.3525C15.7024 51.4074 17.1332 52 18.625 52H41.125C42.6168 52 44.0476 51.4074 45.1025 50.3525C46.1574 49.2976 46.75 47.8668 46.75 46.375V29.5M24.195 7C27.3025 7 29.875 9.5175 29.875 12.625V18.25C29.875 19.7418 30.4676 21.1726 31.5225 22.2275C32.5774 23.2824 34.0082 23.875 35.5 23.875H41.125C42.6168 23.875 44.0476 24.4676 45.1025 25.5225C46.1574 26.5774 46.75 28.0082 46.75 29.5M24.195 7C33.42 7 46.75 20.4 46.75 29.5",
|
|
178
178
|
stroke: "currentColor",
|
|
179
179
|
"stroke-width": "2",
|
|
@@ -182,22 +182,22 @@ function 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
|
|
194
|
-
|
|
192
|
+
function Kt(e, t) {
|
|
193
|
+
return m(), _("svg", Gt, t[0] || (t[0] = [
|
|
194
|
+
v("path", {
|
|
195
195
|
"fill-rule": "evenodd",
|
|
196
196
|
"clip-rule": "evenodd",
|
|
197
197
|
d: "M6.99479 8.75521C6.55276 8.75521 6.12884 8.57961 5.81628 8.26705C5.50372 7.95449 5.32812 7.53057 5.32812 7.08854C5.32812 6.64651 5.50372 6.22259 5.81628 5.91003C6.12884 5.59747 6.55276 5.42187 6.99479 5.42188C7.43682 5.42187 7.86074 5.59747 8.1733 5.91003C8.48586 6.22259 8.66146 6.64651 8.66146 7.08854C8.66146 7.53057 8.48586 7.95449 8.1733 8.26705C7.86074 8.57961 7.43682 8.75521 6.99479 8.75521ZM6.99479 14.5885C6.55276 14.5885 6.12884 14.4129 5.81628 14.1004C5.50372 13.7878 5.32812 13.3639 5.32812 12.9219C5.32812 12.4798 5.50372 12.0559 5.81628 11.7434C6.12884 11.4308 6.55276 11.2552 6.99479 11.2552C7.43682 11.2552 7.86074 11.4308 8.1733 11.7434C8.48586 12.0559 8.66146 12.4798 8.66146 12.9219C8.66146 13.3639 8.48586 13.7878 8.1733 14.1004C7.86074 14.4129 7.43682 14.5885 6.99479 14.5885Z",
|
|
198
198
|
fill: "currentColor"
|
|
199
199
|
}, null, -1),
|
|
200
|
-
|
|
200
|
+
v("path", {
|
|
201
201
|
"fill-rule": "evenodd",
|
|
202
202
|
"clip-rule": "evenodd",
|
|
203
203
|
d: "M12.9948 8.75521C12.5528 8.75521 12.1288 8.57961 11.8163 8.26705C11.5037 7.95449 11.3281 7.53057 11.3281 7.08854C11.3281 6.64651 11.5037 6.22259 11.8163 5.91003C12.1288 5.59747 12.5528 5.42187 12.9948 5.42188C13.4368 5.42187 13.8607 5.59747 14.1733 5.91003C14.4859 6.22259 14.6615 6.64651 14.6615 7.08854C14.6615 7.53057 14.4859 7.95449 14.1733 8.26705C13.8607 8.57961 13.4368 8.75521 12.9948 8.75521ZM12.9948 14.5885C12.5528 14.5885 12.1288 14.4129 11.8163 14.1004C11.5037 13.7878 11.3281 13.3639 11.3281 12.9219C11.3281 12.4798 11.5037 12.0559 11.8163 11.7434C12.1288 11.4308 12.5528 11.2552 12.9948 11.2552C13.4368 11.2552 13.8607 11.4308 14.1733 11.7434C14.4859 12.0559 14.6615 12.4798 14.6615 12.9219C14.6615 13.3639 14.4859 13.7878 14.1733 14.1004C13.8607 14.4129 13.4368 14.5885 12.9948 14.5885Z",
|
|
@@ -205,16 +205,16 @@ function 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
|
|
217
|
-
|
|
215
|
+
function en(e, t) {
|
|
216
|
+
return m(), _("svg", Qt, t[0] || (t[0] = [
|
|
217
|
+
v("path", {
|
|
218
218
|
"fill-rule": "evenodd",
|
|
219
219
|
"clip-rule": "evenodd",
|
|
220
220
|
d: "M10.1667 5.83333C9.72464 5.83333 9.30072 5.65774 8.98816 5.34518C8.67559 5.03262 8.5 4.60869 8.5 4.16667C8.5 3.72464 8.67559 3.30072 8.98816 2.98816C9.30072 2.67559 9.72464 2.5 10.1667 2.5C10.6087 2.5 11.0326 2.67559 11.3452 2.98816C11.6577 3.30072 11.8333 3.72464 11.8333 4.16667C11.8333 4.60869 11.6577 5.03262 11.3452 5.34518C11.0326 5.65774 10.6087 5.83333 10.1667 5.83333ZM10.1667 11.6667C9.72464 11.6667 9.30072 11.4911 8.98816 11.1785C8.67559 10.8659 8.5 10.442 8.5 10C8.5 9.55797 8.67559 9.13405 8.98816 8.82149C9.30072 8.50893 9.72464 8.33333 10.1667 8.33333C10.6087 8.33333 11.0326 8.50893 11.3452 8.82149C11.6577 9.13405 11.8333 9.55797 11.8333 10C11.8333 10.442 11.6577 10.8659 11.3452 11.1785C11.0326 11.4911 10.6087 11.6667 10.1667 11.6667ZM10.1667 17.5C9.72464 17.5 9.30072 17.3244 8.98816 17.0118C8.67559 16.6993 8.5 16.2754 8.5 15.8333C8.5 15.3913 8.67559 14.9674 8.98816 14.6548C9.30072 14.3423 9.72464 14.1667 10.1667 14.1667C10.6087 14.1667 11.0326 14.3423 11.3452 14.6548C11.6577 14.9674 11.8333 15.3913 11.8333 15.8333C11.8333 16.2754 11.6577 16.6993 11.3452 17.0118C11.0326 17.3244 10.6087 17.5 10.1667 17.5Z",
|
|
@@ -222,16 +222,16 @@ function 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
|
|
234
|
-
|
|
232
|
+
function ln(e, t) {
|
|
233
|
+
return m(), _("svg", on, t[0] || (t[0] = [
|
|
234
|
+
v("path", {
|
|
235
235
|
"fill-rule": "evenodd",
|
|
236
236
|
"clip-rule": "evenodd",
|
|
237
237
|
d: "M6.33333 9.83333C6.33333 10.2754 6.15774 10.6993 5.84518 11.0118C5.53262 11.3244 5.10869 11.5 4.66667 11.5C4.22464 11.5 3.80072 11.3244 3.48816 11.0118C3.17559 10.6993 3 10.2754 3 9.83333C3 9.39131 3.17559 8.96738 3.48816 8.65482C3.80072 8.34226 4.22464 8.16667 4.66667 8.16667C5.10869 8.16667 5.53262 8.34226 5.84518 8.65482C6.15774 8.96738 6.33333 9.39131 6.33333 9.83333ZM12.1667 9.83333C12.1667 10.2754 11.9911 10.6993 11.6785 11.0118C11.3659 11.3244 10.942 11.5 10.5 11.5C10.058 11.5 9.63405 11.3244 9.32149 11.0118C9.00893 10.6993 8.83333 10.2754 8.83333 9.83333C8.83333 9.39131 9.00893 8.96738 9.32149 8.65482C9.63405 8.34226 10.058 8.16667 10.5 8.16667C10.942 8.16667 11.3659 8.34226 11.6785 8.65482C11.9911 8.96738 12.1667 9.39131 12.1667 9.83333ZM18 9.83333C18 10.2754 17.8244 10.6993 17.5118 11.0118C17.1993 11.3244 16.7754 11.5 16.3333 11.5C15.8913 11.5 15.4674 11.3244 15.1548 11.0118C14.8423 10.6993 14.6667 10.2754 14.6667 9.83333C14.6667 9.39131 14.8423 8.96738 15.1548 8.65482C15.4674 8.34226 15.8913 8.16667 16.3333 8.16667C16.7754 8.16667 17.1993 8.34226 17.5118 8.65482C17.8244 8.96738 18 9.39131 18 9.83333Z",
|
|
@@ -239,16 +239,16 @@ function 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
|
|
251
|
-
|
|
249
|
+
function cn(e, t) {
|
|
250
|
+
return m(), _("svg", rn, t[0] || (t[0] = [
|
|
251
|
+
v("path", {
|
|
252
252
|
d: "M6 14L10 10M10 10L14 6M10 10L6 6M10 10L14 14",
|
|
253
253
|
stroke: "currentColor",
|
|
254
254
|
"stroke-width": "1.5",
|
|
@@ -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 ? (
|
|
283
|
+
const t = e, o = x(() => dn[t.name]);
|
|
284
|
+
return (n, s) => o.value ? (m(), re(ot(o.value), { key: 0 })) : H("", !0);
|
|
285
285
|
}
|
|
286
|
-
}),
|
|
287
|
-
function
|
|
288
|
-
return
|
|
286
|
+
}), pn = {}, mn = { class: "vt-loader" };
|
|
287
|
+
function hn(e, t) {
|
|
288
|
+
return m(), _("span", mn);
|
|
289
289
|
}
|
|
290
|
-
const je = /* @__PURE__ */ K(
|
|
290
|
+
const je = /* @__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" },
|
|
@@ -322,36 +322,36 @@ const je = /* @__PURE__ */ K(dn, [["render", mn]]), hn = ["disabled", "type", "d
|
|
|
322
322
|
};
|
|
323
323
|
return (c, k) => {
|
|
324
324
|
const S = Oe("tooltip");
|
|
325
|
-
return Me((
|
|
325
|
+
return Me((m(), _("button", {
|
|
326
326
|
class: W(i.value),
|
|
327
327
|
disabled: o.disabled || o.loading,
|
|
328
328
|
type: o.htmlType,
|
|
329
329
|
"data-placement": o.tooltipPlacement,
|
|
330
330
|
onClick: u
|
|
331
331
|
}, [
|
|
332
|
-
o.loading ? (
|
|
332
|
+
o.loading ? (m(), re(je, {
|
|
333
333
|
key: 0,
|
|
334
334
|
class: "vt-button__icon"
|
|
335
|
-
})) : o.icon ? (
|
|
335
|
+
})) : o.icon ? (m(), re(Y, {
|
|
336
336
|
key: 1,
|
|
337
337
|
name: o.icon,
|
|
338
338
|
class: "vt-button__icon"
|
|
339
339
|
}, null, 8, ["name"])) : H("", !0),
|
|
340
|
-
l.value ? H("", !0) : (
|
|
341
|
-
|
|
340
|
+
l.value ? H("", !0) : (m(), _("span", fn, [
|
|
341
|
+
pe(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" }, Ne = /* @__PURE__ */ le({
|
|
355
355
|
__name: "VModal",
|
|
356
356
|
props: {
|
|
357
357
|
modelValue: { type: Boolean },
|
|
@@ -370,35 +370,35 @@ 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) => (
|
|
374
|
-
a.modelValue ? (
|
|
373
|
+
return (a, u) => (m(), re(lt, { to: "body" }, [
|
|
374
|
+
a.modelValue ? (m(), _("div", {
|
|
375
375
|
key: 0,
|
|
376
376
|
class: "vt-modal__backdrop",
|
|
377
|
-
style:
|
|
377
|
+
style: ie(l.value),
|
|
378
378
|
onClick: i
|
|
379
379
|
}, [
|
|
380
|
-
|
|
380
|
+
v("div", {
|
|
381
381
|
class: W(s.value),
|
|
382
|
-
onClick: u[0] || (u[0] =
|
|
382
|
+
onClick: u[0] || (u[0] = me(() => {
|
|
383
383
|
}, ["stop"]))
|
|
384
384
|
}, [
|
|
385
|
-
a.title || a.showCloseButton ? (
|
|
386
|
-
a.title ? (
|
|
387
|
-
a.showCloseButton ? (
|
|
385
|
+
a.title || a.showCloseButton ? (m(), _("div", _n, [
|
|
386
|
+
a.title ? (m(), _("h2", gn, te(a.title), 1)) : H("", !0),
|
|
387
|
+
a.showCloseButton ? (m(), re(Y, {
|
|
388
388
|
key: 1,
|
|
389
389
|
name: "close",
|
|
390
390
|
class: "vt-modal__close",
|
|
391
391
|
onClick: r
|
|
392
392
|
})) : H("", !0)
|
|
393
393
|
])) : H("", !0),
|
|
394
|
-
|
|
395
|
-
|
|
394
|
+
v("div", Cn, [
|
|
395
|
+
pe(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,
|
|
420
|
-
if (V <=
|
|
419
|
+
const M = [], V = r.value, R = s.value, U = o.maxVisiblePages;
|
|
420
|
+
if (V <= U)
|
|
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,
|
|
425
|
+
const y = Math.max(2, R - Math.floor(U / 2)), E = Math.min(V - 1, R + Math.floor(U / 2));
|
|
426
426
|
y > 2 && M.push("...");
|
|
427
427
|
for (let $ = y; $ <= E; $++)
|
|
428
428
|
M.push($);
|
|
@@ -436,73 +436,73 @@ const je = /* @__PURE__ */ K(dn, [["render", mn]]), hn = ["disabled", "type", "d
|
|
|
436
436
|
});
|
|
437
437
|
}, F = (M) => {
|
|
438
438
|
typeof M == "number" && M !== s.value && (s.value = M, S());
|
|
439
|
-
},
|
|
439
|
+
}, O = () => {
|
|
440
440
|
u.value || (s.value--, S());
|
|
441
441
|
}, Q = () => {
|
|
442
442
|
c.value || (s.value++, S());
|
|
443
|
-
},
|
|
443
|
+
}, Z = () => {
|
|
444
444
|
s.value = 1, S();
|
|
445
|
-
},
|
|
445
|
+
}, j = () => {
|
|
446
446
|
n("reloadData", s.value);
|
|
447
447
|
};
|
|
448
|
-
return
|
|
448
|
+
return he(
|
|
449
449
|
() => o.totalItems,
|
|
450
450
|
() => {
|
|
451
451
|
s.value > r.value && r.value > 0 && (s.value = r.value, S());
|
|
452
452
|
}
|
|
453
|
-
), (M, V) => (
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
V[1] || (V[1] =
|
|
453
|
+
), (M, V) => (m(), _("div", bn, [
|
|
454
|
+
v("div", wn, [
|
|
455
|
+
v("div", kn, [
|
|
456
|
+
V[1] || (V[1] = v("label", {
|
|
457
457
|
for: "rowsSelect",
|
|
458
458
|
class: "vt-pagination__label"
|
|
459
459
|
}, "Рядків на сторінку:", -1)),
|
|
460
|
-
Me(
|
|
460
|
+
Me(v("select", {
|
|
461
461
|
id: "rowsSelect",
|
|
462
|
-
"onUpdate:modelValue": V[0] || (V[0] = (
|
|
463
|
-
onChange:
|
|
462
|
+
"onUpdate:modelValue": V[0] || (V[0] = (R) => l.value = R),
|
|
463
|
+
onChange: Z,
|
|
464
464
|
class: "vt-pagination__select"
|
|
465
465
|
}, [
|
|
466
|
-
(
|
|
467
|
-
key:
|
|
468
|
-
value:
|
|
469
|
-
}, te(
|
|
466
|
+
(m(!0), _(ne, null, oe(M.pageSizeOptions, (R) => (m(), _("option", {
|
|
467
|
+
key: R,
|
|
468
|
+
value: R
|
|
469
|
+
}, te(R), 9, yn))), 128))
|
|
470
470
|
], 544), [
|
|
471
|
-
[
|
|
471
|
+
[st, l.value]
|
|
472
472
|
])
|
|
473
473
|
]),
|
|
474
|
-
|
|
474
|
+
v("span", null, te(i.value) + " - " + te(a.value) + " з " + te(M.totalItems), 1)
|
|
475
475
|
]),
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
onClick:
|
|
476
|
+
v("div", xn, [
|
|
477
|
+
v("button", {
|
|
478
|
+
onClick: O,
|
|
479
479
|
disabled: u.value,
|
|
480
480
|
class: W({ "vt-pagination__nav-button": !0, "has-items": !u.value })
|
|
481
481
|
}, [
|
|
482
|
-
|
|
483
|
-
], 10,
|
|
484
|
-
(
|
|
485
|
-
key:
|
|
486
|
-
onClick: (
|
|
482
|
+
N(Y, { name: "arrowLeft" })
|
|
483
|
+
], 10, Sn),
|
|
484
|
+
(m(!0), _(ne, null, oe(k.value, (R) => (m(), _("button", {
|
|
485
|
+
key: R,
|
|
486
|
+
onClick: (U) => F(R),
|
|
487
487
|
class: W(["vt-pagination__nav-button", {
|
|
488
|
-
"vt-pagination__nav-button--active":
|
|
488
|
+
"vt-pagination__nav-button--active": R === s.value
|
|
489
489
|
}])
|
|
490
|
-
}, te(
|
|
491
|
-
|
|
490
|
+
}, te(R), 11, Mn))), 128)),
|
|
491
|
+
v("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
|
-
|
|
497
|
-
], 10,
|
|
496
|
+
N(Y, { name: "arrowRight" })
|
|
497
|
+
], 10, $n)
|
|
498
498
|
]),
|
|
499
|
-
|
|
500
|
-
|
|
499
|
+
v("div", null, [
|
|
500
|
+
N(ge, {
|
|
501
501
|
icon: "arrowReload",
|
|
502
502
|
shape: "circle",
|
|
503
503
|
tooltip: "",
|
|
504
504
|
tooltipPlacement: "left",
|
|
505
|
-
onClick:
|
|
505
|
+
onClick: j
|
|
506
506
|
}, {
|
|
507
507
|
default: xe(() => V[2] || (V[2] = [
|
|
508
508
|
_e("Оновити дані ", -1)
|
|
@@ -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"], ue = /* @__PURE__ */ le({
|
|
517
517
|
__name: "VCheckbox",
|
|
518
518
|
props: {
|
|
519
519
|
modelValue: { type: Boolean, default: void 0 },
|
|
@@ -540,7 +540,7 @@ const je = /* @__PURE__ */ K(dn, [["render", mn]]), hn = ["disabled", "type", "d
|
|
|
540
540
|
}, u = (c) => {
|
|
541
541
|
n("blur", c);
|
|
542
542
|
};
|
|
543
|
-
return (c, k) => (
|
|
543
|
+
return (c, k) => (m(), _("label", {
|
|
544
544
|
class: W([
|
|
545
545
|
"vt-checkbox",
|
|
546
546
|
`vt-checkbox--${c.size}`,
|
|
@@ -552,7 +552,7 @@ const je = /* @__PURE__ */ K(dn, [["render", mn]]), hn = ["disabled", "type", "d
|
|
|
552
552
|
]),
|
|
553
553
|
for: l.value
|
|
554
554
|
}, [
|
|
555
|
-
|
|
555
|
+
v("input", {
|
|
556
556
|
id: l.value,
|
|
557
557
|
name: c.name,
|
|
558
558
|
value: c.value,
|
|
@@ -565,8 +565,8 @@ 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,
|
|
569
|
-
|
|
568
|
+
}, null, 40, Bn),
|
|
569
|
+
v("div", {
|
|
570
570
|
class: W([
|
|
571
571
|
"vt-checkbox__box",
|
|
572
572
|
{
|
|
@@ -577,7 +577,7 @@ const je = /* @__PURE__ */ K(dn, [["render", mn]]), hn = ["disabled", "type", "d
|
|
|
577
577
|
}
|
|
578
578
|
])
|
|
579
579
|
}, [
|
|
580
|
-
!c.indeterminate && !c.isDouble ? (
|
|
580
|
+
!c.indeterminate && !c.isDouble ? (m(), _("svg", {
|
|
581
581
|
key: 0,
|
|
582
582
|
class: W([
|
|
583
583
|
"vt-checkbox__checkmark",
|
|
@@ -591,14 +591,14 @@ const je = /* @__PURE__ */ K(dn, [["render", mn]]), hn = ["disabled", "type", "d
|
|
|
591
591
|
fill: "none",
|
|
592
592
|
xmlns: "http://www.w3.org/2000/svg"
|
|
593
593
|
}, k[0] || (k[0] = [
|
|
594
|
-
|
|
594
|
+
v("path", {
|
|
595
595
|
d: "M1 5L3.58264 7.58264C3.80112 7.80112 4.16348 7.77113 4.34306 7.51971L9 1",
|
|
596
596
|
stroke: "currentColor",
|
|
597
597
|
"stroke-width": "2",
|
|
598
598
|
"stroke-linecap": "round"
|
|
599
599
|
}, null, -1)
|
|
600
600
|
]), 2)) : H("", !0),
|
|
601
|
-
c.isDouble && r.value ? (
|
|
601
|
+
c.isDouble && r.value ? (m(), _("svg", {
|
|
602
602
|
key: 1,
|
|
603
603
|
class: W([
|
|
604
604
|
"vt-checkbox__checkmark",
|
|
@@ -612,14 +612,14 @@ const je = /* @__PURE__ */ K(dn, [["render", mn]]), hn = ["disabled", "type", "d
|
|
|
612
612
|
fill: "none",
|
|
613
613
|
xmlns: "http://www.w3.org/2000/svg"
|
|
614
614
|
}, k[1] || (k[1] = [
|
|
615
|
-
|
|
615
|
+
v("path", {
|
|
616
616
|
d: "M6 3L8.25 5L12 1",
|
|
617
617
|
stroke: "currentColor",
|
|
618
618
|
"stroke-width": "2",
|
|
619
619
|
"stroke-linecap": "round",
|
|
620
620
|
"stroke-linejoin": "round"
|
|
621
621
|
}, null, -1),
|
|
622
|
-
|
|
622
|
+
v("path", {
|
|
623
623
|
d: "M1 3L3.25 5L7 1",
|
|
624
624
|
stroke: "currentColor",
|
|
625
625
|
"stroke-width": "2",
|
|
@@ -627,7 +627,7 @@ const je = /* @__PURE__ */ K(dn, [["render", mn]]), hn = ["disabled", "type", "d
|
|
|
627
627
|
"stroke-linejoin": "round"
|
|
628
628
|
}, null, -1)
|
|
629
629
|
]), 2)) : H("", !0),
|
|
630
|
-
c.indeterminate ? (
|
|
630
|
+
c.indeterminate ? (m(), _("div", {
|
|
631
631
|
key: 2,
|
|
632
632
|
class: W([
|
|
633
633
|
"vt-checkbox__indeterminate-mark",
|
|
@@ -637,7 +637,7 @@ const je = /* @__PURE__ */ K(dn, [["render", mn]]), hn = ["disabled", "type", "d
|
|
|
637
637
|
])
|
|
638
638
|
}, null, 2)) : H("", !0)
|
|
639
639
|
], 2),
|
|
640
|
-
c.label || c.$slots.label || c.$slots.default ? (
|
|
640
|
+
c.label || c.$slots.label || c.$slots.default ? (m(), _("span", {
|
|
641
641
|
key: 0,
|
|
642
642
|
class: W([
|
|
643
643
|
"vt-checkbox__label",
|
|
@@ -646,16 +646,16 @@ const je = /* @__PURE__ */ K(dn, [["render", mn]]), hn = ["disabled", "type", "d
|
|
|
646
646
|
}
|
|
647
647
|
])
|
|
648
648
|
}, [
|
|
649
|
-
|
|
650
|
-
|
|
649
|
+
pe(c.$slots, "label", {}, () => [
|
|
650
|
+
pe(c.$slots, "default", {}, () => [
|
|
651
651
|
_e(te(c.label), 1)
|
|
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,
|
|
@@ -724,11 +724,11 @@ function Tn() {
|
|
|
724
724
|
const i = (u) => {
|
|
725
725
|
const { resizingCol: c, startX: k, startWidth: S } = e.value;
|
|
726
726
|
if (!c) return;
|
|
727
|
-
document.querySelectorAll(`[data-resizer="${c.prop}"]`).forEach((
|
|
728
|
-
|
|
727
|
+
document.querySelectorAll(`[data-resizer="${c.prop}"]`).forEach((j) => {
|
|
728
|
+
j.classList.add("vt-table__resizer--active");
|
|
729
729
|
});
|
|
730
|
-
const F = u.clientX - k,
|
|
731
|
-
c.width =
|
|
730
|
+
const F = u.clientX - k, O = c.minWidth || 50, Q = c.maxWidth || 1e3, Z = Math.max(Math.min(S + F, Q), O);
|
|
731
|
+
c.width = Z;
|
|
732
732
|
}, a = () => {
|
|
733
733
|
const { resizingCol: u } = e.value;
|
|
734
734
|
document.removeEventListener("mousemove", i), document.removeEventListener("mouseup", a), document.body.style.cursor = "", document.body.style.userSelect = "", document.body.classList.remove("vt-table-resizing"), u && (document.querySelectorAll(`[data-resizer="${u.prop}"]`).forEach((c) => {
|
|
@@ -740,23 +740,23 @@ function Tn() {
|
|
|
740
740
|
resizeState: e
|
|
741
741
|
};
|
|
742
742
|
}
|
|
743
|
-
function
|
|
743
|
+
function En(e, t, o, n) {
|
|
744
744
|
var J;
|
|
745
745
|
const s = e.selectionKey || "id", l = D([]), r = D(null), i = D(!1);
|
|
746
746
|
(J = e.defaultSelection) != null && J.length && (l.value = [...e.defaultSelection]);
|
|
747
|
-
const a = (
|
|
747
|
+
const a = (p) => p[s], u = (p) => i.value ? !0 : l.value.some((A) => a(A) === a(p)), c = x(() => t.value.filter((p) => u(p)).length), k = x(() => t.value.length > 0 && c.value === t.value.length), S = x(() => {
|
|
748
748
|
if (i.value) return !1;
|
|
749
|
-
const
|
|
750
|
-
return
|
|
751
|
-
}), F = x(() => i.value ? !0 : k.value && !S.value),
|
|
752
|
-
const
|
|
749
|
+
const p = c.value;
|
|
750
|
+
return p > 0 && p < t.value.length;
|
|
751
|
+
}), F = x(() => i.value ? !0 : k.value && !S.value), O = x(() => i.value), Q = (p, A) => {
|
|
752
|
+
const T = a(p), X = l.value.some((f) => a(f) === a(p)), d = A !== void 0 ? A : !X;
|
|
753
753
|
if (i.value && !d) {
|
|
754
|
-
i.value = !1, n != null && n.value && (l.value = n.value.filter((
|
|
754
|
+
i.value = !1, n != null && n.value && (l.value = n.value.filter((f) => a(f) !== T)), $(p, !1);
|
|
755
755
|
return;
|
|
756
756
|
}
|
|
757
|
-
i.value && d || (d && !
|
|
758
|
-
},
|
|
759
|
-
switch (
|
|
757
|
+
i.value && d || (d && !X ? l.value.push(p) : !d && X && (l.value = l.value.filter((f) => a(f) !== T)), e.selectOnClickRow && A === void 0 && U(d ? p : null), $(p, d));
|
|
758
|
+
}, Z = () => {
|
|
759
|
+
switch (j()) {
|
|
760
760
|
case "none":
|
|
761
761
|
case "partial":
|
|
762
762
|
M();
|
|
@@ -765,41 +765,41 @@ function zn(e, t, o, n) {
|
|
|
765
765
|
V();
|
|
766
766
|
break;
|
|
767
767
|
case "absoluteAll":
|
|
768
|
-
|
|
768
|
+
R();
|
|
769
769
|
break;
|
|
770
770
|
}
|
|
771
|
-
},
|
|
772
|
-
const
|
|
773
|
-
l.value.forEach((
|
|
774
|
-
|
|
775
|
-
}), t.value.forEach((
|
|
776
|
-
A.has(a(
|
|
777
|
-
}), l.value =
|
|
771
|
+
}, j = () => i.value ? "absoluteAll" : k.value ? "allVisible" : c.value > 0 ? "partial" : "none", M = () => {
|
|
772
|
+
const p = [], A = new Set(l.value.map((T) => a(T)));
|
|
773
|
+
l.value.forEach((T) => {
|
|
774
|
+
p.push(T);
|
|
775
|
+
}), t.value.forEach((T) => {
|
|
776
|
+
A.has(a(T)) || p.push(T);
|
|
777
|
+
}), l.value = p, i.value = !1, $();
|
|
778
778
|
}, V = () => {
|
|
779
779
|
i.value = !0, n != null && n.value ? l.value = [...n.value] : l.value = [...t.value], $(void 0, void 0, !0);
|
|
780
|
-
},
|
|
780
|
+
}, R = () => {
|
|
781
781
|
l.value = [], i.value = !1, r.value = null, $();
|
|
782
|
-
},
|
|
782
|
+
}, U = (p) => {
|
|
783
783
|
const A = r.value;
|
|
784
|
-
r.value =
|
|
784
|
+
r.value = p, o("current-change", {
|
|
785
785
|
currentRow: r.value,
|
|
786
786
|
oldCurrentRow: A
|
|
787
787
|
});
|
|
788
|
-
}, y = () => [...l.value], E = (
|
|
789
|
-
l.value = [...
|
|
790
|
-
}, $ = (
|
|
791
|
-
const
|
|
788
|
+
}, y = () => [...l.value], E = (p) => {
|
|
789
|
+
l.value = [...p], i.value = !1, $();
|
|
790
|
+
}, $ = (p, A, T = !1) => {
|
|
791
|
+
const X = {
|
|
792
792
|
selection: [...l.value],
|
|
793
|
-
row:
|
|
793
|
+
row: p,
|
|
794
794
|
selected: A,
|
|
795
|
-
isAllSelected:
|
|
795
|
+
isAllSelected: T || i.value
|
|
796
796
|
};
|
|
797
|
-
o("selection-change",
|
|
797
|
+
o("selection-change", X);
|
|
798
798
|
};
|
|
799
|
-
return
|
|
799
|
+
return he(
|
|
800
800
|
() => e.defaultSelection,
|
|
801
|
-
(
|
|
802
|
-
|
|
801
|
+
(p) => {
|
|
802
|
+
p != null && p.length && (l.value = [...p]);
|
|
803
803
|
}
|
|
804
804
|
), {
|
|
805
805
|
selectedRows: l,
|
|
@@ -807,61 +807,61 @@ function zn(e, t, o, n) {
|
|
|
807
807
|
isRowSelected: u,
|
|
808
808
|
isAllSelected: F,
|
|
809
809
|
isIndeterminate: S,
|
|
810
|
-
isDoubleCheck:
|
|
810
|
+
isDoubleCheck: O,
|
|
811
811
|
isFullSelection: i,
|
|
812
812
|
toggleRowSelection: Q,
|
|
813
|
-
toggleAllSelection:
|
|
814
|
-
clearSelection:
|
|
815
|
-
setCurrentRow:
|
|
813
|
+
toggleAllSelection: Z,
|
|
814
|
+
clearSelection: R,
|
|
815
|
+
setCurrentRow: U,
|
|
816
816
|
getSelectionRows: y,
|
|
817
817
|
setSelectionRows: E,
|
|
818
818
|
selectAbsolutelyAll: V
|
|
819
819
|
};
|
|
820
820
|
}
|
|
821
|
-
const
|
|
821
|
+
const Wn = (e, t, o = "asc") => {
|
|
822
822
|
if (e == null && t == null) return 0;
|
|
823
823
|
if (e == null) return o === "asc" ? 1 : -1;
|
|
824
824
|
if (t == null) return o === "asc" ? -1 : 1;
|
|
825
825
|
if (e === t) return 0;
|
|
826
826
|
let n = 0;
|
|
827
827
|
const s = Number(e), l = Number(t);
|
|
828
|
-
return !isNaN(s) && !isNaN(l) ? n = s - l :
|
|
828
|
+
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
829
|
numeric: !0,
|
|
830
830
|
sensitivity: "base"
|
|
831
831
|
}), o === "desc" ? -n : n;
|
|
832
|
-
},
|
|
832
|
+
}, 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, Vn = (e, t, o) => {
|
|
833
833
|
e.sortable && o({
|
|
834
834
|
prop: e.prop,
|
|
835
835
|
direction: t
|
|
836
836
|
});
|
|
837
|
-
},
|
|
837
|
+
}, Ee = (e, t) => {
|
|
838
838
|
const o = (t == null ? void 0 : t.prop) === e.prop, n = t == null ? void 0 : t.direction;
|
|
839
839
|
return {
|
|
840
840
|
asc: ["vt-th__sort-icon", o && n === "asc" && "vt-th__sortable-active"].filter(Boolean).join(" "),
|
|
841
841
|
desc: ["vt-th__sort-icon", o && n === "desc" && "vt-th__sortable-active"].filter(Boolean).join(" ")
|
|
842
842
|
};
|
|
843
|
-
},
|
|
843
|
+
}, Hn = (e, t, o) => {
|
|
844
844
|
if (!t) return [...e];
|
|
845
845
|
const n = o.find((l) => l.prop === t.prop);
|
|
846
846
|
if (!(n != null && n.sortable)) return [...e];
|
|
847
|
-
const s = n.sortMethod ||
|
|
847
|
+
const s = n.sortMethod || Wn;
|
|
848
848
|
return [...e].sort((l, r) => {
|
|
849
849
|
const i = l[n.prop], a = r[n.prop];
|
|
850
850
|
return s(i, a, t.direction);
|
|
851
851
|
});
|
|
852
852
|
};
|
|
853
|
-
class
|
|
853
|
+
class Pn {
|
|
854
854
|
constructor() {
|
|
855
855
|
this.modalStack = [], this.baseZIndex = 1e3;
|
|
856
856
|
}
|
|
857
857
|
open(t = {}) {
|
|
858
858
|
const o = `modal-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`, n = document.createElement("div");
|
|
859
859
|
n.setAttribute("data-vt-modal", o), document.body.appendChild(n);
|
|
860
|
-
const s = D(!0), l = this.baseZIndex + this.modalStack.length * 10, r =
|
|
860
|
+
const s = D(!0), l = this.baseZIndex + this.modalStack.length * 10, r = it({
|
|
861
861
|
setup() {
|
|
862
862
|
const a = () => {
|
|
863
863
|
s.value = !1, setTimeout(() => {
|
|
864
|
-
|
|
864
|
+
ae.closeById(o);
|
|
865
865
|
}, 100);
|
|
866
866
|
};
|
|
867
867
|
return () => ke(
|
|
@@ -919,24 +919,24 @@ class Hn {
|
|
|
919
919
|
recalculateZIndices() {
|
|
920
920
|
}
|
|
921
921
|
}
|
|
922
|
-
const
|
|
922
|
+
const ae = new Pn(), Dn = {
|
|
923
923
|
install(e) {
|
|
924
|
-
e.config.globalProperties.$modal =
|
|
925
|
-
closeAll: () =>
|
|
926
|
-
getCount: () =>
|
|
927
|
-
closeById: (t) =>
|
|
924
|
+
e.config.globalProperties.$modal = ae, e.config.globalProperties.$modalStack = {
|
|
925
|
+
closeAll: () => ae.closeAll(),
|
|
926
|
+
getCount: () => ae.getOpenModalsCount(),
|
|
927
|
+
closeById: (t) => ae.closeById(t)
|
|
928
928
|
};
|
|
929
929
|
}
|
|
930
|
-
},
|
|
930
|
+
}, An = { class: "vt-columns-selector-body" }, On = { class: "vt-columns-selector" }, jn = { class: "vt-columns-selector__panel" }, Nn = ["draggable", "onDragstart", "onDragover", "onDrop"], Zn = {
|
|
931
931
|
key: 0,
|
|
932
932
|
class: "vt-columns-selector__panel-item-pinned"
|
|
933
|
-
},
|
|
933
|
+
}, Fn = { class: "vt-columns-selector__available" }, Un = ["onClick"], qn = {
|
|
934
934
|
key: 0,
|
|
935
935
|
class: "vt-columns-selector__group-columns"
|
|
936
|
-
},
|
|
936
|
+
}, Xn = {
|
|
937
937
|
key: 0,
|
|
938
938
|
class: "vt-columns-selector__pinned-note"
|
|
939
|
-
},
|
|
939
|
+
}, Gn = { class: "vt-modal__content-button" }, Kn = /* @__PURE__ */ le({
|
|
940
940
|
__name: "VTableColumnSelector",
|
|
941
941
|
props: {
|
|
942
942
|
columns: {},
|
|
@@ -946,189 +946,189 @@ const re = new Hn(), Pn = {
|
|
|
946
946
|
setup(e, { emit: t }) {
|
|
947
947
|
const o = e, n = t, s = D([]), l = D(/* @__PURE__ */ new Set()), r = D(-1), i = D(-1), a = D("before"), u = x(() => {
|
|
948
948
|
const d = {};
|
|
949
|
-
return o.columnsSelector.forEach((
|
|
950
|
-
if (
|
|
949
|
+
return o.columnsSelector.forEach((f) => {
|
|
950
|
+
if (f.name === "removed")
|
|
951
951
|
return;
|
|
952
|
-
const g =
|
|
953
|
-
|
|
952
|
+
const g = f.columns.map((B) => B.prop), b = s.value.filter((B) => g.includes(B.prop));
|
|
953
|
+
b.length === 0 ? d[f.name] = { checked: !1, indeterminate: !1 } : b.length === f.columns.length ? d[f.name] = { checked: !0, indeterminate: !1 } : d[f.name] = { checked: !1, indeterminate: !0 };
|
|
954
954
|
}), d;
|
|
955
955
|
}), c = x(() => o.columnsSelector.filter((d) => d.name !== "removed")), k = (d) => d.pinnedLeft || d.pinnedRight, S = (d) => !k(d), F = () => {
|
|
956
956
|
const d = s.value;
|
|
957
|
-
let
|
|
958
|
-
for (let
|
|
959
|
-
d[
|
|
957
|
+
let f = -1;
|
|
958
|
+
for (let b = 0; b < d.length; b++)
|
|
959
|
+
d[b].pinnedLeft && (f = b);
|
|
960
960
|
let g = d.length;
|
|
961
|
-
for (let
|
|
962
|
-
if (d[
|
|
963
|
-
g =
|
|
961
|
+
for (let b = 0; b < d.length; b++)
|
|
962
|
+
if (d[b].pinnedRight) {
|
|
963
|
+
g = b;
|
|
964
964
|
break;
|
|
965
965
|
}
|
|
966
966
|
return {
|
|
967
|
-
minIndex:
|
|
967
|
+
minIndex: f + 1,
|
|
968
968
|
maxIndex: g - 1
|
|
969
969
|
};
|
|
970
|
-
},
|
|
971
|
-
const
|
|
972
|
-
return !(d <
|
|
973
|
-
}, Q = (d,
|
|
974
|
-
const g = s.value[
|
|
970
|
+
}, O = (d) => {
|
|
971
|
+
const f = F();
|
|
972
|
+
return !(d < f.minIndex || d > f.maxIndex + 1);
|
|
973
|
+
}, Q = (d, f) => {
|
|
974
|
+
const g = s.value[f];
|
|
975
975
|
if (!S(g)) {
|
|
976
976
|
d.preventDefault();
|
|
977
977
|
return;
|
|
978
978
|
}
|
|
979
|
-
r.value =
|
|
980
|
-
},
|
|
979
|
+
r.value = f, d.dataTransfer && (d.dataTransfer.effectAllowed = "move", d.dataTransfer.setData("text/plain", g.prop)), document.body.style.cursor = "grabbing";
|
|
980
|
+
}, Z = (d, f) => {
|
|
981
981
|
if (r.value === -1) return;
|
|
982
982
|
d.preventDefault();
|
|
983
|
-
const g = d.currentTarget.getBoundingClientRect(),
|
|
984
|
-
let
|
|
985
|
-
|
|
986
|
-
},
|
|
983
|
+
const g = d.currentTarget.getBoundingClientRect(), b = d.clientY, B = g.top + g.height / 2;
|
|
984
|
+
let L = f, ee = "before";
|
|
985
|
+
b < B ? (L = f, ee = "before") : (L = f + 1, ee = "after"), r.value < L && L--, O(L) ? (i.value = f, a.value = ee, d.dataTransfer.dropEffect = "move") : (i.value = -1, d.dataTransfer.dropEffect = "none");
|
|
986
|
+
}, j = () => {
|
|
987
987
|
setTimeout(() => {
|
|
988
988
|
r.value === -1 && (i.value = -1);
|
|
989
989
|
}, 50);
|
|
990
|
-
}, M = (d,
|
|
990
|
+
}, M = (d, f) => {
|
|
991
991
|
if (d.preventDefault(), r.value === -1 || i.value === -1) {
|
|
992
|
-
|
|
992
|
+
R();
|
|
993
993
|
return;
|
|
994
994
|
}
|
|
995
|
-
const g = d.currentTarget.getBoundingClientRect(),
|
|
996
|
-
let
|
|
997
|
-
if (
|
|
998
|
-
|
|
995
|
+
const g = d.currentTarget.getBoundingClientRect(), b = d.clientY, B = g.top + g.height / 2;
|
|
996
|
+
let L = f;
|
|
997
|
+
if (b >= B && (L = f + 1), r.value < L && L--, !O(L) || L === r.value) {
|
|
998
|
+
R();
|
|
999
999
|
return;
|
|
1000
1000
|
}
|
|
1001
1001
|
const ee = [...s.value], [Ce] = ee.splice(r.value, 1);
|
|
1002
|
-
ee.splice(
|
|
1002
|
+
ee.splice(L, 0, Ce), s.value = ee, R();
|
|
1003
1003
|
}, V = () => {
|
|
1004
|
-
|
|
1005
|
-
},
|
|
1004
|
+
R();
|
|
1005
|
+
}, R = () => {
|
|
1006
1006
|
r.value = -1, i.value = -1, a.value = "before", document.body.style.cursor = "";
|
|
1007
|
-
},
|
|
1008
|
-
const
|
|
1009
|
-
return r.value === d &&
|
|
1007
|
+
}, U = (d) => {
|
|
1008
|
+
const f = ["vt-columns-selector__panel-item"];
|
|
1009
|
+
return r.value === d && f.push("vt-columns-selector__panel-item--dragging"), i.value === d && a.value === "before" && f.push("vt-columns-selector__panel-item--drop-before"), i.value === d && a.value === "after" && f.push("vt-columns-selector__panel-item--drop-after"), f;
|
|
1010
1010
|
}, y = () => {
|
|
1011
1011
|
s.value = [...o.columns.map((d) => ({ ...d }))], o.columnsSelector.forEach((d) => {
|
|
1012
1012
|
d.name !== "removed" && l.value.add(d.name);
|
|
1013
1013
|
});
|
|
1014
|
-
}, E = (d,
|
|
1015
|
-
if (
|
|
1014
|
+
}, E = (d, f) => {
|
|
1015
|
+
if (f)
|
|
1016
1016
|
s.value.some((g) => g.prop === d.prop) || s.value.push({ ...d });
|
|
1017
1017
|
else {
|
|
1018
1018
|
if (k(d))
|
|
1019
1019
|
return;
|
|
1020
1020
|
s.value = s.value.filter((g) => g.prop !== d.prop);
|
|
1021
1021
|
}
|
|
1022
|
-
}, $ = (d,
|
|
1023
|
-
if (
|
|
1022
|
+
}, $ = (d, f) => {
|
|
1023
|
+
if (f)
|
|
1024
1024
|
d.columns.forEach((g) => {
|
|
1025
|
-
s.value.some((
|
|
1025
|
+
s.value.some((b) => b.prop === g.prop) || s.value.push({ ...g });
|
|
1026
1026
|
});
|
|
1027
1027
|
else {
|
|
1028
1028
|
const g = [];
|
|
1029
|
-
d.columns.forEach((
|
|
1030
|
-
const B = s.value.find((
|
|
1029
|
+
d.columns.forEach((b) => {
|
|
1030
|
+
const B = s.value.find((L) => L.prop === b.prop);
|
|
1031
1031
|
B && !k(B) && g.push(B);
|
|
1032
1032
|
}), s.value = s.value.filter(
|
|
1033
|
-
(
|
|
1033
|
+
(b) => !g.some((B) => B.prop === b.prop)
|
|
1034
1034
|
);
|
|
1035
1035
|
}
|
|
1036
|
-
}, J = (d) => s.value.some((
|
|
1037
|
-
const
|
|
1038
|
-
return !
|
|
1036
|
+
}, J = (d) => s.value.some((f) => f.prop === d.prop), p = (d) => {
|
|
1037
|
+
const f = s.value.find((g) => g.prop === d.prop);
|
|
1038
|
+
return !f || !k(f);
|
|
1039
1039
|
}, A = (d) => {
|
|
1040
1040
|
l.value.has(d) ? l.value.delete(d) : l.value.add(d);
|
|
1041
|
-
},
|
|
1042
|
-
n("update-columns", [...s.value]),
|
|
1043
|
-
},
|
|
1044
|
-
|
|
1041
|
+
}, T = () => {
|
|
1042
|
+
n("update-columns", [...s.value]), ae.close();
|
|
1043
|
+
}, X = () => {
|
|
1044
|
+
ae.close();
|
|
1045
1045
|
};
|
|
1046
|
-
return
|
|
1046
|
+
return ve(() => {
|
|
1047
1047
|
y();
|
|
1048
|
-
}), (d,
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
(
|
|
1048
|
+
}), (d, f) => (m(), _("div", An, [
|
|
1049
|
+
v("div", On, [
|
|
1050
|
+
v("div", jn, [
|
|
1051
|
+
(m(!0), _(ne, null, oe(s.value, (g, b) => (m(), _("div", {
|
|
1052
1052
|
key: g.prop,
|
|
1053
|
-
class: W(
|
|
1053
|
+
class: W(U(b)),
|
|
1054
1054
|
draggable: S(g),
|
|
1055
|
-
onDragstart: (B) => Q(B,
|
|
1056
|
-
onDragover: (B) =>
|
|
1057
|
-
onDragleave:
|
|
1058
|
-
onDrop: (B) => M(B,
|
|
1055
|
+
onDragstart: (B) => Q(B, b),
|
|
1056
|
+
onDragover: (B) => Z(B, b),
|
|
1057
|
+
onDragleave: j,
|
|
1058
|
+
onDrop: (B) => M(B, b),
|
|
1059
1059
|
onDragend: V
|
|
1060
1060
|
}, [
|
|
1061
|
-
|
|
1061
|
+
N(Y, {
|
|
1062
1062
|
name: S(g) ? "columnsMove" : "freeze",
|
|
1063
1063
|
class: W(["vt-columns-selector__panel-item-icon", { "vt-columns-selector__panel-item-icon--draggable": S(g) }])
|
|
1064
1064
|
}, null, 8, ["name", "class"]),
|
|
1065
|
-
|
|
1065
|
+
N(ue, {
|
|
1066
1066
|
label: g.label,
|
|
1067
1067
|
checked: !0,
|
|
1068
1068
|
disabled: k(g),
|
|
1069
1069
|
onChange: (B) => E(g, B),
|
|
1070
|
-
onClick:
|
|
1070
|
+
onClick: f[0] || (f[0] = me(() => {
|
|
1071
1071
|
}, ["stop"]))
|
|
1072
1072
|
}, null, 8, ["label", "disabled", "onChange"]),
|
|
1073
|
-
k(g) ? (
|
|
1074
|
-
], 42,
|
|
1073
|
+
k(g) ? (m(), _("span", Zn, "pinned")) : H("", !0)
|
|
1074
|
+
], 42, Nn))), 128))
|
|
1075
1075
|
]),
|
|
1076
|
-
|
|
1077
|
-
(
|
|
1078
|
-
var
|
|
1079
|
-
return
|
|
1076
|
+
v("div", Fn, [
|
|
1077
|
+
(m(!0), _(ne, null, oe(c.value, (g) => {
|
|
1078
|
+
var b, B;
|
|
1079
|
+
return m(), _("div", {
|
|
1080
1080
|
key: g.name,
|
|
1081
1081
|
class: "vt-columns-selector__group"
|
|
1082
1082
|
}, [
|
|
1083
|
-
|
|
1083
|
+
v("div", {
|
|
1084
1084
|
class: "vt-columns-selector__group-header",
|
|
1085
|
-
onClick: (
|
|
1085
|
+
onClick: (L) => A(g.name)
|
|
1086
1086
|
}, [
|
|
1087
|
-
|
|
1087
|
+
N(ue, {
|
|
1088
1088
|
label: g.label,
|
|
1089
|
-
checked: ((
|
|
1089
|
+
checked: ((b = u.value[g.name]) == null ? void 0 : b.checked) || !1,
|
|
1090
1090
|
indeterminate: ((B = u.value[g.name]) == null ? void 0 : B.indeterminate) || !1,
|
|
1091
|
-
onChange: (
|
|
1092
|
-
onClick:
|
|
1091
|
+
onChange: (L) => $(g, L),
|
|
1092
|
+
onClick: f[1] || (f[1] = me(() => {
|
|
1093
1093
|
}, ["stop"]))
|
|
1094
1094
|
}, null, 8, ["label", "checked", "indeterminate", "onChange"]),
|
|
1095
|
-
g.icon ? (
|
|
1095
|
+
g.icon ? (m(), re(Y, {
|
|
1096
1096
|
key: 0,
|
|
1097
1097
|
name: g.icon,
|
|
1098
1098
|
class: "vt-columns-selector__group-icon"
|
|
1099
1099
|
}, null, 8, ["name"])) : H("", !0)
|
|
1100
|
-
], 8,
|
|
1101
|
-
l.value.has(g.name) ? (
|
|
1102
|
-
(
|
|
1103
|
-
key:
|
|
1100
|
+
], 8, Un),
|
|
1101
|
+
l.value.has(g.name) ? (m(), _("div", qn, [
|
|
1102
|
+
(m(!0), _(ne, null, oe(g.columns, (L) => (m(), _("div", {
|
|
1103
|
+
key: L.prop,
|
|
1104
1104
|
class: "vt-columns-selector__group-column"
|
|
1105
1105
|
}, [
|
|
1106
|
-
|
|
1107
|
-
label:
|
|
1108
|
-
checked: J(
|
|
1109
|
-
disabled: !
|
|
1110
|
-
onChange: (ee) => E(
|
|
1106
|
+
N(ue, {
|
|
1107
|
+
label: L.label,
|
|
1108
|
+
checked: J(L),
|
|
1109
|
+
disabled: !p(L),
|
|
1110
|
+
onChange: (ee) => E(L, ee)
|
|
1111
1111
|
}, null, 8, ["label", "checked", "disabled", "onChange"]),
|
|
1112
|
-
|
|
1112
|
+
p(L) ? H("", !0) : (m(), _("span", Xn, " (закріплена) "))
|
|
1113
1113
|
]))), 128))
|
|
1114
1114
|
])) : H("", !0)
|
|
1115
1115
|
]);
|
|
1116
1116
|
}), 128))
|
|
1117
1117
|
])
|
|
1118
1118
|
]),
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
default: xe(() =>
|
|
1119
|
+
v("div", Gn, [
|
|
1120
|
+
N(ge, { onClick: X }, {
|
|
1121
|
+
default: xe(() => f[2] || (f[2] = [
|
|
1122
1122
|
_e("Скасувати", -1)
|
|
1123
1123
|
])),
|
|
1124
1124
|
_: 1,
|
|
1125
1125
|
__: [2]
|
|
1126
1126
|
}),
|
|
1127
|
-
|
|
1127
|
+
N(ge, {
|
|
1128
1128
|
type: "primary",
|
|
1129
|
-
onClick:
|
|
1129
|
+
onClick: T
|
|
1130
1130
|
}, {
|
|
1131
|
-
default: xe(() =>
|
|
1131
|
+
default: xe(() => f[3] || (f[3] = [
|
|
1132
1132
|
_e("Зберегти", -1)
|
|
1133
1133
|
])),
|
|
1134
1134
|
_: 1,
|
|
@@ -1137,7 +1137,7 @@ const re = new Hn(), Pn = {
|
|
|
1137
1137
|
])
|
|
1138
1138
|
]));
|
|
1139
1139
|
}
|
|
1140
|
-
}),
|
|
1140
|
+
}), Yn = /* @__PURE__ */ le({
|
|
1141
1141
|
__name: "ColumnActions",
|
|
1142
1142
|
props: {
|
|
1143
1143
|
column: {},
|
|
@@ -1147,11 +1147,11 @@ const re = new Hn(), Pn = {
|
|
|
1147
1147
|
emits: ["pin", "update-columns"],
|
|
1148
1148
|
setup(e, { emit: t }) {
|
|
1149
1149
|
const o = e, n = t, s = D(), l = D(), r = D(), i = D(!1), a = D(!1), u = D([]), c = async () => {
|
|
1150
|
-
if (await
|
|
1150
|
+
if (await at(), !s.value || !l.value) return;
|
|
1151
1151
|
const y = l.value.getBoundingClientRect(), E = s.value, $ = E.offsetWidth, J = y.left + y.width / 2;
|
|
1152
1152
|
E.style.top = `${y.bottom - 20}px`, E.style.left = `${J - $ / 2}px`;
|
|
1153
|
-
const
|
|
1154
|
-
|
|
1153
|
+
const p = E.getBoundingClientRect();
|
|
1154
|
+
p.right > window.innerWidth && (E.style.left = `${window.innerWidth - $ - 8}px`), p.left < 0 && (E.style.left = "8px");
|
|
1155
1155
|
}, k = (y) => {
|
|
1156
1156
|
y.stopPropagation(), !a.value && (i.value ? F() : S());
|
|
1157
1157
|
}, S = () => {
|
|
@@ -1160,39 +1160,39 @@ const re = new Hn(), Pn = {
|
|
|
1160
1160
|
a.value = !0, i.value = !1, r.value && r.value.style.removeProperty("z-index"), setTimeout(() => {
|
|
1161
1161
|
a.value = !1;
|
|
1162
1162
|
}, 100);
|
|
1163
|
-
},
|
|
1163
|
+
}, O = (y) => {
|
|
1164
1164
|
var E, $;
|
|
1165
1165
|
!((E = l.value) != null && E.contains(y.target)) && !(($ = s.value) != null && $.contains(y.target)) && F();
|
|
1166
1166
|
}, Q = () => {
|
|
1167
|
-
|
|
1168
|
-
},
|
|
1167
|
+
U() ? (n("pin", o.column, "none"), console.log(`Колонка "${o.column.label}" відкріплена`)) : (n("pin", o.column, "left"), console.log(`Колонка "${o.column.label}" прикріплена зліва`)), F();
|
|
1168
|
+
}, Z = (y) => ({
|
|
1169
1169
|
name: "removed",
|
|
1170
1170
|
label: "Видалені колонки",
|
|
1171
1171
|
order: 999,
|
|
1172
1172
|
// Найвищий порядок, щоб відображались останніми
|
|
1173
1173
|
columns: y
|
|
1174
|
-
}),
|
|
1174
|
+
}), j = (y) => {
|
|
1175
1175
|
var A;
|
|
1176
|
-
const E = new Set(y.map((
|
|
1177
|
-
(A = o.columnsSelector) == null || A.forEach((
|
|
1178
|
-
|
|
1179
|
-
}), o.allColumns.forEach((
|
|
1176
|
+
const E = new Set(y.map((T) => T.prop)), $ = /* @__PURE__ */ new Set();
|
|
1177
|
+
(A = o.columnsSelector) == null || A.forEach((T) => {
|
|
1178
|
+
T.columns.forEach((X) => $.add(X.prop));
|
|
1179
|
+
}), o.allColumns.forEach((T) => $.add(T.prop));
|
|
1180
1180
|
const J = [];
|
|
1181
|
-
$.forEach((
|
|
1182
|
-
var
|
|
1183
|
-
if (!E.has(
|
|
1181
|
+
$.forEach((T) => {
|
|
1182
|
+
var X;
|
|
1183
|
+
if (!E.has(T)) {
|
|
1184
1184
|
let d;
|
|
1185
|
-
(
|
|
1186
|
-
const g =
|
|
1185
|
+
(X = o.columnsSelector) == null || X.forEach((f) => {
|
|
1186
|
+
const g = f.columns.find((b) => b.prop === T);
|
|
1187
1187
|
g && (d = g);
|
|
1188
|
-
}), d || (d = o.allColumns.find((
|
|
1188
|
+
}), d || (d = o.allColumns.find((f) => f.prop === T)), d && J.push(d);
|
|
1189
1189
|
}
|
|
1190
1190
|
});
|
|
1191
|
-
const
|
|
1192
|
-
J.length > 0 &&
|
|
1191
|
+
const p = [...o.columnsSelector || []];
|
|
1192
|
+
J.length > 0 && p.push(Z(J)), u.value = p;
|
|
1193
1193
|
}, M = () => {
|
|
1194
|
-
|
|
1195
|
-
component:
|
|
1194
|
+
j(o.allColumns), ae.open({
|
|
1195
|
+
component: Kn,
|
|
1196
1196
|
title: "Управління колонками таблиці",
|
|
1197
1197
|
props: {
|
|
1198
1198
|
columns: o.allColumns,
|
|
@@ -1200,55 +1200,55 @@ const re = new Hn(), Pn = {
|
|
|
1200
1200
|
columnsSelector: u.value,
|
|
1201
1201
|
// Передаємо оновлені доступні колонки
|
|
1202
1202
|
"onUpdate-columns": (y) => {
|
|
1203
|
-
console.log("ColumnActions отримав оновлені колонки:", y), n("update-columns", y),
|
|
1203
|
+
console.log("ColumnActions отримав оновлені колонки:", y), n("update-columns", y), j(y);
|
|
1204
1204
|
}
|
|
1205
1205
|
},
|
|
1206
1206
|
size: "large",
|
|
1207
1207
|
closeOnBackdropClick: !1
|
|
1208
1208
|
}), F();
|
|
1209
|
-
}, V = () => o.column.pinnedLeft,
|
|
1210
|
-
return
|
|
1211
|
-
document.addEventListener("click",
|
|
1209
|
+
}, V = () => o.column.pinnedLeft, R = () => o.column.pinnedRight, U = () => V() || R();
|
|
1210
|
+
return ve(() => {
|
|
1211
|
+
document.addEventListener("click", O), l.value && (r.value = l.value.closest("th")), j(o.allColumns);
|
|
1212
1212
|
}), $e(() => {
|
|
1213
|
-
document.removeEventListener("click",
|
|
1214
|
-
}), (y, E) => (
|
|
1213
|
+
document.removeEventListener("click", O);
|
|
1214
|
+
}), (y, E) => (m(), _("div", {
|
|
1215
1215
|
ref_key: "triggerRef",
|
|
1216
1216
|
ref: l,
|
|
1217
1217
|
class: "vt-table-header-actions",
|
|
1218
1218
|
onClick: k
|
|
1219
1219
|
}, [
|
|
1220
|
-
|
|
1221
|
-
i.value ? (
|
|
1220
|
+
N(Y, { name: "listBullet" }),
|
|
1221
|
+
i.value ? (m(), _("ul", {
|
|
1222
1222
|
key: 0,
|
|
1223
1223
|
ref_key: "menuRef",
|
|
1224
1224
|
ref: s,
|
|
1225
1225
|
class: W(["dropdown-menu", "vt-table-dropdown", { visible: i.value }])
|
|
1226
1226
|
}, [
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
name:
|
|
1227
|
+
v("li", { onClick: Q }, [
|
|
1228
|
+
N(Y, {
|
|
1229
|
+
name: U() ? "unfreeze" : "freeze"
|
|
1230
1230
|
}, null, 8, ["name"]),
|
|
1231
|
-
|
|
1231
|
+
v("span", null, te(U() ? "Розморозити" : "Заморозити"), 1)
|
|
1232
1232
|
]),
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
E[0] || (E[0] =
|
|
1233
|
+
v("li", { onClick: M }, [
|
|
1234
|
+
N(Y, { name: "columnInsert" }),
|
|
1235
|
+
E[0] || (E[0] = v("span", null, "Колонки", -1))
|
|
1236
1236
|
])
|
|
1237
1237
|
], 2)) : H("", !0)
|
|
1238
1238
|
], 512));
|
|
1239
1239
|
}
|
|
1240
|
-
}),
|
|
1240
|
+
}), Jn = { class: "vt-table" }, Qn = { class: "vt-th__content" }, eo = { class: "vt-th__content" }, to = { class: "vt-th__label" }, no = {
|
|
1241
1241
|
key: 0,
|
|
1242
1242
|
class: "vt-th__sortable"
|
|
1243
|
-
},
|
|
1243
|
+
}, oo = ["data-resizer", "onMousedown"], lo = {
|
|
1244
1244
|
key: 0,
|
|
1245
1245
|
class: "vt-table__empty-row"
|
|
1246
|
-
},
|
|
1246
|
+
}, so = ["colspan"], io = { class: "vt-table__empty-content" }, ao = ["onClick"], ro = { class: "vt-table__cell-content" }, co = { class: "vt-table__cell-content vt-table__cell-content--ellipsis" }, uo = ["data-resizer", "onMousedown"], po = {
|
|
1247
1247
|
key: 0,
|
|
1248
1248
|
class: "vt-table__summary"
|
|
1249
|
-
}, mo = { class: "vt-table__cell-content vt-table__cell-content--summary" }, ye = 50, ho = /* @__PURE__ */
|
|
1249
|
+
}, mo = { class: "vt-table__cell-content vt-table__cell-content--summary" }, ye = 50, ho = /* @__PURE__ */ le({
|
|
1250
1250
|
__name: "VTable",
|
|
1251
|
-
props: /* @__PURE__ */
|
|
1251
|
+
props: /* @__PURE__ */ Te({
|
|
1252
1252
|
data: {},
|
|
1253
1253
|
maxHeight: {},
|
|
1254
1254
|
defaultSort: {},
|
|
@@ -1266,34 +1266,34 @@ const re = new Hn(), Pn = {
|
|
|
1266
1266
|
columns: { required: !1 },
|
|
1267
1267
|
columnsModifiers: {}
|
|
1268
1268
|
}),
|
|
1269
|
-
emits: /* @__PURE__ */
|
|
1269
|
+
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
1270
|
setup(e, { expose: t, emit: o }) {
|
|
1271
|
-
const n = e, s =
|
|
1272
|
-
let
|
|
1271
|
+
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
|
+
let O = null;
|
|
1273
1273
|
const Q = () => {
|
|
1274
1274
|
c.value && s.value ? a.splice(0, a.length, ...s.value) : n.columns && a.splice(0, a.length, ...n.columns);
|
|
1275
1275
|
};
|
|
1276
|
-
|
|
1276
|
+
he(
|
|
1277
1277
|
() => s.value,
|
|
1278
1278
|
(h) => {
|
|
1279
1279
|
h && c.value && a.splice(0, a.length, ...h);
|
|
1280
1280
|
},
|
|
1281
1281
|
{ deep: !0 }
|
|
1282
|
-
),
|
|
1282
|
+
), he(
|
|
1283
1283
|
() => n.columns,
|
|
1284
1284
|
(h) => {
|
|
1285
1285
|
h && !c.value && a.splice(0, a.length, ...h);
|
|
1286
1286
|
},
|
|
1287
1287
|
{ deep: !0 }
|
|
1288
|
-
),
|
|
1289
|
-
const { sortedColumns:
|
|
1288
|
+
), ut("vt-table-columns", a);
|
|
1289
|
+
const { sortedColumns: Z, getDefaultColumnWidth: j, getStickyOffset: M } = Rn(a), { getTableWrapperStyle: V, getColumnStyle: R, getHeaderStyle: U, getFooterStyle: y } = Tn(n), { onMouseDown: E } = zn(), $ = x(() => Hn(n.data, u.value, a)), J = x(() => n.allData || n.data), p = n.selectable ? En(n, $, l, J) : null, A = () => ({
|
|
1290
1290
|
width: `${ye}px`,
|
|
1291
1291
|
minWidth: `${ye}px`,
|
|
1292
1292
|
maxWidth: `${ye}px`,
|
|
1293
1293
|
left: "0px",
|
|
1294
1294
|
position: "sticky",
|
|
1295
1295
|
zIndex: 10
|
|
1296
|
-
}),
|
|
1296
|
+
}), T = () => {
|
|
1297
1297
|
const h = A();
|
|
1298
1298
|
return n.maxHeight ? {
|
|
1299
1299
|
...h,
|
|
@@ -1301,7 +1301,7 @@ const re = new Hn(), Pn = {
|
|
|
1301
1301
|
zIndex: 11
|
|
1302
1302
|
// Вищий z-index для header
|
|
1303
1303
|
} : h;
|
|
1304
|
-
},
|
|
1304
|
+
}, X = () => {
|
|
1305
1305
|
const h = A();
|
|
1306
1306
|
return n.maxHeight ? {
|
|
1307
1307
|
...h,
|
|
@@ -1311,55 +1311,47 @@ const re = new Hn(), Pn = {
|
|
|
1311
1311
|
} : h;
|
|
1312
1312
|
}, d = () => {
|
|
1313
1313
|
if (!i.value || S.value) return;
|
|
1314
|
-
const h = i.value, C = h.scrollTop,
|
|
1315
|
-
|
|
1316
|
-
const
|
|
1317
|
-
|
|
1318
|
-
scrollDiff: ue,
|
|
1319
|
-
isScrollingDown: pe,
|
|
1320
|
-
isNearBottom: b,
|
|
1321
|
-
isAtBottom: ne,
|
|
1322
|
-
scrollTop: C,
|
|
1323
|
-
lastScrollTop: F.value,
|
|
1324
|
-
remaining: L - C - R
|
|
1325
|
-
}), F.value = C, pe && (b || ne) && (S.value = !0, l("infinity-scroll"), setTimeout(() => {
|
|
1314
|
+
const h = i.value, C = h.scrollTop, I = h.scrollHeight, z = h.clientHeight, P = 30;
|
|
1315
|
+
O && clearTimeout(O), O = setTimeout(() => {
|
|
1316
|
+
const fe = C - F.value > 1, w = I - C - z <= P, ce = I - C - z <= 5;
|
|
1317
|
+
F.value = C, fe && (w || ce) && (S.value = !0, l("infinity-scroll"), setTimeout(() => {
|
|
1326
1318
|
S.value = !1;
|
|
1327
1319
|
}, 1e3));
|
|
1328
1320
|
}, 50);
|
|
1329
|
-
},
|
|
1321
|
+
}, f = () => {
|
|
1330
1322
|
S.value = !1;
|
|
1331
1323
|
};
|
|
1332
|
-
|
|
1324
|
+
ve(() => {
|
|
1333
1325
|
i.value && i.value.addEventListener("scroll", d);
|
|
1334
1326
|
}), $e(() => {
|
|
1335
|
-
|
|
1327
|
+
O && clearTimeout(O), i.value && i.value.removeEventListener("scroll", d);
|
|
1336
1328
|
});
|
|
1337
1329
|
const g = (h, C) => {
|
|
1338
|
-
|
|
1339
|
-
var
|
|
1340
|
-
((
|
|
1330
|
+
Vn(h, C, (I) => {
|
|
1331
|
+
var z, P;
|
|
1332
|
+
((z = u.value) == null ? void 0 : z.prop) === h.prop && u.value.direction === C ? u.value = null : u.value = I, l("sort-change", {
|
|
1341
1333
|
column: h,
|
|
1342
1334
|
direction: ((P = u.value) == null ? void 0 : P.direction) || null,
|
|
1343
1335
|
prop: h.prop,
|
|
1344
1336
|
sortedData: $.value
|
|
1345
1337
|
});
|
|
1346
1338
|
});
|
|
1347
|
-
},
|
|
1348
|
-
const
|
|
1339
|
+
}, b = (h, C) => {
|
|
1340
|
+
const I = {
|
|
1349
1341
|
pinnedLeft: C === "left",
|
|
1350
1342
|
pinnedRight: C === "right"
|
|
1351
1343
|
};
|
|
1352
|
-
|
|
1344
|
+
L(h.prop, I), l("column-pin", { column: { ...h, ...I }, position: C });
|
|
1353
1345
|
}, B = (h) => {
|
|
1354
1346
|
a.splice(0, a.length, ...h), c.value && (s.value = [...h]), l("columns-change", [...h]);
|
|
1355
|
-
},
|
|
1356
|
-
const
|
|
1357
|
-
if (
|
|
1358
|
-
if (Object.assign(a[
|
|
1359
|
-
const
|
|
1360
|
-
if (
|
|
1347
|
+
}, L = (h, C) => {
|
|
1348
|
+
const I = a.findIndex((z) => z.prop === h);
|
|
1349
|
+
if (I !== -1) {
|
|
1350
|
+
if (Object.assign(a[I], C), c.value && s.value) {
|
|
1351
|
+
const z = s.value.findIndex((P) => P.prop === h);
|
|
1352
|
+
if (z !== -1) {
|
|
1361
1353
|
const P = [...s.value];
|
|
1362
|
-
P[
|
|
1354
|
+
P[z] = { ...P[z], ...C }, s.value = P;
|
|
1363
1355
|
}
|
|
1364
1356
|
}
|
|
1365
1357
|
l("columns-change", [...a]);
|
|
@@ -1368,58 +1360,58 @@ const re = new Hn(), Pn = {
|
|
|
1368
1360
|
"Колонку не знайдено:",
|
|
1369
1361
|
h,
|
|
1370
1362
|
"Доступні колонки:",
|
|
1371
|
-
a.map((
|
|
1363
|
+
a.map((z) => z.prop)
|
|
1372
1364
|
);
|
|
1373
|
-
}, ee = (h, C,
|
|
1374
|
-
l("row-click", { row: h, column: C, event:
|
|
1375
|
-
}, Ce = (h, C,
|
|
1376
|
-
|
|
1365
|
+
}, ee = (h, C, I) => {
|
|
1366
|
+
l("row-click", { row: h, column: C, event: I }), n.highlightCurrentRow && p && p.setCurrentRow(h);
|
|
1367
|
+
}, Ce = (h, C, I) => {
|
|
1368
|
+
I.stopPropagation(), p && p.toggleRowSelection(C, h);
|
|
1377
1369
|
}, Ze = (h, C) => {
|
|
1378
|
-
C.stopPropagation(),
|
|
1370
|
+
C.stopPropagation(), p && p.toggleAllSelection();
|
|
1379
1371
|
}, Le = (h, C) => {
|
|
1380
1372
|
h && (r.value[C] = h);
|
|
1381
1373
|
}, Ie = (h, C) => {
|
|
1382
|
-
const
|
|
1383
|
-
E(h, C,
|
|
1384
|
-
|
|
1385
|
-
column: { ...C, width:
|
|
1386
|
-
width:
|
|
1387
|
-
oldWidth:
|
|
1374
|
+
const I = C.width || j();
|
|
1375
|
+
E(h, C, j, (z) => {
|
|
1376
|
+
L(C.prop, { width: z }), l("column-resize", {
|
|
1377
|
+
column: { ...C, width: z },
|
|
1378
|
+
width: z,
|
|
1379
|
+
oldWidth: I
|
|
1388
1380
|
});
|
|
1389
1381
|
});
|
|
1390
|
-
}, Fe = (h, C) =>
|
|
1382
|
+
}, Fe = (h, C) => R(h, C, M, j), Ue = (h, C) => U(h, C, M, j), qe = (h, C) => y(h, C, M, j), Xe = (h, C) => {
|
|
1391
1383
|
if (!C || !C.prop) return "";
|
|
1392
|
-
const
|
|
1393
|
-
return
|
|
1384
|
+
const I = h[C.prop];
|
|
1385
|
+
return I == null ? "" : String(I);
|
|
1394
1386
|
}, Ge = x(() => {
|
|
1395
1387
|
if (!n.showSummary || !k.value) return {};
|
|
1396
1388
|
const h = a;
|
|
1397
1389
|
if (typeof n.summaryMethod == "function") {
|
|
1398
1390
|
const C = n.summaryMethod({ columns: h, data: $.value });
|
|
1399
1391
|
return h.reduce(
|
|
1400
|
-
(
|
|
1392
|
+
(I, z, P) => (I[z.prop] = C[P], I),
|
|
1401
1393
|
{}
|
|
1402
1394
|
);
|
|
1403
1395
|
}
|
|
1404
1396
|
return h.reduce(
|
|
1405
|
-
(C,
|
|
1406
|
-
const
|
|
1407
|
-
return C[
|
|
1397
|
+
(C, I) => {
|
|
1398
|
+
const z = $.value.map((P) => P[I.prop]);
|
|
1399
|
+
return C[I.prop] = z.every((P) => typeof P == "number") ? z.reduce((P, de) => P + de, 0) : "", C;
|
|
1408
1400
|
},
|
|
1409
1401
|
{}
|
|
1410
1402
|
);
|
|
1411
1403
|
}), Ke = x(() => n.showSummary && k.value), Ye = (h, C) => {
|
|
1412
|
-
|
|
1404
|
+
p && p.toggleRowSelection(h, C);
|
|
1413
1405
|
}, Je = () => {
|
|
1414
|
-
|
|
1406
|
+
p && p.toggleAllSelection();
|
|
1415
1407
|
}, Qe = () => {
|
|
1416
|
-
|
|
1408
|
+
p && p.selectAbsolutelyAll();
|
|
1417
1409
|
}, et = () => {
|
|
1418
|
-
|
|
1419
|
-
}, tt = () =>
|
|
1420
|
-
|
|
1410
|
+
p && p.clearSelection();
|
|
1411
|
+
}, tt = () => p ? p.getSelectionRows() : [], nt = (h) => {
|
|
1412
|
+
p && p.setSelectionRows(h);
|
|
1421
1413
|
};
|
|
1422
|
-
return
|
|
1414
|
+
return ve(() => {
|
|
1423
1415
|
Q();
|
|
1424
1416
|
}), t({
|
|
1425
1417
|
toggleRowSelection: Ye,
|
|
@@ -1428,182 +1420,177 @@ const re = new Hn(), Pn = {
|
|
|
1428
1420
|
clearSelection: et,
|
|
1429
1421
|
getSelectionRows: tt,
|
|
1430
1422
|
setSelectionRows: nt,
|
|
1431
|
-
resetInfinityScroll:
|
|
1423
|
+
resetInfinityScroll: f
|
|
1432
1424
|
// Додаємо метод для скидання infinity scroll
|
|
1433
1425
|
}), (h, C) => {
|
|
1434
|
-
var
|
|
1435
|
-
const
|
|
1436
|
-
return
|
|
1426
|
+
var z, P, de, fe;
|
|
1427
|
+
const I = Oe("tooltip");
|
|
1428
|
+
return m(), _("div", {
|
|
1437
1429
|
ref_key: "tableWrapperRef",
|
|
1438
1430
|
ref: i,
|
|
1439
1431
|
class: "vt-table-wrapper",
|
|
1440
|
-
style:
|
|
1432
|
+
style: ie(q(V)()),
|
|
1441
1433
|
onScroll: d
|
|
1442
1434
|
}, [
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
n.selectable ? (
|
|
1435
|
+
pe(h.$slots, "default"),
|
|
1436
|
+
v("table", Jn, [
|
|
1437
|
+
v("thead", null, [
|
|
1438
|
+
v("tr", null, [
|
|
1439
|
+
n.selectable ? (m(), _("th", {
|
|
1448
1440
|
key: 0,
|
|
1449
1441
|
class: W(["vt-table__th vt-table__th--selection", {
|
|
1450
1442
|
"vt-table__th--sticky": n.maxHeight,
|
|
1451
1443
|
"vt-table__th--pinned-left": !0
|
|
1452
1444
|
}]),
|
|
1453
|
-
style:
|
|
1445
|
+
style: ie(T())
|
|
1454
1446
|
}, [
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
checked: (
|
|
1458
|
-
indeterminate: (P =
|
|
1459
|
-
"is-double": (
|
|
1447
|
+
v("div", Qn, [
|
|
1448
|
+
N(ue, {
|
|
1449
|
+
checked: (z = q(p)) == null ? void 0 : z.isAllSelected.value,
|
|
1450
|
+
indeterminate: (P = q(p)) == null ? void 0 : P.isIndeterminate.value,
|
|
1451
|
+
"is-double": (fe = (de = q(p)) == null ? void 0 : de.isDoubleCheck) == null ? void 0 : fe.value,
|
|
1460
1452
|
onChange: Ze
|
|
1461
1453
|
}, null, 8, ["checked", "indeterminate", "is-double"])
|
|
1462
1454
|
])
|
|
1463
1455
|
], 6)) : H("", !0),
|
|
1464
|
-
(
|
|
1465
|
-
key:
|
|
1456
|
+
(m(!0), _(ne, null, oe(q(Z), (w, ce) => (m(), _("th", {
|
|
1457
|
+
key: w.prop,
|
|
1466
1458
|
ref_for: !0,
|
|
1467
|
-
ref: (
|
|
1468
|
-
style:
|
|
1459
|
+
ref: (se) => Le(se, w.prop),
|
|
1460
|
+
style: ie(Ue(w, ce)),
|
|
1469
1461
|
class: W([
|
|
1470
1462
|
"vt-table__th",
|
|
1471
1463
|
{
|
|
1472
1464
|
"vt-table__th--sticky": n.maxHeight,
|
|
1473
|
-
"vt-table__th--pinned-left":
|
|
1474
|
-
"vt-table__th--pinned-right":
|
|
1475
|
-
"vt-table__th--sortable":
|
|
1465
|
+
"vt-table__th--pinned-left": w.pinnedLeft,
|
|
1466
|
+
"vt-table__th--pinned-right": w.pinnedRight,
|
|
1467
|
+
"vt-table__th--sortable": w.sortable
|
|
1476
1468
|
}
|
|
1477
1469
|
])
|
|
1478
1470
|
}, [
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1471
|
+
v("div", eo, [
|
|
1472
|
+
v("div", to, te(w.label), 1),
|
|
1473
|
+
w.sortable ? (m(), _("div", no, [
|
|
1474
|
+
N(Y, {
|
|
1483
1475
|
name: "arrowTop",
|
|
1484
|
-
class: W(
|
|
1485
|
-
onClick:
|
|
1476
|
+
class: W(q(Ee)(w, u.value).asc),
|
|
1477
|
+
onClick: me((se) => g(w, "asc"), ["stop"])
|
|
1486
1478
|
}, null, 8, ["class", "onClick"]),
|
|
1487
|
-
|
|
1479
|
+
N(Y, {
|
|
1488
1480
|
name: "arrowDown",
|
|
1489
|
-
class: W(
|
|
1490
|
-
onClick:
|
|
1481
|
+
class: W(q(Ee)(w, u.value).desc),
|
|
1482
|
+
onClick: me((se) => g(w, "desc"), ["stop"])
|
|
1491
1483
|
}, null, 8, ["class", "onClick"])
|
|
1492
1484
|
])) : H("", !0),
|
|
1493
|
-
|
|
1485
|
+
w.actionColumn ? (m(), re(Yn, {
|
|
1494
1486
|
key: 1,
|
|
1495
|
-
column:
|
|
1496
|
-
"all-columns":
|
|
1487
|
+
column: w,
|
|
1488
|
+
"all-columns": q(Z),
|
|
1497
1489
|
columnsSelector: n.columnsSelector,
|
|
1498
|
-
onPin:
|
|
1490
|
+
onPin: b,
|
|
1499
1491
|
onUpdateColumns: B
|
|
1500
1492
|
}, null, 8, ["column", "all-columns", "columnsSelector"])) : H("", !0)
|
|
1501
1493
|
]),
|
|
1502
|
-
|
|
1494
|
+
v("div", {
|
|
1503
1495
|
class: "vt-table__resizer",
|
|
1504
|
-
"data-resizer":
|
|
1505
|
-
onMousedown: (
|
|
1506
|
-
}, null, 40,
|
|
1496
|
+
"data-resizer": w.prop,
|
|
1497
|
+
onMousedown: (se) => Ie(se, w)
|
|
1498
|
+
}, null, 40, oo)
|
|
1507
1499
|
], 6))), 128))
|
|
1508
1500
|
])
|
|
1509
1501
|
]),
|
|
1510
|
-
|
|
1511
|
-
k.value ? (
|
|
1512
|
-
var
|
|
1513
|
-
return
|
|
1514
|
-
key:
|
|
1502
|
+
v("tbody", null, [
|
|
1503
|
+
k.value ? (m(!0), _(ne, { key: 1 }, oe($.value, (w, ce) => {
|
|
1504
|
+
var se, Be, Re;
|
|
1505
|
+
return m(), _("tr", {
|
|
1506
|
+
key: w.id,
|
|
1515
1507
|
class: W([
|
|
1516
1508
|
"vt-table__row",
|
|
1517
1509
|
{
|
|
1518
|
-
"vt-table__row--selected": (
|
|
1519
|
-
"vt-table__row--current": ((
|
|
1510
|
+
"vt-table__row--selected": (se = q(p)) == null ? void 0 : se.isRowSelected(w),
|
|
1511
|
+
"vt-table__row--current": ((Be = q(p)) == null ? void 0 : Be.currentRow.value) === w,
|
|
1520
1512
|
"vt-table__row--clickable": n.selectOnClickRow || n.highlightCurrentRow
|
|
1521
1513
|
}
|
|
1522
1514
|
]),
|
|
1523
|
-
onClick: (
|
|
1515
|
+
onClick: (G) => ee(w, q(Z)[0], G)
|
|
1524
1516
|
}, [
|
|
1525
|
-
n.selectable ? (
|
|
1517
|
+
n.selectable ? (m(), _("td", {
|
|
1526
1518
|
key: 0,
|
|
1527
1519
|
class: W(["vt-table__td vt-table__td--selection", {
|
|
1528
1520
|
"vt-table__td--pinned-left": !0
|
|
1529
1521
|
}]),
|
|
1530
|
-
style:
|
|
1522
|
+
style: ie(A())
|
|
1531
1523
|
}, [
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
checked: (
|
|
1535
|
-
onChange: (
|
|
1524
|
+
v("div", ro, [
|
|
1525
|
+
N(ue, {
|
|
1526
|
+
checked: (Re = q(p)) == null ? void 0 : Re.isRowSelected(w),
|
|
1527
|
+
onChange: (G, be) => Ce(G, w, be)
|
|
1536
1528
|
}, null, 8, ["checked", "onChange"])
|
|
1537
1529
|
])
|
|
1538
1530
|
], 4)) : H("", !0),
|
|
1539
|
-
(
|
|
1540
|
-
key:
|
|
1531
|
+
(m(!0), _(ne, null, oe(q(Z), (G, be) => (m(), _("td", {
|
|
1532
|
+
key: G.prop,
|
|
1541
1533
|
ref_for: !0,
|
|
1542
|
-
ref: (we) => Le(we,
|
|
1543
|
-
style:
|
|
1534
|
+
ref: (we) => Le(we, G.prop),
|
|
1535
|
+
style: ie(Fe(G, be)),
|
|
1544
1536
|
class: W([
|
|
1545
1537
|
"vt-table__td",
|
|
1546
1538
|
{
|
|
1547
|
-
"vt-table__td--pinned-left":
|
|
1548
|
-
"vt-table__td--pinned-right":
|
|
1539
|
+
"vt-table__td--pinned-left": G.pinnedLeft,
|
|
1540
|
+
"vt-table__td--pinned-right": G.pinnedRight
|
|
1549
1541
|
}
|
|
1550
1542
|
])
|
|
1551
1543
|
}, [
|
|
1552
|
-
Me((
|
|
1553
|
-
|
|
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))
|
|
1544
|
+
Me((m(), _("div", co, [
|
|
1545
|
+
v("span", null, te(w[G.prop]), 1)
|
|
1559
1546
|
])), [
|
|
1560
|
-
[
|
|
1547
|
+
[I, G.showOverflowTooltip ? Xe(w, G) : null]
|
|
1561
1548
|
]),
|
|
1562
|
-
|
|
1549
|
+
v("div", {
|
|
1563
1550
|
class: "vt-table__resizer",
|
|
1564
|
-
"data-resizer":
|
|
1565
|
-
onMousedown: (we) => Ie(we,
|
|
1551
|
+
"data-resizer": G.prop,
|
|
1552
|
+
onMousedown: (we) => Ie(we, G)
|
|
1566
1553
|
}, null, 40, uo)
|
|
1567
1554
|
], 6))), 128))
|
|
1568
|
-
], 10,
|
|
1569
|
-
}), 128)) : (
|
|
1570
|
-
|
|
1571
|
-
colspan:
|
|
1555
|
+
], 10, ao);
|
|
1556
|
+
}), 128)) : (m(), _("tr", lo, [
|
|
1557
|
+
v("td", {
|
|
1558
|
+
colspan: q(Z).length + (n.selectable ? 1 : 0),
|
|
1572
1559
|
class: "vt-table__empty-cell"
|
|
1573
1560
|
}, [
|
|
1574
|
-
|
|
1575
|
-
|
|
1561
|
+
v("div", io, [
|
|
1562
|
+
N(Y, {
|
|
1576
1563
|
name: "empty",
|
|
1577
1564
|
class: "vt-table__empty-icon"
|
|
1578
1565
|
}),
|
|
1579
|
-
C[0] || (C[0] =
|
|
1566
|
+
C[0] || (C[0] = v("span", { class: "vt-table__empty-text" }, "Немає даних!", -1))
|
|
1580
1567
|
])
|
|
1581
|
-
], 8,
|
|
1568
|
+
], 8, so)
|
|
1582
1569
|
]))
|
|
1583
1570
|
]),
|
|
1584
|
-
Ke.value ? (
|
|
1585
|
-
|
|
1586
|
-
n.selectable ? (
|
|
1571
|
+
Ke.value ? (m(), _("tfoot", po, [
|
|
1572
|
+
v("tr", null, [
|
|
1573
|
+
n.selectable ? (m(), _("td", {
|
|
1587
1574
|
key: 0,
|
|
1588
1575
|
class: W(["vt-table__td", {
|
|
1589
1576
|
"vt-table__td--pinned-left": !0
|
|
1590
1577
|
}]),
|
|
1591
|
-
style:
|
|
1578
|
+
style: ie(X())
|
|
1592
1579
|
}, C[1] || (C[1] = [
|
|
1593
|
-
|
|
1580
|
+
v("div", { class: "vt-table__cell-content vt-table__cell-content--summary" }, null, -1)
|
|
1594
1581
|
]), 4)) : H("", !0),
|
|
1595
|
-
(
|
|
1596
|
-
key:
|
|
1597
|
-
style:
|
|
1582
|
+
(m(!0), _(ne, null, oe(q(Z), (w, ce) => (m(), _("td", {
|
|
1583
|
+
key: w.prop,
|
|
1584
|
+
style: ie(qe(w, ce)),
|
|
1598
1585
|
class: W([
|
|
1599
1586
|
"vt-table__td",
|
|
1600
1587
|
{
|
|
1601
|
-
"vt-table__td--pinned-left":
|
|
1602
|
-
"vt-table__td--pinned-right":
|
|
1588
|
+
"vt-table__td--pinned-left": w.pinnedLeft,
|
|
1589
|
+
"vt-table__td--pinned-right": w.pinnedRight
|
|
1603
1590
|
}
|
|
1604
1591
|
])
|
|
1605
1592
|
}, [
|
|
1606
|
-
|
|
1593
|
+
v("div", mo, te(Ge.value[w.prop]), 1)
|
|
1607
1594
|
], 6))), 128))
|
|
1608
1595
|
])
|
|
1609
1596
|
])) : H("", !0)
|
|
@@ -1611,7 +1598,7 @@ const re = new Hn(), Pn = {
|
|
|
1611
1598
|
], 36);
|
|
1612
1599
|
};
|
|
1613
1600
|
}
|
|
1614
|
-
}), vo = /* @__PURE__ */
|
|
1601
|
+
}), vo = /* @__PURE__ */ le({
|
|
1615
1602
|
__name: "VTableColumn",
|
|
1616
1603
|
props: {
|
|
1617
1604
|
prop: {},
|
|
@@ -1629,7 +1616,7 @@ const re = new Hn(), Pn = {
|
|
|
1629
1616
|
sortMethod: {}
|
|
1630
1617
|
},
|
|
1631
1618
|
setup(e) {
|
|
1632
|
-
const t = e, o = Ae(), n =
|
|
1619
|
+
const t = e, o = Ae(), n = dt("vt-table-columns");
|
|
1633
1620
|
n || console.error(
|
|
1634
1621
|
"VTableColumn: не знайдено контекст таблиці. Переконайтеся, що компонент використовується всередині VTable."
|
|
1635
1622
|
);
|
|
@@ -1649,12 +1636,12 @@ const re = new Hn(), Pn = {
|
|
|
1649
1636
|
renderSlot: o[t.prop] ?? o.default ?? o.slot
|
|
1650
1637
|
});
|
|
1651
1638
|
let l = -1;
|
|
1652
|
-
return
|
|
1639
|
+
return ve(() => {
|
|
1653
1640
|
if (n) {
|
|
1654
1641
|
const r = s();
|
|
1655
1642
|
n.push(r), l = n.length - 1;
|
|
1656
1643
|
}
|
|
1657
|
-
}),
|
|
1644
|
+
}), he(
|
|
1658
1645
|
() => [
|
|
1659
1646
|
t.width,
|
|
1660
1647
|
t.minWidth,
|
|
@@ -1688,7 +1675,7 @@ const re = new Hn(), Pn = {
|
|
|
1688
1675
|
}
|
|
1689
1676
|
}), (r, i) => null;
|
|
1690
1677
|
}
|
|
1691
|
-
}),
|
|
1678
|
+
}), We = (e, t) => {
|
|
1692
1679
|
const o = document.createElement("div");
|
|
1693
1680
|
o.className = `vt-tooltip vt-tooltip--${t}`, o.innerText = e, Object.assign(o.style, {
|
|
1694
1681
|
position: "absolute",
|
|
@@ -1773,23 +1760,23 @@ const re = new Hn(), Pn = {
|
|
|
1773
1760
|
}
|
|
1774
1761
|
const u = window.innerWidth, c = window.innerHeight;
|
|
1775
1762
|
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
|
-
},
|
|
1763
|
+
}, Ve = (e, t, o) => {
|
|
1777
1764
|
e.parentElement || document.body.appendChild(e), e.style.visibility = "visible", Se(e, t, o), requestAnimationFrame(() => {
|
|
1778
1765
|
e.style.opacity = "1";
|
|
1779
1766
|
});
|
|
1780
|
-
},
|
|
1767
|
+
}, He = (e) => {
|
|
1781
1768
|
e.style.opacity = "0", e.style.visibility = "hidden";
|
|
1782
|
-
},
|
|
1769
|
+
}, Pe = (e) => e.scrollWidth > e.clientWidth || e.scrollHeight > e.clientHeight, De = (e) => !!e.closest(".vt-table, table"), fo = {
|
|
1783
1770
|
mounted(e, t) {
|
|
1784
1771
|
var a;
|
|
1785
1772
|
const o = (a = t.value) == null ? void 0 : a.trim();
|
|
1786
1773
|
if (!o) return;
|
|
1787
|
-
const n = e.dataset.placement || "top", s =
|
|
1774
|
+
const n = e.dataset.placement || "top", s = We(o, n);
|
|
1788
1775
|
e.__tooltipEl = s;
|
|
1789
1776
|
const l = () => {
|
|
1790
|
-
(
|
|
1777
|
+
(De(e) ? Pe(e) : !0) && Ve(s, e, n);
|
|
1791
1778
|
}, r = () => {
|
|
1792
|
-
|
|
1779
|
+
He(s);
|
|
1793
1780
|
}, i = () => {
|
|
1794
1781
|
s.style.opacity === "1" && Se(s, e, n);
|
|
1795
1782
|
};
|
|
@@ -1801,12 +1788,12 @@ const re = new Hn(), Pn = {
|
|
|
1801
1788
|
if (e.__tooltipEl)
|
|
1802
1789
|
o ? e.__tooltipEl.firstChild.textContent = o : (e.__tooltipEl.parentElement && e.__tooltipEl.parentElement.removeChild(e.__tooltipEl), delete e.__tooltipEl);
|
|
1803
1790
|
else if (o) {
|
|
1804
|
-
const s = e.dataset.placement || "top", l =
|
|
1791
|
+
const s = e.dataset.placement || "top", l = We(o, s);
|
|
1805
1792
|
e.__tooltipEl = l;
|
|
1806
1793
|
const r = () => {
|
|
1807
|
-
(
|
|
1794
|
+
(De(e) ? Pe(e) : !0) && Ve(l, e, s);
|
|
1808
1795
|
}, i = () => {
|
|
1809
|
-
|
|
1796
|
+
He(l);
|
|
1810
1797
|
}, a = () => {
|
|
1811
1798
|
l.style.opacity === "1" && Se(l, e, s);
|
|
1812
1799
|
};
|
|
@@ -1819,21 +1806,21 @@ const re = new Hn(), Pn = {
|
|
|
1819
1806
|
}, _o = {
|
|
1820
1807
|
install(e, t = {}) {
|
|
1821
1808
|
const { prefix: o = "V", modal: n = !0 } = t;
|
|
1822
|
-
e.component(`${o}Button`, ge), e.component(`${o}Icon`, Y), e.component(`${o}Loader`, je), e.component(`${o}Modal`, Ne), e.component(`${o}Pagination`,
|
|
1809
|
+
e.component(`${o}Button`, ge), e.component(`${o}Icon`, Y), e.component(`${o}Loader`, je), e.component(`${o}Modal`, Ne), e.component(`${o}Pagination`, Ln), e.component(`${o}Checkbox`, ue), e.component(`${o}Table`, ho), e.component(`${o}TableColumn`, vo), e.directive("tooltip", fo), n && e.use(Dn);
|
|
1823
1810
|
}
|
|
1824
1811
|
}, Co = _o.install;
|
|
1825
1812
|
export {
|
|
1826
1813
|
ge as VButton,
|
|
1827
|
-
|
|
1814
|
+
ue as VCheckbox,
|
|
1828
1815
|
Y as VIcon,
|
|
1829
1816
|
je as VLoader,
|
|
1830
1817
|
Ne as VModal,
|
|
1831
|
-
|
|
1832
|
-
|
|
1818
|
+
Dn as VModalPlugin,
|
|
1819
|
+
Ln as VPagination,
|
|
1833
1820
|
ho as VTable,
|
|
1834
1821
|
vo as VTableColumn,
|
|
1835
1822
|
_o as default,
|
|
1836
1823
|
Co as install,
|
|
1837
|
-
|
|
1824
|
+
ae as modalManager,
|
|
1838
1825
|
fo as tooltipDirective
|
|
1839
1826
|
};
|