@wirecore/wirelayer-vue 0.9.1 → 0.10.0
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/{ContextMenu-CBE9YnDW.js → ContextMenu-DC--vmIf.js} +1 -1
- package/dist/components/DatePicker/DatePickerDayTable.vue.d.ts.map +1 -1
- package/dist/components/Stepper/Stepper.vue.d.ts +4 -1
- package/dist/components/Stepper/Stepper.vue.d.ts.map +1 -1
- package/dist/data-table/DataTable.vue.d.ts +5 -0
- package/dist/data-table/DataTable.vue.d.ts.map +1 -1
- package/dist/data-table.js +303 -299
- package/dist/index.js +6 -3
- package/llms-full.txt +1 -0
- package/package.json +1 -1
package/dist/data-table.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as e, i as t, n } from "./recipes-BlM9aKyt.js";
|
|
2
|
-
import { _ as r, g as i, i as a, n as o, r as s, t as c, v as l, y as u } from "./ContextMenu-
|
|
2
|
+
import { _ as r, g as i, i as a, n as o, r as s, t as c, v as l, y as u } from "./ContextMenu-DC--vmIf.js";
|
|
3
3
|
import { t as d } from "./Button-BpMOPs8b.js";
|
|
4
4
|
import { t as ee } from "./Checkbox-DS2qfQK1.js";
|
|
5
5
|
import { n as f, t as p } from "./Input-C5dyvZfJ.js";
|
|
@@ -603,6 +603,7 @@ var Rn = In({
|
|
|
603
603
|
wrapHeaders: { type: Boolean },
|
|
604
604
|
verticalHeaders: { type: Boolean },
|
|
605
605
|
editMode: { default: "cell" },
|
|
606
|
+
editTrigger: { default: "click" },
|
|
606
607
|
size: { default: void 0 },
|
|
607
608
|
densityToggle: { type: Boolean },
|
|
608
609
|
gridlines: { type: Boolean },
|
|
@@ -1136,7 +1137,7 @@ var Rn = In({
|
|
|
1136
1137
|
let da = (e, t) => {
|
|
1137
1138
|
let n = aa(e);
|
|
1138
1139
|
return Array.isArray(n) ? n[t] : null;
|
|
1139
|
-
}, fa = h(() => C.selectionMode !== "single"), pa = h(() => C.selectAllMode === "all" && Mn.value), ma = (e) => pa.value && Rr.value ? e.getCanSelect() && !Rr.value.except.includes(e.id) : e.getIsSelected(), ha = h(() => pa.value ? Rr.value ? !Rr.value.except.length || "indeterminate" :
|
|
1140
|
+
}, fa = h(() => C.selectionMode !== "single"), pa = h(() => C.selectAllMode === "all" && Mn.value), ma = (e) => pa.value && Rr.value ? e.getCanSelect() && !Rr.value.except.includes(e.id) : e.getIsSelected(), ha = h(() => pa.value ? Rr.value ? !Rr.value.except.length || "indeterminate" : cc.value ? "indeterminate" : !1 : K.getIsAllPageRowsSelected() ? !0 : K.getIsSomePageRowsSelected() ? "indeterminate" : !1);
|
|
1140
1141
|
function ga(e) {
|
|
1141
1142
|
pa.value ? (ti({}), ni(Rr.value || !e ? null : {
|
|
1142
1143
|
mode: "all",
|
|
@@ -1391,7 +1392,7 @@ var Rn = In({
|
|
|
1391
1392
|
let bo = h(() => Object.keys(uo.value).length);
|
|
1392
1393
|
async function xo() {
|
|
1393
1394
|
await T();
|
|
1394
|
-
let e =
|
|
1395
|
+
let e = wc.value;
|
|
1395
1396
|
(e?.querySelector("[tabindex=\"0\"]") ?? e)?.focus();
|
|
1396
1397
|
}
|
|
1397
1398
|
function So() {
|
|
@@ -1434,25 +1435,28 @@ var Rn = In({
|
|
|
1434
1435
|
async function Po() {
|
|
1435
1436
|
await T(), Oo.value?.querySelector("[data-editor] :is(input, button, [role=combobox], [tabindex=\"0\"])")?.focus();
|
|
1436
1437
|
}
|
|
1437
|
-
function Fo(e, t) {
|
|
1438
|
+
function Fo(e, t, n) {
|
|
1439
|
+
(C.editTrigger !== "dblclick" || n.detail !== 1) && Io(e, t);
|
|
1440
|
+
}
|
|
1441
|
+
function Io(e, t) {
|
|
1438
1442
|
wo.value = {
|
|
1439
1443
|
rowId: e.id,
|
|
1440
1444
|
columnId: t
|
|
1441
1445
|
}, Eo.value = { [t]: Q(e, t) }, Do.value = {}, Po();
|
|
1442
1446
|
}
|
|
1443
|
-
let
|
|
1444
|
-
function
|
|
1447
|
+
let Lo = k(!1);
|
|
1448
|
+
function Ro(e, t) {
|
|
1445
1449
|
let n = $e(t.map((t) => [t, () => B.value.get(t)?.validate?.(Eo.value[t], e.original)])), r = (e) => (Do.value = e, Object.keys(e).length === 0);
|
|
1446
|
-
return n instanceof Promise ? (
|
|
1450
|
+
return n instanceof Promise ? (Lo.value = !0, n.then(r).finally(() => Lo.value = !1)) : r(n);
|
|
1447
1451
|
}
|
|
1448
|
-
function
|
|
1449
|
-
if (!wo.value ||
|
|
1450
|
-
let r =
|
|
1452
|
+
function zo(e, t, n) {
|
|
1453
|
+
if (!wo.value || Lo.value) return;
|
|
1454
|
+
let r = Ro(e, [t]);
|
|
1451
1455
|
return r instanceof Promise ? r.then((r) => {
|
|
1452
|
-
if (wo.value?.rowId === e.id && wo.value.columnId === t) return r ?
|
|
1453
|
-
}) : r ?
|
|
1456
|
+
if (wo.value?.rowId === e.id && wo.value.columnId === t) return r ? Bo(e, t, n) : Po();
|
|
1457
|
+
}) : r ? Bo(e, t, n) : Po();
|
|
1454
1458
|
}
|
|
1455
|
-
async function
|
|
1459
|
+
async function Bo(e, t, n) {
|
|
1456
1460
|
let r = Eo.value[t];
|
|
1457
1461
|
wo.value = null;
|
|
1458
1462
|
let i = Q(e, t);
|
|
@@ -1463,32 +1467,32 @@ var Rn = In({
|
|
|
1463
1467
|
after: r
|
|
1464
1468
|
}]), n) {
|
|
1465
1469
|
let r = Mo(), i = r[r.findIndex((n) => n.rowId === e.id && n.columnId === t) + n], a = i && K.getRow(i.rowId, !0);
|
|
1466
|
-
if (i && a) return
|
|
1470
|
+
if (i && a) return Io(a, i.columnId);
|
|
1467
1471
|
}
|
|
1468
1472
|
await T(), No(`[data-edit="${CSS.escape(Ao(e.id, t))}"]`);
|
|
1469
1473
|
}
|
|
1470
|
-
async function
|
|
1474
|
+
async function Vo(e, t) {
|
|
1471
1475
|
wo.value = null, Do.value = {}, await T(), No(`[data-edit="${CSS.escape(Ao(e.id, t))}"]`);
|
|
1472
1476
|
}
|
|
1473
|
-
function Vo(e, t, n) {
|
|
1474
|
-
n.defaultPrevented || (n.key === "Escape" ? (n.preventDefault(), Bo(e, t)) : n.key === "Enter" && (n.target.matches("textarea") ? n.ctrlKey || n.metaKey : !n.target.matches("button, [role=combobox]")) ? (n.preventDefault(), Ro(e, t)) : n.key === "Tab" && (n.preventDefault(), Ro(e, t, n.shiftKey ? -1 : 1)));
|
|
1475
|
-
}
|
|
1476
1477
|
function Ho(e, t, n) {
|
|
1478
|
+
n.defaultPrevented || (n.key === "Escape" ? (n.preventDefault(), Vo(e, t)) : n.key === "Enter" && (n.target.matches("textarea") ? n.ctrlKey || n.metaKey : !n.target.matches("button, [role=combobox]")) ? (n.preventDefault(), zo(e, t)) : n.key === "Tab" && (n.preventDefault(), zo(e, t, n.shiftKey ? -1 : 1)));
|
|
1479
|
+
}
|
|
1480
|
+
function Uo(e, t, n) {
|
|
1477
1481
|
let r = n.relatedTarget, i = n.currentTarget;
|
|
1478
|
-
r && (i.contains(r) || !Oo.value?.contains(r) && r.closest("[data-scope]")) ||
|
|
1482
|
+
r && (i.contains(r) || !Oo.value?.contains(r) && r.closest("[data-scope]")) || zo(e, t);
|
|
1479
1483
|
}
|
|
1480
|
-
let
|
|
1484
|
+
let Wo = /* @__PURE__ */ new Set([
|
|
1481
1485
|
"select",
|
|
1482
1486
|
"date",
|
|
1483
1487
|
"checkbox"
|
|
1484
1488
|
]);
|
|
1485
|
-
function
|
|
1489
|
+
function Go(e, t, n) {
|
|
1486
1490
|
Eo.value = {
|
|
1487
1491
|
...Eo.value,
|
|
1488
1492
|
[t.id]: n
|
|
1489
|
-
}, mi.value &&
|
|
1493
|
+
}, mi.value && Wo.has(ko(t)) && !I[`editor-${t.id}`] && zo(e, t.id);
|
|
1490
1494
|
}
|
|
1491
|
-
function
|
|
1495
|
+
function Ko(e, t) {
|
|
1492
1496
|
return {
|
|
1493
1497
|
value: Eo.value[t.id],
|
|
1494
1498
|
setValue: (e) => Eo.value = {
|
|
@@ -1496,18 +1500,18 @@ var Rn = In({
|
|
|
1496
1500
|
[t.id]: e
|
|
1497
1501
|
},
|
|
1498
1502
|
row: e.original,
|
|
1499
|
-
commit: () => void (mi.value ?
|
|
1500
|
-
cancel: () => void (mi.value ?
|
|
1503
|
+
commit: () => void (mi.value ? zo(e, t.id) : Jo(e, !0)),
|
|
1504
|
+
cancel: () => void (mi.value ? Vo(e, t.id) : Jo(e, !1)),
|
|
1501
1505
|
invalid: !!Do.value[t.id]
|
|
1502
1506
|
};
|
|
1503
1507
|
}
|
|
1504
|
-
function
|
|
1508
|
+
function qo(e) {
|
|
1505
1509
|
To.value = e.id, Do.value = {}, Eo.value = Object.fromEntries(In.value.filter((e) => e.editable).map((t) => [t.id, e.getValue(t.id)])), Po();
|
|
1506
1510
|
}
|
|
1507
|
-
async function
|
|
1508
|
-
if (!
|
|
1511
|
+
async function Jo(e, t) {
|
|
1512
|
+
if (!Lo.value) {
|
|
1509
1513
|
if (t) {
|
|
1510
|
-
if (!await
|
|
1514
|
+
if (!await Ro(e, In.value.filter((e) => e.editable).map((e) => e.id))) return Po();
|
|
1511
1515
|
if (To.value !== e.id) return;
|
|
1512
1516
|
F("rowEdit", {
|
|
1513
1517
|
row: e.original,
|
|
@@ -1518,20 +1522,20 @@ var Rn = In({
|
|
|
1518
1522
|
To.value = null, Do.value = {}, await T(), No(`[data-row-edit="${CSS.escape(e.id)}"]`);
|
|
1519
1523
|
}
|
|
1520
1524
|
}
|
|
1521
|
-
function
|
|
1522
|
-
t.defaultPrevented || (t.key === "Escape" ? (t.preventDefault(),
|
|
1525
|
+
function Yo(e, t) {
|
|
1526
|
+
t.defaultPrevented || (t.key === "Escape" ? (t.preventDefault(), Jo(e, !1)) : t.key === "Enter" && t.target.matches("input") && (t.preventDefault(), Jo(e, !0)));
|
|
1523
1527
|
}
|
|
1524
|
-
let
|
|
1525
|
-
function
|
|
1526
|
-
let n =
|
|
1528
|
+
let Xo = he(null), Zo = h(() => Z.value.filter((e) => e.kind === "row").map((e) => e.row.id)), Qo = h(() => Y.value.map((e) => e.id)), $o = h(() => C.cellSelection ? $t(Xo.value, Zo.value, Qo.value) : null), es = h(() => new Map(Zo.value.map((e, t) => [e, t]))), ts = h(() => new Map(Qo.value.map((e, t) => [e, t])));
|
|
1529
|
+
function ns(e, t) {
|
|
1530
|
+
let n = $o.value;
|
|
1527
1531
|
if (!n) return !1;
|
|
1528
|
-
let r =
|
|
1532
|
+
let r = es.value.get(e) ?? -1, i = ts.value.get(t) ?? -1;
|
|
1529
1533
|
return r >= n.top && r <= n.bottom && i >= n.left && i <= n.right;
|
|
1530
1534
|
}
|
|
1531
|
-
function
|
|
1532
|
-
let t = $t(e,
|
|
1535
|
+
function rs(e) {
|
|
1536
|
+
let t = $t(e, Zo.value, Qo.value);
|
|
1533
1537
|
if (!t) return null;
|
|
1534
|
-
let n =
|
|
1538
|
+
let n = Zo.value.slice(t.top, t.bottom + 1), r = Qo.value.slice(t.left, t.right + 1), i = n.flatMap((e) => Wa(e) ?? []);
|
|
1535
1539
|
return {
|
|
1536
1540
|
rowIds: n,
|
|
1537
1541
|
columnIds: r,
|
|
@@ -1539,40 +1543,40 @@ var Rn = In({
|
|
|
1539
1543
|
values: i.map((e) => r.map((t) => Q(e, t)))
|
|
1540
1544
|
};
|
|
1541
1545
|
}
|
|
1542
|
-
function
|
|
1543
|
-
let t =
|
|
1544
|
-
e && t && e.anchor.rowId === t.anchor.rowId && e.anchor.columnId === t.anchor.columnId && e.focus.rowId === t.focus.rowId && e.focus.columnId === t.focus.columnId || !e && !t || (
|
|
1546
|
+
function is(e) {
|
|
1547
|
+
let t = Xo.value;
|
|
1548
|
+
e && t && e.anchor.rowId === t.anchor.rowId && e.anchor.columnId === t.anchor.columnId && e.focus.rowId === t.focus.rowId && e.focus.columnId === t.focus.columnId || !e && !t || (Xo.value = e, F("cellSelectionChange", rs(e)));
|
|
1545
1549
|
}
|
|
1546
|
-
let
|
|
1547
|
-
de(() => window.addEventListener("pointerup",
|
|
1548
|
-
function
|
|
1550
|
+
let as = !1, os = !1, ss = !1, cs = () => as = !1;
|
|
1551
|
+
de(() => window.addEventListener("pointerup", cs)), ue(() => window.removeEventListener("pointerup", cs));
|
|
1552
|
+
function ls(e, t, n) {
|
|
1549
1553
|
if (!C.cellSelection || n.button !== 0 || n.target.closest("[data-editor]")) return;
|
|
1550
1554
|
let r = {
|
|
1551
1555
|
rowId: e,
|
|
1552
1556
|
columnId: t
|
|
1553
|
-
}, i =
|
|
1554
|
-
|
|
1557
|
+
}, i = Xo.value, a = n.shiftKey && i;
|
|
1558
|
+
is(a ? {
|
|
1555
1559
|
anchor: i.anchor,
|
|
1556
1560
|
focus: r
|
|
1557
1561
|
} : {
|
|
1558
1562
|
anchor: r,
|
|
1559
1563
|
focus: r
|
|
1560
|
-
}),
|
|
1564
|
+
}), as = !0, ss = !!a, a && window.getSelection()?.removeAllRanges();
|
|
1561
1565
|
}
|
|
1562
|
-
function
|
|
1563
|
-
|
|
1564
|
-
anchor:
|
|
1566
|
+
function us(e, t, n) {
|
|
1567
|
+
as && Xo.value && n.buttons & 1 && (is({
|
|
1568
|
+
anchor: Xo.value.anchor,
|
|
1565
1569
|
focus: {
|
|
1566
1570
|
rowId: e,
|
|
1567
1571
|
columnId: t
|
|
1568
1572
|
}
|
|
1569
1573
|
}), window.getSelection()?.removeAllRanges());
|
|
1570
1574
|
}
|
|
1571
|
-
function
|
|
1572
|
-
|
|
1575
|
+
function ds(e) {
|
|
1576
|
+
ss && (ss = !1, e.preventDefault(), e.stopPropagation());
|
|
1573
1577
|
}
|
|
1574
|
-
let
|
|
1575
|
-
function
|
|
1578
|
+
let fs = (e, t) => wc.value?.querySelector(`tr[data-row-id="${CSS.escape(e)}"] > [data-column-id="${CSS.escape(t)}"]`) ?? null;
|
|
1579
|
+
function ps(e) {
|
|
1576
1580
|
let t = e.target, n = e.key;
|
|
1577
1581
|
if (!C.cellSelection || !q.value || !e.shiftKey || e.altKey || ![
|
|
1578
1582
|
"ArrowUp",
|
|
@@ -1584,7 +1588,7 @@ var Rn = In({
|
|
|
1584
1588
|
].includes(n)) return !1;
|
|
1585
1589
|
let r = t.closest("tr")?.dataset.rowId, i = t.dataset.columnId;
|
|
1586
1590
|
if (!r || !i || !t.matches("td")) return !1;
|
|
1587
|
-
let a = getComputedStyle(t).direction === "rtl", o = n === "ArrowUp" ? "up" : n === "ArrowDown" ? "down" : n === "Home" ? "home" : n === "End" ? "end" : n === "ArrowRight" === a ? "previous" : "next", s =
|
|
1591
|
+
let a = getComputedStyle(t).direction === "rtl", o = n === "ArrowUp" ? "up" : n === "ArrowDown" ? "down" : n === "Home" ? "home" : n === "End" ? "end" : n === "ArrowRight" === a ? "previous" : "next", s = Xo.value && ns(r, i) ? Xo.value : {
|
|
1588
1592
|
anchor: {
|
|
1589
1593
|
rowId: r,
|
|
1590
1594
|
columnId: i
|
|
@@ -1593,51 +1597,51 @@ var Rn = In({
|
|
|
1593
1597
|
rowId: r,
|
|
1594
1598
|
columnId: i
|
|
1595
1599
|
}
|
|
1596
|
-
}, c = pt(s,
|
|
1597
|
-
e.preventDefault(),
|
|
1600
|
+
}, c = pt(s, Zo.value, Qo.value, o, e.ctrlKey || e.metaKey);
|
|
1601
|
+
e.preventDefault(), is(c);
|
|
1598
1602
|
let l = () => {
|
|
1599
|
-
let e =
|
|
1600
|
-
return e ? (
|
|
1603
|
+
let e = fs(c.focus.rowId, c.focus.columnId);
|
|
1604
|
+
return e ? (os = !0, e.focus(), os = !1, e.scrollIntoView?.({
|
|
1601
1605
|
block: "nearest",
|
|
1602
1606
|
inline: "nearest"
|
|
1603
1607
|
}), !0) : !1;
|
|
1604
1608
|
};
|
|
1605
1609
|
return T(() => {
|
|
1606
|
-
!l() && $.value && (
|
|
1610
|
+
!l() && $.value && (pc?.value.scrollToIndex(Z.value.findIndex((e) => e.kind === "row" && e.row.id === c.focus.rowId)), requestAnimationFrame(() => requestAnimationFrame(() => void l())));
|
|
1607
1611
|
}), !0;
|
|
1608
1612
|
}
|
|
1609
|
-
let
|
|
1610
|
-
function
|
|
1611
|
-
let e =
|
|
1613
|
+
let ms = (e, t) => V(B.value.get(t), Q(e, t), e.original);
|
|
1614
|
+
function hs() {
|
|
1615
|
+
let e = rs(Xo.value);
|
|
1612
1616
|
if (e) {
|
|
1613
1617
|
let t = e.rowIds.flatMap((e) => Wa(e) ?? []);
|
|
1614
1618
|
return {
|
|
1615
|
-
text: un(t.map((t) => e.columnIds.map((e) =>
|
|
1619
|
+
text: un(t.map((t) => e.columnIds.map((e) => ms(t, e)))),
|
|
1616
1620
|
count: t.length * e.columnIds.length
|
|
1617
1621
|
};
|
|
1618
1622
|
}
|
|
1619
1623
|
let t = Z.value.filter((e) => e.kind === "row" && ma(e.row)).map((e) => e.row);
|
|
1620
1624
|
return t.length ? {
|
|
1621
|
-
text: un(t.map((e) =>
|
|
1622
|
-
count: t.length *
|
|
1625
|
+
text: un(t.map((e) => Qo.value.map((t) => ms(e, t)))),
|
|
1626
|
+
count: t.length * Qo.value.length
|
|
1623
1627
|
} : null;
|
|
1624
1628
|
}
|
|
1625
|
-
function
|
|
1629
|
+
function gs() {
|
|
1626
1630
|
let e = document.activeElement;
|
|
1627
|
-
return !!C.cellSelection && !!e && !!
|
|
1631
|
+
return !!C.cellSelection && !!e && !!wc.value?.contains(e) && !e.closest(Or);
|
|
1628
1632
|
}
|
|
1629
|
-
function
|
|
1630
|
-
if (!
|
|
1631
|
-
let t =
|
|
1633
|
+
function _s(e) {
|
|
1634
|
+
if (!gs() || window.getSelection()?.toString()) return;
|
|
1635
|
+
let t = hs();
|
|
1632
1636
|
t && e.clipboardData && (e.clipboardData.setData("text/plain", t.text), e.preventDefault(), Li(L.cellsCopied(t.count)));
|
|
1633
1637
|
}
|
|
1634
|
-
async function
|
|
1635
|
-
let t = Wt(e), n = $t(
|
|
1638
|
+
async function vs(e) {
|
|
1639
|
+
let t = Wt(e), n = $t(Xo.value, Zo.value, Qo.value);
|
|
1636
1640
|
if (!t.length || !n) return;
|
|
1637
1641
|
let r = Gt(t, {
|
|
1638
1642
|
row: n.top,
|
|
1639
1643
|
column: n.left
|
|
1640
|
-
},
|
|
1644
|
+
}, Zo.value, Qo.value, n), i = [], a = [];
|
|
1641
1645
|
for (let e of r) {
|
|
1642
1646
|
let t = B.value.get(e.columnId), n = Wa(e.rowId);
|
|
1643
1647
|
if (!t || !n) continue;
|
|
@@ -1694,81 +1698,81 @@ var Rn = In({
|
|
|
1694
1698
|
c.defaultPrevented = !0;
|
|
1695
1699
|
}
|
|
1696
1700
|
};
|
|
1697
|
-
F("cellPaste", c), !c.defaultPrevented && (_o(s.map(({ change: e }) => e)),
|
|
1701
|
+
F("cellPaste", c), !c.defaultPrevented && (_o(s.map(({ change: e }) => e)), is(Qt(r, Zo.value, Qo.value)), Li(L.cellsPasted(s.length, i.length)));
|
|
1698
1702
|
}
|
|
1699
|
-
function
|
|
1700
|
-
if (!
|
|
1703
|
+
function ys(e) {
|
|
1704
|
+
if (!gs()) return;
|
|
1701
1705
|
let t = e.clipboardData?.getData("text/plain");
|
|
1702
|
-
t && (e.preventDefault(),
|
|
1706
|
+
t && (e.preventDefault(), vs(t));
|
|
1703
1707
|
}
|
|
1704
1708
|
de(() => {
|
|
1705
|
-
document.addEventListener("copy",
|
|
1709
|
+
document.addEventListener("copy", _s), document.addEventListener("paste", ys);
|
|
1706
1710
|
}), ue(() => {
|
|
1707
|
-
document.removeEventListener("copy",
|
|
1711
|
+
document.removeEventListener("copy", _s), document.removeEventListener("paste", ys);
|
|
1708
1712
|
});
|
|
1709
|
-
function
|
|
1713
|
+
function bs(e) {
|
|
1710
1714
|
if (!fo.value || e.target.closest(Or)) return !1;
|
|
1711
1715
|
let t = yt(e);
|
|
1712
1716
|
return t ? (e.preventDefault(), t === "undo" ? vo() : yo(), !0) : !1;
|
|
1713
1717
|
}
|
|
1714
|
-
let
|
|
1718
|
+
let xs = k(!1), Ss = k(""), Cs = k(0), ws = h(() => !!C.find && xs.value && !!Ss.value.trim()), Ts = h(() => ws.value ? (Pc.value && !Mn.value ? K.getPrePaginatedRowModel().rows : K.getRowModel().rows).filter((e) => !e.getIsGrouped()) : []), Es = h(() => ws.value ? mt(Ts.value.map((e) => ({
|
|
1715
1719
|
id: e.id,
|
|
1716
1720
|
cells: Y.value.map((t) => ({
|
|
1717
1721
|
columnId: t.id,
|
|
1718
|
-
text:
|
|
1722
|
+
text: ms(e, t.id)
|
|
1719
1723
|
}))
|
|
1720
|
-
})),
|
|
1721
|
-
function
|
|
1722
|
-
return
|
|
1724
|
+
})), Ss.value, S.value.locale) : []), Ds = h(() => Es.value.length ? Es.value[Math.min(Cs.value, Es.value.length - 1)] : void 0), Os = h(() => new Set(Es.value.map((e) => `${e.rowId}\u0000${e.columnId}`)));
|
|
1725
|
+
function ks(e, t) {
|
|
1726
|
+
return ws.value ? Ds.value?.rowId === e && Ds.value.columnId === t ? J.value.findCurrent() : Os.value.has(`${e}\u0000${t}`) ? J.value.findMatch() : "" : "";
|
|
1723
1727
|
}
|
|
1724
|
-
async function
|
|
1728
|
+
async function As() {
|
|
1725
1729
|
await T();
|
|
1726
|
-
let e =
|
|
1730
|
+
let e = Ds.value;
|
|
1727
1731
|
if (!e) return;
|
|
1728
|
-
let t = () =>
|
|
1732
|
+
let t = () => fs(e.rowId, e.columnId)?.scrollIntoView?.({
|
|
1729
1733
|
block: "nearest",
|
|
1730
1734
|
inline: "nearest"
|
|
1731
1735
|
}), n = Z.value.findIndex((t) => t.kind === "row" && t.row.id === e.rowId);
|
|
1732
|
-
$.value && n >= 0 ? (
|
|
1736
|
+
$.value && n >= 0 ? (pc?.value.scrollToIndex(n, { align: "center" }), requestAnimationFrame(() => requestAnimationFrame(t))) : t();
|
|
1733
1737
|
}
|
|
1734
|
-
function
|
|
1735
|
-
let t =
|
|
1738
|
+
function js(e) {
|
|
1739
|
+
let t = Es.value;
|
|
1736
1740
|
if (!t.length) return;
|
|
1737
1741
|
let n = (e + t.length) % t.length;
|
|
1738
|
-
|
|
1742
|
+
Cs.value = n;
|
|
1739
1743
|
let r = t[n];
|
|
1740
|
-
if (
|
|
1741
|
-
let e =
|
|
1744
|
+
if (Pc.value && !Mn.value) {
|
|
1745
|
+
let e = Ts.value.findIndex((e) => e.id === r.rowId), t = Math.floor(e / H.value.pageSize);
|
|
1742
1746
|
e >= 0 && t !== H.value.pageIndex && K.setPageIndex(t);
|
|
1743
1747
|
}
|
|
1744
|
-
|
|
1745
|
-
}
|
|
1746
|
-
async function js() {
|
|
1747
|
-
bs.value = !bs.value, await T(), Oo.value?.querySelector(bs.value ? "[data-find-input] input, input[data-find-input]" : "[data-find-toggle]")?.focus();
|
|
1748
|
+
As();
|
|
1748
1749
|
}
|
|
1749
|
-
function Ms(
|
|
1750
|
-
|
|
1750
|
+
async function Ms() {
|
|
1751
|
+
xs.value = !xs.value, await T(), Oo.value?.querySelector(xs.value ? "[data-find-input] input, input[data-find-input]" : "[data-find-toggle]")?.focus();
|
|
1751
1752
|
}
|
|
1752
1753
|
function Ns(e) {
|
|
1753
|
-
|
|
1754
|
+
e.key === "Enter" ? (e.preventDefault(), js(Cs.value + (e.shiftKey ? -1 : 1))) : e.key === "Escape" && (e.preventDefault(), Ms());
|
|
1754
1755
|
}
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1756
|
+
function Ps(e) {
|
|
1757
|
+
Ss.value = e, Cs.value = 0, As();
|
|
1758
|
+
}
|
|
1759
|
+
let Fs = h(() => !$.value && In.value.some((e) => e.rowSpan === "auto" || e.colSpan)), Is = (e) => `${tt}-head-${e}`, Ls = h(() => {
|
|
1760
|
+
if (!Fs.value) return;
|
|
1761
|
+
let e = Z.value, t = Y.value, n = e.map((e) => e.kind === "row" ? en(t.map((t) => B.value.get(t.id)?.colSpan?.(e.row.original) ?? 1)) : t.map(() => 1)), r = e.map((t, n) => t.kind !== "row" || e[n - 1]?.kind !== "row"), i = t.map((e) => B.value.get(e.id)?.rowSpan === "auto"), a = (t, r) => e.map((e, i) => e.kind === "row" && n[i][r] === 1 ? ms(e.row, t) : null), o = Xe(t.flatMap((e, t) => i[t] ? [a(e.id, t)] : []), r), s = 0;
|
|
1758
1762
|
return {
|
|
1759
1763
|
columnSpans: n,
|
|
1760
1764
|
rowSpans: i.map((e) => e ? o[s++] : void 0)
|
|
1761
1765
|
};
|
|
1762
|
-
}),
|
|
1763
|
-
rowSpan:
|
|
1764
|
-
colSpan:
|
|
1765
|
-
}),
|
|
1766
|
-
if (!
|
|
1767
|
-
let n =
|
|
1766
|
+
}), Rs = (e, t) => ({
|
|
1767
|
+
rowSpan: Ls.value?.rowSpans[t]?.[e] ?? 1,
|
|
1768
|
+
colSpan: Ls.value?.columnSpans[e]?.[t] ?? 1
|
|
1769
|
+
}), zs = (e, t) => {
|
|
1770
|
+
if (!Fs.value) return !0;
|
|
1771
|
+
let n = Rs(e, t);
|
|
1768
1772
|
return n.rowSpan > 0 && n.colSpan > 0;
|
|
1769
1773
|
};
|
|
1770
|
-
function
|
|
1771
|
-
let i = !!C.cellSelection &&
|
|
1774
|
+
function Bs(e, t, n, r) {
|
|
1775
|
+
let i = !!C.cellSelection && ns(e.id, t), a = C.editMode === "batch" && !!Kt(uo.value, e.id, t), o = Fs.value ? Rs(n, r) : {
|
|
1772
1776
|
rowSpan: 1,
|
|
1773
1777
|
colSpan: 1
|
|
1774
1778
|
};
|
|
@@ -1776,35 +1780,35 @@ var Rn = In({
|
|
|
1776
1780
|
className: [
|
|
1777
1781
|
i ? J.value.cellSelected() : "",
|
|
1778
1782
|
a ? J.value.cellChanged() : "",
|
|
1779
|
-
|
|
1783
|
+
ks(e.id, t)
|
|
1780
1784
|
],
|
|
1781
1785
|
attributes: {
|
|
1782
1786
|
...C.cellSelection || C.find ? { "data-column-id": t } : {},
|
|
1783
1787
|
...C.cellSelection && q.value ? { "aria-selected": i } : {},
|
|
1784
1788
|
...a ? { "data-changed": "" } : {},
|
|
1785
|
-
...
|
|
1789
|
+
...Fs.value ? {
|
|
1786
1790
|
...o.rowSpan > 1 ? { rowspan: o.rowSpan } : {},
|
|
1787
1791
|
...o.colSpan > 1 ? { colspan: o.colSpan } : {},
|
|
1788
|
-
headers: Y.value.slice(r, r + o.colSpan).map((e) =>
|
|
1792
|
+
headers: Y.value.slice(r, r + o.colSpan).map((e) => Is(e.id)).join(" ")
|
|
1789
1793
|
} : {},
|
|
1790
1794
|
...C.cellSelection ? {
|
|
1791
|
-
onPointerdown: (n) =>
|
|
1792
|
-
onPointerenter: (n) =>
|
|
1793
|
-
onClickCapture:
|
|
1795
|
+
onPointerdown: (n) => ls(e.id, t, n),
|
|
1796
|
+
onPointerenter: (n) => us(e.id, t, n),
|
|
1797
|
+
onClickCapture: ds
|
|
1794
1798
|
} : {}
|
|
1795
1799
|
}
|
|
1796
1800
|
};
|
|
1797
1801
|
}
|
|
1798
|
-
let
|
|
1799
|
-
function
|
|
1802
|
+
let Vs = (e, t) => C.editMode === "batch" && !!Kt(uo.value, e.id, t);
|
|
1803
|
+
function Hs(e = {}) {
|
|
1800
1804
|
let t = K.getVisibleLeafColumns().map((e) => B.value.get(e.id)).filter((e) => e.exportable !== !1), n = (e.selectionOnly ? K.getSelectedRowModel().flatRows : K.getSortedRowModel().flatRows).filter((e) => !e.getIsGrouped()).map((e) => t.map((t) => t.exportValue ? t.exportValue(e.original) : V(t, e.getValue(t.id), e.original))), r = e.separator ?? C.csvSeparator ?? it(S.value.locale), i = cn([t.map((e) => e.exportHeader ?? e.header), ...n], r);
|
|
1801
1805
|
return e.bom === !1 ? i.slice(1) : i;
|
|
1802
1806
|
}
|
|
1803
|
-
function
|
|
1807
|
+
function Us(e = !1) {
|
|
1804
1808
|
let t = typeof e == "boolean" ? { selectionOnly: e } : e;
|
|
1805
|
-
ut(`${t.filename ?? C.exportFilename ?? "export"}.csv`,
|
|
1809
|
+
ut(`${t.filename ?? C.exportFilename ?? "export"}.csv`, Hs(t));
|
|
1806
1810
|
}
|
|
1807
|
-
function
|
|
1811
|
+
function Ws(e = !1) {
|
|
1808
1812
|
if (e) return K.getSelectedRowModel().flatRows.filter((e) => !e.getIsGrouped()).map((e) => ({
|
|
1809
1813
|
row: e,
|
|
1810
1814
|
group: !1,
|
|
@@ -1817,33 +1821,33 @@ var Rn = In({
|
|
|
1817
1821
|
}, ...e.subRows.flatMap(t)];
|
|
1818
1822
|
return K.getSortedRowModel().rows.flatMap(t);
|
|
1819
1823
|
}
|
|
1820
|
-
function
|
|
1824
|
+
function Gs(e) {
|
|
1821
1825
|
let t = B.value.get(e.groupingColumnId), n = e.getLeafRows().filter((e) => !e.getIsGrouped()).length;
|
|
1822
1826
|
return `${t?.header ?? ""}: ${V(t, e.groupingValue, e.original)} (${n})`;
|
|
1823
1827
|
}
|
|
1824
|
-
let
|
|
1825
|
-
function
|
|
1828
|
+
let Ks = (e) => e.editor === "datetime" ? "datetime" : e.filter === "date" || e.editor === "date" ? "date" : void 0;
|
|
1829
|
+
function qs(e, t, n) {
|
|
1826
1830
|
if (e == null || e === "") return null;
|
|
1827
1831
|
if (typeof e == "number") return Number.isFinite(e) ? e : null;
|
|
1828
1832
|
if (e instanceof Date) return {
|
|
1829
1833
|
date: e,
|
|
1830
|
-
time:
|
|
1834
|
+
time: Ks(t) === "datetime"
|
|
1831
1835
|
};
|
|
1832
|
-
let r =
|
|
1836
|
+
let r = Ks(t);
|
|
1833
1837
|
return r && typeof e == "string" ? {
|
|
1834
1838
|
date: e,
|
|
1835
1839
|
time: r === "datetime"
|
|
1836
1840
|
} : typeof e == "boolean" && !t.format ? e : n ? V(t, e, n) : kt(e);
|
|
1837
1841
|
}
|
|
1838
|
-
function
|
|
1839
|
-
let t = K.getVisibleLeafColumns().map((e) => B.value.get(e.id)).filter((e) => e.exportable !== !1), n =
|
|
1842
|
+
function Js(e = {}) {
|
|
1843
|
+
let t = K.getVisibleLeafColumns().map((e) => B.value.get(e.id)).filter((e) => e.exportable !== !1), n = Ws(e.selectionOnly).filter((t) => !t.group || e.groups !== !1).map(({ row: n, group: r, depth: i }) => {
|
|
1840
1844
|
if (r) {
|
|
1841
1845
|
let e = n.getLeafRows().filter((e) => !e.getIsGrouped());
|
|
1842
1846
|
return {
|
|
1843
1847
|
kind: "group",
|
|
1844
1848
|
level: i,
|
|
1845
1849
|
cells: t.map((t, r) => {
|
|
1846
|
-
if (r === 0) return
|
|
1850
|
+
if (r === 0) return Gs(n);
|
|
1847
1851
|
if (!t.aggregate) return null;
|
|
1848
1852
|
let i = Je(e.map((e) => Ar(t, e.original)), t.aggregate);
|
|
1849
1853
|
return typeof i == "number" ? i : kt(i);
|
|
@@ -1857,7 +1861,7 @@ var Rn = In({
|
|
|
1857
1861
|
let t = e.exportValue(n.original);
|
|
1858
1862
|
return typeof t == "number" || typeof t == "boolean" ? t : t instanceof Date ? { date: t } : kt(t);
|
|
1859
1863
|
}
|
|
1860
|
-
return
|
|
1864
|
+
return qs(n.getValue(e.id), e, n.original);
|
|
1861
1865
|
})
|
|
1862
1866
|
};
|
|
1863
1867
|
});
|
|
@@ -1879,26 +1883,26 @@ var Rn = In({
|
|
|
1879
1883
|
rows: n
|
|
1880
1884
|
});
|
|
1881
1885
|
}
|
|
1882
|
-
function
|
|
1883
|
-
lt(`${e.filename ?? C.exportFilename ?? "export"}.xlsx`,
|
|
1886
|
+
function Ys(e = {}) {
|
|
1887
|
+
lt(`${e.filename ?? C.exportFilename ?? "export"}.xlsx`, Js(e));
|
|
1884
1888
|
}
|
|
1885
|
-
function
|
|
1886
|
-
e === "xlsx" ?
|
|
1889
|
+
function Xs(e, t) {
|
|
1890
|
+
e === "xlsx" ? Ys({ selectionOnly: t }) : Us(t);
|
|
1887
1891
|
}
|
|
1888
|
-
function
|
|
1892
|
+
function Zs(e = {}) {
|
|
1889
1893
|
let t = Y.value.map((e) => B.value.get(e.id)), n = ki.value.map((e) => e.map((e) => ({
|
|
1890
1894
|
text: X(e.header.column),
|
|
1891
1895
|
colSpan: e.group ? e.header.colSpan : 1,
|
|
1892
1896
|
rowSpan: e.rowSpan,
|
|
1893
1897
|
align: e.group ? void 0 : B.value.get(e.header.column.id)?.align
|
|
1894
|
-
}))), r =
|
|
1898
|
+
}))), r = Ws(e.selectionOnly).map(({ row: e, group: n }) => n ? {
|
|
1895
1899
|
kind: "group",
|
|
1896
1900
|
cells: [{
|
|
1897
|
-
text:
|
|
1901
|
+
text: Gs(e),
|
|
1898
1902
|
colSpan: t.length
|
|
1899
1903
|
}]
|
|
1900
1904
|
} : { cells: t.map((t) => ({
|
|
1901
|
-
text:
|
|
1905
|
+
text: ms(e, t.id),
|
|
1902
1906
|
align: t.align
|
|
1903
1907
|
})) }), i = Pa.value ? t.map((e) => ({
|
|
1904
1908
|
text: La(e),
|
|
@@ -1914,11 +1918,11 @@ var Rn = In({
|
|
|
1914
1918
|
foot: i
|
|
1915
1919
|
}));
|
|
1916
1920
|
}
|
|
1917
|
-
async function
|
|
1921
|
+
async function Qs() {
|
|
1918
1922
|
await xn?.refresh();
|
|
1919
1923
|
}
|
|
1920
|
-
let
|
|
1921
|
-
let e = !!C.selectable &&
|
|
1924
|
+
let $s = h(() => C.exportFormats?.length ? C.exportFormats : ["csv"]), ec = h(() => {
|
|
1925
|
+
let e = !!C.selectable && cc.value > 0, t = $s.value;
|
|
1922
1926
|
return t.length === 1 && t[0] === "csv" ? e ? [{
|
|
1923
1927
|
value: "all",
|
|
1924
1928
|
label: L.exportAll
|
|
@@ -1935,51 +1939,51 @@ var Rn = In({
|
|
|
1935
1939
|
value: `${n}:all`,
|
|
1936
1940
|
label: L.exportAs(n, !1)
|
|
1937
1941
|
}] : []);
|
|
1938
|
-
}),
|
|
1939
|
-
function
|
|
1942
|
+
}), tc = h(() => $s.value.length > 1 ? L.exportMenu : $s.value[0] === "xlsx" ? L.exportXlsx : L.export);
|
|
1943
|
+
function nc(e) {
|
|
1940
1944
|
let [t, n] = e.includes(":") ? e.split(":") : ["csv", e];
|
|
1941
|
-
|
|
1945
|
+
Xs(t, n === "selection");
|
|
1942
1946
|
}
|
|
1943
|
-
let
|
|
1947
|
+
let rc = (e) => e.columns ? e.columns.flatMap(rc) : [e.id], ic = h(() => {
|
|
1944
1948
|
if (!jn.value.some((e) => e.columns)) return;
|
|
1945
1949
|
let e = K.getAllLeafColumns(), t = (t) => e.findIndex((e) => e.id === t);
|
|
1946
1950
|
return jn.value.map((n) => ({
|
|
1947
1951
|
def: n,
|
|
1948
|
-
leaves:
|
|
1952
|
+
leaves: rc(n).map((n) => e[t(n)]).filter(Boolean).sort((e, n) => t(e.id) - t(n.id))
|
|
1949
1953
|
})).sort((e, n) => t(e.leaves[0]?.id ?? "") - t(n.leaves[0]?.id ?? ""));
|
|
1950
|
-
}),
|
|
1954
|
+
}), ac = h(() => ic.value ?? [{
|
|
1951
1955
|
def: void 0,
|
|
1952
1956
|
leaves: K.getAllLeafColumns()
|
|
1953
1957
|
}]);
|
|
1954
|
-
function
|
|
1958
|
+
function oc(e, t) {
|
|
1955
1959
|
K.setColumnVisibility({
|
|
1956
1960
|
...Hr.value,
|
|
1957
1961
|
...Object.fromEntries(e.filter((e) => e.getCanHide()).map((e) => [e.id, t]))
|
|
1958
1962
|
});
|
|
1959
1963
|
}
|
|
1960
|
-
function
|
|
1964
|
+
function sc(e, t) {
|
|
1961
1965
|
let n = jn.value.map((e) => ({
|
|
1962
1966
|
id: e.id,
|
|
1963
|
-
leaves:
|
|
1967
|
+
leaves: rc(e)
|
|
1964
1968
|
})), r = It(K.getAllLeafColumns().map((e) => e.id), n, e, t);
|
|
1965
1969
|
if (!r) return;
|
|
1966
1970
|
K.setColumnOrder(r);
|
|
1967
1971
|
let i = (e) => r.indexOf(n.find((t) => t.id === e).leaves[0]), a = n.map((e) => e.id).sort((e, t) => i(e) - i(t));
|
|
1968
1972
|
Li(L.columnMoved(B.value.get(e)?.header ?? e, a.indexOf(e) + 1, a.length));
|
|
1969
1973
|
}
|
|
1970
|
-
let
|
|
1971
|
-
async function
|
|
1972
|
-
if (ci.value = !ci.value, await T(), ci.value) for (let e of document.body.children) e !== Oo.value && e instanceof HTMLElement && !e.inert && (e.inert = !0,
|
|
1973
|
-
else
|
|
1974
|
+
let cc = h(() => pa.value && Rr.value ? Math.max(0, (Nn.value ?? An.value.length) - Rr.value.except.length) : Object.values(Lr.value).filter(Boolean).length), lc = [];
|
|
1975
|
+
async function uc() {
|
|
1976
|
+
if (ci.value = !ci.value, await T(), ci.value) for (let e of document.body.children) e !== Oo.value && e instanceof HTMLElement && !e.inert && (e.inert = !0, lc.push(e));
|
|
1977
|
+
else lc.splice(0).forEach((e) => e.inert = !1);
|
|
1974
1978
|
Oo.value?.querySelector("[data-fullscreen-toggle]")?.focus();
|
|
1975
1979
|
}
|
|
1976
|
-
function
|
|
1977
|
-
ci.value && e.key === "Escape" && !e.defaultPrevented && (e.preventDefault(),
|
|
1980
|
+
function dc(e) {
|
|
1981
|
+
ci.value && e.key === "Escape" && !e.defaultPrevented && (e.preventDefault(), uc());
|
|
1978
1982
|
}
|
|
1979
|
-
ue(() =>
|
|
1980
|
-
let
|
|
1983
|
+
ue(() => lc.splice(0).forEach((e) => e.inert = !1));
|
|
1984
|
+
let fc = ye("scroll"), pc = ct.useVirtualizer?.(h(() => ({
|
|
1981
1985
|
count: C.virtual && C.scrollHeight ? Z.value.length : 0,
|
|
1982
|
-
getScrollElement: () =>
|
|
1986
|
+
getScrollElement: () => fc.value,
|
|
1983
1987
|
estimateSize: () => C.rowHeight,
|
|
1984
1988
|
overscan: 8,
|
|
1985
1989
|
getItemKey: (e) => Z.value[e]?.key ?? e,
|
|
@@ -1988,34 +1992,34 @@ var Rn = In({
|
|
|
1988
1992
|
height: Number.parseInt(C.scrollHeight ?? "", 10) || 400
|
|
1989
1993
|
}
|
|
1990
1994
|
})));
|
|
1991
|
-
C.virtual && !
|
|
1992
|
-
let $ = h(() => !!C.virtual && !!C.scrollHeight && !!
|
|
1995
|
+
C.virtual && !pc && mn("DataTable: `virtual` needs the feature virtualRows from @wirecore/wirelayer-vue/virtual (`:features=\"[virtualRows]\"`) – all rows are rendered");
|
|
1996
|
+
let $ = h(() => !!C.virtual && !!C.scrollHeight && !!pc), mc = h(() => $.value ? pc?.value.getVirtualItems() ?? [] : []), hc = h(() => $.value ? mc.value.map((e) => ({
|
|
1993
1997
|
...Z.value[e.index],
|
|
1994
1998
|
index: e.index
|
|
1995
1999
|
})) : Z.value.map((e, t) => ({
|
|
1996
2000
|
...e,
|
|
1997
2001
|
index: t
|
|
1998
|
-
}))),
|
|
1999
|
-
$.value && e instanceof Element &&
|
|
2000
|
-
},
|
|
2001
|
-
be(() => An.value.length, () =>
|
|
2002
|
-
function
|
|
2002
|
+
}))), gc = h(() => $.value ? mc.value[0]?.start ?? 0 : 0), _c = h(() => $.value ? (pc?.value.getTotalSize() ?? 0) - (mc.value.at(-1)?.end ?? 0) : 0), vc = (e) => {
|
|
2003
|
+
$.value && e instanceof Element && pc?.value.measureElement(e);
|
|
2004
|
+
}, yc = !1;
|
|
2005
|
+
be(() => An.value.length, () => yc = !1);
|
|
2006
|
+
function bc(e) {
|
|
2003
2007
|
let t = e.currentTarget;
|
|
2004
|
-
|
|
2008
|
+
yc || t.scrollTop + t.clientHeight < t.scrollHeight - 80 || (yc = !0, F("loadMore"), F("scrollEnd"));
|
|
2005
2009
|
}
|
|
2006
|
-
let
|
|
2010
|
+
let xc = k(0), Sc, Cc = ye("head");
|
|
2007
2011
|
de(() => {
|
|
2008
|
-
|
|
2009
|
-
}), ue(() =>
|
|
2010
|
-
let
|
|
2011
|
-
de(
|
|
2012
|
-
function
|
|
2012
|
+
Cc.value && typeof ResizeObserver < "u" && (Sc = new ResizeObserver(() => xc.value = Cc.value?.offsetHeight ?? 0), Sc.observe(Cc.value));
|
|
2013
|
+
}), ue(() => Sc?.disconnect());
|
|
2014
|
+
let wc = ye("tableElement"), Tc = () => q.value && wc.value && sn(wc.value);
|
|
2015
|
+
de(Tc), fe(Tc);
|
|
2016
|
+
function Ec(e) {
|
|
2013
2017
|
if (e.altKey || e.ctrlKey || e.metaKey || e.shiftKey || e.defaultPrevented) return !1;
|
|
2014
2018
|
let t = e.target, n = t.closest("td"), r = n?.parentElement?.dataset.rowId;
|
|
2015
2019
|
if (!n || !r || n.cellIndex !== gi.value.length || t.closest(Or)) return !1;
|
|
2016
2020
|
let i = K.getRow(r, !0);
|
|
2017
2021
|
if (!i) return !1;
|
|
2018
|
-
let a = getComputedStyle(
|
|
2022
|
+
let a = getComputedStyle(wc.value).direction === "rtl", o = {
|
|
2019
2023
|
expandable: i.getCanExpand(),
|
|
2020
2024
|
expanded: i.getIsExpanded(),
|
|
2021
2025
|
level: i.depth + 1
|
|
@@ -2023,25 +2027,25 @@ var Rn = In({
|
|
|
2023
2027
|
if (!s) return !1;
|
|
2024
2028
|
if (e.preventDefault(), s === "parent") {
|
|
2025
2029
|
let e = i.getParentRow();
|
|
2026
|
-
|
|
2030
|
+
wc.value?.querySelector(`tr[data-row-id="${CSS.escape(e?.id ?? "")}"] > td:nth-child(${gi.value.length + 1})`)?.focus();
|
|
2027
2031
|
} else i.toggleExpanded(s === "expand");
|
|
2028
2032
|
return !0;
|
|
2029
2033
|
}
|
|
2030
|
-
function
|
|
2031
|
-
q.value &&
|
|
2034
|
+
function Dc(e) {
|
|
2035
|
+
q.value && wc.value && (li.value && Ec(e) || _t(e, wc.value, {
|
|
2032
2036
|
itemCount: Z.value.length,
|
|
2033
|
-
scrollToItem: $.value ? (e) =>
|
|
2034
|
-
pageRows:
|
|
2037
|
+
scrollToItem: $.value ? (e) => pc?.value.scrollToIndex(e) : void 0,
|
|
2038
|
+
pageRows: fc.value && C.scrollHeight ? Math.max(1, Math.floor(fc.value.clientHeight / C.rowHeight) - 1) : 10,
|
|
2035
2039
|
onSelectRow: (e) => {
|
|
2036
2040
|
let t = K.getRow(e, !0);
|
|
2037
2041
|
t?.getCanSelect() && xa(t, !fa.value || !ma(t));
|
|
2038
2042
|
}
|
|
2039
2043
|
}));
|
|
2040
2044
|
}
|
|
2041
|
-
function
|
|
2042
|
-
q.value &&
|
|
2045
|
+
function Oc(e) {
|
|
2046
|
+
q.value && wc.value && gt(wc.value, e.target);
|
|
2043
2047
|
let t = e.target, n = t.closest("tr")?.dataset.rowId, r = t.dataset.columnId;
|
|
2044
|
-
C.cellSelection && q.value && !
|
|
2048
|
+
C.cellSelection && q.value && !as && !os && n && r && t.matches("td") && is({
|
|
2045
2049
|
anchor: {
|
|
2046
2050
|
rowId: n,
|
|
2047
2051
|
columnId: r
|
|
@@ -2052,10 +2056,10 @@ var Rn = In({
|
|
|
2052
2056
|
}
|
|
2053
2057
|
});
|
|
2054
2058
|
}
|
|
2055
|
-
function
|
|
2056
|
-
|
|
2059
|
+
function kc(e) {
|
|
2060
|
+
bs(e) || ps(e) || Dc(e);
|
|
2057
2061
|
}
|
|
2058
|
-
let
|
|
2062
|
+
let Ac = h(() => ({
|
|
2059
2063
|
sorting: Nr.value,
|
|
2060
2064
|
filters: Rt(Vr.value),
|
|
2061
2065
|
globalFilter: W.value,
|
|
@@ -2076,24 +2080,24 @@ var Rn = In({
|
|
|
2076
2080
|
t && (t.sorting && Zr(t.sorting), t.filters && K.setColumnFilters(tn(t.filters)), t.globalFilter !== void 0 && K.setGlobalFilter(t.globalFilter), t.columnSizing && (Gr.value = t.columnSizing), t.columnOrder && K.setColumnOrder(t.columnOrder), t.hiddenColumns && K.setColumnVisibility(ln(t.hiddenColumns, !1)), t.pinnedColumns && K.setColumnPinning(t.pinnedColumns), t.expanded && t.expanded.length && ai(ln(t.expanded)), t.selection && ti(hn(t.selection)), t.density && oi(t.density), t.showFilters !== void 0 && t.showFilters !== zr.value && ri(t.showFilters), (t.page || t.pageSize) && Qr({
|
|
2077
2081
|
pageIndex: (t.page ?? 1) - 1,
|
|
2078
2082
|
pageSize: t.pageSize ?? H.value.pageSize
|
|
2079
|
-
})), be(
|
|
2083
|
+
})), be(Ac, (e) => on(C.stateKey, Vt(e, C.stateExclude), C.stateStorage), { deep: !0 });
|
|
2080
2084
|
});
|
|
2081
|
-
function
|
|
2085
|
+
function jc() {
|
|
2082
2086
|
C.stateKey && Qe(C.stateKey, C.stateStorage);
|
|
2083
2087
|
}
|
|
2084
|
-
function
|
|
2088
|
+
function Mc() {
|
|
2085
2089
|
Vr.value.length && K.setColumnFilters([]), W.value && K.setGlobalFilter(""), Dn.value && On(dt("and", "root")), H.value.pageIndex && Qr({
|
|
2086
2090
|
...H.value,
|
|
2087
2091
|
pageIndex: 0
|
|
2088
2092
|
});
|
|
2089
2093
|
}
|
|
2090
|
-
function
|
|
2091
|
-
|
|
2094
|
+
function Nc() {
|
|
2095
|
+
Mc(), Zr(Lt(C.defaultSorting)), Object.keys(Lr.value).length && ti({}), Rr.value && ni(null), T(jc);
|
|
2092
2096
|
}
|
|
2093
|
-
let
|
|
2097
|
+
let Pc = h(() => !!C.pageSize), Fc = h(() => Mn.value ? Nn.value ?? An.value.length : K.getPrePaginatedRowModel().rows.length), Ic = h(() => (C.pageSizeOptions ?? []).map((e) => ({
|
|
2094
2098
|
value: String(e),
|
|
2095
2099
|
label: String(e)
|
|
2096
|
-
}))),
|
|
2100
|
+
}))), Lc = h(() => !!C.find || !!C.search || !!C.columnToggle || !!C.exportFilename || !!C.densityToggle || !!C.fullscreenToggle || !!C.filterToggle || !!C.filterReset || kn.value || !!I.toolbar || !!I.toolbarStart || !!I.toolbarEnd), Rc = h(() => C.highlightSearch ? W.value : ""), zc = h(() => ws.value ? Ss.value.trim() : Rc.value), Bc = h(() => Ii.value ? Ii.value : C.dataSource ? Pn.value ? "" : at(bn.value, l, S.value.locale) : na.value ? L.results(K.getFilteredRowModel().rows.length) : ""), Vc = h(() => Fn.value && C.loadingVariant === "skeleton"), Hc = h(() => Math.min(Z.value.length || C.pageSize || 5, 50)), Uc = h(() => na.value && (Mn.value || An.value.length > 0) && (!!I.noResults || C.noResultsText !== void 0)), Wc = h(() => {
|
|
2097
2101
|
if (!C.statusBar) return [];
|
|
2098
2102
|
let e = K.getSelectedRowModel().flatRows.filter((e) => !e.getIsGrouped());
|
|
2099
2103
|
return e.length ? Y.value.flatMap((t) => {
|
|
@@ -2105,7 +2109,7 @@ var Rn = In({
|
|
|
2105
2109
|
text: `${n.header}: ${L.aggregates.sum(Fa(n, r.sum, i))} · ${L.aggregates.avg(Fa(n, r.avg, i))}`
|
|
2106
2110
|
}];
|
|
2107
2111
|
}) : [];
|
|
2108
|
-
}),
|
|
2112
|
+
}), Gc = h(() => Mn.value ? Nn.value ?? An.value.length : K.getCoreRowModel().rows.length), Kc = h(() => ({
|
|
2109
2113
|
page: H.value.pageIndex + 1,
|
|
2110
2114
|
pageSize: C.pageSize ? H.value.pageSize : 0,
|
|
2111
2115
|
sorting: Nr.value.map((e) => ({
|
|
@@ -2116,12 +2120,12 @@ var Rn = In({
|
|
|
2116
2120
|
search: W.value,
|
|
2117
2121
|
groupBy: U.value,
|
|
2118
2122
|
...Dn.value ? { condition: wn.value } : {}
|
|
2119
|
-
})),
|
|
2120
|
-
...
|
|
2123
|
+
})), qc = h(() => Zt(Kc.value)), Jc = h(() => Zt({
|
|
2124
|
+
...Kc.value,
|
|
2121
2125
|
page: void 0,
|
|
2122
2126
|
pageSize: void 0
|
|
2123
|
-
})),
|
|
2124
|
-
function
|
|
2127
|
+
})), Yc = W.value;
|
|
2128
|
+
function Xc(e, t, n) {
|
|
2125
2129
|
let r = Sn();
|
|
2126
2130
|
if (!r) return;
|
|
2127
2131
|
if (n !== void 0 && n !== t && H.value.pageIndex !== 0) {
|
|
@@ -2131,27 +2135,27 @@ var Rn = In({
|
|
|
2131
2135
|
});
|
|
2132
2136
|
return;
|
|
2133
2137
|
}
|
|
2134
|
-
let i =
|
|
2135
|
-
|
|
2138
|
+
let i = Yc !== W.value;
|
|
2139
|
+
Yc = W.value, r.load(JSON.parse(e), { debounce: i });
|
|
2136
2140
|
}
|
|
2137
|
-
de(() =>
|
|
2138
|
-
Kc,
|
|
2141
|
+
de(() => Xc(qc.value, Jc.value, void 0)), be([
|
|
2139
2142
|
qc,
|
|
2143
|
+
Jc,
|
|
2140
2144
|
() => !!C.dataSource
|
|
2141
|
-
], ([e, t], [, n]) =>
|
|
2142
|
-
exportCsv:
|
|
2143
|
-
generateCsv:
|
|
2144
|
-
clearState:
|
|
2145
|
-
resetFilters:
|
|
2146
|
-
resetState:
|
|
2147
|
-
exportXlsx:
|
|
2148
|
-
generateXlsx:
|
|
2149
|
-
print:
|
|
2150
|
-
refresh:
|
|
2145
|
+
], ([e, t], [, n]) => Xc(e, t, n)), o({
|
|
2146
|
+
exportCsv: Us,
|
|
2147
|
+
generateCsv: Hs,
|
|
2148
|
+
clearState: jc,
|
|
2149
|
+
resetFilters: Mc,
|
|
2150
|
+
resetState: Nc,
|
|
2151
|
+
exportXlsx: Ys,
|
|
2152
|
+
generateXlsx: Js,
|
|
2153
|
+
print: Zs,
|
|
2154
|
+
refresh: Qs,
|
|
2151
2155
|
undo: vo,
|
|
2152
2156
|
redo: yo
|
|
2153
2157
|
});
|
|
2154
|
-
let
|
|
2158
|
+
let Zc = {
|
|
2155
2159
|
placement: "bottom-end",
|
|
2156
2160
|
gutter: 4
|
|
2157
2161
|
};
|
|
@@ -2168,9 +2172,9 @@ var Rn = In({
|
|
|
2168
2172
|
role: ci.value ? "dialog" : void 0,
|
|
2169
2173
|
"aria-modal": ci.value || void 0,
|
|
2170
2174
|
"aria-label": ci.value ? a.caption : void 0,
|
|
2171
|
-
onKeydown:
|
|
2175
|
+
onKeydown: dc
|
|
2172
2176
|
}), [
|
|
2173
|
-
|
|
2177
|
+
Lc.value ? (O(), v("div", {
|
|
2174
2178
|
key: 0,
|
|
2175
2179
|
class: E(J.value.toolbar())
|
|
2176
2180
|
}, [
|
|
@@ -2202,8 +2206,8 @@ var Rn = In({
|
|
|
2202
2206
|
label: N(L).find,
|
|
2203
2207
|
variant: "outline",
|
|
2204
2208
|
size: "sm",
|
|
2205
|
-
"aria-expanded":
|
|
2206
|
-
onClick:
|
|
2209
|
+
"aria-expanded": xs.value,
|
|
2210
|
+
onClick: Ms
|
|
2207
2211
|
}, null, 8, [
|
|
2208
2212
|
"icon",
|
|
2209
2213
|
"label",
|
|
@@ -2245,7 +2249,7 @@ var Rn = In({
|
|
|
2245
2249
|
variant: "outline",
|
|
2246
2250
|
size: "sm",
|
|
2247
2251
|
disabled: !na.value,
|
|
2248
|
-
onClick:
|
|
2252
|
+
onClick: Mc
|
|
2249
2253
|
}, null, 8, [
|
|
2250
2254
|
"icon",
|
|
2251
2255
|
"label",
|
|
@@ -2253,7 +2257,7 @@ var Rn = In({
|
|
|
2253
2257
|
])) : _("", !0),
|
|
2254
2258
|
a.densityToggle ? (O(), g(N(R).Root, {
|
|
2255
2259
|
key: 4,
|
|
2256
|
-
positioning:
|
|
2260
|
+
positioning: Zc,
|
|
2257
2261
|
"lazy-mount": "",
|
|
2258
2262
|
"unmount-on-exit": ""
|
|
2259
2263
|
}, {
|
|
@@ -2302,7 +2306,7 @@ var Rn = In({
|
|
|
2302
2306
|
})) : _("", !0),
|
|
2303
2307
|
a.columnToggle ? (O(), g(N(R).Root, {
|
|
2304
2308
|
key: 5,
|
|
2305
|
-
positioning:
|
|
2309
|
+
positioning: Zc,
|
|
2306
2310
|
"lazy-mount": "",
|
|
2307
2311
|
"unmount-on-exit": ""
|
|
2308
2312
|
}, {
|
|
@@ -2318,7 +2322,7 @@ var Rn = In({
|
|
|
2318
2322
|
_: 1
|
|
2319
2323
|
}), (O(), g(ae, { to: "body" }, [x(N(R).Positioner, null, {
|
|
2320
2324
|
default: P(() => [x(N(R).Content, { class: E(N(ui).content()) }, {
|
|
2321
|
-
default: P(() => [(O(!0), v(m, null, A(
|
|
2325
|
+
default: P(() => [(O(!0), v(m, null, A(ac.value, (e, t) => (O(), v(m, { key: e.def ? `group:${e.def.id}` : "columns" }, [
|
|
2322
2326
|
e.def?.columns ? (O(), g(N(R).CheckboxItem, {
|
|
2323
2327
|
key: 0,
|
|
2324
2328
|
value: `group:${e.def.id}`,
|
|
@@ -2326,7 +2330,7 @@ var Rn = In({
|
|
|
2326
2330
|
disabled: !e.leaves.some((e) => e.getCanHide()),
|
|
2327
2331
|
"close-on-select": !1,
|
|
2328
2332
|
class: E(N(ui).item()),
|
|
2329
|
-
"onUpdate:checked": (t) =>
|
|
2333
|
+
"onUpdate:checked": (t) => oc(e.leaves, t)
|
|
2330
2334
|
}, {
|
|
2331
2335
|
default: P(() => [x(N(R).ItemIndicator, null, {
|
|
2332
2336
|
default: P(() => [x(N(we), {
|
|
@@ -2374,10 +2378,10 @@ var Rn = In({
|
|
|
2374
2378
|
e.def?.columns && a.reorderableColumns ? (O(), v(m, { key: 1 }, A([-1, 1], (n) => x(N(R).Item, {
|
|
2375
2379
|
key: n,
|
|
2376
2380
|
value: `group-${n < 0 ? "earlier" : "later"}:${e.def.id}`,
|
|
2377
|
-
disabled: n < 0 ? t === 0 : t ===
|
|
2381
|
+
disabled: n < 0 ? t === 0 : t === ac.value.length - 1,
|
|
2378
2382
|
"close-on-select": !1,
|
|
2379
2383
|
class: E(N(ui).item({ class: J.value.columnGroupItem() })),
|
|
2380
|
-
onSelect: (t) =>
|
|
2384
|
+
onSelect: (t) => sc(e.def.id, n)
|
|
2381
2385
|
}, {
|
|
2382
2386
|
default: P(() => [x(N(R).ItemText, { class: E(N(ui).label()) }, {
|
|
2383
2387
|
default: P(() => [b(M(n < 0 ? N(L).columnGroupEarlier(e.def.header) : N(L).columnGroupLater(e.def.header)), 1)]),
|
|
@@ -2397,17 +2401,17 @@ var Rn = In({
|
|
|
2397
2401
|
})]))]),
|
|
2398
2402
|
_: 1
|
|
2399
2403
|
})) : _("", !0),
|
|
2400
|
-
a.exportFilename ? (O(), v(m, { key: 6 }, [
|
|
2404
|
+
a.exportFilename ? (O(), v(m, { key: 6 }, [ec.value.length > 1 ? (O(), g(u, {
|
|
2401
2405
|
key: 0,
|
|
2402
|
-
items:
|
|
2403
|
-
onSelect:
|
|
2406
|
+
items: ec.value,
|
|
2407
|
+
onSelect: nc
|
|
2404
2408
|
}, {
|
|
2405
2409
|
default: P(() => [x(d, {
|
|
2406
2410
|
variant: "outline",
|
|
2407
2411
|
size: "sm",
|
|
2408
2412
|
"leading-icon": N(je)
|
|
2409
2413
|
}, {
|
|
2410
|
-
default: P(() => [b(M(
|
|
2414
|
+
default: P(() => [b(M(tc.value), 1)]),
|
|
2411
2415
|
_: 1
|
|
2412
2416
|
}, 8, ["leading-icon"])]),
|
|
2413
2417
|
_: 1
|
|
@@ -2416,9 +2420,9 @@ var Rn = In({
|
|
|
2416
2420
|
variant: "outline",
|
|
2417
2421
|
size: "sm",
|
|
2418
2422
|
"leading-icon": N(je),
|
|
2419
|
-
onClick: t[3] ||= (e) =>
|
|
2423
|
+
onClick: t[3] ||= (e) => Xs($s.value[0], !1)
|
|
2420
2424
|
}, {
|
|
2421
|
-
default: P(() => [b(M(
|
|
2425
|
+
default: P(() => [b(M(tc.value), 1)]),
|
|
2422
2426
|
_: 1
|
|
2423
2427
|
}, 8, ["leading-icon"]))], 64)) : _("", !0),
|
|
2424
2428
|
a.fullscreenToggle ? (O(), g(f, {
|
|
@@ -2428,7 +2432,7 @@ var Rn = In({
|
|
|
2428
2432
|
label: ci.value ? N(L).exitFullscreen : N(L).fullscreen,
|
|
2429
2433
|
variant: "outline",
|
|
2430
2434
|
size: "sm",
|
|
2431
|
-
onClick:
|
|
2435
|
+
onClick: uc
|
|
2432
2436
|
}, null, 8, ["icon", "label"])) : _("", !0)
|
|
2433
2437
|
], 2)
|
|
2434
2438
|
], 2)) : _("", !0),
|
|
@@ -2442,7 +2446,7 @@ var Rn = In({
|
|
|
2442
2446
|
setValue: On,
|
|
2443
2447
|
label: N(l).conditionBuilder.advanced
|
|
2444
2448
|
})], 10, Un)) : _("", !0),
|
|
2445
|
-
a.find &&
|
|
2449
|
+
a.find && xs.value ? (O(), v("div", {
|
|
2446
2450
|
key: 2,
|
|
2447
2451
|
class: E(J.value.findBar()),
|
|
2448
2452
|
role: "search",
|
|
@@ -2456,9 +2460,9 @@ var Rn = In({
|
|
|
2456
2460
|
class: E(J.value.findInput()),
|
|
2457
2461
|
placeholder: N(L).searchPlaceholder,
|
|
2458
2462
|
"aria-label": N(L).find,
|
|
2459
|
-
"model-value":
|
|
2460
|
-
"onUpdate:modelValue": t[4] ||= (e) =>
|
|
2461
|
-
onKeydown:
|
|
2463
|
+
"model-value": Ss.value,
|
|
2464
|
+
"onUpdate:modelValue": t[4] ||= (e) => Ps(e ?? ""),
|
|
2465
|
+
onKeydown: Ns
|
|
2462
2466
|
}, null, 8, [
|
|
2463
2467
|
"leading-icon",
|
|
2464
2468
|
"class",
|
|
@@ -2469,14 +2473,14 @@ var Rn = In({
|
|
|
2469
2473
|
y("span", {
|
|
2470
2474
|
class: E(J.value.findCount()),
|
|
2471
2475
|
"aria-live": "polite"
|
|
2472
|
-
}, M(
|
|
2476
|
+
}, M(Ss.value.trim() ? N(L).findMatches(Es.value.length ? Math.min(Cs.value, Es.value.length - 1) + 1 : 0, Es.value.length) : ""), 3),
|
|
2473
2477
|
x(f, {
|
|
2474
2478
|
icon: N(De),
|
|
2475
2479
|
label: N(L).findPrevious,
|
|
2476
2480
|
variant: "text",
|
|
2477
2481
|
size: "sm",
|
|
2478
|
-
disabled: !
|
|
2479
|
-
onClick: t[5] ||= (e) =>
|
|
2482
|
+
disabled: !Es.value.length,
|
|
2483
|
+
onClick: t[5] ||= (e) => js(Cs.value - 1)
|
|
2480
2484
|
}, null, 8, [
|
|
2481
2485
|
"icon",
|
|
2482
2486
|
"label",
|
|
@@ -2487,8 +2491,8 @@ var Rn = In({
|
|
|
2487
2491
|
label: N(L).findNext,
|
|
2488
2492
|
variant: "text",
|
|
2489
2493
|
size: "sm",
|
|
2490
|
-
disabled: !
|
|
2491
|
-
onClick: t[6] ||= (e) =>
|
|
2494
|
+
disabled: !Es.value.length,
|
|
2495
|
+
onClick: t[6] ||= (e) => js(Cs.value + 1)
|
|
2492
2496
|
}, null, 8, [
|
|
2493
2497
|
"icon",
|
|
2494
2498
|
"label",
|
|
@@ -2499,7 +2503,7 @@ var Rn = In({
|
|
|
2499
2503
|
label: N(L).findClose,
|
|
2500
2504
|
variant: "text",
|
|
2501
2505
|
size: "sm",
|
|
2502
|
-
onClick:
|
|
2506
|
+
onClick: Ms
|
|
2503
2507
|
}, null, 8, ["icon", "label"])
|
|
2504
2508
|
], 10, Wn)) : _("", !0),
|
|
2505
2509
|
a.editMode === "batch" ? (O(), v("div", {
|
|
@@ -2548,17 +2552,17 @@ var Rn = In({
|
|
|
2548
2552
|
y("p", {
|
|
2549
2553
|
role: "status",
|
|
2550
2554
|
class: E(J.value.status())
|
|
2551
|
-
}, M(
|
|
2552
|
-
|
|
2555
|
+
}, M(Bc.value), 3),
|
|
2556
|
+
Pc.value && a.paginatorPosition === "top" ? (O(), v("div", {
|
|
2553
2557
|
key: 4,
|
|
2554
2558
|
class: E(J.value.footer())
|
|
2555
|
-
}, [
|
|
2559
|
+
}, [Ic.value.length ? (O(), v("div", {
|
|
2556
2560
|
key: 0,
|
|
2557
2561
|
class: E(J.value.pageSize())
|
|
2558
2562
|
}, [y("span", Gn, M(N(L).rowsPerPage), 1), x(ne, {
|
|
2559
2563
|
class: E(J.value.pageSizeSelect()),
|
|
2560
2564
|
"aria-label": N(L).rowsPerPage,
|
|
2561
|
-
items:
|
|
2565
|
+
items: Ic.value,
|
|
2562
2566
|
"model-value": String(H.value.pageSize),
|
|
2563
2567
|
"onUpdate:modelValue": t[7] ||= (e) => N(K).setPageSize(Number(e))
|
|
2564
2568
|
}, null, 8, [
|
|
@@ -2567,7 +2571,7 @@ var Rn = In({
|
|
|
2567
2571
|
"items",
|
|
2568
2572
|
"model-value"
|
|
2569
2573
|
])], 2)) : _("", !0), x(r, {
|
|
2570
|
-
count:
|
|
2574
|
+
count: Fc.value,
|
|
2571
2575
|
"page-size": H.value.pageSize,
|
|
2572
2576
|
page: H.value.pageIndex + 1,
|
|
2573
2577
|
translations: { rootLabel: `${a.caption}: ${N(l).pagination.rootLabel}` },
|
|
@@ -2584,10 +2588,10 @@ var Rn = In({
|
|
|
2584
2588
|
ref: "scroll",
|
|
2585
2589
|
class: E(J.value.scroll()),
|
|
2586
2590
|
style: D(a.scrollHeight ? { maxHeight: a.scrollHeight } : void 0),
|
|
2587
|
-
onScroll: t[17] ||= (e) => a.scrollHeight ?
|
|
2591
|
+
onScroll: t[17] ||= (e) => a.scrollHeight ? bc(e) : void 0
|
|
2588
2592
|
}, [y("table", {
|
|
2589
2593
|
ref_key: "tableElement",
|
|
2590
|
-
ref:
|
|
2594
|
+
ref: wc,
|
|
2591
2595
|
class: E(J.value.table({ class: yi.value ? J.value.fixedLayout() : void 0 })),
|
|
2592
2596
|
style: D(yi.value ? { minWidth: `${N(K).getTotalSize() + Si.value + Ci.value}px` } : void 0),
|
|
2593
2597
|
"aria-busy": Fn.value || void 0,
|
|
@@ -2595,13 +2599,13 @@ var Rn = In({
|
|
|
2595
2599
|
role: q.value ? li.value ? "treegrid" : "grid" : void 0,
|
|
2596
2600
|
"aria-multiselectable": q.value && (a.selectable && fa.value || a.cellSelection) ? "true" : void 0,
|
|
2597
2601
|
tabindex: (a.cellSelection || a.editMode === "batch") && !q.value ? -1 : void 0,
|
|
2598
|
-
onKeydown:
|
|
2599
|
-
onFocusin:
|
|
2602
|
+
onKeydown: kc,
|
|
2603
|
+
onFocusin: Oc
|
|
2600
2604
|
}, [
|
|
2601
2605
|
y("caption", { class: E(J.value.caption()) }, M(a.caption), 3),
|
|
2602
2606
|
y("thead", {
|
|
2603
2607
|
ref_key: "head",
|
|
2604
|
-
ref:
|
|
2608
|
+
ref: Cc,
|
|
2605
2609
|
class: E(J.value.head())
|
|
2606
2610
|
}, [(O(!0), v(m, null, A(ki.value, (n, r) => (O(), v("tr", {
|
|
2607
2611
|
key: r,
|
|
@@ -2647,7 +2651,7 @@ var Rn = In({
|
|
|
2647
2651
|
class: E(J.value.th({ class: J.value.groupTh() }))
|
|
2648
2652
|
}, M(X(n.header.column)), 11, Yn)) : (O(), v("th", {
|
|
2649
2653
|
key: 1,
|
|
2650
|
-
id:
|
|
2654
|
+
id: Fs.value ? Is(n.header.column.id) : void 0,
|
|
2651
2655
|
scope: "col",
|
|
2652
2656
|
rowspan: n.rowSpan > 1 ? n.rowSpan : void 0,
|
|
2653
2657
|
class: E(di(n.header.column.id).th({ class: [
|
|
@@ -2829,7 +2833,7 @@ var Rn = In({
|
|
|
2829
2833
|
Oa.value.length ? (O(), v("tbody", {
|
|
2830
2834
|
key: 0,
|
|
2831
2835
|
class: E(J.value.frozenBody()),
|
|
2832
|
-
style: D(a.scrollHeight ? { top: `${
|
|
2836
|
+
style: D(a.scrollHeight ? { top: `${xc.value}px` } : void 0)
|
|
2833
2837
|
}, [(O(!0), v(m, null, A(Oa.value, (t) => (O(), v("tr", {
|
|
2834
2838
|
key: t.id,
|
|
2835
2839
|
class: E(J.value.row({ class: a.rowClass?.(t.original) })),
|
|
@@ -2850,17 +2854,17 @@ var Rn = In({
|
|
|
2850
2854
|
key: 0,
|
|
2851
2855
|
"data-editor": "",
|
|
2852
2856
|
class: E(J.value.editor()),
|
|
2853
|
-
"aria-busy":
|
|
2854
|
-
onKeydown: (e) => mi.value ?
|
|
2855
|
-
onFocusout: (e) => mi.value ?
|
|
2856
|
-
}, [N(I)[`editor-${n.column.id}`] ? j(e.$slots, `editor-${n.column.id}`, w({ ref_for: !0 },
|
|
2857
|
+
"aria-busy": Lo.value || void 0,
|
|
2858
|
+
onKeydown: (e) => mi.value ? Ho(t, n.column.id, e) : Yo(t, e),
|
|
2859
|
+
onFocusout: (e) => mi.value ? Uo(t, n.column.id, e) : void 0
|
|
2860
|
+
}, [N(I)[`editor-${n.column.id}`] ? j(e.$slots, `editor-${n.column.id}`, w({ ref_for: !0 }, Ko(t, B.value.get(n.column.id))), void 0, void 0, 0) : (O(), g(Bn, {
|
|
2857
2861
|
key: 1,
|
|
2858
2862
|
type: ko(B.value.get(n.column.id)),
|
|
2859
2863
|
label: X(n.column),
|
|
2860
2864
|
options: B.value.get(n.column.id).editOptions,
|
|
2861
2865
|
invalid: !!Do.value[n.column.id],
|
|
2862
2866
|
"model-value": Eo.value[n.column.id],
|
|
2863
|
-
"onUpdate:modelValue": (e) =>
|
|
2867
|
+
"onUpdate:modelValue": (e) => Go(t, B.value.get(n.column.id), e)
|
|
2864
2868
|
}, oe({ _: 2 }, [N(I)[`option-${n.column.id}`] ? {
|
|
2865
2869
|
name: "option",
|
|
2866
2870
|
fn: P((t) => [j(e.$slots, `option-${n.column.id}`, w({ ref_for: !0 }, t))]),
|
|
@@ -2882,8 +2886,8 @@ var Rn = In({
|
|
|
2882
2886
|
type: "button",
|
|
2883
2887
|
class: E(di(n.column.id).editButton()),
|
|
2884
2888
|
"data-edit": Ao(t.id, n.column.id),
|
|
2885
|
-
"aria-label": `${N(L).edit(X(n.column), V(B.value.get(n.column.id), Q(t, n.column.id), t.original))}${
|
|
2886
|
-
onClick: (e) => Fo(t, n.column.id)
|
|
2889
|
+
"aria-label": `${N(L).edit(X(n.column), V(B.value.get(n.column.id), Q(t, n.column.id), t.original))}${Vs(t, n.column.id) ? `, ${N(L).changed}` : ""}`,
|
|
2890
|
+
onClick: (e) => Fo(t, n.column.id, e)
|
|
2887
2891
|
}, [j(e.$slots, `cell-${n.column.id}`, {
|
|
2888
2892
|
row: t.original,
|
|
2889
2893
|
value: Q(t, n.column.id)
|
|
@@ -2912,7 +2916,7 @@ var Rn = In({
|
|
|
2912
2916
|
label: N(L).saveRow(G(t.original, t.index)),
|
|
2913
2917
|
variant: "text",
|
|
2914
2918
|
size: "sm",
|
|
2915
|
-
onClick: (e) =>
|
|
2919
|
+
onClick: (e) => Jo(t, !0)
|
|
2916
2920
|
}, null, 8, [
|
|
2917
2921
|
"icon",
|
|
2918
2922
|
"label",
|
|
@@ -2922,7 +2926,7 @@ var Rn = In({
|
|
|
2922
2926
|
label: N(L).cancelEdit(G(t.original, t.index)),
|
|
2923
2927
|
variant: "text",
|
|
2924
2928
|
size: "sm",
|
|
2925
|
-
onClick: (e) =>
|
|
2929
|
+
onClick: (e) => Jo(t, !1)
|
|
2926
2930
|
}, null, 8, [
|
|
2927
2931
|
"icon",
|
|
2928
2932
|
"label",
|
|
@@ -2934,7 +2938,7 @@ var Rn = In({
|
|
|
2934
2938
|
label: N(L).editRow(G(t.original, t.index)),
|
|
2935
2939
|
variant: "text",
|
|
2936
2940
|
size: "sm",
|
|
2937
|
-
onClick: (e) =>
|
|
2941
|
+
onClick: (e) => qo(t)
|
|
2938
2942
|
}, null, 8, [
|
|
2939
2943
|
"data-row-edit",
|
|
2940
2944
|
"icon",
|
|
@@ -2949,7 +2953,7 @@ var Rn = In({
|
|
|
2949
2953
|
onSelect: t[16] ||= (e) => Va(za.value, e)
|
|
2950
2954
|
}, {
|
|
2951
2955
|
default: P(() => [y("tbody", { onContextmenuCapture: Ba }, [
|
|
2952
|
-
Z.value.length === 0 && !
|
|
2956
|
+
Z.value.length === 0 && !Vc.value ? (O(), v("tr", ar, [y("td", {
|
|
2953
2957
|
colspan: vi.value,
|
|
2954
2958
|
class: E(J.value.message())
|
|
2955
2959
|
}, [Pn.value ? (O(), v("span", {
|
|
@@ -2958,15 +2962,15 @@ var Rn = In({
|
|
|
2958
2962
|
}, [y("span", sr, M(N(l).dataSource.error), 1), x(d, {
|
|
2959
2963
|
variant: "outline",
|
|
2960
2964
|
size: "sm",
|
|
2961
|
-
onClick:
|
|
2965
|
+
onClick: Qs
|
|
2962
2966
|
}, {
|
|
2963
2967
|
default: P(() => [b(M(N(l).dataSource.retry), 1)]),
|
|
2964
2968
|
_: 1
|
|
2965
2969
|
})], 2)) : Fn.value ? j(e.$slots, "loadingContent", {}, () => [y("span", { class: E(J.value.messageContent()) }, [x(te, {
|
|
2966
2970
|
size: "sm",
|
|
2967
2971
|
label: a.loadingText ?? N(l).common.loading
|
|
2968
|
-
}, null, 8, ["label"]), b(M(a.loadingText ?? N(l).common.loading), 1)], 2)], void 0, 1) :
|
|
2969
|
-
|
|
2972
|
+
}, null, 8, ["label"]), b(M(a.loadingText ?? N(l).common.loading), 1)], 2)], void 0, 1) : Uc.value ? j(e.$slots, "noResults", {}, () => [b(M(a.noResultsText ?? a.emptyText ?? N(l).common.empty), 1)], void 0, 2) : j(e.$slots, "empty", {}, () => [b(M(a.emptyText ?? N(l).common.empty), 1)], void 0, 3)], 10, or)])) : _("", !0),
|
|
2973
|
+
Vc.value ? (O(!0), v(m, { key: 1 }, A(Hc.value, (e) => (O(), v("tr", {
|
|
2970
2974
|
key: `skeleton-${e}`,
|
|
2971
2975
|
class: E(J.value.row())
|
|
2972
2976
|
}, [
|
|
@@ -2986,19 +2990,19 @@ var Rn = In({
|
|
|
2986
2990
|
style: D(Oi("actions"))
|
|
2987
2991
|
}, null, 6)) : _("", !0)
|
|
2988
2992
|
], 2))), 128)) : _("", !0),
|
|
2989
|
-
|
|
2993
|
+
gc.value > 0 && !Vc.value ? (O(), v("tr", {
|
|
2990
2994
|
key: 2,
|
|
2991
2995
|
class: E(J.value.spacer()),
|
|
2992
2996
|
"aria-hidden": "true"
|
|
2993
2997
|
}, [y("td", {
|
|
2994
2998
|
colspan: vi.value,
|
|
2995
2999
|
class: E(J.value.spacerCell()),
|
|
2996
|
-
style: D({ height: `${
|
|
3000
|
+
style: D({ height: `${gc.value}px` })
|
|
2997
3001
|
}, null, 14, cr)], 2)) : _("", !0),
|
|
2998
|
-
(O(!0), v(m, null, A(
|
|
3002
|
+
(O(!0), v(m, null, A(Vc.value ? [] : hc.value, (n) => (O(), v(m, { key: n.key }, [n.kind === "group" ? (O(), v("tr", {
|
|
2999
3003
|
key: 0,
|
|
3000
3004
|
ref_for: !0,
|
|
3001
|
-
ref:
|
|
3005
|
+
ref: vc,
|
|
3002
3006
|
class: E(J.value.groupRow(Ga.value ? { class: [J.value.dropTarget(), J.value.dropInside()] } : {})),
|
|
3003
3007
|
"data-index": n.index,
|
|
3004
3008
|
"aria-rowindex": $.value ? n.index + ki.value.length + 1 : void 0,
|
|
@@ -3036,7 +3040,7 @@ var Rn = In({
|
|
|
3036
3040
|
key: 1,
|
|
3037
3041
|
id: ja(n.row),
|
|
3038
3042
|
ref_for: !0,
|
|
3039
|
-
ref:
|
|
3043
|
+
ref: vc,
|
|
3040
3044
|
class: E(J.value.expansionRow()),
|
|
3041
3045
|
"data-index": n.index,
|
|
3042
3046
|
"aria-rowindex": $.value ? n.index + ki.value.length + 1 : void 0
|
|
@@ -3049,7 +3053,7 @@ var Rn = In({
|
|
|
3049
3053
|
})], 10, pr)], 10, fr)) : (O(), v("tr", {
|
|
3050
3054
|
key: 2,
|
|
3051
3055
|
ref_for: !0,
|
|
3052
|
-
ref:
|
|
3056
|
+
ref: vc,
|
|
3053
3057
|
class: E(J.value.row({ class: [
|
|
3054
3058
|
a.reorderableRows ? J.value.dropTarget() : "",
|
|
3055
3059
|
a.reorderableRows && Ya.value && Ga.value ? J.value.dropInside() : "",
|
|
@@ -3133,15 +3137,15 @@ var Rn = In({
|
|
|
3133
3137
|
key: 5,
|
|
3134
3138
|
class: E(J.value.rowNumber())
|
|
3135
3139
|
}, M(Aa.value.get(n.row.id)), 3))], 6))), 128)),
|
|
3136
|
-
(O(!0), v(m, null, A(n.row.getVisibleCells(), (t, r) => (O(), v(m, { key: t.id }, [
|
|
3140
|
+
(O(!0), v(m, null, A(n.row.getVisibleCells(), (t, r) => (O(), v(m, { key: t.id }, [zs(n.index, r) ? (O(), v("td", w({
|
|
3137
3141
|
key: 0,
|
|
3138
3142
|
class: di(t.column.id).td({ class: [
|
|
3139
3143
|
wi(t.column.id, !1),
|
|
3140
3144
|
fi(t.column.id, n.row),
|
|
3141
|
-
...
|
|
3145
|
+
...Bs(n.row, t.column.id, n.index, r).className
|
|
3142
3146
|
] }),
|
|
3143
3147
|
style: Ti(t.column.id, !1)
|
|
3144
|
-
}, { ref_for: !0 },
|
|
3148
|
+
}, { ref_for: !0 }, Bs(n.row, t.column.id, n.index, r).attributes), [(O(), g(me((a.getSubRows || U.value.length) && r === 0 ? "div" : Ua), w({ ref_for: !0 }, (a.getSubRows || U.value.length) && r === 0 ? {
|
|
3145
3149
|
class: J.value.treeCell(),
|
|
3146
3150
|
style: { paddingInlineStart: `${n.row.depth * 20}px` }
|
|
3147
3151
|
} : {}), {
|
|
@@ -3163,17 +3167,17 @@ var Rn = In({
|
|
|
3163
3167
|
key: 1,
|
|
3164
3168
|
"data-editor": "",
|
|
3165
3169
|
class: E(J.value.editor()),
|
|
3166
|
-
"aria-busy":
|
|
3167
|
-
onKeydown: (e) => mi.value ?
|
|
3168
|
-
onFocusout: (e) => mi.value ?
|
|
3169
|
-
}, [N(I)[`editor-${t.column.id}`] ? j(e.$slots, `editor-${t.column.id}`, w({ ref_for: !0 },
|
|
3170
|
+
"aria-busy": Lo.value || void 0,
|
|
3171
|
+
onKeydown: (e) => mi.value ? Ho(n.row, t.column.id, e) : Yo(n.row, e),
|
|
3172
|
+
onFocusout: (e) => mi.value ? Uo(n.row, t.column.id, e) : void 0
|
|
3173
|
+
}, [N(I)[`editor-${t.column.id}`] ? j(e.$slots, `editor-${t.column.id}`, w({ ref_for: !0 }, Ko(n.row, B.value.get(t.column.id))), void 0, void 0, 0) : (O(), g(Bn, {
|
|
3170
3174
|
key: 1,
|
|
3171
3175
|
type: ko(B.value.get(t.column.id)),
|
|
3172
3176
|
label: X(t.column),
|
|
3173
3177
|
options: B.value.get(t.column.id).editOptions,
|
|
3174
3178
|
invalid: !!Do.value[t.column.id],
|
|
3175
3179
|
"model-value": Eo.value[t.column.id],
|
|
3176
|
-
"onUpdate:modelValue": (e) =>
|
|
3180
|
+
"onUpdate:modelValue": (e) => Go(n.row, B.value.get(t.column.id), e)
|
|
3177
3181
|
}, oe({ _: 2 }, [N(I)[`option-${t.column.id}`] ? {
|
|
3178
3182
|
name: "option",
|
|
3179
3183
|
fn: P((n) => [j(e.$slots, `option-${t.column.id}`, w({ ref_for: !0 }, n))]),
|
|
@@ -3195,8 +3199,8 @@ var Rn = In({
|
|
|
3195
3199
|
type: "button",
|
|
3196
3200
|
class: E(di(t.column.id).editButton()),
|
|
3197
3201
|
"data-edit": Ao(n.row.id, t.column.id),
|
|
3198
|
-
"aria-label": `${N(L).edit(X(t.column), V(B.value.get(t.column.id), Q(n.row, t.column.id), n.row.original))}${
|
|
3199
|
-
onClick: (e) => Fo(n.row, t.column.id)
|
|
3202
|
+
"aria-label": `${N(L).edit(X(t.column), V(B.value.get(t.column.id), Q(n.row, t.column.id), n.row.original))}${Vs(n.row, t.column.id) ? `, ${N(L).changed}` : ""}`,
|
|
3203
|
+
onClick: (e) => Fo(n.row, t.column.id, e)
|
|
3200
3204
|
}, [j(e.$slots, `cell-${t.column.id}`, {
|
|
3201
3205
|
row: n.row.original,
|
|
3202
3206
|
value: Q(n.row, t.column.id)
|
|
@@ -3220,10 +3224,10 @@ var Rn = In({
|
|
|
3220
3224
|
default: P(() => [j(e.$slots, `cell-${t.column.id}`, {
|
|
3221
3225
|
row: n.row.original,
|
|
3222
3226
|
value: Q(n.row, t.column.id)
|
|
3223
|
-
}, () => [
|
|
3227
|
+
}, () => [zc.value ? (O(), g(re, {
|
|
3224
3228
|
key: 0,
|
|
3225
3229
|
text: V(B.value.get(t.column.id), Q(n.row, t.column.id), n.row.original),
|
|
3226
|
-
query:
|
|
3230
|
+
query: zc.value
|
|
3227
3231
|
}, null, 8, ["text", "query"])) : (O(), v(m, { key: 1 }, [b(M(V(B.value.get(t.column.id), Q(n.row, t.column.id), n.row.original)), 1)], 64))])]),
|
|
3228
3232
|
_: 2
|
|
3229
3233
|
}, 1040))]),
|
|
@@ -3238,7 +3242,7 @@ var Rn = In({
|
|
|
3238
3242
|
label: N(L).saveRow(G(n.row.original, n.row.index)),
|
|
3239
3243
|
variant: "text",
|
|
3240
3244
|
size: "sm",
|
|
3241
|
-
onClick: (e) =>
|
|
3245
|
+
onClick: (e) => Jo(n.row, !0)
|
|
3242
3246
|
}, null, 8, [
|
|
3243
3247
|
"icon",
|
|
3244
3248
|
"label",
|
|
@@ -3248,7 +3252,7 @@ var Rn = In({
|
|
|
3248
3252
|
label: N(L).cancelEdit(G(n.row.original, n.row.index)),
|
|
3249
3253
|
variant: "text",
|
|
3250
3254
|
size: "sm",
|
|
3251
|
-
onClick: (e) =>
|
|
3255
|
+
onClick: (e) => Jo(n.row, !1)
|
|
3252
3256
|
}, null, 8, [
|
|
3253
3257
|
"icon",
|
|
3254
3258
|
"label",
|
|
@@ -3260,7 +3264,7 @@ var Rn = In({
|
|
|
3260
3264
|
label: N(L).editRow(G(n.row.original, n.row.index)),
|
|
3261
3265
|
variant: "text",
|
|
3262
3266
|
size: "sm",
|
|
3263
|
-
onClick: (e) =>
|
|
3267
|
+
onClick: (e) => qo(n.row)
|
|
3264
3268
|
}, null, 8, [
|
|
3265
3269
|
"data-row-edit",
|
|
3266
3270
|
"icon",
|
|
@@ -3280,14 +3284,14 @@ var Rn = In({
|
|
|
3280
3284
|
_: 2
|
|
3281
3285
|
}, 1032, ["items", "onSelect"])) : _("", !0)], 2)], 6)) : _("", !0)
|
|
3282
3286
|
], 42, mr))], 64))), 128)),
|
|
3283
|
-
|
|
3287
|
+
_c.value > 0 ? (O(), v("tr", {
|
|
3284
3288
|
key: 3,
|
|
3285
3289
|
class: E(J.value.spacer()),
|
|
3286
3290
|
"aria-hidden": "true"
|
|
3287
3291
|
}, [y("td", {
|
|
3288
3292
|
colspan: vi.value,
|
|
3289
3293
|
class: E(J.value.spacerCell()),
|
|
3290
|
-
style: D({ height: `${
|
|
3294
|
+
style: D({ height: `${_c.value}px` })
|
|
3291
3295
|
}, null, 14, Sr)], 2)) : _("", !0)
|
|
3292
3296
|
], 32)]),
|
|
3293
3297
|
_: 3
|
|
@@ -3321,21 +3325,21 @@ var Rn = In({
|
|
|
3321
3325
|
key: 5,
|
|
3322
3326
|
class: E(J.value.statusBar())
|
|
3323
3327
|
}, [
|
|
3324
|
-
y("span", null, M(N(L).rowCount(
|
|
3328
|
+
y("span", null, M(N(L).rowCount(Gc.value)), 1),
|
|
3325
3329
|
na.value ? (O(), v("span", Cr, M(N(L).filteredCount(N(K).getFilteredRowModel().rows.length)), 1)) : _("", !0),
|
|
3326
|
-
a.selectable ? (O(), v("span", wr, M(N(l).common.selectedCount(
|
|
3327
|
-
(O(!0), v(m, null, A(
|
|
3330
|
+
a.selectable ? (O(), v("span", wr, M(N(l).common.selectedCount(cc.value)), 1)) : _("", !0),
|
|
3331
|
+
(O(!0), v(m, null, A(Wc.value, (e) => (O(), v("span", { key: e.id }, M(e.text), 1))), 128))
|
|
3328
3332
|
], 2)) : _("", !0),
|
|
3329
|
-
|
|
3333
|
+
Pc.value && a.paginatorPosition === "bottom" ? (O(), v("div", {
|
|
3330
3334
|
key: 6,
|
|
3331
3335
|
class: E(J.value.footer())
|
|
3332
|
-
}, [
|
|
3336
|
+
}, [Ic.value.length ? (O(), v("div", {
|
|
3333
3337
|
key: 0,
|
|
3334
3338
|
class: E(J.value.pageSize())
|
|
3335
3339
|
}, [y("span", Tr, M(N(L).rowsPerPage), 1), x(ne, {
|
|
3336
3340
|
class: E(J.value.pageSizeSelect()),
|
|
3337
3341
|
"aria-label": N(L).rowsPerPage,
|
|
3338
|
-
items:
|
|
3342
|
+
items: Ic.value,
|
|
3339
3343
|
"model-value": String(H.value.pageSize),
|
|
3340
3344
|
"onUpdate:modelValue": t[18] ||= (e) => N(K).setPageSize(Number(e))
|
|
3341
3345
|
}, null, 8, [
|
|
@@ -3344,7 +3348,7 @@ var Rn = In({
|
|
|
3344
3348
|
"items",
|
|
3345
3349
|
"model-value"
|
|
3346
3350
|
])], 2)) : _("", !0), x(r, {
|
|
3347
|
-
count:
|
|
3351
|
+
count: Fc.value,
|
|
3348
3352
|
"page-size": H.value.pageSize,
|
|
3349
3353
|
page: H.value.pageIndex + 1,
|
|
3350
3354
|
translations: { rootLabel: `${a.caption}: ${N(l).pagination.rootLabel}` },
|