voiptime-components 0.0.13 → 0.0.14

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.es.js CHANGED
@@ -1,19 +1,19 @@
1
- import { createElementBlock as h, openBlock as p, createElementVNode as f, defineComponent as oe, computed as S, createBlock as ie, createCommentVNode as V, resolveDynamicComponent as Ie, useSlots as Re, resolveDirective as Be, withDirectives as be, normalizeClass as E, renderSlot as re, Teleport as Ne, normalizeStyle as le, withModifiers as ce, toDisplayString as Q, watch as ue, Fragment as te, renderList as ne, vModelSelect as Ze, createVNode as j, withCtx as ge, createTextVNode as de, ref as P, createApp as Fe, h as fe, onMounted as me, onUnmounted as Te, nextTick as Ue, mergeModels as we, useModel as qe, reactive as Xe, provide as Ge, unref as U, inject as Ke } from "vue";
2
- const X = (e, t) => {
3
- const n = e.__vccOpts || e;
4
- for (const [o, l] of t)
5
- n[o] = l;
6
- return n;
7
- }, Ye = {}, Je = {
1
+ import { createElementBlock as f, openBlock as p, createElementVNode as _, defineComponent as se, computed as x, createBlock as ce, createCommentVNode as H, resolveDynamicComponent as De, useSlots as Ae, resolveDirective as Oe, withDirectives as Me, normalizeClass as W, renderSlot as me, Teleport as ot, normalizeStyle as ae, withModifiers as he, toDisplayString as te, watch as ve, Fragment as oe, renderList as le, vModelSelect as lt, createVNode as Z, withCtx as xe, createTextVNode as _e, ref as D, createApp as st, h as ke, onMounted as fe, onUnmounted as $e, nextTick as it, mergeModels as Re, useModel as at, reactive as rt, provide as ct, unref as X, inject as ut } from "vue";
2
+ const K = (e, t) => {
3
+ const o = e.__vccOpts || e;
4
+ for (const [n, s] of t)
5
+ o[n] = s;
6
+ return o;
7
+ }, dt = {}, pt = {
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 Qe(e, t) {
15
- return p(), h("svg", Je, t[0] || (t[0] = [
16
- f("path", {
14
+ function mt(e, t) {
15
+ return p(), f("svg", pt, t[0] || (t[0] = [
16
+ _("path", {
17
17
  d: "M14 8L10 12L6 8",
18
18
  stroke: "currentColor",
19
19
  "stroke-width": "1.5",
@@ -22,16 +22,16 @@ function Qe(e, t) {
22
22
  }, null, -1)
23
23
  ]));
24
24
  }
25
- const et = /* @__PURE__ */ X(Ye, [["render", Qe]]), tt = {}, nt = {
25
+ const ht = /* @__PURE__ */ K(dt, [["render", mt]]), vt = {}, ft = {
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 ot(e, t) {
33
- return p(), h("svg", nt, t[0] || (t[0] = [
34
- f("path", {
32
+ function _t(e, t) {
33
+ return p(), f("svg", ft, t[0] || (t[0] = [
34
+ _("path", {
35
35
  d: "M6 12L10 8L14 12",
36
36
  stroke: "currentColor",
37
37
  "stroke-width": "1.5",
@@ -40,38 +40,38 @@ function ot(e, t) {
40
40
  }, null, -1)
41
41
  ]));
42
42
  }
43
- const lt = /* @__PURE__ */ X(tt, [["render", ot]]), st = {}, it = {
43
+ const gt = /* @__PURE__ */ K(vt, [["render", _t]]), Ct = {}, bt = {
44
44
  width: "14",
45
45
  height: "15",
46
46
  viewBox: "0 0 14 15",
47
47
  fill: "none",
48
48
  xmlns: "http://www.w3.org/2000/svg"
49
49
  };
50
- function at(e, t) {
51
- return p(), h("svg", it, t[0] || (t[0] = [
52
- f("path", {
50
+ function wt(e, t) {
51
+ return p(), f("svg", bt, 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
- f("path", {
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)
63
63
  ]));
64
64
  }
65
- const rt = /* @__PURE__ */ X(st, [["render", at]]), ct = {}, ut = {
65
+ const kt = /* @__PURE__ */ K(Ct, [["render", wt]]), yt = {}, xt = {
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 dt(e, t) {
73
- return p(), h("svg", ut, t[0] || (t[0] = [
74
- f("path", {
72
+ function St(e, t) {
73
+ return p(), f("svg", xt, 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",
@@ -80,16 +80,16 @@ function dt(e, t) {
80
80
  }, null, -1)
81
81
  ]));
82
82
  }
83
- const pt = /* @__PURE__ */ X(ct, [["render", dt]]), mt = {}, ht = {
83
+ const Mt = /* @__PURE__ */ K(yt, [["render", St]]), $t = {}, Lt = {
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 vt(e, t) {
91
- return p(), h("svg", ht, t[0] || (t[0] = [
92
- f("path", {
90
+ function It(e, t) {
91
+ return p(), f("svg", Lt, 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",
@@ -98,16 +98,16 @@ function vt(e, t) {
98
98
  }, null, -1)
99
99
  ]));
100
100
  }
101
- const ft = /* @__PURE__ */ X(mt, [["render", vt]]), _t = {}, gt = {
101
+ const Bt = /* @__PURE__ */ K($t, [["render", It]]), Rt = {}, Tt = {
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 Ct(e, t) {
109
- return p(), h("svg", gt, t[0] || (t[0] = [
110
- f("path", {
108
+ function zt(e, t) {
109
+ return p(), f("svg", Tt, 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",
@@ -116,23 +116,23 @@ function Ct(e, t) {
116
116
  }, null, -1)
117
117
  ]));
118
118
  }
119
- const bt = /* @__PURE__ */ X(_t, [["render", Ct]]), wt = {}, kt = {
119
+ const Et = /* @__PURE__ */ K(Rt, [["render", zt]]), Wt = {}, Vt = {
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 yt(e, t) {
127
- return p(), h("svg", kt, t[0] || (t[0] = [
128
- f("path", {
126
+ function Ht(e, t) {
127
+ return p(), f("svg", Vt, 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
- f("path", {
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",
@@ -140,23 +140,23 @@ function yt(e, t) {
140
140
  }, null, -1)
141
141
  ]));
142
142
  }
143
- const xt = /* @__PURE__ */ X(wt, [["render", yt]]), St = {}, $t = {
143
+ const Pt = /* @__PURE__ */ K(Wt, [["render", Ht]]), Dt = {}, At = {
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 Mt(e, t) {
151
- return p(), h("svg", $t, t[0] || (t[0] = [
152
- f("path", {
150
+ function Ot(e, t) {
151
+ return p(), f("svg", At, 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
- f("path", {
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",
@@ -164,22 +164,40 @@ function Mt(e, t) {
164
164
  }, null, -1)
165
165
  ]));
166
166
  }
167
- const Lt = /* @__PURE__ */ X(St, [["render", Mt]]), It = {}, Rt = {
167
+ const jt = /* @__PURE__ */ K(Dt, [["render", Ot]]), Nt = {}, Zt = {
168
+ xmlns: "http://www.w3.org/2000/svg",
169
+ width: "60",
170
+ height: "60",
171
+ viewBox: "0 0 60 60",
172
+ fill: "none"
173
+ };
174
+ function Ft(e, t) {
175
+ return p(), f("svg", Zt, t[0] || (t[0] = [
176
+ _("path", {
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
+ stroke: "currentColor",
179
+ "stroke-width": "2",
180
+ "stroke-linecap": "round",
181
+ "stroke-linejoin": "round"
182
+ }, null, -1)
183
+ ]));
184
+ }
185
+ const Ut = /* @__PURE__ */ K(Nt, [["render", Ft]]), qt = {}, Xt = {
168
186
  width: "20",
169
187
  height: "20",
170
188
  viewBox: "0 0 20 20",
171
189
  fill: "none",
172
190
  xmlns: "http://www.w3.org/2000/svg"
173
191
  };
174
- function Bt(e, t) {
175
- return p(), h("svg", Rt, t[0] || (t[0] = [
176
- f("path", {
192
+ function Gt(e, t) {
193
+ return p(), f("svg", Xt, t[0] || (t[0] = [
194
+ _("path", {
177
195
  "fill-rule": "evenodd",
178
196
  "clip-rule": "evenodd",
179
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",
180
198
  fill: "currentColor"
181
199
  }, null, -1),
182
- f("path", {
200
+ _("path", {
183
201
  "fill-rule": "evenodd",
184
202
  "clip-rule": "evenodd",
185
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",
@@ -187,16 +205,16 @@ function Bt(e, t) {
187
205
  }, null, -1)
188
206
  ]));
189
207
  }
190
- const Tt = /* @__PURE__ */ X(It, [["render", Bt]]), zt = {}, Et = {
208
+ const Kt = /* @__PURE__ */ K(qt, [["render", Gt]]), Yt = {}, Jt = {
191
209
  width: "20",
192
210
  height: "20",
193
211
  viewBox: "0 0 20 20",
194
212
  fill: "none",
195
213
  xmlns: "http://www.w3.org/2000/svg"
196
214
  };
197
- function Wt(e, t) {
198
- return p(), h("svg", Et, t[0] || (t[0] = [
199
- f("path", {
215
+ function Qt(e, t) {
216
+ return p(), f("svg", Jt, t[0] || (t[0] = [
217
+ _("path", {
200
218
  "fill-rule": "evenodd",
201
219
  "clip-rule": "evenodd",
202
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",
@@ -204,16 +222,16 @@ function Wt(e, t) {
204
222
  }, null, -1)
205
223
  ]));
206
224
  }
207
- const Vt = /* @__PURE__ */ X(zt, [["render", Wt]]), Dt = {}, Pt = {
225
+ const en = /* @__PURE__ */ K(Yt, [["render", Qt]]), tn = {}, nn = {
208
226
  width: "21",
209
227
  height: "20",
210
228
  viewBox: "0 0 21 20",
211
229
  fill: "none",
212
230
  xmlns: "http://www.w3.org/2000/svg"
213
231
  };
214
- function Ht(e, t) {
215
- return p(), h("svg", Pt, t[0] || (t[0] = [
216
- f("path", {
232
+ function on(e, t) {
233
+ return p(), f("svg", nn, t[0] || (t[0] = [
234
+ _("path", {
217
235
  "fill-rule": "evenodd",
218
236
  "clip-rule": "evenodd",
219
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",
@@ -221,16 +239,16 @@ function Ht(e, t) {
221
239
  }, null, -1)
222
240
  ]));
223
241
  }
224
- const At = /* @__PURE__ */ X(Dt, [["render", Ht]]), Ot = {}, jt = {
242
+ const ln = /* @__PURE__ */ K(tn, [["render", on]]), sn = {}, an = {
225
243
  width: "20",
226
244
  height: "20",
227
245
  viewBox: "0 0 20 20",
228
246
  fill: "none",
229
247
  xmlns: "http://www.w3.org/2000/svg"
230
248
  };
231
- function Nt(e, t) {
232
- return p(), h("svg", jt, t[0] || (t[0] = [
233
- f("path", {
249
+ function rn(e, t) {
250
+ return p(), f("svg", an, t[0] || (t[0] = [
251
+ _("path", {
234
252
  d: "M6 14L10 10M10 10L14 6M10 10L6 6M10 10L14 14",
235
253
  stroke: "currentColor",
236
254
  "stroke-width": "1.5",
@@ -239,39 +257,40 @@ function Nt(e, t) {
239
257
  }, null, -1)
240
258
  ]));
241
259
  }
242
- const Zt = /* @__PURE__ */ X(Ot, [["render", Nt]]), Ft = {
260
+ const cn = /* @__PURE__ */ K(sn, [["render", rn]]), un = {
243
261
  // arrow icons
244
- arrowDown: et,
245
- arrowTop: lt,
246
- arrowRight: pt,
247
- arrowLeft: ft,
248
- arrowReload: rt,
262
+ arrowDown: ht,
263
+ arrowTop: gt,
264
+ arrowRight: Mt,
265
+ arrowLeft: Bt,
266
+ arrowReload: kt,
249
267
  // table icons
250
- columnInsert: bt,
251
- freeze: xt,
252
- unfreeze: Lt,
253
- columnsMove: Tt,
268
+ columnInsert: Et,
269
+ freeze: Pt,
270
+ unfreeze: jt,
271
+ columnsMove: Kt,
272
+ empty: Ut,
254
273
  // actions icons
255
- listBullet: Vt,
256
- listBulletHorizontal: At,
257
- close: Zt
258
- }, G = /* @__PURE__ */ oe({
274
+ listBullet: en,
275
+ listBulletHorizontal: ln,
276
+ close: cn
277
+ }, Y = /* @__PURE__ */ se({
259
278
  __name: "VIcon",
260
279
  props: {
261
280
  name: {}
262
281
  },
263
282
  setup(e) {
264
- const t = e, n = S(() => Ft[t.name]);
265
- return (o, l) => n.value ? (p(), ie(Ie(n.value), { key: 0 })) : V("", !0);
283
+ const t = e, o = x(() => un[t.name]);
284
+ return (n, s) => o.value ? (p(), ce(De(o.value), { key: 0 })) : H("", !0);
266
285
  }
267
- }), Ut = {}, qt = { class: "vt-loader" };
268
- function Xt(e, t) {
269
- return p(), h("span", qt);
286
+ }), dn = {}, pn = { class: "vt-loader" };
287
+ function mn(e, t) {
288
+ return p(), f("span", pn);
270
289
  }
271
- const ze = /* @__PURE__ */ X(Ut, [["render", Xt]]), Gt = ["disabled", "type", "data-placement"], Kt = {
290
+ const je = /* @__PURE__ */ K(dn, [["render", mn]]), hn = ["disabled", "type", "data-placement"], vn = {
272
291
  key: 2,
273
292
  class: "vt-button__content"
274
- }, pe = /* @__PURE__ */ oe({
293
+ }, ge = /* @__PURE__ */ se({
275
294
  __name: "VButton",
276
295
  props: {
277
296
  type: { default: "default" },
@@ -285,50 +304,54 @@ const ze = /* @__PURE__ */ X(Ut, [["render", Xt]]), Gt = ["disabled", "type", "d
285
304
  },
286
305
  emits: ["click"],
287
306
  setup(e, { emit: t }) {
288
- const n = e, o = t, l = Re(), s = S(() => !!(n.icon && n.shape)), i = S(() => (l.default ? l.default({}) : null)?.[0]?.children?.toString() ?? ""), a = S(() => [
307
+ const o = e, n = t, s = Ae(), l = x(() => !!(o.icon && o.shape)), r = x(() => {
308
+ var k, S;
309
+ const c = s.default ? s.default({}) : null;
310
+ return ((S = (k = c == null ? void 0 : c[0]) == null ? void 0 : k.children) == null ? void 0 : S.toString()) ?? "";
311
+ }), i = x(() => [
289
312
  "vt-button",
290
- `vt-button--${n.type}`,
313
+ `vt-button--${o.type}`,
291
314
  {
292
- [`vt-button--${n.shape}`]: n.shape,
293
- "vt-button--icon-only": s.value,
294
- "vt-button--disabled": n.disabled || n.loading,
295
- "vt-button--loading": n.loading
315
+ [`vt-button--${o.shape}`]: o.shape,
316
+ "vt-button--icon-only": l.value,
317
+ "vt-button--disabled": o.disabled || o.loading,
318
+ "vt-button--loading": o.loading
296
319
  }
297
- ]), r = S(() => s.value && n.tooltip ? i.value : null), u = (c) => {
298
- !n.disabled && !n.loading && o("click", c);
320
+ ]), a = x(() => l.value && o.tooltip ? r.value : null), u = (c) => {
321
+ !o.disabled && !o.loading && n("click", c);
299
322
  };
300
- return (c, M) => {
301
- const $ = Be("tooltip");
302
- return be((p(), h("button", {
303
- class: E(a.value),
304
- disabled: n.disabled || n.loading,
305
- type: n.htmlType,
306
- "data-placement": n.tooltipPlacement,
323
+ return (c, k) => {
324
+ const S = Oe("tooltip");
325
+ return Me((p(), f("button", {
326
+ class: W(i.value),
327
+ disabled: o.disabled || o.loading,
328
+ type: o.htmlType,
329
+ "data-placement": o.tooltipPlacement,
307
330
  onClick: u
308
331
  }, [
309
- n.loading ? (p(), ie(ze, {
332
+ o.loading ? (p(), ce(je, {
310
333
  key: 0,
311
334
  class: "vt-button__icon"
312
- })) : n.icon ? (p(), ie(G, {
335
+ })) : o.icon ? (p(), ce(Y, {
313
336
  key: 1,
314
- name: n.icon,
337
+ name: o.icon,
315
338
  class: "vt-button__icon"
316
- }, null, 8, ["name"])) : V("", !0),
317
- s.value ? V("", !0) : (p(), h("span", Kt, [
318
- re(c.$slots, "default")
339
+ }, null, 8, ["name"])) : H("", !0),
340
+ l.value ? H("", !0) : (p(), f("span", vn, [
341
+ me(c.$slots, "default")
319
342
  ]))
320
- ], 10, Gt)), [
321
- [$, r.value]
343
+ ], 10, hn)), [
344
+ [S, a.value]
322
345
  ]);
323
346
  };
324
347
  }
325
- }), Yt = {
348
+ }), fn = {
326
349
  key: 0,
327
350
  class: "vt-modal__header"
328
- }, Jt = {
351
+ }, _n = {
329
352
  key: 0,
330
353
  class: "vt-modal__title"
331
- }, Qt = { class: "vt-modal__content" }, Ee = /* @__PURE__ */ oe({
354
+ }, gn = { class: "vt-modal__content" }, Ne = /* @__PURE__ */ se({
332
355
  __name: "VModal",
333
356
  props: {
334
357
  modelValue: { type: Boolean },
@@ -340,42 +363,42 @@ const ze = /* @__PURE__ */ X(Ut, [["render", Xt]]), Gt = ["disabled", "type", "d
340
363
  },
341
364
  emits: ["update:modelValue", "close"],
342
365
  setup(e, { emit: t }) {
343
- const n = e, o = t, l = S(() => ["vt-modal__container", `vt-modal__container--${n.size}`]), s = S(() => ({
344
- zIndex: n.zIndex
345
- })), i = () => {
346
- o("update:modelValue", !1), o("close");
347
- }, a = () => {
348
- n.closeOnBackdropClick && i();
366
+ const o = e, n = t, s = x(() => ["vt-modal__container", `vt-modal__container--${o.size}`]), l = x(() => ({
367
+ zIndex: o.zIndex
368
+ })), r = () => {
369
+ n("update:modelValue", !1), n("close");
370
+ }, i = () => {
371
+ o.closeOnBackdropClick && r();
349
372
  };
350
- return (r, u) => (p(), ie(Ne, { to: "body" }, [
351
- r.modelValue ? (p(), h("div", {
373
+ return (a, u) => (p(), ce(ot, { to: "body" }, [
374
+ a.modelValue ? (p(), f("div", {
352
375
  key: 0,
353
376
  class: "vt-modal__backdrop",
354
- style: le(s.value),
355
- onClick: a
377
+ style: ae(l.value),
378
+ onClick: i
356
379
  }, [
357
- f("div", {
358
- class: E(l.value),
359
- onClick: u[0] || (u[0] = ce(() => {
380
+ _("div", {
381
+ class: W(s.value),
382
+ onClick: u[0] || (u[0] = he(() => {
360
383
  }, ["stop"]))
361
384
  }, [
362
- r.title || r.showCloseButton ? (p(), h("div", Yt, [
363
- r.title ? (p(), h("h2", Jt, Q(r.title), 1)) : V("", !0),
364
- r.showCloseButton ? (p(), ie(G, {
385
+ a.title || a.showCloseButton ? (p(), f("div", fn, [
386
+ a.title ? (p(), f("h2", _n, te(a.title), 1)) : H("", !0),
387
+ a.showCloseButton ? (p(), ce(Y, {
365
388
  key: 1,
366
389
  name: "close",
367
390
  class: "vt-modal__close",
368
- onClick: i
369
- })) : V("", !0)
370
- ])) : V("", !0),
371
- f("div", Qt, [
372
- re(r.$slots, "default")
391
+ onClick: r
392
+ })) : H("", !0)
393
+ ])) : H("", !0),
394
+ _("div", gn, [
395
+ me(a.$slots, "default")
373
396
  ])
374
397
  ], 2)
375
- ], 4)) : V("", !0)
398
+ ], 4)) : H("", !0)
376
399
  ]));
377
400
  }
378
- }), en = { class: "vt-pagination" }, tn = { class: "vt-pagination__info" }, nn = { class: "vt-pagination__rows-per-page" }, on = ["value"], ln = { class: "vt-pagination__navigation" }, sn = ["disabled"], an = ["onClick"], rn = ["disabled"], cn = /* @__PURE__ */ oe({
401
+ }), Cn = { class: "vt-pagination" }, bn = { class: "vt-pagination__info" }, wn = { class: "vt-pagination__rows-per-page" }, kn = ["value"], yn = { class: "vt-pagination__navigation" }, xn = ["disabled"], Sn = ["onClick"], Mn = ["disabled"], $n = /* @__PURE__ */ se({
379
402
  __name: "VPagination",
380
403
  props: {
381
404
  totalItems: {},
@@ -386,103 +409,103 @@ const ze = /* @__PURE__ */ X(Ut, [["render", Xt]]), Gt = ["disabled", "type", "d
386
409
  },
387
410
  emits: ["update:currentPage", "update:pageSize", "pageChange", "reloadData"],
388
411
  setup(e, { emit: t }) {
389
- const n = e, o = t, l = S({
390
- get: () => n.currentPage,
391
- set: (L) => o("update:currentPage", L)
392
- }), s = S({
393
- get: () => n.pageSize,
394
- set: (L) => o("update:pageSize", L)
395
- }), i = S(() => Math.ceil(n.totalItems / s.value)), a = S(() => n.totalItems === 0 ? 0 : (l.value - 1) * s.value + 1), r = S(() => Math.min(l.value * s.value, n.totalItems)), u = S(() => l.value <= 1), c = S(() => l.value >= i.value), M = S(() => {
396
- const L = [], W = i.value, x = l.value, Z = n.maxVisiblePages;
397
- if (W <= Z)
398
- for (let v = 1; v <= W; v++)
399
- L.push(v);
412
+ const o = e, n = t, s = x({
413
+ get: () => o.currentPage,
414
+ set: (M) => n("update:currentPage", M)
415
+ }), l = x({
416
+ get: () => o.pageSize,
417
+ set: (M) => n("update:pageSize", M)
418
+ }), r = x(() => Math.ceil(o.totalItems / l.value)), i = x(() => o.totalItems === 0 ? 0 : (s.value - 1) * l.value + 1), a = x(() => Math.min(s.value * l.value, o.totalItems)), u = x(() => s.value <= 1), c = x(() => s.value >= r.value), k = x(() => {
419
+ const M = [], V = r.value, T = s.value, q = o.maxVisiblePages;
420
+ if (V <= q)
421
+ for (let y = 1; y <= V; y++)
422
+ M.push(y);
400
423
  else {
401
- L.push(1);
402
- const v = Math.max(2, x - Math.floor(Z / 2)), T = Math.min(W - 1, x + Math.floor(Z / 2));
403
- v > 2 && L.push("...");
404
- for (let D = v; D <= T; D++)
405
- L.push(D);
406
- T < W - 1 && L.push("..."), W > 1 && L.push(W);
424
+ M.push(1);
425
+ const y = Math.max(2, T - Math.floor(q / 2)), E = Math.min(V - 1, T + Math.floor(q / 2));
426
+ y > 2 && M.push("...");
427
+ for (let $ = y; $ <= E; $++)
428
+ M.push($);
429
+ E < V - 1 && M.push("..."), V > 1 && M.push(V);
407
430
  }
408
- return L;
409
- }), $ = () => {
410
- o("pageChange", {
411
- page: l.value,
412
- pageSize: s.value
431
+ return M;
432
+ }), S = () => {
433
+ n("pageChange", {
434
+ page: s.value,
435
+ pageSize: l.value
413
436
  });
414
- }, H = (L) => {
415
- typeof L == "number" && L !== l.value && (l.value = L, $());
437
+ }, F = (M) => {
438
+ typeof M == "number" && M !== s.value && (s.value = M, S());
439
+ }, j = () => {
440
+ u.value || (s.value--, S());
441
+ }, Q = () => {
442
+ c.value || (s.value++, S());
443
+ }, U = () => {
444
+ s.value = 1, S();
416
445
  }, N = () => {
417
- u.value || (l.value--, $());
418
- }, K = () => {
419
- c.value || (l.value++, $());
420
- }, Y = () => {
421
- l.value = 1, $();
422
- }, q = () => {
423
- o("reloadData", l.value);
446
+ n("reloadData", s.value);
424
447
  };
425
- return ue(
426
- () => n.totalItems,
448
+ return ve(
449
+ () => o.totalItems,
427
450
  () => {
428
- l.value > i.value && i.value > 0 && (l.value = i.value, $());
451
+ s.value > r.value && r.value > 0 && (s.value = r.value, S());
429
452
  }
430
- ), (L, W) => (p(), h("div", en, [
431
- f("div", tn, [
432
- f("div", nn, [
433
- W[1] || (W[1] = f("label", {
453
+ ), (M, V) => (p(), f("div", Cn, [
454
+ _("div", bn, [
455
+ _("div", wn, [
456
+ V[1] || (V[1] = _("label", {
434
457
  for: "rowsSelect",
435
458
  class: "vt-pagination__label"
436
459
  }, "Рядків на сторінку:", -1)),
437
- be(f("select", {
460
+ Me(_("select", {
438
461
  id: "rowsSelect",
439
- "onUpdate:modelValue": W[0] || (W[0] = (x) => s.value = x),
440
- onChange: Y,
462
+ "onUpdate:modelValue": V[0] || (V[0] = (T) => l.value = T),
463
+ onChange: U,
441
464
  class: "vt-pagination__select"
442
465
  }, [
443
- (p(!0), h(te, null, ne(L.pageSizeOptions, (x) => (p(), h("option", {
444
- key: x,
445
- value: x
446
- }, Q(x), 9, on))), 128))
466
+ (p(!0), f(oe, null, le(M.pageSizeOptions, (T) => (p(), f("option", {
467
+ key: T,
468
+ value: T
469
+ }, te(T), 9, kn))), 128))
447
470
  ], 544), [
448
- [Ze, s.value]
471
+ [lt, l.value]
449
472
  ])
450
473
  ]),
451
- f("span", null, Q(a.value) + " - " + Q(r.value) + " з " + Q(L.totalItems), 1)
474
+ _("span", null, te(i.value) + " - " + te(a.value) + " з " + te(M.totalItems), 1)
452
475
  ]),
453
- f("div", ln, [
454
- f("button", {
455
- onClick: N,
476
+ _("div", yn, [
477
+ _("button", {
478
+ onClick: j,
456
479
  disabled: u.value,
457
- class: E({ "vt-pagination__nav-button": !0, "has-items": !u.value })
480
+ class: W({ "vt-pagination__nav-button": !0, "has-items": !u.value })
458
481
  }, [
459
- j(G, { name: "arrowLeft" })
460
- ], 10, sn),
461
- (p(!0), h(te, null, ne(M.value, (x) => (p(), h("button", {
462
- key: x,
463
- onClick: (Z) => H(x),
464
- class: E(["vt-pagination__nav-button", {
465
- "vt-pagination__nav-button--active": x === l.value
482
+ Z(Y, { name: "arrowLeft" })
483
+ ], 10, xn),
484
+ (p(!0), f(oe, null, le(k.value, (T) => (p(), f("button", {
485
+ key: T,
486
+ onClick: (q) => F(T),
487
+ class: W(["vt-pagination__nav-button", {
488
+ "vt-pagination__nav-button--active": T === s.value
466
489
  }])
467
- }, Q(x), 11, an))), 128)),
468
- f("button", {
469
- onClick: K,
490
+ }, te(T), 11, Sn))), 128)),
491
+ _("button", {
492
+ onClick: Q,
470
493
  disabled: c.value,
471
- class: E({ "vt-pagination__nav-button": !0, "has-items": !c.value })
494
+ class: W({ "vt-pagination__nav-button": !0, "has-items": !c.value })
472
495
  }, [
473
- j(G, { name: "arrowRight" })
474
- ], 10, rn)
496
+ Z(Y, { name: "arrowRight" })
497
+ ], 10, Mn)
475
498
  ]),
476
- f("div", null, [
477
- j(pe, {
499
+ _("div", null, [
500
+ Z(ge, {
478
501
  icon: "arrowReload",
479
502
  shape: "circle",
480
503
  tooltip: "",
481
504
  tooltipPlacement: "left",
482
- onClick: q
505
+ onClick: N
483
506
  }, {
484
- default: ge(() => W[2] || (W[2] = [
485
- de("Оновити дані ", -1)
507
+ default: xe(() => V[2] || (V[2] = [
508
+ _e("Оновити дані ", -1)
486
509
  ])),
487
510
  _: 1,
488
511
  __: [2]
@@ -490,7 +513,7 @@ const ze = /* @__PURE__ */ X(Ut, [["render", Xt]]), Gt = ["disabled", "type", "d
490
513
  ])
491
514
  ]));
492
515
  }
493
- }), un = ["for"], dn = ["id", "name", "value", "checked", "disabled", "required", ".indeterminate"], ae = /* @__PURE__ */ oe({
516
+ }), Ln = ["for"], In = ["id", "name", "value", "checked", "disabled", "required", ".indeterminate"], de = /* @__PURE__ */ se({
494
517
  __name: "VCheckbox",
495
518
  props: {
496
519
  modelValue: { type: Boolean, default: void 0 },
@@ -508,17 +531,17 @@ const ze = /* @__PURE__ */ X(Ut, [["render", Xt]]), Gt = ["disabled", "type", "d
508
531
  },
509
532
  emits: ["update:modelValue", "change", "focus", "blur"],
510
533
  setup(e, { emit: t }) {
511
- const n = e, o = t, l = () => `vt-checkbox-${Math.random().toString(36).substr(2, 9)}`, s = S(() => n.id || l()), i = S(() => n.modelValue ?? n.checked), a = (c) => {
512
- if (n.disabled) return;
513
- const $ = c.target.checked;
514
- o("update:modelValue", $), o("change", $, c);
515
- }, r = (c) => {
516
- o("focus", c);
534
+ const o = e, n = t, s = () => `vt-checkbox-${Math.random().toString(36).substr(2, 9)}`, l = x(() => o.id || s()), r = x(() => o.modelValue ?? o.checked), i = (c) => {
535
+ if (o.disabled) return;
536
+ const S = c.target.checked;
537
+ n("update:modelValue", S), n("change", S, c);
538
+ }, a = (c) => {
539
+ n("focus", c);
517
540
  }, u = (c) => {
518
- o("blur", c);
541
+ n("blur", c);
519
542
  };
520
- return (c, M) => (p(), h("label", {
521
- class: E([
543
+ return (c, k) => (p(), f("label", {
544
+ class: W([
522
545
  "vt-checkbox",
523
546
  `vt-checkbox--${c.size}`,
524
547
  `vt-checkbox--${c.variant}`,
@@ -527,39 +550,39 @@ const ze = /* @__PURE__ */ X(Ut, [["render", Xt]]), Gt = ["disabled", "type", "d
527
550
  "vt-checkbox--double": c.isDouble
528
551
  }
529
552
  ]),
530
- for: s.value
553
+ for: l.value
531
554
  }, [
532
- f("input", {
533
- id: s.value,
555
+ _("input", {
556
+ id: l.value,
534
557
  name: c.name,
535
558
  value: c.value,
536
- checked: i.value,
559
+ checked: r.value,
537
560
  disabled: c.disabled,
538
561
  required: c.required,
539
562
  ".indeterminate": c.indeterminate,
540
563
  type: "checkbox",
541
564
  class: "vt-checkbox__input",
542
- onChange: a,
543
- onFocus: r,
565
+ onChange: i,
566
+ onFocus: a,
544
567
  onBlur: u
545
- }, null, 40, dn),
546
- f("div", {
547
- class: E([
568
+ }, null, 40, In),
569
+ _("div", {
570
+ class: W([
548
571
  "vt-checkbox__box",
549
572
  {
550
- "vt-checkbox__box--checked": i.value && !c.indeterminate && !c.isDouble,
573
+ "vt-checkbox__box--checked": r.value && !c.indeterminate && !c.isDouble,
551
574
  "vt-checkbox__box--indeterminate": c.indeterminate,
552
- "vt-checkbox__box--double": c.isDouble && i.value,
575
+ "vt-checkbox__box--double": c.isDouble && r.value,
553
576
  "vt-checkbox__box--disabled": c.disabled
554
577
  }
555
578
  ])
556
579
  }, [
557
- !c.indeterminate && !c.isDouble ? (p(), h("svg", {
580
+ !c.indeterminate && !c.isDouble ? (p(), f("svg", {
558
581
  key: 0,
559
- class: E([
582
+ class: W([
560
583
  "vt-checkbox__checkmark",
561
584
  {
562
- "vt-checkbox__checkmark--checked": i.value
585
+ "vt-checkbox__checkmark--checked": r.value
563
586
  }
564
587
  ]),
565
588
  width: "10",
@@ -567,20 +590,20 @@ const ze = /* @__PURE__ */ X(Ut, [["render", Xt]]), Gt = ["disabled", "type", "d
567
590
  viewBox: "0 0 10 9",
568
591
  fill: "none",
569
592
  xmlns: "http://www.w3.org/2000/svg"
570
- }, M[0] || (M[0] = [
571
- f("path", {
593
+ }, k[0] || (k[0] = [
594
+ _("path", {
572
595
  d: "M1 5L3.58264 7.58264C3.80112 7.80112 4.16348 7.77113 4.34306 7.51971L9 1",
573
596
  stroke: "currentColor",
574
597
  "stroke-width": "2",
575
598
  "stroke-linecap": "round"
576
599
  }, null, -1)
577
- ]), 2)) : V("", !0),
578
- c.isDouble && i.value ? (p(), h("svg", {
600
+ ]), 2)) : H("", !0),
601
+ c.isDouble && r.value ? (p(), f("svg", {
579
602
  key: 1,
580
- class: E([
603
+ class: W([
581
604
  "vt-checkbox__checkmark",
582
605
  {
583
- "vt-checkbox__checkmark--checked": i.value
606
+ "vt-checkbox__checkmark--checked": r.value
584
607
  }
585
608
  ]),
586
609
  width: "13",
@@ -588,285 +611,285 @@ const ze = /* @__PURE__ */ X(Ut, [["render", Xt]]), Gt = ["disabled", "type", "d
588
611
  viewBox: "0 0 13 6",
589
612
  fill: "none",
590
613
  xmlns: "http://www.w3.org/2000/svg"
591
- }, M[1] || (M[1] = [
592
- f("path", {
614
+ }, k[1] || (k[1] = [
615
+ _("path", {
593
616
  d: "M6 3L8.25 5L12 1",
594
617
  stroke: "currentColor",
595
618
  "stroke-width": "2",
596
619
  "stroke-linecap": "round",
597
620
  "stroke-linejoin": "round"
598
621
  }, null, -1),
599
- f("path", {
622
+ _("path", {
600
623
  d: "M1 3L3.25 5L7 1",
601
624
  stroke: "currentColor",
602
625
  "stroke-width": "2",
603
626
  "stroke-linecap": "round",
604
627
  "stroke-linejoin": "round"
605
628
  }, null, -1)
606
- ]), 2)) : V("", !0),
607
- c.indeterminate ? (p(), h("div", {
629
+ ]), 2)) : H("", !0),
630
+ c.indeterminate ? (p(), f("div", {
608
631
  key: 2,
609
- class: E([
632
+ class: W([
610
633
  "vt-checkbox__indeterminate-mark",
611
634
  {
612
635
  "vt-checkbox__indeterminate-mark--visible": c.indeterminate
613
636
  }
614
637
  ])
615
- }, null, 2)) : V("", !0)
638
+ }, null, 2)) : H("", !0)
616
639
  ], 2),
617
- c.label || c.$slots.label || c.$slots.default ? (p(), h("span", {
640
+ c.label || c.$slots.label || c.$slots.default ? (p(), f("span", {
618
641
  key: 0,
619
- class: E([
642
+ class: W([
620
643
  "vt-checkbox__label",
621
644
  {
622
645
  "vt-checkbox__label--disabled": c.disabled
623
646
  }
624
647
  ])
625
648
  }, [
626
- re(c.$slots, "label", {}, () => [
627
- re(c.$slots, "default", {}, () => [
628
- de(Q(c.label), 1)
649
+ me(c.$slots, "label", {}, () => [
650
+ me(c.$slots, "default", {}, () => [
651
+ _e(te(c.label), 1)
629
652
  ])
630
653
  ])
631
- ], 2)) : V("", !0)
632
- ], 10, un));
654
+ ], 2)) : H("", !0)
655
+ ], 10, Ln));
633
656
  }
634
657
  });
635
- function pn(e) {
636
- const t = S(() => [...e].sort((l, s) => l.pinnedLeft && !s.pinnedLeft ? -1 : !l.pinnedLeft && s.pinnedLeft || l.pinnedRight && !s.pinnedRight ? 1 : !l.pinnedRight && s.pinnedRight ? -1 : 0)), n = () => {
637
- const l = t.value.length, s = t.value.filter((c) => c.width || c.minWidth), i = s.reduce((c, M) => c + (M.width || M.minWidth || 0), 0), a = l - s.length;
638
- if (a === 0)
639
- return 150;
640
- const u = Math.max(800 - i, a * 80);
641
- return Math.max(Math.floor(u / a), 120);
658
+ function Bn(e) {
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
+ 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
+ if (i === 0) return 150;
662
+ const u = Math.max(800 - r, i * 80);
663
+ return Math.max(Math.floor(u / i), 120);
642
664
  };
643
665
  return {
644
666
  sortedColumns: t,
645
- getDefaultColumnWidth: n,
646
- getStickyOffset: (l, s, i = !1) => {
647
- const a = t.value;
648
- let r = 0;
649
- if (l === "left") {
650
- i && (r += 50);
651
- for (let u = 0; u < s; u++) {
652
- const c = a[u];
653
- c.pinnedLeft && (r += c.width || c.minWidth || n());
667
+ getDefaultColumnWidth: o,
668
+ getStickyOffset: (s, l, r = !1) => {
669
+ const i = t.value;
670
+ let a = 0;
671
+ if (s === "left") {
672
+ r && (a += 50);
673
+ for (let u = 0; u < l; u++) {
674
+ const c = i[u];
675
+ c.pinnedLeft && (a += c.width || c.minWidth || o());
654
676
  }
655
677
  } else
656
- for (let u = a.length - 1; u > s; u--) {
657
- const c = a[u];
658
- c.pinnedRight && (r += c.width || c.minWidth || n());
678
+ for (let u = i.length - 1; u > l; u--) {
679
+ const c = i[u];
680
+ c.pinnedRight && (a += c.width || c.minWidth || o());
659
681
  }
660
- return r;
682
+ return a;
661
683
  }
662
684
  };
663
685
  }
664
- function mn(e) {
686
+ function Rn(e) {
665
687
  const t = () => {
666
- const s = {};
667
- return e.maxHeight && (s.maxHeight = `${e.maxHeight}px`), s;
668
- }, n = (s, i, a, r) => {
688
+ const l = {};
689
+ return e.maxHeight && (l.maxHeight = `${e.maxHeight}px`), l;
690
+ }, o = (l, r, i, a) => {
669
691
  const u = {};
670
- if (s.width)
671
- u.width = `${s.width}px`, u.minWidth = `${s.width}px`, u.maxWidth = `${s.width}px`;
672
- else if (s.minWidth)
673
- u.minWidth = `${s.minWidth}px`, u.width = `${s.minWidth}px`, u.maxWidth = "none";
692
+ if (l.width)
693
+ u.width = `${l.width}px`, u.minWidth = `${l.width}px`, u.maxWidth = `${l.width}px`;
694
+ else if (l.minWidth)
695
+ u.minWidth = `${l.minWidth}px`, u.width = `${l.minWidth}px`, u.maxWidth = "none";
674
696
  else {
675
- const c = r();
697
+ const c = a();
676
698
  u.width = `${c}px`, u.minWidth = "80px", u.maxWidth = "none";
677
699
  }
678
- return s.pinnedLeft ? (u.position = "sticky", u.left = `${a("left", i, e.selectable)}px`, u.zIndex = "10") : s.pinnedRight && (u.position = "sticky", u.right = `${a("right", i, !1)}px`, u.zIndex = "10"), u;
700
+ return l.pinnedLeft ? (u.position = "sticky", u.left = `${i("left", r, e.selectable)}px`, u.zIndex = "10") : l.pinnedRight && (u.position = "sticky", u.right = `${i("right", r, !1)}px`, u.zIndex = "10"), u;
679
701
  };
680
702
  return {
681
703
  getTableWrapperStyle: t,
682
- getColumnStyle: n,
683
- getHeaderStyle: (s, i, a, r) => {
684
- const u = n(s, i, a, r);
685
- return e.maxHeight && (u.position = "sticky", u.top = "0", s.pinnedLeft || s.pinnedRight ? u.zIndex = "12" : u.zIndex = "11"), u;
704
+ getColumnStyle: o,
705
+ getHeaderStyle: (l, r, i, a) => {
706
+ const u = o(l, r, i, a);
707
+ return e.maxHeight && (u.position = "sticky", u.top = "0", l.pinnedLeft || l.pinnedRight ? u.zIndex = "12" : u.zIndex = "11"), u;
686
708
  },
687
- getFooterStyle: (s, i, a, r) => {
688
- const u = n(s, i, a, r);
689
- return e.maxHeight && (u.position = "sticky", u.bottom = "0", s.pinnedLeft || s.pinnedRight ? u.zIndex = "12" : u.zIndex = "11"), u;
709
+ getFooterStyle: (l, r, i, a) => {
710
+ const u = o(l, r, i, a);
711
+ return e.maxHeight && (u.position = "sticky", u.bottom = "0", l.pinnedLeft || l.pinnedRight ? u.zIndex = "12" : u.zIndex = "11"), u;
690
712
  }
691
713
  };
692
714
  }
693
- function hn() {
694
- const e = P({
715
+ function Tn() {
716
+ const e = D({
695
717
  resizingCol: null,
696
718
  startX: 0,
697
719
  startWidth: 0
698
720
  }), t = `url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'><path d='M5 13L2 10L5 7' stroke='%23828282' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/><path d='M15 7L18 10L15 13' stroke='%23828282' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/><path d='M10 3L10 17' stroke='%23828282' stroke-width='3' stroke-linecap='round'/></svg>") 10 10, col-resize`;
699
721
  return {
700
- onMouseDown: (o, l, s, i) => {
701
- o.preventDefault(), o.stopPropagation(), e.value.resizingCol = l, e.value.startX = o.clientX, e.value.startWidth = l.width || l.minWidth || s(l.prop);
702
- const a = (u) => {
703
- const { resizingCol: c, startX: M, startWidth: $ } = e.value;
704
- if (!c)
705
- return;
706
- document.querySelectorAll(`[data-resizer="${c.prop}"]`).forEach((q) => {
707
- q.classList.add("vt-table__resizer--active");
722
+ onMouseDown: (n, s, l, r) => {
723
+ n.preventDefault(), n.stopPropagation(), e.value.resizingCol = s, e.value.startX = n.clientX, e.value.startWidth = s.width || s.minWidth || l(s.prop);
724
+ const i = (u) => {
725
+ const { resizingCol: c, startX: k, startWidth: S } = e.value;
726
+ if (!c) return;
727
+ document.querySelectorAll(`[data-resizer="${c.prop}"]`).forEach((N) => {
728
+ N.classList.add("vt-table__resizer--active");
708
729
  });
709
- const H = u.clientX - M, N = c.minWidth || 50, K = c.maxWidth || 1e3, Y = Math.max(Math.min($ + H, K), N);
710
- c.width = Y;
711
- }, r = () => {
730
+ const F = u.clientX - k, j = c.minWidth || 50, Q = c.maxWidth || 1e3, U = Math.max(Math.min(S + F, Q), j);
731
+ c.width = U;
732
+ }, a = () => {
712
733
  const { resizingCol: u } = e.value;
713
- document.removeEventListener("mousemove", a), document.removeEventListener("mouseup", r), document.body.style.cursor = "", document.body.style.userSelect = "", document.body.classList.remove("vt-table-resizing"), u && (document.querySelectorAll(`[data-resizer="${u.prop}"]`).forEach((c) => {
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) => {
714
735
  c.classList.remove("vt-table__resizer--active");
715
- }), i && u.width && (console.log("📏 Викликаємо callback з новою шириною:", u.width), i(u.width))), e.value.resizingCol = null;
736
+ }), r && u.width && r(u.width)), e.value.resizingCol = null;
716
737
  };
717
- document.addEventListener("mousemove", a), document.addEventListener("mouseup", r), document.body.style.cursor = t, document.body.style.userSelect = "none", document.body.classList.add("vt-table-resizing");
738
+ document.addEventListener("mousemove", i), document.addEventListener("mouseup", a), document.body.style.cursor = t, document.body.style.userSelect = "none", document.body.classList.add("vt-table-resizing");
718
739
  },
719
740
  resizeState: e
720
741
  };
721
742
  }
722
- function vn(e, t, n, o) {
723
- const l = e.selectionKey || "id", s = P([]), i = P(null), a = P(!1);
724
- e.defaultSelection?.length && (s.value = [...e.defaultSelection]);
725
- const r = (k) => k[l], u = (k) => a.value ? !0 : s.value.some((z) => r(z) === r(k)), c = S(() => t.value.filter((k) => u(k)).length), M = S(() => t.value.length > 0 && c.value === t.value.length), $ = S(() => {
726
- if (a.value)
727
- return !1;
728
- const k = c.value;
729
- return k > 0 && k < t.value.length;
730
- }), H = S(() => a.value ? !0 : M.value && !$.value), N = S(() => a.value), K = (k, z) => {
731
- const B = r(k), A = s.value.some((d) => r(d) === r(k)), F = z !== void 0 ? z : !A;
732
- if (a.value && !F) {
733
- a.value = !1, o?.value && (s.value = o.value.filter((d) => r(d) !== B)), D(k, !1);
743
+ function zn(e, t, o, n) {
744
+ var J;
745
+ const s = e.selectionKey || "id", l = D([]), r = D(null), i = D(!1);
746
+ (J = e.defaultSelection) != null && J.length && (l.value = [...e.defaultSelection]);
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
+ if (i.value) return !1;
749
+ const m = c.value;
750
+ return m > 0 && m < t.value.length;
751
+ }), F = x(() => i.value ? !0 : k.value && !S.value), j = x(() => i.value), Q = (m, A) => {
752
+ const z = a(m), G = l.value.some((v) => a(v) === a(m)), d = A !== void 0 ? A : !G;
753
+ if (i.value && !d) {
754
+ i.value = !1, n != null && n.value && (l.value = n.value.filter((v) => a(v) !== z)), $(m, !1);
734
755
  return;
735
756
  }
736
- a.value && F || (F && !A ? s.value.push(k) : !F && A && (s.value = s.value.filter((d) => r(d) !== B)), e.selectOnClickRow && z === void 0 && Z(F ? k : null), D(k, F));
737
- }, Y = () => {
738
- switch (q()) {
757
+ i.value && d || (d && !G ? l.value.push(m) : !d && G && (l.value = l.value.filter((v) => a(v) !== z)), e.selectOnClickRow && A === void 0 && q(d ? m : null), $(m, d));
758
+ }, U = () => {
759
+ switch (N()) {
739
760
  case "none":
740
761
  case "partial":
741
- L();
762
+ M();
742
763
  break;
743
764
  case "allVisible":
744
- W();
765
+ V();
745
766
  break;
746
767
  case "absoluteAll":
747
- x();
768
+ T();
748
769
  break;
749
770
  }
750
- }, q = () => a.value ? "absoluteAll" : M.value ? "allVisible" : c.value > 0 ? "partial" : "none", L = () => {
751
- const k = [], z = new Set(s.value.map((B) => r(B)));
752
- s.value.forEach((B) => {
753
- k.push(B);
754
- }), t.value.forEach((B) => {
755
- z.has(r(B)) || k.push(B);
756
- }), s.value = k, a.value = !1, D();
757
- }, W = () => {
758
- a.value = !0, o?.value ? s.value = [...o.value] : s.value = [...t.value], D(void 0, void 0, !0);
759
- }, x = () => {
760
- s.value = [], a.value = !1, i.value = null, D();
761
- }, Z = (k) => {
762
- const z = i.value;
763
- i.value = k, n("current-change", {
764
- currentRow: i.value,
765
- oldCurrentRow: z
771
+ }, N = () => i.value ? "absoluteAll" : k.value ? "allVisible" : c.value > 0 ? "partial" : "none", M = () => {
772
+ const m = [], A = new Set(l.value.map((z) => a(z)));
773
+ l.value.forEach((z) => {
774
+ m.push(z);
775
+ }), t.value.forEach((z) => {
776
+ A.has(a(z)) || m.push(z);
777
+ }), l.value = m, i.value = !1, $();
778
+ }, V = () => {
779
+ i.value = !0, n != null && n.value ? l.value = [...n.value] : l.value = [...t.value], $(void 0, void 0, !0);
780
+ }, T = () => {
781
+ l.value = [], i.value = !1, r.value = null, $();
782
+ }, q = (m) => {
783
+ const A = r.value;
784
+ r.value = m, o("current-change", {
785
+ currentRow: r.value,
786
+ oldCurrentRow: A
766
787
  });
767
- }, v = () => [...s.value], T = (k) => {
768
- s.value = [...k], a.value = !1, D();
769
- }, D = (k, z, B = !1) => {
770
- const A = {
771
- selection: [...s.value],
772
- row: k,
773
- selected: z,
774
- isAllSelected: B || a.value
788
+ }, y = () => [...l.value], E = (m) => {
789
+ l.value = [...m], i.value = !1, $();
790
+ }, $ = (m, A, z = !1) => {
791
+ const G = {
792
+ selection: [...l.value],
793
+ row: m,
794
+ selected: A,
795
+ isAllSelected: z || i.value
775
796
  };
776
- n("selection-change", A);
797
+ o("selection-change", G);
777
798
  };
778
- return ue(() => e.defaultSelection, (k) => {
779
- k?.length && (s.value = [...k]);
780
- }), {
781
- selectedRows: s,
782
- currentRow: i,
799
+ return ve(
800
+ () => e.defaultSelection,
801
+ (m) => {
802
+ m != null && m.length && (l.value = [...m]);
803
+ }
804
+ ), {
805
+ selectedRows: l,
806
+ currentRow: r,
783
807
  isRowSelected: u,
784
- isAllSelected: H,
785
- isIndeterminate: $,
786
- isDoubleCheck: N,
787
- isFullSelection: a,
788
- toggleRowSelection: K,
789
- toggleAllSelection: Y,
790
- clearSelection: x,
791
- setCurrentRow: Z,
792
- getSelectionRows: v,
793
- setSelectionRows: T,
794
- selectAbsolutelyAll: W
808
+ isAllSelected: F,
809
+ isIndeterminate: S,
810
+ isDoubleCheck: j,
811
+ isFullSelection: i,
812
+ toggleRowSelection: Q,
813
+ toggleAllSelection: U,
814
+ clearSelection: T,
815
+ setCurrentRow: q,
816
+ getSelectionRows: y,
817
+ setSelectionRows: E,
818
+ selectAbsolutelyAll: V
795
819
  };
796
820
  }
797
- const fn = (e, t, n = "asc") => {
798
- if (e == null && t == null)
799
- return 0;
800
- if (e == null)
801
- return n === "asc" ? 1 : -1;
802
- if (t == null)
803
- return n === "asc" ? -1 : 1;
804
- if (e === t)
805
- return 0;
806
- let o = 0;
807
- const l = Number(e), s = Number(t);
808
- return !isNaN(l) && !isNaN(s) ? o = l - s : ke(e) && ke(t) ? o = new Date(e).getTime() - new Date(t).getTime() : typeof e == "boolean" && typeof t == "boolean" ? o = e === t ? 0 : e ? -1 : 1 : o = String(e).localeCompare(String(t), void 0, {
821
+ const En = (e, t, o = "asc") => {
822
+ if (e == null && t == null) return 0;
823
+ if (e == null) return o === "asc" ? 1 : -1;
824
+ if (t == null) return o === "asc" ? -1 : 1;
825
+ if (e === t) return 0;
826
+ let n = 0;
827
+ const s = Number(e), l = Number(t);
828
+ return !isNaN(s) && !isNaN(l) ? n = s - l : Te(e) && Te(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, {
809
829
  numeric: !0,
810
830
  sensitivity: "base"
811
- }), n === "desc" ? -o : o;
812
- }, ke = (e) => e instanceof Date ? !isNaN(e.getTime()) : typeof e == "string" && /\d{4}-\d{2}-\d{2}|\//.test(e) ? !isNaN(new Date(e).getTime()) : !1, _n = (e, t, n) => {
813
- e.sortable && n({
831
+ }), o === "desc" ? -n : n;
832
+ }, Te = (e) => e instanceof Date ? !isNaN(e.getTime()) : typeof e == "string" && /\d{4}-\d{2}-\d{2}|\//.test(e) ? !isNaN(new Date(e).getTime()) : !1, Wn = (e, t, o) => {
833
+ e.sortable && o({
814
834
  prop: e.prop,
815
835
  direction: t
816
836
  });
817
- }, ye = (e, t) => {
818
- const n = t?.prop === e.prop, o = t?.direction;
837
+ }, ze = (e, t) => {
838
+ const o = (t == null ? void 0 : t.prop) === e.prop, n = t == null ? void 0 : t.direction;
819
839
  return {
820
- asc: ["vt-th__sort-icon", n && o === "asc" && "vt-th__sortable-active"].filter(Boolean).join(" "),
821
- desc: ["vt-th__sort-icon", n && o === "desc" && "vt-th__sortable-active"].filter(Boolean).join(" ")
840
+ asc: ["vt-th__sort-icon", o && n === "asc" && "vt-th__sortable-active"].filter(Boolean).join(" "),
841
+ desc: ["vt-th__sort-icon", o && n === "desc" && "vt-th__sortable-active"].filter(Boolean).join(" ")
822
842
  };
823
- }, gn = (e, t, n) => {
824
- if (!t)
825
- return [...e];
826
- const o = n.find((s) => s.prop === t.prop);
827
- if (!o?.sortable)
828
- return [...e];
829
- const l = o.sortMethod || fn;
830
- return [...e].sort((s, i) => {
831
- const a = s[o.prop], r = i[o.prop];
832
- return l(a, r, t.direction);
843
+ }, Vn = (e, t, o) => {
844
+ if (!t) return [...e];
845
+ const n = o.find((l) => l.prop === t.prop);
846
+ if (!(n != null && n.sortable)) return [...e];
847
+ const s = n.sortMethod || En;
848
+ return [...e].sort((l, r) => {
849
+ const i = l[n.prop], a = r[n.prop];
850
+ return s(i, a, t.direction);
833
851
  });
834
852
  };
835
- class Cn {
836
- modalStack = [];
837
- baseZIndex = 1e3;
853
+ class Hn {
854
+ constructor() {
855
+ this.modalStack = [], this.baseZIndex = 1e3;
856
+ }
838
857
  open(t = {}) {
839
- const n = `modal-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`, o = document.createElement("div");
840
- o.setAttribute("data-vt-modal", n), document.body.appendChild(o);
841
- const l = P(!0), s = this.baseZIndex + this.modalStack.length * 10, i = Fe({
858
+ const o = `modal-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`, n = document.createElement("div");
859
+ n.setAttribute("data-vt-modal", o), document.body.appendChild(n);
860
+ const s = D(!0), l = this.baseZIndex + this.modalStack.length * 10, r = st({
842
861
  setup() {
843
- const r = () => {
844
- l.value = !1, setTimeout(() => {
845
- se.closeById(n);
862
+ const a = () => {
863
+ s.value = !1, setTimeout(() => {
864
+ re.closeById(o);
846
865
  }, 100);
847
866
  };
848
- return () => fe(Ee, {
849
- modelValue: l.value,
850
- "onUpdate:modelValue": r,
851
- title: t.title,
852
- size: t.size || "medium",
853
- showCloseButton: t.showCloseButton !== !1,
854
- closeOnBackdropClick: t.closeOnBackdropClick !== !1,
855
- onClose: r,
856
- zIndex: s
857
- }, {
858
- default: () => t.component ? fe(t.component, t.props || {}) : t.content ? fe("div", { innerHTML: t.content }) : null
859
- });
867
+ return () => ke(
868
+ Ne,
869
+ {
870
+ modelValue: s.value,
871
+ "onUpdate:modelValue": a,
872
+ title: t.title,
873
+ size: t.size || "medium",
874
+ showCloseButton: t.showCloseButton !== !1,
875
+ closeOnBackdropClick: t.closeOnBackdropClick !== !1,
876
+ onClose: a,
877
+ zIndex: l
878
+ },
879
+ {
880
+ default: () => t.component ? ke(t.component, t.props || {}) : t.content ? ke("div", { innerHTML: t.content }) : null
881
+ }
882
+ );
860
883
  }
861
884
  });
862
- i.mount(o);
863
- const a = {
864
- id: n,
865
- app: i,
866
- container: o,
867
- isOpen: l
885
+ r.mount(n);
886
+ const i = {
887
+ id: o,
888
+ app: r,
889
+ container: n,
890
+ isOpen: s
868
891
  };
869
- return this.modalStack.push(a), n;
892
+ return this.modalStack.push(i), o;
870
893
  }
871
894
  close() {
872
895
  if (this.modalStack.length > 0) {
@@ -875,10 +898,10 @@ class Cn {
875
898
  }
876
899
  }
877
900
  closeById(t) {
878
- const n = this.modalStack.findIndex((o) => o.id === t);
879
- if (n !== -1) {
880
- const o = this.modalStack[n];
881
- this.cleanupModal(o), this.modalStack.splice(n, 1), this.recalculateZIndices();
901
+ const o = this.modalStack.findIndex((n) => n.id === t);
902
+ if (o !== -1) {
903
+ const n = this.modalStack[o];
904
+ this.cleanupModal(n), this.modalStack.splice(o, 1), this.recalculateZIndices();
882
905
  }
883
906
  }
884
907
  closeAll() {
@@ -896,24 +919,24 @@ class Cn {
896
919
  recalculateZIndices() {
897
920
  }
898
921
  }
899
- const se = new Cn(), bn = {
922
+ const re = new Hn(), Pn = {
900
923
  install(e) {
901
- e.config.globalProperties.$modal = se, e.config.globalProperties.$modalStack = {
902
- closeAll: () => se.closeAll(),
903
- getCount: () => se.getOpenModalsCount(),
904
- closeById: (t) => se.closeById(t)
924
+ e.config.globalProperties.$modal = re, e.config.globalProperties.$modalStack = {
925
+ closeAll: () => re.closeAll(),
926
+ getCount: () => re.getOpenModalsCount(),
927
+ closeById: (t) => re.closeById(t)
905
928
  };
906
929
  }
907
- }, wn = { class: "vt-columns-selector-body" }, kn = { class: "vt-columns-selector" }, yn = { class: "vt-columns-selector__panel" }, xn = ["draggable", "onDragstart", "onDragover", "onDrop"], Sn = {
930
+ }, Dn = { class: "vt-columns-selector-body" }, An = { class: "vt-columns-selector" }, On = { class: "vt-columns-selector__panel" }, jn = ["draggable", "onDragstart", "onDragover", "onDrop"], Nn = {
908
931
  key: 0,
909
932
  class: "vt-columns-selector__panel-item-pinned"
910
- }, $n = { class: "vt-columns-selector__available" }, Mn = ["onClick"], Ln = {
933
+ }, Zn = { class: "vt-columns-selector__available" }, Fn = ["onClick"], Un = {
911
934
  key: 0,
912
935
  class: "vt-columns-selector__group-columns"
913
- }, In = {
936
+ }, qn = {
914
937
  key: 0,
915
938
  class: "vt-columns-selector__pinned-note"
916
- }, Rn = { class: "vt-modal__content-button" }, Bn = /* @__PURE__ */ oe({
939
+ }, Xn = { class: "vt-modal__content-button" }, Gn = /* @__PURE__ */ se({
917
940
  __name: "VTableColumnSelector",
918
941
  props: {
919
942
  columns: {},
@@ -921,189 +944,192 @@ const se = new Cn(), bn = {
921
944
  },
922
945
  emits: ["update-columns"],
923
946
  setup(e, { emit: t }) {
924
- const n = e, o = t, l = P([]), s = P(/* @__PURE__ */ new Set()), i = P(-1), a = P(-1), r = P("before"), u = S(() => {
947
+ const o = e, n = t, s = D([]), l = D(/* @__PURE__ */ new Set()), r = D(-1), i = D(-1), a = D("before"), u = x(() => {
925
948
  const d = {};
926
- return n.columnsSelector.forEach((g) => {
927
- if (g.name === "removed")
949
+ return o.columnsSelector.forEach((v) => {
950
+ if (v.name === "removed")
928
951
  return;
929
- const C = g.columns.map((I) => I.prop), w = l.value.filter((I) => C.includes(I.prop));
930
- w.length === 0 ? d[g.name] = { checked: !1, indeterminate: !1 } : w.length === g.columns.length ? d[g.name] = { checked: !0, indeterminate: !1 } : d[g.name] = { checked: !1, indeterminate: !0 };
952
+ const g = v.columns.map((B) => B.prop), w = s.value.filter((B) => g.includes(B.prop));
953
+ 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 };
931
954
  }), d;
932
- }), c = S(() => n.columnsSelector.filter((d) => d.name !== "removed")), M = (d) => d.pinnedLeft || d.pinnedRight, $ = (d) => !M(d), H = () => {
933
- const d = l.value;
934
- let g = -1;
955
+ }), c = x(() => o.columnsSelector.filter((d) => d.name !== "removed")), k = (d) => d.pinnedLeft || d.pinnedRight, S = (d) => !k(d), F = () => {
956
+ const d = s.value;
957
+ let v = -1;
935
958
  for (let w = 0; w < d.length; w++)
936
- d[w].pinnedLeft && (g = w);
937
- let C = d.length;
959
+ d[w].pinnedLeft && (v = w);
960
+ let g = d.length;
938
961
  for (let w = 0; w < d.length; w++)
939
962
  if (d[w].pinnedRight) {
940
- C = w;
963
+ g = w;
941
964
  break;
942
965
  }
943
966
  return {
944
- minIndex: g + 1,
945
- maxIndex: C - 1
967
+ minIndex: v + 1,
968
+ maxIndex: g - 1
946
969
  };
947
- }, N = (d) => {
948
- const g = H();
949
- return !(d < g.minIndex || d > g.maxIndex + 1);
950
- }, K = (d, g) => {
951
- const C = l.value[g];
952
- if (!$(C)) {
970
+ }, j = (d) => {
971
+ const v = F();
972
+ return !(d < v.minIndex || d > v.maxIndex + 1);
973
+ }, Q = (d, v) => {
974
+ const g = s.value[v];
975
+ if (!S(g)) {
953
976
  d.preventDefault();
954
977
  return;
955
978
  }
956
- i.value = g, d.dataTransfer && (d.dataTransfer.effectAllowed = "move", d.dataTransfer.setData("text/plain", C.prop)), document.body.style.cursor = "grabbing";
957
- }, Y = (d, g) => {
958
- if (i.value === -1) return;
979
+ r.value = v, d.dataTransfer && (d.dataTransfer.effectAllowed = "move", d.dataTransfer.setData("text/plain", g.prop)), document.body.style.cursor = "grabbing";
980
+ }, U = (d, v) => {
981
+ if (r.value === -1) return;
959
982
  d.preventDefault();
960
- const C = d.currentTarget.getBoundingClientRect(), w = d.clientY, I = C.top + C.height / 2;
961
- let O = g, ee = "before";
962
- w < I ? (O = g, ee = "before") : (O = g + 1, ee = "after"), i.value < O && O--, N(O) ? (a.value = g, r.value = ee, d.dataTransfer.dropEffect = "move") : (a.value = -1, d.dataTransfer.dropEffect = "none");
963
- }, q = () => {
983
+ const g = d.currentTarget.getBoundingClientRect(), w = d.clientY, B = g.top + g.height / 2;
984
+ let I = v, ee = "before";
985
+ w < B ? (I = v, ee = "before") : (I = v + 1, ee = "after"), r.value < I && I--, j(I) ? (i.value = v, a.value = ee, d.dataTransfer.dropEffect = "move") : (i.value = -1, d.dataTransfer.dropEffect = "none");
986
+ }, N = () => {
964
987
  setTimeout(() => {
965
- i.value === -1 && (a.value = -1);
988
+ r.value === -1 && (i.value = -1);
966
989
  }, 50);
967
- }, L = (d, g) => {
968
- if (d.preventDefault(), i.value === -1 || a.value === -1) {
969
- x();
990
+ }, M = (d, v) => {
991
+ if (d.preventDefault(), r.value === -1 || i.value === -1) {
992
+ T();
970
993
  return;
971
994
  }
972
- const C = d.currentTarget.getBoundingClientRect(), w = d.clientY, I = C.top + C.height / 2;
973
- let O = g;
974
- if (w >= I && (O = g + 1), i.value < O && O--, !N(O) || O === i.value) {
975
- x();
995
+ const g = d.currentTarget.getBoundingClientRect(), w = d.clientY, B = g.top + g.height / 2;
996
+ let I = v;
997
+ if (w >= B && (I = v + 1), r.value < I && I--, !j(I) || I === r.value) {
998
+ T();
976
999
  return;
977
1000
  }
978
- const ee = [...l.value], [he] = ee.splice(i.value, 1);
979
- ee.splice(O, 0, he), l.value = ee, x();
980
- }, W = () => {
981
- x();
982
- }, x = () => {
983
- i.value = -1, a.value = -1, r.value = "before", document.body.style.cursor = "";
984
- }, Z = (d) => {
985
- const g = ["vt-columns-selector__panel-item"];
986
- return i.value === d && g.push("vt-columns-selector__panel-item--dragging"), a.value === d && r.value === "before" && g.push("vt-columns-selector__panel-item--drop-before"), a.value === d && r.value === "after" && g.push("vt-columns-selector__panel-item--drop-after"), g;
987
- }, v = () => {
988
- l.value = [...n.columns.map((d) => ({ ...d }))], n.columnsSelector.forEach((d) => {
989
- d.name !== "removed" && s.value.add(d.name);
1001
+ const ee = [...s.value], [Ce] = ee.splice(r.value, 1);
1002
+ ee.splice(I, 0, Ce), s.value = ee, T();
1003
+ }, V = () => {
1004
+ T();
1005
+ }, T = () => {
1006
+ r.value = -1, i.value = -1, a.value = "before", document.body.style.cursor = "";
1007
+ }, q = (d) => {
1008
+ const v = ["vt-columns-selector__panel-item"];
1009
+ 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
+ }, y = () => {
1011
+ s.value = [...o.columns.map((d) => ({ ...d }))], o.columnsSelector.forEach((d) => {
1012
+ d.name !== "removed" && l.value.add(d.name);
990
1013
  });
991
- }, T = (d, g) => {
992
- if (g)
993
- l.value.some((C) => C.prop === d.prop) || l.value.push({ ...d });
1014
+ }, E = (d, v) => {
1015
+ if (v)
1016
+ s.value.some((g) => g.prop === d.prop) || s.value.push({ ...d });
994
1017
  else {
995
- if (M(d))
1018
+ if (k(d))
996
1019
  return;
997
- l.value = l.value.filter((C) => C.prop !== d.prop);
1020
+ s.value = s.value.filter((g) => g.prop !== d.prop);
998
1021
  }
999
- }, D = (d, g) => {
1000
- if (g)
1001
- d.columns.forEach((C) => {
1002
- l.value.some((w) => w.prop === C.prop) || l.value.push({ ...C });
1022
+ }, $ = (d, v) => {
1023
+ if (v)
1024
+ d.columns.forEach((g) => {
1025
+ s.value.some((w) => w.prop === g.prop) || s.value.push({ ...g });
1003
1026
  });
1004
1027
  else {
1005
- const C = [];
1028
+ const g = [];
1006
1029
  d.columns.forEach((w) => {
1007
- const I = l.value.find((O) => O.prop === w.prop);
1008
- I && !M(I) && C.push(I);
1009
- }), l.value = l.value.filter(
1010
- (w) => !C.some((I) => I.prop === w.prop)
1030
+ const B = s.value.find((I) => I.prop === w.prop);
1031
+ B && !k(B) && g.push(B);
1032
+ }), s.value = s.value.filter(
1033
+ (w) => !g.some((B) => B.prop === w.prop)
1011
1034
  );
1012
1035
  }
1013
- }, k = (d) => l.value.some((g) => g.prop === d.prop), z = (d) => {
1014
- const g = l.value.find((C) => C.prop === d.prop);
1015
- return !g || !M(g);
1016
- }, B = (d) => {
1017
- s.value.has(d) ? s.value.delete(d) : s.value.add(d);
1018
- }, A = () => {
1019
- o("update-columns", [...l.value]), se.close();
1020
- }, F = () => {
1021
- se.close();
1036
+ }, J = (d) => s.value.some((v) => v.prop === d.prop), m = (d) => {
1037
+ const v = s.value.find((g) => g.prop === d.prop);
1038
+ return !v || !k(v);
1039
+ }, A = (d) => {
1040
+ l.value.has(d) ? l.value.delete(d) : l.value.add(d);
1041
+ }, z = () => {
1042
+ n("update-columns", [...s.value]), re.close();
1043
+ }, G = () => {
1044
+ re.close();
1022
1045
  };
1023
- return me(() => {
1024
- v();
1025
- }), (d, g) => (p(), h("div", wn, [
1026
- f("div", kn, [
1027
- f("div", yn, [
1028
- (p(!0), h(te, null, ne(l.value, (C, w) => (p(), h("div", {
1029
- key: C.prop,
1030
- class: E(Z(w)),
1031
- draggable: $(C),
1032
- onDragstart: (I) => K(I, w),
1033
- onDragover: (I) => Y(I, w),
1034
- onDragleave: q,
1035
- onDrop: (I) => L(I, w),
1036
- onDragend: W
1046
+ return fe(() => {
1047
+ y();
1048
+ }), (d, v) => (p(), f("div", Dn, [
1049
+ _("div", An, [
1050
+ _("div", On, [
1051
+ (p(!0), f(oe, null, le(s.value, (g, w) => (p(), f("div", {
1052
+ key: g.prop,
1053
+ class: W(q(w)),
1054
+ draggable: S(g),
1055
+ onDragstart: (B) => Q(B, w),
1056
+ onDragover: (B) => U(B, w),
1057
+ onDragleave: N,
1058
+ onDrop: (B) => M(B, w),
1059
+ onDragend: V
1037
1060
  }, [
1038
- j(G, {
1039
- name: $(C) ? "columnsMove" : "freeze",
1040
- class: E(["vt-columns-selector__panel-item-icon", { "vt-columns-selector__panel-item-icon--draggable": $(C) }])
1061
+ Z(Y, {
1062
+ name: S(g) ? "columnsMove" : "freeze",
1063
+ class: W(["vt-columns-selector__panel-item-icon", { "vt-columns-selector__panel-item-icon--draggable": S(g) }])
1041
1064
  }, null, 8, ["name", "class"]),
1042
- j(ae, {
1043
- label: C.label,
1065
+ Z(de, {
1066
+ label: g.label,
1044
1067
  checked: !0,
1045
- disabled: M(C),
1046
- onChange: (I) => T(C, I),
1047
- onClick: g[0] || (g[0] = ce(() => {
1068
+ disabled: k(g),
1069
+ onChange: (B) => E(g, B),
1070
+ onClick: v[0] || (v[0] = he(() => {
1048
1071
  }, ["stop"]))
1049
1072
  }, null, 8, ["label", "disabled", "onChange"]),
1050
- M(C) ? (p(), h("span", Sn, "pinned")) : V("", !0)
1051
- ], 42, xn))), 128))
1073
+ k(g) ? (p(), f("span", Nn, "pinned")) : H("", !0)
1074
+ ], 42, jn))), 128))
1052
1075
  ]),
1053
- f("div", $n, [
1054
- (p(!0), h(te, null, ne(c.value, (C) => (p(), h("div", {
1055
- key: C.name,
1056
- class: "vt-columns-selector__group"
1057
- }, [
1058
- f("div", {
1059
- class: "vt-columns-selector__group-header",
1060
- onClick: (w) => B(C.name)
1076
+ _("div", Zn, [
1077
+ (p(!0), f(oe, null, le(c.value, (g) => {
1078
+ var w, B;
1079
+ return p(), f("div", {
1080
+ key: g.name,
1081
+ class: "vt-columns-selector__group"
1061
1082
  }, [
1062
- j(ae, {
1063
- label: C.label,
1064
- checked: u.value[C.name]?.checked || !1,
1065
- indeterminate: u.value[C.name]?.indeterminate || !1,
1066
- onChange: (w) => D(C, w),
1067
- onClick: g[1] || (g[1] = ce(() => {
1068
- }, ["stop"]))
1069
- }, null, 8, ["label", "checked", "indeterminate", "onChange"]),
1070
- C.icon ? (p(), ie(G, {
1071
- key: 0,
1072
- name: C.icon,
1073
- class: "vt-columns-selector__group-icon"
1074
- }, null, 8, ["name"])) : V("", !0)
1075
- ], 8, Mn),
1076
- s.value.has(C.name) ? (p(), h("div", Ln, [
1077
- (p(!0), h(te, null, ne(C.columns, (w) => (p(), h("div", {
1078
- key: w.prop,
1079
- class: "vt-columns-selector__group-column"
1083
+ _("div", {
1084
+ class: "vt-columns-selector__group-header",
1085
+ onClick: (I) => A(g.name)
1080
1086
  }, [
1081
- j(ae, {
1082
- label: w.label,
1083
- checked: k(w),
1084
- disabled: !z(w),
1085
- onChange: (I) => T(w, I)
1086
- }, null, 8, ["label", "checked", "disabled", "onChange"]),
1087
- z(w) ? V("", !0) : (p(), h("span", In, " (закріплена) "))
1088
- ]))), 128))
1089
- ])) : V("", !0)
1090
- ]))), 128))
1087
+ Z(de, {
1088
+ label: g.label,
1089
+ checked: ((w = u.value[g.name]) == null ? void 0 : w.checked) || !1,
1090
+ indeterminate: ((B = u.value[g.name]) == null ? void 0 : B.indeterminate) || !1,
1091
+ onChange: (I) => $(g, I),
1092
+ onClick: v[1] || (v[1] = he(() => {
1093
+ }, ["stop"]))
1094
+ }, null, 8, ["label", "checked", "indeterminate", "onChange"]),
1095
+ g.icon ? (p(), ce(Y, {
1096
+ key: 0,
1097
+ name: g.icon,
1098
+ class: "vt-columns-selector__group-icon"
1099
+ }, null, 8, ["name"])) : H("", !0)
1100
+ ], 8, Fn),
1101
+ l.value.has(g.name) ? (p(), f("div", Un, [
1102
+ (p(!0), f(oe, null, le(g.columns, (I) => (p(), f("div", {
1103
+ key: I.prop,
1104
+ class: "vt-columns-selector__group-column"
1105
+ }, [
1106
+ Z(de, {
1107
+ label: I.label,
1108
+ checked: J(I),
1109
+ disabled: !m(I),
1110
+ onChange: (ee) => E(I, ee)
1111
+ }, null, 8, ["label", "checked", "disabled", "onChange"]),
1112
+ m(I) ? H("", !0) : (p(), f("span", qn, " (закріплена) "))
1113
+ ]))), 128))
1114
+ ])) : H("", !0)
1115
+ ]);
1116
+ }), 128))
1091
1117
  ])
1092
1118
  ]),
1093
- f("div", Rn, [
1094
- j(pe, { onClick: F }, {
1095
- default: ge(() => g[2] || (g[2] = [
1096
- de("Скасувати", -1)
1119
+ _("div", Xn, [
1120
+ Z(ge, { onClick: G }, {
1121
+ default: xe(() => v[2] || (v[2] = [
1122
+ _e("Скасувати", -1)
1097
1123
  ])),
1098
1124
  _: 1,
1099
1125
  __: [2]
1100
1126
  }),
1101
- j(pe, {
1127
+ Z(ge, {
1102
1128
  type: "primary",
1103
- onClick: A
1129
+ onClick: z
1104
1130
  }, {
1105
- default: ge(() => g[3] || (g[3] = [
1106
- de("Зберегти", -1)
1131
+ default: xe(() => v[3] || (v[3] = [
1132
+ _e("Зберегти", -1)
1107
1133
  ])),
1108
1134
  _: 1,
1109
1135
  __: [3]
@@ -1111,7 +1137,7 @@ const se = new Cn(), bn = {
1111
1137
  ])
1112
1138
  ]));
1113
1139
  }
1114
- }), Tn = /* @__PURE__ */ oe({
1140
+ }), Kn = /* @__PURE__ */ se({
1115
1141
  __name: "ColumnActions",
1116
1142
  props: {
1117
1143
  column: {},
@@ -1120,103 +1146,109 @@ const se = new Cn(), bn = {
1120
1146
  },
1121
1147
  emits: ["pin", "update-columns"],
1122
1148
  setup(e, { emit: t }) {
1123
- const n = e, o = t, l = P(), s = P(), i = P(), a = P(!1), r = P(!1), u = P([]), c = async () => {
1124
- if (await Ue(), !l.value || !s.value) return;
1125
- const v = s.value.getBoundingClientRect(), T = l.value, D = T.offsetWidth, k = v.left + v.width / 2;
1126
- T.style.top = `${v.bottom - 20}px`, T.style.left = `${k - D / 2}px`;
1127
- const z = T.getBoundingClientRect();
1128
- z.right > window.innerWidth && (T.style.left = `${window.innerWidth - D - 8}px`), z.left < 0 && (T.style.left = "8px");
1129
- }, M = (v) => {
1130
- v.stopPropagation(), !r.value && (a.value ? H() : $());
1131
- }, $ = () => {
1132
- r.value || (a.value = !0, c(), i.value && (i.value.style.zIndex = "22"));
1133
- }, H = () => {
1134
- r.value = !0, a.value = !1, i.value && i.value.style.removeProperty("z-index"), setTimeout(() => {
1135
- r.value = !1;
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 it(), !s.value || !l.value) return;
1151
+ const y = l.value.getBoundingClientRect(), E = s.value, $ = E.offsetWidth, J = y.left + y.width / 2;
1152
+ E.style.top = `${y.bottom - 20}px`, E.style.left = `${J - $ / 2}px`;
1153
+ const m = E.getBoundingClientRect();
1154
+ m.right > window.innerWidth && (E.style.left = `${window.innerWidth - $ - 8}px`), m.left < 0 && (E.style.left = "8px");
1155
+ }, k = (y) => {
1156
+ y.stopPropagation(), !a.value && (i.value ? F() : S());
1157
+ }, S = () => {
1158
+ a.value || (i.value = !0, c(), r.value && (r.value.style.zIndex = "22"));
1159
+ }, F = () => {
1160
+ a.value = !0, i.value = !1, r.value && r.value.style.removeProperty("z-index"), setTimeout(() => {
1161
+ a.value = !1;
1136
1162
  }, 100);
1137
- }, N = (v) => {
1138
- !s.value?.contains(v.target) && !l.value?.contains(v.target) && H();
1139
- }, K = () => {
1140
- Z() ? (o("pin", n.column, "none"), console.log(`Колонка "${n.column.label}" відкріплена`)) : (o("pin", n.column, "left"), console.log(`Колонка "${n.column.label}" прикріплена зліва`)), H();
1141
- }, Y = (v) => ({
1163
+ }, j = (y) => {
1164
+ var E, $;
1165
+ !((E = l.value) != null && E.contains(y.target)) && !(($ = s.value) != null && $.contains(y.target)) && F();
1166
+ }, Q = () => {
1167
+ q() ? (n("pin", o.column, "none"), console.log(`Колонка "${o.column.label}" відкріплена`)) : (n("pin", o.column, "left"), console.log(`Колонка "${o.column.label}" прикріплена зліва`)), F();
1168
+ }, U = (y) => ({
1142
1169
  name: "removed",
1143
1170
  label: "Видалені колонки",
1144
1171
  order: 999,
1145
1172
  // Найвищий порядок, щоб відображались останніми
1146
- columns: v
1147
- }), q = (v) => {
1148
- const T = new Set(v.map((B) => B.prop)), D = /* @__PURE__ */ new Set();
1149
- n.columnsSelector?.forEach((B) => {
1150
- B.columns.forEach((A) => D.add(A.prop));
1151
- }), n.allColumns.forEach((B) => D.add(B.prop));
1152
- const k = [];
1153
- D.forEach((B) => {
1154
- if (!T.has(B)) {
1155
- let A;
1156
- n.columnsSelector?.forEach((F) => {
1157
- const d = F.columns.find((g) => g.prop === B);
1158
- d && (A = d);
1159
- }), A || (A = n.allColumns.find((F) => F.prop === B)), A && k.push(A);
1173
+ columns: y
1174
+ }), N = (y) => {
1175
+ var A;
1176
+ const E = new Set(y.map((z) => z.prop)), $ = /* @__PURE__ */ new Set();
1177
+ (A = o.columnsSelector) == null || A.forEach((z) => {
1178
+ z.columns.forEach((G) => $.add(G.prop));
1179
+ }), o.allColumns.forEach((z) => $.add(z.prop));
1180
+ const J = [];
1181
+ $.forEach((z) => {
1182
+ var G;
1183
+ if (!E.has(z)) {
1184
+ let d;
1185
+ (G = o.columnsSelector) == null || G.forEach((v) => {
1186
+ const g = v.columns.find((w) => w.prop === z);
1187
+ g && (d = g);
1188
+ }), d || (d = o.allColumns.find((v) => v.prop === z)), d && J.push(d);
1160
1189
  }
1161
1190
  });
1162
- const z = [...n.columnsSelector || []];
1163
- k.length > 0 && z.push(Y(k)), u.value = z;
1164
- }, L = () => {
1165
- q(n.allColumns), se.open({
1166
- component: Bn,
1191
+ const m = [...o.columnsSelector || []];
1192
+ J.length > 0 && m.push(U(J)), u.value = m;
1193
+ }, M = () => {
1194
+ N(o.allColumns), re.open({
1195
+ component: Gn,
1167
1196
  title: "Управління колонками таблиці",
1168
1197
  props: {
1169
- columns: n.allColumns,
1198
+ columns: o.allColumns,
1170
1199
  // Передаємо всі колонки
1171
1200
  columnsSelector: u.value,
1172
1201
  // Передаємо оновлені доступні колонки
1173
- "onUpdate-columns": (v) => {
1174
- console.log("ColumnActions отримав оновлені колонки:", v), o("update-columns", v), q(v);
1202
+ "onUpdate-columns": (y) => {
1203
+ console.log("ColumnActions отримав оновлені колонки:", y), n("update-columns", y), N(y);
1175
1204
  }
1176
1205
  },
1177
1206
  size: "large",
1178
1207
  closeOnBackdropClick: !1
1179
- }), H();
1180
- }, W = () => n.column.pinnedLeft, x = () => n.column.pinnedRight, Z = () => W() || x();
1181
- return me(() => {
1182
- document.addEventListener("click", N), s.value && (i.value = s.value.closest("th")), q(n.allColumns);
1183
- }), Te(() => {
1184
- document.removeEventListener("click", N);
1185
- }), (v, T) => (p(), h("div", {
1208
+ }), F();
1209
+ }, V = () => o.column.pinnedLeft, T = () => o.column.pinnedRight, q = () => V() || T();
1210
+ return fe(() => {
1211
+ document.addEventListener("click", j), l.value && (r.value = l.value.closest("th")), N(o.allColumns);
1212
+ }), $e(() => {
1213
+ document.removeEventListener("click", j);
1214
+ }), (y, E) => (p(), f("div", {
1186
1215
  ref_key: "triggerRef",
1187
- ref: s,
1216
+ ref: l,
1188
1217
  class: "vt-table-header-actions",
1189
- onClick: M
1218
+ onClick: k
1190
1219
  }, [
1191
- j(G, { name: "listBullet" }),
1192
- a.value ? (p(), h("ul", {
1220
+ Z(Y, { name: "listBullet" }),
1221
+ i.value ? (p(), f("ul", {
1193
1222
  key: 0,
1194
1223
  ref_key: "menuRef",
1195
- ref: l,
1196
- class: E(["dropdown-menu", "vt-table-dropdown", { visible: a.value }])
1224
+ ref: s,
1225
+ class: W(["dropdown-menu", "vt-table-dropdown", { visible: i.value }])
1197
1226
  }, [
1198
- f("li", { onClick: K }, [
1199
- j(G, {
1200
- name: Z() ? "unfreeze" : "freeze"
1227
+ _("li", { onClick: Q }, [
1228
+ Z(Y, {
1229
+ name: q() ? "unfreeze" : "freeze"
1201
1230
  }, null, 8, ["name"]),
1202
- f("span", null, Q(Z() ? "Розморозити" : "Заморозити"), 1)
1231
+ _("span", null, te(q() ? "Розморозити" : "Заморозити"), 1)
1203
1232
  ]),
1204
- f("li", { onClick: L }, [
1205
- j(G, { name: "columnInsert" }),
1206
- T[0] || (T[0] = f("span", null, "Колонки", -1))
1233
+ _("li", { onClick: M }, [
1234
+ Z(Y, { name: "columnInsert" }),
1235
+ E[0] || (E[0] = _("span", null, "Колонки", -1))
1207
1236
  ])
1208
- ], 2)) : V("", !0)
1237
+ ], 2)) : H("", !0)
1209
1238
  ], 512));
1210
1239
  }
1211
- }), zn = { class: "vt-table" }, En = { class: "vt-th__content" }, Wn = { class: "vt-th__content" }, Vn = { class: "vt-th__label" }, Dn = {
1240
+ }), Yn = { class: "vt-table" }, Jn = { class: "vt-th__content" }, Qn = { class: "vt-th__content" }, eo = { class: "vt-th__label" }, to = {
1212
1241
  key: 0,
1213
1242
  class: "vt-th__sortable"
1214
- }, Pn = ["data-resizer", "onMousedown"], Hn = ["onClick"], An = { class: "vt-table__cell-content" }, On = { class: "vt-table__cell-content vt-table__cell-content--ellipsis" }, jn = { key: 1 }, Nn = ["data-resizer", "onMousedown"], Zn = {
1243
+ }, no = ["data-resizer", "onMousedown"], oo = {
1244
+ key: 0,
1245
+ class: "vt-table__empty-row"
1246
+ }, lo = ["colspan"], so = { class: "vt-table__empty-content" }, io = ["onClick"], ao = { class: "vt-table__cell-content" }, ro = { class: "vt-table__cell-content vt-table__cell-content--ellipsis" }, co = { key: 1 }, uo = ["data-resizer", "onMousedown"], po = {
1215
1247
  key: 0,
1216
1248
  class: "vt-table__summary"
1217
- }, Fn = { class: "vt-table__cell-content vt-table__cell-content--summary" }, _e = 50, Un = /* @__PURE__ */ oe({
1249
+ }, mo = { class: "vt-table__cell-content vt-table__cell-content--summary" }, ye = 50, ho = /* @__PURE__ */ se({
1218
1250
  __name: "VTable",
1219
- props: /* @__PURE__ */ we({
1251
+ props: /* @__PURE__ */ Re({
1220
1252
  data: {},
1221
1253
  maxHeight: {},
1222
1254
  defaultSort: {},
@@ -1234,306 +1266,352 @@ const se = new Cn(), bn = {
1234
1266
  columns: { required: !1 },
1235
1267
  columnsModifiers: {}
1236
1268
  }),
1237
- emits: /* @__PURE__ */ we(["sort-change", "selection-change", "current-change", "row-click", "update:columns", "column-pin", "column-resize", "column-visibility", "column-sort", "columns-change"], ["update:columns"]),
1238
- setup(e, { expose: t, emit: n }) {
1239
- const o = e, l = qe(e, "columns"), s = n, i = P({}), a = P(), r = Xe([]), u = P(o.defaultSort || null), c = S(() => l.value !== void 0), M = () => {
1240
- c.value && l.value ? r.splice(0, r.length, ...l.value) : o.columns && r.splice(0, r.length, ...o.columns);
1269
+ emits: /* @__PURE__ */ Re(["sort-change", "selection-change", "current-change", "row-click", "update:columns", "column-pin", "column-resize", "column-visibility", "column-sort", "columns-change", "infinity-scroll"], ["update:columns"]),
1270
+ setup(e, { expose: t, emit: o }) {
1271
+ const n = e, s = at(e, "columns"), l = o, r = D({}), i = D(), a = rt([]), 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 j = null;
1273
+ const Q = () => {
1274
+ c.value && s.value ? a.splice(0, a.length, ...s.value) : n.columns && a.splice(0, a.length, ...n.columns);
1241
1275
  };
1242
- ue(
1243
- () => l.value,
1244
- (m) => {
1245
- m && c.value && r.splice(0, r.length, ...m);
1276
+ ve(
1277
+ () => s.value,
1278
+ (h) => {
1279
+ h && c.value && a.splice(0, a.length, ...h);
1246
1280
  },
1247
1281
  { deep: !0 }
1248
- ), ue(
1249
- () => o.columns,
1250
- (m) => {
1251
- m && !c.value && r.splice(0, r.length, ...m);
1282
+ ), ve(
1283
+ () => n.columns,
1284
+ (h) => {
1285
+ h && !c.value && a.splice(0, a.length, ...h);
1252
1286
  },
1253
1287
  { deep: !0 }
1254
- ), Ge("vt-table-columns", r);
1255
- const { sortedColumns: $, getDefaultColumnWidth: H, getStickyOffset: N } = pn(r), { getTableWrapperStyle: K, getColumnStyle: Y, getHeaderStyle: q, getFooterStyle: L } = mn(o), { onMouseDown: W } = hn(), x = S(() => gn(o.data, u.value, r)), Z = S(() => o.allData || o.data), v = o.selectable ? vn(o, x, s, Z) : null, T = () => ({
1256
- width: `${_e}px`,
1257
- minWidth: `${_e}px`,
1258
- maxWidth: `${_e}px`,
1288
+ ), ct("vt-table-columns", a);
1289
+ const { sortedColumns: U, getDefaultColumnWidth: N, getStickyOffset: M } = Bn(a), { getTableWrapperStyle: V, getColumnStyle: T, getHeaderStyle: q, getFooterStyle: y } = Rn(n), { onMouseDown: E } = Tn(), $ = x(() => Vn(n.data, u.value, a)), J = x(() => n.allData || n.data), m = n.selectable ? zn(n, $, l, J) : null, A = () => ({
1290
+ width: `${ye}px`,
1291
+ minWidth: `${ye}px`,
1292
+ maxWidth: `${ye}px`,
1259
1293
  left: "0px",
1260
1294
  position: "sticky",
1261
1295
  zIndex: 10
1262
- }), D = () => {
1263
- const m = T();
1264
- return o.maxHeight ? {
1265
- ...m,
1296
+ }), z = () => {
1297
+ const h = A();
1298
+ return n.maxHeight ? {
1299
+ ...h,
1266
1300
  top: "0px",
1267
1301
  zIndex: 11
1268
1302
  // Вищий z-index для header
1269
- } : m;
1270
- }, k = () => {
1271
- const m = T();
1272
- return o.maxHeight ? {
1273
- ...m,
1303
+ } : h;
1304
+ }, G = () => {
1305
+ const h = A();
1306
+ return n.maxHeight ? {
1307
+ ...h,
1274
1308
  bottom: "0px",
1275
1309
  zIndex: 11
1276
1310
  // Вищий z-index для footer
1277
- } : m;
1278
- }, z = (m, b) => {
1279
- _n(m, b, (R) => {
1280
- u.value?.prop === m.prop && u.value.direction === b ? u.value = null : u.value = R, s("sort-change", {
1281
- column: m,
1282
- direction: u.value?.direction || null,
1283
- prop: m.prop,
1284
- sortedData: x.value
1311
+ } : h;
1312
+ }, d = () => {
1313
+ if (!i.value || S.value) return;
1314
+ const h = i.value, C = h.scrollTop, L = h.scrollHeight, R = h.clientHeight, P = 30;
1315
+ j && clearTimeout(j), j = setTimeout(() => {
1316
+ const ue = C - F.value, pe = ue > 1, b = L - C - R <= P, ne = L - C - R <= 5;
1317
+ console.log("Scroll debug:", {
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(() => {
1326
+ S.value = !1;
1327
+ }, 1e3));
1328
+ }, 50);
1329
+ }, v = () => {
1330
+ S.value = !1;
1331
+ };
1332
+ fe(() => {
1333
+ i.value && i.value.addEventListener("scroll", d);
1334
+ }), $e(() => {
1335
+ j && clearTimeout(j), i.value && i.value.removeEventListener("scroll", d);
1336
+ });
1337
+ const g = (h, C) => {
1338
+ Wn(h, C, (L) => {
1339
+ var R, P;
1340
+ ((R = u.value) == null ? void 0 : R.prop) === h.prop && u.value.direction === C ? u.value = null : u.value = L, l("sort-change", {
1341
+ column: h,
1342
+ direction: ((P = u.value) == null ? void 0 : P.direction) || null,
1343
+ prop: h.prop,
1344
+ sortedData: $.value
1285
1345
  });
1286
1346
  });
1287
- }, B = (m, b) => {
1288
- console.log(`Колонка "${m.label}" закріплення: ${b}`);
1289
- const R = {
1290
- pinnedLeft: b === "left",
1291
- pinnedRight: b === "right"
1347
+ }, w = (h, C) => {
1348
+ const L = {
1349
+ pinnedLeft: C === "left",
1350
+ pinnedRight: C === "right"
1292
1351
  };
1293
- F(m.prop, R), s("column-pin", { column: { ...m, ...R }, position: b });
1294
- }, A = (m) => {
1295
- console.log("handleColumnsUpdate викликано з колонками:", m), r.splice(0, r.length, ...m), c.value && (l.value = [...m]), s("columns-change", [...m]);
1296
- }, F = (m, b) => {
1297
- console.log("updateColumn викликано:", { prop: m, updates: b, hasColumnsModel: c.value });
1298
- const R = r.findIndex((_) => _.prop === m);
1299
- if (R !== -1) {
1300
- if (console.log("Оновлюємо internalColumns:", R, b), Object.assign(r[R], b), c.value && l.value) {
1301
- const _ = l.value.findIndex((y) => y.prop === m);
1302
- if (_ !== -1) {
1303
- const y = [...l.value];
1304
- y[_] = { ...y[_], ...b }, console.log("Оновлюємо через defineModel:", y), l.value = y;
1352
+ I(h.prop, L), l("column-pin", { column: { ...h, ...L }, position: C });
1353
+ }, B = (h) => {
1354
+ a.splice(0, a.length, ...h), c.value && (s.value = [...h]), l("columns-change", [...h]);
1355
+ }, I = (h, C) => {
1356
+ const L = a.findIndex((R) => R.prop === h);
1357
+ if (L !== -1) {
1358
+ if (Object.assign(a[L], C), c.value && s.value) {
1359
+ const R = s.value.findIndex((P) => P.prop === h);
1360
+ if (R !== -1) {
1361
+ const P = [...s.value];
1362
+ P[R] = { ...P[R], ...C }, s.value = P;
1305
1363
  }
1306
1364
  }
1307
- s("columns-change", [...r]);
1365
+ l("columns-change", [...a]);
1308
1366
  } else
1309
1367
  console.error(
1310
1368
  "Колонку не знайдено:",
1311
- m,
1369
+ h,
1312
1370
  "Доступні колонки:",
1313
- r.map((_) => _.prop)
1371
+ a.map((R) => R.prop)
1314
1372
  );
1315
- }, d = (m, b, R) => {
1316
- s("row-click", { row: m, column: b, event: R }), o.highlightCurrentRow && v && v.setCurrentRow(m);
1317
- }, g = (m, b, R) => {
1318
- R.stopPropagation(), v && v.toggleRowSelection(b, m);
1319
- }, C = (m, b) => {
1320
- b.stopPropagation(), v && v.toggleAllSelection(), m === void 0 && console.log(m);
1321
- }, w = (m, b) => {
1322
- m && (i.value[b] = m);
1323
- }, I = (m, b) => {
1324
- const R = b.width || H();
1325
- console.log(R), W(m, b, H, (_) => {
1326
- console.log(_), F(b.prop, { width: _ }), s("column-resize", {
1327
- column: { ...b, width: _ },
1328
- width: _,
1329
- oldWidth: R
1373
+ }, ee = (h, C, L) => {
1374
+ l("row-click", { row: h, column: C, event: L }), n.highlightCurrentRow && m && m.setCurrentRow(h);
1375
+ }, Ce = (h, C, L) => {
1376
+ L.stopPropagation(), m && m.toggleRowSelection(C, h);
1377
+ }, Ze = (h, C) => {
1378
+ C.stopPropagation(), m && m.toggleAllSelection();
1379
+ }, Le = (h, C) => {
1380
+ h && (r.value[C] = h);
1381
+ }, Ie = (h, C) => {
1382
+ const L = C.width || N();
1383
+ E(h, C, N, (R) => {
1384
+ I(C.prop, { width: R }), l("column-resize", {
1385
+ column: { ...C, width: R },
1386
+ width: R,
1387
+ oldWidth: L
1330
1388
  });
1331
1389
  });
1332
- }, O = (m, b) => Y(m, b, N, H), ee = (m, b) => q(m, b, N, H), he = (m, b) => L(m, b, N, H), We = (m, b) => {
1333
- if (!b || !b.prop) return "";
1334
- const R = m[b.prop];
1335
- return R == null ? "" : String(R);
1336
- }, Ve = S(() => {
1337
- if (!o.showSummary) return {};
1338
- const m = r;
1339
- if (typeof o.summaryMethod == "function") {
1340
- const b = o.summaryMethod({ columns: m, data: x.value });
1341
- return m.reduce(
1342
- (R, _, y) => (R[_.prop] = b[y], R),
1390
+ }, Fe = (h, C) => T(h, C, M, N), Ue = (h, C) => q(h, C, M, N), qe = (h, C) => y(h, C, M, N), Xe = (h, C) => {
1391
+ if (!C || !C.prop) return "";
1392
+ const L = h[C.prop];
1393
+ return L == null ? "" : String(L);
1394
+ }, Ge = x(() => {
1395
+ if (!n.showSummary || !k.value) return {};
1396
+ const h = a;
1397
+ if (typeof n.summaryMethod == "function") {
1398
+ const C = n.summaryMethod({ columns: h, data: $.value });
1399
+ return h.reduce(
1400
+ (L, R, P) => (L[R.prop] = C[P], L),
1343
1401
  {}
1344
1402
  );
1345
1403
  }
1346
- return m.reduce(
1347
- (b, R) => {
1348
- const _ = x.value.map((y) => y[R.prop]);
1349
- return b[R.prop] = _.every((y) => typeof y == "number") ? _.reduce((y, J) => y + J, 0) : "", b;
1404
+ return h.reduce(
1405
+ (C, L) => {
1406
+ const R = $.value.map((P) => P[L.prop]);
1407
+ return C[L.prop] = R.every((P) => typeof P == "number") ? R.reduce((P, ue) => P + ue, 0) : "", C;
1350
1408
  },
1351
1409
  {}
1352
1410
  );
1353
- }), De = (m, b) => {
1354
- v && v.toggleRowSelection(m, b);
1355
- }, Pe = () => {
1356
- v && v.toggleAllSelection();
1357
- }, He = () => {
1358
- v && v.selectAbsolutelyAll();
1359
- }, Ae = () => {
1360
- v && v.clearSelection();
1361
- }, Oe = () => v ? v.getSelectionRows() : [], je = (m) => {
1362
- v && v.setSelectionRows(m);
1411
+ }), Ke = x(() => n.showSummary && k.value), Ye = (h, C) => {
1412
+ m && m.toggleRowSelection(h, C);
1413
+ }, Je = () => {
1414
+ m && m.toggleAllSelection();
1415
+ }, Qe = () => {
1416
+ m && m.selectAbsolutelyAll();
1417
+ }, et = () => {
1418
+ m && m.clearSelection();
1419
+ }, tt = () => m ? m.getSelectionRows() : [], nt = (h) => {
1420
+ m && m.setSelectionRows(h);
1363
1421
  };
1364
- return me(() => {
1365
- M();
1422
+ return fe(() => {
1423
+ Q();
1366
1424
  }), t({
1367
- toggleRowSelection: De,
1368
- toggleAllSelection: Pe,
1369
- selectAbsolutelyAll: He,
1370
- clearSelection: Ae,
1371
- getSelectionRows: Oe,
1372
- setSelectionRows: je
1373
- }), (m, b) => {
1374
- const R = Be("tooltip");
1375
- return p(), h("div", {
1425
+ toggleRowSelection: Ye,
1426
+ toggleAllSelection: Je,
1427
+ selectAbsolutelyAll: Qe,
1428
+ clearSelection: et,
1429
+ getSelectionRows: tt,
1430
+ setSelectionRows: nt,
1431
+ resetInfinityScroll: v
1432
+ // Додаємо метод для скидання infinity scroll
1433
+ }), (h, C) => {
1434
+ var R, P, ue, pe;
1435
+ const L = Oe("tooltip");
1436
+ return p(), f("div", {
1376
1437
  ref_key: "tableWrapperRef",
1377
- ref: a,
1438
+ ref: i,
1378
1439
  class: "vt-table-wrapper",
1379
- style: le(U(K)())
1440
+ style: ae(X(V)()),
1441
+ onScroll: d
1380
1442
  }, [
1381
- re(m.$slots, "default"),
1382
- f("table", zn, [
1383
- f("thead", null, [
1384
- f("tr", null, [
1385
- o.selectable ? (p(), h("th", {
1443
+ me(h.$slots, "default"),
1444
+ _("table", Yn, [
1445
+ _("thead", null, [
1446
+ _("tr", null, [
1447
+ n.selectable ? (p(), f("th", {
1386
1448
  key: 0,
1387
- class: E(["vt-table__th vt-table__th--selection", {
1388
- "vt-table__th--sticky": o.maxHeight,
1449
+ class: W(["vt-table__th vt-table__th--selection", {
1450
+ "vt-table__th--sticky": n.maxHeight,
1389
1451
  "vt-table__th--pinned-left": !0
1390
1452
  }]),
1391
- style: le(D())
1453
+ style: ae(z())
1392
1454
  }, [
1393
- f("div", En, [
1394
- j(ae, {
1395
- checked: U(v)?.isAllSelected.value,
1396
- indeterminate: U(v)?.isIndeterminate.value,
1397
- "is-double": U(v)?.isDoubleCheck?.value,
1398
- onChange: C
1455
+ _("div", Jn, [
1456
+ Z(de, {
1457
+ checked: (R = X(m)) == null ? void 0 : R.isAllSelected.value,
1458
+ indeterminate: (P = X(m)) == null ? void 0 : P.isIndeterminate.value,
1459
+ "is-double": (pe = (ue = X(m)) == null ? void 0 : ue.isDoubleCheck) == null ? void 0 : pe.value,
1460
+ onChange: Ze
1399
1461
  }, null, 8, ["checked", "indeterminate", "is-double"])
1400
1462
  ])
1401
- ], 6)) : V("", !0),
1402
- (p(!0), h(te, null, ne(U($), (_, y) => (p(), h("th", {
1403
- key: _.prop,
1463
+ ], 6)) : H("", !0),
1464
+ (p(!0), f(oe, null, le(X(U), (b, ne) => (p(), f("th", {
1465
+ key: b.prop,
1404
1466
  ref_for: !0,
1405
- ref: (J) => w(J, _.prop),
1406
- style: le(ee(_, y)),
1407
- class: E([
1467
+ ref: (ie) => Le(ie, b.prop),
1468
+ style: ae(Ue(b, ne)),
1469
+ class: W([
1408
1470
  "vt-table__th",
1409
1471
  {
1410
- "vt-table__th--sticky": o.maxHeight,
1411
- "vt-table__th--pinned-left": _.pinnedLeft,
1412
- "vt-table__th--pinned-right": _.pinnedRight,
1413
- "vt-table__th--sortable": _.sortable
1472
+ "vt-table__th--sticky": n.maxHeight,
1473
+ "vt-table__th--pinned-left": b.pinnedLeft,
1474
+ "vt-table__th--pinned-right": b.pinnedRight,
1475
+ "vt-table__th--sortable": b.sortable
1414
1476
  }
1415
1477
  ])
1416
1478
  }, [
1417
- f("div", Wn, [
1418
- f("div", Vn, Q(_.label), 1),
1419
- _.sortable ? (p(), h("div", Dn, [
1420
- j(G, {
1479
+ _("div", Qn, [
1480
+ _("div", eo, te(b.label), 1),
1481
+ b.sortable ? (p(), f("div", to, [
1482
+ Z(Y, {
1421
1483
  name: "arrowTop",
1422
- class: E(U(ye)(_, u.value).asc),
1423
- onClick: ce((J) => z(_, "asc"), ["stop"])
1484
+ class: W(X(ze)(b, u.value).asc),
1485
+ onClick: he((ie) => g(b, "asc"), ["stop"])
1424
1486
  }, null, 8, ["class", "onClick"]),
1425
- j(G, {
1487
+ Z(Y, {
1426
1488
  name: "arrowDown",
1427
- class: E(U(ye)(_, u.value).desc),
1428
- onClick: ce((J) => z(_, "desc"), ["stop"])
1489
+ class: W(X(ze)(b, u.value).desc),
1490
+ onClick: he((ie) => g(b, "desc"), ["stop"])
1429
1491
  }, null, 8, ["class", "onClick"])
1430
- ])) : V("", !0),
1431
- _.actionColumn ? (p(), ie(Tn, {
1492
+ ])) : H("", !0),
1493
+ b.actionColumn ? (p(), ce(Kn, {
1432
1494
  key: 1,
1433
- column: _,
1434
- "all-columns": U($),
1435
- columnsSelector: o.columnsSelector,
1436
- onPin: B,
1437
- onUpdateColumns: A
1438
- }, null, 8, ["column", "all-columns", "columnsSelector"])) : V("", !0)
1495
+ column: b,
1496
+ "all-columns": X(U),
1497
+ columnsSelector: n.columnsSelector,
1498
+ onPin: w,
1499
+ onUpdateColumns: B
1500
+ }, null, 8, ["column", "all-columns", "columnsSelector"])) : H("", !0)
1439
1501
  ]),
1440
- f("div", {
1502
+ _("div", {
1441
1503
  class: "vt-table__resizer",
1442
- "data-resizer": _.prop,
1443
- onMousedown: (J) => I(J, _)
1444
- }, null, 40, Pn)
1504
+ "data-resizer": b.prop,
1505
+ onMousedown: (ie) => Ie(ie, b)
1506
+ }, null, 40, no)
1445
1507
  ], 6))), 128))
1446
1508
  ])
1447
1509
  ]),
1448
- f("tbody", null, [
1449
- (p(!0), h(te, null, ne(x.value, (_) => (p(), h("tr", {
1450
- key: _.id,
1451
- class: E([
1452
- "vt-table__row",
1453
- {
1454
- "vt-table__row--selected": U(v)?.isRowSelected(_),
1455
- "vt-table__row--current": U(v)?.currentRow.value === _,
1456
- "vt-table__row--clickable": o.selectOnClickRow || o.highlightCurrentRow
1457
- }
1458
- ]),
1459
- onClick: (y) => d(_, U($)[0], y)
1460
- }, [
1461
- o.selectable ? (p(), h("td", {
1462
- key: 0,
1463
- class: E(["vt-table__td vt-table__td--selection", {
1464
- "vt-table__td--pinned-left": !0
1465
- }]),
1466
- style: le(T())
1467
- }, [
1468
- f("div", An, [
1469
- j(ae, {
1470
- checked: U(v)?.isRowSelected(_),
1471
- onChange: (y, J) => g(y, _, J)
1472
- }, null, 8, ["checked", "onChange"])
1473
- ])
1474
- ], 4)) : V("", !0),
1475
- (p(!0), h(te, null, ne(U($), (y, J) => (p(), h("td", {
1476
- key: y.prop,
1477
- ref_for: !0,
1478
- ref: (ve) => w(ve, y.prop),
1479
- style: le(O(y, J)),
1480
- class: E([
1481
- "vt-table__td",
1510
+ _("tbody", null, [
1511
+ k.value ? (p(!0), f(oe, { key: 1 }, le($.value, (b) => {
1512
+ var ne, ie, Be;
1513
+ return p(), f("tr", {
1514
+ key: b.id,
1515
+ class: W([
1516
+ "vt-table__row",
1482
1517
  {
1483
- "vt-table__td--pinned-left": y.pinnedLeft,
1484
- "vt-table__td--pinned-right": y.pinnedRight
1518
+ "vt-table__row--selected": (ne = X(m)) == null ? void 0 : ne.isRowSelected(b),
1519
+ "vt-table__row--current": ((ie = X(m)) == null ? void 0 : ie.currentRow.value) === b,
1520
+ "vt-table__row--clickable": n.selectOnClickRow || n.highlightCurrentRow
1485
1521
  }
1486
- ])
1487
- }, [
1488
- be((p(), h("div", On, [
1489
- y.renderSlot ? (p(), ie(Ie(y.renderSlot), {
1490
- key: 0,
1491
- row: _,
1492
- column: y,
1493
- value: _[y.prop]
1494
- }, null, 8, ["row", "column", "value"])) : (p(), h("span", jn, Q(_[y.prop]), 1))
1495
- ])), [
1496
- [R, y.showOverflowTooltip ? We(_, y) : null]
1497
1522
  ]),
1498
- f("div", {
1499
- class: "vt-table__resizer",
1500
- "data-resizer": y.prop,
1501
- onMousedown: (ve) => I(ve, y)
1502
- }, null, 40, Nn)
1503
- ], 6))), 128))
1504
- ], 10, Hn))), 128))
1523
+ onClick: (O) => ee(b, X(U)[0], O)
1524
+ }, [
1525
+ n.selectable ? (p(), f("td", {
1526
+ key: 0,
1527
+ class: W(["vt-table__td vt-table__td--selection", {
1528
+ "vt-table__td--pinned-left": !0
1529
+ }]),
1530
+ style: ae(A())
1531
+ }, [
1532
+ _("div", ao, [
1533
+ Z(de, {
1534
+ checked: (Be = X(m)) == null ? void 0 : Be.isRowSelected(b),
1535
+ onChange: (O, be) => Ce(O, b, be)
1536
+ }, null, 8, ["checked", "onChange"])
1537
+ ])
1538
+ ], 4)) : H("", !0),
1539
+ (p(!0), f(oe, null, le(X(U), (O, be) => (p(), f("td", {
1540
+ key: O.prop,
1541
+ ref_for: !0,
1542
+ ref: (we) => Le(we, O.prop),
1543
+ style: ae(Fe(O, be)),
1544
+ class: W([
1545
+ "vt-table__td",
1546
+ {
1547
+ "vt-table__td--pinned-left": O.pinnedLeft,
1548
+ "vt-table__td--pinned-right": O.pinnedRight
1549
+ }
1550
+ ])
1551
+ }, [
1552
+ Me((p(), f("div", ro, [
1553
+ O.renderSlot ? (p(), ce(De(O.renderSlot), {
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))
1559
+ ])), [
1560
+ [L, O.showOverflowTooltip ? Xe(b, O) : null]
1561
+ ]),
1562
+ _("div", {
1563
+ class: "vt-table__resizer",
1564
+ "data-resizer": O.prop,
1565
+ onMousedown: (we) => Ie(we, O)
1566
+ }, null, 40, uo)
1567
+ ], 6))), 128))
1568
+ ], 10, io);
1569
+ }), 128)) : (p(), f("tr", oo, [
1570
+ _("td", {
1571
+ colspan: X(U).length + (n.selectable ? 1 : 0),
1572
+ class: "vt-table__empty-cell"
1573
+ }, [
1574
+ _("div", so, [
1575
+ Z(Y, {
1576
+ name: "empty",
1577
+ class: "vt-table__empty-icon"
1578
+ }),
1579
+ C[0] || (C[0] = _("span", { class: "vt-table__empty-text" }, "Немає даних!", -1))
1580
+ ])
1581
+ ], 8, lo)
1582
+ ]))
1505
1583
  ]),
1506
- o.showSummary ? (p(), h("tfoot", Zn, [
1507
- f("tr", null, [
1508
- o.selectable ? (p(), h("td", {
1584
+ Ke.value ? (p(), f("tfoot", po, [
1585
+ _("tr", null, [
1586
+ n.selectable ? (p(), f("td", {
1509
1587
  key: 0,
1510
- class: E(["vt-table__td", {
1588
+ class: W(["vt-table__td", {
1511
1589
  "vt-table__td--pinned-left": !0
1512
1590
  }]),
1513
- style: le(k())
1514
- }, b[0] || (b[0] = [
1515
- f("div", { class: "vt-table__cell-content vt-table__cell-content--summary" }, null, -1)
1516
- ]), 4)) : V("", !0),
1517
- (p(!0), h(te, null, ne(U($), (_, y) => (p(), h("td", {
1518
- key: _.prop,
1519
- style: le(he(_, y)),
1520
- class: E([
1591
+ style: ae(G())
1592
+ }, C[1] || (C[1] = [
1593
+ _("div", { class: "vt-table__cell-content vt-table__cell-content--summary" }, null, -1)
1594
+ ]), 4)) : H("", !0),
1595
+ (p(!0), f(oe, null, le(X(U), (b, ne) => (p(), f("td", {
1596
+ key: b.prop,
1597
+ style: ae(qe(b, ne)),
1598
+ class: W([
1521
1599
  "vt-table__td",
1522
1600
  {
1523
- "vt-table__td--pinned-left": _.pinnedLeft,
1524
- "vt-table__td--pinned-right": _.pinnedRight
1601
+ "vt-table__td--pinned-left": b.pinnedLeft,
1602
+ "vt-table__td--pinned-right": b.pinnedRight
1525
1603
  }
1526
1604
  ])
1527
1605
  }, [
1528
- f("div", Fn, Q(Ve.value[_.prop]), 1)
1606
+ _("div", mo, te(Ge.value[b.prop]), 1)
1529
1607
  ], 6))), 128))
1530
1608
  ])
1531
- ])) : V("", !0)
1609
+ ])) : H("", !0)
1532
1610
  ])
1533
- ], 4);
1611
+ ], 36);
1534
1612
  };
1535
1613
  }
1536
- }), qn = /* @__PURE__ */ oe({
1614
+ }), vo = /* @__PURE__ */ se({
1537
1615
  __name: "VTableColumn",
1538
1616
  props: {
1539
1617
  prop: {},
@@ -1551,11 +1629,11 @@ const se = new Cn(), bn = {
1551
1629
  sortMethod: {}
1552
1630
  },
1553
1631
  setup(e) {
1554
- const t = e, n = Re(), o = Ke("vt-table-columns");
1555
- o || console.error(
1632
+ const t = e, o = Ae(), n = ut("vt-table-columns");
1633
+ n || console.error(
1556
1634
  "VTableColumn: не знайдено контекст таблиці. Переконайтеся, що компонент використовується всередині VTable."
1557
1635
  );
1558
- const l = () => ({
1636
+ const s = () => ({
1559
1637
  prop: t.prop,
1560
1638
  label: t.label,
1561
1639
  width: t.width,
@@ -1568,15 +1646,15 @@ const se = new Cn(), bn = {
1568
1646
  showOverflowTooltip: t.showOverflowTooltip,
1569
1647
  selectable: t.selectable,
1570
1648
  // Зберігаємо слот - пріоритет: назва колонки -> default -> slot
1571
- renderSlot: n[t.prop] ?? n.default ?? n.slot
1649
+ renderSlot: o[t.prop] ?? o.default ?? o.slot
1572
1650
  });
1573
- let s = -1;
1574
- return me(() => {
1575
- if (o) {
1576
- const i = l();
1577
- o.push(i), s = o.length - 1, console.log(`VTableColumn: зареєстровано колонку "${t.label}" (${t.prop}) на позиції ${s}`);
1651
+ let l = -1;
1652
+ return fe(() => {
1653
+ if (n) {
1654
+ const r = s();
1655
+ n.push(r), l = n.length - 1;
1578
1656
  }
1579
- }), ue(
1657
+ }), ve(
1580
1658
  () => [
1581
1659
  t.width,
1582
1660
  t.minWidth,
@@ -1590,29 +1668,29 @@ const se = new Cn(), bn = {
1590
1668
  t.label
1591
1669
  ],
1592
1670
  () => {
1593
- if (o && s !== -1) {
1594
- const i = o.findIndex((a) => a.prop === t.prop);
1595
- if (i !== -1) {
1596
- const a = o[i], r = {
1597
- ...l(),
1598
- renderSlot: a.renderSlot
1671
+ if (n && l !== -1) {
1672
+ const r = n.findIndex((i) => i.prop === t.prop);
1673
+ if (r !== -1) {
1674
+ const i = n[r], a = {
1675
+ ...s(),
1676
+ renderSlot: i.renderSlot
1599
1677
  // Зберігаємо існуючий renderSlot
1600
1678
  };
1601
- o[i] = r, console.log(`VTableColumn: оновлено колонку "${t.label}" (${t.prop})`);
1679
+ n[r] = a;
1602
1680
  }
1603
1681
  }
1604
1682
  },
1605
1683
  { deep: !0 }
1606
- ), Te(() => {
1607
- if (o) {
1608
- const i = o.findIndex((a) => a.prop === t.prop);
1609
- i > -1 && (o.splice(i, 1), console.log(`VTableColumn: видалено колонку "${t.label}" (${t.prop})`));
1684
+ ), $e(() => {
1685
+ if (n) {
1686
+ const r = n.findIndex((i) => i.prop === t.prop);
1687
+ r > -1 && n.splice(r, 1);
1610
1688
  }
1611
- }), (i, a) => null;
1689
+ }), (r, i) => null;
1612
1690
  }
1613
- }), xe = (e, t) => {
1614
- const n = document.createElement("div");
1615
- n.className = `vt-tooltip vt-tooltip--${t}`, n.innerText = e, Object.assign(n.style, {
1691
+ }), Ee = (e, t) => {
1692
+ const o = document.createElement("div");
1693
+ o.className = `vt-tooltip vt-tooltip--${t}`, o.innerText = e, Object.assign(o.style, {
1616
1694
  position: "absolute",
1617
1695
  background: "rgba(0, 0, 0, 0.8)",
1618
1696
  color: "white",
@@ -1630,16 +1708,16 @@ const se = new Cn(), bn = {
1630
1708
  wordWrap: "break-word",
1631
1709
  whiteSpace: "normal",
1632
1710
  boxShadow: "0 2px 8px rgba(0, 0, 0, 0.2)"
1633
- }), e.length < 50 && (n.style.whiteSpace = "nowrap");
1634
- const o = document.createElement("div");
1635
- switch (o.className = "vt-tooltip__arrow", Object.assign(o.style, {
1711
+ }), e.length < 50 && (o.style.whiteSpace = "nowrap");
1712
+ const n = document.createElement("div");
1713
+ switch (n.className = "vt-tooltip__arrow", Object.assign(n.style, {
1636
1714
  position: "absolute",
1637
1715
  width: "0",
1638
1716
  height: "0",
1639
1717
  borderStyle: "solid"
1640
1718
  }), t) {
1641
1719
  case "top":
1642
- Object.assign(o.style, {
1720
+ Object.assign(n.style, {
1643
1721
  top: "100%",
1644
1722
  left: "50%",
1645
1723
  marginLeft: "-5px",
@@ -1648,7 +1726,7 @@ const se = new Cn(), bn = {
1648
1726
  });
1649
1727
  break;
1650
1728
  case "bottom":
1651
- Object.assign(o.style, {
1729
+ Object.assign(n.style, {
1652
1730
  bottom: "100%",
1653
1731
  left: "50%",
1654
1732
  marginLeft: "-5px",
@@ -1657,7 +1735,7 @@ const se = new Cn(), bn = {
1657
1735
  });
1658
1736
  break;
1659
1737
  case "left":
1660
- Object.assign(o.style, {
1738
+ Object.assign(n.style, {
1661
1739
  top: "50%",
1662
1740
  left: "100%",
1663
1741
  marginTop: "-5px",
@@ -1666,7 +1744,7 @@ const se = new Cn(), bn = {
1666
1744
  });
1667
1745
  break;
1668
1746
  case "right":
1669
- Object.assign(o.style, {
1747
+ Object.assign(n.style, {
1670
1748
  top: "50%",
1671
1749
  right: "100%",
1672
1750
  marginTop: "-5px",
@@ -1675,85 +1753,87 @@ const se = new Cn(), bn = {
1675
1753
  });
1676
1754
  break;
1677
1755
  }
1678
- return n.appendChild(o), n;
1679
- }, Ce = (e, t, n) => {
1680
- const o = t.getBoundingClientRect(), l = e.getBoundingClientRect(), s = window.pageXOffset || document.documentElement.scrollLeft, i = window.pageYOffset || document.documentElement.scrollTop;
1681
- let a = 0, r = 0;
1682
- switch (n) {
1756
+ return o.appendChild(n), o;
1757
+ }, Se = (e, t, o) => {
1758
+ const n = t.getBoundingClientRect(), s = e.getBoundingClientRect(), l = window.pageXOffset || document.documentElement.scrollLeft, r = window.pageYOffset || document.documentElement.scrollTop;
1759
+ let i = 0, a = 0;
1760
+ switch (o) {
1683
1761
  case "top":
1684
- a = o.top + i - l.height - 8, r = o.left + s + (o.width - l.width) / 2;
1762
+ i = n.top + r - s.height - 8, a = n.left + l + (n.width - s.width) / 2;
1685
1763
  break;
1686
1764
  case "bottom":
1687
- a = o.bottom + i + 8, r = o.left + s + (o.width - l.width) / 2;
1765
+ i = n.bottom + r + 8, a = n.left + l + (n.width - s.width) / 2;
1688
1766
  break;
1689
1767
  case "left":
1690
- a = o.top + i + (o.height - l.height) / 2, r = o.left + s - l.width - 8;
1768
+ i = n.top + r + (n.height - s.height) / 2, a = n.left + l - s.width - 8;
1691
1769
  break;
1692
1770
  case "right":
1693
- a = o.top + i + (o.height - l.height) / 2, r = o.right + s + 8;
1771
+ i = n.top + r + (n.height - s.height) / 2, a = n.right + l + 8;
1694
1772
  break;
1695
1773
  }
1696
1774
  const u = window.innerWidth, c = window.innerHeight;
1697
- r < 8 ? r = 8 : r + l.width > u - 8 && (r = u - l.width - 8), a < i + 8 ? n === "top" ? a = o.bottom + i + 8 : a = i + 8 : a + l.height > i + c - 8 && (n === "bottom" ? a = o.top + i - l.height - 8 : a = i + c - l.height - 8), e.style.top = `${a}px`, e.style.left = `${r}px`;
1698
- }, Se = (e, t, n) => {
1699
- e.parentElement || document.body.appendChild(e), e.style.visibility = "visible", Ce(e, t, n), requestAnimationFrame(() => {
1775
+ 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
+ }, We = (e, t, o) => {
1777
+ e.parentElement || document.body.appendChild(e), e.style.visibility = "visible", Se(e, t, o), requestAnimationFrame(() => {
1700
1778
  e.style.opacity = "1";
1701
1779
  });
1702
- }, $e = (e) => {
1780
+ }, Ve = (e) => {
1703
1781
  e.style.opacity = "0", e.style.visibility = "hidden";
1704
- }, Me = (e) => e.scrollWidth > e.clientWidth || e.scrollHeight > e.clientHeight, Le = (e) => !!e.closest(".vt-table, table"), Xn = {
1782
+ }, He = (e) => e.scrollWidth > e.clientWidth || e.scrollHeight > e.clientHeight, Pe = (e) => !!e.closest(".vt-table, table"), fo = {
1705
1783
  mounted(e, t) {
1706
- const n = t.value?.trim();
1707
- if (!n) return;
1708
- const o = e.dataset.placement || "top", l = xe(n, o);
1709
- e.__tooltipEl = l;
1710
- const s = () => {
1711
- (Le(e) ? Me(e) : !0) && Se(l, e, o);
1784
+ var a;
1785
+ const o = (a = t.value) == null ? void 0 : a.trim();
1786
+ if (!o) return;
1787
+ const n = e.dataset.placement || "top", s = Ee(o, n);
1788
+ e.__tooltipEl = s;
1789
+ const l = () => {
1790
+ (Pe(e) ? He(e) : !0) && We(s, e, n);
1791
+ }, r = () => {
1792
+ Ve(s);
1712
1793
  }, i = () => {
1713
- $e(l);
1714
- }, a = () => {
1715
- l.style.opacity === "1" && Ce(l, e, o);
1794
+ s.style.opacity === "1" && Se(s, e, n);
1716
1795
  };
1717
- e.__mouseenterHandler = s, e.__mouseleaveHandler = i, e.__scrollHandler = a, e.addEventListener("mouseenter", s), e.addEventListener("mouseleave", i), window.addEventListener("scroll", a, !0), window.addEventListener("resize", a);
1796
+ e.__mouseenterHandler = l, e.__mouseleaveHandler = r, e.__scrollHandler = i, e.addEventListener("mouseenter", l), e.addEventListener("mouseleave", r), window.addEventListener("scroll", i, !0), window.addEventListener("resize", i);
1718
1797
  },
1719
1798
  updated(e, t) {
1720
- const n = t.value?.trim();
1799
+ var n;
1800
+ const o = (n = t.value) == null ? void 0 : n.trim();
1721
1801
  if (e.__tooltipEl)
1722
- n ? e.__tooltipEl.firstChild.textContent = n : (e.__tooltipEl.parentElement && e.__tooltipEl.parentElement.removeChild(e.__tooltipEl), delete e.__tooltipEl);
1723
- else if (n) {
1724
- const o = e.dataset.placement || "top", l = xe(n, o);
1802
+ o ? e.__tooltipEl.firstChild.textContent = o : (e.__tooltipEl.parentElement && e.__tooltipEl.parentElement.removeChild(e.__tooltipEl), delete e.__tooltipEl);
1803
+ else if (o) {
1804
+ const s = e.dataset.placement || "top", l = Ee(o, s);
1725
1805
  e.__tooltipEl = l;
1726
- const s = () => {
1727
- (Le(e) ? Me(e) : !0) && Se(l, e, o);
1806
+ const r = () => {
1807
+ (Pe(e) ? He(e) : !0) && We(l, e, s);
1728
1808
  }, i = () => {
1729
- $e(l);
1809
+ Ve(l);
1730
1810
  }, a = () => {
1731
- l.style.opacity === "1" && Ce(l, e, o);
1811
+ l.style.opacity === "1" && Se(l, e, s);
1732
1812
  };
1733
- e.__mouseenterHandler = s, e.__mouseleaveHandler = i, e.__scrollHandler = a, e.addEventListener("mouseenter", s), e.addEventListener("mouseleave", i), window.addEventListener("scroll", a, !0), window.addEventListener("resize", a);
1813
+ e.__mouseenterHandler = r, e.__mouseleaveHandler = i, e.__scrollHandler = a, e.addEventListener("mouseenter", r), e.addEventListener("mouseleave", i), window.addEventListener("scroll", a, !0), window.addEventListener("resize", a);
1734
1814
  }
1735
1815
  },
1736
1816
  beforeUnmount(e) {
1737
1817
  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);
1738
1818
  }
1739
- }, Gn = {
1819
+ }, _o = {
1740
1820
  install(e, t = {}) {
1741
- const { prefix: n = "V", modal: o = !0 } = t;
1742
- e.component(`${n}Button`, pe), e.component(`${n}Icon`, G), e.component(`${n}Loader`, ze), e.component(`${n}Modal`, Ee), e.component(`${n}Pagination`, cn), e.component(`${n}Checkbox`, ae), e.component(`${n}Table`, Un), e.component(`${n}TableColumn`, qn), e.directive("tooltip", Xn), o && e.use(bn);
1821
+ 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`, $n), e.component(`${o}Checkbox`, de), e.component(`${o}Table`, ho), e.component(`${o}TableColumn`, vo), e.directive("tooltip", fo), n && e.use(Pn);
1743
1823
  }
1744
- }, Yn = Gn.install;
1824
+ }, Co = _o.install;
1745
1825
  export {
1746
- pe as VButton,
1747
- ae as VCheckbox,
1748
- G as VIcon,
1749
- ze as VLoader,
1750
- Ee as VModal,
1751
- bn as VModalPlugin,
1752
- cn as VPagination,
1753
- Un as VTable,
1754
- qn as VTableColumn,
1755
- Gn as default,
1756
- Yn as install,
1757
- se as modalManager,
1758
- Xn as tooltipDirective
1826
+ ge as VButton,
1827
+ de as VCheckbox,
1828
+ Y as VIcon,
1829
+ je as VLoader,
1830
+ Ne as VModal,
1831
+ Pn as VModalPlugin,
1832
+ $n as VPagination,
1833
+ ho as VTable,
1834
+ vo as VTableColumn,
1835
+ _o as default,
1836
+ Co as install,
1837
+ re as modalManager,
1838
+ fo as tooltipDirective
1759
1839
  };