voiptime-components 0.0.16 → 0.0.18
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 +17 -38
- package/dist/index.es.js +396 -387
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createElementBlock as
|
|
1
|
+
import { createElementBlock as f, openBlock as p, createElementVNode as _, defineComponent as le, computed as x, createBlock as re, createCommentVNode as H, resolveDynamicComponent as Ae, useSlots as Oe, resolveDirective as je, withDirectives as Me, normalizeClass as W, renderSlot as fe, Teleport as lt, normalizeStyle as ie, withModifiers as pe, toDisplayString as te, watch as me, 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 he, onUnmounted as $e, nextTick as at, mergeModels as Te, useModel as rt, reactive as ct, provide as ut, unref as U, 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)
|
|
@@ -12,8 +12,8 @@ const K = (e, t) => {
|
|
|
12
12
|
xmlns: "http://www.w3.org/2000/svg"
|
|
13
13
|
};
|
|
14
14
|
function ht(e, t) {
|
|
15
|
-
return
|
|
16
|
-
|
|
15
|
+
return p(), f("svg", mt, t[0] || (t[0] = [
|
|
16
|
+
_("path", {
|
|
17
17
|
d: "M14 8L10 12L6 8",
|
|
18
18
|
stroke: "currentColor",
|
|
19
19
|
"stroke-width": "1.5",
|
|
@@ -30,8 +30,8 @@ const vt = /* @__PURE__ */ K(pt, [["render", ht]]), ft = {}, _t = {
|
|
|
30
30
|
xmlns: "http://www.w3.org/2000/svg"
|
|
31
31
|
};
|
|
32
32
|
function gt(e, t) {
|
|
33
|
-
return
|
|
34
|
-
|
|
33
|
+
return p(), f("svg", _t, t[0] || (t[0] = [
|
|
34
|
+
_("path", {
|
|
35
35
|
d: "M6 12L10 8L14 12",
|
|
36
36
|
stroke: "currentColor",
|
|
37
37
|
"stroke-width": "1.5",
|
|
@@ -48,15 +48,15 @@ const Ct = /* @__PURE__ */ K(ft, [["render", gt]]), bt = {}, wt = {
|
|
|
48
48
|
xmlns: "http://www.w3.org/2000/svg"
|
|
49
49
|
};
|
|
50
50
|
function kt(e, t) {
|
|
51
|
-
return
|
|
52
|
-
|
|
51
|
+
return p(), f("svg", wt, t[0] || (t[0] = [
|
|
52
|
+
_("path", {
|
|
53
53
|
d: "M11.8789 4.90517L11.2561 4.20124C10.4045 3.33504 9.28504 2.7626 8.06789 2.5709C6.85074 2.3792 5.60245 2.57874 4.5127 3.13917C3.42296 3.69961 2.55134 4.59032 2.03031 5.67593C1.50928 6.76155 1.36732 7.98272 1.626 9.15387C1.88469 10.325 2.52987 11.3821 3.46351 12.1645C4.39716 12.9469 5.56821 13.4119 6.79871 13.4887C8.02921 13.5655 9.25189 13.25 10.2809 12.5901C11.31 11.9302 12.0891 10.962 12.5 9.83266",
|
|
54
54
|
stroke: "currentColor",
|
|
55
55
|
"stroke-width": "1.5",
|
|
56
56
|
"stroke-miterlimit": "10",
|
|
57
57
|
"stroke-linecap": "round"
|
|
58
58
|
}, null, -1),
|
|
59
|
-
|
|
59
|
+
_("path", {
|
|
60
60
|
d: "M8.5157 6.5C8.07025 6.5 7.84716 5.96143 8.16215 5.64645L10.3086 3.5L12.455 1.35355C12.77 1.03857 13.3086 1.26165 13.3086 1.70711V6C13.3086 6.27614 13.0847 6.5 12.8086 6.5L8.5157 6.5Z",
|
|
61
61
|
fill: "currentColor"
|
|
62
62
|
}, null, -1)
|
|
@@ -70,8 +70,8 @@ const yt = /* @__PURE__ */ K(bt, [["render", kt]]), xt = {}, St = {
|
|
|
70
70
|
xmlns: "http://www.w3.org/2000/svg"
|
|
71
71
|
};
|
|
72
72
|
function Mt(e, t) {
|
|
73
|
-
return
|
|
74
|
-
|
|
73
|
+
return p(), f("svg", St, t[0] || (t[0] = [
|
|
74
|
+
_("path", {
|
|
75
75
|
d: "M8.60352 6L12.6035 10L8.60352 14",
|
|
76
76
|
stroke: "currentColor",
|
|
77
77
|
"stroke-width": "1.5",
|
|
@@ -88,8 +88,8 @@ const $t = /* @__PURE__ */ K(xt, [["render", Mt]]), Lt = {}, It = {
|
|
|
88
88
|
xmlns: "http://www.w3.org/2000/svg"
|
|
89
89
|
};
|
|
90
90
|
function Bt(e, t) {
|
|
91
|
-
return
|
|
92
|
-
|
|
91
|
+
return p(), f("svg", It, t[0] || (t[0] = [
|
|
92
|
+
_("path", {
|
|
93
93
|
d: "M12.3984 14L8.39844 10L12.3984 6",
|
|
94
94
|
stroke: "currentColor",
|
|
95
95
|
"stroke-width": "1.5",
|
|
@@ -106,8 +106,8 @@ const Rt = /* @__PURE__ */ K(Lt, [["render", Bt]]), Tt = {}, zt = {
|
|
|
106
106
|
xmlns: "http://www.w3.org/2000/svg"
|
|
107
107
|
};
|
|
108
108
|
function Et(e, t) {
|
|
109
|
-
return
|
|
110
|
-
|
|
109
|
+
return p(), f("svg", zt, t[0] || (t[0] = [
|
|
110
|
+
_("path", {
|
|
111
111
|
d: "M12.5 1.66406L11.1783 2.94156C10.6233 3.47906 10.345 3.7474 10 3.7474C9.655 3.7474 9.37667 3.47906 8.82167 2.94156L7.5 1.66406M14.5833 5.83073C15.7533 5.83073 16.3392 5.83073 16.7592 6.11156C16.9412 6.23319 17.0975 6.3895 17.2192 6.57156C17.5 6.99156 17.5 7.5774 17.5 8.7474V15.4141C17.5 16.5841 17.5 17.1699 17.2192 17.5899C17.0975 17.772 16.9412 17.9283 16.7592 18.0499C16.3392 18.3307 15.7533 18.3307 14.5833 18.3307C13.4133 18.3307 12.8275 18.3307 12.4075 18.0499C12.2254 17.9283 12.0691 17.772 11.9475 17.5899C11.6667 17.1699 11.6667 16.5841 11.6667 15.4141V8.7474C11.6667 7.5774 11.6667 6.99156 11.9475 6.57156C12.0691 6.3895 12.2254 6.23319 12.4075 6.11156C12.8275 5.83073 13.4133 5.83073 14.5833 5.83073ZM5.41667 5.83073C6.58667 5.83073 7.1725 5.83073 7.5925 6.11156C7.77456 6.23319 7.93087 6.3895 8.0525 6.57156C8.33333 6.99156 8.33333 7.5774 8.33333 8.7474V15.4141C8.33333 16.5841 8.33333 17.1699 8.0525 17.5899C7.93087 17.772 7.77456 17.9283 7.5925 18.0499C7.1725 18.3307 6.58667 18.3307 5.41667 18.3307C4.24667 18.3307 3.66083 18.3307 3.24083 18.0499C3.05877 17.9283 2.90246 17.772 2.78083 17.5899C2.5 17.1699 2.5 16.5841 2.5 15.4141V8.7474C2.5 7.5774 2.5 6.99156 2.78083 6.57156C2.90246 6.3895 3.05877 6.23319 3.24083 6.11156C3.66083 5.83073 4.24667 5.83073 5.41667 5.83073Z",
|
|
112
112
|
stroke: "currentColor",
|
|
113
113
|
"stroke-width": "1.5",
|
|
@@ -124,15 +124,15 @@ const Wt = /* @__PURE__ */ K(Tt, [["render", Et]]), Vt = {}, Ht = {
|
|
|
124
124
|
xmlns: "http://www.w3.org/2000/svg"
|
|
125
125
|
};
|
|
126
126
|
function Pt(e, t) {
|
|
127
|
-
return
|
|
128
|
-
|
|
127
|
+
return p(), f("svg", Ht, t[0] || (t[0] = [
|
|
128
|
+
_("path", {
|
|
129
129
|
d: "M8 3V5.2225M8 5.2225V10.7775M8 5.2225L9.875 4.25M8 5.2225L6.125 4.25M8 10.7775V13M8 10.7775L6.125 11.75M8 10.7775L9.875 11.75M13 8H10.7775M10.7775 8H5.2225M10.7775 8L11.75 9.875M10.7775 8L11.75 6.125M5.2225 8H3M5.2225 8L4.25 6.125M5.2225 8L4.25 9.875",
|
|
130
130
|
stroke: "currentColor",
|
|
131
131
|
"stroke-width": "1.5",
|
|
132
132
|
"stroke-linecap": "round",
|
|
133
133
|
"stroke-linejoin": "round"
|
|
134
134
|
}, null, -1),
|
|
135
|
-
|
|
135
|
+
_("path", {
|
|
136
136
|
d: "M12 14.7143L13.1151 15.6701C13.3268 15.8515 13.646 15.8247 13.8246 15.6105L16 13",
|
|
137
137
|
stroke: "currentColor",
|
|
138
138
|
"stroke-width": "1.5",
|
|
@@ -148,15 +148,15 @@ const Dt = /* @__PURE__ */ K(Vt, [["render", Pt]]), At = {}, Ot = {
|
|
|
148
148
|
xmlns: "http://www.w3.org/2000/svg"
|
|
149
149
|
};
|
|
150
150
|
function jt(e, t) {
|
|
151
|
-
return
|
|
152
|
-
|
|
151
|
+
return p(), f("svg", Ot, t[0] || (t[0] = [
|
|
152
|
+
_("path", {
|
|
153
153
|
d: "M8 3V5.2225M8 5.2225V10.7775M8 5.2225L9.875 4.25M8 5.2225L6.125 4.25M8 10.7775V13M8 10.7775L6.125 11.75M8 10.7775L9.875 11.75M13 8H10.7775M10.7775 8H5.2225M10.7775 8L11.75 9.875M10.7775 8L11.75 6.125M5.2225 8H3M5.2225 8L4.25 6.125M5.2225 8L4.25 9.875",
|
|
154
154
|
stroke: "currentColor",
|
|
155
155
|
"stroke-width": "1.5",
|
|
156
156
|
"stroke-linecap": "round",
|
|
157
157
|
"stroke-linejoin": "round"
|
|
158
158
|
}, null, -1),
|
|
159
|
-
|
|
159
|
+
_("path", {
|
|
160
160
|
d: "M13 16L14.5 14.5M16 13L14.5 14.5M14.5 14.5L13 13M14.5 14.5L16 16",
|
|
161
161
|
stroke: "currentColor",
|
|
162
162
|
"stroke-width": "1.5",
|
|
@@ -172,8 +172,8 @@ const Nt = /* @__PURE__ */ K(At, [["render", jt]]), Zt = {}, Ft = {
|
|
|
172
172
|
fill: "none"
|
|
173
173
|
};
|
|
174
174
|
function Ut(e, t) {
|
|
175
|
-
return
|
|
176
|
-
|
|
175
|
+
return p(), f("svg", Ft, t[0] || (t[0] = [
|
|
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",
|
|
179
179
|
"stroke-width": "2",
|
|
@@ -190,14 +190,14 @@ const qt = /* @__PURE__ */ K(Zt, [["render", Ut]]), Xt = {}, Gt = {
|
|
|
190
190
|
xmlns: "http://www.w3.org/2000/svg"
|
|
191
191
|
};
|
|
192
192
|
function Kt(e, t) {
|
|
193
|
-
return
|
|
194
|
-
|
|
193
|
+
return p(), f("svg", Gt, t[0] || (t[0] = [
|
|
194
|
+
_("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
|
+
_("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",
|
|
@@ -213,8 +213,8 @@ const Yt = /* @__PURE__ */ K(Xt, [["render", Kt]]), Jt = {}, Qt = {
|
|
|
213
213
|
xmlns: "http://www.w3.org/2000/svg"
|
|
214
214
|
};
|
|
215
215
|
function en(e, t) {
|
|
216
|
-
return
|
|
217
|
-
|
|
216
|
+
return p(), f("svg", Qt, t[0] || (t[0] = [
|
|
217
|
+
_("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",
|
|
@@ -230,8 +230,8 @@ const tn = /* @__PURE__ */ K(Jt, [["render", en]]), nn = {}, on = {
|
|
|
230
230
|
xmlns: "http://www.w3.org/2000/svg"
|
|
231
231
|
};
|
|
232
232
|
function ln(e, t) {
|
|
233
|
-
return
|
|
234
|
-
|
|
233
|
+
return p(), f("svg", on, t[0] || (t[0] = [
|
|
234
|
+
_("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",
|
|
@@ -247,8 +247,8 @@ const sn = /* @__PURE__ */ K(nn, [["render", ln]]), an = {}, rn = {
|
|
|
247
247
|
xmlns: "http://www.w3.org/2000/svg"
|
|
248
248
|
};
|
|
249
249
|
function cn(e, t) {
|
|
250
|
-
return
|
|
251
|
-
|
|
250
|
+
return p(), f("svg", rn, t[0] || (t[0] = [
|
|
251
|
+
_("path", {
|
|
252
252
|
d: "M6 14L10 10M10 10L14 6M10 10L6 6M10 10L14 14",
|
|
253
253
|
stroke: "currentColor",
|
|
254
254
|
"stroke-width": "1.5",
|
|
@@ -281,13 +281,13 @@ const un = /* @__PURE__ */ K(an, [["render", cn]]), dn = {
|
|
|
281
281
|
},
|
|
282
282
|
setup(e) {
|
|
283
283
|
const t = e, o = x(() => dn[t.name]);
|
|
284
|
-
return (n, s) => o.value ? (
|
|
284
|
+
return (n, s) => o.value ? (p(), re(Ae(o.value), { key: 0 })) : H("", !0);
|
|
285
285
|
}
|
|
286
286
|
}), pn = {}, mn = { class: "vt-loader" };
|
|
287
287
|
function hn(e, t) {
|
|
288
|
-
return
|
|
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
293
|
}, ge = /* @__PURE__ */ le({
|
|
@@ -304,7 +304,7 @@ const je = /* @__PURE__ */ K(pn, [["render", hn]]), vn = ["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,24 +321,24 @@ const je = /* @__PURE__ */ K(pn, [["render", hn]]), vn = ["disabled", "type", "d
|
|
|
321
321
|
!o.disabled && !o.loading && n("click", c);
|
|
322
322
|
};
|
|
323
323
|
return (c, k) => {
|
|
324
|
-
const S =
|
|
325
|
-
return Me((
|
|
324
|
+
const S = je("tooltip");
|
|
325
|
+
return Me((p(), f("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 ? (p(), re(Ne, {
|
|
333
333
|
key: 0,
|
|
334
334
|
class: "vt-button__icon"
|
|
335
|
-
})) : o.icon ? (
|
|
335
|
+
})) : o.icon ? (p(), 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) : (p(), f("span", fn, [
|
|
341
|
+
fe(c.$slots, "default")
|
|
342
342
|
]))
|
|
343
343
|
], 10, vn)), [
|
|
344
344
|
[S, a.value]
|
|
@@ -351,7 +351,7 @@ const je = /* @__PURE__ */ K(pn, [["render", hn]]), vn = ["disabled", "type", "d
|
|
|
351
351
|
}, gn = {
|
|
352
352
|
key: 0,
|
|
353
353
|
class: "vt-modal__title"
|
|
354
|
-
}, Cn = { class: "vt-modal__content" },
|
|
354
|
+
}, Cn = { class: "vt-modal__content" }, Ze = /* @__PURE__ */ le({
|
|
355
355
|
__name: "VModal",
|
|
356
356
|
props: {
|
|
357
357
|
modelValue: { type: Boolean },
|
|
@@ -370,29 +370,29 @@ const je = /* @__PURE__ */ K(pn, [["render", hn]]), vn = ["disabled", "type", "d
|
|
|
370
370
|
}, i = () => {
|
|
371
371
|
o.closeOnBackdropClick && r();
|
|
372
372
|
};
|
|
373
|
-
return (a, u) => (
|
|
374
|
-
a.modelValue ? (
|
|
373
|
+
return (a, u) => (p(), re(lt, { to: "body" }, [
|
|
374
|
+
a.modelValue ? (p(), f("div", {
|
|
375
375
|
key: 0,
|
|
376
376
|
class: "vt-modal__backdrop",
|
|
377
377
|
style: ie(l.value),
|
|
378
378
|
onClick: i
|
|
379
379
|
}, [
|
|
380
|
-
|
|
380
|
+
_("div", {
|
|
381
381
|
class: W(s.value),
|
|
382
|
-
onClick: u[0] || (u[0] =
|
|
382
|
+
onClick: u[0] || (u[0] = pe(() => {
|
|
383
383
|
}, ["stop"]))
|
|
384
384
|
}, [
|
|
385
|
-
a.title || a.showCloseButton ? (
|
|
386
|
-
a.title ? (
|
|
387
|
-
a.showCloseButton ? (
|
|
385
|
+
a.title || a.showCloseButton ? (p(), f("div", _n, [
|
|
386
|
+
a.title ? (p(), f("h2", gn, te(a.title), 1)) : H("", !0),
|
|
387
|
+
a.showCloseButton ? (p(), 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
|
+
_("div", Cn, [
|
|
395
|
+
fe(a.$slots, "default")
|
|
396
396
|
])
|
|
397
397
|
], 2)
|
|
398
398
|
], 4)) : H("", !0)
|
|
@@ -416,13 +416,13 @@ const je = /* @__PURE__ */ K(pn, [["render", hn]]), vn = ["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, R = s.value,
|
|
420
|
-
if (V <=
|
|
419
|
+
const M = [], V = r.value, R = 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, R - Math.floor(
|
|
425
|
+
const y = Math.max(2, R - Math.floor(X / 2)), E = Math.min(V - 1, R + Math.floor(X / 2));
|
|
426
426
|
y > 2 && M.push("...");
|
|
427
427
|
for (let $ = y; $ <= E; $++)
|
|
428
428
|
M.push($);
|
|
@@ -434,36 +434,36 @@ const je = /* @__PURE__ */ K(pn, [["render", hn]]), vn = ["disabled", "type", "d
|
|
|
434
434
|
page: s.value,
|
|
435
435
|
pageSize: l.value
|
|
436
436
|
});
|
|
437
|
-
},
|
|
437
|
+
}, q = (M) => {
|
|
438
438
|
typeof M == "number" && M !== s.value && (s.value = M, S());
|
|
439
|
-
},
|
|
439
|
+
}, j = () => {
|
|
440
440
|
u.value || (s.value--, S());
|
|
441
441
|
}, Q = () => {
|
|
442
442
|
c.value || (s.value++, S());
|
|
443
|
-
},
|
|
443
|
+
}, F = () => {
|
|
444
444
|
s.value = 1, S();
|
|
445
|
-
},
|
|
445
|
+
}, N = () => {
|
|
446
446
|
n("reloadData", s.value);
|
|
447
447
|
};
|
|
448
|
-
return
|
|
448
|
+
return me(
|
|
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) => (p(), f("div", bn, [
|
|
454
|
+
_("div", wn, [
|
|
455
|
+
_("div", kn, [
|
|
456
|
+
V[1] || (V[1] = _("label", {
|
|
457
457
|
for: "rowsSelect",
|
|
458
458
|
class: "vt-pagination__label"
|
|
459
459
|
}, "Рядків на сторінку:", -1)),
|
|
460
|
-
Me(
|
|
460
|
+
Me(_("select", {
|
|
461
461
|
id: "rowsSelect",
|
|
462
462
|
"onUpdate:modelValue": V[0] || (V[0] = (R) => l.value = R),
|
|
463
|
-
onChange:
|
|
463
|
+
onChange: F,
|
|
464
464
|
class: "vt-pagination__select"
|
|
465
465
|
}, [
|
|
466
|
-
(
|
|
466
|
+
(p(!0), f(ne, null, oe(M.pageSizeOptions, (R) => (p(), f("option", {
|
|
467
467
|
key: R,
|
|
468
468
|
value: R
|
|
469
469
|
}, te(R), 9, yn))), 128))
|
|
@@ -471,38 +471,38 @@ const je = /* @__PURE__ */ K(pn, [["render", hn]]), vn = ["disabled", "type", "d
|
|
|
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
|
-
|
|
477
|
-
|
|
478
|
-
onClick:
|
|
476
|
+
_("div", xn, [
|
|
477
|
+
_("button", {
|
|
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
483
|
], 10, Sn),
|
|
484
|
-
(
|
|
484
|
+
(p(!0), f(ne, null, oe(k.value, (R) => (p(), f("button", {
|
|
485
485
|
key: R,
|
|
486
|
-
onClick: (
|
|
486
|
+
onClick: (X) => q(R),
|
|
487
487
|
class: W(["vt-pagination__nav-button", {
|
|
488
488
|
"vt-pagination__nav-button--active": R === s.value
|
|
489
489
|
}])
|
|
490
490
|
}, te(R), 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
497
|
], 10, $n)
|
|
498
498
|
]),
|
|
499
|
-
|
|
500
|
-
|
|
499
|
+
_("div", null, [
|
|
500
|
+
Z(ge, {
|
|
501
501
|
icon: "arrowReload",
|
|
502
502
|
shape: "circle",
|
|
503
503
|
tooltip: "",
|
|
504
504
|
tooltipPlacement: "left",
|
|
505
|
-
onClick:
|
|
505
|
+
onClick: N
|
|
506
506
|
}, {
|
|
507
507
|
default: xe(() => V[2] || (V[2] = [
|
|
508
508
|
_e("Оновити дані ", -1)
|
|
@@ -540,7 +540,7 @@ const je = /* @__PURE__ */ K(pn, [["render", hn]]), vn = ["disabled", "type", "d
|
|
|
540
540
|
}, u = (c) => {
|
|
541
541
|
n("blur", c);
|
|
542
542
|
};
|
|
543
|
-
return (c, k) => (
|
|
543
|
+
return (c, k) => (p(), f("label", {
|
|
544
544
|
class: W([
|
|
545
545
|
"vt-checkbox",
|
|
546
546
|
`vt-checkbox--${c.size}`,
|
|
@@ -552,7 +552,7 @@ const je = /* @__PURE__ */ K(pn, [["render", hn]]), vn = ["disabled", "type", "d
|
|
|
552
552
|
]),
|
|
553
553
|
for: l.value
|
|
554
554
|
}, [
|
|
555
|
-
|
|
555
|
+
_("input", {
|
|
556
556
|
id: l.value,
|
|
557
557
|
name: c.name,
|
|
558
558
|
value: c.value,
|
|
@@ -566,7 +566,7 @@ const je = /* @__PURE__ */ K(pn, [["render", hn]]), vn = ["disabled", "type", "d
|
|
|
566
566
|
onFocus: a,
|
|
567
567
|
onBlur: u
|
|
568
568
|
}, null, 40, Bn),
|
|
569
|
-
|
|
569
|
+
_("div", {
|
|
570
570
|
class: W([
|
|
571
571
|
"vt-checkbox__box",
|
|
572
572
|
{
|
|
@@ -577,7 +577,7 @@ const je = /* @__PURE__ */ K(pn, [["render", hn]]), vn = ["disabled", "type", "d
|
|
|
577
577
|
}
|
|
578
578
|
])
|
|
579
579
|
}, [
|
|
580
|
-
!c.indeterminate && !c.isDouble ? (
|
|
580
|
+
!c.indeterminate && !c.isDouble ? (p(), f("svg", {
|
|
581
581
|
key: 0,
|
|
582
582
|
class: W([
|
|
583
583
|
"vt-checkbox__checkmark",
|
|
@@ -591,14 +591,14 @@ const je = /* @__PURE__ */ K(pn, [["render", hn]]), vn = ["disabled", "type", "d
|
|
|
591
591
|
fill: "none",
|
|
592
592
|
xmlns: "http://www.w3.org/2000/svg"
|
|
593
593
|
}, k[0] || (k[0] = [
|
|
594
|
-
|
|
594
|
+
_("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 ? (p(), f("svg", {
|
|
602
602
|
key: 1,
|
|
603
603
|
class: W([
|
|
604
604
|
"vt-checkbox__checkmark",
|
|
@@ -612,14 +612,14 @@ const je = /* @__PURE__ */ K(pn, [["render", hn]]), vn = ["disabled", "type", "d
|
|
|
612
612
|
fill: "none",
|
|
613
613
|
xmlns: "http://www.w3.org/2000/svg"
|
|
614
614
|
}, k[1] || (k[1] = [
|
|
615
|
-
|
|
615
|
+
_("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
|
+
_("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(pn, [["render", hn]]), vn = ["disabled", "type", "d
|
|
|
627
627
|
"stroke-linejoin": "round"
|
|
628
628
|
}, null, -1)
|
|
629
629
|
]), 2)) : H("", !0),
|
|
630
|
-
c.indeterminate ? (
|
|
630
|
+
c.indeterminate ? (p(), f("div", {
|
|
631
631
|
key: 2,
|
|
632
632
|
class: W([
|
|
633
633
|
"vt-checkbox__indeterminate-mark",
|
|
@@ -637,7 +637,7 @@ const je = /* @__PURE__ */ K(pn, [["render", hn]]), vn = ["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 ? (p(), f("span", {
|
|
641
641
|
key: 0,
|
|
642
642
|
class: W([
|
|
643
643
|
"vt-checkbox__label",
|
|
@@ -646,8 +646,8 @@ const je = /* @__PURE__ */ K(pn, [["render", hn]]), vn = ["disabled", "type", "d
|
|
|
646
646
|
}
|
|
647
647
|
])
|
|
648
648
|
}, [
|
|
649
|
-
|
|
650
|
-
|
|
649
|
+
fe(c.$slots, "label", {}, () => [
|
|
650
|
+
fe(c.$slots, "default", {}, () => [
|
|
651
651
|
_e(te(c.label), 1)
|
|
652
652
|
])
|
|
653
653
|
])
|
|
@@ -724,11 +724,11 @@ function zn() {
|
|
|
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((N) => {
|
|
728
|
+
N.classList.add("vt-table__resizer--active");
|
|
729
729
|
});
|
|
730
|
-
const
|
|
731
|
-
c.width =
|
|
730
|
+
const q = u.clientX - k, j = c.minWidth || 50, Q = c.maxWidth || 1e3, F = Math.max(Math.min(S + q, Q), j);
|
|
731
|
+
c.width = F;
|
|
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) => {
|
|
@@ -744,19 +744,19 @@ 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 = (m) => m[s], u = (m) => i.value ? !0 : l.value.some((A) => a(A) === a(m)), c = x(() => t.value.filter((m) => u(m)).length), k = x(() => t.value.length > 0 && c.value === t.value.length), S = x(() => {
|
|
748
748
|
if (i.value) return !1;
|
|
749
|
-
const
|
|
750
|
-
return
|
|
751
|
-
}),
|
|
752
|
-
const T = a(
|
|
749
|
+
const m = c.value;
|
|
750
|
+
return m > 0 && m < t.value.length;
|
|
751
|
+
}), q = x(() => i.value ? !0 : k.value && !S.value), j = x(() => i.value), Q = (m, A) => {
|
|
752
|
+
const T = a(m), G = l.value.some((v) => a(v) === a(m)), d = A !== void 0 ? A : !G;
|
|
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((v) => a(v) !== T)), $(m, !1);
|
|
755
755
|
return;
|
|
756
756
|
}
|
|
757
|
-
i.value && d || (d && !
|
|
758
|
-
},
|
|
759
|
-
switch (
|
|
757
|
+
i.value && d || (d && !G ? l.value.push(m) : !d && G && (l.value = l.value.filter((v) => a(v) !== T)), e.selectOnClickRow && A === void 0 && X(d ? m : null), $(m, d));
|
|
758
|
+
}, F = () => {
|
|
759
|
+
switch (N()) {
|
|
760
760
|
case "none":
|
|
761
761
|
case "partial":
|
|
762
762
|
M();
|
|
@@ -768,57 +768,67 @@ function En(e, t, o, n) {
|
|
|
768
768
|
R();
|
|
769
769
|
break;
|
|
770
770
|
}
|
|
771
|
-
},
|
|
772
|
-
const
|
|
771
|
+
}, N = () => i.value ? "absoluteAll" : k.value ? "allVisible" : c.value > 0 ? "partial" : "none", M = () => {
|
|
772
|
+
const m = [], A = new Set(l.value.map((T) => a(T)));
|
|
773
773
|
l.value.forEach((T) => {
|
|
774
|
-
|
|
774
|
+
m.push(T);
|
|
775
775
|
}), t.value.forEach((T) => {
|
|
776
|
-
A.has(a(T)) ||
|
|
777
|
-
}), l.value =
|
|
776
|
+
A.has(a(T)) || m.push(T);
|
|
777
|
+
}), l.value = m, 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
|
+
}, X = (m) => {
|
|
783
783
|
const A = r.value;
|
|
784
|
-
r.value =
|
|
784
|
+
r.value = m, 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 = (m) => {
|
|
789
|
+
l.value = [...m], i.value = !1, $();
|
|
790
|
+
}, $ = (m, A, T = !1) => {
|
|
791
|
+
const G = {
|
|
792
792
|
selection: [...l.value],
|
|
793
|
-
row:
|
|
793
|
+
row: m,
|
|
794
794
|
selected: A,
|
|
795
795
|
isAllSelected: T || i.value
|
|
796
796
|
};
|
|
797
|
-
o("selection-change",
|
|
797
|
+
o("selection-change", G);
|
|
798
798
|
};
|
|
799
|
-
return
|
|
799
|
+
return me(
|
|
800
800
|
() => e.defaultSelection,
|
|
801
|
-
(
|
|
802
|
-
|
|
801
|
+
(m) => {
|
|
802
|
+
m != null && m.length && (l.value = [...m]);
|
|
803
803
|
}
|
|
804
804
|
), {
|
|
805
805
|
selectedRows: l,
|
|
806
806
|
currentRow: r,
|
|
807
807
|
isRowSelected: u,
|
|
808
|
-
isAllSelected:
|
|
808
|
+
isAllSelected: q,
|
|
809
809
|
isIndeterminate: S,
|
|
810
|
-
isDoubleCheck:
|
|
810
|
+
isDoubleCheck: j,
|
|
811
811
|
isFullSelection: i,
|
|
812
812
|
toggleRowSelection: Q,
|
|
813
|
-
toggleAllSelection:
|
|
813
|
+
toggleAllSelection: F,
|
|
814
814
|
clearSelection: R,
|
|
815
|
-
setCurrentRow:
|
|
815
|
+
setCurrentRow: X,
|
|
816
816
|
getSelectionRows: y,
|
|
817
817
|
setSelectionRows: E,
|
|
818
818
|
selectAbsolutelyAll: V
|
|
819
819
|
};
|
|
820
820
|
}
|
|
821
|
-
|
|
821
|
+
function Wn(e, t) {
|
|
822
|
+
if (!e)
|
|
823
|
+
return String(t.value ?? "");
|
|
824
|
+
try {
|
|
825
|
+
const o = e(t);
|
|
826
|
+
return o;
|
|
827
|
+
} catch (o) {
|
|
828
|
+
return console.error("Error rendering table slot:", o), String(t.value ?? "");
|
|
829
|
+
}
|
|
830
|
+
}
|
|
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;
|
|
@@ -829,7 +839,7 @@ const Wn = (e, t, o = "asc") => {
|
|
|
829
839
|
numeric: !0,
|
|
830
840
|
sensitivity: "base"
|
|
831
841
|
}), o === "desc" ? -n : n;
|
|
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,
|
|
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
|
|
@@ -840,17 +850,17 @@ const Wn = (e, t, o = "asc") => {
|
|
|
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
|
}
|
|
@@ -865,7 +875,7 @@ class Pn {
|
|
|
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 Pn {
|
|
|
919
929
|
recalculateZIndices() {
|
|
920
930
|
}
|
|
921
931
|
}
|
|
922
|
-
const ae = new
|
|
932
|
+
const ae = new Dn(), An = {
|
|
923
933
|
install(e) {
|
|
924
934
|
e.config.globalProperties.$modal = ae, e.config.globalProperties.$modalStack = {
|
|
925
935
|
closeAll: () => ae.closeAll(),
|
|
@@ -927,16 +937,16 @@ const ae = new Pn(), Dn = {
|
|
|
927
937
|
closeById: (t) => ae.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: {},
|
|
@@ -946,55 +956,55 @@ const ae = new Pn(), Dn = {
|
|
|
946
956
|
setup(e, { emit: t }) {
|
|
947
957
|
const o = e, n = t, s = D([]), l = D(/* @__PURE__ */ new Set()), r = D(-1), i = D(-1), a = D("before"), u = x(() => {
|
|
948
958
|
const d = {};
|
|
949
|
-
return o.columnsSelector.forEach((
|
|
950
|
-
if (
|
|
959
|
+
return o.columnsSelector.forEach((v) => {
|
|
960
|
+
if (v.name === "removed")
|
|
951
961
|
return;
|
|
952
|
-
const g =
|
|
953
|
-
|
|
962
|
+
const g = v.columns.map((B) => B.prop), w = s.value.filter((B) => g.includes(B.prop));
|
|
963
|
+
w.length === 0 ? d[v.name] = { checked: !1, indeterminate: !1 } : w.length === v.columns.length ? d[v.name] = { checked: !0, indeterminate: !1 } : d[v.name] = { checked: !1, indeterminate: !0 };
|
|
954
964
|
}), d;
|
|
955
|
-
}), c = x(() => o.columnsSelector.filter((d) => d.name !== "removed")), k = (d) => d.pinnedLeft || d.pinnedRight, S = (d) => !k(d),
|
|
965
|
+
}), c = x(() => o.columnsSelector.filter((d) => d.name !== "removed")), k = (d) => d.pinnedLeft || d.pinnedRight, S = (d) => !k(d), q = () => {
|
|
956
966
|
const d = s.value;
|
|
957
|
-
let
|
|
958
|
-
for (let
|
|
959
|
-
d[
|
|
967
|
+
let v = -1;
|
|
968
|
+
for (let w = 0; w < d.length; w++)
|
|
969
|
+
d[w].pinnedLeft && (v = w);
|
|
960
970
|
let g = d.length;
|
|
961
|
-
for (let
|
|
962
|
-
if (d[
|
|
963
|
-
g =
|
|
971
|
+
for (let w = 0; w < d.length; w++)
|
|
972
|
+
if (d[w].pinnedRight) {
|
|
973
|
+
g = w;
|
|
964
974
|
break;
|
|
965
975
|
}
|
|
966
976
|
return {
|
|
967
|
-
minIndex:
|
|
977
|
+
minIndex: v + 1,
|
|
968
978
|
maxIndex: g - 1
|
|
969
979
|
};
|
|
970
|
-
},
|
|
971
|
-
const
|
|
972
|
-
return !(d <
|
|
973
|
-
}, Q = (d,
|
|
974
|
-
const g = s.value[
|
|
980
|
+
}, j = (d) => {
|
|
981
|
+
const v = q();
|
|
982
|
+
return !(d < v.minIndex || d > v.maxIndex + 1);
|
|
983
|
+
}, Q = (d, v) => {
|
|
984
|
+
const g = s.value[v];
|
|
975
985
|
if (!S(g)) {
|
|
976
986
|
d.preventDefault();
|
|
977
987
|
return;
|
|
978
988
|
}
|
|
979
|
-
r.value =
|
|
980
|
-
},
|
|
989
|
+
r.value = v, d.dataTransfer && (d.dataTransfer.effectAllowed = "move", d.dataTransfer.setData("text/plain", g.prop)), document.body.style.cursor = "grabbing";
|
|
990
|
+
}, F = (d, v) => {
|
|
981
991
|
if (r.value === -1) return;
|
|
982
992
|
d.preventDefault();
|
|
983
|
-
const g = d.currentTarget.getBoundingClientRect(),
|
|
984
|
-
let L =
|
|
985
|
-
|
|
986
|
-
},
|
|
993
|
+
const g = d.currentTarget.getBoundingClientRect(), w = d.clientY, B = g.top + g.height / 2;
|
|
994
|
+
let L = v, ee = "before";
|
|
995
|
+
w < B ? (L = v, ee = "before") : (L = v + 1, ee = "after"), r.value < L && L--, j(L) ? (i.value = v, a.value = ee, d.dataTransfer.dropEffect = "move") : (i.value = -1, d.dataTransfer.dropEffect = "none");
|
|
996
|
+
}, N = () => {
|
|
987
997
|
setTimeout(() => {
|
|
988
998
|
r.value === -1 && (i.value = -1);
|
|
989
999
|
}, 50);
|
|
990
|
-
}, M = (d,
|
|
1000
|
+
}, M = (d, v) => {
|
|
991
1001
|
if (d.preventDefault(), r.value === -1 || i.value === -1) {
|
|
992
1002
|
R();
|
|
993
1003
|
return;
|
|
994
1004
|
}
|
|
995
|
-
const g = d.currentTarget.getBoundingClientRect(),
|
|
996
|
-
let L =
|
|
997
|
-
if (
|
|
1005
|
+
const g = d.currentTarget.getBoundingClientRect(), w = d.clientY, B = g.top + g.height / 2;
|
|
1006
|
+
let L = v;
|
|
1007
|
+
if (w >= B && (L = v + 1), r.value < L && L--, !j(L) || L === r.value) {
|
|
998
1008
|
R();
|
|
999
1009
|
return;
|
|
1000
1010
|
}
|
|
@@ -1004,131 +1014,131 @@ const ae = new Pn(), Dn = {
|
|
|
1004
1014
|
R();
|
|
1005
1015
|
}, R = () => {
|
|
1006
1016
|
r.value = -1, i.value = -1, a.value = "before", document.body.style.cursor = "";
|
|
1007
|
-
},
|
|
1008
|
-
const
|
|
1009
|
-
return r.value === d &&
|
|
1017
|
+
}, X = (d) => {
|
|
1018
|
+
const v = ["vt-columns-selector__panel-item"];
|
|
1019
|
+
return r.value === d && v.push("vt-columns-selector__panel-item--dragging"), i.value === d && a.value === "before" && v.push("vt-columns-selector__panel-item--drop-before"), i.value === d && a.value === "after" && v.push("vt-columns-selector__panel-item--drop-after"), v;
|
|
1010
1020
|
}, y = () => {
|
|
1011
1021
|
s.value = [...o.columns.map((d) => ({ ...d }))], o.columnsSelector.forEach((d) => {
|
|
1012
1022
|
d.name !== "removed" && l.value.add(d.name);
|
|
1013
1023
|
});
|
|
1014
|
-
}, E = (d,
|
|
1015
|
-
if (
|
|
1024
|
+
}, E = (d, v) => {
|
|
1025
|
+
if (v)
|
|
1016
1026
|
s.value.some((g) => g.prop === d.prop) || s.value.push({ ...d });
|
|
1017
1027
|
else {
|
|
1018
1028
|
if (k(d))
|
|
1019
1029
|
return;
|
|
1020
1030
|
s.value = s.value.filter((g) => g.prop !== d.prop);
|
|
1021
1031
|
}
|
|
1022
|
-
}, $ = (d,
|
|
1023
|
-
if (
|
|
1032
|
+
}, $ = (d, v) => {
|
|
1033
|
+
if (v)
|
|
1024
1034
|
d.columns.forEach((g) => {
|
|
1025
|
-
s.value.some((
|
|
1035
|
+
s.value.some((w) => w.prop === g.prop) || s.value.push({ ...g });
|
|
1026
1036
|
});
|
|
1027
1037
|
else {
|
|
1028
1038
|
const g = [];
|
|
1029
|
-
d.columns.forEach((
|
|
1030
|
-
const B = s.value.find((L) => L.prop ===
|
|
1039
|
+
d.columns.forEach((w) => {
|
|
1040
|
+
const B = s.value.find((L) => L.prop === w.prop);
|
|
1031
1041
|
B && !k(B) && g.push(B);
|
|
1032
1042
|
}), s.value = s.value.filter(
|
|
1033
|
-
(
|
|
1043
|
+
(w) => !g.some((B) => B.prop === w.prop)
|
|
1034
1044
|
);
|
|
1035
1045
|
}
|
|
1036
|
-
}, J = (d) => s.value.some((
|
|
1037
|
-
const
|
|
1038
|
-
return !
|
|
1046
|
+
}, J = (d) => s.value.some((v) => v.prop === d.prop), m = (d) => {
|
|
1047
|
+
const v = s.value.find((g) => g.prop === d.prop);
|
|
1048
|
+
return !v || !k(v);
|
|
1039
1049
|
}, A = (d) => {
|
|
1040
1050
|
l.value.has(d) ? l.value.delete(d) : l.value.add(d);
|
|
1041
1051
|
}, T = () => {
|
|
1042
1052
|
n("update-columns", [...s.value]), ae.close();
|
|
1043
|
-
},
|
|
1053
|
+
}, G = () => {
|
|
1044
1054
|
ae.close();
|
|
1045
1055
|
};
|
|
1046
|
-
return
|
|
1056
|
+
return he(() => {
|
|
1047
1057
|
y();
|
|
1048
|
-
}), (d,
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
(
|
|
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
|
-
onDragstart: (B) => Q(B,
|
|
1056
|
-
onDragover: (B) =>
|
|
1057
|
-
onDragleave:
|
|
1058
|
-
onDrop: (B) => M(B,
|
|
1065
|
+
onDragstart: (B) => Q(B, w),
|
|
1066
|
+
onDragover: (B) => F(B, w),
|
|
1067
|
+
onDragleave: N,
|
|
1068
|
+
onDrop: (B) => M(B, w),
|
|
1059
1069
|
onDragend: V
|
|
1060
1070
|
}, [
|
|
1061
|
-
|
|
1071
|
+
Z(Y, {
|
|
1062
1072
|
name: S(g) ? "columnsMove" : "freeze",
|
|
1063
1073
|
class: W(["vt-columns-selector__panel-item-icon", { "vt-columns-selector__panel-item-icon--draggable": S(g) }])
|
|
1064
1074
|
}, null, 8, ["name", "class"]),
|
|
1065
|
-
|
|
1075
|
+
Z(ue, {
|
|
1066
1076
|
label: g.label,
|
|
1067
1077
|
checked: !0,
|
|
1068
1078
|
disabled: k(g),
|
|
1069
1079
|
onChange: (B) => E(g, B),
|
|
1070
|
-
onClick:
|
|
1080
|
+
onClick: v[0] || (v[0] = pe(() => {
|
|
1071
1081
|
}, ["stop"]))
|
|
1072
1082
|
}, null, 8, ["label", "disabled", "onChange"]),
|
|
1073
|
-
k(g) ? (
|
|
1074
|
-
], 42,
|
|
1083
|
+
k(g) ? (p(), f("span", Fn, "pinned")) : H("", !0)
|
|
1084
|
+
], 42, Zn))), 128))
|
|
1075
1085
|
]),
|
|
1076
|
-
|
|
1077
|
-
(
|
|
1078
|
-
var
|
|
1079
|
-
return
|
|
1086
|
+
_("div", Un, [
|
|
1087
|
+
(p(!0), f(ne, null, oe(c.value, (g) => {
|
|
1088
|
+
var w, B;
|
|
1089
|
+
return p(), f("div", {
|
|
1080
1090
|
key: g.name,
|
|
1081
1091
|
class: "vt-columns-selector__group"
|
|
1082
1092
|
}, [
|
|
1083
|
-
|
|
1093
|
+
_("div", {
|
|
1084
1094
|
class: "vt-columns-selector__group-header",
|
|
1085
1095
|
onClick: (L) => A(g.name)
|
|
1086
1096
|
}, [
|
|
1087
|
-
|
|
1097
|
+
Z(ue, {
|
|
1088
1098
|
label: g.label,
|
|
1089
|
-
checked: ((
|
|
1099
|
+
checked: ((w = u.value[g.name]) == null ? void 0 : w.checked) || !1,
|
|
1090
1100
|
indeterminate: ((B = u.value[g.name]) == null ? void 0 : B.indeterminate) || !1,
|
|
1091
1101
|
onChange: (L) => $(g, L),
|
|
1092
|
-
onClick:
|
|
1102
|
+
onClick: v[1] || (v[1] = pe(() => {
|
|
1093
1103
|
}, ["stop"]))
|
|
1094
1104
|
}, null, 8, ["label", "checked", "indeterminate", "onChange"]),
|
|
1095
|
-
g.icon ? (
|
|
1105
|
+
g.icon ? (p(), re(Y, {
|
|
1096
1106
|
key: 0,
|
|
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) ? (
|
|
1102
|
-
(
|
|
1110
|
+
], 8, qn),
|
|
1111
|
+
l.value.has(g.name) ? (p(), f("div", Xn, [
|
|
1112
|
+
(p(!0), f(ne, null, oe(g.columns, (L) => (p(), f("div", {
|
|
1103
1113
|
key: L.prop,
|
|
1104
1114
|
class: "vt-columns-selector__group-column"
|
|
1105
1115
|
}, [
|
|
1106
|
-
|
|
1116
|
+
Z(ue, {
|
|
1107
1117
|
label: L.label,
|
|
1108
1118
|
checked: J(L),
|
|
1109
|
-
disabled: !
|
|
1119
|
+
disabled: !m(L),
|
|
1110
1120
|
onChange: (ee) => E(L, ee)
|
|
1111
1121
|
}, null, 8, ["label", "checked", "disabled", "onChange"]),
|
|
1112
|
-
|
|
1122
|
+
m(L) ? H("", !0) : (p(), f("span", Gn, " (закріплена) "))
|
|
1113
1123
|
]))), 128))
|
|
1114
1124
|
])) : H("", !0)
|
|
1115
1125
|
]);
|
|
1116
1126
|
}), 128))
|
|
1117
1127
|
])
|
|
1118
1128
|
]),
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
default: xe(() =>
|
|
1129
|
+
_("div", Kn, [
|
|
1130
|
+
Z(ge, { onClick: G }, {
|
|
1131
|
+
default: xe(() => v[2] || (v[2] = [
|
|
1122
1132
|
_e("Скасувати", -1)
|
|
1123
1133
|
])),
|
|
1124
1134
|
_: 1,
|
|
1125
1135
|
__: [2]
|
|
1126
1136
|
}),
|
|
1127
|
-
|
|
1137
|
+
Z(ge, {
|
|
1128
1138
|
type: "primary",
|
|
1129
1139
|
onClick: T
|
|
1130
1140
|
}, {
|
|
1131
|
-
default: xe(() =>
|
|
1141
|
+
default: xe(() => v[3] || (v[3] = [
|
|
1132
1142
|
_e("Зберегти", -1)
|
|
1133
1143
|
])),
|
|
1134
1144
|
_: 1,
|
|
@@ -1137,7 +1147,7 @@ const ae = new Pn(), Dn = {
|
|
|
1137
1147
|
])
|
|
1138
1148
|
]));
|
|
1139
1149
|
}
|
|
1140
|
-
}),
|
|
1150
|
+
}), Jn = /* @__PURE__ */ le({
|
|
1141
1151
|
__name: "ColumnActions",
|
|
1142
1152
|
props: {
|
|
1143
1153
|
column: {},
|
|
@@ -1150,49 +1160,49 @@ const ae = new Pn(), Dn = {
|
|
|
1150
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
|
-
const
|
|
1154
|
-
|
|
1163
|
+
const m = E.getBoundingClientRect();
|
|
1164
|
+
m.right > window.innerWidth && (E.style.left = `${window.innerWidth - $ - 8}px`), m.left < 0 && (E.style.left = "8px");
|
|
1155
1165
|
}, k = (y) => {
|
|
1156
|
-
y.stopPropagation(), !a.value && (i.value ?
|
|
1166
|
+
y.stopPropagation(), !a.value && (i.value ? q() : S());
|
|
1157
1167
|
}, S = () => {
|
|
1158
1168
|
a.value || (i.value = !0, c(), r.value && (r.value.style.zIndex = "22"));
|
|
1159
|
-
},
|
|
1169
|
+
}, q = () => {
|
|
1160
1170
|
a.value = !0, i.value = !1, r.value && r.value.style.removeProperty("z-index"), setTimeout(() => {
|
|
1161
1171
|
a.value = !1;
|
|
1162
1172
|
}, 100);
|
|
1163
|
-
},
|
|
1173
|
+
}, j = (y) => {
|
|
1164
1174
|
var E, $;
|
|
1165
|
-
!((E = l.value) != null && E.contains(y.target)) && !(($ = s.value) != null && $.contains(y.target)) &&
|
|
1175
|
+
!((E = l.value) != null && E.contains(y.target)) && !(($ = s.value) != null && $.contains(y.target)) && q();
|
|
1166
1176
|
}, Q = () => {
|
|
1167
|
-
|
|
1168
|
-
},
|
|
1177
|
+
X() ? (n("pin", o.column, "none"), console.log(`Колонка "${o.column.label}" відкріплена`)) : (n("pin", o.column, "left"), console.log(`Колонка "${o.column.label}" прикріплена зліва`)), q();
|
|
1178
|
+
}, F = (y) => ({
|
|
1169
1179
|
name: "removed",
|
|
1170
1180
|
label: "Видалені колонки",
|
|
1171
1181
|
order: 999,
|
|
1172
1182
|
// Найвищий порядок, щоб відображались останніми
|
|
1173
1183
|
columns: y
|
|
1174
|
-
}),
|
|
1184
|
+
}), N = (y) => {
|
|
1175
1185
|
var A;
|
|
1176
1186
|
const E = new Set(y.map((T) => T.prop)), $ = /* @__PURE__ */ new Set();
|
|
1177
1187
|
(A = o.columnsSelector) == null || A.forEach((T) => {
|
|
1178
|
-
T.columns.forEach((
|
|
1188
|
+
T.columns.forEach((G) => $.add(G.prop));
|
|
1179
1189
|
}), o.allColumns.forEach((T) => $.add(T.prop));
|
|
1180
1190
|
const J = [];
|
|
1181
1191
|
$.forEach((T) => {
|
|
1182
|
-
var
|
|
1192
|
+
var G;
|
|
1183
1193
|
if (!E.has(T)) {
|
|
1184
1194
|
let d;
|
|
1185
|
-
(
|
|
1186
|
-
const g =
|
|
1195
|
+
(G = o.columnsSelector) == null || G.forEach((v) => {
|
|
1196
|
+
const g = v.columns.find((w) => w.prop === T);
|
|
1187
1197
|
g && (d = g);
|
|
1188
|
-
}), d || (d = o.allColumns.find((
|
|
1198
|
+
}), d || (d = o.allColumns.find((v) => v.prop === T)), d && J.push(d);
|
|
1189
1199
|
}
|
|
1190
1200
|
});
|
|
1191
|
-
const
|
|
1192
|
-
J.length > 0 &&
|
|
1201
|
+
const m = [...o.columnsSelector || []];
|
|
1202
|
+
J.length > 0 && m.push(F(J)), u.value = m;
|
|
1193
1203
|
}, M = () => {
|
|
1194
|
-
|
|
1195
|
-
component:
|
|
1204
|
+
N(o.allColumns), ae.open({
|
|
1205
|
+
component: Yn,
|
|
1196
1206
|
title: "Управління колонками таблиці",
|
|
1197
1207
|
props: {
|
|
1198
1208
|
columns: o.allColumns,
|
|
@@ -1200,53 +1210,53 @@ const ae = new Pn(), Dn = {
|
|
|
1200
1210
|
columnsSelector: u.value,
|
|
1201
1211
|
// Передаємо оновлені доступні колонки
|
|
1202
1212
|
"onUpdate-columns": (y) => {
|
|
1203
|
-
console.log("ColumnActions отримав оновлені колонки:", y), n("update-columns", y),
|
|
1213
|
+
console.log("ColumnActions отримав оновлені колонки:", y), n("update-columns", y), N(y);
|
|
1204
1214
|
}
|
|
1205
1215
|
},
|
|
1206
1216
|
size: "large",
|
|
1207
1217
|
closeOnBackdropClick: !1
|
|
1208
|
-
}),
|
|
1209
|
-
}, V = () => o.column.pinnedLeft, R = () => o.column.pinnedRight,
|
|
1210
|
-
return
|
|
1211
|
-
document.addEventListener("click",
|
|
1218
|
+
}), q();
|
|
1219
|
+
}, V = () => o.column.pinnedLeft, R = () => o.column.pinnedRight, X = () => V() || R();
|
|
1220
|
+
return he(() => {
|
|
1221
|
+
document.addEventListener("click", j), l.value && (r.value = l.value.closest("th")), N(o.allColumns);
|
|
1212
1222
|
}), $e(() => {
|
|
1213
|
-
document.removeEventListener("click",
|
|
1214
|
-
}), (y, E) => (
|
|
1223
|
+
document.removeEventListener("click", j);
|
|
1224
|
+
}), (y, E) => (p(), f("div", {
|
|
1215
1225
|
ref_key: "triggerRef",
|
|
1216
1226
|
ref: l,
|
|
1217
1227
|
class: "vt-table-header-actions",
|
|
1218
1228
|
onClick: k
|
|
1219
1229
|
}, [
|
|
1220
|
-
|
|
1221
|
-
i.value ? (
|
|
1230
|
+
Z(Y, { name: "listBullet" }),
|
|
1231
|
+
i.value ? (p(), f("ul", {
|
|
1222
1232
|
key: 0,
|
|
1223
1233
|
ref_key: "menuRef",
|
|
1224
1234
|
ref: s,
|
|
1225
1235
|
class: W(["dropdown-menu", "vt-table-dropdown", { visible: i.value }])
|
|
1226
1236
|
}, [
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
name:
|
|
1237
|
+
_("li", { onClick: Q }, [
|
|
1238
|
+
Z(Y, {
|
|
1239
|
+
name: X() ? "unfreeze" : "freeze"
|
|
1230
1240
|
}, null, 8, ["name"]),
|
|
1231
|
-
|
|
1241
|
+
_("span", null, te(X() ? "Розморозити" : "Заморозити"), 1)
|
|
1232
1242
|
]),
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
E[0] || (E[0] =
|
|
1243
|
+
_("li", { onClick: M }, [
|
|
1244
|
+
Z(Y, { name: "columnInsert" }),
|
|
1245
|
+
E[0] || (E[0] = _("span", null, "Колонки", -1))
|
|
1236
1246
|
])
|
|
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
1261
|
props: /* @__PURE__ */ Te({
|
|
1252
1262
|
data: {},
|
|
@@ -1268,25 +1278,25 @@ const ae = new Pn(), Dn = {
|
|
|
1268
1278
|
}),
|
|
1269
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 = 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),
|
|
1272
|
-
let
|
|
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), q = D(0);
|
|
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);
|
|
1275
1285
|
};
|
|
1276
|
-
|
|
1286
|
+
me(
|
|
1277
1287
|
() => s.value,
|
|
1278
1288
|
(h) => {
|
|
1279
1289
|
h && c.value && a.splice(0, a.length, ...h);
|
|
1280
1290
|
},
|
|
1281
1291
|
{ deep: !0 }
|
|
1282
|
-
),
|
|
1292
|
+
), me(
|
|
1283
1293
|
() => n.columns,
|
|
1284
1294
|
(h) => {
|
|
1285
1295
|
h && !c.value && a.splice(0, a.length, ...h);
|
|
1286
1296
|
},
|
|
1287
1297
|
{ deep: !0 }
|
|
1288
1298
|
), ut("vt-table-columns", a);
|
|
1289
|
-
const { sortedColumns:
|
|
1299
|
+
const { sortedColumns: F, getDefaultColumnWidth: N, getStickyOffset: M } = Rn(a), { getTableWrapperStyle: V, getColumnStyle: R, 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 ? En(n, $, l, J) : null, A = () => ({
|
|
1290
1300
|
width: `${ye}px`,
|
|
1291
1301
|
minWidth: `${ye}px`,
|
|
1292
1302
|
maxWidth: `${ye}px`,
|
|
@@ -1301,7 +1311,7 @@ const ae = new Pn(), Dn = {
|
|
|
1301
1311
|
zIndex: 11
|
|
1302
1312
|
// Вищий z-index для header
|
|
1303
1313
|
} : h;
|
|
1304
|
-
},
|
|
1314
|
+
}, G = () => {
|
|
1305
1315
|
const h = A();
|
|
1306
1316
|
return n.maxHeight ? {
|
|
1307
1317
|
...h,
|
|
@@ -1312,22 +1322,22 @@ const ae = new Pn(), Dn = {
|
|
|
1312
1322
|
}, d = () => {
|
|
1313
1323
|
if (!i.value || S.value) return;
|
|
1314
1324
|
const h = i.value, C = h.scrollTop, I = h.scrollHeight, z = h.clientHeight, P = 30;
|
|
1315
|
-
|
|
1316
|
-
const
|
|
1317
|
-
|
|
1325
|
+
j && clearTimeout(j), j = setTimeout(() => {
|
|
1326
|
+
const ve = C - q.value > 1, b = I - C - z <= P, ce = I - C - z <= 5;
|
|
1327
|
+
q.value = C, ve && (b || ce) && (S.value = !0, l("infinity-scroll"), setTimeout(() => {
|
|
1318
1328
|
S.value = !1;
|
|
1319
1329
|
}, 1e3));
|
|
1320
1330
|
}, 50);
|
|
1321
|
-
},
|
|
1331
|
+
}, v = () => {
|
|
1322
1332
|
S.value = !1;
|
|
1323
1333
|
};
|
|
1324
|
-
|
|
1334
|
+
he(() => {
|
|
1325
1335
|
i.value && i.value.addEventListener("scroll", d);
|
|
1326
1336
|
}), $e(() => {
|
|
1327
|
-
|
|
1337
|
+
j && clearTimeout(j), i.value && i.value.removeEventListener("scroll", d);
|
|
1328
1338
|
});
|
|
1329
1339
|
const g = (h, C) => {
|
|
1330
|
-
|
|
1340
|
+
Hn(h, C, (I) => {
|
|
1331
1341
|
var z, P;
|
|
1332
1342
|
((z = u.value) == null ? void 0 : z.prop) === h.prop && u.value.direction === C ? u.value = null : u.value = I, l("sort-change", {
|
|
1333
1343
|
column: h,
|
|
@@ -1336,7 +1346,7 @@ const ae = new Pn(), Dn = {
|
|
|
1336
1346
|
sortedData: $.value
|
|
1337
1347
|
});
|
|
1338
1348
|
});
|
|
1339
|
-
},
|
|
1349
|
+
}, w = (h, C) => {
|
|
1340
1350
|
const I = {
|
|
1341
1351
|
pinnedLeft: C === "left",
|
|
1342
1352
|
pinnedRight: C === "right"
|
|
@@ -1363,27 +1373,27 @@ const ae = new Pn(), Dn = {
|
|
|
1363
1373
|
a.map((z) => z.prop)
|
|
1364
1374
|
);
|
|
1365
1375
|
}, ee = (h, C, I) => {
|
|
1366
|
-
l("row-click", { row: h, column: C, event: I }), n.highlightCurrentRow &&
|
|
1376
|
+
l("row-click", { row: h, column: C, event: I }), n.highlightCurrentRow && m && m.setCurrentRow(h);
|
|
1367
1377
|
}, Ce = (h, C, I) => {
|
|
1368
|
-
I.stopPropagation(),
|
|
1369
|
-
},
|
|
1370
|
-
C.stopPropagation(),
|
|
1378
|
+
I.stopPropagation(), m && m.toggleRowSelection(C, h);
|
|
1379
|
+
}, Fe = (h, C) => {
|
|
1380
|
+
C.stopPropagation(), m && m.toggleAllSelection();
|
|
1371
1381
|
}, Le = (h, C) => {
|
|
1372
1382
|
h && (r.value[C] = h);
|
|
1373
1383
|
}, Ie = (h, C) => {
|
|
1374
|
-
const I = C.width ||
|
|
1375
|
-
E(h, C,
|
|
1384
|
+
const I = C.width || N();
|
|
1385
|
+
E(h, C, N, (z) => {
|
|
1376
1386
|
L(C.prop, { width: z }), l("column-resize", {
|
|
1377
1387
|
column: { ...C, width: z },
|
|
1378
1388
|
width: z,
|
|
1379
1389
|
oldWidth: I
|
|
1380
1390
|
});
|
|
1381
1391
|
});
|
|
1382
|
-
},
|
|
1392
|
+
}, Ue = (h, C) => R(h, C, M, N), qe = (h, C) => X(h, C, M, N), Xe = (h, C) => y(h, C, M, N), Ge = (h, C) => {
|
|
1383
1393
|
if (!C || !C.prop) return "";
|
|
1384
1394
|
const I = h[C.prop];
|
|
1385
1395
|
return I == null ? "" : String(I);
|
|
1386
|
-
},
|
|
1396
|
+
}, Ke = x(() => {
|
|
1387
1397
|
if (!n.showSummary || !k.value) return {};
|
|
1388
1398
|
const h = a;
|
|
1389
1399
|
if (typeof n.summaryMethod == "function") {
|
|
@@ -1400,43 +1410,42 @@ const ae = new Pn(), Dn = {
|
|
|
1400
1410
|
},
|
|
1401
1411
|
{}
|
|
1402
1412
|
);
|
|
1403
|
-
}),
|
|
1404
|
-
|
|
1405
|
-
}, Je = () => {
|
|
1406
|
-
p && p.toggleAllSelection();
|
|
1413
|
+
}), Ye = x(() => n.showSummary && k.value), Je = (h, C) => {
|
|
1414
|
+
m && m.toggleRowSelection(h, C);
|
|
1407
1415
|
}, Qe = () => {
|
|
1408
|
-
|
|
1416
|
+
m && m.toggleAllSelection();
|
|
1409
1417
|
}, et = () => {
|
|
1410
|
-
|
|
1411
|
-
}, tt = () =>
|
|
1412
|
-
|
|
1418
|
+
m && m.selectAbsolutelyAll();
|
|
1419
|
+
}, tt = () => {
|
|
1420
|
+
m && m.clearSelection();
|
|
1421
|
+
}, nt = () => m ? m.getSelectionRows() : [], ot = (h) => {
|
|
1422
|
+
m && m.setSelectionRows(h);
|
|
1413
1423
|
};
|
|
1414
|
-
return
|
|
1424
|
+
return he(() => {
|
|
1415
1425
|
Q();
|
|
1416
1426
|
}), t({
|
|
1417
|
-
toggleRowSelection:
|
|
1418
|
-
toggleAllSelection:
|
|
1419
|
-
selectAbsolutelyAll:
|
|
1420
|
-
clearSelection:
|
|
1421
|
-
getSelectionRows:
|
|
1422
|
-
setSelectionRows:
|
|
1423
|
-
resetInfinityScroll:
|
|
1427
|
+
toggleRowSelection: Je,
|
|
1428
|
+
toggleAllSelection: Qe,
|
|
1429
|
+
selectAbsolutelyAll: et,
|
|
1430
|
+
clearSelection: tt,
|
|
1431
|
+
getSelectionRows: nt,
|
|
1432
|
+
setSelectionRows: ot,
|
|
1433
|
+
resetInfinityScroll: v
|
|
1424
1434
|
// Додаємо метод для скидання infinity scroll
|
|
1425
1435
|
}), (h, C) => {
|
|
1426
|
-
var z, P, de,
|
|
1427
|
-
const I =
|
|
1428
|
-
return
|
|
1436
|
+
var z, P, de, ve;
|
|
1437
|
+
const I = je("tooltip");
|
|
1438
|
+
return p(), f("div", {
|
|
1429
1439
|
ref_key: "tableWrapperRef",
|
|
1430
1440
|
ref: i,
|
|
1431
1441
|
class: "vt-table-wrapper",
|
|
1432
|
-
style: ie(
|
|
1442
|
+
style: ie(U(V)()),
|
|
1433
1443
|
onScroll: d
|
|
1434
1444
|
}, [
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
n.selectable ? (m(), _("th", {
|
|
1445
|
+
_("table", Qn, [
|
|
1446
|
+
_("thead", null, [
|
|
1447
|
+
_("tr", null, [
|
|
1448
|
+
n.selectable ? (p(), f("th", {
|
|
1440
1449
|
key: 0,
|
|
1441
1450
|
class: W(["vt-table__th vt-table__th--selection", {
|
|
1442
1451
|
"vt-table__th--sticky": n.maxHeight,
|
|
@@ -1444,153 +1453,153 @@ const ae = new Pn(), Dn = {
|
|
|
1444
1453
|
}]),
|
|
1445
1454
|
style: ie(T())
|
|
1446
1455
|
}, [
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
checked: (z =
|
|
1450
|
-
indeterminate: (P =
|
|
1451
|
-
"is-double": (
|
|
1452
|
-
onChange:
|
|
1456
|
+
_("div", eo, [
|
|
1457
|
+
Z(ue, {
|
|
1458
|
+
checked: (z = U(m)) == null ? void 0 : z.isAllSelected.value,
|
|
1459
|
+
indeterminate: (P = U(m)) == null ? void 0 : P.isIndeterminate.value,
|
|
1460
|
+
"is-double": (ve = (de = U(m)) == null ? void 0 : de.isDoubleCheck) == null ? void 0 : ve.value,
|
|
1461
|
+
onChange: Fe
|
|
1453
1462
|
}, null, 8, ["checked", "indeterminate", "is-double"])
|
|
1454
1463
|
])
|
|
1455
1464
|
], 6)) : H("", !0),
|
|
1456
|
-
(
|
|
1457
|
-
key:
|
|
1465
|
+
(p(!0), f(ne, null, oe(U(F), (b, ce) => (p(), f("th", {
|
|
1466
|
+
key: b.prop,
|
|
1458
1467
|
ref_for: !0,
|
|
1459
|
-
ref: (se) => Le(se,
|
|
1460
|
-
style: ie(
|
|
1468
|
+
ref: (se) => Le(se, b.prop),
|
|
1469
|
+
style: ie(qe(b, ce)),
|
|
1461
1470
|
class: W([
|
|
1462
1471
|
"vt-table__th",
|
|
1463
1472
|
{
|
|
1464
1473
|
"vt-table__th--sticky": n.maxHeight,
|
|
1465
|
-
"vt-table__th--pinned-left":
|
|
1466
|
-
"vt-table__th--pinned-right":
|
|
1467
|
-
"vt-table__th--sortable":
|
|
1474
|
+
"vt-table__th--pinned-left": b.pinnedLeft,
|
|
1475
|
+
"vt-table__th--pinned-right": b.pinnedRight,
|
|
1476
|
+
"vt-table__th--sortable": b.sortable
|
|
1468
1477
|
}
|
|
1469
1478
|
])
|
|
1470
1479
|
}, [
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1480
|
+
_("div", to, [
|
|
1481
|
+
_("div", no, te(b.label), 1),
|
|
1482
|
+
b.sortable ? (p(), f("div", oo, [
|
|
1483
|
+
Z(Y, {
|
|
1475
1484
|
name: "arrowTop",
|
|
1476
|
-
class: W(
|
|
1477
|
-
onClick:
|
|
1485
|
+
class: W(U(Ee)(b, u.value).asc),
|
|
1486
|
+
onClick: pe((se) => g(b, "asc"), ["stop"])
|
|
1478
1487
|
}, null, 8, ["class", "onClick"]),
|
|
1479
|
-
|
|
1488
|
+
Z(Y, {
|
|
1480
1489
|
name: "arrowDown",
|
|
1481
|
-
class: W(
|
|
1482
|
-
onClick:
|
|
1490
|
+
class: W(U(Ee)(b, u.value).desc),
|
|
1491
|
+
onClick: pe((se) => g(b, "desc"), ["stop"])
|
|
1483
1492
|
}, null, 8, ["class", "onClick"])
|
|
1484
1493
|
])) : H("", !0),
|
|
1485
|
-
|
|
1494
|
+
b.actionColumn ? (p(), re(Jn, {
|
|
1486
1495
|
key: 1,
|
|
1487
|
-
column:
|
|
1488
|
-
"all-columns":
|
|
1496
|
+
column: b,
|
|
1497
|
+
"all-columns": U(F),
|
|
1489
1498
|
columnsSelector: n.columnsSelector,
|
|
1490
|
-
onPin:
|
|
1499
|
+
onPin: w,
|
|
1491
1500
|
onUpdateColumns: B
|
|
1492
1501
|
}, null, 8, ["column", "all-columns", "columnsSelector"])) : H("", !0)
|
|
1493
1502
|
]),
|
|
1494
|
-
|
|
1503
|
+
_("div", {
|
|
1495
1504
|
class: "vt-table__resizer",
|
|
1496
|
-
"data-resizer":
|
|
1497
|
-
onMousedown: (se) => Ie(se,
|
|
1498
|
-
}, null, 40,
|
|
1505
|
+
"data-resizer": b.prop,
|
|
1506
|
+
onMousedown: (se) => Ie(se, b)
|
|
1507
|
+
}, null, 40, lo)
|
|
1499
1508
|
], 6))), 128))
|
|
1500
1509
|
])
|
|
1501
1510
|
]),
|
|
1502
|
-
|
|
1503
|
-
k.value ? (
|
|
1511
|
+
_("tbody", null, [
|
|
1512
|
+
k.value ? (p(!0), f(ne, { key: 1 }, oe($.value, (b, ce) => {
|
|
1504
1513
|
var se, Be, Re;
|
|
1505
|
-
return
|
|
1506
|
-
key:
|
|
1514
|
+
return p(), f("tr", {
|
|
1515
|
+
key: b.id,
|
|
1507
1516
|
class: W([
|
|
1508
1517
|
"vt-table__row",
|
|
1509
1518
|
{
|
|
1510
|
-
"vt-table__row--selected": (se =
|
|
1511
|
-
"vt-table__row--current": ((Be =
|
|
1519
|
+
"vt-table__row--selected": (se = U(m)) == null ? void 0 : se.isRowSelected(b),
|
|
1520
|
+
"vt-table__row--current": ((Be = U(m)) == null ? void 0 : Be.currentRow.value) === b,
|
|
1512
1521
|
"vt-table__row--clickable": n.selectOnClickRow || n.highlightCurrentRow
|
|
1513
1522
|
}
|
|
1514
1523
|
]),
|
|
1515
|
-
onClick: (
|
|
1524
|
+
onClick: (O) => ee(b, U(F)[0], O)
|
|
1516
1525
|
}, [
|
|
1517
|
-
n.selectable ? (
|
|
1526
|
+
n.selectable ? (p(), f("td", {
|
|
1518
1527
|
key: 0,
|
|
1519
1528
|
class: W(["vt-table__td vt-table__td--selection", {
|
|
1520
1529
|
"vt-table__td--pinned-left": !0
|
|
1521
1530
|
}]),
|
|
1522
1531
|
style: ie(A())
|
|
1523
1532
|
}, [
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
checked: (Re =
|
|
1527
|
-
onChange: (
|
|
1533
|
+
_("div", co, [
|
|
1534
|
+
Z(ue, {
|
|
1535
|
+
checked: (Re = U(m)) == null ? void 0 : Re.isRowSelected(b),
|
|
1536
|
+
onChange: (O, be) => Ce(O, b, be)
|
|
1528
1537
|
}, null, 8, ["checked", "onChange"])
|
|
1529
1538
|
])
|
|
1530
1539
|
], 4)) : H("", !0),
|
|
1531
|
-
(
|
|
1532
|
-
key:
|
|
1540
|
+
(p(!0), f(ne, null, oe(U(F), (O, be) => (p(), f("td", {
|
|
1541
|
+
key: O.prop,
|
|
1533
1542
|
ref_for: !0,
|
|
1534
|
-
ref: (we) => Le(we,
|
|
1535
|
-
style: ie(
|
|
1543
|
+
ref: (we) => Le(we, O.prop),
|
|
1544
|
+
style: ie(Ue(O, be)),
|
|
1536
1545
|
class: W([
|
|
1537
1546
|
"vt-table__td",
|
|
1538
1547
|
{
|
|
1539
|
-
"vt-table__td--pinned-left":
|
|
1540
|
-
"vt-table__td--pinned-right":
|
|
1548
|
+
"vt-table__td--pinned-left": O.pinnedLeft,
|
|
1549
|
+
"vt-table__td--pinned-right": O.pinnedRight
|
|
1541
1550
|
}
|
|
1542
1551
|
])
|
|
1543
1552
|
}, [
|
|
1544
|
-
Me((
|
|
1545
|
-
|
|
1553
|
+
Me((p(), f("div", uo, [
|
|
1554
|
+
O.renderSlot ? (p(), re(Ae(() => U(Wn)(O.renderSlot, { row: b, column: O, value: b[O.prop], index: ce })), { key: 0 })) : (p(), f("span", po, te(b[O.prop]), 1))
|
|
1546
1555
|
])), [
|
|
1547
|
-
[I,
|
|
1556
|
+
[I, O.showOverflowTooltip ? Ge(b, O) : null]
|
|
1548
1557
|
]),
|
|
1549
|
-
|
|
1558
|
+
_("div", {
|
|
1550
1559
|
class: "vt-table__resizer",
|
|
1551
|
-
"data-resizer":
|
|
1552
|
-
onMousedown: (we) => Ie(we,
|
|
1553
|
-
}, null, 40,
|
|
1560
|
+
"data-resizer": O.prop,
|
|
1561
|
+
onMousedown: (we) => Ie(we, O)
|
|
1562
|
+
}, null, 40, mo)
|
|
1554
1563
|
], 6))), 128))
|
|
1555
|
-
], 10,
|
|
1556
|
-
}), 128)) : (
|
|
1557
|
-
|
|
1558
|
-
colspan:
|
|
1564
|
+
], 10, ro);
|
|
1565
|
+
}), 128)) : (p(), f("tr", so, [
|
|
1566
|
+
_("td", {
|
|
1567
|
+
colspan: U(F).length + (n.selectable ? 1 : 0),
|
|
1559
1568
|
class: "vt-table__empty-cell"
|
|
1560
1569
|
}, [
|
|
1561
|
-
|
|
1562
|
-
|
|
1570
|
+
_("div", ao, [
|
|
1571
|
+
Z(Y, {
|
|
1563
1572
|
name: "empty",
|
|
1564
1573
|
class: "vt-table__empty-icon"
|
|
1565
1574
|
}),
|
|
1566
|
-
C[0] || (C[0] =
|
|
1575
|
+
C[0] || (C[0] = _("span", { class: "vt-table__empty-text" }, "Немає даних!", -1))
|
|
1567
1576
|
])
|
|
1568
|
-
], 8,
|
|
1577
|
+
], 8, io)
|
|
1569
1578
|
]))
|
|
1570
1579
|
]),
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
n.selectable ? (
|
|
1580
|
+
Ye.value ? (p(), f("tfoot", ho, [
|
|
1581
|
+
_("tr", null, [
|
|
1582
|
+
n.selectable ? (p(), f("td", {
|
|
1574
1583
|
key: 0,
|
|
1575
1584
|
class: W(["vt-table__td", {
|
|
1576
1585
|
"vt-table__td--pinned-left": !0
|
|
1577
1586
|
}]),
|
|
1578
|
-
style: ie(
|
|
1587
|
+
style: ie(G())
|
|
1579
1588
|
}, C[1] || (C[1] = [
|
|
1580
|
-
|
|
1589
|
+
_("div", { class: "vt-table__cell-content vt-table__cell-content--summary" }, null, -1)
|
|
1581
1590
|
]), 4)) : H("", !0),
|
|
1582
|
-
(
|
|
1583
|
-
key:
|
|
1584
|
-
style: ie(
|
|
1591
|
+
(p(!0), f(ne, null, oe(U(F), (b, ce) => (p(), f("td", {
|
|
1592
|
+
key: b.prop,
|
|
1593
|
+
style: ie(Xe(b, ce)),
|
|
1585
1594
|
class: W([
|
|
1586
1595
|
"vt-table__td",
|
|
1587
1596
|
{
|
|
1588
|
-
"vt-table__td--pinned-left":
|
|
1589
|
-
"vt-table__td--pinned-right":
|
|
1597
|
+
"vt-table__td--pinned-left": b.pinnedLeft,
|
|
1598
|
+
"vt-table__td--pinned-right": b.pinnedRight
|
|
1590
1599
|
}
|
|
1591
1600
|
])
|
|
1592
1601
|
}, [
|
|
1593
|
-
|
|
1602
|
+
_("div", vo, te(Ke.value[b.prop]), 1)
|
|
1594
1603
|
], 6))), 128))
|
|
1595
1604
|
])
|
|
1596
1605
|
])) : H("", !0)
|
|
@@ -1598,7 +1607,7 @@ const ae = new Pn(), Dn = {
|
|
|
1598
1607
|
], 36);
|
|
1599
1608
|
};
|
|
1600
1609
|
}
|
|
1601
|
-
}),
|
|
1610
|
+
}), _o = /* @__PURE__ */ le({
|
|
1602
1611
|
__name: "VTableColumn",
|
|
1603
1612
|
props: {
|
|
1604
1613
|
prop: {},
|
|
@@ -1616,7 +1625,7 @@ const ae = new Pn(), Dn = {
|
|
|
1616
1625
|
sortMethod: {}
|
|
1617
1626
|
},
|
|
1618
1627
|
setup(e) {
|
|
1619
|
-
const t = e, o =
|
|
1628
|
+
const t = e, o = Oe(), n = dt("vt-table-columns");
|
|
1620
1629
|
n || console.error(
|
|
1621
1630
|
"VTableColumn: не знайдено контекст таблиці. Переконайтеся, що компонент використовується всередині VTable."
|
|
1622
1631
|
);
|
|
@@ -1636,12 +1645,12 @@ const ae = new Pn(), Dn = {
|
|
|
1636
1645
|
renderSlot: o[t.prop] ?? o.default ?? o.slot
|
|
1637
1646
|
});
|
|
1638
1647
|
let l = -1;
|
|
1639
|
-
return
|
|
1648
|
+
return he(() => {
|
|
1640
1649
|
if (n) {
|
|
1641
1650
|
const r = s();
|
|
1642
1651
|
n.push(r), l = n.length - 1;
|
|
1643
1652
|
}
|
|
1644
|
-
}),
|
|
1653
|
+
}), me(
|
|
1645
1654
|
() => [
|
|
1646
1655
|
t.width,
|
|
1647
1656
|
t.minWidth,
|
|
@@ -1766,7 +1775,7 @@ const ae = new Pn(), Dn = {
|
|
|
1766
1775
|
});
|
|
1767
1776
|
}, He = (e) => {
|
|
1768
1777
|
e.style.opacity = "0", e.style.visibility = "hidden";
|
|
1769
|
-
}, Pe = (e) => e.scrollWidth > e.clientWidth || e.scrollHeight > e.clientHeight, De = (e) => !!e.closest(".vt-table, table"),
|
|
1778
|
+
}, Pe = (e) => e.scrollWidth > e.clientWidth || e.scrollHeight > e.clientHeight, De = (e) => !!e.closest(".vt-table, table"), go = {
|
|
1770
1779
|
mounted(e, t) {
|
|
1771
1780
|
var a;
|
|
1772
1781
|
const o = (a = t.value) == null ? void 0 : a.trim();
|
|
@@ -1803,24 +1812,24 @@ const ae = new Pn(), Dn = {
|
|
|
1803
1812
|
beforeUnmount(e) {
|
|
1804
1813
|
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);
|
|
1805
1814
|
}
|
|
1806
|
-
},
|
|
1815
|
+
}, Co = {
|
|
1807
1816
|
install(e, t = {}) {
|
|
1808
1817
|
const { prefix: o = "V", modal: n = !0 } = t;
|
|
1809
|
-
e.component(`${o}Button`, ge), e.component(`${o}Icon`, Y), e.component(`${o}Loader`,
|
|
1818
|
+
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`, ue), e.component(`${o}Table`, fo), e.component(`${o}TableColumn`, _o), e.directive("tooltip", go), n && e.use(An);
|
|
1810
1819
|
}
|
|
1811
|
-
},
|
|
1820
|
+
}, wo = Co.install;
|
|
1812
1821
|
export {
|
|
1813
1822
|
ge as VButton,
|
|
1814
1823
|
ue as VCheckbox,
|
|
1815
1824
|
Y as VIcon,
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1825
|
+
Ne as VLoader,
|
|
1826
|
+
Ze as VModal,
|
|
1827
|
+
An as VModalPlugin,
|
|
1819
1828
|
Ln as VPagination,
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1829
|
+
fo as VTable,
|
|
1830
|
+
_o as VTableColumn,
|
|
1831
|
+
Co as default,
|
|
1832
|
+
wo as install,
|
|
1824
1833
|
ae as modalManager,
|
|
1825
|
-
|
|
1834
|
+
go as tooltipDirective
|
|
1826
1835
|
};
|