voiptime-components 1.7.0 → 1.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +1071 -1066
- package/dist/index.umd.js +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { createElementBlock as i, openBlock as s, createElementVNode as r, createStaticVNode as Ae, defineComponent as
|
|
2
|
-
const
|
|
1
|
+
import { createElementBlock as i, openBlock as s, createElementVNode as r, createStaticVNode as Ae, defineComponent as de, computed as y, createBlock as ae, createCommentVNode as E, resolveDynamicComponent as Xe, normalizeStyle as pe, useSlots as Ge, resolveDirective as Je, withDirectives as Ze, normalizeClass as F, renderSlot as we, Teleport as Qe, withModifiers as fe, toDisplayString as J, watch as Ce, Fragment as ce, renderList as he, vModelSelect as _1, createVNode as Y, withCtx as ge, createTextVNode as Me, ref as V, onUnmounted as He, nextTick as ye, provide as e1, onMounted as _e, unref as ne, inject as t1, createApp as k1, h as qe, mergeModels as l1, useModel as b1, reactive as y1, Transition as r1, onBeforeUnmount as x1 } from "vue";
|
|
2
|
+
const g = (n, e) => {
|
|
3
3
|
const o = n.__vccOpts || n;
|
|
4
4
|
for (const [t, l] of e)
|
|
5
5
|
o[t] = l;
|
|
@@ -29,7 +29,7 @@ function L1(n, e) {
|
|
|
29
29
|
}, null, -1)
|
|
30
30
|
]));
|
|
31
31
|
}
|
|
32
|
-
const V1 = /* @__PURE__ */
|
|
32
|
+
const V1 = /* @__PURE__ */ g(M1, [["render", L1]]), S1 = {}, I1 = {
|
|
33
33
|
width: "20",
|
|
34
34
|
height: "20",
|
|
35
35
|
viewBox: "0 0 20 20",
|
|
@@ -61,7 +61,7 @@ function H1(n, e) {
|
|
|
61
61
|
}, null, -1)
|
|
62
62
|
]));
|
|
63
63
|
}
|
|
64
|
-
const B1 = /* @__PURE__ */
|
|
64
|
+
const B1 = /* @__PURE__ */ g(S1, [["render", H1]]), T1 = {}, E1 = {
|
|
65
65
|
width: "20",
|
|
66
66
|
height: "20",
|
|
67
67
|
viewBox: "0 0 20 20",
|
|
@@ -79,7 +79,7 @@ function j1(n, e) {
|
|
|
79
79
|
}, null, -1)
|
|
80
80
|
]));
|
|
81
81
|
}
|
|
82
|
-
const z1 = /* @__PURE__ */
|
|
82
|
+
const z1 = /* @__PURE__ */ g(T1, [["render", j1]]), O1 = {}, R1 = {
|
|
83
83
|
width: "20",
|
|
84
84
|
height: "20",
|
|
85
85
|
viewBox: "0 0 20 20",
|
|
@@ -97,7 +97,7 @@ function D1(n, e) {
|
|
|
97
97
|
}, null, -1)
|
|
98
98
|
]));
|
|
99
99
|
}
|
|
100
|
-
const P1 = /* @__PURE__ */
|
|
100
|
+
const P1 = /* @__PURE__ */ g(O1, [["render", D1]]), W1 = {}, A1 = {
|
|
101
101
|
fill: "none",
|
|
102
102
|
height: "20",
|
|
103
103
|
viewBox: "0 0 20 20",
|
|
@@ -121,7 +121,7 @@ function Z1(n, e) {
|
|
|
121
121
|
}, null, -1)
|
|
122
122
|
]));
|
|
123
123
|
}
|
|
124
|
-
const N1 = /* @__PURE__ */
|
|
124
|
+
const N1 = /* @__PURE__ */ g(W1, [["render", Z1]]), F1 = {}, q1 = {
|
|
125
125
|
width: "20",
|
|
126
126
|
height: "20",
|
|
127
127
|
viewBox: "0 0 20 20",
|
|
@@ -142,7 +142,7 @@ function K1(n, e) {
|
|
|
142
142
|
}, null, -1)
|
|
143
143
|
]));
|
|
144
144
|
}
|
|
145
|
-
const U1 = /* @__PURE__ */
|
|
145
|
+
const U1 = /* @__PURE__ */ g(F1, [["render", K1]]), Y1 = {}, X1 = {
|
|
146
146
|
fill: "none",
|
|
147
147
|
height: "20",
|
|
148
148
|
viewBox: "0 0 21 20",
|
|
@@ -160,7 +160,7 @@ function G1(n, e) {
|
|
|
160
160
|
}, null, -1)
|
|
161
161
|
]));
|
|
162
162
|
}
|
|
163
|
-
const J1 = /* @__PURE__ */
|
|
163
|
+
const J1 = /* @__PURE__ */ g(Y1, [["render", G1]]), Q1 = {}, et = {
|
|
164
164
|
width: "20",
|
|
165
165
|
height: "20",
|
|
166
166
|
viewBox: "0 0 20 20",
|
|
@@ -178,7 +178,7 @@ function tt(n, e) {
|
|
|
178
178
|
}, null, -1)
|
|
179
179
|
]));
|
|
180
180
|
}
|
|
181
|
-
const nt = /* @__PURE__ */
|
|
181
|
+
const nt = /* @__PURE__ */ g(Q1, [["render", tt]]), ot = {}, lt = {
|
|
182
182
|
width: "21",
|
|
183
183
|
height: "20",
|
|
184
184
|
viewBox: "0 0 21 20",
|
|
@@ -195,7 +195,7 @@ function rt(n, e) {
|
|
|
195
195
|
}, null, -1)
|
|
196
196
|
]));
|
|
197
197
|
}
|
|
198
|
-
const st = /* @__PURE__ */
|
|
198
|
+
const st = /* @__PURE__ */ g(ot, [["render", rt]]), it = {}, at = {
|
|
199
199
|
width: "20",
|
|
200
200
|
height: "20",
|
|
201
201
|
viewBox: "0 0 20 20",
|
|
@@ -212,7 +212,7 @@ function ut(n, e) {
|
|
|
212
212
|
}, null, -1)
|
|
213
213
|
]));
|
|
214
214
|
}
|
|
215
|
-
const dt = /* @__PURE__ */
|
|
215
|
+
const dt = /* @__PURE__ */ g(it, [["render", ut]]), ct = {}, ht = {
|
|
216
216
|
fill: "none",
|
|
217
217
|
height: "20",
|
|
218
218
|
viewBox: "0 0 20 20",
|
|
@@ -230,7 +230,7 @@ function pt(n, e) {
|
|
|
230
230
|
}, null, -1)
|
|
231
231
|
]));
|
|
232
232
|
}
|
|
233
|
-
const vt = /* @__PURE__ */
|
|
233
|
+
const vt = /* @__PURE__ */ g(ct, [["render", pt]]), ft = {}, Ct = {
|
|
234
234
|
width: "20",
|
|
235
235
|
height: "20",
|
|
236
236
|
viewBox: "0 0 20 20",
|
|
@@ -260,7 +260,7 @@ function mt(n, e) {
|
|
|
260
260
|
}, null, -1)
|
|
261
261
|
]));
|
|
262
262
|
}
|
|
263
|
-
const wt = /* @__PURE__ */
|
|
263
|
+
const wt = /* @__PURE__ */ g(ft, [["render", mt]]), gt = {}, _t = {
|
|
264
264
|
width: "20",
|
|
265
265
|
height: "20",
|
|
266
266
|
viewBox: "0 0 20 20",
|
|
@@ -284,7 +284,7 @@ function kt(n, e) {
|
|
|
284
284
|
}, null, -1)
|
|
285
285
|
]));
|
|
286
286
|
}
|
|
287
|
-
const bt = /* @__PURE__ */
|
|
287
|
+
const bt = /* @__PURE__ */ g(gt, [["render", kt]]), yt = {}, xt = {
|
|
288
288
|
width: "20",
|
|
289
289
|
height: "20",
|
|
290
290
|
viewBox: "0 0 20 20",
|
|
@@ -302,7 +302,7 @@ function Mt(n, e) {
|
|
|
302
302
|
}, null, -1)
|
|
303
303
|
]));
|
|
304
304
|
}
|
|
305
|
-
const $t = /* @__PURE__ */
|
|
305
|
+
const $t = /* @__PURE__ */ g(yt, [["render", Mt]]), Lt = {}, Vt = {
|
|
306
306
|
width: "20",
|
|
307
307
|
height: "20",
|
|
308
308
|
viewBox: "0 0 20 20",
|
|
@@ -336,7 +336,7 @@ function St(n, e) {
|
|
|
336
336
|
}, null, -1)
|
|
337
337
|
]));
|
|
338
338
|
}
|
|
339
|
-
const It = /* @__PURE__ */
|
|
339
|
+
const It = /* @__PURE__ */ g(Lt, [["render", St]]), Ht = {}, Bt = {
|
|
340
340
|
fill: "none",
|
|
341
341
|
height: "20",
|
|
342
342
|
viewBox: "0 0 21 20",
|
|
@@ -354,7 +354,7 @@ function Tt(n, e) {
|
|
|
354
354
|
}, null, -1)
|
|
355
355
|
]));
|
|
356
356
|
}
|
|
357
|
-
const Et = /* @__PURE__ */
|
|
357
|
+
const Et = /* @__PURE__ */ g(Ht, [["render", Tt]]), jt = {}, zt = {
|
|
358
358
|
width: "20",
|
|
359
359
|
height: "20",
|
|
360
360
|
viewBox: "0 0 20 20",
|
|
@@ -371,7 +371,7 @@ function Ot(n, e) {
|
|
|
371
371
|
}, null, -1)
|
|
372
372
|
]));
|
|
373
373
|
}
|
|
374
|
-
const Rt = /* @__PURE__ */
|
|
374
|
+
const Rt = /* @__PURE__ */ g(jt, [["render", Ot]]), Dt = {}, Pt = {
|
|
375
375
|
fill: "none",
|
|
376
376
|
height: "20",
|
|
377
377
|
viewBox: "0 0 20 20",
|
|
@@ -387,7 +387,7 @@ function Wt(n, e) {
|
|
|
387
387
|
}, null, -1)
|
|
388
388
|
]));
|
|
389
389
|
}
|
|
390
|
-
const At = /* @__PURE__ */
|
|
390
|
+
const At = /* @__PURE__ */ g(Dt, [["render", Wt]]), Zt = {}, Nt = {
|
|
391
391
|
width: "20",
|
|
392
392
|
height: "20",
|
|
393
393
|
viewBox: "0 0 20 20",
|
|
@@ -410,7 +410,7 @@ function Ft(n, e) {
|
|
|
410
410
|
}, null, -1)
|
|
411
411
|
]));
|
|
412
412
|
}
|
|
413
|
-
const qt = /* @__PURE__ */
|
|
413
|
+
const qt = /* @__PURE__ */ g(Zt, [["render", Ft]]), Kt = {}, Ut = {
|
|
414
414
|
width: "20",
|
|
415
415
|
height: "20",
|
|
416
416
|
viewBox: "0 0 20 20",
|
|
@@ -451,7 +451,7 @@ function Yt(n, e) {
|
|
|
451
451
|
}, null, -1)
|
|
452
452
|
]));
|
|
453
453
|
}
|
|
454
|
-
const Xt = /* @__PURE__ */
|
|
454
|
+
const Xt = /* @__PURE__ */ g(Kt, [["render", Yt]]), Gt = {}, Jt = {
|
|
455
455
|
width: "20",
|
|
456
456
|
height: "20",
|
|
457
457
|
viewBox: "0 0 20 20",
|
|
@@ -476,7 +476,7 @@ function Qt(n, e) {
|
|
|
476
476
|
}, null, -1)
|
|
477
477
|
]));
|
|
478
478
|
}
|
|
479
|
-
const en = /* @__PURE__ */
|
|
479
|
+
const en = /* @__PURE__ */ g(Gt, [["render", Qt]]), tn = {}, nn = {
|
|
480
480
|
width: "20",
|
|
481
481
|
height: "20",
|
|
482
482
|
viewBox: "0 0 20 20",
|
|
@@ -501,7 +501,7 @@ function on(n, e) {
|
|
|
501
501
|
}, null, -1)
|
|
502
502
|
]));
|
|
503
503
|
}
|
|
504
|
-
const ln = /* @__PURE__ */
|
|
504
|
+
const ln = /* @__PURE__ */ g(tn, [["render", on]]), rn = {}, sn = {
|
|
505
505
|
width: "20",
|
|
506
506
|
height: "20",
|
|
507
507
|
viewBox: "0 0 20 20",
|
|
@@ -518,7 +518,7 @@ function an(n, e) {
|
|
|
518
518
|
}, null, -1)
|
|
519
519
|
]));
|
|
520
520
|
}
|
|
521
|
-
const un = /* @__PURE__ */
|
|
521
|
+
const un = /* @__PURE__ */ g(rn, [["render", an]]), dn = {}, cn = {
|
|
522
522
|
width: "20",
|
|
523
523
|
height: "20",
|
|
524
524
|
viewBox: "0 0 20 20",
|
|
@@ -536,7 +536,7 @@ function hn(n, e) {
|
|
|
536
536
|
}, null, -1)
|
|
537
537
|
]));
|
|
538
538
|
}
|
|
539
|
-
const pn = /* @__PURE__ */
|
|
539
|
+
const pn = /* @__PURE__ */ g(dn, [["render", hn]]), vn = {}, fn = {
|
|
540
540
|
width: "21",
|
|
541
541
|
height: "20",
|
|
542
542
|
viewBox: "0 0 21 20",
|
|
@@ -554,7 +554,7 @@ function Cn(n, e) {
|
|
|
554
554
|
}, null, -1)
|
|
555
555
|
]));
|
|
556
556
|
}
|
|
557
|
-
const mn = /* @__PURE__ */
|
|
557
|
+
const mn = /* @__PURE__ */ g(vn, [["render", Cn]]), wn = {}, gn = {
|
|
558
558
|
width: "14",
|
|
559
559
|
height: "15",
|
|
560
560
|
viewBox: "0 0 14 15",
|
|
@@ -576,7 +576,7 @@ function _n(n, e) {
|
|
|
576
576
|
}, null, -1)
|
|
577
577
|
]));
|
|
578
578
|
}
|
|
579
|
-
const kn = /* @__PURE__ */
|
|
579
|
+
const kn = /* @__PURE__ */ g(wn, [["render", _n]]), bn = {}, yn = {
|
|
580
580
|
width: "21",
|
|
581
581
|
height: "20",
|
|
582
582
|
viewBox: "0 0 21 20",
|
|
@@ -594,7 +594,7 @@ function xn(n, e) {
|
|
|
594
594
|
}, null, -1)
|
|
595
595
|
]));
|
|
596
596
|
}
|
|
597
|
-
const Mn = /* @__PURE__ */
|
|
597
|
+
const Mn = /* @__PURE__ */ g(bn, [["render", xn]]), $n = {}, Ln = {
|
|
598
598
|
width: "20",
|
|
599
599
|
height: "20",
|
|
600
600
|
viewBox: "0 0 20 20",
|
|
@@ -612,7 +612,7 @@ function Vn(n, e) {
|
|
|
612
612
|
}, null, -1)
|
|
613
613
|
]));
|
|
614
614
|
}
|
|
615
|
-
const Sn = /* @__PURE__ */
|
|
615
|
+
const Sn = /* @__PURE__ */ g($n, [["render", Vn]]), In = {}, Hn = {
|
|
616
616
|
fill: "none",
|
|
617
617
|
height: "20",
|
|
618
618
|
viewBox: "0 0 20 20",
|
|
@@ -651,7 +651,7 @@ function Bn(n, e) {
|
|
|
651
651
|
}, null, -1)
|
|
652
652
|
]));
|
|
653
653
|
}
|
|
654
|
-
const Tn = /* @__PURE__ */
|
|
654
|
+
const Tn = /* @__PURE__ */ g(In, [["render", Bn]]), En = {}, jn = {
|
|
655
655
|
fill: "none",
|
|
656
656
|
height: "20",
|
|
657
657
|
viewBox: "0 0 20 20",
|
|
@@ -676,7 +676,7 @@ function zn(n, e) {
|
|
|
676
676
|
}, null, -1)
|
|
677
677
|
]));
|
|
678
678
|
}
|
|
679
|
-
const On = /* @__PURE__ */
|
|
679
|
+
const On = /* @__PURE__ */ g(En, [["render", zn]]), Rn = {}, Dn = {
|
|
680
680
|
fill: "none",
|
|
681
681
|
height: "20",
|
|
682
682
|
viewBox: "0 0 20 20",
|
|
@@ -708,7 +708,7 @@ function Pn(n, e) {
|
|
|
708
708
|
}, null, -1)
|
|
709
709
|
]));
|
|
710
710
|
}
|
|
711
|
-
const Wn = /* @__PURE__ */
|
|
711
|
+
const Wn = /* @__PURE__ */ g(Rn, [["render", Pn]]), An = {}, Zn = {
|
|
712
712
|
width: "20",
|
|
713
713
|
height: "20",
|
|
714
714
|
viewBox: "0 0 20 20",
|
|
@@ -733,7 +733,7 @@ function Nn(n, e) {
|
|
|
733
733
|
}, null, -1)
|
|
734
734
|
]));
|
|
735
735
|
}
|
|
736
|
-
const Fn = /* @__PURE__ */
|
|
736
|
+
const Fn = /* @__PURE__ */ g(An, [["render", Nn]]), qn = {}, Kn = {
|
|
737
737
|
width: "20",
|
|
738
738
|
height: "20",
|
|
739
739
|
viewBox: "0 0 20 20",
|
|
@@ -745,7 +745,7 @@ function Un(n, e) {
|
|
|
745
745
|
Ae('<circle cx="4.5" cy="12.5" r="1.5" stroke="currentColor" stroke-width="1.5"></circle><circle cx="9.5" cy="8.5" r="1.5" transform="rotate(-180 9.5 8.5)" stroke="currentColor" stroke-width="1.5"></circle><circle cx="14.5" cy="12.5" r="1.5" stroke="currentColor" stroke-width="1.5"></circle><path d="M4.55469 10.5V2" stroke="currentColor" stroke-width="1.5"></path><path d="M9.44531 9.5L9.44531 18" stroke="currentColor" stroke-width="1.5"></path><path d="M14.5547 10.5V2" stroke="currentColor" stroke-width="1.5"></path><path d="M4.55469 18V15.5" stroke="currentColor" stroke-width="1.5"></path><path d="M9.44531 2L9.44531 5.5" stroke="currentColor" stroke-width="1.5"></path><path d="M14.5547 18V15.5" stroke="currentColor" stroke-width="1.5"></path>', 9)
|
|
746
746
|
]));
|
|
747
747
|
}
|
|
748
|
-
const Yn = /* @__PURE__ */
|
|
748
|
+
const Yn = /* @__PURE__ */ g(qn, [["render", Un]]), Xn = {}, Gn = {
|
|
749
749
|
width: "20",
|
|
750
750
|
height: "20",
|
|
751
751
|
viewBox: "0 0 20 20",
|
|
@@ -770,7 +770,7 @@ function Jn(n, e) {
|
|
|
770
770
|
}, null, -1)
|
|
771
771
|
]));
|
|
772
772
|
}
|
|
773
|
-
const Qn = /* @__PURE__ */
|
|
773
|
+
const Qn = /* @__PURE__ */ g(Xn, [["render", Jn]]), eo = {}, to = {
|
|
774
774
|
width: "20",
|
|
775
775
|
height: "20",
|
|
776
776
|
viewBox: "0 0 20 20",
|
|
@@ -798,7 +798,7 @@ function no(n, e) {
|
|
|
798
798
|
}, null, -1)
|
|
799
799
|
]));
|
|
800
800
|
}
|
|
801
|
-
const oo = /* @__PURE__ */
|
|
801
|
+
const oo = /* @__PURE__ */ g(eo, [["render", no]]), lo = {}, ro = {
|
|
802
802
|
width: "20",
|
|
803
803
|
height: "20",
|
|
804
804
|
viewBox: "0 0 20 20",
|
|
@@ -816,7 +816,7 @@ function so(n, e) {
|
|
|
816
816
|
}, null, -1)
|
|
817
817
|
]));
|
|
818
818
|
}
|
|
819
|
-
const io = /* @__PURE__ */
|
|
819
|
+
const io = /* @__PURE__ */ g(lo, [["render", so]]), ao = {}, uo = {
|
|
820
820
|
width: "20",
|
|
821
821
|
height: "20",
|
|
822
822
|
viewBox: "0 0 20 20",
|
|
@@ -828,7 +828,7 @@ function co(n, e) {
|
|
|
828
828
|
Ae('<path d="M10.5 5.5H17.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"></path><path d="M10.5 10H17.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"></path><path d="M10.5 15H17.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"></path><path d="M3 15.083L4.042 16.125L7.167 13" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M3 6.083L4.042 7.125L7.167 4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>', 5)
|
|
829
829
|
]));
|
|
830
830
|
}
|
|
831
|
-
const ho = /* @__PURE__ */
|
|
831
|
+
const ho = /* @__PURE__ */ g(ao, [["render", co]]), po = {}, vo = {
|
|
832
832
|
width: "20",
|
|
833
833
|
height: "20",
|
|
834
834
|
viewBox: "0 0 20 20",
|
|
@@ -851,7 +851,7 @@ function fo(n, e) {
|
|
|
851
851
|
}, null, -1)
|
|
852
852
|
]));
|
|
853
853
|
}
|
|
854
|
-
const Co = /* @__PURE__ */
|
|
854
|
+
const Co = /* @__PURE__ */ g(po, [["render", fo]]), mo = {}, wo = {
|
|
855
855
|
width: "20",
|
|
856
856
|
height: "20",
|
|
857
857
|
viewBox: "0 0 20 20",
|
|
@@ -869,7 +869,7 @@ function go(n, e) {
|
|
|
869
869
|
}, null, -1)
|
|
870
870
|
]));
|
|
871
871
|
}
|
|
872
|
-
const _o = /* @__PURE__ */
|
|
872
|
+
const _o = /* @__PURE__ */ g(mo, [["render", go]]), ko = {}, bo = {
|
|
873
873
|
width: "20",
|
|
874
874
|
height: "20",
|
|
875
875
|
viewBox: "0 0 20 20",
|
|
@@ -887,7 +887,7 @@ function yo(n, e) {
|
|
|
887
887
|
}, null, -1)
|
|
888
888
|
]));
|
|
889
889
|
}
|
|
890
|
-
const xo = /* @__PURE__ */
|
|
890
|
+
const xo = /* @__PURE__ */ g(ko, [["render", yo]]), Mo = {}, $o = {
|
|
891
891
|
width: "20",
|
|
892
892
|
height: "20",
|
|
893
893
|
viewBox: "0 0 20 20",
|
|
@@ -919,7 +919,7 @@ function Lo(n, e) {
|
|
|
919
919
|
}, null, -1)
|
|
920
920
|
]));
|
|
921
921
|
}
|
|
922
|
-
const Vo = /* @__PURE__ */
|
|
922
|
+
const Vo = /* @__PURE__ */ g(Mo, [["render", Lo]]), So = {}, Io = {
|
|
923
923
|
width: "20",
|
|
924
924
|
height: "20",
|
|
925
925
|
viewBox: "0 0 20 20",
|
|
@@ -944,7 +944,7 @@ function Ho(n, e) {
|
|
|
944
944
|
}, null, -1)
|
|
945
945
|
]));
|
|
946
946
|
}
|
|
947
|
-
const Bo = /* @__PURE__ */
|
|
947
|
+
const Bo = /* @__PURE__ */ g(So, [["render", Ho]]), To = {}, Eo = {
|
|
948
948
|
fill: "none",
|
|
949
949
|
height: "20",
|
|
950
950
|
viewBox: "0 0 20 20",
|
|
@@ -962,7 +962,7 @@ function jo(n, e) {
|
|
|
962
962
|
}, null, -1)
|
|
963
963
|
]));
|
|
964
964
|
}
|
|
965
|
-
const zo = /* @__PURE__ */
|
|
965
|
+
const zo = /* @__PURE__ */ g(To, [["render", jo]]), Oo = {}, Ro = {
|
|
966
966
|
width: "20",
|
|
967
967
|
height: "20",
|
|
968
968
|
viewBox: "0 0 20 20",
|
|
@@ -974,7 +974,7 @@ function Do(n, e) {
|
|
|
974
974
|
Ae('<g clip-path="url(#clip0_8456_10835)"><path fill-rule="evenodd" clip-rule="evenodd" d="M10 20C11.3132 20 12.6136 19.7413 13.8268 19.2388C15.0401 18.7362 16.1425 17.9997 17.0711 17.0711C17.9997 16.1425 18.7362 15.0401 19.2388 13.8268C19.7413 12.6136 20 11.3132 20 10C20 8.68678 19.7413 7.38642 19.2388 6.17317C18.7362 4.95991 17.9997 3.85752 17.0711 2.92893C16.1425 2.00035 15.0401 1.26375 13.8268 0.761205C12.6136 0.258658 11.3132 -1.95685e-08 10 0C7.34784 3.95203e-08 4.8043 1.05357 2.92893 2.92893C1.05357 4.8043 0 7.34784 0 10C0 12.6522 1.05357 15.1957 2.92893 17.0711C4.8043 18.9464 7.34784 20 10 20Z" fill="#21725E" fill-opacity="0.1"></path><path d="M5.83398 9.9974L8.95898 13.3307L14.1673 6.66406" stroke="#21725E" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"></path></g><defs><clipPath id="clip0_8456_10835"><rect width="20" height="20" fill="white"></rect></clipPath></defs>', 2)
|
|
975
975
|
]));
|
|
976
976
|
}
|
|
977
|
-
const Po = /* @__PURE__ */
|
|
977
|
+
const Po = /* @__PURE__ */ g(Oo, [["render", Do]]), Wo = {}, Ao = {
|
|
978
978
|
width: "20",
|
|
979
979
|
height: "20",
|
|
980
980
|
viewBox: "0 0 20 20",
|
|
@@ -992,7 +992,7 @@ function Zo(n, e) {
|
|
|
992
992
|
}, null, -1)
|
|
993
993
|
]));
|
|
994
994
|
}
|
|
995
|
-
const No = /* @__PURE__ */
|
|
995
|
+
const No = /* @__PURE__ */ g(Wo, [["render", Zo]]), Fo = {}, qo = {
|
|
996
996
|
width: "20",
|
|
997
997
|
height: "20",
|
|
998
998
|
viewBox: "0 0 20 20",
|
|
@@ -1017,7 +1017,7 @@ function Ko(n, e) {
|
|
|
1017
1017
|
}, null, -1)
|
|
1018
1018
|
]));
|
|
1019
1019
|
}
|
|
1020
|
-
const Uo = /* @__PURE__ */
|
|
1020
|
+
const Uo = /* @__PURE__ */ g(Fo, [["render", Ko]]), Yo = {}, Xo = {
|
|
1021
1021
|
width: "20",
|
|
1022
1022
|
height: "20",
|
|
1023
1023
|
viewBox: "0 0 20 20",
|
|
@@ -1035,7 +1035,7 @@ function Go(n, e) {
|
|
|
1035
1035
|
}, null, -1)
|
|
1036
1036
|
]));
|
|
1037
1037
|
}
|
|
1038
|
-
const Jo = /* @__PURE__ */
|
|
1038
|
+
const Jo = /* @__PURE__ */ g(Yo, [["render", Go]]), Qo = {}, el = {
|
|
1039
1039
|
width: "20",
|
|
1040
1040
|
height: "20",
|
|
1041
1041
|
viewBox: "0 0 20 20",
|
|
@@ -1060,7 +1060,7 @@ function tl(n, e) {
|
|
|
1060
1060
|
}, null, -1)
|
|
1061
1061
|
]));
|
|
1062
1062
|
}
|
|
1063
|
-
const nl = /* @__PURE__ */
|
|
1063
|
+
const nl = /* @__PURE__ */ g(Qo, [["render", tl]]), ol = {}, ll = {
|
|
1064
1064
|
fill: "none",
|
|
1065
1065
|
height: "20",
|
|
1066
1066
|
viewBox: "0 0 20 20",
|
|
@@ -1091,7 +1091,7 @@ function rl(n, e) {
|
|
|
1091
1091
|
}, null, -1)
|
|
1092
1092
|
]));
|
|
1093
1093
|
}
|
|
1094
|
-
const sl = /* @__PURE__ */
|
|
1094
|
+
const sl = /* @__PURE__ */ g(ol, [["render", rl]]), il = {}, al = {
|
|
1095
1095
|
fill: "none",
|
|
1096
1096
|
height: "20",
|
|
1097
1097
|
viewBox: "0 0 20 20",
|
|
@@ -1125,7 +1125,7 @@ function ul(n, e) {
|
|
|
1125
1125
|
}, null, -1)
|
|
1126
1126
|
]));
|
|
1127
1127
|
}
|
|
1128
|
-
const dl = /* @__PURE__ */
|
|
1128
|
+
const dl = /* @__PURE__ */ g(il, [["render", ul]]), cl = {}, hl = {
|
|
1129
1129
|
width: "20",
|
|
1130
1130
|
height: "20",
|
|
1131
1131
|
viewBox: "0 0 20 20",
|
|
@@ -1149,7 +1149,7 @@ function pl(n, e) {
|
|
|
1149
1149
|
}, null, -1)
|
|
1150
1150
|
]));
|
|
1151
1151
|
}
|
|
1152
|
-
const vl = /* @__PURE__ */
|
|
1152
|
+
const vl = /* @__PURE__ */ g(cl, [["render", pl]]), fl = {}, Cl = {
|
|
1153
1153
|
fill: "none",
|
|
1154
1154
|
height: "20",
|
|
1155
1155
|
viewBox: "0 0 20 20",
|
|
@@ -1180,7 +1180,7 @@ function ml(n, e) {
|
|
|
1180
1180
|
}, null, -1)
|
|
1181
1181
|
]));
|
|
1182
1182
|
}
|
|
1183
|
-
const wl = /* @__PURE__ */
|
|
1183
|
+
const wl = /* @__PURE__ */ g(fl, [["render", ml]]), gl = {}, _l = {
|
|
1184
1184
|
fill: "none",
|
|
1185
1185
|
height: "20",
|
|
1186
1186
|
viewBox: "0 0 20 20",
|
|
@@ -1209,7 +1209,7 @@ function kl(n, e) {
|
|
|
1209
1209
|
}, null, -1)
|
|
1210
1210
|
]));
|
|
1211
1211
|
}
|
|
1212
|
-
const bl = /* @__PURE__ */
|
|
1212
|
+
const bl = /* @__PURE__ */ g(gl, [["render", kl]]), yl = {}, xl = {
|
|
1213
1213
|
fill: "none",
|
|
1214
1214
|
height: "20",
|
|
1215
1215
|
viewBox: "0 0 20 20",
|
|
@@ -1240,7 +1240,7 @@ function Ml(n, e) {
|
|
|
1240
1240
|
}, null, -1)
|
|
1241
1241
|
]));
|
|
1242
1242
|
}
|
|
1243
|
-
const $l = /* @__PURE__ */
|
|
1243
|
+
const $l = /* @__PURE__ */ g(yl, [["render", Ml]]), Ll = {}, Vl = {
|
|
1244
1244
|
fill: "none",
|
|
1245
1245
|
height: "20",
|
|
1246
1246
|
viewBox: "0 0 20 20",
|
|
@@ -1274,7 +1274,7 @@ function Sl(n, e) {
|
|
|
1274
1274
|
}, null, -1)
|
|
1275
1275
|
]));
|
|
1276
1276
|
}
|
|
1277
|
-
const Il = /* @__PURE__ */
|
|
1277
|
+
const Il = /* @__PURE__ */ g(Ll, [["render", Sl]]), Hl = {}, Bl = {
|
|
1278
1278
|
fill: "none",
|
|
1279
1279
|
height: "20",
|
|
1280
1280
|
viewBox: "0 0 20 20",
|
|
@@ -1305,7 +1305,7 @@ function Tl(n, e) {
|
|
|
1305
1305
|
}, null, -1)
|
|
1306
1306
|
]));
|
|
1307
1307
|
}
|
|
1308
|
-
const El = /* @__PURE__ */
|
|
1308
|
+
const El = /* @__PURE__ */ g(Hl, [["render", Tl]]), jl = {}, zl = {
|
|
1309
1309
|
fill: "none",
|
|
1310
1310
|
height: "24",
|
|
1311
1311
|
viewBox: "0 0 25 24",
|
|
@@ -1337,7 +1337,7 @@ function Ol(n, e) {
|
|
|
1337
1337
|
}, null, -1)
|
|
1338
1338
|
]));
|
|
1339
1339
|
}
|
|
1340
|
-
const Rl = /* @__PURE__ */
|
|
1340
|
+
const Rl = /* @__PURE__ */ g(jl, [["render", Ol]]), Dl = {}, Pl = {
|
|
1341
1341
|
width: "21",
|
|
1342
1342
|
height: "20",
|
|
1343
1343
|
viewBox: "0 0 21 20",
|
|
@@ -1362,7 +1362,7 @@ function Wl(n, e) {
|
|
|
1362
1362
|
}, null, -1)
|
|
1363
1363
|
]));
|
|
1364
1364
|
}
|
|
1365
|
-
const Al = /* @__PURE__ */
|
|
1365
|
+
const Al = /* @__PURE__ */ g(Dl, [["render", Wl]]), Zl = {}, Nl = {
|
|
1366
1366
|
fill: "none",
|
|
1367
1367
|
height: "20",
|
|
1368
1368
|
viewBox: "0 0 21 20",
|
|
@@ -1386,7 +1386,7 @@ function Fl(n, e) {
|
|
|
1386
1386
|
}, null, -1)
|
|
1387
1387
|
]));
|
|
1388
1388
|
}
|
|
1389
|
-
const ql = /* @__PURE__ */
|
|
1389
|
+
const ql = /* @__PURE__ */ g(Zl, [["render", Fl]]), Kl = {}, Ul = {
|
|
1390
1390
|
fill: "none",
|
|
1391
1391
|
height: "20",
|
|
1392
1392
|
viewBox: "0 0 21 20",
|
|
@@ -1404,7 +1404,7 @@ function Yl(n, e) {
|
|
|
1404
1404
|
}, null, -1)
|
|
1405
1405
|
]));
|
|
1406
1406
|
}
|
|
1407
|
-
const Xl = /* @__PURE__ */
|
|
1407
|
+
const Xl = /* @__PURE__ */ g(Kl, [["render", Yl]]), Gl = {}, Jl = {
|
|
1408
1408
|
fill: "none",
|
|
1409
1409
|
height: "20",
|
|
1410
1410
|
viewBox: "0 0 21 20",
|
|
@@ -1429,7 +1429,7 @@ function Ql(n, e) {
|
|
|
1429
1429
|
}, null, -1)
|
|
1430
1430
|
]));
|
|
1431
1431
|
}
|
|
1432
|
-
const er = /* @__PURE__ */
|
|
1432
|
+
const er = /* @__PURE__ */ g(Gl, [["render", Ql]]), tr = {}, nr = {
|
|
1433
1433
|
width: "20",
|
|
1434
1434
|
height: "20",
|
|
1435
1435
|
viewBox: "0 0 20 20",
|
|
@@ -1447,7 +1447,7 @@ function or(n, e) {
|
|
|
1447
1447
|
}, null, -1)
|
|
1448
1448
|
]));
|
|
1449
1449
|
}
|
|
1450
|
-
const lr = /* @__PURE__ */
|
|
1450
|
+
const lr = /* @__PURE__ */ g(tr, [["render", or]]), rr = {}, sr = {
|
|
1451
1451
|
width: "20",
|
|
1452
1452
|
height: "20",
|
|
1453
1453
|
viewBox: "0 0 20 20",
|
|
@@ -1470,7 +1470,7 @@ function ir(n, e) {
|
|
|
1470
1470
|
}, null, -1)
|
|
1471
1471
|
]));
|
|
1472
1472
|
}
|
|
1473
|
-
const ar = /* @__PURE__ */
|
|
1473
|
+
const ar = /* @__PURE__ */ g(rr, [["render", ir]]), ur = {}, dr = {
|
|
1474
1474
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1475
1475
|
width: "60",
|
|
1476
1476
|
height: "60",
|
|
@@ -1488,7 +1488,7 @@ function cr(n, e) {
|
|
|
1488
1488
|
}, null, -1)
|
|
1489
1489
|
]));
|
|
1490
1490
|
}
|
|
1491
|
-
const hr = /* @__PURE__ */
|
|
1491
|
+
const hr = /* @__PURE__ */ g(ur, [["render", cr]]), pr = {}, vr = {
|
|
1492
1492
|
width: "20",
|
|
1493
1493
|
height: "20",
|
|
1494
1494
|
viewBox: "0 0 20 20",
|
|
@@ -1500,7 +1500,7 @@ function fr(n, e) {
|
|
|
1500
1500
|
Ae('<g clip-path="url(#clip0_8255_9011)"><path d="M3.125 3.9125C3.125 2.95 4.2 1.875 5.15 1.875H17.35C18.3 1.875 19.375 2.95 19.375 3.9125V16.1C19.375 17.05 18.3 18.125 17.35 18.125H5.1625C4.2 18.125 3.125 17.05 3.125 16.1M0.625 6.875L5.625 13.125M5.625 6.875L0.625 13.125" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M11.875 6.875V13.125M9.375 9.375H15.625M9.375 6.875H15.625V13.125H9.375V6.875Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path></g><defs><clipPath id="clip0_8255_9011"><rect width="20" height="20" fill="white"></rect></clipPath></defs>', 2)
|
|
1501
1501
|
]));
|
|
1502
1502
|
}
|
|
1503
|
-
const Cr = /* @__PURE__ */
|
|
1503
|
+
const Cr = /* @__PURE__ */ g(pr, [["render", fr]]), mr = {}, wr = {
|
|
1504
1504
|
width: "20",
|
|
1505
1505
|
height: "20",
|
|
1506
1506
|
viewBox: "0 0 20 20",
|
|
@@ -1524,7 +1524,7 @@ function gr(n, e) {
|
|
|
1524
1524
|
}, null, -1)
|
|
1525
1525
|
]));
|
|
1526
1526
|
}
|
|
1527
|
-
const _r = /* @__PURE__ */
|
|
1527
|
+
const _r = /* @__PURE__ */ g(mr, [["render", gr]]), kr = {}, br = {
|
|
1528
1528
|
width: "20",
|
|
1529
1529
|
height: "20",
|
|
1530
1530
|
viewBox: "0 0 20 20",
|
|
@@ -1542,7 +1542,7 @@ function yr(n, e) {
|
|
|
1542
1542
|
}, null, -1)
|
|
1543
1543
|
]));
|
|
1544
1544
|
}
|
|
1545
|
-
const xr = /* @__PURE__ */
|
|
1545
|
+
const xr = /* @__PURE__ */ g(kr, [["render", yr]]), Mr = {}, $r = {
|
|
1546
1546
|
width: "20",
|
|
1547
1547
|
height: "20",
|
|
1548
1548
|
viewBox: "0 0 20 20",
|
|
@@ -1570,7 +1570,7 @@ function Lr(n, e) {
|
|
|
1570
1570
|
}, null, -1)
|
|
1571
1571
|
]));
|
|
1572
1572
|
}
|
|
1573
|
-
const Vr = /* @__PURE__ */
|
|
1573
|
+
const Vr = /* @__PURE__ */ g(Mr, [["render", Lr]]), Sr = {}, Ir = {
|
|
1574
1574
|
width: "20",
|
|
1575
1575
|
height: "20",
|
|
1576
1576
|
viewBox: "0 0 20 20",
|
|
@@ -1588,7 +1588,7 @@ function Hr(n, e) {
|
|
|
1588
1588
|
}, null, -1)
|
|
1589
1589
|
]));
|
|
1590
1590
|
}
|
|
1591
|
-
const Br = /* @__PURE__ */
|
|
1591
|
+
const Br = /* @__PURE__ */ g(Sr, [["render", Hr]]), Tr = {}, Er = {
|
|
1592
1592
|
width: "20",
|
|
1593
1593
|
height: "20",
|
|
1594
1594
|
viewBox: "0 0 20 20",
|
|
@@ -1606,7 +1606,7 @@ function jr(n, e) {
|
|
|
1606
1606
|
}, null, -1)
|
|
1607
1607
|
]));
|
|
1608
1608
|
}
|
|
1609
|
-
const zr = /* @__PURE__ */
|
|
1609
|
+
const zr = /* @__PURE__ */ g(Tr, [["render", jr]]), Or = {}, Rr = {
|
|
1610
1610
|
width: "20",
|
|
1611
1611
|
height: "20",
|
|
1612
1612
|
viewBox: "0 0 20 20",
|
|
@@ -1630,7 +1630,7 @@ function Dr(n, e) {
|
|
|
1630
1630
|
}, null, -1)
|
|
1631
1631
|
]));
|
|
1632
1632
|
}
|
|
1633
|
-
const Pr = /* @__PURE__ */
|
|
1633
|
+
const Pr = /* @__PURE__ */ g(Or, [["render", Dr]]), Wr = {
|
|
1634
1634
|
// actions icons
|
|
1635
1635
|
circleChecked: V1,
|
|
1636
1636
|
circleClose: B1,
|
|
@@ -1710,7 +1710,7 @@ const Pr = /* @__PURE__ */ w(Or, [["render", Dr]]), Wr = {
|
|
|
1710
1710
|
twoColumns: Br,
|
|
1711
1711
|
twoRows: zr,
|
|
1712
1712
|
unfreeze: Pr
|
|
1713
|
-
},
|
|
1713
|
+
}, oe = /* @__PURE__ */ de({
|
|
1714
1714
|
__name: "VIcon",
|
|
1715
1715
|
props: {
|
|
1716
1716
|
name: {},
|
|
@@ -1726,17 +1726,17 @@ const Pr = /* @__PURE__ */ w(Or, [["render", Dr]]), Wr = {
|
|
|
1726
1726
|
}));
|
|
1727
1727
|
return (l, a) => o.value ? (s(), ae(Xe(o.value), {
|
|
1728
1728
|
key: 0,
|
|
1729
|
-
style:
|
|
1730
|
-
}, null, 8, ["style"])) :
|
|
1729
|
+
style: pe(t.value)
|
|
1730
|
+
}, null, 8, ["style"])) : E("", !0);
|
|
1731
1731
|
}
|
|
1732
1732
|
}), Ar = {}, Zr = { class: "vt-loader" };
|
|
1733
1733
|
function Nr(n, e) {
|
|
1734
1734
|
return s(), i("span", Zr);
|
|
1735
1735
|
}
|
|
1736
|
-
const ze = /* @__PURE__ */
|
|
1736
|
+
const ze = /* @__PURE__ */ g(Ar, [["render", Nr]]), Fr = ["disabled", "type", "data-placement"], qr = {
|
|
1737
1737
|
key: 2,
|
|
1738
1738
|
class: "vt-button__content"
|
|
1739
|
-
}, We = /* @__PURE__ */
|
|
1739
|
+
}, We = /* @__PURE__ */ de({
|
|
1740
1740
|
__name: "VButton",
|
|
1741
1741
|
props: {
|
|
1742
1742
|
type: { default: "default" },
|
|
@@ -1751,9 +1751,9 @@ const ze = /* @__PURE__ */ w(Ar, [["render", Nr]]), Fr = ["disabled", "type", "d
|
|
|
1751
1751
|
emits: ["click"],
|
|
1752
1752
|
setup(n, { emit: e }) {
|
|
1753
1753
|
const o = n, t = e, l = Ge(), a = y(() => !!(o.icon && o.shape)), u = y(() => {
|
|
1754
|
-
var
|
|
1755
|
-
const
|
|
1756
|
-
return ((
|
|
1754
|
+
var m, S;
|
|
1755
|
+
const d = l.default ? l.default({}) : null;
|
|
1756
|
+
return ((S = (m = d == null ? void 0 : d[0]) == null ? void 0 : m.children) == null ? void 0 : S.toString()) ?? "";
|
|
1757
1757
|
}), h = y(() => [
|
|
1758
1758
|
"vt-button",
|
|
1759
1759
|
`vt-button--${o.type}`,
|
|
@@ -1763,13 +1763,13 @@ const ze = /* @__PURE__ */ w(Ar, [["render", Nr]]), Fr = ["disabled", "type", "d
|
|
|
1763
1763
|
"vt-button--disabled": o.disabled || o.loading,
|
|
1764
1764
|
"vt-button--loading": o.loading
|
|
1765
1765
|
}
|
|
1766
|
-
]), p = y(() => a.value && o.tooltip ? u.value : null), v = (
|
|
1767
|
-
!o.disabled && !o.loading && t("click",
|
|
1766
|
+
]), p = y(() => a.value && o.tooltip ? u.value : null), v = (d) => {
|
|
1767
|
+
!o.disabled && !o.loading && t("click", d);
|
|
1768
1768
|
};
|
|
1769
|
-
return (
|
|
1770
|
-
const
|
|
1769
|
+
return (d, m) => {
|
|
1770
|
+
const S = Je("tooltip");
|
|
1771
1771
|
return Ze((s(), i("button", {
|
|
1772
|
-
class:
|
|
1772
|
+
class: F(h.value),
|
|
1773
1773
|
disabled: o.disabled || o.loading,
|
|
1774
1774
|
type: o.htmlType,
|
|
1775
1775
|
"data-placement": o.tooltipPlacement,
|
|
@@ -1778,16 +1778,16 @@ const ze = /* @__PURE__ */ w(Ar, [["render", Nr]]), Fr = ["disabled", "type", "d
|
|
|
1778
1778
|
o.loading ? (s(), ae(ze, {
|
|
1779
1779
|
key: 0,
|
|
1780
1780
|
class: "vt-button__icon"
|
|
1781
|
-
})) : o.icon ? (s(), ae(
|
|
1781
|
+
})) : o.icon ? (s(), ae(oe, {
|
|
1782
1782
|
key: 1,
|
|
1783
1783
|
name: o.icon,
|
|
1784
1784
|
class: "vt-button__icon"
|
|
1785
|
-
}, null, 8, ["name"])) :
|
|
1786
|
-
a.value ?
|
|
1787
|
-
we(
|
|
1785
|
+
}, null, 8, ["name"])) : E("", !0),
|
|
1786
|
+
a.value ? E("", !0) : (s(), i("span", qr, [
|
|
1787
|
+
we(d.$slots, "default")
|
|
1788
1788
|
]))
|
|
1789
1789
|
], 10, Fr)), [
|
|
1790
|
-
[
|
|
1790
|
+
[S, p.value]
|
|
1791
1791
|
]);
|
|
1792
1792
|
};
|
|
1793
1793
|
}
|
|
@@ -1797,7 +1797,7 @@ const ze = /* @__PURE__ */ w(Ar, [["render", Nr]]), Fr = ["disabled", "type", "d
|
|
|
1797
1797
|
}, Ur = {
|
|
1798
1798
|
key: 0,
|
|
1799
1799
|
class: "vt-modal__title"
|
|
1800
|
-
}, Yr = { class: "vt-modal__content" }, f1 = /* @__PURE__ */
|
|
1800
|
+
}, Yr = { class: "vt-modal__content" }, f1 = /* @__PURE__ */ de({
|
|
1801
1801
|
__name: "VModal",
|
|
1802
1802
|
props: {
|
|
1803
1803
|
modelValue: { type: Boolean },
|
|
@@ -1820,31 +1820,31 @@ const ze = /* @__PURE__ */ w(Ar, [["render", Nr]]), Fr = ["disabled", "type", "d
|
|
|
1820
1820
|
p.modelValue ? (s(), i("div", {
|
|
1821
1821
|
key: 0,
|
|
1822
1822
|
class: "vt-modal__backdrop",
|
|
1823
|
-
style:
|
|
1823
|
+
style: pe(a.value),
|
|
1824
1824
|
onClick: h
|
|
1825
1825
|
}, [
|
|
1826
1826
|
r("div", {
|
|
1827
|
-
class:
|
|
1827
|
+
class: F(l.value),
|
|
1828
1828
|
onClick: v[0] || (v[0] = fe(() => {
|
|
1829
1829
|
}, ["stop"]))
|
|
1830
1830
|
}, [
|
|
1831
1831
|
p.title || p.showCloseButton ? (s(), i("div", Kr, [
|
|
1832
|
-
p.title ? (s(), i("h2", Ur,
|
|
1833
|
-
p.showCloseButton ? (s(), ae(
|
|
1832
|
+
p.title ? (s(), i("h2", Ur, J(p.title), 1)) : E("", !0),
|
|
1833
|
+
p.showCloseButton ? (s(), ae(oe, {
|
|
1834
1834
|
key: 1,
|
|
1835
1835
|
name: "close",
|
|
1836
1836
|
class: "vt-modal__close",
|
|
1837
1837
|
onClick: u
|
|
1838
|
-
})) :
|
|
1839
|
-
])) :
|
|
1838
|
+
})) : E("", !0)
|
|
1839
|
+
])) : E("", !0),
|
|
1840
1840
|
r("div", Yr, [
|
|
1841
1841
|
we(p.$slots, "default")
|
|
1842
1842
|
])
|
|
1843
1843
|
], 2)
|
|
1844
|
-
], 4)) :
|
|
1844
|
+
], 4)) : E("", !0)
|
|
1845
1845
|
]));
|
|
1846
1846
|
}
|
|
1847
|
-
}), Xr = { class: "vt-pagination" }, Gr = { class: "vt-pagination__info" }, Jr = { class: "vt-pagination__rows-per-page" }, Qr = ["value"], es = { class: "vt-pagination__navigation" }, ts = ["disabled"], ns = ["onClick"], os = ["disabled"], ls = /* @__PURE__ */
|
|
1847
|
+
}), Xr = { class: "vt-pagination" }, Gr = { class: "vt-pagination__info" }, Jr = { class: "vt-pagination__rows-per-page" }, Qr = ["value"], es = { class: "vt-pagination__navigation" }, ts = ["disabled"], ns = ["onClick"], os = ["disabled"], ls = /* @__PURE__ */ de({
|
|
1848
1848
|
__name: "VPagination",
|
|
1849
1849
|
props: {
|
|
1850
1850
|
totalItems: {},
|
|
@@ -1857,46 +1857,46 @@ const ze = /* @__PURE__ */ w(Ar, [["render", Nr]]), Fr = ["disabled", "type", "d
|
|
|
1857
1857
|
setup(n, { emit: e }) {
|
|
1858
1858
|
const o = n, t = e, l = y({
|
|
1859
1859
|
get: () => o.currentPage,
|
|
1860
|
-
set: (
|
|
1860
|
+
set: (L) => t("update:currentPage", L)
|
|
1861
1861
|
}), a = y({
|
|
1862
1862
|
get: () => o.pageSize,
|
|
1863
|
-
set: (
|
|
1864
|
-
}), u = y(() => Math.ceil(o.totalItems / a.value)), h = y(() => o.totalItems === 0 ? 0 : (l.value - 1) * a.value + 1), p = y(() => Math.min(l.value * a.value, o.totalItems)), v = y(() => l.value <= 1),
|
|
1865
|
-
const
|
|
1866
|
-
if (T <=
|
|
1863
|
+
set: (L) => t("update:pageSize", L)
|
|
1864
|
+
}), u = y(() => Math.ceil(o.totalItems / a.value)), h = y(() => o.totalItems === 0 ? 0 : (l.value - 1) * a.value + 1), p = y(() => Math.min(l.value * a.value, o.totalItems)), v = y(() => l.value <= 1), d = y(() => l.value >= u.value), m = y(() => {
|
|
1865
|
+
const L = [], T = u.value, H = l.value, Q = o.maxVisiblePages;
|
|
1866
|
+
if (T <= Q)
|
|
1867
1867
|
for (let ee = 1; ee <= T; ee++)
|
|
1868
|
-
|
|
1868
|
+
L.push(ee);
|
|
1869
1869
|
else {
|
|
1870
|
-
|
|
1871
|
-
const ee = Math.max(2,
|
|
1872
|
-
ee > 2 &&
|
|
1873
|
-
for (let
|
|
1874
|
-
|
|
1875
|
-
|
|
1870
|
+
L.push(1);
|
|
1871
|
+
const ee = Math.max(2, H - Math.floor(Q / 2)), le = Math.min(T - 1, H + Math.floor(Q / 2));
|
|
1872
|
+
ee > 2 && L.push("...");
|
|
1873
|
+
for (let X = ee; X <= le; X++)
|
|
1874
|
+
L.push(X);
|
|
1875
|
+
le < T - 1 && L.push("..."), T > 1 && L.push(T);
|
|
1876
1876
|
}
|
|
1877
|
-
return
|
|
1878
|
-
}),
|
|
1877
|
+
return L;
|
|
1878
|
+
}), S = () => {
|
|
1879
1879
|
t("pageChange", {
|
|
1880
1880
|
page: l.value,
|
|
1881
1881
|
pageSize: a.value
|
|
1882
1882
|
});
|
|
1883
|
-
},
|
|
1884
|
-
typeof
|
|
1885
|
-
},
|
|
1886
|
-
v.value || (l.value--,
|
|
1887
|
-
},
|
|
1888
|
-
|
|
1889
|
-
}, A = () => {
|
|
1890
|
-
l.value = 1, M();
|
|
1883
|
+
}, B = (L) => {
|
|
1884
|
+
typeof L == "number" && L !== l.value && (l.value = L, S());
|
|
1885
|
+
}, D = () => {
|
|
1886
|
+
v.value || (l.value--, S());
|
|
1887
|
+
}, R = () => {
|
|
1888
|
+
d.value || (l.value++, S());
|
|
1891
1889
|
}, P = () => {
|
|
1890
|
+
l.value = 1, S();
|
|
1891
|
+
}, N = () => {
|
|
1892
1892
|
t("reloadData", l.value);
|
|
1893
1893
|
};
|
|
1894
1894
|
return Ce(
|
|
1895
1895
|
() => o.totalItems,
|
|
1896
1896
|
() => {
|
|
1897
|
-
l.value > u.value && u.value > 0 && (l.value = u.value,
|
|
1897
|
+
l.value > u.value && u.value > 0 && (l.value = u.value, S());
|
|
1898
1898
|
}
|
|
1899
|
-
), (
|
|
1899
|
+
), (L, T) => (s(), i("div", Xr, [
|
|
1900
1900
|
r("div", Gr, [
|
|
1901
1901
|
r("div", Jr, [
|
|
1902
1902
|
T[1] || (T[1] = r("label", {
|
|
@@ -1905,53 +1905,53 @@ const ze = /* @__PURE__ */ w(Ar, [["render", Nr]]), Fr = ["disabled", "type", "d
|
|
|
1905
1905
|
}, "Рядків на сторінку:", -1)),
|
|
1906
1906
|
Ze(r("select", {
|
|
1907
1907
|
id: "rowsSelect",
|
|
1908
|
-
"onUpdate:modelValue": T[0] || (T[0] = (
|
|
1909
|
-
onChange:
|
|
1908
|
+
"onUpdate:modelValue": T[0] || (T[0] = (H) => a.value = H),
|
|
1909
|
+
onChange: P,
|
|
1910
1910
|
class: "vt-pagination__select"
|
|
1911
1911
|
}, [
|
|
1912
|
-
(s(!0), i(
|
|
1913
|
-
key:
|
|
1914
|
-
value:
|
|
1915
|
-
},
|
|
1912
|
+
(s(!0), i(ce, null, he(L.pageSizeOptions, (H) => (s(), i("option", {
|
|
1913
|
+
key: H,
|
|
1914
|
+
value: H
|
|
1915
|
+
}, J(H), 9, Qr))), 128))
|
|
1916
1916
|
], 544), [
|
|
1917
1917
|
[_1, a.value]
|
|
1918
1918
|
])
|
|
1919
1919
|
]),
|
|
1920
|
-
r("span", null,
|
|
1920
|
+
r("span", null, J(h.value) + " - " + J(p.value) + " з " + J(L.totalItems), 1)
|
|
1921
1921
|
]),
|
|
1922
1922
|
r("div", es, [
|
|
1923
1923
|
r("button", {
|
|
1924
|
-
onClick:
|
|
1924
|
+
onClick: D,
|
|
1925
1925
|
disabled: v.value,
|
|
1926
|
-
class:
|
|
1926
|
+
class: F({ "vt-pagination__nav-button": !0, "has-items": !v.value })
|
|
1927
1927
|
}, [
|
|
1928
|
-
|
|
1928
|
+
Y(oe, { name: "arrowLeft" })
|
|
1929
1929
|
], 10, ts),
|
|
1930
|
-
(s(!0), i(
|
|
1931
|
-
key:
|
|
1932
|
-
onClick: (
|
|
1933
|
-
class:
|
|
1934
|
-
"vt-pagination__nav-button--active":
|
|
1930
|
+
(s(!0), i(ce, null, he(m.value, (H) => (s(), i("button", {
|
|
1931
|
+
key: H,
|
|
1932
|
+
onClick: (Q) => B(H),
|
|
1933
|
+
class: F(["vt-pagination__nav-button", {
|
|
1934
|
+
"vt-pagination__nav-button--active": H === l.value
|
|
1935
1935
|
}])
|
|
1936
|
-
},
|
|
1936
|
+
}, J(H), 11, ns))), 128)),
|
|
1937
1937
|
r("button", {
|
|
1938
|
-
onClick:
|
|
1939
|
-
disabled:
|
|
1940
|
-
class:
|
|
1938
|
+
onClick: R,
|
|
1939
|
+
disabled: d.value,
|
|
1940
|
+
class: F({ "vt-pagination__nav-button": !0, "has-items": !d.value })
|
|
1941
1941
|
}, [
|
|
1942
|
-
|
|
1942
|
+
Y(oe, { name: "arrowRight" })
|
|
1943
1943
|
], 10, os)
|
|
1944
1944
|
]),
|
|
1945
1945
|
r("div", null, [
|
|
1946
|
-
|
|
1946
|
+
Y(We, {
|
|
1947
1947
|
icon: "arrowReload",
|
|
1948
1948
|
shape: "circle",
|
|
1949
1949
|
tooltip: "",
|
|
1950
1950
|
tooltipPlacement: "left",
|
|
1951
|
-
onClick:
|
|
1951
|
+
onClick: N
|
|
1952
1952
|
}, {
|
|
1953
|
-
default:
|
|
1954
|
-
|
|
1953
|
+
default: ge(() => T[2] || (T[2] = [
|
|
1954
|
+
Me("Оновити дані ", -1)
|
|
1955
1955
|
])),
|
|
1956
1956
|
_: 1,
|
|
1957
1957
|
__: [2]
|
|
@@ -1959,7 +1959,7 @@ const ze = /* @__PURE__ */ w(Ar, [["render", Nr]]), Fr = ["disabled", "type", "d
|
|
|
1959
1959
|
])
|
|
1960
1960
|
]));
|
|
1961
1961
|
}
|
|
1962
|
-
}), rs = ["for"], ss = ["id", "name", "value", "checked", "disabled", "required", ".indeterminate"],
|
|
1962
|
+
}), rs = ["for"], ss = ["id", "name", "value", "checked", "disabled", "required", ".indeterminate"], Le = /* @__PURE__ */ de({
|
|
1963
1963
|
__name: "VCheckbox",
|
|
1964
1964
|
props: {
|
|
1965
1965
|
modelValue: { type: Boolean, default: void 0 },
|
|
@@ -1977,35 +1977,35 @@ const ze = /* @__PURE__ */ w(Ar, [["render", Nr]]), Fr = ["disabled", "type", "d
|
|
|
1977
1977
|
},
|
|
1978
1978
|
emits: ["update:modelValue", "change", "focus", "blur"],
|
|
1979
1979
|
setup(n, { emit: e }) {
|
|
1980
|
-
const o = n, t = e, l = () => `vt-checkbox-${Math.random().toString(36).substr(2, 9)}`, a = y(() => o.id || l()), u = y(() => o.modelValue ?? o.checked), h = (
|
|
1980
|
+
const o = n, t = e, l = () => `vt-checkbox-${Math.random().toString(36).substr(2, 9)}`, a = y(() => o.id || l()), u = y(() => o.modelValue ?? o.checked), h = (d) => {
|
|
1981
1981
|
if (o.disabled) return;
|
|
1982
|
-
const
|
|
1983
|
-
t("update:modelValue",
|
|
1984
|
-
}, p = (
|
|
1985
|
-
t("focus",
|
|
1986
|
-
}, v = (
|
|
1987
|
-
t("blur",
|
|
1982
|
+
const S = d.target.checked;
|
|
1983
|
+
t("update:modelValue", S), t("change", S, d);
|
|
1984
|
+
}, p = (d) => {
|
|
1985
|
+
t("focus", d);
|
|
1986
|
+
}, v = (d) => {
|
|
1987
|
+
t("blur", d);
|
|
1988
1988
|
};
|
|
1989
|
-
return (
|
|
1990
|
-
class:
|
|
1989
|
+
return (d, m) => (s(), i("label", {
|
|
1990
|
+
class: F([
|
|
1991
1991
|
"vt-checkbox",
|
|
1992
|
-
`vt-checkbox--${
|
|
1993
|
-
`vt-checkbox--${
|
|
1992
|
+
`vt-checkbox--${d.size}`,
|
|
1993
|
+
`vt-checkbox--${d.variant}`,
|
|
1994
1994
|
{
|
|
1995
|
-
"vt-checkbox--disabled":
|
|
1996
|
-
"vt-checkbox--double":
|
|
1995
|
+
"vt-checkbox--disabled": d.disabled,
|
|
1996
|
+
"vt-checkbox--double": d.isDouble
|
|
1997
1997
|
}
|
|
1998
1998
|
]),
|
|
1999
1999
|
for: a.value
|
|
2000
2000
|
}, [
|
|
2001
2001
|
r("input", {
|
|
2002
2002
|
id: a.value,
|
|
2003
|
-
name:
|
|
2004
|
-
value:
|
|
2003
|
+
name: d.name,
|
|
2004
|
+
value: d.value,
|
|
2005
2005
|
checked: u.value,
|
|
2006
|
-
disabled:
|
|
2007
|
-
required:
|
|
2008
|
-
".indeterminate":
|
|
2006
|
+
disabled: d.disabled,
|
|
2007
|
+
required: d.required,
|
|
2008
|
+
".indeterminate": d.indeterminate,
|
|
2009
2009
|
type: "checkbox",
|
|
2010
2010
|
class: "vt-checkbox__input",
|
|
2011
2011
|
onChange: h,
|
|
@@ -2013,19 +2013,19 @@ const ze = /* @__PURE__ */ w(Ar, [["render", Nr]]), Fr = ["disabled", "type", "d
|
|
|
2013
2013
|
onBlur: v
|
|
2014
2014
|
}, null, 40, ss),
|
|
2015
2015
|
r("div", {
|
|
2016
|
-
class:
|
|
2016
|
+
class: F([
|
|
2017
2017
|
"vt-checkbox__box",
|
|
2018
2018
|
{
|
|
2019
|
-
"vt-checkbox__box--checked": u.value && !
|
|
2020
|
-
"vt-checkbox__box--indeterminate":
|
|
2021
|
-
"vt-checkbox__box--double":
|
|
2022
|
-
"vt-checkbox__box--disabled":
|
|
2019
|
+
"vt-checkbox__box--checked": u.value && !d.indeterminate && !d.isDouble,
|
|
2020
|
+
"vt-checkbox__box--indeterminate": d.indeterminate,
|
|
2021
|
+
"vt-checkbox__box--double": d.isDouble && u.value,
|
|
2022
|
+
"vt-checkbox__box--disabled": d.disabled
|
|
2023
2023
|
}
|
|
2024
2024
|
])
|
|
2025
2025
|
}, [
|
|
2026
|
-
!
|
|
2026
|
+
!d.indeterminate && !d.isDouble ? (s(), i("svg", {
|
|
2027
2027
|
key: 0,
|
|
2028
|
-
class:
|
|
2028
|
+
class: F([
|
|
2029
2029
|
"vt-checkbox__checkmark",
|
|
2030
2030
|
{
|
|
2031
2031
|
"vt-checkbox__checkmark--checked": u.value
|
|
@@ -2036,17 +2036,17 @@ const ze = /* @__PURE__ */ w(Ar, [["render", Nr]]), Fr = ["disabled", "type", "d
|
|
|
2036
2036
|
viewBox: "0 0 10 9",
|
|
2037
2037
|
fill: "none",
|
|
2038
2038
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2039
|
-
},
|
|
2039
|
+
}, m[0] || (m[0] = [
|
|
2040
2040
|
r("path", {
|
|
2041
2041
|
d: "M1 5L3.58264 7.58264C3.80112 7.80112 4.16348 7.77113 4.34306 7.51971L9 1",
|
|
2042
2042
|
stroke: "currentColor",
|
|
2043
2043
|
"stroke-width": "2",
|
|
2044
2044
|
"stroke-linecap": "round"
|
|
2045
2045
|
}, null, -1)
|
|
2046
|
-
]), 2)) :
|
|
2047
|
-
|
|
2046
|
+
]), 2)) : E("", !0),
|
|
2047
|
+
d.isDouble && u.value ? (s(), i("svg", {
|
|
2048
2048
|
key: 1,
|
|
2049
|
-
class:
|
|
2049
|
+
class: F([
|
|
2050
2050
|
"vt-checkbox__checkmark",
|
|
2051
2051
|
{
|
|
2052
2052
|
"vt-checkbox__checkmark--checked": u.value
|
|
@@ -2057,7 +2057,7 @@ const ze = /* @__PURE__ */ w(Ar, [["render", Nr]]), Fr = ["disabled", "type", "d
|
|
|
2057
2057
|
viewBox: "0 0 13 6",
|
|
2058
2058
|
fill: "none",
|
|
2059
2059
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2060
|
-
},
|
|
2060
|
+
}, m[1] || (m[1] = [
|
|
2061
2061
|
r("path", {
|
|
2062
2062
|
d: "M6 3L8.25 5L12 1",
|
|
2063
2063
|
stroke: "currentColor",
|
|
@@ -2072,38 +2072,38 @@ const ze = /* @__PURE__ */ w(Ar, [["render", Nr]]), Fr = ["disabled", "type", "d
|
|
|
2072
2072
|
"stroke-linecap": "round",
|
|
2073
2073
|
"stroke-linejoin": "round"
|
|
2074
2074
|
}, null, -1)
|
|
2075
|
-
]), 2)) :
|
|
2076
|
-
|
|
2075
|
+
]), 2)) : E("", !0),
|
|
2076
|
+
d.indeterminate ? (s(), i("div", {
|
|
2077
2077
|
key: 2,
|
|
2078
|
-
class:
|
|
2078
|
+
class: F([
|
|
2079
2079
|
"vt-checkbox__indeterminate-mark",
|
|
2080
2080
|
{
|
|
2081
|
-
"vt-checkbox__indeterminate-mark--visible":
|
|
2081
|
+
"vt-checkbox__indeterminate-mark--visible": d.indeterminate
|
|
2082
2082
|
}
|
|
2083
2083
|
])
|
|
2084
|
-
}, null, 2)) :
|
|
2084
|
+
}, null, 2)) : E("", !0)
|
|
2085
2085
|
], 2),
|
|
2086
|
-
|
|
2086
|
+
d.label || d.$slots.label || d.$slots.default ? (s(), i("span", {
|
|
2087
2087
|
key: 0,
|
|
2088
|
-
class:
|
|
2088
|
+
class: F([
|
|
2089
2089
|
"vt-checkbox__label",
|
|
2090
2090
|
{
|
|
2091
|
-
"vt-checkbox__label--disabled":
|
|
2091
|
+
"vt-checkbox__label--disabled": d.disabled
|
|
2092
2092
|
}
|
|
2093
2093
|
])
|
|
2094
2094
|
}, [
|
|
2095
|
-
we(
|
|
2096
|
-
we(
|
|
2097
|
-
|
|
2095
|
+
we(d.$slots, "label", {}, () => [
|
|
2096
|
+
we(d.$slots, "default", {}, () => [
|
|
2097
|
+
Me(J(d.label), 1)
|
|
2098
2098
|
])
|
|
2099
2099
|
])
|
|
2100
|
-
], 2)) :
|
|
2100
|
+
], 2)) : E("", !0)
|
|
2101
2101
|
], 10, rs));
|
|
2102
2102
|
}
|
|
2103
2103
|
});
|
|
2104
2104
|
function is(n) {
|
|
2105
2105
|
const e = y(() => [...n].sort((l, a) => l.pinnedLeft && !a.pinnedLeft ? -1 : !l.pinnedLeft && a.pinnedLeft || l.pinnedRight && !a.pinnedRight ? 1 : !l.pinnedRight && a.pinnedRight ? -1 : 0)), o = () => {
|
|
2106
|
-
const l = e.value.length, a = e.value.filter((
|
|
2106
|
+
const l = e.value.length, a = e.value.filter((d) => d.width || d.minWidth), u = a.reduce((d, m) => d + (m.width || m.minWidth || 0), 0), h = l - a.length;
|
|
2107
2107
|
if (h === 0) return 150;
|
|
2108
2108
|
const v = Math.max(800 - u, h * 80);
|
|
2109
2109
|
return Math.max(Math.floor(v / h), 120);
|
|
@@ -2117,13 +2117,13 @@ function is(n) {
|
|
|
2117
2117
|
if (l === "left") {
|
|
2118
2118
|
u && (p += 50);
|
|
2119
2119
|
for (let v = 0; v < a; v++) {
|
|
2120
|
-
const
|
|
2121
|
-
|
|
2120
|
+
const d = h[v];
|
|
2121
|
+
d.pinnedLeft && (p += d.width || d.minWidth || o());
|
|
2122
2122
|
}
|
|
2123
2123
|
} else
|
|
2124
2124
|
for (let v = h.length - 1; v > a; v--) {
|
|
2125
|
-
const
|
|
2126
|
-
|
|
2125
|
+
const d = h[v];
|
|
2126
|
+
d.pinnedRight && (p += d.width || d.minWidth || o());
|
|
2127
2127
|
}
|
|
2128
2128
|
return p;
|
|
2129
2129
|
}
|
|
@@ -2140,8 +2140,8 @@ function as(n) {
|
|
|
2140
2140
|
else if (a.minWidth)
|
|
2141
2141
|
v.minWidth = `${a.minWidth}px`, v.width = `${a.minWidth}px`, v.maxWidth = "none";
|
|
2142
2142
|
else {
|
|
2143
|
-
const
|
|
2144
|
-
v.width = `${
|
|
2143
|
+
const d = p();
|
|
2144
|
+
v.width = `${d}px`, v.minWidth = "80px", v.maxWidth = "none";
|
|
2145
2145
|
}
|
|
2146
2146
|
return a.pinnedLeft ? (v.position = "sticky", v.left = `${h("left", u, n.selectable)}px`, v.zIndex = "10") : a.pinnedRight && (v.position = "sticky", v.right = `${h("right", u, !1)}px`, v.zIndex = "10"), v;
|
|
2147
2147
|
};
|
|
@@ -2159,7 +2159,7 @@ function as(n) {
|
|
|
2159
2159
|
};
|
|
2160
2160
|
}
|
|
2161
2161
|
function us() {
|
|
2162
|
-
const n =
|
|
2162
|
+
const n = V({
|
|
2163
2163
|
resizingCol: null,
|
|
2164
2164
|
startX: 0,
|
|
2165
2165
|
startWidth: 0
|
|
@@ -2168,17 +2168,17 @@ function us() {
|
|
|
2168
2168
|
onMouseDown: (t, l, a, u) => {
|
|
2169
2169
|
t.preventDefault(), t.stopPropagation(), n.value.resizingCol = l, n.value.startX = t.clientX, n.value.startWidth = l.width || l.minWidth || a(l.prop);
|
|
2170
2170
|
const h = (v) => {
|
|
2171
|
-
const { resizingCol:
|
|
2172
|
-
if (!
|
|
2173
|
-
document.querySelectorAll(`[data-resizer="${
|
|
2174
|
-
|
|
2171
|
+
const { resizingCol: d, startX: m, startWidth: S } = n.value;
|
|
2172
|
+
if (!d) return;
|
|
2173
|
+
document.querySelectorAll(`[data-resizer="${d.prop}"]`).forEach((N) => {
|
|
2174
|
+
N.classList.add("vt-table__resizer--active");
|
|
2175
2175
|
});
|
|
2176
|
-
const
|
|
2177
|
-
|
|
2176
|
+
const B = v.clientX - m, D = d.minWidth || 50, R = d.maxWidth || 1e3, P = Math.max(Math.min(S + B, R), D);
|
|
2177
|
+
d.width = P;
|
|
2178
2178
|
}, p = () => {
|
|
2179
2179
|
const { resizingCol: v } = n.value;
|
|
2180
|
-
document.removeEventListener("mousemove", h), document.removeEventListener("mouseup", p), document.body.style.cursor = "", document.body.style.userSelect = "", document.body.classList.remove("vt-table-resizing"), v && (document.querySelectorAll(`[data-resizer="${v.prop}"]`).forEach((
|
|
2181
|
-
|
|
2180
|
+
document.removeEventListener("mousemove", h), document.removeEventListener("mouseup", p), document.body.style.cursor = "", document.body.style.userSelect = "", document.body.classList.remove("vt-table-resizing"), v && (document.querySelectorAll(`[data-resizer="${v.prop}"]`).forEach((d) => {
|
|
2181
|
+
d.classList.remove("vt-table__resizer--active");
|
|
2182
2182
|
}), u && v.width && u(v.width)), n.value.resizingCol = null;
|
|
2183
2183
|
};
|
|
2184
2184
|
document.addEventListener("mousemove", h), document.addEventListener("mouseup", p), document.body.style.cursor = e, document.body.style.userSelect = "none", document.body.classList.add("vt-table-resizing");
|
|
@@ -2187,80 +2187,80 @@ function us() {
|
|
|
2187
2187
|
};
|
|
2188
2188
|
}
|
|
2189
2189
|
function ds(n, e, o, t) {
|
|
2190
|
-
var
|
|
2191
|
-
const l = n.selectionKey || "id", a =
|
|
2192
|
-
(
|
|
2193
|
-
const p = (
|
|
2190
|
+
var G;
|
|
2191
|
+
const l = n.selectionKey || "id", a = V([]), u = V(null), h = V(!1);
|
|
2192
|
+
(G = n.defaultSelection) != null && G.length && (a.value = [...n.defaultSelection]);
|
|
2193
|
+
const p = (I) => I[l], v = (I) => h.value ? !0 : a.value.some((_) => p(_) === p(I)), d = y(() => e.value.filter((I) => v(I)).length), m = y(() => e.value.length > 0 && d.value === e.value.length), S = y(() => {
|
|
2194
2194
|
if (h.value) return !1;
|
|
2195
|
-
const
|
|
2196
|
-
return
|
|
2197
|
-
}),
|
|
2198
|
-
const
|
|
2199
|
-
if (h.value && !
|
|
2200
|
-
h.value = !1, t != null && t.value && (a.value = t.value.filter((
|
|
2195
|
+
const I = d.value;
|
|
2196
|
+
return I > 0 && I < e.value.length;
|
|
2197
|
+
}), B = y(() => h.value ? !0 : m.value && !S.value), D = y(() => h.value), R = (I, _) => {
|
|
2198
|
+
const q = p(I), K = a.value.some((k) => p(k) === p(I)), f = _ !== void 0 ? _ : !K;
|
|
2199
|
+
if (h.value && !f) {
|
|
2200
|
+
h.value = !1, t != null && t.value && (a.value = t.value.filter((k) => p(k) !== q)), X(I, !1);
|
|
2201
2201
|
return;
|
|
2202
2202
|
}
|
|
2203
|
-
h.value &&
|
|
2204
|
-
},
|
|
2205
|
-
switch (
|
|
2203
|
+
h.value && f || (f && !K ? a.value.push(I) : !f && K && (a.value = a.value.filter((k) => p(k) !== q)), n.selectOnClickRow && _ === void 0 && Q(f ? I : null), X(I, f));
|
|
2204
|
+
}, P = () => {
|
|
2205
|
+
switch (N()) {
|
|
2206
2206
|
case "none":
|
|
2207
2207
|
case "partial":
|
|
2208
|
-
|
|
2208
|
+
L();
|
|
2209
2209
|
break;
|
|
2210
2210
|
case "allVisible":
|
|
2211
2211
|
T();
|
|
2212
2212
|
break;
|
|
2213
2213
|
case "absoluteAll":
|
|
2214
|
-
|
|
2214
|
+
H();
|
|
2215
2215
|
break;
|
|
2216
2216
|
}
|
|
2217
|
-
},
|
|
2218
|
-
const
|
|
2219
|
-
a.value.forEach((
|
|
2220
|
-
|
|
2221
|
-
}), e.value.forEach((
|
|
2222
|
-
|
|
2223
|
-
}), a.value =
|
|
2217
|
+
}, N = () => h.value ? "absoluteAll" : m.value ? "allVisible" : d.value > 0 ? "partial" : "none", L = () => {
|
|
2218
|
+
const I = [], _ = new Set(a.value.map((q) => p(q)));
|
|
2219
|
+
a.value.forEach((q) => {
|
|
2220
|
+
I.push(q);
|
|
2221
|
+
}), e.value.forEach((q) => {
|
|
2222
|
+
_.has(p(q)) || I.push(q);
|
|
2223
|
+
}), a.value = I, h.value = !1, X();
|
|
2224
2224
|
}, T = () => {
|
|
2225
|
-
h.value = !0, t != null && t.value ? a.value = [...t.value] : a.value = [...e.value],
|
|
2226
|
-
},
|
|
2227
|
-
a.value = [], h.value = !1, u.value = null,
|
|
2228
|
-
},
|
|
2229
|
-
const
|
|
2230
|
-
u.value =
|
|
2225
|
+
h.value = !0, t != null && t.value ? a.value = [...t.value] : a.value = [...e.value], X(void 0, void 0, !0);
|
|
2226
|
+
}, H = () => {
|
|
2227
|
+
a.value = [], h.value = !1, u.value = null, X();
|
|
2228
|
+
}, Q = (I) => {
|
|
2229
|
+
const _ = u.value;
|
|
2230
|
+
u.value = I, o("current-change", {
|
|
2231
2231
|
currentRow: u.value,
|
|
2232
|
-
oldCurrentRow:
|
|
2232
|
+
oldCurrentRow: _
|
|
2233
2233
|
});
|
|
2234
|
-
}, ee = () => [...a.value],
|
|
2235
|
-
a.value = [
|
|
2236
|
-
},
|
|
2237
|
-
const
|
|
2234
|
+
}, ee = () => [...a.value], le = (I) => {
|
|
2235
|
+
a.value = [...I], h.value = !1, X();
|
|
2236
|
+
}, X = (I, _, q = !1) => {
|
|
2237
|
+
const K = {
|
|
2238
2238
|
selection: [...a.value],
|
|
2239
|
-
row:
|
|
2240
|
-
selected:
|
|
2241
|
-
isAllSelected:
|
|
2239
|
+
row: I,
|
|
2240
|
+
selected: _,
|
|
2241
|
+
isAllSelected: q || h.value
|
|
2242
2242
|
};
|
|
2243
|
-
o("selection-change",
|
|
2243
|
+
o("selection-change", K);
|
|
2244
2244
|
};
|
|
2245
2245
|
return Ce(
|
|
2246
2246
|
() => n.defaultSelection,
|
|
2247
|
-
(
|
|
2248
|
-
|
|
2247
|
+
(I) => {
|
|
2248
|
+
I != null && I.length && (a.value = [...I]);
|
|
2249
2249
|
}
|
|
2250
2250
|
), {
|
|
2251
2251
|
selectedRows: a,
|
|
2252
2252
|
currentRow: u,
|
|
2253
2253
|
isRowSelected: v,
|
|
2254
|
-
isAllSelected:
|
|
2255
|
-
isIndeterminate:
|
|
2256
|
-
isDoubleCheck:
|
|
2254
|
+
isAllSelected: B,
|
|
2255
|
+
isIndeterminate: S,
|
|
2256
|
+
isDoubleCheck: D,
|
|
2257
2257
|
isFullSelection: h,
|
|
2258
|
-
toggleRowSelection:
|
|
2259
|
-
toggleAllSelection:
|
|
2260
|
-
clearSelection:
|
|
2261
|
-
setCurrentRow:
|
|
2258
|
+
toggleRowSelection: R,
|
|
2259
|
+
toggleAllSelection: P,
|
|
2260
|
+
clearSelection: H,
|
|
2261
|
+
setCurrentRow: Q,
|
|
2262
2262
|
getSelectionRows: ee,
|
|
2263
|
-
setSelectionRows:
|
|
2263
|
+
setSelectionRows: le,
|
|
2264
2264
|
selectAbsolutelyAll: T
|
|
2265
2265
|
};
|
|
2266
2266
|
}
|
|
@@ -2364,69 +2364,69 @@ function C1(n, e, o = {}) {
|
|
|
2364
2364
|
disabled: h = !1,
|
|
2365
2365
|
hideOnClick: p = !0,
|
|
2366
2366
|
onVisibleChange: v,
|
|
2367
|
-
onScroll:
|
|
2368
|
-
} = o,
|
|
2367
|
+
onScroll: d
|
|
2368
|
+
} = o, m = V(!1), S = V(!0), B = V(!1), D = V(null), R = V([]), P = V({
|
|
2369
2369
|
top: "0px",
|
|
2370
2370
|
left: "0px",
|
|
2371
2371
|
transformOrigin: "center top"
|
|
2372
|
-
}),
|
|
2372
|
+
}), N = () => {
|
|
2373
2373
|
if (!n.value) return;
|
|
2374
|
-
const
|
|
2375
|
-
|
|
2376
|
-
},
|
|
2377
|
-
if (await
|
|
2378
|
-
const
|
|
2379
|
-
|
|
2380
|
-
...
|
|
2381
|
-
minWidth: `${
|
|
2374
|
+
const G = a1(n.value);
|
|
2375
|
+
S.value !== G && (S.value = G, !G && m.value ? (B.value = !0, m.value = !1, v == null || v(!1)) : G && B.value && !m.value && (B.value = !1, m.value = !0, L(), v == null || v(!0)));
|
|
2376
|
+
}, L = async () => {
|
|
2377
|
+
if (await ye(), !n.value || !e.value) return;
|
|
2378
|
+
const G = n.value.getBoundingClientRect(), I = e.value.getBoundingClientRect(), _ = Cs(G, I, l);
|
|
2379
|
+
P.value = {
|
|
2380
|
+
..._,
|
|
2381
|
+
minWidth: `${G.width}px`
|
|
2382
2382
|
};
|
|
2383
2383
|
}, T = () => {
|
|
2384
|
-
(
|
|
2385
|
-
},
|
|
2386
|
-
n.value && (
|
|
2387
|
-
|
|
2384
|
+
(m.value || B.value) && (N(), m.value && L(), d == null || d());
|
|
2385
|
+
}, H = () => {
|
|
2386
|
+
n.value && (R.value = fs(n.value), R.value.forEach((G) => {
|
|
2387
|
+
G.addEventListener("scroll", T, { passive: !0 });
|
|
2388
2388
|
}), window.addEventListener("resize", T));
|
|
2389
|
-
},
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
}), window.removeEventListener("resize", T),
|
|
2389
|
+
}, Q = () => {
|
|
2390
|
+
R.value.forEach((G) => {
|
|
2391
|
+
G.removeEventListener("scroll", T);
|
|
2392
|
+
}), window.removeEventListener("resize", T), R.value = [];
|
|
2393
2393
|
}, ee = () => {
|
|
2394
|
-
h ||
|
|
2394
|
+
h || m.value || !n.value || !a1(n.value) || (D.value = window.setTimeout(
|
|
2395
2395
|
async () => {
|
|
2396
|
-
|
|
2396
|
+
m.value = !0, S.value = !0, B.value = !1, await L(), H(), v == null || v(!0);
|
|
2397
2397
|
},
|
|
2398
2398
|
t === "hover" ? a : 0
|
|
2399
2399
|
));
|
|
2400
|
-
},
|
|
2401
|
-
|
|
2400
|
+
}, le = () => {
|
|
2401
|
+
m.value && (D.value = window.setTimeout(
|
|
2402
2402
|
() => {
|
|
2403
|
-
|
|
2403
|
+
m.value = !1, B.value = !1, Q(), v == null || v(!1);
|
|
2404
2404
|
},
|
|
2405
2405
|
t === "hover" ? u : 0
|
|
2406
2406
|
));
|
|
2407
|
-
},
|
|
2408
|
-
h || (
|
|
2407
|
+
}, X = () => {
|
|
2408
|
+
h || (m.value ? le() : ee());
|
|
2409
2409
|
};
|
|
2410
2410
|
return He(() => {
|
|
2411
|
-
|
|
2411
|
+
Q();
|
|
2412
2412
|
}), {
|
|
2413
2413
|
// State
|
|
2414
|
-
visible:
|
|
2415
|
-
parentVisible:
|
|
2416
|
-
wasVisibleBeforeHiding:
|
|
2417
|
-
dropdownPosition:
|
|
2414
|
+
visible: m,
|
|
2415
|
+
parentVisible: S,
|
|
2416
|
+
wasVisibleBeforeHiding: B,
|
|
2417
|
+
dropdownPosition: P,
|
|
2418
2418
|
// Methods
|
|
2419
2419
|
show: ee,
|
|
2420
|
-
hide:
|
|
2421
|
-
toggle:
|
|
2422
|
-
updatePosition:
|
|
2420
|
+
hide: le,
|
|
2421
|
+
toggle: X,
|
|
2422
|
+
updatePosition: L,
|
|
2423
2423
|
// Internal methods
|
|
2424
|
-
checkParentVisibility:
|
|
2425
|
-
addScrollListeners:
|
|
2426
|
-
removeScrollListeners:
|
|
2424
|
+
checkParentVisibility: N,
|
|
2425
|
+
addScrollListeners: H,
|
|
2426
|
+
removeScrollListeners: Q
|
|
2427
2427
|
};
|
|
2428
2428
|
}
|
|
2429
|
-
const m1 = Symbol("dropdown-context"), w1 = /* @__PURE__ */
|
|
2429
|
+
const m1 = Symbol("dropdown-context"), w1 = /* @__PURE__ */ de({
|
|
2430
2430
|
__name: "VDropdown",
|
|
2431
2431
|
props: {
|
|
2432
2432
|
trigger: { default: "hover" },
|
|
@@ -2441,7 +2441,7 @@ const m1 = Symbol("dropdown-context"), w1 = /* @__PURE__ */ ce({
|
|
|
2441
2441
|
},
|
|
2442
2442
|
emits: ["visible-change", "click", "command"],
|
|
2443
2443
|
setup(n, { expose: e, emit: o }) {
|
|
2444
|
-
const t = n, l = o, a =
|
|
2444
|
+
const t = n, l = o, a = V(), u = V(), h = V(), p = V(!1), v = V(!1), d = V(null), { visible: m, parentVisible: S, dropdownPosition: B, show: D, hide: R, toggle: P } = C1(
|
|
2445
2445
|
u,
|
|
2446
2446
|
h,
|
|
2447
2447
|
{
|
|
@@ -2451,56 +2451,56 @@ const m1 = Symbol("dropdown-context"), w1 = /* @__PURE__ */ ce({
|
|
|
2451
2451
|
hideTimeout: t.hideTimeout,
|
|
2452
2452
|
disabled: t.disabled,
|
|
2453
2453
|
hideOnClick: t.hideOnClick,
|
|
2454
|
-
onVisibleChange: (
|
|
2454
|
+
onVisibleChange: (_) => l("visible-change", _)
|
|
2455
2455
|
}
|
|
2456
|
-
),
|
|
2457
|
-
|
|
2458
|
-
},
|
|
2459
|
-
|
|
2460
|
-
!p.value && !v.value &&
|
|
2456
|
+
), N = () => {
|
|
2457
|
+
d.value && (clearTimeout(d.value), d.value = null);
|
|
2458
|
+
}, L = () => {
|
|
2459
|
+
N(), d.value = setTimeout(() => {
|
|
2460
|
+
!p.value && !v.value && R();
|
|
2461
2461
|
}, t.hideTimeout);
|
|
2462
2462
|
};
|
|
2463
2463
|
e1(m1, {
|
|
2464
|
-
handleCommand: (
|
|
2465
|
-
l("command",
|
|
2464
|
+
handleCommand: (_) => {
|
|
2465
|
+
l("command", _), t.hideOnClick && R();
|
|
2466
2466
|
},
|
|
2467
2467
|
hideOnClick: t.hideOnClick
|
|
2468
2468
|
});
|
|
2469
|
-
const
|
|
2470
|
-
t.disabled || (l("click",
|
|
2471
|
-
},
|
|
2472
|
-
t.trigger === "hover" && (p.value = !0,
|
|
2469
|
+
const H = (_) => {
|
|
2470
|
+
t.disabled || (l("click", _), t.trigger === "click" && P());
|
|
2471
|
+
}, Q = () => {
|
|
2472
|
+
t.trigger === "hover" && (p.value = !0, N(), D());
|
|
2473
2473
|
}, ee = () => {
|
|
2474
|
-
t.trigger === "hover" && (p.value = !1,
|
|
2475
|
-
},
|
|
2476
|
-
t.trigger === "hover" && (v.value = !0,
|
|
2477
|
-
},
|
|
2478
|
-
t.trigger === "hover" && (v.value = !1,
|
|
2479
|
-
},
|
|
2480
|
-
var
|
|
2481
|
-
if (!
|
|
2482
|
-
const
|
|
2483
|
-
(
|
|
2484
|
-
},
|
|
2485
|
-
...
|
|
2474
|
+
t.trigger === "hover" && (p.value = !1, L());
|
|
2475
|
+
}, le = () => {
|
|
2476
|
+
t.trigger === "hover" && (v.value = !0, N());
|
|
2477
|
+
}, X = () => {
|
|
2478
|
+
t.trigger === "hover" && (v.value = !1, L());
|
|
2479
|
+
}, G = (_) => {
|
|
2480
|
+
var K, f;
|
|
2481
|
+
if (!m.value) return;
|
|
2482
|
+
const q = _.target;
|
|
2483
|
+
(K = a.value) != null && K.contains(q) || (f = h.value) != null && f.contains(q) || R();
|
|
2484
|
+
}, I = y(() => ({
|
|
2485
|
+
...B.value,
|
|
2486
2486
|
position: "absolute",
|
|
2487
2487
|
zIndex: 2e3,
|
|
2488
2488
|
maxHeight: typeof t.maxHeight == "number" ? `${t.maxHeight}px` : `${t.maxHeight}px`
|
|
2489
2489
|
}));
|
|
2490
2490
|
return e({
|
|
2491
|
-
show:
|
|
2492
|
-
hide:
|
|
2493
|
-
visible:
|
|
2494
|
-
}),
|
|
2495
|
-
document.addEventListener("click",
|
|
2491
|
+
show: D,
|
|
2492
|
+
hide: R,
|
|
2493
|
+
visible: m
|
|
2494
|
+
}), _e(() => {
|
|
2495
|
+
document.addEventListener("click", G);
|
|
2496
2496
|
}), He(() => {
|
|
2497
|
-
document.removeEventListener("click",
|
|
2498
|
-
}), (
|
|
2497
|
+
document.removeEventListener("click", G), N();
|
|
2498
|
+
}), (_, q) => (s(), i("div", {
|
|
2499
2499
|
ref_key: "dropdownRef",
|
|
2500
2500
|
ref: a,
|
|
2501
2501
|
class: "vt-dropdown",
|
|
2502
|
-
onClick:
|
|
2503
|
-
onMouseenter:
|
|
2502
|
+
onClick: H,
|
|
2503
|
+
onMouseenter: Q,
|
|
2504
2504
|
onMouseleave: ee
|
|
2505
2505
|
}, [
|
|
2506
2506
|
r("div", {
|
|
@@ -2508,28 +2508,28 @@ const m1 = Symbol("dropdown-context"), w1 = /* @__PURE__ */ ce({
|
|
|
2508
2508
|
ref: u,
|
|
2509
2509
|
class: "vt-dropdown__trigger"
|
|
2510
2510
|
}, [
|
|
2511
|
-
we(
|
|
2511
|
+
we(_.$slots, "default")
|
|
2512
2512
|
], 512),
|
|
2513
|
-
ne(
|
|
2513
|
+
ne(m) && ne(S) ? (s(), ae(Qe, {
|
|
2514
2514
|
key: 0,
|
|
2515
2515
|
to: "body"
|
|
2516
2516
|
}, [
|
|
2517
2517
|
r("div", {
|
|
2518
2518
|
ref_key: "menuRef",
|
|
2519
2519
|
ref: h,
|
|
2520
|
-
style:
|
|
2520
|
+
style: pe(I.value),
|
|
2521
2521
|
class: "vt-dropdown-menu",
|
|
2522
|
-
onMouseenter:
|
|
2523
|
-
onMouseleave:
|
|
2524
|
-
onClick:
|
|
2522
|
+
onMouseenter: le,
|
|
2523
|
+
onMouseleave: X,
|
|
2524
|
+
onClick: q[0] || (q[0] = fe(() => {
|
|
2525
2525
|
}, ["stop"]))
|
|
2526
2526
|
}, [
|
|
2527
|
-
we(
|
|
2527
|
+
we(_.$slots, "dropdown")
|
|
2528
2528
|
], 36)
|
|
2529
|
-
])) :
|
|
2529
|
+
])) : E("", !0)
|
|
2530
2530
|
], 544));
|
|
2531
2531
|
}
|
|
2532
|
-
}), Ue = /* @__PURE__ */
|
|
2532
|
+
}), Ue = /* @__PURE__ */ de({
|
|
2533
2533
|
__name: "VDropdownItem",
|
|
2534
2534
|
props: {
|
|
2535
2535
|
command: {},
|
|
@@ -2545,7 +2545,7 @@ const m1 = Symbol("dropdown-context"), w1 = /* @__PURE__ */ ce({
|
|
|
2545
2545
|
o.disabled || (console.log("VDropdownItem click:", o.command), t("click", u), o.command !== void 0 && l && (console.log("Calling handleCommand with:", o.command), l.handleCommand(o.command)));
|
|
2546
2546
|
};
|
|
2547
2547
|
return (u, h) => (s(), i("li", {
|
|
2548
|
-
class:
|
|
2548
|
+
class: F(["vt-dropdown-item", {
|
|
2549
2549
|
"is-disabled": u.disabled,
|
|
2550
2550
|
"vt-dropdown-item--divided": u.divided
|
|
2551
2551
|
}]),
|
|
@@ -2553,8 +2553,8 @@ const m1 = Symbol("dropdown-context"), w1 = /* @__PURE__ */ ce({
|
|
|
2553
2553
|
}, [
|
|
2554
2554
|
u.icon ? (s(), i("i", {
|
|
2555
2555
|
key: 0,
|
|
2556
|
-
class:
|
|
2557
|
-
}, null, 2)) :
|
|
2556
|
+
class: F([u.icon, "vt-dropdown-item__icon"])
|
|
2557
|
+
}, null, 2)) : E("", !0),
|
|
2558
2558
|
we(u.$slots, "default")
|
|
2559
2559
|
], 2));
|
|
2560
2560
|
}
|
|
@@ -2566,11 +2566,11 @@ class ms {
|
|
|
2566
2566
|
open(e = {}) {
|
|
2567
2567
|
const o = `modal-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`, t = document.createElement("div");
|
|
2568
2568
|
t.setAttribute("data-vt-modal", o), document.body.appendChild(t);
|
|
2569
|
-
const l =
|
|
2569
|
+
const l = V(!0), a = this.baseZIndex + this.modalStack.length * 10, u = k1({
|
|
2570
2570
|
setup() {
|
|
2571
2571
|
const p = () => {
|
|
2572
2572
|
l.value = !1, setTimeout(() => {
|
|
2573
|
-
|
|
2573
|
+
xe.closeById(o);
|
|
2574
2574
|
}, 100);
|
|
2575
2575
|
};
|
|
2576
2576
|
return () => qe(
|
|
@@ -2628,12 +2628,12 @@ class ms {
|
|
|
2628
2628
|
recalculateZIndices() {
|
|
2629
2629
|
}
|
|
2630
2630
|
}
|
|
2631
|
-
const
|
|
2631
|
+
const xe = new ms(), ws = {
|
|
2632
2632
|
install(n) {
|
|
2633
|
-
n.config.globalProperties.$modal =
|
|
2634
|
-
closeAll: () =>
|
|
2635
|
-
getCount: () =>
|
|
2636
|
-
closeById: (e) =>
|
|
2633
|
+
n.config.globalProperties.$modal = xe, n.config.globalProperties.$modalStack = {
|
|
2634
|
+
closeAll: () => xe.closeAll(),
|
|
2635
|
+
getCount: () => xe.getOpenModalsCount(),
|
|
2636
|
+
closeById: (e) => xe.closeById(e)
|
|
2637
2637
|
};
|
|
2638
2638
|
}
|
|
2639
2639
|
}, gs = { class: "vt-columns-selector-body" }, _s = { class: "vt-columns-selector" }, ks = { class: "vt-columns-selector__panel" }, bs = ["draggable", "onDragstart", "onDragover", "onDrop"], ys = {
|
|
@@ -2645,7 +2645,7 @@ const Me = new ms(), ws = {
|
|
|
2645
2645
|
}, Ls = {
|
|
2646
2646
|
key: 0,
|
|
2647
2647
|
class: "vt-columns-selector__pinned-note"
|
|
2648
|
-
}, Vs = { class: "vt-modal__content-button" }, Ss = /* @__PURE__ */
|
|
2648
|
+
}, Vs = { class: "vt-modal__content-button" }, Ss = /* @__PURE__ */ de({
|
|
2649
2649
|
__name: "VTableColumnSelector",
|
|
2650
2650
|
props: {
|
|
2651
2651
|
columns: {},
|
|
@@ -2653,192 +2653,192 @@ const Me = new ms(), ws = {
|
|
|
2653
2653
|
},
|
|
2654
2654
|
emits: ["update-columns"],
|
|
2655
2655
|
setup(n, { emit: e }) {
|
|
2656
|
-
const o = n, t = e, l =
|
|
2657
|
-
const
|
|
2658
|
-
return o.columnsSelector.forEach((
|
|
2659
|
-
if (
|
|
2656
|
+
const o = n, t = e, l = V([]), a = V(/* @__PURE__ */ new Set()), u = V(-1), h = V(-1), p = V("before"), v = y(() => {
|
|
2657
|
+
const f = {};
|
|
2658
|
+
return o.columnsSelector.forEach((k) => {
|
|
2659
|
+
if (k.name === "removed")
|
|
2660
2660
|
return;
|
|
2661
|
-
const
|
|
2662
|
-
|
|
2663
|
-
}),
|
|
2664
|
-
}),
|
|
2665
|
-
const
|
|
2666
|
-
let
|
|
2667
|
-
for (let
|
|
2668
|
-
|
|
2669
|
-
let
|
|
2670
|
-
for (let
|
|
2671
|
-
if (
|
|
2672
|
-
|
|
2661
|
+
const $ = k.columns.map((Z) => Z.prop), z = l.value.filter((Z) => $.includes(Z.prop));
|
|
2662
|
+
z.length === 0 ? f[k.name] = { checked: !1, indeterminate: !1 } : z.length === k.columns.length ? f[k.name] = { checked: !0, indeterminate: !1 } : f[k.name] = { checked: !1, indeterminate: !0 };
|
|
2663
|
+
}), f;
|
|
2664
|
+
}), d = y(() => o.columnsSelector.filter((f) => f.name !== "removed")), m = (f) => f.pinnedLeft || f.pinnedRight, S = (f) => !m(f), B = () => {
|
|
2665
|
+
const f = l.value;
|
|
2666
|
+
let k = -1;
|
|
2667
|
+
for (let z = 0; z < f.length; z++)
|
|
2668
|
+
f[z].pinnedLeft && (k = z);
|
|
2669
|
+
let $ = f.length;
|
|
2670
|
+
for (let z = 0; z < f.length; z++)
|
|
2671
|
+
if (f[z].pinnedRight) {
|
|
2672
|
+
$ = z;
|
|
2673
2673
|
break;
|
|
2674
2674
|
}
|
|
2675
2675
|
return {
|
|
2676
|
-
minIndex:
|
|
2677
|
-
maxIndex:
|
|
2676
|
+
minIndex: k + 1,
|
|
2677
|
+
maxIndex: $ - 1
|
|
2678
2678
|
};
|
|
2679
|
-
},
|
|
2680
|
-
const
|
|
2681
|
-
return !(
|
|
2682
|
-
},
|
|
2683
|
-
const
|
|
2684
|
-
if (!
|
|
2685
|
-
|
|
2679
|
+
}, D = (f) => {
|
|
2680
|
+
const k = B();
|
|
2681
|
+
return !(f < k.minIndex || f > k.maxIndex + 1);
|
|
2682
|
+
}, R = (f, k) => {
|
|
2683
|
+
const $ = l.value[k];
|
|
2684
|
+
if (!S($)) {
|
|
2685
|
+
f.preventDefault();
|
|
2686
2686
|
return;
|
|
2687
2687
|
}
|
|
2688
|
-
u.value =
|
|
2689
|
-
},
|
|
2688
|
+
u.value = k, f.dataTransfer && (f.dataTransfer.effectAllowed = "move", f.dataTransfer.setData("text/plain", $.prop)), document.body.style.cursor = "grabbing";
|
|
2689
|
+
}, P = (f, k) => {
|
|
2690
2690
|
if (u.value === -1) return;
|
|
2691
|
-
|
|
2692
|
-
const
|
|
2693
|
-
let W =
|
|
2694
|
-
|
|
2695
|
-
},
|
|
2691
|
+
f.preventDefault();
|
|
2692
|
+
const $ = f.currentTarget.getBoundingClientRect(), z = f.clientY, Z = $.top + $.height / 2;
|
|
2693
|
+
let W = k, ue = "before";
|
|
2694
|
+
z < Z ? (W = k, ue = "before") : (W = k + 1, ue = "after"), u.value < W && W--, D(W) ? (h.value = k, p.value = ue, f.dataTransfer.dropEffect = "move") : (h.value = -1, f.dataTransfer.dropEffect = "none");
|
|
2695
|
+
}, N = () => {
|
|
2696
2696
|
setTimeout(() => {
|
|
2697
2697
|
u.value === -1 && (h.value = -1);
|
|
2698
2698
|
}, 50);
|
|
2699
|
-
},
|
|
2700
|
-
if (
|
|
2701
|
-
|
|
2699
|
+
}, L = (f, k) => {
|
|
2700
|
+
if (f.preventDefault(), u.value === -1 || h.value === -1) {
|
|
2701
|
+
H();
|
|
2702
2702
|
return;
|
|
2703
2703
|
}
|
|
2704
|
-
const
|
|
2705
|
-
let W =
|
|
2706
|
-
if (
|
|
2707
|
-
|
|
2704
|
+
const $ = f.currentTarget.getBoundingClientRect(), z = f.clientY, Z = $.top + $.height / 2;
|
|
2705
|
+
let W = k;
|
|
2706
|
+
if (z >= Z && (W = k + 1), u.value < W && W--, !D(W) || W === u.value) {
|
|
2707
|
+
H();
|
|
2708
2708
|
return;
|
|
2709
2709
|
}
|
|
2710
|
-
const ue = [...l.value], [
|
|
2711
|
-
ue.splice(W, 0,
|
|
2710
|
+
const ue = [...l.value], [$e] = ue.splice(u.value, 1);
|
|
2711
|
+
ue.splice(W, 0, $e), l.value = ue, H();
|
|
2712
2712
|
}, T = () => {
|
|
2713
|
-
|
|
2714
|
-
},
|
|
2713
|
+
H();
|
|
2714
|
+
}, H = () => {
|
|
2715
2715
|
u.value = -1, h.value = -1, p.value = "before", document.body.style.cursor = "";
|
|
2716
|
-
},
|
|
2717
|
-
const
|
|
2718
|
-
return u.value ===
|
|
2716
|
+
}, Q = (f) => {
|
|
2717
|
+
const k = ["vt-columns-selector__panel-item"];
|
|
2718
|
+
return u.value === f && k.push("vt-columns-selector__panel-item--dragging"), h.value === f && p.value === "before" && k.push("vt-columns-selector__panel-item--drop-before"), h.value === f && p.value === "after" && k.push("vt-columns-selector__panel-item--drop-after"), k;
|
|
2719
2719
|
}, ee = () => {
|
|
2720
|
-
l.value = [...o.columns.map((
|
|
2721
|
-
|
|
2720
|
+
l.value = [...o.columns.map((f) => ({ ...f }))], o.columnsSelector.forEach((f) => {
|
|
2721
|
+
f.name !== "removed" && a.value.add(f.name);
|
|
2722
2722
|
});
|
|
2723
|
-
},
|
|
2724
|
-
if (
|
|
2725
|
-
l.value.some((
|
|
2723
|
+
}, le = (f, k) => {
|
|
2724
|
+
if (k)
|
|
2725
|
+
l.value.some(($) => $.prop === f.prop) || l.value.push({ ...f });
|
|
2726
2726
|
else {
|
|
2727
|
-
if (f
|
|
2727
|
+
if (m(f))
|
|
2728
2728
|
return;
|
|
2729
|
-
l.value = l.value.filter((
|
|
2729
|
+
l.value = l.value.filter(($) => $.prop !== f.prop);
|
|
2730
2730
|
}
|
|
2731
|
-
},
|
|
2732
|
-
if (
|
|
2733
|
-
|
|
2734
|
-
l.value.some((
|
|
2731
|
+
}, X = (f, k) => {
|
|
2732
|
+
if (k)
|
|
2733
|
+
f.columns.forEach(($) => {
|
|
2734
|
+
l.value.some((z) => z.prop === $.prop) || l.value.push({ ...$ });
|
|
2735
2735
|
});
|
|
2736
2736
|
else {
|
|
2737
|
-
const
|
|
2738
|
-
|
|
2739
|
-
const
|
|
2740
|
-
|
|
2737
|
+
const $ = [];
|
|
2738
|
+
f.columns.forEach((z) => {
|
|
2739
|
+
const Z = l.value.find((W) => W.prop === z.prop);
|
|
2740
|
+
Z && !m(Z) && $.push(Z);
|
|
2741
2741
|
}), l.value = l.value.filter(
|
|
2742
|
-
(
|
|
2742
|
+
(z) => !$.some((Z) => Z.prop === z.prop)
|
|
2743
2743
|
);
|
|
2744
2744
|
}
|
|
2745
|
-
},
|
|
2746
|
-
const
|
|
2747
|
-
return !
|
|
2748
|
-
},
|
|
2749
|
-
a.value.has(
|
|
2750
|
-
},
|
|
2751
|
-
t("update-columns", [...l.value]),
|
|
2752
|
-
},
|
|
2753
|
-
|
|
2745
|
+
}, G = (f) => l.value.some((k) => k.prop === f.prop), I = (f) => {
|
|
2746
|
+
const k = l.value.find(($) => $.prop === f.prop);
|
|
2747
|
+
return !k || !m(k);
|
|
2748
|
+
}, _ = (f) => {
|
|
2749
|
+
a.value.has(f) ? a.value.delete(f) : a.value.add(f);
|
|
2750
|
+
}, q = () => {
|
|
2751
|
+
t("update-columns", [...l.value]), xe.close();
|
|
2752
|
+
}, K = () => {
|
|
2753
|
+
xe.close();
|
|
2754
2754
|
};
|
|
2755
|
-
return
|
|
2755
|
+
return _e(() => {
|
|
2756
2756
|
ee();
|
|
2757
|
-
}), (
|
|
2757
|
+
}), (f, k) => (s(), i("div", gs, [
|
|
2758
2758
|
r("div", _s, [
|
|
2759
2759
|
r("div", ks, [
|
|
2760
|
-
(s(!0), i(
|
|
2761
|
-
key:
|
|
2762
|
-
class:
|
|
2763
|
-
draggable:
|
|
2764
|
-
onDragstart: (
|
|
2765
|
-
onDragover: (
|
|
2766
|
-
onDragleave:
|
|
2767
|
-
onDrop: (
|
|
2760
|
+
(s(!0), i(ce, null, he(l.value, ($, z) => (s(), i("div", {
|
|
2761
|
+
key: $.prop,
|
|
2762
|
+
class: F(Q(z)),
|
|
2763
|
+
draggable: S($),
|
|
2764
|
+
onDragstart: (Z) => R(Z, z),
|
|
2765
|
+
onDragover: (Z) => P(Z, z),
|
|
2766
|
+
onDragleave: N,
|
|
2767
|
+
onDrop: (Z) => L(Z, z),
|
|
2768
2768
|
onDragend: T
|
|
2769
2769
|
}, [
|
|
2770
|
-
|
|
2771
|
-
name:
|
|
2772
|
-
class:
|
|
2770
|
+
Y(oe, {
|
|
2771
|
+
name: S($) ? "columnsMove" : "freeze",
|
|
2772
|
+
class: F(["vt-columns-selector__panel-item-icon", { "vt-columns-selector__panel-item-icon--draggable": S($) }])
|
|
2773
2773
|
}, null, 8, ["name", "class"]),
|
|
2774
|
-
|
|
2775
|
-
label:
|
|
2774
|
+
Y(Le, {
|
|
2775
|
+
label: $.label,
|
|
2776
2776
|
checked: !0,
|
|
2777
|
-
disabled:
|
|
2778
|
-
onChange: (
|
|
2779
|
-
onClick:
|
|
2777
|
+
disabled: m($),
|
|
2778
|
+
onChange: (Z) => le($, Z),
|
|
2779
|
+
onClick: k[0] || (k[0] = fe(() => {
|
|
2780
2780
|
}, ["stop"]))
|
|
2781
2781
|
}, null, 8, ["label", "disabled", "onChange"]),
|
|
2782
|
-
|
|
2782
|
+
m($) ? (s(), i("span", ys, "pinned")) : E("", !0)
|
|
2783
2783
|
], 42, bs))), 128))
|
|
2784
2784
|
]),
|
|
2785
2785
|
r("div", xs, [
|
|
2786
|
-
(s(!0), i(
|
|
2787
|
-
var
|
|
2786
|
+
(s(!0), i(ce, null, he(d.value, ($) => {
|
|
2787
|
+
var z, Z;
|
|
2788
2788
|
return s(), i("div", {
|
|
2789
|
-
key:
|
|
2789
|
+
key: $.name,
|
|
2790
2790
|
class: "vt-columns-selector__group"
|
|
2791
2791
|
}, [
|
|
2792
2792
|
r("div", {
|
|
2793
2793
|
class: "vt-columns-selector__group-header",
|
|
2794
|
-
onClick: (W) =>
|
|
2794
|
+
onClick: (W) => _($.name)
|
|
2795
2795
|
}, [
|
|
2796
|
-
|
|
2797
|
-
label:
|
|
2798
|
-
checked: ((
|
|
2799
|
-
indeterminate: ((
|
|
2800
|
-
onChange: (W) =>
|
|
2801
|
-
onClick:
|
|
2796
|
+
Y(Le, {
|
|
2797
|
+
label: $.label,
|
|
2798
|
+
checked: ((z = v.value[$.name]) == null ? void 0 : z.checked) || !1,
|
|
2799
|
+
indeterminate: ((Z = v.value[$.name]) == null ? void 0 : Z.indeterminate) || !1,
|
|
2800
|
+
onChange: (W) => X($, W),
|
|
2801
|
+
onClick: k[1] || (k[1] = fe(() => {
|
|
2802
2802
|
}, ["stop"]))
|
|
2803
2803
|
}, null, 8, ["label", "checked", "indeterminate", "onChange"]),
|
|
2804
|
-
|
|
2804
|
+
$.icon ? (s(), ae(oe, {
|
|
2805
2805
|
key: 0,
|
|
2806
|
-
name:
|
|
2806
|
+
name: $.icon,
|
|
2807
2807
|
class: "vt-columns-selector__group-icon"
|
|
2808
|
-
}, null, 8, ["name"])) :
|
|
2808
|
+
}, null, 8, ["name"])) : E("", !0)
|
|
2809
2809
|
], 8, Ms),
|
|
2810
|
-
a.value.has(
|
|
2811
|
-
(s(!0), i(
|
|
2810
|
+
a.value.has($.name) ? (s(), i("div", $s, [
|
|
2811
|
+
(s(!0), i(ce, null, he($.columns, (W) => (s(), i("div", {
|
|
2812
2812
|
key: W.prop,
|
|
2813
2813
|
class: "vt-columns-selector__group-column"
|
|
2814
2814
|
}, [
|
|
2815
|
-
|
|
2815
|
+
Y(Le, {
|
|
2816
2816
|
label: W.label,
|
|
2817
|
-
checked:
|
|
2818
|
-
disabled:
|
|
2819
|
-
onChange: (ue) =>
|
|
2817
|
+
checked: G(W),
|
|
2818
|
+
disabled: !I(W),
|
|
2819
|
+
onChange: (ue) => le(W, ue)
|
|
2820
2820
|
}, null, 8, ["label", "checked", "disabled", "onChange"]),
|
|
2821
|
-
|
|
2821
|
+
I(W) ? E("", !0) : (s(), i("span", Ls, " (закріплена) "))
|
|
2822
2822
|
]))), 128))
|
|
2823
|
-
])) :
|
|
2823
|
+
])) : E("", !0)
|
|
2824
2824
|
]);
|
|
2825
2825
|
}), 128))
|
|
2826
2826
|
])
|
|
2827
2827
|
]),
|
|
2828
2828
|
r("div", Vs, [
|
|
2829
|
-
|
|
2830
|
-
default:
|
|
2831
|
-
|
|
2829
|
+
Y(We, { onClick: K }, {
|
|
2830
|
+
default: ge(() => k[2] || (k[2] = [
|
|
2831
|
+
Me("Скасувати", -1)
|
|
2832
2832
|
])),
|
|
2833
2833
|
_: 1,
|
|
2834
2834
|
__: [2]
|
|
2835
2835
|
}),
|
|
2836
|
-
|
|
2836
|
+
Y(We, {
|
|
2837
2837
|
type: "primary",
|
|
2838
|
-
onClick:
|
|
2838
|
+
onClick: q
|
|
2839
2839
|
}, {
|
|
2840
|
-
default:
|
|
2841
|
-
|
|
2840
|
+
default: ge(() => k[3] || (k[3] = [
|
|
2841
|
+
Me("Зберегти", -1)
|
|
2842
2842
|
])),
|
|
2843
2843
|
_: 1,
|
|
2844
2844
|
__: [3]
|
|
@@ -2846,7 +2846,7 @@ const Me = new ms(), ws = {
|
|
|
2846
2846
|
])
|
|
2847
2847
|
]));
|
|
2848
2848
|
}
|
|
2849
|
-
}), Is = { class: "vt-table-header-actions" }, Hs = /* @__PURE__ */
|
|
2849
|
+
}), Is = { class: "vt-table-header-actions" }, Hs = /* @__PURE__ */ de({
|
|
2850
2850
|
__name: "ColumnActions",
|
|
2851
2851
|
props: {
|
|
2852
2852
|
column: {},
|
|
@@ -2855,8 +2855,8 @@ const Me = new ms(), ws = {
|
|
|
2855
2855
|
},
|
|
2856
2856
|
emits: ["pin", "update-columns"],
|
|
2857
2857
|
setup(n, { emit: e }) {
|
|
2858
|
-
const o = n, t = e, l = () => !!(o.column.pinnedLeft || o.column.pinnedRight), a = (
|
|
2859
|
-
switch (console.log("ColumnActions - Command received:",
|
|
2858
|
+
const o = n, t = e, l = () => !!(o.column.pinnedLeft || o.column.pinnedRight), a = (d) => {
|
|
2859
|
+
switch (console.log("ColumnActions - Command received:", d, typeof d), String(d)) {
|
|
2860
2860
|
case "pin":
|
|
2861
2861
|
console.log("Executing pin command"), u();
|
|
2862
2862
|
break;
|
|
@@ -2864,79 +2864,79 @@ const Me = new ms(), ws = {
|
|
|
2864
2864
|
console.log("Executing columns command"), v();
|
|
2865
2865
|
break;
|
|
2866
2866
|
default:
|
|
2867
|
-
console.warn("Unknown command:",
|
|
2867
|
+
console.warn("Unknown command:", d);
|
|
2868
2868
|
}
|
|
2869
2869
|
}, u = () => {
|
|
2870
|
-
const
|
|
2871
|
-
console.log("handlePin called, isPinned:",
|
|
2872
|
-
}, h = (
|
|
2870
|
+
const d = l();
|
|
2871
|
+
console.log("handlePin called, isPinned:", d), d ? t("pin", o.column, "none") : t("pin", o.column, "left");
|
|
2872
|
+
}, h = (d) => ({
|
|
2873
2873
|
name: "removed",
|
|
2874
2874
|
label: "Видалені колонки",
|
|
2875
2875
|
order: 999,
|
|
2876
|
-
columns:
|
|
2877
|
-
}), p = (
|
|
2878
|
-
var
|
|
2879
|
-
const
|
|
2880
|
-
(
|
|
2881
|
-
|
|
2882
|
-
}), o.allColumns.forEach((
|
|
2883
|
-
const
|
|
2884
|
-
|
|
2885
|
-
var
|
|
2886
|
-
if (!
|
|
2887
|
-
let
|
|
2888
|
-
(
|
|
2889
|
-
const
|
|
2890
|
-
|
|
2891
|
-
}),
|
|
2876
|
+
columns: d
|
|
2877
|
+
}), p = (d) => {
|
|
2878
|
+
var R;
|
|
2879
|
+
const m = new Set(d.map((P) => P.prop)), S = /* @__PURE__ */ new Set();
|
|
2880
|
+
(R = o.columnsSelector) == null || R.forEach((P) => {
|
|
2881
|
+
P.columns.forEach((N) => S.add(N.prop));
|
|
2882
|
+
}), o.allColumns.forEach((P) => S.add(P.prop));
|
|
2883
|
+
const B = [];
|
|
2884
|
+
S.forEach((P) => {
|
|
2885
|
+
var N;
|
|
2886
|
+
if (!m.has(P)) {
|
|
2887
|
+
let L;
|
|
2888
|
+
(N = o.columnsSelector) == null || N.forEach((T) => {
|
|
2889
|
+
const H = T.columns.find((Q) => Q.prop === P);
|
|
2890
|
+
H && (L = H);
|
|
2891
|
+
}), L || (L = o.allColumns.find((T) => T.prop === P)), L && B.push(L);
|
|
2892
2892
|
}
|
|
2893
2893
|
});
|
|
2894
|
-
const
|
|
2895
|
-
return
|
|
2894
|
+
const D = [...o.columnsSelector || []];
|
|
2895
|
+
return B.length > 0 && D.push(h(B)), D;
|
|
2896
2896
|
}, v = () => {
|
|
2897
2897
|
console.log("handleToggleVisibility called");
|
|
2898
|
-
const
|
|
2899
|
-
|
|
2898
|
+
const d = p(o.allColumns);
|
|
2899
|
+
xe.open({
|
|
2900
2900
|
component: Ss,
|
|
2901
2901
|
title: "Управління колонками таблиці",
|
|
2902
2902
|
props: {
|
|
2903
2903
|
columns: o.allColumns,
|
|
2904
|
-
columnsSelector:
|
|
2905
|
-
"onUpdate-columns": (
|
|
2906
|
-
t("update-columns",
|
|
2904
|
+
columnsSelector: d,
|
|
2905
|
+
"onUpdate-columns": (m) => {
|
|
2906
|
+
t("update-columns", m);
|
|
2907
2907
|
}
|
|
2908
2908
|
},
|
|
2909
2909
|
size: "large",
|
|
2910
2910
|
closeOnBackdropClick: !1
|
|
2911
2911
|
});
|
|
2912
2912
|
};
|
|
2913
|
-
return (
|
|
2913
|
+
return (d, m) => (s(), ae(w1, {
|
|
2914
2914
|
trigger: "click",
|
|
2915
2915
|
placement: "bottom-start",
|
|
2916
2916
|
onCommand: a
|
|
2917
2917
|
}, {
|
|
2918
|
-
dropdown:
|
|
2919
|
-
|
|
2920
|
-
default:
|
|
2921
|
-
|
|
2918
|
+
dropdown: ge(() => [
|
|
2919
|
+
Y(Ue, { command: "pin" }, {
|
|
2920
|
+
default: ge(() => [
|
|
2921
|
+
Y(oe, {
|
|
2922
2922
|
name: l() ? "unfreeze" : "freeze"
|
|
2923
2923
|
}, null, 8, ["name"]),
|
|
2924
|
-
r("div", null,
|
|
2924
|
+
r("div", null, J(l() ? "Розморозити" : "Заморозити"), 1)
|
|
2925
2925
|
]),
|
|
2926
2926
|
_: 1
|
|
2927
2927
|
}),
|
|
2928
|
-
|
|
2929
|
-
default:
|
|
2930
|
-
|
|
2931
|
-
|
|
2928
|
+
Y(Ue, { command: "columns" }, {
|
|
2929
|
+
default: ge(() => [
|
|
2930
|
+
Y(oe, { name: "columnInsert" }),
|
|
2931
|
+
m[0] || (m[0] = r("div", null, "Колонки", -1))
|
|
2932
2932
|
]),
|
|
2933
2933
|
_: 1,
|
|
2934
2934
|
__: [0]
|
|
2935
2935
|
})
|
|
2936
2936
|
]),
|
|
2937
|
-
default:
|
|
2937
|
+
default: ge(() => [
|
|
2938
2938
|
r("div", Is, [
|
|
2939
|
-
|
|
2939
|
+
Y(oe, { name: "listBullet" })
|
|
2940
2940
|
])
|
|
2941
2941
|
]),
|
|
2942
2942
|
_: 1
|
|
@@ -2951,7 +2951,7 @@ const Me = new ms(), ws = {
|
|
|
2951
2951
|
}, Ps = ["colspan"], Ws = { class: "vt-table__empty-content" }, As = ["onClick"], Zs = { class: "vt-table__cell-content" }, Ns = { class: "vt-table__cell-content vt-table__cell-content--ellipsis" }, Fs = { key: 1 }, qs = ["data-resizer", "onMousedown"], Ks = {
|
|
2952
2952
|
key: 1,
|
|
2953
2953
|
class: "vt-table__summary"
|
|
2954
|
-
}, Us = { class: "vt-table__cell-content vt-table__cell-content--summary" }, Ke = 50, Ys = /* @__PURE__ */
|
|
2954
|
+
}, Us = { class: "vt-table__cell-content vt-table__cell-content--summary" }, Ke = 50, Ys = /* @__PURE__ */ de({
|
|
2955
2955
|
__name: "VTable",
|
|
2956
2956
|
props: /* @__PURE__ */ l1({
|
|
2957
2957
|
data: {},
|
|
@@ -2979,339 +2979,339 @@ const Me = new ms(), ws = {
|
|
|
2979
2979
|
}),
|
|
2980
2980
|
emits: /* @__PURE__ */ l1(["sort-change", "selection-change", "current-change", "row-click", "update:columns", "column-pin", "column-resize", "column-visibility", "column-sort", "columns-change", "infinity-scroll"], ["update:columns"]),
|
|
2981
2981
|
setup(n, { expose: e, emit: o }) {
|
|
2982
|
-
const t = n, l = o, a = b1(n, "columns"), u =
|
|
2983
|
-
let
|
|
2984
|
-
const
|
|
2985
|
-
|
|
2982
|
+
const t = n, l = o, a = b1(n, "columns"), u = V({}), h = V(), p = y1([]), v = V(t.defaultSort || null), d = y(() => vs(t.data || [], v.value, p)), m = y(() => a.value !== void 0), S = y(() => t.data && t.data.length > 0), B = V(!1), D = V(0);
|
|
2983
|
+
let R;
|
|
2984
|
+
const P = (C, b) => t.rowKey && C[t.rowKey] != null ? String(C[t.rowKey]) : String(b), N = () => {
|
|
2985
|
+
m.value && a.value ? p.splice(0, p.length, ...a.value) : t.columns && t.columns.length > 0 && p.splice(0, p.length, ...t.columns);
|
|
2986
2986
|
};
|
|
2987
2987
|
Ce(
|
|
2988
2988
|
() => a.value,
|
|
2989
|
-
(
|
|
2990
|
-
|
|
2989
|
+
(C) => {
|
|
2990
|
+
C && m.value && p.splice(0, p.length, ...C);
|
|
2991
2991
|
},
|
|
2992
2992
|
{ deep: !0 }
|
|
2993
2993
|
), Ce(
|
|
2994
2994
|
() => t.columns,
|
|
2995
|
-
(
|
|
2996
|
-
|
|
2995
|
+
(C) => {
|
|
2996
|
+
C && !m.value && p.splice(0, p.length, ...C);
|
|
2997
2997
|
},
|
|
2998
2998
|
{ deep: !0 }
|
|
2999
2999
|
), e1("vt-table-columns", p);
|
|
3000
|
-
const { sortedColumns:
|
|
3000
|
+
const { sortedColumns: L, getDefaultColumnWidth: T, getStickyOffset: H } = is(p), { getTableWrapperStyle: Q, getColumnStyle: ee, getHeaderStyle: le, getFooterStyle: X } = as(t), { onMouseDown: G } = us(), I = y(() => t.allData || t.data), _ = t.selectable ? ds(t, d, l, I) : null, q = () => ({
|
|
3001
3001
|
width: `${Ke}px`,
|
|
3002
3002
|
minWidth: `${Ke}px`,
|
|
3003
3003
|
maxWidth: `${Ke}px`,
|
|
3004
3004
|
left: "0px",
|
|
3005
3005
|
position: "sticky",
|
|
3006
3006
|
zIndex: 10
|
|
3007
|
-
}),
|
|
3008
|
-
const
|
|
3007
|
+
}), K = () => {
|
|
3008
|
+
const C = q();
|
|
3009
3009
|
return t.maxHeight ? {
|
|
3010
|
-
...
|
|
3010
|
+
...C,
|
|
3011
3011
|
top: "0px",
|
|
3012
3012
|
zIndex: 11
|
|
3013
|
-
} :
|
|
3014
|
-
},
|
|
3015
|
-
const
|
|
3013
|
+
} : C;
|
|
3014
|
+
}, f = () => {
|
|
3015
|
+
const C = q();
|
|
3016
3016
|
return t.maxHeight ? {
|
|
3017
|
-
...
|
|
3017
|
+
...C,
|
|
3018
3018
|
bottom: "0px",
|
|
3019
3019
|
zIndex: 11
|
|
3020
|
-
} :
|
|
3021
|
-
},
|
|
3022
|
-
if (!h.value ||
|
|
3023
|
-
const
|
|
3024
|
-
|
|
3025
|
-
const Pe =
|
|
3026
|
-
|
|
3027
|
-
|
|
3020
|
+
} : C;
|
|
3021
|
+
}, k = () => {
|
|
3022
|
+
if (!h.value || B.value) return;
|
|
3023
|
+
const C = h.value, b = C.scrollTop, j = C.scrollHeight, U = C.clientHeight, te = 30;
|
|
3024
|
+
R && clearTimeout(R), R = setTimeout(() => {
|
|
3025
|
+
const Pe = b - D.value > 1, O = j - b - U <= te, me = j - b - U <= 5;
|
|
3026
|
+
D.value = b, Pe && (O || me) && (B.value = !0, l("infinity-scroll"), setTimeout(() => {
|
|
3027
|
+
B.value = !1;
|
|
3028
3028
|
}, 1e3));
|
|
3029
3029
|
}, 50);
|
|
3030
|
-
},
|
|
3031
|
-
|
|
3030
|
+
}, $ = () => {
|
|
3031
|
+
B.value = !1;
|
|
3032
3032
|
};
|
|
3033
|
-
|
|
3034
|
-
h.value && h.value.addEventListener("scroll",
|
|
3033
|
+
_e(() => {
|
|
3034
|
+
h.value && h.value.addEventListener("scroll", k);
|
|
3035
3035
|
}), He(() => {
|
|
3036
|
-
|
|
3036
|
+
R && clearTimeout(R), h.value && h.value.removeEventListener("scroll", k);
|
|
3037
3037
|
});
|
|
3038
|
-
const
|
|
3039
|
-
ps(
|
|
3040
|
-
var
|
|
3041
|
-
((
|
|
3042
|
-
column:
|
|
3038
|
+
const z = (C, b) => {
|
|
3039
|
+
ps(C, b, (j) => {
|
|
3040
|
+
var U, te;
|
|
3041
|
+
((U = v.value) == null ? void 0 : U.prop) === C.prop && v.value.direction === b ? v.value = null : v.value = j, l("sort-change", {
|
|
3042
|
+
column: C,
|
|
3043
3043
|
direction: ((te = v.value) == null ? void 0 : te.direction) || null,
|
|
3044
|
-
prop:
|
|
3045
|
-
sortedData:
|
|
3044
|
+
prop: C.prop,
|
|
3045
|
+
sortedData: d.value
|
|
3046
3046
|
});
|
|
3047
3047
|
});
|
|
3048
|
-
},
|
|
3049
|
-
const
|
|
3050
|
-
pinnedLeft:
|
|
3051
|
-
pinnedRight:
|
|
3048
|
+
}, Z = (C, b) => {
|
|
3049
|
+
const j = {
|
|
3050
|
+
pinnedLeft: b === "left",
|
|
3051
|
+
pinnedRight: b === "right"
|
|
3052
3052
|
};
|
|
3053
|
-
ue(
|
|
3054
|
-
}, W = (
|
|
3055
|
-
p.splice(0, p.length, ...
|
|
3056
|
-
}, ue = (
|
|
3057
|
-
const
|
|
3058
|
-
if (
|
|
3059
|
-
if (Object.assign(p[
|
|
3060
|
-
const
|
|
3061
|
-
if (
|
|
3053
|
+
ue(C.prop, j), l("column-pin", { column: { ...C, ...j }, position: b });
|
|
3054
|
+
}, W = (C) => {
|
|
3055
|
+
p.splice(0, p.length, ...C), m.value && (a.value = [...C]), l("columns-change", [...C]);
|
|
3056
|
+
}, ue = (C, b) => {
|
|
3057
|
+
const j = p.findIndex((U) => U.prop === C);
|
|
3058
|
+
if (j !== -1) {
|
|
3059
|
+
if (Object.assign(p[j], b), m.value && a.value) {
|
|
3060
|
+
const U = a.value.findIndex((te) => te.prop === C);
|
|
3061
|
+
if (U !== -1) {
|
|
3062
3062
|
const te = [...a.value];
|
|
3063
|
-
te[
|
|
3063
|
+
te[U] = { ...te[U], ...b }, a.value = te;
|
|
3064
3064
|
}
|
|
3065
3065
|
}
|
|
3066
3066
|
l("columns-change", [...p]);
|
|
3067
3067
|
}
|
|
3068
|
-
},
|
|
3069
|
-
l("row-click", { row:
|
|
3070
|
-
}, Be = (
|
|
3071
|
-
|
|
3072
|
-
},
|
|
3073
|
-
|
|
3074
|
-
},
|
|
3075
|
-
|
|
3076
|
-
},
|
|
3077
|
-
const
|
|
3078
|
-
|
|
3079
|
-
ue(
|
|
3080
|
-
column: { ...
|
|
3081
|
-
width:
|
|
3082
|
-
oldWidth:
|
|
3068
|
+
}, $e = (C, b, j) => {
|
|
3069
|
+
l("row-click", { row: C, column: b, event: j }), t.highlightCurrentRow && _ && _.setCurrentRow(C);
|
|
3070
|
+
}, Be = (C, b, j) => {
|
|
3071
|
+
j.stopPropagation(), _ && _.toggleRowSelection(b, C);
|
|
3072
|
+
}, Oe = (C, b) => {
|
|
3073
|
+
b.stopPropagation(), _ && _.toggleAllSelection();
|
|
3074
|
+
}, Se = (C, b) => {
|
|
3075
|
+
C && (u.value[b] = C);
|
|
3076
|
+
}, Ie = (C, b) => {
|
|
3077
|
+
const j = b.width || T();
|
|
3078
|
+
G(C, b, T, (U) => {
|
|
3079
|
+
ue(b.prop, { width: U }), l("column-resize", {
|
|
3080
|
+
column: { ...b, width: U },
|
|
3081
|
+
width: U,
|
|
3082
|
+
oldWidth: j
|
|
3083
3083
|
});
|
|
3084
3084
|
});
|
|
3085
|
-
},
|
|
3086
|
-
if (!
|
|
3087
|
-
const
|
|
3088
|
-
return
|
|
3089
|
-
},
|
|
3090
|
-
if (!t.showSummary || !
|
|
3091
|
-
const
|
|
3085
|
+
}, Te = (C, b) => ee(C, b, H, T), Re = (C, b) => le(C, b, H, T), Ee = (C, b) => X(C, b, H, T), c = (C, b) => {
|
|
3086
|
+
if (!b || !b.prop) return "";
|
|
3087
|
+
const j = C[b.prop];
|
|
3088
|
+
return j == null ? "" : String(j);
|
|
3089
|
+
}, x = y(() => {
|
|
3090
|
+
if (!t.showSummary || !S.value) return {};
|
|
3091
|
+
const C = p;
|
|
3092
3092
|
if (typeof t.summaryMethod == "function") {
|
|
3093
|
-
const
|
|
3094
|
-
return
|
|
3095
|
-
(
|
|
3093
|
+
const b = t.summaryMethod({ columns: C, data: d.value });
|
|
3094
|
+
return C.reduce(
|
|
3095
|
+
(j, U, te) => (j[U.prop] = b[te], j),
|
|
3096
3096
|
{}
|
|
3097
3097
|
);
|
|
3098
3098
|
}
|
|
3099
|
-
return
|
|
3100
|
-
(
|
|
3101
|
-
const
|
|
3102
|
-
return
|
|
3099
|
+
return C.reduce(
|
|
3100
|
+
(b, j) => {
|
|
3101
|
+
const U = d.value.map((te) => te[j.prop]);
|
|
3102
|
+
return b[j.prop] = U.every((te) => typeof te == "number") ? U.reduce((te, je) => te + je, 0) : "", b;
|
|
3103
3103
|
},
|
|
3104
3104
|
{}
|
|
3105
3105
|
);
|
|
3106
|
-
}),
|
|
3107
|
-
|
|
3108
|
-
},
|
|
3109
|
-
|
|
3110
|
-
},
|
|
3111
|
-
|
|
3112
|
-
},
|
|
3113
|
-
|
|
3114
|
-
},
|
|
3115
|
-
|
|
3116
|
-
},
|
|
3106
|
+
}), M = y(() => t.showSummary && S.value), re = (C, b) => {
|
|
3107
|
+
_ && _.toggleRowSelection(C, b);
|
|
3108
|
+
}, ve = () => {
|
|
3109
|
+
_ && _.toggleAllSelection();
|
|
3110
|
+
}, ke = () => {
|
|
3111
|
+
_ && _.selectAbsolutelyAll();
|
|
3112
|
+
}, De = () => {
|
|
3113
|
+
_ && _.clearSelection();
|
|
3114
|
+
}, w = () => _ ? _.getSelectionRows() : [], A = (C) => {
|
|
3115
|
+
_ && _.setSelectionRows(C);
|
|
3116
|
+
}, se = (C, b) => {
|
|
3117
3117
|
if (!t.rowHighlight) return [];
|
|
3118
3118
|
try {
|
|
3119
|
-
const
|
|
3120
|
-
if (!
|
|
3121
|
-
const
|
|
3122
|
-
return (
|
|
3123
|
-
} catch (
|
|
3124
|
-
return console.warn("Помилка у функції підсвічування рядків:",
|
|
3119
|
+
const j = t.rowHighlight(C, b);
|
|
3120
|
+
if (!j) return [];
|
|
3121
|
+
const U = [];
|
|
3122
|
+
return (j.type !== "custom" || !j.className) && U.push(`vt-table__row--highlight-${j.type}`), j.className && U.push(j.className), U;
|
|
3123
|
+
} catch (j) {
|
|
3124
|
+
return console.warn("Помилка у функції підсвічування рядків:", j), [];
|
|
3125
3125
|
}
|
|
3126
3126
|
};
|
|
3127
|
-
return
|
|
3128
|
-
|
|
3127
|
+
return _e(() => {
|
|
3128
|
+
N();
|
|
3129
3129
|
}), e({
|
|
3130
|
-
toggleRowSelection:
|
|
3131
|
-
toggleAllSelection:
|
|
3132
|
-
selectAbsolutelyAll:
|
|
3133
|
-
clearSelection:
|
|
3134
|
-
getSelectionRows:
|
|
3135
|
-
setSelectionRows:
|
|
3136
|
-
resetInfinityScroll:
|
|
3137
|
-
}), (
|
|
3138
|
-
var
|
|
3139
|
-
const
|
|
3130
|
+
toggleRowSelection: re,
|
|
3131
|
+
toggleAllSelection: ve,
|
|
3132
|
+
selectAbsolutelyAll: ke,
|
|
3133
|
+
clearSelection: De,
|
|
3134
|
+
getSelectionRows: w,
|
|
3135
|
+
setSelectionRows: A,
|
|
3136
|
+
resetInfinityScroll: $
|
|
3137
|
+
}), (C, b) => {
|
|
3138
|
+
var U, te, je, Pe;
|
|
3139
|
+
const j = Je("tooltip");
|
|
3140
3140
|
return s(), i("div", {
|
|
3141
3141
|
ref_key: "tableWrapperRef",
|
|
3142
3142
|
ref: h,
|
|
3143
|
-
style:
|
|
3143
|
+
style: pe(ne(Q)()),
|
|
3144
3144
|
class: "vt-table-wrapper",
|
|
3145
|
-
onScroll:
|
|
3145
|
+
onScroll: k
|
|
3146
3146
|
}, [
|
|
3147
|
-
we(
|
|
3147
|
+
we(C.$slots, "default"),
|
|
3148
3148
|
r("table", Bs, [
|
|
3149
|
-
t.hideHeader ?
|
|
3149
|
+
t.hideHeader ? E("", !0) : (s(), i("thead", Ts, [
|
|
3150
3150
|
r("tr", null, [
|
|
3151
3151
|
t.selectable ? (s(), i("th", {
|
|
3152
3152
|
key: 0,
|
|
3153
|
-
class:
|
|
3153
|
+
class: F([{
|
|
3154
3154
|
"vt-table__th--sticky": t.maxHeight,
|
|
3155
3155
|
"vt-table__th--pinned-left": !0
|
|
3156
3156
|
}, "vt-table__th vt-table__th--selection"]),
|
|
3157
|
-
style:
|
|
3157
|
+
style: pe(K())
|
|
3158
3158
|
}, [
|
|
3159
3159
|
r("div", Es, [
|
|
3160
|
-
|
|
3161
|
-
checked: (
|
|
3162
|
-
indeterminate: (te = ne(
|
|
3163
|
-
"is-double": (Pe = (je = ne(
|
|
3164
|
-
onChange:
|
|
3160
|
+
Y(Le, {
|
|
3161
|
+
checked: (U = ne(_)) == null ? void 0 : U.isAllSelected.value,
|
|
3162
|
+
indeterminate: (te = ne(_)) == null ? void 0 : te.isIndeterminate.value,
|
|
3163
|
+
"is-double": (Pe = (je = ne(_)) == null ? void 0 : je.isDoubleCheck) == null ? void 0 : Pe.value,
|
|
3164
|
+
onChange: Oe
|
|
3165
3165
|
}, null, 8, ["checked", "indeterminate", "is-double"])
|
|
3166
3166
|
])
|
|
3167
|
-
], 6)) :
|
|
3168
|
-
(s(!0), i(
|
|
3169
|
-
key:
|
|
3167
|
+
], 6)) : E("", !0),
|
|
3168
|
+
(s(!0), i(ce, null, he(ne(L), (O, me) => (s(), i("th", {
|
|
3169
|
+
key: O.prop,
|
|
3170
3170
|
ref_for: !0,
|
|
3171
|
-
ref: (
|
|
3172
|
-
class:
|
|
3171
|
+
ref: (be) => Se(be, O.prop),
|
|
3172
|
+
class: F([
|
|
3173
3173
|
"vt-table__th",
|
|
3174
3174
|
{
|
|
3175
3175
|
"vt-table__th--sticky": t.maxHeight,
|
|
3176
|
-
"vt-table__th--pinned-left":
|
|
3177
|
-
"vt-table__th--pinned-right":
|
|
3178
|
-
"vt-table__th--sortable":
|
|
3176
|
+
"vt-table__th--pinned-left": O.pinnedLeft,
|
|
3177
|
+
"vt-table__th--pinned-right": O.pinnedRight,
|
|
3178
|
+
"vt-table__th--sortable": O.sortable
|
|
3179
3179
|
}
|
|
3180
3180
|
]),
|
|
3181
|
-
style:
|
|
3181
|
+
style: pe(Re(O, me))
|
|
3182
3182
|
}, [
|
|
3183
3183
|
r("div", js, [
|
|
3184
|
-
r("div", zs,
|
|
3185
|
-
|
|
3186
|
-
|
|
3187
|
-
class:
|
|
3184
|
+
r("div", zs, J(O.label), 1),
|
|
3185
|
+
O.sortable ? (s(), i("div", Os, [
|
|
3186
|
+
Y(oe, {
|
|
3187
|
+
class: F(ne(i1)(O, v.value).asc),
|
|
3188
3188
|
name: "arrowTop",
|
|
3189
|
-
onClick: fe((
|
|
3189
|
+
onClick: fe((be) => z(O, "asc"), ["stop"])
|
|
3190
3190
|
}, null, 8, ["class", "onClick"]),
|
|
3191
|
-
|
|
3192
|
-
class:
|
|
3191
|
+
Y(oe, {
|
|
3192
|
+
class: F(ne(i1)(O, v.value).desc),
|
|
3193
3193
|
name: "arrowDown",
|
|
3194
|
-
onClick: fe((
|
|
3194
|
+
onClick: fe((be) => z(O, "desc"), ["stop"])
|
|
3195
3195
|
}, null, 8, ["class", "onClick"])
|
|
3196
|
-
])) :
|
|
3197
|
-
|
|
3196
|
+
])) : E("", !0),
|
|
3197
|
+
O.actionColumn ? (s(), ae(Hs, {
|
|
3198
3198
|
key: 1,
|
|
3199
|
-
"all-columns": ne(
|
|
3200
|
-
column:
|
|
3199
|
+
"all-columns": ne(L),
|
|
3200
|
+
column: O,
|
|
3201
3201
|
columnsSelector: t.columnsSelector,
|
|
3202
|
-
onPin:
|
|
3202
|
+
onPin: Z,
|
|
3203
3203
|
onUpdateColumns: W
|
|
3204
|
-
}, null, 8, ["all-columns", "column", "columnsSelector"])) :
|
|
3204
|
+
}, null, 8, ["all-columns", "column", "columnsSelector"])) : E("", !0)
|
|
3205
3205
|
]),
|
|
3206
3206
|
r("div", {
|
|
3207
|
-
"data-resizer":
|
|
3207
|
+
"data-resizer": O.prop,
|
|
3208
3208
|
class: "vt-table__resizer",
|
|
3209
|
-
onMousedown: (
|
|
3209
|
+
onMousedown: (be) => Ie(be, O)
|
|
3210
3210
|
}, null, 40, Rs)
|
|
3211
3211
|
], 6))), 128))
|
|
3212
3212
|
])
|
|
3213
3213
|
])),
|
|
3214
3214
|
r("tbody", null, [
|
|
3215
|
-
|
|
3216
|
-
var
|
|
3215
|
+
S.value ? (s(!0), i(ce, { key: 1 }, he(d.value, (O, me) => {
|
|
3216
|
+
var be, n1, o1;
|
|
3217
3217
|
return s(), i("tr", {
|
|
3218
|
-
key:
|
|
3219
|
-
class:
|
|
3218
|
+
key: P(O, me),
|
|
3219
|
+
class: F([
|
|
3220
3220
|
"vt-table__row",
|
|
3221
3221
|
{
|
|
3222
|
-
"vt-table__row--selected": (
|
|
3223
|
-
"vt-table__row--current": ((n1 = ne(
|
|
3222
|
+
"vt-table__row--selected": (be = ne(_)) == null ? void 0 : be.isRowSelected(O),
|
|
3223
|
+
"vt-table__row--current": ((n1 = ne(_)) == null ? void 0 : n1.currentRow.value) === O,
|
|
3224
3224
|
"vt-table__row--clickable": t.selectOnClickRow || t.highlightCurrentRow
|
|
3225
3225
|
},
|
|
3226
|
-
...
|
|
3226
|
+
...se(O, me)
|
|
3227
3227
|
]),
|
|
3228
|
-
onClick: (ie) =>
|
|
3228
|
+
onClick: (ie) => $e(O, ne(L)[0], ie)
|
|
3229
3229
|
}, [
|
|
3230
3230
|
t.selectable ? (s(), i("td", {
|
|
3231
3231
|
key: 0,
|
|
3232
|
-
class:
|
|
3232
|
+
class: F([{
|
|
3233
3233
|
"vt-table__td--pinned-left": !0
|
|
3234
3234
|
}, "vt-table__td vt-table__td--selection"]),
|
|
3235
|
-
style:
|
|
3235
|
+
style: pe(q())
|
|
3236
3236
|
}, [
|
|
3237
3237
|
r("div", Zs, [
|
|
3238
|
-
|
|
3239
|
-
checked: (o1 = ne(
|
|
3240
|
-
onChange: (ie, Ne) => Be(ie,
|
|
3238
|
+
Y(Le, {
|
|
3239
|
+
checked: (o1 = ne(_)) == null ? void 0 : o1.isRowSelected(O),
|
|
3240
|
+
onChange: (ie, Ne) => Be(ie, O, Ne)
|
|
3241
3241
|
}, null, 8, ["checked", "onChange"])
|
|
3242
3242
|
])
|
|
3243
|
-
], 4)) :
|
|
3244
|
-
(s(!0), i(
|
|
3245
|
-
key: `${
|
|
3243
|
+
], 4)) : E("", !0),
|
|
3244
|
+
(s(!0), i(ce, null, he(ne(L), (ie, Ne) => (s(), i("td", {
|
|
3245
|
+
key: `${P(O, me)}-${ie.prop}`,
|
|
3246
3246
|
ref_for: !0,
|
|
3247
|
-
ref: (Fe) =>
|
|
3248
|
-
class:
|
|
3247
|
+
ref: (Fe) => Se(Fe, ie.prop),
|
|
3248
|
+
class: F([
|
|
3249
3249
|
"vt-table__td",
|
|
3250
3250
|
{
|
|
3251
3251
|
"vt-table__td--pinned-left": ie.pinnedLeft,
|
|
3252
3252
|
"vt-table__td--pinned-right": ie.pinnedRight
|
|
3253
3253
|
}
|
|
3254
3254
|
]),
|
|
3255
|
-
style:
|
|
3255
|
+
style: pe(Te(ie, Ne))
|
|
3256
3256
|
}, [
|
|
3257
3257
|
Ze((s(), i("div", Ns, [
|
|
3258
|
-
ie.renderSlot ? (s(), ae(Xe(() => ne(cs)(ie.renderSlot, { row:
|
|
3258
|
+
ie.renderSlot ? (s(), ae(Xe(() => ne(cs)(ie.renderSlot, { row: O, column: ie, value: O[ie.prop], index: me })), { key: 0 })) : (s(), i("span", Fs, J(O[ie.prop]), 1))
|
|
3259
3259
|
])), [
|
|
3260
|
-
[
|
|
3260
|
+
[j, ie.showOverflowTooltip ? c(O, ie) : null]
|
|
3261
3261
|
]),
|
|
3262
3262
|
r("div", {
|
|
3263
3263
|
"data-resizer": ie.prop,
|
|
3264
3264
|
class: "vt-table__resizer",
|
|
3265
|
-
onMousedown: (Fe) =>
|
|
3265
|
+
onMousedown: (Fe) => Ie(Fe, ie)
|
|
3266
3266
|
}, null, 40, qs)
|
|
3267
3267
|
], 6))), 128))
|
|
3268
3268
|
], 10, As);
|
|
3269
3269
|
}), 128)) : (s(), i("tr", Ds, [
|
|
3270
3270
|
r("td", {
|
|
3271
|
-
colspan: ne(
|
|
3271
|
+
colspan: ne(L).length + (t.selectable ? 1 : 0),
|
|
3272
3272
|
class: "vt-table__empty-cell"
|
|
3273
3273
|
}, [
|
|
3274
3274
|
r("div", Ws, [
|
|
3275
|
-
|
|
3275
|
+
Y(oe, {
|
|
3276
3276
|
class: "vt-table__empty-icon",
|
|
3277
3277
|
name: "empty"
|
|
3278
3278
|
}),
|
|
3279
|
-
|
|
3279
|
+
b[0] || (b[0] = r("span", { class: "vt-table__empty-text" }, "Немає даних!", -1))
|
|
3280
3280
|
])
|
|
3281
3281
|
], 8, Ps)
|
|
3282
3282
|
]))
|
|
3283
3283
|
]),
|
|
3284
|
-
|
|
3284
|
+
M.value ? (s(), i("tfoot", Ks, [
|
|
3285
3285
|
r("tr", null, [
|
|
3286
3286
|
t.selectable ? (s(), i("td", {
|
|
3287
3287
|
key: 0,
|
|
3288
|
-
class:
|
|
3288
|
+
class: F([{
|
|
3289
3289
|
"vt-table__td--pinned-left": !0
|
|
3290
3290
|
}, "vt-table__td"]),
|
|
3291
|
-
style:
|
|
3292
|
-
},
|
|
3291
|
+
style: pe(f())
|
|
3292
|
+
}, b[1] || (b[1] = [
|
|
3293
3293
|
r("div", { class: "vt-table__cell-content vt-table__cell-content--summary" }, null, -1)
|
|
3294
|
-
]), 4)) :
|
|
3295
|
-
(s(!0), i(
|
|
3296
|
-
key:
|
|
3297
|
-
class:
|
|
3294
|
+
]), 4)) : E("", !0),
|
|
3295
|
+
(s(!0), i(ce, null, he(ne(L), (O, me) => (s(), i("td", {
|
|
3296
|
+
key: O.prop,
|
|
3297
|
+
class: F([
|
|
3298
3298
|
"vt-table__td",
|
|
3299
3299
|
{
|
|
3300
|
-
"vt-table__td--pinned-left":
|
|
3301
|
-
"vt-table__td--pinned-right":
|
|
3300
|
+
"vt-table__td--pinned-left": O.pinnedLeft,
|
|
3301
|
+
"vt-table__td--pinned-right": O.pinnedRight
|
|
3302
3302
|
}
|
|
3303
3303
|
]),
|
|
3304
|
-
style:
|
|
3304
|
+
style: pe(Ee(O, me))
|
|
3305
3305
|
}, [
|
|
3306
|
-
r("div", Us,
|
|
3306
|
+
r("div", Us, J(x.value[O.prop]), 1)
|
|
3307
3307
|
], 6))), 128))
|
|
3308
3308
|
])
|
|
3309
|
-
])) :
|
|
3309
|
+
])) : E("", !0)
|
|
3310
3310
|
])
|
|
3311
3311
|
], 36);
|
|
3312
3312
|
};
|
|
3313
3313
|
}
|
|
3314
|
-
}), Xs = /* @__PURE__ */
|
|
3314
|
+
}), Xs = /* @__PURE__ */ de({
|
|
3315
3315
|
__name: "VTableColumn",
|
|
3316
3316
|
props: {
|
|
3317
3317
|
prop: {},
|
|
@@ -3349,7 +3349,7 @@ const Me = new ms(), ws = {
|
|
|
3349
3349
|
renderSlot: o[e.prop] ?? o.default ?? o.slot
|
|
3350
3350
|
});
|
|
3351
3351
|
let a = -1;
|
|
3352
|
-
return
|
|
3352
|
+
return _e(() => {
|
|
3353
3353
|
if (t) {
|
|
3354
3354
|
const u = l();
|
|
3355
3355
|
t.push(u), a = t.length - 1;
|
|
@@ -3409,7 +3409,7 @@ const Me = new ms(), ws = {
|
|
|
3409
3409
|
}, i3 = {
|
|
3410
3410
|
key: 2,
|
|
3411
3411
|
class: "vt-input__errors"
|
|
3412
|
-
}, a3 = /* @__PURE__ */
|
|
3412
|
+
}, a3 = /* @__PURE__ */ de({
|
|
3413
3413
|
__name: "VInput",
|
|
3414
3414
|
props: {
|
|
3415
3415
|
modelValue: {},
|
|
@@ -3457,48 +3457,48 @@ const Me = new ms(), ws = {
|
|
|
3457
3457
|
},
|
|
3458
3458
|
emits: ["update:modelValue", "input", "change", "focus", "blur", "clear", "validation", "keydown", "keyup", "keypress", "click"],
|
|
3459
3459
|
setup(n, { expose: e, emit: o }) {
|
|
3460
|
-
const t = n, l = o, a =
|
|
3461
|
-
email: (
|
|
3462
|
-
url: (
|
|
3460
|
+
const t = n, l = o, a = V(), u = V(), h = V(!1), p = V(!1), v = V(), d = V([]), m = V(!0), S = V(!1), B = {
|
|
3461
|
+
email: (c) => /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(c),
|
|
3462
|
+
url: (c) => {
|
|
3463
3463
|
try {
|
|
3464
|
-
return new URL(
|
|
3464
|
+
return new URL(c), !0;
|
|
3465
3465
|
} catch {
|
|
3466
3466
|
return !1;
|
|
3467
3467
|
}
|
|
3468
3468
|
},
|
|
3469
|
-
number: (
|
|
3470
|
-
required: (
|
|
3471
|
-
minlength: (
|
|
3472
|
-
maxlength: (
|
|
3473
|
-
min: (
|
|
3474
|
-
const
|
|
3475
|
-
return !isNaN(
|
|
3469
|
+
number: (c) => !isNaN(Number(c)) && isFinite(Number(c)),
|
|
3470
|
+
required: (c) => c !== "" && c !== null && c !== void 0,
|
|
3471
|
+
minlength: (c, x) => String(c).length >= x,
|
|
3472
|
+
maxlength: (c, x) => String(c).length <= x,
|
|
3473
|
+
min: (c, x) => {
|
|
3474
|
+
const M = Number(c);
|
|
3475
|
+
return !isNaN(M) && M >= x;
|
|
3476
3476
|
},
|
|
3477
|
-
max: (
|
|
3478
|
-
const
|
|
3479
|
-
return !isNaN(
|
|
3477
|
+
max: (c, x) => {
|
|
3478
|
+
const M = Number(c);
|
|
3479
|
+
return !isNaN(M) && M <= x;
|
|
3480
3480
|
},
|
|
3481
|
-
pattern: (
|
|
3482
|
-
custom: (
|
|
3483
|
-
},
|
|
3484
|
-
const
|
|
3485
|
-
if (t.required && !
|
|
3486
|
-
|
|
3481
|
+
pattern: (c, x) => new RegExp(x).test(c),
|
|
3482
|
+
custom: (c, x) => x(c)
|
|
3483
|
+
}, D = (c) => {
|
|
3484
|
+
const x = [], M = String(c || "");
|
|
3485
|
+
if (t.required && !B.required(c) && x.push(t.requiredMessage || "Це поле є обов'язковим"), !M && !t.required) {
|
|
3486
|
+
d.value = x, m.value = x.length === 0;
|
|
3487
3487
|
return;
|
|
3488
3488
|
}
|
|
3489
3489
|
switch (t.type) {
|
|
3490
3490
|
case "email":
|
|
3491
|
-
|
|
3491
|
+
M && !B.email(M) && x.push(t.emailMessage || "Введіть коректну email адресу");
|
|
3492
3492
|
break;
|
|
3493
3493
|
case "url":
|
|
3494
|
-
|
|
3494
|
+
M && !B.url(M) && x.push(t.urlMessage || "Введіть коректний URL");
|
|
3495
3495
|
break;
|
|
3496
3496
|
case "number":
|
|
3497
|
-
|
|
3497
|
+
M && !B.number(M) && x.push(t.numberMessage || "Введіть коректне число");
|
|
3498
3498
|
break;
|
|
3499
3499
|
}
|
|
3500
|
-
t.minlength &&
|
|
3501
|
-
},
|
|
3500
|
+
t.minlength && M && !B.minlength(M, t.minlength) && x.push(t.minlengthMessage || `Мінімальна довжина: ${t.minlength} символів`), t.maxlength && M && !B.maxlength(M, t.maxlength) && x.push(t.maxlengthMessage || `Максимальна довжина: ${t.maxlength} символів`), t.type === "number" && M && B.number(M) && (t.min !== void 0 && !B.min(M, t.min) && x.push(t.minMessage || `Мінімальне значення: ${t.min}`), t.max !== void 0 && !B.max(M, t.max) && x.push(t.maxMessage || `Максимальне значення: ${t.max}`)), t.pattern && M && !B.pattern(M, t.pattern) && x.push(t.patternMessage || "Значення не відповідає вимогам формату"), t.customValidator && !B.custom(c, t.customValidator) && x.push(t.customValidatorMessage || "Значення не проходить валідацію"), d.value = x, m.value = x.length === 0, l("validation", { isValid: m.value, errors: x });
|
|
3501
|
+
}, R = y(() => t.type === "textarea"), P = y(() => {
|
|
3502
3502
|
if (t.type === "password") return null;
|
|
3503
3503
|
switch (t.type) {
|
|
3504
3504
|
case "email":
|
|
@@ -3508,8 +3508,8 @@ const Me = new ms(), ws = {
|
|
|
3508
3508
|
default:
|
|
3509
3509
|
return null;
|
|
3510
3510
|
}
|
|
3511
|
-
}),
|
|
3512
|
-
if (t.prefixIcon ||
|
|
3511
|
+
}), N = y(() => {
|
|
3512
|
+
if (t.prefixIcon || P.value) return null;
|
|
3513
3513
|
switch (t.status) {
|
|
3514
3514
|
case "error":
|
|
3515
3515
|
return "alertCircle";
|
|
@@ -3518,254 +3518,254 @@ const Me = new ms(), ws = {
|
|
|
3518
3518
|
case "success":
|
|
3519
3519
|
return "checkCircle";
|
|
3520
3520
|
default:
|
|
3521
|
-
return
|
|
3521
|
+
return m.value ? null : "alertCircle";
|
|
3522
3522
|
}
|
|
3523
|
-
}),
|
|
3524
|
-
const
|
|
3523
|
+
}), L = y(() => !!t.prefixIcon || !!P.value || !!N.value), T = y(() => t.prefixIcon || P.value || N.value), H = y(() => {
|
|
3524
|
+
const c = "vt-input__icon", x = t.status !== "default" ? t.status : m.value ? "default" : "error";
|
|
3525
3525
|
if (t.prefixIcon)
|
|
3526
|
-
return
|
|
3527
|
-
if (
|
|
3528
|
-
switch (
|
|
3526
|
+
return c;
|
|
3527
|
+
if (N.value)
|
|
3528
|
+
switch (x) {
|
|
3529
3529
|
case "error":
|
|
3530
|
-
return `${
|
|
3530
|
+
return `${c} vt-input__icon--error`;
|
|
3531
3531
|
case "warning":
|
|
3532
|
-
return `${
|
|
3532
|
+
return `${c} vt-input__icon--warning`;
|
|
3533
3533
|
case "success":
|
|
3534
|
-
return `${
|
|
3534
|
+
return `${c} vt-input__icon--success`;
|
|
3535
3535
|
default:
|
|
3536
|
-
return
|
|
3536
|
+
return c;
|
|
3537
3537
|
}
|
|
3538
|
-
return
|
|
3539
|
-
}),
|
|
3538
|
+
return c;
|
|
3539
|
+
}), Q = y(() => ["email", "url", "password"].includes(t.type) && t.suffixIcon ? t.clearable || t.showPassword : !!t.suffixIcon || t.clearable || t.showPassword), ee = y(() => ["email", "url", "password"].includes(t.type) ? null : t.suffixIcon), le = y(
|
|
3540
3540
|
() => t.clearable && !t.disabled && t.modelValue && String(t.modelValue).length > 0
|
|
3541
|
-
),
|
|
3541
|
+
), X = y(() => t.status !== "default" ? t.status : m.value ? "default" : "error"), G = y(() => [
|
|
3542
3542
|
"vt-input",
|
|
3543
3543
|
t.size ? `vt-input--${t.size}` : "vt-input--medium",
|
|
3544
|
-
`vt-input--${
|
|
3544
|
+
`vt-input--${X.value}`,
|
|
3545
3545
|
{
|
|
3546
3546
|
"vt-input--disabled": t.disabled,
|
|
3547
3547
|
"vt-input--focused": h.value,
|
|
3548
|
-
"vt-input--textarea":
|
|
3549
|
-
"vt-input--has-prefix":
|
|
3550
|
-
"vt-input--has-suffix":
|
|
3551
|
-
"vt-input--invalid": !
|
|
3548
|
+
"vt-input--textarea": R.value,
|
|
3549
|
+
"vt-input--has-prefix": L.value,
|
|
3550
|
+
"vt-input--has-suffix": Q.value,
|
|
3551
|
+
"vt-input--invalid": !m.value
|
|
3552
3552
|
}
|
|
3553
|
-
]),
|
|
3554
|
-
let
|
|
3555
|
-
if (t.type === "number" &&
|
|
3556
|
-
const
|
|
3557
|
-
isNaN(
|
|
3553
|
+
]), I = y(() => t.type === "password" ? p.value ? "text" : "password" : t.type === "textarea" ? "text" : t.type), _ = y(() => t.errorMessage ? t.errorMessage : d.value.length > 0 ? d.value[0] : ""), q = y(() => t.autosize && typeof t.autosize == "object" && t.autosize.maxRows ? "none" : t.resize), K = (c) => {
|
|
3554
|
+
let M = c.target.value;
|
|
3555
|
+
if (t.type === "number" && M !== "") {
|
|
3556
|
+
const re = Number(M);
|
|
3557
|
+
isNaN(re) || (M = re);
|
|
3558
3558
|
}
|
|
3559
|
-
l("update:modelValue",
|
|
3560
|
-
},
|
|
3561
|
-
if (l("change",
|
|
3562
|
-
const
|
|
3563
|
-
|
|
3559
|
+
l("update:modelValue", M), l("input", c), t.validateOnInput && D(M), R.value && t.autosize && !S.value && ye(() => W());
|
|
3560
|
+
}, f = (c) => {
|
|
3561
|
+
if (l("change", c), !t.validateOnInput) {
|
|
3562
|
+
const x = c.target;
|
|
3563
|
+
D(x.value);
|
|
3564
3564
|
}
|
|
3565
|
-
},
|
|
3566
|
-
h.value = !0, l("focus",
|
|
3567
|
-
},
|
|
3568
|
-
if (h.value = !1, l("blur",
|
|
3569
|
-
const
|
|
3570
|
-
|
|
3565
|
+
}, k = (c) => {
|
|
3566
|
+
h.value = !0, l("focus", c);
|
|
3567
|
+
}, $ = (c) => {
|
|
3568
|
+
if (h.value = !1, l("blur", c), t.validateOnBlur) {
|
|
3569
|
+
const x = c.target;
|
|
3570
|
+
D(x.value);
|
|
3571
3571
|
}
|
|
3572
|
-
},
|
|
3573
|
-
var
|
|
3574
|
-
l("update:modelValue", ""), l("clear"), (
|
|
3575
|
-
},
|
|
3576
|
-
p.value = !p.value,
|
|
3577
|
-
var
|
|
3578
|
-
(
|
|
3572
|
+
}, z = () => {
|
|
3573
|
+
var c;
|
|
3574
|
+
l("update:modelValue", ""), l("clear"), (c = a.value) == null || c.focus(), d.value = [], m.value = !0, l("validation", { isValid: !0, errors: [] });
|
|
3575
|
+
}, Z = () => {
|
|
3576
|
+
p.value = !p.value, ye(() => {
|
|
3577
|
+
var c;
|
|
3578
|
+
(c = a.value) == null || c.focus();
|
|
3579
3579
|
});
|
|
3580
3580
|
}, W = () => {
|
|
3581
|
-
if (!u.value || !t.autosize ||
|
|
3582
|
-
const
|
|
3583
|
-
|
|
3584
|
-
let
|
|
3581
|
+
if (!u.value || !t.autosize || S.value) return;
|
|
3582
|
+
const c = u.value, x = c.style.height;
|
|
3583
|
+
c.style.height = "auto";
|
|
3584
|
+
let M = c.scrollHeight;
|
|
3585
3585
|
if (typeof t.autosize == "object") {
|
|
3586
|
-
const
|
|
3587
|
-
|
|
3586
|
+
const ve = parseInt(getComputedStyle(c).lineHeight), ke = t.autosize.minRows ? t.autosize.minRows * ve : 0, De = t.autosize.maxRows ? t.autosize.maxRows * ve : 1 / 0;
|
|
3587
|
+
M = Math.max(ke, Math.min(M, De));
|
|
3588
3588
|
}
|
|
3589
|
-
const
|
|
3590
|
-
|
|
3591
|
-
}, ue = (
|
|
3592
|
-
if (!u.value || !(
|
|
3593
|
-
const
|
|
3594
|
-
if (
|
|
3595
|
-
|
|
3596
|
-
const
|
|
3597
|
-
|
|
3589
|
+
const re = `${M}px`;
|
|
3590
|
+
re !== x && (v.value = re, c.style.height = re);
|
|
3591
|
+
}, ue = (c) => {
|
|
3592
|
+
if (!u.value || !(q.value !== "none")) return;
|
|
3593
|
+
const re = u.value.getBoundingClientRect();
|
|
3594
|
+
if (c.clientX > re.right - 20 && c.clientY > re.bottom - 20) {
|
|
3595
|
+
S.value = !0;
|
|
3596
|
+
const ke = () => {
|
|
3597
|
+
S.value = !1, document.removeEventListener("mouseup", ke);
|
|
3598
3598
|
};
|
|
3599
|
-
document.addEventListener("mouseup",
|
|
3599
|
+
document.addEventListener("mouseup", ke);
|
|
3600
3600
|
}
|
|
3601
3601
|
};
|
|
3602
3602
|
return e({
|
|
3603
3603
|
focus: () => {
|
|
3604
|
-
var
|
|
3605
|
-
(
|
|
3604
|
+
var c;
|
|
3605
|
+
(c = a.value) == null || c.focus();
|
|
3606
3606
|
},
|
|
3607
3607
|
blur: () => {
|
|
3608
|
-
var
|
|
3609
|
-
(
|
|
3608
|
+
var c;
|
|
3609
|
+
(c = a.value) == null || c.blur();
|
|
3610
3610
|
},
|
|
3611
3611
|
select: () => {
|
|
3612
|
-
var
|
|
3613
|
-
(
|
|
3612
|
+
var c;
|
|
3613
|
+
(c = a.value) == null || c.select();
|
|
3614
3614
|
},
|
|
3615
3615
|
clear: () => {
|
|
3616
|
-
|
|
3616
|
+
z();
|
|
3617
3617
|
},
|
|
3618
|
-
validate: () => (
|
|
3618
|
+
validate: () => (D(t.modelValue || ""), m.value),
|
|
3619
3619
|
clearValidation: () => {
|
|
3620
|
-
|
|
3620
|
+
d.value = [], m.value = !0, l("validation", { isValid: !0, errors: [] });
|
|
3621
3621
|
},
|
|
3622
3622
|
getInputElement: () => a.value || null,
|
|
3623
3623
|
getValidationState: () => ({
|
|
3624
|
-
isValid:
|
|
3625
|
-
errors: [...
|
|
3624
|
+
isValid: m.value,
|
|
3625
|
+
errors: [...d.value]
|
|
3626
3626
|
})
|
|
3627
3627
|
}), Ce(
|
|
3628
3628
|
() => t.modelValue,
|
|
3629
|
-
(
|
|
3630
|
-
|
|
3629
|
+
(c) => {
|
|
3630
|
+
R.value && t.autosize && !S.value && ye(W), t.validateOnInput && D(c || "");
|
|
3631
3631
|
}
|
|
3632
3632
|
), Ce(
|
|
3633
3633
|
() => [t.required, t.minlength, t.maxlength, t.min, t.max, t.pattern],
|
|
3634
3634
|
() => {
|
|
3635
|
-
t.modelValue !== void 0 && t.modelValue !== "" &&
|
|
3635
|
+
t.modelValue !== void 0 && t.modelValue !== "" && D(t.modelValue);
|
|
3636
3636
|
},
|
|
3637
3637
|
{ immediate: !0 }
|
|
3638
|
-
),
|
|
3639
|
-
|
|
3640
|
-
}),
|
|
3641
|
-
|
|
3638
|
+
), _e(() => {
|
|
3639
|
+
R.value && t.autosize && W(), t.modelValue !== void 0 && t.modelValue !== "" && D(t.modelValue);
|
|
3640
|
+
}), _e(() => {
|
|
3641
|
+
R.value && t.autosize;
|
|
3642
3642
|
}), He(() => {
|
|
3643
|
-
}), (
|
|
3644
|
-
class:
|
|
3643
|
+
}), (c, x) => (s(), i("div", {
|
|
3644
|
+
class: F(G.value)
|
|
3645
3645
|
}, [
|
|
3646
|
-
|
|
3646
|
+
c.label ? (s(), i("label", {
|
|
3647
3647
|
key: 0,
|
|
3648
3648
|
class: "vt-input__label",
|
|
3649
|
-
for:
|
|
3649
|
+
for: c.id
|
|
3650
3650
|
}, [
|
|
3651
|
-
|
|
3652
|
-
|
|
3653
|
-
], 8, Gs)) :
|
|
3651
|
+
Me(J(c.label) + " ", 1),
|
|
3652
|
+
c.required ? (s(), i("span", Js, "*")) : E("", !0)
|
|
3653
|
+
], 8, Gs)) : E("", !0),
|
|
3654
3654
|
r("div", Qs, [
|
|
3655
|
-
|
|
3656
|
-
|
|
3655
|
+
L.value ? (s(), i("div", e3, [
|
|
3656
|
+
Y(oe, {
|
|
3657
3657
|
name: T.value,
|
|
3658
|
-
class:
|
|
3658
|
+
class: F(H.value)
|
|
3659
3659
|
}, null, 8, ["name", "class"])
|
|
3660
|
-
])) :
|
|
3661
|
-
|
|
3660
|
+
])) : E("", !0),
|
|
3661
|
+
R.value ? (s(), i("textarea", {
|
|
3662
3662
|
key: 1,
|
|
3663
3663
|
ref_key: "textareaRef",
|
|
3664
3664
|
ref: u,
|
|
3665
|
-
value:
|
|
3666
|
-
placeholder:
|
|
3667
|
-
disabled:
|
|
3668
|
-
rows:
|
|
3669
|
-
cols:
|
|
3670
|
-
maxlength:
|
|
3671
|
-
minlength:
|
|
3672
|
-
required:
|
|
3673
|
-
name:
|
|
3674
|
-
id:
|
|
3675
|
-
tabindex:
|
|
3676
|
-
autocomplete:
|
|
3677
|
-
style:
|
|
3665
|
+
value: c.modelValue,
|
|
3666
|
+
placeholder: c.placeholder,
|
|
3667
|
+
disabled: c.disabled,
|
|
3668
|
+
rows: c.rows,
|
|
3669
|
+
cols: c.cols,
|
|
3670
|
+
maxlength: c.maxlength,
|
|
3671
|
+
minlength: c.minlength,
|
|
3672
|
+
required: c.required,
|
|
3673
|
+
name: c.name,
|
|
3674
|
+
id: c.id,
|
|
3675
|
+
tabindex: c.tabindex,
|
|
3676
|
+
autocomplete: c.autocomplete,
|
|
3677
|
+
style: pe({ resize: q.value, height: v.value }),
|
|
3678
3678
|
class: "vt-input__field vt-input__textarea",
|
|
3679
|
-
onInput:
|
|
3680
|
-
onChange:
|
|
3681
|
-
onFocus:
|
|
3682
|
-
onBlur:
|
|
3679
|
+
onInput: K,
|
|
3680
|
+
onChange: f,
|
|
3681
|
+
onFocus: k,
|
|
3682
|
+
onBlur: $,
|
|
3683
3683
|
onMousedown: ue,
|
|
3684
|
-
onKeydown:
|
|
3685
|
-
onKeyup:
|
|
3686
|
-
onKeypress:
|
|
3687
|
-
onClick:
|
|
3684
|
+
onKeydown: x[0] || (x[0] = (M) => c.$emit("keydown", M)),
|
|
3685
|
+
onKeyup: x[1] || (x[1] = (M) => c.$emit("keyup", M)),
|
|
3686
|
+
onKeypress: x[2] || (x[2] = (M) => c.$emit("keypress", M)),
|
|
3687
|
+
onClick: x[3] || (x[3] = (M) => c.$emit("click", M))
|
|
3688
3688
|
}, null, 44, t3)) : (s(), i("input", {
|
|
3689
3689
|
key: 2,
|
|
3690
3690
|
ref_key: "inputRef",
|
|
3691
3691
|
ref: a,
|
|
3692
|
-
type:
|
|
3693
|
-
value:
|
|
3694
|
-
placeholder:
|
|
3695
|
-
disabled:
|
|
3696
|
-
maxlength:
|
|
3697
|
-
minlength:
|
|
3698
|
-
min:
|
|
3699
|
-
max:
|
|
3700
|
-
step:
|
|
3701
|
-
required:
|
|
3702
|
-
pattern:
|
|
3703
|
-
name:
|
|
3704
|
-
id:
|
|
3705
|
-
tabindex:
|
|
3706
|
-
autocomplete:
|
|
3692
|
+
type: I.value,
|
|
3693
|
+
value: c.modelValue,
|
|
3694
|
+
placeholder: c.placeholder,
|
|
3695
|
+
disabled: c.disabled,
|
|
3696
|
+
maxlength: c.maxlength,
|
|
3697
|
+
minlength: c.minlength,
|
|
3698
|
+
min: c.min,
|
|
3699
|
+
max: c.max,
|
|
3700
|
+
step: c.step,
|
|
3701
|
+
required: c.required,
|
|
3702
|
+
pattern: c.pattern,
|
|
3703
|
+
name: c.name,
|
|
3704
|
+
id: c.id,
|
|
3705
|
+
tabindex: c.tabindex,
|
|
3706
|
+
autocomplete: c.autocomplete,
|
|
3707
3707
|
class: "vt-input__field",
|
|
3708
|
-
onInput:
|
|
3709
|
-
onChange:
|
|
3710
|
-
onFocus:
|
|
3711
|
-
onBlur:
|
|
3712
|
-
onKeydown:
|
|
3713
|
-
onKeyup:
|
|
3714
|
-
onKeypress:
|
|
3715
|
-
onClick:
|
|
3708
|
+
onInput: K,
|
|
3709
|
+
onChange: f,
|
|
3710
|
+
onFocus: k,
|
|
3711
|
+
onBlur: $,
|
|
3712
|
+
onKeydown: x[4] || (x[4] = (M) => c.$emit("keydown", M)),
|
|
3713
|
+
onKeyup: x[5] || (x[5] = (M) => c.$emit("keyup", M)),
|
|
3714
|
+
onKeypress: x[6] || (x[6] = (M) => c.$emit("keypress", M)),
|
|
3715
|
+
onClick: x[7] || (x[7] = (M) => c.$emit("click", M))
|
|
3716
3716
|
}, null, 40, n3)),
|
|
3717
|
-
|
|
3718
|
-
|
|
3717
|
+
Q.value ? (s(), i("div", o3, [
|
|
3718
|
+
le.value ? (s(), i("button", {
|
|
3719
3719
|
key: 0,
|
|
3720
3720
|
type: "button",
|
|
3721
3721
|
class: "vt-input__clear-btn",
|
|
3722
|
-
onClick:
|
|
3722
|
+
onClick: z
|
|
3723
3723
|
}, [
|
|
3724
|
-
|
|
3724
|
+
Y(oe, {
|
|
3725
3725
|
name: "close",
|
|
3726
3726
|
class: "vt-input__icon"
|
|
3727
3727
|
})
|
|
3728
|
-
])) :
|
|
3729
|
-
|
|
3728
|
+
])) : E("", !0),
|
|
3729
|
+
c.showPassword && c.type === "password" ? (s(), i("button", {
|
|
3730
3730
|
key: 1,
|
|
3731
3731
|
type: "button",
|
|
3732
3732
|
class: "vt-input__password-btn",
|
|
3733
|
-
onClick:
|
|
3733
|
+
onClick: Z
|
|
3734
3734
|
}, [
|
|
3735
|
-
|
|
3735
|
+
Y(oe, {
|
|
3736
3736
|
name: p.value ? "eyeOpened" : "eyeClosed",
|
|
3737
3737
|
class: "vt-input__icon"
|
|
3738
3738
|
}, null, 8, ["name"])
|
|
3739
|
-
])) :
|
|
3740
|
-
ee.value ? (s(), ae(
|
|
3739
|
+
])) : E("", !0),
|
|
3740
|
+
ee.value ? (s(), ae(oe, {
|
|
3741
3741
|
key: 2,
|
|
3742
3742
|
name: ee.value,
|
|
3743
3743
|
class: "vt-input__icon"
|
|
3744
|
-
}, null, 8, ["name"])) :
|
|
3745
|
-
])) :
|
|
3744
|
+
}, null, 8, ["name"])) : E("", !0)
|
|
3745
|
+
])) : E("", !0)
|
|
3746
3746
|
]),
|
|
3747
|
-
|
|
3748
|
-
|
|
3749
|
-
])) :
|
|
3750
|
-
|
|
3751
|
-
(s(!0), i(
|
|
3752
|
-
key:
|
|
3747
|
+
c.helperText || _.value ? (s(), i("div", l3, [
|
|
3748
|
+
_.value ? (s(), i("span", r3, J(_.value), 1)) : c.helperText ? (s(), i("span", s3, J(c.helperText), 1)) : E("", !0)
|
|
3749
|
+
])) : E("", !0),
|
|
3750
|
+
d.value.length > 1 && c.showAllErrors ? (s(), i("div", i3, [
|
|
3751
|
+
(s(!0), i(ce, null, he(d.value, (M, re) => (s(), i("div", {
|
|
3752
|
+
key: re,
|
|
3753
3753
|
class: "vt-input__error-item"
|
|
3754
3754
|
}, [
|
|
3755
|
-
r("span", null,
|
|
3755
|
+
r("span", null, J(M), 1)
|
|
3756
3756
|
]))), 128))
|
|
3757
|
-
])) :
|
|
3757
|
+
])) : E("", !0)
|
|
3758
3758
|
], 2));
|
|
3759
3759
|
}
|
|
3760
3760
|
}), g1 = Symbol("VtSelectContext");
|
|
3761
|
-
function
|
|
3761
|
+
function Ve(n, e, o) {
|
|
3762
3762
|
return o && typeof n == "object" && typeof e == "object" ? (n == null ? void 0 : n[o]) === (e == null ? void 0 : e[o]) : typeof n == "object" && typeof e == "object" ? JSON.stringify(n) === JSON.stringify(e) : n === e;
|
|
3763
3763
|
}
|
|
3764
3764
|
function u1(n, e, o) {
|
|
3765
|
-
return e.find((t) =>
|
|
3765
|
+
return e.find((t) => Ve(t.value, n, o));
|
|
3766
3766
|
}
|
|
3767
3767
|
function u3(n, e, o, t) {
|
|
3768
|
-
return o ? Array.isArray(e) ? e.some((l) =>
|
|
3768
|
+
return o ? Array.isArray(e) ? e.some((l) => Ve(l, n, t)) : !1 : Ve(e, n, t);
|
|
3769
3769
|
}
|
|
3770
3770
|
function d3(n, e, o, t) {
|
|
3771
3771
|
if (!e.length) return [];
|
|
@@ -3777,12 +3777,12 @@ function d3(n, e, o, t) {
|
|
|
3777
3777
|
function c3(n, e, o, t) {
|
|
3778
3778
|
if (o) {
|
|
3779
3779
|
const l = Array.isArray(e) ? e : [];
|
|
3780
|
-
return l.some((u) =>
|
|
3780
|
+
return l.some((u) => Ve(u, n.value, t)) ? l.filter((u) => !Ve(u, n.value, t)) : [...l, n.value];
|
|
3781
3781
|
}
|
|
3782
3782
|
return n.value;
|
|
3783
3783
|
}
|
|
3784
3784
|
function h3(n, e, o) {
|
|
3785
|
-
return Array.isArray(e) ? e.filter((t) => !
|
|
3785
|
+
return Array.isArray(e) ? e.filter((t) => !Ve(t, n, o)) : e;
|
|
3786
3786
|
}
|
|
3787
3787
|
function p3(n) {
|
|
3788
3788
|
return n ? [] : void 0;
|
|
@@ -3839,7 +3839,7 @@ const m3 = ["for"], w3 = {
|
|
|
3839
3839
|
}, B3 = ["aria-disabled", "aria-selected", "onClick"], T3 = { class: "vt-option__text" }, E3 = { key: 1 }, j3 = {
|
|
3840
3840
|
key: 0,
|
|
3841
3841
|
class: "vt-select-dropdown__loading-more"
|
|
3842
|
-
}, z3 = /* @__PURE__ */
|
|
3842
|
+
}, z3 = /* @__PURE__ */ de({
|
|
3843
3843
|
__name: "VSelect",
|
|
3844
3844
|
props: {
|
|
3845
3845
|
modelValue: {},
|
|
@@ -3868,29 +3868,34 @@ const m3 = ["for"], w3 = {
|
|
|
3868
3868
|
},
|
|
3869
3869
|
emits: ["update:modelValue", "change", "clear", "focus", "blur", "visible-change", "validation", "scrolled", "remove-tag"],
|
|
3870
3870
|
setup(n, { expose: e, emit: o }) {
|
|
3871
|
-
const t = n, l = o, a =
|
|
3872
|
-
isFocused:
|
|
3873
|
-
validationErrors:
|
|
3874
|
-
isValid:
|
|
3875
|
-
visibleCount:
|
|
3876
|
-
},
|
|
3877
|
-
const
|
|
3878
|
-
|
|
3879
|
-
},
|
|
3880
|
-
const
|
|
3881
|
-
|
|
3882
|
-
},
|
|
3883
|
-
for (const [
|
|
3884
|
-
if (
|
|
3885
|
-
return
|
|
3886
|
-
}, {
|
|
3887
|
-
|
|
3888
|
-
|
|
3889
|
-
|
|
3890
|
-
|
|
3891
|
-
|
|
3892
|
-
|
|
3893
|
-
|
|
3871
|
+
const t = n, l = o, a = V(), u = V(), h = V(), p = V(), v = V([]), d = V(), m = {
|
|
3872
|
+
isFocused: V(!1),
|
|
3873
|
+
validationErrors: V([]),
|
|
3874
|
+
isValid: V(!0),
|
|
3875
|
+
visibleCount: V(0)
|
|
3876
|
+
}, S = V(/* @__PURE__ */ new Map()), B = V(/* @__PURE__ */ new Set()), D = V(/* @__PURE__ */ new Map()), R = (w) => t.valueKey && typeof w == "object" && w !== null ? String(w[t.valueKey]) : typeof w == "object" ? JSON.stringify(w) : String(w), P = (w, A) => {
|
|
3877
|
+
const se = R(w.value);
|
|
3878
|
+
S.value.set(se, w), B.value.add(se), A && D.value.set(w.value, A);
|
|
3879
|
+
}, N = (w) => {
|
|
3880
|
+
const A = R(w);
|
|
3881
|
+
B.value.delete(A), D.value.delete(w);
|
|
3882
|
+
}, L = (w) => {
|
|
3883
|
+
for (const [A, se] of D.value.entries())
|
|
3884
|
+
if (Ve(A, w, t.valueKey))
|
|
3885
|
+
return se;
|
|
3886
|
+
}, T = y(() => {
|
|
3887
|
+
const w = [];
|
|
3888
|
+
for (const [A, se] of S.value.entries())
|
|
3889
|
+
B.value.has(A) && w.push(se);
|
|
3890
|
+
return w;
|
|
3891
|
+
}), {
|
|
3892
|
+
visible: H,
|
|
3893
|
+
parentVisible: Q,
|
|
3894
|
+
dropdownPosition: ee,
|
|
3895
|
+
show: le,
|
|
3896
|
+
hide: X,
|
|
3897
|
+
toggle: G,
|
|
3898
|
+
updatePosition: I
|
|
3894
3899
|
} = C1(u, h, {
|
|
3895
3900
|
trigger: "click",
|
|
3896
3901
|
placement: "bottom-start",
|
|
@@ -3898,311 +3903,311 @@ const m3 = ["for"], w3 = {
|
|
|
3898
3903
|
hideTimeout: 150,
|
|
3899
3904
|
disabled: t.disabled,
|
|
3900
3905
|
hideOnClick: !1,
|
|
3901
|
-
onVisibleChange: (
|
|
3902
|
-
|
|
3903
|
-
await
|
|
3904
|
-
}) : t.validateOnBlur &&
|
|
3906
|
+
onVisibleChange: (w) => {
|
|
3907
|
+
w ? ye(async () => {
|
|
3908
|
+
await I(), q.init();
|
|
3909
|
+
}) : t.validateOnBlur && _.validate(), l("visible-change", w);
|
|
3905
3910
|
}
|
|
3906
|
-
}),
|
|
3911
|
+
}), _ = {
|
|
3907
3912
|
validate() {
|
|
3908
|
-
const
|
|
3913
|
+
const w = v3(
|
|
3909
3914
|
t.modelValue,
|
|
3910
|
-
|
|
3915
|
+
K.value,
|
|
3911
3916
|
t.required || !1,
|
|
3912
3917
|
t.requiredMessage
|
|
3913
3918
|
);
|
|
3914
|
-
|
|
3919
|
+
m.validationErrors.value = w.errors, m.isValid.value = w.isValid, l("validation", { isValid: m.isValid.value, errors: w.errors });
|
|
3915
3920
|
},
|
|
3916
3921
|
clear() {
|
|
3917
|
-
|
|
3922
|
+
m.validationErrors.value = [], m.isValid.value = !0, l("validation", { isValid: !0, errors: [] });
|
|
3918
3923
|
}
|
|
3919
|
-
},
|
|
3924
|
+
}, q = {
|
|
3920
3925
|
init() {
|
|
3921
|
-
|
|
3926
|
+
d.value && d.value.addEventListener("scroll", this.handleOptionsScroll, { passive: !0 });
|
|
3922
3927
|
},
|
|
3923
|
-
handleOptionsScroll(
|
|
3928
|
+
handleOptionsScroll(w) {
|
|
3924
3929
|
if (t.loading) return;
|
|
3925
|
-
const
|
|
3926
|
-
if (!
|
|
3927
|
-
const { scrollTop:
|
|
3928
|
-
|
|
3930
|
+
const A = w.target;
|
|
3931
|
+
if (!A) return;
|
|
3932
|
+
const { scrollTop: se, scrollHeight: C, clientHeight: b } = A;
|
|
3933
|
+
C - se - b <= 50 && T.value.length > 0 && l("scrolled");
|
|
3929
3934
|
}
|
|
3930
|
-
},
|
|
3931
|
-
if (
|
|
3932
|
-
const
|
|
3933
|
-
return
|
|
3934
|
-
}),
|
|
3935
|
+
}, K = y(() => t.multiple), f = y(() => T.value.length ? d3(t.modelValue, T.value, K.value, t.valueKey) : []), k = y(() => !t.multiple || f.value.length === 0 ? [] : t.collapsedTags ? f.value.slice(0, m.visibleCount.value) : f.value), $ = y(() => {
|
|
3936
|
+
if (K.value) return "";
|
|
3937
|
+
const w = f.value[0];
|
|
3938
|
+
return w ? w.label : t.modelValue && typeof t.modelValue == "object" ? t.modelValue.label ? t.modelValue.label : t.modelValue.name ? t.modelValue.name : JSON.stringify(t.modelValue) : t.modelValue !== void 0 && t.modelValue !== null && t.modelValue !== "" && !Array.isArray(t.modelValue) ? String(t.modelValue) : "";
|
|
3939
|
+
}), z = y(() => t.clearable && !t.disabled && f.value.length > 0), Z = y(() => t.status !== "default" ? t.status : m.isValid.value ? "default" : "error"), W = y(() => [
|
|
3935
3940
|
"vt-select",
|
|
3936
|
-
`vt-select--${
|
|
3941
|
+
`vt-select--${Z.value}`,
|
|
3937
3942
|
{
|
|
3938
3943
|
"vt-select--disabled": t.disabled,
|
|
3939
|
-
"vt-select--focused":
|
|
3940
|
-
"vt-select--multiple":
|
|
3941
|
-
"vt-select--open":
|
|
3944
|
+
"vt-select--focused": m.isFocused.value,
|
|
3945
|
+
"vt-select--multiple": K.value,
|
|
3946
|
+
"vt-select--open": H.value
|
|
3942
3947
|
}
|
|
3943
|
-
]),
|
|
3944
|
-
...
|
|
3948
|
+
]), ue = y(() => ({
|
|
3949
|
+
...ee.value,
|
|
3945
3950
|
position: "absolute",
|
|
3946
3951
|
zIndex: 2e3,
|
|
3947
3952
|
maxHeight: `${t.maxHeight}px`
|
|
3948
|
-
})),
|
|
3949
|
-
if (!
|
|
3950
|
-
const
|
|
3951
|
-
return C3(
|
|
3952
|
-
}),
|
|
3953
|
-
var
|
|
3954
|
-
if (!
|
|
3955
|
-
const
|
|
3956
|
-
(
|
|
3957
|
-
},
|
|
3958
|
-
if (!
|
|
3959
|
-
const
|
|
3960
|
-
l("update:modelValue",
|
|
3953
|
+
})), $e = y(() => f.value.length - m.visibleCount.value), Be = y(() => t.collapsedTags && t.multiple && f.value.length > 0 && m.visibleCount.value < f.value.length), Oe = y(() => {
|
|
3954
|
+
if (!Be.value) return "";
|
|
3955
|
+
const w = f.value.slice(m.visibleCount.value);
|
|
3956
|
+
return C3($e.value, w);
|
|
3957
|
+
}), Se = (w) => {
|
|
3958
|
+
var se, C;
|
|
3959
|
+
if (!H.value) return;
|
|
3960
|
+
const A = w.target;
|
|
3961
|
+
(se = a.value) != null && se.contains(A) || (C = h.value) != null && C.contains(A) || X();
|
|
3962
|
+
}, Ie = (w) => {
|
|
3963
|
+
if (!w || w.disabled) return;
|
|
3964
|
+
const A = c3(w, t.modelValue, K.value, t.valueKey);
|
|
3965
|
+
l("update:modelValue", A), l("change", A), K.value || X(), t.validateOnInput && _.validate();
|
|
3961
3966
|
}, Te = () => {
|
|
3962
|
-
const
|
|
3963
|
-
l("update:modelValue",
|
|
3964
|
-
},
|
|
3965
|
-
if (
|
|
3966
|
-
const
|
|
3967
|
-
l("update:modelValue",
|
|
3968
|
-
},
|
|
3969
|
-
t.disabled ||
|
|
3970
|
-
},
|
|
3971
|
-
|
|
3972
|
-
},
|
|
3973
|
-
var
|
|
3974
|
-
|
|
3975
|
-
var
|
|
3976
|
-
(
|
|
3967
|
+
const w = p3(K.value);
|
|
3968
|
+
l("update:modelValue", w), l("change", w), l("clear"), _.clear();
|
|
3969
|
+
}, Re = (w) => {
|
|
3970
|
+
if (!K.value) return;
|
|
3971
|
+
const A = h3(w, t.modelValue, t.valueKey);
|
|
3972
|
+
l("update:modelValue", A), l("change", A), l("remove-tag", w), t.validateOnInput && _.validate();
|
|
3973
|
+
}, Ee = () => {
|
|
3974
|
+
t.disabled || G();
|
|
3975
|
+
}, c = () => {
|
|
3976
|
+
m.isFocused.value = !0, l("focus");
|
|
3977
|
+
}, x = (w) => {
|
|
3978
|
+
var A;
|
|
3979
|
+
w != null && w.relatedTarget && ((A = h.value) != null && A.contains(w.relatedTarget)) || (m.isFocused.value = !1, l("blur"), setTimeout(() => {
|
|
3980
|
+
var se;
|
|
3981
|
+
(se = h.value) != null && se.contains(document.activeElement) || X();
|
|
3977
3982
|
}, 100));
|
|
3978
|
-
},
|
|
3979
|
-
|
|
3980
|
-
},
|
|
3981
|
-
if (!t.collapsedTags || !p.value ||
|
|
3982
|
-
|
|
3983
|
+
}, M = (w) => {
|
|
3984
|
+
w.key === "Enter" || w.key === " " ? (w.preventDefault(), Ee()) : w.key === "Escape" && H.value && (w.preventDefault(), X());
|
|
3985
|
+
}, re = (w) => u3(w, t.modelValue, K.value, t.valueKey), ve = () => {
|
|
3986
|
+
if (!t.collapsedTags || !p.value || f.value.length === 0) {
|
|
3987
|
+
m.visibleCount.value = f.value.length;
|
|
3983
3988
|
return;
|
|
3984
3989
|
}
|
|
3985
|
-
|
|
3990
|
+
ye(() => {
|
|
3986
3991
|
if (!p.value) return;
|
|
3987
|
-
const
|
|
3988
|
-
|
|
3992
|
+
const w = f3(p.value, v.value, f.value.length);
|
|
3993
|
+
m.visibleCount.value = w;
|
|
3989
3994
|
});
|
|
3990
|
-
},
|
|
3991
|
-
selectValue: y(() => t.modelValue || (
|
|
3992
|
-
multiple:
|
|
3995
|
+
}, ke = {
|
|
3996
|
+
selectValue: y(() => t.modelValue || (K.value ? [] : void 0)).value,
|
|
3997
|
+
multiple: K.value,
|
|
3993
3998
|
valueKey: t.valueKey,
|
|
3994
|
-
handleOptionClick:
|
|
3995
|
-
isOptionSelected:
|
|
3996
|
-
registerOption:
|
|
3997
|
-
unregisterOption:
|
|
3999
|
+
handleOptionClick: Ie,
|
|
4000
|
+
isOptionSelected: re,
|
|
4001
|
+
registerOption: P,
|
|
4002
|
+
unregisterOption: N
|
|
3998
4003
|
};
|
|
3999
|
-
return e1(g1,
|
|
4004
|
+
return e1(g1, ke), e({
|
|
4000
4005
|
...{
|
|
4001
4006
|
focus() {
|
|
4002
|
-
|
|
4007
|
+
H.value || le();
|
|
4003
4008
|
},
|
|
4004
4009
|
blur() {
|
|
4005
|
-
|
|
4010
|
+
X();
|
|
4006
4011
|
},
|
|
4007
4012
|
clear() {
|
|
4008
4013
|
Te();
|
|
4009
4014
|
},
|
|
4010
4015
|
validate() {
|
|
4011
|
-
return
|
|
4016
|
+
return _.validate(), m.isValid.value;
|
|
4012
4017
|
},
|
|
4013
4018
|
clearValidation() {
|
|
4014
|
-
|
|
4019
|
+
_.clear();
|
|
4015
4020
|
},
|
|
4016
4021
|
getSelectedOptions() {
|
|
4017
|
-
return
|
|
4022
|
+
return f.value;
|
|
4018
4023
|
},
|
|
4019
4024
|
getValidationState() {
|
|
4020
4025
|
return {
|
|
4021
|
-
isValid:
|
|
4022
|
-
errors: [...
|
|
4026
|
+
isValid: m.isValid.value,
|
|
4027
|
+
errors: [...m.validationErrors.value]
|
|
4023
4028
|
};
|
|
4024
4029
|
}
|
|
4025
4030
|
},
|
|
4026
|
-
registerOption:
|
|
4027
|
-
unregisterOption:
|
|
4031
|
+
registerOption: P,
|
|
4032
|
+
unregisterOption: N
|
|
4028
4033
|
}), Ce(
|
|
4029
4034
|
() => t.modelValue,
|
|
4030
4035
|
() => {
|
|
4031
|
-
t.validateOnInput &&
|
|
4036
|
+
t.validateOnInput && _.validate();
|
|
4032
4037
|
}
|
|
4033
4038
|
), Ce(
|
|
4034
|
-
|
|
4039
|
+
f,
|
|
4035
4040
|
() => {
|
|
4036
|
-
|
|
4041
|
+
ve();
|
|
4037
4042
|
},
|
|
4038
4043
|
{ deep: !0 }
|
|
4039
4044
|
), Ce(
|
|
4040
4045
|
() => p.value,
|
|
4041
4046
|
() => {
|
|
4042
|
-
p.value &&
|
|
4047
|
+
p.value && ve();
|
|
4043
4048
|
}
|
|
4044
|
-
), Ce(
|
|
4045
|
-
|
|
4046
|
-
}),
|
|
4047
|
-
t.modelValue !== void 0 && t.modelValue !== "" && (!Array.isArray(t.modelValue) || t.modelValue.length > 0) &&
|
|
4048
|
-
|
|
4049
|
-
}), window.addEventListener("resize",
|
|
4049
|
+
), Ce(H, async (w) => {
|
|
4050
|
+
w && (await ye(), I());
|
|
4051
|
+
}), _e(() => {
|
|
4052
|
+
t.modelValue !== void 0 && t.modelValue !== "" && (!Array.isArray(t.modelValue) || t.modelValue.length > 0) && _.validate(), ye(() => {
|
|
4053
|
+
ve();
|
|
4054
|
+
}), window.addEventListener("resize", ve), document.addEventListener("click", Se);
|
|
4050
4055
|
}), He(() => {
|
|
4051
|
-
document.removeEventListener("click",
|
|
4052
|
-
}), (
|
|
4053
|
-
const
|
|
4056
|
+
document.removeEventListener("click", Se), window.removeEventListener("resize", ve);
|
|
4057
|
+
}), (w, A) => {
|
|
4058
|
+
const se = Je("tooltip");
|
|
4054
4059
|
return s(), i("div", {
|
|
4055
4060
|
ref_key: "selectRef",
|
|
4056
4061
|
ref: a,
|
|
4057
|
-
class:
|
|
4062
|
+
class: F(W.value)
|
|
4058
4063
|
}, [
|
|
4059
|
-
|
|
4064
|
+
w.label ? (s(), i("label", {
|
|
4060
4065
|
key: 0,
|
|
4061
|
-
for:
|
|
4066
|
+
for: w.id,
|
|
4062
4067
|
class: "vt-select__label"
|
|
4063
4068
|
}, [
|
|
4064
|
-
|
|
4065
|
-
|
|
4066
|
-
], 8, m3)) :
|
|
4069
|
+
Me(J(w.label) + " ", 1),
|
|
4070
|
+
w.required ? (s(), i("span", w3, "*")) : E("", !0)
|
|
4071
|
+
], 8, m3)) : E("", !0),
|
|
4067
4072
|
r("div", {
|
|
4068
4073
|
ref_key: "triggerRef",
|
|
4069
4074
|
ref: u,
|
|
4070
4075
|
class: "vt-select__container",
|
|
4071
4076
|
tabindex: "0",
|
|
4072
|
-
onBlur:
|
|
4073
|
-
onClick:
|
|
4074
|
-
onFocus:
|
|
4075
|
-
onKeydown:
|
|
4077
|
+
onBlur: x,
|
|
4078
|
+
onClick: Ee,
|
|
4079
|
+
onFocus: c,
|
|
4080
|
+
onKeydown: M
|
|
4076
4081
|
}, [
|
|
4077
4082
|
r("div", g3, [
|
|
4078
|
-
|
|
4083
|
+
w.multiple && f.value.length > 0 ? (s(), i("div", {
|
|
4079
4084
|
key: 0,
|
|
4080
4085
|
ref_key: "containerRef",
|
|
4081
4086
|
ref: p,
|
|
4082
4087
|
class: "vt-select__tags"
|
|
4083
4088
|
}, [
|
|
4084
|
-
(s(!0), i(
|
|
4085
|
-
key: `tag-${typeof
|
|
4089
|
+
(s(!0), i(ce, null, he(k.value, (C, b) => (s(), i("div", {
|
|
4090
|
+
key: `tag-${typeof C.value == "object" ? JSON.stringify(C.value) : C.value}-${b}`,
|
|
4086
4091
|
ref_for: !0,
|
|
4087
|
-
ref: (
|
|
4092
|
+
ref: (j) => j && (v.value[b] = j),
|
|
4088
4093
|
class: "vt-select__tag"
|
|
4089
4094
|
}, [
|
|
4090
|
-
r("span", _3,
|
|
4091
|
-
t.disabled ?
|
|
4095
|
+
r("span", _3, J(C.label), 1),
|
|
4096
|
+
t.disabled ? E("", !0) : (s(), ae(oe, {
|
|
4092
4097
|
key: 0,
|
|
4093
4098
|
class: "vt-select__tag-close",
|
|
4094
4099
|
name: "close",
|
|
4095
|
-
onClick: fe((
|
|
4100
|
+
onClick: fe((j) => Re(C.value), ["stop"])
|
|
4096
4101
|
}, null, 8, ["onClick"]))
|
|
4097
4102
|
]))), 128)),
|
|
4098
|
-
|
|
4099
|
-
r("span", b3, "+" +
|
|
4103
|
+
Be.value ? Ze((s(), i("div", k3, [
|
|
4104
|
+
r("span", b3, "+" + J($e.value), 1)
|
|
4100
4105
|
])), [
|
|
4101
|
-
[
|
|
4102
|
-
]) :
|
|
4103
|
-
], 512)) : !
|
|
4106
|
+
[se, Oe.value]
|
|
4107
|
+
]) : E("", !0)
|
|
4108
|
+
], 512)) : !w.multiple && $.value ? (s(), i("span", y3, J($.value), 1)) : (s(), i("span", x3, J(w.placeholder), 1))
|
|
4104
4109
|
]),
|
|
4105
4110
|
r("div", M3, [
|
|
4106
|
-
|
|
4111
|
+
w.loading ? (s(), ae(ze, {
|
|
4107
4112
|
key: 0,
|
|
4108
4113
|
class: "vt-select__loading"
|
|
4109
|
-
})) :
|
|
4114
|
+
})) : z.value ? (s(), i("button", {
|
|
4110
4115
|
key: 1,
|
|
4111
4116
|
disabled: t.disabled,
|
|
4112
4117
|
class: "vt-select__clear-btn",
|
|
4113
4118
|
type: "button",
|
|
4114
4119
|
onClick: fe(Te, ["stop"])
|
|
4115
4120
|
}, [
|
|
4116
|
-
|
|
4117
|
-
], 8, $3)) : (s(), ae(
|
|
4121
|
+
Y(oe, { name: "close" })
|
|
4122
|
+
], 8, $3)) : (s(), ae(oe, {
|
|
4118
4123
|
key: 2,
|
|
4119
|
-
class:
|
|
4124
|
+
class: F([{ "vt-select__arrow--open": ne(H) }, "vt-select__icon vt-select__arrow"]),
|
|
4120
4125
|
name: "arrowDown"
|
|
4121
4126
|
}, null, 8, ["class"]))
|
|
4122
4127
|
])
|
|
4123
4128
|
], 544),
|
|
4124
|
-
|
|
4125
|
-
default:
|
|
4126
|
-
|
|
4127
|
-
(s(!0), i(
|
|
4128
|
-
key: `error-${
|
|
4129
|
+
Y(r1, { name: "fade" }, {
|
|
4130
|
+
default: ge(() => [
|
|
4131
|
+
m.validationErrors && m.validationErrors.value.length ? (s(), i("div", L3, [
|
|
4132
|
+
(s(!0), i(ce, null, he(m.validationErrors.value, (C, b) => (s(), i("div", {
|
|
4133
|
+
key: `error-${b}`,
|
|
4129
4134
|
class: "vt-select__error"
|
|
4130
|
-
},
|
|
4131
|
-
])) :
|
|
4135
|
+
}, J(C), 1))), 128))
|
|
4136
|
+
])) : E("", !0)
|
|
4132
4137
|
]),
|
|
4133
4138
|
_: 1
|
|
4134
4139
|
}),
|
|
4135
4140
|
r("div", V3, [
|
|
4136
|
-
we(
|
|
4141
|
+
we(w.$slots, "default")
|
|
4137
4142
|
]),
|
|
4138
|
-
ne(
|
|
4143
|
+
ne(H) && ne(Q) ? (s(), ae(Qe, {
|
|
4139
4144
|
key: 1,
|
|
4140
4145
|
to: "body"
|
|
4141
4146
|
}, [
|
|
4142
|
-
|
|
4143
|
-
default:
|
|
4147
|
+
Y(r1, { name: "dropdown" }, {
|
|
4148
|
+
default: ge(() => [
|
|
4144
4149
|
r("div", {
|
|
4145
4150
|
ref_key: "dropdownRef",
|
|
4146
4151
|
ref: h,
|
|
4147
|
-
"aria-multiselectable":
|
|
4148
|
-
style:
|
|
4152
|
+
"aria-multiselectable": w.multiple,
|
|
4153
|
+
style: pe(ue.value),
|
|
4149
4154
|
class: "vt-select-dropdown",
|
|
4150
4155
|
role: "listbox",
|
|
4151
|
-
onClick:
|
|
4156
|
+
onClick: A[1] || (A[1] = fe(() => {
|
|
4152
4157
|
}, ["stop"])),
|
|
4153
|
-
onMousedown:
|
|
4158
|
+
onMousedown: A[2] || (A[2] = fe(() => {
|
|
4154
4159
|
}, ["prevent"]))
|
|
4155
4160
|
}, [
|
|
4156
|
-
|
|
4157
|
-
|
|
4158
|
-
|
|
4159
|
-
])) :
|
|
4161
|
+
w.loading ? (s(), i("div", I3, [
|
|
4162
|
+
Y(ze, { class: "vt-select-dropdown__loading-icon" }),
|
|
4163
|
+
Me(" " + J(w.loadingText), 1)
|
|
4164
|
+
])) : T.value.length === 0 ? (s(), i("div", H3, J(w.noDataText), 1)) : (s(), i("div", {
|
|
4160
4165
|
key: 2,
|
|
4161
4166
|
ref_key: "scrollContainerRef",
|
|
4162
|
-
ref:
|
|
4167
|
+
ref: d,
|
|
4163
4168
|
class: "vt-select-dropdown__options"
|
|
4164
4169
|
}, [
|
|
4165
|
-
(s(!0), i(
|
|
4166
|
-
key: `option-${typeof
|
|
4167
|
-
"aria-disabled":
|
|
4168
|
-
"aria-selected":
|
|
4169
|
-
class:
|
|
4170
|
+
(s(!0), i(ce, null, he(T.value, (C) => (s(), i("div", {
|
|
4171
|
+
key: `option-${typeof C.value == "object" ? JSON.stringify(C.value) : C.value}`,
|
|
4172
|
+
"aria-disabled": C.disabled || !1,
|
|
4173
|
+
"aria-selected": re(C.value),
|
|
4174
|
+
class: F([
|
|
4170
4175
|
"vt-option",
|
|
4171
4176
|
{
|
|
4172
|
-
"vt-option--selected":
|
|
4173
|
-
"vt-option--disabled":
|
|
4177
|
+
"vt-option--selected": re(C.value),
|
|
4178
|
+
"vt-option--disabled": C.disabled || !1
|
|
4174
4179
|
}
|
|
4175
4180
|
]),
|
|
4176
4181
|
role: "option",
|
|
4177
|
-
onClick: (
|
|
4178
|
-
onMousedown:
|
|
4182
|
+
onClick: (b) => Ie(C),
|
|
4183
|
+
onMousedown: A[0] || (A[0] = fe(() => {
|
|
4179
4184
|
}, ["prevent"]))
|
|
4180
4185
|
}, [
|
|
4181
|
-
|
|
4186
|
+
K.value ? (s(), ae(Le, {
|
|
4182
4187
|
key: 0,
|
|
4183
|
-
checked:
|
|
4184
|
-
disabled:
|
|
4188
|
+
checked: re(C.value),
|
|
4189
|
+
disabled: C.disabled || !1,
|
|
4185
4190
|
class: "vt-option__checkbox",
|
|
4186
4191
|
tabindex: "-1"
|
|
4187
|
-
}, null, 8, ["checked", "disabled"])) :
|
|
4192
|
+
}, null, 8, ["checked", "disabled"])) : E("", !0),
|
|
4188
4193
|
r("span", T3, [
|
|
4189
|
-
|
|
4194
|
+
L(C.value) ? (s(), ae(Xe(L(C.value)), { key: 0 })) : (s(), i("span", E3, J(C.label || C.value), 1))
|
|
4190
4195
|
])
|
|
4191
4196
|
], 42, B3))), 128)),
|
|
4192
|
-
|
|
4193
|
-
|
|
4194
|
-
|
|
4195
|
-
])) :
|
|
4197
|
+
w.loading ? (s(), i("div", j3, [
|
|
4198
|
+
Y(ze, { class: "vt-select-dropdown__loading-icon" }),
|
|
4199
|
+
Me(" " + J(t.loadingText), 1)
|
|
4200
|
+
])) : E("", !0)
|
|
4196
4201
|
], 512))
|
|
4197
4202
|
], 44, S3)
|
|
4198
4203
|
]),
|
|
4199
4204
|
_: 1
|
|
4200
4205
|
})
|
|
4201
|
-
])) :
|
|
4206
|
+
])) : E("", !0)
|
|
4202
4207
|
], 2);
|
|
4203
4208
|
};
|
|
4204
4209
|
}
|
|
4205
|
-
}), O3 = { style: { display: "none" } }, R3 = /* @__PURE__ */
|
|
4210
|
+
}), O3 = { style: { display: "none" } }, R3 = /* @__PURE__ */ de({
|
|
4206
4211
|
__name: "VOption",
|
|
4207
4212
|
props: {
|
|
4208
4213
|
label: {},
|
|
@@ -4218,7 +4223,7 @@ const m3 = ["for"], w3 = {
|
|
|
4218
4223
|
value: o.value,
|
|
4219
4224
|
disabled: o.disabled || !1
|
|
4220
4225
|
}));
|
|
4221
|
-
return
|
|
4226
|
+
return _e(() => {
|
|
4222
4227
|
if (l) {
|
|
4223
4228
|
const u = t.default ? () => t.default() : null;
|
|
4224
4229
|
l.registerOption(a.value, u);
|
|
@@ -4312,8 +4317,8 @@ const m3 = ["for"], w3 = {
|
|
|
4312
4317
|
h = t.top + u + (t.height - l.height) / 2, p = t.right + a + 8;
|
|
4313
4318
|
break;
|
|
4314
4319
|
}
|
|
4315
|
-
const v = window.innerWidth,
|
|
4316
|
-
p < 8 ? p = 8 : p + l.width > v - 8 && (p = v - l.width - 8), h < u + 8 ? o === "top" ? h = t.bottom + u + 8 : h = u + 8 : h + l.height > u +
|
|
4320
|
+
const v = window.innerWidth, d = window.innerHeight;
|
|
4321
|
+
p < 8 ? p = 8 : p + l.width > v - 8 && (p = v - l.width - 8), h < u + 8 ? o === "top" ? h = t.bottom + u + 8 : h = u + 8 : h + l.height > u + d - 8 && (o === "bottom" ? h = t.top + u - l.height - 8 : h = u + d - l.height - 8), n.style.top = `${h}px`, n.style.left = `${p}px`;
|
|
4317
4322
|
}, c1 = (n, e, o) => {
|
|
4318
4323
|
n.parentElement || document.body.appendChild(n), n.style.visibility = "visible", Ye(n, e, o), requestAnimationFrame(() => {
|
|
4319
4324
|
n.style.opacity = "1";
|
|
@@ -4367,17 +4372,17 @@ const m3 = ["for"], w3 = {
|
|
|
4367
4372
|
}, P3 = {
|
|
4368
4373
|
install(n, e = {}) {
|
|
4369
4374
|
const { prefix: o = "V", modal: t = !0 } = e;
|
|
4370
|
-
n.component(`${o}Button`, We), n.component(`${o}Icon`,
|
|
4375
|
+
n.component(`${o}Button`, We), n.component(`${o}Icon`, oe), n.component(`${o}Loader`, ze), n.component(`${o}Modal`, f1), n.component(`${o}Pagination`, ls), n.component(`${o}Checkbox`, Le), n.component(`${o}Table`, Ys), n.component(`${o}TableColumn`, Xs), n.component(`${o}Dropdown`, w1), n.component(`${o}DropdownItem`, Ue), n.component(`${o}Input`, a3), n.component(`${o}Select`, z3), n.component(`${o}Option`, R3), n.directive("tooltip", D3), t && n.use(ws);
|
|
4371
4376
|
}
|
|
4372
4377
|
}, Z3 = P3.install;
|
|
4373
4378
|
export {
|
|
4374
4379
|
A3 as DEFAULT_COLUMN_CONFIG,
|
|
4375
4380
|
m1 as DropdownContextKey,
|
|
4376
4381
|
We as VButton,
|
|
4377
|
-
|
|
4382
|
+
Le as VCheckbox,
|
|
4378
4383
|
w1 as VDropdown,
|
|
4379
4384
|
Ue as VDropdownItem,
|
|
4380
|
-
|
|
4385
|
+
oe as VIcon,
|
|
4381
4386
|
a3 as VInput,
|
|
4382
4387
|
ze as VLoader,
|
|
4383
4388
|
f1 as VModal,
|
|
@@ -4390,6 +4395,6 @@ export {
|
|
|
4390
4395
|
g1 as VtSelectContextKey,
|
|
4391
4396
|
P3 as default,
|
|
4392
4397
|
Z3 as install,
|
|
4393
|
-
|
|
4398
|
+
xe as modalManager,
|
|
4394
4399
|
D3 as tooltipDirective
|
|
4395
4400
|
};
|