@jielga/tmdatagrid 2.1.1 → 2.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +743 -711
- package/dist/index.js.map +1 -1
- package/docs/column-menu.md +1 -1
- package/docs/localization.md +1 -1
- package/docs/row-details.md +15 -0
- package/docs/row-selection.md +5 -0
- package/docs/testing.md +5 -1
- package/docs/use-tm-data-grid.md +1 -1
- package/package.json +1 -1
- package/skills/appearance/SKILL.md +2 -2
- package/skills/cell-selection/SKILL.md +1 -1
- package/skills/columns/SKILL.md +1 -1
- package/skills/data/SKILL.md +1 -1
- package/skills/editing/SKILL.md +1 -1
- package/skills/filtering/SKILL.md +1 -1
- package/skills/getting-started/SKILL.md +1 -1
- package/skills/grouping/SKILL.md +1 -1
- package/skills/migrating-to-2/SKILL.md +1 -1
- package/skills/options/SKILL.md +1 -1
- package/skills/rows/SKILL.md +1 -1
- package/skills/server-side/SKILL.md +1 -1
- package/skills/testing/SKILL.md +1 -1
- package/skills/testing-components/SKILL.md +1 -1
- package/skills/testing-editing/SKILL.md +1 -1
- package/src/components/TMDataGridDetailsColumn.tsx +3 -0
- package/src/components/TMDataGridSelectColumn.tsx +15 -1
- package/src/components/TMDataGridTable.tsx +20 -1
- package/src/core/expanding.ts +4 -1
- package/src/core/labels.ts +3 -3
- package/src/core/labelsSv.ts +22 -22
- package/src/core/quickSearch.ts +52 -0
- package/src/useTMDataGrid.tsx +33 -18
package/dist/index.js
CHANGED
|
@@ -209,7 +209,7 @@ var At = {
|
|
|
209
209
|
//#endregion
|
|
210
210
|
//#region src/core/expanding.ts
|
|
211
211
|
function jt(e, t) {
|
|
212
|
-
return t === "groups" ? e.getIsGrouped() : !e.getIsGrouped();
|
|
212
|
+
return t === "groups" ? e.getIsGrouped() : !e.getIsGrouped() && e.getCanExpand();
|
|
213
213
|
}
|
|
214
214
|
function Mt(e, t) {
|
|
215
215
|
if (t !== !0) return { ...t };
|
|
@@ -234,7 +234,7 @@ function It(t) {
|
|
|
234
234
|
let n = e(14), { row: r } = t, { labels: i } = $(), a = nt(), o;
|
|
235
235
|
n[0] === r ? o = n[1] : (o = () => r.getIsExpanded(), n[0] = r, n[1] = o);
|
|
236
236
|
let s = M(r.table.store, o);
|
|
237
|
-
if (r.getIsGrouped()) return null;
|
|
237
|
+
if (r.getIsGrouped() || !r.getCanExpand()) return null;
|
|
238
238
|
let c = s ? i.hideDetails : i.showDetails, l;
|
|
239
239
|
n[2] === r ? l = n[3] : (l = (e) => {
|
|
240
240
|
e.stopPropagation(), r.toggleExpanded();
|
|
@@ -1663,17 +1663,25 @@ function On(t) {
|
|
|
1663
1663
|
n[0] === r ? a = n[1] : (a = () => r.getIsAllRowsSelected(), n[0] = r, n[1] = a);
|
|
1664
1664
|
let o = M(r.store, a), s;
|
|
1665
1665
|
n[2] === r ? s = n[3] : (s = () => r.getIsSomeRowsSelected(), n[2] = r, n[3] = s);
|
|
1666
|
-
let c = M(r.store, s)
|
|
1667
|
-
n[4] === r ?
|
|
1668
|
-
|
|
1669
|
-
|
|
1666
|
+
let c = M(r.store, s) && !o, l;
|
|
1667
|
+
n[4] === r ? l = n[5] : (l = (e) => {
|
|
1668
|
+
if (e.currentTarget.checked) {
|
|
1669
|
+
r.toggleAllRowsSelected(!0);
|
|
1670
|
+
return;
|
|
1671
|
+
}
|
|
1672
|
+
let t = { ...r.store.state.rowSelection };
|
|
1673
|
+
for (let e of r.getPreGroupedRowModel().flatRows) delete t[e.id];
|
|
1674
|
+
r.setRowSelection(t);
|
|
1675
|
+
}, n[4] = r, n[5] = l);
|
|
1676
|
+
let u;
|
|
1677
|
+
return n[6] !== o || n[7] !== i.selectAllRows || n[8] !== c || n[9] !== l ? (u = /* @__PURE__ */ J(p, {
|
|
1670
1678
|
size: "xs",
|
|
1671
|
-
"aria-label":
|
|
1679
|
+
"aria-label": i.selectAllRows,
|
|
1672
1680
|
"data-dg-part": "select-all",
|
|
1673
1681
|
checked: o,
|
|
1674
|
-
indeterminate:
|
|
1675
|
-
onChange:
|
|
1676
|
-
}), n[6] = o, n[7] = i.selectAllRows, n[8] =
|
|
1682
|
+
indeterminate: c,
|
|
1683
|
+
onChange: l
|
|
1684
|
+
}), n[6] = o, n[7] = i.selectAllRows, n[8] = c, n[9] = l, n[10] = u) : u = n[10], u;
|
|
1677
1685
|
}
|
|
1678
1686
|
function kn(t) {
|
|
1679
1687
|
let n = e(2), { table: r } = t, { features: i } = $();
|
|
@@ -2483,35 +2491,54 @@ function Or(e = {}) {
|
|
|
2483
2491
|
inHeader: e.inHeader ?? !1
|
|
2484
2492
|
};
|
|
2485
2493
|
}
|
|
2486
|
-
|
|
2494
|
+
var kr = /* @__PURE__ */ new WeakMap();
|
|
2495
|
+
function Ar(e) {
|
|
2496
|
+
let { enableGlobalFilter: t } = e.columnDef;
|
|
2497
|
+
if (t === !0) return !0;
|
|
2498
|
+
if (!e.accessorFn) return !1;
|
|
2499
|
+
let n = e.table.getCoreRowModel(), r = kr.get(n);
|
|
2500
|
+
r === void 0 && (r = /* @__PURE__ */ new Map(), kr.set(n, r));
|
|
2501
|
+
let i = r.get(e.id);
|
|
2502
|
+
if (i !== void 0) return i;
|
|
2503
|
+
let a = !1;
|
|
2504
|
+
for (let t of n.flatRows) {
|
|
2505
|
+
let n = t.getValue(e.id);
|
|
2506
|
+
if (n != null) {
|
|
2507
|
+
a = typeof n == "string" || typeof n == "number";
|
|
2508
|
+
break;
|
|
2509
|
+
}
|
|
2510
|
+
}
|
|
2511
|
+
return r.set(e.id, a), a;
|
|
2512
|
+
}
|
|
2513
|
+
function jr(e) {
|
|
2487
2514
|
if (typeof e != "object" || !e) return !1;
|
|
2488
2515
|
let t = e.fuzzyRank;
|
|
2489
2516
|
return typeof t == "object" && !!t && typeof t.rank == "number";
|
|
2490
2517
|
}
|
|
2491
|
-
function
|
|
2518
|
+
function Mr(e, t, n, r) {
|
|
2492
2519
|
let i = Xe(String(e.getValue(t) ?? ""), String(n));
|
|
2493
2520
|
return r?.({ fuzzyRank: i }), i.passed;
|
|
2494
2521
|
}
|
|
2495
|
-
function
|
|
2522
|
+
function Nr(e) {
|
|
2496
2523
|
let t = null, { columnFiltersMeta: n } = e;
|
|
2497
|
-
for (let e of Object.values(n ?? {}))
|
|
2524
|
+
for (let e of Object.values(n ?? {})) jr(e) && (t === null || e.fuzzyRank.rank > t.rank) && (t = e.fuzzyRank);
|
|
2498
2525
|
return t;
|
|
2499
2526
|
}
|
|
2500
|
-
function
|
|
2527
|
+
function Pr(e) {
|
|
2501
2528
|
let { globalFilterFn: t } = e.options;
|
|
2502
2529
|
if (t !== "tmDataGridFuzzy") return !1;
|
|
2503
2530
|
let n = e.store.state;
|
|
2504
2531
|
return (n.sorting?.length ?? 0) === 0 && (n.grouping?.length ?? 0) === 0 && typeof n.globalFilter == "string" && n.globalFilter.trim() !== "";
|
|
2505
2532
|
}
|
|
2506
|
-
function
|
|
2533
|
+
function Fr() {
|
|
2507
2534
|
let e = Ne();
|
|
2508
2535
|
return (t) => {
|
|
2509
2536
|
let n = e(t), r = null, i = null;
|
|
2510
2537
|
return () => {
|
|
2511
2538
|
let e = n();
|
|
2512
|
-
return
|
|
2539
|
+
return Pr(t) ? e === r && i !== null ? i : (i = {
|
|
2513
2540
|
rows: [...e.rows].sort((e, t) => {
|
|
2514
|
-
let n =
|
|
2541
|
+
let n = Nr(e), r = Nr(t);
|
|
2515
2542
|
return n !== null && r !== null ? Ye(n, r) : n === null ? r === null ? 0 : 1 : -1;
|
|
2516
2543
|
}),
|
|
2517
2544
|
flatRows: e.flatRows,
|
|
@@ -2522,7 +2549,7 @@ function Nr() {
|
|
|
2522
2549
|
}
|
|
2523
2550
|
//#endregion
|
|
2524
2551
|
//#region src/core/labels.ts
|
|
2525
|
-
var
|
|
2552
|
+
var Ir = {
|
|
2526
2553
|
operators: rt,
|
|
2527
2554
|
filters: "Filters",
|
|
2528
2555
|
searchPlaceholder: "Search",
|
|
@@ -2553,8 +2580,8 @@ var Pr = {
|
|
|
2553
2580
|
filterOperatorFor: (e) => `${e} filter operator`,
|
|
2554
2581
|
activeFilters: "Active filters",
|
|
2555
2582
|
clearFilter: (e) => `Clear ${e} filter`,
|
|
2556
|
-
sortAsc: "Sort
|
|
2557
|
-
sortDesc: "Sort
|
|
2583
|
+
sortAsc: "Sort ascending",
|
|
2584
|
+
sortDesc: "Sort descending",
|
|
2558
2585
|
filterMenuItem: "Filter",
|
|
2559
2586
|
groupBy: (e) => `Group by ${e}`,
|
|
2560
2587
|
ungroup: (e) => `Ungroup ${e}`,
|
|
@@ -2574,7 +2601,7 @@ var Pr = {
|
|
|
2574
2601
|
pageRange: ({ from: e, to: t, total: n }) => `${e}–${t} of ${n}`,
|
|
2575
2602
|
pageNumber: ({ page: e, pageCount: t }) => t < 0 ? `Page ${e}` : `Page ${e} of ${t}`,
|
|
2576
2603
|
groupedAllRows: (e) => `Grouped · all ${e} rows`,
|
|
2577
|
-
pagingSuspendedHint: "Paging is off while the rows are grouped
|
|
2604
|
+
pagingSuspendedHint: "Paging is off while the rows are grouped, and every row is shown. Ungroup to page again.",
|
|
2578
2605
|
previousPage: "Previous page",
|
|
2579
2606
|
nextPage: "Next page",
|
|
2580
2607
|
noResults: "No rows match your filters",
|
|
@@ -2625,32 +2652,32 @@ var Pr = {
|
|
|
2625
2652
|
expandGroup: (e) => `Expand ${e}`,
|
|
2626
2653
|
collapseGroup: (e) => `Collapse ${e}`
|
|
2627
2654
|
};
|
|
2628
|
-
function
|
|
2655
|
+
function Lr(e) {
|
|
2629
2656
|
return e ? {
|
|
2630
|
-
...
|
|
2657
|
+
...Ir,
|
|
2631
2658
|
...e,
|
|
2632
2659
|
operators: {
|
|
2633
|
-
...
|
|
2660
|
+
...Ir.operators,
|
|
2634
2661
|
...e.operators
|
|
2635
2662
|
}
|
|
2636
|
-
} :
|
|
2663
|
+
} : Ir;
|
|
2637
2664
|
}
|
|
2638
2665
|
//#endregion
|
|
2639
2666
|
//#region src/core/persistence.ts
|
|
2640
|
-
var
|
|
2667
|
+
var Rr = [
|
|
2641
2668
|
"columnFilters",
|
|
2642
2669
|
"globalFilter",
|
|
2643
2670
|
"sorting",
|
|
2644
2671
|
"pagination",
|
|
2645
2672
|
"expanded"
|
|
2646
|
-
],
|
|
2673
|
+
], zr = [
|
|
2647
2674
|
"columnVisibility",
|
|
2648
2675
|
"columnSizing",
|
|
2649
2676
|
"columnOrder",
|
|
2650
2677
|
"columnPinning",
|
|
2651
2678
|
"grouping"
|
|
2652
|
-
],
|
|
2653
|
-
function
|
|
2679
|
+
], Br = 1, Vr = "__v";
|
|
2680
|
+
function Hr(e, t) {
|
|
2654
2681
|
if (!e) return null;
|
|
2655
2682
|
if (typeof e == "string") return {
|
|
2656
2683
|
key: e,
|
|
@@ -2662,7 +2689,7 @@ function Br(e, t) {
|
|
|
2662
2689
|
slices: r
|
|
2663
2690
|
} : null;
|
|
2664
2691
|
}
|
|
2665
|
-
function
|
|
2692
|
+
function Ur(e) {
|
|
2666
2693
|
if (!e) return null;
|
|
2667
2694
|
try {
|
|
2668
2695
|
return typeof window > "u" ? null : e.storageMode === "sessionStorage" ? window.sessionStorage : window.localStorage;
|
|
@@ -2670,43 +2697,43 @@ function Vr(e) {
|
|
|
2670
2697
|
return null;
|
|
2671
2698
|
}
|
|
2672
2699
|
}
|
|
2673
|
-
function
|
|
2700
|
+
function Wr(e, t) {
|
|
2674
2701
|
return typeof e == "object" && e ? e[t] : void 0;
|
|
2675
2702
|
}
|
|
2676
|
-
var
|
|
2677
|
-
function
|
|
2703
|
+
var Gr = (e) => typeof e == "string", Kr = (e) => typeof e == "number" && Number.isFinite(e);
|
|
2704
|
+
function qr(e, t) {
|
|
2678
2705
|
return Array.isArray(e) && e.every(t);
|
|
2679
2706
|
}
|
|
2680
|
-
function
|
|
2707
|
+
function Jr(e, t) {
|
|
2681
2708
|
return typeof e != "object" || !e || Array.isArray(e) ? !1 : Object.values(e).every(t);
|
|
2682
2709
|
}
|
|
2683
|
-
var
|
|
2684
|
-
columnFilters: (e) =>
|
|
2710
|
+
var Yr = (e) => Gr(Wr(e, "id")), Xr = {
|
|
2711
|
+
columnFilters: (e) => qr(e, Yr),
|
|
2685
2712
|
globalFilter: () => !0,
|
|
2686
|
-
sorting: (e) =>
|
|
2713
|
+
sorting: (e) => qr(e, (e) => Yr(e) && typeof Wr(e, "desc") == "boolean"),
|
|
2687
2714
|
pagination: (e) => {
|
|
2688
|
-
let t =
|
|
2689
|
-
return
|
|
2715
|
+
let t = Wr(e, "pageIndex"), n = Wr(e, "pageSize");
|
|
2716
|
+
return Kr(t) && t >= 0 && Kr(n) && n > 0;
|
|
2690
2717
|
},
|
|
2691
|
-
expanded: (e) => e === !0 ||
|
|
2692
|
-
columnVisibility: (e) =>
|
|
2693
|
-
columnSizing: (e) =>
|
|
2694
|
-
columnOrder: (e) =>
|
|
2695
|
-
columnPinning: (e) =>
|
|
2696
|
-
grouping: (e) =>
|
|
2718
|
+
expanded: (e) => e === !0 || Jr(e, (e) => typeof e == "boolean"),
|
|
2719
|
+
columnVisibility: (e) => Jr(e, (e) => typeof e == "boolean"),
|
|
2720
|
+
columnSizing: (e) => Jr(e, Kr),
|
|
2721
|
+
columnOrder: (e) => qr(e, Gr),
|
|
2722
|
+
columnPinning: (e) => qr(Wr(e, "start"), Gr) && qr(Wr(e, "end"), Gr) || qr(Wr(e, "left"), Gr) && qr(Wr(e, "right"), Gr),
|
|
2723
|
+
grouping: (e) => qr(e, Gr)
|
|
2697
2724
|
};
|
|
2698
|
-
function
|
|
2699
|
-
let t =
|
|
2725
|
+
function Zr(e) {
|
|
2726
|
+
let t = Wr(e, "left"), n = Wr(e, "right");
|
|
2700
2727
|
return t === void 0 || n === void 0 ? e : {
|
|
2701
2728
|
start: t,
|
|
2702
2729
|
end: n
|
|
2703
2730
|
};
|
|
2704
2731
|
}
|
|
2705
|
-
function
|
|
2706
|
-
let n =
|
|
2732
|
+
function Qr(e, t) {
|
|
2733
|
+
let n = Xr[e];
|
|
2707
2734
|
return n === void 0 || n(t);
|
|
2708
2735
|
}
|
|
2709
|
-
function
|
|
2736
|
+
function $r(e, t, n) {
|
|
2710
2737
|
if (!e || !t) return {};
|
|
2711
2738
|
try {
|
|
2712
2739
|
let r = e.getItem(t.key);
|
|
@@ -2714,39 +2741,39 @@ function Zr(e, t, n) {
|
|
|
2714
2741
|
let i = n(r);
|
|
2715
2742
|
if (typeof i != "object" || !i) return {};
|
|
2716
2743
|
let a = i;
|
|
2717
|
-
if (a[
|
|
2744
|
+
if (a[Vr] !== 1) return {};
|
|
2718
2745
|
let o = {};
|
|
2719
|
-
for (let e of t.slices) e in a &&
|
|
2746
|
+
for (let e of t.slices) e in a && Qr(e, a[e]) && (o[e] = e === "columnPinning" ? Zr(a[e]) : a[e]);
|
|
2720
2747
|
return o;
|
|
2721
2748
|
} catch {
|
|
2722
2749
|
return {};
|
|
2723
2750
|
}
|
|
2724
2751
|
}
|
|
2725
|
-
function
|
|
2752
|
+
function ei(e, t, n, r) {
|
|
2726
2753
|
if (!e || !t) return;
|
|
2727
|
-
let i = { [
|
|
2754
|
+
let i = { [Vr]: 1 };
|
|
2728
2755
|
for (let e of t.slices) i[e] = n[e];
|
|
2729
2756
|
try {
|
|
2730
2757
|
e.setItem(t.key, r(i));
|
|
2731
2758
|
} catch {}
|
|
2732
2759
|
}
|
|
2733
|
-
function
|
|
2760
|
+
function ti(e) {
|
|
2734
2761
|
return {
|
|
2735
|
-
data:
|
|
2736
|
-
settings:
|
|
2762
|
+
data: Hr(e?.dataKey, Rr),
|
|
2763
|
+
settings: Hr(e?.settingsKey, zr)
|
|
2737
2764
|
};
|
|
2738
2765
|
}
|
|
2739
|
-
function
|
|
2740
|
-
let { data: t, settings: n } =
|
|
2766
|
+
function ni(e) {
|
|
2767
|
+
let { data: t, settings: n } = ti(e);
|
|
2741
2768
|
return t !== null || n !== null;
|
|
2742
2769
|
}
|
|
2743
|
-
var
|
|
2744
|
-
function
|
|
2770
|
+
var ri = (e) => JSON.parse(e), ii = (e) => JSON.stringify(e);
|
|
2771
|
+
function ai(e, t = []) {
|
|
2745
2772
|
for (let n of e) {
|
|
2746
2773
|
if (typeof n != "object" || !n) continue;
|
|
2747
2774
|
let e = n;
|
|
2748
2775
|
if (Array.isArray(e.columns) && e.columns.length > 0) {
|
|
2749
|
-
|
|
2776
|
+
ai(e.columns, t);
|
|
2750
2777
|
continue;
|
|
2751
2778
|
}
|
|
2752
2779
|
let r = typeof e.accessorKey == "string" ? e.accessorKey : void 0, i = (typeof e.id == "string" ? e.id : void 0) ?? r?.replaceAll(".", "_") ?? (typeof e.header == "string" ? e.header : void 0);
|
|
@@ -2754,29 +2781,29 @@ function ri(e, t = []) {
|
|
|
2754
2781
|
}
|
|
2755
2782
|
return t;
|
|
2756
2783
|
}
|
|
2757
|
-
function
|
|
2784
|
+
function oi(e, t) {
|
|
2758
2785
|
let n = (e) => typeof e == "string" && t.has(e), r = (e) => e.filter(n), i = (e) => Object.fromEntries(Object.entries(e).filter(([e]) => n(e))), a = (e) => e.filter((e) => n(e.id)), o = { ...e };
|
|
2759
2786
|
return e.columnOrder && (o.columnOrder = r(e.columnOrder)), e.grouping && (o.grouping = r(e.grouping)), e.columnVisibility && (o.columnVisibility = i(e.columnVisibility)), e.columnSizing && (o.columnSizing = i(e.columnSizing)), e.columnPinning && (o.columnPinning = {
|
|
2760
2787
|
start: r(e.columnPinning.start ?? []),
|
|
2761
2788
|
end: r(e.columnPinning.end ?? [])
|
|
2762
2789
|
}), e.sorting && (o.sorting = a(e.sorting)), e.columnFilters && (o.columnFilters = a(e.columnFilters)), o;
|
|
2763
2790
|
}
|
|
2764
|
-
function
|
|
2765
|
-
let n =
|
|
2766
|
-
|
|
2767
|
-
|
|
2791
|
+
function si(e, t) {
|
|
2792
|
+
let n = Ur(e), { data: r, settings: i } = ti(e), a = e?.deserialize ?? ri, o = {
|
|
2793
|
+
...$r(n, i, a),
|
|
2794
|
+
...$r(n, r, a)
|
|
2768
2795
|
};
|
|
2769
|
-
return t === void 0 ? o :
|
|
2796
|
+
return t === void 0 ? o : oi(o, new Set(t));
|
|
2770
2797
|
}
|
|
2771
|
-
function
|
|
2772
|
-
let n =
|
|
2798
|
+
function ci(e, t) {
|
|
2799
|
+
let n = Ur(t);
|
|
2773
2800
|
if (!n) return;
|
|
2774
|
-
let { data: r, settings: i } =
|
|
2775
|
-
|
|
2801
|
+
let { data: r, settings: i } = ti(t), a = t?.serialize ?? ii;
|
|
2802
|
+
ei(n, r, e, a), ei(n, i, e, a);
|
|
2776
2803
|
}
|
|
2777
2804
|
//#endregion
|
|
2778
2805
|
//#region src/core/capabilities.ts
|
|
2779
|
-
function
|
|
2806
|
+
function li(e) {
|
|
2780
2807
|
let t = e.selectionMode ?? "checkbox", n = e.cellSelection ?? (e.editing === void 0 ? "none" : "single"), r = t !== "highlight" && e.enableRowSelection !== !1;
|
|
2781
2808
|
return {
|
|
2782
2809
|
sorting: e.enableSorting !== !1,
|
|
@@ -2807,7 +2834,7 @@ function si(e) {
|
|
|
2807
2834
|
matchHighlighting: e.enableMatchHighlighting === !0
|
|
2808
2835
|
};
|
|
2809
2836
|
}
|
|
2810
|
-
function
|
|
2837
|
+
function ui(e, t) {
|
|
2811
2838
|
return {
|
|
2812
2839
|
canSort: t.sorting && e.getCanSort(),
|
|
2813
2840
|
canFilter: t.filtering && e.getCanFilter(),
|
|
@@ -2818,8 +2845,8 @@ function ci(e, t) {
|
|
|
2818
2845
|
canGroup: t.grouping && e.getCanGroup()
|
|
2819
2846
|
};
|
|
2820
2847
|
}
|
|
2821
|
-
function
|
|
2822
|
-
let n = e.getAllLeafColumns(), r = (e) => n.some((n) => e(
|
|
2848
|
+
function di(e, t) {
|
|
2849
|
+
let n = e.getAllLeafColumns(), r = (e) => n.some((n) => e(ui(n, t)));
|
|
2823
2850
|
return {
|
|
2824
2851
|
canSortAny: r((e) => e.canSort),
|
|
2825
2852
|
canFilterAny: r((e) => e.canFilter),
|
|
@@ -2834,12 +2861,12 @@ function li(e, t) {
|
|
|
2834
2861
|
}
|
|
2835
2862
|
//#endregion
|
|
2836
2863
|
//#region src/core/cellNavigation.ts
|
|
2837
|
-
var
|
|
2838
|
-
function
|
|
2864
|
+
var fi = (e, t) => Math.min(Math.max(e, 0), Math.max(t, 0));
|
|
2865
|
+
function pi({ key: e, ctrlKey: t, from: n, rowCount: r, columnCount: i, pageRows: a }) {
|
|
2839
2866
|
if (r === 0 || i === 0) return null;
|
|
2840
2867
|
let o = r - 1, s = i - 1, c = (e, t) => ({
|
|
2841
|
-
rowIndex:
|
|
2842
|
-
columnIndex:
|
|
2868
|
+
rowIndex: fi(e, o),
|
|
2869
|
+
columnIndex: fi(t, s)
|
|
2843
2870
|
});
|
|
2844
2871
|
switch (e) {
|
|
2845
2872
|
case "ArrowDown": return c(n.rowIndex + 1, n.columnIndex);
|
|
@@ -2853,7 +2880,7 @@ function di({ key: e, ctrlKey: t, from: n, rowCount: r, columnCount: i, pageRows
|
|
|
2853
2880
|
default: return null;
|
|
2854
2881
|
}
|
|
2855
2882
|
}
|
|
2856
|
-
function
|
|
2883
|
+
function mi({ from: e, direction: t, rowCount: n, columnCount: r, isEditable: i }) {
|
|
2857
2884
|
let a = n * r;
|
|
2858
2885
|
if (a === 0) return null;
|
|
2859
2886
|
let o = e.rowIndex * r + e.columnIndex;
|
|
@@ -2866,12 +2893,12 @@ function fi({ from: e, direction: t, rowCount: n, columnCount: r, isEditable: i
|
|
|
2866
2893
|
}
|
|
2867
2894
|
return null;
|
|
2868
2895
|
}
|
|
2869
|
-
function
|
|
2896
|
+
function hi(e, t) {
|
|
2870
2897
|
return e === null || t === null ? e === t : e.rowId === t.rowId && e.columnId === t.columnId;
|
|
2871
2898
|
}
|
|
2872
2899
|
//#endregion
|
|
2873
2900
|
//#region src/core/controlledState.ts
|
|
2874
|
-
var
|
|
2901
|
+
var gi = {
|
|
2875
2902
|
columnFilters: "onColumnFiltersChange",
|
|
2876
2903
|
columnOrder: "onColumnOrderChange",
|
|
2877
2904
|
columnPinning: "onColumnPinningChange",
|
|
@@ -2885,63 +2912,63 @@ var mi = {
|
|
|
2885
2912
|
rowPinning: "onRowPinningChange",
|
|
2886
2913
|
rowSelection: "onRowSelectionChange",
|
|
2887
2914
|
sorting: "onSortingChange"
|
|
2888
|
-
},
|
|
2889
|
-
function
|
|
2915
|
+
}, _i = (e, t) => Object.prototype.hasOwnProperty.call(e, t);
|
|
2916
|
+
function vi(e) {
|
|
2890
2917
|
if (typeof e != "object" || !e) return !1;
|
|
2891
2918
|
let t = Object.getPrototypeOf(e);
|
|
2892
2919
|
return t === Object.prototype || t === null;
|
|
2893
2920
|
}
|
|
2894
|
-
function
|
|
2921
|
+
function yi(e, t) {
|
|
2895
2922
|
if (Object.is(e, t)) return !0;
|
|
2896
2923
|
if (e instanceof Date || t instanceof Date) return e instanceof Date && t instanceof Date && e.getTime() === t.getTime();
|
|
2897
|
-
if (Array.isArray(e) || Array.isArray(t)) return !Array.isArray(e) || !Array.isArray(t) ? !1 : e.length === t.length && e.every((e, n) =>
|
|
2898
|
-
if (!
|
|
2924
|
+
if (Array.isArray(e) || Array.isArray(t)) return !Array.isArray(e) || !Array.isArray(t) ? !1 : e.length === t.length && e.every((e, n) => yi(e, t[n]));
|
|
2925
|
+
if (!vi(e) || !vi(t)) return !1;
|
|
2899
2926
|
let n = Object.keys(e);
|
|
2900
|
-
return n.length === Object.keys(t).length && n.every((n) =>
|
|
2927
|
+
return n.length === Object.keys(t).length && n.every((n) => _i(t, n) && yi(e[n], t[n]));
|
|
2901
2928
|
}
|
|
2902
|
-
function
|
|
2929
|
+
function bi(e) {
|
|
2903
2930
|
if (e === void 0 || !Object.values(e).includes(void 0)) return e;
|
|
2904
2931
|
let t = {};
|
|
2905
2932
|
for (let [n, r] of Object.entries(e)) r !== void 0 && (t[n] = r);
|
|
2906
2933
|
return t;
|
|
2907
2934
|
}
|
|
2908
|
-
function
|
|
2935
|
+
function xi(e, t) {
|
|
2909
2936
|
if (e === void 0 || t === void 0 || e === t) return e;
|
|
2910
2937
|
let n = Object.keys(e), r = {}, i = n.length !== Object.keys(t).length;
|
|
2911
2938
|
for (let a of n) {
|
|
2912
2939
|
let n = e[a], o = t[a];
|
|
2913
|
-
|
|
2940
|
+
_i(t, a) && yi(n, o) ? r[a] = o : (r[a] = n, i = !0);
|
|
2914
2941
|
}
|
|
2915
2942
|
return i ? r : t;
|
|
2916
2943
|
}
|
|
2917
|
-
function
|
|
2944
|
+
function Si(e) {
|
|
2918
2945
|
let t = e.state;
|
|
2919
|
-
return t === void 0 ? [] : Object.entries(
|
|
2946
|
+
return t === void 0 ? [] : Object.entries(gi).filter(([n, r]) => t[n] !== void 0 && e[r] === void 0 && e.atoms?.[n] === void 0).map(([e, t]) => ({
|
|
2920
2947
|
slice: e,
|
|
2921
2948
|
handler: t
|
|
2922
2949
|
}));
|
|
2923
2950
|
}
|
|
2924
2951
|
//#endregion
|
|
2925
2952
|
//#region src/core/controlledStateSync.ts
|
|
2926
|
-
var
|
|
2927
|
-
function
|
|
2928
|
-
|
|
2929
|
-
|
|
2953
|
+
var Ci = !1;
|
|
2954
|
+
function wi() {
|
|
2955
|
+
Ci = !0, queueMicrotask(() => {
|
|
2956
|
+
Ci = !1;
|
|
2930
2957
|
});
|
|
2931
2958
|
}
|
|
2932
|
-
function
|
|
2933
|
-
|
|
2959
|
+
function Ti() {
|
|
2960
|
+
Ci = !1;
|
|
2934
2961
|
}
|
|
2935
|
-
var
|
|
2936
|
-
function
|
|
2937
|
-
if (
|
|
2938
|
-
|
|
2962
|
+
var Ei = /* @__PURE__ */ new WeakSet();
|
|
2963
|
+
function Di(e) {
|
|
2964
|
+
if (Ei.has(e)) return;
|
|
2965
|
+
Ei.add(e);
|
|
2939
2966
|
let t = e.subscribe.bind(e);
|
|
2940
2967
|
e.subscribe = (e) => {
|
|
2941
2968
|
let n = typeof e == "function" ? e : e.next?.bind(e);
|
|
2942
2969
|
if (n === void 0) return t(e);
|
|
2943
2970
|
let r = !0, i = t((e) => {
|
|
2944
|
-
if (!
|
|
2971
|
+
if (!Ci) {
|
|
2945
2972
|
n(e);
|
|
2946
2973
|
return;
|
|
2947
2974
|
}
|
|
@@ -2956,33 +2983,33 @@ function Ti(e) {
|
|
|
2956
2983
|
}
|
|
2957
2984
|
//#endregion
|
|
2958
2985
|
//#region src/core/deletedRows.ts
|
|
2959
|
-
var
|
|
2960
|
-
function
|
|
2961
|
-
return
|
|
2962
|
-
|
|
2986
|
+
var Oi = /* @__PURE__ */ new WeakMap();
|
|
2987
|
+
function ki(e, t) {
|
|
2988
|
+
return Oi.set(e.store, t), () => {
|
|
2989
|
+
Oi.get(e.store) === t && Oi.delete(e.store);
|
|
2963
2990
|
};
|
|
2964
2991
|
}
|
|
2965
|
-
function
|
|
2966
|
-
return
|
|
2992
|
+
function Ai(e, t) {
|
|
2993
|
+
return Oi.get(e.store)?.(t) ?? !1;
|
|
2967
2994
|
}
|
|
2968
2995
|
//#endregion
|
|
2969
2996
|
//#region src/core/pageReset.ts
|
|
2970
|
-
function
|
|
2997
|
+
function ji(e) {
|
|
2971
2998
|
return e.filter((e) => !bt(e.value) || St(e.value));
|
|
2972
2999
|
}
|
|
2973
|
-
function
|
|
2974
|
-
return e === "columnFilters" ? !
|
|
3000
|
+
function Mi(e, t, n) {
|
|
3001
|
+
return e === "columnFilters" ? !yi(ji(t), ji(n)) : !yi(t, n);
|
|
2975
3002
|
}
|
|
2976
|
-
function
|
|
3003
|
+
function Ni(e, t, n) {
|
|
2977
3004
|
return (r) => {
|
|
2978
3005
|
let i = n(), a = i.store.state[e], o = Ie(r, a);
|
|
2979
|
-
(t ?? Re(e, i))(r),
|
|
3006
|
+
(t ?? Re(e, i))(r), Mi(e, a, o) && i.store.state.pagination.pageIndex !== 0 && i.setPageIndex(0);
|
|
2980
3007
|
};
|
|
2981
3008
|
}
|
|
2982
3009
|
//#endregion
|
|
2983
3010
|
//#region src/core/export.ts
|
|
2984
|
-
var
|
|
2985
|
-
function
|
|
3011
|
+
var Pi = "";
|
|
3012
|
+
function Fi(e, { decimalComma: t }) {
|
|
2986
3013
|
if (e == null) return "";
|
|
2987
3014
|
if (typeof e == "number") {
|
|
2988
3015
|
if (!Number.isFinite(e)) return "";
|
|
@@ -2991,7 +3018,7 @@ function Ni(e, { decimalComma: t }) {
|
|
|
2991
3018
|
}
|
|
2992
3019
|
if (typeof e == "string") return e;
|
|
2993
3020
|
if (typeof e == "boolean") return e ? "true" : "false";
|
|
2994
|
-
if (Array.isArray(e)) return e.map((e) =>
|
|
3021
|
+
if (Array.isArray(e)) return e.map((e) => Fi(e, { decimalComma: t })).join(", ");
|
|
2995
3022
|
if (e instanceof Date) return Number.isNaN(e.getTime()) ? "" : e.toLocaleString("sv-SE");
|
|
2996
3023
|
if (typeof e == "object") try {
|
|
2997
3024
|
return JSON.stringify(e);
|
|
@@ -3000,7 +3027,7 @@ function Ni(e, { decimalComma: t }) {
|
|
|
3000
3027
|
}
|
|
3001
3028
|
return String(e);
|
|
3002
3029
|
}
|
|
3003
|
-
var
|
|
3030
|
+
var Ii = /* @__PURE__ */ new Set([
|
|
3004
3031
|
"=",
|
|
3005
3032
|
"+",
|
|
3006
3033
|
"-",
|
|
@@ -3008,89 +3035,89 @@ var Pi = /* @__PURE__ */ new Set([
|
|
|
3008
3035
|
" ",
|
|
3009
3036
|
"\r"
|
|
3010
3037
|
]);
|
|
3011
|
-
function
|
|
3012
|
-
if (!
|
|
3038
|
+
function Li(e) {
|
|
3039
|
+
if (!Ii.has(e.charAt(0))) return e;
|
|
3013
3040
|
let t = e.trim();
|
|
3014
3041
|
return t !== "" && Number.isFinite(Number(t)) ? e : `'${e}`;
|
|
3015
3042
|
}
|
|
3016
|
-
function
|
|
3017
|
-
let n =
|
|
3018
|
-
return !t.escapeFormulas || typeof e == "number" ? n :
|
|
3043
|
+
function Ri(e, t) {
|
|
3044
|
+
let n = Fi(e, { decimalComma: t.decimalComma });
|
|
3045
|
+
return !t.escapeFormulas || typeof e == "number" ? n : Li(n);
|
|
3019
3046
|
}
|
|
3020
|
-
function
|
|
3047
|
+
function zi(e, { includeHeaders: t }, n) {
|
|
3021
3048
|
let r = [];
|
|
3022
|
-
t && r.push(e.headers.map((e) => n.escapeFormulas ?
|
|
3023
|
-
for (let t of e.rows) r.push(t.map((e) =>
|
|
3049
|
+
t && r.push(e.headers.map((e) => n.escapeFormulas ? Li(e) : e));
|
|
3050
|
+
for (let t of e.rows) r.push(t.map((e) => Ri(e, n)));
|
|
3024
3051
|
return r;
|
|
3025
3052
|
}
|
|
3026
|
-
function
|
|
3053
|
+
function Bi(e, t) {
|
|
3027
3054
|
return e.includes(t) || e.includes("\"") || e.includes("\n") || e.includes("\r") ? `"${e.replaceAll("\"", "\"\"")}"` : e;
|
|
3028
3055
|
}
|
|
3029
|
-
function
|
|
3030
|
-
return e.map((e) => e.map((e) =>
|
|
3056
|
+
function Vi(e, t) {
|
|
3057
|
+
return e.map((e) => e.map((e) => Bi(e, t)).join(t)).join("\r\n");
|
|
3031
3058
|
}
|
|
3032
|
-
function
|
|
3059
|
+
function Hi({ separator: e = ";", decimalComma: t = !0, escapeFormulas: n = !0 } = {}) {
|
|
3033
3060
|
return {
|
|
3034
3061
|
id: "csvExcel",
|
|
3035
3062
|
extension: "csv",
|
|
3036
3063
|
mimeType: "text/csv;charset=utf-8",
|
|
3037
3064
|
decimalComma: t,
|
|
3038
|
-
write: (r, i) => `${
|
|
3065
|
+
write: (r, i) => `${Pi}sep=${e}\r\n${Vi(zi(r, i, {
|
|
3039
3066
|
decimalComma: t,
|
|
3040
3067
|
escapeFormulas: n
|
|
3041
3068
|
}), e)}\r\n`
|
|
3042
3069
|
};
|
|
3043
3070
|
}
|
|
3044
|
-
function
|
|
3071
|
+
function Ui({ separator: e = ",", decimalComma: t = !1, escapeFormulas: n = !0 } = {}) {
|
|
3045
3072
|
return {
|
|
3046
3073
|
id: "csv",
|
|
3047
3074
|
extension: "csv",
|
|
3048
3075
|
mimeType: "text/csv;charset=utf-8",
|
|
3049
3076
|
decimalComma: t,
|
|
3050
|
-
write: (r, i) => `${
|
|
3077
|
+
write: (r, i) => `${Pi}${Vi(zi(r, i, {
|
|
3051
3078
|
decimalComma: t,
|
|
3052
3079
|
escapeFormulas: n
|
|
3053
3080
|
}), e)}\r\n`
|
|
3054
3081
|
};
|
|
3055
3082
|
}
|
|
3056
|
-
function
|
|
3083
|
+
function Wi({ decimalComma: e = !0, escapeFormulas: t = !0 } = {}) {
|
|
3057
3084
|
return {
|
|
3058
3085
|
id: "tsv",
|
|
3059
3086
|
extension: "tsv",
|
|
3060
3087
|
mimeType: "text/tab-separated-values;charset=utf-8",
|
|
3061
3088
|
decimalComma: e,
|
|
3062
|
-
write: (n, r) => `${
|
|
3089
|
+
write: (n, r) => `${Pi}${Vi(zi(n, r, {
|
|
3063
3090
|
decimalComma: e,
|
|
3064
3091
|
escapeFormulas: t
|
|
3065
3092
|
}), " ")}\r\n`
|
|
3066
3093
|
};
|
|
3067
3094
|
}
|
|
3068
|
-
function
|
|
3095
|
+
function Gi(e) {
|
|
3069
3096
|
return e === void 0 || typeof e == "number" && !Number.isFinite(e) ? null : e instanceof Date ? Number.isNaN(e.getTime()) ? null : e.toISOString() : e;
|
|
3070
3097
|
}
|
|
3071
|
-
function
|
|
3098
|
+
function Ki({ space: e = 2 } = {}) {
|
|
3072
3099
|
return {
|
|
3073
3100
|
id: "json",
|
|
3074
3101
|
extension: "json",
|
|
3075
3102
|
mimeType: "application/json",
|
|
3076
3103
|
write: (t) => {
|
|
3077
|
-
let n = t.rows.map((e) => Object.fromEntries(e.map((e, n) => [t.headers[n],
|
|
3104
|
+
let n = t.rows.map((e) => Object.fromEntries(e.map((e, n) => [t.headers[n], Gi(e)])));
|
|
3078
3105
|
return JSON.stringify(n, null, e);
|
|
3079
3106
|
}
|
|
3080
3107
|
};
|
|
3081
3108
|
}
|
|
3082
|
-
var
|
|
3083
|
-
format:
|
|
3109
|
+
var qi = {
|
|
3110
|
+
format: Hi(),
|
|
3084
3111
|
fileName: "export",
|
|
3085
3112
|
includeHeaders: !0,
|
|
3086
3113
|
columns: "visible"
|
|
3087
3114
|
};
|
|
3088
|
-
function
|
|
3089
|
-
let t = { ...
|
|
3115
|
+
function Ji(...e) {
|
|
3116
|
+
let t = { ...qi };
|
|
3090
3117
|
for (let n of e) n && (n.format !== void 0 && (t.format = n.format), n.fileName !== void 0 && (t.fileName = n.fileName), n.includeHeaders !== void 0 && (t.includeHeaders = n.includeHeaders), n.columns !== void 0 && (t.columns = n.columns));
|
|
3091
3118
|
return t;
|
|
3092
3119
|
}
|
|
3093
|
-
function
|
|
3120
|
+
function Yi(e) {
|
|
3094
3121
|
let t = [
|
|
3095
3122
|
...e.getStartLeafColumns(),
|
|
3096
3123
|
...e.getCenterLeafColumns(),
|
|
@@ -3104,30 +3131,30 @@ function qi(e) {
|
|
|
3104
3131
|
...o
|
|
3105
3132
|
];
|
|
3106
3133
|
}
|
|
3107
|
-
function
|
|
3108
|
-
return
|
|
3134
|
+
function Xi(e) {
|
|
3135
|
+
return Yi(e).filter(Qi);
|
|
3109
3136
|
}
|
|
3110
|
-
function
|
|
3111
|
-
let n =
|
|
3137
|
+
function Zi(e, t) {
|
|
3138
|
+
let n = Yi(e).filter(Qi);
|
|
3112
3139
|
if (t === "all") return n;
|
|
3113
3140
|
if (t === "visible") return n.filter((e) => e.getIsVisible());
|
|
3114
3141
|
let r = new Set(t);
|
|
3115
3142
|
return n.filter((e) => r.has(e.id));
|
|
3116
3143
|
}
|
|
3117
|
-
function
|
|
3144
|
+
function Qi(e) {
|
|
3118
3145
|
return !Vn(e.id) && e.columnDef.meta?.enableExport !== !1;
|
|
3119
3146
|
}
|
|
3120
|
-
function
|
|
3147
|
+
function $i(e) {
|
|
3121
3148
|
let t = [], n = (r) => {
|
|
3122
|
-
for (let i of r) i.getIsGrouped() ? n(i.subRows) :
|
|
3149
|
+
for (let i of r) i.getIsGrouped() ? n(i.subRows) : Ai(e, i.id) || t.push(i);
|
|
3123
3150
|
};
|
|
3124
3151
|
return n(e.getSortedRowModel().rows), t;
|
|
3125
3152
|
}
|
|
3126
|
-
function
|
|
3153
|
+
function ea(e) {
|
|
3127
3154
|
let t = e;
|
|
3128
|
-
return Object.keys(t.store.state.rowSelection).length === 0 ? 0 :
|
|
3155
|
+
return Object.keys(t.store.state.rowSelection).length === 0 ? 0 : $i(t).filter((e) => e.getIsSelected()).length;
|
|
3129
3156
|
}
|
|
3130
|
-
function
|
|
3157
|
+
function ta(e, t) {
|
|
3131
3158
|
return {
|
|
3132
3159
|
columnIds: t.map((e) => e.id),
|
|
3133
3160
|
headers: t.map((e) => Mn(e)),
|
|
@@ -3141,56 +3168,56 @@ function $i(e, t) {
|
|
|
3141
3168
|
}))
|
|
3142
3169
|
};
|
|
3143
3170
|
}
|
|
3144
|
-
function
|
|
3171
|
+
function na({ table: e, rows: t = "all", columns: n = "visible", bounds: r }) {
|
|
3145
3172
|
let i = e, a = r ? [
|
|
3146
3173
|
...i.getStartVisibleLeafColumns(),
|
|
3147
3174
|
...i.getCenterVisibleLeafColumns(),
|
|
3148
3175
|
...i.getEndVisibleLeafColumns()
|
|
3149
|
-
].slice(r.left, r.right + 1).filter(
|
|
3176
|
+
].slice(r.left, r.right + 1).filter(Qi) : Zi(i, n);
|
|
3150
3177
|
if (a.length === 0) return {
|
|
3151
3178
|
columnIds: [],
|
|
3152
3179
|
headers: [],
|
|
3153
3180
|
rows: []
|
|
3154
3181
|
};
|
|
3155
3182
|
let o;
|
|
3156
|
-
return o = t === "all" ?
|
|
3183
|
+
return o = t === "all" ? $i(i) : t === "selected" ? $i(i).filter((e) => e.getIsSelected()) : t, r && (o = o.slice(r.top, r.bottom + 1)), ta(o, a);
|
|
3157
3184
|
}
|
|
3158
|
-
async function
|
|
3185
|
+
async function ra(e, { format: t, fileName: n, includeHeaders: r }) {
|
|
3159
3186
|
let i = await t.write(e, { includeHeaders: r });
|
|
3160
|
-
|
|
3187
|
+
sa({
|
|
3161
3188
|
fileName: `${n}.${t.extension}`,
|
|
3162
3189
|
content: i,
|
|
3163
3190
|
mimeType: t.mimeType
|
|
3164
3191
|
});
|
|
3165
3192
|
}
|
|
3166
|
-
async function
|
|
3167
|
-
let r =
|
|
3193
|
+
async function ia({ table: e, rows: t, options: n }) {
|
|
3194
|
+
let r = Ji(n), i = na({
|
|
3168
3195
|
table: e,
|
|
3169
3196
|
rows: t,
|
|
3170
3197
|
columns: r.columns
|
|
3171
3198
|
});
|
|
3172
|
-
i.columnIds.length !== 0 && await
|
|
3199
|
+
i.columnIds.length !== 0 && await ra(i, r);
|
|
3173
3200
|
}
|
|
3174
|
-
function
|
|
3175
|
-
return
|
|
3201
|
+
function aa(e, { decimalComma: t = !0, escapeFormulas: n = !0 } = {}) {
|
|
3202
|
+
return Vi(Array.isArray(e) ? e : zi(e, { includeHeaders: !1 }, {
|
|
3176
3203
|
decimalComma: t,
|
|
3177
3204
|
escapeFormulas: n
|
|
3178
3205
|
}), " ");
|
|
3179
3206
|
}
|
|
3180
|
-
async function
|
|
3207
|
+
async function oa(e) {
|
|
3181
3208
|
try {
|
|
3182
3209
|
return await navigator.clipboard.writeText(e), !0;
|
|
3183
3210
|
} catch {
|
|
3184
3211
|
return !1;
|
|
3185
3212
|
}
|
|
3186
3213
|
}
|
|
3187
|
-
function
|
|
3214
|
+
function sa({ fileName: e, content: t, mimeType: n }) {
|
|
3188
3215
|
let r = t instanceof Blob ? t : new Blob([t], { type: n }), i = URL.createObjectURL(r), a = document.createElement("a");
|
|
3189
3216
|
a.href = i, a.download = e, a.style.display = "none", document.body.append(a), a.click(), a.remove(), setTimeout(() => URL.revokeObjectURL(i), 0);
|
|
3190
3217
|
}
|
|
3191
3218
|
//#endregion
|
|
3192
3219
|
//#region src/components/generatedColumns.tsx
|
|
3193
|
-
function
|
|
3220
|
+
function ca(e = "Checkbox selection") {
|
|
3194
3221
|
return {
|
|
3195
3222
|
id: Dn,
|
|
3196
3223
|
meta: {
|
|
@@ -3212,7 +3239,7 @@ function oa(e = "Checkbox selection") {
|
|
|
3212
3239
|
aggregatedCell: ({ row: e }) => /* @__PURE__ */ J(An, { row: e })
|
|
3213
3240
|
};
|
|
3214
3241
|
}
|
|
3215
|
-
function
|
|
3242
|
+
function la(e = "Group") {
|
|
3216
3243
|
return {
|
|
3217
3244
|
id: ln,
|
|
3218
3245
|
meta: {
|
|
@@ -3231,7 +3258,7 @@ function sa(e = "Group") {
|
|
|
3231
3258
|
header: ({ table: e }) => /* @__PURE__ */ J(fn, { table: e })
|
|
3232
3259
|
};
|
|
3233
3260
|
}
|
|
3234
|
-
function
|
|
3261
|
+
function ua(e = "Details") {
|
|
3235
3262
|
return {
|
|
3236
3263
|
id: Ft,
|
|
3237
3264
|
meta: {
|
|
@@ -3252,7 +3279,7 @@ function ca(e = "Details") {
|
|
|
3252
3279
|
cell: ({ row: e }) => /* @__PURE__ */ J(It, { row: e })
|
|
3253
3280
|
};
|
|
3254
3281
|
}
|
|
3255
|
-
function
|
|
3282
|
+
function da(e = "Edit", t = !1) {
|
|
3256
3283
|
let n = t ? 88 : 64;
|
|
3257
3284
|
return {
|
|
3258
3285
|
id: tn,
|
|
@@ -3277,7 +3304,7 @@ function la(e = "Edit", t = !1) {
|
|
|
3277
3304
|
}
|
|
3278
3305
|
//#endregion
|
|
3279
3306
|
//#region src/useTMDataGrid.tsx
|
|
3280
|
-
var
|
|
3307
|
+
var fa = 200, pa = qe({
|
|
3281
3308
|
columnFilteringFeature: ye,
|
|
3282
3309
|
globalFilteringFeature: Le,
|
|
3283
3310
|
rowSortingFeature: Ge,
|
|
@@ -3295,7 +3322,7 @@ var ua = 200, da = qe({
|
|
|
3295
3322
|
rowPinningFeature: Ue,
|
|
3296
3323
|
filteredRowModel: je(),
|
|
3297
3324
|
groupedRowModel: Q(),
|
|
3298
|
-
sortedRowModel:
|
|
3325
|
+
sortedRowModel: Fr(),
|
|
3299
3326
|
expandedRowModel: De(),
|
|
3300
3327
|
paginatedRowModel: Me(),
|
|
3301
3328
|
facetedRowModel: ke(),
|
|
@@ -3304,26 +3331,26 @@ var ua = 200, da = qe({
|
|
|
3304
3331
|
filterFns: {
|
|
3305
3332
|
...Pe,
|
|
3306
3333
|
tmDataGrid: kt,
|
|
3307
|
-
tmDataGridFuzzy:
|
|
3334
|
+
tmDataGridFuzzy: Mr
|
|
3308
3335
|
},
|
|
3309
3336
|
sortFns: Ke,
|
|
3310
3337
|
aggregationFns: _e,
|
|
3311
3338
|
tableMeta: ze(),
|
|
3312
3339
|
columnMeta: ze()
|
|
3313
3340
|
});
|
|
3314
|
-
function
|
|
3341
|
+
function ma() {
|
|
3315
3342
|
return Ee();
|
|
3316
3343
|
}
|
|
3317
|
-
var
|
|
3318
|
-
function
|
|
3344
|
+
var ha = 160, ga = 6, _a = [];
|
|
3345
|
+
function va(e) {
|
|
3319
3346
|
let t = { ...e };
|
|
3320
3347
|
for (let e of Object.keys(t)) Bn(e) && delete t[e];
|
|
3321
3348
|
return t;
|
|
3322
3349
|
}
|
|
3323
|
-
function
|
|
3350
|
+
function ya(e) {
|
|
3324
3351
|
return e.map((e) => "columns" in e && Array.isArray(e.columns) ? {
|
|
3325
3352
|
...e,
|
|
3326
|
-
columns:
|
|
3353
|
+
columns: ya(e.columns)
|
|
3327
3354
|
} : {
|
|
3328
3355
|
filterFn: "tmDataGrid",
|
|
3329
3356
|
aggregationFn: void 0,
|
|
@@ -3331,8 +3358,8 @@ function _a(e) {
|
|
|
3331
3358
|
...e
|
|
3332
3359
|
});
|
|
3333
3360
|
}
|
|
3334
|
-
function
|
|
3335
|
-
let T = y?.mode, E = y?.draft === !0, D =
|
|
3361
|
+
function ba({ persist: e, labels: t, enableColumnOrdering: r, enablePagination: a, resetPageOnQueryChange: l, enableRowNumbers: u, selectionMode: d, showSelectedBackground: f, defaultHighlightedRowId: p, onHighlightedRowChange: m, cellSelection: h, onFocusedCellChange: g, filters: _, exportOptions: v, editing: y, renderDetails: b, renderDetailsEstHeight: x = ha, detailsColumnPosition: S = "left", overscan: C = ga, ...w }) {
|
|
3362
|
+
let T = y?.mode, E = y?.draft === !0, D = li({
|
|
3336
3363
|
...w,
|
|
3337
3364
|
enableColumnOrdering: r,
|
|
3338
3365
|
enablePagination: a,
|
|
@@ -3341,7 +3368,7 @@ function va({ persist: e, labels: t, enableColumnOrdering: r, enablePagination:
|
|
|
3341
3368
|
showSelectedBackground: f,
|
|
3342
3369
|
cellSelection: h,
|
|
3343
3370
|
editing: y
|
|
3344
|
-
}), O = o(() =>
|
|
3371
|
+
}), O = o(() => Lr(t), [t]), { format: k, fileName: A, includeHeaders: N, columns: P } = v ?? {}, F = o(() => Ji({
|
|
3345
3372
|
format: k,
|
|
3346
3373
|
fileName: A,
|
|
3347
3374
|
includeHeaders: N,
|
|
@@ -3380,15 +3407,15 @@ function va({ persist: e, labels: t, enableColumnOrdering: r, enablePagination:
|
|
|
3380
3407
|
]
|
|
3381
3408
|
};
|
|
3382
3409
|
}, K = o(() => {
|
|
3383
|
-
let e =
|
|
3410
|
+
let e = ya(w.columns), t = W ? [ua(ne)] : [];
|
|
3384
3411
|
return [
|
|
3385
3412
|
...ae ? [hn(ie)] : [],
|
|
3386
|
-
...H ? [
|
|
3387
|
-
...U ? [
|
|
3413
|
+
...H ? [ca(G)] : [],
|
|
3414
|
+
...U ? [la(te)] : [],
|
|
3388
3415
|
...S === "left" ? t : [],
|
|
3389
3416
|
...e,
|
|
3390
3417
|
...S === "right" ? t : [],
|
|
3391
|
-
...ee ? [
|
|
3418
|
+
...ee ? [da(re, oe)] : []
|
|
3392
3419
|
];
|
|
3393
3420
|
}, [
|
|
3394
3421
|
w.columns,
|
|
@@ -3404,13 +3431,13 @@ function va({ persist: e, labels: t, enableColumnOrdering: r, enablePagination:
|
|
|
3404
3431
|
te,
|
|
3405
3432
|
ne,
|
|
3406
3433
|
re
|
|
3407
|
-
]), [ce] = c(() =>
|
|
3434
|
+
]), [ce] = c(() => si(e, ai(K))), q = ce.grouping ?? w.initialState?.grouping ?? [], le = s((w.state?.grouping ?? q).length > 0), ue = bi(w.state), de = ue?.columnVisibility, fe = ue !== void 0 && de !== void 0 ? {
|
|
3408
3435
|
...ue,
|
|
3409
3436
|
columnVisibility: {
|
|
3410
|
-
...
|
|
3437
|
+
...va(de),
|
|
3411
3438
|
...U ? { [ln]: le.current } : {}
|
|
3412
3439
|
}
|
|
3413
|
-
} : ue, J = s(void 0), Y = s(!1), pe = Y.current ? fe :
|
|
3440
|
+
} : ue, J = s(void 0), Y = s(!1), pe = Y.current ? fe : xi(fe, J.current);
|
|
3414
3441
|
Y.current = !1, J.current = pe;
|
|
3415
3442
|
let X = s(null), me = n((e) => {
|
|
3416
3443
|
let t = e.columnResizing, n = X.current;
|
|
@@ -3418,7 +3445,9 @@ function va({ persist: e, labels: t, enableColumnOrdering: r, enablePagination:
|
|
|
3418
3445
|
...e,
|
|
3419
3446
|
columnResizing: n
|
|
3420
3447
|
};
|
|
3421
|
-
}, []), Z = s(null), [he] = c(() => $t(() => Z.current)), _e = he, ve = M(_e.store, (e) => e.committedValues)
|
|
3448
|
+
}, []), Z = s(null), [he] = c(() => $t(() => Z.current)), _e = he, ve = M(_e.store, (e) => e.committedValues);
|
|
3449
|
+
M(_e.store, (e) => e.deletedRowIds);
|
|
3450
|
+
let ye = D.editNewRowsSticky, be = M(_e.store, (e) => ye ? _a : e.newRows.filter((e) => e.committed).map((e) => e.tempId), { compare: ge }), xe = s(w.getRowId);
|
|
3422
3451
|
xe.current = w.getRowId;
|
|
3423
3452
|
let Se = o(() => {
|
|
3424
3453
|
let e = xe.current, t = /* @__PURE__ */ new Map(), n = [];
|
|
@@ -3446,7 +3475,7 @@ function va({ persist: e, labels: t, enableColumnOrdering: r, enablePagination:
|
|
|
3446
3475
|
]), Ce = s(Se.idOf);
|
|
3447
3476
|
Ce.current = Se.idOf;
|
|
3448
3477
|
let we = n((e, t, n) => Ce.current.get(e) ?? xe.current?.(e, t, n) ?? (n === void 0 ? String(t) : `${n.id}.${t}`), []), Te = s(null), Ee = l ?? !0, De = n(() => Te.current, []);
|
|
3449
|
-
|
|
3478
|
+
wi();
|
|
3450
3479
|
let Oe = Je({
|
|
3451
3480
|
columnResizeMode: "onEnd",
|
|
3452
3481
|
autoResetExpanded: !1,
|
|
@@ -3454,27 +3483,28 @@ function va({ persist: e, labels: t, enableColumnOrdering: r, enablePagination:
|
|
|
3454
3483
|
enableSorting: !0,
|
|
3455
3484
|
enableColumnResizing: !0,
|
|
3456
3485
|
globalFilterFn: w.quickSearchMode === "contains" ? "includesString" : "tmDataGridFuzzy",
|
|
3486
|
+
getColumnCanGlobalFilter: Ar,
|
|
3457
3487
|
groupedColumnMode: "remove",
|
|
3458
3488
|
...w,
|
|
3459
3489
|
...Ee ? {
|
|
3460
|
-
onColumnFiltersChange:
|
|
3461
|
-
onGlobalFilterChange:
|
|
3462
|
-
onSortingChange:
|
|
3463
|
-
onGroupingChange:
|
|
3490
|
+
onColumnFiltersChange: Ni("columnFilters", w.onColumnFiltersChange, De),
|
|
3491
|
+
onGlobalFilterChange: Ni("globalFilter", w.onGlobalFilterChange, De),
|
|
3492
|
+
onSortingChange: Ni("sorting", w.onSortingChange, De),
|
|
3493
|
+
onGroupingChange: Ni("grouping", w.onGroupingChange, De)
|
|
3464
3494
|
} : {},
|
|
3465
3495
|
data: Se.rows,
|
|
3466
3496
|
getRowId: we,
|
|
3467
|
-
...b
|
|
3497
|
+
...b !== void 0 || w.getRowCanExpand !== void 0 ? { getRowCanExpand: (e) => e.getIsGrouped() || (w.getRowCanExpand?.(e) ?? !0) } : {},
|
|
3468
3498
|
enableRowPinning: (e) => !e.getIsGrouped() && (typeof w.enableRowPinning == "function" ? w.enableRowPinning(e) : w.enableRowPinning === !0),
|
|
3469
3499
|
...E ? { enableRowSelection: (e) => !he.isRowDeleted(e.id) && (typeof w.enableRowSelection == "function" ? w.enableRowSelection(e) : w.enableRowSelection !== !1) } : {},
|
|
3470
|
-
features:
|
|
3500
|
+
features: pa,
|
|
3471
3501
|
columns: K,
|
|
3472
3502
|
state: pe,
|
|
3473
3503
|
initialState: {
|
|
3474
3504
|
...w.initialState,
|
|
3475
3505
|
...ce,
|
|
3476
3506
|
columnVisibility: {
|
|
3477
|
-
...
|
|
3507
|
+
...va({
|
|
3478
3508
|
...w.initialState?.columnVisibility,
|
|
3479
3509
|
...ce.columnVisibility
|
|
3480
3510
|
}),
|
|
@@ -3492,7 +3522,7 @@ function va({ persist: e, labels: t, enableColumnOrdering: r, enablePagination:
|
|
|
3492
3522
|
}
|
|
3493
3523
|
}
|
|
3494
3524
|
}, me);
|
|
3495
|
-
|
|
3525
|
+
Ti(), Te.current = Oe, Di(Oe.store), Z.current = {
|
|
3496
3526
|
table: Oe,
|
|
3497
3527
|
editMode: T ?? "cell",
|
|
3498
3528
|
draft: E,
|
|
@@ -3529,10 +3559,10 @@ function va({ persist: e, labels: t, enableColumnOrdering: r, enablePagination:
|
|
|
3529
3559
|
Ae,
|
|
3530
3560
|
je,
|
|
3531
3561
|
he
|
|
3532
|
-
]), i(() =>
|
|
3562
|
+
]), i(() => ki(Te.current, he.isRowDeleted), [he]), i(() => {
|
|
3533
3563
|
y !== void 0 && w.getRowId === void 0 && console.error("TMDataGrid: editing requires getRowId - drafts are keyed by row id, and the index fallback names a different record after any sort or filter.");
|
|
3534
3564
|
}, []), i(() => {
|
|
3535
|
-
for (let { slice: e, handler: t } of
|
|
3565
|
+
for (let { slice: e, handler: t } of Si(w)) console.warn(`TMDataGrid: state.${e} is controlled but no ${t} was passed - the slice cannot change. Add ${t}, or use initialState.${e} for a starting value.`);
|
|
3536
3566
|
}, []), i(() => {
|
|
3537
3567
|
if (!U) return;
|
|
3538
3568
|
let e = Oe.store.state.grouping;
|
|
@@ -3548,12 +3578,12 @@ function va({ persist: e, labels: t, enableColumnOrdering: r, enablePagination:
|
|
|
3548
3578
|
});
|
|
3549
3579
|
return () => t.unsubscribe();
|
|
3550
3580
|
}, [U, Oe]), i(() => {
|
|
3551
|
-
if (!
|
|
3552
|
-
|
|
3581
|
+
if (!ni(e)) return;
|
|
3582
|
+
ci(Oe.store.state, e);
|
|
3553
3583
|
let t, n = null, r = () => {
|
|
3554
|
-
t = void 0, n !== null && (
|
|
3584
|
+
t = void 0, n !== null && (ci(n, e), n = null);
|
|
3555
3585
|
}, i = Oe.store.subscribe((e) => {
|
|
3556
|
-
n = e, t !== void 0 && clearTimeout(t), t = setTimeout(r,
|
|
3586
|
+
n = e, t !== void 0 && clearTimeout(t), t = setTimeout(r, fa);
|
|
3557
3587
|
});
|
|
3558
3588
|
return () => {
|
|
3559
3589
|
i.unsubscribe(), t !== void 0 && clearTimeout(t), r();
|
|
@@ -3612,11 +3642,11 @@ function va({ persist: e, labels: t, enableColumnOrdering: r, enablePagination:
|
|
|
3612
3642
|
...e,
|
|
3613
3643
|
selectionAnchorRowId: t
|
|
3614
3644
|
})),
|
|
3615
|
-
setFocusedCell: (t) => e((e) =>
|
|
3645
|
+
setFocusedCell: (t) => e((e) => hi(e.focusedCell, t) ? e : {
|
|
3616
3646
|
...e,
|
|
3617
3647
|
focusedCell: t
|
|
3618
3648
|
}),
|
|
3619
|
-
setCellRange: (t) => e((e) =>
|
|
3649
|
+
setCellRange: (t) => e((e) => hi(e.cellRange?.anchor ?? null, t?.anchor ?? null) && hi(e.cellRange?.focus ?? null, t?.focus ?? null) ? e : {
|
|
3620
3650
|
...e,
|
|
3621
3651
|
cellRange: t
|
|
3622
3652
|
})
|
|
@@ -3642,7 +3672,7 @@ function va({ persist: e, labels: t, enableColumnOrdering: r, enablePagination:
|
|
|
3642
3672
|
Pe.current = () => {
|
|
3643
3673
|
let e = w.initialState, t = [...e?.grouping ?? []];
|
|
3644
3674
|
Oe.setGrouping(t), Oe.setColumnVisibility({
|
|
3645
|
-
...
|
|
3675
|
+
...va({ ...e?.columnVisibility }),
|
|
3646
3676
|
...U ? { [ln]: t.length > 0 } : {}
|
|
3647
3677
|
}), Oe.setColumnSizing({ ...e?.columnSizing }), Oe.setColumnOrder([...e?.columnOrder ?? []]), Oe.setColumnPinning(se(e?.columnPinning));
|
|
3648
3678
|
};
|
|
@@ -3663,7 +3693,7 @@ function va({ persist: e, labels: t, enableColumnOrdering: r, enablePagination:
|
|
|
3663
3693
|
scrollerRef: Ie
|
|
3664
3694
|
};
|
|
3665
3695
|
}
|
|
3666
|
-
function
|
|
3696
|
+
function xa(e, t) {
|
|
3667
3697
|
let n = e.table.getColumn(t);
|
|
3668
3698
|
if (n === void 0 || n.getFilterValue() !== void 0) return;
|
|
3669
3699
|
let r = Fn(n);
|
|
@@ -3672,8 +3702,8 @@ function ya(e, t) {
|
|
|
3672
3702
|
value: yt(r)
|
|
3673
3703
|
});
|
|
3674
3704
|
}
|
|
3675
|
-
function
|
|
3676
|
-
if (
|
|
3705
|
+
function Sa(e, t) {
|
|
3706
|
+
if (xa(e, t), e.filters.inHeader) {
|
|
3677
3707
|
e.ui.actions.focusHeaderFilter(t);
|
|
3678
3708
|
return;
|
|
3679
3709
|
}
|
|
@@ -3681,14 +3711,14 @@ function ba(e, t) {
|
|
|
3681
3711
|
}
|
|
3682
3712
|
//#endregion
|
|
3683
3713
|
//#region src/components/TMDataGridFilterPills.tsx
|
|
3684
|
-
function
|
|
3714
|
+
function Ca(t) {
|
|
3685
3715
|
let n = e(53), r, i, a, o, s, c;
|
|
3686
3716
|
n[0] === t ? (r = n[1], i = n[2], a = n[3], o = n[4], s = n[5], c = n[6]) : ({api: r, size: s, showClearAll: c, onPillClick: a, className: i, ...o} = t, n[0] = t, n[1] = r, n[2] = i, n[3] = a, n[4] = o, n[5] = s, n[6] = c);
|
|
3687
|
-
let l = s === void 0 ? "sm" : s, u = c === void 0 || c, { table: p, labels: m } = r, h = M(p.store,
|
|
3717
|
+
let l = s === void 0 ? "sm" : s, u = c === void 0 || c, { table: p, labels: m } = r, h = M(p.store, Ta), g, _, v, y, b, S, C, w, T, E, D;
|
|
3688
3718
|
if (n[7] !== r || n[8] !== i || n[9] !== h || n[10] !== m || n[11] !== a || n[12] !== o || n[13] !== l || n[14] !== p) {
|
|
3689
3719
|
y = Symbol.for("react.early_return_sentinel");
|
|
3690
3720
|
bb0: {
|
|
3691
|
-
if (v = h.filter(
|
|
3721
|
+
if (v = h.filter(wa), v.length === 0) {
|
|
3692
3722
|
y = null;
|
|
3693
3723
|
break bb0;
|
|
3694
3724
|
}
|
|
@@ -3718,7 +3748,7 @@ function xa(t) {
|
|
|
3718
3748
|
},
|
|
3719
3749
|
children: /* @__PURE__ */ J(A, {
|
|
3720
3750
|
className: Dr.pillLabel,
|
|
3721
|
-
onClick: () => a ? a(e.id) :
|
|
3751
|
+
onClick: () => a ? a(e.id) : Sa(r, e.id),
|
|
3722
3752
|
children: wt({
|
|
3723
3753
|
label: n,
|
|
3724
3754
|
type: t ? Nn(t) : "string",
|
|
@@ -3755,25 +3785,25 @@ function xa(t) {
|
|
|
3755
3785
|
children: [O, k]
|
|
3756
3786
|
}), n[44] = _, n[45] = O, n[46] = k, n[47] = C, n[48] = w, n[49] = T, n[50] = E, n[51] = D, n[52] = j) : j = n[52], j;
|
|
3757
3787
|
}
|
|
3758
|
-
function
|
|
3788
|
+
function wa(e) {
|
|
3759
3789
|
return St(e.value);
|
|
3760
3790
|
}
|
|
3761
|
-
function
|
|
3791
|
+
function Ta(e) {
|
|
3762
3792
|
return e.columnFilters;
|
|
3763
3793
|
}
|
|
3764
|
-
var
|
|
3765
|
-
function
|
|
3794
|
+
var Ea = { footer: "_footer_te0a3_1" }, Da = "columnResizing";
|
|
3795
|
+
function Oa(t) {
|
|
3766
3796
|
let n = e(1), r;
|
|
3767
|
-
n[0] === Symbol.for("react.memo_cache_sentinel") ? (r = { compare: ge }, n[0] = r) : r = n[0], M(t,
|
|
3797
|
+
n[0] === Symbol.for("react.memo_cache_sentinel") ? (r = { compare: ge }, n[0] = r) : r = n[0], M(t, ka, r);
|
|
3768
3798
|
}
|
|
3769
|
-
function
|
|
3799
|
+
function ka(e) {
|
|
3770
3800
|
let t = {};
|
|
3771
|
-
for (let [n, r] of Object.entries(e)) n !==
|
|
3801
|
+
for (let [n, r] of Object.entries(e)) n !== Da && (t[n] = r);
|
|
3772
3802
|
return t;
|
|
3773
3803
|
}
|
|
3774
3804
|
//#endregion
|
|
3775
3805
|
//#region src/core/pagination.ts
|
|
3776
|
-
function
|
|
3806
|
+
function Aa(e, t = !0) {
|
|
3777
3807
|
let { pageIndex: n, pageSize: r } = e.store.state.pagination, i = e.getRowCount();
|
|
3778
3808
|
return {
|
|
3779
3809
|
state: {
|
|
@@ -3799,13 +3829,13 @@ function Oa(e, t = !0) {
|
|
|
3799
3829
|
}
|
|
3800
3830
|
//#endregion
|
|
3801
3831
|
//#region src/components/TMDataGridFooter.tsx
|
|
3802
|
-
function
|
|
3832
|
+
function ja(t) {
|
|
3803
3833
|
let n = e(23), { pageSizeOptions: r } = t, { table: i, features: a, labels: o, controlSize: s } = $();
|
|
3804
|
-
|
|
3834
|
+
Oa(i.store);
|
|
3805
3835
|
let c;
|
|
3806
3836
|
n[0] !== a || n[1] !== i ? (c = wn(i, a), n[0] = a, n[1] = i, n[2] = c) : c = n[2];
|
|
3807
3837
|
let l = c, { pageSize: u } = i.store.state.pagination, d;
|
|
3808
|
-
n[3] !== u || n[4] !== r ? (d = r.includes(u) ? r : [...r, u].sort(
|
|
3838
|
+
n[3] !== u || n[4] !== r ? (d = r.includes(u) ? r : [...r, u].sort(Ma), n[3] = u, n[4] = r, n[5] = d) : d = n[5];
|
|
3809
3839
|
let f = d, p;
|
|
3810
3840
|
n[6] !== s || n[7] !== o.rowsPerPage ? (p = /* @__PURE__ */ J(D, {
|
|
3811
3841
|
span: !0,
|
|
@@ -3838,12 +3868,12 @@ function ka(t) {
|
|
|
3838
3868
|
children: [p, y]
|
|
3839
3869
|
}), n[20] = p, n[21] = y, n[22] = b) : b = n[22], b;
|
|
3840
3870
|
}
|
|
3841
|
-
function
|
|
3871
|
+
function Ma(e, t) {
|
|
3842
3872
|
return e - t;
|
|
3843
3873
|
}
|
|
3844
|
-
function
|
|
3874
|
+
function Na() {
|
|
3845
3875
|
let t = e(22), { table: n, features: r, labels: i, controlSize: a } = $();
|
|
3846
|
-
|
|
3876
|
+
Oa(n.store);
|
|
3847
3877
|
let o;
|
|
3848
3878
|
t[0] !== r || t[1] !== n ? (o = wn(n, r), t[0] = r, t[1] = n, t[2] = o) : o = t[2];
|
|
3849
3879
|
let s = o, { pageIndex: c, pageSize: l } = n.store.state.pagination, u, d, f, p, m, h;
|
|
@@ -3864,9 +3894,9 @@ function ja() {
|
|
|
3864
3894
|
children: h
|
|
3865
3895
|
}), t[15] = u, t[16] = d, t[17] = f, t[18] = p, t[19] = m, t[20] = h, t[21] = g) : g = t[21], g;
|
|
3866
3896
|
}
|
|
3867
|
-
function
|
|
3897
|
+
function Pa() {
|
|
3868
3898
|
let t = e(11), { table: n, features: r, labels: i, controlSize: a } = $();
|
|
3869
|
-
|
|
3899
|
+
Oa(n.store);
|
|
3870
3900
|
let o;
|
|
3871
3901
|
t[0] !== r || t[1] !== n ? (o = wn(n, r), t[0] = r, t[1] = n, t[2] = o) : o = t[2];
|
|
3872
3902
|
let s = o, { pageIndex: c } = n.store.state.pagination, l;
|
|
@@ -3883,9 +3913,9 @@ function Ma() {
|
|
|
3883
3913
|
children: l
|
|
3884
3914
|
}), t[8] = a, t[9] = l, t[10] = u) : u = t[10], u;
|
|
3885
3915
|
}
|
|
3886
|
-
function
|
|
3916
|
+
function Fa() {
|
|
3887
3917
|
let t = e(26), { table: n, features: r, labels: i } = $();
|
|
3888
|
-
|
|
3918
|
+
Oa(n.store);
|
|
3889
3919
|
let a;
|
|
3890
3920
|
t[0] !== r || t[1] !== n ? (a = wn(n, r), t[0] = r, t[1] = n, t[2] = a) : a = t[2];
|
|
3891
3921
|
let o = a, s;
|
|
@@ -3933,33 +3963,33 @@ function Na() {
|
|
|
3933
3963
|
children: [d, g]
|
|
3934
3964
|
}), t[23] = d, t[24] = g, t[25] = _) : _ = t[25], _;
|
|
3935
3965
|
}
|
|
3936
|
-
var
|
|
3966
|
+
var Ia = [
|
|
3937
3967
|
10,
|
|
3938
3968
|
25,
|
|
3939
3969
|
50,
|
|
3940
3970
|
100
|
|
3941
3971
|
];
|
|
3942
|
-
function
|
|
3972
|
+
function La(t) {
|
|
3943
3973
|
let n = e(34), r, i, a, o;
|
|
3944
3974
|
n[0] === t ? (r = n[1], i = n[2], a = n[3], o = n[4]) : ({pageSizeOptions: o, renderPagination: a, className: r, ...i} = t, n[0] = t, n[1] = r, n[2] = i, n[3] = a, n[4] = o);
|
|
3945
|
-
let s = o === void 0 ?
|
|
3946
|
-
n[5] === r ? c = n[6] : (c = [
|
|
3975
|
+
let s = o === void 0 ? Ia : o, c;
|
|
3976
|
+
n[5] === r ? c = n[6] : (c = [Ea.footer, r].filter(Boolean), n[5] = r, n[6] = c);
|
|
3947
3977
|
let l = c.join(" "), { table: u, features: f, labels: p } = $();
|
|
3948
|
-
|
|
3978
|
+
Oa(u.store);
|
|
3949
3979
|
let m;
|
|
3950
3980
|
n[7] === s ? m = n[8] : (m = {
|
|
3951
|
-
PageSize: () => /* @__PURE__ */ J(
|
|
3952
|
-
Range:
|
|
3953
|
-
PageNumber:
|
|
3954
|
-
Pager:
|
|
3981
|
+
PageSize: () => /* @__PURE__ */ J(ja, { pageSizeOptions: s }),
|
|
3982
|
+
Range: Na,
|
|
3983
|
+
PageNumber: Pa,
|
|
3984
|
+
Pager: Fa
|
|
3955
3985
|
}, n[7] = s, n[8] = m);
|
|
3956
3986
|
let h = m;
|
|
3957
|
-
if (!
|
|
3987
|
+
if (!di(u, f).canPaginate) return null;
|
|
3958
3988
|
let g, _;
|
|
3959
3989
|
if (n[9] !== h || n[10] !== f || n[11] !== l || n[12] !== i || n[13] !== a || n[14] !== u) {
|
|
3960
3990
|
_ = Symbol.for("react.early_return_sentinel");
|
|
3961
3991
|
bb0: if (g = wn(u, f), a) {
|
|
3962
|
-
let { state: e, actions: t } =
|
|
3992
|
+
let { state: e, actions: t } = Aa(u, g);
|
|
3963
3993
|
_ = /* @__PURE__ */ J(d, {
|
|
3964
3994
|
"data-dg-part": "footer",
|
|
3965
3995
|
className: l,
|
|
@@ -4006,17 +4036,17 @@ function Fa(t) {
|
|
|
4006
4036
|
}
|
|
4007
4037
|
//#endregion
|
|
4008
4038
|
//#region src/useTMDataGridExport.ts
|
|
4009
|
-
function
|
|
4039
|
+
function Ra(t) {
|
|
4010
4040
|
let n = e(14), { table: r, features: i, exportOptions: a } = $(), o;
|
|
4011
|
-
n[0] === r ? o = n[1] : (o = () =>
|
|
4041
|
+
n[0] === r ? o = n[1] : (o = () => ea(r), n[0] = r, n[1] = o);
|
|
4012
4042
|
let s = M(r.store, o), c;
|
|
4013
4043
|
n[2] !== a || n[3] !== t || n[4] !== r ? (c = async (e, n) => {
|
|
4014
|
-
let i =
|
|
4044
|
+
let i = Ji(a, t, n), o = na({
|
|
4015
4045
|
table: r,
|
|
4016
4046
|
rows: e,
|
|
4017
4047
|
columns: i.columns
|
|
4018
4048
|
});
|
|
4019
|
-
o.columnIds.length !== 0 && (e === "selected" && o.rows.length === 0 || await
|
|
4049
|
+
o.columnIds.length !== 0 && (e === "selected" && o.rows.length === 0 || await ra(o, i));
|
|
4020
4050
|
}, n[2] = a, n[3] = t, n[4] = r, n[5] = c) : c = n[5];
|
|
4021
4051
|
let l = c, u, d;
|
|
4022
4052
|
n[6] === l ? (u = n[7], d = n[8]) : (u = (e) => l("all", e), d = (e) => l("selected", e), n[6] = l, n[7] = u, n[8] = d);
|
|
@@ -4030,11 +4060,11 @@ function Ia(t) {
|
|
|
4030
4060
|
}
|
|
4031
4061
|
//#endregion
|
|
4032
4062
|
//#region src/components/TMDataGridMenu.tsx
|
|
4033
|
-
var
|
|
4063
|
+
var za = (e) => /* @__PURE__ */ J("button", {
|
|
4034
4064
|
...e,
|
|
4035
4065
|
role: "menuitemcheckbox"
|
|
4036
4066
|
});
|
|
4037
|
-
function
|
|
4067
|
+
function Ba(t) {
|
|
4038
4068
|
let n = e(20), r, i, a, o;
|
|
4039
4069
|
n[0] === t ? (r = n[1], i = n[2], a = n[3], o = n[4]) : ({children: r, icon: i, label: a, ...o} = t, n[0] = t, n[1] = r, n[2] = i, n[3] = a, n[4] = o);
|
|
4040
4070
|
let { labels: s, controlSize: c } = $(), u = a ?? s.menuButton, d;
|
|
@@ -4069,12 +4099,12 @@ function Ra(t) {
|
|
|
4069
4099
|
children: [p, m]
|
|
4070
4100
|
}), n[16] = o, n[17] = p, n[18] = m, n[19] = h) : h = n[19], h;
|
|
4071
4101
|
}
|
|
4072
|
-
function
|
|
4102
|
+
function Va(t) {
|
|
4073
4103
|
let n = e(16), { searchable: r } = t, i = r === void 0 ? "auto" : r, { labels: a, controlSize: o } = $(), { columns: s } = Wn(), [l, u] = c("");
|
|
4074
4104
|
if (s.length === 0) return null;
|
|
4075
4105
|
let d;
|
|
4076
4106
|
n[0] !== s.length || n[1] !== i ? (d = Un(i, s.length), n[0] = s.length, n[1] = i, n[2] = d) : d = n[2];
|
|
4077
|
-
let f = d, p =
|
|
4107
|
+
let f = d, p = Ha, m;
|
|
4078
4108
|
n[3] !== o || n[4] !== a || n[5] !== l || n[6] !== f ? (m = f && /* @__PURE__ */ J(_.Search, {
|
|
4079
4109
|
value: l,
|
|
4080
4110
|
onChange: (e) => u(e.currentTarget.value),
|
|
@@ -4084,9 +4114,9 @@ function za(t) {
|
|
|
4084
4114
|
"data-dg-part": "columns-search"
|
|
4085
4115
|
}), n[3] = o, n[4] = a, n[5] = l, n[6] = f, n[7] = m) : m = n[7];
|
|
4086
4116
|
let h;
|
|
4087
|
-
n[8] === l ? h = n[9] : (h = /* @__PURE__ */ J(
|
|
4117
|
+
n[8] === l ? h = n[9] : (h = /* @__PURE__ */ J(Ua, { search: l }), n[8] = l, n[9] = h);
|
|
4088
4118
|
let g, v, y;
|
|
4089
|
-
n[10] === Symbol.for("react.memo_cache_sentinel") ? (g = /* @__PURE__ */ J(_.Divider, {}), v = /* @__PURE__ */ J(
|
|
4119
|
+
n[10] === Symbol.for("react.memo_cache_sentinel") ? (g = /* @__PURE__ */ J(_.Divider, {}), v = /* @__PURE__ */ J(Wa, {}), y = /* @__PURE__ */ J(Ga, {}), n[10] = g, n[11] = v, n[12] = y) : (g = n[10], v = n[11], y = n[12]);
|
|
4090
4120
|
let b;
|
|
4091
4121
|
return n[13] !== m || n[14] !== h ? (b = /* @__PURE__ */ Y(fe, { children: [
|
|
4092
4122
|
m,
|
|
@@ -4096,12 +4126,12 @@ function za(t) {
|
|
|
4096
4126
|
y
|
|
4097
4127
|
] }), n[13] = m, n[14] = h, n[15] = b) : b = n[15], b;
|
|
4098
4128
|
}
|
|
4099
|
-
function
|
|
4129
|
+
function Ha(e) {
|
|
4100
4130
|
if (e.key !== "ArrowDown") return;
|
|
4101
4131
|
let t = e.currentTarget.closest("[role=\"menu\"]"), n = t?.querySelector("[role^=\"menuitem\"]"), r = t?.querySelector("[data-dg-part=\"columns-toggle\"]");
|
|
4102
4132
|
!n || !r || n === r || (e.preventDefault(), r.focus());
|
|
4103
4133
|
}
|
|
4104
|
-
function
|
|
4134
|
+
function Ua(t) {
|
|
4105
4135
|
let n = e(11), { search: r } = t, { labels: i, controlSize: a } = $(), { columns: o, columnVisibility: s } = Wn();
|
|
4106
4136
|
if (o.length === 0) return null;
|
|
4107
4137
|
let c = r ?? "", l;
|
|
@@ -4113,7 +4143,7 @@ function Va(t) {
|
|
|
4113
4143
|
n[3] !== s || n[4] !== a || n[5] !== i || n[6] !== u || n[7] !== r ? (d = u.length === 0 ? /* @__PURE__ */ J(_.Label, { children: i.columnsNoMatch(r ?? "") }) : u.map((e) => {
|
|
4114
4144
|
let t = s[e.id] !== !1;
|
|
4115
4145
|
return /* @__PURE__ */ J(_.Item, {
|
|
4116
|
-
renderRoot:
|
|
4146
|
+
renderRoot: za,
|
|
4117
4147
|
"aria-checked": t,
|
|
4118
4148
|
closeMenuOnClick: !1,
|
|
4119
4149
|
leftSection: /* @__PURE__ */ J(p.Indicator, {
|
|
@@ -4133,7 +4163,7 @@ function Va(t) {
|
|
|
4133
4163
|
children: d
|
|
4134
4164
|
}), n[9] = d, n[10] = f), f;
|
|
4135
4165
|
}
|
|
4136
|
-
function
|
|
4166
|
+
function Wa() {
|
|
4137
4167
|
let t = e(12), { labels: n, controlSize: r } = $(), { columns: i, shownCount: a, setAllVisible: o } = Wn();
|
|
4138
4168
|
if (i.length === 0) return null;
|
|
4139
4169
|
let s = a === i.length, c = a > 0 && !s, l = c ? "mixed" : s, u;
|
|
@@ -4146,7 +4176,7 @@ function Ha() {
|
|
|
4146
4176
|
t[4] !== s || t[5] !== o ? (d = () => o(!s), t[4] = s, t[5] = o, t[6] = d) : d = t[6];
|
|
4147
4177
|
let f;
|
|
4148
4178
|
return t[7] !== n.columnsShowHideAll || t[8] !== l || t[9] !== u || t[10] !== d ? (f = /* @__PURE__ */ J(_.Item, {
|
|
4149
|
-
renderRoot:
|
|
4179
|
+
renderRoot: za,
|
|
4150
4180
|
"aria-checked": l,
|
|
4151
4181
|
closeMenuOnClick: !1,
|
|
4152
4182
|
leftSection: u,
|
|
@@ -4155,7 +4185,7 @@ function Ha() {
|
|
|
4155
4185
|
children: n.columnsShowHideAll
|
|
4156
4186
|
}), t[7] = n.columnsShowHideAll, t[8] = l, t[9] = u, t[10] = d, t[11] = f) : f = t[11], f;
|
|
4157
4187
|
}
|
|
4158
|
-
function
|
|
4188
|
+
function Ga() {
|
|
4159
4189
|
let t = e(6), { labels: n, resetSettings: r } = $(), i;
|
|
4160
4190
|
t[0] === Symbol.for("react.memo_cache_sentinel") ? (i = /* @__PURE__ */ J(P, {
|
|
4161
4191
|
size: 16,
|
|
@@ -4171,7 +4201,7 @@ function Ua() {
|
|
|
4171
4201
|
children: n.columnsReset
|
|
4172
4202
|
}), t[3] = n.columnsReset, t[4] = a, t[5] = o) : o = t[5], o;
|
|
4173
4203
|
}
|
|
4174
|
-
function
|
|
4204
|
+
function Ka({ label: e, columns: t, ...n }) {
|
|
4175
4205
|
let r = t === "custom";
|
|
4176
4206
|
return {
|
|
4177
4207
|
label: e,
|
|
@@ -4182,10 +4212,10 @@ function Wa({ label: e, columns: t, ...n }) {
|
|
|
4182
4212
|
}
|
|
4183
4213
|
};
|
|
4184
4214
|
}
|
|
4185
|
-
function
|
|
4215
|
+
function qa(t) {
|
|
4186
4216
|
let n = e(11), r;
|
|
4187
|
-
n[0] === t ? r = n[1] : (r =
|
|
4188
|
-
let { label: i, custom: a, options: o } = r, { ui: s, labels: c } = $(), { exportAll: l } =
|
|
4217
|
+
n[0] === t ? r = n[1] : (r = Ka(t), n[0] = t, n[1] = r);
|
|
4218
|
+
let { label: i, custom: a, options: o } = r, { ui: s, labels: c } = $(), { exportAll: l } = Ra(o), u;
|
|
4189
4219
|
n[2] === Symbol.for("react.memo_cache_sentinel") ? (u = /* @__PURE__ */ J(G, {
|
|
4190
4220
|
size: 16,
|
|
4191
4221
|
stroke: 1.6
|
|
@@ -4205,10 +4235,10 @@ function Ga(t) {
|
|
|
4205
4235
|
children: f
|
|
4206
4236
|
}), n[8] = d, n[9] = f, n[10] = p) : p = n[10], p;
|
|
4207
4237
|
}
|
|
4208
|
-
function
|
|
4238
|
+
function Ja(t) {
|
|
4209
4239
|
let n = e(16), r;
|
|
4210
|
-
n[0] === t ? r = n[1] : (r =
|
|
4211
|
-
let { label: i, custom: a, options: o } = r, { ui: s, labels: c } = $(), { exportSelected: l, selectedCount: u, canExportSelected: d } =
|
|
4240
|
+
n[0] === t ? r = n[1] : (r = Ka(t), n[0] = t, n[1] = r);
|
|
4241
|
+
let { label: i, custom: a, options: o } = r, { ui: s, labels: c } = $(), { exportSelected: l, selectedCount: u, canExportSelected: d } = Ra(o);
|
|
4212
4242
|
if (!d) return null;
|
|
4213
4243
|
let f;
|
|
4214
4244
|
n[2] === Symbol.for("react.memo_cache_sentinel") ? (f = /* @__PURE__ */ J(G, {
|
|
@@ -4233,23 +4263,23 @@ function Ka(t) {
|
|
|
4233
4263
|
children: h
|
|
4234
4264
|
}), n[12] = p, n[13] = m, n[14] = h, n[15] = g) : g = n[15], g;
|
|
4235
4265
|
}
|
|
4236
|
-
var
|
|
4237
|
-
Columns:
|
|
4238
|
-
ColumnToggles:
|
|
4239
|
-
ShowHideAll:
|
|
4240
|
-
ResetLayout:
|
|
4241
|
-
Export:
|
|
4242
|
-
ExportSelected:
|
|
4266
|
+
var Ya = Object.assign(Ba, {
|
|
4267
|
+
Columns: Va,
|
|
4268
|
+
ColumnToggles: Ua,
|
|
4269
|
+
ShowHideAll: Wa,
|
|
4270
|
+
ResetLayout: Ga,
|
|
4271
|
+
Export: qa,
|
|
4272
|
+
ExportSelected: Ja
|
|
4243
4273
|
});
|
|
4244
4274
|
//#endregion
|
|
4245
4275
|
//#region src/components/TMDataGridSearch.tsx
|
|
4246
|
-
function
|
|
4247
|
-
let n = e(25), { placeholder: r, debounce: a, w: o } = t, u = a === void 0 ? 250 : a, d = o === void 0 ? 220 : o, { table: f, features: p, labels: m, controlSize: h } = $(), g = M(f.store,
|
|
4276
|
+
function Xa(t) {
|
|
4277
|
+
let n = e(25), { placeholder: r, debounce: a, w: o } = t, u = a === void 0 ? 250 : a, d = o === void 0 ? 220 : o, { table: f, features: p, labels: m, controlSize: h } = $(), g = M(f.store, Za), [_, v] = c(g), y = s(void 0), b = s(g), x, S;
|
|
4248
4278
|
n[0] === g ? (x = n[1], S = n[2]) : (x = () => {
|
|
4249
4279
|
g !== b.current && (b.current = g, v(g));
|
|
4250
4280
|
}, S = [g], n[0] = g, n[1] = x, n[2] = S), i(x, S);
|
|
4251
4281
|
let C, w;
|
|
4252
|
-
if (n[3] === Symbol.for("react.memo_cache_sentinel") ? (C = () => () => clearTimeout(y.current), w = [], n[3] = C, n[4] = w) : (C = n[3], w = n[4]), i(C, w), !
|
|
4282
|
+
if (n[3] === Symbol.for("react.memo_cache_sentinel") ? (C = () => () => clearTimeout(y.current), w = [], n[3] = C, n[4] = w) : (C = n[3], w = n[4]), i(C, w), !di(f, p).canSearch) return null;
|
|
4253
4283
|
let T;
|
|
4254
4284
|
n[5] === f ? T = n[6] : (T = (e) => {
|
|
4255
4285
|
b.current = e, f.setGlobalFilter(e === "" ? void 0 : e);
|
|
@@ -4297,17 +4327,17 @@ function Ja(t) {
|
|
|
4297
4327
|
rightSection: P
|
|
4298
4328
|
}), n[17] = h, n[18] = _, n[19] = m.searchLabel, n[20] = j, n[21] = P, n[22] = A, n[23] = d, n[24] = F) : F = n[24], F;
|
|
4299
4329
|
}
|
|
4300
|
-
function
|
|
4330
|
+
function Za(e) {
|
|
4301
4331
|
return typeof e.globalFilter == "string" ? e.globalFilter : "";
|
|
4302
4332
|
}
|
|
4303
|
-
var
|
|
4333
|
+
var Qa = {
|
|
4304
4334
|
stickyLeft: "_stickyLeft_1jwnm_16",
|
|
4305
4335
|
stickyRight: "_stickyRight_1jwnm_17",
|
|
4306
4336
|
stickyEdgeIn: "_stickyEdgeIn_1jwnm_1",
|
|
4307
4337
|
stickyEdgeOut: "_stickyEdgeOut_1jwnm_1",
|
|
4308
4338
|
headerBoundary: "_headerBoundary_1jwnm_120",
|
|
4309
4339
|
dgHeaderShadow: "_dgHeaderShadow_1jwnm_1"
|
|
4310
|
-
},
|
|
4340
|
+
}, $a = {
|
|
4311
4341
|
surfaceHeader: "_surfaceHeader_10bcx_5",
|
|
4312
4342
|
filterPopup: "_filterPopup_10bcx_18",
|
|
4313
4343
|
filterSidebar: "_filterSidebar_10bcx_33",
|
|
@@ -4315,7 +4345,7 @@ var Xa = {
|
|
|
4315
4345
|
};
|
|
4316
4346
|
//#endregion
|
|
4317
4347
|
//#region src/components/TMDataGridFilterSurface.tsx
|
|
4318
|
-
function
|
|
4348
|
+
function eo() {
|
|
4319
4349
|
let t = e(10), { ui: n, labels: r, controlSize: i } = $(), a;
|
|
4320
4350
|
t[0] !== i || t[1] !== r.filters ? (a = /* @__PURE__ */ J(D, {
|
|
4321
4351
|
span: !0,
|
|
@@ -4340,12 +4370,12 @@ function Qa() {
|
|
|
4340
4370
|
}), t[4] = r.closeFilters, t[5] = n.actions.closeFilterPanel, t[6] = s) : s = t[6];
|
|
4341
4371
|
let c;
|
|
4342
4372
|
return t[7] !== a || t[8] !== s ? (c = /* @__PURE__ */ Y("div", {
|
|
4343
|
-
className:
|
|
4373
|
+
className: $a.surfaceHeader,
|
|
4344
4374
|
children: [a, s]
|
|
4345
4375
|
}), t[7] = a, t[8] = s, t[9] = c) : c = t[9], c;
|
|
4346
4376
|
}
|
|
4347
|
-
function
|
|
4348
|
-
let n = e(5), { table: r, ui: a } = $(), o = M(r.store,
|
|
4377
|
+
function to(t) {
|
|
4378
|
+
let n = e(5), { table: r, ui: a } = $(), o = M(r.store, no), c = s(o), l, u;
|
|
4349
4379
|
n[0] !== o || n[1] !== t || n[2] !== a ? (l = () => {
|
|
4350
4380
|
let e = c.current > 0 && o === 0;
|
|
4351
4381
|
c.current = o, t && e && a.actions.closeFilterPanel();
|
|
@@ -4355,12 +4385,12 @@ function $a(t) {
|
|
|
4355
4385
|
a
|
|
4356
4386
|
], n[0] = o, n[1] = t, n[2] = a, n[3] = l, n[4] = u) : (l = n[3], u = n[4]), i(l, u);
|
|
4357
4387
|
}
|
|
4358
|
-
function
|
|
4388
|
+
function no(e) {
|
|
4359
4389
|
return e.columnFilters.length;
|
|
4360
4390
|
}
|
|
4361
|
-
function
|
|
4362
|
-
let t = e(11), { ui: n, labels: r } = $(), a = M(n,
|
|
4363
|
-
|
|
4391
|
+
function ro() {
|
|
4392
|
+
let t = e(11), { ui: n, labels: r } = $(), a = M(n, io), o = s(null);
|
|
4393
|
+
to(a);
|
|
4364
4394
|
let c, l;
|
|
4365
4395
|
if (t[0] !== a || t[1] !== n ? (c = () => {
|
|
4366
4396
|
if (!a) return;
|
|
@@ -4375,23 +4405,23 @@ function to() {
|
|
|
4375
4405
|
e.key === "Escape" && (e.stopPropagation(), n.actions.closeFilterPanel());
|
|
4376
4406
|
}, t[4] = n, t[5] = u);
|
|
4377
4407
|
let d, f;
|
|
4378
|
-
t[6] === Symbol.for("react.memo_cache_sentinel") ? (d = /* @__PURE__ */ J(
|
|
4408
|
+
t[6] === Symbol.for("react.memo_cache_sentinel") ? (d = /* @__PURE__ */ J(eo, {}), f = /* @__PURE__ */ J(Sr, {}), t[6] = d, t[7] = f) : (d = t[6], f = t[7]);
|
|
4379
4409
|
let p;
|
|
4380
4410
|
return t[8] !== r.filters || t[9] !== u ? (p = /* @__PURE__ */ Y("div", {
|
|
4381
4411
|
ref: o,
|
|
4382
4412
|
"data-dg-part": "filter-popup",
|
|
4383
|
-
className:
|
|
4413
|
+
className: $a.filterPopup,
|
|
4384
4414
|
"aria-label": r.filters,
|
|
4385
4415
|
onKeyDown: u,
|
|
4386
4416
|
children: [d, f]
|
|
4387
4417
|
}), t[8] = r.filters, t[9] = u, t[10] = p) : p = t[10], p;
|
|
4388
4418
|
}
|
|
4389
|
-
function
|
|
4419
|
+
function io(e) {
|
|
4390
4420
|
return e.filterPanelOpen;
|
|
4391
4421
|
}
|
|
4392
|
-
function
|
|
4422
|
+
function ao() {
|
|
4393
4423
|
let t = e(11), { ui: n, filters: r, labels: i } = $();
|
|
4394
|
-
if (!M(n,
|
|
4424
|
+
if (!M(n, oo)) return null;
|
|
4395
4425
|
let a;
|
|
4396
4426
|
t[0] === r.sidebarWidth ? a = t[1] : (a = { width: r.sidebarWidth }, t[0] = r.sidebarWidth, t[1] = a);
|
|
4397
4427
|
let o;
|
|
@@ -4399,28 +4429,28 @@ function ro() {
|
|
|
4399
4429
|
e.key === "Escape" && (e.stopPropagation(), n.actions.closeFilterPanel());
|
|
4400
4430
|
}, t[2] = n, t[3] = o);
|
|
4401
4431
|
let s;
|
|
4402
|
-
t[4] === Symbol.for("react.memo_cache_sentinel") ? (s = /* @__PURE__ */ J(
|
|
4432
|
+
t[4] === Symbol.for("react.memo_cache_sentinel") ? (s = /* @__PURE__ */ J(eo, {}), t[4] = s) : s = t[4];
|
|
4403
4433
|
let c;
|
|
4404
4434
|
t[5] === Symbol.for("react.memo_cache_sentinel") ? (c = /* @__PURE__ */ J(C, {
|
|
4405
4435
|
type: "auto",
|
|
4406
|
-
className:
|
|
4436
|
+
className: $a.filterSidebarBody,
|
|
4407
4437
|
children: /* @__PURE__ */ J(Sr, { layout: "stacked" })
|
|
4408
4438
|
}), t[5] = c) : c = t[5];
|
|
4409
4439
|
let l;
|
|
4410
4440
|
return t[6] !== r.sidebarSide || t[7] !== i.filters || t[8] !== a || t[9] !== o ? (l = /* @__PURE__ */ Y("div", {
|
|
4411
4441
|
"data-dg-part": "filter-sidebar",
|
|
4412
4442
|
"data-side": r.sidebarSide,
|
|
4413
|
-
className:
|
|
4443
|
+
className: $a.filterSidebar,
|
|
4414
4444
|
style: a,
|
|
4415
4445
|
"aria-label": i.filters,
|
|
4416
4446
|
onKeyDown: o,
|
|
4417
4447
|
children: [s, c]
|
|
4418
4448
|
}), t[6] = r.sidebarSide, t[7] = i.filters, t[8] = a, t[9] = o, t[10] = l) : l = t[10], l;
|
|
4419
4449
|
}
|
|
4420
|
-
function
|
|
4450
|
+
function oo(e) {
|
|
4421
4451
|
return e.filterPanelOpen;
|
|
4422
4452
|
}
|
|
4423
|
-
var
|
|
4453
|
+
var so = {
|
|
4424
4454
|
headerFilterRow: "_headerFilterRow_h1geg_9",
|
|
4425
4455
|
headerFilterCell: "_headerFilterCell_h1geg_18",
|
|
4426
4456
|
headerFilterValue: "_headerFilterValue_h1geg_39",
|
|
@@ -4429,13 +4459,13 @@ var ao = {
|
|
|
4429
4459
|
};
|
|
4430
4460
|
//#endregion
|
|
4431
4461
|
//#region src/components/TMDataGridHeaderFilterRow.tsx
|
|
4432
|
-
function
|
|
4462
|
+
function co(e) {
|
|
4433
4463
|
return Array.isArray(e) ? e.every((e) => e === "") : e === "";
|
|
4434
4464
|
}
|
|
4435
|
-
function
|
|
4465
|
+
function lo({ column: e }) {
|
|
4436
4466
|
let { table: t, labels: n, controlSize: r } = $(), i = M(t.store, (t) => t.columnFilters.find((t) => t.id === e.id)?.value), a = Fn(e), s = bt(i) ? i : void 0, c = s?.operator ?? a, l = s?.value ?? yt(c), u = Mn(e);
|
|
4437
4467
|
function d(t) {
|
|
4438
|
-
let n = !
|
|
4468
|
+
let n = !co(t.value) || t.operator !== a;
|
|
4439
4469
|
e.setFilterValue(n ? t : void 0);
|
|
4440
4470
|
}
|
|
4441
4471
|
function f(e) {
|
|
@@ -4450,7 +4480,7 @@ function so({ column: e }) {
|
|
|
4450
4480
|
_r(e) ? e.getFacetedUniqueValues() : void 0
|
|
4451
4481
|
]), h = Pn(e);
|
|
4452
4482
|
return /* @__PURE__ */ Y(fe, { children: [/* @__PURE__ */ J("div", {
|
|
4453
|
-
className:
|
|
4483
|
+
className: so.headerFilterValue,
|
|
4454
4484
|
"data-dg-filter-value-slot": !0,
|
|
4455
4485
|
children: /* @__PURE__ */ J(m, {
|
|
4456
4486
|
column: e,
|
|
@@ -4466,7 +4496,7 @@ function so({ column: e }) {
|
|
|
4466
4496
|
labels: n,
|
|
4467
4497
|
layout: "header"
|
|
4468
4498
|
})
|
|
4469
|
-
}), /* @__PURE__ */ J(
|
|
4499
|
+
}), /* @__PURE__ */ J(uo, {
|
|
4470
4500
|
columnId: e.id,
|
|
4471
4501
|
columnLabel: u,
|
|
4472
4502
|
operator: c,
|
|
@@ -4475,7 +4505,7 @@ function so({ column: e }) {
|
|
|
4475
4505
|
onChange: f
|
|
4476
4506
|
})] });
|
|
4477
4507
|
}
|
|
4478
|
-
function
|
|
4508
|
+
function uo(t) {
|
|
4479
4509
|
let n = e(27), { columnId: r, columnLabel: i, operator: a, isDefault: o, operators: s, onChange: u } = t, { labels: d } = $(), [f, p] = c(!1), m = d.operators[a], h = o ? "gray" : void 0, g;
|
|
4480
4510
|
n[0] !== i || n[1] !== d ? (g = d.filterOperatorFor(i), n[0] = i, n[1] = d, n[2] = g) : g = n[2];
|
|
4481
4511
|
let v;
|
|
@@ -4485,7 +4515,7 @@ function co(t) {
|
|
|
4485
4515
|
}), n[3] = v) : v = n[3];
|
|
4486
4516
|
let y;
|
|
4487
4517
|
n[4] !== r || n[5] !== h || n[6] !== g ? (y = /* @__PURE__ */ J(l, {
|
|
4488
|
-
className:
|
|
4518
|
+
className: so.headerFilterOperator,
|
|
4489
4519
|
variant: "subtle",
|
|
4490
4520
|
color: h,
|
|
4491
4521
|
size: "sm",
|
|
@@ -4505,7 +4535,7 @@ function co(t) {
|
|
|
4505
4535
|
if (n[12] !== d.operators || n[13] !== u || n[14] !== a || n[15] !== s) {
|
|
4506
4536
|
let e;
|
|
4507
4537
|
n[17] !== d.operators || n[18] !== u || n[19] !== a ? (e = (e) => /* @__PURE__ */ J(_.Item, {
|
|
4508
|
-
className: e === a ?
|
|
4538
|
+
className: e === a ? so.operatorItemActive : void 0,
|
|
4509
4539
|
onClick: () => u(e),
|
|
4510
4540
|
children: d.operators[e]
|
|
4511
4541
|
}, e), n[17] = d.operators, n[18] = u, n[19] = a, n[20] = e) : e = n[20], x = s.map(e), n[12] = d.operators, n[13] = u, n[14] = a, n[15] = s, n[16] = x;
|
|
@@ -4523,8 +4553,8 @@ function co(t) {
|
|
|
4523
4553
|
children: [b, S]
|
|
4524
4554
|
}), n[23] = f, n[24] = b, n[25] = S, n[26] = C) : C = n[26], C;
|
|
4525
4555
|
}
|
|
4526
|
-
function
|
|
4527
|
-
let n = e(14), { leafHeaders: r, layoutFor: a, ariaRowIndex: o } = t, { ui: c, labels: l } = $(), u = M(c,
|
|
4556
|
+
function fo(t) {
|
|
4557
|
+
let n = e(14), { leafHeaders: r, layoutFor: a, ariaRowIndex: o } = t, { ui: c, labels: l } = $(), u = M(c, po), d = s(null), f, p;
|
|
4528
4558
|
n[0] !== u || n[1] !== c ? (f = () => {
|
|
4529
4559
|
if (u === null) return;
|
|
4530
4560
|
let e = d.current?.querySelector(`[data-dg-part="header-filter-cell"][data-column-id="${CSS.escape(u)}"]`);
|
|
@@ -4545,9 +4575,9 @@ function lo(t) {
|
|
|
4545
4575
|
"data-column-id": t.id,
|
|
4546
4576
|
"data-control-column": Bn(t.id) || void 0,
|
|
4547
4577
|
className: [
|
|
4548
|
-
|
|
4549
|
-
n.isBoundary && n.pinnedAt === "left" ?
|
|
4550
|
-
n.isBoundary && n.pinnedAt === "right" ?
|
|
4578
|
+
so.headerFilterCell,
|
|
4579
|
+
n.isBoundary && n.pinnedAt === "left" ? Qa.stickyLeft : "",
|
|
4580
|
+
n.isBoundary && n.pinnedAt === "right" ? Qa.stickyRight : ""
|
|
4551
4581
|
].filter(Boolean).join(" "),
|
|
4552
4582
|
style: {
|
|
4553
4583
|
left: n.pinnedAt === "left" ? n.offset : void 0,
|
|
@@ -4555,7 +4585,7 @@ function lo(t) {
|
|
|
4555
4585
|
position: n.pinnedAt ? "sticky" : void 0,
|
|
4556
4586
|
zIndex: n.pinnedAt ? "var(--dg-z-header-pinned-cell, 7)" : void 0
|
|
4557
4587
|
},
|
|
4558
|
-
children: t.getCanFilter() && /* @__PURE__ */ J(
|
|
4588
|
+
children: t.getCanFilter() && /* @__PURE__ */ J(lo, { column: t })
|
|
4559
4589
|
}, e.id);
|
|
4560
4590
|
}, n[8] = l, n[9] = a, n[10] = e) : e = n[10], m = r.map(e), n[4] = l, n[5] = a, n[6] = r, n[7] = m;
|
|
4561
4591
|
} else m = n[7];
|
|
@@ -4567,14 +4597,14 @@ function lo(t) {
|
|
|
4567
4597
|
"data-dg-header-row": !0,
|
|
4568
4598
|
"data-dg-header-filter-row": !0,
|
|
4569
4599
|
"data-dg-part": "header-filter-row",
|
|
4570
|
-
className: `${
|
|
4600
|
+
className: `${so.headerFilterRow} ${Qa.headerBoundary}`,
|
|
4571
4601
|
children: m
|
|
4572
4602
|
}), n[11] = o, n[12] = m, n[13] = h) : h = n[13], h;
|
|
4573
4603
|
}
|
|
4574
|
-
function
|
|
4604
|
+
function po(e) {
|
|
4575
4605
|
return e.headerFilterColumnId;
|
|
4576
4606
|
}
|
|
4577
|
-
var
|
|
4607
|
+
var mo = {
|
|
4578
4608
|
headerCell: "_headerCell_18ma1_1",
|
|
4579
4609
|
headerCellFiltered: "_headerCellFiltered_18ma1_35",
|
|
4580
4610
|
headerTitle: "_headerTitle_18ma1_35",
|
|
@@ -4590,39 +4620,39 @@ var fo = {
|
|
|
4590
4620
|
columnSeparatorResizable: "_columnSeparatorResizable_18ma1_162",
|
|
4591
4621
|
columnSeparatorActive: "_columnSeparatorActive_18ma1_185",
|
|
4592
4622
|
menuItemActive: "_menuItemActive_18ma1_191"
|
|
4593
|
-
},
|
|
4594
|
-
function
|
|
4623
|
+
}, ho = 30, go = 2;
|
|
4624
|
+
function _o(e) {
|
|
4595
4625
|
let t = e.ownerDocument.createRange();
|
|
4596
4626
|
t.selectNodeContents(e);
|
|
4597
4627
|
let n = typeof t.getBoundingClientRect == "function" ? t.getBoundingClientRect().width : 0;
|
|
4598
4628
|
return n > 0 ? n : e.scrollWidth;
|
|
4599
4629
|
}
|
|
4600
|
-
function
|
|
4630
|
+
function vo(e, t) {
|
|
4601
4631
|
let n = CSS.escape(t);
|
|
4602
4632
|
return e.querySelectorAll(`[role="cell"][data-column-id="${n}"],[role="gridcell"][data-column-id="${n}"]`);
|
|
4603
4633
|
}
|
|
4604
|
-
function
|
|
4605
|
-
return
|
|
4634
|
+
function yo(e, t) {
|
|
4635
|
+
return vo(e, t).length > 0;
|
|
4606
4636
|
}
|
|
4607
|
-
function
|
|
4637
|
+
function bo({ container: e, columnId: t }) {
|
|
4608
4638
|
let n = 0;
|
|
4609
|
-
for (let r of
|
|
4639
|
+
for (let r of vo(e, t)) {
|
|
4610
4640
|
let e = r.firstElementChild;
|
|
4611
4641
|
if (!yn(e)) continue;
|
|
4612
4642
|
let t = getComputedStyle(r), i = (Number.parseFloat(t.paddingLeft) || 0) + (Number.parseFloat(t.paddingRight) || 0);
|
|
4613
|
-
n = Math.max(n,
|
|
4643
|
+
n = Math.max(n, _o(e) + i + go);
|
|
4614
4644
|
}
|
|
4615
4645
|
let r = e.querySelector(`[data-column-id="${CSS.escape(t)}"] [data-dg-header-title]`);
|
|
4616
4646
|
if (r) {
|
|
4617
4647
|
let e = r.closest("[role=\"columnheader\"]"), t = e ? getComputedStyle(e) : null, i = t ? (Number.parseFloat(t.paddingLeft) || 0) + (Number.parseFloat(t.paddingRight) || 0) : 0;
|
|
4618
|
-
n = Math.max(n,
|
|
4648
|
+
n = Math.max(n, _o(r) + i + ho);
|
|
4619
4649
|
}
|
|
4620
4650
|
return n;
|
|
4621
4651
|
}
|
|
4622
|
-
function
|
|
4652
|
+
function xo({ table: e, columnId: t, container: n }) {
|
|
4623
4653
|
let r = e, i = r.getColumn(t);
|
|
4624
4654
|
if (!i || !i.getCanResize()) return !1;
|
|
4625
|
-
let a =
|
|
4655
|
+
let a = bo({
|
|
4626
4656
|
container: n,
|
|
4627
4657
|
columnId: t
|
|
4628
4658
|
});
|
|
@@ -4635,49 +4665,49 @@ function yo({ table: e, columnId: t, container: n }) {
|
|
|
4635
4665
|
}
|
|
4636
4666
|
//#endregion
|
|
4637
4667
|
//#region src/core/columnOrdering.ts
|
|
4638
|
-
function
|
|
4668
|
+
function So(e, t) {
|
|
4639
4669
|
return e.start.includes(t) ? "start" : e.end.includes(t) ? "end" : "center";
|
|
4640
4670
|
}
|
|
4641
|
-
function
|
|
4671
|
+
function Co(e) {
|
|
4642
4672
|
return e === "left" ? "start" : e === "right" && "end";
|
|
4643
4673
|
}
|
|
4644
|
-
function
|
|
4674
|
+
function wo(e, t, n, r) {
|
|
4645
4675
|
let i = e.filter((e) => e !== t), a = i.indexOf(n);
|
|
4646
4676
|
return a === -1 ? [...e] : (i.splice(r === "before" ? a : a + 1, 0, t), i);
|
|
4647
4677
|
}
|
|
4648
|
-
function
|
|
4678
|
+
function To({ table: e, columnId: t, targetId: n, side: r }) {
|
|
4649
4679
|
if (t === n) return;
|
|
4650
|
-
let i = e.store.state.columnPinning, a =
|
|
4651
|
-
if (a !==
|
|
4680
|
+
let i = e.store.state.columnPinning, a = So(i, t);
|
|
4681
|
+
if (a !== So(i, n)) return;
|
|
4652
4682
|
let o = e.getAllLeafColumns().map((e) => e.id);
|
|
4653
|
-
e.setColumnOrder(
|
|
4683
|
+
e.setColumnOrder(wo(o, t, n, r)), a !== "center" && e.setColumnPinning((e) => ({
|
|
4654
4684
|
...e,
|
|
4655
|
-
[a]:
|
|
4685
|
+
[a]: wo(e[a], t, n, r)
|
|
4656
4686
|
}));
|
|
4657
4687
|
}
|
|
4658
|
-
function
|
|
4688
|
+
function Eo(e) {
|
|
4659
4689
|
let t = (e) => Vn(e);
|
|
4660
4690
|
return {
|
|
4661
4691
|
start: [...e.start.filter(t), ...e.start.filter((e) => !t(e))],
|
|
4662
4692
|
end: [...e.end.filter((e) => !t(e)), ...e.end.filter(t)]
|
|
4663
4693
|
};
|
|
4664
4694
|
}
|
|
4665
|
-
function
|
|
4695
|
+
function Do(e, t) {
|
|
4666
4696
|
return t === "start" ? e.getStartVisibleLeafColumns() : t === "end" ? e.getEndVisibleLeafColumns() : e.getCenterVisibleLeafColumns();
|
|
4667
4697
|
}
|
|
4668
|
-
function
|
|
4669
|
-
let r =
|
|
4698
|
+
function Oo({ table: e, columnId: t, direction: n }) {
|
|
4699
|
+
let r = Do(e, So(e.store.state.columnPinning, t)), i = r.findIndex((e) => e.id === t);
|
|
4670
4700
|
if (i === -1) return null;
|
|
4671
4701
|
let a = r[i + n];
|
|
4672
4702
|
return !a || !Hn(a) ? null : a;
|
|
4673
4703
|
}
|
|
4674
|
-
function
|
|
4675
|
-
let r =
|
|
4704
|
+
function ko({ table: e, columnId: t, direction: n }) {
|
|
4705
|
+
let r = Oo({
|
|
4676
4706
|
table: e,
|
|
4677
4707
|
columnId: t,
|
|
4678
4708
|
direction: n
|
|
4679
4709
|
});
|
|
4680
|
-
r &&
|
|
4710
|
+
r && To({
|
|
4681
4711
|
table: e,
|
|
4682
4712
|
columnId: t,
|
|
4683
4713
|
targetId: r.id,
|
|
@@ -4686,10 +4716,10 @@ function Do({ table: e, columnId: t, direction: n }) {
|
|
|
4686
4716
|
}
|
|
4687
4717
|
//#endregion
|
|
4688
4718
|
//#region src/components/TMDataGridHeaderCell.tsx
|
|
4689
|
-
function
|
|
4719
|
+
function Ao(t) {
|
|
4690
4720
|
let n = e(278), { header: r, layout: i, renderColumnMenuItems: a } = t, o = $(), { table: u, features: d, filters: f, labels: p } = o, m = r.column, [h, g] = c(!1), [v, y] = c(!1), [b, x] = c(null), S = s(null), C = s(!1), w;
|
|
4691
4721
|
n[0] === Symbol.for("react.memo_cache_sentinel") ? (w = { compare: ge }, n[0] = w) : w = n[0];
|
|
4692
|
-
let { sorting: T, columnFilters: E, resizingColumnId: D, columnPinning: O, grouping: A } = M(u.store,
|
|
4722
|
+
let { sorting: T, columnFilters: E, resizingColumnId: D, columnPinning: O, grouping: A } = M(u.store, Lo, w), j = M(o.ui, Io), P = r.subHeaders.length === 0, V, H, U, G, se, K, q, le, ue, de, fe, pe, X, me, Z, he, _e, ve, ye, be, xe, Se;
|
|
4693
4723
|
if (n[1] !== o || n[2] !== m || n[3] !== E || n[4] !== O || n[5] !== j || n[6] !== b || n[7] !== d || n[8] !== f || n[9] !== A || n[10] !== r || n[11] !== P || n[12] !== p || n[13] !== i.pinnedAt || n[14] !== a || n[15] !== D || n[16] !== T || n[17] !== u) {
|
|
4694
4724
|
ye = Mn(m);
|
|
4695
4725
|
let e;
|
|
@@ -4705,17 +4735,17 @@ function Oo(t) {
|
|
|
4705
4735
|
} else c = n[51];
|
|
4706
4736
|
he = c, _e = D === m.id, X = D !== !1, be = i.pinnedAt;
|
|
4707
4737
|
let l;
|
|
4708
|
-
n[54] !== m || n[55] !== d ? (l =
|
|
4738
|
+
n[54] !== m || n[55] !== d ? (l = ui(m, d), n[54] = m, n[55] = d, n[56] = l) : l = n[56];
|
|
4709
4739
|
let h = l;
|
|
4710
4740
|
se = P && h.canSort;
|
|
4711
4741
|
let g = P && h.canFilter, v = P && h.canHide, y = P && h.canPin;
|
|
4712
4742
|
G = h.canResize, U = P && h.canReorder;
|
|
4713
|
-
let C = P && h.canGroup, w = P &&
|
|
4743
|
+
let C = P && h.canGroup, w = P && di(u, d).canHideAny, k;
|
|
4714
4744
|
n[57] !== m.id || n[58] !== A ? (k = A.includes(m.id), n[57] = m.id, n[58] = A, n[59] = k) : k = n[59];
|
|
4715
4745
|
let M = k, ee = A.length > 0;
|
|
4716
4746
|
me = j === m.id;
|
|
4717
4747
|
let ge;
|
|
4718
|
-
n[60] !== U || n[61] !== m.id || n[62] !== O || n[63] !== j || n[64] !== me ? (ge = U && j !== null && !me &&
|
|
4748
|
+
n[60] !== U || n[61] !== m.id || n[62] !== O || n[63] !== j || n[64] !== me ? (ge = U && j !== null && !me && So(O, j) === So(O, m.id), n[60] = U, n[61] = m.id, n[62] = O, n[63] = j, n[64] = me, n[65] = ge) : ge = n[65], Z = ge;
|
|
4719
4749
|
let Ce;
|
|
4720
4750
|
n[66] !== o.ui || n[67] !== m.id ? (Ce = function(e) {
|
|
4721
4751
|
e.dataTransfer.effectAllowed = "move", e.dataTransfer.setData("text/plain", m.id), o.ui.actions.startColumnDrag(m.id);
|
|
@@ -4734,7 +4764,7 @@ function Oo(t) {
|
|
|
4734
4764
|
}, n[71] = Te) : Te = n[71], ue = Te;
|
|
4735
4765
|
let Ee;
|
|
4736
4766
|
n[72] !== o.ui || n[73] !== m.id || n[74] !== j || n[75] !== b || n[76] !== Z || n[77] !== u ? (Ee = function(e) {
|
|
4737
|
-
e.preventDefault(), x(null), o.ui.actions.endColumnDrag(), !(!Z || !b || !j) &&
|
|
4767
|
+
e.preventDefault(), x(null), o.ui.actions.endColumnDrag(), !(!Z || !b || !j) && To({
|
|
4738
4768
|
table: u,
|
|
4739
4769
|
columnId: j,
|
|
4740
4770
|
targetId: m.id,
|
|
@@ -4748,7 +4778,7 @@ function Oo(t) {
|
|
|
4748
4778
|
let Oe;
|
|
4749
4779
|
n[81] !== m.id || n[82] !== u ? (Oe = function() {
|
|
4750
4780
|
let e = S.current?.closest("[data-dg-scroll-container]");
|
|
4751
|
-
e &&
|
|
4781
|
+
e && xo({
|
|
4752
4782
|
table: u,
|
|
4753
4783
|
columnId: m.id,
|
|
4754
4784
|
container: e
|
|
@@ -4772,7 +4802,7 @@ function Oo(t) {
|
|
|
4772
4802
|
}, n[84] = r, n[85] = u, n[86] = ke) : ke = n[86], q = ke;
|
|
4773
4803
|
let Ae;
|
|
4774
4804
|
n[87] !== m || n[88] !== q || n[89] !== u ? (Ae = function(e) {
|
|
4775
|
-
e && q(), m.pin(
|
|
4805
|
+
e && q(), m.pin(Co(e)), u.setColumnPinning(Eo);
|
|
4776
4806
|
}, n[87] = m, n[88] = q, n[89] = u, n[90] = Ae) : Ae = n[90];
|
|
4777
4807
|
let je = Ae, Q = [];
|
|
4778
4808
|
if (se) {
|
|
@@ -4812,7 +4842,7 @@ function Oo(t) {
|
|
|
4812
4842
|
stroke: 1.6
|
|
4813
4843
|
}), n[104] = e) : e = n[104];
|
|
4814
4844
|
let t;
|
|
4815
|
-
n[105] !== o || n[106] !== m.id ? (t = () =>
|
|
4845
|
+
n[105] !== o || n[106] !== m.id ? (t = () => Sa(o, m.id), n[105] = o, n[106] = m.id, n[107] = t) : t = n[107];
|
|
4816
4846
|
let r;
|
|
4817
4847
|
n[108] !== p.filterMenuItem || n[109] !== t ? (r = /* @__PURE__ */ J(_.Item, {
|
|
4818
4848
|
leftSection: e,
|
|
@@ -4823,7 +4853,7 @@ function Oo(t) {
|
|
|
4823
4853
|
n[111] === Symbol.for("react.memo_cache_sentinel") ? (i = /* @__PURE__ */ J(_.Divider, {}, "filter-divider"), n[111] = i) : i = n[111], Q.push(r, i);
|
|
4824
4854
|
}
|
|
4825
4855
|
if (C) {
|
|
4826
|
-
let e = M ?
|
|
4856
|
+
let e = M ? mo.menuItemActive : void 0, t;
|
|
4827
4857
|
n[112] === M ? t = n[113] : (t = J(M ? ae : oe, {
|
|
4828
4858
|
size: 16,
|
|
4829
4859
|
stroke: 1.6
|
|
@@ -4889,7 +4919,7 @@ function Oo(t) {
|
|
|
4889
4919
|
n[135] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ J(_.Divider, {}, "group-divider"), n[135] = e) : e = n[135], Q.push(e);
|
|
4890
4920
|
}
|
|
4891
4921
|
if (y) {
|
|
4892
|
-
let e = be === "left" ?
|
|
4922
|
+
let e = be === "left" ? mo.menuItemActive : void 0, t;
|
|
4893
4923
|
n[136] === Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */ J(F, {
|
|
4894
4924
|
size: 16,
|
|
4895
4925
|
stroke: 1.6
|
|
@@ -4903,7 +4933,7 @@ function Oo(t) {
|
|
|
4903
4933
|
onClick: r,
|
|
4904
4934
|
children: p.pinLeft
|
|
4905
4935
|
}, "pin-left"), n[140] = p.pinLeft, n[141] = e, n[142] = r, n[143] = i) : i = n[143];
|
|
4906
|
-
let a = be === "right" ?
|
|
4936
|
+
let a = be === "right" ? mo.menuItemActive : void 0, o;
|
|
4907
4937
|
n[144] === Symbol.for("react.memo_cache_sentinel") ? (o = /* @__PURE__ */ J(I, {
|
|
4908
4938
|
size: 16,
|
|
4909
4939
|
stroke: 1.6
|
|
@@ -4936,13 +4966,13 @@ function Oo(t) {
|
|
|
4936
4966
|
}
|
|
4937
4967
|
if (U) {
|
|
4938
4968
|
let e;
|
|
4939
|
-
n[159] !== m.id || n[160] !== u ? (e =
|
|
4969
|
+
n[159] !== m.id || n[160] !== u ? (e = Oo({
|
|
4940
4970
|
table: u,
|
|
4941
4971
|
columnId: m.id,
|
|
4942
4972
|
direction: -1
|
|
4943
4973
|
}), n[159] = m.id, n[160] = u, n[161] = e) : e = n[161];
|
|
4944
4974
|
let t = e, r;
|
|
4945
|
-
n[162] !== m.id || n[163] !== u ? (r =
|
|
4975
|
+
n[162] !== m.id || n[163] !== u ? (r = Oo({
|
|
4946
4976
|
table: u,
|
|
4947
4977
|
columnId: m.id,
|
|
4948
4978
|
direction: 1
|
|
@@ -4955,7 +4985,7 @@ function Oo(t) {
|
|
|
4955
4985
|
stroke: 1.6
|
|
4956
4986
|
}), n[165] = r) : r = n[165];
|
|
4957
4987
|
let a;
|
|
4958
|
-
n[166] !== m.id || n[167] !== u ? (a = () =>
|
|
4988
|
+
n[166] !== m.id || n[167] !== u ? (a = () => ko({
|
|
4959
4989
|
table: u,
|
|
4960
4990
|
columnId: m.id,
|
|
4961
4991
|
direction: -1
|
|
@@ -4973,7 +5003,7 @@ function Oo(t) {
|
|
|
4973
5003
|
stroke: 1.6
|
|
4974
5004
|
}), n[173] = c) : c = n[173];
|
|
4975
5005
|
let l;
|
|
4976
|
-
n[174] !== m.id || n[175] !== u ? (l = () =>
|
|
5006
|
+
n[174] !== m.id || n[175] !== u ? (l = () => ko({
|
|
4977
5007
|
table: u,
|
|
4978
5008
|
columnId: m.id,
|
|
4979
5009
|
direction: 1
|
|
@@ -5031,23 +5061,23 @@ function Oo(t) {
|
|
|
5031
5061
|
children: p.manageColumns
|
|
5032
5062
|
}) }), n[194] = p.manageColumns, n[195] = t);
|
|
5033
5063
|
let r;
|
|
5034
|
-
n[196] === Symbol.for("react.memo_cache_sentinel") ? (r = /* @__PURE__ */ J(_.Sub.Dropdown, { children: /* @__PURE__ */ J(
|
|
5064
|
+
n[196] === Symbol.for("react.memo_cache_sentinel") ? (r = /* @__PURE__ */ J(_.Sub.Dropdown, { children: /* @__PURE__ */ J(Va, { searchable: !1 }) }), n[196] = r) : r = n[196];
|
|
5035
5065
|
let i;
|
|
5036
5066
|
n[197] === t ? i = n[198] : (i = /* @__PURE__ */ Y(_.Sub, { children: [t, r] }, "manage"), n[197] = t, n[198] = i), Q.push(i);
|
|
5037
5067
|
}
|
|
5038
|
-
for (; Q.length > 0 &&
|
|
5068
|
+
for (; Q.length > 0 && Ro(Q.at(-1));) Q.pop();
|
|
5039
5069
|
for (K = a ? [...a({
|
|
5040
5070
|
column: m,
|
|
5041
5071
|
table: u,
|
|
5042
5072
|
internalItems: Q
|
|
5043
|
-
})] : Q; K.length > 0 &&
|
|
5073
|
+
})] : Q; K.length > 0 && Ro(K.at(-1));) K.pop();
|
|
5044
5074
|
n[1] = o, n[2] = m, n[3] = E, n[4] = O, n[5] = j, n[6] = b, n[7] = d, n[8] = f, n[9] = A, n[10] = r, n[11] = P, n[12] = p, n[13] = i.pinnedAt, n[14] = a, n[15] = D, n[16] = T, n[17] = u, n[18] = V, n[19] = H, n[20] = U, n[21] = G, n[22] = se, n[23] = K, n[24] = q, n[25] = le, n[26] = ue, n[27] = de, n[28] = fe, n[29] = pe, n[30] = X, n[31] = me, n[32] = Z, n[33] = he, n[34] = _e, n[35] = ve, n[36] = ye, n[37] = be, n[38] = xe, n[39] = Se;
|
|
5045
5075
|
} else V = n[18], H = n[19], U = n[20], G = n[21], se = n[22], K = n[23], q = n[24], le = n[25], ue = n[26], de = n[27], fe = n[28], pe = n[29], X = n[30], me = n[31], Z = n[32], he = n[33], _e = n[34], ve = n[35], ye = n[36], be = n[37], xe = n[38], Se = n[39];
|
|
5046
5076
|
let Ce;
|
|
5047
5077
|
n[199] !== m.id || n[200] !== K || n[201] !== P ? (Ce = P && K.length > 0 && !Bn(m.id), n[199] = m.id, n[200] = K, n[201] = P, n[202] = Ce) : Ce = n[202];
|
|
5048
|
-
let we = Ce, Te = se ?
|
|
5078
|
+
let we = Ce, Te = se ? mo.headerCellSortable : "", Ee = he ? mo.headerCellFiltered : "", De = me ? mo.headerCellDragging : "", Oe = b === "before" ? mo.headerCellDropBefore : "", ke = b === "after" ? mo.headerCellDropAfter : "", Ae = i.isBoundary && be === "left" ? Qa.stickyLeft : "", je = i.isBoundary && be === "right" ? Qa.stickyRight : "", Q;
|
|
5049
5079
|
n[203] !== Te || n[204] !== Ee || n[205] !== De || n[206] !== Oe || n[207] !== ke || n[208] !== Ae || n[209] !== je ? (Q = [
|
|
5050
|
-
|
|
5080
|
+
mo.headerCell,
|
|
5051
5081
|
Te,
|
|
5052
5082
|
Ee,
|
|
5053
5083
|
De,
|
|
@@ -5066,7 +5096,7 @@ function Oo(t) {
|
|
|
5066
5096
|
position: Ke,
|
|
5067
5097
|
zIndex: qe
|
|
5068
5098
|
}, n[213] = Ue, n[214] = We, n[215] = Ge, n[216] = Ke, n[217] = qe, n[218] = Je) : Je = n[218];
|
|
5069
|
-
let Ye = se ?
|
|
5099
|
+
let Ye = se ? Fo : void 0, Xe;
|
|
5070
5100
|
n[219] !== se || n[220] !== m ? (Xe = se ? (e) => {
|
|
5071
5101
|
if (C.current) {
|
|
5072
5102
|
C.current = !1;
|
|
@@ -5081,17 +5111,17 @@ function Oo(t) {
|
|
|
5081
5111
|
withinPortal: !0,
|
|
5082
5112
|
disabled: !P,
|
|
5083
5113
|
children: /* @__PURE__ */ J("span", {
|
|
5084
|
-
className:
|
|
5114
|
+
className: mo.headerTitle,
|
|
5085
5115
|
"data-dg-header-title": !0,
|
|
5086
5116
|
children: Fe(m.columnDef.header, r.getContext())
|
|
5087
5117
|
})
|
|
5088
5118
|
}), n[222] = m.columnDef, n[223] = r, n[224] = P, n[225] = ye, n[226] = Ze) : Ze = n[226];
|
|
5089
5119
|
let Qe;
|
|
5090
5120
|
n[227] !== o || n[228] !== se || n[229] !== m || n[230] !== v || n[231] !== f || n[232] !== K || n[233] !== we || n[234] !== he || n[235] !== P || n[236] !== ve || n[237] !== ye || n[238] !== p || n[239] !== h || n[240] !== xe || n[241] !== Se ? (Qe = P && /* @__PURE__ */ Y("div", {
|
|
5091
|
-
className:
|
|
5121
|
+
className: mo.headerActions,
|
|
5092
5122
|
children: [
|
|
5093
5123
|
he && !f.inHeader && /* @__PURE__ */ J(l, {
|
|
5094
|
-
className:
|
|
5124
|
+
className: mo.headerAction,
|
|
5095
5125
|
"data-pinned-visible": "true",
|
|
5096
5126
|
variant: "subtle",
|
|
5097
5127
|
color: "gray",
|
|
@@ -5100,7 +5130,7 @@ function Oo(t) {
|
|
|
5100
5130
|
"data-dg-part": "header-filter",
|
|
5101
5131
|
"data-column-id": m.id,
|
|
5102
5132
|
onClick: (e) => {
|
|
5103
|
-
e.stopPropagation(),
|
|
5133
|
+
e.stopPropagation(), Sa(o, m.id);
|
|
5104
5134
|
},
|
|
5105
5135
|
children: /* @__PURE__ */ J(ne, {
|
|
5106
5136
|
size: 14,
|
|
@@ -5108,7 +5138,7 @@ function Oo(t) {
|
|
|
5108
5138
|
})
|
|
5109
5139
|
}),
|
|
5110
5140
|
se && /* @__PURE__ */ J(l, {
|
|
5111
|
-
className: `${
|
|
5141
|
+
className: `${mo.headerAction} ${mo.sortAction}`,
|
|
5112
5142
|
"data-pinned-visible": ve || void 0,
|
|
5113
5143
|
"data-sorted": ve || void 0,
|
|
5114
5144
|
variant: "subtle",
|
|
@@ -5126,7 +5156,7 @@ function Oo(t) {
|
|
|
5126
5156
|
})
|
|
5127
5157
|
}),
|
|
5128
5158
|
Se !== null && /* @__PURE__ */ J("span", {
|
|
5129
|
-
className:
|
|
5159
|
+
className: mo.sortIndex,
|
|
5130
5160
|
"data-dg-part": "sort-index",
|
|
5131
5161
|
children: Se
|
|
5132
5162
|
}),
|
|
@@ -5138,7 +5168,7 @@ function Oo(t) {
|
|
|
5138
5168
|
width: 220,
|
|
5139
5169
|
withinPortal: !0,
|
|
5140
5170
|
children: [/* @__PURE__ */ J(_.Target, { children: /* @__PURE__ */ J(l, {
|
|
5141
|
-
className:
|
|
5171
|
+
className: mo.headerAction,
|
|
5142
5172
|
"data-pinned-visible": h || v || void 0,
|
|
5143
5173
|
variant: "subtle",
|
|
5144
5174
|
color: "gray",
|
|
@@ -5147,14 +5177,14 @@ function Oo(t) {
|
|
|
5147
5177
|
"data-dg-part": "header-menu",
|
|
5148
5178
|
"data-column-id": m.id,
|
|
5149
5179
|
onClick: (e) => {
|
|
5150
|
-
e.stopPropagation(), g(
|
|
5180
|
+
e.stopPropagation(), g(Po);
|
|
5151
5181
|
},
|
|
5152
5182
|
children: /* @__PURE__ */ J(ee, {
|
|
5153
5183
|
size: 14,
|
|
5154
5184
|
stroke: 1.6
|
|
5155
5185
|
})
|
|
5156
5186
|
}) }), /* @__PURE__ */ J(_.Dropdown, {
|
|
5157
|
-
onClick:
|
|
5187
|
+
onClick: No,
|
|
5158
5188
|
children: K
|
|
5159
5189
|
})]
|
|
5160
5190
|
})
|
|
@@ -5163,9 +5193,9 @@ function Oo(t) {
|
|
|
5163
5193
|
let $e;
|
|
5164
5194
|
n[243] !== H || n[244] !== G || n[245] !== m.id || n[246] !== q || n[247] !== r || n[248] !== _e ? ($e = !Bn(m.id) && /* @__PURE__ */ J("div", {
|
|
5165
5195
|
className: [
|
|
5166
|
-
|
|
5167
|
-
G ?
|
|
5168
|
-
_e ?
|
|
5196
|
+
mo.columnSeparator,
|
|
5197
|
+
G ? mo.columnSeparatorResizable : "",
|
|
5198
|
+
_e ? mo.columnSeparatorActive : ""
|
|
5169
5199
|
].filter(Boolean).join(" "),
|
|
5170
5200
|
"data-dg-part": G ? "header-resize" : void 0,
|
|
5171
5201
|
"data-column-id": G ? m.id : void 0,
|
|
@@ -5176,7 +5206,7 @@ function Oo(t) {
|
|
|
5176
5206
|
onTouchStart: G ? (e) => {
|
|
5177
5207
|
q(), r.getResizeHandler(e.currentTarget.ownerDocument)(e);
|
|
5178
5208
|
} : void 0,
|
|
5179
|
-
onClick:
|
|
5209
|
+
onClick: Mo,
|
|
5180
5210
|
onDoubleClick: G ? (e) => {
|
|
5181
5211
|
e.stopPropagation(), H();
|
|
5182
5212
|
} : void 0
|
|
@@ -5217,7 +5247,7 @@ function Oo(t) {
|
|
|
5217
5247
|
n[270] === tt ? rt = n[271] : (rt = /* @__PURE__ */ J(_.ContextMenu, { children: tt }), n[270] = tt, n[271] = rt);
|
|
5218
5248
|
let it;
|
|
5219
5249
|
n[272] === K ? it = n[273] : (it = /* @__PURE__ */ J(_.Dropdown, {
|
|
5220
|
-
onClick:
|
|
5250
|
+
onClick: jo,
|
|
5221
5251
|
children: K
|
|
5222
5252
|
}), n[272] = K, n[273] = it);
|
|
5223
5253
|
let at;
|
|
@@ -5231,25 +5261,25 @@ function Oo(t) {
|
|
|
5231
5261
|
children: [rt, it]
|
|
5232
5262
|
}), n[274] = v, n[275] = rt, n[276] = it, n[277] = at) : at = n[277], at;
|
|
5233
5263
|
}
|
|
5234
|
-
function
|
|
5264
|
+
function jo(e) {
|
|
5235
5265
|
return e.stopPropagation();
|
|
5236
5266
|
}
|
|
5237
|
-
function
|
|
5267
|
+
function Mo(e) {
|
|
5238
5268
|
return e.stopPropagation();
|
|
5239
5269
|
}
|
|
5240
|
-
function
|
|
5270
|
+
function No(e) {
|
|
5241
5271
|
return e.stopPropagation();
|
|
5242
5272
|
}
|
|
5243
|
-
function
|
|
5273
|
+
function Po(e) {
|
|
5244
5274
|
return !e;
|
|
5245
5275
|
}
|
|
5246
|
-
function
|
|
5276
|
+
function Fo(e) {
|
|
5247
5277
|
e.shiftKey && e.preventDefault();
|
|
5248
5278
|
}
|
|
5249
|
-
function
|
|
5279
|
+
function Io(e) {
|
|
5250
5280
|
return e.draggedColumnId;
|
|
5251
5281
|
}
|
|
5252
|
-
function
|
|
5282
|
+
function Lo(e) {
|
|
5253
5283
|
return {
|
|
5254
5284
|
sorting: e.sorting,
|
|
5255
5285
|
columnFilters: e.columnFilters,
|
|
@@ -5259,12 +5289,12 @@ function Fo(e) {
|
|
|
5259
5289
|
grouping: e.grouping
|
|
5260
5290
|
};
|
|
5261
5291
|
}
|
|
5262
|
-
function
|
|
5292
|
+
function Ro(e) {
|
|
5263
5293
|
return typeof e == "object" && !!e && "type" in e && e.type === _.Divider;
|
|
5264
5294
|
}
|
|
5265
5295
|
//#endregion
|
|
5266
5296
|
//#region src/core/editorFocus.ts
|
|
5267
|
-
var
|
|
5297
|
+
var zo = [
|
|
5268
5298
|
"button:not([disabled])",
|
|
5269
5299
|
"input:not([disabled]):not([type=\"hidden\"])",
|
|
5270
5300
|
"select:not([disabled])",
|
|
@@ -5272,34 +5302,34 @@ var Lo = [
|
|
|
5272
5302
|
"a[href]",
|
|
5273
5303
|
"[tabindex]:not([tabindex=\"-1\"])"
|
|
5274
5304
|
].join(",");
|
|
5275
|
-
function
|
|
5276
|
-
(e.querySelector("[data-dg-part=\"editor-input\"]") ?? e.querySelector(
|
|
5305
|
+
function Bo(e) {
|
|
5306
|
+
(e.querySelector("[data-dg-part=\"editor-input\"]") ?? e.querySelector(zo))?.focus();
|
|
5277
5307
|
}
|
|
5278
5308
|
//#endregion
|
|
5279
5309
|
//#region src/components/editors/editorShared.ts
|
|
5280
|
-
function zo(e) {
|
|
5281
|
-
return Z(e.store, Bo);
|
|
5282
|
-
}
|
|
5283
|
-
function Bo(e) {
|
|
5284
|
-
return e.value;
|
|
5285
|
-
}
|
|
5286
5310
|
function Vo(e) {
|
|
5287
5311
|
return Z(e.store, Ho);
|
|
5288
5312
|
}
|
|
5289
5313
|
function Ho(e) {
|
|
5290
|
-
return
|
|
5314
|
+
return e.value;
|
|
5291
5315
|
}
|
|
5292
5316
|
function Uo(e) {
|
|
5293
5317
|
return Z(e.store, Wo);
|
|
5294
5318
|
}
|
|
5295
5319
|
function Wo(e) {
|
|
5296
|
-
return Yt(e.meta.errors)
|
|
5320
|
+
return Yt(e.meta.errors);
|
|
5297
5321
|
}
|
|
5298
5322
|
function Go(e) {
|
|
5323
|
+
return Z(e.store, Ko);
|
|
5324
|
+
}
|
|
5325
|
+
function Ko(e) {
|
|
5326
|
+
return Yt(e.meta.errors) !== void 0;
|
|
5327
|
+
}
|
|
5328
|
+
function qo(e) {
|
|
5299
5329
|
let t = e.currentTarget;
|
|
5300
5330
|
bn(t) && t.select();
|
|
5301
5331
|
}
|
|
5302
|
-
function
|
|
5332
|
+
function Jo() {
|
|
5303
5333
|
let t = e(2), n = s(null), r = s(null), i;
|
|
5304
5334
|
t[0] === Symbol.for("react.memo_cache_sentinel") ? (i = () => {
|
|
5305
5335
|
let e = r.current, t = n.current;
|
|
@@ -5320,8 +5350,8 @@ function Ko() {
|
|
|
5320
5350
|
}
|
|
5321
5351
|
//#endregion
|
|
5322
5352
|
//#region src/components/editors/TMDataGridBooleanEditor.tsx
|
|
5323
|
-
function
|
|
5324
|
-
let n = e(12), { field: r, column: i, size: a } = t, { labels: o } = $(), s =
|
|
5353
|
+
function Yo(t) {
|
|
5354
|
+
let n = e(12), { field: r, column: i, size: a } = t, { labels: o } = $(), s = Vo(r), c = Go(r), l;
|
|
5325
5355
|
n[0] !== i || n[1] !== o ? (l = o.editCell(Mn(i)), n[0] = i, n[1] = o, n[2] = l) : l = n[2];
|
|
5326
5356
|
let u = s === !0, d;
|
|
5327
5357
|
n[3] === r ? d = n[4] : (d = (e) => r.handleChange(e.currentTarget.checked), n[3] = r, n[4] = d);
|
|
@@ -5338,8 +5368,8 @@ function qo(t) {
|
|
|
5338
5368
|
}
|
|
5339
5369
|
//#endregion
|
|
5340
5370
|
//#region src/components/editors/TMDataGridDateEditor.tsx
|
|
5341
|
-
function
|
|
5342
|
-
let n = e(14), { field: r, column: i, size: a } = t, { labels: o } = $(), c =
|
|
5371
|
+
function Xo(t) {
|
|
5372
|
+
let n = e(14), { field: r, column: i, size: a } = t, { labels: o } = $(), c = Vo(r), l = Go(r), u = s(c instanceof Date), d;
|
|
5343
5373
|
n[0] === c ? d = n[1] : (d = c instanceof Date ? c.toLocaleDateString("sv-SE") : typeof c == "string" ? c.slice(0, 10) : "", n[0] = c, n[1] = d);
|
|
5344
5374
|
let f = d, p;
|
|
5345
5375
|
n[2] !== i || n[3] !== o ? (p = o.editCell(Mn(i)), n[2] = i, n[3] = o, n[4] = p) : p = n[4];
|
|
@@ -5367,8 +5397,8 @@ function Jo(t) {
|
|
|
5367
5397
|
}
|
|
5368
5398
|
//#endregion
|
|
5369
5399
|
//#region src/components/editors/TMDataGridMultiSelectEditor.tsx
|
|
5370
|
-
function
|
|
5371
|
-
let n = e(20), { field: r, column: i, row: a, table: o, size: s } = t, { labels: c } = $(), l =
|
|
5400
|
+
function Zo(t) {
|
|
5401
|
+
let n = e(20), { field: r, column: i, row: a, table: o, size: s } = t, { labels: c } = $(), l = Vo(r), u = Go(r), d;
|
|
5372
5402
|
n[0] === Symbol.for("react.memo_cache_sentinel") ? (d = { withinPortal: !1 }, n[0] = d) : d = n[0];
|
|
5373
5403
|
let f;
|
|
5374
5404
|
n[1] !== i || n[2] !== c ? (f = c.editCell(Mn(i)), n[1] = i, n[2] = c, n[3] = f) : f = n[3];
|
|
@@ -5400,8 +5430,8 @@ function Yo(t) {
|
|
|
5400
5430
|
}
|
|
5401
5431
|
//#endregion
|
|
5402
5432
|
//#region src/components/editors/TMDataGridNumberEditor.tsx
|
|
5403
|
-
function
|
|
5404
|
-
let n = e(15), { field: r, column: i, size: a } = t, { labels: o } = $(), s =
|
|
5433
|
+
function Qo(t) {
|
|
5434
|
+
let n = e(15), { field: r, column: i, size: a } = t, { labels: o } = $(), s = Vo(r), l = Go(r), { inputRef: u, remember: d } = Jo(), [f, p] = c(null), m = f === null || f === "" ? null : Number(f), h = Number.isFinite(m) ? m === s : s === null, g;
|
|
5405
5435
|
n[0] !== i || n[1] !== o ? (g = o.editCell(Mn(i)), n[0] = i, n[1] = o, n[2] = g) : g = n[2];
|
|
5406
5436
|
let _ = f !== null && h ? f : typeof s == "number" ? s : "", v;
|
|
5407
5437
|
n[3] !== r || n[4] !== u || n[5] !== d ? (v = (e) => {
|
|
@@ -5418,7 +5448,7 @@ function Xo(t) {
|
|
|
5418
5448
|
ref: u,
|
|
5419
5449
|
size: a,
|
|
5420
5450
|
w: "100%",
|
|
5421
|
-
onFocus:
|
|
5451
|
+
onFocus: qo,
|
|
5422
5452
|
hideControls: !0,
|
|
5423
5453
|
"aria-label": g,
|
|
5424
5454
|
"data-dg-part": "editor-input",
|
|
@@ -5430,8 +5460,8 @@ function Xo(t) {
|
|
|
5430
5460
|
}
|
|
5431
5461
|
//#endregion
|
|
5432
5462
|
//#region src/components/editors/TMDataGridSelectEditor.tsx
|
|
5433
|
-
function
|
|
5434
|
-
let n = e(20), { field: r, column: i, row: a, table: o, size: s, commit: c } = t, { labels: l, features: u } = $(), d =
|
|
5463
|
+
function $o(t) {
|
|
5464
|
+
let n = e(20), { field: r, column: i, row: a, table: o, size: s, commit: c } = t, { labels: l, features: u } = $(), d = Vo(r), f = Go(r), p;
|
|
5435
5465
|
n[0] === Symbol.for("react.memo_cache_sentinel") ? (p = { withinPortal: !1 }, n[0] = p) : p = n[0];
|
|
5436
5466
|
let m;
|
|
5437
5467
|
n[1] !== i || n[2] !== l ? (m = l.editCell(Mn(i)), n[1] = i, n[2] = l, n[3] = m) : m = n[3];
|
|
@@ -5463,8 +5493,8 @@ function Zo(t) {
|
|
|
5463
5493
|
}
|
|
5464
5494
|
//#endregion
|
|
5465
5495
|
//#region src/components/editors/TMDataGridStringEditor.tsx
|
|
5466
|
-
function
|
|
5467
|
-
let n = e(14), { field: r, column: i, size: a } = t, { labels: o } = $(), s =
|
|
5496
|
+
function es(t) {
|
|
5497
|
+
let n = e(14), { field: r, column: i, size: a } = t, { labels: o } = $(), s = Vo(r), c = Go(r), { inputRef: l, remember: u } = Jo(), d;
|
|
5468
5498
|
n[0] !== i || n[1] !== o ? (d = o.editCell(Mn(i)), n[0] = i, n[1] = o, n[2] = d) : d = n[2];
|
|
5469
5499
|
let f = typeof s == "string" ? s : "", p;
|
|
5470
5500
|
n[3] !== r || n[4] !== u ? (p = (e) => {
|
|
@@ -5475,7 +5505,7 @@ function Qo(t) {
|
|
|
5475
5505
|
ref: l,
|
|
5476
5506
|
size: a,
|
|
5477
5507
|
w: "100%",
|
|
5478
|
-
onFocus:
|
|
5508
|
+
onFocus: qo,
|
|
5479
5509
|
"aria-label": d,
|
|
5480
5510
|
"data-dg-part": "editor-input",
|
|
5481
5511
|
value: f,
|
|
@@ -5486,15 +5516,15 @@ function Qo(t) {
|
|
|
5486
5516
|
}
|
|
5487
5517
|
//#endregion
|
|
5488
5518
|
//#region src/components/TMDataGridCellEditor.tsx
|
|
5489
|
-
var
|
|
5490
|
-
string:
|
|
5491
|
-
number:
|
|
5492
|
-
boolean:
|
|
5493
|
-
date:
|
|
5494
|
-
select:
|
|
5495
|
-
multiSelect:
|
|
5519
|
+
var ts = {
|
|
5520
|
+
string: es,
|
|
5521
|
+
number: Qo,
|
|
5522
|
+
boolean: Yo,
|
|
5523
|
+
date: Xo,
|
|
5524
|
+
select: $o,
|
|
5525
|
+
multiSelect: Zo
|
|
5496
5526
|
};
|
|
5497
|
-
function
|
|
5527
|
+
function ns({ cell: e, row: t, takeSeedText: n, onClose: r, inEntryBlock: a = !1 }) {
|
|
5498
5528
|
let { table: o, edit: u, features: d, labels: f, controlSize: p } = $(), m = d.editMode === "row" || a, h = e.column, g = u.getForm(t.id), _ = Ut(h), [v] = c(() => n()), y = s(void 0);
|
|
5499
5529
|
i(() => {
|
|
5500
5530
|
y.current = h.columnDef.meta?.edit?.mapValue;
|
|
@@ -5517,7 +5547,7 @@ function es({ cell: e, row: t, takeSeedText: n, onClose: r, inEntryBlock: a = !1
|
|
|
5517
5547
|
}), e;
|
|
5518
5548
|
});
|
|
5519
5549
|
i(() => b.mount(), [b]);
|
|
5520
|
-
let x =
|
|
5550
|
+
let x = Uo(b), [S, C] = c(!1), [w, T] = c(!1);
|
|
5521
5551
|
i(() => {
|
|
5522
5552
|
if (v === void 0) return;
|
|
5523
5553
|
let e = h.columnDef.meta?.type ?? "string";
|
|
@@ -5552,7 +5582,7 @@ function es({ cell: e, row: t, takeSeedText: n, onClose: r, inEntryBlock: a = !1
|
|
|
5552
5582
|
if (e.key === "Enter") e.preventDefault(), e.stopPropagation(), D("enter");
|
|
5553
5583
|
else if (e.key === "Escape") e.preventDefault(), e.stopPropagation(), O();
|
|
5554
5584
|
else if (e.key === "Tab" && !m) if (e.preventDefault(), e.stopPropagation(), d.editMode === "cellConfirm") {
|
|
5555
|
-
let t = Array.from(e.currentTarget.querySelectorAll(
|
|
5585
|
+
let t = Array.from(e.currentTarget.querySelectorAll(zo)).filter((e) => e.tabIndex >= 0), n = t.indexOf(e.target), r = t[n + (e.shiftKey ? -1 : 1)];
|
|
5556
5586
|
if (n >= 0 && r !== void 0) {
|
|
5557
5587
|
r.focus(), bn(r) && r.select();
|
|
5558
5588
|
return;
|
|
@@ -5584,7 +5614,7 @@ function es({ cell: e, row: t, takeSeedText: n, onClose: r, inEntryBlock: a = !1
|
|
|
5584
5614
|
cancel: O,
|
|
5585
5615
|
size: p,
|
|
5586
5616
|
seedText: v
|
|
5587
|
-
}, P = h.columnDef.meta?.edit?.editor ??
|
|
5617
|
+
}, P = h.columnDef.meta?.edit?.editor ?? ts[h.columnDef.meta?.type ?? "string"] ?? es;
|
|
5588
5618
|
return /* @__PURE__ */ Y("div", {
|
|
5589
5619
|
className: Rt.cellEditor,
|
|
5590
5620
|
"data-dg-part": "editor",
|
|
@@ -5642,7 +5672,7 @@ function es({ cell: e, row: t, takeSeedText: n, onClose: r, inEntryBlock: a = !1
|
|
|
5642
5672
|
}
|
|
5643
5673
|
//#endregion
|
|
5644
5674
|
//#region src/core/draftCellContext.ts
|
|
5645
|
-
function
|
|
5675
|
+
function rs(e, t) {
|
|
5646
5676
|
let n = Object.create(e.row), r = n;
|
|
5647
5677
|
r.original = t, r._valuesCache = Object.create(null), r._uniqueValuesCache = Object.create(null);
|
|
5648
5678
|
let i = Object.create(e);
|
|
@@ -5657,10 +5687,10 @@ function ts(e, t) {
|
|
|
5657
5687
|
}
|
|
5658
5688
|
//#endregion
|
|
5659
5689
|
//#region src/components/TMDataGridEntryRows.tsx
|
|
5660
|
-
function
|
|
5690
|
+
function is(e, t, n) {
|
|
5661
5691
|
return n.isColumnEditable(t) ? Rn(t, e) : !1;
|
|
5662
5692
|
}
|
|
5663
|
-
function
|
|
5693
|
+
function as(t) {
|
|
5664
5694
|
let n = e(49), { entryRow: r, column: i, cell: a, committed: o, layout: s, rowHeight: c, pinnedZ: l } = t, { edit: u } = $(), d;
|
|
5665
5695
|
n[0] === i ? d = n[1] : (d = Ut(i), n[0] = i, n[1] = d);
|
|
5666
5696
|
let f = d, p;
|
|
@@ -5670,7 +5700,7 @@ function rs(t) {
|
|
|
5670
5700
|
return t !== void 0 && t.errorFields.includes(f);
|
|
5671
5701
|
}, n[2] = r, n[3] = f, n[4] = p) : p = n[4];
|
|
5672
5702
|
let m = M(u.store, p), h;
|
|
5673
|
-
n[5] !== a || n[6] !== i || n[7] !== u || n[8] !== r ? (h = a !== void 0 &&
|
|
5703
|
+
n[5] !== a || n[6] !== i || n[7] !== u || n[8] !== r ? (h = a !== void 0 && is(r, i, u), n[5] = a, n[6] = i, n[7] = u, n[8] = r, n[9] = h) : h = n[9];
|
|
5674
5704
|
let g = h, _;
|
|
5675
5705
|
n[10] !== i.id || n[11] !== o || n[12] !== r ? (_ = (e) => o || Bn(i.id) ? void 0 : e.rows[r.id]?.values, n[10] = i.id, n[11] = o, n[12] = r, n[13] = _) : _ = n[13];
|
|
5676
5706
|
let v = M(u.store, _), y = i.id, b;
|
|
@@ -5682,7 +5712,7 @@ function rs(t) {
|
|
|
5682
5712
|
rowId: r.id,
|
|
5683
5713
|
columnId: i.id
|
|
5684
5714
|
}) : void 0, n[18] = i.id, n[19] = o, n[20] = u, n[21] = g, n[22] = r, n[23] = C) : C = n[23];
|
|
5685
|
-
let w = s.isBoundary && s.pinnedAt === "left" ?
|
|
5715
|
+
let w = s.isBoundary && s.pinnedAt === "left" ? Qa.stickyLeft : "", T = s.isBoundary && s.pinnedAt === "right" ? Qa.stickyRight : "", E;
|
|
5686
5716
|
n[24] !== w || n[25] !== T ? (E = [
|
|
5687
5717
|
Rt.entryCell,
|
|
5688
5718
|
w,
|
|
@@ -5697,15 +5727,15 @@ function rs(t) {
|
|
|
5697
5727
|
zIndex: j
|
|
5698
5728
|
}, n[27] = c, n[28] = O, n[29] = k, n[30] = A, n[31] = j, n[32] = N) : N = n[32];
|
|
5699
5729
|
let P;
|
|
5700
|
-
n[33] !== a || n[34] !== i.id || n[35] !== o || n[36] !== v || n[37] !== g || n[38] !== r ? (P = a === void 0 ? null : i.id === "__edit__" ? Fe(a.column.columnDef.cell, a.getContext()) : !o && g ? /* @__PURE__ */ J(
|
|
5730
|
+
n[33] !== a || n[34] !== i.id || n[35] !== o || n[36] !== v || n[37] !== g || n[38] !== r ? (P = a === void 0 ? null : i.id === "__edit__" ? Fe(a.column.columnDef.cell, a.getContext()) : !o && g ? /* @__PURE__ */ J(ns, {
|
|
5701
5731
|
cell: a,
|
|
5702
5732
|
row: r,
|
|
5703
|
-
takeSeedText:
|
|
5704
|
-
onClose:
|
|
5733
|
+
takeSeedText: ss,
|
|
5734
|
+
onClose: os,
|
|
5705
5735
|
inEntryBlock: !0
|
|
5706
5736
|
}) : o || !Bn(i.id) ? /* @__PURE__ */ J("span", {
|
|
5707
5737
|
className: Rt.cellContent,
|
|
5708
|
-
children: Fe(a.column.columnDef.cell, v === void 0 ? a.getContext() :
|
|
5738
|
+
children: Fe(a.column.columnDef.cell, v === void 0 ? a.getContext() : rs(a, v))
|
|
5709
5739
|
}) : null, n[33] = a, n[34] = i.id, n[35] = o, n[36] = v, n[37] = g, n[38] = r, n[39] = P) : P = n[39];
|
|
5710
5740
|
let F;
|
|
5711
5741
|
return n[40] !== i.id || n[41] !== D || n[42] !== N || n[43] !== P || n[44] !== b || n[45] !== x || n[46] !== S || n[47] !== C ? (F = /* @__PURE__ */ J("div", {
|
|
@@ -5720,14 +5750,14 @@ function rs(t) {
|
|
|
5720
5750
|
children: P
|
|
5721
5751
|
}), n[40] = i.id, n[41] = D, n[42] = N, n[43] = P, n[44] = b, n[45] = x, n[46] = S, n[47] = C, n[48] = F) : F = n[48], F;
|
|
5722
5752
|
}
|
|
5723
|
-
function
|
|
5724
|
-
function
|
|
5725
|
-
function
|
|
5753
|
+
function os() {}
|
|
5754
|
+
function ss() {}
|
|
5755
|
+
function cs(t) {
|
|
5726
5756
|
let n = e(35), { orderedColumns: r, layoutFor: i, rowHeight: o } = t, { table: c, edit: l, features: u } = $(), d = u.editNewRowsSticky, f;
|
|
5727
|
-
n[0] === d ? f = n[1] : (f = (e) => d ? e.newRows : e.newRows.filter(
|
|
5757
|
+
n[0] === d ? f = n[1] : (f = (e) => d ? e.newRows : e.newRows.filter(ps), n[0] = d, n[1] = f);
|
|
5728
5758
|
let p;
|
|
5729
5759
|
n[2] === Symbol.for("react.memo_cache_sentinel") ? (p = { compare: ge }, n[2] = p) : p = n[2];
|
|
5730
|
-
let m = M(l.store, f, p), h = M(l.store,
|
|
5760
|
+
let m = M(l.store, f, p), h = M(l.store, fs), g = M(l.store, ds), _ = s(null), v = s(null), y = s(null), b;
|
|
5731
5761
|
n[3] === m ? b = n[4] : (b = () => {
|
|
5732
5762
|
let e = m.at(-1)?.tempId;
|
|
5733
5763
|
if (e === void 0) {
|
|
@@ -5738,7 +5768,7 @@ function os(t) {
|
|
|
5738
5768
|
let t = _.current;
|
|
5739
5769
|
if (t === null) return;
|
|
5740
5770
|
let n = t.querySelector(`[data-dg-part="editor"][data-row-id="${CSS.escape(e)}"]`);
|
|
5741
|
-
n !== null && (v.current = e,
|
|
5771
|
+
n !== null && (v.current = e, Bo(n));
|
|
5742
5772
|
}, n[3] = m, n[4] = b), a(b);
|
|
5743
5773
|
let x;
|
|
5744
5774
|
n[5] === g ? x = n[6] : (x = () => {
|
|
@@ -5751,7 +5781,7 @@ function os(t) {
|
|
|
5751
5781
|
let t = _.current;
|
|
5752
5782
|
if (t === null) return;
|
|
5753
5783
|
let n = t.querySelector(g.columnId === null ? `[data-dg-part="editor"][data-row-id="${CSS.escape(g.rowId)}"]` : `[data-dg-part="editor"][data-row-id="${CSS.escape(g.rowId)}"][data-column-id="${CSS.escape(g.columnId)}"]`);
|
|
5754
|
-
n !== null && (y.current = e,
|
|
5784
|
+
n !== null && (y.current = e, Bo(n));
|
|
5755
5785
|
}, n[5] = g, n[6] = x), a(x);
|
|
5756
5786
|
let S;
|
|
5757
5787
|
if (n[7] !== h || n[8] !== l || n[9] !== m) {
|
|
@@ -5765,7 +5795,7 @@ function os(t) {
|
|
|
5765
5795
|
n[14] === m ? w = n[15] : (w = (e, t) => m[t]?.tempId ?? String(t), n[14] = m, n[15] = w);
|
|
5766
5796
|
let T;
|
|
5767
5797
|
n[16] !== C || n[17] !== w || n[18] !== c.options.columns ? (T = {
|
|
5768
|
-
features:
|
|
5798
|
+
features: pa,
|
|
5769
5799
|
columns: c.options.columns,
|
|
5770
5800
|
data: C,
|
|
5771
5801
|
getRowId: w
|
|
@@ -5775,10 +5805,10 @@ function os(t) {
|
|
|
5775
5805
|
let D;
|
|
5776
5806
|
if (n[20] !== E || n[21] !== i || n[22] !== m || n[23] !== r || n[24] !== o) {
|
|
5777
5807
|
let e = E.getCoreRowModel().rows, t;
|
|
5778
|
-
n[26] === m ? t = n[27] : (t = new Map(m.map(
|
|
5808
|
+
n[26] === m ? t = n[27] : (t = new Map(m.map(us)), n[26] = m, n[27] = t);
|
|
5779
5809
|
let a = t, s;
|
|
5780
5810
|
n[28] !== a || n[29] !== i || n[30] !== r || n[31] !== o ? (s = (e, t) => {
|
|
5781
|
-
let n = new Map(e.getAllCells().map(
|
|
5811
|
+
let n = new Map(e.getAllCells().map(ls)), s = a.get(e.id) === !0;
|
|
5782
5812
|
return /* @__PURE__ */ J("div", {
|
|
5783
5813
|
role: "row",
|
|
5784
5814
|
"data-dg-part": "entry-row",
|
|
@@ -5787,7 +5817,7 @@ function os(t) {
|
|
|
5787
5817
|
"data-committed": s || void 0,
|
|
5788
5818
|
"data-draft": s || void 0,
|
|
5789
5819
|
className: Rt.entryRow,
|
|
5790
|
-
children: r.map((r) => /* @__PURE__ */ J(
|
|
5820
|
+
children: r.map((r) => /* @__PURE__ */ J(as, {
|
|
5791
5821
|
entryRow: e,
|
|
5792
5822
|
column: r,
|
|
5793
5823
|
cell: n.get(r.id),
|
|
@@ -5810,29 +5840,29 @@ function os(t) {
|
|
|
5810
5840
|
let O;
|
|
5811
5841
|
return n[33] === D ? O = n[34] : (O = /* @__PURE__ */ J(fe, { children: D }), n[33] = D, n[34] = O), O;
|
|
5812
5842
|
}
|
|
5813
|
-
function
|
|
5843
|
+
function ls(e) {
|
|
5814
5844
|
return [e.column.id, e];
|
|
5815
5845
|
}
|
|
5816
|
-
function
|
|
5846
|
+
function us(e) {
|
|
5817
5847
|
return [e.tempId, e.committed];
|
|
5818
5848
|
}
|
|
5819
|
-
function
|
|
5849
|
+
function ds(e) {
|
|
5820
5850
|
return e.active !== null && e.newRows.some((t) => t.tempId === e.active?.rowId && !t.committed) ? e.active : null;
|
|
5821
5851
|
}
|
|
5822
|
-
function
|
|
5852
|
+
function fs(e) {
|
|
5823
5853
|
return e.committedValues;
|
|
5824
5854
|
}
|
|
5825
|
-
function
|
|
5855
|
+
function ps(e) {
|
|
5826
5856
|
return !e.committed;
|
|
5827
5857
|
}
|
|
5828
5858
|
//#endregion
|
|
5829
5859
|
//#region src/core/resizePreview.ts
|
|
5830
|
-
var
|
|
5831
|
-
function
|
|
5860
|
+
var ms = 20, hs = 2 ** 53 - 1;
|
|
5861
|
+
function gs(e, t, n) {
|
|
5832
5862
|
let r = Math.round(Math.max(e + e * t, 0) * 100) / 100;
|
|
5833
|
-
return Math.min(Math.max(n.minSize ??
|
|
5863
|
+
return Math.min(Math.max(n.minSize ?? ms, r), n.maxSize ?? hs);
|
|
5834
5864
|
}
|
|
5835
|
-
function*
|
|
5865
|
+
function* _s(e, t, n) {
|
|
5836
5866
|
let r = 0;
|
|
5837
5867
|
for (let i of e) yield {
|
|
5838
5868
|
columnId: i,
|
|
@@ -5840,10 +5870,10 @@ function* hs(e, t, n) {
|
|
|
5840
5870
|
offset: r
|
|
5841
5871
|
}, r += n(i);
|
|
5842
5872
|
}
|
|
5843
|
-
function
|
|
5873
|
+
function vs({ progress: e, tracks: t, boundsOf: n, leftLane: r, rightLane: i }) {
|
|
5844
5874
|
if (e.isResizingColumn === !1 || e.columnSizingStart.length === 0) return null;
|
|
5845
5875
|
let a = e.deltaPercentage ?? 0, o = /* @__PURE__ */ new Map();
|
|
5846
|
-
for (let [t, r] of e.columnSizingStart) o.set(t,
|
|
5876
|
+
for (let [t, r] of e.columnSizingStart) o.set(t, gs(r, a, n(t)));
|
|
5847
5877
|
let s = [], c = 0;
|
|
5848
5878
|
for (let e of t) {
|
|
5849
5879
|
let t = o.get(e.id);
|
|
@@ -5853,12 +5883,12 @@ function gs({ progress: e, tracks: t, boundsOf: n, leftLane: r, rightLane: i })
|
|
|
5853
5883
|
return {
|
|
5854
5884
|
gridTemplateColumns: s.join(" "),
|
|
5855
5885
|
minWidth: c,
|
|
5856
|
-
offsets: [...l(r) ?
|
|
5886
|
+
offsets: [...l(r) ? _s(r, "left", u) : [], ...l(i) ? _s(i, "right", u) : []]
|
|
5857
5887
|
};
|
|
5858
5888
|
}
|
|
5859
5889
|
//#endregion
|
|
5860
5890
|
//#region src/core/cellRange.ts
|
|
5861
|
-
function
|
|
5891
|
+
function ys({ range: e, rowIndexOf: t, columnIndexOf: n }) {
|
|
5862
5892
|
if (e === null) return null;
|
|
5863
5893
|
let r = t(e.anchor.rowId), i = t(e.focus.rowId), a = n(e.anchor.columnId), o = n(e.focus.columnId);
|
|
5864
5894
|
return r < 0 || i < 0 || a < 0 || o < 0 ? null : {
|
|
@@ -5868,14 +5898,14 @@ function _s({ range: e, rowIndexOf: t, columnIndexOf: n }) {
|
|
|
5868
5898
|
right: Math.max(a, o)
|
|
5869
5899
|
};
|
|
5870
5900
|
}
|
|
5871
|
-
function
|
|
5901
|
+
function bs(e, t, n) {
|
|
5872
5902
|
return e !== null && t >= e.top && t <= e.bottom && n >= e.left && n <= e.right;
|
|
5873
5903
|
}
|
|
5874
|
-
function
|
|
5904
|
+
function xs(e) {
|
|
5875
5905
|
return e === null ? 0 : (e.bottom - e.top + 1) * (e.right - e.left + 1);
|
|
5876
5906
|
}
|
|
5877
|
-
function
|
|
5878
|
-
return !
|
|
5907
|
+
function Ss(e, t, n) {
|
|
5908
|
+
return !bs(e, t, n) || e === null ? null : {
|
|
5879
5909
|
top: t === e.top,
|
|
5880
5910
|
bottom: t === e.bottom,
|
|
5881
5911
|
left: n === e.left,
|
|
@@ -5884,7 +5914,7 @@ function bs(e, t, n) {
|
|
|
5884
5914
|
}
|
|
5885
5915
|
//#endregion
|
|
5886
5916
|
//#region src/core/rowPinning.ts
|
|
5887
|
-
function
|
|
5917
|
+
function Cs(e, t) {
|
|
5888
5918
|
let n = e.store.state.rowPinning[t];
|
|
5889
5919
|
if (n.length === 0) return [];
|
|
5890
5920
|
let r = e.getPrePaginatedRowModel().rowsById, i = e.getCoreRowModel().rowsById, a = [];
|
|
@@ -5896,17 +5926,17 @@ function xs(e, t) {
|
|
|
5896
5926
|
}
|
|
5897
5927
|
//#endregion
|
|
5898
5928
|
//#region src/core/matchHighlight.ts
|
|
5899
|
-
var
|
|
5929
|
+
var ws = [
|
|
5900
5930
|
"contains",
|
|
5901
5931
|
"startsWith",
|
|
5902
5932
|
"endsWith"
|
|
5903
5933
|
];
|
|
5904
|
-
function
|
|
5934
|
+
function Ts(e) {
|
|
5905
5935
|
let t = e.store.state, n = typeof t.globalFilter == "string" ? t.globalFilter.trim() : "", r = /* @__PURE__ */ new Map();
|
|
5906
5936
|
for (let e of t.columnFilters) {
|
|
5907
5937
|
if (!bt(e.value)) continue;
|
|
5908
5938
|
let { operator: t, value: n } = e.value;
|
|
5909
|
-
if (!
|
|
5939
|
+
if (!ws.includes(t) || typeof n != "string" || n === "") continue;
|
|
5910
5940
|
let i = r.get(e.id) ?? [];
|
|
5911
5941
|
i.push(n), r.set(e.id, i);
|
|
5912
5942
|
}
|
|
@@ -5920,7 +5950,7 @@ function Cs(e) {
|
|
|
5920
5950
|
}
|
|
5921
5951
|
return i.size > 0 ? i : null;
|
|
5922
5952
|
}
|
|
5923
|
-
function
|
|
5953
|
+
function Es(e, t) {
|
|
5924
5954
|
let n = e.toLowerCase(), r = [];
|
|
5925
5955
|
for (let e of t) {
|
|
5926
5956
|
let t = e.toLowerCase();
|
|
@@ -5942,29 +5972,29 @@ function ws(e, t) {
|
|
|
5942
5972
|
}
|
|
5943
5973
|
//#endregion
|
|
5944
5974
|
//#region src/components/TMDataGridTable.tsx
|
|
5945
|
-
var
|
|
5975
|
+
var Ds = {
|
|
5946
5976
|
pinnedAt: !1,
|
|
5947
5977
|
offset: 0,
|
|
5948
5978
|
isBoundary: !1
|
|
5949
5979
|
};
|
|
5950
|
-
function
|
|
5980
|
+
function Os(e, t) {
|
|
5951
5981
|
return e.querySelector(`[data-cell="true"][data-row-id="${CSS.escape(t.rowId)}"][data-column-id="${CSS.escape(t.columnId)}"]`);
|
|
5952
5982
|
}
|
|
5953
|
-
function
|
|
5983
|
+
function ks({ container: e, cellElement: t, leftPinnedWidth: n, rightPinnedWidth: r }) {
|
|
5954
5984
|
let i = t.getBoundingClientRect(), a = e.getBoundingClientRect(), o = a.left + n, s = a.right - r;
|
|
5955
5985
|
i.left < o ? e.scrollLeft -= o - i.left : i.right > s && (e.scrollLeft += i.right - s);
|
|
5956
5986
|
}
|
|
5957
|
-
function
|
|
5987
|
+
function As(e) {
|
|
5958
5988
|
if (e.getIsPlaceholder()) return null;
|
|
5959
|
-
if (!
|
|
5989
|
+
if (!js(e)) return Fe(e.column.columnDef.cell, e.getContext());
|
|
5960
5990
|
let { aggregatedCell: t } = e.column.columnDef;
|
|
5961
5991
|
return t === void 0 ? e.getIsAggregated() ? Fe(e.column.columnDef.cell, e.getContext()) : null : Fe(t, e.getContext());
|
|
5962
5992
|
}
|
|
5963
|
-
function
|
|
5993
|
+
function js(e) {
|
|
5964
5994
|
return e.row.getIsGrouped() && !e.getIsGrouped();
|
|
5965
5995
|
}
|
|
5966
|
-
function
|
|
5967
|
-
let n =
|
|
5996
|
+
function Ms(e, t) {
|
|
5997
|
+
let n = Es(e, t);
|
|
5968
5998
|
if (n === null) return e;
|
|
5969
5999
|
let r = [], i = 0;
|
|
5970
6000
|
for (let t of n) t.start > i && r.push(e.slice(i, t.start)), r.push(/* @__PURE__ */ J("mark", {
|
|
@@ -5973,7 +6003,7 @@ function As(e, t) {
|
|
|
5973
6003
|
}, t.start)), i = t.end;
|
|
5974
6004
|
return i < e.length && r.push(e.slice(i)), r;
|
|
5975
6005
|
}
|
|
5976
|
-
function
|
|
6006
|
+
function Ns(t) {
|
|
5977
6007
|
let n = e(59), { cell: r, rowHeight: i, layout: a, nav: o, editor: s, contentOverride: c, highlightNeedles: l, onFocus: u, onClick: d, onMouseDown: f, onMouseEnter: p, onDoubleClick: m, onContextMenu: h } = t, { table: g, edit: _ } = $(), v;
|
|
5978
6008
|
n[0] === r.column ? v = n[1] : (v = Ut(r.column), n[0] = r.column, n[1] = v);
|
|
5979
6009
|
let y = v, b = r.row.id, x;
|
|
@@ -5996,7 +6026,7 @@ function js(t) {
|
|
|
5996
6026
|
}, n[10] = b, n[11] = S, n[12] = D) : D = n[12];
|
|
5997
6027
|
let O = M(_.store, D), k = o ? "gridcell" : "cell", A = o?.columnIndex, j = o?.tabIndex, N = o ? !0 : void 0, P = r.row.id, F = r.column.id, I = o?.focused || void 0, L = o?.selected, R = o?.selected || void 0, z = o?.edges?.top || void 0, B = o?.edges?.bottom || void 0, V = o?.edges?.left || void 0, H = o?.edges?.right || void 0, U = s !== void 0 || void 0, W = w || void 0, ee = E || void 0, G;
|
|
5998
6028
|
n[13] === r.column ? G = n[14] : (G = zn(r.column), n[13] = r.column, n[14] = G);
|
|
5999
|
-
let te = S || void 0, ne = a.isBoundary && a.pinnedAt === "left" ?
|
|
6029
|
+
let te = S || void 0, ne = a.isBoundary && a.pinnedAt === "left" ? Qa.stickyLeft : "", re = a.isBoundary && a.pinnedAt === "right" ? Qa.stickyRight : "", ie;
|
|
6000
6030
|
n[15] !== ne || n[16] !== re ? (ie = [
|
|
6001
6031
|
Rt.bodyCell,
|
|
6002
6032
|
ne,
|
|
@@ -6014,12 +6044,12 @@ function js(t) {
|
|
|
6014
6044
|
n[24] !== r || n[25] !== c || n[26] !== O || n[27] !== s || n[28] !== l || n[29] !== g ? (le = s ?? /* @__PURE__ */ J("span", {
|
|
6015
6045
|
className: Rt.cellContent,
|
|
6016
6046
|
children: (() => {
|
|
6017
|
-
let e = O !== void 0 && c === void 0 && !r.getIsPlaceholder() && !
|
|
6018
|
-
if (l !== void 0 && c === void 0 && !r.getIsPlaceholder() && !
|
|
6047
|
+
let e = O !== void 0 && c === void 0 && !r.getIsPlaceholder() && !js(r) ? rs(r, O) : void 0;
|
|
6048
|
+
if (l !== void 0 && c === void 0 && !r.getIsPlaceholder() && !js(r) && r.column.columnDef.cell === g.getDefaultColumnDef().cell) {
|
|
6019
6049
|
let t = e === void 0 ? r.renderValue() : e.renderValue();
|
|
6020
|
-
if (typeof t == "string" || typeof t == "number") return
|
|
6050
|
+
if (typeof t == "string" || typeof t == "number") return Ms(String(t), l);
|
|
6021
6051
|
}
|
|
6022
|
-
return e === void 0 ? c ??
|
|
6052
|
+
return e === void 0 ? c ?? As(r) : Fe(r.column.columnDef.cell, e);
|
|
6023
6053
|
})()
|
|
6024
6054
|
}), n[24] = r, n[25] = c, n[26] = O, n[27] = s, n[28] = l, n[29] = g, n[30] = le) : le = n[30];
|
|
6025
6055
|
let ue;
|
|
@@ -6053,7 +6083,7 @@ function js(t) {
|
|
|
6053
6083
|
children: le
|
|
6054
6084
|
}), n[31] = r.column.id, n[32] = r.row.id, n[33] = d, n[34] = h, n[35] = m, n[36] = u, n[37] = f, n[38] = p, n[39] = I, n[40] = L, n[41] = R, n[42] = z, n[43] = B, n[44] = V, n[45] = H, n[46] = U, n[47] = W, n[48] = ee, n[49] = G, n[50] = te, n[51] = ae, n[52] = q, n[53] = le, n[54] = k, n[55] = A, n[56] = j, n[57] = N, n[58] = ue) : ue = n[58], ue;
|
|
6055
6085
|
}
|
|
6056
|
-
function
|
|
6086
|
+
function Ps(t) {
|
|
6057
6087
|
let n = e(16), { enabled: r, menuContent: i, menuProps: a, onContextMenu: o, onClose: s, children: c } = t, l;
|
|
6058
6088
|
n[0] === Symbol.for("react.memo_cache_sentinel") ? (l = { display: "contents" }, n[0] = l) : l = n[0];
|
|
6059
6089
|
let u = r ? o : void 0, d;
|
|
@@ -6084,10 +6114,10 @@ function Ms(t) {
|
|
|
6084
6114
|
children: [h, g]
|
|
6085
6115
|
}), n[10] = a, n[11] = p, n[12] = m, n[13] = h, n[14] = g, n[15] = v) : v = n[15], v;
|
|
6086
6116
|
}
|
|
6087
|
-
function
|
|
6117
|
+
function Fs({ onRowClick: e, onCellClick: t, onCellDoubleClick: r, onCellContextMenu: l, rowClassName: u, rowStyle: d, striped: f = !1, onScrollToTop: m, onScrollToBottom: h, onScrollToLeft: v, onScrollToRight: y, renderEmptyState: b, renderRowContextMenu: x, renderColumnMenuItems: S, rowContextMenuProps: C, onReachEnd: w, reachEndThreshold: T = 10, "aria-label": E, "aria-labelledby": O }) {
|
|
6088
6118
|
let { table: k, ui: A, edit: j, features: N, filters: P, exportOptions: F, labels: I, rowHeight: L, controlSize: R, renderDetails: z, renderDetailsEstHeight: B, overscan: V, scrollerRef: H } = $();
|
|
6089
|
-
|
|
6090
|
-
let U = M(A, (e) => e.highlightedRowId), W = M(A, (e) => e.focusedCell), ee = M(A, (e) => e.cellRange), G = M(j.store, (e) => e.active), te = M(j.store, (e) => e.openRowIds), ne = M(j.store, (e) => e.newRows), re = ne.length, ie = M(j.store, (e) => e.deletedRowIds), ae = M(j.store, (e) => e.openRowIds.filter((t) => (e.rows[t]?.dirtyFields.length ?? 0) > 0)), oe = M(j.store, (e) => e.committedRowIds), se = o(() => new Set(te), [te]), K = o(() => new Set(ae), [ae]), ce = o(() => new Set(oe), [oe]), q = o(() => new Set(ne.map((e) => e.tempId)), [ne]), { loading: ue, noResultsLabel: de = I.noResults } = k.options.meta ?? {}, pe = s(null), X = Cn(k, N), me = N.matchHighlighting ?
|
|
6119
|
+
Oa(k.store);
|
|
6120
|
+
let U = M(A, (e) => e.highlightedRowId), W = M(A, (e) => e.focusedCell), ee = M(A, (e) => e.cellRange), G = M(j.store, (e) => e.active), te = M(j.store, (e) => e.openRowIds), ne = M(j.store, (e) => e.newRows), re = ne.length, ie = M(j.store, (e) => e.deletedRowIds), ae = M(j.store, (e) => e.openRowIds.filter((t) => (e.rows[t]?.dirtyFields.length ?? 0) > 0)), oe = M(j.store, (e) => e.committedRowIds), se = o(() => new Set(te), [te]), K = o(() => new Set(ae), [ae]), ce = o(() => new Set(oe), [oe]), q = o(() => new Set(ne.map((e) => e.tempId)), [ne]), { loading: ue, noResultsLabel: de = I.noResults } = k.options.meta ?? {}, pe = s(null), X = Cn(k, N), me = N.matchHighlighting ? Ts(k) : null, Z = N.rowPinning ? Cs(k, "top") : [], he = N.rowPinning ? Cs(k, "bottom") : [], ge = Z.length + he.length, _e = null;
|
|
6091
6121
|
if (N.rowNumbers) {
|
|
6092
6122
|
_e = /* @__PURE__ */ new Map();
|
|
6093
6123
|
let e = wn(k, N) ? k.store.state.pagination.pageIndex * k.store.state.pagination.pageSize : 0;
|
|
@@ -6104,14 +6134,14 @@ function Ns({ onRowClick: e, onCellClick: t, onCellDoubleClick: r, onCellContext
|
|
|
6104
6134
|
t.delete(n);
|
|
6105
6135
|
continue;
|
|
6106
6136
|
}
|
|
6107
|
-
|
|
6137
|
+
yo(e, n) && (xo({
|
|
6108
6138
|
table: k,
|
|
6109
6139
|
columnId: n,
|
|
6110
6140
|
container: e
|
|
6111
6141
|
}), t.delete(n));
|
|
6112
6142
|
}
|
|
6113
6143
|
});
|
|
6114
|
-
let be = s(null), xe = P.inHeader &&
|
|
6144
|
+
let be = s(null), xe = P.inHeader && di(k, N).canFilterAny, Se = k.getCenterHeaderGroups().length, Ce = s(null), [we, Te] = c(0), [Ee, De] = c(0), [Oe, ke] = c(0);
|
|
6115
6145
|
i(() => {
|
|
6116
6146
|
let e = be.current;
|
|
6117
6147
|
if (e === null) return;
|
|
@@ -6227,7 +6257,7 @@ function Ns({ onRowClick: e, onCellClick: t, onCellDoubleClick: r, onCellContext
|
|
|
6227
6257
|
offset: 0,
|
|
6228
6258
|
isBoundary: !1
|
|
6229
6259
|
});
|
|
6230
|
-
let tt = (e) => Xe.get(e) ??
|
|
6260
|
+
let tt = (e) => Xe.get(e) ?? Ds, nt = s({
|
|
6231
6261
|
tracks: qe,
|
|
6232
6262
|
leftLane: [],
|
|
6233
6263
|
rightLane: []
|
|
@@ -6242,7 +6272,7 @@ function Ns({ onRowClick: e, onCellClick: t, onCellDoubleClick: r, onCellContext
|
|
|
6242
6272
|
let e = be.current;
|
|
6243
6273
|
if (!e) return;
|
|
6244
6274
|
let t = "", n = k.store.subscribe((n) => {
|
|
6245
|
-
let r =
|
|
6275
|
+
let r = vs({
|
|
6246
6276
|
progress: n.columnResizing,
|
|
6247
6277
|
boundsOf: (e) => k.getColumn(e)?.columnDef ?? {},
|
|
6248
6278
|
...nt.current
|
|
@@ -6298,117 +6328,119 @@ function Ns({ onRowClick: e, onCellClick: t, onCellDoubleClick: r, onCellContext
|
|
|
6298
6328
|
row: t,
|
|
6299
6329
|
column: e.column,
|
|
6300
6330
|
event: n
|
|
6301
|
-
}), gt = N.cellSelection, _t = N.cellRangeSelection, vt = s(!1), yt = s(null), bt = s(null), xt = s(null), St = s(!1), Ct =
|
|
6302
|
-
|
|
6331
|
+
}), gt = N.cellSelection, _t = N.cellRangeSelection, vt = s(!1), yt = s(null), bt = s(null), xt = s(null), St = s(!1), Ct = (e) => {
|
|
6332
|
+
for (let t of [bt.current, xt.current]) t !== null && (t.style.top = `${e.scrollTop}px`, t.style.left = `${e.scrollLeft}px`);
|
|
6333
|
+
}, wt = gt && W !== null ? X.findIndex((e) => e.id === W.rowId) : -1, Tt = gt && W !== null ? Ve.findIndex((e) => e.id === W.columnId) : -1, Et = wt >= 0 && Q.some((e) => e.index === wt), Dt = X[Q[0]?.index ?? -1], Ot = gt ? Et && W !== null ? W : Dt && Ve[0] ? {
|
|
6334
|
+
rowId: Dt.id,
|
|
6303
6335
|
columnId: Ve[0].id
|
|
6304
|
-
} : null : null,
|
|
6336
|
+
} : null : null, kt = () => {
|
|
6305
6337
|
if (St.current) {
|
|
6306
6338
|
St.current = !1;
|
|
6307
6339
|
return;
|
|
6308
6340
|
}
|
|
6309
|
-
if (
|
|
6310
|
-
vt.current = !0, A.actions.setFocusedCell(
|
|
6341
|
+
if (Ot === null) return;
|
|
6342
|
+
vt.current = !0, A.actions.setFocusedCell(Ot);
|
|
6311
6343
|
let e = pe.current;
|
|
6312
|
-
e !== null &&
|
|
6313
|
-
},
|
|
6344
|
+
e !== null && Os(e, Ot)?.focus({ preventScroll: !0 });
|
|
6345
|
+
}, At = (e, t, n) => e !== null && e.rowId === t && e.columnId === n, jt = ys({
|
|
6314
6346
|
range: _t ? ee : null,
|
|
6315
6347
|
rowIndexOf: (e) => X.findIndex((t) => t.id === e),
|
|
6316
6348
|
columnIndexOf: (e) => Ve.findIndex((t) => t.id === e)
|
|
6317
|
-
}),
|
|
6349
|
+
}), Mt = (e, { extend: t }) => {
|
|
6318
6350
|
if (!_t) return;
|
|
6319
6351
|
let n = t ? ee?.anchor ?? e : e;
|
|
6320
6352
|
A.actions.setCellRange({
|
|
6321
6353
|
anchor: n,
|
|
6322
6354
|
focus: e
|
|
6323
6355
|
});
|
|
6324
|
-
},
|
|
6325
|
-
top:
|
|
6326
|
-
bottom:
|
|
6327
|
-
left:
|
|
6328
|
-
right:
|
|
6329
|
-
} : null),
|
|
6356
|
+
}, Nt = jt ?? (gt && wt >= 0 && Tt >= 0 ? {
|
|
6357
|
+
top: wt,
|
|
6358
|
+
bottom: wt,
|
|
6359
|
+
left: Tt,
|
|
6360
|
+
right: Tt
|
|
6361
|
+
} : null), Pt = xs(Nt), Ft = Nt === null ? 0 : Ve.slice(Nt.left, Nt.right + 1).filter((e) => !Vn(e.id) && e.columnDef.meta?.enableExport !== !1).length, It = Ji(F), [Lt, zt] = c(It.includeHeaders), Bt = () => Nt === null ? null : na({
|
|
6330
6362
|
table: k,
|
|
6331
6363
|
rows: X,
|
|
6332
|
-
bounds:
|
|
6333
|
-
}),
|
|
6334
|
-
let e =
|
|
6335
|
-
e === null || e.columnIds.length === 0 || await
|
|
6336
|
-
}, [
|
|
6364
|
+
bounds: Nt
|
|
6365
|
+
}), Vt = async () => {
|
|
6366
|
+
let e = Bt();
|
|
6367
|
+
e === null || e.columnIds.length === 0 || await oa(aa(e, { decimalComma: It.format.decimalComma }));
|
|
6368
|
+
}, [Ht, Ut] = c(!1);
|
|
6337
6369
|
i(() => {
|
|
6338
|
-
if (!
|
|
6339
|
-
let e = () =>
|
|
6370
|
+
if (!Ht) return;
|
|
6371
|
+
let e = () => Ut(!1), t = be.current?.ownerDocument.defaultView ?? window;
|
|
6340
6372
|
return t.addEventListener("mouseup", e), () => t.removeEventListener("mouseup", e);
|
|
6341
|
-
}, [
|
|
6342
|
-
let
|
|
6343
|
-
A.actions.setFocusedCell(e),
|
|
6344
|
-
},
|
|
6345
|
-
let e =
|
|
6346
|
-
e === null || e.columnIds.length === 0 ||
|
|
6347
|
-
...
|
|
6348
|
-
includeHeaders:
|
|
6373
|
+
}, [Ht]);
|
|
6374
|
+
let Wt = (e, { extend: t }) => {
|
|
6375
|
+
A.actions.setFocusedCell(e), Mt(e, { extend: t }), t || Ut(!0);
|
|
6376
|
+
}, Gt = () => {
|
|
6377
|
+
let e = Bt();
|
|
6378
|
+
e === null || e.columnIds.length === 0 || ra(e, {
|
|
6379
|
+
...It,
|
|
6380
|
+
includeHeaders: Lt
|
|
6349
6381
|
});
|
|
6350
|
-
},
|
|
6382
|
+
}, Kt = (e, { extend: t } = { extend: !1 }) => {
|
|
6351
6383
|
let n = X[e.rowIndex], r = Ve[e.columnIndex];
|
|
6352
6384
|
if (!n || !r) return;
|
|
6353
6385
|
let i = {
|
|
6354
6386
|
rowId: n.id,
|
|
6355
6387
|
columnId: r.id
|
|
6356
6388
|
};
|
|
6357
|
-
vt.current = !0, A.actions.setFocusedCell(i),
|
|
6358
|
-
},
|
|
6359
|
-
let e =
|
|
6360
|
-
return
|
|
6361
|
-
},
|
|
6389
|
+
vt.current = !0, A.actions.setFocusedCell(i), Mt(i, { extend: t });
|
|
6390
|
+
}, qt = s(void 0), Jt = () => {
|
|
6391
|
+
let e = qt.current;
|
|
6392
|
+
return qt.current = void 0, e;
|
|
6393
|
+
}, Yt = (e) => {
|
|
6362
6394
|
let t = X.find((t) => t.id === e);
|
|
6363
6395
|
return t === void 0 ? null : [
|
|
6364
6396
|
...t.getStartVisibleCells(),
|
|
6365
6397
|
...t.getCenterVisibleCells(),
|
|
6366
6398
|
...t.getEndVisibleCells()
|
|
6367
6399
|
].find((e) => j.canEditCell(t, e.column))?.column.id ?? null;
|
|
6368
|
-
},
|
|
6400
|
+
}, Xt = s(null);
|
|
6369
6401
|
a(() => {
|
|
6370
6402
|
if (G === null) {
|
|
6371
|
-
|
|
6403
|
+
Xt.current = null;
|
|
6372
6404
|
return;
|
|
6373
6405
|
}
|
|
6374
|
-
if (
|
|
6406
|
+
if (Xt.current === G) return;
|
|
6375
6407
|
let e = pe.current;
|
|
6376
6408
|
if (e === null) return;
|
|
6377
|
-
let t = G.columnId ??
|
|
6409
|
+
let t = G.columnId ?? Yt(G.rowId);
|
|
6378
6410
|
if (t === null) {
|
|
6379
|
-
|
|
6411
|
+
Xt.current = G;
|
|
6380
6412
|
return;
|
|
6381
6413
|
}
|
|
6382
6414
|
let n = e.querySelector(`[data-dg-part="editor"][data-row-id="${CSS.escape(G.rowId)}"][data-column-id="${CSS.escape(t)}"]`);
|
|
6383
|
-
n !== null && (
|
|
6415
|
+
n !== null && (Xt.current = G, Bo(n));
|
|
6384
6416
|
});
|
|
6385
|
-
let
|
|
6417
|
+
let Zt = (e) => {
|
|
6386
6418
|
let t = pe.current;
|
|
6387
|
-
t !== null && (vt.current = !0,
|
|
6388
|
-
},
|
|
6419
|
+
t !== null && (vt.current = !0, Os(t, e)?.focus());
|
|
6420
|
+
}, Qt = (e) => {
|
|
6389
6421
|
gt && A.actions.setFocusedCell(e), j.begin({
|
|
6390
6422
|
rowId: e.rowId,
|
|
6391
6423
|
columnId: e.columnId
|
|
6392
6424
|
});
|
|
6393
|
-
},
|
|
6425
|
+
}, $t = (e, t) => {
|
|
6394
6426
|
let n = t.via === "enter" ? "down" : t.via === "tab" || t.via === "defer-tab" ? 1 : t.via === "shift-tab" || t.via === "defer-shift-tab" ? -1 : null;
|
|
6395
6427
|
if (n === null || N.editMode === "row") {
|
|
6396
|
-
|
|
6428
|
+
Zt(e);
|
|
6397
6429
|
return;
|
|
6398
6430
|
}
|
|
6399
6431
|
let r = X.findIndex((t) => t.id === e.rowId), i = Ve.findIndex((t) => t.id === e.columnId);
|
|
6400
6432
|
if (r < 0 || i < 0) {
|
|
6401
|
-
|
|
6433
|
+
Zt(e);
|
|
6402
6434
|
return;
|
|
6403
6435
|
}
|
|
6404
6436
|
if (n === "down") {
|
|
6405
|
-
r + 1 < X.length ?
|
|
6437
|
+
r + 1 < X.length ? Kt({
|
|
6406
6438
|
rowIndex: r + 1,
|
|
6407
6439
|
columnIndex: i
|
|
6408
|
-
}) :
|
|
6440
|
+
}) : Zt(e);
|
|
6409
6441
|
return;
|
|
6410
6442
|
}
|
|
6411
|
-
let a =
|
|
6443
|
+
let a = mi({
|
|
6412
6444
|
from: {
|
|
6413
6445
|
rowIndex: r,
|
|
6414
6446
|
columnIndex: i
|
|
@@ -6421,8 +6453,8 @@ function Ns({ onRowClick: e, onCellClick: t, onCellDoubleClick: r, onCellContext
|
|
|
6421
6453
|
return t !== void 0 && n !== void 0 && j.canEditCell(t, n);
|
|
6422
6454
|
}
|
|
6423
6455
|
});
|
|
6424
|
-
a === null ?
|
|
6425
|
-
},
|
|
6456
|
+
a === null ? Zt(e) : Kt(a);
|
|
6457
|
+
}, en = (e, { extend: t }) => {
|
|
6426
6458
|
if (N.rowSelection && Tn(e).length > 0) {
|
|
6427
6459
|
let n = En({
|
|
6428
6460
|
rows: X,
|
|
@@ -6439,12 +6471,12 @@ function Ns({ onRowClick: e, onCellClick: t, onCellDoubleClick: r, onCellContext
|
|
|
6439
6471
|
return;
|
|
6440
6472
|
}
|
|
6441
6473
|
N.highlightRow && !e.getIsGrouped() && A.actions.setHighlightedRow(e.id);
|
|
6442
|
-
},
|
|
6474
|
+
}, tn = (e) => {
|
|
6443
6475
|
let t = e.target, n = t.dataset.cell === "true" ? t : t.closest("[data-cell=\"true\"]");
|
|
6444
6476
|
if (n === null) return;
|
|
6445
6477
|
if (e.key === "Tab") {
|
|
6446
6478
|
if (t.dataset.cell !== "true") {
|
|
6447
|
-
let r = n.closest("[data-dg-part=\"row\"]"), i = r === null ? [] : Array.from(r.querySelectorAll(
|
|
6479
|
+
let r = n.closest("[data-dg-part=\"row\"]"), i = r === null ? [] : Array.from(r.querySelectorAll(zo)).filter((e) => e.tabIndex >= 0), a = i.indexOf(t);
|
|
6448
6480
|
if (a < 0) return;
|
|
6449
6481
|
let o = i[a + (e.shiftKey ? -1 : 1)];
|
|
6450
6482
|
if (o !== void 0) {
|
|
@@ -6453,11 +6485,11 @@ function Ns({ onRowClick: e, onCellClick: t, onCellDoubleClick: r, onCellContext
|
|
|
6453
6485
|
}
|
|
6454
6486
|
let s = X.findIndex((e) => e.id === n.dataset.rowId), c = s + (e.shiftKey ? -1 : 1), l = s < 0 ? void 0 : X[c], u = e.shiftKey ? Ve[Ve.length - 1] : Ve[0];
|
|
6455
6487
|
if (l !== void 0 && u !== void 0) {
|
|
6456
|
-
e.preventDefault(),
|
|
6488
|
+
e.preventDefault(), Kt({
|
|
6457
6489
|
rowIndex: c,
|
|
6458
6490
|
columnIndex: e.shiftKey ? Ve.length - 1 : 0
|
|
6459
6491
|
});
|
|
6460
|
-
let n = pe.current, r = n === null ? null :
|
|
6492
|
+
let n = pe.current, r = n === null ? null : Os(n, {
|
|
6461
6493
|
rowId: l.id,
|
|
6462
6494
|
columnId: u.id
|
|
6463
6495
|
});
|
|
@@ -6481,14 +6513,14 @@ function Ns({ onRowClick: e, onCellClick: t, onCellDoubleClick: r, onCellContext
|
|
|
6481
6513
|
let a = X.findIndex((e) => e.id === r), o = Ve.findIndex((e) => e.id === i);
|
|
6482
6514
|
if (a < 0 || o < 0) return;
|
|
6483
6515
|
if ((e.ctrlKey || e.metaKey) && (e.key === "c" || e.key === "C")) {
|
|
6484
|
-
if (
|
|
6485
|
-
e.preventDefault(),
|
|
6516
|
+
if (Nt === null) return;
|
|
6517
|
+
e.preventDefault(), Vt();
|
|
6486
6518
|
return;
|
|
6487
6519
|
}
|
|
6488
6520
|
let s = X[a], c = Ve[o];
|
|
6489
6521
|
if (N.editing && s !== void 0 && c !== void 0 && j.canEditCell(s, c)) {
|
|
6490
6522
|
if (e.key === "Enter" || e.key === "F2") {
|
|
6491
|
-
e.preventDefault(),
|
|
6523
|
+
e.preventDefault(), Qt({
|
|
6492
6524
|
rowId: r,
|
|
6493
6525
|
columnId: i
|
|
6494
6526
|
});
|
|
@@ -6496,14 +6528,14 @@ function Ns({ onRowClick: e, onCellClick: t, onCellDoubleClick: r, onCellContext
|
|
|
6496
6528
|
}
|
|
6497
6529
|
if (N.editMode !== "row") {
|
|
6498
6530
|
if (e.key === "Delete" || e.key === "Backspace") {
|
|
6499
|
-
e.preventDefault(), j.clearCell(r, i).then(() =>
|
|
6531
|
+
e.preventDefault(), j.clearCell(r, i).then(() => Zt({
|
|
6500
6532
|
rowId: r,
|
|
6501
6533
|
columnId: i
|
|
6502
6534
|
}));
|
|
6503
6535
|
return;
|
|
6504
6536
|
}
|
|
6505
6537
|
if (e.key.length === 1 && e.key !== " " && !e.ctrlKey && !e.metaKey && !e.altKey) {
|
|
6506
|
-
e.preventDefault(),
|
|
6538
|
+
e.preventDefault(), qt.current = e.key, Qt({
|
|
6507
6539
|
rowId: r,
|
|
6508
6540
|
columnId: i
|
|
6509
6541
|
});
|
|
@@ -6512,14 +6544,14 @@ function Ns({ onRowClick: e, onCellClick: t, onCellDoubleClick: r, onCellContext
|
|
|
6512
6544
|
}
|
|
6513
6545
|
}
|
|
6514
6546
|
if (e.key === "Enter" || e.key === "F2") {
|
|
6515
|
-
let n = t.querySelector(
|
|
6547
|
+
let n = t.querySelector(zo);
|
|
6516
6548
|
if (n === null) return;
|
|
6517
6549
|
e.preventDefault(), n.focus();
|
|
6518
6550
|
return;
|
|
6519
6551
|
}
|
|
6520
6552
|
if (e.key === "Escape") {
|
|
6521
6553
|
if (ee === null) return;
|
|
6522
|
-
e.preventDefault(),
|
|
6554
|
+
e.preventDefault(), Mt({
|
|
6523
6555
|
rowId: r,
|
|
6524
6556
|
columnId: i
|
|
6525
6557
|
}, { extend: !1 });
|
|
@@ -6528,10 +6560,10 @@ function Ns({ onRowClick: e, onCellClick: t, onCellDoubleClick: r, onCellContext
|
|
|
6528
6560
|
if (e.key === " ") {
|
|
6529
6561
|
e.preventDefault();
|
|
6530
6562
|
let t = X[a];
|
|
6531
|
-
t &&
|
|
6563
|
+
t && en(t, { extend: e.shiftKey });
|
|
6532
6564
|
return;
|
|
6533
6565
|
}
|
|
6534
|
-
let l =
|
|
6566
|
+
let l = pi({
|
|
6535
6567
|
key: e.key,
|
|
6536
6568
|
ctrlKey: e.ctrlKey || e.metaKey,
|
|
6537
6569
|
from: {
|
|
@@ -6542,91 +6574,91 @@ function Ns({ onRowClick: e, onCellClick: t, onCellDoubleClick: r, onCellContext
|
|
|
6542
6574
|
columnCount: Ve.length,
|
|
6543
6575
|
pageRows: Math.max(1, Math.floor((pe.current?.clientHeight ?? 0) / L) - 1)
|
|
6544
6576
|
});
|
|
6545
|
-
l !== null && (e.preventDefault(), !(l.rowIndex === a && l.columnIndex === o) &&
|
|
6577
|
+
l !== null && (e.preventDefault(), !(l.rowIndex === a && l.columnIndex === o) && Kt(l, { extend: e.shiftKey && _t }));
|
|
6546
6578
|
};
|
|
6547
6579
|
i(() => {
|
|
6548
6580
|
if (!gt) return;
|
|
6549
6581
|
let e = pe.current;
|
|
6550
6582
|
if (e === null) return;
|
|
6551
|
-
if (W !== yt.current && (yt.current = W,
|
|
6583
|
+
if (W !== yt.current && (yt.current = W, wt >= 0 && Ae.scrollToIndex(wt, { align: "auto" })), W === null) {
|
|
6552
6584
|
vt.current = !1;
|
|
6553
6585
|
return;
|
|
6554
6586
|
}
|
|
6555
6587
|
let t = e.ownerDocument.activeElement;
|
|
6556
6588
|
if (!vt.current && !e.contains(t) || !vt.current && t !== null && t.closest("[data-dg-part=\"tab-guard\"]") !== null) return;
|
|
6557
|
-
let n =
|
|
6558
|
-
n !== null && (vt.current = !1, !n.contains(t) && (t !== null && t.closest("[data-dg-part=\"editor\"]") !== null || (n.focus({ preventScroll: !0 }), tt(W.columnId).pinnedAt === !1 &&
|
|
6589
|
+
let n = Os(e, W);
|
|
6590
|
+
n !== null && (vt.current = !1, !n.contains(t) && (t !== null && t.closest("[data-dg-part=\"editor\"]") !== null || (n.focus({ preventScroll: !0 }), tt(W.columnId).pinnedAt === !1 && ks({
|
|
6559
6591
|
container: e,
|
|
6560
6592
|
cellElement: n,
|
|
6561
6593
|
leftPinnedWidth: $e,
|
|
6562
6594
|
rightPinnedWidth: et
|
|
6563
6595
|
}))));
|
|
6564
6596
|
});
|
|
6565
|
-
let [
|
|
6566
|
-
let e =
|
|
6567
|
-
if (
|
|
6597
|
+
let [nn, rn] = c(null), an = () => rn(null), on = s(null), sn = s(null), cn = () => {
|
|
6598
|
+
let e = on.current, t = sn.current;
|
|
6599
|
+
if (on.current = null, sn.current = null, gt && e !== null && t !== null) {
|
|
6568
6600
|
let n = X.findIndex((t) => t.id === e), r = Ve.findIndex((e) => e.id === t);
|
|
6569
|
-
n >= 0 && !
|
|
6601
|
+
n >= 0 && !bs(Nt, n, r) && (A.actions.setFocusedCell({
|
|
6570
6602
|
rowId: e,
|
|
6571
6603
|
columnId: t
|
|
6572
|
-
}),
|
|
6604
|
+
}), Mt({
|
|
6573
6605
|
rowId: e,
|
|
6574
6606
|
columnId: t
|
|
6575
6607
|
}, { extend: !1 }));
|
|
6576
6608
|
}
|
|
6577
|
-
|
|
6609
|
+
rn(e === null ? null : {
|
|
6578
6610
|
rowId: e,
|
|
6579
6611
|
columnId: t
|
|
6580
6612
|
});
|
|
6581
|
-
},
|
|
6582
|
-
/* @__PURE__ */ J(_.Label, { children: I.cellCount(
|
|
6613
|
+
}, ln = nn === null ? void 0 : X.find((e) => e.id === nn.rowId) ?? Z.find((e) => e.id === nn.rowId) ?? he.find((e) => e.id === nn.rowId), un = x !== void 0 && nn !== null && ln !== void 0 && !ln.getIsGrouped(), dn = _t && nn !== null && Nt !== null ? /* @__PURE__ */ Y(fe, { children: [
|
|
6614
|
+
/* @__PURE__ */ J(_.Label, { children: I.cellCount(Pt) }),
|
|
6583
6615
|
/* @__PURE__ */ J(_.Item, {
|
|
6584
|
-
disabled:
|
|
6585
|
-
onClick: () => void
|
|
6616
|
+
disabled: Ft === 0,
|
|
6617
|
+
onClick: () => void Vt(),
|
|
6586
6618
|
children: I.copy
|
|
6587
6619
|
}),
|
|
6588
6620
|
/* @__PURE__ */ J(_.Item, {
|
|
6589
|
-
disabled:
|
|
6590
|
-
onClick:
|
|
6621
|
+
disabled: Ft === 0,
|
|
6622
|
+
onClick: Gt,
|
|
6591
6623
|
children: I.exportCells
|
|
6592
6624
|
}),
|
|
6593
6625
|
/* @__PURE__ */ J(_.Item, {
|
|
6594
6626
|
closeMenuOnClick: !1,
|
|
6595
|
-
onClick: () =>
|
|
6627
|
+
onClick: () => zt((e) => !e),
|
|
6596
6628
|
children: /* @__PURE__ */ J(p, {
|
|
6597
6629
|
size: "xs",
|
|
6598
|
-
checked:
|
|
6630
|
+
checked: Lt,
|
|
6599
6631
|
label: I.includeHeaders,
|
|
6600
6632
|
readOnly: !0,
|
|
6601
6633
|
styles: { input: { cursor: "pointer" } }
|
|
6602
6634
|
})
|
|
6603
6635
|
})
|
|
6604
|
-
] }) : null,
|
|
6636
|
+
] }) : null, fn = !1, pn = un ? x({
|
|
6605
6637
|
table: k,
|
|
6606
|
-
row:
|
|
6607
|
-
cell:
|
|
6608
|
-
close:
|
|
6638
|
+
row: ln,
|
|
6639
|
+
cell: ln?.getAllCells().find((e) => e.column.id === nn?.columnId) ?? null,
|
|
6640
|
+
close: an,
|
|
6609
6641
|
get internalItems() {
|
|
6610
|
-
return
|
|
6642
|
+
return fn = !0, dn;
|
|
6611
6643
|
}
|
|
6612
|
-
}) ?? null : null,
|
|
6613
|
-
|
|
6614
|
-
|
|
6615
|
-
|
|
6616
|
-
] }),
|
|
6644
|
+
}) ?? null : null, mn = fn ? pn : dn === null && pn === null ? null : /* @__PURE__ */ Y(fe, { children: [
|
|
6645
|
+
dn,
|
|
6646
|
+
dn !== null && pn !== null && /* @__PURE__ */ J(_.Divider, {}),
|
|
6647
|
+
pn
|
|
6648
|
+
] }), hn = s({
|
|
6617
6649
|
top: !0,
|
|
6618
6650
|
bottom: !1,
|
|
6619
6651
|
left: !0,
|
|
6620
6652
|
right: !1
|
|
6621
|
-
}),
|
|
6622
|
-
if (
|
|
6653
|
+
}), gn = m !== void 0 || h !== void 0 || v !== void 0 || y !== void 0, _n = nn || gn || gt ? (e) => {
|
|
6654
|
+
if (gt && Ct(e.currentTarget), nn && an(), !gn) return;
|
|
6623
6655
|
let t = e.currentTarget, n = {
|
|
6624
6656
|
top: t.scrollTop <= 1,
|
|
6625
6657
|
bottom: t.scrollTop + t.clientHeight >= t.scrollHeight - 1,
|
|
6626
6658
|
left: t.scrollLeft <= 1,
|
|
6627
6659
|
right: t.scrollLeft + t.clientWidth >= t.scrollWidth - 1
|
|
6628
|
-
}, r =
|
|
6629
|
-
|
|
6660
|
+
}, r = hn.current;
|
|
6661
|
+
hn.current = n, n.top && !r.top && m?.(), n.bottom && !r.bottom && h?.(), n.left && !r.left && v?.(), n.right && !r.right && y?.();
|
|
6630
6662
|
} : void 0;
|
|
6631
6663
|
return /* @__PURE__ */ Y("div", {
|
|
6632
6664
|
ref: Ce,
|
|
@@ -6637,7 +6669,7 @@ function Ns({ onRowClick: e, onCellClick: t, onCellDoubleClick: r, onCellContext
|
|
|
6637
6669
|
ref: pe,
|
|
6638
6670
|
className: Rt.scrollContainer,
|
|
6639
6671
|
"data-dg-scroll-container": !0,
|
|
6640
|
-
onScroll:
|
|
6672
|
+
onScroll: _n,
|
|
6641
6673
|
children: /* @__PURE__ */ Y("div", {
|
|
6642
6674
|
ref: be,
|
|
6643
6675
|
role: gt ? "grid" : "table",
|
|
@@ -6645,8 +6677,8 @@ function Ns({ onRowClick: e, onCellClick: t, onCellDoubleClick: r, onCellContext
|
|
|
6645
6677
|
"aria-labelledby": O,
|
|
6646
6678
|
"aria-busy": ue === !0 || void 0,
|
|
6647
6679
|
"aria-multiselectable": gt && N.rowSelection && N.multiRowSelection ? !0 : void 0,
|
|
6648
|
-
onKeyDown: gt ?
|
|
6649
|
-
"data-range-dragging":
|
|
6680
|
+
onKeyDown: gt ? tn : void 0,
|
|
6681
|
+
"data-range-dragging": Ht || void 0,
|
|
6650
6682
|
className: Rt.grid,
|
|
6651
6683
|
"aria-rowcount": X.length + ge + ct + +!!st,
|
|
6652
6684
|
"aria-colcount": Ve.length,
|
|
@@ -6663,13 +6695,13 @@ function Ns({ onRowClick: e, onCellClick: t, onCellDoubleClick: r, onCellContext
|
|
|
6663
6695
|
role: "row",
|
|
6664
6696
|
"aria-rowindex": t + 1,
|
|
6665
6697
|
"data-dg-header-row": !0,
|
|
6666
|
-
className: [Rt.headerRow, !xe && t === Ge.length - 1 ?
|
|
6667
|
-
children: e.headers.map((e) => /* @__PURE__ */ J(
|
|
6698
|
+
className: [Rt.headerRow, !xe && t === Ge.length - 1 ? Qa.headerBoundary : ""].filter(Boolean).join(" "),
|
|
6699
|
+
children: e.headers.map((e) => /* @__PURE__ */ J(Ao, {
|
|
6668
6700
|
renderColumnMenuItems: S,
|
|
6669
6701
|
header: e,
|
|
6670
6702
|
layout: tt(e.column.id)
|
|
6671
6703
|
}, e.id))
|
|
6672
|
-
}, e.id)), xe && /* @__PURE__ */ J(
|
|
6704
|
+
}, e.id)), xe && /* @__PURE__ */ J(fo, {
|
|
6673
6705
|
leafHeaders: ot,
|
|
6674
6706
|
layoutFor: tt,
|
|
6675
6707
|
ariaRowIndex: ct
|
|
@@ -6677,24 +6709,24 @@ function Ns({ onRowClick: e, onCellClick: t, onCellDoubleClick: r, onCellContext
|
|
|
6677
6709
|
}),
|
|
6678
6710
|
gt && /* @__PURE__ */ J("div", {
|
|
6679
6711
|
ref: bt,
|
|
6680
|
-
tabIndex:
|
|
6712
|
+
tabIndex: Ot === null ? -1 : 0,
|
|
6681
6713
|
role: "presentation",
|
|
6682
6714
|
"data-dg-part": "tab-guard",
|
|
6683
6715
|
"data-guard": "leading",
|
|
6684
6716
|
className: Rt.tabGuard,
|
|
6685
|
-
onFocus:
|
|
6717
|
+
onFocus: kt
|
|
6686
6718
|
}),
|
|
6687
|
-
N.editing && re > 0 && /* @__PURE__ */ J(
|
|
6719
|
+
N.editing && re > 0 && /* @__PURE__ */ J(cs, {
|
|
6688
6720
|
orderedColumns: Ve,
|
|
6689
6721
|
layoutFor: tt,
|
|
6690
6722
|
rowHeight: L
|
|
6691
6723
|
}),
|
|
6692
|
-
/* @__PURE__ */ J(
|
|
6724
|
+
/* @__PURE__ */ J(Ps, {
|
|
6693
6725
|
enabled: x !== void 0 || _t,
|
|
6694
|
-
menuContent:
|
|
6726
|
+
menuContent: mn,
|
|
6695
6727
|
menuProps: C,
|
|
6696
|
-
onContextMenu:
|
|
6697
|
-
onClose:
|
|
6728
|
+
onContextMenu: cn,
|
|
6729
|
+
onClose: an,
|
|
6698
6730
|
children: (() => {
|
|
6699
6731
|
let e = (e, n, i, a) => {
|
|
6700
6732
|
let o = e.getIsGrouped(), s = dt(e), c = [
|
|
@@ -6719,7 +6751,7 @@ function Ns({ onRowClick: e, onCellClick: t, onCellDoubleClick: r, onCellContext
|
|
|
6719
6751
|
"data-dirty": K.has(e.id) || void 0,
|
|
6720
6752
|
"data-draft": ce.has(e.id) || q.has(e.id) || void 0,
|
|
6721
6753
|
"data-new": q.has(e.id) || void 0,
|
|
6722
|
-
"data-context-menu":
|
|
6754
|
+
"data-context-menu": mn !== null && nn?.rowId === e.id || void 0,
|
|
6723
6755
|
"data-selects-on-click": lt && !o || void 0,
|
|
6724
6756
|
"aria-selected": N.rowSelection ? e.getIsSelected() : void 0,
|
|
6725
6757
|
"aria-current": N.highlightRow && e.id === U ? !0 : void 0,
|
|
@@ -6745,28 +6777,28 @@ function Ns({ onRowClick: e, onCellClick: t, onCellDoubleClick: r, onCellContext
|
|
|
6745
6777
|
}));
|
|
6746
6778
|
} : void 0,
|
|
6747
6779
|
onContextMenu: x && !o || _t ? () => {
|
|
6748
|
-
|
|
6780
|
+
on.current = e.id;
|
|
6749
6781
|
} : void 0,
|
|
6750
6782
|
children: [c.map((i, a) => {
|
|
6751
6783
|
let s = G !== null && G.rowId === e.id && G.columnId === i.column.id || u && j.canEditCell(e, i.column);
|
|
6752
|
-
return /* @__PURE__ */ J(
|
|
6784
|
+
return /* @__PURE__ */ J(Ns, {
|
|
6753
6785
|
cell: i,
|
|
6754
6786
|
rowHeight: L,
|
|
6755
6787
|
layout: tt(i.column.id),
|
|
6756
6788
|
contentOverride: _e !== null && i.column.id === "__rowNumber__" ? _e.get(e.id) : void 0,
|
|
6757
6789
|
highlightNeedles: me?.get(i.column.id),
|
|
6758
|
-
editor: s ? /* @__PURE__ */ J(
|
|
6790
|
+
editor: s ? /* @__PURE__ */ J(ns, {
|
|
6759
6791
|
cell: i,
|
|
6760
6792
|
row: e,
|
|
6761
|
-
takeSeedText:
|
|
6762
|
-
onClose: (t) =>
|
|
6793
|
+
takeSeedText: Jt,
|
|
6794
|
+
onClose: (t) => $t({
|
|
6763
6795
|
rowId: e.id,
|
|
6764
6796
|
columnId: i.column.id
|
|
6765
6797
|
}, t)
|
|
6766
6798
|
}) : void 0,
|
|
6767
6799
|
onClick: t && !o ? (n) => t(ht(i, e, n)) : void 0,
|
|
6768
6800
|
onDoubleClick: (N.editing || r) && !o ? (t) => {
|
|
6769
|
-
r?.(ht(i, e, t)), N.editing && j.canEditCell(e, i.column) &&
|
|
6801
|
+
r?.(ht(i, e, t)), N.editing && j.canEditCell(e, i.column) && Qt({
|
|
6770
6802
|
rowId: e.id,
|
|
6771
6803
|
columnId: i.column.id
|
|
6772
6804
|
});
|
|
@@ -6774,10 +6806,10 @@ function Ns({ onRowClick: e, onCellClick: t, onCellDoubleClick: r, onCellContext
|
|
|
6774
6806
|
nav: gt ? {
|
|
6775
6807
|
rowId: e.id,
|
|
6776
6808
|
columnIndex: a + 1,
|
|
6777
|
-
focused:
|
|
6809
|
+
focused: At(W, e.id, i.column.id),
|
|
6778
6810
|
tabIndex: -1,
|
|
6779
|
-
selected: _t ?
|
|
6780
|
-
edges:
|
|
6811
|
+
selected: _t ? bs(jt, n, a) : At(W, e.id, i.column.id),
|
|
6812
|
+
edges: Ss(jt, n, a)
|
|
6781
6813
|
} : void 0,
|
|
6782
6814
|
onFocus: gt ? () => A.actions.setFocusedCell({
|
|
6783
6815
|
rowId: e.id,
|
|
@@ -6785,18 +6817,18 @@ function Ns({ onRowClick: e, onCellClick: t, onCellDoubleClick: r, onCellContext
|
|
|
6785
6817
|
}) : void 0,
|
|
6786
6818
|
onMouseDown: _t ? (t) => {
|
|
6787
6819
|
if (t.button !== 0) return;
|
|
6788
|
-
let n = t.target, r = n === t.currentTarget ? null : n.closest(
|
|
6789
|
-
r !== null && t.currentTarget.contains(r) || (t.shiftKey && t.preventDefault(), vt.current = !0,
|
|
6820
|
+
let n = t.target, r = n === t.currentTarget ? null : n.closest(zo);
|
|
6821
|
+
r !== null && t.currentTarget.contains(r) || (t.shiftKey && t.preventDefault(), vt.current = !0, Wt({
|
|
6790
6822
|
rowId: e.id,
|
|
6791
6823
|
columnId: i.column.id
|
|
6792
6824
|
}, { extend: t.shiftKey }));
|
|
6793
6825
|
} : void 0,
|
|
6794
|
-
onMouseEnter: _t &&
|
|
6826
|
+
onMouseEnter: _t && Ht ? () => Mt({
|
|
6795
6827
|
rowId: e.id,
|
|
6796
6828
|
columnId: i.column.id
|
|
6797
6829
|
}, { extend: !0 }) : void 0,
|
|
6798
6830
|
onContextMenu: x || _t || l ? (t) => {
|
|
6799
|
-
|
|
6831
|
+
sn.current = i.column.id, !o && l?.(ht(i, e, t));
|
|
6800
6832
|
} : void 0
|
|
6801
6833
|
}, i.id);
|
|
6802
6834
|
}), ve(e) && /* @__PURE__ */ J("div", {
|
|
@@ -6892,8 +6924,8 @@ function Ns({ onRowClick: e, onCellClick: t, onCellDoubleClick: r, onCellContext
|
|
|
6892
6924
|
"data-control-column": Bn(e.column.id) || void 0,
|
|
6893
6925
|
className: [
|
|
6894
6926
|
Rt.summaryCell,
|
|
6895
|
-
t.isBoundary && t.pinnedAt === "left" ?
|
|
6896
|
-
t.isBoundary && t.pinnedAt === "right" ?
|
|
6927
|
+
t.isBoundary && t.pinnedAt === "left" ? Qa.stickyLeft : "",
|
|
6928
|
+
t.isBoundary && t.pinnedAt === "right" ? Qa.stickyRight : ""
|
|
6897
6929
|
].filter(Boolean).join(" "),
|
|
6898
6930
|
style: {
|
|
6899
6931
|
minHeight: L,
|
|
@@ -6911,33 +6943,33 @@ function Ns({ onRowClick: e, onCellClick: t, onCellDoubleClick: r, onCellContext
|
|
|
6911
6943
|
}),
|
|
6912
6944
|
gt && /* @__PURE__ */ J("div", {
|
|
6913
6945
|
ref: xt,
|
|
6914
|
-
tabIndex:
|
|
6946
|
+
tabIndex: Ot === null ? -1 : 0,
|
|
6915
6947
|
role: "presentation",
|
|
6916
6948
|
"data-dg-part": "tab-guard",
|
|
6917
6949
|
"data-guard": "trailing",
|
|
6918
6950
|
className: Rt.tabGuard,
|
|
6919
|
-
onFocus:
|
|
6951
|
+
onFocus: kt
|
|
6920
6952
|
})
|
|
6921
6953
|
]
|
|
6922
6954
|
})
|
|
6923
6955
|
}),
|
|
6924
|
-
P.surface === "popup" && /* @__PURE__ */ J(
|
|
6925
|
-
P.surface === "sidebar" && /* @__PURE__ */ J(
|
|
6956
|
+
P.surface === "popup" && /* @__PURE__ */ J(ro, {}),
|
|
6957
|
+
P.surface === "sidebar" && /* @__PURE__ */ J(ao, {})
|
|
6926
6958
|
]
|
|
6927
6959
|
});
|
|
6928
6960
|
}
|
|
6929
|
-
var
|
|
6961
|
+
var Is = {
|
|
6930
6962
|
toolbar: "_toolbar_gwk05_1",
|
|
6931
6963
|
toolbarSpacer: "_toolbarSpacer_gwk05_15",
|
|
6932
6964
|
summaryCount: "_summaryCount_gwk05_19"
|
|
6933
6965
|
};
|
|
6934
6966
|
//#endregion
|
|
6935
6967
|
//#region src/components/TMDataGridToolbar.tsx
|
|
6936
|
-
function
|
|
6968
|
+
function Ls(t) {
|
|
6937
6969
|
let n = e(18), r, i, a, o, s;
|
|
6938
6970
|
n[0] === t ? (r = n[1], i = n[2], a = n[3], o = n[4], s = n[5]) : ({children: r, withBottomBorder: s, className: i, mod: a, ...o} = t, n[0] = t, n[1] = r, n[2] = i, n[3] = a, n[4] = o, n[5] = s);
|
|
6939
6971
|
let c = s !== void 0 && s, l;
|
|
6940
|
-
n[6] === i ? l = n[7] : (l = [
|
|
6972
|
+
n[6] === i ? l = n[7] : (l = [Is.toolbar, i].filter(Boolean), n[6] = i, n[7] = l);
|
|
6941
6973
|
let u = l.join(" "), f;
|
|
6942
6974
|
n[8] === c ? f = n[9] : (f = { "with-bottom-border": c }, n[8] = c, n[9] = f);
|
|
6943
6975
|
let p;
|
|
@@ -6951,18 +6983,18 @@ function Fs(t) {
|
|
|
6951
6983
|
children: r
|
|
6952
6984
|
}), n[13] = r, n[14] = o, n[15] = u, n[16] = p, n[17] = m) : m = n[17], m;
|
|
6953
6985
|
}
|
|
6954
|
-
function
|
|
6986
|
+
function Rs(t) {
|
|
6955
6987
|
let n = e(8), r, i;
|
|
6956
6988
|
n[0] === t ? (r = n[1], i = n[2]) : ({className: r, ...i} = t, n[0] = t, n[1] = r, n[2] = i);
|
|
6957
6989
|
let a;
|
|
6958
|
-
n[3] === r ? a = n[4] : (a = [
|
|
6990
|
+
n[3] === r ? a = n[4] : (a = [Is.toolbarSpacer, r].filter(Boolean), n[3] = r, n[4] = a);
|
|
6959
6991
|
let o = a.join(" "), s;
|
|
6960
6992
|
return n[5] !== i || n[6] !== o ? (s = /* @__PURE__ */ J(d, {
|
|
6961
6993
|
className: o,
|
|
6962
6994
|
...i
|
|
6963
6995
|
}), n[5] = i, n[6] = o, n[7] = s) : s = n[7], s;
|
|
6964
6996
|
}
|
|
6965
|
-
function
|
|
6997
|
+
function zs() {
|
|
6966
6998
|
let t = e(2), { table: n, labels: r } = $();
|
|
6967
6999
|
if (n.options.meta?.loading !== !0) return null;
|
|
6968
7000
|
let i;
|
|
@@ -6972,9 +7004,9 @@ function Ls() {
|
|
|
6972
7004
|
"aria-label": r.loading
|
|
6973
7005
|
}), t[0] = r.loading, t[1] = i), i;
|
|
6974
7006
|
}
|
|
6975
|
-
function
|
|
7007
|
+
function Bs(t) {
|
|
6976
7008
|
let n = e(8), { children: r } = t, { table: i, controlSize: a } = $();
|
|
6977
|
-
|
|
7009
|
+
Oa(i.store);
|
|
6978
7010
|
let o = i.options.manualFiltering === !0 || i.options.manualPagination === !0, s;
|
|
6979
7011
|
n[0] === i ? s = n[1] : (s = i.getRowCount(), n[0] = i, n[1] = s);
|
|
6980
7012
|
let c = s, l;
|
|
@@ -6984,22 +7016,22 @@ function Rs(t) {
|
|
|
6984
7016
|
span: !0,
|
|
6985
7017
|
size: a,
|
|
6986
7018
|
c: "dimmed",
|
|
6987
|
-
className:
|
|
7019
|
+
className: Is.summaryCount,
|
|
6988
7020
|
"data-dg-part": "summary-count",
|
|
6989
7021
|
children: d
|
|
6990
7022
|
}), n[5] = a, n[6] = d, n[7] = f) : f = n[7], f;
|
|
6991
7023
|
}
|
|
6992
|
-
function
|
|
6993
|
-
let t = e(16), n = $(), { table: r, ui: i, features: a, filters: o, labels: s, controlSize: c } = n, u = M(i,
|
|
6994
|
-
if (!
|
|
7024
|
+
function Vs() {
|
|
7025
|
+
let t = e(16), n = $(), { table: r, ui: i, features: a, filters: o, labels: s, controlSize: c } = n, u = M(i, Gs), d = M(r.store, Ws), f = d.filter(Us).length;
|
|
7026
|
+
if (!di(r, a).canFilterAny || o.surface === "none") return null;
|
|
6995
7027
|
let p = u || f > 0 ? "light" : "subtle", m = f > 0 ? void 0 : "gray", h;
|
|
6996
7028
|
t[0] !== n || t[1] !== d.length || t[2] !== u || t[3] !== r || t[4] !== i.actions ? (h = () => {
|
|
6997
7029
|
if (u) {
|
|
6998
7030
|
i.actions.closeFilterPanel();
|
|
6999
7031
|
return;
|
|
7000
7032
|
}
|
|
7001
|
-
let e = d.length === 0 ? r.getAllLeafColumns().find(
|
|
7002
|
-
e &&
|
|
7033
|
+
let e = d.length === 0 ? r.getAllLeafColumns().find(Hs) : void 0;
|
|
7034
|
+
e && xa(n, e.id), i.actions.openFilterPanel(e?.id ?? null);
|
|
7003
7035
|
}, t[0] = n, t[1] = d.length, t[2] = u, t[3] = r, t[4] = i.actions, t[5] = h) : h = t[5];
|
|
7004
7036
|
let g;
|
|
7005
7037
|
t[6] === Symbol.for("react.memo_cache_sentinel") ? (g = /* @__PURE__ */ J(ne, {
|
|
@@ -7023,19 +7055,19 @@ function zs() {
|
|
|
7023
7055
|
children: _
|
|
7024
7056
|
}), t[13] = s.filters, t[14] = _, t[15] = v) : v = t[15], v;
|
|
7025
7057
|
}
|
|
7026
|
-
function
|
|
7058
|
+
function Hs(e) {
|
|
7027
7059
|
return e.getCanFilter();
|
|
7028
7060
|
}
|
|
7029
|
-
function
|
|
7061
|
+
function Us(e) {
|
|
7030
7062
|
return St(e.value);
|
|
7031
7063
|
}
|
|
7032
|
-
function
|
|
7064
|
+
function Ws(e) {
|
|
7033
7065
|
return e.columnFilters;
|
|
7034
7066
|
}
|
|
7035
|
-
function
|
|
7067
|
+
function Gs(e) {
|
|
7036
7068
|
return e.filterPanelOpen;
|
|
7037
7069
|
}
|
|
7038
|
-
var
|
|
7070
|
+
var Ks = {
|
|
7039
7071
|
title: "_title_199r2_1",
|
|
7040
7072
|
list: "_list_199r2_5",
|
|
7041
7073
|
listHeader: "_listHeader_199r2_13",
|
|
@@ -7051,20 +7083,20 @@ var Ws = {
|
|
|
7051
7083
|
};
|
|
7052
7084
|
//#endregion
|
|
7053
7085
|
//#region src/components/TMDataGridExportPicker.tsx
|
|
7054
|
-
function
|
|
7055
|
-
let t = e(26), { ui: n, labels: r, size: i, controlSize: a, exportOptions: o } = $(), s = M(n,
|
|
7086
|
+
function qs() {
|
|
7087
|
+
let t = e(26), { ui: n, labels: r, size: i, controlSize: a, exportOptions: o } = $(), s = M(n, Js), c, l, u, d;
|
|
7056
7088
|
if (t[0] !== o || t[1] !== r || t[2] !== s || t[3] !== n.actions) {
|
|
7057
|
-
let e = s ?
|
|
7089
|
+
let e = s ? Ji(o, s.options).format : null;
|
|
7058
7090
|
c = v, l = s !== null, t[8] === n.actions ? u = t[9] : (u = () => n.actions.closeExportPicker(), t[8] = n.actions, t[9] = u), d = e && r.exportPickerTitle(e.extension.toUpperCase()), t[0] = o, t[1] = r, t[2] = s, t[3] = n.actions, t[4] = c, t[5] = l, t[6] = u, t[7] = d;
|
|
7059
7091
|
} else c = t[4], l = t[5], u = t[6], d = t[7];
|
|
7060
|
-
let f =
|
|
7092
|
+
let f = Ys[i], p = Xs[a], m;
|
|
7061
7093
|
t[10] === p ? m = t[11] : (m = { size: p }, t[10] = p, t[11] = m);
|
|
7062
7094
|
let h;
|
|
7063
|
-
t[12] === Symbol.for("react.memo_cache_sentinel") ? (h = { title:
|
|
7095
|
+
t[12] === Symbol.for("react.memo_cache_sentinel") ? (h = { title: Ks.title }, t[12] = h) : h = t[12];
|
|
7064
7096
|
let g = `var(--mantine-font-size-${a})`, _;
|
|
7065
7097
|
t[13] === g ? _ = t[14] : (_ = { title: { fontSize: g } }, t[13] = g, t[14] = _);
|
|
7066
7098
|
let y;
|
|
7067
|
-
t[15] === s ? y = t[16] : (y = s && /* @__PURE__ */ J(
|
|
7099
|
+
t[15] === s ? y = t[16] : (y = s && /* @__PURE__ */ J(Zs, { request: s }), t[15] = s, t[16] = y);
|
|
7068
7100
|
let b;
|
|
7069
7101
|
return t[17] !== c || t[18] !== l || t[19] !== u || t[20] !== d || t[21] !== f || t[22] !== m || t[23] !== _ || t[24] !== y ? (b = /* @__PURE__ */ J(c, {
|
|
7070
7102
|
opened: l,
|
|
@@ -7077,25 +7109,25 @@ function Gs() {
|
|
|
7077
7109
|
children: y
|
|
7078
7110
|
}), t[17] = c, t[18] = l, t[19] = u, t[20] = d, t[21] = f, t[22] = m, t[23] = _, t[24] = y, t[25] = b) : b = t[25], b;
|
|
7079
7111
|
}
|
|
7080
|
-
function
|
|
7112
|
+
function Js(e) {
|
|
7081
7113
|
return e.exportPicker;
|
|
7082
7114
|
}
|
|
7083
|
-
var
|
|
7115
|
+
var Ys = {
|
|
7084
7116
|
xs: "xs",
|
|
7085
7117
|
sm: "xs",
|
|
7086
7118
|
md: "sm",
|
|
7087
7119
|
lg: "sm",
|
|
7088
7120
|
xl: "md"
|
|
7089
|
-
},
|
|
7121
|
+
}, Xs = {
|
|
7090
7122
|
xs: "sm",
|
|
7091
7123
|
sm: "md",
|
|
7092
7124
|
md: "lg"
|
|
7093
7125
|
};
|
|
7094
|
-
function
|
|
7095
|
-
let n = e(95), { request: r } = t, { table: i, ui: a, labels: o, controlSize: s } = $(), { exportAll: l, exportSelected: u } =
|
|
7096
|
-
n[0] === i ? d = n[1] : (d =
|
|
7126
|
+
function Zs(t) {
|
|
7127
|
+
let n = e(95), { request: r } = t, { table: i, ui: a, labels: o, controlSize: s } = $(), { exportAll: l, exportSelected: u } = Ra(r.options), d;
|
|
7128
|
+
n[0] === i ? d = n[1] : (d = Xi(i), n[0] = i, n[1] = d);
|
|
7097
7129
|
let h = d, [g, _] = c(""), v;
|
|
7098
|
-
n[2] === h ? v = n[3] : (v = () => new Set(h.filter(
|
|
7130
|
+
n[2] === h ? v = n[3] : (v = () => new Set(h.filter(ec).map($s)), n[2] = h, n[3] = v);
|
|
7099
7131
|
let [y, b] = c(v), x;
|
|
7100
7132
|
n[4] === h.length ? x = n[5] : (x = Un("auto", h.length), n[4] = h.length, n[5] = x);
|
|
7101
7133
|
let S = x, w;
|
|
@@ -7121,11 +7153,11 @@ function Ys(t) {
|
|
|
7121
7153
|
}), n[15] = T, n[16] = F);
|
|
7122
7154
|
let I = F, L;
|
|
7123
7155
|
n[17] !== y || n[18] !== h || n[19] !== l || n[20] !== u || n[21] !== r.rows || n[22] !== a.actions ? (L = async () => {
|
|
7124
|
-
let e = h.filter((e) => y.has(e.id)).map(
|
|
7156
|
+
let e = h.filter((e) => y.has(e.id)).map(Qs);
|
|
7125
7157
|
await (r.rows === "selected" ? u : l)({ columns: e }), a.actions.closeExportPicker();
|
|
7126
7158
|
}, n[17] = y, n[18] = h, n[19] = l, n[20] = u, n[21] = r.rows, n[22] = a.actions, n[23] = L) : L = n[23];
|
|
7127
7159
|
let R = L, z;
|
|
7128
|
-
n[24] !== o || n[25] !== r.rows || n[26] !== i ? (z = o.exportPickerHint(r.rows === "selected" ?
|
|
7160
|
+
n[24] !== o || n[25] !== r.rows || n[26] !== i ? (z = o.exportPickerHint(r.rows === "selected" ? ea(i) : null), n[24] = o, n[25] = r.rows, n[26] = i, n[27] = z) : z = n[27];
|
|
7129
7161
|
let B = z, V;
|
|
7130
7162
|
n[28] !== s || n[29] !== B ? (V = /* @__PURE__ */ J(D, {
|
|
7131
7163
|
size: s,
|
|
@@ -7149,7 +7181,7 @@ function Ys(t) {
|
|
|
7149
7181
|
let U;
|
|
7150
7182
|
n[36] === I ? U = n[37] : (U = (e) => I(e.currentTarget.checked), n[36] = I, n[37] = U);
|
|
7151
7183
|
let W;
|
|
7152
|
-
n[38] === Symbol.for("react.memo_cache_sentinel") ? (W = { label:
|
|
7184
|
+
n[38] === Symbol.for("react.memo_cache_sentinel") ? (W = { label: Ks.headerLabel }, n[38] = W) : W = n[38];
|
|
7153
7185
|
let ee;
|
|
7154
7186
|
n[39] !== j || n[40] !== s || n[41] !== o.exportPickerSelectAll || n[42] !== M || n[43] !== U ? (ee = /* @__PURE__ */ J(p, {
|
|
7155
7187
|
size: s,
|
|
@@ -7171,7 +7203,7 @@ function Ys(t) {
|
|
|
7171
7203
|
}), n[49] = G, n[50] = te);
|
|
7172
7204
|
let ne;
|
|
7173
7205
|
n[51] !== ee || n[52] !== te ? (ne = /* @__PURE__ */ Y("div", {
|
|
7174
|
-
className:
|
|
7206
|
+
className: Ks.listHeader,
|
|
7175
7207
|
children: [ee, te]
|
|
7176
7208
|
}), n[51] = ee, n[52] = te, n[53] = ne) : ne = n[53];
|
|
7177
7209
|
let re;
|
|
@@ -7180,19 +7212,19 @@ function Ys(t) {
|
|
|
7180
7212
|
n[59] !== y || n[60] !== s || n[61] !== o.exportPickerHidden ? (e = (e) => /* @__PURE__ */ J(p, {
|
|
7181
7213
|
size: s,
|
|
7182
7214
|
label: /* @__PURE__ */ Y(fe, { children: [/* @__PURE__ */ J("span", {
|
|
7183
|
-
className:
|
|
7215
|
+
className: Ks.rowText,
|
|
7184
7216
|
children: Mn(e)
|
|
7185
7217
|
}), !e.getIsVisible() && /* @__PURE__ */ J("span", {
|
|
7186
|
-
className:
|
|
7218
|
+
className: Ks.rowHint,
|
|
7187
7219
|
children: o.exportPickerHidden
|
|
7188
7220
|
})] }),
|
|
7189
7221
|
checked: y.has(e.id),
|
|
7190
7222
|
onChange: (t) => P(e.id, t.currentTarget.checked),
|
|
7191
7223
|
classNames: {
|
|
7192
|
-
root:
|
|
7193
|
-
body:
|
|
7194
|
-
labelWrapper:
|
|
7195
|
-
label:
|
|
7224
|
+
root: Ks.row,
|
|
7225
|
+
body: Ks.rowBody,
|
|
7226
|
+
labelWrapper: Ks.rowLabelWrapper,
|
|
7227
|
+
label: Ks.rowLabel
|
|
7196
7228
|
},
|
|
7197
7229
|
"data-dg-part": "export-column",
|
|
7198
7230
|
"data-column-id": e.id
|
|
@@ -7202,7 +7234,7 @@ function Ys(t) {
|
|
|
7202
7234
|
n[63] !== s || n[64] !== o || n[65] !== T.length || n[66] !== g ? (ie = T.length === 0 && /* @__PURE__ */ J(D, {
|
|
7203
7235
|
size: s,
|
|
7204
7236
|
c: "dimmed",
|
|
7205
|
-
className:
|
|
7237
|
+
className: Ks.empty,
|
|
7206
7238
|
children: o.columnsNoMatch(g)
|
|
7207
7239
|
}), n[63] = s, n[64] = o, n[65] = T.length, n[66] = g, n[67] = ie) : ie = n[67];
|
|
7208
7240
|
let ae;
|
|
@@ -7210,13 +7242,13 @@ function Ys(t) {
|
|
|
7210
7242
|
mah: "50vh",
|
|
7211
7243
|
type: "auto",
|
|
7212
7244
|
children: /* @__PURE__ */ Y("div", {
|
|
7213
|
-
className:
|
|
7245
|
+
className: Ks.rows,
|
|
7214
7246
|
children: [re, ie]
|
|
7215
7247
|
})
|
|
7216
7248
|
}), n[68] = re, n[69] = ie, n[70] = ae) : ae = n[70];
|
|
7217
7249
|
let oe;
|
|
7218
7250
|
n[71] !== ne || n[72] !== ae ? (oe = /* @__PURE__ */ Y("div", {
|
|
7219
|
-
className:
|
|
7251
|
+
className: Ks.list,
|
|
7220
7252
|
children: [ne, ae]
|
|
7221
7253
|
}), n[71] = ne, n[72] = ae, n[73] = oe) : oe = n[73];
|
|
7222
7254
|
let se;
|
|
@@ -7257,24 +7289,24 @@ function Ys(t) {
|
|
|
7257
7289
|
]
|
|
7258
7290
|
}), n[90] = V, n[91] = H, n[92] = oe, n[93] = de, n[94] = pe) : pe = n[94], pe;
|
|
7259
7291
|
}
|
|
7260
|
-
function
|
|
7292
|
+
function Qs(e) {
|
|
7261
7293
|
return e.id;
|
|
7262
7294
|
}
|
|
7263
|
-
function
|
|
7295
|
+
function $s(e) {
|
|
7264
7296
|
return e.id;
|
|
7265
7297
|
}
|
|
7266
|
-
function
|
|
7298
|
+
function ec(e) {
|
|
7267
7299
|
return e.getIsVisible();
|
|
7268
7300
|
}
|
|
7269
7301
|
//#endregion
|
|
7270
7302
|
//#region src/core/sizes.ts
|
|
7271
|
-
var
|
|
7303
|
+
var tc = "md", nc = {
|
|
7272
7304
|
xs: 34,
|
|
7273
7305
|
sm: 42,
|
|
7274
7306
|
md: 52,
|
|
7275
7307
|
lg: 62,
|
|
7276
7308
|
xl: 72
|
|
7277
|
-
},
|
|
7309
|
+
}, rc = {
|
|
7278
7310
|
xs: "xs",
|
|
7279
7311
|
sm: "xs",
|
|
7280
7312
|
md: "sm",
|
|
@@ -7283,8 +7315,8 @@ var $s = "md", ec = {
|
|
|
7283
7315
|
};
|
|
7284
7316
|
//#endregion
|
|
7285
7317
|
//#region src/components/TMDataGrid.tsx
|
|
7286
|
-
function
|
|
7287
|
-
let n = e(30), { table: r, ui: i, edit: a, features: o, filters: s, exportOptions: c, labels: l, renderDetails: u, renderDetailsEstHeight: d, overscan: f, resetSettings: p, scrollToRow: m, scrollerRef: h, size: g, children: _, className: v, style: y, id: b, "data-testid": x } = t, S = g === void 0 ? "md" : g, C = r.options.meta?.rowHeight ??
|
|
7318
|
+
function ic(t) {
|
|
7319
|
+
let n = e(30), { table: r, ui: i, edit: a, features: o, filters: s, exportOptions: c, labels: l, renderDetails: u, renderDetailsEstHeight: d, overscan: f, resetSettings: p, scrollToRow: m, scrollerRef: h, size: g, children: _, className: v, style: y, id: b, "data-testid": x } = t, S = g === void 0 ? "md" : g, C = r.options.meta?.rowHeight ?? nc[S], w = rc[S], T;
|
|
7288
7320
|
n[0] !== a || n[1] !== c || n[2] !== o || n[3] !== s || n[4] !== l || n[5] !== f || n[6] !== u || n[7] !== d || n[8] !== p || n[9] !== C || n[10] !== m || n[11] !== h || n[12] !== S || n[13] !== w || n[14] !== r || n[15] !== i ? (T = {
|
|
7289
7321
|
table: r,
|
|
7290
7322
|
ui: i,
|
|
@@ -7316,31 +7348,31 @@ function nc(t) {
|
|
|
7316
7348
|
children: _
|
|
7317
7349
|
}), n[19] = _, n[20] = b, n[21] = S, n[22] = y, n[23] = O, n[24] = x, n[25] = k) : k = n[25];
|
|
7318
7350
|
let A;
|
|
7319
|
-
n[26] === Symbol.for("react.memo_cache_sentinel") ? (A = /* @__PURE__ */ J(
|
|
7351
|
+
n[26] === Symbol.for("react.memo_cache_sentinel") ? (A = /* @__PURE__ */ J(qs, {}), n[26] = A) : A = n[26];
|
|
7320
7352
|
let j;
|
|
7321
7353
|
return n[27] !== E || n[28] !== k ? (j = /* @__PURE__ */ Y(tt, {
|
|
7322
7354
|
value: E,
|
|
7323
7355
|
children: [k, A]
|
|
7324
7356
|
}), n[27] = E, n[28] = k, n[29] = j) : j = n[29], j;
|
|
7325
7357
|
}
|
|
7326
|
-
var
|
|
7327
|
-
Toolbar:
|
|
7328
|
-
Spacer:
|
|
7329
|
-
SummaryCount:
|
|
7330
|
-
LoadingIndicator:
|
|
7331
|
-
Search:
|
|
7358
|
+
var ac = Object.assign(ic, {
|
|
7359
|
+
Toolbar: Ls,
|
|
7360
|
+
Spacer: Rs,
|
|
7361
|
+
SummaryCount: Bs,
|
|
7362
|
+
LoadingIndicator: zs,
|
|
7363
|
+
Search: Xa,
|
|
7332
7364
|
DraftActions: ar,
|
|
7333
|
-
Menu:
|
|
7334
|
-
FilterButton:
|
|
7335
|
-
Table:
|
|
7336
|
-
Footer:
|
|
7365
|
+
Menu: Ya,
|
|
7366
|
+
FilterButton: Vs,
|
|
7367
|
+
Table: Fs,
|
|
7368
|
+
Footer: La,
|
|
7337
7369
|
FilterPanel: Sr,
|
|
7338
|
-
FilterPills:
|
|
7370
|
+
FilterPills: Ca,
|
|
7339
7371
|
ColumnsPanel: qn
|
|
7340
7372
|
});
|
|
7341
7373
|
//#endregion
|
|
7342
7374
|
//#region src/components/filters/DgRangeSliderFilter.tsx
|
|
7343
|
-
function
|
|
7375
|
+
function oc(t) {
|
|
7344
7376
|
let n = e(26), { column: r, operator: i, value: a, onChange: o, size: s, labels: c } = t;
|
|
7345
7377
|
if (!vt(i)) {
|
|
7346
7378
|
let e;
|
|
@@ -7390,7 +7422,7 @@ function ic(t) {
|
|
|
7390
7422
|
}
|
|
7391
7423
|
//#endregion
|
|
7392
7424
|
//#region src/components/filters/DgDateRangeFilter.tsx
|
|
7393
|
-
function
|
|
7425
|
+
function sc(t) {
|
|
7394
7426
|
let n = e(32), { operator: r, value: i, onChange: a, size: o, labels: s } = t;
|
|
7395
7427
|
if (!vt(r)) {
|
|
7396
7428
|
let e;
|
|
@@ -7443,7 +7475,7 @@ function ac(t) {
|
|
|
7443
7475
|
}
|
|
7444
7476
|
//#endregion
|
|
7445
7477
|
//#region src/components/filters/DgAutocompleteFilter.tsx
|
|
7446
|
-
function
|
|
7478
|
+
function cc(t) {
|
|
7447
7479
|
let n = e(21), { column: r, table: i, operator: a, value: o, onChange: s, options: c, size: l, labels: d } = t;
|
|
7448
7480
|
if (_t(a) || vt(a)) {
|
|
7449
7481
|
let e;
|
|
@@ -7463,7 +7495,7 @@ function oc(t) {
|
|
|
7463
7495
|
width: 180
|
|
7464
7496
|
}), n[8] = t, n[9] = d.filterValue, n[10] = g) : g = n[10];
|
|
7465
7497
|
let _ = !p, v = p && t.layout !== "header" ? d.filterValuePlaceholder : "", y;
|
|
7466
|
-
n[11] === h ? y = n[12] : (y = h.map(
|
|
7498
|
+
n[11] === h ? y = n[12] : (y = h.map(lc), n[11] = h, n[12] = y);
|
|
7467
7499
|
let b = p && typeof o == "string" ? o : "", x;
|
|
7468
7500
|
return n[13] !== s || n[14] !== l || n[15] !== g || n[16] !== _ || n[17] !== v || n[18] !== y || n[19] !== b ? (x = /* @__PURE__ */ J(u, {
|
|
7469
7501
|
...g,
|
|
@@ -7476,12 +7508,12 @@ function oc(t) {
|
|
|
7476
7508
|
onChange: s
|
|
7477
7509
|
}), n[13] = s, n[14] = l, n[15] = g, n[16] = _, n[17] = v, n[18] = y, n[19] = b, n[20] = x) : x = n[20], x;
|
|
7478
7510
|
}
|
|
7479
|
-
function
|
|
7511
|
+
function lc(e) {
|
|
7480
7512
|
return e.value;
|
|
7481
7513
|
}
|
|
7482
7514
|
//#endregion
|
|
7483
7515
|
//#region src/components/filters/DgTriStateFilter.tsx
|
|
7484
|
-
function
|
|
7516
|
+
function uc(t) {
|
|
7485
7517
|
let n = e(29), { operator: r, value: i, onChange: a, size: o, labels: s } = t;
|
|
7486
7518
|
if (_t(r) || vt(r)) {
|
|
7487
7519
|
let e;
|
|
@@ -7531,7 +7563,7 @@ function cc(t) {
|
|
|
7531
7563
|
}
|
|
7532
7564
|
//#endregion
|
|
7533
7565
|
//#region src/core/labelsSv.ts
|
|
7534
|
-
var
|
|
7566
|
+
var dc = {
|
|
7535
7567
|
operators: {
|
|
7536
7568
|
contains: "innehåller",
|
|
7537
7569
|
equals: "är lika med",
|
|
@@ -7562,7 +7594,7 @@ var lc = {
|
|
|
7562
7594
|
columnsNoMatch: (e) => `Inga kolumner matchar ”${e}”`,
|
|
7563
7595
|
columnsShowHideAll: "Visa/dölj alla",
|
|
7564
7596
|
columnsReset: "Återställ layout",
|
|
7565
|
-
columnsResetHint: "Återställer kolumnernas synlighet, ordning,
|
|
7597
|
+
columnsResetHint: "Återställer kolumnernas synlighet, ordning, bredd, låsning och gruppering",
|
|
7566
7598
|
rowNumberColumnLabel: "Radnummer",
|
|
7567
7599
|
noRows: "Inga rader att visa",
|
|
7568
7600
|
filterColumn: "Kolumn",
|
|
@@ -7584,16 +7616,16 @@ var lc = {
|
|
|
7584
7616
|
sortAsc: "Sortera stigande",
|
|
7585
7617
|
sortDesc: "Sortera fallande",
|
|
7586
7618
|
filterMenuItem: "Filtrera",
|
|
7587
|
-
groupBy: (e) => `Gruppera
|
|
7588
|
-
ungroup: (e) => `
|
|
7619
|
+
groupBy: (e) => `Gruppera efter ${e}`,
|
|
7620
|
+
ungroup: (e) => `Sluta gruppera efter ${e}`,
|
|
7589
7621
|
expandAllGroups: "Expandera alla grupper",
|
|
7590
7622
|
collapseAllGroups: "Fäll ihop alla grupper",
|
|
7591
|
-
pinLeft: "
|
|
7592
|
-
pinRight: "
|
|
7593
|
-
unpin: "
|
|
7623
|
+
pinLeft: "Lås till vänster",
|
|
7624
|
+
pinRight: "Lås till höger",
|
|
7625
|
+
unpin: "Lås upp",
|
|
7594
7626
|
moveLeft: "Flytta åt vänster",
|
|
7595
7627
|
moveRight: "Flytta åt höger",
|
|
7596
|
-
autosizeColumn: "
|
|
7628
|
+
autosizeColumn: "Autopassa kolumnbredd",
|
|
7597
7629
|
hideColumn: "Dölj kolumn",
|
|
7598
7630
|
filterOn: (e) => `Filtrera på ${e}`,
|
|
7599
7631
|
sortColumn: (e) => `Sortera ${e}`,
|
|
@@ -7602,7 +7634,7 @@ var lc = {
|
|
|
7602
7634
|
pageRange: ({ from: e, to: t, total: n }) => `${e}–${t} av ${n}`,
|
|
7603
7635
|
pageNumber: ({ page: e, pageCount: t }) => t < 0 ? `Sida ${e}` : `Sida ${e} av ${t}`,
|
|
7604
7636
|
groupedAllRows: (e) => `Grupperad · alla ${e} rader`,
|
|
7605
|
-
pagingSuspendedHint: "Sidindelningen är avstängd medan raderna är grupperade
|
|
7637
|
+
pagingSuspendedHint: "Sidindelningen är avstängd medan raderna är grupperade, och alla rader visas. Sluta gruppera för att bläddra igen.",
|
|
7606
7638
|
previousPage: "Föregående sida",
|
|
7607
7639
|
nextPage: "Nästa sida",
|
|
7608
7640
|
noResults: "Inga rader matchar dina filter",
|
|
@@ -7616,10 +7648,10 @@ var lc = {
|
|
|
7616
7648
|
cancelRowEdit: "Avbryt redigering",
|
|
7617
7649
|
editRowErrors: "Åtgärda de markerade cellerna",
|
|
7618
7650
|
saveAllEdits: (e) => e === 1 ? "Spara 1 rad" : `Spara ${e} rader`,
|
|
7619
|
-
discardAllEdits: "
|
|
7651
|
+
discardAllEdits: "Ångra alla",
|
|
7620
7652
|
editRowsStillOpen: (e) => e === 1 ? "1 rad redigeras fortfarande" : `${e} rader redigeras fortfarande`,
|
|
7621
7653
|
confirmNewRow: "Lägg till rad",
|
|
7622
|
-
discardNewRow: "
|
|
7654
|
+
discardNewRow: "Avbryt ny rad",
|
|
7623
7655
|
deleteRow: "Ta bort rad",
|
|
7624
7656
|
restoreRow: "Återställ rad",
|
|
7625
7657
|
revertRow: "Ångra ändringar",
|
|
@@ -7629,33 +7661,33 @@ var lc = {
|
|
|
7629
7661
|
cellCount: (e) => e === 1 ? "1 cell" : `${e} celler`,
|
|
7630
7662
|
copy: "Kopiera",
|
|
7631
7663
|
exportCells: "Exportera celler",
|
|
7632
|
-
includeHeaders: "
|
|
7664
|
+
includeHeaders: "Ta med rubriker",
|
|
7633
7665
|
exportAll: "Exportera alla rader",
|
|
7634
|
-
exportSelected: (e) => e === 1 ? "Exportera 1
|
|
7666
|
+
exportSelected: (e) => e === 1 ? "Exportera 1 markerad rad" : `Exportera ${e} markerade rader`,
|
|
7635
7667
|
exportPickerTitle: (e) => `Exportera som ${e}`,
|
|
7636
|
-
exportPickerHint: (e) => e === null ? "Välj kolumner att exportera" : e === 1 ? "Välj kolumner att exportera för den
|
|
7668
|
+
exportPickerHint: (e) => e === null ? "Välj kolumner att exportera" : e === 1 ? "Välj kolumner att exportera för den markerade raden" : `Välj kolumner att exportera för de ${e} markerade raderna`,
|
|
7637
7669
|
exportPickerConfirm: "Exportera",
|
|
7638
7670
|
exportPickerCancel: "Avbryt",
|
|
7639
|
-
exportPickerSelectAll: "
|
|
7671
|
+
exportPickerSelectAll: "Markera alla",
|
|
7640
7672
|
exportPickerCount: (e, t) => `${e} av ${t}`,
|
|
7641
7673
|
exportPickerHidden: "Dold",
|
|
7642
|
-
selectColumnLabel: "
|
|
7643
|
-
selectAllRows: "
|
|
7644
|
-
selectRow: "
|
|
7645
|
-
selectGroup: "
|
|
7674
|
+
selectColumnLabel: "Radmarkering",
|
|
7675
|
+
selectAllRows: "Markera alla rader",
|
|
7676
|
+
selectRow: "Markera rad",
|
|
7677
|
+
selectGroup: "Markera grupp",
|
|
7646
7678
|
detailsColumnLabel: "Detaljer",
|
|
7647
7679
|
showDetails: "Visa detaljer",
|
|
7648
7680
|
hideDetails: "Dölj detaljer",
|
|
7649
|
-
expandAllDetails: "
|
|
7650
|
-
collapseAllDetails: "
|
|
7681
|
+
expandAllDetails: "Visa alla detaljer",
|
|
7682
|
+
collapseAllDetails: "Dölj alla detaljer",
|
|
7651
7683
|
groupColumnLabel: "Grupp",
|
|
7652
|
-
blankGroupValue: "(
|
|
7684
|
+
blankGroupValue: "(Tomt)",
|
|
7653
7685
|
expandGroup: (e) => `Expandera ${e}`,
|
|
7654
7686
|
collapseGroup: (e) => `Fäll ihop ${e}`
|
|
7655
7687
|
};
|
|
7656
7688
|
//#endregion
|
|
7657
7689
|
//#region src/core/summary.ts
|
|
7658
|
-
function
|
|
7690
|
+
function fc({ table: e, columnId: t, fn: n = "sum" }) {
|
|
7659
7691
|
let r = e, i = r.getColumn(t);
|
|
7660
7692
|
if (!i) return;
|
|
7661
7693
|
let a = {
|
|
@@ -7669,6 +7701,6 @@ function uc({ table: e, columnId: t, fn: n = "sum" }) {
|
|
|
7669
7701
|
return _e[n].aggregate(a);
|
|
7670
7702
|
}
|
|
7671
7703
|
//#endregion
|
|
7672
|
-
export {
|
|
7704
|
+
export { Rr as DATA_STATE_SLICES, qi as DEFAULT_EXPORT_OPTIONS, tc as DEFAULT_TMDATAGRID_SIZE, Ft as DETAILS_COLUMN_ID, cc as DgAutocompleteFilter, sc as DgDateRangeFilter, oc as DgRangeSliderFilter, uc as DgTriStateFilter, tn as EDIT_COLUMN_ID, rt as FILTER_OPERATOR_LABELS, ln as GROUP_COLUMN_ID, Br as PERSIST_PAYLOAD_VERSION, mn as ROW_NUMBER_COLUMN_ID, Dn as SELECT_COLUMN_ID, zr as SETTINGS_STATE_SLICES, rc as SIZE_CONTROL_SIZE, nc as SIZE_ROW_HEIGHT, Ir as TMDATAGRID_LABELS_EN, dc as TMDATAGRID_LABELS_SV, ac as TMDataGrid, Yo as TMDataGridBooleanEditor, Xo as TMDataGridDateEditor, ar as TMDataGridDraftActions, Ca as TMDataGridFilterPills, hr as TMDataGridFilterValueInput, Zo as TMDataGridMultiSelectEditor, Qo as TMDataGridNumberEditor, Xa as TMDataGridSearch, $o as TMDataGridSelectEditor, es as TMDataGridStringEditor, Ct as activeColumnFilters, fc as aggregateColumn, Nt as areAllRowsExpanded, xo as autosizeColumn, na as buildExportData, Wt as clearedValueForType, ea as countSelectedExportRows, ma as createTMDataGridColumnHelper, Hi as csvExcelFormat, Ui as csvFormat, sa as downloadFile, yt as emptyValueForOperator, ia as exportGrid, xt as filterValueShape, Fi as formatExportValue, wt as formatFilterLabel, cn as formatGroupValue, Mr as fuzzyGlobalFilterFn, ui as getColumnCapabilities, Fn as getColumnDefaultOperator, Mn as getColumnLabel, Pn as getColumnOperators, So as getColumnRegion, Nn as getColumnType, Cn as getDisplayedRows, Ut as getEditFieldName, Xi as getExportableColumns, di as getGridCapabilities, on as getGroupDataRows, mt as getOperatorsForType, Tn as getSelectableRowIds, Oo as getStepTargetColumn, Aa as getTMDataGridPaginationApi, Li as guardFormula, Vt as hasPendingEdits, Bn as isControlColumn, St as isFilterActive, Vn as isGeneratedColumn, wn as isPagingActive, Ki as jsonFormat, Eo as keepGeneratedColumnsOutermost, Lr as mergeLabels, To as moveColumn, ko as moveColumnByStep, en as normalizeFieldValidate, Sa as openColumnFilter, gt as operatorNeedsValue, _t as operatorTakesArrayValue, vt as operatorTakesRangeValue, pr as optionsToComboboxData, li as readFeatureFlags, fr as resolveColumnOptions, Pt as resolveExpandAll, Ji as resolveExportOptions, ys as resolveRangeBounds, En as resolveRowSelectionClick, aa as toClipboardText, Wi as tsvFormat, ba as useTMDataGrid, $ as useTMDataGridContext, Ra as useTMDataGridExport, oa as writeClipboardText, ra as writeExportFile };
|
|
7673
7705
|
|
|
7674
7706
|
//# sourceMappingURL=index.js.map
|