prlg-ui 1.7.80 → 1.7.81
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 +77 -73
- package/package.json +1 -1
package/dist/prlg-ui.es.js
CHANGED
|
@@ -530,12 +530,12 @@ const vl = (e) => ({
|
|
|
530
530
|
}, w = gt(l), $ = mt(w), h = await a.getDimensions(u), y = w === "y", x = y ? "top" : "left", V = y ? "bottom" : "right", T = y ? "clientHeight" : "clientWidth", z = s.reference[$] + s.reference[w] - f[w] - s.floating[$], U = f[w] - s.reference[w], P = await (a.getOffsetParent == null ? void 0 : a.getOffsetParent(u));
|
|
531
531
|
let C = P ? P[T] : 0;
|
|
532
532
|
(!C || !await (a.isElement == null ? void 0 : a.isElement(P))) && (C = i.floating[T] || s.floating[$]);
|
|
533
|
-
const
|
|
533
|
+
const L = z / 2 - U / 2, g = C / 2 - h[$] / 2 - 1, S = Oe(m[x], g), b = Oe(m[V], g), F = S, E = C - h[$] - b, O = C / 2 - h[$] / 2 + L, H = at(F, O, E), B = !r.arrow && qe(l) != null && O !== H && s.reference[$] / 2 - (O < F ? S : b) - h[$] / 2 < 0, oe = B ? O < F ? O - F : O - E : 0;
|
|
534
534
|
return {
|
|
535
535
|
[w]: f[w] + oe,
|
|
536
536
|
data: {
|
|
537
537
|
[w]: H,
|
|
538
|
-
centerOffset:
|
|
538
|
+
centerOffset: O - H - oe,
|
|
539
539
|
...B && {
|
|
540
540
|
alignmentOffset: oe
|
|
541
541
|
}
|
|
@@ -569,24 +569,24 @@ const vl = (e) => ({
|
|
|
569
569
|
return {};
|
|
570
570
|
const x = Me(l), V = Ce(i), T = Me(i) === i, z = await (r.isRTL == null ? void 0 : r.isRTL(u.floating)), U = f || (T || !h ? [Ze(i)] : sl(i)), P = $ !== "none";
|
|
571
571
|
!f && P && U.push(...cl(i, h, $, z));
|
|
572
|
-
const C = [i, ...U],
|
|
572
|
+
const C = [i, ...U], L = await je(t, y), g = [];
|
|
573
573
|
let S = ((n = s.flip) == null ? void 0 : n.overflows) || [];
|
|
574
|
-
if (d && g.push(
|
|
575
|
-
const
|
|
576
|
-
g.push(O[
|
|
574
|
+
if (d && g.push(L[x]), m) {
|
|
575
|
+
const O = al(l, a, z);
|
|
576
|
+
g.push(L[O[0]], L[O[1]]);
|
|
577
577
|
}
|
|
578
578
|
if (S = [...S, {
|
|
579
579
|
placement: l,
|
|
580
580
|
overflows: g
|
|
581
|
-
}], !g.every((
|
|
581
|
+
}], !g.every((O) => O <= 0)) {
|
|
582
582
|
var b, F;
|
|
583
|
-
const
|
|
583
|
+
const O = (((b = s.flip) == null ? void 0 : b.index) || 0) + 1, H = C[O];
|
|
584
584
|
if (H && (!(m === "alignment" ? V !== Ce(H) : !1) || // We leave the current main axis only if every placement on that axis
|
|
585
585
|
// overflows the main axis.
|
|
586
586
|
S.every((ue) => Ce(ue.placement) === V ? ue.overflows[0] > 0 : !0)))
|
|
587
587
|
return {
|
|
588
588
|
data: {
|
|
589
|
-
index:
|
|
589
|
+
index: O,
|
|
590
590
|
overflows: S
|
|
591
591
|
},
|
|
592
592
|
reset: {
|
|
@@ -805,14 +805,14 @@ const yl = function(e) {
|
|
|
805
805
|
let y, x;
|
|
806
806
|
m === "top" || m === "bottom" ? (y = m, x = f === (await (a.isRTL == null ? void 0 : a.isRTL(i.floating)) ? "start" : "end") ? "left" : "right") : (x = m, y = f === "end" ? "top" : "bottom");
|
|
807
807
|
const V = h - d.top - d.bottom, T = $ - d.left - d.right, z = Oe(h - d[y], V), U = Oe($ - d[x], T), P = !t.middlewareData.shift;
|
|
808
|
-
let C = z,
|
|
809
|
-
if ((o = t.middlewareData.shift) != null && o.enabled.x && (
|
|
808
|
+
let C = z, L = U;
|
|
809
|
+
if ((o = t.middlewareData.shift) != null && o.enabled.x && (L = T), (n = t.middlewareData.shift) != null && n.enabled.y && (C = V), P && !f) {
|
|
810
810
|
const S = he(d.left, 0), b = he(d.right, 0), F = he(d.top, 0), E = he(d.bottom, 0);
|
|
811
|
-
w ?
|
|
811
|
+
w ? L = $ - 2 * (S !== 0 || b !== 0 ? S + b : he(d.left, d.right)) : C = h - 2 * (F !== 0 || E !== 0 ? F + E : he(d.top, d.bottom));
|
|
812
812
|
}
|
|
813
813
|
await r({
|
|
814
814
|
...t,
|
|
815
|
-
availableWidth:
|
|
815
|
+
availableWidth: L,
|
|
816
816
|
availableHeight: C
|
|
817
817
|
});
|
|
818
818
|
const g = await a.getDimensions(i.floating);
|
|
@@ -1287,16 +1287,16 @@ function Bt(e, t, o) {
|
|
|
1287
1287
|
};
|
|
1288
1288
|
if (!d.value)
|
|
1289
1289
|
return C;
|
|
1290
|
-
const
|
|
1290
|
+
const L = It(d.value, m.value), g = It(d.value, f.value);
|
|
1291
1291
|
return r.value ? {
|
|
1292
1292
|
...C,
|
|
1293
|
-
transform: "translate(" +
|
|
1293
|
+
transform: "translate(" + L + "px, " + g + "px)",
|
|
1294
1294
|
...so(d.value) >= 1.5 && {
|
|
1295
1295
|
willChange: "transform"
|
|
1296
1296
|
}
|
|
1297
1297
|
} : {
|
|
1298
1298
|
position: w.value,
|
|
1299
|
-
left:
|
|
1299
|
+
left: L + "px",
|
|
1300
1300
|
top: g + "px"
|
|
1301
1301
|
};
|
|
1302
1302
|
});
|
|
@@ -1309,8 +1309,8 @@ function Bt(e, t, o) {
|
|
|
1309
1309
|
middleware: s.value,
|
|
1310
1310
|
placement: a.value,
|
|
1311
1311
|
strategy: i.value
|
|
1312
|
-
}).then((
|
|
1313
|
-
m.value =
|
|
1312
|
+
}).then((L) => {
|
|
1313
|
+
m.value = L.x, f.value = L.y, w.value = L.strategy, $.value = L.placement, h.value = L.middlewareData, y.value = C !== !1;
|
|
1314
1314
|
});
|
|
1315
1315
|
}
|
|
1316
1316
|
function z() {
|
|
@@ -1374,12 +1374,16 @@ const Yl = { class: "popover__content" }, Zl = {
|
|
|
1374
1374
|
zIndex: {
|
|
1375
1375
|
type: Number,
|
|
1376
1376
|
default: 1001
|
|
1377
|
+
},
|
|
1378
|
+
withoutStyle: {
|
|
1379
|
+
type: Boolean,
|
|
1380
|
+
default: !1
|
|
1377
1381
|
}
|
|
1378
1382
|
},
|
|
1379
1383
|
emits: ["update:modelValue"],
|
|
1380
1384
|
setup(e, { expose: t, emit: o }) {
|
|
1381
1385
|
ho((q) => ({
|
|
1382
|
-
"
|
|
1386
|
+
"37c83549": h.value
|
|
1383
1387
|
}));
|
|
1384
1388
|
const n = e, { placement: l, offset: s, arrowVisible: a, closeMode: i, modelValue: r, zIndex: u } = yo(n), d = o, m = Ve("reference"), f = Ve("floating"), w = Ve("arrow-block"), $ = Ve("second-screen"), h = R(() => "23px"), y = R(() => s ? typeof s.value == "number" ? s.value + Number(h.value.split("px")[0]) : {
|
|
1385
1389
|
mainAxis: s.value?.mainAxis ? s.value?.mainAxis + Number(h.value.split("px")[0]) / 2 : Number(h.value.split("px")[0]) / 2,
|
|
@@ -1405,7 +1409,7 @@ const Yl = { class: "popover__content" }, Zl = {
|
|
|
1405
1409
|
middleware: x
|
|
1406
1410
|
}), P = D("left-start"), {
|
|
1407
1411
|
floatingStyles: C,
|
|
1408
|
-
update:
|
|
1412
|
+
update: L
|
|
1409
1413
|
} = Bt(f, $, {
|
|
1410
1414
|
placement: P,
|
|
1411
1415
|
middleware: [
|
|
@@ -1413,10 +1417,10 @@ const Yl = { class: "popover__content" }, Zl = {
|
|
|
1413
1417
|
ut({ padding: 8 }),
|
|
1414
1418
|
rt(8)
|
|
1415
1419
|
]
|
|
1416
|
-
}), g = Ne(), S = D(!1), b = D(!1), { lockScroll: F, unlockScroll: E } = et(),
|
|
1417
|
-
get: () =>
|
|
1420
|
+
}), g = Ne(), S = D(!1), b = D(!1), { lockScroll: F, unlockScroll: E } = et(), O = R(() => r && r.value !== void 0), H = R({
|
|
1421
|
+
get: () => O.value ? r?.value : S.value,
|
|
1418
1422
|
set: (q) => {
|
|
1419
|
-
|
|
1423
|
+
O.value ? d("update:modelValue", q) : S.value = q;
|
|
1420
1424
|
}
|
|
1421
1425
|
}), B = () => {
|
|
1422
1426
|
H.value = !0;
|
|
@@ -1425,13 +1429,13 @@ const Yl = { class: "popover__content" }, Zl = {
|
|
|
1425
1429
|
}, ue = () => {
|
|
1426
1430
|
H.value = !H.value;
|
|
1427
1431
|
}, le = () => {
|
|
1428
|
-
ue();
|
|
1432
|
+
O.value ? B() : ue();
|
|
1429
1433
|
}, ie = async (q) => {
|
|
1430
1434
|
q && q.stopPropagation(), f.value && (b.value = !0);
|
|
1431
1435
|
}, j = () => {
|
|
1432
1436
|
b.value = !1;
|
|
1433
1437
|
}, ne = (q) => {
|
|
1434
|
-
if (i.value === "button-only" ||
|
|
1438
|
+
if (i.value === "button-only" || O.value) return;
|
|
1435
1439
|
const K = q.composedPath();
|
|
1436
1440
|
if (!($.value && K.includes($.value))) {
|
|
1437
1441
|
if (f.value && K.includes(f.value) || m.value && K.includes(m.value)) {
|
|
@@ -1460,18 +1464,18 @@ const Yl = { class: "popover__content" }, Zl = {
|
|
|
1460
1464
|
}
|
|
1461
1465
|
});
|
|
1462
1466
|
return ae(T, (q) => {
|
|
1463
|
-
|
|
1467
|
+
O.value || (H.value = q.hide?.referenceHidden === !1);
|
|
1464
1468
|
}), ae(H, (q) => {
|
|
1465
1469
|
q || j(), q && i.value === "button-only" ? F() : !q && i.value === "button-only" && E();
|
|
1466
1470
|
}, { immediate: !0 }), ae(n, () => {
|
|
1467
1471
|
z();
|
|
1468
1472
|
}, { deep: !0 }), de(() => {
|
|
1469
1473
|
f.value && f.value.addEventListener("resize", () => {
|
|
1470
|
-
z(), b.value &&
|
|
1474
|
+
z(), b.value && L();
|
|
1471
1475
|
}), document.addEventListener("click", ne), window.addEventListener("resize", () => {
|
|
1472
|
-
z(), b.value &&
|
|
1476
|
+
z(), b.value && L();
|
|
1473
1477
|
}), window.addEventListener("scroll", () => {
|
|
1474
|
-
z(), b.value &&
|
|
1478
|
+
z(), b.value && L();
|
|
1475
1479
|
});
|
|
1476
1480
|
}), Je(() => {
|
|
1477
1481
|
f.value && f.value.removeEventListener("resize", z), document.removeEventListener("click", ne), window.removeEventListener("resize", z), window.removeEventListener("scroll", z), i.value === "button-only" && H.value && E();
|
|
@@ -1502,8 +1506,8 @@ const Yl = { class: "popover__content" }, Zl = {
|
|
|
1502
1506
|
default: Q(() => [
|
|
1503
1507
|
H.value ? (c(), v("div", {
|
|
1504
1508
|
key: 0,
|
|
1505
|
-
class: M(["popover__wrapper", `popover__wrapper--${p(g)}
|
|
1506
|
-
style: X({ ...p(V), zIndex: p(u) +
|
|
1509
|
+
class: M(["popover__wrapper", [`popover__wrapper--${p(g)}`, { "popover__wrapper--no-style": e.withoutStyle }]]),
|
|
1510
|
+
style: X({ ...p(V), zIndex: p(u) + 2 }),
|
|
1507
1511
|
ref: "floating"
|
|
1508
1512
|
}, [
|
|
1509
1513
|
k("div", Yl, [
|
|
@@ -1545,7 +1549,7 @@ const Yl = { class: "popover__content" }, Zl = {
|
|
|
1545
1549
|
})
|
|
1546
1550
|
], 2));
|
|
1547
1551
|
}
|
|
1548
|
-
}), Jl = /* @__PURE__ */ se(Xl, [["__scopeId", "data-v-
|
|
1552
|
+
}), Jl = /* @__PURE__ */ se(Xl, [["__scopeId", "data-v-7e899f2a"]]), Ql = { class: "trigger" }, en = { class: "description-column" }, tn = /* @__PURE__ */ I({
|
|
1549
1553
|
__name: "DescriptionColumn",
|
|
1550
1554
|
props: {
|
|
1551
1555
|
description: {}
|
|
@@ -2452,8 +2456,8 @@ const Yl = { class: "popover__content" }, Zl = {
|
|
|
2452
2456
|
let g = [...e.data];
|
|
2453
2457
|
if (w.value) {
|
|
2454
2458
|
const { field: b, order: F } = w.value;
|
|
2455
|
-
g.sort((E,
|
|
2456
|
-
const H = E[b], B =
|
|
2459
|
+
g.sort((E, O) => {
|
|
2460
|
+
const H = E[b], B = O[b];
|
|
2457
2461
|
return H === B ? 0 : F === 1 ? H > B ? 1 : -1 : H < B ? 1 : -1;
|
|
2458
2462
|
});
|
|
2459
2463
|
}
|
|
@@ -2475,7 +2479,7 @@ const Yl = { class: "popover__content" }, Zl = {
|
|
|
2475
2479
|
]), P = R(() => {
|
|
2476
2480
|
const g = {};
|
|
2477
2481
|
return e.maxHeight ? (g.maxHeight = typeof e.maxHeight == "number" ? `${e.maxHeight}px` : e.maxHeight, g.overflow = "auto") : e.scroller && e.scroller.enable && (g.maxHeight = `${e.scroller.height}px`, g.overflow = "auto"), g;
|
|
2478
|
-
}), C = D(/* @__PURE__ */ new Set()),
|
|
2482
|
+
}), C = D(/* @__PURE__ */ new Set()), L = (g) => {
|
|
2479
2483
|
C.value.has(g) ? C.value.delete(g) : C.value.add(g);
|
|
2480
2484
|
};
|
|
2481
2485
|
return ae(u, (g) => {
|
|
@@ -2515,7 +2519,7 @@ const Yl = { class: "popover__content" }, Zl = {
|
|
|
2515
2519
|
rowStyle: g.rowStyle,
|
|
2516
2520
|
onRowClickHandler: S[1] || (S[1] = (b) => o("rowClickHandler", b)),
|
|
2517
2521
|
onToggleRow: S[2] || (S[2] = (b) => p(m)(b)),
|
|
2518
|
-
onToggleGroup: S[3] || (S[3] = (b) =>
|
|
2522
|
+
onToggleGroup: S[3] || (S[3] = (b) => L(b))
|
|
2519
2523
|
}, null, 8, ["size", "selectedRows", "columns", "data", "rowGroupMode", "groupRowsBy", "collapsedGroups", "colorHovered", "scroller", "virtualScroll", "rowStyle"])
|
|
2520
2524
|
], 2),
|
|
2521
2525
|
W(zt, {
|
|
@@ -2558,7 +2562,7 @@ const Yl = { class: "popover__content" }, Zl = {
|
|
|
2558
2562
|
rowStyle: g.rowStyle,
|
|
2559
2563
|
onRowClickHandler: S[7] || (S[7] = (b) => o("rowClickHandler", b)),
|
|
2560
2564
|
onToggleRow: S[8] || (S[8] = (b) => p(m)(b)),
|
|
2561
|
-
onToggleGroup: S[9] || (S[9] = (b) =>
|
|
2565
|
+
onToggleGroup: S[9] || (S[9] = (b) => L(b))
|
|
2562
2566
|
}, null, 8, ["size", "selectedRows", "columns", "data", "rowGroupMode", "groupRowsBy", "collapsedGroups", "colorHovered", "scroller", "virtualScroll", "rowStyle"]),
|
|
2563
2567
|
W(zt, {
|
|
2564
2568
|
currentPage: h.value,
|
|
@@ -2666,15 +2670,15 @@ function ia(e, t) {
|
|
|
2666
2670
|
return d(C) ? r[C].test(P) : !1;
|
|
2667
2671
|
}
|
|
2668
2672
|
function f(P) {
|
|
2669
|
-
const { required: C, optional:
|
|
2673
|
+
const { required: C, optional: L } = u(o), g = C + L;
|
|
2670
2674
|
let S = "", b = 0, F = 0;
|
|
2671
2675
|
for (; F < g.length; ) {
|
|
2672
2676
|
const E = g[F];
|
|
2673
2677
|
if (d(E))
|
|
2674
2678
|
if (b < P.length) {
|
|
2675
|
-
const
|
|
2676
|
-
if (m(
|
|
2677
|
-
S +=
|
|
2679
|
+
const O = P[b];
|
|
2680
|
+
if (m(O, E))
|
|
2681
|
+
S += O, b++;
|
|
2678
2682
|
else {
|
|
2679
2683
|
b++;
|
|
2680
2684
|
continue;
|
|
@@ -2692,15 +2696,15 @@ function ia(e, t) {
|
|
|
2692
2696
|
return (P + C).replace(/[9a*]/g, n);
|
|
2693
2697
|
}
|
|
2694
2698
|
function $(P) {
|
|
2695
|
-
const { required: C, optional:
|
|
2699
|
+
const { required: C, optional: L } = u(o), g = C + L;
|
|
2696
2700
|
let S = "", b = 0, F = 0;
|
|
2697
2701
|
for (; b < P.length && F < g.length; ) {
|
|
2698
|
-
const E = P[b],
|
|
2702
|
+
const E = P[b], O = g[F];
|
|
2699
2703
|
if (E === n) {
|
|
2700
2704
|
b++;
|
|
2701
2705
|
continue;
|
|
2702
2706
|
}
|
|
2703
|
-
d(
|
|
2707
|
+
d(O) ? m(E, O) ? (S += E, b++, F++) : b++ : (E === O && b++, F++);
|
|
2704
2708
|
}
|
|
2705
2709
|
for (; b < P.length; ) {
|
|
2706
2710
|
const E = P[b];
|
|
@@ -2708,30 +2712,30 @@ function ia(e, t) {
|
|
|
2708
2712
|
b++;
|
|
2709
2713
|
continue;
|
|
2710
2714
|
}
|
|
2711
|
-
let
|
|
2715
|
+
let O = !1, H = 0;
|
|
2712
2716
|
for (let B = 0; B < g.length; B++)
|
|
2713
2717
|
if (d(g[B])) {
|
|
2714
2718
|
if (H === S.length) {
|
|
2715
|
-
m(E, g[B]) && (S += E,
|
|
2719
|
+
m(E, g[B]) && (S += E, O = !0);
|
|
2716
2720
|
break;
|
|
2717
2721
|
}
|
|
2718
2722
|
H++;
|
|
2719
2723
|
}
|
|
2720
|
-
if (b++, !
|
|
2724
|
+
if (b++, !O)
|
|
2721
2725
|
break;
|
|
2722
2726
|
}
|
|
2723
2727
|
return S;
|
|
2724
2728
|
}
|
|
2725
2729
|
function h(P) {
|
|
2726
|
-
const { required: C } = u(o),
|
|
2727
|
-
return $(P).length >=
|
|
2730
|
+
const { required: C } = u(o), L = C.replace(/[^9a*]/g, "").length;
|
|
2731
|
+
return $(P).length >= L;
|
|
2728
2732
|
}
|
|
2729
2733
|
function y() {
|
|
2730
2734
|
const P = Ee(e) || "";
|
|
2731
2735
|
if (i.value || P)
|
|
2732
2736
|
a.value = f(P);
|
|
2733
2737
|
else {
|
|
2734
|
-
const { required: C, optional:
|
|
2738
|
+
const { required: C, optional: L } = u(o), g = C + L;
|
|
2735
2739
|
let S = "";
|
|
2736
2740
|
for (let b = 0; b < g.length && !d(g[b]); b++)
|
|
2737
2741
|
S += g[b];
|
|
@@ -2740,57 +2744,57 @@ function ia(e, t) {
|
|
|
2740
2744
|
}
|
|
2741
2745
|
function x(P) {
|
|
2742
2746
|
if (!P.isTrusted) return;
|
|
2743
|
-
const C = P.target,
|
|
2747
|
+
const C = P.target, L = C.value, g = $(L), S = f(g);
|
|
2744
2748
|
a.value = S, e.value = g, ge(() => {
|
|
2745
2749
|
const { required: b, optional: F } = u(o), E = b + F;
|
|
2746
|
-
let
|
|
2750
|
+
let O = 0, H = 0;
|
|
2747
2751
|
for (let B = 0; B < E.length; B++)
|
|
2748
2752
|
if (d(E[B]))
|
|
2749
2753
|
if (H < g.length)
|
|
2750
2754
|
H++;
|
|
2751
2755
|
else {
|
|
2752
|
-
|
|
2756
|
+
O = B;
|
|
2753
2757
|
break;
|
|
2754
2758
|
}
|
|
2755
2759
|
if (H === g.length && g.length > 0) {
|
|
2756
2760
|
H = 0;
|
|
2757
2761
|
for (let B = 0; B < E.length; B++)
|
|
2758
2762
|
if (d(E[B]) && (H++, H === g.length)) {
|
|
2759
|
-
|
|
2763
|
+
O = B + 1;
|
|
2760
2764
|
break;
|
|
2761
2765
|
}
|
|
2762
2766
|
}
|
|
2763
|
-
|
|
2767
|
+
O = Math.min(O, S.length), C.setSelectionRange(O, O);
|
|
2764
2768
|
});
|
|
2765
2769
|
}
|
|
2766
2770
|
function V(P) {
|
|
2767
2771
|
const C = P.target;
|
|
2768
2772
|
setTimeout(() => {
|
|
2769
|
-
const
|
|
2773
|
+
const L = C.value, g = $(L), S = f(g);
|
|
2770
2774
|
a.value = S, e.value = g;
|
|
2771
2775
|
const { required: b, optional: F } = u(o), E = b + F;
|
|
2772
|
-
let
|
|
2776
|
+
let O = 0, H = 0;
|
|
2773
2777
|
for (let B = 0; B < E.length; B++)
|
|
2774
2778
|
if (d(E[B]))
|
|
2775
2779
|
if (H < g.length)
|
|
2776
2780
|
H++;
|
|
2777
2781
|
else {
|
|
2778
|
-
|
|
2782
|
+
O = B;
|
|
2779
2783
|
break;
|
|
2780
2784
|
}
|
|
2781
2785
|
if (H === g.length && g.length > 0) {
|
|
2782
2786
|
H = 0;
|
|
2783
2787
|
for (let B = 0; B < E.length; B++)
|
|
2784
2788
|
if (d(E[B]) && (H++, H === g.length)) {
|
|
2785
|
-
|
|
2789
|
+
O = B + 1;
|
|
2786
2790
|
break;
|
|
2787
2791
|
}
|
|
2788
2792
|
}
|
|
2789
|
-
|
|
2793
|
+
O = Math.min(O, S.length), C.setSelectionRange(O, O);
|
|
2790
2794
|
}, 0);
|
|
2791
2795
|
}
|
|
2792
2796
|
function T(P) {
|
|
2793
|
-
const C = P.target,
|
|
2797
|
+
const C = P.target, L = C.selectionStart || 0;
|
|
2794
2798
|
if (P.key === "Backspace") {
|
|
2795
2799
|
if (P.metaKey || P.ctrlKey)
|
|
2796
2800
|
return;
|
|
@@ -2809,11 +2813,11 @@ function ia(e, t) {
|
|
|
2809
2813
|
});
|
|
2810
2814
|
return;
|
|
2811
2815
|
}
|
|
2812
|
-
if (
|
|
2816
|
+
if (L > 0 && a.value.length > 0) {
|
|
2813
2817
|
const le = a.value;
|
|
2814
2818
|
let ie = "", j = -1;
|
|
2815
2819
|
const { required: ne, optional: re } = u(o), q = ne + re;
|
|
2816
|
-
for (let K =
|
|
2820
|
+
for (let K = L - 1; K >= 0; K--)
|
|
2817
2821
|
if (K < q.length && d(q[K])) {
|
|
2818
2822
|
j = K;
|
|
2819
2823
|
break;
|
|
@@ -2852,10 +2856,10 @@ function ia(e, t) {
|
|
|
2852
2856
|
});
|
|
2853
2857
|
return;
|
|
2854
2858
|
}
|
|
2855
|
-
if (
|
|
2859
|
+
if (L < a.value.length) {
|
|
2856
2860
|
const le = a.value;
|
|
2857
2861
|
let ie = -1;
|
|
2858
|
-
for (let j =
|
|
2862
|
+
for (let j = L; j < le.length; j++) {
|
|
2859
2863
|
const { required: ne, optional: re } = u(o), q = ne + re;
|
|
2860
2864
|
if (j < q.length && d(q[j])) {
|
|
2861
2865
|
ie = j;
|
|
@@ -2874,7 +2878,7 @@ function ia(e, t) {
|
|
|
2874
2878
|
j = j.slice(0, ne) + j.slice(ne + 1);
|
|
2875
2879
|
const re = f(j);
|
|
2876
2880
|
a.value = re, e.value = j, ge(() => {
|
|
2877
|
-
C.setSelectionRange(
|
|
2881
|
+
C.setSelectionRange(L, L);
|
|
2878
2882
|
});
|
|
2879
2883
|
}
|
|
2880
2884
|
}
|
|
@@ -2887,20 +2891,20 @@ function ia(e, t) {
|
|
|
2887
2891
|
P.preventDefault();
|
|
2888
2892
|
return;
|
|
2889
2893
|
}
|
|
2890
|
-
let
|
|
2894
|
+
let O = -1, H = 0;
|
|
2891
2895
|
for (let B = 0; B < b.length; B++)
|
|
2892
2896
|
if (d(b[B])) {
|
|
2893
2897
|
if (H === F.length) {
|
|
2894
|
-
|
|
2898
|
+
O = B;
|
|
2895
2899
|
break;
|
|
2896
2900
|
}
|
|
2897
2901
|
H++;
|
|
2898
2902
|
}
|
|
2899
|
-
|
|
2903
|
+
O >= 0 && !m(P.key, b[O]) && P.preventDefault();
|
|
2900
2904
|
}
|
|
2901
2905
|
function z(P) {
|
|
2902
2906
|
i.value = !0, ge(() => {
|
|
2903
|
-
const C = P.target, { required:
|
|
2907
|
+
const C = P.target, { required: L, optional: g } = u(o), S = L + g;
|
|
2904
2908
|
let b = 0;
|
|
2905
2909
|
for (let F = 0; F < S.length; F++)
|
|
2906
2910
|
if (d(S[F])) {
|
|
@@ -3774,13 +3778,13 @@ const Ds = {
|
|
|
3774
3778
|
["bottomright", "bottom", "top", "right", "left", "bottomleft", "topright", "topleft"].forEach((S) => {
|
|
3775
3779
|
P.includes(S) || P.push(S);
|
|
3776
3780
|
});
|
|
3777
|
-
let
|
|
3781
|
+
let L = $, g = z($);
|
|
3778
3782
|
for (const S of P)
|
|
3779
3783
|
if (U(S)) {
|
|
3780
|
-
|
|
3784
|
+
L = S, g = z(S);
|
|
3781
3785
|
break;
|
|
3782
3786
|
}
|
|
3783
|
-
g.top = Math.max(V, Math.min(g.top, window.innerHeight - x.height - V)), g.left = Math.max(V, Math.min(g.left, window.innerWidth - x.width - V)), n.value =
|
|
3787
|
+
g.top = Math.max(V, Math.min(g.top, window.innerHeight - x.height - V)), g.left = Math.max(V, Math.min(g.left, window.innerWidth - x.width - V)), n.value = L, o.value = {
|
|
3784
3788
|
position: "fixed",
|
|
3785
3789
|
top: `${g.top}px`,
|
|
3786
3790
|
left: `${g.left}px`,
|