prlg-ui 1.8.0 → 1.8.2
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.d.ts +9 -0
- package/dist/prlg-ui.cjs.js +1 -1
- package/dist/prlg-ui.css +1 -1
- package/dist/prlg-ui.es.js +596 -587
- package/package.json +1 -1
package/dist/prlg-ui.es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as O, computed as P, resolveComponent as
|
|
2
|
-
import { P as Xt, j as Ao, k as To, I as bt, A as Bo, e as wt, g as Do, S as Lo, a as Oo, b as Zt, M as Eo, h as _o, i as zo, C as Ho, c as Go, E as Fo, B as No, d as qo, W as
|
|
3
|
-
import { o as Jt, d as
|
|
4
|
-
import { _ as le, a as
|
|
1
|
+
import { defineComponent as O, computed as P, resolveComponent as Yt, createBlock as G, openBlock as d, resolveDynamicComponent as Ce, normalizeClass as L, withCtx as ee, createCommentVNode as T, createElementBlock as p, renderSlot as W, Fragment as oe, createTextVNode as fe, toDisplayString as F, ref as A, useTemplateRef as Ie, onMounted as ve, createElementVNode as R, createVNode as q, renderList as me, unref as m, mergeModels as U, useModel as te, withDirectives as Me, vModelCheckbox as yt, shallowRef as Ae, watch as se, getCurrentScope as ko, onScopeDispose as $o, shallowReadonly as _e, useCssVars as So, toRefs as Co, useId as qe, onUnmounted as Ze, normalizeStyle as Z, Transition as De, nextTick as pe, withModifiers as Je, vModelDynamic as xo, vModelRadio as Ro, provide as be, useSlots as jt, inject as de, toValue as ze, isRef as Mo, vModelText as Wt, toRef as Ue, createStaticVNode as Vo, Teleport as Ye, reactive as Ut, TransitionGroup as Po, vShow as Kt, createApp as Io } from "vue";
|
|
2
|
+
import { P as Xt, j as Ao, k as To, I as bt, A as Bo, e as wt, g as Do, S as Lo, a as Oo, b as Zt, M as Eo, h as _o, i as zo, C as Ho, c as Go, E as Fo, B as No, d as qo, W as Yo, f as jo } from "./WarningFillIcon-cJBG6d6O.js";
|
|
3
|
+
import { o as Jt, d as K } from "./parseFileSize.util-CxVk4CvB.js";
|
|
4
|
+
import { _ as le, a as Wo, C as Qt } from "./FileIcon-maHE2Nhr.js";
|
|
5
5
|
import { u as lt, E as Uo, _ as Ko } from "./Portal.vue_vue_type_script_setup_true_lang-CMr1orYd.js";
|
|
6
6
|
import { F as Dr, I as Lr } from "./Image-DdrY_gj3.js";
|
|
7
7
|
const Xo = {
|
|
@@ -23,7 +23,7 @@ const Xo = {
|
|
|
23
23
|
full: { type: Boolean }
|
|
24
24
|
},
|
|
25
25
|
setup(e) {
|
|
26
|
-
const t = P(() => e.variant === "link" && e.url || e.url ?
|
|
26
|
+
const t = P(() => e.variant === "link" && e.url || e.url ? Yt("RouterLink") : "button"), o = P(() => [
|
|
27
27
|
"button",
|
|
28
28
|
`button--${e.size}`,
|
|
29
29
|
`button--${e.variant}`,
|
|
@@ -46,7 +46,7 @@ const Xo = {
|
|
|
46
46
|
class: "button__icon"
|
|
47
47
|
})) : T("", !0),
|
|
48
48
|
a.iconOnly ? T("", !0) : (d(), p("div", Xo, [
|
|
49
|
-
|
|
49
|
+
W(a.$slots, "default"),
|
|
50
50
|
a.label && !a.$slots.default ? (d(), p(oe, { key: 0 }, [
|
|
51
51
|
fe(F(a.label), 1)
|
|
52
52
|
], 64)) : T("", !0)
|
|
@@ -216,7 +216,7 @@ const Xo = {
|
|
|
216
216
|
]),
|
|
217
217
|
s.label || s.$slots.label ? (d(), p("span", sn, [
|
|
218
218
|
fe(F(s.label) + " ", 1),
|
|
219
|
-
|
|
219
|
+
W(s.$slots, "label")
|
|
220
220
|
])) : T("", !0),
|
|
221
221
|
s.error && s.errorText ? (d(), p("span", rn, F(s.errorText), 1)) : T("", !0)
|
|
222
222
|
], 10, en));
|
|
@@ -267,7 +267,7 @@ function Oe(e, t) {
|
|
|
267
267
|
function Te(e) {
|
|
268
268
|
return e.split("-")[0];
|
|
269
269
|
}
|
|
270
|
-
function
|
|
270
|
+
function je(e) {
|
|
271
271
|
return e.split("-")[1];
|
|
272
272
|
}
|
|
273
273
|
function eo(e) {
|
|
@@ -285,7 +285,7 @@ function St(e) {
|
|
|
285
285
|
}
|
|
286
286
|
function pn(e, t, o) {
|
|
287
287
|
o === void 0 && (o = !1);
|
|
288
|
-
const a =
|
|
288
|
+
const a = je(e), n = St(e), r = $t(n);
|
|
289
289
|
let l = n === "x" ? a === (o ? "end" : "start") ? "right" : "left" : a === "start" ? "bottom" : "top";
|
|
290
290
|
return t.reference[r] > t.floating[r] && (l = tt(l)), [l, tt(l)];
|
|
291
291
|
}
|
|
@@ -310,7 +310,7 @@ function bn(e, t, o) {
|
|
|
310
310
|
}
|
|
311
311
|
}
|
|
312
312
|
function wn(e, t, o, a) {
|
|
313
|
-
const n =
|
|
313
|
+
const n = je(e);
|
|
314
314
|
let r = bn(Te(e), o === "start", a);
|
|
315
315
|
return n && (r = r.map((l) => l + "-" + n), t && (r = r.concat(r.map(vt)))), r;
|
|
316
316
|
}
|
|
@@ -358,47 +358,47 @@ function It(e, t, o) {
|
|
|
358
358
|
floating: n
|
|
359
359
|
} = e;
|
|
360
360
|
const r = Re(t), l = St(t), s = $t(l), i = Te(t), u = r === "y", c = a.x + a.width / 2 - n.width / 2, v = a.y + a.height / 2 - n.height / 2, f = a[s] / 2 - n[s] / 2;
|
|
361
|
-
let
|
|
361
|
+
let h;
|
|
362
362
|
switch (i) {
|
|
363
363
|
case "top":
|
|
364
|
-
|
|
364
|
+
h = {
|
|
365
365
|
x: c,
|
|
366
366
|
y: a.y - n.height
|
|
367
367
|
};
|
|
368
368
|
break;
|
|
369
369
|
case "bottom":
|
|
370
|
-
|
|
370
|
+
h = {
|
|
371
371
|
x: c,
|
|
372
372
|
y: a.y + a.height
|
|
373
373
|
};
|
|
374
374
|
break;
|
|
375
375
|
case "right":
|
|
376
|
-
|
|
376
|
+
h = {
|
|
377
377
|
x: a.x + a.width,
|
|
378
378
|
y: v
|
|
379
379
|
};
|
|
380
380
|
break;
|
|
381
381
|
case "left":
|
|
382
|
-
|
|
382
|
+
h = {
|
|
383
383
|
x: a.x - n.width,
|
|
384
384
|
y: v
|
|
385
385
|
};
|
|
386
386
|
break;
|
|
387
387
|
default:
|
|
388
|
-
|
|
388
|
+
h = {
|
|
389
389
|
x: a.x,
|
|
390
390
|
y: a.y
|
|
391
391
|
};
|
|
392
392
|
}
|
|
393
|
-
switch (
|
|
393
|
+
switch (je(t)) {
|
|
394
394
|
case "start":
|
|
395
|
-
|
|
395
|
+
h[l] -= f * (o && u ? -1 : 1);
|
|
396
396
|
break;
|
|
397
397
|
case "end":
|
|
398
|
-
|
|
398
|
+
h[l] += f * (o && u ? -1 : 1);
|
|
399
399
|
break;
|
|
400
400
|
}
|
|
401
|
-
return
|
|
401
|
+
return h;
|
|
402
402
|
}
|
|
403
403
|
const $n = async (e, t, o) => {
|
|
404
404
|
const {
|
|
@@ -414,23 +414,23 @@ const $n = async (e, t, o) => {
|
|
|
414
414
|
}), {
|
|
415
415
|
x: c,
|
|
416
416
|
y: v
|
|
417
|
-
} = It(u, a, i), f = a,
|
|
418
|
-
for (let
|
|
417
|
+
} = It(u, a, i), f = a, h = {}, g = 0;
|
|
418
|
+
for (let y = 0; y < s.length; y++) {
|
|
419
419
|
const {
|
|
420
420
|
name: w,
|
|
421
421
|
fn: V
|
|
422
|
-
} = s[
|
|
423
|
-
x:
|
|
422
|
+
} = s[y], {
|
|
423
|
+
x: C,
|
|
424
424
|
y: I,
|
|
425
425
|
data: B,
|
|
426
|
-
reset:
|
|
426
|
+
reset: $
|
|
427
427
|
} = await V({
|
|
428
428
|
x: c,
|
|
429
429
|
y: v,
|
|
430
430
|
initialPlacement: a,
|
|
431
431
|
placement: f,
|
|
432
432
|
strategy: n,
|
|
433
|
-
middlewareData:
|
|
433
|
+
middlewareData: h,
|
|
434
434
|
rects: u,
|
|
435
435
|
platform: l,
|
|
436
436
|
elements: {
|
|
@@ -438,27 +438,27 @@ const $n = async (e, t, o) => {
|
|
|
438
438
|
floating: t
|
|
439
439
|
}
|
|
440
440
|
});
|
|
441
|
-
c =
|
|
442
|
-
...
|
|
441
|
+
c = C ?? c, v = I ?? v, h = {
|
|
442
|
+
...h,
|
|
443
443
|
[w]: {
|
|
444
|
-
...
|
|
444
|
+
...h[w],
|
|
445
445
|
...B
|
|
446
446
|
}
|
|
447
|
-
},
|
|
447
|
+
}, $ && g <= 50 && (g++, typeof $ == "object" && ($.placement && (f = $.placement), $.rects && (u = $.rects === !0 ? await l.getElementRects({
|
|
448
448
|
reference: e,
|
|
449
449
|
floating: t,
|
|
450
450
|
strategy: n
|
|
451
|
-
}) :
|
|
451
|
+
}) : $.rects), {
|
|
452
452
|
x: c,
|
|
453
453
|
y: v
|
|
454
|
-
} = It(u, f, i)),
|
|
454
|
+
} = It(u, f, i)), y = -1);
|
|
455
455
|
}
|
|
456
456
|
return {
|
|
457
457
|
x: c,
|
|
458
458
|
y: v,
|
|
459
459
|
placement: f,
|
|
460
460
|
strategy: n,
|
|
461
|
-
middlewareData:
|
|
461
|
+
middlewareData: h
|
|
462
462
|
};
|
|
463
463
|
};
|
|
464
464
|
async function Ke(e, t) {
|
|
@@ -476,13 +476,13 @@ async function Ke(e, t) {
|
|
|
476
476
|
rootBoundary: c = "viewport",
|
|
477
477
|
elementContext: v = "floating",
|
|
478
478
|
altBoundary: f = !1,
|
|
479
|
-
padding:
|
|
480
|
-
} = Oe(t, e), g = to(
|
|
479
|
+
padding: h = 0
|
|
480
|
+
} = Oe(t, e), g = to(h), w = s[f ? v === "floating" ? "reference" : "floating" : v], V = ot(await r.getClippingRect({
|
|
481
481
|
element: (o = await (r.isElement == null ? void 0 : r.isElement(w))) == null || o ? w : w.contextElement || await (r.getDocumentElement == null ? void 0 : r.getDocumentElement(s.floating)),
|
|
482
482
|
boundary: u,
|
|
483
483
|
rootBoundary: c,
|
|
484
484
|
strategy: i
|
|
485
|
-
})),
|
|
485
|
+
})), C = v === "floating" ? {
|
|
486
486
|
x: a,
|
|
487
487
|
y: n,
|
|
488
488
|
width: l.floating.width,
|
|
@@ -493,17 +493,17 @@ async function Ke(e, t) {
|
|
|
493
493
|
} : {
|
|
494
494
|
x: 1,
|
|
495
495
|
y: 1
|
|
496
|
-
},
|
|
496
|
+
}, $ = ot(r.convertOffsetParentRelativeRectToViewportRelativeRect ? await r.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
497
497
|
elements: s,
|
|
498
|
-
rect:
|
|
498
|
+
rect: C,
|
|
499
499
|
offsetParent: I,
|
|
500
500
|
strategy: i
|
|
501
|
-
}) :
|
|
501
|
+
}) : C);
|
|
502
502
|
return {
|
|
503
|
-
top: (V.top -
|
|
504
|
-
bottom: (
|
|
505
|
-
left: (V.left -
|
|
506
|
-
right: (
|
|
503
|
+
top: (V.top - $.top + g.top) / B.y,
|
|
504
|
+
bottom: ($.bottom - V.bottom + g.bottom) / B.y,
|
|
505
|
+
left: (V.left - $.left + g.left) / B.x,
|
|
506
|
+
right: ($.right - V.right + g.right) / B.x
|
|
507
507
|
};
|
|
508
508
|
}
|
|
509
509
|
const Sn = (e) => ({
|
|
@@ -527,14 +527,14 @@ const Sn = (e) => ({
|
|
|
527
527
|
const v = to(c), f = {
|
|
528
528
|
x: o,
|
|
529
529
|
y: a
|
|
530
|
-
},
|
|
531
|
-
let
|
|
532
|
-
(
|
|
533
|
-
const D = B / 2 -
|
|
530
|
+
}, h = St(n), g = $t(h), y = await l.getDimensions(u), w = h === "y", V = w ? "top" : "left", C = w ? "bottom" : "right", I = w ? "clientHeight" : "clientWidth", B = r.reference[g] + r.reference[h] - f[h] - r.floating[g], $ = f[h] - r.reference[h], S = await (l.getOffsetParent == null ? void 0 : l.getOffsetParent(u));
|
|
531
|
+
let k = S ? S[I] : 0;
|
|
532
|
+
(!k || !await (l.isElement == null ? void 0 : l.isElement(S))) && (k = s.floating[I] || r.floating[g]);
|
|
533
|
+
const D = B / 2 - $ / 2, b = k / 2 - y[g] / 2 - 1, M = Le(v[V], b), x = Le(v[C], b), H = M, z = k - y[g] - x, E = k / 2 - y[g] / 2 + D, N = ft(H, E, z), _ = !i.arrow && je(n) != null && E !== N && r.reference[g] / 2 - (E < H ? M : x) - y[g] / 2 < 0, ne = _ ? E < H ? E - H : E - z : 0;
|
|
534
534
|
return {
|
|
535
|
-
[
|
|
535
|
+
[h]: f[h] + ne,
|
|
536
536
|
data: {
|
|
537
|
-
[
|
|
537
|
+
[h]: N,
|
|
538
538
|
centerOffset: E - N - ne,
|
|
539
539
|
..._ && {
|
|
540
540
|
alignmentOffset: ne
|
|
@@ -560,16 +560,16 @@ const Sn = (e) => ({
|
|
|
560
560
|
mainAxis: c = !0,
|
|
561
561
|
crossAxis: v = !0,
|
|
562
562
|
fallbackPlacements: f,
|
|
563
|
-
fallbackStrategy:
|
|
563
|
+
fallbackStrategy: h = "bestFit",
|
|
564
564
|
fallbackAxisSideDirection: g = "none",
|
|
565
|
-
flipAlignment:
|
|
565
|
+
flipAlignment: y = !0,
|
|
566
566
|
...w
|
|
567
567
|
} = Oe(e, t);
|
|
568
568
|
if ((o = r.arrow) != null && o.alignmentOffset)
|
|
569
569
|
return {};
|
|
570
|
-
const V = Te(n),
|
|
571
|
-
!f &&
|
|
572
|
-
const
|
|
570
|
+
const V = Te(n), C = Re(s), I = Te(s) === s, B = await (i.isRTL == null ? void 0 : i.isRTL(u.floating)), $ = f || (I || !y ? [tt(s)] : gn(s)), S = g !== "none";
|
|
571
|
+
!f && S && $.push(...wn(s, y, g, B));
|
|
572
|
+
const k = [s, ...$], D = await Ke(t, w), b = [];
|
|
573
573
|
let M = ((a = r.flip) == null ? void 0 : a.overflows) || [];
|
|
574
574
|
if (c && b.push(D[V]), v) {
|
|
575
575
|
const E = pn(n, l, B);
|
|
@@ -580,10 +580,10 @@ const Sn = (e) => ({
|
|
|
580
580
|
overflows: b
|
|
581
581
|
}], !b.every((E) => E <= 0)) {
|
|
582
582
|
var x, H;
|
|
583
|
-
const E = (((x = r.flip) == null ? void 0 : x.index) || 0) + 1, N =
|
|
584
|
-
if (N && (!(v === "alignment" ?
|
|
583
|
+
const E = (((x = r.flip) == null ? void 0 : x.index) || 0) + 1, N = k[E];
|
|
584
|
+
if (N && (!(v === "alignment" ? C !== Re(N) : !1) || // We leave the current main axis only if every placement on that axis
|
|
585
585
|
// overflows the main axis.
|
|
586
|
-
M.every((ce) => Re(ce.placement) ===
|
|
586
|
+
M.every((ce) => Re(ce.placement) === C ? ce.overflows[0] > 0 : !0)))
|
|
587
587
|
return {
|
|
588
588
|
data: {
|
|
589
589
|
index: E,
|
|
@@ -595,13 +595,13 @@ const Sn = (e) => ({
|
|
|
595
595
|
};
|
|
596
596
|
let _ = (H = M.filter((ne) => ne.overflows[0] <= 0).sort((ne, ce) => ne.overflows[1] - ce.overflows[1])[0]) == null ? void 0 : H.placement;
|
|
597
597
|
if (!_)
|
|
598
|
-
switch (
|
|
598
|
+
switch (h) {
|
|
599
599
|
case "bestFit": {
|
|
600
600
|
var z;
|
|
601
601
|
const ne = (z = M.filter((ce) => {
|
|
602
|
-
if (
|
|
602
|
+
if (S) {
|
|
603
603
|
const ae = Re(ce.placement);
|
|
604
|
-
return ae ===
|
|
604
|
+
return ae === C || // Create a bias to the `y` side axis due to horizontal
|
|
605
605
|
// reading directions favoring greater width.
|
|
606
606
|
ae === "y";
|
|
607
607
|
}
|
|
@@ -683,10 +683,10 @@ async function Mn(e, t) {
|
|
|
683
683
|
placement: o,
|
|
684
684
|
platform: a,
|
|
685
685
|
elements: n
|
|
686
|
-
} = e, r = await (a.isRTL == null ? void 0 : a.isRTL(n.floating)), l = Te(o), s =
|
|
686
|
+
} = e, r = await (a.isRTL == null ? void 0 : a.isRTL(n.floating)), l = Te(o), s = je(o), i = Re(o) === "y", u = Rn.has(l) ? -1 : 1, c = r && i ? -1 : 1, v = Oe(t, e);
|
|
687
687
|
let {
|
|
688
688
|
mainAxis: f,
|
|
689
|
-
crossAxis:
|
|
689
|
+
crossAxis: h,
|
|
690
690
|
alignmentAxis: g
|
|
691
691
|
} = typeof v == "number" ? {
|
|
692
692
|
mainAxis: v,
|
|
@@ -697,12 +697,12 @@ async function Mn(e, t) {
|
|
|
697
697
|
crossAxis: v.crossAxis || 0,
|
|
698
698
|
alignmentAxis: v.alignmentAxis
|
|
699
699
|
};
|
|
700
|
-
return s && typeof g == "number" && (
|
|
701
|
-
x:
|
|
700
|
+
return s && typeof g == "number" && (h = s === "end" ? g * -1 : g), i ? {
|
|
701
|
+
x: h * c,
|
|
702
702
|
y: f * u
|
|
703
703
|
} : {
|
|
704
704
|
x: f * u,
|
|
705
|
-
y:
|
|
705
|
+
y: h * c
|
|
706
706
|
};
|
|
707
707
|
}
|
|
708
708
|
const Vn = function(e) {
|
|
@@ -743,11 +743,11 @@ const Vn = function(e) {
|
|
|
743
743
|
fn: (w) => {
|
|
744
744
|
let {
|
|
745
745
|
x: V,
|
|
746
|
-
y:
|
|
746
|
+
y: C
|
|
747
747
|
} = w;
|
|
748
748
|
return {
|
|
749
749
|
x: V,
|
|
750
|
-
y:
|
|
750
|
+
y: C
|
|
751
751
|
};
|
|
752
752
|
}
|
|
753
753
|
},
|
|
@@ -756,25 +756,25 @@ const Vn = function(e) {
|
|
|
756
756
|
x: o,
|
|
757
757
|
y: a
|
|
758
758
|
}, c = await Ke(t, i), v = Re(Te(n)), f = eo(v);
|
|
759
|
-
let
|
|
759
|
+
let h = u[f], g = u[v];
|
|
760
760
|
if (r) {
|
|
761
|
-
const w = f === "y" ? "top" : "left", V = f === "y" ? "bottom" : "right",
|
|
762
|
-
|
|
761
|
+
const w = f === "y" ? "top" : "left", V = f === "y" ? "bottom" : "right", C = h + c[w], I = h - c[V];
|
|
762
|
+
h = ft(C, h, I);
|
|
763
763
|
}
|
|
764
764
|
if (l) {
|
|
765
|
-
const w = v === "y" ? "top" : "left", V = v === "y" ? "bottom" : "right",
|
|
766
|
-
g = ft(
|
|
765
|
+
const w = v === "y" ? "top" : "left", V = v === "y" ? "bottom" : "right", C = g + c[w], I = g - c[V];
|
|
766
|
+
g = ft(C, g, I);
|
|
767
767
|
}
|
|
768
|
-
const
|
|
768
|
+
const y = s.fn({
|
|
769
769
|
...t,
|
|
770
|
-
[f]:
|
|
770
|
+
[f]: h,
|
|
771
771
|
[v]: g
|
|
772
772
|
});
|
|
773
773
|
return {
|
|
774
|
-
...
|
|
774
|
+
...y,
|
|
775
775
|
data: {
|
|
776
|
-
x:
|
|
777
|
-
y:
|
|
776
|
+
x: y.x - o,
|
|
777
|
+
y: y.y - a,
|
|
778
778
|
enabled: {
|
|
779
779
|
[f]: r,
|
|
780
780
|
[v]: l
|
|
@@ -798,25 +798,25 @@ const Vn = function(e) {
|
|
|
798
798
|
apply: i = () => {
|
|
799
799
|
},
|
|
800
800
|
...u
|
|
801
|
-
} = Oe(e, t), c = await Ke(t, u), v = Te(n), f =
|
|
801
|
+
} = Oe(e, t), c = await Ke(t, u), v = Te(n), f = je(n), h = Re(n) === "y", {
|
|
802
802
|
width: g,
|
|
803
|
-
height:
|
|
803
|
+
height: y
|
|
804
804
|
} = r.floating;
|
|
805
805
|
let w, V;
|
|
806
806
|
v === "top" || v === "bottom" ? (w = v, V = f === (await (l.isRTL == null ? void 0 : l.isRTL(s.floating)) ? "start" : "end") ? "left" : "right") : (V = v, w = f === "end" ? "top" : "bottom");
|
|
807
|
-
const
|
|
808
|
-
let
|
|
809
|
-
if ((o = t.middlewareData.shift) != null && o.enabled.x && (D = I), (a = t.middlewareData.shift) != null && a.enabled.y && (
|
|
807
|
+
const C = y - c.top - c.bottom, I = g - c.left - c.right, B = Le(y - c[w], C), $ = Le(g - c[V], I), S = !t.middlewareData.shift;
|
|
808
|
+
let k = B, D = $;
|
|
809
|
+
if ((o = t.middlewareData.shift) != null && o.enabled.x && (D = I), (a = t.middlewareData.shift) != null && a.enabled.y && (k = C), S && !f) {
|
|
810
810
|
const M = ye(c.left, 0), x = ye(c.right, 0), H = ye(c.top, 0), z = ye(c.bottom, 0);
|
|
811
|
-
|
|
811
|
+
h ? D = g - 2 * (M !== 0 || x !== 0 ? M + x : ye(c.left, c.right)) : k = y - 2 * (H !== 0 || z !== 0 ? H + z : ye(c.top, c.bottom));
|
|
812
812
|
}
|
|
813
813
|
await i({
|
|
814
814
|
...t,
|
|
815
815
|
availableWidth: D,
|
|
816
|
-
availableHeight:
|
|
816
|
+
availableHeight: k
|
|
817
817
|
});
|
|
818
818
|
const b = await l.getDimensions(s.floating);
|
|
819
|
-
return g !== b.width ||
|
|
819
|
+
return g !== b.width || y !== b.height ? {
|
|
820
820
|
reset: {
|
|
821
821
|
rects: !0
|
|
822
822
|
}
|
|
@@ -981,11 +981,11 @@ function Xe(e, t, o, a) {
|
|
|
981
981
|
const s = Gn(r, o, a) ? so(r) : Se(0);
|
|
982
982
|
let i = (n.left + s.x) / l.x, u = (n.top + s.y) / l.y, c = n.width / l.x, v = n.height / l.y;
|
|
983
983
|
if (r) {
|
|
984
|
-
const f = ge(r),
|
|
985
|
-
let g = f,
|
|
986
|
-
for (;
|
|
987
|
-
const w = Ge(
|
|
988
|
-
i *= w.x, u *= w.y, c *= w.x, v *= w.y, i += I, u += B, g = ge(
|
|
984
|
+
const f = ge(r), h = a && ke(a) ? ge(a) : a;
|
|
985
|
+
let g = f, y = mt(g);
|
|
986
|
+
for (; y && a && h !== g; ) {
|
|
987
|
+
const w = Ge(y), V = y.getBoundingClientRect(), C = $e(y), I = V.left + (y.clientLeft + parseFloat(C.paddingLeft)) * w.x, B = V.top + (y.clientTop + parseFloat(C.paddingTop)) * w.y;
|
|
988
|
+
i *= w.x, u *= w.y, c *= w.x, v *= w.y, i += I, u += B, g = ge(y), y = mt(g);
|
|
989
989
|
}
|
|
990
990
|
}
|
|
991
991
|
return ot({
|
|
@@ -1022,8 +1022,8 @@ function Fn(e) {
|
|
|
1022
1022
|
}, u = Se(1);
|
|
1023
1023
|
const c = Se(0), v = xe(a);
|
|
1024
1024
|
if ((v || !v && !r) && ((Ee(a) !== "body" || Qe(l)) && (i = rt(a)), xe(a))) {
|
|
1025
|
-
const
|
|
1026
|
-
u = Ge(a), c.x =
|
|
1025
|
+
const h = Xe(a);
|
|
1026
|
+
u = Ge(a), c.x = h.x + a.clientLeft, c.y = h.y + a.clientTop;
|
|
1027
1027
|
}
|
|
1028
1028
|
const f = l && !v && !r ? ro(l, i) : Se(0);
|
|
1029
1029
|
return {
|
|
@@ -1048,7 +1048,7 @@ function qn(e) {
|
|
|
1048
1048
|
};
|
|
1049
1049
|
}
|
|
1050
1050
|
const Dt = 25;
|
|
1051
|
-
function
|
|
1051
|
+
function Yn(e, t) {
|
|
1052
1052
|
const o = ge(e), a = Ve(e), n = o.visualViewport;
|
|
1053
1053
|
let r = a.clientWidth, l = a.clientHeight, s = 0, i = 0;
|
|
1054
1054
|
if (n) {
|
|
@@ -1058,7 +1058,7 @@ function jn(e, t) {
|
|
|
1058
1058
|
}
|
|
1059
1059
|
const u = it(a);
|
|
1060
1060
|
if (u <= 0) {
|
|
1061
|
-
const c = a.ownerDocument, v = c.body, f = getComputedStyle(v),
|
|
1061
|
+
const c = a.ownerDocument, v = c.body, f = getComputedStyle(v), h = c.compatMode === "CSS1Compat" && parseFloat(f.marginLeft) + parseFloat(f.marginRight) || 0, g = Math.abs(a.clientWidth - v.clientWidth - h);
|
|
1062
1062
|
g <= Dt && (r -= g);
|
|
1063
1063
|
} else u <= Dt && (r += u);
|
|
1064
1064
|
return {
|
|
@@ -1068,8 +1068,8 @@ function jn(e, t) {
|
|
|
1068
1068
|
y: i
|
|
1069
1069
|
};
|
|
1070
1070
|
}
|
|
1071
|
-
const
|
|
1072
|
-
function
|
|
1071
|
+
const jn = /* @__PURE__ */ new Set(["absolute", "fixed"]);
|
|
1072
|
+
function Wn(e, t) {
|
|
1073
1073
|
const o = Xe(e, !0, t === "fixed"), a = o.top + e.clientTop, n = o.left + e.clientLeft, r = xe(e) ? Ge(e) : Se(1), l = e.clientWidth * r.x, s = e.clientHeight * r.y, i = n * r.x, u = a * r.y;
|
|
1074
1074
|
return {
|
|
1075
1075
|
width: l,
|
|
@@ -1081,11 +1081,11 @@ function Yn(e, t) {
|
|
|
1081
1081
|
function Lt(e, t, o) {
|
|
1082
1082
|
let a;
|
|
1083
1083
|
if (t === "viewport")
|
|
1084
|
-
a =
|
|
1084
|
+
a = Yn(e, o);
|
|
1085
1085
|
else if (t === "document")
|
|
1086
1086
|
a = qn(Ve(e));
|
|
1087
1087
|
else if (ke(t))
|
|
1088
|
-
a =
|
|
1088
|
+
a = Wn(t, o);
|
|
1089
1089
|
else {
|
|
1090
1090
|
const n = so(e);
|
|
1091
1091
|
a = {
|
|
@@ -1110,7 +1110,7 @@ function Un(e, t) {
|
|
|
1110
1110
|
let l = r ? Be(e) : e;
|
|
1111
1111
|
for (; ke(l) && !Ne(l); ) {
|
|
1112
1112
|
const s = $e(l), i = xt(l);
|
|
1113
|
-
!i && s.position === "fixed" && (n = null), (r ? !i && !n : !i && s.position === "static" && !!n &&
|
|
1113
|
+
!i && s.position === "fixed" && (n = null), (r ? !i && !n : !i && s.position === "static" && !!n && jn.has(n.position) || Qe(l) && !i && io(e, l)) ? a = a.filter((c) => c !== l) : n = s, l = Be(l);
|
|
1114
1114
|
}
|
|
1115
1115
|
return t.set(e, a), a;
|
|
1116
1116
|
}
|
|
@@ -1154,8 +1154,8 @@ function Zn(e, t, o) {
|
|
|
1154
1154
|
}
|
|
1155
1155
|
if (a || !a && !r)
|
|
1156
1156
|
if ((Ee(t) !== "body" || Qe(n)) && (s = rt(t)), a) {
|
|
1157
|
-
const
|
|
1158
|
-
i.x =
|
|
1157
|
+
const h = Xe(t, !0, r, t);
|
|
1158
|
+
i.x = h.x + t.clientLeft, i.y = h.y + t.clientTop;
|
|
1159
1159
|
} else n && u();
|
|
1160
1160
|
r && !a && n && u();
|
|
1161
1161
|
const c = n && !a && !r ? ro(n, s) : Se(0), v = l.left + s.scrollLeft - i.x - c.x, f = l.top + s.scrollTop - i.y - c.y;
|
|
@@ -1270,79 +1270,79 @@ function _t(e, t) {
|
|
|
1270
1270
|
function zt(e, t, o) {
|
|
1271
1271
|
o === void 0 && (o = {});
|
|
1272
1272
|
const a = o.whileElementsMounted, n = P(() => {
|
|
1273
|
-
var
|
|
1274
|
-
return (
|
|
1273
|
+
var k;
|
|
1274
|
+
return (k = He(o.open)) != null ? k : !0;
|
|
1275
1275
|
}), r = P(() => He(o.middleware)), l = P(() => {
|
|
1276
|
-
var
|
|
1277
|
-
return (
|
|
1276
|
+
var k;
|
|
1277
|
+
return (k = He(o.placement)) != null ? k : "bottom";
|
|
1278
1278
|
}), s = P(() => {
|
|
1279
|
-
var
|
|
1280
|
-
return (
|
|
1279
|
+
var k;
|
|
1280
|
+
return (k = He(o.strategy)) != null ? k : "absolute";
|
|
1281
1281
|
}), i = P(() => {
|
|
1282
|
-
var
|
|
1283
|
-
return (
|
|
1284
|
-
}), u = P(() => ht(e.value)), c = P(() => ht(t.value)), v = A(0), f = A(0),
|
|
1285
|
-
const
|
|
1286
|
-
position:
|
|
1282
|
+
var k;
|
|
1283
|
+
return (k = He(o.transform)) != null ? k : !0;
|
|
1284
|
+
}), u = P(() => ht(e.value)), c = P(() => ht(t.value)), v = A(0), f = A(0), h = A(s.value), g = A(l.value), y = Ae({}), w = A(!1), V = P(() => {
|
|
1285
|
+
const k = {
|
|
1286
|
+
position: h.value,
|
|
1287
1287
|
left: "0",
|
|
1288
1288
|
top: "0"
|
|
1289
1289
|
};
|
|
1290
1290
|
if (!c.value)
|
|
1291
|
-
return
|
|
1291
|
+
return k;
|
|
1292
1292
|
const D = _t(c.value, v.value), b = _t(c.value, f.value);
|
|
1293
1293
|
return i.value ? {
|
|
1294
|
-
|
|
1294
|
+
...k,
|
|
1295
1295
|
transform: "translate(" + D + "px, " + b + "px)",
|
|
1296
1296
|
...vo(c.value) >= 1.5 && {
|
|
1297
1297
|
willChange: "transform"
|
|
1298
1298
|
}
|
|
1299
1299
|
} : {
|
|
1300
|
-
position:
|
|
1300
|
+
position: h.value,
|
|
1301
1301
|
left: D + "px",
|
|
1302
1302
|
top: b + "px"
|
|
1303
1303
|
};
|
|
1304
1304
|
});
|
|
1305
|
-
let
|
|
1305
|
+
let C;
|
|
1306
1306
|
function I() {
|
|
1307
1307
|
if (u.value == null || c.value == null)
|
|
1308
1308
|
return;
|
|
1309
|
-
const
|
|
1309
|
+
const k = n.value;
|
|
1310
1310
|
fo(u.value, c.value, {
|
|
1311
1311
|
middleware: r.value,
|
|
1312
1312
|
placement: l.value,
|
|
1313
1313
|
strategy: s.value
|
|
1314
1314
|
}).then((D) => {
|
|
1315
|
-
v.value = D.x, f.value = D.y,
|
|
1315
|
+
v.value = D.x, f.value = D.y, h.value = D.strategy, g.value = D.placement, y.value = D.middlewareData, w.value = k !== !1;
|
|
1316
1316
|
});
|
|
1317
1317
|
}
|
|
1318
1318
|
function B() {
|
|
1319
|
-
typeof
|
|
1319
|
+
typeof C == "function" && (C(), C = void 0);
|
|
1320
1320
|
}
|
|
1321
|
-
function
|
|
1321
|
+
function $() {
|
|
1322
1322
|
if (B(), a === void 0) {
|
|
1323
1323
|
I();
|
|
1324
1324
|
return;
|
|
1325
1325
|
}
|
|
1326
1326
|
if (u.value != null && c.value != null) {
|
|
1327
|
-
|
|
1327
|
+
C = a(u.value, c.value, I);
|
|
1328
1328
|
return;
|
|
1329
1329
|
}
|
|
1330
1330
|
}
|
|
1331
|
-
function
|
|
1331
|
+
function S() {
|
|
1332
1332
|
n.value || (w.value = !1);
|
|
1333
1333
|
}
|
|
1334
1334
|
return se([r, l, s, n], I, {
|
|
1335
1335
|
flush: "sync"
|
|
1336
|
-
}), se([u, c],
|
|
1336
|
+
}), se([u, c], $, {
|
|
1337
1337
|
flush: "sync"
|
|
1338
|
-
}), se(n,
|
|
1338
|
+
}), se(n, S, {
|
|
1339
1339
|
flush: "sync"
|
|
1340
1340
|
}), ko() && $o(B), {
|
|
1341
1341
|
x: _e(v),
|
|
1342
1342
|
y: _e(f),
|
|
1343
|
-
strategy: _e(
|
|
1343
|
+
strategy: _e(h),
|
|
1344
1344
|
placement: _e(g),
|
|
1345
|
-
middlewareData: _e(
|
|
1345
|
+
middlewareData: _e(y),
|
|
1346
1346
|
isPositioned: _e(w),
|
|
1347
1347
|
floatingStyles: V,
|
|
1348
1348
|
update: I
|
|
@@ -1384,36 +1384,36 @@ const al = { class: "popover__content" }, sl = {
|
|
|
1384
1384
|
},
|
|
1385
1385
|
emits: ["update:modelValue"],
|
|
1386
1386
|
setup(e, { expose: t, emit: o }) {
|
|
1387
|
-
So((
|
|
1388
|
-
aa040ed6:
|
|
1387
|
+
So((Y) => ({
|
|
1388
|
+
aa040ed6: y.value
|
|
1389
1389
|
}));
|
|
1390
|
-
const a = e, { placement: n, offset: r, arrowVisible: l, closeMode: s, modelValue: i, zIndex: u } = Co(a), c = o, v = Ie("reference"), f = Ie("floating"),
|
|
1391
|
-
mainAxis: r.value?.mainAxis ? r.value?.mainAxis + Number(
|
|
1392
|
-
crossAxis: r.value?.crossAxis ? n.value?.includes("start") ? r.value?.crossAxis - Number(
|
|
1390
|
+
const a = e, { placement: n, offset: r, arrowVisible: l, closeMode: s, modelValue: i, zIndex: u } = Co(a), c = o, v = Ie("reference"), f = Ie("floating"), h = Ie("arrow-block"), g = Ie("second-screen"), y = P(() => "23px"), w = P(() => r ? typeof r.value == "number" ? r.value + Number(y.value.split("px")[0]) : {
|
|
1391
|
+
mainAxis: r.value?.mainAxis ? r.value?.mainAxis + Number(y.value.split("px")[0]) / 2 : Number(y.value.split("px")[0]) / 2,
|
|
1392
|
+
crossAxis: r.value?.crossAxis ? n.value?.includes("start") ? r.value?.crossAxis - Number(y.value.split("px")[0]) : n.value?.includes("end") ? r.value?.crossAxis + Number(y.value.split("px")[0]) : r.value?.crossAxis : n.value?.includes("start") ? -Number(y.value.split("px")[0]) : n.value?.includes("end") ? Number(y.value.split("px")[0]) : void 0,
|
|
1393
1393
|
alignmentAxis: r.value?.alignmentAxis
|
|
1394
1394
|
} : {
|
|
1395
|
-
mainAxis: Number(
|
|
1396
|
-
crossAxis: n.value?.includes("start") ? -Number(
|
|
1395
|
+
mainAxis: Number(y.value.split("px")[0]) / 2,
|
|
1396
|
+
crossAxis: n.value?.includes("start") ? -Number(y.value.split("px")[0]) : n.value?.includes("end") ? Number(y.value.split("px")[0]) : void 0
|
|
1397
1397
|
}), V = A([
|
|
1398
1398
|
Et(),
|
|
1399
1399
|
ol({
|
|
1400
|
-
apply({ availableWidth:
|
|
1401
|
-
Object.assign(
|
|
1402
|
-
maxWidth: `${Math.max(200,
|
|
1400
|
+
apply({ availableWidth: Y, elements: X }) {
|
|
1401
|
+
Object.assign(X.floating.style, {
|
|
1402
|
+
maxWidth: `${Math.max(200, Y)}px`
|
|
1403
1403
|
});
|
|
1404
1404
|
}
|
|
1405
1405
|
}),
|
|
1406
1406
|
gt({ padding: 8, crossAxis: !1, mainAxis: !0 }),
|
|
1407
1407
|
pt(w.value),
|
|
1408
|
-
ll({ element:
|
|
1409
|
-
]), { floatingStyles:
|
|
1408
|
+
ll({ element: h })
|
|
1409
|
+
]), { floatingStyles: C, middlewareData: I, update: B, placement: $ } = zt(v, f, {
|
|
1410
1410
|
placement: n.value,
|
|
1411
1411
|
middleware: V
|
|
1412
|
-
}),
|
|
1413
|
-
floatingStyles:
|
|
1412
|
+
}), S = A("left-start"), {
|
|
1413
|
+
floatingStyles: k,
|
|
1414
1414
|
update: D
|
|
1415
1415
|
} = zt(f, g, {
|
|
1416
|
-
placement:
|
|
1416
|
+
placement: S,
|
|
1417
1417
|
middleware: [
|
|
1418
1418
|
Et(),
|
|
1419
1419
|
gt({ padding: 8 }),
|
|
@@ -1421,28 +1421,28 @@ const al = { class: "popover__content" }, sl = {
|
|
|
1421
1421
|
]
|
|
1422
1422
|
}), b = qe(), M = A(!1), x = A(!1), { lockScroll: H, unlockScroll: z } = lt(), E = P(() => i && i.value !== void 0), N = P({
|
|
1423
1423
|
get: () => E.value ? i?.value : M.value,
|
|
1424
|
-
set: (
|
|
1425
|
-
E.value ? c("update:modelValue",
|
|
1424
|
+
set: (Y) => {
|
|
1425
|
+
E.value ? c("update:modelValue", Y) : M.value = Y;
|
|
1426
1426
|
}
|
|
1427
1427
|
}), _ = () => {
|
|
1428
1428
|
N.value = !0;
|
|
1429
1429
|
}, ne = () => {
|
|
1430
|
-
N.value = !1,
|
|
1430
|
+
N.value = !1, j();
|
|
1431
1431
|
}, ce = () => {
|
|
1432
1432
|
N.value = !N.value;
|
|
1433
1433
|
}, ae = () => {
|
|
1434
1434
|
E.value ? _() : ce();
|
|
1435
|
-
}, ie = async (
|
|
1436
|
-
|
|
1437
|
-
},
|
|
1435
|
+
}, ie = async (Y) => {
|
|
1436
|
+
Y && Y.stopPropagation(), f.value && (x.value = !0);
|
|
1437
|
+
}, j = () => {
|
|
1438
1438
|
x.value = !1;
|
|
1439
|
-
}, re = (
|
|
1439
|
+
}, re = (Y) => {
|
|
1440
1440
|
if (s.value === "button-only" || E.value) return;
|
|
1441
|
-
const
|
|
1442
|
-
if (!(g.value &&
|
|
1443
|
-
if (f.value &&
|
|
1441
|
+
const X = Y.composedPath();
|
|
1442
|
+
if (!(g.value && X.includes(g.value))) {
|
|
1443
|
+
if (f.value && X.includes(f.value) || v.value && X.includes(v.value)) {
|
|
1444
1444
|
setTimeout(() => {
|
|
1445
|
-
x.value &&
|
|
1445
|
+
x.value && j();
|
|
1446
1446
|
}, 0);
|
|
1447
1447
|
return;
|
|
1448
1448
|
}
|
|
@@ -1450,25 +1450,25 @@ const al = { class: "popover__content" }, sl = {
|
|
|
1450
1450
|
}
|
|
1451
1451
|
}, ue = P(() => {
|
|
1452
1452
|
if (!I.value.arrow) return {};
|
|
1453
|
-
const { x:
|
|
1454
|
-
switch (
|
|
1453
|
+
const { x: Y, y: X } = I.value.arrow;
|
|
1454
|
+
switch ($.value) {
|
|
1455
1455
|
case "top":
|
|
1456
1456
|
return {
|
|
1457
|
-
left:
|
|
1458
|
-
bottom:
|
|
1457
|
+
left: Y ? `${Y}px` : "-9px",
|
|
1458
|
+
bottom: X ? `${X}px` : "-9px"
|
|
1459
1459
|
};
|
|
1460
1460
|
case "bottom":
|
|
1461
1461
|
default:
|
|
1462
1462
|
return {
|
|
1463
|
-
left:
|
|
1464
|
-
top:
|
|
1463
|
+
left: Y ? `${Y}px` : "-9px",
|
|
1464
|
+
top: X ? `${X}px` : "-9px"
|
|
1465
1465
|
};
|
|
1466
1466
|
}
|
|
1467
1467
|
});
|
|
1468
|
-
return se(I, (
|
|
1469
|
-
E.value || (N.value =
|
|
1470
|
-
}), se(N, (
|
|
1471
|
-
|
|
1468
|
+
return se(I, (Y) => {
|
|
1469
|
+
E.value || (N.value = Y.hide?.referenceHidden === !1);
|
|
1470
|
+
}), se(N, (Y) => {
|
|
1471
|
+
Y || j(), Y && s.value === "button-only" ? H() : !Y && s.value === "button-only" && z();
|
|
1472
1472
|
}, { immediate: !0 }), se(a, () => {
|
|
1473
1473
|
B();
|
|
1474
1474
|
}, { deep: !0 }), ve(() => {
|
|
@@ -1485,44 +1485,44 @@ const al = { class: "popover__content" }, sl = {
|
|
|
1485
1485
|
open: _,
|
|
1486
1486
|
close: ne,
|
|
1487
1487
|
openSecondScreen: ie,
|
|
1488
|
-
closeSecondScreen:
|
|
1488
|
+
closeSecondScreen: j,
|
|
1489
1489
|
isOpen: N,
|
|
1490
1490
|
isSecondScreenOpen: x
|
|
1491
|
-
}), (
|
|
1491
|
+
}), (Y, X) => (d(), p("div", {
|
|
1492
1492
|
class: L(["popover", { "popover--with-arrow": m(l) }])
|
|
1493
1493
|
}, [
|
|
1494
1494
|
R("div", {
|
|
1495
1495
|
class: L(["popover__trigger", `popover__trigger--${m(b)}`]),
|
|
1496
1496
|
ref: "reference",
|
|
1497
1497
|
onClick: ae,
|
|
1498
|
-
style:
|
|
1498
|
+
style: Z({ zIndex: m(u) + 1 })
|
|
1499
1499
|
}, [
|
|
1500
|
-
Y
|
|
1500
|
+
W(Y.$slots, "trigger", {}, void 0, !0)
|
|
1501
1501
|
], 6),
|
|
1502
1502
|
N.value && m(s) === "button-only" ? (d(), p("div", {
|
|
1503
1503
|
key: 0,
|
|
1504
1504
|
class: "popover__overlay",
|
|
1505
|
-
style:
|
|
1505
|
+
style: Z({ zIndex: m(u) })
|
|
1506
1506
|
}, null, 4)) : T("", !0),
|
|
1507
1507
|
q(De, { name: "fade" }, {
|
|
1508
1508
|
default: ee(() => [
|
|
1509
1509
|
N.value ? (d(), p("div", {
|
|
1510
1510
|
key: 0,
|
|
1511
1511
|
class: L(["popover__wrapper", [`popover__wrapper--${m(b)}`, { "popover__wrapper--no-style": e.withoutStyle }]]),
|
|
1512
|
-
style:
|
|
1512
|
+
style: Z({ ...m(C), zIndex: m(u) + 2 }),
|
|
1513
1513
|
ref: "floating"
|
|
1514
1514
|
}, [
|
|
1515
1515
|
R("div", al, [
|
|
1516
1516
|
m(l) ? (d(), p("div", sl, [
|
|
1517
|
-
Y
|
|
1517
|
+
W(Y.$slots, "default", {
|
|
1518
1518
|
openSecondScreen: ie,
|
|
1519
|
-
closeSecondScreen:
|
|
1519
|
+
closeSecondScreen: j,
|
|
1520
1520
|
close: ne
|
|
1521
1521
|
}, void 0, !0)
|
|
1522
|
-
])) : Y
|
|
1522
|
+
])) : W(Y.$slots, "default", {
|
|
1523
1523
|
key: 1,
|
|
1524
1524
|
openSecondScreen: ie,
|
|
1525
|
-
closeSecondScreen:
|
|
1525
|
+
closeSecondScreen: j,
|
|
1526
1526
|
close: ne
|
|
1527
1527
|
}, void 0, !0)
|
|
1528
1528
|
]),
|
|
@@ -1530,7 +1530,7 @@ const al = { class: "popover__content" }, sl = {
|
|
|
1530
1530
|
key: 0,
|
|
1531
1531
|
class: "popover__arrow",
|
|
1532
1532
|
ref: "arrow-block",
|
|
1533
|
-
style:
|
|
1533
|
+
style: Z(ue.value)
|
|
1534
1534
|
}, null, 4)) : T("", !0)
|
|
1535
1535
|
], 6)) : T("", !0)
|
|
1536
1536
|
]),
|
|
@@ -1542,9 +1542,9 @@ const al = { class: "popover__content" }, sl = {
|
|
|
1542
1542
|
key: 0,
|
|
1543
1543
|
class: "popover__second-screen",
|
|
1544
1544
|
ref: "second-screen",
|
|
1545
|
-
style:
|
|
1545
|
+
style: Z(m(k))
|
|
1546
1546
|
}, [
|
|
1547
|
-
Y
|
|
1547
|
+
W(Y.$slots, "second-screen", { closeSecondScreen: j }, void 0, !0)
|
|
1548
1548
|
], 4)) : T("", !0)
|
|
1549
1549
|
]),
|
|
1550
1550
|
_: 3
|
|
@@ -1608,7 +1608,7 @@ const al = { class: "popover__content" }, sl = {
|
|
|
1608
1608
|
(d(!0), p(oe, null, me(l.columns, (i, u) => (d(), p("th", {
|
|
1609
1609
|
class: L(n(i)),
|
|
1610
1610
|
key: u,
|
|
1611
|
-
style:
|
|
1611
|
+
style: Z(r(i))
|
|
1612
1612
|
}, [
|
|
1613
1613
|
R("div", ml, [
|
|
1614
1614
|
i.selectionMode && i.selectionMode === "multiple" ? (d(), G(m(kt), {
|
|
@@ -1713,7 +1713,7 @@ const al = { class: "popover__content" }, sl = {
|
|
|
1713
1713
|
const o = t, a = P(() => e.rowStyle ? e.rowStyle(e.item) : {}), n = (r) => r.field === "_expander" && e.rowGroupMode === "rowspan" ? e.item._isFirstInGroup ? e.collapsedGroups.has(e.item._groupValue) ? 1 : e.item._groupRowSpan || 1 : 0 : e.rowGroupMode === "rowspan" && e.groupRowsBy && r.field === e.groupRowsBy && e.item._isFirstInGroup ? e.collapsedGroups.has(e.item._groupValue) ? 1 : e.item._groupRowSpan || 1 : e.rowGroupMode === "rowspan" && e.groupRowsBy && r.field === e.groupRowsBy && !e.item._isFirstInGroup ? 0 : 1;
|
|
1714
1714
|
return (r, l) => (d(), p("tr", {
|
|
1715
1715
|
class: L(["table-row", { "table-row--hovered-color": r.colorHovered }]),
|
|
1716
|
-
style:
|
|
1716
|
+
style: Z(a.value),
|
|
1717
1717
|
onClick: l[2] || (l[2] = (s) => o("rowClickHandler", { data: r.item, index: r.rowIndex }))
|
|
1718
1718
|
}, [
|
|
1719
1719
|
(d(!0), p(oe, null, me(r.columns, (s) => (d(), G(kl, {
|
|
@@ -1759,13 +1759,13 @@ const al = { class: "popover__content" }, sl = {
|
|
|
1759
1759
|
ve(async () => {
|
|
1760
1760
|
e.virtualScroll && e.virtualScroll.enable && n.value && (await pe(), l.value = n.value.clientHeight);
|
|
1761
1761
|
});
|
|
1762
|
-
const v = (f,
|
|
1762
|
+
const v = (f, h) => f.id ? `row-${f.id}` : `row-${h}`;
|
|
1763
1763
|
return t({
|
|
1764
1764
|
handleScroll: c,
|
|
1765
1765
|
updateContainerHeight: (f) => {
|
|
1766
1766
|
f ? l.value = f.clientHeight : n.value && (l.value = n.value.clientHeight);
|
|
1767
1767
|
}
|
|
1768
|
-
}), (f,
|
|
1768
|
+
}), (f, h) => f.virtualScroll && f.virtualScroll.enable ? (d(), p("tbody", {
|
|
1769
1769
|
key: 0,
|
|
1770
1770
|
ref_key: "virtualScrollBody",
|
|
1771
1771
|
ref: n,
|
|
@@ -1773,15 +1773,15 @@ const al = { class: "popover__content" }, sl = {
|
|
|
1773
1773
|
}, [
|
|
1774
1774
|
s.value > 0 ? (d(), p("tr", {
|
|
1775
1775
|
key: 0,
|
|
1776
|
-
style:
|
|
1776
|
+
style: Z({ height: `${s.value * f.virtualScroll.itemHeight}px` })
|
|
1777
1777
|
}, [
|
|
1778
1778
|
R("td", {
|
|
1779
1779
|
colspan: f.columns.length
|
|
1780
1780
|
}, null, 8, Sl)
|
|
1781
1781
|
], 4)) : T("", !0),
|
|
1782
|
-
(d(!0), p(oe, null, me(u.value, (g,
|
|
1783
|
-
key: v(g, s.value +
|
|
1784
|
-
rowIndex: s.value +
|
|
1782
|
+
(d(!0), p(oe, null, me(u.value, (g, y) => (d(), G(Gt, {
|
|
1783
|
+
key: v(g, s.value + y),
|
|
1784
|
+
rowIndex: s.value + y,
|
|
1785
1785
|
item: g,
|
|
1786
1786
|
columns: f.columns,
|
|
1787
1787
|
selectedRows: f.selectedRows,
|
|
@@ -1791,13 +1791,13 @@ const al = { class: "popover__content" }, sl = {
|
|
|
1791
1791
|
collapsedGroups: f.collapsedGroups,
|
|
1792
1792
|
colorHovered: f.colorHovered,
|
|
1793
1793
|
rowStyle: f.rowStyle,
|
|
1794
|
-
onRowClickHandler:
|
|
1795
|
-
onToggleRow:
|
|
1796
|
-
onToggleGroup:
|
|
1794
|
+
onRowClickHandler: h[0] || (h[0] = (w) => a("rowClickHandler", w)),
|
|
1795
|
+
onToggleRow: h[1] || (h[1] = (w) => a("toggleRow", w)),
|
|
1796
|
+
onToggleGroup: h[2] || (h[2] = (w) => a("toggleGroup", w))
|
|
1797
1797
|
}, null, 8, ["rowIndex", "item", "columns", "selectedRows", "size", "rowGroupMode", "groupRowsBy", "collapsedGroups", "colorHovered", "rowStyle"]))), 128)),
|
|
1798
1798
|
i.value < f.data.length ? (d(), p("tr", {
|
|
1799
1799
|
key: 1,
|
|
1800
|
-
style:
|
|
1800
|
+
style: Z({ height: `${(f.data.length - i.value) * f.virtualScroll.itemHeight}px` })
|
|
1801
1801
|
}, [
|
|
1802
1802
|
R("td", {
|
|
1803
1803
|
colspan: f.columns.length
|
|
@@ -1806,11 +1806,11 @@ const al = { class: "popover__content" }, sl = {
|
|
|
1806
1806
|
], 512)) : (d(), p("tbody", {
|
|
1807
1807
|
key: 1,
|
|
1808
1808
|
class: L(["table-body", { "table-body--scroller": f.scroller && f.scroller.enable }]),
|
|
1809
|
-
style:
|
|
1809
|
+
style: Z({ maxHeight: `${f.scroller && f.scroller.height}px` })
|
|
1810
1810
|
}, [
|
|
1811
|
-
(d(!0), p(oe, null, me(f.data, (g,
|
|
1812
|
-
key: v(g,
|
|
1813
|
-
rowIndex:
|
|
1811
|
+
(d(!0), p(oe, null, me(f.data, (g, y) => (d(), G(Gt, {
|
|
1812
|
+
key: v(g, y),
|
|
1813
|
+
rowIndex: y,
|
|
1814
1814
|
item: g,
|
|
1815
1815
|
columns: f.columns,
|
|
1816
1816
|
selectedRows: f.selectedRows,
|
|
@@ -1820,9 +1820,9 @@ const al = { class: "popover__content" }, sl = {
|
|
|
1820
1820
|
collapsedGroups: f.collapsedGroups,
|
|
1821
1821
|
colorHovered: f.colorHovered,
|
|
1822
1822
|
rowStyle: f.rowStyle,
|
|
1823
|
-
onRowClickHandler:
|
|
1824
|
-
onToggleRow:
|
|
1825
|
-
onToggleGroup:
|
|
1823
|
+
onRowClickHandler: h[3] || (h[3] = (w) => a("rowClickHandler", w)),
|
|
1824
|
+
onToggleRow: h[4] || (h[4] = (w) => a("toggleRow", w)),
|
|
1825
|
+
onToggleGroup: h[5] || (h[5] = (w) => a("toggleGroup", w))
|
|
1826
1826
|
}, null, 8, ["rowIndex", "item", "columns", "selectedRows", "size", "rowGroupMode", "groupRowsBy", "collapsedGroups", "colorHovered", "rowStyle"]))), 128))
|
|
1827
1827
|
], 6));
|
|
1828
1828
|
}
|
|
@@ -1860,7 +1860,7 @@ const al = { class: "popover__content" }, sl = {
|
|
|
1860
1860
|
(d(), G(Ce(n.icon)))
|
|
1861
1861
|
])) : T("", !0),
|
|
1862
1862
|
R("div", Vl, [
|
|
1863
|
-
|
|
1863
|
+
W(n.$slots, "default")
|
|
1864
1864
|
])
|
|
1865
1865
|
]),
|
|
1866
1866
|
n.removable ? (d(), p("button", {
|
|
@@ -1955,7 +1955,7 @@ const al = { class: "popover__content" }, sl = {
|
|
|
1955
1955
|
class: "input__eye",
|
|
1956
1956
|
onClick: c[6] || (c[6] = Je((v) => r.value = !r.value, ["prevent"]))
|
|
1957
1957
|
}, [
|
|
1958
|
-
r.value ? (d(), G(m(
|
|
1958
|
+
r.value ? (d(), G(m(Wo), { key: 0 })) : (d(), G(m(Do), { key: 1 }))
|
|
1959
1959
|
])) : T("", !0)
|
|
1960
1960
|
])
|
|
1961
1961
|
]),
|
|
@@ -1982,7 +1982,7 @@ const al = { class: "popover__content" }, sl = {
|
|
|
1982
1982
|
}, [
|
|
1983
1983
|
(d(), G(Ce(o.icon), { class: "icon-field__icon" })),
|
|
1984
1984
|
R("div", Ol, [
|
|
1985
|
-
|
|
1985
|
+
W(o.$slots, "default")
|
|
1986
1986
|
])
|
|
1987
1987
|
], 2));
|
|
1988
1988
|
}
|
|
@@ -2004,7 +2004,7 @@ const al = { class: "popover__content" }, sl = {
|
|
|
2004
2004
|
return (n, r) => (d(), p("div", {
|
|
2005
2005
|
class: L(a.value),
|
|
2006
2006
|
"aria-label": "Loading",
|
|
2007
|
-
style:
|
|
2007
|
+
style: Z(o.value)
|
|
2008
2008
|
}, [...r[0] || (r[0] = [
|
|
2009
2009
|
R("span", { class: "spinner__circle" }, null, -1)
|
|
2010
2010
|
])], 6));
|
|
@@ -2048,7 +2048,7 @@ const al = { class: "popover__content" }, sl = {
|
|
|
2048
2048
|
}, [
|
|
2049
2049
|
l.label ? (d(), p(oe, { key: 0 }, [
|
|
2050
2050
|
fe(F(l.label), 1)
|
|
2051
|
-
], 64)) :
|
|
2051
|
+
], 64)) : W(l.$slots, "default", { key: 1 })
|
|
2052
2052
|
], 8, Hl)
|
|
2053
2053
|
], 2));
|
|
2054
2054
|
}
|
|
@@ -2077,7 +2077,7 @@ const al = { class: "popover__content" }, sl = {
|
|
|
2077
2077
|
onClick: r[1] || (r[1] = (l) => a("close"))
|
|
2078
2078
|
}, {
|
|
2079
2079
|
label: ee(() => [
|
|
2080
|
-
n.$slots.option ?
|
|
2080
|
+
n.$slots.option ? W(n.$slots, "option", {
|
|
2081
2081
|
key: 0,
|
|
2082
2082
|
option: n.item
|
|
2083
2083
|
}) : (d(), p(oe, { key: 1 }, [
|
|
@@ -2093,7 +2093,7 @@ const al = { class: "popover__content" }, sl = {
|
|
|
2093
2093
|
onClick: r[3] || (r[3] = (l) => a("close"))
|
|
2094
2094
|
}, {
|
|
2095
2095
|
default: ee(() => [
|
|
2096
|
-
n.$slots.option ?
|
|
2096
|
+
n.$slots.option ? W(n.$slots, "option", {
|
|
2097
2097
|
key: 0,
|
|
2098
2098
|
option: n.item
|
|
2099
2099
|
}) : (d(), p(oe, { key: 1 }, [
|
|
@@ -2110,13 +2110,13 @@ const al = { class: "popover__content" }, sl = {
|
|
|
2110
2110
|
}, ql = {
|
|
2111
2111
|
key: 1,
|
|
2112
2112
|
class: "dropdown__field-inner__text"
|
|
2113
|
-
},
|
|
2113
|
+
}, Yl = {
|
|
2114
2114
|
key: 1,
|
|
2115
2115
|
class: "dropdown__field-inner__text"
|
|
2116
|
-
},
|
|
2116
|
+
}, jl = {
|
|
2117
2117
|
class: "dropdown__popover",
|
|
2118
2118
|
ref: "popover"
|
|
2119
|
-
},
|
|
2119
|
+
}, Wl = { class: "dropdown__popover-wrapper" }, Ul = {
|
|
2120
2120
|
key: 0,
|
|
2121
2121
|
class: "dropdown__popover-search"
|
|
2122
2122
|
}, Kl = {
|
|
@@ -2148,13 +2148,13 @@ const al = { class: "popover__content" }, sl = {
|
|
|
2148
2148
|
},
|
|
2149
2149
|
set(w) {
|
|
2150
2150
|
if (Array.isArray(w)) {
|
|
2151
|
-
const V = w.map((
|
|
2152
|
-
const I = e.options.find((B) => B[a.value] ===
|
|
2153
|
-
return I ||
|
|
2151
|
+
const V = w.map((C) => {
|
|
2152
|
+
const I = e.options.find((B) => B[a.value] === C);
|
|
2153
|
+
return I || C;
|
|
2154
2154
|
});
|
|
2155
2155
|
r.value = e.returnObject ? V : w, o("select", e.returnObject ? V : w);
|
|
2156
2156
|
} else {
|
|
2157
|
-
const V = e.options.find((
|
|
2157
|
+
const V = e.options.find((C) => C[a.value] === w);
|
|
2158
2158
|
r.value = e.returnObject ? V : w, o("select", e.returnObject ? V : w);
|
|
2159
2159
|
}
|
|
2160
2160
|
}
|
|
@@ -2168,16 +2168,16 @@ const al = { class: "popover__content" }, sl = {
|
|
|
2168
2168
|
const w = e.options.find((V) => V[a.value] === l.value);
|
|
2169
2169
|
return w ? w[n.value] : "";
|
|
2170
2170
|
}), f = (w) => {
|
|
2171
|
-
const V = e.options.find((
|
|
2171
|
+
const V = e.options.find((C) => C[a.value] === w);
|
|
2172
2172
|
return V ? V[n.value] : w;
|
|
2173
|
-
},
|
|
2173
|
+
}, h = (w) => {
|
|
2174
2174
|
if (!Array.isArray(r.value)) return;
|
|
2175
|
-
const V = l.value.findIndex((
|
|
2175
|
+
const V = l.value.findIndex((C) => C === w);
|
|
2176
2176
|
V > -1 && l.value.splice(V, 1);
|
|
2177
|
-
}, g = Ie("trigger"),
|
|
2177
|
+
}, g = Ie("trigger"), y = Ie("popover");
|
|
2178
2178
|
return ve(() => {
|
|
2179
2179
|
Jt(
|
|
2180
|
-
|
|
2180
|
+
y.value,
|
|
2181
2181
|
() => {
|
|
2182
2182
|
u.value = !1;
|
|
2183
2183
|
},
|
|
@@ -2191,26 +2191,26 @@ const al = { class: "popover__content" }, sl = {
|
|
|
2191
2191
|
R("div", {
|
|
2192
2192
|
class: "dropdown__field",
|
|
2193
2193
|
ref: "trigger",
|
|
2194
|
-
onClick: V[0] || (V[0] = (
|
|
2194
|
+
onClick: V[0] || (V[0] = (C) => u.value = !u.value)
|
|
2195
2195
|
}, [
|
|
2196
2196
|
R("div", {
|
|
2197
2197
|
class: L(["dropdown__field-inner", [{ "dropdown__field-inner--multiple": w.multiple }, { "dropdown__field-inner--placeholder": !r.value }, { "dropdown__field-inner--open": u.value }]])
|
|
2198
2198
|
}, [
|
|
2199
2199
|
w.multiple ? (d(), p(oe, { key: 0 }, [
|
|
2200
2200
|
r.value.length ? (d(), p("div", Nl, [
|
|
2201
|
-
(d(!0), p(oe, null, me(l.value, (
|
|
2201
|
+
(d(!0), p(oe, null, me(l.value, (C) => (d(), G(m(Pl), {
|
|
2202
2202
|
variant: "secondary",
|
|
2203
|
-
key:
|
|
2203
|
+
key: C,
|
|
2204
2204
|
removable: "",
|
|
2205
|
-
onRemove: (I) =>
|
|
2205
|
+
onRemove: (I) => h(C)
|
|
2206
2206
|
}, {
|
|
2207
2207
|
default: ee(() => [
|
|
2208
|
-
fe(F(f(
|
|
2208
|
+
fe(F(f(C)), 1)
|
|
2209
2209
|
]),
|
|
2210
2210
|
_: 2
|
|
2211
2211
|
}, 1032, ["onRemove"]))), 128))
|
|
2212
2212
|
])) : (d(), p("span", ql, F(s.value ? w.placeholder : v.value), 1))
|
|
2213
|
-
], 64)) : (d(), p("span",
|
|
2213
|
+
], 64)) : (d(), p("span", Yl, F(s.value ? w.placeholder : v.value), 1))
|
|
2214
2214
|
], 2),
|
|
2215
2215
|
V[5] || (V[5] = R("div", { class: "dropdown__field-arrow" }, [
|
|
2216
2216
|
R("svg", {
|
|
@@ -2226,8 +2226,8 @@ const al = { class: "popover__content" }, sl = {
|
|
|
2226
2226
|
])
|
|
2227
2227
|
], -1))
|
|
2228
2228
|
], 512),
|
|
2229
|
-
R("div",
|
|
2230
|
-
R("div",
|
|
2229
|
+
R("div", jl, [
|
|
2230
|
+
R("div", Wl, [
|
|
2231
2231
|
w.searchable ? (d(), p("div", Ul, [
|
|
2232
2232
|
q(m(El), {
|
|
2233
2233
|
icon: m(Lo),
|
|
@@ -2236,8 +2236,8 @@ const al = { class: "popover__content" }, sl = {
|
|
|
2236
2236
|
default: ee(() => [
|
|
2237
2237
|
q(m(ut), {
|
|
2238
2238
|
modelValue: i.value,
|
|
2239
|
-
"onUpdate:modelValue": V[1] || (V[1] = (
|
|
2240
|
-
onInput: V[2] || (V[2] = (
|
|
2239
|
+
"onUpdate:modelValue": V[1] || (V[1] = (C) => i.value = C),
|
|
2240
|
+
onInput: V[2] || (V[2] = (C) => o("search", i.value)),
|
|
2241
2241
|
disabled: w.loading
|
|
2242
2242
|
}, null, 8, ["modelValue", "disabled"])
|
|
2243
2243
|
]),
|
|
@@ -2247,11 +2247,11 @@ const al = { class: "popover__content" }, sl = {
|
|
|
2247
2247
|
w.loading ? (d(), p("div", Kl, [
|
|
2248
2248
|
q(m(_l))
|
|
2249
2249
|
])) : (d(), p("div", Xl, [
|
|
2250
|
-
(d(!0), p(oe, null, me(w.options, (
|
|
2250
|
+
(d(!0), p(oe, null, me(w.options, (C, I) => (d(), G(Fl, {
|
|
2251
2251
|
key: I,
|
|
2252
2252
|
modelValue: l.value,
|
|
2253
2253
|
"onUpdate:modelValue": V[3] || (V[3] = (B) => l.value = B),
|
|
2254
|
-
item:
|
|
2254
|
+
item: C,
|
|
2255
2255
|
multiple: w.multiple,
|
|
2256
2256
|
optionLabel: n.value,
|
|
2257
2257
|
optionValue: a.value,
|
|
@@ -2363,24 +2363,28 @@ const al = { class: "popover__content" }, sl = {
|
|
|
2363
2363
|
])) : T("", !0);
|
|
2364
2364
|
}
|
|
2365
2365
|
}), Nt = /* @__PURE__ */ le(ia, [["__scopeId", "data-v-a62c3245"]]), ua = (e) => {
|
|
2366
|
-
const t = A([]), o = A({
|
|
2366
|
+
const t = A([]), o = A([]), a = A({
|
|
2367
2367
|
selectedMode: null
|
|
2368
|
-
}),
|
|
2369
|
-
t.value.indexOf(
|
|
2370
|
-
},
|
|
2371
|
-
|
|
2372
|
-
|
|
2368
|
+
}), n = (s) => {
|
|
2369
|
+
t.value.indexOf(s) > -1 || (s.selectionMode && (a.value.selectedMode = s.selectionMode), t.value.push(s), r());
|
|
2370
|
+
}, r = () => {
|
|
2371
|
+
o.value = t.value.filter((s) => s.visible !== !1);
|
|
2372
|
+
}, l = (s) => {
|
|
2373
|
+
const i = t.value.indexOf(s);
|
|
2374
|
+
i > -1 && (t.value.splice(i, 1), r());
|
|
2373
2375
|
};
|
|
2374
|
-
return be("registerColumn",
|
|
2375
|
-
e.value &&
|
|
2376
|
+
return be("registerColumn", n), be("unregisterColumn", l), ve(() => {
|
|
2377
|
+
e.value && o.value.unshift({
|
|
2376
2378
|
field: "_expander",
|
|
2377
2379
|
header: "",
|
|
2378
2380
|
style: { width: "30px" },
|
|
2379
2381
|
align: "center"
|
|
2380
2382
|
});
|
|
2381
2383
|
}), {
|
|
2382
|
-
columns:
|
|
2383
|
-
|
|
2384
|
+
columns: o,
|
|
2385
|
+
allColumns: t,
|
|
2386
|
+
options: a,
|
|
2387
|
+
updateVisibleColumns: r
|
|
2384
2388
|
};
|
|
2385
2389
|
}, ca = (e, t) => {
|
|
2386
2390
|
const o = A([]), a = P(() => Array.isArray(o.value) && o.value.length === t.length);
|
|
@@ -2448,7 +2452,7 @@ const al = { class: "popover__content" }, sl = {
|
|
|
2448
2452
|
}),
|
|
2449
2453
|
emits: /* @__PURE__ */ U(["update:selectedRows", "rowClickHandler"], ["update:currentPage", "update:perPage"]),
|
|
2450
2454
|
setup(e, { emit: t }) {
|
|
2451
|
-
const o = t, a = P(() => e.rowGroupMode), n = P(() => e.groupRowsBy), { dataWithGroup: r } = da(a, n), { columns: l, options: s } = ua(a), i = P(() => s.value.selectedMode), { selectedRows: u, isSelectedAll: c, toggleSelectRow: v, toggleSelectedAll: f } = ca(i, e.data),
|
|
2455
|
+
const o = t, a = P(() => e.rowGroupMode), n = P(() => e.groupRowsBy), { dataWithGroup: r } = da(a, n), { columns: l, options: s } = ua(a), i = P(() => s.value.selectedMode), { selectedRows: u, isSelectedAll: c, toggleSelectRow: v, toggleSelectedAll: f } = ca(i, e.data), h = A(null), g = A(), y = te(e, "currentPage"), w = te(e, "perPage"), V = (b) => {
|
|
2452
2456
|
if (e.virtualScroll && e.virtualScroll.enable && g.value) {
|
|
2453
2457
|
const M = b.target;
|
|
2454
2458
|
g.value.handleScroll(M);
|
|
@@ -2461,17 +2465,17 @@ const al = { class: "popover__content" }, sl = {
|
|
|
2461
2465
|
b && g.value.updateContainerHeight(b);
|
|
2462
2466
|
}
|
|
2463
2467
|
});
|
|
2464
|
-
const
|
|
2468
|
+
const C = P(() => {
|
|
2465
2469
|
let b = [...e.data];
|
|
2466
|
-
if (
|
|
2467
|
-
const { field: x, order: H } =
|
|
2470
|
+
if (h.value) {
|
|
2471
|
+
const { field: x, order: H } = h.value;
|
|
2468
2472
|
b.sort((z, E) => {
|
|
2469
2473
|
const N = z[x], _ = E[x];
|
|
2470
2474
|
return N === _ ? 0 : H === 1 ? N > _ ? 1 : -1 : N < _ ? 1 : -1;
|
|
2471
2475
|
});
|
|
2472
2476
|
}
|
|
2473
2477
|
const M = r(b);
|
|
2474
|
-
return e.rowGroupMode === "rowspan" && e.groupRowsBy ? M.filter((x) =>
|
|
2478
|
+
return e.rowGroupMode === "rowspan" && e.groupRowsBy ? M.filter((x) => k.value.has(x._groupValue) ? x._isFirstInGroup : !0) : M;
|
|
2475
2479
|
}), I = P(() => e.scroller && e.scroller.enable || e.virtualScroll && e.virtualScroll.enable || e.maxHeight), B = P(() => [
|
|
2476
2480
|
"table",
|
|
2477
2481
|
{
|
|
@@ -2480,29 +2484,29 @@ const al = { class: "popover__content" }, sl = {
|
|
|
2480
2484
|
"table--with-virtual-scroll": e.virtualScroll && e.virtualScroll.enable,
|
|
2481
2485
|
"table--scrollable": I.value
|
|
2482
2486
|
}
|
|
2483
|
-
]),
|
|
2487
|
+
]), $ = P(() => [
|
|
2484
2488
|
"table-wrapper",
|
|
2485
2489
|
{
|
|
2486
2490
|
"table-wrapper--scrollable": I.value
|
|
2487
2491
|
}
|
|
2488
|
-
]),
|
|
2492
|
+
]), S = P(() => {
|
|
2489
2493
|
const b = {};
|
|
2490
2494
|
return e.maxHeight ? (b.maxHeight = typeof e.maxHeight == "number" ? `${e.maxHeight}px` : e.maxHeight, b.overflow = "auto") : e.scroller && e.scroller.enable && (b.maxHeight = `${e.scroller.height}px`, b.overflow = "auto"), b;
|
|
2491
|
-
}),
|
|
2492
|
-
|
|
2495
|
+
}), k = A(/* @__PURE__ */ new Set()), D = (b) => {
|
|
2496
|
+
k.value.has(b) ? k.value.delete(b) : k.value.add(b);
|
|
2493
2497
|
};
|
|
2494
2498
|
return se(u, (b) => {
|
|
2495
2499
|
o("update:selectedRows", b);
|
|
2496
2500
|
}), (b, M) => I.value ? (d(), p("div", {
|
|
2497
2501
|
key: 0,
|
|
2498
|
-
class: L(
|
|
2499
|
-
style:
|
|
2502
|
+
class: L($.value),
|
|
2503
|
+
style: Z(S.value),
|
|
2500
2504
|
onScroll: V
|
|
2501
2505
|
}, [
|
|
2502
2506
|
R("table", {
|
|
2503
2507
|
class: L(B.value)
|
|
2504
2508
|
}, [
|
|
2505
|
-
|
|
2509
|
+
W(b.$slots, "default", {}, void 0, !0),
|
|
2506
2510
|
q(Ht, {
|
|
2507
2511
|
size: b.size,
|
|
2508
2512
|
columns: m(l),
|
|
@@ -2510,7 +2514,7 @@ const al = { class: "popover__content" }, sl = {
|
|
|
2510
2514
|
sortMode: b.sortMode,
|
|
2511
2515
|
sortField: b.sortField,
|
|
2512
2516
|
onSelectAllRow: m(f),
|
|
2513
|
-
"onUpdate:sort": M[0] || (M[0] = (x) =>
|
|
2517
|
+
"onUpdate:sort": M[0] || (M[0] = (x) => h.value = x)
|
|
2514
2518
|
}, null, 8, ["size", "columns", "isSelectedAll", "sortMode", "sortField", "onSelectAllRow"]),
|
|
2515
2519
|
q(Ft, {
|
|
2516
2520
|
ref_key: "tableBodyRef",
|
|
@@ -2518,10 +2522,10 @@ const al = { class: "popover__content" }, sl = {
|
|
|
2518
2522
|
size: b.size,
|
|
2519
2523
|
selectedRows: m(u),
|
|
2520
2524
|
columns: m(l),
|
|
2521
|
-
data:
|
|
2525
|
+
data: C.value,
|
|
2522
2526
|
rowGroupMode: b.rowGroupMode,
|
|
2523
2527
|
groupRowsBy: b.groupRowsBy,
|
|
2524
|
-
collapsedGroups:
|
|
2528
|
+
collapsedGroups: k.value,
|
|
2525
2529
|
colorHovered: b.rowColorHovered,
|
|
2526
2530
|
scroller: b.scroller || void 0,
|
|
2527
2531
|
virtualScroll: b.virtualScroll || void 0,
|
|
@@ -2532,11 +2536,11 @@ const al = { class: "popover__content" }, sl = {
|
|
|
2532
2536
|
}, null, 8, ["size", "selectedRows", "columns", "data", "rowGroupMode", "groupRowsBy", "collapsedGroups", "colorHovered", "scroller", "virtualScroll", "rowStyle"])
|
|
2533
2537
|
], 2),
|
|
2534
2538
|
q(Nt, {
|
|
2535
|
-
currentPage:
|
|
2536
|
-
"onUpdate:currentPage": M[4] || (M[4] = (x) =>
|
|
2539
|
+
currentPage: y.value,
|
|
2540
|
+
"onUpdate:currentPage": M[4] || (M[4] = (x) => y.value = x),
|
|
2537
2541
|
"per-page": w.value,
|
|
2538
2542
|
"onUpdate:perPage": M[5] || (M[5] = (x) => w.value = x),
|
|
2539
|
-
data:
|
|
2543
|
+
data: C.value,
|
|
2540
2544
|
"per-page-options": b.perPageOptions,
|
|
2541
2545
|
"totals-row": b.totals,
|
|
2542
2546
|
paginator: b.paginator
|
|
@@ -2545,7 +2549,7 @@ const al = { class: "popover__content" }, sl = {
|
|
|
2545
2549
|
key: 1,
|
|
2546
2550
|
class: L(B.value)
|
|
2547
2551
|
}, [
|
|
2548
|
-
|
|
2552
|
+
W(b.$slots, "default", {}, void 0, !0),
|
|
2549
2553
|
q(Ht, {
|
|
2550
2554
|
size: b.size,
|
|
2551
2555
|
columns: m(l),
|
|
@@ -2553,7 +2557,7 @@ const al = { class: "popover__content" }, sl = {
|
|
|
2553
2557
|
sortMode: b.sortMode,
|
|
2554
2558
|
sortField: b.sortField,
|
|
2555
2559
|
onSelectAllRow: m(f),
|
|
2556
|
-
"onUpdate:sort": M[6] || (M[6] = (x) =>
|
|
2560
|
+
"onUpdate:sort": M[6] || (M[6] = (x) => h.value = x)
|
|
2557
2561
|
}, null, 8, ["size", "columns", "isSelectedAll", "sortMode", "sortField", "onSelectAllRow"]),
|
|
2558
2562
|
q(Ft, {
|
|
2559
2563
|
ref_key: "tableBodyRef",
|
|
@@ -2561,10 +2565,10 @@ const al = { class: "popover__content" }, sl = {
|
|
|
2561
2565
|
size: b.size,
|
|
2562
2566
|
selectedRows: m(u),
|
|
2563
2567
|
columns: m(l),
|
|
2564
|
-
data:
|
|
2568
|
+
data: C.value,
|
|
2565
2569
|
rowGroupMode: b.rowGroupMode,
|
|
2566
2570
|
groupRowsBy: b.groupRowsBy,
|
|
2567
|
-
collapsedGroups:
|
|
2571
|
+
collapsedGroups: k.value,
|
|
2568
2572
|
colorHovered: b.rowColorHovered,
|
|
2569
2573
|
scroller: b.scroller || void 0,
|
|
2570
2574
|
virtualScroll: b.virtualScroll || void 0,
|
|
@@ -2574,11 +2578,11 @@ const al = { class: "popover__content" }, sl = {
|
|
|
2574
2578
|
onToggleGroup: M[9] || (M[9] = (x) => D(x))
|
|
2575
2579
|
}, null, 8, ["size", "selectedRows", "columns", "data", "rowGroupMode", "groupRowsBy", "collapsedGroups", "colorHovered", "scroller", "virtualScroll", "rowStyle"]),
|
|
2576
2580
|
q(Nt, {
|
|
2577
|
-
currentPage:
|
|
2578
|
-
"onUpdate:currentPage": M[10] || (M[10] = (x) =>
|
|
2581
|
+
currentPage: y.value,
|
|
2582
|
+
"onUpdate:currentPage": M[10] || (M[10] = (x) => y.value = x),
|
|
2579
2583
|
"per-page": w.value,
|
|
2580
2584
|
"onUpdate:perPage": M[11] || (M[11] = (x) => w.value = x),
|
|
2581
|
-
data:
|
|
2585
|
+
data: C.value,
|
|
2582
2586
|
"per-page-options": b.perPageOptions,
|
|
2583
2587
|
"totals-row": b.totals,
|
|
2584
2588
|
paginator: b.paginator
|
|
@@ -2595,10 +2599,11 @@ const al = { class: "popover__content" }, sl = {
|
|
|
2595
2599
|
alignVertical: {},
|
|
2596
2600
|
style: {},
|
|
2597
2601
|
headerStyle: {},
|
|
2598
|
-
selectionMode: {}
|
|
2602
|
+
selectionMode: {},
|
|
2603
|
+
visible: { type: Boolean }
|
|
2599
2604
|
},
|
|
2600
2605
|
setup(e) {
|
|
2601
|
-
const t = e, o =
|
|
2606
|
+
const t = e, o = jt(), a = de("registerColumn"), n = {
|
|
2602
2607
|
header: t.header,
|
|
2603
2608
|
field: t.field,
|
|
2604
2609
|
description: t.description,
|
|
@@ -2606,6 +2611,7 @@ const al = { class: "popover__content" }, sl = {
|
|
|
2606
2611
|
alignVertical: t.alignVertical,
|
|
2607
2612
|
selectionMode: t.selectionMode,
|
|
2608
2613
|
style: t.style,
|
|
2614
|
+
visible: t.visible ?? !0,
|
|
2609
2615
|
headerSlot: o.header ? o.header : null,
|
|
2610
2616
|
bodySlot: o.body ? o.body : null,
|
|
2611
2617
|
footerSlot: o.footer ? o.footer : null
|
|
@@ -2665,27 +2671,27 @@ function ga(e, t) {
|
|
|
2665
2671
|
...r
|
|
2666
2672
|
// кастомные определения
|
|
2667
2673
|
};
|
|
2668
|
-
function u(
|
|
2669
|
-
const
|
|
2670
|
-
return
|
|
2671
|
-
required:
|
|
2672
|
-
optional:
|
|
2674
|
+
function u(S) {
|
|
2675
|
+
const k = S.indexOf("?");
|
|
2676
|
+
return k === -1 ? { required: S, optional: "" } : {
|
|
2677
|
+
required: S.substring(0, k),
|
|
2678
|
+
optional: S.substring(k + 1)
|
|
2673
2679
|
};
|
|
2674
2680
|
}
|
|
2675
|
-
function c(
|
|
2676
|
-
return
|
|
2681
|
+
function c(S) {
|
|
2682
|
+
return S in i;
|
|
2677
2683
|
}
|
|
2678
|
-
function v(
|
|
2679
|
-
return c(
|
|
2684
|
+
function v(S, k) {
|
|
2685
|
+
return c(k) ? i[k].test(S) : !1;
|
|
2680
2686
|
}
|
|
2681
|
-
function f(
|
|
2682
|
-
const { required:
|
|
2687
|
+
function f(S) {
|
|
2688
|
+
const { required: k, optional: D } = u(o), b = k + D;
|
|
2683
2689
|
let M = "", x = 0, H = 0;
|
|
2684
2690
|
for (; H < b.length; ) {
|
|
2685
2691
|
const z = b[H];
|
|
2686
2692
|
if (c(z))
|
|
2687
|
-
if (x <
|
|
2688
|
-
const E =
|
|
2693
|
+
if (x < S.length) {
|
|
2694
|
+
const E = S[x];
|
|
2689
2695
|
if (v(E, z))
|
|
2690
2696
|
M += E, x++;
|
|
2691
2697
|
else {
|
|
@@ -2700,23 +2706,23 @@ function ga(e, t) {
|
|
|
2700
2706
|
}
|
|
2701
2707
|
return M;
|
|
2702
2708
|
}
|
|
2703
|
-
function
|
|
2704
|
-
const { required:
|
|
2705
|
-
return (
|
|
2709
|
+
function h() {
|
|
2710
|
+
const { required: S, optional: k } = u(o);
|
|
2711
|
+
return (S + k).replace(/[9a*]/g, a);
|
|
2706
2712
|
}
|
|
2707
|
-
function g(
|
|
2708
|
-
const { required:
|
|
2713
|
+
function g(S) {
|
|
2714
|
+
const { required: k, optional: D } = u(o), b = k + D;
|
|
2709
2715
|
let M = "", x = 0, H = 0;
|
|
2710
|
-
for (; x <
|
|
2711
|
-
const z =
|
|
2716
|
+
for (; x < S.length && H < b.length; ) {
|
|
2717
|
+
const z = S[x], E = b[H];
|
|
2712
2718
|
if (z === a) {
|
|
2713
2719
|
x++;
|
|
2714
2720
|
continue;
|
|
2715
2721
|
}
|
|
2716
2722
|
c(E) ? v(z, E) ? (M += z, x++, H++) : x++ : (z === E && x++, H++);
|
|
2717
2723
|
}
|
|
2718
|
-
for (; x <
|
|
2719
|
-
const z =
|
|
2724
|
+
for (; x < S.length; ) {
|
|
2725
|
+
const z = S[x];
|
|
2720
2726
|
if (z === a) {
|
|
2721
2727
|
x++;
|
|
2722
2728
|
continue;
|
|
@@ -2735,25 +2741,25 @@ function ga(e, t) {
|
|
|
2735
2741
|
}
|
|
2736
2742
|
return M;
|
|
2737
2743
|
}
|
|
2738
|
-
function
|
|
2739
|
-
const { required:
|
|
2740
|
-
return g(
|
|
2744
|
+
function y(S) {
|
|
2745
|
+
const { required: k } = u(o), D = k.replace(/[^9a*]/g, "").length;
|
|
2746
|
+
return g(S).length >= D;
|
|
2741
2747
|
}
|
|
2742
2748
|
function w() {
|
|
2743
|
-
const
|
|
2744
|
-
if (s.value ||
|
|
2745
|
-
l.value = f(
|
|
2749
|
+
const S = ze(e) || "";
|
|
2750
|
+
if (s.value || S)
|
|
2751
|
+
l.value = f(S);
|
|
2746
2752
|
else {
|
|
2747
|
-
const { required:
|
|
2753
|
+
const { required: k, optional: D } = u(o), b = k + D;
|
|
2748
2754
|
let M = "";
|
|
2749
2755
|
for (let x = 0; x < b.length && !c(b[x]); x++)
|
|
2750
2756
|
M += b[x];
|
|
2751
2757
|
l.value = M;
|
|
2752
2758
|
}
|
|
2753
2759
|
}
|
|
2754
|
-
function V(
|
|
2755
|
-
if (!
|
|
2756
|
-
const
|
|
2760
|
+
function V(S) {
|
|
2761
|
+
if (!S.isTrusted) return;
|
|
2762
|
+
const k = S.target, D = k.value, b = g(D), M = f(b);
|
|
2757
2763
|
l.value = M, e.value = b, pe(() => {
|
|
2758
2764
|
const { required: x, optional: H } = u(o), z = x + H;
|
|
2759
2765
|
let E = 0, N = 0;
|
|
@@ -2773,13 +2779,13 @@ function ga(e, t) {
|
|
|
2773
2779
|
break;
|
|
2774
2780
|
}
|
|
2775
2781
|
}
|
|
2776
|
-
E = Math.min(E, M.length),
|
|
2782
|
+
E = Math.min(E, M.length), k.setSelectionRange(E, E);
|
|
2777
2783
|
});
|
|
2778
2784
|
}
|
|
2779
|
-
function S
|
|
2780
|
-
const
|
|
2785
|
+
function C(S) {
|
|
2786
|
+
const k = S.target;
|
|
2781
2787
|
setTimeout(() => {
|
|
2782
|
-
const D =
|
|
2788
|
+
const D = k.value, b = g(D), M = f(b);
|
|
2783
2789
|
l.value = M, e.value = b;
|
|
2784
2790
|
const { required: x, optional: H } = u(o), z = x + H;
|
|
2785
2791
|
let E = 0, N = 0;
|
|
@@ -2799,105 +2805,105 @@ function ga(e, t) {
|
|
|
2799
2805
|
break;
|
|
2800
2806
|
}
|
|
2801
2807
|
}
|
|
2802
|
-
E = Math.min(E, M.length),
|
|
2808
|
+
E = Math.min(E, M.length), k.setSelectionRange(E, E);
|
|
2803
2809
|
}, 0);
|
|
2804
2810
|
}
|
|
2805
|
-
function I(
|
|
2806
|
-
const
|
|
2807
|
-
if (
|
|
2808
|
-
if (
|
|
2811
|
+
function I(S) {
|
|
2812
|
+
const k = S.target, D = k.selectionStart || 0;
|
|
2813
|
+
if (S.key === "Backspace") {
|
|
2814
|
+
if (S.metaKey || S.ctrlKey)
|
|
2809
2815
|
return;
|
|
2810
|
-
|
|
2811
|
-
const _ =
|
|
2816
|
+
S.preventDefault();
|
|
2817
|
+
const _ = k.selectionStart || 0, ne = k.selectionEnd || 0;
|
|
2812
2818
|
if (_ !== ne) {
|
|
2813
2819
|
l.value = f(""), e.value = "", pe(() => {
|
|
2814
|
-
const { required: ae, optional: ie } = u(o),
|
|
2820
|
+
const { required: ae, optional: ie } = u(o), j = ae + ie;
|
|
2815
2821
|
let re = 0;
|
|
2816
|
-
for (let ue = 0; ue <
|
|
2817
|
-
if (c(
|
|
2822
|
+
for (let ue = 0; ue < j.length; ue++)
|
|
2823
|
+
if (c(j[ue])) {
|
|
2818
2824
|
re = ue;
|
|
2819
2825
|
break;
|
|
2820
2826
|
}
|
|
2821
|
-
|
|
2827
|
+
k.setSelectionRange(re, re);
|
|
2822
2828
|
});
|
|
2823
2829
|
return;
|
|
2824
2830
|
}
|
|
2825
2831
|
if (D > 0 && l.value.length > 0) {
|
|
2826
2832
|
const ae = l.value;
|
|
2827
|
-
let ie = "",
|
|
2828
|
-
const { required: re, optional: ue } = u(o),
|
|
2829
|
-
for (let
|
|
2830
|
-
if (
|
|
2831
|
-
|
|
2833
|
+
let ie = "", j = -1;
|
|
2834
|
+
const { required: re, optional: ue } = u(o), Y = re + ue;
|
|
2835
|
+
for (let X = D - 1; X >= 0; X--)
|
|
2836
|
+
if (X < Y.length && c(Y[X])) {
|
|
2837
|
+
j = X;
|
|
2832
2838
|
break;
|
|
2833
2839
|
}
|
|
2834
|
-
if (
|
|
2835
|
-
let
|
|
2836
|
-
for (let Pe = 0; Pe <=
|
|
2840
|
+
if (j >= 0) {
|
|
2841
|
+
let X = g(ae), We = 0;
|
|
2842
|
+
for (let Pe = 0; Pe <= j; Pe++) {
|
|
2837
2843
|
const { required: bo, optional: wo } = u(o), Mt = bo + wo;
|
|
2838
2844
|
if (Pe < Mt.length && c(Mt[Pe])) {
|
|
2839
|
-
if (Pe ===
|
|
2840
|
-
|
|
2845
|
+
if (Pe === j) break;
|
|
2846
|
+
We++;
|
|
2841
2847
|
}
|
|
2842
2848
|
}
|
|
2843
|
-
|
|
2844
|
-
|
|
2849
|
+
X = X.slice(0, We) + X.slice(We + 1), ie = f(X), l.value = ie, e.value = X, pe(() => {
|
|
2850
|
+
k.setSelectionRange(j, j);
|
|
2845
2851
|
});
|
|
2846
2852
|
}
|
|
2847
2853
|
}
|
|
2848
2854
|
return;
|
|
2849
2855
|
}
|
|
2850
|
-
if (
|
|
2851
|
-
if (
|
|
2856
|
+
if (S.key === "Delete") {
|
|
2857
|
+
if (S.metaKey || S.ctrlKey)
|
|
2852
2858
|
return;
|
|
2853
|
-
|
|
2854
|
-
const _ =
|
|
2859
|
+
S.preventDefault();
|
|
2860
|
+
const _ = k.selectionStart || 0, ne = k.selectionEnd || 0;
|
|
2855
2861
|
if (_ !== ne) {
|
|
2856
2862
|
l.value = f(""), e.value = "", pe(() => {
|
|
2857
|
-
const { required: ae, optional: ie } = u(o),
|
|
2863
|
+
const { required: ae, optional: ie } = u(o), j = ae + ie;
|
|
2858
2864
|
let re = 0;
|
|
2859
|
-
for (let ue = 0; ue <
|
|
2860
|
-
if (c(
|
|
2865
|
+
for (let ue = 0; ue < j.length; ue++)
|
|
2866
|
+
if (c(j[ue])) {
|
|
2861
2867
|
re = ue;
|
|
2862
2868
|
break;
|
|
2863
2869
|
}
|
|
2864
|
-
|
|
2870
|
+
k.setSelectionRange(re, re);
|
|
2865
2871
|
});
|
|
2866
2872
|
return;
|
|
2867
2873
|
}
|
|
2868
2874
|
if (D < l.value.length) {
|
|
2869
2875
|
const ae = l.value;
|
|
2870
2876
|
let ie = -1;
|
|
2871
|
-
for (let
|
|
2872
|
-
const { required: re, optional: ue } = u(o),
|
|
2873
|
-
if (
|
|
2874
|
-
ie =
|
|
2877
|
+
for (let j = D; j < ae.length; j++) {
|
|
2878
|
+
const { required: re, optional: ue } = u(o), Y = re + ue;
|
|
2879
|
+
if (j < Y.length && c(Y[j])) {
|
|
2880
|
+
ie = j;
|
|
2875
2881
|
break;
|
|
2876
2882
|
}
|
|
2877
2883
|
}
|
|
2878
2884
|
if (ie >= 0) {
|
|
2879
|
-
let
|
|
2880
|
-
for (let
|
|
2881
|
-
const { required:
|
|
2882
|
-
if (
|
|
2883
|
-
if (
|
|
2885
|
+
let j = g(ae), re = 0;
|
|
2886
|
+
for (let Y = 0; Y <= ie; Y++) {
|
|
2887
|
+
const { required: X, optional: We } = u(o), Pe = X + We;
|
|
2888
|
+
if (Y < Pe.length && c(Pe[Y])) {
|
|
2889
|
+
if (Y === ie) break;
|
|
2884
2890
|
re++;
|
|
2885
2891
|
}
|
|
2886
2892
|
}
|
|
2887
|
-
|
|
2888
|
-
const ue = f(
|
|
2889
|
-
l.value = ue, e.value =
|
|
2890
|
-
|
|
2893
|
+
j = j.slice(0, re) + j.slice(re + 1);
|
|
2894
|
+
const ue = f(j);
|
|
2895
|
+
l.value = ue, e.value = j, pe(() => {
|
|
2896
|
+
k.setSelectionRange(D, D);
|
|
2891
2897
|
});
|
|
2892
2898
|
}
|
|
2893
2899
|
}
|
|
2894
2900
|
return;
|
|
2895
2901
|
}
|
|
2896
|
-
if (
|
|
2902
|
+
if (S.metaKey || S.ctrlKey || ["ArrowLeft", "ArrowRight", "Tab", "Home", "End", "Escape"].includes(S.key))
|
|
2897
2903
|
return;
|
|
2898
2904
|
const { required: b, optional: M } = u(o), x = b + M, H = g(l.value), z = x.split("").filter((_) => c(_)).length;
|
|
2899
2905
|
if (H.length >= z) {
|
|
2900
|
-
|
|
2906
|
+
S.preventDefault();
|
|
2901
2907
|
return;
|
|
2902
2908
|
}
|
|
2903
2909
|
let E = -1, N = 0;
|
|
@@ -2909,11 +2915,11 @@ function ga(e, t) {
|
|
|
2909
2915
|
}
|
|
2910
2916
|
N++;
|
|
2911
2917
|
}
|
|
2912
|
-
E >= 0 && !v(
|
|
2918
|
+
E >= 0 && !v(S.key, x[E]) && S.preventDefault();
|
|
2913
2919
|
}
|
|
2914
|
-
function B(
|
|
2920
|
+
function B(S) {
|
|
2915
2921
|
s.value = !0, pe(() => {
|
|
2916
|
-
const
|
|
2922
|
+
const k = S.target, { required: D, optional: b } = u(o), M = D + b;
|
|
2917
2923
|
let x = 0;
|
|
2918
2924
|
for (let H = 0; H < M.length; H++)
|
|
2919
2925
|
if (c(M[H])) {
|
|
@@ -2932,24 +2938,24 @@ function ga(e, t) {
|
|
|
2932
2938
|
}
|
|
2933
2939
|
H === ze(e).length && (x = l.value.length);
|
|
2934
2940
|
}
|
|
2935
|
-
|
|
2941
|
+
k.setSelectionRange(x, x);
|
|
2936
2942
|
});
|
|
2937
2943
|
}
|
|
2938
|
-
function
|
|
2939
|
-
s.value = !1, n && !
|
|
2944
|
+
function $() {
|
|
2945
|
+
s.value = !1, n && !y(l.value) ? (l.value = "", e.value = "") : ze(e) || w();
|
|
2940
2946
|
}
|
|
2941
|
-
return w(), se(() => ze(e), (
|
|
2942
|
-
|
|
2943
|
-
}, { immediate: !0 }), se(s, (
|
|
2944
|
-
|
|
2947
|
+
return w(), se(() => ze(e), (S, k) => {
|
|
2948
|
+
S !== k && w();
|
|
2949
|
+
}, { immediate: !0 }), se(s, (S, k) => {
|
|
2950
|
+
S !== k && w();
|
|
2945
2951
|
}), {
|
|
2946
2952
|
displayValue: l,
|
|
2947
2953
|
handleInput: V,
|
|
2948
|
-
handlePaste:
|
|
2954
|
+
handlePaste: C,
|
|
2949
2955
|
handleKeydown: I,
|
|
2950
2956
|
handleFocus: B,
|
|
2951
|
-
handleBlur:
|
|
2952
|
-
placeholder:
|
|
2957
|
+
handleBlur: $,
|
|
2958
|
+
placeholder: h()
|
|
2953
2959
|
};
|
|
2954
2960
|
}
|
|
2955
2961
|
const Js = /* @__PURE__ */ O({
|
|
@@ -3066,7 +3072,7 @@ const Js = /* @__PURE__ */ O({
|
|
|
3066
3072
|
max: s.max,
|
|
3067
3073
|
onBlur: a
|
|
3068
3074
|
}, null, 40, ya), [
|
|
3069
|
-
[
|
|
3075
|
+
[Wt, o.value]
|
|
3070
3076
|
])
|
|
3071
3077
|
]),
|
|
3072
3078
|
s.viewButtons ? (d(), G(m(we), {
|
|
@@ -3237,11 +3243,11 @@ const Js = /* @__PURE__ */ O({
|
|
|
3237
3243
|
v <= (n.value ?? o.value) ? (d(), G(_o, {
|
|
3238
3244
|
key: 0,
|
|
3239
3245
|
class: "star-icon star-icon--filled",
|
|
3240
|
-
style:
|
|
3246
|
+
style: Z(r.value)
|
|
3241
3247
|
}, null, 8, ["style"])) : (d(), G(zo, {
|
|
3242
3248
|
key: 1,
|
|
3243
3249
|
class: "star-icon star-icon--empty",
|
|
3244
|
-
style:
|
|
3250
|
+
style: Z(r.value)
|
|
3245
3251
|
}, null, 8, ["style"]))
|
|
3246
3252
|
], 42, Ca))), 128))
|
|
3247
3253
|
]));
|
|
@@ -3322,7 +3328,7 @@ const Js = /* @__PURE__ */ O({
|
|
|
3322
3328
|
onFocusOut: u[2] || (u[2] = (c) => o("focusOut", c)),
|
|
3323
3329
|
onBlur: u[3] || (u[3] = (c) => o("blur", c))
|
|
3324
3330
|
}, null, 40, Ma), [
|
|
3325
|
-
[
|
|
3331
|
+
[Wt, a.value]
|
|
3326
3332
|
]),
|
|
3327
3333
|
R("div", Va, [
|
|
3328
3334
|
i.smallText || i.error && i.errorText ? (d(), p("div", {
|
|
@@ -3383,17 +3389,17 @@ function Fe(e, t) {
|
|
|
3383
3389
|
}), o;
|
|
3384
3390
|
}
|
|
3385
3391
|
function Ia(e, t, o) {
|
|
3386
|
-
return !(t && e.isBefore(
|
|
3392
|
+
return !(t && e.isBefore(K(t), "day")) && !(o && e.isAfter(K(o), "day"));
|
|
3387
3393
|
}
|
|
3388
3394
|
function Aa(e) {
|
|
3389
3395
|
return e.replace(/yyyy/g, "YYYY").replace(/yy/g, "YYYY").replace(/mm/g, "MM").replace(/dd/g, "DD").replace(/y/g, "YY").replace(/m/g, "M").replace(/d/g, "D");
|
|
3390
3396
|
}
|
|
3391
3397
|
function nt(e, t) {
|
|
3392
3398
|
try {
|
|
3393
|
-
const o = Aa(t), a =
|
|
3399
|
+
const o = Aa(t), a = K(e, o, !0);
|
|
3394
3400
|
if (a.isValid())
|
|
3395
3401
|
return a;
|
|
3396
|
-
const n =
|
|
3402
|
+
const n = K(e);
|
|
3397
3403
|
return n.isValid() ? n : null;
|
|
3398
3404
|
} catch {
|
|
3399
3405
|
return null;
|
|
@@ -3433,29 +3439,29 @@ function dt(e, t, o, a) {
|
|
|
3433
3439
|
return n;
|
|
3434
3440
|
}
|
|
3435
3441
|
function Ta(e, t, o, a = null, n = "dd/mm/yy", r = null, l = null, s = !1) {
|
|
3436
|
-
const i = [], u =
|
|
3437
|
-
for (let
|
|
3438
|
-
const g = u.subtract(
|
|
3442
|
+
const i = [], u = K().year(e).month(t).date(1), c = u.endOf("month"), v = (u.day() + 6) % 7;
|
|
3443
|
+
for (let h = v - 1; h >= 0; h--) {
|
|
3444
|
+
const g = u.subtract(h + 1, "day"), y = dt(g, a, n, s);
|
|
3439
3445
|
i.push({
|
|
3440
3446
|
value: Fe(g, n),
|
|
3441
3447
|
label: g.format("D"),
|
|
3442
3448
|
disabled: !0,
|
|
3443
3449
|
// Дни из другого месяца всегда disabled
|
|
3444
3450
|
current: !1,
|
|
3445
|
-
selected:
|
|
3446
|
-
rangeStart:
|
|
3447
|
-
rangeEnd:
|
|
3448
|
-
inRange:
|
|
3451
|
+
selected: y.selected,
|
|
3452
|
+
rangeStart: y.rangeStart,
|
|
3453
|
+
rangeEnd: y.rangeEnd,
|
|
3454
|
+
inRange: y.inRange
|
|
3449
3455
|
});
|
|
3450
3456
|
}
|
|
3451
|
-
for (let
|
|
3452
|
-
const g =
|
|
3457
|
+
for (let h = 1; h <= c.date(); h++) {
|
|
3458
|
+
const g = K().year(e).month(t).date(h), y = g.isSame(o, "day"), w = dt(g, a, n, s), V = Ia(g, r, l);
|
|
3453
3459
|
i.push({
|
|
3454
3460
|
value: Fe(g, n),
|
|
3455
|
-
label: String(
|
|
3461
|
+
label: String(h),
|
|
3456
3462
|
disabled: !V,
|
|
3457
3463
|
// Отключаем даты вне разрешенного диапазона
|
|
3458
|
-
current:
|
|
3464
|
+
current: y,
|
|
3459
3465
|
selected: w.selected,
|
|
3460
3466
|
rangeStart: w.rangeStart,
|
|
3461
3467
|
rangeEnd: w.rangeEnd,
|
|
@@ -3464,12 +3470,12 @@ function Ta(e, t, o, a = null, n = "dd/mm/yy", r = null, l = null, s = !1) {
|
|
|
3464
3470
|
}
|
|
3465
3471
|
const f = c.day();
|
|
3466
3472
|
if (f !== 0) {
|
|
3467
|
-
const
|
|
3468
|
-
for (let g = 1; g <=
|
|
3469
|
-
const
|
|
3473
|
+
const h = 7 - f;
|
|
3474
|
+
for (let g = 1; g <= h; g++) {
|
|
3475
|
+
const y = c.add(g, "day"), w = dt(y, a, n, s);
|
|
3470
3476
|
i.push({
|
|
3471
|
-
value: Fe(
|
|
3472
|
-
label:
|
|
3477
|
+
value: Fe(y, n),
|
|
3478
|
+
label: y.format("D"),
|
|
3473
3479
|
disabled: !0,
|
|
3474
3480
|
// Дни из другого месяца всегда disabled
|
|
3475
3481
|
current: !1,
|
|
@@ -3497,7 +3503,7 @@ function Ba(e, t, o = "dd/mm/yyyy", a = null, n = null) {
|
|
|
3497
3503
|
"Ноябрь",
|
|
3498
3504
|
"Декабрь"
|
|
3499
3505
|
].map((l, s) => {
|
|
3500
|
-
const i =
|
|
3506
|
+
const i = K().year(e).month(s).date(1), u = i.endOf("month"), c = (!a || u.isAfter(K(a).subtract(1, "day"))) && (!n || i.isBefore(K(n).add(1, "day")));
|
|
3501
3507
|
return {
|
|
3502
3508
|
value: Fe(i, o),
|
|
3503
3509
|
label: l,
|
|
@@ -3509,19 +3515,19 @@ function Ba(e, t, o = "dd/mm/yyyy", a = null, n = null) {
|
|
|
3509
3515
|
function Da(e, t = "dd.mm.yyyy", o = null, a = null) {
|
|
3510
3516
|
const n = e.year(), r = [], l = n - 10;
|
|
3511
3517
|
for (let s = l; s < l + 20; s++) {
|
|
3512
|
-
const i =
|
|
3518
|
+
const i = K().year(s).month(0).date(1), u = i.endOf("year"), c = (!o || u.isAfter(K(o).subtract(1, "day"))) && (!a || i.isBefore(K(a).add(1, "day")));
|
|
3513
3519
|
r.push({
|
|
3514
3520
|
value: Fe(i, t),
|
|
3515
3521
|
label: String(s),
|
|
3516
|
-
current: s ===
|
|
3522
|
+
current: s === K().year(),
|
|
3517
3523
|
// Сравниваем с реальной текущей датой
|
|
3518
3524
|
disabled: !c
|
|
3519
3525
|
});
|
|
3520
3526
|
}
|
|
3521
3527
|
return r;
|
|
3522
3528
|
}
|
|
3523
|
-
function La(e, t, o = A(
|
|
3524
|
-
const l = A(
|
|
3529
|
+
function La(e, t, o = A(K().format("DD.MM.YYYY")), a = A(null), n = A(null), r = A(!1)) {
|
|
3530
|
+
const l = A(K()), s = () => {
|
|
3525
3531
|
switch (e.value) {
|
|
3526
3532
|
case "day":
|
|
3527
3533
|
l.value = l.value.subtract(1, "month");
|
|
@@ -3546,16 +3552,16 @@ function La(e, t, o = A(null), a = A(null), n = A(null), r = A(!1)) {
|
|
|
3546
3552
|
break;
|
|
3547
3553
|
}
|
|
3548
3554
|
}, u = () => {
|
|
3549
|
-
l.value =
|
|
3555
|
+
l.value = K();
|
|
3550
3556
|
}, c = P(() => {
|
|
3551
|
-
const f =
|
|
3557
|
+
const f = K(), h = l.value.year(), g = l.value.month(), y = t.value || "dd.mm.yy";
|
|
3552
3558
|
switch (e.value) {
|
|
3553
3559
|
case "day":
|
|
3554
|
-
return Ta(
|
|
3560
|
+
return Ta(h, g, f, o.value, y, a.value, n.value, r.value);
|
|
3555
3561
|
case "month":
|
|
3556
|
-
return Ba(
|
|
3562
|
+
return Ba(h, f, y, a.value, n.value);
|
|
3557
3563
|
case "year":
|
|
3558
|
-
return Da(l.value,
|
|
3564
|
+
return Da(l.value, y, a.value, n.value);
|
|
3559
3565
|
default:
|
|
3560
3566
|
return [];
|
|
3561
3567
|
}
|
|
@@ -3573,11 +3579,13 @@ function La(e, t, o = A(null), a = A(null), n = A(null), r = A(!1)) {
|
|
|
3573
3579
|
"Октябрь",
|
|
3574
3580
|
"Ноябрь",
|
|
3575
3581
|
"Декабрь"
|
|
3576
|
-
]
|
|
3582
|
+
];
|
|
3583
|
+
console.log(o.value);
|
|
3584
|
+
const h = typeof o.value == "string" ? K(o.value, t.value) : K(o.value?.from, t.value), g = h.year(), y = h.month(), w = g - 10, V = w + 19;
|
|
3577
3585
|
return {
|
|
3578
|
-
month: f[
|
|
3579
|
-
year: String(
|
|
3580
|
-
year_range: `${
|
|
3586
|
+
month: f[y],
|
|
3587
|
+
year: String(g),
|
|
3588
|
+
year_range: `${w}-${V}`
|
|
3581
3589
|
};
|
|
3582
3590
|
});
|
|
3583
3591
|
return {
|
|
@@ -3606,48 +3614,48 @@ const Oa = { class: "calendar__header" }, Ea = { class: "calendar__header-title"
|
|
|
3606
3614
|
}),
|
|
3607
3615
|
emits: ["update:modelValue"],
|
|
3608
3616
|
setup(e) {
|
|
3609
|
-
const t = e, o = Ue(t, "type"), a = Ue(t, "format"), n = Ue(t, "range"), r = Ue(t, "minDate"), l = Ue(t, "maxDate"), s = te(e, "modelValue"), i = A(!1), u = A(o.value || "day"), { calendarCells: c, activeDateInfo: v, goToPreviousPage: f, goToNextPage:
|
|
3617
|
+
const t = e, o = Ue(t, "type"), a = Ue(t, "format"), n = Ue(t, "range"), r = Ue(t, "minDate"), l = Ue(t, "maxDate"), s = te(e, "modelValue"), i = A(!1), u = A(o.value || "day"), { calendarCells: c, activeDateInfo: v, goToPreviousPage: f, goToNextPage: h } = La(u, a, s, r, l, n), g = P({
|
|
3610
3618
|
get() {
|
|
3611
3619
|
return u.value;
|
|
3612
3620
|
},
|
|
3613
|
-
set(
|
|
3614
|
-
o.value === "day" ? u.value =
|
|
3621
|
+
set(C) {
|
|
3622
|
+
o.value === "day" ? u.value = C : o.value === "month" ? (C === "month" || C === "year") && (u.value = C) : u.value = C;
|
|
3615
3623
|
}
|
|
3616
|
-
}),
|
|
3624
|
+
}), y = P(() => [
|
|
3617
3625
|
"calendar",
|
|
3618
3626
|
`calendar--${u.value}`
|
|
3619
|
-
]), w = (
|
|
3627
|
+
]), w = (C) => [
|
|
3620
3628
|
"calendar__body-item",
|
|
3621
3629
|
{
|
|
3622
|
-
"calendar__body-item--current":
|
|
3623
|
-
"calendar__body-item--disabled":
|
|
3624
|
-
"calendar__body-item--selected":
|
|
3625
|
-
"calendar__body-item--range-start":
|
|
3626
|
-
"calendar__body-item--range-end":
|
|
3627
|
-
"calendar__body-item--in-range":
|
|
3630
|
+
"calendar__body-item--current": C.current,
|
|
3631
|
+
"calendar__body-item--disabled": C.disabled,
|
|
3632
|
+
"calendar__body-item--selected": C.selected,
|
|
3633
|
+
"calendar__body-item--range-start": C.rangeStart,
|
|
3634
|
+
"calendar__body-item--range-end": C.rangeEnd,
|
|
3635
|
+
"calendar__body-item--in-range": C.inRange
|
|
3628
3636
|
}
|
|
3629
|
-
], V = (
|
|
3637
|
+
], V = (C) => {
|
|
3630
3638
|
if (g.value !== "day" || !t.range) {
|
|
3631
|
-
s.value =
|
|
3639
|
+
s.value = C.value, g.value === "year" ? g.value = "month" : g.value === "month" && (g.value = "day");
|
|
3632
3640
|
return;
|
|
3633
3641
|
}
|
|
3634
3642
|
if (!s.value)
|
|
3635
|
-
s.value = { from:
|
|
3643
|
+
s.value = { from: C.value, to: "" }, i.value = !0;
|
|
3636
3644
|
else if (typeof s.value == "string")
|
|
3637
|
-
s.value = { from: s.value, to:
|
|
3645
|
+
s.value = { from: s.value, to: C.value }, i.value = !1;
|
|
3638
3646
|
else if (s.value.from && (!s.value.to || s.value.to === ""))
|
|
3639
|
-
if (s.value.from ===
|
|
3647
|
+
if (s.value.from === C.value)
|
|
3640
3648
|
s.value = null, i.value = !1;
|
|
3641
3649
|
else if (i.value) {
|
|
3642
|
-
const I = nt(s.value.from, t.format || "dd/mm/yy"), B = nt(
|
|
3643
|
-
I && B ? I.isBefore(B) || I.isSame(B) ? s.value = { from: s.value.from, to:
|
|
3650
|
+
const I = nt(s.value.from, t.format || "dd/mm/yy"), B = nt(C.value, t.format || "dd/mm/yy");
|
|
3651
|
+
I && B ? I.isBefore(B) || I.isSame(B) ? s.value = { from: s.value.from, to: C.value } : s.value = { from: C.value, to: s.value.from } : s.value = { from: s.value.from, to: C.value }, i.value = !1;
|
|
3644
3652
|
} else
|
|
3645
|
-
s.value = { from:
|
|
3653
|
+
s.value = { from: C.value, to: "" }, i.value = !0;
|
|
3646
3654
|
else
|
|
3647
|
-
s.value = { from:
|
|
3655
|
+
s.value = { from: C.value, to: "" }, i.value = !0;
|
|
3648
3656
|
};
|
|
3649
|
-
return (
|
|
3650
|
-
class: L(
|
|
3657
|
+
return (C, I) => (d(), p("div", {
|
|
3658
|
+
class: L(y.value)
|
|
3651
3659
|
}, [
|
|
3652
3660
|
R("div", Oa, [
|
|
3653
3661
|
q(m(we), {
|
|
@@ -3689,7 +3697,7 @@ const Oa = { class: "calendar__header" }, Ea = { class: "calendar__header-title"
|
|
|
3689
3697
|
variant: "secondary",
|
|
3690
3698
|
"button-style": "outlined",
|
|
3691
3699
|
disabled: g.value === "month",
|
|
3692
|
-
onClick: m(
|
|
3700
|
+
onClick: m(h)
|
|
3693
3701
|
}, null, 8, ["icon", "disabled", "onClick"])
|
|
3694
3702
|
]),
|
|
3695
3703
|
R("div", za, [
|
|
@@ -3701,7 +3709,7 @@ const Oa = { class: "calendar__header" }, Ea = { class: "calendar__header-title"
|
|
|
3701
3709
|
key: B.value,
|
|
3702
3710
|
class: L(w(B)),
|
|
3703
3711
|
disabled: B.disabled,
|
|
3704
|
-
onClick: (
|
|
3712
|
+
onClick: ($) => V(B)
|
|
3705
3713
|
}, [
|
|
3706
3714
|
R("span", null, F(B.label), 1)
|
|
3707
3715
|
], 10, Fa))), 128))
|
|
@@ -3710,7 +3718,7 @@ const Oa = { class: "calendar__header" }, Ea = { class: "calendar__header-title"
|
|
|
3710
3718
|
], 2));
|
|
3711
3719
|
}
|
|
3712
3720
|
}), qa = /* @__PURE__ */ le(Na, [["__scopeId", "data-v-e2037ecf"]]);
|
|
3713
|
-
class
|
|
3721
|
+
class Ya {
|
|
3714
3722
|
constructor() {
|
|
3715
3723
|
}
|
|
3716
3724
|
getPhoneMask(t, o = "(999) 999-99-99") {
|
|
@@ -3736,7 +3744,7 @@ class ja {
|
|
|
3736
3744
|
r.value = i;
|
|
3737
3745
|
}
|
|
3738
3746
|
parseDate(t, o) {
|
|
3739
|
-
return
|
|
3747
|
+
return K(t, o.toLowerCase());
|
|
3740
3748
|
}
|
|
3741
3749
|
correctDateValues(t, o) {
|
|
3742
3750
|
if (t.length < 2) return t;
|
|
@@ -3768,7 +3776,7 @@ class ja {
|
|
|
3768
3776
|
s += u.slice(-c);
|
|
3769
3777
|
}
|
|
3770
3778
|
try {
|
|
3771
|
-
const u =
|
|
3779
|
+
const u = K(s, o.toUpperCase());
|
|
3772
3780
|
if (u.isValid())
|
|
3773
3781
|
return u.format(o.toUpperCase()).replace(/\D/g, "").substring(0, t.length);
|
|
3774
3782
|
} catch {
|
|
@@ -3799,17 +3807,17 @@ class ja {
|
|
|
3799
3807
|
return null;
|
|
3800
3808
|
let l = r, s = !1;
|
|
3801
3809
|
if (a) {
|
|
3802
|
-
const i =
|
|
3810
|
+
const i = K(a);
|
|
3803
3811
|
l.isBefore(i) && (l = i, s = !0);
|
|
3804
3812
|
}
|
|
3805
3813
|
if (n) {
|
|
3806
|
-
const i =
|
|
3814
|
+
const i = K(n);
|
|
3807
3815
|
l.isAfter(i) && (l = i, s = !0);
|
|
3808
3816
|
}
|
|
3809
3817
|
return s ? l.format(o.toUpperCase()) : null;
|
|
3810
3818
|
}
|
|
3811
3819
|
}
|
|
3812
|
-
const
|
|
3820
|
+
const ja = /* @__PURE__ */ O({
|
|
3813
3821
|
__name: "DatePicker",
|
|
3814
3822
|
props: /* @__PURE__ */ U({
|
|
3815
3823
|
placeholder: {},
|
|
@@ -3820,6 +3828,7 @@ const Wa = /* @__PURE__ */ O({
|
|
|
3820
3828
|
error: { type: Boolean },
|
|
3821
3829
|
errorText: {},
|
|
3822
3830
|
required: { type: Boolean },
|
|
3831
|
+
position: { default: "start" },
|
|
3823
3832
|
type: { default: "day" },
|
|
3824
3833
|
format: { default: "dd.mm.yy" },
|
|
3825
3834
|
range: { type: Boolean, default: !1 },
|
|
@@ -3831,13 +3840,13 @@ const Wa = /* @__PURE__ */ O({
|
|
|
3831
3840
|
}),
|
|
3832
3841
|
emits: /* @__PURE__ */ U(["update:modelValue", "select", "clear", "focus", "blur", "input"], ["update:modelValue"]),
|
|
3833
3842
|
setup(e, { emit: t }) {
|
|
3834
|
-
function o(
|
|
3835
|
-
let
|
|
3836
|
-
const D =
|
|
3843
|
+
function o($, S) {
|
|
3844
|
+
let k = S;
|
|
3845
|
+
const D = $.dayOfYear(), b = [
|
|
3837
3846
|
// День месяца
|
|
3838
|
-
[/dd/g,
|
|
3847
|
+
[/dd/g, $.format("DD")],
|
|
3839
3848
|
// два знака
|
|
3840
|
-
[/d/g,
|
|
3849
|
+
[/d/g, $.format("D")],
|
|
3841
3850
|
// без ведущего нуля
|
|
3842
3851
|
// День года
|
|
3843
3852
|
[/oo/g, String(D).padStart(3, "0")],
|
|
@@ -3845,110 +3854,110 @@ const Wa = /* @__PURE__ */ O({
|
|
|
3845
3854
|
[/o/g, String(D)],
|
|
3846
3855
|
// без ведущих нулей
|
|
3847
3856
|
// Название дня
|
|
3848
|
-
[/DD/g,
|
|
3857
|
+
[/DD/g, $.format("dddd")],
|
|
3849
3858
|
// полное название
|
|
3850
|
-
[/D(?!D)/g,
|
|
3859
|
+
[/D(?!D)/g, $.format("ddd")],
|
|
3851
3860
|
// сокращенное
|
|
3852
3861
|
// Месяц - сначала длинные, потом короткие
|
|
3853
|
-
[/MM(?!M)/g,
|
|
3862
|
+
[/MM(?!M)/g, $.format("MMMM")],
|
|
3854
3863
|
// полное название
|
|
3855
|
-
[/mm/g,
|
|
3864
|
+
[/mm/g, $.format("MM")],
|
|
3856
3865
|
// два знака
|
|
3857
|
-
[/M(?!M)/g,
|
|
3866
|
+
[/M(?!M)/g, $.format("MMM")],
|
|
3858
3867
|
// сокращенное название
|
|
3859
|
-
[/m(?!m)/g,
|
|
3868
|
+
[/m(?!m)/g, $.format("M")],
|
|
3860
3869
|
// без ведущего нуля
|
|
3861
3870
|
// Год
|
|
3862
|
-
[/yy/g,
|
|
3871
|
+
[/yy/g, $.format("YYYY")],
|
|
3863
3872
|
// четыре цифры
|
|
3864
|
-
[/y/g,
|
|
3873
|
+
[/y/g, $.format("YY")],
|
|
3865
3874
|
// две цифры
|
|
3866
3875
|
// Специальные форматы
|
|
3867
|
-
[/@/g, String(
|
|
3876
|
+
[/@/g, String($.valueOf())],
|
|
3868
3877
|
// Unix timestamp
|
|
3869
|
-
[/!/g, String((
|
|
3878
|
+
[/!/g, String(($.valueOf() + 621355968e9) * 1e4)]
|
|
3870
3879
|
// Windows ticks
|
|
3871
3880
|
], M = [];
|
|
3872
3881
|
let x = 0;
|
|
3873
|
-
return
|
|
3882
|
+
return k = k.replace(/'([^']*)'/g, (H, z) => {
|
|
3874
3883
|
const E = `__LITERAL_${x}__`;
|
|
3875
3884
|
return M[x] = z, x++, E;
|
|
3876
|
-
}),
|
|
3877
|
-
|
|
3885
|
+
}), k = k.replace(/''/g, "'"), b.forEach(([H, z]) => {
|
|
3886
|
+
k = k.replace(H, z);
|
|
3878
3887
|
}), M.forEach((H, z) => {
|
|
3879
|
-
|
|
3880
|
-
}),
|
|
3888
|
+
k = k.replace(`__LITERAL_${z}__`, H);
|
|
3889
|
+
}), k;
|
|
3881
3890
|
}
|
|
3882
|
-
function a(
|
|
3891
|
+
function a($, S) {
|
|
3883
3892
|
try {
|
|
3884
|
-
const
|
|
3885
|
-
if (
|
|
3886
|
-
return
|
|
3887
|
-
const D =
|
|
3893
|
+
const k = K($, S, !0);
|
|
3894
|
+
if (k.isValid())
|
|
3895
|
+
return k;
|
|
3896
|
+
const D = K($);
|
|
3888
3897
|
return D.isValid() ? D : null;
|
|
3889
3898
|
} catch {
|
|
3890
3899
|
return null;
|
|
3891
3900
|
}
|
|
3892
3901
|
}
|
|
3893
|
-
const n = new
|
|
3902
|
+
const n = new Ya(), r = e, l = t, s = te(e, "modelValue"), i = A(), u = A(), c = A(), v = A(!1), f = A(s.value), h = A({}), g = P(() => {
|
|
3894
3903
|
if (!s.value) return "";
|
|
3895
3904
|
if (typeof s.value == "string")
|
|
3896
3905
|
return s.value;
|
|
3897
3906
|
if (s.value instanceof Date)
|
|
3898
|
-
return o(
|
|
3907
|
+
return o(K(s.value), r.format);
|
|
3899
3908
|
if (typeof s.value == "object") {
|
|
3900
|
-
const
|
|
3909
|
+
const $ = s.value;
|
|
3901
3910
|
if (r.range) {
|
|
3902
|
-
if (
|
|
3903
|
-
return `с ${
|
|
3904
|
-
if (
|
|
3905
|
-
return `с ${
|
|
3911
|
+
if ($.from && $.to && $.to !== "")
|
|
3912
|
+
return `с ${$.from} по ${$.to}`;
|
|
3913
|
+
if ($.from)
|
|
3914
|
+
return `с ${$.from}`;
|
|
3906
3915
|
} else
|
|
3907
|
-
return
|
|
3916
|
+
return $.from || $.to || "";
|
|
3908
3917
|
}
|
|
3909
3918
|
return "";
|
|
3910
|
-
}),
|
|
3911
|
-
n.getDateMask(
|
|
3912
|
-
const
|
|
3913
|
-
if (!
|
|
3919
|
+
}), y = ($) => {
|
|
3920
|
+
n.getDateMask($, r.format);
|
|
3921
|
+
const S = $.target;
|
|
3922
|
+
if (!S.value) {
|
|
3914
3923
|
s.value = null;
|
|
3915
3924
|
return;
|
|
3916
3925
|
}
|
|
3917
|
-
if (
|
|
3918
|
-
const
|
|
3919
|
-
|
|
3926
|
+
if (S.value.length === r.format.length) {
|
|
3927
|
+
const k = a(S.value, r.format);
|
|
3928
|
+
k && k.isValid() ? (s.value = S.value, l("select", k.toDate())) : s.value = null;
|
|
3920
3929
|
}
|
|
3921
|
-
l("input",
|
|
3930
|
+
l("input", $);
|
|
3922
3931
|
}, w = () => {
|
|
3923
3932
|
s.value = null, f.value = null, l("clear");
|
|
3924
3933
|
}, V = () => {
|
|
3925
3934
|
f.value = s.value, v.value = !0, pe(() => {
|
|
3926
3935
|
I();
|
|
3927
3936
|
});
|
|
3928
|
-
},
|
|
3929
|
-
|
|
3937
|
+
}, C = ($) => {
|
|
3938
|
+
$ && (f.value = $, typeof $ == "string" ? (s.value = $, $.length === r.format.length && !r.range && (v.value = !1)) : $ instanceof Date ? (s.value = o(K($), r.format), r.range || (v.value = !1)) : typeof $ == "object" && (r.range ? s.value = $ : (s.value = $.from || $.to || null, typeof s.value == "string" && s.value.length === r.format.length && (v.value = !1))), l("select", $));
|
|
3930
3939
|
}, I = () => {
|
|
3931
3940
|
if (!u.value || !v.value) return;
|
|
3932
|
-
const
|
|
3933
|
-
|
|
3941
|
+
const S = (u.value.querySelector("input") || u.value).getBoundingClientRect(), k = r.position === "start" ? S.left : S.left - (S.width > 300 ? 0 : 350 - S.width);
|
|
3942
|
+
console.log(k), h.value = {
|
|
3934
3943
|
position: "fixed",
|
|
3935
|
-
top: `${
|
|
3936
|
-
left: `${
|
|
3937
|
-
width: `${
|
|
3944
|
+
top: `${S.bottom + 4}px`,
|
|
3945
|
+
left: `${k}px`,
|
|
3946
|
+
width: `${S.width > 300 ? S.width : 350}px`,
|
|
3938
3947
|
zIndex: "1000"
|
|
3939
3948
|
};
|
|
3940
|
-
}, B = (
|
|
3949
|
+
}, B = ($) => {
|
|
3941
3950
|
if (!i.value || !c.value) return;
|
|
3942
|
-
const
|
|
3943
|
-
!i.value.contains(
|
|
3951
|
+
const S = $.target;
|
|
3952
|
+
!i.value.contains(S) && !c.value.contains(S) && (v.value = !1);
|
|
3944
3953
|
};
|
|
3945
|
-
return se(s, (
|
|
3946
|
-
f.value =
|
|
3954
|
+
return se(s, ($) => {
|
|
3955
|
+
f.value = $;
|
|
3947
3956
|
}, { immediate: !0 }), ve(() => {
|
|
3948
3957
|
document.addEventListener("mousedown", B), window.addEventListener("resize", I), window.addEventListener("scroll", I);
|
|
3949
3958
|
}), Ze(() => {
|
|
3950
3959
|
document.removeEventListener("mousedown", B), window.removeEventListener("resize", I), window.removeEventListener("scroll", I);
|
|
3951
|
-
}), (
|
|
3960
|
+
}), ($, S) => (d(), p("div", {
|
|
3952
3961
|
class: "date-picker",
|
|
3953
3962
|
ref_key: "datePickerRef",
|
|
3954
3963
|
ref: i
|
|
@@ -3960,51 +3969,51 @@ const Wa = /* @__PURE__ */ O({
|
|
|
3960
3969
|
}, [
|
|
3961
3970
|
q(m(ut), {
|
|
3962
3971
|
full: "",
|
|
3963
|
-
label:
|
|
3964
|
-
placeholder:
|
|
3965
|
-
error:
|
|
3966
|
-
"error-text":
|
|
3967
|
-
required:
|
|
3968
|
-
disabled:
|
|
3969
|
-
name:
|
|
3970
|
-
"allow-clear":
|
|
3972
|
+
label: $.label,
|
|
3973
|
+
placeholder: $.placeholder,
|
|
3974
|
+
error: $.error,
|
|
3975
|
+
"error-text": $.errorText,
|
|
3976
|
+
required: $.required,
|
|
3977
|
+
disabled: $.disabled,
|
|
3978
|
+
name: $.name,
|
|
3979
|
+
"allow-clear": $.allowClear,
|
|
3971
3980
|
"model-value": g.value,
|
|
3972
|
-
readonly:
|
|
3973
|
-
onInput:
|
|
3981
|
+
readonly: $.range,
|
|
3982
|
+
onInput: y,
|
|
3974
3983
|
onClear: w,
|
|
3975
3984
|
onFocus: V
|
|
3976
3985
|
}, null, 8, ["label", "placeholder", "error", "error-text", "required", "disabled", "name", "allow-clear", "model-value", "readonly"])
|
|
3977
3986
|
], 512),
|
|
3978
|
-
(d(), G(
|
|
3987
|
+
(d(), G(Ye, { to: "body" }, [
|
|
3979
3988
|
v.value ? (d(), p("div", {
|
|
3980
3989
|
key: 0,
|
|
3981
3990
|
ref_key: "popoverRef",
|
|
3982
3991
|
ref: c,
|
|
3983
3992
|
class: "date-picker__popover",
|
|
3984
|
-
style:
|
|
3993
|
+
style: Z(h.value)
|
|
3985
3994
|
}, [
|
|
3986
3995
|
R("div", {
|
|
3987
|
-
onMousedown:
|
|
3996
|
+
onMousedown: S[1] || (S[1] = Je(() => {
|
|
3988
3997
|
}, ["stop"]))
|
|
3989
3998
|
}, [
|
|
3990
3999
|
q(m(qa), {
|
|
3991
4000
|
modelValue: f.value,
|
|
3992
4001
|
"onUpdate:modelValue": [
|
|
3993
|
-
|
|
3994
|
-
|
|
4002
|
+
S[0] || (S[0] = (k) => f.value = k),
|
|
4003
|
+
C
|
|
3995
4004
|
],
|
|
3996
|
-
format:
|
|
3997
|
-
range:
|
|
3998
|
-
type:
|
|
3999
|
-
"min-date":
|
|
4000
|
-
"max-date":
|
|
4005
|
+
format: $.format,
|
|
4006
|
+
range: $.range,
|
|
4007
|
+
type: $.type,
|
|
4008
|
+
"min-date": $.minDate,
|
|
4009
|
+
"max-date": $.maxDate
|
|
4001
4010
|
}, null, 8, ["modelValue", "format", "range", "type", "min-date", "max-date"])
|
|
4002
4011
|
], 32)
|
|
4003
4012
|
], 4)) : T("", !0)
|
|
4004
4013
|
]))
|
|
4005
4014
|
], 512));
|
|
4006
4015
|
}
|
|
4007
|
-
}), ar = /* @__PURE__ */ le(
|
|
4016
|
+
}), ar = /* @__PURE__ */ le(ja, [["__scopeId", "data-v-b36a6481"]]), Wa = { class: "breadcrumb" }, Ua = ["onClick"], Ka = {
|
|
4008
4017
|
key: 2,
|
|
4009
4018
|
class: "breadcrumb__item breadcrumb__seporator"
|
|
4010
4019
|
}, sr = /* @__PURE__ */ O({
|
|
@@ -4013,8 +4022,8 @@ const Wa = /* @__PURE__ */ O({
|
|
|
4013
4022
|
items: {}
|
|
4014
4023
|
},
|
|
4015
4024
|
setup(e) {
|
|
4016
|
-
const t = (o) => o.url ?
|
|
4017
|
-
return (o, a) => (d(), p("div",
|
|
4025
|
+
const t = (o) => o.url ? Yt("RouterLink") : "div";
|
|
4026
|
+
return (o, a) => (d(), p("div", Wa, [
|
|
4018
4027
|
(d(!0), p(oe, null, me(o.items, (n, r) => (d(), p(oe, null, [
|
|
4019
4028
|
n.command ? (d(), p("button", {
|
|
4020
4029
|
key: 0,
|
|
@@ -4062,7 +4071,7 @@ const Wa = /* @__PURE__ */ O({
|
|
|
4062
4071
|
};
|
|
4063
4072
|
return ve(() => {
|
|
4064
4073
|
e.msg.life && (s.value = e.msg.life, i());
|
|
4065
|
-
}), (f,
|
|
4074
|
+
}), (f, h) => (d(), p("div", {
|
|
4066
4075
|
class: L(r.value)
|
|
4067
4076
|
}, [
|
|
4068
4077
|
R("div", Xa, [
|
|
@@ -4174,8 +4183,8 @@ const ur = {
|
|
|
4174
4183
|
`message--${t.type}`,
|
|
4175
4184
|
{ "message--outlined": t.outlined }
|
|
4176
4185
|
]), a = Ut({
|
|
4177
|
-
error: Ae(
|
|
4178
|
-
warning: Ae(
|
|
4186
|
+
error: Ae(jo),
|
|
4187
|
+
warning: Ae(Yo),
|
|
4179
4188
|
info: Ae(bt)
|
|
4180
4189
|
});
|
|
4181
4190
|
return (n, r) => (d(), p("div", {
|
|
@@ -4183,7 +4192,7 @@ const ur = {
|
|
|
4183
4192
|
}, [
|
|
4184
4193
|
(d(), G(Ce(a[t.type]), { class: "message__icon" })),
|
|
4185
4194
|
R("div", os, [
|
|
4186
|
-
n.$slots.default ?
|
|
4195
|
+
n.$slots.default ? W(n.$slots, "default", { key: 0 }, void 0, !0) : (d(), p(oe, { key: 1 }, [
|
|
4187
4196
|
fe(F(t.message), 1)
|
|
4188
4197
|
], 64))
|
|
4189
4198
|
])
|
|
@@ -4239,9 +4248,9 @@ const ur = {
|
|
|
4239
4248
|
value: o.value,
|
|
4240
4249
|
variant: o.variant,
|
|
4241
4250
|
class: "overlay-badge__badge",
|
|
4242
|
-
style:
|
|
4251
|
+
style: Z(t.value)
|
|
4243
4252
|
}, null, 8, ["value", "variant", "style"])) : T("", !0),
|
|
4244
|
-
|
|
4253
|
+
W(o.$slots, "default")
|
|
4245
4254
|
], 2));
|
|
4246
4255
|
}
|
|
4247
4256
|
}), fr = /* @__PURE__ */ O({
|
|
@@ -4268,7 +4277,7 @@ const ur = {
|
|
|
4268
4277
|
}));
|
|
4269
4278
|
return (a, n) => (d(), p("div", {
|
|
4270
4279
|
class: L(t.value),
|
|
4271
|
-
style:
|
|
4280
|
+
style: Z(o.value)
|
|
4272
4281
|
}, null, 6));
|
|
4273
4282
|
}
|
|
4274
4283
|
}), go = Symbol("DialogService"), vr = () => {
|
|
@@ -4281,9 +4290,9 @@ const ur = {
|
|
|
4281
4290
|
if (!e)
|
|
4282
4291
|
throw new Error("useConfirmDialog() должен использоваться внутри приложения с DialogService");
|
|
4283
4292
|
return e;
|
|
4284
|
-
},
|
|
4293
|
+
}, J = A(null), Q = A(null), ss = {
|
|
4285
4294
|
require: (e) => {
|
|
4286
|
-
|
|
4295
|
+
J.value = {
|
|
4287
4296
|
modal: !0,
|
|
4288
4297
|
closable: !0,
|
|
4289
4298
|
dismissableMask: !0,
|
|
@@ -4293,7 +4302,7 @@ const ur = {
|
|
|
4293
4302
|
};
|
|
4294
4303
|
},
|
|
4295
4304
|
close: () => {
|
|
4296
|
-
|
|
4305
|
+
J.value = null;
|
|
4297
4306
|
}
|
|
4298
4307
|
}, rs = {
|
|
4299
4308
|
require: (e) => {
|
|
@@ -4311,7 +4320,7 @@ const ur = {
|
|
|
4311
4320
|
}
|
|
4312
4321
|
}, pr = {
|
|
4313
4322
|
install(e) {
|
|
4314
|
-
e.provide(go, ss), e.provide(ho, rs), e.config.globalProperties.$dialogStates =
|
|
4323
|
+
e.provide(go, ss), e.provide(ho, rs), e.config.globalProperties.$dialogStates = J, e.config.globalProperties.$popupStates = Q;
|
|
4315
4324
|
}
|
|
4316
4325
|
}, is = {
|
|
4317
4326
|
key: 0,
|
|
@@ -4323,39 +4332,39 @@ const ur = {
|
|
|
4323
4332
|
__name: "ConfirmDialog",
|
|
4324
4333
|
setup(e) {
|
|
4325
4334
|
const { lockScroll: t, unlockScroll: o } = lt(), a = () => {
|
|
4326
|
-
|
|
4335
|
+
J.value?.accept && (J.value?.accept?.(), J.value = null);
|
|
4327
4336
|
}, n = () => {
|
|
4328
|
-
|
|
4337
|
+
J.value?.reject && (J.value?.reject?.(), J.value = null);
|
|
4329
4338
|
}, r = () => {
|
|
4330
|
-
|
|
4339
|
+
J.value = null;
|
|
4331
4340
|
}, l = (s) => {
|
|
4332
|
-
s.key === "Escape" && (
|
|
4341
|
+
s.key === "Escape" && (J.value = null);
|
|
4333
4342
|
};
|
|
4334
|
-
return se(
|
|
4343
|
+
return se(J, (s) => {
|
|
4335
4344
|
s?.blockScroll ? t() : o();
|
|
4336
4345
|
}, { immediate: !0, deep: !0 }), ve(() => {
|
|
4337
4346
|
document.addEventListener("keydown", l);
|
|
4338
4347
|
}), Ze(() => {
|
|
4339
4348
|
document.removeEventListener("keydown", l), o();
|
|
4340
|
-
}), (s, i) => (d(), G(
|
|
4349
|
+
}), (s, i) => (d(), G(Ye, { to: "body" }, [
|
|
4341
4350
|
q(De, { name: "confirm-dialog" }, {
|
|
4342
4351
|
default: ee(() => [
|
|
4343
|
-
m(
|
|
4352
|
+
m(J) ? (d(), p("div", {
|
|
4344
4353
|
key: 0,
|
|
4345
4354
|
class: L(["confirm-dialog-overlay", { "confirm-dialog-overlay--modal": !0 }]),
|
|
4346
4355
|
onClick: r
|
|
4347
4356
|
}, [
|
|
4348
4357
|
R("div", {
|
|
4349
4358
|
ref: "popupRef",
|
|
4350
|
-
class: L(["confirm-dialog", [`confirm-dialog--${m(
|
|
4359
|
+
class: L(["confirm-dialog", [`confirm-dialog--${m(J).position}`, m(J).class]]),
|
|
4351
4360
|
onClick: i[2] || (i[2] = Je(() => {
|
|
4352
4361
|
}, ["stop"])),
|
|
4353
|
-
style:
|
|
4362
|
+
style: Z(m(J).style)
|
|
4354
4363
|
}, [
|
|
4355
|
-
m(
|
|
4356
|
-
R("h4", us, F(m(
|
|
4364
|
+
m(J).header ? (d(), p("div", is, [
|
|
4365
|
+
R("h4", us, F(m(J).header), 1)
|
|
4357
4366
|
])) : T("", !0),
|
|
4358
|
-
m(
|
|
4367
|
+
m(J).message ? (d(), p("p", cs, F(m(J).message), 1)) : T("", !0),
|
|
4359
4368
|
R("div", ds, [
|
|
4360
4369
|
q(m(we), {
|
|
4361
4370
|
size: "small",
|
|
@@ -4364,7 +4373,7 @@ const ur = {
|
|
|
4364
4373
|
onClick: i[0] || (i[0] = () => n())
|
|
4365
4374
|
}, {
|
|
4366
4375
|
default: ee(() => [
|
|
4367
|
-
fe(F(m(
|
|
4376
|
+
fe(F(m(J).rejectProps ? m(J).rejectProps.label : "Нет"), 1)
|
|
4368
4377
|
]),
|
|
4369
4378
|
_: 1
|
|
4370
4379
|
}),
|
|
@@ -4373,7 +4382,7 @@ const ur = {
|
|
|
4373
4382
|
onClick: i[1] || (i[1] = () => a())
|
|
4374
4383
|
}, {
|
|
4375
4384
|
default: ee(() => [
|
|
4376
|
-
fe(F(m(
|
|
4385
|
+
fe(F(m(J).acceptProps ? m(J).acceptProps.label : "Да"), 1)
|
|
4377
4386
|
]),
|
|
4378
4387
|
_: 1
|
|
4379
4388
|
})
|
|
@@ -4396,75 +4405,75 @@ const ur = {
|
|
|
4396
4405
|
setup(e) {
|
|
4397
4406
|
const t = A(), o = A({}), a = A("bottom"), n = P(() => `confirm-popup--${a.value}`), r = P(() => `confirm-popup__arrow--${a.value}`), l = () => {
|
|
4398
4407
|
if (!Q.value?.target || !t.value) return;
|
|
4399
|
-
const f = Q.value.target,
|
|
4408
|
+
const f = Q.value.target, h = t.value, g = Q.value.position || "bottom";
|
|
4400
4409
|
if (!document.contains(f)) {
|
|
4401
4410
|
i();
|
|
4402
4411
|
return;
|
|
4403
4412
|
}
|
|
4404
|
-
const
|
|
4405
|
-
if (!(
|
|
4413
|
+
const y = f.getBoundingClientRect();
|
|
4414
|
+
if (!(y.bottom > 0 && y.right > 0 && y.top < window.innerHeight && y.left < window.innerWidth && y.width > 0 && y.height > 0)) {
|
|
4406
4415
|
i();
|
|
4407
4416
|
return;
|
|
4408
4417
|
}
|
|
4409
|
-
const V =
|
|
4418
|
+
const V = h.getBoundingClientRect(), C = 8, I = 8, B = (M) => {
|
|
4410
4419
|
switch (M) {
|
|
4411
4420
|
case "top":
|
|
4412
4421
|
return {
|
|
4413
|
-
top:
|
|
4414
|
-
left:
|
|
4422
|
+
top: y.top - V.height - I,
|
|
4423
|
+
left: y.left + y.width / 2 - V.width / 2
|
|
4415
4424
|
};
|
|
4416
4425
|
case "bottom":
|
|
4417
4426
|
return {
|
|
4418
|
-
top:
|
|
4419
|
-
left:
|
|
4427
|
+
top: y.bottom + I,
|
|
4428
|
+
left: y.left + y.width / 2 - V.width / 2
|
|
4420
4429
|
};
|
|
4421
4430
|
case "left":
|
|
4422
4431
|
return {
|
|
4423
|
-
top:
|
|
4424
|
-
left:
|
|
4432
|
+
top: y.top + y.height / 2 - V.height / 2,
|
|
4433
|
+
left: y.left - V.width - I
|
|
4425
4434
|
};
|
|
4426
4435
|
case "right":
|
|
4427
4436
|
return {
|
|
4428
|
-
top:
|
|
4429
|
-
left:
|
|
4437
|
+
top: y.top + y.height / 2 - V.height / 2,
|
|
4438
|
+
left: y.right + I
|
|
4430
4439
|
};
|
|
4431
4440
|
case "topleft":
|
|
4432
4441
|
return {
|
|
4433
|
-
top:
|
|
4434
|
-
left:
|
|
4442
|
+
top: y.top - V.height - I,
|
|
4443
|
+
left: y.left
|
|
4435
4444
|
};
|
|
4436
4445
|
case "topright":
|
|
4437
4446
|
return {
|
|
4438
|
-
top:
|
|
4439
|
-
left:
|
|
4447
|
+
top: y.top - V.height - I,
|
|
4448
|
+
left: y.right - V.width
|
|
4440
4449
|
};
|
|
4441
4450
|
case "bottomleft":
|
|
4442
4451
|
return {
|
|
4443
|
-
top:
|
|
4444
|
-
left:
|
|
4452
|
+
top: y.bottom + I,
|
|
4453
|
+
left: y.left
|
|
4445
4454
|
};
|
|
4446
4455
|
case "bottomright":
|
|
4447
4456
|
return {
|
|
4448
|
-
top:
|
|
4449
|
-
left:
|
|
4457
|
+
top: y.bottom + I,
|
|
4458
|
+
left: y.right - V.width
|
|
4450
4459
|
};
|
|
4451
4460
|
default:
|
|
4452
4461
|
return { top: 0, left: 0 };
|
|
4453
4462
|
}
|
|
4454
|
-
},
|
|
4463
|
+
}, $ = (M) => {
|
|
4455
4464
|
const x = B(M);
|
|
4456
|
-
return x.top >=
|
|
4457
|
-
},
|
|
4465
|
+
return x.top >= C && x.left >= C && x.top + V.height <= window.innerHeight - C && x.left + V.width <= window.innerWidth - C;
|
|
4466
|
+
}, S = [g];
|
|
4458
4467
|
["bottomright", "bottom", "top", "right", "left", "bottomleft", "topright", "topleft"].forEach((M) => {
|
|
4459
|
-
|
|
4468
|
+
S.includes(M) || S.push(M);
|
|
4460
4469
|
});
|
|
4461
4470
|
let D = g, b = B(g);
|
|
4462
|
-
for (const M of
|
|
4463
|
-
if (
|
|
4471
|
+
for (const M of S)
|
|
4472
|
+
if ($(M)) {
|
|
4464
4473
|
D = M, b = B(M);
|
|
4465
4474
|
break;
|
|
4466
4475
|
}
|
|
4467
|
-
b.top = Math.max(
|
|
4476
|
+
b.top = Math.max(C, Math.min(b.top, window.innerHeight - V.height - C)), b.left = Math.max(C, Math.min(b.left, window.innerWidth - V.width - C)), a.value = D, o.value = {
|
|
4468
4477
|
position: "fixed",
|
|
4469
4478
|
top: `${b.top}px`,
|
|
4470
4479
|
left: `${b.left}px`,
|
|
@@ -4487,7 +4496,7 @@ const ur = {
|
|
|
4487
4496
|
document.addEventListener("keydown", u), window.addEventListener("scroll", c, !0), window.addEventListener("resize", v);
|
|
4488
4497
|
}), Ze(() => {
|
|
4489
4498
|
document.removeEventListener("keydown", u), window.removeEventListener("scroll", c, !0), window.removeEventListener("resize", v);
|
|
4490
|
-
}), (f,
|
|
4499
|
+
}), (f, h) => (d(), G(Ye, { to: "body" }, [
|
|
4491
4500
|
q(De, { name: "confirm" }, {
|
|
4492
4501
|
default: ee(() => [
|
|
4493
4502
|
m(Q) ? (d(), p("div", {
|
|
@@ -4499,9 +4508,9 @@ const ur = {
|
|
|
4499
4508
|
ref_key: "popupRef",
|
|
4500
4509
|
ref: t,
|
|
4501
4510
|
class: L(["confirm-popup", n.value]),
|
|
4502
|
-
onClick:
|
|
4511
|
+
onClick: h[0] || (h[0] = Je(() => {
|
|
4503
4512
|
}, ["stop"])),
|
|
4504
|
-
style:
|
|
4513
|
+
style: Z(o.value)
|
|
4505
4514
|
}, [
|
|
4506
4515
|
R("div", {
|
|
4507
4516
|
class: L(["confirm-popup__arrow", r.value])
|
|
@@ -4566,29 +4575,29 @@ const ur = {
|
|
|
4566
4575
|
isOpen: r,
|
|
4567
4576
|
open: i,
|
|
4568
4577
|
close: c
|
|
4569
|
-
}), (v, f) => (d(), G(
|
|
4578
|
+
}), (v, f) => (d(), G(Ye, { to: "body" }, [
|
|
4570
4579
|
q(De, { name: "drawer-animate" }, {
|
|
4571
4580
|
default: ee(() => [
|
|
4572
4581
|
r.value ? (d(), p("div", {
|
|
4573
4582
|
key: 0,
|
|
4574
4583
|
class: L(["drawer", { [`drawer--${v.position}`]: v.position }]),
|
|
4575
|
-
style:
|
|
4584
|
+
style: Z({ "--widthDrawer": l.value, zIndex: v.zIndex })
|
|
4576
4585
|
}, [
|
|
4577
4586
|
R("div", {
|
|
4578
4587
|
class: "drawer-overlay",
|
|
4579
|
-
onClick: f[0] || (f[0] = (
|
|
4588
|
+
onClick: f[0] || (f[0] = (h) => u())
|
|
4580
4589
|
}),
|
|
4581
4590
|
R("div", {
|
|
4582
4591
|
class: L(["drawer-wrapper", { "drawer-wrapper--no-style": v.wrapperNoStyle }])
|
|
4583
4592
|
}, [
|
|
4584
4593
|
R("div", ys, [
|
|
4585
4594
|
R("button", {
|
|
4586
|
-
onClick: f[1] || (f[1] = (
|
|
4595
|
+
onClick: f[1] || (f[1] = (h) => u())
|
|
4587
4596
|
}, [
|
|
4588
4597
|
q(m(wt))
|
|
4589
4598
|
])
|
|
4590
4599
|
]),
|
|
4591
|
-
|
|
4600
|
+
W(v.$slots, "default")
|
|
4592
4601
|
], 2)
|
|
4593
4602
|
], 6)) : T("", !0)
|
|
4594
4603
|
]),
|
|
@@ -4612,18 +4621,18 @@ const ur = {
|
|
|
4612
4621
|
}),
|
|
4613
4622
|
emits: ["update:open"],
|
|
4614
4623
|
setup(e) {
|
|
4615
|
-
const t = A(e.title), o = te(e, "open"), a =
|
|
4624
|
+
const t = A(e.title), o = te(e, "open"), a = jt(), { unlockScroll: n, lockScroll: r } = lt(), l = P(() => ["modal", `modal--${e.position}`]), s = (i) => {
|
|
4616
4625
|
t.value = i;
|
|
4617
4626
|
};
|
|
4618
4627
|
return se(o, () => {
|
|
4619
4628
|
o.value ? r() : n();
|
|
4620
|
-
}), (i, u) => (d(), G(
|
|
4629
|
+
}), (i, u) => (d(), G(Ye, { to: "body" }, [
|
|
4621
4630
|
q(De, { name: "modal-content-fade" }, {
|
|
4622
4631
|
default: ee(() => [
|
|
4623
4632
|
o.value ? (d(), p("div", {
|
|
4624
4633
|
key: 0,
|
|
4625
4634
|
class: L(l.value),
|
|
4626
|
-
style:
|
|
4635
|
+
style: Z({ "z-index": i.zIndex })
|
|
4627
4636
|
}, [
|
|
4628
4637
|
R("div", {
|
|
4629
4638
|
class: "modal__overlay",
|
|
@@ -4631,10 +4640,10 @@ const ur = {
|
|
|
4631
4640
|
}),
|
|
4632
4641
|
R("div", {
|
|
4633
4642
|
class: "modal__content",
|
|
4634
|
-
style:
|
|
4643
|
+
style: Z(i.style)
|
|
4635
4644
|
}, [
|
|
4636
4645
|
R("div", bs, [
|
|
4637
|
-
|
|
4646
|
+
W(i.$slots, "header"),
|
|
4638
4647
|
t.value && !a.header ? (d(), p("h2", ws, F(t.value), 1)) : T("", !0),
|
|
4639
4648
|
R("button", {
|
|
4640
4649
|
text: "",
|
|
@@ -4645,7 +4654,7 @@ const ur = {
|
|
|
4645
4654
|
])
|
|
4646
4655
|
]),
|
|
4647
4656
|
R("div", ks, [
|
|
4648
|
-
|
|
4657
|
+
W(i.$slots, "default", { setTitle: s })
|
|
4649
4658
|
])
|
|
4650
4659
|
], 4)
|
|
4651
4660
|
], 6)) : T("", !0)
|
|
@@ -4672,7 +4681,7 @@ const ur = {
|
|
|
4672
4681
|
e.multiple ? o.value.includes(n) ? o.value = o.value.filter((r) => r !== n) : o.value.push(n) : o.value = o.value[0] === n ? [] : [n];
|
|
4673
4682
|
}
|
|
4674
4683
|
return be("accordionOpenValues", o), be("accordionToggle", a), be("accordionIsMultiple", e.multiple ?? !1), be("accordionStyle", t), (n, r) => (d(), p("div", $s, [
|
|
4675
|
-
|
|
4684
|
+
W(n.$slots, "default")
|
|
4676
4685
|
]));
|
|
4677
4686
|
}
|
|
4678
4687
|
}), kr = /* @__PURE__ */ O({
|
|
@@ -4685,14 +4694,14 @@ const ur = {
|
|
|
4685
4694
|
t.value && o.value && (a.value = o.value.scrollHeight + "px");
|
|
4686
4695
|
}), (r, l) => (d(), p("div", {
|
|
4687
4696
|
class: "accordion-content-wrapper",
|
|
4688
|
-
style:
|
|
4697
|
+
style: Z({ height: m(t) ? a.value : "0px" })
|
|
4689
4698
|
}, [
|
|
4690
4699
|
Me(R("div", {
|
|
4691
4700
|
ref_key: "contentRef",
|
|
4692
4701
|
ref: o,
|
|
4693
4702
|
class: "accordion-content"
|
|
4694
4703
|
}, [
|
|
4695
|
-
|
|
4704
|
+
W(r.$slots, "default")
|
|
4696
4705
|
], 512), [
|
|
4697
4706
|
[Kt, n.value]
|
|
4698
4707
|
])
|
|
@@ -4708,7 +4717,7 @@ const ur = {
|
|
|
4708
4717
|
(...l) => m(o) && m(o)(...l))
|
|
4709
4718
|
}, [
|
|
4710
4719
|
R("span", Ss, [
|
|
4711
|
-
|
|
4720
|
+
W(n.$slots, "default")
|
|
4712
4721
|
]),
|
|
4713
4722
|
R("span", Cs, [
|
|
4714
4723
|
q(m(Zt))
|
|
@@ -4725,7 +4734,7 @@ const ur = {
|
|
|
4725
4734
|
return be("panelValue", t.value), be("panelIsOpen", r), be("panelToggle", () => a?.(t.value)), (l, s) => (d(), p("div", {
|
|
4726
4735
|
class: L(["accordion-panel", `accordion-panel--${m(n)}`])
|
|
4727
4736
|
}, [
|
|
4728
|
-
|
|
4737
|
+
W(l.$slots, "default")
|
|
4729
4738
|
], 2));
|
|
4730
4739
|
}
|
|
4731
4740
|
}), xs = {
|
|
@@ -4744,7 +4753,7 @@ const ur = {
|
|
|
4744
4753
|
class: L(t.value)
|
|
4745
4754
|
}, [
|
|
4746
4755
|
o.$slots.default ? (d(), p("div", xs, [
|
|
4747
|
-
|
|
4756
|
+
W(o.$slots, "default")
|
|
4748
4757
|
])) : T("", !0)
|
|
4749
4758
|
], 2));
|
|
4750
4759
|
}
|
|
@@ -4825,7 +4834,7 @@ const ur = {
|
|
|
4825
4834
|
role: "tab",
|
|
4826
4835
|
"aria-selected": n.value
|
|
4827
4836
|
}, [
|
|
4828
|
-
|
|
4837
|
+
W(r.$slots, "default")
|
|
4829
4838
|
], 10, Ds));
|
|
4830
4839
|
}
|
|
4831
4840
|
}), Ls = { class: "tabs" }, Mr = /* @__PURE__ */ O({
|
|
@@ -4843,7 +4852,7 @@ const ur = {
|
|
|
4843
4852
|
n.value = l, a("update:value", l);
|
|
4844
4853
|
}
|
|
4845
4854
|
return be("tabsValue", n), be("setTabsValue", r), (l, s) => (d(), p("div", Ls, [
|
|
4846
|
-
|
|
4855
|
+
W(l.$slots, "default")
|
|
4847
4856
|
]));
|
|
4848
4857
|
}
|
|
4849
4858
|
}), Os = {
|
|
@@ -4857,7 +4866,7 @@ const ur = {
|
|
|
4857
4866
|
setup(e) {
|
|
4858
4867
|
const t = e, o = de("tabsValue"), a = P(() => o?.value === t.value);
|
|
4859
4868
|
return (n, r) => Me((d(), p("div", Os, [
|
|
4860
|
-
|
|
4869
|
+
W(n.$slots, "default")
|
|
4861
4870
|
], 512)), [
|
|
4862
4871
|
[Kt, a.value]
|
|
4863
4872
|
]);
|
|
@@ -4870,7 +4879,7 @@ const ur = {
|
|
|
4870
4879
|
setup(e) {
|
|
4871
4880
|
return (t, o) => (d(), p("div", Es, [
|
|
4872
4881
|
R("div", _s, [
|
|
4873
|
-
|
|
4882
|
+
W(t.$slots, "default")
|
|
4874
4883
|
])
|
|
4875
4884
|
]));
|
|
4876
4885
|
}
|
|
@@ -4878,7 +4887,7 @@ const ur = {
|
|
|
4878
4887
|
__name: "TabPanels",
|
|
4879
4888
|
setup(e) {
|
|
4880
4889
|
return (t, o) => (d(), p("div", zs, [
|
|
4881
|
-
|
|
4890
|
+
W(t.$slots, "default")
|
|
4882
4891
|
]));
|
|
4883
4892
|
}
|
|
4884
4893
|
}), Hs = { class: "tooltip__content" }, Gs = /* @__PURE__ */ O({
|
|
@@ -4896,7 +4905,7 @@ const ur = {
|
|
|
4896
4905
|
let i = null, u = null, c = null;
|
|
4897
4906
|
const v = async () => {
|
|
4898
4907
|
if (!i || !a.value) return;
|
|
4899
|
-
const g = a.value.querySelector(".tooltip__arrow"), { x:
|
|
4908
|
+
const g = a.value.querySelector(".tooltip__arrow"), { x: y, y: w, placement: V, middlewareData: C } = await fo(
|
|
4900
4909
|
i,
|
|
4901
4910
|
a.value,
|
|
4902
4911
|
{
|
|
@@ -4910,21 +4919,21 @@ const ur = {
|
|
|
4910
4919
|
}
|
|
4911
4920
|
);
|
|
4912
4921
|
if (r.value = V, l.value = {
|
|
4913
|
-
left: `${
|
|
4922
|
+
left: `${y}px`,
|
|
4914
4923
|
top: `${w}px`
|
|
4915
|
-
}, o.showArrow &&
|
|
4916
|
-
const { x: I, y: B } =
|
|
4924
|
+
}, o.showArrow && C.arrow && g) {
|
|
4925
|
+
const { x: I, y: B } = C.arrow, $ = V.split("-")[0], S = {
|
|
4917
4926
|
top: "bottom",
|
|
4918
4927
|
right: "left",
|
|
4919
4928
|
bottom: "top",
|
|
4920
4929
|
left: "right"
|
|
4921
|
-
}[
|
|
4930
|
+
}[$];
|
|
4922
4931
|
s.value = {
|
|
4923
4932
|
left: I != null ? `${I}px` : "",
|
|
4924
4933
|
top: B != null ? `${B}px` : "",
|
|
4925
4934
|
right: "",
|
|
4926
4935
|
bottom: "",
|
|
4927
|
-
[
|
|
4936
|
+
[S]: "-4px"
|
|
4928
4937
|
};
|
|
4929
4938
|
}
|
|
4930
4939
|
};
|
|
@@ -4939,7 +4948,7 @@ const ur = {
|
|
|
4939
4948
|
n.value = !1, i = null;
|
|
4940
4949
|
}, 50);
|
|
4941
4950
|
}
|
|
4942
|
-
}), (g,
|
|
4951
|
+
}), (g, y) => (d(), G(Ye, { to: "body" }, [
|
|
4943
4952
|
q(De, { name: "tooltip-fade" }, {
|
|
4944
4953
|
default: ee(() => [
|
|
4945
4954
|
n.value ? (d(), p("div", {
|
|
@@ -4947,14 +4956,14 @@ const ur = {
|
|
|
4947
4956
|
ref_key: "tooltipRef",
|
|
4948
4957
|
ref: a,
|
|
4949
4958
|
class: L(["tooltip", [`tooltip--${r.value}`, g.tooltipClass]]),
|
|
4950
|
-
style:
|
|
4959
|
+
style: Z(l.value),
|
|
4951
4960
|
role: "tooltip"
|
|
4952
4961
|
}, [
|
|
4953
4962
|
R("div", Hs, F(g.content), 1),
|
|
4954
4963
|
g.showArrow ? (d(), p("div", {
|
|
4955
4964
|
key: 0,
|
|
4956
4965
|
class: "tooltip__arrow",
|
|
4957
|
-
style:
|
|
4966
|
+
style: Z(s.value)
|
|
4958
4967
|
}, null, 4)) : T("", !0)
|
|
4959
4968
|
], 6)) : T("", !0)
|
|
4960
4969
|
]),
|