prlg-ui 1.8.0 → 1.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +7 -0
- package/dist/prlg-ui.cjs.js +1 -1
- package/dist/prlg-ui.css +1 -1
- package/dist/prlg-ui.es.js +473 -470
- package/package.json +1 -1
package/dist/prlg-ui.es.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as O, computed as P, resolveComponent as jt, createBlock as G, openBlock as d, resolveDynamicComponent as Ce, normalizeClass as L, withCtx as ee, createCommentVNode as T, createElementBlock as p, renderSlot as Y, 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
|
|
1
|
+
import { defineComponent as O, computed as P, resolveComponent as jt, createBlock as G, openBlock as d, resolveDynamicComponent as Ce, normalizeClass as L, withCtx as ee, createCommentVNode as T, createElementBlock as p, renderSlot as Y, 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 Wt, inject as de, toValue as ze, isRef as Mo, vModelText as Yt, toRef as Ue, createStaticVNode as Vo, Teleport as je, reactive as Ut, TransitionGroup as Po, vShow as Kt, createApp as Io } from "vue";
|
|
2
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 jo, f as Wo } from "./WarningFillIcon-cJBG6d6O.js";
|
|
3
|
-
import { o as Jt, d as
|
|
3
|
+
import { o as Jt, d as K } from "./parseFileSize.util-CxVk4CvB.js";
|
|
4
4
|
import { _ as le, a as Yo, 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";
|
|
@@ -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
393
|
switch (We(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 && We(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
|
}
|
|
@@ -686,7 +686,7 @@ async function Mn(e, t) {
|
|
|
686
686
|
} = e, r = await (a.isRTL == null ? void 0 : a.isRTL(n.floating)), l = Te(o), s = We(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 = We(n),
|
|
801
|
+
} = Oe(e, t), c = await Ke(t, u), v = Te(n), f = We(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 {
|
|
@@ -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 {
|
|
@@ -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
|
|
@@ -1385,35 +1385,35 @@ const al = { class: "popover__content" }, sl = {
|
|
|
1385
1385
|
emits: ["update:modelValue"],
|
|
1386
1386
|
setup(e, { expose: t, emit: o }) {
|
|
1387
1387
|
So((j) => ({
|
|
1388
|
-
aa040ed6:
|
|
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: j, elements:
|
|
1401
|
-
Object.assign(
|
|
1400
|
+
apply({ availableWidth: j, elements: X }) {
|
|
1401
|
+
Object.assign(X.floating.style, {
|
|
1402
1402
|
maxWidth: `${Math.max(200, j)}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 }),
|
|
@@ -1438,9 +1438,9 @@ const al = { class: "popover__content" }, sl = {
|
|
|
1438
1438
|
x.value = !1;
|
|
1439
1439
|
}, re = (j) => {
|
|
1440
1440
|
if (s.value === "button-only" || E.value) return;
|
|
1441
|
-
const
|
|
1442
|
-
if (!(g.value &&
|
|
1443
|
-
if (f.value &&
|
|
1441
|
+
const X = j.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
1445
|
x.value && W();
|
|
1446
1446
|
}, 0);
|
|
@@ -1450,18 +1450,18 @@ const al = { class: "popover__content" }, sl = {
|
|
|
1450
1450
|
}
|
|
1451
1451
|
}, ue = P(() => {
|
|
1452
1452
|
if (!I.value.arrow) return {};
|
|
1453
|
-
const { x: j, y:
|
|
1454
|
-
switch (
|
|
1453
|
+
const { x: j, y: X } = I.value.arrow;
|
|
1454
|
+
switch ($.value) {
|
|
1455
1455
|
case "top":
|
|
1456
1456
|
return {
|
|
1457
1457
|
left: j ? `${j}px` : "-9px",
|
|
1458
|
-
bottom:
|
|
1458
|
+
bottom: X ? `${X}px` : "-9px"
|
|
1459
1459
|
};
|
|
1460
1460
|
case "bottom":
|
|
1461
1461
|
default:
|
|
1462
1462
|
return {
|
|
1463
1463
|
left: j ? `${j}px` : "-9px",
|
|
1464
|
-
top:
|
|
1464
|
+
top: X ? `${X}px` : "-9px"
|
|
1465
1465
|
};
|
|
1466
1466
|
}
|
|
1467
1467
|
});
|
|
@@ -1488,28 +1488,28 @@ const al = { class: "popover__content" }, sl = {
|
|
|
1488
1488
|
closeSecondScreen: W,
|
|
1489
1489
|
isOpen: N,
|
|
1490
1490
|
isSecondScreenOpen: x
|
|
1491
|
-
}), (j,
|
|
1491
|
+
}), (j, 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
1500
|
Y(j.$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, [
|
|
@@ -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,7 +1542,7 @@ 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
1547
|
Y(j.$slots, "second-screen", { closeSecondScreen: W }, void 0, !0)
|
|
1548
1548
|
], 4)) : T("", !0)
|
|
@@ -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
|
}
|
|
@@ -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));
|
|
@@ -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,21 +2191,21 @@ 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))
|
|
@@ -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,
|
|
@@ -2448,7 +2448,7 @@ const al = { class: "popover__content" }, sl = {
|
|
|
2448
2448
|
}),
|
|
2449
2449
|
emits: /* @__PURE__ */ U(["update:selectedRows", "rowClickHandler"], ["update:currentPage", "update:perPage"]),
|
|
2450
2450
|
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),
|
|
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), h = A(null), g = A(), y = te(e, "currentPage"), w = te(e, "perPage"), V = (b) => {
|
|
2452
2452
|
if (e.virtualScroll && e.virtualScroll.enable && g.value) {
|
|
2453
2453
|
const M = b.target;
|
|
2454
2454
|
g.value.handleScroll(M);
|
|
@@ -2461,17 +2461,17 @@ const al = { class: "popover__content" }, sl = {
|
|
|
2461
2461
|
b && g.value.updateContainerHeight(b);
|
|
2462
2462
|
}
|
|
2463
2463
|
});
|
|
2464
|
-
const
|
|
2464
|
+
const C = P(() => {
|
|
2465
2465
|
let b = [...e.data];
|
|
2466
|
-
if (
|
|
2467
|
-
const { field: x, order: H } =
|
|
2466
|
+
if (h.value) {
|
|
2467
|
+
const { field: x, order: H } = h.value;
|
|
2468
2468
|
b.sort((z, E) => {
|
|
2469
2469
|
const N = z[x], _ = E[x];
|
|
2470
2470
|
return N === _ ? 0 : H === 1 ? N > _ ? 1 : -1 : N < _ ? 1 : -1;
|
|
2471
2471
|
});
|
|
2472
2472
|
}
|
|
2473
2473
|
const M = r(b);
|
|
2474
|
-
return e.rowGroupMode === "rowspan" && e.groupRowsBy ? M.filter((x) =>
|
|
2474
|
+
return e.rowGroupMode === "rowspan" && e.groupRowsBy ? M.filter((x) => k.value.has(x._groupValue) ? x._isFirstInGroup : !0) : M;
|
|
2475
2475
|
}), I = P(() => e.scroller && e.scroller.enable || e.virtualScroll && e.virtualScroll.enable || e.maxHeight), B = P(() => [
|
|
2476
2476
|
"table",
|
|
2477
2477
|
{
|
|
@@ -2480,23 +2480,23 @@ const al = { class: "popover__content" }, sl = {
|
|
|
2480
2480
|
"table--with-virtual-scroll": e.virtualScroll && e.virtualScroll.enable,
|
|
2481
2481
|
"table--scrollable": I.value
|
|
2482
2482
|
}
|
|
2483
|
-
]),
|
|
2483
|
+
]), $ = P(() => [
|
|
2484
2484
|
"table-wrapper",
|
|
2485
2485
|
{
|
|
2486
2486
|
"table-wrapper--scrollable": I.value
|
|
2487
2487
|
}
|
|
2488
|
-
]),
|
|
2488
|
+
]), S = P(() => {
|
|
2489
2489
|
const b = {};
|
|
2490
2490
|
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
|
-
|
|
2491
|
+
}), k = A(/* @__PURE__ */ new Set()), D = (b) => {
|
|
2492
|
+
k.value.has(b) ? k.value.delete(b) : k.value.add(b);
|
|
2493
2493
|
};
|
|
2494
2494
|
return se(u, (b) => {
|
|
2495
2495
|
o("update:selectedRows", b);
|
|
2496
2496
|
}), (b, M) => I.value ? (d(), p("div", {
|
|
2497
2497
|
key: 0,
|
|
2498
|
-
class: L(
|
|
2499
|
-
style:
|
|
2498
|
+
class: L($.value),
|
|
2499
|
+
style: Z(S.value),
|
|
2500
2500
|
onScroll: V
|
|
2501
2501
|
}, [
|
|
2502
2502
|
R("table", {
|
|
@@ -2510,7 +2510,7 @@ const al = { class: "popover__content" }, sl = {
|
|
|
2510
2510
|
sortMode: b.sortMode,
|
|
2511
2511
|
sortField: b.sortField,
|
|
2512
2512
|
onSelectAllRow: m(f),
|
|
2513
|
-
"onUpdate:sort": M[0] || (M[0] = (x) =>
|
|
2513
|
+
"onUpdate:sort": M[0] || (M[0] = (x) => h.value = x)
|
|
2514
2514
|
}, null, 8, ["size", "columns", "isSelectedAll", "sortMode", "sortField", "onSelectAllRow"]),
|
|
2515
2515
|
q(Ft, {
|
|
2516
2516
|
ref_key: "tableBodyRef",
|
|
@@ -2518,10 +2518,10 @@ const al = { class: "popover__content" }, sl = {
|
|
|
2518
2518
|
size: b.size,
|
|
2519
2519
|
selectedRows: m(u),
|
|
2520
2520
|
columns: m(l),
|
|
2521
|
-
data:
|
|
2521
|
+
data: C.value,
|
|
2522
2522
|
rowGroupMode: b.rowGroupMode,
|
|
2523
2523
|
groupRowsBy: b.groupRowsBy,
|
|
2524
|
-
collapsedGroups:
|
|
2524
|
+
collapsedGroups: k.value,
|
|
2525
2525
|
colorHovered: b.rowColorHovered,
|
|
2526
2526
|
scroller: b.scroller || void 0,
|
|
2527
2527
|
virtualScroll: b.virtualScroll || void 0,
|
|
@@ -2532,11 +2532,11 @@ const al = { class: "popover__content" }, sl = {
|
|
|
2532
2532
|
}, null, 8, ["size", "selectedRows", "columns", "data", "rowGroupMode", "groupRowsBy", "collapsedGroups", "colorHovered", "scroller", "virtualScroll", "rowStyle"])
|
|
2533
2533
|
], 2),
|
|
2534
2534
|
q(Nt, {
|
|
2535
|
-
currentPage:
|
|
2536
|
-
"onUpdate:currentPage": M[4] || (M[4] = (x) =>
|
|
2535
|
+
currentPage: y.value,
|
|
2536
|
+
"onUpdate:currentPage": M[4] || (M[4] = (x) => y.value = x),
|
|
2537
2537
|
"per-page": w.value,
|
|
2538
2538
|
"onUpdate:perPage": M[5] || (M[5] = (x) => w.value = x),
|
|
2539
|
-
data:
|
|
2539
|
+
data: C.value,
|
|
2540
2540
|
"per-page-options": b.perPageOptions,
|
|
2541
2541
|
"totals-row": b.totals,
|
|
2542
2542
|
paginator: b.paginator
|
|
@@ -2553,7 +2553,7 @@ const al = { class: "popover__content" }, sl = {
|
|
|
2553
2553
|
sortMode: b.sortMode,
|
|
2554
2554
|
sortField: b.sortField,
|
|
2555
2555
|
onSelectAllRow: m(f),
|
|
2556
|
-
"onUpdate:sort": M[6] || (M[6] = (x) =>
|
|
2556
|
+
"onUpdate:sort": M[6] || (M[6] = (x) => h.value = x)
|
|
2557
2557
|
}, null, 8, ["size", "columns", "isSelectedAll", "sortMode", "sortField", "onSelectAllRow"]),
|
|
2558
2558
|
q(Ft, {
|
|
2559
2559
|
ref_key: "tableBodyRef",
|
|
@@ -2561,10 +2561,10 @@ const al = { class: "popover__content" }, sl = {
|
|
|
2561
2561
|
size: b.size,
|
|
2562
2562
|
selectedRows: m(u),
|
|
2563
2563
|
columns: m(l),
|
|
2564
|
-
data:
|
|
2564
|
+
data: C.value,
|
|
2565
2565
|
rowGroupMode: b.rowGroupMode,
|
|
2566
2566
|
groupRowsBy: b.groupRowsBy,
|
|
2567
|
-
collapsedGroups:
|
|
2567
|
+
collapsedGroups: k.value,
|
|
2568
2568
|
colorHovered: b.rowColorHovered,
|
|
2569
2569
|
scroller: b.scroller || void 0,
|
|
2570
2570
|
virtualScroll: b.virtualScroll || void 0,
|
|
@@ -2574,11 +2574,11 @@ const al = { class: "popover__content" }, sl = {
|
|
|
2574
2574
|
onToggleGroup: M[9] || (M[9] = (x) => D(x))
|
|
2575
2575
|
}, null, 8, ["size", "selectedRows", "columns", "data", "rowGroupMode", "groupRowsBy", "collapsedGroups", "colorHovered", "scroller", "virtualScroll", "rowStyle"]),
|
|
2576
2576
|
q(Nt, {
|
|
2577
|
-
currentPage:
|
|
2578
|
-
"onUpdate:currentPage": M[10] || (M[10] = (x) =>
|
|
2577
|
+
currentPage: y.value,
|
|
2578
|
+
"onUpdate:currentPage": M[10] || (M[10] = (x) => y.value = x),
|
|
2579
2579
|
"per-page": w.value,
|
|
2580
2580
|
"onUpdate:perPage": M[11] || (M[11] = (x) => w.value = x),
|
|
2581
|
-
data:
|
|
2581
|
+
data: C.value,
|
|
2582
2582
|
"per-page-options": b.perPageOptions,
|
|
2583
2583
|
"totals-row": b.totals,
|
|
2584
2584
|
paginator: b.paginator
|
|
@@ -2665,27 +2665,27 @@ function ga(e, t) {
|
|
|
2665
2665
|
...r
|
|
2666
2666
|
// кастомные определения
|
|
2667
2667
|
};
|
|
2668
|
-
function u(
|
|
2669
|
-
const
|
|
2670
|
-
return
|
|
2671
|
-
required:
|
|
2672
|
-
optional:
|
|
2668
|
+
function u(S) {
|
|
2669
|
+
const k = S.indexOf("?");
|
|
2670
|
+
return k === -1 ? { required: S, optional: "" } : {
|
|
2671
|
+
required: S.substring(0, k),
|
|
2672
|
+
optional: S.substring(k + 1)
|
|
2673
2673
|
};
|
|
2674
2674
|
}
|
|
2675
|
-
function c(
|
|
2676
|
-
return
|
|
2675
|
+
function c(S) {
|
|
2676
|
+
return S in i;
|
|
2677
2677
|
}
|
|
2678
|
-
function v(
|
|
2679
|
-
return c(
|
|
2678
|
+
function v(S, k) {
|
|
2679
|
+
return c(k) ? i[k].test(S) : !1;
|
|
2680
2680
|
}
|
|
2681
|
-
function f(
|
|
2682
|
-
const { required:
|
|
2681
|
+
function f(S) {
|
|
2682
|
+
const { required: k, optional: D } = u(o), b = k + D;
|
|
2683
2683
|
let M = "", x = 0, H = 0;
|
|
2684
2684
|
for (; H < b.length; ) {
|
|
2685
2685
|
const z = b[H];
|
|
2686
2686
|
if (c(z))
|
|
2687
|
-
if (x <
|
|
2688
|
-
const E =
|
|
2687
|
+
if (x < S.length) {
|
|
2688
|
+
const E = S[x];
|
|
2689
2689
|
if (v(E, z))
|
|
2690
2690
|
M += E, x++;
|
|
2691
2691
|
else {
|
|
@@ -2700,23 +2700,23 @@ function ga(e, t) {
|
|
|
2700
2700
|
}
|
|
2701
2701
|
return M;
|
|
2702
2702
|
}
|
|
2703
|
-
function
|
|
2704
|
-
const { required:
|
|
2705
|
-
return (
|
|
2703
|
+
function h() {
|
|
2704
|
+
const { required: S, optional: k } = u(o);
|
|
2705
|
+
return (S + k).replace(/[9a*]/g, a);
|
|
2706
2706
|
}
|
|
2707
|
-
function g(
|
|
2708
|
-
const { required:
|
|
2707
|
+
function g(S) {
|
|
2708
|
+
const { required: k, optional: D } = u(o), b = k + D;
|
|
2709
2709
|
let M = "", x = 0, H = 0;
|
|
2710
|
-
for (; x <
|
|
2711
|
-
const z =
|
|
2710
|
+
for (; x < S.length && H < b.length; ) {
|
|
2711
|
+
const z = S[x], E = b[H];
|
|
2712
2712
|
if (z === a) {
|
|
2713
2713
|
x++;
|
|
2714
2714
|
continue;
|
|
2715
2715
|
}
|
|
2716
2716
|
c(E) ? v(z, E) ? (M += z, x++, H++) : x++ : (z === E && x++, H++);
|
|
2717
2717
|
}
|
|
2718
|
-
for (; x <
|
|
2719
|
-
const z =
|
|
2718
|
+
for (; x < S.length; ) {
|
|
2719
|
+
const z = S[x];
|
|
2720
2720
|
if (z === a) {
|
|
2721
2721
|
x++;
|
|
2722
2722
|
continue;
|
|
@@ -2735,25 +2735,25 @@ function ga(e, t) {
|
|
|
2735
2735
|
}
|
|
2736
2736
|
return M;
|
|
2737
2737
|
}
|
|
2738
|
-
function
|
|
2739
|
-
const { required:
|
|
2740
|
-
return g(
|
|
2738
|
+
function y(S) {
|
|
2739
|
+
const { required: k } = u(o), D = k.replace(/[^9a*]/g, "").length;
|
|
2740
|
+
return g(S).length >= D;
|
|
2741
2741
|
}
|
|
2742
2742
|
function w() {
|
|
2743
|
-
const
|
|
2744
|
-
if (s.value ||
|
|
2745
|
-
l.value = f(
|
|
2743
|
+
const S = ze(e) || "";
|
|
2744
|
+
if (s.value || S)
|
|
2745
|
+
l.value = f(S);
|
|
2746
2746
|
else {
|
|
2747
|
-
const { required:
|
|
2747
|
+
const { required: k, optional: D } = u(o), b = k + D;
|
|
2748
2748
|
let M = "";
|
|
2749
2749
|
for (let x = 0; x < b.length && !c(b[x]); x++)
|
|
2750
2750
|
M += b[x];
|
|
2751
2751
|
l.value = M;
|
|
2752
2752
|
}
|
|
2753
2753
|
}
|
|
2754
|
-
function V(
|
|
2755
|
-
if (!
|
|
2756
|
-
const
|
|
2754
|
+
function V(S) {
|
|
2755
|
+
if (!S.isTrusted) return;
|
|
2756
|
+
const k = S.target, D = k.value, b = g(D), M = f(b);
|
|
2757
2757
|
l.value = M, e.value = b, pe(() => {
|
|
2758
2758
|
const { required: x, optional: H } = u(o), z = x + H;
|
|
2759
2759
|
let E = 0, N = 0;
|
|
@@ -2773,13 +2773,13 @@ function ga(e, t) {
|
|
|
2773
2773
|
break;
|
|
2774
2774
|
}
|
|
2775
2775
|
}
|
|
2776
|
-
E = Math.min(E, M.length),
|
|
2776
|
+
E = Math.min(E, M.length), k.setSelectionRange(E, E);
|
|
2777
2777
|
});
|
|
2778
2778
|
}
|
|
2779
|
-
function S
|
|
2780
|
-
const
|
|
2779
|
+
function C(S) {
|
|
2780
|
+
const k = S.target;
|
|
2781
2781
|
setTimeout(() => {
|
|
2782
|
-
const D =
|
|
2782
|
+
const D = k.value, b = g(D), M = f(b);
|
|
2783
2783
|
l.value = M, e.value = b;
|
|
2784
2784
|
const { required: x, optional: H } = u(o), z = x + H;
|
|
2785
2785
|
let E = 0, N = 0;
|
|
@@ -2799,16 +2799,16 @@ function ga(e, t) {
|
|
|
2799
2799
|
break;
|
|
2800
2800
|
}
|
|
2801
2801
|
}
|
|
2802
|
-
E = Math.min(E, M.length),
|
|
2802
|
+
E = Math.min(E, M.length), k.setSelectionRange(E, E);
|
|
2803
2803
|
}, 0);
|
|
2804
2804
|
}
|
|
2805
|
-
function I(
|
|
2806
|
-
const
|
|
2807
|
-
if (
|
|
2808
|
-
if (
|
|
2805
|
+
function I(S) {
|
|
2806
|
+
const k = S.target, D = k.selectionStart || 0;
|
|
2807
|
+
if (S.key === "Backspace") {
|
|
2808
|
+
if (S.metaKey || S.ctrlKey)
|
|
2809
2809
|
return;
|
|
2810
|
-
|
|
2811
|
-
const _ =
|
|
2810
|
+
S.preventDefault();
|
|
2811
|
+
const _ = k.selectionStart || 0, ne = k.selectionEnd || 0;
|
|
2812
2812
|
if (_ !== ne) {
|
|
2813
2813
|
l.value = f(""), e.value = "", pe(() => {
|
|
2814
2814
|
const { required: ae, optional: ie } = u(o), W = ae + ie;
|
|
@@ -2818,7 +2818,7 @@ function ga(e, t) {
|
|
|
2818
2818
|
re = ue;
|
|
2819
2819
|
break;
|
|
2820
2820
|
}
|
|
2821
|
-
|
|
2821
|
+
k.setSelectionRange(re, re);
|
|
2822
2822
|
});
|
|
2823
2823
|
return;
|
|
2824
2824
|
}
|
|
@@ -2826,13 +2826,13 @@ function ga(e, t) {
|
|
|
2826
2826
|
const ae = l.value;
|
|
2827
2827
|
let ie = "", W = -1;
|
|
2828
2828
|
const { required: re, optional: ue } = u(o), j = re + ue;
|
|
2829
|
-
for (let
|
|
2830
|
-
if (
|
|
2831
|
-
W =
|
|
2829
|
+
for (let X = D - 1; X >= 0; X--)
|
|
2830
|
+
if (X < j.length && c(j[X])) {
|
|
2831
|
+
W = X;
|
|
2832
2832
|
break;
|
|
2833
2833
|
}
|
|
2834
2834
|
if (W >= 0) {
|
|
2835
|
-
let
|
|
2835
|
+
let X = g(ae), Ye = 0;
|
|
2836
2836
|
for (let Pe = 0; Pe <= W; Pe++) {
|
|
2837
2837
|
const { required: bo, optional: wo } = u(o), Mt = bo + wo;
|
|
2838
2838
|
if (Pe < Mt.length && c(Mt[Pe])) {
|
|
@@ -2840,18 +2840,18 @@ function ga(e, t) {
|
|
|
2840
2840
|
Ye++;
|
|
2841
2841
|
}
|
|
2842
2842
|
}
|
|
2843
|
-
|
|
2844
|
-
|
|
2843
|
+
X = X.slice(0, Ye) + X.slice(Ye + 1), ie = f(X), l.value = ie, e.value = X, pe(() => {
|
|
2844
|
+
k.setSelectionRange(W, W);
|
|
2845
2845
|
});
|
|
2846
2846
|
}
|
|
2847
2847
|
}
|
|
2848
2848
|
return;
|
|
2849
2849
|
}
|
|
2850
|
-
if (
|
|
2851
|
-
if (
|
|
2850
|
+
if (S.key === "Delete") {
|
|
2851
|
+
if (S.metaKey || S.ctrlKey)
|
|
2852
2852
|
return;
|
|
2853
|
-
|
|
2854
|
-
const _ =
|
|
2853
|
+
S.preventDefault();
|
|
2854
|
+
const _ = k.selectionStart || 0, ne = k.selectionEnd || 0;
|
|
2855
2855
|
if (_ !== ne) {
|
|
2856
2856
|
l.value = f(""), e.value = "", pe(() => {
|
|
2857
2857
|
const { required: ae, optional: ie } = u(o), W = ae + ie;
|
|
@@ -2861,7 +2861,7 @@ function ga(e, t) {
|
|
|
2861
2861
|
re = ue;
|
|
2862
2862
|
break;
|
|
2863
2863
|
}
|
|
2864
|
-
|
|
2864
|
+
k.setSelectionRange(re, re);
|
|
2865
2865
|
});
|
|
2866
2866
|
return;
|
|
2867
2867
|
}
|
|
@@ -2878,7 +2878,7 @@ function ga(e, t) {
|
|
|
2878
2878
|
if (ie >= 0) {
|
|
2879
2879
|
let W = g(ae), re = 0;
|
|
2880
2880
|
for (let j = 0; j <= ie; j++) {
|
|
2881
|
-
const { required:
|
|
2881
|
+
const { required: X, optional: Ye } = u(o), Pe = X + Ye;
|
|
2882
2882
|
if (j < Pe.length && c(Pe[j])) {
|
|
2883
2883
|
if (j === ie) break;
|
|
2884
2884
|
re++;
|
|
@@ -2887,17 +2887,17 @@ function ga(e, t) {
|
|
|
2887
2887
|
W = W.slice(0, re) + W.slice(re + 1);
|
|
2888
2888
|
const ue = f(W);
|
|
2889
2889
|
l.value = ue, e.value = W, pe(() => {
|
|
2890
|
-
|
|
2890
|
+
k.setSelectionRange(D, D);
|
|
2891
2891
|
});
|
|
2892
2892
|
}
|
|
2893
2893
|
}
|
|
2894
2894
|
return;
|
|
2895
2895
|
}
|
|
2896
|
-
if (
|
|
2896
|
+
if (S.metaKey || S.ctrlKey || ["ArrowLeft", "ArrowRight", "Tab", "Home", "End", "Escape"].includes(S.key))
|
|
2897
2897
|
return;
|
|
2898
2898
|
const { required: b, optional: M } = u(o), x = b + M, H = g(l.value), z = x.split("").filter((_) => c(_)).length;
|
|
2899
2899
|
if (H.length >= z) {
|
|
2900
|
-
|
|
2900
|
+
S.preventDefault();
|
|
2901
2901
|
return;
|
|
2902
2902
|
}
|
|
2903
2903
|
let E = -1, N = 0;
|
|
@@ -2909,11 +2909,11 @@ function ga(e, t) {
|
|
|
2909
2909
|
}
|
|
2910
2910
|
N++;
|
|
2911
2911
|
}
|
|
2912
|
-
E >= 0 && !v(
|
|
2912
|
+
E >= 0 && !v(S.key, x[E]) && S.preventDefault();
|
|
2913
2913
|
}
|
|
2914
|
-
function B(
|
|
2914
|
+
function B(S) {
|
|
2915
2915
|
s.value = !0, pe(() => {
|
|
2916
|
-
const
|
|
2916
|
+
const k = S.target, { required: D, optional: b } = u(o), M = D + b;
|
|
2917
2917
|
let x = 0;
|
|
2918
2918
|
for (let H = 0; H < M.length; H++)
|
|
2919
2919
|
if (c(M[H])) {
|
|
@@ -2932,24 +2932,24 @@ function ga(e, t) {
|
|
|
2932
2932
|
}
|
|
2933
2933
|
H === ze(e).length && (x = l.value.length);
|
|
2934
2934
|
}
|
|
2935
|
-
|
|
2935
|
+
k.setSelectionRange(x, x);
|
|
2936
2936
|
});
|
|
2937
2937
|
}
|
|
2938
|
-
function
|
|
2939
|
-
s.value = !1, n && !
|
|
2938
|
+
function $() {
|
|
2939
|
+
s.value = !1, n && !y(l.value) ? (l.value = "", e.value = "") : ze(e) || w();
|
|
2940
2940
|
}
|
|
2941
|
-
return w(), se(() => ze(e), (
|
|
2942
|
-
|
|
2943
|
-
}, { immediate: !0 }), se(s, (
|
|
2944
|
-
|
|
2941
|
+
return w(), se(() => ze(e), (S, k) => {
|
|
2942
|
+
S !== k && w();
|
|
2943
|
+
}, { immediate: !0 }), se(s, (S, k) => {
|
|
2944
|
+
S !== k && w();
|
|
2945
2945
|
}), {
|
|
2946
2946
|
displayValue: l,
|
|
2947
2947
|
handleInput: V,
|
|
2948
|
-
handlePaste:
|
|
2948
|
+
handlePaste: C,
|
|
2949
2949
|
handleKeydown: I,
|
|
2950
2950
|
handleFocus: B,
|
|
2951
|
-
handleBlur:
|
|
2952
|
-
placeholder:
|
|
2951
|
+
handleBlur: $,
|
|
2952
|
+
placeholder: h()
|
|
2953
2953
|
};
|
|
2954
2954
|
}
|
|
2955
2955
|
const Js = /* @__PURE__ */ O({
|
|
@@ -3237,11 +3237,11 @@ const Js = /* @__PURE__ */ O({
|
|
|
3237
3237
|
v <= (n.value ?? o.value) ? (d(), G(_o, {
|
|
3238
3238
|
key: 0,
|
|
3239
3239
|
class: "star-icon star-icon--filled",
|
|
3240
|
-
style:
|
|
3240
|
+
style: Z(r.value)
|
|
3241
3241
|
}, null, 8, ["style"])) : (d(), G(zo, {
|
|
3242
3242
|
key: 1,
|
|
3243
3243
|
class: "star-icon star-icon--empty",
|
|
3244
|
-
style:
|
|
3244
|
+
style: Z(r.value)
|
|
3245
3245
|
}, null, 8, ["style"]))
|
|
3246
3246
|
], 42, Ca))), 128))
|
|
3247
3247
|
]));
|
|
@@ -3383,17 +3383,17 @@ function Fe(e, t) {
|
|
|
3383
3383
|
}), o;
|
|
3384
3384
|
}
|
|
3385
3385
|
function Ia(e, t, o) {
|
|
3386
|
-
return !(t && e.isBefore(
|
|
3386
|
+
return !(t && e.isBefore(K(t), "day")) && !(o && e.isAfter(K(o), "day"));
|
|
3387
3387
|
}
|
|
3388
3388
|
function Aa(e) {
|
|
3389
3389
|
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
3390
|
}
|
|
3391
3391
|
function nt(e, t) {
|
|
3392
3392
|
try {
|
|
3393
|
-
const o = Aa(t), a =
|
|
3393
|
+
const o = Aa(t), a = K(e, o, !0);
|
|
3394
3394
|
if (a.isValid())
|
|
3395
3395
|
return a;
|
|
3396
|
-
const n =
|
|
3396
|
+
const n = K(e);
|
|
3397
3397
|
return n.isValid() ? n : null;
|
|
3398
3398
|
} catch {
|
|
3399
3399
|
return null;
|
|
@@ -3433,29 +3433,29 @@ function dt(e, t, o, a) {
|
|
|
3433
3433
|
return n;
|
|
3434
3434
|
}
|
|
3435
3435
|
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(
|
|
3436
|
+
const i = [], u = K().year(e).month(t).date(1), c = u.endOf("month"), v = (u.day() + 6) % 7;
|
|
3437
|
+
for (let h = v - 1; h >= 0; h--) {
|
|
3438
|
+
const g = u.subtract(h + 1, "day"), y = dt(g, a, n, s);
|
|
3439
3439
|
i.push({
|
|
3440
3440
|
value: Fe(g, n),
|
|
3441
3441
|
label: g.format("D"),
|
|
3442
3442
|
disabled: !0,
|
|
3443
3443
|
// Дни из другого месяца всегда disabled
|
|
3444
3444
|
current: !1,
|
|
3445
|
-
selected:
|
|
3446
|
-
rangeStart:
|
|
3447
|
-
rangeEnd:
|
|
3448
|
-
inRange:
|
|
3445
|
+
selected: y.selected,
|
|
3446
|
+
rangeStart: y.rangeStart,
|
|
3447
|
+
rangeEnd: y.rangeEnd,
|
|
3448
|
+
inRange: y.inRange
|
|
3449
3449
|
});
|
|
3450
3450
|
}
|
|
3451
|
-
for (let
|
|
3452
|
-
const g =
|
|
3451
|
+
for (let h = 1; h <= c.date(); h++) {
|
|
3452
|
+
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
3453
|
i.push({
|
|
3454
3454
|
value: Fe(g, n),
|
|
3455
|
-
label: String(
|
|
3455
|
+
label: String(h),
|
|
3456
3456
|
disabled: !V,
|
|
3457
3457
|
// Отключаем даты вне разрешенного диапазона
|
|
3458
|
-
current:
|
|
3458
|
+
current: y,
|
|
3459
3459
|
selected: w.selected,
|
|
3460
3460
|
rangeStart: w.rangeStart,
|
|
3461
3461
|
rangeEnd: w.rangeEnd,
|
|
@@ -3464,12 +3464,12 @@ function Ta(e, t, o, a = null, n = "dd/mm/yy", r = null, l = null, s = !1) {
|
|
|
3464
3464
|
}
|
|
3465
3465
|
const f = c.day();
|
|
3466
3466
|
if (f !== 0) {
|
|
3467
|
-
const
|
|
3468
|
-
for (let g = 1; g <=
|
|
3469
|
-
const
|
|
3467
|
+
const h = 7 - f;
|
|
3468
|
+
for (let g = 1; g <= h; g++) {
|
|
3469
|
+
const y = c.add(g, "day"), w = dt(y, a, n, s);
|
|
3470
3470
|
i.push({
|
|
3471
|
-
value: Fe(
|
|
3472
|
-
label:
|
|
3471
|
+
value: Fe(y, n),
|
|
3472
|
+
label: y.format("D"),
|
|
3473
3473
|
disabled: !0,
|
|
3474
3474
|
// Дни из другого месяца всегда disabled
|
|
3475
3475
|
current: !1,
|
|
@@ -3497,7 +3497,7 @@ function Ba(e, t, o = "dd/mm/yyyy", a = null, n = null) {
|
|
|
3497
3497
|
"Ноябрь",
|
|
3498
3498
|
"Декабрь"
|
|
3499
3499
|
].map((l, s) => {
|
|
3500
|
-
const i =
|
|
3500
|
+
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
3501
|
return {
|
|
3502
3502
|
value: Fe(i, o),
|
|
3503
3503
|
label: l,
|
|
@@ -3509,11 +3509,11 @@ function Ba(e, t, o = "dd/mm/yyyy", a = null, n = null) {
|
|
|
3509
3509
|
function Da(e, t = "dd.mm.yyyy", o = null, a = null) {
|
|
3510
3510
|
const n = e.year(), r = [], l = n - 10;
|
|
3511
3511
|
for (let s = l; s < l + 20; s++) {
|
|
3512
|
-
const i =
|
|
3512
|
+
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
3513
|
r.push({
|
|
3514
3514
|
value: Fe(i, t),
|
|
3515
3515
|
label: String(s),
|
|
3516
|
-
current: s ===
|
|
3516
|
+
current: s === K().year(),
|
|
3517
3517
|
// Сравниваем с реальной текущей датой
|
|
3518
3518
|
disabled: !c
|
|
3519
3519
|
});
|
|
@@ -3521,7 +3521,7 @@ function Da(e, t = "dd.mm.yyyy", o = null, a = null) {
|
|
|
3521
3521
|
return r;
|
|
3522
3522
|
}
|
|
3523
3523
|
function La(e, t, o = A(null), a = A(null), n = A(null), r = A(!1)) {
|
|
3524
|
-
const l = A(
|
|
3524
|
+
const l = A(K()), s = () => {
|
|
3525
3525
|
switch (e.value) {
|
|
3526
3526
|
case "day":
|
|
3527
3527
|
l.value = l.value.subtract(1, "month");
|
|
@@ -3546,16 +3546,16 @@ function La(e, t, o = A(null), a = A(null), n = A(null), r = A(!1)) {
|
|
|
3546
3546
|
break;
|
|
3547
3547
|
}
|
|
3548
3548
|
}, u = () => {
|
|
3549
|
-
l.value =
|
|
3549
|
+
l.value = K();
|
|
3550
3550
|
}, c = P(() => {
|
|
3551
|
-
const f =
|
|
3551
|
+
const f = K(), h = l.value.year(), g = l.value.month(), y = t.value || "dd.mm.yy";
|
|
3552
3552
|
switch (e.value) {
|
|
3553
3553
|
case "day":
|
|
3554
|
-
return Ta(
|
|
3554
|
+
return Ta(h, g, f, o.value, y, a.value, n.value, r.value);
|
|
3555
3555
|
case "month":
|
|
3556
|
-
return Ba(
|
|
3556
|
+
return Ba(h, f, y, a.value, n.value);
|
|
3557
3557
|
case "year":
|
|
3558
|
-
return Da(l.value,
|
|
3558
|
+
return Da(l.value, y, a.value, n.value);
|
|
3559
3559
|
default:
|
|
3560
3560
|
return [];
|
|
3561
3561
|
}
|
|
@@ -3573,11 +3573,13 @@ function La(e, t, o = A(null), a = A(null), n = A(null), r = A(!1)) {
|
|
|
3573
3573
|
"Октябрь",
|
|
3574
3574
|
"Ноябрь",
|
|
3575
3575
|
"Декабрь"
|
|
3576
|
-
]
|
|
3576
|
+
];
|
|
3577
|
+
console.log(o.value);
|
|
3578
|
+
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
3579
|
return {
|
|
3578
|
-
month: f[
|
|
3579
|
-
year: String(
|
|
3580
|
-
year_range: `${
|
|
3580
|
+
month: f[y],
|
|
3581
|
+
year: String(g),
|
|
3582
|
+
year_range: `${w}-${V}`
|
|
3581
3583
|
};
|
|
3582
3584
|
});
|
|
3583
3585
|
return {
|
|
@@ -3606,48 +3608,48 @@ const Oa = { class: "calendar__header" }, Ea = { class: "calendar__header-title"
|
|
|
3606
3608
|
}),
|
|
3607
3609
|
emits: ["update:modelValue"],
|
|
3608
3610
|
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:
|
|
3611
|
+
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
3612
|
get() {
|
|
3611
3613
|
return u.value;
|
|
3612
3614
|
},
|
|
3613
|
-
set(
|
|
3614
|
-
o.value === "day" ? u.value =
|
|
3615
|
+
set(C) {
|
|
3616
|
+
o.value === "day" ? u.value = C : o.value === "month" ? (C === "month" || C === "year") && (u.value = C) : u.value = C;
|
|
3615
3617
|
}
|
|
3616
|
-
}),
|
|
3618
|
+
}), y = P(() => [
|
|
3617
3619
|
"calendar",
|
|
3618
3620
|
`calendar--${u.value}`
|
|
3619
|
-
]), w = (
|
|
3621
|
+
]), w = (C) => [
|
|
3620
3622
|
"calendar__body-item",
|
|
3621
3623
|
{
|
|
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":
|
|
3624
|
+
"calendar__body-item--current": C.current,
|
|
3625
|
+
"calendar__body-item--disabled": C.disabled,
|
|
3626
|
+
"calendar__body-item--selected": C.selected,
|
|
3627
|
+
"calendar__body-item--range-start": C.rangeStart,
|
|
3628
|
+
"calendar__body-item--range-end": C.rangeEnd,
|
|
3629
|
+
"calendar__body-item--in-range": C.inRange
|
|
3628
3630
|
}
|
|
3629
|
-
], V = (
|
|
3631
|
+
], V = (C) => {
|
|
3630
3632
|
if (g.value !== "day" || !t.range) {
|
|
3631
|
-
s.value =
|
|
3633
|
+
s.value = C.value, g.value === "year" ? g.value = "month" : g.value === "month" && (g.value = "day");
|
|
3632
3634
|
return;
|
|
3633
3635
|
}
|
|
3634
3636
|
if (!s.value)
|
|
3635
|
-
s.value = { from:
|
|
3637
|
+
s.value = { from: C.value, to: "" }, i.value = !0;
|
|
3636
3638
|
else if (typeof s.value == "string")
|
|
3637
|
-
s.value = { from: s.value, to:
|
|
3639
|
+
s.value = { from: s.value, to: C.value }, i.value = !1;
|
|
3638
3640
|
else if (s.value.from && (!s.value.to || s.value.to === ""))
|
|
3639
|
-
if (s.value.from ===
|
|
3641
|
+
if (s.value.from === C.value)
|
|
3640
3642
|
s.value = null, i.value = !1;
|
|
3641
3643
|
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:
|
|
3644
|
+
const I = nt(s.value.from, t.format || "dd/mm/yy"), B = nt(C.value, t.format || "dd/mm/yy");
|
|
3645
|
+
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
3646
|
} else
|
|
3645
|
-
s.value = { from:
|
|
3647
|
+
s.value = { from: C.value, to: "" }, i.value = !0;
|
|
3646
3648
|
else
|
|
3647
|
-
s.value = { from:
|
|
3649
|
+
s.value = { from: C.value, to: "" }, i.value = !0;
|
|
3648
3650
|
};
|
|
3649
|
-
return (
|
|
3650
|
-
class: L(
|
|
3651
|
+
return (C, I) => (d(), p("div", {
|
|
3652
|
+
class: L(y.value)
|
|
3651
3653
|
}, [
|
|
3652
3654
|
R("div", Oa, [
|
|
3653
3655
|
q(m(we), {
|
|
@@ -3689,7 +3691,7 @@ const Oa = { class: "calendar__header" }, Ea = { class: "calendar__header-title"
|
|
|
3689
3691
|
variant: "secondary",
|
|
3690
3692
|
"button-style": "outlined",
|
|
3691
3693
|
disabled: g.value === "month",
|
|
3692
|
-
onClick: m(
|
|
3694
|
+
onClick: m(h)
|
|
3693
3695
|
}, null, 8, ["icon", "disabled", "onClick"])
|
|
3694
3696
|
]),
|
|
3695
3697
|
R("div", za, [
|
|
@@ -3701,7 +3703,7 @@ const Oa = { class: "calendar__header" }, Ea = { class: "calendar__header-title"
|
|
|
3701
3703
|
key: B.value,
|
|
3702
3704
|
class: L(w(B)),
|
|
3703
3705
|
disabled: B.disabled,
|
|
3704
|
-
onClick: (
|
|
3706
|
+
onClick: ($) => V(B)
|
|
3705
3707
|
}, [
|
|
3706
3708
|
R("span", null, F(B.label), 1)
|
|
3707
3709
|
], 10, Fa))), 128))
|
|
@@ -3736,7 +3738,7 @@ class ja {
|
|
|
3736
3738
|
r.value = i;
|
|
3737
3739
|
}
|
|
3738
3740
|
parseDate(t, o) {
|
|
3739
|
-
return
|
|
3741
|
+
return K(t, o.toLowerCase());
|
|
3740
3742
|
}
|
|
3741
3743
|
correctDateValues(t, o) {
|
|
3742
3744
|
if (t.length < 2) return t;
|
|
@@ -3768,7 +3770,7 @@ class ja {
|
|
|
3768
3770
|
s += u.slice(-c);
|
|
3769
3771
|
}
|
|
3770
3772
|
try {
|
|
3771
|
-
const u =
|
|
3773
|
+
const u = K(s, o.toUpperCase());
|
|
3772
3774
|
if (u.isValid())
|
|
3773
3775
|
return u.format(o.toUpperCase()).replace(/\D/g, "").substring(0, t.length);
|
|
3774
3776
|
} catch {
|
|
@@ -3799,11 +3801,11 @@ class ja {
|
|
|
3799
3801
|
return null;
|
|
3800
3802
|
let l = r, s = !1;
|
|
3801
3803
|
if (a) {
|
|
3802
|
-
const i =
|
|
3804
|
+
const i = K(a);
|
|
3803
3805
|
l.isBefore(i) && (l = i, s = !0);
|
|
3804
3806
|
}
|
|
3805
3807
|
if (n) {
|
|
3806
|
-
const i =
|
|
3808
|
+
const i = K(n);
|
|
3807
3809
|
l.isAfter(i) && (l = i, s = !0);
|
|
3808
3810
|
}
|
|
3809
3811
|
return s ? l.format(o.toUpperCase()) : null;
|
|
@@ -3820,6 +3822,7 @@ const Wa = /* @__PURE__ */ O({
|
|
|
3820
3822
|
error: { type: Boolean },
|
|
3821
3823
|
errorText: {},
|
|
3822
3824
|
required: { type: Boolean },
|
|
3825
|
+
position: { default: "start" },
|
|
3823
3826
|
type: { default: "day" },
|
|
3824
3827
|
format: { default: "dd.mm.yy" },
|
|
3825
3828
|
range: { type: Boolean, default: !1 },
|
|
@@ -3831,13 +3834,13 @@ const Wa = /* @__PURE__ */ O({
|
|
|
3831
3834
|
}),
|
|
3832
3835
|
emits: /* @__PURE__ */ U(["update:modelValue", "select", "clear", "focus", "blur", "input"], ["update:modelValue"]),
|
|
3833
3836
|
setup(e, { emit: t }) {
|
|
3834
|
-
function o(
|
|
3835
|
-
let
|
|
3836
|
-
const D =
|
|
3837
|
+
function o($, S) {
|
|
3838
|
+
let k = S;
|
|
3839
|
+
const D = $.dayOfYear(), b = [
|
|
3837
3840
|
// День месяца
|
|
3838
|
-
[/dd/g,
|
|
3841
|
+
[/dd/g, $.format("DD")],
|
|
3839
3842
|
// два знака
|
|
3840
|
-
[/d/g,
|
|
3843
|
+
[/d/g, $.format("D")],
|
|
3841
3844
|
// без ведущего нуля
|
|
3842
3845
|
// День года
|
|
3843
3846
|
[/oo/g, String(D).padStart(3, "0")],
|
|
@@ -3845,110 +3848,110 @@ const Wa = /* @__PURE__ */ O({
|
|
|
3845
3848
|
[/o/g, String(D)],
|
|
3846
3849
|
// без ведущих нулей
|
|
3847
3850
|
// Название дня
|
|
3848
|
-
[/DD/g,
|
|
3851
|
+
[/DD/g, $.format("dddd")],
|
|
3849
3852
|
// полное название
|
|
3850
|
-
[/D(?!D)/g,
|
|
3853
|
+
[/D(?!D)/g, $.format("ddd")],
|
|
3851
3854
|
// сокращенное
|
|
3852
3855
|
// Месяц - сначала длинные, потом короткие
|
|
3853
|
-
[/MM(?!M)/g,
|
|
3856
|
+
[/MM(?!M)/g, $.format("MMMM")],
|
|
3854
3857
|
// полное название
|
|
3855
|
-
[/mm/g,
|
|
3858
|
+
[/mm/g, $.format("MM")],
|
|
3856
3859
|
// два знака
|
|
3857
|
-
[/M(?!M)/g,
|
|
3860
|
+
[/M(?!M)/g, $.format("MMM")],
|
|
3858
3861
|
// сокращенное название
|
|
3859
|
-
[/m(?!m)/g,
|
|
3862
|
+
[/m(?!m)/g, $.format("M")],
|
|
3860
3863
|
// без ведущего нуля
|
|
3861
3864
|
// Год
|
|
3862
|
-
[/yy/g,
|
|
3865
|
+
[/yy/g, $.format("YYYY")],
|
|
3863
3866
|
// четыре цифры
|
|
3864
|
-
[/y/g,
|
|
3867
|
+
[/y/g, $.format("YY")],
|
|
3865
3868
|
// две цифры
|
|
3866
3869
|
// Специальные форматы
|
|
3867
|
-
[/@/g, String(
|
|
3870
|
+
[/@/g, String($.valueOf())],
|
|
3868
3871
|
// Unix timestamp
|
|
3869
|
-
[/!/g, String((
|
|
3872
|
+
[/!/g, String(($.valueOf() + 621355968e9) * 1e4)]
|
|
3870
3873
|
// Windows ticks
|
|
3871
3874
|
], M = [];
|
|
3872
3875
|
let x = 0;
|
|
3873
|
-
return
|
|
3876
|
+
return k = k.replace(/'([^']*)'/g, (H, z) => {
|
|
3874
3877
|
const E = `__LITERAL_${x}__`;
|
|
3875
3878
|
return M[x] = z, x++, E;
|
|
3876
|
-
}),
|
|
3877
|
-
|
|
3879
|
+
}), k = k.replace(/''/g, "'"), b.forEach(([H, z]) => {
|
|
3880
|
+
k = k.replace(H, z);
|
|
3878
3881
|
}), M.forEach((H, z) => {
|
|
3879
|
-
|
|
3880
|
-
}),
|
|
3882
|
+
k = k.replace(`__LITERAL_${z}__`, H);
|
|
3883
|
+
}), k;
|
|
3881
3884
|
}
|
|
3882
|
-
function a(
|
|
3885
|
+
function a($, S) {
|
|
3883
3886
|
try {
|
|
3884
|
-
const
|
|
3885
|
-
if (
|
|
3886
|
-
return
|
|
3887
|
-
const D =
|
|
3887
|
+
const k = K($, S, !0);
|
|
3888
|
+
if (k.isValid())
|
|
3889
|
+
return k;
|
|
3890
|
+
const D = K($);
|
|
3888
3891
|
return D.isValid() ? D : null;
|
|
3889
3892
|
} catch {
|
|
3890
3893
|
return null;
|
|
3891
3894
|
}
|
|
3892
3895
|
}
|
|
3893
|
-
const n = new ja(), r = e, l = t, s = te(e, "modelValue"), i = A(), u = A(), c = A(), v = A(!1), f = A(s.value),
|
|
3896
|
+
const n = new ja(), 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
3897
|
if (!s.value) return "";
|
|
3895
3898
|
if (typeof s.value == "string")
|
|
3896
3899
|
return s.value;
|
|
3897
3900
|
if (s.value instanceof Date)
|
|
3898
|
-
return o(
|
|
3901
|
+
return o(K(s.value), r.format);
|
|
3899
3902
|
if (typeof s.value == "object") {
|
|
3900
|
-
const
|
|
3903
|
+
const $ = s.value;
|
|
3901
3904
|
if (r.range) {
|
|
3902
|
-
if (
|
|
3903
|
-
return `с ${
|
|
3904
|
-
if (
|
|
3905
|
-
return `с ${
|
|
3905
|
+
if ($.from && $.to && $.to !== "")
|
|
3906
|
+
return `с ${$.from} по ${$.to}`;
|
|
3907
|
+
if ($.from)
|
|
3908
|
+
return `с ${$.from}`;
|
|
3906
3909
|
} else
|
|
3907
|
-
return
|
|
3910
|
+
return $.from || $.to || "";
|
|
3908
3911
|
}
|
|
3909
3912
|
return "";
|
|
3910
|
-
}),
|
|
3911
|
-
n.getDateMask(
|
|
3912
|
-
const
|
|
3913
|
-
if (!
|
|
3913
|
+
}), y = ($) => {
|
|
3914
|
+
n.getDateMask($, r.format);
|
|
3915
|
+
const S = $.target;
|
|
3916
|
+
if (!S.value) {
|
|
3914
3917
|
s.value = null;
|
|
3915
3918
|
return;
|
|
3916
3919
|
}
|
|
3917
|
-
if (
|
|
3918
|
-
const
|
|
3919
|
-
|
|
3920
|
+
if (S.value.length === r.format.length) {
|
|
3921
|
+
const k = a(S.value, r.format);
|
|
3922
|
+
k && k.isValid() ? (s.value = S.value, l("select", k.toDate())) : s.value = null;
|
|
3920
3923
|
}
|
|
3921
|
-
l("input",
|
|
3924
|
+
l("input", $);
|
|
3922
3925
|
}, w = () => {
|
|
3923
3926
|
s.value = null, f.value = null, l("clear");
|
|
3924
3927
|
}, V = () => {
|
|
3925
3928
|
f.value = s.value, v.value = !0, pe(() => {
|
|
3926
3929
|
I();
|
|
3927
3930
|
});
|
|
3928
|
-
},
|
|
3929
|
-
|
|
3931
|
+
}, C = ($) => {
|
|
3932
|
+
$ && (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
3933
|
}, I = () => {
|
|
3931
3934
|
if (!u.value || !v.value) return;
|
|
3932
|
-
const
|
|
3933
|
-
|
|
3935
|
+
const S = (u.value.querySelector("input") || u.value).getBoundingClientRect(), k = r.position === "start" ? S.left : S.left - (S.width > 300 ? 0 : 350 - S.width);
|
|
3936
|
+
console.log(k), h.value = {
|
|
3934
3937
|
position: "fixed",
|
|
3935
|
-
top: `${
|
|
3936
|
-
left: `${
|
|
3937
|
-
width: `${
|
|
3938
|
+
top: `${S.bottom + 4}px`,
|
|
3939
|
+
left: `${k}px`,
|
|
3940
|
+
width: `${S.width > 300 ? S.width : 350}px`,
|
|
3938
3941
|
zIndex: "1000"
|
|
3939
3942
|
};
|
|
3940
|
-
}, B = (
|
|
3943
|
+
}, B = ($) => {
|
|
3941
3944
|
if (!i.value || !c.value) return;
|
|
3942
|
-
const
|
|
3943
|
-
!i.value.contains(
|
|
3945
|
+
const S = $.target;
|
|
3946
|
+
!i.value.contains(S) && !c.value.contains(S) && (v.value = !1);
|
|
3944
3947
|
};
|
|
3945
|
-
return se(s, (
|
|
3946
|
-
f.value =
|
|
3948
|
+
return se(s, ($) => {
|
|
3949
|
+
f.value = $;
|
|
3947
3950
|
}, { immediate: !0 }), ve(() => {
|
|
3948
3951
|
document.addEventListener("mousedown", B), window.addEventListener("resize", I), window.addEventListener("scroll", I);
|
|
3949
3952
|
}), Ze(() => {
|
|
3950
3953
|
document.removeEventListener("mousedown", B), window.removeEventListener("resize", I), window.removeEventListener("scroll", I);
|
|
3951
|
-
}), (
|
|
3954
|
+
}), ($, S) => (d(), p("div", {
|
|
3952
3955
|
class: "date-picker",
|
|
3953
3956
|
ref_key: "datePickerRef",
|
|
3954
3957
|
ref: i
|
|
@@ -3960,17 +3963,17 @@ const Wa = /* @__PURE__ */ O({
|
|
|
3960
3963
|
}, [
|
|
3961
3964
|
q(m(ut), {
|
|
3962
3965
|
full: "",
|
|
3963
|
-
label:
|
|
3964
|
-
placeholder:
|
|
3965
|
-
error:
|
|
3966
|
-
"error-text":
|
|
3967
|
-
required:
|
|
3968
|
-
disabled:
|
|
3969
|
-
name:
|
|
3970
|
-
"allow-clear":
|
|
3966
|
+
label: $.label,
|
|
3967
|
+
placeholder: $.placeholder,
|
|
3968
|
+
error: $.error,
|
|
3969
|
+
"error-text": $.errorText,
|
|
3970
|
+
required: $.required,
|
|
3971
|
+
disabled: $.disabled,
|
|
3972
|
+
name: $.name,
|
|
3973
|
+
"allow-clear": $.allowClear,
|
|
3971
3974
|
"model-value": g.value,
|
|
3972
|
-
readonly:
|
|
3973
|
-
onInput:
|
|
3975
|
+
readonly: $.range,
|
|
3976
|
+
onInput: y,
|
|
3974
3977
|
onClear: w,
|
|
3975
3978
|
onFocus: V
|
|
3976
3979
|
}, null, 8, ["label", "placeholder", "error", "error-text", "required", "disabled", "name", "allow-clear", "model-value", "readonly"])
|
|
@@ -3981,30 +3984,30 @@ const Wa = /* @__PURE__ */ O({
|
|
|
3981
3984
|
ref_key: "popoverRef",
|
|
3982
3985
|
ref: c,
|
|
3983
3986
|
class: "date-picker__popover",
|
|
3984
|
-
style:
|
|
3987
|
+
style: Z(h.value)
|
|
3985
3988
|
}, [
|
|
3986
3989
|
R("div", {
|
|
3987
|
-
onMousedown:
|
|
3990
|
+
onMousedown: S[1] || (S[1] = Je(() => {
|
|
3988
3991
|
}, ["stop"]))
|
|
3989
3992
|
}, [
|
|
3990
3993
|
q(m(qa), {
|
|
3991
3994
|
modelValue: f.value,
|
|
3992
3995
|
"onUpdate:modelValue": [
|
|
3993
|
-
|
|
3994
|
-
|
|
3996
|
+
S[0] || (S[0] = (k) => f.value = k),
|
|
3997
|
+
C
|
|
3995
3998
|
],
|
|
3996
|
-
format:
|
|
3997
|
-
range:
|
|
3998
|
-
type:
|
|
3999
|
-
"min-date":
|
|
4000
|
-
"max-date":
|
|
3999
|
+
format: $.format,
|
|
4000
|
+
range: $.range,
|
|
4001
|
+
type: $.type,
|
|
4002
|
+
"min-date": $.minDate,
|
|
4003
|
+
"max-date": $.maxDate
|
|
4001
4004
|
}, null, 8, ["modelValue", "format", "range", "type", "min-date", "max-date"])
|
|
4002
4005
|
], 32)
|
|
4003
4006
|
], 4)) : T("", !0)
|
|
4004
4007
|
]))
|
|
4005
4008
|
], 512));
|
|
4006
4009
|
}
|
|
4007
|
-
}), ar = /* @__PURE__ */ le(Wa, [["__scopeId", "data-v-
|
|
4010
|
+
}), ar = /* @__PURE__ */ le(Wa, [["__scopeId", "data-v-b36a6481"]]), Ya = { class: "breadcrumb" }, Ua = ["onClick"], Ka = {
|
|
4008
4011
|
key: 2,
|
|
4009
4012
|
class: "breadcrumb__item breadcrumb__seporator"
|
|
4010
4013
|
}, sr = /* @__PURE__ */ O({
|
|
@@ -4062,7 +4065,7 @@ const Wa = /* @__PURE__ */ O({
|
|
|
4062
4065
|
};
|
|
4063
4066
|
return ve(() => {
|
|
4064
4067
|
e.msg.life && (s.value = e.msg.life, i());
|
|
4065
|
-
}), (f,
|
|
4068
|
+
}), (f, h) => (d(), p("div", {
|
|
4066
4069
|
class: L(r.value)
|
|
4067
4070
|
}, [
|
|
4068
4071
|
R("div", Xa, [
|
|
@@ -4239,7 +4242,7 @@ const ur = {
|
|
|
4239
4242
|
value: o.value,
|
|
4240
4243
|
variant: o.variant,
|
|
4241
4244
|
class: "overlay-badge__badge",
|
|
4242
|
-
style:
|
|
4245
|
+
style: Z(t.value)
|
|
4243
4246
|
}, null, 8, ["value", "variant", "style"])) : T("", !0),
|
|
4244
4247
|
Y(o.$slots, "default")
|
|
4245
4248
|
], 2));
|
|
@@ -4268,7 +4271,7 @@ const ur = {
|
|
|
4268
4271
|
}));
|
|
4269
4272
|
return (a, n) => (d(), p("div", {
|
|
4270
4273
|
class: L(t.value),
|
|
4271
|
-
style:
|
|
4274
|
+
style: Z(o.value)
|
|
4272
4275
|
}, null, 6));
|
|
4273
4276
|
}
|
|
4274
4277
|
}), go = Symbol("DialogService"), vr = () => {
|
|
@@ -4281,9 +4284,9 @@ const ur = {
|
|
|
4281
4284
|
if (!e)
|
|
4282
4285
|
throw new Error("useConfirmDialog() должен использоваться внутри приложения с DialogService");
|
|
4283
4286
|
return e;
|
|
4284
|
-
},
|
|
4287
|
+
}, J = A(null), Q = A(null), ss = {
|
|
4285
4288
|
require: (e) => {
|
|
4286
|
-
|
|
4289
|
+
J.value = {
|
|
4287
4290
|
modal: !0,
|
|
4288
4291
|
closable: !0,
|
|
4289
4292
|
dismissableMask: !0,
|
|
@@ -4293,7 +4296,7 @@ const ur = {
|
|
|
4293
4296
|
};
|
|
4294
4297
|
},
|
|
4295
4298
|
close: () => {
|
|
4296
|
-
|
|
4299
|
+
J.value = null;
|
|
4297
4300
|
}
|
|
4298
4301
|
}, rs = {
|
|
4299
4302
|
require: (e) => {
|
|
@@ -4311,7 +4314,7 @@ const ur = {
|
|
|
4311
4314
|
}
|
|
4312
4315
|
}, pr = {
|
|
4313
4316
|
install(e) {
|
|
4314
|
-
e.provide(go, ss), e.provide(ho, rs), e.config.globalProperties.$dialogStates =
|
|
4317
|
+
e.provide(go, ss), e.provide(ho, rs), e.config.globalProperties.$dialogStates = J, e.config.globalProperties.$popupStates = Q;
|
|
4315
4318
|
}
|
|
4316
4319
|
}, is = {
|
|
4317
4320
|
key: 0,
|
|
@@ -4323,15 +4326,15 @@ const ur = {
|
|
|
4323
4326
|
__name: "ConfirmDialog",
|
|
4324
4327
|
setup(e) {
|
|
4325
4328
|
const { lockScroll: t, unlockScroll: o } = lt(), a = () => {
|
|
4326
|
-
|
|
4329
|
+
J.value?.accept && (J.value?.accept?.(), J.value = null);
|
|
4327
4330
|
}, n = () => {
|
|
4328
|
-
|
|
4331
|
+
J.value?.reject && (J.value?.reject?.(), J.value = null);
|
|
4329
4332
|
}, r = () => {
|
|
4330
|
-
|
|
4333
|
+
J.value = null;
|
|
4331
4334
|
}, l = (s) => {
|
|
4332
|
-
s.key === "Escape" && (
|
|
4335
|
+
s.key === "Escape" && (J.value = null);
|
|
4333
4336
|
};
|
|
4334
|
-
return se(
|
|
4337
|
+
return se(J, (s) => {
|
|
4335
4338
|
s?.blockScroll ? t() : o();
|
|
4336
4339
|
}, { immediate: !0, deep: !0 }), ve(() => {
|
|
4337
4340
|
document.addEventListener("keydown", l);
|
|
@@ -4340,22 +4343,22 @@ const ur = {
|
|
|
4340
4343
|
}), (s, i) => (d(), G(je, { to: "body" }, [
|
|
4341
4344
|
q(De, { name: "confirm-dialog" }, {
|
|
4342
4345
|
default: ee(() => [
|
|
4343
|
-
m(
|
|
4346
|
+
m(J) ? (d(), p("div", {
|
|
4344
4347
|
key: 0,
|
|
4345
4348
|
class: L(["confirm-dialog-overlay", { "confirm-dialog-overlay--modal": !0 }]),
|
|
4346
4349
|
onClick: r
|
|
4347
4350
|
}, [
|
|
4348
4351
|
R("div", {
|
|
4349
4352
|
ref: "popupRef",
|
|
4350
|
-
class: L(["confirm-dialog", [`confirm-dialog--${m(
|
|
4353
|
+
class: L(["confirm-dialog", [`confirm-dialog--${m(J).position}`, m(J).class]]),
|
|
4351
4354
|
onClick: i[2] || (i[2] = Je(() => {
|
|
4352
4355
|
}, ["stop"])),
|
|
4353
|
-
style:
|
|
4356
|
+
style: Z(m(J).style)
|
|
4354
4357
|
}, [
|
|
4355
|
-
m(
|
|
4356
|
-
R("h4", us, F(m(
|
|
4358
|
+
m(J).header ? (d(), p("div", is, [
|
|
4359
|
+
R("h4", us, F(m(J).header), 1)
|
|
4357
4360
|
])) : T("", !0),
|
|
4358
|
-
m(
|
|
4361
|
+
m(J).message ? (d(), p("p", cs, F(m(J).message), 1)) : T("", !0),
|
|
4359
4362
|
R("div", ds, [
|
|
4360
4363
|
q(m(we), {
|
|
4361
4364
|
size: "small",
|
|
@@ -4364,7 +4367,7 @@ const ur = {
|
|
|
4364
4367
|
onClick: i[0] || (i[0] = () => n())
|
|
4365
4368
|
}, {
|
|
4366
4369
|
default: ee(() => [
|
|
4367
|
-
fe(F(m(
|
|
4370
|
+
fe(F(m(J).rejectProps ? m(J).rejectProps.label : "Нет"), 1)
|
|
4368
4371
|
]),
|
|
4369
4372
|
_: 1
|
|
4370
4373
|
}),
|
|
@@ -4373,7 +4376,7 @@ const ur = {
|
|
|
4373
4376
|
onClick: i[1] || (i[1] = () => a())
|
|
4374
4377
|
}, {
|
|
4375
4378
|
default: ee(() => [
|
|
4376
|
-
fe(F(m(
|
|
4379
|
+
fe(F(m(J).acceptProps ? m(J).acceptProps.label : "Да"), 1)
|
|
4377
4380
|
]),
|
|
4378
4381
|
_: 1
|
|
4379
4382
|
})
|
|
@@ -4396,75 +4399,75 @@ const ur = {
|
|
|
4396
4399
|
setup(e) {
|
|
4397
4400
|
const t = A(), o = A({}), a = A("bottom"), n = P(() => `confirm-popup--${a.value}`), r = P(() => `confirm-popup__arrow--${a.value}`), l = () => {
|
|
4398
4401
|
if (!Q.value?.target || !t.value) return;
|
|
4399
|
-
const f = Q.value.target,
|
|
4402
|
+
const f = Q.value.target, h = t.value, g = Q.value.position || "bottom";
|
|
4400
4403
|
if (!document.contains(f)) {
|
|
4401
4404
|
i();
|
|
4402
4405
|
return;
|
|
4403
4406
|
}
|
|
4404
|
-
const
|
|
4405
|
-
if (!(
|
|
4407
|
+
const y = f.getBoundingClientRect();
|
|
4408
|
+
if (!(y.bottom > 0 && y.right > 0 && y.top < window.innerHeight && y.left < window.innerWidth && y.width > 0 && y.height > 0)) {
|
|
4406
4409
|
i();
|
|
4407
4410
|
return;
|
|
4408
4411
|
}
|
|
4409
|
-
const V =
|
|
4412
|
+
const V = h.getBoundingClientRect(), C = 8, I = 8, B = (M) => {
|
|
4410
4413
|
switch (M) {
|
|
4411
4414
|
case "top":
|
|
4412
4415
|
return {
|
|
4413
|
-
top:
|
|
4414
|
-
left:
|
|
4416
|
+
top: y.top - V.height - I,
|
|
4417
|
+
left: y.left + y.width / 2 - V.width / 2
|
|
4415
4418
|
};
|
|
4416
4419
|
case "bottom":
|
|
4417
4420
|
return {
|
|
4418
|
-
top:
|
|
4419
|
-
left:
|
|
4421
|
+
top: y.bottom + I,
|
|
4422
|
+
left: y.left + y.width / 2 - V.width / 2
|
|
4420
4423
|
};
|
|
4421
4424
|
case "left":
|
|
4422
4425
|
return {
|
|
4423
|
-
top:
|
|
4424
|
-
left:
|
|
4426
|
+
top: y.top + y.height / 2 - V.height / 2,
|
|
4427
|
+
left: y.left - V.width - I
|
|
4425
4428
|
};
|
|
4426
4429
|
case "right":
|
|
4427
4430
|
return {
|
|
4428
|
-
top:
|
|
4429
|
-
left:
|
|
4431
|
+
top: y.top + y.height / 2 - V.height / 2,
|
|
4432
|
+
left: y.right + I
|
|
4430
4433
|
};
|
|
4431
4434
|
case "topleft":
|
|
4432
4435
|
return {
|
|
4433
|
-
top:
|
|
4434
|
-
left:
|
|
4436
|
+
top: y.top - V.height - I,
|
|
4437
|
+
left: y.left
|
|
4435
4438
|
};
|
|
4436
4439
|
case "topright":
|
|
4437
4440
|
return {
|
|
4438
|
-
top:
|
|
4439
|
-
left:
|
|
4441
|
+
top: y.top - V.height - I,
|
|
4442
|
+
left: y.right - V.width
|
|
4440
4443
|
};
|
|
4441
4444
|
case "bottomleft":
|
|
4442
4445
|
return {
|
|
4443
|
-
top:
|
|
4444
|
-
left:
|
|
4446
|
+
top: y.bottom + I,
|
|
4447
|
+
left: y.left
|
|
4445
4448
|
};
|
|
4446
4449
|
case "bottomright":
|
|
4447
4450
|
return {
|
|
4448
|
-
top:
|
|
4449
|
-
left:
|
|
4451
|
+
top: y.bottom + I,
|
|
4452
|
+
left: y.right - V.width
|
|
4450
4453
|
};
|
|
4451
4454
|
default:
|
|
4452
4455
|
return { top: 0, left: 0 };
|
|
4453
4456
|
}
|
|
4454
|
-
},
|
|
4457
|
+
}, $ = (M) => {
|
|
4455
4458
|
const x = B(M);
|
|
4456
|
-
return x.top >=
|
|
4457
|
-
},
|
|
4459
|
+
return x.top >= C && x.left >= C && x.top + V.height <= window.innerHeight - C && x.left + V.width <= window.innerWidth - C;
|
|
4460
|
+
}, S = [g];
|
|
4458
4461
|
["bottomright", "bottom", "top", "right", "left", "bottomleft", "topright", "topleft"].forEach((M) => {
|
|
4459
|
-
|
|
4462
|
+
S.includes(M) || S.push(M);
|
|
4460
4463
|
});
|
|
4461
4464
|
let D = g, b = B(g);
|
|
4462
|
-
for (const M of
|
|
4463
|
-
if (
|
|
4465
|
+
for (const M of S)
|
|
4466
|
+
if ($(M)) {
|
|
4464
4467
|
D = M, b = B(M);
|
|
4465
4468
|
break;
|
|
4466
4469
|
}
|
|
4467
|
-
b.top = Math.max(
|
|
4470
|
+
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
4471
|
position: "fixed",
|
|
4469
4472
|
top: `${b.top}px`,
|
|
4470
4473
|
left: `${b.left}px`,
|
|
@@ -4487,7 +4490,7 @@ const ur = {
|
|
|
4487
4490
|
document.addEventListener("keydown", u), window.addEventListener("scroll", c, !0), window.addEventListener("resize", v);
|
|
4488
4491
|
}), Ze(() => {
|
|
4489
4492
|
document.removeEventListener("keydown", u), window.removeEventListener("scroll", c, !0), window.removeEventListener("resize", v);
|
|
4490
|
-
}), (f,
|
|
4493
|
+
}), (f, h) => (d(), G(je, { to: "body" }, [
|
|
4491
4494
|
q(De, { name: "confirm" }, {
|
|
4492
4495
|
default: ee(() => [
|
|
4493
4496
|
m(Q) ? (d(), p("div", {
|
|
@@ -4499,9 +4502,9 @@ const ur = {
|
|
|
4499
4502
|
ref_key: "popupRef",
|
|
4500
4503
|
ref: t,
|
|
4501
4504
|
class: L(["confirm-popup", n.value]),
|
|
4502
|
-
onClick:
|
|
4505
|
+
onClick: h[0] || (h[0] = Je(() => {
|
|
4503
4506
|
}, ["stop"])),
|
|
4504
|
-
style:
|
|
4507
|
+
style: Z(o.value)
|
|
4505
4508
|
}, [
|
|
4506
4509
|
R("div", {
|
|
4507
4510
|
class: L(["confirm-popup__arrow", r.value])
|
|
@@ -4572,18 +4575,18 @@ const ur = {
|
|
|
4572
4575
|
r.value ? (d(), p("div", {
|
|
4573
4576
|
key: 0,
|
|
4574
4577
|
class: L(["drawer", { [`drawer--${v.position}`]: v.position }]),
|
|
4575
|
-
style:
|
|
4578
|
+
style: Z({ "--widthDrawer": l.value, zIndex: v.zIndex })
|
|
4576
4579
|
}, [
|
|
4577
4580
|
R("div", {
|
|
4578
4581
|
class: "drawer-overlay",
|
|
4579
|
-
onClick: f[0] || (f[0] = (
|
|
4582
|
+
onClick: f[0] || (f[0] = (h) => u())
|
|
4580
4583
|
}),
|
|
4581
4584
|
R("div", {
|
|
4582
4585
|
class: L(["drawer-wrapper", { "drawer-wrapper--no-style": v.wrapperNoStyle }])
|
|
4583
4586
|
}, [
|
|
4584
4587
|
R("div", ys, [
|
|
4585
4588
|
R("button", {
|
|
4586
|
-
onClick: f[1] || (f[1] = (
|
|
4589
|
+
onClick: f[1] || (f[1] = (h) => u())
|
|
4587
4590
|
}, [
|
|
4588
4591
|
q(m(wt))
|
|
4589
4592
|
])
|
|
@@ -4623,7 +4626,7 @@ const ur = {
|
|
|
4623
4626
|
o.value ? (d(), p("div", {
|
|
4624
4627
|
key: 0,
|
|
4625
4628
|
class: L(l.value),
|
|
4626
|
-
style:
|
|
4629
|
+
style: Z({ "z-index": i.zIndex })
|
|
4627
4630
|
}, [
|
|
4628
4631
|
R("div", {
|
|
4629
4632
|
class: "modal__overlay",
|
|
@@ -4631,7 +4634,7 @@ const ur = {
|
|
|
4631
4634
|
}),
|
|
4632
4635
|
R("div", {
|
|
4633
4636
|
class: "modal__content",
|
|
4634
|
-
style:
|
|
4637
|
+
style: Z(i.style)
|
|
4635
4638
|
}, [
|
|
4636
4639
|
R("div", bs, [
|
|
4637
4640
|
Y(i.$slots, "header"),
|
|
@@ -4685,7 +4688,7 @@ const ur = {
|
|
|
4685
4688
|
t.value && o.value && (a.value = o.value.scrollHeight + "px");
|
|
4686
4689
|
}), (r, l) => (d(), p("div", {
|
|
4687
4690
|
class: "accordion-content-wrapper",
|
|
4688
|
-
style:
|
|
4691
|
+
style: Z({ height: m(t) ? a.value : "0px" })
|
|
4689
4692
|
}, [
|
|
4690
4693
|
Me(R("div", {
|
|
4691
4694
|
ref_key: "contentRef",
|
|
@@ -4896,7 +4899,7 @@ const ur = {
|
|
|
4896
4899
|
let i = null, u = null, c = null;
|
|
4897
4900
|
const v = async () => {
|
|
4898
4901
|
if (!i || !a.value) return;
|
|
4899
|
-
const g = a.value.querySelector(".tooltip__arrow"), { x:
|
|
4902
|
+
const g = a.value.querySelector(".tooltip__arrow"), { x: y, y: w, placement: V, middlewareData: C } = await fo(
|
|
4900
4903
|
i,
|
|
4901
4904
|
a.value,
|
|
4902
4905
|
{
|
|
@@ -4910,21 +4913,21 @@ const ur = {
|
|
|
4910
4913
|
}
|
|
4911
4914
|
);
|
|
4912
4915
|
if (r.value = V, l.value = {
|
|
4913
|
-
left: `${
|
|
4916
|
+
left: `${y}px`,
|
|
4914
4917
|
top: `${w}px`
|
|
4915
|
-
}, o.showArrow &&
|
|
4916
|
-
const { x: I, y: B } =
|
|
4918
|
+
}, o.showArrow && C.arrow && g) {
|
|
4919
|
+
const { x: I, y: B } = C.arrow, $ = V.split("-")[0], S = {
|
|
4917
4920
|
top: "bottom",
|
|
4918
4921
|
right: "left",
|
|
4919
4922
|
bottom: "top",
|
|
4920
4923
|
left: "right"
|
|
4921
|
-
}[
|
|
4924
|
+
}[$];
|
|
4922
4925
|
s.value = {
|
|
4923
4926
|
left: I != null ? `${I}px` : "",
|
|
4924
4927
|
top: B != null ? `${B}px` : "",
|
|
4925
4928
|
right: "",
|
|
4926
4929
|
bottom: "",
|
|
4927
|
-
[
|
|
4930
|
+
[S]: "-4px"
|
|
4928
4931
|
};
|
|
4929
4932
|
}
|
|
4930
4933
|
};
|
|
@@ -4939,7 +4942,7 @@ const ur = {
|
|
|
4939
4942
|
n.value = !1, i = null;
|
|
4940
4943
|
}, 50);
|
|
4941
4944
|
}
|
|
4942
|
-
}), (g,
|
|
4945
|
+
}), (g, y) => (d(), G(je, { to: "body" }, [
|
|
4943
4946
|
q(De, { name: "tooltip-fade" }, {
|
|
4944
4947
|
default: ee(() => [
|
|
4945
4948
|
n.value ? (d(), p("div", {
|
|
@@ -4947,14 +4950,14 @@ const ur = {
|
|
|
4947
4950
|
ref_key: "tooltipRef",
|
|
4948
4951
|
ref: a,
|
|
4949
4952
|
class: L(["tooltip", [`tooltip--${r.value}`, g.tooltipClass]]),
|
|
4950
|
-
style:
|
|
4953
|
+
style: Z(l.value),
|
|
4951
4954
|
role: "tooltip"
|
|
4952
4955
|
}, [
|
|
4953
4956
|
R("div", Hs, F(g.content), 1),
|
|
4954
4957
|
g.showArrow ? (d(), p("div", {
|
|
4955
4958
|
key: 0,
|
|
4956
4959
|
class: "tooltip__arrow",
|
|
4957
|
-
style:
|
|
4960
|
+
style: Z(s.value)
|
|
4958
4961
|
}, null, 4)) : T("", !0)
|
|
4959
4962
|
], 6)) : T("", !0)
|
|
4960
4963
|
]),
|