@jielga/tmdatagrid 2.0.0-beta.7 → 2.0.0-beta.8
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 +1093 -1007
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +2 -1
- package/skills/appearance/SKILL.md +1 -1
- 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/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/src/tmdatagrid/components/TMDataGridEntryRows.tsx +4 -3
- package/src/tmdatagrid/components/TMDataGridFooter.tsx +5 -5
- package/src/tmdatagrid/components/TMDataGridHeaderCell.tsx +59 -14
- package/src/tmdatagrid/components/TMDataGridTable.module.css +3 -3
- package/src/tmdatagrid/components/TMDataGridTable.tsx +88 -16
- package/src/tmdatagrid/components/TMDataGridToolbar.tsx +2 -1
- package/src/tmdatagrid/core/resizePreview.ts +141 -0
- package/src/tmdatagrid/core/useSettledTableState.ts +36 -0
- package/src/tmdatagrid/useTMDataGrid.tsx +43 -6
package/dist/index.js
CHANGED
|
@@ -2,11 +2,11 @@ import { c as e } from "react/compiler-runtime";
|
|
|
2
2
|
import { createContext as t, useCallback as n, useContext as r, useEffect as i, useLayoutEffect as a, useMemo as o, useRef as s, useState as c } from "react";
|
|
3
3
|
import { ActionIcon as l, Autocomplete as u, Button as d, Checkbox as f, Group as p, Input as m, Loader as h, Menu as g, MultiSelect as _, NumberInput as v, Pill as y, Popover as b, RangeSlider as x, ScrollArea as S, SegmentedControl as C, Select as w, Stack as T, Text as E, TextInput as D, Tooltip as O, UnstyledButton as k } from "@mantine/core";
|
|
4
4
|
import { useCreateStore as A, useSelector as j } from "@tanstack/react-store";
|
|
5
|
-
import { IconArrowAutofitWidth as M, IconArrowBackUp as N, IconArrowBarToLeft as P, IconArrowBarToRight as F, IconArrowDown as I, IconArrowLeft as L, IconArrowRight as R, IconArrowUp as z, IconCheck as B, IconChevronLeft as V, IconChevronRight as H, IconColumns3 as ee, IconDotsVertical as
|
|
6
|
-
import { Fragment as
|
|
7
|
-
import { FieldApi as
|
|
8
|
-
import { Store as
|
|
9
|
-
import { aggregationFns as
|
|
5
|
+
import { IconArrowAutofitWidth as M, IconArrowBackUp as N, IconArrowBarToLeft as P, IconArrowBarToRight as F, IconArrowDown as I, IconArrowLeft as L, IconArrowRight as R, IconArrowUp as z, IconCheck as B, IconChevronLeft as V, IconChevronRight as H, IconColumns3 as ee, IconDotsVertical as te, IconEyeOff as ne, IconFilter as re, IconFoldDown as ie, IconFoldUp as ae, IconIndentDecrease as oe, IconIndentIncrease as U, IconMenu2 as se, IconPencil as W, IconPinnedOff as G, IconPlus as K, IconSearch as ce, IconTrash as q, IconX as J } from "@tabler/icons-react";
|
|
6
|
+
import { Fragment as le, jsx as Y, jsxs as X } from "react/jsx-runtime";
|
|
7
|
+
import { FieldApi as ue, FormApi as de, getBy as fe, useStore as pe } from "@tanstack/react-form";
|
|
8
|
+
import { Store as me, batch as he, shallow as ge } from "@tanstack/store";
|
|
9
|
+
import { aggregationFns as _e, columnFacetingFeature as ve, columnFilteringFeature as ye, columnGroupingFeature as be, columnOrderingFeature as xe, columnPinningFeature as Se, columnResizingFeature as Ce, columnSizingFeature as we, columnVisibilityFeature as Te, createColumnHelper as Z, createExpandedRowModel as Ee, createFacetedMinMaxValues as De, createFacetedRowModel as Oe, createFacetedUniqueValues as ke, createFilteredRowModel as Ae, createGroupedRowModel as je, createPaginatedRowModel as Me, createSortedRowModel as Ne, filterFns as Pe, flexRender as Fe, globalFilteringFeature as Ie, metaHelper as Le, rowExpandingFeature as Re, rowPaginationFeature as ze, rowPinningFeature as Be, rowSelectionFeature as Ve, rowSortingFeature as He, sortFns as Ue, tableFeatures as We, useTable as Ge } from "@tanstack/react-table";
|
|
10
10
|
import { compareItems as Ke, rankItem as qe } from "@tanstack/match-sorter-utils";
|
|
11
11
|
import { useVirtualizer as Je } from "@tanstack/react-virtual";
|
|
12
12
|
var Ye = { root: "_root_1wvkg_8" }, Xe = {
|
|
@@ -231,18 +231,18 @@ function jt(t) {
|
|
|
231
231
|
e.stopPropagation(), r.toggleExpanded();
|
|
232
232
|
}, n[2] = r, n[3] = l);
|
|
233
233
|
let u;
|
|
234
|
-
n[4] === Symbol.for("react.memo_cache_sentinel") ? (u = /* @__PURE__ */
|
|
234
|
+
n[4] === Symbol.for("react.memo_cache_sentinel") ? (u = /* @__PURE__ */ Y(H, {
|
|
235
235
|
size: 16,
|
|
236
236
|
stroke: 1.6
|
|
237
237
|
}), n[4] = u) : u = n[4];
|
|
238
238
|
let d;
|
|
239
|
-
n[5] === o ? d = n[6] : (d = /* @__PURE__ */
|
|
239
|
+
n[5] === o ? d = n[6] : (d = /* @__PURE__ */ Y("span", {
|
|
240
240
|
className: Tt.chevron,
|
|
241
241
|
"data-expanded": o,
|
|
242
242
|
children: u
|
|
243
243
|
}), n[5] = o, n[6] = d);
|
|
244
244
|
let f;
|
|
245
|
-
return n[7] !== o || n[8] !== r.id || n[9] !== c || n[10] !== l || n[11] !== d || n[12] !== s ? (f = /* @__PURE__ */
|
|
245
|
+
return n[7] !== o || n[8] !== r.id || n[9] !== c || n[10] !== l || n[11] !== d || n[12] !== s ? (f = /* @__PURE__ */ Y(k, {
|
|
246
246
|
className: Tt.detailsToggle,
|
|
247
247
|
tabIndex: s,
|
|
248
248
|
"aria-expanded": o,
|
|
@@ -270,18 +270,18 @@ function Mt(t) {
|
|
|
270
270
|
expand: !c
|
|
271
271
|
})), n[4] = c, n[5] = o, n[6] = r, n[7] = u) : u = n[7];
|
|
272
272
|
let d;
|
|
273
|
-
n[8] === Symbol.for("react.memo_cache_sentinel") ? (d = /* @__PURE__ */
|
|
273
|
+
n[8] === Symbol.for("react.memo_cache_sentinel") ? (d = /* @__PURE__ */ Y(H, {
|
|
274
274
|
size: 16,
|
|
275
275
|
stroke: 1.6
|
|
276
276
|
}), n[8] = d) : d = n[8];
|
|
277
277
|
let f;
|
|
278
|
-
n[9] === c ? f = n[10] : (f = /* @__PURE__ */
|
|
278
|
+
n[9] === c ? f = n[10] : (f = /* @__PURE__ */ Y("span", {
|
|
279
279
|
className: Tt.chevron,
|
|
280
280
|
"data-expanded": c,
|
|
281
281
|
children: d
|
|
282
282
|
}), n[9] = c, n[10] = f);
|
|
283
283
|
let p;
|
|
284
|
-
return n[11] !== c || n[12] !== l || n[13] !== u || n[14] !== f ? (p = /* @__PURE__ */
|
|
284
|
+
return n[11] !== c || n[12] !== l || n[13] !== u || n[14] !== f ? (p = /* @__PURE__ */ Y(k, {
|
|
285
285
|
className: Tt.detailsToggle,
|
|
286
286
|
"aria-expanded": c,
|
|
287
287
|
"aria-label": l,
|
|
@@ -307,33 +307,33 @@ function Nt(e = "Details") {
|
|
|
307
307
|
enableGlobalFilter: !1,
|
|
308
308
|
enableHiding: !1,
|
|
309
309
|
enablePinning: !1,
|
|
310
|
-
header: ({ table: e }) => /* @__PURE__ */
|
|
311
|
-
cell: ({ row: e }) => /* @__PURE__ */
|
|
310
|
+
header: ({ table: e }) => /* @__PURE__ */ Y(Mt, { table: e }),
|
|
311
|
+
cell: ({ row: e }) => /* @__PURE__ */ Y(jt, { row: e })
|
|
312
312
|
};
|
|
313
313
|
}
|
|
314
314
|
var $ = {
|
|
315
|
-
tableWrapper: "
|
|
316
|
-
scrollContainer: "
|
|
317
|
-
grid: "
|
|
318
|
-
headerRow: "
|
|
319
|
-
"dg-header-shadow": "_dg-header-
|
|
320
|
-
bodyRow: "
|
|
321
|
-
bodyCell: "
|
|
322
|
-
cellContent: "
|
|
323
|
-
cellEditor: "
|
|
324
|
-
cellEditorActions: "
|
|
325
|
-
detailsCell: "
|
|
326
|
-
messageRow: "
|
|
327
|
-
entryBlock: "
|
|
328
|
-
entryRow: "
|
|
329
|
-
entryFlowBlock: "
|
|
330
|
-
pinnedTopBlock: "
|
|
331
|
-
pinnedBottomBlock: "
|
|
332
|
-
entryCell: "
|
|
333
|
-
rowStateIndicator: "
|
|
334
|
-
matchHighlight: "
|
|
335
|
-
summaryRow: "
|
|
336
|
-
summaryCell: "
|
|
315
|
+
tableWrapper: "_tableWrapper_1npmp_2",
|
|
316
|
+
scrollContainer: "_scrollContainer_1npmp_10",
|
|
317
|
+
grid: "_grid_1npmp_21",
|
|
318
|
+
headerRow: "_headerRow_1npmp_27",
|
|
319
|
+
"dg-header-shadow": "_dg-header-shadow_1npmp_1",
|
|
320
|
+
bodyRow: "_bodyRow_1npmp_76",
|
|
321
|
+
bodyCell: "_bodyCell_1npmp_143",
|
|
322
|
+
cellContent: "_cellContent_1npmp_141",
|
|
323
|
+
cellEditor: "_cellEditor_1npmp_243",
|
|
324
|
+
cellEditorActions: "_cellEditorActions_1npmp_252",
|
|
325
|
+
detailsCell: "_detailsCell_1npmp_303",
|
|
326
|
+
messageRow: "_messageRow_1npmp_15",
|
|
327
|
+
entryBlock: "_entryBlock_1npmp_353",
|
|
328
|
+
entryRow: "_entryRow_1npmp_362",
|
|
329
|
+
entryFlowBlock: "_entryFlowBlock_1npmp_371",
|
|
330
|
+
pinnedTopBlock: "_pinnedTopBlock_1npmp_384",
|
|
331
|
+
pinnedBottomBlock: "_pinnedBottomBlock_1npmp_397",
|
|
332
|
+
entryCell: "_entryCell_1npmp_410",
|
|
333
|
+
rowStateIndicator: "_rowStateIndicator_1npmp_440",
|
|
334
|
+
matchHighlight: "_matchHighlight_1npmp_466",
|
|
335
|
+
summaryRow: "_summaryRow_1npmp_478",
|
|
336
|
+
summaryCell: "_summaryCell_1npmp_487"
|
|
337
337
|
}, Pt = {
|
|
338
338
|
active: null,
|
|
339
339
|
openRowIds: [],
|
|
@@ -421,7 +421,7 @@ async function Gt(e, t) {
|
|
|
421
421
|
}
|
|
422
422
|
}
|
|
423
423
|
function Kt(e) {
|
|
424
|
-
let t = new
|
|
424
|
+
let t = new me(Pt), n = /* @__PURE__ */ new Map(), r = 0, i = !1, a = null, o = null, s = (t) => {
|
|
425
425
|
if (On(t.id) || Lt(t) === null) return !1;
|
|
426
426
|
let n = e().editableColumnIds;
|
|
427
427
|
return n !== void 0 && !n.includes(t.id) ? !1 : !Tn(t);
|
|
@@ -433,7 +433,7 @@ function Kt(e) {
|
|
|
433
433
|
if (n === null) continue;
|
|
434
434
|
let a = qt(t.columnDef.meta?.edit?.validate);
|
|
435
435
|
if (a === void 0) continue;
|
|
436
|
-
let o =
|
|
436
|
+
let o = fe(e, n);
|
|
437
437
|
for (let e of Ut) {
|
|
438
438
|
let t = a[e];
|
|
439
439
|
if (t === void 0) continue;
|
|
@@ -529,7 +529,7 @@ function Kt(e) {
|
|
|
529
529
|
for (let r of c()) {
|
|
530
530
|
let i = Lt(r);
|
|
531
531
|
if (i === null) continue;
|
|
532
|
-
let a =
|
|
532
|
+
let a = fe(e.original, i), o = fe(t, i);
|
|
533
533
|
Bt(a, o) || n.push({
|
|
534
534
|
columnId: r.id,
|
|
535
535
|
field: i,
|
|
@@ -546,7 +546,7 @@ function Kt(e) {
|
|
|
546
546
|
field: e,
|
|
547
547
|
message: Ht(n) ?? ""
|
|
548
548
|
}] : [];
|
|
549
|
-
}), i = e.submitErrors.filter((e) => !r.some((t) => t.field === e.field) && Bt(
|
|
549
|
+
}), i = e.submitErrors.filter((e) => !r.some((t) => t.field === e.field) && Bt(fe(n, e.field), e.value)), a = [...r, ...i.map(({ field: e, message: t }) => ({
|
|
550
550
|
field: e,
|
|
551
551
|
message: t
|
|
552
552
|
}))];
|
|
@@ -614,7 +614,7 @@ function Kt(e) {
|
|
|
614
614
|
pendingCommit: null,
|
|
615
615
|
unsubscribe: () => {},
|
|
616
616
|
unmount: () => {},
|
|
617
|
-
form: new
|
|
617
|
+
form: new de({
|
|
618
618
|
defaultValues: r,
|
|
619
619
|
validators: p(t, i),
|
|
620
620
|
onSubmit: async ({ value: n }) => {
|
|
@@ -680,7 +680,7 @@ function Kt(e) {
|
|
|
680
680
|
let r = n.errors, i = Vt(r) ? Ht(r) : void 0;
|
|
681
681
|
return i === void 0 ? [] : [{
|
|
682
682
|
field: e,
|
|
683
|
-
value:
|
|
683
|
+
value: fe(t, e),
|
|
684
684
|
message: i
|
|
685
685
|
}];
|
|
686
686
|
});
|
|
@@ -762,7 +762,7 @@ function Kt(e) {
|
|
|
762
762
|
};
|
|
763
763
|
}, P = async (e, n) => {
|
|
764
764
|
let i = [];
|
|
765
|
-
if (
|
|
765
|
+
if (he(() => {
|
|
766
766
|
for (let t of e) {
|
|
767
767
|
r += 1;
|
|
768
768
|
let e = `__new__${r}`;
|
|
@@ -869,14 +869,14 @@ function Kt(e) {
|
|
|
869
869
|
}, ee = async () => {
|
|
870
870
|
let e = await z(), t = await V();
|
|
871
871
|
return e && t;
|
|
872
|
-
},
|
|
872
|
+
}, te = async (e, t) => {
|
|
873
873
|
let r = w(e);
|
|
874
874
|
if (r === void 0) return !1;
|
|
875
875
|
if (t.length === 0) return !0;
|
|
876
876
|
let i = n.get(e) ?? x(e, r.original, !1);
|
|
877
877
|
for (let { field: e, value: n } of t) i.form.setFieldValue(e, n);
|
|
878
878
|
return E(e);
|
|
879
|
-
},
|
|
879
|
+
}, ne = (t, n) => {
|
|
880
880
|
let r = w(t), i = e().table.getColumn(n);
|
|
881
881
|
return r === void 0 || i === void 0 || !C(r, i) ? null : Lt(i);
|
|
882
882
|
};
|
|
@@ -898,15 +898,15 @@ function Kt(e) {
|
|
|
898
898
|
saveDrafts: V,
|
|
899
899
|
submitAll: ee,
|
|
900
900
|
clearCell: async (t, n) => {
|
|
901
|
-
let r = e().table.getColumn(n), i =
|
|
902
|
-
return i === null || r === void 0 ? !1 :
|
|
901
|
+
let r = e().table.getColumn(n), i = ne(t, n);
|
|
902
|
+
return i === null || r === void 0 ? !1 : te(t, [{
|
|
903
903
|
field: i,
|
|
904
904
|
value: Rt(r.columnDef.meta?.type ?? "string")
|
|
905
905
|
}]);
|
|
906
906
|
},
|
|
907
907
|
setCellValue: async (e, t, n) => {
|
|
908
|
-
let r =
|
|
909
|
-
return r !== null &&
|
|
908
|
+
let r = ne(e, t);
|
|
909
|
+
return r !== null && te(e, [{
|
|
910
910
|
field: r,
|
|
911
911
|
value: n
|
|
912
912
|
}]);
|
|
@@ -914,14 +914,14 @@ function Kt(e) {
|
|
|
914
914
|
setRowValues: async (e, t) => {
|
|
915
915
|
let n = [];
|
|
916
916
|
for (let [r, i] of Object.entries(t)) {
|
|
917
|
-
let t =
|
|
917
|
+
let t = ne(e, r);
|
|
918
918
|
if (t === null) return !1;
|
|
919
919
|
n.push({
|
|
920
920
|
field: t,
|
|
921
921
|
value: i
|
|
922
922
|
});
|
|
923
923
|
}
|
|
924
|
-
return
|
|
924
|
+
return te(e, n);
|
|
925
925
|
},
|
|
926
926
|
addRow: M,
|
|
927
927
|
addRows: P,
|
|
@@ -936,13 +936,13 @@ function qt(e) {
|
|
|
936
936
|
//#region src/tmdatagrid/components/TMDataGridEditColumn.tsx
|
|
937
937
|
var Jt = "__edit__";
|
|
938
938
|
function Yt(t) {
|
|
939
|
-
let n = e(11), { state: r, rowId: i, label: a, error: o } = t, s = r === "new" ?
|
|
940
|
-
n[0] === s ? u = n[1] : (u = /* @__PURE__ */
|
|
939
|
+
let n = e(11), { state: r, rowId: i, label: a, error: o } = t, s = r === "new" ? K : r === "edited" ? W : q, c = o ?? a, l = o !== null || void 0, u;
|
|
940
|
+
n[0] === s ? u = n[1] : (u = /* @__PURE__ */ Y(s, {
|
|
941
941
|
size: 16,
|
|
942
942
|
stroke: 1.6
|
|
943
943
|
}), n[0] = s, n[1] = u);
|
|
944
944
|
let d;
|
|
945
|
-
n[2] !== a || n[3] !== i || n[4] !== r || n[5] !== l || n[6] !== u ? (d = /* @__PURE__ */
|
|
945
|
+
n[2] !== a || n[3] !== i || n[4] !== r || n[5] !== l || n[6] !== u ? (d = /* @__PURE__ */ Y("span", {
|
|
946
946
|
role: "img",
|
|
947
947
|
"aria-label": a,
|
|
948
948
|
"data-dg-part": "row-state",
|
|
@@ -953,7 +953,7 @@ function Yt(t) {
|
|
|
953
953
|
children: u
|
|
954
954
|
}), n[2] = a, n[3] = i, n[4] = r, n[5] = l, n[6] = u, n[7] = d) : d = n[7];
|
|
955
955
|
let f;
|
|
956
|
-
return n[8] !== c || n[9] !== d ? (f = /* @__PURE__ */
|
|
956
|
+
return n[8] !== c || n[9] !== d ? (f = /* @__PURE__ */ Y(O, {
|
|
957
957
|
label: c,
|
|
958
958
|
withArrow: !0,
|
|
959
959
|
children: d
|
|
@@ -977,10 +977,10 @@ function Xt(t) {
|
|
|
977
977
|
let w = m !== void 0 && (m.hasRowError || m.errorFields.length > 0), T;
|
|
978
978
|
n[12] !== i || n[13] !== w || n[14] !== o || n[15] !== m || n[16] !== c ? (T = w ? Ht(i.getForm(c)?.state.errors ?? []) ?? m.errorMessages[0]?.message ?? o.editRowErrors : null, n[12] = i, n[13] = w, n[14] = o, n[15] = m, n[16] = c, n[17] = T) : T = n[17];
|
|
979
979
|
let E = T, D;
|
|
980
|
-
n[18] !== i || n[19] !== o || n[20] !== c || n[21] !== s ? (D = i.canDeleteRows() ? /* @__PURE__ */
|
|
980
|
+
n[18] !== i || n[19] !== o || n[20] !== c || n[21] !== s ? (D = i.canDeleteRows() ? /* @__PURE__ */ Y(O, {
|
|
981
981
|
label: o.deleteRow,
|
|
982
982
|
withArrow: !0,
|
|
983
|
-
children: /* @__PURE__ */
|
|
983
|
+
children: /* @__PURE__ */ Y(l, {
|
|
984
984
|
variant: "subtle",
|
|
985
985
|
color: "gray",
|
|
986
986
|
size: "sm",
|
|
@@ -991,7 +991,7 @@ function Xt(t) {
|
|
|
991
991
|
onClick: (e) => {
|
|
992
992
|
e.stopPropagation(), i.deleteRow(c);
|
|
993
993
|
},
|
|
994
|
-
children: /* @__PURE__ */
|
|
994
|
+
children: /* @__PURE__ */ Y(q, {
|
|
995
995
|
size: 16,
|
|
996
996
|
stroke: 1.6
|
|
997
997
|
})
|
|
@@ -1001,7 +1001,7 @@ function Xt(t) {
|
|
|
1001
1001
|
if (_) {
|
|
1002
1002
|
if (y) {
|
|
1003
1003
|
let e;
|
|
1004
|
-
n[23] !== o.rowStateNew || n[24] !== E || n[25] !== c ? (e = /* @__PURE__ */
|
|
1004
|
+
n[23] !== o.rowStateNew || n[24] !== E || n[25] !== c ? (e = /* @__PURE__ */ Y(Yt, {
|
|
1005
1005
|
state: "new",
|
|
1006
1006
|
rowId: c,
|
|
1007
1007
|
label: o.rowStateNew,
|
|
@@ -1015,12 +1015,12 @@ function Xt(t) {
|
|
|
1015
1015
|
});
|
|
1016
1016
|
}, n[27] = i, n[28] = c, n[29] = t) : t = n[29];
|
|
1017
1017
|
let r;
|
|
1018
|
-
n[30] === Symbol.for("react.memo_cache_sentinel") ? (r = /* @__PURE__ */
|
|
1018
|
+
n[30] === Symbol.for("react.memo_cache_sentinel") ? (r = /* @__PURE__ */ Y(W, {
|
|
1019
1019
|
size: 16,
|
|
1020
1020
|
stroke: 1.6
|
|
1021
1021
|
}), n[30] = r) : r = n[30];
|
|
1022
1022
|
let a;
|
|
1023
|
-
n[31] !== o.editRow || n[32] !== c || n[33] !== t || n[34] !== s ? (a = /* @__PURE__ */
|
|
1023
|
+
n[31] !== o.editRow || n[32] !== c || n[33] !== t || n[34] !== s ? (a = /* @__PURE__ */ Y(l, {
|
|
1024
1024
|
variant: "subtle",
|
|
1025
1025
|
color: "gray",
|
|
1026
1026
|
size: "sm",
|
|
@@ -1032,7 +1032,7 @@ function Xt(t) {
|
|
|
1032
1032
|
children: r
|
|
1033
1033
|
}), n[31] = o.editRow, n[32] = c, n[33] = t, n[34] = s, n[35] = a) : a = n[35];
|
|
1034
1034
|
let u;
|
|
1035
|
-
n[36] !== o.editRow || n[37] !== a ? (u = /* @__PURE__ */
|
|
1035
|
+
n[36] !== o.editRow || n[37] !== a ? (u = /* @__PURE__ */ Y(O, {
|
|
1036
1036
|
label: o.editRow,
|
|
1037
1037
|
withArrow: !0,
|
|
1038
1038
|
children: a
|
|
@@ -1040,12 +1040,12 @@ function Xt(t) {
|
|
|
1040
1040
|
let d;
|
|
1041
1041
|
n[39] !== i || n[40] !== c ? (d = () => i.cancel(c), n[39] = i, n[40] = c, n[41] = d) : d = n[41];
|
|
1042
1042
|
let f;
|
|
1043
|
-
n[42] === Symbol.for("react.memo_cache_sentinel") ? (f = /* @__PURE__ */ J
|
|
1043
|
+
n[42] === Symbol.for("react.memo_cache_sentinel") ? (f = /* @__PURE__ */ Y(J, {
|
|
1044
1044
|
size: 16,
|
|
1045
1045
|
stroke: 1.6
|
|
1046
1046
|
}), n[42] = f) : f = n[42];
|
|
1047
1047
|
let m;
|
|
1048
|
-
n[43] !== o.discardNewRow || n[44] !== c || n[45] !== d || n[46] !== s ? (m = /* @__PURE__ */
|
|
1048
|
+
n[43] !== o.discardNewRow || n[44] !== c || n[45] !== d || n[46] !== s ? (m = /* @__PURE__ */ Y(l, {
|
|
1049
1049
|
variant: "subtle",
|
|
1050
1050
|
color: "gray",
|
|
1051
1051
|
size: "sm",
|
|
@@ -1057,13 +1057,13 @@ function Xt(t) {
|
|
|
1057
1057
|
children: f
|
|
1058
1058
|
}), n[43] = o.discardNewRow, n[44] = c, n[45] = d, n[46] = s, n[47] = m) : m = n[47];
|
|
1059
1059
|
let h;
|
|
1060
|
-
n[48] !== o.discardNewRow || n[49] !== m ? (h = /* @__PURE__ */
|
|
1060
|
+
n[48] !== o.discardNewRow || n[49] !== m ? (h = /* @__PURE__ */ Y(O, {
|
|
1061
1061
|
label: o.discardNewRow,
|
|
1062
1062
|
withArrow: !0,
|
|
1063
1063
|
children: m
|
|
1064
1064
|
}), n[48] = o.discardNewRow, n[49] = m, n[50] = h) : h = n[50];
|
|
1065
1065
|
let g;
|
|
1066
|
-
return n[51] !== u || n[52] !== h || n[53] !== e ? (g = /* @__PURE__ */
|
|
1066
|
+
return n[51] !== u || n[52] !== h || n[53] !== e ? (g = /* @__PURE__ */ X(p, {
|
|
1067
1067
|
gap: 0,
|
|
1068
1068
|
wrap: "nowrap",
|
|
1069
1069
|
children: [
|
|
@@ -1076,12 +1076,12 @@ function Xt(t) {
|
|
|
1076
1076
|
let e;
|
|
1077
1077
|
n[55] !== i || n[56] !== c ? (e = () => void i.commit(c), n[55] = i, n[56] = c, n[57] = e) : e = n[57];
|
|
1078
1078
|
let t;
|
|
1079
|
-
n[58] === Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */
|
|
1079
|
+
n[58] === Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */ Y(B, {
|
|
1080
1080
|
size: 16,
|
|
1081
1081
|
stroke: 2
|
|
1082
1082
|
}), n[58] = t) : t = n[58];
|
|
1083
1083
|
let r;
|
|
1084
|
-
n[59] !== o.confirmNewRow || n[60] !== c || n[61] !== e || n[62] !== s ? (r = /* @__PURE__ */
|
|
1084
|
+
n[59] !== o.confirmNewRow || n[60] !== c || n[61] !== e || n[62] !== s ? (r = /* @__PURE__ */ Y(l, {
|
|
1085
1085
|
variant: "subtle",
|
|
1086
1086
|
color: "green",
|
|
1087
1087
|
size: "sm",
|
|
@@ -1093,7 +1093,7 @@ function Xt(t) {
|
|
|
1093
1093
|
children: t
|
|
1094
1094
|
}), n[59] = o.confirmNewRow, n[60] = c, n[61] = e, n[62] = s, n[63] = r) : r = n[63];
|
|
1095
1095
|
let a;
|
|
1096
|
-
n[64] !== o.confirmNewRow || n[65] !== r ? (a = /* @__PURE__ */
|
|
1096
|
+
n[64] !== o.confirmNewRow || n[65] !== r ? (a = /* @__PURE__ */ Y(O, {
|
|
1097
1097
|
label: o.confirmNewRow,
|
|
1098
1098
|
withArrow: !0,
|
|
1099
1099
|
children: r
|
|
@@ -1101,12 +1101,12 @@ function Xt(t) {
|
|
|
1101
1101
|
let u;
|
|
1102
1102
|
n[67] !== i || n[68] !== c ? (u = () => i.cancel(c), n[67] = i, n[68] = c, n[69] = u) : u = n[69];
|
|
1103
1103
|
let d;
|
|
1104
|
-
n[70] === Symbol.for("react.memo_cache_sentinel") ? (d = /* @__PURE__ */ J
|
|
1104
|
+
n[70] === Symbol.for("react.memo_cache_sentinel") ? (d = /* @__PURE__ */ Y(J, {
|
|
1105
1105
|
size: 16,
|
|
1106
1106
|
stroke: 1.6
|
|
1107
1107
|
}), n[70] = d) : d = n[70];
|
|
1108
1108
|
let f;
|
|
1109
|
-
n[71] !== o.discardNewRow || n[72] !== c || n[73] !== u || n[74] !== s ? (f = /* @__PURE__ */
|
|
1109
|
+
n[71] !== o.discardNewRow || n[72] !== c || n[73] !== u || n[74] !== s ? (f = /* @__PURE__ */ Y(l, {
|
|
1110
1110
|
variant: "subtle",
|
|
1111
1111
|
color: "gray",
|
|
1112
1112
|
size: "sm",
|
|
@@ -1118,13 +1118,13 @@ function Xt(t) {
|
|
|
1118
1118
|
children: d
|
|
1119
1119
|
}), n[71] = o.discardNewRow, n[72] = c, n[73] = u, n[74] = s, n[75] = f) : f = n[75];
|
|
1120
1120
|
let m;
|
|
1121
|
-
n[76] !== o.discardNewRow || n[77] !== f ? (m = /* @__PURE__ */
|
|
1121
|
+
n[76] !== o.discardNewRow || n[77] !== f ? (m = /* @__PURE__ */ Y(O, {
|
|
1122
1122
|
label: o.discardNewRow,
|
|
1123
1123
|
withArrow: !0,
|
|
1124
1124
|
children: f
|
|
1125
1125
|
}), n[76] = o.discardNewRow, n[77] = f, n[78] = m) : m = n[78];
|
|
1126
1126
|
let h;
|
|
1127
|
-
return n[79] !== a || n[80] !== m ? (h = /* @__PURE__ */
|
|
1127
|
+
return n[79] !== a || n[80] !== m ? (h = /* @__PURE__ */ X(p, {
|
|
1128
1128
|
gap: 0,
|
|
1129
1129
|
wrap: "nowrap",
|
|
1130
1130
|
children: [a, m]
|
|
@@ -1132,7 +1132,7 @@ function Xt(t) {
|
|
|
1132
1132
|
}
|
|
1133
1133
|
if (C) {
|
|
1134
1134
|
let e;
|
|
1135
|
-
n[82] !== o.rowStateDeleted || n[83] !== c ? (e = /* @__PURE__ */
|
|
1135
|
+
n[82] !== o.rowStateDeleted || n[83] !== c ? (e = /* @__PURE__ */ Y(Yt, {
|
|
1136
1136
|
state: "deleted",
|
|
1137
1137
|
rowId: c,
|
|
1138
1138
|
label: o.rowStateDeleted,
|
|
@@ -1143,12 +1143,12 @@ function Xt(t) {
|
|
|
1143
1143
|
e.stopPropagation(), i.deleteRow(c);
|
|
1144
1144
|
}, n[85] = i, n[86] = c, n[87] = t) : t = n[87];
|
|
1145
1145
|
let r;
|
|
1146
|
-
n[88] === Symbol.for("react.memo_cache_sentinel") ? (r = /* @__PURE__ */
|
|
1146
|
+
n[88] === Symbol.for("react.memo_cache_sentinel") ? (r = /* @__PURE__ */ Y(N, {
|
|
1147
1147
|
size: 16,
|
|
1148
1148
|
stroke: 1.6
|
|
1149
1149
|
}), n[88] = r) : r = n[88];
|
|
1150
1150
|
let a;
|
|
1151
|
-
n[89] !== o.restoreRow || n[90] !== c || n[91] !== t || n[92] !== s ? (a = /* @__PURE__ */
|
|
1151
|
+
n[89] !== o.restoreRow || n[90] !== c || n[91] !== t || n[92] !== s ? (a = /* @__PURE__ */ Y(l, {
|
|
1152
1152
|
variant: "subtle",
|
|
1153
1153
|
color: "gray",
|
|
1154
1154
|
size: "sm",
|
|
@@ -1160,13 +1160,13 @@ function Xt(t) {
|
|
|
1160
1160
|
children: r
|
|
1161
1161
|
}), n[89] = o.restoreRow, n[90] = c, n[91] = t, n[92] = s, n[93] = a) : a = n[93];
|
|
1162
1162
|
let u;
|
|
1163
|
-
n[94] !== o.restoreRow || n[95] !== a ? (u = /* @__PURE__ */
|
|
1163
|
+
n[94] !== o.restoreRow || n[95] !== a ? (u = /* @__PURE__ */ Y(O, {
|
|
1164
1164
|
label: o.restoreRow,
|
|
1165
1165
|
withArrow: !0,
|
|
1166
1166
|
children: a
|
|
1167
1167
|
}), n[94] = o.restoreRow, n[95] = a, n[96] = u) : u = n[96];
|
|
1168
1168
|
let d;
|
|
1169
|
-
return n[97] !== u || n[98] !== e ? (d = /* @__PURE__ */
|
|
1169
|
+
return n[97] !== u || n[98] !== e ? (d = /* @__PURE__ */ X(p, {
|
|
1170
1170
|
gap: 0,
|
|
1171
1171
|
wrap: "nowrap",
|
|
1172
1172
|
children: [e, u]
|
|
@@ -1175,14 +1175,14 @@ function Xt(t) {
|
|
|
1175
1175
|
if (!i.canEditRow(r)) return null;
|
|
1176
1176
|
if (m?.isSubmitting) {
|
|
1177
1177
|
let e;
|
|
1178
|
-
return n[100] === o.loading ? e = n[101] : (e = /* @__PURE__ */
|
|
1178
|
+
return n[100] === o.loading ? e = n[101] : (e = /* @__PURE__ */ Y(h, {
|
|
1179
1179
|
size: "xs",
|
|
1180
1180
|
"aria-label": o.loading
|
|
1181
1181
|
}), n[100] = o.loading, n[101] = e), e;
|
|
1182
1182
|
}
|
|
1183
1183
|
if (x) {
|
|
1184
1184
|
let e;
|
|
1185
|
-
n[102] !== o.rowStateEdited || n[103] !== E || n[104] !== c ? (e = /* @__PURE__ */
|
|
1185
|
+
n[102] !== o.rowStateEdited || n[103] !== E || n[104] !== c ? (e = /* @__PURE__ */ Y(Yt, {
|
|
1186
1186
|
state: "edited",
|
|
1187
1187
|
rowId: c,
|
|
1188
1188
|
label: o.rowStateEdited,
|
|
@@ -1193,12 +1193,12 @@ function Xt(t) {
|
|
|
1193
1193
|
e.stopPropagation(), i.cancel(c);
|
|
1194
1194
|
}, n[106] = i, n[107] = c, n[108] = t) : t = n[108];
|
|
1195
1195
|
let r;
|
|
1196
|
-
n[109] === Symbol.for("react.memo_cache_sentinel") ? (r = /* @__PURE__ */
|
|
1196
|
+
n[109] === Symbol.for("react.memo_cache_sentinel") ? (r = /* @__PURE__ */ Y(N, {
|
|
1197
1197
|
size: 16,
|
|
1198
1198
|
stroke: 1.6
|
|
1199
1199
|
}), n[109] = r) : r = n[109];
|
|
1200
1200
|
let a;
|
|
1201
|
-
n[110] !== o.revertRow || n[111] !== c || n[112] !== t || n[113] !== s ? (a = /* @__PURE__ */
|
|
1201
|
+
n[110] !== o.revertRow || n[111] !== c || n[112] !== t || n[113] !== s ? (a = /* @__PURE__ */ Y(l, {
|
|
1202
1202
|
variant: "subtle",
|
|
1203
1203
|
color: "gray",
|
|
1204
1204
|
size: "sm",
|
|
@@ -1210,13 +1210,13 @@ function Xt(t) {
|
|
|
1210
1210
|
children: r
|
|
1211
1211
|
}), n[110] = o.revertRow, n[111] = c, n[112] = t, n[113] = s, n[114] = a) : a = n[114];
|
|
1212
1212
|
let u;
|
|
1213
|
-
n[115] !== o.revertRow || n[116] !== a ? (u = /* @__PURE__ */
|
|
1213
|
+
n[115] !== o.revertRow || n[116] !== a ? (u = /* @__PURE__ */ Y(O, {
|
|
1214
1214
|
label: o.revertRow,
|
|
1215
1215
|
withArrow: !0,
|
|
1216
1216
|
children: a
|
|
1217
1217
|
}), n[115] = o.revertRow, n[116] = a, n[117] = u) : u = n[117];
|
|
1218
1218
|
let d;
|
|
1219
|
-
return n[118] !== u || n[119] !== e ? (d = /* @__PURE__ */
|
|
1219
|
+
return n[118] !== u || n[119] !== e ? (d = /* @__PURE__ */ X(p, {
|
|
1220
1220
|
gap: 0,
|
|
1221
1221
|
wrap: "nowrap",
|
|
1222
1222
|
children: [e, u]
|
|
@@ -1224,10 +1224,10 @@ function Xt(t) {
|
|
|
1224
1224
|
}
|
|
1225
1225
|
if (!d) {
|
|
1226
1226
|
let e;
|
|
1227
|
-
n[121] !== i || n[122] !== a.editMode || n[123] !== o || n[124] !== c || n[125] !== s ? (e = a.editMode === "row" && /* @__PURE__ */
|
|
1227
|
+
n[121] !== i || n[122] !== a.editMode || n[123] !== o || n[124] !== c || n[125] !== s ? (e = a.editMode === "row" && /* @__PURE__ */ Y(O, {
|
|
1228
1228
|
label: o.editRow,
|
|
1229
1229
|
withArrow: !0,
|
|
1230
|
-
children: /* @__PURE__ */
|
|
1230
|
+
children: /* @__PURE__ */ Y(l, {
|
|
1231
1231
|
variant: "subtle",
|
|
1232
1232
|
color: "gray",
|
|
1233
1233
|
size: "sm",
|
|
@@ -1241,14 +1241,14 @@ function Xt(t) {
|
|
|
1241
1241
|
columnId: null
|
|
1242
1242
|
});
|
|
1243
1243
|
},
|
|
1244
|
-
children: /* @__PURE__ */
|
|
1244
|
+
children: /* @__PURE__ */ Y(W, {
|
|
1245
1245
|
size: 16,
|
|
1246
1246
|
stroke: 1.6
|
|
1247
1247
|
})
|
|
1248
1248
|
})
|
|
1249
1249
|
}), n[121] = i, n[122] = a.editMode, n[123] = o, n[124] = c, n[125] = s, n[126] = e) : e = n[126];
|
|
1250
1250
|
let t;
|
|
1251
|
-
return n[127] !== e || n[128] !== k ? (t = /* @__PURE__ */
|
|
1251
|
+
return n[127] !== e || n[128] !== k ? (t = /* @__PURE__ */ X(p, {
|
|
1252
1252
|
gap: 0,
|
|
1253
1253
|
wrap: "nowrap",
|
|
1254
1254
|
children: [e, k]
|
|
@@ -1259,12 +1259,12 @@ function Xt(t) {
|
|
|
1259
1259
|
e.stopPropagation(), i.commit(c);
|
|
1260
1260
|
}, n[130] = i, n[131] = c, n[132] = M) : M = n[132];
|
|
1261
1261
|
let P;
|
|
1262
|
-
n[133] === Symbol.for("react.memo_cache_sentinel") ? (P = /* @__PURE__ */
|
|
1262
|
+
n[133] === Symbol.for("react.memo_cache_sentinel") ? (P = /* @__PURE__ */ Y(B, {
|
|
1263
1263
|
size: 16,
|
|
1264
1264
|
stroke: 2
|
|
1265
1265
|
}), n[133] = P) : P = n[133];
|
|
1266
1266
|
let F;
|
|
1267
|
-
n[134] !== o.saveRow || n[135] !== c || n[136] !== M || n[137] !== A || n[138] !== s ? (F = /* @__PURE__ */
|
|
1267
|
+
n[134] !== o.saveRow || n[135] !== c || n[136] !== M || n[137] !== A || n[138] !== s ? (F = /* @__PURE__ */ Y(l, {
|
|
1268
1268
|
variant: "subtle",
|
|
1269
1269
|
color: A,
|
|
1270
1270
|
size: "sm",
|
|
@@ -1276,11 +1276,11 @@ function Xt(t) {
|
|
|
1276
1276
|
children: P
|
|
1277
1277
|
}), n[134] = o.saveRow, n[135] = c, n[136] = M, n[137] = A, n[138] = s, n[139] = F) : F = n[139];
|
|
1278
1278
|
let I = F, L;
|
|
1279
|
-
n[140] !== o.saveRow || n[141] !== E || n[142] !== I ? (L = E === null ? /* @__PURE__ */
|
|
1279
|
+
n[140] !== o.saveRow || n[141] !== E || n[142] !== I ? (L = E === null ? /* @__PURE__ */ Y(O, {
|
|
1280
1280
|
label: o.saveRow,
|
|
1281
1281
|
withArrow: !0,
|
|
1282
1282
|
children: I
|
|
1283
|
-
}) : /* @__PURE__ */
|
|
1283
|
+
}) : /* @__PURE__ */ Y(O, {
|
|
1284
1284
|
label: E,
|
|
1285
1285
|
withArrow: !0,
|
|
1286
1286
|
children: I
|
|
@@ -1290,12 +1290,12 @@ function Xt(t) {
|
|
|
1290
1290
|
e.stopPropagation(), i.cancel(c);
|
|
1291
1291
|
}, n[144] = i, n[145] = c, n[146] = R) : R = n[146];
|
|
1292
1292
|
let z;
|
|
1293
|
-
n[147] === Symbol.for("react.memo_cache_sentinel") ? (z = /* @__PURE__ */ J
|
|
1293
|
+
n[147] === Symbol.for("react.memo_cache_sentinel") ? (z = /* @__PURE__ */ Y(J, {
|
|
1294
1294
|
size: 16,
|
|
1295
1295
|
stroke: 1.6
|
|
1296
1296
|
}), n[147] = z) : z = n[147];
|
|
1297
1297
|
let V;
|
|
1298
|
-
n[148] !== o.cancelRowEdit || n[149] !== c || n[150] !== R || n[151] !== s ? (V = /* @__PURE__ */
|
|
1298
|
+
n[148] !== o.cancelRowEdit || n[149] !== c || n[150] !== R || n[151] !== s ? (V = /* @__PURE__ */ Y(l, {
|
|
1299
1299
|
variant: "subtle",
|
|
1300
1300
|
color: "gray",
|
|
1301
1301
|
size: "sm",
|
|
@@ -1307,13 +1307,13 @@ function Xt(t) {
|
|
|
1307
1307
|
children: z
|
|
1308
1308
|
}), n[148] = o.cancelRowEdit, n[149] = c, n[150] = R, n[151] = s, n[152] = V) : V = n[152];
|
|
1309
1309
|
let H;
|
|
1310
|
-
n[153] !== o.cancelRowEdit || n[154] !== V ? (H = /* @__PURE__ */
|
|
1310
|
+
n[153] !== o.cancelRowEdit || n[154] !== V ? (H = /* @__PURE__ */ Y(O, {
|
|
1311
1311
|
label: o.cancelRowEdit,
|
|
1312
1312
|
withArrow: !0,
|
|
1313
1313
|
children: V
|
|
1314
1314
|
}), n[153] = o.cancelRowEdit, n[154] = V, n[155] = H) : H = n[155];
|
|
1315
1315
|
let ee;
|
|
1316
|
-
return n[156] !== L || n[157] !== H ? (ee = /* @__PURE__ */
|
|
1316
|
+
return n[156] !== L || n[157] !== H ? (ee = /* @__PURE__ */ X(p, {
|
|
1317
1317
|
gap: 0,
|
|
1318
1318
|
wrap: "nowrap",
|
|
1319
1319
|
children: [L, H]
|
|
@@ -1338,8 +1338,8 @@ function Zt(e = "Edit", t = !1) {
|
|
|
1338
1338
|
enableHiding: !1,
|
|
1339
1339
|
enablePinning: !1,
|
|
1340
1340
|
header: () => null,
|
|
1341
|
-
cell: ({ row: e }) => /* @__PURE__ */
|
|
1342
|
-
aggregatedCell: ({ row: e }) => /* @__PURE__ */
|
|
1341
|
+
cell: ({ row: e }) => /* @__PURE__ */ Y(Xt, { row: e }),
|
|
1342
|
+
aggregatedCell: ({ row: e }) => /* @__PURE__ */ Y(Xt, { row: e })
|
|
1343
1343
|
};
|
|
1344
1344
|
}
|
|
1345
1345
|
var Qt = {
|
|
@@ -1375,25 +1375,25 @@ function an(t) {
|
|
|
1375
1375
|
e.stopPropagation(), r.toggleExpanded();
|
|
1376
1376
|
}, n[16] = r, n[17] = g);
|
|
1377
1377
|
let _;
|
|
1378
|
-
n[18] === Symbol.for("react.memo_cache_sentinel") ? (_ = /* @__PURE__ */
|
|
1378
|
+
n[18] === Symbol.for("react.memo_cache_sentinel") ? (_ = /* @__PURE__ */ Y(H, {
|
|
1379
1379
|
size: 16,
|
|
1380
1380
|
stroke: 1.6
|
|
1381
1381
|
}), n[18] = _) : _ = n[18];
|
|
1382
1382
|
let v;
|
|
1383
|
-
n[19] === o ? v = n[20] : (v = /* @__PURE__ */
|
|
1383
|
+
n[19] === o ? v = n[20] : (v = /* @__PURE__ */ Y("span", {
|
|
1384
1384
|
className: Qt.chevron,
|
|
1385
1385
|
"data-expanded": o,
|
|
1386
1386
|
children: _
|
|
1387
1387
|
}), n[19] = o, n[20] = v);
|
|
1388
1388
|
let y;
|
|
1389
|
-
n[21] === l ? y = n[22] : (y = /* @__PURE__ */
|
|
1389
|
+
n[21] === l ? y = n[22] : (y = /* @__PURE__ */ Y("span", {
|
|
1390
1390
|
className: Qt.groupLabel,
|
|
1391
1391
|
children: l
|
|
1392
1392
|
}), n[21] = l, n[22] = y);
|
|
1393
1393
|
let b;
|
|
1394
1394
|
n[23] === r ? b = n[24] : (b = $t(r), n[23] = r, n[24] = b);
|
|
1395
1395
|
let x;
|
|
1396
|
-
n[25] === b.length ? x = n[26] : (x = /* @__PURE__ */
|
|
1396
|
+
n[25] === b.length ? x = n[26] : (x = /* @__PURE__ */ X("span", {
|
|
1397
1397
|
className: Qt.groupCount,
|
|
1398
1398
|
children: [
|
|
1399
1399
|
"(",
|
|
@@ -1402,7 +1402,7 @@ function an(t) {
|
|
|
1402
1402
|
]
|
|
1403
1403
|
}), n[25] = b.length, n[26] = x);
|
|
1404
1404
|
let S;
|
|
1405
|
-
return n[27] !== c || n[28] !== r.id || n[29] !== v || n[30] !== y || n[31] !== x || n[32] !== u || n[33] !== d || n[34] !== f || n[35] !== p || n[36] !== m || n[37] !== g ? (S = /* @__PURE__ */
|
|
1405
|
+
return n[27] !== c || n[28] !== r.id || n[29] !== v || n[30] !== y || n[31] !== x || n[32] !== u || n[33] !== d || n[34] !== f || n[35] !== p || n[36] !== m || n[37] !== g ? (S = /* @__PURE__ */ X(c, {
|
|
1406
1406
|
className: u,
|
|
1407
1407
|
style: d,
|
|
1408
1408
|
tabIndex: f,
|
|
@@ -1420,7 +1420,7 @@ function an(t) {
|
|
|
1420
1420
|
}
|
|
1421
1421
|
function on(t) {
|
|
1422
1422
|
let n = e(6), { table: r } = t, { labels: i } = Q(), a;
|
|
1423
|
-
n[0] === Symbol.for("react.memo_cache_sentinel") ? (a = { compare:
|
|
1423
|
+
n[0] === Symbol.for("react.memo_cache_sentinel") ? (a = { compare: ge }, n[0] = a) : a = n[0];
|
|
1424
1424
|
let o = j(r.store, sn, a);
|
|
1425
1425
|
if (o.length === 0) return i.groupColumnLabel;
|
|
1426
1426
|
let s;
|
|
@@ -1450,9 +1450,9 @@ function cn(e = "Group") {
|
|
|
1450
1450
|
enableGlobalFilter: !1,
|
|
1451
1451
|
enableHiding: !1,
|
|
1452
1452
|
enablePinning: !1,
|
|
1453
|
-
cell: ({ row: e }) => /* @__PURE__ */
|
|
1454
|
-
aggregatedCell: ({ row: e }) => /* @__PURE__ */
|
|
1455
|
-
header: ({ table: e }) => /* @__PURE__ */
|
|
1453
|
+
cell: ({ row: e }) => /* @__PURE__ */ Y(an, { row: e }),
|
|
1454
|
+
aggregatedCell: ({ row: e }) => /* @__PURE__ */ Y(an, { row: e }),
|
|
1455
|
+
header: ({ table: e }) => /* @__PURE__ */ Y(on, { table: e })
|
|
1456
1456
|
};
|
|
1457
1457
|
}
|
|
1458
1458
|
//#endregion
|
|
@@ -1551,7 +1551,7 @@ function gn(t) {
|
|
|
1551
1551
|
let c = j(r.store, s), l = i.selectAllRows, u = c && !o, d;
|
|
1552
1552
|
n[4] === r ? d = n[5] : (d = r.getToggleAllRowsSelectedHandler(), n[4] = r, n[5] = d);
|
|
1553
1553
|
let p;
|
|
1554
|
-
return n[6] !== o || n[7] !== i.selectAllRows || n[8] !== u || n[9] !== d ? (p = /* @__PURE__ */
|
|
1554
|
+
return n[6] !== o || n[7] !== i.selectAllRows || n[8] !== u || n[9] !== d ? (p = /* @__PURE__ */ Y(f, {
|
|
1555
1555
|
size: "xs",
|
|
1556
1556
|
"aria-label": l,
|
|
1557
1557
|
"data-dg-part": "select-all",
|
|
@@ -1564,7 +1564,7 @@ function _n(t) {
|
|
|
1564
1564
|
let n = e(2), { table: r } = t, { features: i } = Q();
|
|
1565
1565
|
if (!i.multiRowSelection) return null;
|
|
1566
1566
|
let a;
|
|
1567
|
-
return n[0] === r ? a = n[1] : (a = /* @__PURE__ */
|
|
1567
|
+
return n[0] === r ? a = n[1] : (a = /* @__PURE__ */ Y(gn, { table: r }), n[0] = r, n[1] = a), a;
|
|
1568
1568
|
}
|
|
1569
1569
|
function vn(t) {
|
|
1570
1570
|
let n = e(21), { row: r } = t, { ui: i, features: a, labels: o } = Q(), s = $e(), c = r.subRows.length > 0, l;
|
|
@@ -1591,7 +1591,7 @@ function vn(t) {
|
|
|
1591
1591
|
r.table.setRowSelection(o.selection), i.actions.setSelectionAnchor(o.anchorRowId);
|
|
1592
1592
|
}, n[7] = a, n[8] = r.id, n[9] = r.table, n[10] = i.actions, n[11] = i.state.selectionAnchorRowId, n[12] = y) : y = n[12];
|
|
1593
1593
|
let b;
|
|
1594
|
-
return n[13] !== r.id || n[14] !== u || n[15] !== g || n[16] !== _ || n[17] !== v || n[18] !== y || n[19] !== s ? (b = /* @__PURE__ */
|
|
1594
|
+
return n[13] !== r.id || n[14] !== u || n[15] !== g || n[16] !== _ || n[17] !== v || n[18] !== y || n[19] !== s ? (b = /* @__PURE__ */ Y(f, {
|
|
1595
1595
|
size: "xs",
|
|
1596
1596
|
tabIndex: s,
|
|
1597
1597
|
"aria-label": g,
|
|
@@ -1624,9 +1624,9 @@ function bn(e = "Checkbox selection") {
|
|
|
1624
1624
|
enableGlobalFilter: !1,
|
|
1625
1625
|
enableHiding: !1,
|
|
1626
1626
|
enablePinning: !1,
|
|
1627
|
-
header: ({ table: e }) => /* @__PURE__ */
|
|
1628
|
-
cell: ({ row: e }) => /* @__PURE__ */
|
|
1629
|
-
aggregatedCell: ({ row: e }) => /* @__PURE__ */
|
|
1627
|
+
header: ({ table: e }) => /* @__PURE__ */ Y(_n, { table: e }),
|
|
1628
|
+
cell: ({ row: e }) => /* @__PURE__ */ Y(vn, { row: e }),
|
|
1629
|
+
aggregatedCell: ({ row: e }) => /* @__PURE__ */ Y(vn, { row: e })
|
|
1630
1630
|
};
|
|
1631
1631
|
}
|
|
1632
1632
|
//#endregion
|
|
@@ -1684,12 +1684,12 @@ function jn() {
|
|
|
1684
1684
|
let c;
|
|
1685
1685
|
t[19] === Symbol.for("react.memo_cache_sentinel") ? (c = (e) => s(e.currentTarget.value), t[19] = c) : c = t[19];
|
|
1686
1686
|
let d;
|
|
1687
|
-
t[20] === Symbol.for("react.memo_cache_sentinel") ? (d = /* @__PURE__ */
|
|
1687
|
+
t[20] === Symbol.for("react.memo_cache_sentinel") ? (d = /* @__PURE__ */ Y(ce, {
|
|
1688
1688
|
size: 16,
|
|
1689
1689
|
stroke: 1.6
|
|
1690
|
-
}), t[20] = d) : d = t[20], t[21] !== i || t[22] !== r.columnsSearchPlaceholder || t[23] !== o ? (C = /* @__PURE__ */
|
|
1690
|
+
}), t[20] = d) : d = t[20], t[21] !== i || t[22] !== r.columnsSearchPlaceholder || t[23] !== o ? (C = /* @__PURE__ */ Y("div", {
|
|
1691
1691
|
className: Xe.columnsPanelSearch,
|
|
1692
|
-
children: /* @__PURE__ */
|
|
1692
|
+
children: /* @__PURE__ */ Y(D, {
|
|
1693
1693
|
value: o,
|
|
1694
1694
|
onChange: c,
|
|
1695
1695
|
placeholder: r.columnsSearchPlaceholder,
|
|
@@ -1700,7 +1700,7 @@ function jn() {
|
|
|
1700
1700
|
})
|
|
1701
1701
|
}), t[21] = i, t[22] = r.columnsSearchPlaceholder, t[23] = o, t[24] = C) : C = t[24], u = S.Autosize, v = 260, y = "auto", g = Xe.columnsPanelList;
|
|
1702
1702
|
let T;
|
|
1703
|
-
t[25] !== l || t[26] !== i ? (T = (e) => /* @__PURE__ */
|
|
1703
|
+
t[25] !== l || t[26] !== i ? (T = (e) => /* @__PURE__ */ Y(f, {
|
|
1704
1704
|
size: i,
|
|
1705
1705
|
label: xn(e),
|
|
1706
1706
|
"data-dg-part": "columns-toggle",
|
|
@@ -1710,19 +1710,19 @@ function jn() {
|
|
|
1710
1710
|
}, e.id), t[25] = l, t[26] = i, t[27] = T) : T = t[27], _ = w.map(T), t[0] = l, t[1] = i, t[2] = r.columnsSearchPlaceholder, t[3] = o, t[4] = n, t[5] = u, t[6] = p, t[7] = m, t[8] = h, t[9] = g, t[10] = _, t[11] = v, t[12] = y, t[13] = b, t[14] = x, t[15] = C, t[16] = w;
|
|
1711
1711
|
} else u = t[5], p = t[6], m = t[7], h = t[8], g = t[9], _ = t[10], v = t[11], y = t[12], b = t[13], x = t[14], C = t[15], w = t[16];
|
|
1712
1712
|
let T;
|
|
1713
|
-
t[28] !== i || t[29] !== r || t[30] !== o || t[31] !== w.length ? (T = w.length === 0 && /* @__PURE__ */
|
|
1713
|
+
t[28] !== i || t[29] !== r || t[30] !== o || t[31] !== w.length ? (T = w.length === 0 && /* @__PURE__ */ Y(E, {
|
|
1714
1714
|
span: !0,
|
|
1715
1715
|
size: i,
|
|
1716
1716
|
c: "dimmed",
|
|
1717
1717
|
children: r.columnsNoMatch(o)
|
|
1718
1718
|
}), t[28] = i, t[29] = r, t[30] = o, t[31] = w.length, t[32] = T) : T = t[32];
|
|
1719
1719
|
let k;
|
|
1720
|
-
t[33] !== g || t[34] !== _ || t[35] !== T ? (k = /* @__PURE__ */
|
|
1720
|
+
t[33] !== g || t[34] !== _ || t[35] !== T ? (k = /* @__PURE__ */ X("div", {
|
|
1721
1721
|
className: g,
|
|
1722
1722
|
children: [_, T]
|
|
1723
1723
|
}), t[33] = g, t[34] = _, t[35] = T, t[36] = k) : k = t[36];
|
|
1724
1724
|
let A;
|
|
1725
|
-
t[37] !== u || t[38] !== v || t[39] !== y || t[40] !== k ? (A = /* @__PURE__ */
|
|
1725
|
+
t[37] !== u || t[38] !== v || t[39] !== y || t[40] !== k ? (A = /* @__PURE__ */ Y(u, {
|
|
1726
1726
|
mah: v,
|
|
1727
1727
|
type: y,
|
|
1728
1728
|
children: k
|
|
@@ -1730,7 +1730,7 @@ function jn() {
|
|
|
1730
1730
|
let M = h === p.length, N = h > 0 && h < p.length, P;
|
|
1731
1731
|
t[42] === m ? P = t[43] : (P = (e) => m(e.currentTarget.checked), t[42] = m, t[43] = P);
|
|
1732
1732
|
let F;
|
|
1733
|
-
t[44] !== i || t[45] !== r.columnsShowHideAll || t[46] !== M || t[47] !== N || t[48] !== P ? (F = /* @__PURE__ */
|
|
1733
|
+
t[44] !== i || t[45] !== r.columnsShowHideAll || t[46] !== M || t[47] !== N || t[48] !== P ? (F = /* @__PURE__ */ Y(f, {
|
|
1734
1734
|
size: i,
|
|
1735
1735
|
label: r.columnsShowHideAll,
|
|
1736
1736
|
"data-dg-part": "columns-toggle-all",
|
|
@@ -1741,7 +1741,7 @@ function jn() {
|
|
|
1741
1741
|
let I;
|
|
1742
1742
|
t[50] === a ? I = t[51] : (I = () => a(), t[50] = a, t[51] = I);
|
|
1743
1743
|
let L;
|
|
1744
|
-
t[52] !== r.columnsReset || t[53] !== I ? (L = /* @__PURE__ */
|
|
1744
|
+
t[52] !== r.columnsReset || t[53] !== I ? (L = /* @__PURE__ */ Y(d, {
|
|
1745
1745
|
variant: "subtle",
|
|
1746
1746
|
size: "compact-sm",
|
|
1747
1747
|
"data-dg-part": "columns-reset",
|
|
@@ -1749,18 +1749,18 @@ function jn() {
|
|
|
1749
1749
|
children: r.columnsReset
|
|
1750
1750
|
}), t[52] = r.columnsReset, t[53] = I, t[54] = L) : L = t[54];
|
|
1751
1751
|
let R;
|
|
1752
|
-
t[55] !== r.columnsResetHint || t[56] !== L ? (R = /* @__PURE__ */
|
|
1752
|
+
t[55] !== r.columnsResetHint || t[56] !== L ? (R = /* @__PURE__ */ Y(O, {
|
|
1753
1753
|
label: r.columnsResetHint,
|
|
1754
1754
|
withArrow: !0,
|
|
1755
1755
|
children: L
|
|
1756
1756
|
}), t[55] = r.columnsResetHint, t[56] = L, t[57] = R) : R = t[57];
|
|
1757
1757
|
let z;
|
|
1758
|
-
t[58] !== F || t[59] !== R ? (z = /* @__PURE__ */
|
|
1758
|
+
t[58] !== F || t[59] !== R ? (z = /* @__PURE__ */ X("div", {
|
|
1759
1759
|
className: Xe.columnsPanelFooter,
|
|
1760
1760
|
children: [F, R]
|
|
1761
1761
|
}), t[58] = F, t[59] = R, t[60] = z) : z = t[60];
|
|
1762
1762
|
let B;
|
|
1763
|
-
return t[61] !== z || t[62] !== b || t[63] !== x || t[64] !== C || t[65] !== A ? (B = /* @__PURE__ */
|
|
1763
|
+
return t[61] !== z || t[62] !== b || t[63] !== x || t[64] !== C || t[65] !== A ? (B = /* @__PURE__ */ X("div", {
|
|
1764
1764
|
"data-dg-part": b,
|
|
1765
1765
|
className: x,
|
|
1766
1766
|
children: [
|
|
@@ -1797,7 +1797,7 @@ function Rn(e) {
|
|
|
1797
1797
|
}
|
|
1798
1798
|
function zn() {
|
|
1799
1799
|
let t = e(1), { edit: n } = Q(), r;
|
|
1800
|
-
return t[0] === Symbol.for("react.memo_cache_sentinel") ? (r = { compare:
|
|
1800
|
+
return t[0] === Symbol.for("react.memo_cache_sentinel") ? (r = { compare: ge }, t[0] = r) : r = t[0], j(n.store, Ft, r);
|
|
1801
1801
|
}
|
|
1802
1802
|
function Bn() {
|
|
1803
1803
|
let t = e(11), { edit: n, labels: r } = Q(), i = Pn(), a = j(n.store, Vn), o = i === 0, s;
|
|
@@ -1805,7 +1805,7 @@ function Bn() {
|
|
|
1805
1805
|
let c;
|
|
1806
1806
|
t[2] !== i || t[3] !== r ? (c = r.saveAllEdits(i), t[2] = i, t[3] = r, t[4] = c) : c = t[4];
|
|
1807
1807
|
let l;
|
|
1808
|
-
return t[5] !== i || t[6] !== a || t[7] !== o || t[8] !== s || t[9] !== c ? (l = /* @__PURE__ */
|
|
1808
|
+
return t[5] !== i || t[6] !== a || t[7] !== o || t[8] !== s || t[9] !== c ? (l = /* @__PURE__ */ Y(d, {
|
|
1809
1809
|
size: "compact-sm",
|
|
1810
1810
|
disabled: o,
|
|
1811
1811
|
loading: a,
|
|
@@ -1824,7 +1824,7 @@ function Hn() {
|
|
|
1824
1824
|
let i;
|
|
1825
1825
|
t[0] !== n || t[1] !== r ? (i = n.editRowsStillOpen(r), t[0] = n, t[1] = r, t[2] = i) : i = t[2];
|
|
1826
1826
|
let a;
|
|
1827
|
-
return t[3] !== r || t[4] !== i ? (a = /* @__PURE__ */
|
|
1827
|
+
return t[3] !== r || t[4] !== i ? (a = /* @__PURE__ */ Y(E, {
|
|
1828
1828
|
size: "xs",
|
|
1829
1829
|
c: "dimmed",
|
|
1830
1830
|
"data-dg-part": "open-rows-note",
|
|
@@ -1836,7 +1836,7 @@ function Un() {
|
|
|
1836
1836
|
let t = e(6), { edit: n, labels: r } = Q(), i = Pn() + Ln() === 0, a;
|
|
1837
1837
|
t[0] === n ? a = t[1] : (a = () => n.cancelAll(), t[0] = n, t[1] = a);
|
|
1838
1838
|
let o;
|
|
1839
|
-
return t[2] !== r.discardAllEdits || t[3] !== i || t[4] !== a ? (o = /* @__PURE__ */
|
|
1839
|
+
return t[2] !== r.discardAllEdits || t[3] !== i || t[4] !== a ? (o = /* @__PURE__ */ Y(d, {
|
|
1840
1840
|
variant: "subtle",
|
|
1841
1841
|
color: "gray",
|
|
1842
1842
|
size: "compact-sm",
|
|
@@ -1888,13 +1888,13 @@ function Gn(t) {
|
|
|
1888
1888
|
});
|
|
1889
1889
|
}
|
|
1890
1890
|
let d;
|
|
1891
|
-
return n[9] === Symbol.for("react.memo_cache_sentinel") ? (d = /* @__PURE__ */
|
|
1891
|
+
return n[9] === Symbol.for("react.memo_cache_sentinel") ? (d = /* @__PURE__ */ X(p, {
|
|
1892
1892
|
gap: "xs",
|
|
1893
1893
|
wrap: "nowrap",
|
|
1894
1894
|
children: [
|
|
1895
|
-
/* @__PURE__ */
|
|
1896
|
-
/* @__PURE__ */
|
|
1897
|
-
/* @__PURE__ */
|
|
1895
|
+
/* @__PURE__ */ Y(Hn, {}),
|
|
1896
|
+
/* @__PURE__ */ Y(Bn, {}),
|
|
1897
|
+
/* @__PURE__ */ Y(Un, {})
|
|
1898
1898
|
]
|
|
1899
1899
|
}), n[9] = d) : d = n[9], d;
|
|
1900
1900
|
}
|
|
@@ -1958,7 +1958,7 @@ function Zn(t) {
|
|
|
1958
1958
|
let t = e, r;
|
|
1959
1959
|
n[4] !== o || n[5] !== t[1] ? (r = (e) => o([e.currentTarget.value, t[1]]), n[4] = o, n[5] = t[1], n[6] = r) : r = n[6];
|
|
1960
1960
|
let i;
|
|
1961
|
-
n[7] !== h || n[8] !== l.filterFrom || n[9] !== t[0] || n[10] !== c || n[11] !== r ? (i = /* @__PURE__ */
|
|
1961
|
+
n[7] !== h || n[8] !== l.filterFrom || n[9] !== t[0] || n[10] !== c || n[11] !== r ? (i = /* @__PURE__ */ Y(D, {
|
|
1962
1962
|
label: l.filterFrom,
|
|
1963
1963
|
size: c,
|
|
1964
1964
|
w: 88,
|
|
@@ -1970,7 +1970,7 @@ function Zn(t) {
|
|
|
1970
1970
|
let s;
|
|
1971
1971
|
n[13] !== o || n[14] !== t[0] ? (s = (e) => o([t[0], e.currentTarget.value]), n[13] = o, n[14] = t[0], n[15] = s) : s = n[15];
|
|
1972
1972
|
let u;
|
|
1973
|
-
n[16] !== h || n[17] !== l.filterTo || n[18] !== t[1] || n[19] !== c || n[20] !== s ? (u = /* @__PURE__ */
|
|
1973
|
+
n[16] !== h || n[17] !== l.filterTo || n[18] !== t[1] || n[19] !== c || n[20] !== s ? (u = /* @__PURE__ */ Y(D, {
|
|
1974
1974
|
label: l.filterTo,
|
|
1975
1975
|
size: c,
|
|
1976
1976
|
w: 88,
|
|
@@ -1980,7 +1980,7 @@ function Zn(t) {
|
|
|
1980
1980
|
onChange: s
|
|
1981
1981
|
}), n[16] = h, n[17] = l.filterTo, n[18] = t[1], n[19] = c, n[20] = s, n[21] = u) : u = n[21];
|
|
1982
1982
|
let d;
|
|
1983
|
-
return n[22] !== i || n[23] !== u ? (d = /* @__PURE__ */
|
|
1983
|
+
return n[22] !== i || n[23] !== u ? (d = /* @__PURE__ */ X(p, {
|
|
1984
1984
|
gap: 4,
|
|
1985
1985
|
wrap: "nowrap",
|
|
1986
1986
|
align: "flex-start",
|
|
@@ -1995,7 +1995,7 @@ function Zn(t) {
|
|
|
1995
1995
|
let i;
|
|
1996
1996
|
n[28] === a ? i = n[29] : (i = Array.isArray(a) ? [...a] : [], n[28] = a, n[29] = i);
|
|
1997
1997
|
let u;
|
|
1998
|
-
return n[30] !== l.filterValue || n[31] !== o || n[32] !== c || n[33] !== r || n[34] !== i ? (u = /* @__PURE__ */
|
|
1998
|
+
return n[30] !== l.filterValue || n[31] !== o || n[32] !== c || n[33] !== r || n[34] !== i ? (u = /* @__PURE__ */ Y(_, {
|
|
1999
1999
|
label: e,
|
|
2000
2000
|
size: c,
|
|
2001
2001
|
w: 180,
|
|
@@ -2025,7 +2025,7 @@ function Zn(t) {
|
|
|
2025
2025
|
let u = f && m !== "" ? m : null, d;
|
|
2026
2026
|
n[44] === o ? d = n[45] : (d = (e) => o(e ?? ""), n[44] = o, n[45] = d);
|
|
2027
2027
|
let p;
|
|
2028
|
-
return n[46] !== l.filterValue || n[47] !== c || n[48] !== t || n[49] !== r || n[50] !== s || n[51] !== u || n[52] !== d ? (p = /* @__PURE__ */
|
|
2028
|
+
return n[46] !== l.filterValue || n[47] !== c || n[48] !== t || n[49] !== r || n[50] !== s || n[51] !== u || n[52] !== d ? (p = /* @__PURE__ */ Y(w, {
|
|
2029
2029
|
label: l.filterValue,
|
|
2030
2030
|
size: c,
|
|
2031
2031
|
w: 180,
|
|
@@ -2042,7 +2042,7 @@ function Zn(t) {
|
|
|
2042
2042
|
let g = f ? h : "text", v = !f, y = f ? l.filterValuePlaceholder : "", b = f ? m : "", x;
|
|
2043
2043
|
n[54] === o ? x = n[55] : (x = (e) => o(e.currentTarget.value), n[54] = o, n[55] = x);
|
|
2044
2044
|
let S;
|
|
2045
|
-
return n[56] !== l.filterValue || n[57] !== c || n[58] !== g || n[59] !== v || n[60] !== y || n[61] !== b || n[62] !== x ? (S = /* @__PURE__ */
|
|
2045
|
+
return n[56] !== l.filterValue || n[57] !== c || n[58] !== g || n[59] !== v || n[60] !== y || n[61] !== b || n[62] !== x ? (S = /* @__PURE__ */ Y(D, {
|
|
2046
2046
|
label: l.filterValue,
|
|
2047
2047
|
size: c,
|
|
2048
2048
|
w: 180,
|
|
@@ -2133,19 +2133,19 @@ function tr() {
|
|
|
2133
2133
|
e.key === "Escape" && (e.stopPropagation(), r.actions.closeFilterPanel());
|
|
2134
2134
|
}, t[26] = r.actions, t[27] = k);
|
|
2135
2135
|
let A;
|
|
2136
|
-
t[28] !== o || t[29] !== a.filters ? (A = /* @__PURE__ */
|
|
2136
|
+
t[28] !== o || t[29] !== a.filters ? (A = /* @__PURE__ */ Y(E, {
|
|
2137
2137
|
span: !0,
|
|
2138
2138
|
size: o,
|
|
2139
2139
|
fw: 600,
|
|
2140
2140
|
children: a.filters
|
|
2141
2141
|
}), t[28] = o, t[29] = a.filters, t[30] = A) : A = t[30];
|
|
2142
2142
|
let M;
|
|
2143
|
-
t[31] === Symbol.for("react.memo_cache_sentinel") ? (M = /* @__PURE__ */ J
|
|
2143
|
+
t[31] === Symbol.for("react.memo_cache_sentinel") ? (M = /* @__PURE__ */ Y(J, {
|
|
2144
2144
|
size: 16,
|
|
2145
2145
|
stroke: 1.6
|
|
2146
2146
|
}), t[31] = M) : M = t[31];
|
|
2147
2147
|
let N;
|
|
2148
|
-
t[32] !== a.closeFilters || t[33] !== r.actions.closeFilterPanel ? (N = /* @__PURE__ */
|
|
2148
|
+
t[32] !== a.closeFilters || t[33] !== r.actions.closeFilterPanel ? (N = /* @__PURE__ */ Y(l, {
|
|
2149
2149
|
variant: "subtle",
|
|
2150
2150
|
color: "gray",
|
|
2151
2151
|
size: "sm",
|
|
@@ -2155,7 +2155,7 @@ function tr() {
|
|
|
2155
2155
|
children: M
|
|
2156
2156
|
}), t[32] = a.closeFilters, t[33] = r.actions.closeFilterPanel, t[34] = N) : N = t[34];
|
|
2157
2157
|
let P;
|
|
2158
|
-
t[35] !== A || t[36] !== N ? (P = /* @__PURE__ */
|
|
2158
|
+
t[35] !== A || t[36] !== N ? (P = /* @__PURE__ */ X("div", {
|
|
2159
2159
|
className: qn.filterPanelHeader,
|
|
2160
2160
|
children: [A, N]
|
|
2161
2161
|
}), t[35] = A, t[36] = N, t[37] = P) : P = t[37];
|
|
@@ -2168,24 +2168,24 @@ function tr() {
|
|
|
2168
2168
|
column: t,
|
|
2169
2169
|
fallback: "faceted"
|
|
2170
2170
|
}) : [], d = (t === void 0 ? void 0 : wn(t)) ?? Zn;
|
|
2171
|
-
return /* @__PURE__ */
|
|
2171
|
+
return /* @__PURE__ */ X("div", {
|
|
2172
2172
|
"data-dg-part": "filter-row",
|
|
2173
2173
|
"data-column-id": e.id,
|
|
2174
2174
|
className: qn.filterRow,
|
|
2175
2175
|
children: [
|
|
2176
|
-
/* @__PURE__ */
|
|
2176
|
+
/* @__PURE__ */ Y(l, {
|
|
2177
2177
|
variant: "subtle",
|
|
2178
2178
|
color: "gray",
|
|
2179
2179
|
size: "lg",
|
|
2180
2180
|
"aria-label": a.removeFilter,
|
|
2181
2181
|
"data-dg-part": "filter-remove",
|
|
2182
2182
|
onClick: () => x(e.id),
|
|
2183
|
-
children: /* @__PURE__ */ J
|
|
2183
|
+
children: /* @__PURE__ */ Y(J, {
|
|
2184
2184
|
size: 18,
|
|
2185
2185
|
stroke: 1.6
|
|
2186
2186
|
})
|
|
2187
2187
|
}),
|
|
2188
|
-
/* @__PURE__ */
|
|
2188
|
+
/* @__PURE__ */ Y(w, {
|
|
2189
2189
|
label: a.filterColumn,
|
|
2190
2190
|
size: o,
|
|
2191
2191
|
w: 160,
|
|
@@ -2196,7 +2196,7 @@ function tr() {
|
|
|
2196
2196
|
value: e.id,
|
|
2197
2197
|
onChange: (t) => t && g(e.id, t)
|
|
2198
2198
|
}),
|
|
2199
|
-
/* @__PURE__ */
|
|
2199
|
+
/* @__PURE__ */ Y(w, {
|
|
2200
2200
|
label: a.filterOperator,
|
|
2201
2201
|
size: o,
|
|
2202
2202
|
w: 170,
|
|
@@ -2210,7 +2210,7 @@ function tr() {
|
|
|
2210
2210
|
value: r.operator,
|
|
2211
2211
|
onChange: (t) => t && _(e.id, t)
|
|
2212
2212
|
}),
|
|
2213
|
-
t ? /* @__PURE__ */
|
|
2213
|
+
t ? /* @__PURE__ */ Y(d, {
|
|
2214
2214
|
column: t,
|
|
2215
2215
|
table: n,
|
|
2216
2216
|
operator: r.operator,
|
|
@@ -2219,7 +2219,7 @@ function tr() {
|
|
|
2219
2219
|
options: u,
|
|
2220
2220
|
size: o,
|
|
2221
2221
|
labels: a
|
|
2222
|
-
}) : /* @__PURE__ */
|
|
2222
|
+
}) : /* @__PURE__ */ Y(D, {
|
|
2223
2223
|
label: a.filterValue,
|
|
2224
2224
|
size: o,
|
|
2225
2225
|
w: 180,
|
|
@@ -2234,7 +2234,7 @@ function tr() {
|
|
|
2234
2234
|
}, t[48] = g, t[49] = _, t[50] = y, t[51] = o, t[52] = a, t[53] = b, t[54] = x, t[55] = n, t[56] = e) : e = t[56], F = u.map(e), t[38] = g, t[39] = _, t[40] = u, t[41] = y, t[42] = o, t[43] = a, t[44] = b, t[45] = x, t[46] = n, t[47] = F;
|
|
2235
2235
|
} else F = t[47];
|
|
2236
2236
|
let I = !C, L;
|
|
2237
|
-
t[57] !== h || t[58] !== a.addFilter || t[59] !== I ? (L = /* @__PURE__ */
|
|
2237
|
+
t[57] !== h || t[58] !== a.addFilter || t[59] !== I ? (L = /* @__PURE__ */ Y(d, {
|
|
2238
2238
|
variant: "subtle",
|
|
2239
2239
|
size: "compact-sm",
|
|
2240
2240
|
disabled: I,
|
|
@@ -2243,7 +2243,7 @@ function tr() {
|
|
|
2243
2243
|
children: a.addFilter
|
|
2244
2244
|
}), t[57] = h, t[58] = a.addFilter, t[59] = I, t[60] = L) : L = t[60];
|
|
2245
2245
|
let R = u.length === 0, z;
|
|
2246
|
-
t[61] !== v || t[62] !== a.clearAllFilters || t[63] !== R ? (z = /* @__PURE__ */
|
|
2246
|
+
t[61] !== v || t[62] !== a.clearAllFilters || t[63] !== R ? (z = /* @__PURE__ */ Y(d, {
|
|
2247
2247
|
variant: "subtle",
|
|
2248
2248
|
color: "gray",
|
|
2249
2249
|
size: "compact-sm",
|
|
@@ -2253,17 +2253,17 @@ function tr() {
|
|
|
2253
2253
|
children: a.clearAllFilters
|
|
2254
2254
|
}), t[61] = v, t[62] = a.clearAllFilters, t[63] = R, t[64] = z) : z = t[64];
|
|
2255
2255
|
let B;
|
|
2256
|
-
t[65] !== L || t[66] !== z ? (B = /* @__PURE__ */
|
|
2256
|
+
t[65] !== L || t[66] !== z ? (B = /* @__PURE__ */ X("div", {
|
|
2257
2257
|
className: qn.filterPanelFooter,
|
|
2258
2258
|
children: [L, z]
|
|
2259
2259
|
}), t[65] = L, t[66] = z, t[67] = B) : B = t[67];
|
|
2260
2260
|
let V;
|
|
2261
|
-
t[68] !== B || t[69] !== F ? (V = /* @__PURE__ */
|
|
2261
|
+
t[68] !== B || t[69] !== F ? (V = /* @__PURE__ */ X(T, {
|
|
2262
2262
|
gap: "xs",
|
|
2263
2263
|
children: [F, B]
|
|
2264
2264
|
}), t[68] = B, t[69] = F, t[70] = V) : V = t[70];
|
|
2265
2265
|
let H;
|
|
2266
|
-
return t[71] !== a.filters || t[72] !== V || t[73] !== k || t[74] !== P ? (H = /* @__PURE__ */
|
|
2266
|
+
return t[71] !== a.filters || t[72] !== V || t[73] !== k || t[74] !== P ? (H = /* @__PURE__ */ X("div", {
|
|
2267
2267
|
ref: f,
|
|
2268
2268
|
role: "group",
|
|
2269
2269
|
"aria-label": O,
|
|
@@ -2715,24 +2715,24 @@ function Zr(e) {
|
|
|
2715
2715
|
//#endregion
|
|
2716
2716
|
//#region src/tmdatagrid/useTMDataGrid.tsx
|
|
2717
2717
|
var Qr = 200, $r = We({
|
|
2718
|
-
columnFilteringFeature:
|
|
2718
|
+
columnFilteringFeature: ye,
|
|
2719
2719
|
globalFilteringFeature: Ie,
|
|
2720
2720
|
rowSortingFeature: He,
|
|
2721
2721
|
rowPaginationFeature: ze,
|
|
2722
2722
|
rowSelectionFeature: Ve,
|
|
2723
|
-
columnPinningFeature:
|
|
2724
|
-
columnVisibilityFeature:
|
|
2725
|
-
columnOrderingFeature:
|
|
2726
|
-
columnSizingFeature:
|
|
2727
|
-
columnResizingFeature:
|
|
2728
|
-
columnFacetingFeature:
|
|
2729
|
-
columnGroupingFeature:
|
|
2723
|
+
columnPinningFeature: Se,
|
|
2724
|
+
columnVisibilityFeature: Te,
|
|
2725
|
+
columnOrderingFeature: xe,
|
|
2726
|
+
columnSizingFeature: we,
|
|
2727
|
+
columnResizingFeature: Ce,
|
|
2728
|
+
columnFacetingFeature: ve,
|
|
2729
|
+
columnGroupingFeature: be,
|
|
2730
2730
|
rowExpandingFeature: Re,
|
|
2731
2731
|
rowPinningFeature: Be,
|
|
2732
2732
|
filteredRowModel: Ae(),
|
|
2733
2733
|
groupedRowModel: je(),
|
|
2734
2734
|
sortedRowModel: dr(),
|
|
2735
|
-
expandedRowModel:
|
|
2735
|
+
expandedRowModel: Ee(),
|
|
2736
2736
|
paginatedRowModel: Me(),
|
|
2737
2737
|
facetedRowModel: Oe(),
|
|
2738
2738
|
facetedMinMaxValues: De(),
|
|
@@ -2743,12 +2743,12 @@ var Qr = 200, $r = We({
|
|
|
2743
2743
|
tmDataGridFuzzy: cr
|
|
2744
2744
|
},
|
|
2745
2745
|
sortFns: Ue,
|
|
2746
|
-
aggregationFns:
|
|
2746
|
+
aggregationFns: _e,
|
|
2747
2747
|
tableMeta: Le(),
|
|
2748
2748
|
columnMeta: Le()
|
|
2749
2749
|
});
|
|
2750
2750
|
function ei() {
|
|
2751
|
-
return
|
|
2751
|
+
return Z();
|
|
2752
2752
|
}
|
|
2753
2753
|
var ti = 160, ni = 6;
|
|
2754
2754
|
function ri(e) {
|
|
@@ -2800,16 +2800,22 @@ function ai({ persist: e, labels: t, enableColumnOrdering: r, enablePagination:
|
|
|
2800
2800
|
M,
|
|
2801
2801
|
N,
|
|
2802
2802
|
P
|
|
2803
|
-
]), [z] = c(() => Ir(e, Pr(R))), B = z.grouping ?? b.initialState?.grouping ?? [], V = s((b.state?.grouping ?? B).length > 0), H = Yr(b.state), ee = H?.columnVisibility,
|
|
2803
|
+
]), [z] = c(() => Ir(e, Pr(R))), B = z.grouping ?? b.initialState?.grouping ?? [], V = s((b.state?.grouping ?? B).length > 0), H = Yr(b.state), ee = H?.columnVisibility, te = H !== void 0 && ee !== void 0 ? {
|
|
2804
2804
|
...H,
|
|
2805
2805
|
columnVisibility: {
|
|
2806
2806
|
...ri(ee),
|
|
2807
2807
|
...D ? { [en]: V.current } : {}
|
|
2808
2808
|
}
|
|
2809
|
-
} : H,
|
|
2810
|
-
|
|
2811
|
-
let
|
|
2812
|
-
|
|
2809
|
+
} : H, ne = s(void 0), re = s(!1), ie = re.current ? te : Xr(te, ne.current);
|
|
2810
|
+
re.current = !1, ne.current = ie;
|
|
2811
|
+
let ae = s(null), oe = n((e) => {
|
|
2812
|
+
let t = e.columnResizing, n = ae.current;
|
|
2813
|
+
return n === null || n.isResizingColumn !== t.isResizingColumn ? (ae.current = t, e) : {
|
|
2814
|
+
...e,
|
|
2815
|
+
columnResizing: n
|
|
2816
|
+
};
|
|
2817
|
+
}, []), U = Ge({
|
|
2818
|
+
columnResizeMode: "onEnd",
|
|
2813
2819
|
enableSorting: !0,
|
|
2814
2820
|
enableColumnResizing: !0,
|
|
2815
2821
|
globalFilterFn: b.quickSearchMode === "contains" ? "includesString" : "tmDataGridFuzzy",
|
|
@@ -2819,7 +2825,7 @@ function ai({ persist: e, labels: t, enableColumnOrdering: r, enablePagination:
|
|
|
2819
2825
|
enableRowPinning: (e) => !e.getIsGrouped() && (typeof b.enableRowPinning == "function" ? b.enableRowPinning(e) : b.enableRowPinning === !0),
|
|
2820
2826
|
features: $r,
|
|
2821
2827
|
columns: R,
|
|
2822
|
-
state:
|
|
2828
|
+
state: ie,
|
|
2823
2829
|
initialState: {
|
|
2824
2830
|
...b.initialState,
|
|
2825
2831
|
...z,
|
|
@@ -2847,9 +2853,9 @@ function ai({ persist: e, labels: t, enableColumnOrdering: r, enablePagination:
|
|
|
2847
2853
|
...z.pagination
|
|
2848
2854
|
}
|
|
2849
2855
|
}
|
|
2850
|
-
}),
|
|
2851
|
-
|
|
2852
|
-
table:
|
|
2856
|
+
}, oe), se = s(null);
|
|
2857
|
+
se.current = {
|
|
2858
|
+
table: U,
|
|
2853
2859
|
editMode: x ?? "cell",
|
|
2854
2860
|
draft: S,
|
|
2855
2861
|
rowValidators: g?.rowValidators,
|
|
@@ -2862,51 +2868,51 @@ function ai({ persist: e, labels: t, enableColumnOrdering: r, enablePagination:
|
|
|
2862
2868
|
onRowAdd: g?.onRowAdd,
|
|
2863
2869
|
onRowDelete: g?.onRowDelete
|
|
2864
2870
|
};
|
|
2865
|
-
let [
|
|
2871
|
+
let [W] = c(() => Kt(() => se.current)), G = s({
|
|
2866
2872
|
editMode: x,
|
|
2867
2873
|
editDraft: S
|
|
2868
2874
|
});
|
|
2869
2875
|
i(() => {
|
|
2870
|
-
let e =
|
|
2871
|
-
e.editMode === x && e.editDraft === S || (
|
|
2876
|
+
let e = G.current;
|
|
2877
|
+
e.editMode === x && e.editDraft === S || (G.current = {
|
|
2872
2878
|
editMode: x,
|
|
2873
2879
|
editDraft: S
|
|
2874
|
-
},
|
|
2880
|
+
}, W.cancelAll());
|
|
2875
2881
|
}, [
|
|
2876
2882
|
x,
|
|
2877
2883
|
S,
|
|
2878
|
-
|
|
2884
|
+
W
|
|
2879
2885
|
]), i(() => {
|
|
2880
2886
|
g !== void 0 && b.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.");
|
|
2881
2887
|
}, []), i(() => {
|
|
2882
2888
|
for (let { slice: e, handler: t } of Zr(b)) 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.`);
|
|
2883
2889
|
}, []), i(() => {
|
|
2884
2890
|
if (!D) return;
|
|
2885
|
-
let e =
|
|
2886
|
-
V.current = e.length > 0,
|
|
2891
|
+
let e = U.store.state.grouping;
|
|
2892
|
+
V.current = e.length > 0, U.store.state.columnVisibility?.__group__ !== e.length > 0 && U.setColumnVisibility((t) => ({
|
|
2887
2893
|
...t,
|
|
2888
2894
|
[en]: e.length > 0
|
|
2889
2895
|
}));
|
|
2890
|
-
let t =
|
|
2891
|
-
t.grouping !== e && (e = t.grouping, V.current = t.grouping.length > 0,
|
|
2896
|
+
let t = U.store.subscribe((t) => {
|
|
2897
|
+
t.grouping !== e && (e = t.grouping, V.current = t.grouping.length > 0, re.current = !0, U.setColumnVisibility((e) => ({
|
|
2892
2898
|
...e,
|
|
2893
2899
|
[en]: t.grouping.length > 0
|
|
2894
|
-
})),
|
|
2900
|
+
})), U.setColumnOrder((e) => [...e]));
|
|
2895
2901
|
});
|
|
2896
2902
|
return () => t.unsubscribe();
|
|
2897
|
-
}, [D,
|
|
2903
|
+
}, [D, U]), i(() => {
|
|
2898
2904
|
if (!jr(e)) return;
|
|
2899
|
-
Lr(
|
|
2905
|
+
Lr(U.store.state, e);
|
|
2900
2906
|
let t, n = null, r = () => {
|
|
2901
2907
|
t = void 0, n !== null && (Lr(n, e), n = null);
|
|
2902
|
-
}, i =
|
|
2908
|
+
}, i = U.store.subscribe((e) => {
|
|
2903
2909
|
n = e, t !== void 0 && clearTimeout(t), t = setTimeout(r, Qr);
|
|
2904
2910
|
});
|
|
2905
2911
|
return () => {
|
|
2906
2912
|
i.unsubscribe(), t !== void 0 && clearTimeout(t), r();
|
|
2907
2913
|
};
|
|
2908
|
-
}, [e,
|
|
2909
|
-
let
|
|
2914
|
+
}, [e, U]);
|
|
2915
|
+
let K = A({
|
|
2910
2916
|
filterPanelOpen: !1,
|
|
2911
2917
|
columnsPanelOpen: !1,
|
|
2912
2918
|
filterPanelColumnId: null,
|
|
@@ -2958,31 +2964,31 @@ function ai({ persist: e, labels: t, enableColumnOrdering: r, enablePagination:
|
|
|
2958
2964
|
...e,
|
|
2959
2965
|
cellRange: t
|
|
2960
2966
|
})
|
|
2961
|
-
})),
|
|
2967
|
+
})), ce = s(p);
|
|
2962
2968
|
i(() => {
|
|
2963
|
-
|
|
2969
|
+
ce.current = p;
|
|
2964
2970
|
}, [p]), i(() => {
|
|
2965
|
-
let e =
|
|
2966
|
-
t.highlightedRowId !== e && (e = t.highlightedRowId,
|
|
2971
|
+
let e = K.state.highlightedRowId, t = K.subscribe((t) => {
|
|
2972
|
+
t.highlightedRowId !== e && (e = t.highlightedRowId, ce.current?.(t.highlightedRowId));
|
|
2967
2973
|
});
|
|
2968
2974
|
return () => t.unsubscribe();
|
|
2969
|
-
}, [
|
|
2970
|
-
let
|
|
2975
|
+
}, [K]);
|
|
2976
|
+
let q = s(h);
|
|
2971
2977
|
i(() => {
|
|
2972
|
-
|
|
2978
|
+
q.current = h;
|
|
2973
2979
|
}, [h]), i(() => {
|
|
2974
|
-
let e =
|
|
2975
|
-
t.focusedCell !== e && (e = t.focusedCell,
|
|
2980
|
+
let e = K.state.focusedCell, t = K.subscribe((t) => {
|
|
2981
|
+
t.focusedCell !== e && (e = t.focusedCell, q.current?.(t.focusedCell));
|
|
2976
2982
|
});
|
|
2977
2983
|
return () => t.unsubscribe();
|
|
2978
|
-
}, [
|
|
2979
|
-
let
|
|
2980
|
-
|
|
2984
|
+
}, [K]);
|
|
2985
|
+
let J = s(() => {});
|
|
2986
|
+
J.current = () => {
|
|
2981
2987
|
let e = b.initialState, t = [...e?.grouping ?? []];
|
|
2982
|
-
|
|
2988
|
+
U.setGrouping(t), U.setColumnVisibility({
|
|
2983
2989
|
...ri({ ...e?.columnVisibility }),
|
|
2984
2990
|
...D ? { [en]: t.length > 0 } : {}
|
|
2985
|
-
}),
|
|
2991
|
+
}), U.setColumnSizing({ ...e?.columnSizing }), U.setColumnOrder([...e?.columnOrder ?? []]), U.setColumnPinning({
|
|
2986
2992
|
left: [
|
|
2987
2993
|
...I && T ? [ln] : [],
|
|
2988
2994
|
...E && T ? [hn] : [],
|
|
@@ -2993,19 +2999,19 @@ function ai({ persist: e, labels: t, enableColumnOrdering: r, enablePagination:
|
|
|
2993
2999
|
right: [...(e?.columnPinning?.right ?? []).filter((e) => e !== Jt), ...k && T ? [Jt] : []]
|
|
2994
3000
|
});
|
|
2995
3001
|
};
|
|
2996
|
-
let
|
|
3002
|
+
let le = n(() => J.current(), []), Y = s(() => !1);
|
|
2997
3003
|
return {
|
|
2998
|
-
table:
|
|
2999
|
-
ui:
|
|
3000
|
-
edit:
|
|
3004
|
+
table: U,
|
|
3005
|
+
ui: K,
|
|
3006
|
+
edit: W,
|
|
3001
3007
|
features: C,
|
|
3002
3008
|
labels: w,
|
|
3003
3009
|
renderDetails: _,
|
|
3004
3010
|
renderDetailsEstHeight: v,
|
|
3005
3011
|
overscan: y,
|
|
3006
|
-
resetSettings:
|
|
3007
|
-
scrollToRow: n((e) =>
|
|
3008
|
-
scrollerRef:
|
|
3012
|
+
resetSettings: le,
|
|
3013
|
+
scrollToRow: n((e) => Y.current(e), []),
|
|
3014
|
+
scrollerRef: Y
|
|
3009
3015
|
};
|
|
3010
3016
|
}
|
|
3011
3017
|
function oi(e, t) {
|
|
@@ -3036,7 +3042,7 @@ function si(t) {
|
|
|
3036
3042
|
let t;
|
|
3037
3043
|
n[18] !== r || n[19] !== p || n[20] !== f || n[21] !== o || n[22] !== c || n[23] !== u ? (t = (e) => {
|
|
3038
3044
|
let t = u.getColumn(e.id), n = t ? xn(t) : e.id, i = e.value;
|
|
3039
|
-
return _t(i) ? /* @__PURE__ */
|
|
3045
|
+
return _t(i) ? /* @__PURE__ */ Y(y, {
|
|
3040
3046
|
size: c,
|
|
3041
3047
|
className: or.pill,
|
|
3042
3048
|
"data-dg-part": "filter-pill",
|
|
@@ -3048,7 +3054,7 @@ function si(t) {
|
|
|
3048
3054
|
"aria-hidden": !1,
|
|
3049
3055
|
tabIndex: 0
|
|
3050
3056
|
},
|
|
3051
|
-
children: /* @__PURE__ */
|
|
3057
|
+
children: /* @__PURE__ */ Y(k, {
|
|
3052
3058
|
className: or.pillLabel,
|
|
3053
3059
|
onClick: () => o ? o(e.id) : oi(r, e.id),
|
|
3054
3060
|
children: yt({
|
|
@@ -3065,12 +3071,12 @@ function si(t) {
|
|
|
3065
3071
|
} else m = n[7], h = n[8], g = n[9], _ = n[10], v = n[11], b = n[12], x = n[13], S = n[14], C = n[15];
|
|
3066
3072
|
if (C !== Symbol.for("react.early_return_sentinel")) return C;
|
|
3067
3073
|
let w;
|
|
3068
|
-
n[25] !== m || n[26] !== g || n[27] !== _ ? (w = /* @__PURE__ */
|
|
3074
|
+
n[25] !== m || n[26] !== g || n[27] !== _ ? (w = /* @__PURE__ */ Y(m, {
|
|
3069
3075
|
size: g,
|
|
3070
3076
|
children: _
|
|
3071
3077
|
}), n[25] = m, n[26] = g, n[27] = _, n[28] = w) : w = n[28];
|
|
3072
3078
|
let T;
|
|
3073
|
-
n[29] !== h || n[30] !== f.clearAllFilters || n[31] !== l || n[32] !== u ? (T = l && h.length > 1 && /* @__PURE__ */
|
|
3079
|
+
n[29] !== h || n[30] !== f.clearAllFilters || n[31] !== l || n[32] !== u ? (T = l && h.length > 1 && /* @__PURE__ */ Y(d, {
|
|
3074
3080
|
variant: "subtle",
|
|
3075
3081
|
color: "gray",
|
|
3076
3082
|
size: "compact-xs",
|
|
@@ -3078,7 +3084,7 @@ function si(t) {
|
|
|
3078
3084
|
children: f.clearAllFilters
|
|
3079
3085
|
}), n[29] = h, n[30] = f.clearAllFilters, n[31] = l, n[32] = u, n[33] = T) : T = n[33];
|
|
3080
3086
|
let E;
|
|
3081
|
-
return n[34] !== w || n[35] !== T || n[36] !== v || n[37] !== b || n[38] !== x || n[39] !== S ? (E = /* @__PURE__ */
|
|
3087
|
+
return n[34] !== w || n[35] !== T || n[36] !== v || n[37] !== b || n[38] !== x || n[39] !== S ? (E = /* @__PURE__ */ X("div", {
|
|
3082
3088
|
role: v,
|
|
3083
3089
|
"aria-label": b,
|
|
3084
3090
|
"data-dg-part": x,
|
|
@@ -3092,10 +3098,19 @@ function ci(e) {
|
|
|
3092
3098
|
function li(e) {
|
|
3093
3099
|
return e.columnFilters;
|
|
3094
3100
|
}
|
|
3095
|
-
var ui = { footer: "_footer_te0a3_1" };
|
|
3101
|
+
var ui = { footer: "_footer_te0a3_1" }, di = "columnResizing";
|
|
3102
|
+
function fi(t) {
|
|
3103
|
+
let n = e(1), r;
|
|
3104
|
+
n[0] === Symbol.for("react.memo_cache_sentinel") ? (r = { compare: ge }, n[0] = r) : r = n[0], j(t, pi, r);
|
|
3105
|
+
}
|
|
3106
|
+
function pi(e) {
|
|
3107
|
+
let t = {};
|
|
3108
|
+
for (let [n, r] of Object.entries(e)) n !== di && (t[n] = r);
|
|
3109
|
+
return t;
|
|
3110
|
+
}
|
|
3096
3111
|
//#endregion
|
|
3097
3112
|
//#region src/tmdatagrid/components/TMDataGridFooter.tsx
|
|
3098
|
-
function
|
|
3113
|
+
function mi(e, t = !0) {
|
|
3099
3114
|
let { pageIndex: n, pageSize: r } = e.store.state.pagination, i = e.getRowCount();
|
|
3100
3115
|
return {
|
|
3101
3116
|
state: {
|
|
@@ -3119,15 +3134,15 @@ function di(e, t = !0) {
|
|
|
3119
3134
|
}
|
|
3120
3135
|
};
|
|
3121
3136
|
}
|
|
3122
|
-
function
|
|
3137
|
+
function hi(t) {
|
|
3123
3138
|
let n = e(23), { pageSizeOptions: r } = t, { table: i, features: a, labels: o, controlSize: s } = Q();
|
|
3124
|
-
|
|
3139
|
+
fi(i.store);
|
|
3125
3140
|
let c;
|
|
3126
3141
|
n[0] !== a || n[1] !== i ? (c = fn(i, a), n[0] = a, n[1] = i, n[2] = c) : c = n[2];
|
|
3127
3142
|
let l = c, { pageSize: u } = i.store.state.pagination, d;
|
|
3128
|
-
n[3] !== u || n[4] !== r ? (d = r.includes(u) ? r : [...r, u].sort(
|
|
3143
|
+
n[3] !== u || n[4] !== r ? (d = r.includes(u) ? r : [...r, u].sort(gi), n[3] = u, n[4] = r, n[5] = d) : d = n[5];
|
|
3129
3144
|
let f = d, m;
|
|
3130
|
-
n[6] !== s || n[7] !== o.rowsPerPage ? (m = /* @__PURE__ */
|
|
3145
|
+
n[6] !== s || n[7] !== o.rowsPerPage ? (m = /* @__PURE__ */ Y(E, {
|
|
3131
3146
|
span: !0,
|
|
3132
3147
|
size: s,
|
|
3133
3148
|
c: "dimmed",
|
|
@@ -3140,7 +3155,7 @@ function fi(t) {
|
|
|
3140
3155
|
i.setPageSize(Number(e) || r[0]), i.setPageIndex(0);
|
|
3141
3156
|
}, n[11] = r[0], n[12] = i, n[13] = v) : v = n[13];
|
|
3142
3157
|
let y;
|
|
3143
|
-
n[14] !== s || n[15] !== h || n[16] !== g || n[17] !== _ || n[18] !== v ? (y = /* @__PURE__ */
|
|
3158
|
+
n[14] !== s || n[15] !== h || n[16] !== g || n[17] !== _ || n[18] !== v ? (y = /* @__PURE__ */ Y(w, {
|
|
3144
3159
|
size: s,
|
|
3145
3160
|
w: 78,
|
|
3146
3161
|
allowDeselect: !1,
|
|
@@ -3152,18 +3167,18 @@ function fi(t) {
|
|
|
3152
3167
|
onChange: v
|
|
3153
3168
|
}), n[14] = s, n[15] = h, n[16] = g, n[17] = _, n[18] = v, n[19] = y) : y = n[19];
|
|
3154
3169
|
let b;
|
|
3155
|
-
return n[20] !== m || n[21] !== y ? (b = /* @__PURE__ */
|
|
3170
|
+
return n[20] !== m || n[21] !== y ? (b = /* @__PURE__ */ X(p, {
|
|
3156
3171
|
gap: "xs",
|
|
3157
3172
|
wrap: "nowrap",
|
|
3158
3173
|
children: [m, y]
|
|
3159
3174
|
}), n[20] = m, n[21] = y, n[22] = b) : b = n[22], b;
|
|
3160
3175
|
}
|
|
3161
|
-
function
|
|
3176
|
+
function gi(e, t) {
|
|
3162
3177
|
return e - t;
|
|
3163
3178
|
}
|
|
3164
|
-
function
|
|
3179
|
+
function _i() {
|
|
3165
3180
|
let t = e(22), { table: n, features: r, labels: i, controlSize: a } = Q();
|
|
3166
|
-
|
|
3181
|
+
fi(n.store);
|
|
3167
3182
|
let o;
|
|
3168
3183
|
t[0] !== r || t[1] !== n ? (o = fn(n, r), t[0] = r, t[1] = n, t[2] = o) : o = t[2];
|
|
3169
3184
|
let s = o, { pageIndex: c, pageSize: l } = n.store.state.pagination, u, d, f, p, m, h;
|
|
@@ -3176,7 +3191,7 @@ function mi() {
|
|
|
3176
3191
|
}) : i.groupedAllRows(n.getFilteredRowModel().rows.length), t[3] = a, t[4] = i, t[5] = c, t[6] = l, t[7] = s, t[8] = n, t[9] = u, t[10] = d, t[11] = f, t[12] = p, t[13] = m, t[14] = h;
|
|
3177
3192
|
} else u = t[9], d = t[10], f = t[11], p = t[12], m = t[13], h = t[14];
|
|
3178
3193
|
let g;
|
|
3179
|
-
return t[15] !== u || t[16] !== d || t[17] !== f || t[18] !== p || t[19] !== m || t[20] !== h ? (g = /* @__PURE__ */
|
|
3194
|
+
return t[15] !== u || t[16] !== d || t[17] !== f || t[18] !== p || t[19] !== m || t[20] !== h ? (g = /* @__PURE__ */ Y(u, {
|
|
3180
3195
|
span: d,
|
|
3181
3196
|
size: f,
|
|
3182
3197
|
c: p,
|
|
@@ -3184,9 +3199,9 @@ function mi() {
|
|
|
3184
3199
|
children: h
|
|
3185
3200
|
}), 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;
|
|
3186
3201
|
}
|
|
3187
|
-
function
|
|
3202
|
+
function vi() {
|
|
3188
3203
|
let t = e(26), { table: n, features: r, labels: i } = Q();
|
|
3189
|
-
|
|
3204
|
+
fi(n.store);
|
|
3190
3205
|
let a;
|
|
3191
3206
|
t[0] !== r || t[1] !== n ? (a = fn(n, r), t[0] = r, t[1] = n, t[2] = a) : a = t[2];
|
|
3192
3207
|
let o = a, s;
|
|
@@ -3194,12 +3209,12 @@ function hi() {
|
|
|
3194
3209
|
let c;
|
|
3195
3210
|
t[6] === n ? c = t[7] : (c = () => n.previousPage(), t[6] = n, t[7] = c);
|
|
3196
3211
|
let u;
|
|
3197
|
-
t[8] === Symbol.for("react.memo_cache_sentinel") ? (u = /* @__PURE__ */
|
|
3212
|
+
t[8] === Symbol.for("react.memo_cache_sentinel") ? (u = /* @__PURE__ */ Y(V, {
|
|
3198
3213
|
size: 18,
|
|
3199
3214
|
stroke: 1.6
|
|
3200
3215
|
}), t[8] = u) : u = t[8];
|
|
3201
3216
|
let d;
|
|
3202
|
-
t[9] !== i.previousPage || t[10] !== s || t[11] !== c ? (d = /* @__PURE__ */
|
|
3217
|
+
t[9] !== i.previousPage || t[10] !== s || t[11] !== c ? (d = /* @__PURE__ */ Y(l, {
|
|
3203
3218
|
variant: "subtle",
|
|
3204
3219
|
color: "gray",
|
|
3205
3220
|
"aria-label": i.previousPage,
|
|
@@ -3213,12 +3228,12 @@ function hi() {
|
|
|
3213
3228
|
let m;
|
|
3214
3229
|
t[16] === n ? m = t[17] : (m = () => n.nextPage(), t[16] = n, t[17] = m);
|
|
3215
3230
|
let h;
|
|
3216
|
-
t[18] === Symbol.for("react.memo_cache_sentinel") ? (h = /* @__PURE__ */
|
|
3231
|
+
t[18] === Symbol.for("react.memo_cache_sentinel") ? (h = /* @__PURE__ */ Y(H, {
|
|
3217
3232
|
size: 18,
|
|
3218
3233
|
stroke: 1.6
|
|
3219
3234
|
}), t[18] = h) : h = t[18];
|
|
3220
3235
|
let g;
|
|
3221
|
-
t[19] !== i.nextPage || t[20] !== f || t[21] !== m ? (g = /* @__PURE__ */
|
|
3236
|
+
t[19] !== i.nextPage || t[20] !== f || t[21] !== m ? (g = /* @__PURE__ */ Y(l, {
|
|
3222
3237
|
variant: "subtle",
|
|
3223
3238
|
color: "gray",
|
|
3224
3239
|
"aria-label": i.nextPage,
|
|
@@ -3228,26 +3243,26 @@ function hi() {
|
|
|
3228
3243
|
children: h
|
|
3229
3244
|
}), t[19] = i.nextPage, t[20] = f, t[21] = m, t[22] = g) : g = t[22];
|
|
3230
3245
|
let _;
|
|
3231
|
-
return t[23] !== d || t[24] !== g ? (_ = /* @__PURE__ */
|
|
3246
|
+
return t[23] !== d || t[24] !== g ? (_ = /* @__PURE__ */ X(p, {
|
|
3232
3247
|
gap: 4,
|
|
3233
3248
|
wrap: "nowrap",
|
|
3234
3249
|
children: [d, g]
|
|
3235
3250
|
}), t[23] = d, t[24] = g, t[25] = _) : _ = t[25], _;
|
|
3236
3251
|
}
|
|
3237
|
-
var
|
|
3252
|
+
var yi = [
|
|
3238
3253
|
10,
|
|
3239
3254
|
25,
|
|
3240
3255
|
50,
|
|
3241
3256
|
100
|
|
3242
3257
|
];
|
|
3243
|
-
function
|
|
3244
|
-
let n = e(23), { pageSizeOptions: r, renderPagination: i } = t, a = r === void 0 ?
|
|
3245
|
-
|
|
3258
|
+
function bi(t) {
|
|
3259
|
+
let n = e(23), { pageSizeOptions: r, renderPagination: i } = t, a = r === void 0 ? yi : r, { table: o, features: s, labels: c } = Q();
|
|
3260
|
+
fi(o.store);
|
|
3246
3261
|
let l;
|
|
3247
3262
|
n[0] === a ? l = n[1] : (l = {
|
|
3248
|
-
PageSize: () => /* @__PURE__ */
|
|
3249
|
-
Range:
|
|
3250
|
-
Pager:
|
|
3263
|
+
PageSize: () => /* @__PURE__ */ Y(hi, { pageSizeOptions: a }),
|
|
3264
|
+
Range: _i,
|
|
3265
|
+
Pager: vi
|
|
3251
3266
|
}, n[0] = a, n[1] = l);
|
|
3252
3267
|
let u = l;
|
|
3253
3268
|
if (!Br(o, s).canPaginate) return null;
|
|
@@ -3255,8 +3270,8 @@ function _i(t) {
|
|
|
3255
3270
|
if (n[2] !== u || n[3] !== s || n[4] !== i || n[5] !== o) {
|
|
3256
3271
|
f = Symbol.for("react.early_return_sentinel");
|
|
3257
3272
|
bb0: if (d = fn(o, s), i) {
|
|
3258
|
-
let { state: e, actions: t } =
|
|
3259
|
-
f = /* @__PURE__ */
|
|
3273
|
+
let { state: e, actions: t } = mi(o, d);
|
|
3274
|
+
f = /* @__PURE__ */ Y("div", {
|
|
3260
3275
|
"data-dg-part": "footer",
|
|
3261
3276
|
className: ui.footer,
|
|
3262
3277
|
children: i({
|
|
@@ -3271,13 +3286,13 @@ function _i(t) {
|
|
|
3271
3286
|
} else d = n[6], f = n[7];
|
|
3272
3287
|
if (f !== Symbol.for("react.early_return_sentinel")) return f;
|
|
3273
3288
|
let p = !d, m;
|
|
3274
|
-
n[8] === u.PageSize ? m = n[9] : (m = /* @__PURE__ */
|
|
3289
|
+
n[8] === u.PageSize ? m = n[9] : (m = /* @__PURE__ */ Y(u.PageSize, {}), n[8] = u.PageSize, n[9] = m);
|
|
3275
3290
|
let h;
|
|
3276
|
-
n[10] === u.Range ? h = n[11] : (h = /* @__PURE__ */
|
|
3291
|
+
n[10] === u.Range ? h = n[11] : (h = /* @__PURE__ */ Y(u.Range, {}), n[10] = u.Range, n[11] = h);
|
|
3277
3292
|
let g;
|
|
3278
|
-
n[12] === u.Pager ? g = n[13] : (g = /* @__PURE__ */
|
|
3293
|
+
n[12] === u.Pager ? g = n[13] : (g = /* @__PURE__ */ Y(u.Pager, {}), n[12] = u.Pager, n[13] = g);
|
|
3279
3294
|
let _;
|
|
3280
|
-
n[14] !== p || n[15] !== m || n[16] !== h || n[17] !== g ? (_ = /* @__PURE__ */
|
|
3295
|
+
n[14] !== p || n[15] !== m || n[16] !== h || n[17] !== g ? (_ = /* @__PURE__ */ X("div", {
|
|
3281
3296
|
"data-dg-part": "footer",
|
|
3282
3297
|
className: ui.footer,
|
|
3283
3298
|
"data-paging-suspended": p,
|
|
@@ -3288,7 +3303,7 @@ function _i(t) {
|
|
|
3288
3303
|
]
|
|
3289
3304
|
}), n[14] = p, n[15] = m, n[16] = h, n[17] = g, n[18] = _) : _ = n[18];
|
|
3290
3305
|
let v;
|
|
3291
|
-
return n[19] !== c.pagingSuspendedHint || n[20] !== d || n[21] !== _ ? (v = /* @__PURE__ */
|
|
3306
|
+
return n[19] !== c.pagingSuspendedHint || n[20] !== d || n[21] !== _ ? (v = /* @__PURE__ */ Y(O, {
|
|
3292
3307
|
label: c.pagingSuspendedHint,
|
|
3293
3308
|
disabled: d,
|
|
3294
3309
|
withArrow: !0,
|
|
@@ -3300,8 +3315,8 @@ function _i(t) {
|
|
|
3300
3315
|
}
|
|
3301
3316
|
//#endregion
|
|
3302
3317
|
//#region src/tmdatagrid/components/TMDataGridSearch.tsx
|
|
3303
|
-
function
|
|
3304
|
-
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 } = Q(), g = j(f.store,
|
|
3318
|
+
function xi(t) {
|
|
3319
|
+
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 } = Q(), g = j(f.store, Si), [_, v] = c(g), y = s(void 0), b = s(g), x, S;
|
|
3305
3320
|
n[0] === g ? (x = n[1], S = n[2]) : (x = () => {
|
|
3306
3321
|
g !== b.current && (b.current = g, v(g));
|
|
3307
3322
|
}, S = [g], n[0] = g, n[1] = x, n[2] = S), i(x, S);
|
|
@@ -3322,12 +3337,12 @@ function vi(t) {
|
|
|
3322
3337
|
let k = O, A;
|
|
3323
3338
|
n[10] === k ? A = n[11] : (A = (e) => k(e.currentTarget.value), n[10] = k, n[11] = A);
|
|
3324
3339
|
let M = r ?? m.searchPlaceholder, N;
|
|
3325
|
-
n[12] === Symbol.for("react.memo_cache_sentinel") ? (N = /* @__PURE__ */
|
|
3340
|
+
n[12] === Symbol.for("react.memo_cache_sentinel") ? (N = /* @__PURE__ */ Y(ce, {
|
|
3326
3341
|
size: 16,
|
|
3327
3342
|
stroke: 1.6
|
|
3328
3343
|
}), n[12] = N) : N = n[12];
|
|
3329
3344
|
let P;
|
|
3330
|
-
n[13] !== E || n[14] !== _ || n[15] !== m.clearSearch ? (P = _ === "" ? void 0 : /* @__PURE__ */
|
|
3345
|
+
n[13] !== E || n[14] !== _ || n[15] !== m.clearSearch ? (P = _ === "" ? void 0 : /* @__PURE__ */ Y(l, {
|
|
3331
3346
|
variant: "subtle",
|
|
3332
3347
|
color: "gray",
|
|
3333
3348
|
size: "sm",
|
|
@@ -3336,13 +3351,13 @@ function vi(t) {
|
|
|
3336
3351
|
onClick: () => {
|
|
3337
3352
|
clearTimeout(y.current), v(""), E("");
|
|
3338
3353
|
},
|
|
3339
|
-
children: /* @__PURE__ */ J
|
|
3354
|
+
children: /* @__PURE__ */ Y(J, {
|
|
3340
3355
|
size: 14,
|
|
3341
3356
|
stroke: 1.6
|
|
3342
3357
|
})
|
|
3343
3358
|
}), n[13] = E, n[14] = _, n[15] = m.clearSearch, n[16] = P) : P = n[16];
|
|
3344
3359
|
let F;
|
|
3345
|
-
return n[17] !== h || n[18] !== _ || n[19] !== m.searchLabel || n[20] !== M || n[21] !== P || n[22] !== A || n[23] !== d ? (F = /* @__PURE__ */
|
|
3360
|
+
return n[17] !== h || n[18] !== _ || n[19] !== m.searchLabel || n[20] !== M || n[21] !== P || n[22] !== A || n[23] !== d ? (F = /* @__PURE__ */ Y(D, {
|
|
3346
3361
|
size: h,
|
|
3347
3362
|
w: d,
|
|
3348
3363
|
value: _,
|
|
@@ -3354,15 +3369,15 @@ function vi(t) {
|
|
|
3354
3369
|
rightSection: P
|
|
3355
3370
|
}), n[17] = h, n[18] = _, n[19] = m.searchLabel, n[20] = M, n[21] = P, n[22] = A, n[23] = d, n[24] = F) : F = n[24], F;
|
|
3356
3371
|
}
|
|
3357
|
-
function
|
|
3372
|
+
function Si(e) {
|
|
3358
3373
|
return typeof e.globalFilter == "string" ? e.globalFilter : "";
|
|
3359
3374
|
}
|
|
3360
|
-
var
|
|
3375
|
+
var Ci = {
|
|
3361
3376
|
stickyLeft: "_stickyLeft_1vw51_16",
|
|
3362
3377
|
stickyRight: "_stickyRight_1vw51_17",
|
|
3363
3378
|
stickyEdgeIn: "_stickyEdgeIn_1vw51_1",
|
|
3364
3379
|
stickyEdgeOut: "_stickyEdgeOut_1vw51_1"
|
|
3365
|
-
},
|
|
3380
|
+
}, wi = {
|
|
3366
3381
|
headerCell: "_headerCell_188ed_1",
|
|
3367
3382
|
headerCellFiltered: "_headerCellFiltered_188ed_35",
|
|
3368
3383
|
headerTitle: "_headerTitle_188ed_35",
|
|
@@ -3378,39 +3393,39 @@ var bi = {
|
|
|
3378
3393
|
columnSeparatorResizable: "_columnSeparatorResizable_188ed_152",
|
|
3379
3394
|
columnSeparatorActive: "_columnSeparatorActive_188ed_175",
|
|
3380
3395
|
menuItemActive: "_menuItemActive_188ed_181"
|
|
3381
|
-
},
|
|
3382
|
-
function
|
|
3396
|
+
}, Ti = 30, Ei = 2;
|
|
3397
|
+
function Di(e) {
|
|
3383
3398
|
let t = document.createRange();
|
|
3384
3399
|
t.selectNodeContents(e);
|
|
3385
3400
|
let n = typeof t.getBoundingClientRect == "function" ? t.getBoundingClientRect().width : 0;
|
|
3386
3401
|
return n > 0 ? n : e.scrollWidth;
|
|
3387
3402
|
}
|
|
3388
|
-
function
|
|
3403
|
+
function Oi(e, t) {
|
|
3389
3404
|
let n = CSS.escape(t);
|
|
3390
3405
|
return e.querySelectorAll(`[role="cell"][data-column-id="${n}"],[role="gridcell"][data-column-id="${n}"]`);
|
|
3391
3406
|
}
|
|
3392
|
-
function
|
|
3393
|
-
return
|
|
3407
|
+
function ki(e, t) {
|
|
3408
|
+
return Oi(e, t).length > 0;
|
|
3394
3409
|
}
|
|
3395
|
-
function
|
|
3410
|
+
function Ai({ container: e, columnId: t }) {
|
|
3396
3411
|
let n = 0;
|
|
3397
|
-
for (let r of
|
|
3412
|
+
for (let r of Oi(e, t)) {
|
|
3398
3413
|
let e = r.firstElementChild;
|
|
3399
3414
|
if (!(e instanceof HTMLElement)) continue;
|
|
3400
3415
|
let t = getComputedStyle(r), i = (Number.parseFloat(t.paddingLeft) || 0) + (Number.parseFloat(t.paddingRight) || 0);
|
|
3401
|
-
n = Math.max(n,
|
|
3416
|
+
n = Math.max(n, Di(e) + i + Ei);
|
|
3402
3417
|
}
|
|
3403
3418
|
let r = e.querySelector(`[data-column-id="${CSS.escape(t)}"] [data-dg-header-title]`);
|
|
3404
3419
|
if (r) {
|
|
3405
3420
|
let e = r.closest("[role=\"columnheader\"]"), t = e ? getComputedStyle(e) : null, i = t ? (Number.parseFloat(t.paddingLeft) || 0) + (Number.parseFloat(t.paddingRight) || 0) : 0;
|
|
3406
|
-
n = Math.max(n,
|
|
3421
|
+
n = Math.max(n, Di(r) + i + Ti);
|
|
3407
3422
|
}
|
|
3408
3423
|
return n;
|
|
3409
3424
|
}
|
|
3410
|
-
function
|
|
3425
|
+
function ji({ table: e, columnId: t, container: n }) {
|
|
3411
3426
|
let r = e, i = r.getColumn(t);
|
|
3412
3427
|
if (!i || !i.getCanResize()) return !1;
|
|
3413
|
-
let a =
|
|
3428
|
+
let a = Ai({
|
|
3414
3429
|
container: n,
|
|
3415
3430
|
columnId: t
|
|
3416
3431
|
});
|
|
@@ -3423,46 +3438,46 @@ function Oi({ table: e, columnId: t, container: n }) {
|
|
|
3423
3438
|
}
|
|
3424
3439
|
//#endregion
|
|
3425
3440
|
//#region src/tmdatagrid/core/columnOrdering.ts
|
|
3426
|
-
function
|
|
3441
|
+
function Mi(e, t) {
|
|
3427
3442
|
return e.left.includes(t) ? "left" : e.right.includes(t) ? "right" : "center";
|
|
3428
3443
|
}
|
|
3429
|
-
function
|
|
3444
|
+
function Ni(e, t, n, r) {
|
|
3430
3445
|
let i = e.filter((e) => e !== t), a = i.indexOf(n);
|
|
3431
3446
|
return a === -1 ? [...e] : (i.splice(r === "before" ? a : a + 1, 0, t), i);
|
|
3432
3447
|
}
|
|
3433
|
-
function
|
|
3448
|
+
function Pi({ table: e, columnId: t, targetId: n, side: r }) {
|
|
3434
3449
|
if (t === n) return;
|
|
3435
|
-
let i = e.store.state.columnPinning, a =
|
|
3436
|
-
if (a !==
|
|
3450
|
+
let i = e.store.state.columnPinning, a = Mi(i, t);
|
|
3451
|
+
if (a !== Mi(i, n)) return;
|
|
3437
3452
|
let o = e.getAllLeafColumns().map((e) => e.id);
|
|
3438
|
-
e.setColumnOrder(
|
|
3453
|
+
e.setColumnOrder(Ni(o, t, n, r)), a !== "center" && e.setColumnPinning((e) => ({
|
|
3439
3454
|
...e,
|
|
3440
|
-
[a]:
|
|
3455
|
+
[a]: Ni(e[a], t, n, r)
|
|
3441
3456
|
}));
|
|
3442
3457
|
}
|
|
3443
|
-
function
|
|
3458
|
+
function Fi(e) {
|
|
3444
3459
|
let t = (e) => kn(e);
|
|
3445
3460
|
return {
|
|
3446
3461
|
left: [...e.left.filter(t), ...e.left.filter((e) => !t(e))],
|
|
3447
3462
|
right: [...e.right.filter((e) => !t(e)), ...e.right.filter(t)]
|
|
3448
3463
|
};
|
|
3449
3464
|
}
|
|
3450
|
-
function
|
|
3465
|
+
function Ii(e, t) {
|
|
3451
3466
|
return t === "left" ? e.getLeftVisibleLeafColumns() : t === "right" ? e.getRightVisibleLeafColumns() : e.getCenterVisibleLeafColumns();
|
|
3452
3467
|
}
|
|
3453
|
-
function
|
|
3454
|
-
let r =
|
|
3468
|
+
function Li({ table: e, columnId: t, direction: n }) {
|
|
3469
|
+
let r = Ii(e, Mi(e.store.state.columnPinning, t)), i = r.findIndex((e) => e.id === t);
|
|
3455
3470
|
if (i === -1) return null;
|
|
3456
3471
|
let a = r[i + n];
|
|
3457
3472
|
return !a || !An(a) ? null : a;
|
|
3458
3473
|
}
|
|
3459
|
-
function
|
|
3460
|
-
let r =
|
|
3474
|
+
function Ri({ table: e, columnId: t, direction: n }) {
|
|
3475
|
+
let r = Li({
|
|
3461
3476
|
table: e,
|
|
3462
3477
|
columnId: t,
|
|
3463
3478
|
direction: n
|
|
3464
3479
|
});
|
|
3465
|
-
r &&
|
|
3480
|
+
r && Pi({
|
|
3466
3481
|
table: e,
|
|
3467
3482
|
columnId: t,
|
|
3468
3483
|
targetId: r.id,
|
|
@@ -3471,154 +3486,163 @@ function Fi({ table: e, columnId: t, direction: n }) {
|
|
|
3471
3486
|
}
|
|
3472
3487
|
//#endregion
|
|
3473
3488
|
//#region src/tmdatagrid/components/TMDataGridHeaderCell.tsx
|
|
3474
|
-
function
|
|
3475
|
-
let n = e(
|
|
3476
|
-
n[0] === Symbol.for("react.memo_cache_sentinel") ? (C = { compare:
|
|
3477
|
-
let { sorting: w, columnFilters: T, resizingColumnId: E, columnPinning: D, grouping: k } = j(u.store,
|
|
3478
|
-
if (n[1] !== o || n[2] !== p || n[3] !== T || n[4] !== D || n[5] !== A || n[6] !== y || n[7] !== d || n[8] !== k || n[9] !==
|
|
3479
|
-
|
|
3489
|
+
function zi(t) {
|
|
3490
|
+
let n = e(275), { header: r, layout: i, renderColumnMenuItems: a } = t, o = Q(), { table: u, features: d, labels: f } = o, p = r.column, [m, h] = c(!1), [_, v] = c(!1), [y, b] = c(null), x = s(null), S = s(!1), C;
|
|
3491
|
+
n[0] === Symbol.for("react.memo_cache_sentinel") ? (C = { compare: ge }, n[0] = C) : C = n[0];
|
|
3492
|
+
let { sorting: w, columnFilters: T, resizingColumnId: E, columnPinning: D, grouping: k } = j(u.store, Ki, C), A = j(o.ui, Gi), N = r.subHeaders.length === 0, B, V, H, se, W, K, ce, q, J, le, ue, de, fe, pe, me, he, _e, ve, ye, be, xe, Se;
|
|
3493
|
+
if (n[1] !== o || n[2] !== p || n[3] !== T || n[4] !== D || n[5] !== A || n[6] !== y || n[7] !== d || n[8] !== k || n[9] !== r || n[10] !== N || n[11] !== f || n[12] !== i.pinnedAt || n[13] !== a || n[14] !== E || n[15] !== w || n[16] !== u) {
|
|
3494
|
+
ye = xn(p);
|
|
3480
3495
|
let e;
|
|
3481
|
-
n[
|
|
3496
|
+
n[39] === p ? e = n[40] : (e = Dn(p), n[39] = p, n[40] = e), B = e;
|
|
3482
3497
|
let t;
|
|
3483
|
-
n[
|
|
3484
|
-
let r;
|
|
3485
|
-
n[41] !== p.id || n[42] !== ge || n[43] !== w ? (r = ge && w.length > 1 ? w.findIndex((e) => e.id === p.id) + 1 : null, n[41] = p.id, n[42] = ge, n[43] = w, n[44] = r) : r = n[44], xe = r;
|
|
3498
|
+
n[41] !== p.id || n[42] !== w ? (t = w.find((e) => e.id === p.id)?.desc, n[41] = p.id, n[42] = w, n[43] = t) : t = n[43], xe = t, ve = xe !== void 0;
|
|
3486
3499
|
let s;
|
|
3487
|
-
|
|
3488
|
-
let e;
|
|
3489
|
-
n[48] === p.id ? e = n[49] : (e = (e) => e.id === p.id && vt(e.value), n[48] = p.id, n[49] = e), s = T.some(e), n[45] = p.id, n[46] = T, n[47] = s;
|
|
3490
|
-
} else s = n[47];
|
|
3491
|
-
me = s, he = E === p.id, ye = i.pinnedAt;
|
|
3500
|
+
n[44] !== p.id || n[45] !== ve || n[46] !== w ? (s = ve && w.length > 1 ? w.findIndex((e) => e.id === p.id) + 1 : null, n[44] = p.id, n[45] = ve, n[46] = w, n[47] = s) : s = n[47], Se = s;
|
|
3492
3501
|
let c;
|
|
3493
|
-
n[
|
|
3494
|
-
|
|
3495
|
-
|
|
3496
|
-
|
|
3497
|
-
|
|
3498
|
-
let
|
|
3499
|
-
n[53] !== p
|
|
3500
|
-
let
|
|
3501
|
-
|
|
3502
|
-
let
|
|
3503
|
-
|
|
3504
|
-
let
|
|
3505
|
-
n[
|
|
3502
|
+
if (n[48] !== p.id || n[49] !== T) {
|
|
3503
|
+
let e;
|
|
3504
|
+
n[51] === p.id ? e = n[52] : (e = (e) => e.id === p.id && vt(e.value), n[51] = p.id, n[52] = e), c = T.some(e), n[48] = p.id, n[49] = T, n[50] = c;
|
|
3505
|
+
} else c = n[50];
|
|
3506
|
+
he = c, _e = E === p.id, fe = E !== !1, be = i.pinnedAt;
|
|
3507
|
+
let l;
|
|
3508
|
+
n[53] !== p || n[54] !== d ? (l = zr(p, d), n[53] = p, n[54] = d, n[55] = l) : l = n[55];
|
|
3509
|
+
let m = l;
|
|
3510
|
+
W = N && m.canSort;
|
|
3511
|
+
let h = N && m.canFilter, _ = N && m.canHide, v = N && m.canPin;
|
|
3512
|
+
se = m.canResize, H = N && m.canReorder;
|
|
3513
|
+
let S = N && m.canGroup, C = N && Br(u, d).canHideAny, O;
|
|
3514
|
+
n[56] !== p.id || n[57] !== k ? (O = k.includes(p.id), n[56] = p.id, n[57] = k, n[58] = O) : O = n[58];
|
|
3515
|
+
let j = O, te = k.length > 0;
|
|
3516
|
+
pe = A === p.id;
|
|
3517
|
+
let X;
|
|
3518
|
+
n[59] !== H || n[60] !== p.id || n[61] !== D || n[62] !== A || n[63] !== pe ? (X = H && A !== null && !pe && Mi(D, A) === Mi(D, p.id), n[59] = H, n[60] = p.id, n[61] = D, n[62] = A, n[63] = pe, n[64] = X) : X = n[64], me = X;
|
|
3519
|
+
let ge;
|
|
3520
|
+
n[65] !== o.ui || n[66] !== p.id ? (ge = function(e) {
|
|
3506
3521
|
e.dataTransfer.effectAllowed = "move", e.dataTransfer.setData("text/plain", p.id), o.ui.actions.startColumnDrag(p.id);
|
|
3507
|
-
}, n[
|
|
3508
|
-
let
|
|
3509
|
-
n[
|
|
3510
|
-
if (!
|
|
3522
|
+
}, n[65] = o.ui, n[66] = p.id, n[67] = ge) : ge = n[67], ue = ge;
|
|
3523
|
+
let Ce;
|
|
3524
|
+
n[68] === me ? Ce = n[69] : (Ce = function(e) {
|
|
3525
|
+
if (!me) return;
|
|
3511
3526
|
e.preventDefault(), e.dataTransfer.dropEffect = "move";
|
|
3512
3527
|
let t = x.current?.getBoundingClientRect();
|
|
3513
3528
|
t && b(e.clientX < t.left + t.width / 2 ? "before" : "after");
|
|
3514
|
-
}, n[
|
|
3515
|
-
let
|
|
3516
|
-
n[
|
|
3529
|
+
}, n[68] = me, n[69] = Ce), le = Ce;
|
|
3530
|
+
let we;
|
|
3531
|
+
n[70] === Symbol.for("react.memo_cache_sentinel") ? (we = function(e) {
|
|
3517
3532
|
let t = e.relatedTarget;
|
|
3518
3533
|
t instanceof Node && e.currentTarget.contains(t) || b(null);
|
|
3519
|
-
}, n[
|
|
3520
|
-
let
|
|
3521
|
-
n[
|
|
3522
|
-
e.preventDefault(), b(null), o.ui.actions.endColumnDrag(), !(!
|
|
3534
|
+
}, n[70] = we) : we = n[70], J = we;
|
|
3535
|
+
let Te;
|
|
3536
|
+
n[71] !== o.ui || n[72] !== p.id || n[73] !== A || n[74] !== y || n[75] !== me || n[76] !== u ? (Te = function(e) {
|
|
3537
|
+
e.preventDefault(), b(null), o.ui.actions.endColumnDrag(), !(!me || !y || !A) && Pi({
|
|
3523
3538
|
table: u,
|
|
3524
3539
|
columnId: A,
|
|
3525
3540
|
targetId: p.id,
|
|
3526
3541
|
side: y
|
|
3527
3542
|
});
|
|
3528
|
-
}, n[
|
|
3529
|
-
let
|
|
3530
|
-
n[
|
|
3543
|
+
}, n[71] = o.ui, n[72] = p.id, n[73] = A, n[74] = y, n[75] = me, n[76] = u, n[77] = Te) : Te = n[77], de = Te;
|
|
3544
|
+
let Z;
|
|
3545
|
+
n[78] === o.ui ? Z = n[79] : (Z = function() {
|
|
3531
3546
|
b(null), o.ui.actions.endColumnDrag();
|
|
3532
|
-
}, n[
|
|
3533
|
-
let
|
|
3534
|
-
n[
|
|
3547
|
+
}, n[78] = o.ui, n[79] = Z), q = Z;
|
|
3548
|
+
let Ee;
|
|
3549
|
+
n[80] !== p.id || n[81] !== u ? (Ee = function() {
|
|
3535
3550
|
let e = x.current?.closest("[data-dg-scroll-container]");
|
|
3536
|
-
e &&
|
|
3551
|
+
e && ji({
|
|
3537
3552
|
table: u,
|
|
3538
3553
|
columnId: p.id,
|
|
3539
3554
|
container: e
|
|
3540
3555
|
});
|
|
3541
|
-
}, n[
|
|
3542
|
-
let
|
|
3543
|
-
n[
|
|
3544
|
-
|
|
3545
|
-
|
|
3546
|
-
|
|
3547
|
-
|
|
3548
|
-
|
|
3549
|
-
|
|
3556
|
+
}, n[80] = p.id, n[81] = u, n[82] = Ee) : Ee = n[82], V = Ee;
|
|
3557
|
+
let De;
|
|
3558
|
+
n[83] !== r || n[84] !== u ? (De = function() {
|
|
3559
|
+
let e = x.current?.closest("[data-dg-scroll-container]");
|
|
3560
|
+
if (!e) return;
|
|
3561
|
+
let t = u.store.state.columnSizing, n = {};
|
|
3562
|
+
for (let i of r.getLeafHeaders()) {
|
|
3563
|
+
let r = i.column.id;
|
|
3564
|
+
if (r in t) continue;
|
|
3565
|
+
let a = e.querySelector(`[role="columnheader"][data-column-id="${CSS.escape(r)}"]`)?.getBoundingClientRect().width;
|
|
3566
|
+
a && (n[r] = Math.round(a));
|
|
3550
3567
|
}
|
|
3551
|
-
|
|
3552
|
-
|
|
3553
|
-
|
|
3568
|
+
Object.keys(n).length !== 0 && u.setColumnSizing((e) => ({
|
|
3569
|
+
...e,
|
|
3570
|
+
...n
|
|
3571
|
+
}));
|
|
3572
|
+
}, n[83] = r, n[84] = u, n[85] = De) : De = n[85], ce = De;
|
|
3573
|
+
let Oe;
|
|
3574
|
+
n[86] !== p || n[87] !== ce || n[88] !== u ? (Oe = function(e) {
|
|
3575
|
+
e && ce(), p.pin(e), u.setColumnPinning(Fi);
|
|
3576
|
+
}, n[86] = p, n[87] = ce, n[88] = u, n[89] = Oe) : Oe = n[89];
|
|
3577
|
+
let ke = Oe, Ae = [];
|
|
3554
3578
|
if (W) {
|
|
3555
3579
|
let e;
|
|
3556
|
-
n[
|
|
3580
|
+
n[90] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ Y(z, {
|
|
3557
3581
|
size: 16,
|
|
3558
3582
|
stroke: 1.6
|
|
3559
|
-
}), n[
|
|
3583
|
+
}), n[90] = e) : e = n[90];
|
|
3560
3584
|
let t;
|
|
3561
|
-
n[
|
|
3585
|
+
n[91] === p ? t = n[92] : (t = () => p.toggleSorting(!1), n[91] = p, n[92] = t);
|
|
3562
3586
|
let r;
|
|
3563
|
-
n[
|
|
3587
|
+
n[93] !== f.sortAsc || n[94] !== t ? (r = /* @__PURE__ */ Y(g.Item, {
|
|
3564
3588
|
leftSection: e,
|
|
3565
3589
|
onClick: t,
|
|
3566
3590
|
children: f.sortAsc
|
|
3567
|
-
}, "sort-asc"), n[
|
|
3591
|
+
}, "sort-asc"), n[93] = f.sortAsc, n[94] = t, n[95] = r) : r = n[95];
|
|
3568
3592
|
let i;
|
|
3569
|
-
n[
|
|
3593
|
+
n[96] === Symbol.for("react.memo_cache_sentinel") ? (i = /* @__PURE__ */ Y(I, {
|
|
3570
3594
|
size: 16,
|
|
3571
3595
|
stroke: 1.6
|
|
3572
|
-
}), n[
|
|
3596
|
+
}), n[96] = i) : i = n[96];
|
|
3573
3597
|
let a;
|
|
3574
|
-
n[
|
|
3598
|
+
n[97] === p ? a = n[98] : (a = () => p.toggleSorting(!0), n[97] = p, n[98] = a);
|
|
3575
3599
|
let o;
|
|
3576
|
-
n[
|
|
3600
|
+
n[99] !== f.sortDesc || n[100] !== a ? (o = /* @__PURE__ */ Y(g.Item, {
|
|
3577
3601
|
leftSection: i,
|
|
3578
3602
|
onClick: a,
|
|
3579
3603
|
children: f.sortDesc
|
|
3580
|
-
}, "sort-desc"), n[
|
|
3604
|
+
}, "sort-desc"), n[99] = f.sortDesc, n[100] = a, n[101] = o) : o = n[101];
|
|
3581
3605
|
let s;
|
|
3582
|
-
n[
|
|
3606
|
+
n[102] === Symbol.for("react.memo_cache_sentinel") ? (s = /* @__PURE__ */ Y(g.Divider, {}, "sort-divider"), n[102] = s) : s = n[102], Ae.push(r, o, s);
|
|
3583
3607
|
}
|
|
3584
|
-
if (
|
|
3608
|
+
if (h) {
|
|
3585
3609
|
let e;
|
|
3586
|
-
n[
|
|
3610
|
+
n[103] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ Y(re, {
|
|
3587
3611
|
size: 16,
|
|
3588
3612
|
stroke: 1.6
|
|
3589
|
-
}), n[
|
|
3613
|
+
}), n[103] = e) : e = n[103];
|
|
3590
3614
|
let t;
|
|
3591
|
-
n[
|
|
3615
|
+
n[104] !== o || n[105] !== p.id ? (t = () => oi(o, p.id), n[104] = o, n[105] = p.id, n[106] = t) : t = n[106];
|
|
3592
3616
|
let r;
|
|
3593
|
-
n[
|
|
3617
|
+
n[107] !== f.filterMenuItem || n[108] !== t ? (r = /* @__PURE__ */ Y(g.Item, {
|
|
3594
3618
|
leftSection: e,
|
|
3595
3619
|
onClick: t,
|
|
3596
3620
|
children: f.filterMenuItem
|
|
3597
|
-
}, "filter"), n[
|
|
3621
|
+
}, "filter"), n[107] = f.filterMenuItem, n[108] = t, n[109] = r) : r = n[109];
|
|
3598
3622
|
let i;
|
|
3599
|
-
n[
|
|
3623
|
+
n[110] === Symbol.for("react.memo_cache_sentinel") ? (i = /* @__PURE__ */ Y(g.Divider, {}, "filter-divider"), n[110] = i) : i = n[110], Ae.push(r, i);
|
|
3600
3624
|
}
|
|
3601
|
-
if (
|
|
3602
|
-
let e =
|
|
3603
|
-
n[
|
|
3625
|
+
if (S) {
|
|
3626
|
+
let e = j ? wi.menuItemActive : void 0, t;
|
|
3627
|
+
n[111] === j ? t = n[112] : (t = Y(j ? oe : U, {
|
|
3604
3628
|
size: 16,
|
|
3605
3629
|
stroke: 1.6
|
|
3606
|
-
}), n[
|
|
3630
|
+
}), n[111] = j, n[112] = t);
|
|
3607
3631
|
let r;
|
|
3608
|
-
n[
|
|
3609
|
-
let i =
|
|
3610
|
-
n[
|
|
3632
|
+
n[113] === p ? r = n[114] : (r = p.getToggleGroupingHandler(), n[113] = p, n[114] = r);
|
|
3633
|
+
let i = j ? f.ungroup(ye) : f.groupBy(ye), a;
|
|
3634
|
+
n[115] !== e || n[116] !== t || n[117] !== r || n[118] !== i ? (a = /* @__PURE__ */ Y(g.Item, {
|
|
3611
3635
|
className: e,
|
|
3612
3636
|
leftSection: t,
|
|
3613
3637
|
onClick: r,
|
|
3614
3638
|
children: i
|
|
3615
|
-
}, "group"), n[
|
|
3639
|
+
}, "group"), n[115] = e, n[116] = t, n[117] = r, n[118] = i, n[119] = a) : a = n[119], Ae.push(a);
|
|
3616
3640
|
}
|
|
3617
|
-
if (
|
|
3641
|
+
if (te) {
|
|
3618
3642
|
if (p.id === "__group__") for (let e of k) {
|
|
3619
3643
|
let t = u.getColumn(e);
|
|
3620
|
-
t &&
|
|
3621
|
-
leftSection: /* @__PURE__ */
|
|
3644
|
+
t && Ae.push(/* @__PURE__ */ Y(g.Item, {
|
|
3645
|
+
leftSection: /* @__PURE__ */ Y(oe, {
|
|
3622
3646
|
size: 16,
|
|
3623
3647
|
stroke: 1.6
|
|
3624
3648
|
}),
|
|
@@ -3627,397 +3651,399 @@ function Ii(t) {
|
|
|
3627
3651
|
}, `ungroup-${e}`));
|
|
3628
3652
|
}
|
|
3629
3653
|
let e;
|
|
3630
|
-
n[
|
|
3654
|
+
n[120] === u ? e = n[121] : (e = (e) => u.setExpanded(kt({
|
|
3631
3655
|
rows: u.getPrePaginatedRowModel().flatRows,
|
|
3632
3656
|
expanded: u.store.state.expanded,
|
|
3633
3657
|
target: "groups",
|
|
3634
3658
|
expand: e
|
|
3635
|
-
})), n[
|
|
3659
|
+
})), n[120] = u, n[121] = e);
|
|
3636
3660
|
let t = e, r;
|
|
3637
|
-
n[
|
|
3661
|
+
n[122] === Symbol.for("react.memo_cache_sentinel") ? (r = /* @__PURE__ */ Y(ie, {
|
|
3638
3662
|
size: 16,
|
|
3639
3663
|
stroke: 1.6
|
|
3640
|
-
}), n[
|
|
3664
|
+
}), n[122] = r) : r = n[122];
|
|
3641
3665
|
let i;
|
|
3642
|
-
n[
|
|
3666
|
+
n[123] === t ? i = n[124] : (i = () => t(!0), n[123] = t, n[124] = i);
|
|
3643
3667
|
let a;
|
|
3644
|
-
n[
|
|
3668
|
+
n[125] !== f.expandAllGroups || n[126] !== i ? (a = /* @__PURE__ */ Y(g.Item, {
|
|
3645
3669
|
leftSection: r,
|
|
3646
3670
|
onClick: i,
|
|
3647
3671
|
children: f.expandAllGroups
|
|
3648
|
-
}, "expand-all"), n[
|
|
3672
|
+
}, "expand-all"), n[125] = f.expandAllGroups, n[126] = i, n[127] = a) : a = n[127];
|
|
3649
3673
|
let o;
|
|
3650
|
-
n[
|
|
3674
|
+
n[128] === Symbol.for("react.memo_cache_sentinel") ? (o = /* @__PURE__ */ Y(ae, {
|
|
3651
3675
|
size: 16,
|
|
3652
3676
|
stroke: 1.6
|
|
3653
|
-
}), n[
|
|
3677
|
+
}), n[128] = o) : o = n[128];
|
|
3654
3678
|
let s;
|
|
3655
|
-
n[
|
|
3679
|
+
n[129] === t ? s = n[130] : (s = () => t(!1), n[129] = t, n[130] = s);
|
|
3656
3680
|
let c;
|
|
3657
|
-
n[
|
|
3681
|
+
n[131] !== f.collapseAllGroups || n[132] !== s ? (c = /* @__PURE__ */ Y(g.Item, {
|
|
3658
3682
|
leftSection: o,
|
|
3659
3683
|
onClick: s,
|
|
3660
3684
|
children: f.collapseAllGroups
|
|
3661
|
-
}, "collapse-all"), n[
|
|
3685
|
+
}, "collapse-all"), n[131] = f.collapseAllGroups, n[132] = s, n[133] = c) : c = n[133], Ae.push(a, c);
|
|
3662
3686
|
}
|
|
3663
|
-
if (
|
|
3687
|
+
if (S || te) {
|
|
3664
3688
|
let e;
|
|
3665
|
-
n[
|
|
3689
|
+
n[134] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ Y(g.Divider, {}, "group-divider"), n[134] = e) : e = n[134], Ae.push(e);
|
|
3666
3690
|
}
|
|
3667
|
-
if (
|
|
3668
|
-
let e =
|
|
3669
|
-
n[
|
|
3691
|
+
if (v) {
|
|
3692
|
+
let e = be === "left" ? wi.menuItemActive : void 0, t;
|
|
3693
|
+
n[135] === Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */ Y(P, {
|
|
3670
3694
|
size: 16,
|
|
3671
3695
|
stroke: 1.6
|
|
3672
|
-
}), n[
|
|
3696
|
+
}), n[135] = t) : t = n[135];
|
|
3673
3697
|
let r;
|
|
3674
|
-
n[
|
|
3698
|
+
n[136] !== be || n[137] !== ke ? (r = () => ke(be !== "left" && "left"), n[136] = be, n[137] = ke, n[138] = r) : r = n[138];
|
|
3675
3699
|
let i;
|
|
3676
|
-
n[
|
|
3700
|
+
n[139] !== f.pinLeft || n[140] !== e || n[141] !== r ? (i = /* @__PURE__ */ Y(g.Item, {
|
|
3677
3701
|
className: e,
|
|
3678
3702
|
leftSection: t,
|
|
3679
3703
|
onClick: r,
|
|
3680
3704
|
children: f.pinLeft
|
|
3681
|
-
}, "pin-left"), n[
|
|
3682
|
-
let a =
|
|
3683
|
-
n[
|
|
3705
|
+
}, "pin-left"), n[139] = f.pinLeft, n[140] = e, n[141] = r, n[142] = i) : i = n[142];
|
|
3706
|
+
let a = be === "right" ? wi.menuItemActive : void 0, o;
|
|
3707
|
+
n[143] === Symbol.for("react.memo_cache_sentinel") ? (o = /* @__PURE__ */ Y(F, {
|
|
3684
3708
|
size: 16,
|
|
3685
3709
|
stroke: 1.6
|
|
3686
|
-
}), n[
|
|
3710
|
+
}), n[143] = o) : o = n[143];
|
|
3687
3711
|
let s;
|
|
3688
|
-
n[
|
|
3712
|
+
n[144] !== be || n[145] !== ke ? (s = () => ke(be !== "right" && "right"), n[144] = be, n[145] = ke, n[146] = s) : s = n[146];
|
|
3689
3713
|
let c;
|
|
3690
|
-
if (n[
|
|
3714
|
+
if (n[147] !== f.pinRight || n[148] !== a || n[149] !== s ? (c = /* @__PURE__ */ Y(g.Item, {
|
|
3691
3715
|
className: a,
|
|
3692
3716
|
leftSection: o,
|
|
3693
3717
|
onClick: s,
|
|
3694
3718
|
children: f.pinRight
|
|
3695
|
-
}, "pin-right"), n[
|
|
3719
|
+
}, "pin-right"), n[147] = f.pinRight, n[148] = a, n[149] = s, n[150] = c) : c = n[150], Ae.push(i, c), be) {
|
|
3696
3720
|
let e;
|
|
3697
|
-
n[
|
|
3721
|
+
n[151] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ Y(G, {
|
|
3698
3722
|
size: 16,
|
|
3699
3723
|
stroke: 1.6
|
|
3700
|
-
}), n[
|
|
3724
|
+
}), n[151] = e) : e = n[151];
|
|
3701
3725
|
let t;
|
|
3702
|
-
n[
|
|
3726
|
+
n[152] === ke ? t = n[153] : (t = () => ke(!1), n[152] = ke, n[153] = t);
|
|
3703
3727
|
let r;
|
|
3704
|
-
n[
|
|
3728
|
+
n[154] !== f.unpin || n[155] !== t ? (r = /* @__PURE__ */ Y(g.Item, {
|
|
3705
3729
|
leftSection: e,
|
|
3706
3730
|
onClick: t,
|
|
3707
3731
|
children: f.unpin
|
|
3708
|
-
}, "unpin"), n[
|
|
3732
|
+
}, "unpin"), n[154] = f.unpin, n[155] = t, n[156] = r) : r = n[156], Ae.push(r);
|
|
3709
3733
|
}
|
|
3710
3734
|
let l;
|
|
3711
|
-
n[
|
|
3735
|
+
n[157] === Symbol.for("react.memo_cache_sentinel") ? (l = /* @__PURE__ */ Y(g.Divider, {}, "pin-divider"), n[157] = l) : l = n[157], Ae.push(l);
|
|
3712
3736
|
}
|
|
3713
3737
|
if (H) {
|
|
3714
3738
|
let e;
|
|
3715
|
-
n[
|
|
3739
|
+
n[158] !== p.id || n[159] !== u ? (e = Li({
|
|
3716
3740
|
table: u,
|
|
3717
3741
|
columnId: p.id,
|
|
3718
3742
|
direction: -1
|
|
3719
|
-
}), n[
|
|
3743
|
+
}), n[158] = p.id, n[159] = u, n[160] = e) : e = n[160];
|
|
3720
3744
|
let t = e, r;
|
|
3721
|
-
n[
|
|
3745
|
+
n[161] !== p.id || n[162] !== u ? (r = Li({
|
|
3722
3746
|
table: u,
|
|
3723
3747
|
columnId: p.id,
|
|
3724
3748
|
direction: 1
|
|
3725
|
-
}), n[
|
|
3749
|
+
}), n[161] = p.id, n[162] = u, n[163] = r) : r = n[163];
|
|
3726
3750
|
let i = r;
|
|
3727
3751
|
if (t || i) {
|
|
3728
3752
|
let e = !t, r;
|
|
3729
|
-
n[
|
|
3753
|
+
n[164] === Symbol.for("react.memo_cache_sentinel") ? (r = /* @__PURE__ */ Y(L, {
|
|
3730
3754
|
size: 16,
|
|
3731
3755
|
stroke: 1.6
|
|
3732
|
-
}), n[
|
|
3756
|
+
}), n[164] = r) : r = n[164];
|
|
3733
3757
|
let a;
|
|
3734
|
-
n[
|
|
3758
|
+
n[165] !== p.id || n[166] !== u ? (a = () => Ri({
|
|
3735
3759
|
table: u,
|
|
3736
3760
|
columnId: p.id,
|
|
3737
3761
|
direction: -1
|
|
3738
|
-
}), n[
|
|
3762
|
+
}), n[165] = p.id, n[166] = u, n[167] = a) : a = n[167];
|
|
3739
3763
|
let o;
|
|
3740
|
-
n[
|
|
3764
|
+
n[168] !== f.moveLeft || n[169] !== e || n[170] !== a ? (o = /* @__PURE__ */ Y(g.Item, {
|
|
3741
3765
|
disabled: e,
|
|
3742
3766
|
leftSection: r,
|
|
3743
3767
|
onClick: a,
|
|
3744
3768
|
children: f.moveLeft
|
|
3745
|
-
}, "move-left"), n[
|
|
3769
|
+
}, "move-left"), n[168] = f.moveLeft, n[169] = e, n[170] = a, n[171] = o) : o = n[171];
|
|
3746
3770
|
let s = !i, c;
|
|
3747
|
-
n[
|
|
3771
|
+
n[172] === Symbol.for("react.memo_cache_sentinel") ? (c = /* @__PURE__ */ Y(R, {
|
|
3748
3772
|
size: 16,
|
|
3749
3773
|
stroke: 1.6
|
|
3750
|
-
}), n[
|
|
3774
|
+
}), n[172] = c) : c = n[172];
|
|
3751
3775
|
let l;
|
|
3752
|
-
n[
|
|
3776
|
+
n[173] !== p.id || n[174] !== u ? (l = () => Ri({
|
|
3753
3777
|
table: u,
|
|
3754
3778
|
columnId: p.id,
|
|
3755
3779
|
direction: 1
|
|
3756
|
-
}), n[
|
|
3780
|
+
}), n[173] = p.id, n[174] = u, n[175] = l) : l = n[175];
|
|
3757
3781
|
let d;
|
|
3758
|
-
n[
|
|
3782
|
+
n[176] !== f.moveRight || n[177] !== s || n[178] !== l ? (d = /* @__PURE__ */ Y(g.Item, {
|
|
3759
3783
|
disabled: s,
|
|
3760
3784
|
leftSection: c,
|
|
3761
3785
|
onClick: l,
|
|
3762
3786
|
children: f.moveRight
|
|
3763
|
-
}, "move-right"), n[
|
|
3787
|
+
}, "move-right"), n[176] = f.moveRight, n[177] = s, n[178] = l, n[179] = d) : d = n[179];
|
|
3764
3788
|
let m;
|
|
3765
|
-
n[
|
|
3789
|
+
n[180] === Symbol.for("react.memo_cache_sentinel") ? (m = /* @__PURE__ */ Y(g.Divider, {}, "move-divider"), n[180] = m) : m = n[180], Ae.push(o, d, m);
|
|
3766
3790
|
}
|
|
3767
3791
|
}
|
|
3768
3792
|
if (se && N) {
|
|
3769
3793
|
let e;
|
|
3770
|
-
n[
|
|
3794
|
+
n[181] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ Y(M, {
|
|
3771
3795
|
size: 16,
|
|
3772
3796
|
stroke: 1.6
|
|
3773
|
-
}), n[
|
|
3797
|
+
}), n[181] = e) : e = n[181];
|
|
3774
3798
|
let t;
|
|
3775
|
-
n[
|
|
3799
|
+
n[182] !== V || n[183] !== f.autosizeColumn ? (t = /* @__PURE__ */ Y(g.Item, {
|
|
3776
3800
|
leftSection: e,
|
|
3777
3801
|
onClick: V,
|
|
3778
3802
|
children: f.autosizeColumn
|
|
3779
|
-
}, "autosize"), n[
|
|
3803
|
+
}, "autosize"), n[182] = V, n[183] = f.autosizeColumn, n[184] = t) : t = n[184];
|
|
3780
3804
|
let r;
|
|
3781
|
-
n[
|
|
3805
|
+
n[185] === Symbol.for("react.memo_cache_sentinel") ? (r = /* @__PURE__ */ Y(g.Divider, {}, "autosize-divider"), n[185] = r) : r = n[185], Ae.push(t, r);
|
|
3782
3806
|
}
|
|
3783
|
-
if (
|
|
3807
|
+
if (_) {
|
|
3784
3808
|
let e;
|
|
3785
|
-
n[
|
|
3809
|
+
n[186] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ Y(ne, {
|
|
3786
3810
|
size: 16,
|
|
3787
3811
|
stroke: 1.6
|
|
3788
|
-
}), n[
|
|
3812
|
+
}), n[186] = e) : e = n[186];
|
|
3789
3813
|
let t;
|
|
3790
|
-
n[
|
|
3814
|
+
n[187] === p ? t = n[188] : (t = () => p.toggleVisibility(!1), n[187] = p, n[188] = t);
|
|
3791
3815
|
let r;
|
|
3792
|
-
n[
|
|
3816
|
+
n[189] !== f.hideColumn || n[190] !== t ? (r = /* @__PURE__ */ Y(g.Item, {
|
|
3793
3817
|
leftSection: e,
|
|
3794
3818
|
onClick: t,
|
|
3795
3819
|
children: f.hideColumn
|
|
3796
|
-
}, "hide"), n[
|
|
3820
|
+
}, "hide"), n[189] = f.hideColumn, n[190] = t, n[191] = r) : r = n[191], Ae.push(r);
|
|
3797
3821
|
}
|
|
3798
|
-
if (
|
|
3822
|
+
if (C) {
|
|
3799
3823
|
let e;
|
|
3800
|
-
n[
|
|
3824
|
+
n[192] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ Y(ee, {
|
|
3801
3825
|
size: 16,
|
|
3802
3826
|
stroke: 1.6
|
|
3803
|
-
}), n[
|
|
3827
|
+
}), n[192] = e) : e = n[192];
|
|
3804
3828
|
let t;
|
|
3805
|
-
n[
|
|
3829
|
+
n[193] === o.ui.actions ? t = n[194] : (t = () => o.ui.actions.setColumnsPanelOpen(!0), n[193] = o.ui.actions, n[194] = t);
|
|
3806
3830
|
let r;
|
|
3807
|
-
n[
|
|
3831
|
+
n[195] !== f.manageColumns || n[196] !== t ? (r = /* @__PURE__ */ Y(g.Item, {
|
|
3808
3832
|
leftSection: e,
|
|
3809
3833
|
onClick: t,
|
|
3810
3834
|
children: f.manageColumns
|
|
3811
|
-
}, "manage"), n[
|
|
3835
|
+
}, "manage"), n[195] = f.manageColumns, n[196] = t, n[197] = r) : r = n[197], Ae.push(r);
|
|
3812
3836
|
}
|
|
3813
|
-
for (;
|
|
3814
|
-
for (
|
|
3837
|
+
for (; Ae.length > 0 && qi(Ae.at(-1));) Ae.pop();
|
|
3838
|
+
for (K = a ? [...a({
|
|
3815
3839
|
column: p,
|
|
3816
3840
|
table: u,
|
|
3817
|
-
internalItems:
|
|
3818
|
-
})] :
|
|
3819
|
-
n[1] = o, n[2] = p, n[3] = T, n[4] = D, n[5] = A, n[6] = y, n[7] = d, n[8] = k, n[9] =
|
|
3820
|
-
} else B = n[
|
|
3821
|
-
let
|
|
3822
|
-
n[
|
|
3823
|
-
let
|
|
3824
|
-
n[
|
|
3825
|
-
|
|
3826
|
-
we,
|
|
3841
|
+
internalItems: Ae
|
|
3842
|
+
})] : Ae; K.length > 0 && qi(K.at(-1));) K.pop();
|
|
3843
|
+
n[1] = o, n[2] = p, n[3] = T, n[4] = D, n[5] = A, n[6] = y, n[7] = d, n[8] = k, n[9] = r, n[10] = N, n[11] = f, n[12] = i.pinnedAt, n[13] = a, n[14] = E, n[15] = w, n[16] = u, n[17] = B, n[18] = V, n[19] = H, n[20] = se, n[21] = W, n[22] = K, n[23] = ce, n[24] = q, n[25] = J, n[26] = le, n[27] = ue, n[28] = de, n[29] = fe, n[30] = pe, n[31] = me, n[32] = he, n[33] = _e, n[34] = ve, n[35] = ye, n[36] = be, n[37] = xe, n[38] = Se;
|
|
3844
|
+
} else B = n[17], V = n[18], H = n[19], se = n[20], W = n[21], K = n[22], ce = n[23], q = n[24], J = n[25], le = n[26], ue = n[27], de = n[28], fe = n[29], pe = n[30], me = n[31], he = n[32], _e = n[33], ve = n[34], ye = n[35], be = n[36], xe = n[37], Se = n[38];
|
|
3845
|
+
let Ce;
|
|
3846
|
+
n[198] !== p.id || n[199] !== K || n[200] !== N ? (Ce = N && K.length > 0 && !On(p.id), n[198] = p.id, n[199] = K, n[200] = N, n[201] = Ce) : Ce = n[201];
|
|
3847
|
+
let we = Ce, Te = W ? wi.headerCellSortable : "", Z = he ? wi.headerCellFiltered : "", Ee = pe ? wi.headerCellDragging : "", De = y === "before" ? wi.headerCellDropBefore : "", Oe = y === "after" ? wi.headerCellDropAfter : "", ke = i.isBoundary && be === "left" ? Ci.stickyLeft : "", Ae = i.isBoundary && be === "right" ? Ci.stickyRight : "", je;
|
|
3848
|
+
n[202] !== Te || n[203] !== Z || n[204] !== Ee || n[205] !== De || n[206] !== Oe || n[207] !== ke || n[208] !== Ae ? (je = [
|
|
3849
|
+
wi.headerCell,
|
|
3827
3850
|
Te,
|
|
3828
|
-
Ee,
|
|
3829
|
-
X,
|
|
3830
3851
|
Z,
|
|
3852
|
+
Ee,
|
|
3831
3853
|
De,
|
|
3832
|
-
Oe
|
|
3833
|
-
|
|
3834
|
-
|
|
3835
|
-
n[203]
|
|
3836
|
-
let
|
|
3837
|
-
n[
|
|
3838
|
-
|
|
3839
|
-
|
|
3840
|
-
|
|
3841
|
-
|
|
3842
|
-
|
|
3843
|
-
|
|
3844
|
-
n[
|
|
3854
|
+
Oe,
|
|
3855
|
+
ke,
|
|
3856
|
+
Ae
|
|
3857
|
+
].filter(Boolean), n[202] = Te, n[203] = Z, n[204] = Ee, n[205] = De, n[206] = Oe, n[207] = ke, n[208] = Ae, n[209] = je) : je = n[209];
|
|
3858
|
+
let Me = je.join(" "), Ne = p.id, Pe = ve || he, Ie;
|
|
3859
|
+
n[210] === p.id ? Ie = n[211] : (Ie = On(p.id), n[210] = p.id, n[211] = Ie);
|
|
3860
|
+
let Le = W ? ve ? xe ? "descending" : "ascending" : "none" : void 0, Re = H && !fe, ze = H ? ue : void 0, Be = H ? q : void 0, Ve = me ? le : void 0, He = me ? J : void 0, Ue = me ? de : void 0, We = be === "left" ? i.offset : void 0, Ge = be === "right" ? i.offset : void 0, Ke = be ? "sticky" : void 0, qe = be ? "var(--dg-z-header-pinned-cell, 7)" : void 0, Je;
|
|
3861
|
+
n[212] !== We || n[213] !== Ge || n[214] !== Ke || n[215] !== qe ? (Je = {
|
|
3862
|
+
left: We,
|
|
3863
|
+
right: Ge,
|
|
3864
|
+
position: Ke,
|
|
3865
|
+
zIndex: qe
|
|
3866
|
+
}, n[212] = We, n[213] = Ge, n[214] = Ke, n[215] = qe, n[216] = Je) : Je = n[216];
|
|
3867
|
+
let Ye = W ? Wi : void 0, Xe;
|
|
3868
|
+
n[217] !== W || n[218] !== p ? (Xe = W ? (e) => {
|
|
3845
3869
|
if (S.current) {
|
|
3846
3870
|
S.current = !1;
|
|
3847
3871
|
return;
|
|
3848
3872
|
}
|
|
3849
3873
|
p.getToggleSortingHandler()?.(e);
|
|
3850
|
-
} : void 0, n[
|
|
3851
|
-
let
|
|
3852
|
-
n[
|
|
3853
|
-
label:
|
|
3874
|
+
} : void 0, n[217] = W, n[218] = p, n[219] = Xe) : Xe = n[219];
|
|
3875
|
+
let Ze;
|
|
3876
|
+
n[220] !== p.columnDef || n[221] !== r || n[222] !== N || n[223] !== ye ? (Ze = r.isPlaceholder ? null : /* @__PURE__ */ Y(O, {
|
|
3877
|
+
label: ye,
|
|
3854
3878
|
openDelay: 600,
|
|
3855
3879
|
withinPortal: !0,
|
|
3856
3880
|
disabled: !N,
|
|
3857
|
-
children: /* @__PURE__ */
|
|
3858
|
-
className:
|
|
3881
|
+
children: /* @__PURE__ */ Y("span", {
|
|
3882
|
+
className: wi.headerTitle,
|
|
3859
3883
|
"data-dg-header-title": !0,
|
|
3860
3884
|
children: Fe(p.columnDef.header, r.getContext())
|
|
3861
3885
|
})
|
|
3862
|
-
}), n[
|
|
3863
|
-
let
|
|
3864
|
-
n[
|
|
3865
|
-
className:
|
|
3886
|
+
}), n[220] = p.columnDef, n[221] = r, n[222] = N, n[223] = ye, n[224] = Ze) : Ze = n[224];
|
|
3887
|
+
let Qe;
|
|
3888
|
+
n[225] !== o || n[226] !== W || n[227] !== p || n[228] !== _ || n[229] !== K || n[230] !== we || n[231] !== he || n[232] !== N || n[233] !== ve || n[234] !== ye || n[235] !== f || n[236] !== m || n[237] !== xe || n[238] !== Se ? (Qe = N && /* @__PURE__ */ X("div", {
|
|
3889
|
+
className: wi.headerActions,
|
|
3866
3890
|
children: [
|
|
3867
|
-
|
|
3868
|
-
className:
|
|
3891
|
+
he && /* @__PURE__ */ Y(l, {
|
|
3892
|
+
className: wi.headerAction,
|
|
3869
3893
|
"data-pinned-visible": "true",
|
|
3870
3894
|
variant: "subtle",
|
|
3871
3895
|
color: "gray",
|
|
3872
3896
|
size: "xs",
|
|
3873
|
-
"aria-label": f.filterOn(
|
|
3897
|
+
"aria-label": f.filterOn(ye),
|
|
3874
3898
|
"data-dg-part": "header-filter",
|
|
3875
3899
|
"data-column-id": p.id,
|
|
3876
3900
|
onClick: (e) => {
|
|
3877
3901
|
e.stopPropagation(), oi(o, p.id);
|
|
3878
3902
|
},
|
|
3879
|
-
children: /* @__PURE__ */
|
|
3903
|
+
children: /* @__PURE__ */ Y(re, {
|
|
3880
3904
|
size: 14,
|
|
3881
3905
|
stroke: 1.6
|
|
3882
3906
|
})
|
|
3883
3907
|
}),
|
|
3884
|
-
W && /* @__PURE__ */
|
|
3885
|
-
className: `${
|
|
3886
|
-
"data-pinned-visible":
|
|
3887
|
-
"data-sorted":
|
|
3908
|
+
W && /* @__PURE__ */ Y(l, {
|
|
3909
|
+
className: `${wi.headerAction} ${wi.sortAction}`,
|
|
3910
|
+
"data-pinned-visible": ve,
|
|
3911
|
+
"data-sorted": ve,
|
|
3888
3912
|
variant: "subtle",
|
|
3889
|
-
color:
|
|
3913
|
+
color: ve ? void 0 : "gray",
|
|
3890
3914
|
size: "xs",
|
|
3891
|
-
"aria-label": f.sortColumn(
|
|
3915
|
+
"aria-label": f.sortColumn(ye),
|
|
3892
3916
|
"data-dg-part": "header-sort",
|
|
3893
3917
|
"data-column-id": p.id,
|
|
3894
3918
|
onClick: p.getToggleSortingHandler(),
|
|
3895
|
-
children:
|
|
3919
|
+
children: Y(xe ? I : z, {
|
|
3896
3920
|
size: 14,
|
|
3897
3921
|
stroke: 1.6
|
|
3898
3922
|
})
|
|
3899
3923
|
}),
|
|
3900
|
-
|
|
3901
|
-
className:
|
|
3924
|
+
Se !== null && /* @__PURE__ */ Y("span", {
|
|
3925
|
+
className: wi.sortIndex,
|
|
3902
3926
|
"data-dg-part": "sort-index",
|
|
3903
|
-
children:
|
|
3927
|
+
children: Se
|
|
3904
3928
|
}),
|
|
3905
|
-
|
|
3929
|
+
we && /* @__PURE__ */ X(g, {
|
|
3906
3930
|
opened: m,
|
|
3907
3931
|
onChange: h,
|
|
3908
3932
|
position: "bottom-start",
|
|
3909
3933
|
shadow: "md",
|
|
3910
3934
|
width: 220,
|
|
3911
3935
|
withinPortal: !0,
|
|
3912
|
-
children: [/* @__PURE__ */
|
|
3913
|
-
className:
|
|
3936
|
+
children: [/* @__PURE__ */ Y(g.Target, { children: /* @__PURE__ */ Y(l, {
|
|
3937
|
+
className: wi.headerAction,
|
|
3914
3938
|
"data-pinned-visible": m || _,
|
|
3915
3939
|
variant: "subtle",
|
|
3916
3940
|
color: "gray",
|
|
3917
3941
|
size: "xs",
|
|
3918
|
-
"aria-label": f.columnMenu(
|
|
3942
|
+
"aria-label": f.columnMenu(ye),
|
|
3919
3943
|
"data-dg-part": "header-menu",
|
|
3920
3944
|
"data-column-id": p.id,
|
|
3921
3945
|
onClick: (e) => {
|
|
3922
|
-
e.stopPropagation(), h(
|
|
3946
|
+
e.stopPropagation(), h(Ui);
|
|
3923
3947
|
},
|
|
3924
|
-
children: /* @__PURE__ */
|
|
3948
|
+
children: /* @__PURE__ */ Y(te, {
|
|
3925
3949
|
size: 14,
|
|
3926
3950
|
stroke: 1.6
|
|
3927
3951
|
})
|
|
3928
|
-
}) }), /* @__PURE__ */
|
|
3929
|
-
onClick:
|
|
3930
|
-
children:
|
|
3952
|
+
}) }), /* @__PURE__ */ Y(g.Dropdown, {
|
|
3953
|
+
onClick: Hi,
|
|
3954
|
+
children: K
|
|
3931
3955
|
})]
|
|
3932
3956
|
})
|
|
3933
3957
|
]
|
|
3934
|
-
}), n[
|
|
3935
|
-
let
|
|
3936
|
-
n[
|
|
3958
|
+
}), n[225] = o, n[226] = W, n[227] = p, n[228] = _, n[229] = K, n[230] = we, n[231] = he, n[232] = N, n[233] = ve, n[234] = ye, n[235] = f, n[236] = m, n[237] = xe, n[238] = Se, n[239] = Qe) : Qe = n[239];
|
|
3959
|
+
let $e;
|
|
3960
|
+
n[240] !== V || n[241] !== se || n[242] !== p.id || n[243] !== ce || n[244] !== r || n[245] !== _e ? ($e = !On(p.id) && /* @__PURE__ */ Y("div", {
|
|
3937
3961
|
className: [
|
|
3938
|
-
|
|
3939
|
-
se ?
|
|
3940
|
-
|
|
3962
|
+
wi.columnSeparator,
|
|
3963
|
+
se ? wi.columnSeparatorResizable : "",
|
|
3964
|
+
_e ? wi.columnSeparatorActive : ""
|
|
3941
3965
|
].filter(Boolean).join(" "),
|
|
3942
3966
|
draggable: !1,
|
|
3943
3967
|
onMouseDown: se ? (e) => {
|
|
3944
|
-
S.current = !0, r.getResizeHandler()(e);
|
|
3968
|
+
S.current = !0, ce(), r.getResizeHandler()(e);
|
|
3969
|
+
} : void 0,
|
|
3970
|
+
onTouchStart: se ? (e) => {
|
|
3971
|
+
ce(), r.getResizeHandler()(e);
|
|
3945
3972
|
} : void 0,
|
|
3946
|
-
|
|
3947
|
-
onClick: Ri,
|
|
3973
|
+
onClick: Vi,
|
|
3948
3974
|
onDoubleClick: se ? (e) => {
|
|
3949
3975
|
e.stopPropagation(), V();
|
|
3950
3976
|
} : void 0
|
|
3951
|
-
}), n[
|
|
3952
|
-
let
|
|
3953
|
-
n[
|
|
3977
|
+
}), n[240] = V, n[241] = se, n[242] = p.id, n[243] = ce, n[244] = r, n[245] = _e, n[246] = $e) : $e = n[246];
|
|
3978
|
+
let et;
|
|
3979
|
+
n[247] !== B || n[248] !== Me || n[249] !== p.id || n[250] !== Pe || n[251] !== Ie || n[252] !== Le || n[253] !== Re || n[254] !== ze || n[255] !== Be || n[256] !== Ve || n[257] !== He || n[258] !== Ue || n[259] !== Je || n[260] !== Ye || n[261] !== Xe || n[262] !== Ze || n[263] !== Qe || n[264] !== $e ? (et = /* @__PURE__ */ X("div", {
|
|
3954
3980
|
ref: x,
|
|
3955
3981
|
role: "columnheader",
|
|
3956
3982
|
"data-dg-part": "header",
|
|
3957
|
-
"data-column-id":
|
|
3958
|
-
"data-active":
|
|
3983
|
+
"data-column-id": Ne,
|
|
3984
|
+
"data-active": Pe,
|
|
3959
3985
|
"data-align": B,
|
|
3960
|
-
"data-control-column":
|
|
3961
|
-
"aria-sort":
|
|
3962
|
-
className:
|
|
3963
|
-
draggable:
|
|
3964
|
-
onDragStart:
|
|
3965
|
-
onDragEnd:
|
|
3966
|
-
onDragOver:
|
|
3967
|
-
onDragLeave:
|
|
3968
|
-
onDrop:
|
|
3969
|
-
style:
|
|
3970
|
-
onMouseDown:
|
|
3971
|
-
onClick:
|
|
3986
|
+
"data-control-column": Ie,
|
|
3987
|
+
"aria-sort": Le,
|
|
3988
|
+
className: Me,
|
|
3989
|
+
draggable: Re,
|
|
3990
|
+
onDragStart: ze,
|
|
3991
|
+
onDragEnd: Be,
|
|
3992
|
+
onDragOver: Ve,
|
|
3993
|
+
onDragLeave: He,
|
|
3994
|
+
onDrop: Ue,
|
|
3995
|
+
style: Je,
|
|
3996
|
+
onMouseDown: Ye,
|
|
3997
|
+
onClick: Xe,
|
|
3972
3998
|
children: [
|
|
3973
|
-
|
|
3974
|
-
|
|
3975
|
-
|
|
3999
|
+
Ze,
|
|
4000
|
+
Qe,
|
|
4001
|
+
$e
|
|
3976
4002
|
]
|
|
3977
|
-
}), n[
|
|
3978
|
-
let
|
|
3979
|
-
if (!
|
|
3980
|
-
let et;
|
|
3981
|
-
n[258] === Symbol.for("react.memo_cache_sentinel") ? (et = (e) => {
|
|
3982
|
-
v(e), e && h(!1);
|
|
3983
|
-
}, n[258] = et) : et = n[258];
|
|
3984
|
-
let tt;
|
|
3985
|
-
n[259] === $e ? tt = n[260] : (tt = /* @__PURE__ */ J(g.ContextMenu, { children: $e }), n[259] = $e, n[260] = tt);
|
|
4003
|
+
}), n[247] = B, n[248] = Me, n[249] = p.id, n[250] = Pe, n[251] = Ie, n[252] = Le, n[253] = Re, n[254] = ze, n[255] = Be, n[256] = Ve, n[257] = He, n[258] = Ue, n[259] = Je, n[260] = Ye, n[261] = Xe, n[262] = Ze, n[263] = Qe, n[264] = $e, n[265] = et) : et = n[265];
|
|
4004
|
+
let tt = et;
|
|
4005
|
+
if (!we) return tt;
|
|
3986
4006
|
let nt;
|
|
3987
|
-
n[
|
|
3988
|
-
|
|
3989
|
-
|
|
3990
|
-
}), n[261] = ce, n[262] = nt);
|
|
4007
|
+
n[266] === Symbol.for("react.memo_cache_sentinel") ? (nt = (e) => {
|
|
4008
|
+
v(e), e && h(!1);
|
|
4009
|
+
}, n[266] = nt) : nt = n[266];
|
|
3991
4010
|
let rt;
|
|
3992
|
-
|
|
4011
|
+
n[267] === tt ? rt = n[268] : (rt = /* @__PURE__ */ Y(g.ContextMenu, { children: tt }), n[267] = tt, n[268] = rt);
|
|
4012
|
+
let it;
|
|
4013
|
+
n[269] === K ? it = n[270] : (it = /* @__PURE__ */ Y(g.Dropdown, {
|
|
4014
|
+
onClick: Bi,
|
|
4015
|
+
children: K
|
|
4016
|
+
}), n[269] = K, n[270] = it);
|
|
4017
|
+
let at;
|
|
4018
|
+
return n[271] !== _ || n[272] !== rt || n[273] !== it ? (at = /* @__PURE__ */ X(g, {
|
|
3993
4019
|
opened: _,
|
|
3994
|
-
onChange:
|
|
4020
|
+
onChange: nt,
|
|
3995
4021
|
position: "bottom-start",
|
|
3996
4022
|
shadow: "md",
|
|
3997
4023
|
width: 220,
|
|
3998
4024
|
withinPortal: !0,
|
|
3999
|
-
children: [
|
|
4000
|
-
}), n[
|
|
4025
|
+
children: [rt, it]
|
|
4026
|
+
}), n[271] = _, n[272] = rt, n[273] = it, n[274] = at) : at = n[274], at;
|
|
4001
4027
|
}
|
|
4002
|
-
function
|
|
4028
|
+
function Bi(e) {
|
|
4003
4029
|
return e.stopPropagation();
|
|
4004
4030
|
}
|
|
4005
|
-
function
|
|
4031
|
+
function Vi(e) {
|
|
4006
4032
|
return e.stopPropagation();
|
|
4007
4033
|
}
|
|
4008
|
-
function
|
|
4034
|
+
function Hi(e) {
|
|
4009
4035
|
return e.stopPropagation();
|
|
4010
4036
|
}
|
|
4011
|
-
function
|
|
4037
|
+
function Ui(e) {
|
|
4012
4038
|
return !e;
|
|
4013
4039
|
}
|
|
4014
|
-
function
|
|
4040
|
+
function Wi(e) {
|
|
4015
4041
|
e.shiftKey && e.preventDefault();
|
|
4016
4042
|
}
|
|
4017
|
-
function
|
|
4043
|
+
function Gi(e) {
|
|
4018
4044
|
return e.draggedColumnId;
|
|
4019
4045
|
}
|
|
4020
|
-
function
|
|
4046
|
+
function Ki(e) {
|
|
4021
4047
|
return {
|
|
4022
4048
|
sorting: e.sorting,
|
|
4023
4049
|
columnFilters: e.columnFilters,
|
|
@@ -4027,28 +4053,28 @@ function Ui(e) {
|
|
|
4027
4053
|
grouping: e.grouping
|
|
4028
4054
|
};
|
|
4029
4055
|
}
|
|
4030
|
-
function
|
|
4056
|
+
function qi(e) {
|
|
4031
4057
|
return typeof e == "object" && !!e && "type" in e && e.type === g.Divider;
|
|
4032
4058
|
}
|
|
4033
4059
|
//#endregion
|
|
4034
4060
|
//#region src/tmdatagrid/components/editors/editorShared.ts
|
|
4035
|
-
function
|
|
4036
|
-
return
|
|
4061
|
+
function Ji(e) {
|
|
4062
|
+
return pe(e.store, Yi);
|
|
4037
4063
|
}
|
|
4038
|
-
function
|
|
4064
|
+
function Yi(e) {
|
|
4039
4065
|
return e.value;
|
|
4040
4066
|
}
|
|
4041
|
-
function
|
|
4042
|
-
return
|
|
4067
|
+
function Xi(e) {
|
|
4068
|
+
return pe(e.store, Zi);
|
|
4043
4069
|
}
|
|
4044
|
-
function
|
|
4070
|
+
function Zi(e) {
|
|
4045
4071
|
return Ht(e.meta.errors);
|
|
4046
4072
|
}
|
|
4047
|
-
function
|
|
4073
|
+
function Qi(e) {
|
|
4048
4074
|
let t = e.currentTarget;
|
|
4049
4075
|
t instanceof HTMLInputElement && t.select();
|
|
4050
4076
|
}
|
|
4051
|
-
function
|
|
4077
|
+
function $i() {
|
|
4052
4078
|
let t = e(2), n = s(null), r = s(null), i;
|
|
4053
4079
|
t[0] === Symbol.for("react.memo_cache_sentinel") ? (i = () => {
|
|
4054
4080
|
let e = r.current, t = n.current;
|
|
@@ -4069,13 +4095,13 @@ function Xi() {
|
|
|
4069
4095
|
}
|
|
4070
4096
|
//#endregion
|
|
4071
4097
|
//#region src/tmdatagrid/components/editors/TMDataGridBooleanEditor.tsx
|
|
4072
|
-
function
|
|
4073
|
-
let n = e(12), { field: r, column: i, size: a } = t, { labels: o } = Q(), s =
|
|
4098
|
+
function ea(t) {
|
|
4099
|
+
let n = e(12), { field: r, column: i, size: a } = t, { labels: o } = Q(), s = Ji(r), c = Xi(r), l;
|
|
4074
4100
|
n[0] !== i || n[1] !== o ? (l = o.editCell(xn(i)), n[0] = i, n[1] = o, n[2] = l) : l = n[2];
|
|
4075
4101
|
let u = s === !0, d;
|
|
4076
4102
|
n[3] === r ? d = n[4] : (d = (e) => r.handleChange(e.currentTarget.checked), n[3] = r, n[4] = d);
|
|
4077
4103
|
let p;
|
|
4078
|
-
return n[5] !== c || n[6] !== r.handleBlur || n[7] !== a || n[8] !== l || n[9] !== u || n[10] !== d ? (p = /* @__PURE__ */
|
|
4104
|
+
return n[5] !== c || n[6] !== r.handleBlur || n[7] !== a || n[8] !== l || n[9] !== u || n[10] !== d ? (p = /* @__PURE__ */ Y(f, {
|
|
4079
4105
|
size: a,
|
|
4080
4106
|
"aria-label": l,
|
|
4081
4107
|
"data-dg-part": "editor-input",
|
|
@@ -4087,8 +4113,8 @@ function Zi(t) {
|
|
|
4087
4113
|
}
|
|
4088
4114
|
//#endregion
|
|
4089
4115
|
//#region src/tmdatagrid/components/editors/TMDataGridDateEditor.tsx
|
|
4090
|
-
function
|
|
4091
|
-
let n = e(14), { field: r, column: i, size: a } = t, { labels: o } = Q(), c =
|
|
4116
|
+
function ta(t) {
|
|
4117
|
+
let n = e(14), { field: r, column: i, size: a } = t, { labels: o } = Q(), c = Ji(r), l = Xi(r), u = s(c instanceof Date), d;
|
|
4092
4118
|
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);
|
|
4093
4119
|
let f = d, p;
|
|
4094
4120
|
n[2] !== i || n[3] !== o ? (p = o.editCell(xn(i)), n[2] = i, n[3] = o, n[4] = p) : p = n[4];
|
|
@@ -4102,7 +4128,7 @@ function Qi(t) {
|
|
|
4102
4128
|
r.handleChange(u.current ? /* @__PURE__ */ new Date(`${t}T00:00:00`) : t);
|
|
4103
4129
|
}, n[5] = r, n[6] = m);
|
|
4104
4130
|
let h;
|
|
4105
|
-
return n[7] !== l || n[8] !== r.handleBlur || n[9] !== a || n[10] !== p || n[11] !== m || n[12] !== f ? (h = /* @__PURE__ */
|
|
4131
|
+
return n[7] !== l || n[8] !== r.handleBlur || n[9] !== a || n[10] !== p || n[11] !== m || n[12] !== f ? (h = /* @__PURE__ */ Y(D, {
|
|
4106
4132
|
size: a,
|
|
4107
4133
|
w: "100%",
|
|
4108
4134
|
type: "date",
|
|
@@ -4116,8 +4142,8 @@ function Qi(t) {
|
|
|
4116
4142
|
}
|
|
4117
4143
|
//#endregion
|
|
4118
4144
|
//#region src/tmdatagrid/components/editors/TMDataGridMultiSelectEditor.tsx
|
|
4119
|
-
function
|
|
4120
|
-
let n = e(20), { field: r, column: i, row: a, table: o, size: s } = t, { labels: c } = Q(), l =
|
|
4145
|
+
function na(t) {
|
|
4146
|
+
let n = e(20), { field: r, column: i, row: a, table: o, size: s } = t, { labels: c } = Q(), l = Ji(r), u = Xi(r), d;
|
|
4121
4147
|
n[0] === Symbol.for("react.memo_cache_sentinel") ? (d = { withinPortal: !1 }, n[0] = d) : d = n[0];
|
|
4122
4148
|
let f;
|
|
4123
4149
|
n[1] !== i || n[2] !== c ? (f = c.editCell(xn(i)), n[1] = i, n[2] = c, n[3] = f) : f = n[3];
|
|
@@ -4133,7 +4159,7 @@ function $i(t) {
|
|
|
4133
4159
|
let h;
|
|
4134
4160
|
n[10] === r ? h = n[11] : (h = (e) => r.handleChange(e), n[10] = r, n[11] = h);
|
|
4135
4161
|
let g;
|
|
4136
|
-
return n[12] !== u || n[13] !== r.handleBlur || n[14] !== s || n[15] !== f || n[16] !== p || n[17] !== m || n[18] !== h ? (g = /* @__PURE__ */
|
|
4162
|
+
return n[12] !== u || n[13] !== r.handleBlur || n[14] !== s || n[15] !== f || n[16] !== p || n[17] !== m || n[18] !== h ? (g = /* @__PURE__ */ Y(_, {
|
|
4137
4163
|
size: s,
|
|
4138
4164
|
w: "100%",
|
|
4139
4165
|
searchable: !0,
|
|
@@ -4149,8 +4175,8 @@ function $i(t) {
|
|
|
4149
4175
|
}
|
|
4150
4176
|
//#endregion
|
|
4151
4177
|
//#region src/tmdatagrid/components/editors/TMDataGridNumberEditor.tsx
|
|
4152
|
-
function
|
|
4153
|
-
let n = e(15), { field: r, column: i, size: a } = t, { labels: o } = Q(), s =
|
|
4178
|
+
function ra(t) {
|
|
4179
|
+
let n = e(15), { field: r, column: i, size: a } = t, { labels: o } = Q(), s = Ji(r), l = Xi(r), { inputRef: u, remember: d } = $i(), [f, p] = c(null), m = f === null || f === "" ? null : Number(f), h = Number.isFinite(m) ? m === s : s === null, g;
|
|
4154
4180
|
n[0] !== i || n[1] !== o ? (g = o.editCell(xn(i)), n[0] = i, n[1] = o, n[2] = g) : g = n[2];
|
|
4155
4181
|
let _ = f !== null && h ? f : typeof s == "number" ? s : "", y;
|
|
4156
4182
|
n[3] !== r || n[4] !== u || n[5] !== d ? (y = (e) => {
|
|
@@ -4163,11 +4189,11 @@ function ea(t) {
|
|
|
4163
4189
|
r.handleChange(e !== "" && Number.isFinite(t) ? t : null);
|
|
4164
4190
|
}, n[3] = r, n[4] = u, n[5] = d, n[6] = y) : y = n[6];
|
|
4165
4191
|
let b;
|
|
4166
|
-
return n[7] !== l || n[8] !== r.handleBlur || n[9] !== u || n[10] !== a || n[11] !== g || n[12] !== _ || n[13] !== y ? (b = /* @__PURE__ */
|
|
4192
|
+
return n[7] !== l || n[8] !== r.handleBlur || n[9] !== u || n[10] !== a || n[11] !== g || n[12] !== _ || n[13] !== y ? (b = /* @__PURE__ */ Y(v, {
|
|
4167
4193
|
ref: u,
|
|
4168
4194
|
size: a,
|
|
4169
4195
|
w: "100%",
|
|
4170
|
-
onFocus:
|
|
4196
|
+
onFocus: Qi,
|
|
4171
4197
|
hideControls: !0,
|
|
4172
4198
|
"aria-label": g,
|
|
4173
4199
|
"data-dg-part": "editor-input",
|
|
@@ -4179,8 +4205,8 @@ function ea(t) {
|
|
|
4179
4205
|
}
|
|
4180
4206
|
//#endregion
|
|
4181
4207
|
//#region src/tmdatagrid/components/editors/TMDataGridSelectEditor.tsx
|
|
4182
|
-
function
|
|
4183
|
-
let n = e(20), { field: r, column: i, row: a, table: o, size: s, commit: c } = t, { labels: l, features: u } = Q(), d =
|
|
4208
|
+
function ia(t) {
|
|
4209
|
+
let n = e(20), { field: r, column: i, row: a, table: o, size: s, commit: c } = t, { labels: l, features: u } = Q(), d = Ji(r), f = Xi(r), p;
|
|
4184
4210
|
n[0] === Symbol.for("react.memo_cache_sentinel") ? (p = { withinPortal: !1 }, n[0] = p) : p = n[0];
|
|
4185
4211
|
let m;
|
|
4186
4212
|
n[1] !== i || n[2] !== l ? (m = l.editCell(xn(i)), n[1] = i, n[2] = l, n[3] = m) : m = n[3];
|
|
@@ -4196,7 +4222,7 @@ function ta(t) {
|
|
|
4196
4222
|
r.handleChange(e), e !== null && u.editMode === "cell" && c();
|
|
4197
4223
|
}, n[8] = c, n[9] = u, n[10] = r, n[11] = _) : _ = n[11];
|
|
4198
4224
|
let v;
|
|
4199
|
-
return n[12] !== f || n[13] !== r.handleBlur || n[14] !== s || n[15] !== m || n[16] !== h || n[17] !== g || n[18] !== _ ? (v = /* @__PURE__ */
|
|
4225
|
+
return n[12] !== f || n[13] !== r.handleBlur || n[14] !== s || n[15] !== m || n[16] !== h || n[17] !== g || n[18] !== _ ? (v = /* @__PURE__ */ Y(w, {
|
|
4200
4226
|
size: s,
|
|
4201
4227
|
w: "100%",
|
|
4202
4228
|
searchable: !0,
|
|
@@ -4212,19 +4238,19 @@ function ta(t) {
|
|
|
4212
4238
|
}
|
|
4213
4239
|
//#endregion
|
|
4214
4240
|
//#region src/tmdatagrid/components/editors/TMDataGridStringEditor.tsx
|
|
4215
|
-
function
|
|
4216
|
-
let n = e(14), { field: r, column: i, size: a } = t, { labels: o } = Q(), s =
|
|
4241
|
+
function aa(t) {
|
|
4242
|
+
let n = e(14), { field: r, column: i, size: a } = t, { labels: o } = Q(), s = Ji(r), c = Xi(r), { inputRef: l, remember: u } = $i(), d;
|
|
4217
4243
|
n[0] !== i || n[1] !== o ? (d = o.editCell(xn(i)), n[0] = i, n[1] = o, n[2] = d) : d = n[2];
|
|
4218
4244
|
let f = typeof s == "string" ? s : "", p;
|
|
4219
4245
|
n[3] !== r || n[4] !== u ? (p = (e) => {
|
|
4220
4246
|
u(e.currentTarget), r.handleChange(e.currentTarget.value);
|
|
4221
4247
|
}, n[3] = r, n[4] = u, n[5] = p) : p = n[5];
|
|
4222
4248
|
let m;
|
|
4223
|
-
return n[6] !== c || n[7] !== r.handleBlur || n[8] !== l || n[9] !== a || n[10] !== d || n[11] !== f || n[12] !== p ? (m = /* @__PURE__ */
|
|
4249
|
+
return n[6] !== c || n[7] !== r.handleBlur || n[8] !== l || n[9] !== a || n[10] !== d || n[11] !== f || n[12] !== p ? (m = /* @__PURE__ */ Y(D, {
|
|
4224
4250
|
ref: l,
|
|
4225
4251
|
size: a,
|
|
4226
4252
|
w: "100%",
|
|
4227
|
-
onFocus:
|
|
4253
|
+
onFocus: Qi,
|
|
4228
4254
|
"aria-label": d,
|
|
4229
4255
|
"data-dg-part": "editor-input",
|
|
4230
4256
|
value: f,
|
|
@@ -4235,21 +4261,21 @@ function na(t) {
|
|
|
4235
4261
|
}
|
|
4236
4262
|
//#endregion
|
|
4237
4263
|
//#region src/tmdatagrid/components/TMDataGridCellEditor.tsx
|
|
4238
|
-
var
|
|
4239
|
-
string:
|
|
4240
|
-
number:
|
|
4241
|
-
boolean:
|
|
4242
|
-
date:
|
|
4243
|
-
select:
|
|
4244
|
-
multiSelect:
|
|
4264
|
+
var oa = {
|
|
4265
|
+
string: aa,
|
|
4266
|
+
number: ra,
|
|
4267
|
+
boolean: ea,
|
|
4268
|
+
date: ta,
|
|
4269
|
+
select: ia,
|
|
4270
|
+
multiSelect: na
|
|
4245
4271
|
};
|
|
4246
|
-
function
|
|
4272
|
+
function sa({ cell: e, row: t, takeSeedText: n, onClose: r, inEntryBlock: a = !1 }) {
|
|
4247
4273
|
let { table: o, edit: u, features: d, labels: f, controlSize: p } = Q(), m = d.editMode === "row" || a, h = e.column, g = u.getForm(t.id), _ = Lt(h), [v] = c(() => n()), y = s(void 0);
|
|
4248
4274
|
i(() => {
|
|
4249
4275
|
y.current = h.columnDef.meta?.edit?.mapValue;
|
|
4250
4276
|
});
|
|
4251
4277
|
let [b] = c(() => {
|
|
4252
|
-
let e = new
|
|
4278
|
+
let e = new ue({
|
|
4253
4279
|
form: g,
|
|
4254
4280
|
name: _,
|
|
4255
4281
|
validators: qt(h.columnDef.meta?.edit?.validate)
|
|
@@ -4318,8 +4344,8 @@ function ia({ cell: e, row: t, takeSeedText: n, onClose: r, inEntryBlock: a = !1
|
|
|
4318
4344
|
cancel: C,
|
|
4319
4345
|
size: p,
|
|
4320
4346
|
seedText: v
|
|
4321
|
-
}, O = h.columnDef.meta?.edit?.editor ??
|
|
4322
|
-
return /* @__PURE__ */
|
|
4347
|
+
}, O = h.columnDef.meta?.edit?.editor ?? oa[h.columnDef.meta?.type ?? "string"] ?? aa;
|
|
4348
|
+
return /* @__PURE__ */ X("div", {
|
|
4323
4349
|
className: $.cellEditor,
|
|
4324
4350
|
"data-dg-part": "editor",
|
|
4325
4351
|
"data-row-id": t.id,
|
|
@@ -4328,9 +4354,9 @@ function ia({ cell: e, row: t, takeSeedText: n, onClose: r, inEntryBlock: a = !1
|
|
|
4328
4354
|
onBlur: E,
|
|
4329
4355
|
onMouseDown: (e) => e.stopPropagation(),
|
|
4330
4356
|
onDoubleClick: (e) => e.stopPropagation(),
|
|
4331
|
-
children: [/* @__PURE__ */
|
|
4357
|
+
children: [/* @__PURE__ */ Y(O, { ...D }), d.editMode === "cellConfirm" && /* @__PURE__ */ X("div", {
|
|
4332
4358
|
className: $.cellEditorActions,
|
|
4333
|
-
children: [/* @__PURE__ */
|
|
4359
|
+
children: [/* @__PURE__ */ Y(l, {
|
|
4334
4360
|
size: "sm",
|
|
4335
4361
|
variant: "subtle",
|
|
4336
4362
|
color: "green",
|
|
@@ -4338,11 +4364,11 @@ function ia({ cell: e, row: t, takeSeedText: n, onClose: r, inEntryBlock: a = !1
|
|
|
4338
4364
|
"data-dg-part": "editor-confirm",
|
|
4339
4365
|
onMouseDown: (e) => e.preventDefault(),
|
|
4340
4366
|
onClick: () => void S("pick"),
|
|
4341
|
-
children: /* @__PURE__ */
|
|
4367
|
+
children: /* @__PURE__ */ Y(B, {
|
|
4342
4368
|
size: 14,
|
|
4343
4369
|
stroke: 2
|
|
4344
4370
|
})
|
|
4345
|
-
}), /* @__PURE__ */
|
|
4371
|
+
}), /* @__PURE__ */ Y(l, {
|
|
4346
4372
|
size: "sm",
|
|
4347
4373
|
variant: "subtle",
|
|
4348
4374
|
color: "gray",
|
|
@@ -4350,7 +4376,7 @@ function ia({ cell: e, row: t, takeSeedText: n, onClose: r, inEntryBlock: a = !1
|
|
|
4350
4376
|
"data-dg-part": "editor-cancel",
|
|
4351
4377
|
onMouseDown: (e) => e.preventDefault(),
|
|
4352
4378
|
onClick: C,
|
|
4353
|
-
children: /* @__PURE__ */ J
|
|
4379
|
+
children: /* @__PURE__ */ Y(J, {
|
|
4354
4380
|
size: 14,
|
|
4355
4381
|
stroke: 2
|
|
4356
4382
|
})
|
|
@@ -4360,7 +4386,7 @@ function ia({ cell: e, row: t, takeSeedText: n, onClose: r, inEntryBlock: a = !1
|
|
|
4360
4386
|
}
|
|
4361
4387
|
//#endregion
|
|
4362
4388
|
//#region src/tmdatagrid/core/editorFocus.ts
|
|
4363
|
-
var
|
|
4389
|
+
var ca = [
|
|
4364
4390
|
"button:not([disabled])",
|
|
4365
4391
|
"input:not([disabled])",
|
|
4366
4392
|
"select:not([disabled])",
|
|
@@ -4368,16 +4394,16 @@ var aa = [
|
|
|
4368
4394
|
"a[href]",
|
|
4369
4395
|
"[tabindex]:not([tabindex=\"-1\"])"
|
|
4370
4396
|
].join(",");
|
|
4371
|
-
function
|
|
4372
|
-
(e.querySelector("[data-dg-part=\"editor-input\"]") ?? e.querySelector(
|
|
4397
|
+
function la(e) {
|
|
4398
|
+
(e.querySelector("[data-dg-part=\"editor-input\"]") ?? e.querySelector(ca))?.focus();
|
|
4373
4399
|
}
|
|
4374
4400
|
//#endregion
|
|
4375
4401
|
//#region src/tmdatagrid/components/TMDataGridEntryRows.tsx
|
|
4376
|
-
function
|
|
4402
|
+
function ua(e, t, n) {
|
|
4377
4403
|
return n.isColumnEditable(t) ? En(t, e) : !1;
|
|
4378
4404
|
}
|
|
4379
|
-
function
|
|
4380
|
-
let n = e(38), { orderedColumns: r, layoutFor: i, rowHeight: o } = t, { table: c, edit: l, features: u } = Q(), d = j(l.store,
|
|
4405
|
+
function da(t) {
|
|
4406
|
+
let n = e(38), { orderedColumns: r, layoutFor: i, rowHeight: o } = t, { table: c, edit: l, features: u } = Q(), d = j(l.store, _a), f = j(l.store, ga), p = s(null), m = s(null), h = s(null), g;
|
|
4381
4407
|
n[0] === d ? g = n[1] : (g = () => {
|
|
4382
4408
|
let e = d.at(-1)?.tempId;
|
|
4383
4409
|
if (e === void 0) {
|
|
@@ -4388,7 +4414,7 @@ function ca(t) {
|
|
|
4388
4414
|
let t = p.current;
|
|
4389
4415
|
if (t === null) return;
|
|
4390
4416
|
let n = t.querySelector(`[data-dg-part="editor"][data-row-id="${CSS.escape(e)}"]`);
|
|
4391
|
-
n !== null && (m.current = e,
|
|
4417
|
+
n !== null && (m.current = e, la(n));
|
|
4392
4418
|
}, n[0] = d, n[1] = g), a(g);
|
|
4393
4419
|
let _;
|
|
4394
4420
|
n[2] === f ? _ = n[3] : (_ = () => {
|
|
@@ -4401,7 +4427,7 @@ function ca(t) {
|
|
|
4401
4427
|
let t = p.current;
|
|
4402
4428
|
if (t === null) return;
|
|
4403
4429
|
let n = t.querySelector(f.columnId === null ? `[data-dg-part="editor"][data-row-id="${CSS.escape(f.rowId)}"]` : `[data-dg-part="editor"][data-row-id="${CSS.escape(f.rowId)}"][data-column-id="${CSS.escape(f.columnId)}"]`);
|
|
4404
|
-
n !== null && (h.current = e,
|
|
4430
|
+
n !== null && (h.current = e, la(n));
|
|
4405
4431
|
}, n[2] = f, n[3] = _), a(_);
|
|
4406
4432
|
let v;
|
|
4407
4433
|
if (n[4] !== l || n[5] !== d) {
|
|
@@ -4425,13 +4451,13 @@ function ca(t) {
|
|
|
4425
4451
|
let C, w;
|
|
4426
4452
|
if (n[15] !== l || n[16] !== S || n[17] !== u.editNewRowsSticky || n[18] !== i || n[19] !== d || n[20] !== r || n[21] !== o) {
|
|
4427
4453
|
let e = S.getCoreRowModel().rows, t;
|
|
4428
|
-
n[24] === d ? t = n[25] : (t = new Map(d.map(
|
|
4454
|
+
n[24] === d ? t = n[25] : (t = new Map(d.map(ha)), n[24] = d, n[25] = t);
|
|
4429
4455
|
let a = t, s;
|
|
4430
4456
|
n[26] !== a || n[27] !== u.editNewRowsSticky ? (s = (e) => u.editNewRowsSticky || a.get(e.id) !== !0, n[26] = a, n[27] = u.editNewRowsSticky, n[28] = s) : s = n[28];
|
|
4431
4457
|
let c = e.filter(s), f = u.editNewRowsSticky ? [] : e.filter((e) => a.get(e.id) === !0), m;
|
|
4432
4458
|
n[29] !== a || n[30] !== l || n[31] !== i || n[32] !== r || n[33] !== o ? (m = (e, t) => {
|
|
4433
|
-
let n = new Map(e.getAllCells().map(
|
|
4434
|
-
return /* @__PURE__ */
|
|
4459
|
+
let n = new Map(e.getAllCells().map(ma)), s = a.get(e.id) === !0;
|
|
4460
|
+
return /* @__PURE__ */ Y("div", {
|
|
4435
4461
|
role: "row",
|
|
4436
4462
|
"data-dg-part": "entry-row",
|
|
4437
4463
|
"data-row-id": e.id,
|
|
@@ -4440,20 +4466,20 @@ function ca(t) {
|
|
|
4440
4466
|
"data-draft": s,
|
|
4441
4467
|
className: $.entryRow,
|
|
4442
4468
|
children: r.map((r) => {
|
|
4443
|
-
let a = n.get(r.id), c = i(r.id), u = a !== void 0 &&
|
|
4444
|
-
return /* @__PURE__ */
|
|
4469
|
+
let a = n.get(r.id), c = i(r.id), u = a !== void 0 && ua(e, r, l);
|
|
4470
|
+
return /* @__PURE__ */ Y("div", {
|
|
4445
4471
|
role: "cell",
|
|
4446
4472
|
"data-column-id": r.id,
|
|
4447
4473
|
"data-align": Dn(r),
|
|
4448
4474
|
"data-control-column": On(r.id),
|
|
4449
|
-
onDoubleClick: s &&
|
|
4475
|
+
onDoubleClick: s && u ? () => l.begin({
|
|
4450
4476
|
rowId: e.id,
|
|
4451
|
-
columnId:
|
|
4477
|
+
columnId: r.id
|
|
4452
4478
|
}) : void 0,
|
|
4453
4479
|
className: [
|
|
4454
4480
|
$.entryCell,
|
|
4455
|
-
c.isBoundary && c.pinnedAt === "left" ?
|
|
4456
|
-
c.isBoundary && c.pinnedAt === "right" ?
|
|
4481
|
+
c.isBoundary && c.pinnedAt === "left" ? Ci.stickyLeft : "",
|
|
4482
|
+
c.isBoundary && c.pinnedAt === "right" ? Ci.stickyRight : ""
|
|
4457
4483
|
].filter(Boolean).join(" "),
|
|
4458
4484
|
style: {
|
|
4459
4485
|
minHeight: o,
|
|
@@ -4462,14 +4488,14 @@ function ca(t) {
|
|
|
4462
4488
|
position: c.pinnedAt ? "sticky" : void 0,
|
|
4463
4489
|
zIndex: c.pinnedAt ? t : void 0
|
|
4464
4490
|
},
|
|
4465
|
-
children: a !== void 0 && r.id === "__edit__" ? Fe(a.column.columnDef.cell, a.getContext()) : s && a !== void 0 ? /* @__PURE__ */
|
|
4491
|
+
children: a !== void 0 && r.id === "__edit__" ? Fe(a.column.columnDef.cell, a.getContext()) : s && a !== void 0 ? /* @__PURE__ */ Y("span", {
|
|
4466
4492
|
className: $.cellContent,
|
|
4467
4493
|
children: Fe(a.column.columnDef.cell, a.getContext())
|
|
4468
|
-
}) : u && a !== void 0 ? /* @__PURE__ */
|
|
4494
|
+
}) : u && a !== void 0 ? /* @__PURE__ */ Y(sa, {
|
|
4469
4495
|
cell: a,
|
|
4470
4496
|
row: e,
|
|
4471
|
-
takeSeedText:
|
|
4472
|
-
onClose:
|
|
4497
|
+
takeSeedText: pa,
|
|
4498
|
+
onClose: fa,
|
|
4473
4499
|
inEntryBlock: !0
|
|
4474
4500
|
}) : null
|
|
4475
4501
|
}, r.id);
|
|
@@ -4477,13 +4503,13 @@ function ca(t) {
|
|
|
4477
4503
|
}, e.id);
|
|
4478
4504
|
}, n[29] = a, n[30] = l, n[31] = i, n[32] = r, n[33] = o, n[34] = m) : m = n[34];
|
|
4479
4505
|
let h = m;
|
|
4480
|
-
C = c.length > 0 && /* @__PURE__ */
|
|
4506
|
+
C = c.length > 0 && /* @__PURE__ */ Y("div", {
|
|
4481
4507
|
ref: p,
|
|
4482
4508
|
role: "rowgroup",
|
|
4483
4509
|
"data-dg-entry-block": !0,
|
|
4484
4510
|
className: $.entryBlock,
|
|
4485
4511
|
children: c.map((e) => h(e, "var(--dg-z-pinned-row-pinned-cell, 5)"))
|
|
4486
|
-
}), w = f.length > 0 && /* @__PURE__ */
|
|
4512
|
+
}), w = f.length > 0 && /* @__PURE__ */ Y("div", {
|
|
4487
4513
|
role: "rowgroup",
|
|
4488
4514
|
"data-dg-entry-flow-block": !0,
|
|
4489
4515
|
className: $.entryFlowBlock,
|
|
@@ -4491,25 +4517,56 @@ function ca(t) {
|
|
|
4491
4517
|
}), n[15] = l, n[16] = S, n[17] = u.editNewRowsSticky, n[18] = i, n[19] = d, n[20] = r, n[21] = o, n[22] = C, n[23] = w;
|
|
4492
4518
|
} else C = n[22], w = n[23];
|
|
4493
4519
|
let T;
|
|
4494
|
-
return n[35] !== C || n[36] !== w ? (T = /* @__PURE__ */
|
|
4520
|
+
return n[35] !== C || n[36] !== w ? (T = /* @__PURE__ */ X(le, { children: [C, w] }), n[35] = C, n[36] = w, n[37] = T) : T = n[37], T;
|
|
4495
4521
|
}
|
|
4496
|
-
function
|
|
4497
|
-
function
|
|
4498
|
-
function
|
|
4522
|
+
function fa() {}
|
|
4523
|
+
function pa() {}
|
|
4524
|
+
function ma(e) {
|
|
4499
4525
|
return [e.column.id, e];
|
|
4500
4526
|
}
|
|
4501
|
-
function
|
|
4527
|
+
function ha(e) {
|
|
4502
4528
|
return [e.tempId, e.committed];
|
|
4503
4529
|
}
|
|
4504
|
-
function
|
|
4530
|
+
function ga(e) {
|
|
4505
4531
|
return e.active !== null && e.newRows.some((t) => t.tempId === e.active?.rowId && !t.committed) ? e.active : null;
|
|
4506
4532
|
}
|
|
4507
|
-
function
|
|
4533
|
+
function _a(e) {
|
|
4508
4534
|
return e.newRows;
|
|
4509
4535
|
}
|
|
4510
4536
|
//#endregion
|
|
4537
|
+
//#region src/tmdatagrid/core/resizePreview.ts
|
|
4538
|
+
var va = 20, ya = 2 ** 53 - 1;
|
|
4539
|
+
function ba(e, t, n) {
|
|
4540
|
+
let r = Math.round(Math.max(e + e * t, 0) * 100) / 100;
|
|
4541
|
+
return Math.min(Math.max(n.minSize ?? va, r), n.maxSize ?? ya);
|
|
4542
|
+
}
|
|
4543
|
+
function* xa(e, t, n) {
|
|
4544
|
+
let r = 0;
|
|
4545
|
+
for (let i of e) yield {
|
|
4546
|
+
columnId: i,
|
|
4547
|
+
side: t,
|
|
4548
|
+
offset: r
|
|
4549
|
+
}, r += n(i);
|
|
4550
|
+
}
|
|
4551
|
+
function Sa({ progress: e, tracks: t, boundsOf: n, leftLane: r, rightLane: i }) {
|
|
4552
|
+
if (e.isResizingColumn === !1 || e.columnSizingStart.length === 0) return null;
|
|
4553
|
+
let a = e.deltaPercentage ?? 0, o = /* @__PURE__ */ new Map();
|
|
4554
|
+
for (let [t, r] of e.columnSizingStart) o.set(t, ba(r, a, n(t)));
|
|
4555
|
+
let s = [], c = 0;
|
|
4556
|
+
for (let e of t) {
|
|
4557
|
+
let t = o.get(e.id);
|
|
4558
|
+
s.push(t === void 0 ? e.track : `${t}px`), c += t ?? e.minWidth;
|
|
4559
|
+
}
|
|
4560
|
+
let l = (e) => e.some((e) => o.has(e)), u = (e) => o.get(e) ?? t.find((t) => t.id === e)?.minWidth ?? 0;
|
|
4561
|
+
return {
|
|
4562
|
+
gridTemplateColumns: s.join(" "),
|
|
4563
|
+
minWidth: c,
|
|
4564
|
+
offsets: [...l(r) ? xa(r, "left", u) : [], ...l(i) ? xa(i, "right", u) : []]
|
|
4565
|
+
};
|
|
4566
|
+
}
|
|
4567
|
+
//#endregion
|
|
4511
4568
|
//#region src/tmdatagrid/core/draftCellContext.ts
|
|
4512
|
-
function
|
|
4569
|
+
function Ca(e, t) {
|
|
4513
4570
|
let n = Object.create(e.row), r = n;
|
|
4514
4571
|
r.original = t, r._valuesCache = Object.create(null), r._uniqueValuesCache = Object.create(null);
|
|
4515
4572
|
let i = Object.create(e);
|
|
@@ -4524,7 +4581,7 @@ function ha(e, t) {
|
|
|
4524
4581
|
}
|
|
4525
4582
|
//#endregion
|
|
4526
4583
|
//#region src/tmdatagrid/core/cellRange.ts
|
|
4527
|
-
function
|
|
4584
|
+
function wa({ range: e, rowIndexOf: t, columnIndexOf: n }) {
|
|
4528
4585
|
if (e === null) return null;
|
|
4529
4586
|
let r = t(e.anchor.rowId), i = t(e.focus.rowId), a = n(e.anchor.columnId), o = n(e.focus.columnId);
|
|
4530
4587
|
return r < 0 || i < 0 || a < 0 || o < 0 ? null : {
|
|
@@ -4534,14 +4591,14 @@ function ga({ range: e, rowIndexOf: t, columnIndexOf: n }) {
|
|
|
4534
4591
|
right: Math.max(a, o)
|
|
4535
4592
|
};
|
|
4536
4593
|
}
|
|
4537
|
-
function
|
|
4594
|
+
function Ta(e, t, n) {
|
|
4538
4595
|
return e !== null && t >= e.top && t <= e.bottom && n >= e.left && n <= e.right;
|
|
4539
4596
|
}
|
|
4540
|
-
function
|
|
4597
|
+
function Ea(e) {
|
|
4541
4598
|
return e === null ? 0 : (e.bottom - e.top + 1) * (e.right - e.left + 1);
|
|
4542
4599
|
}
|
|
4543
|
-
function
|
|
4544
|
-
return !
|
|
4600
|
+
function Da(e, t, n) {
|
|
4601
|
+
return !Ta(e, t, n) || e === null ? null : {
|
|
4545
4602
|
top: t === e.top,
|
|
4546
4603
|
bottom: t === e.bottom,
|
|
4547
4604
|
left: n === e.left,
|
|
@@ -4550,13 +4607,13 @@ function ya(e, t, n) {
|
|
|
4550
4607
|
}
|
|
4551
4608
|
//#endregion
|
|
4552
4609
|
//#region src/tmdatagrid/core/cellExport.ts
|
|
4553
|
-
var
|
|
4610
|
+
var Oa = "", ka = {
|
|
4554
4611
|
separator: ";",
|
|
4555
4612
|
decimalComma: !0,
|
|
4556
4613
|
includeHeaders: !0,
|
|
4557
4614
|
fileName: "export"
|
|
4558
4615
|
};
|
|
4559
|
-
function
|
|
4616
|
+
function Aa(e, { decimalComma: t }) {
|
|
4560
4617
|
if (e == null) return "";
|
|
4561
4618
|
if (typeof e == "number") {
|
|
4562
4619
|
if (!Number.isFinite(e)) return "";
|
|
@@ -4565,7 +4622,7 @@ function Sa(e, { decimalComma: t }) {
|
|
|
4565
4622
|
}
|
|
4566
4623
|
if (typeof e == "string") return e;
|
|
4567
4624
|
if (typeof e == "boolean") return e ? "true" : "false";
|
|
4568
|
-
if (Array.isArray(e)) return e.map((e) =>
|
|
4625
|
+
if (Array.isArray(e)) return e.map((e) => Aa(e, { decimalComma: t })).join(", ");
|
|
4569
4626
|
if (e instanceof Date) return Number.isNaN(e.getTime()) ? "" : e.toLocaleString("sv-SE");
|
|
4570
4627
|
if (typeof e == "object") try {
|
|
4571
4628
|
return JSON.stringify(e);
|
|
@@ -4574,18 +4631,18 @@ function Sa(e, { decimalComma: t }) {
|
|
|
4574
4631
|
}
|
|
4575
4632
|
return String(e);
|
|
4576
4633
|
}
|
|
4577
|
-
function
|
|
4634
|
+
function ja({ rows: e, columns: t, bounds: n, includeHeaders: r, decimalComma: i }) {
|
|
4578
4635
|
let a = t.slice(n.left, n.right + 1).filter((e) => !On(e.id));
|
|
4579
4636
|
if (a.length === 0) return [];
|
|
4580
4637
|
let o = [];
|
|
4581
4638
|
r && o.push(a.map((e) => xn(e)));
|
|
4582
4639
|
for (let t = n.top; t <= n.bottom; t += 1) {
|
|
4583
4640
|
let n = e[t];
|
|
4584
|
-
n !== void 0 && o.push(a.map((e) =>
|
|
4641
|
+
n !== void 0 && o.push(a.map((e) => Aa(n.getValue(e.id), { decimalComma: i })));
|
|
4585
4642
|
}
|
|
4586
4643
|
return o;
|
|
4587
4644
|
}
|
|
4588
|
-
function
|
|
4645
|
+
function Ma({ table: e, includeHeaders: t = ka.includeHeaders, decimalComma: n = ka.decimalComma }) {
|
|
4589
4646
|
let r = e, i = [
|
|
4590
4647
|
...r.getLeftVisibleLeafColumns(),
|
|
4591
4648
|
...r.getCenterVisibleLeafColumns(),
|
|
@@ -4593,7 +4650,7 @@ function wa({ table: e, includeHeaders: t = xa.includeHeaders, decimalComma: n =
|
|
|
4593
4650
|
], a = [], o = (e) => {
|
|
4594
4651
|
for (let t of e) t.getIsGrouped() ? o(t.subRows) : a.push(t);
|
|
4595
4652
|
};
|
|
4596
|
-
return o(r.getSortedRowModel().rows),
|
|
4653
|
+
return o(r.getSortedRowModel().rows), ja({
|
|
4597
4654
|
rows: a,
|
|
4598
4655
|
columns: i,
|
|
4599
4656
|
bounds: {
|
|
@@ -4606,43 +4663,43 @@ function wa({ table: e, includeHeaders: t = xa.includeHeaders, decimalComma: n =
|
|
|
4606
4663
|
decimalComma: n
|
|
4607
4664
|
});
|
|
4608
4665
|
}
|
|
4609
|
-
function
|
|
4666
|
+
function Na({ table: e, options: t }) {
|
|
4610
4667
|
let n = {
|
|
4611
|
-
...
|
|
4668
|
+
...ka,
|
|
4612
4669
|
...t
|
|
4613
|
-
}, r =
|
|
4670
|
+
}, r = Ma({
|
|
4614
4671
|
table: e,
|
|
4615
4672
|
includeHeaders: n.includeHeaders,
|
|
4616
4673
|
decimalComma: n.decimalComma
|
|
4617
4674
|
});
|
|
4618
|
-
r.length !== 0 &&
|
|
4675
|
+
r.length !== 0 && Ra({
|
|
4619
4676
|
fileName: `${n.fileName}.csv`,
|
|
4620
|
-
text:
|
|
4677
|
+
text: Ia(r, { separator: n.separator })
|
|
4621
4678
|
});
|
|
4622
4679
|
}
|
|
4623
|
-
function
|
|
4680
|
+
function Pa(e, t) {
|
|
4624
4681
|
return e.includes(t) || e.includes("\"") || e.includes("\n") || e.includes("\r") ? `"${e.replaceAll("\"", "\"\"")}"` : e;
|
|
4625
4682
|
}
|
|
4626
|
-
function
|
|
4627
|
-
return e.map((e) => e.map((e) =>
|
|
4683
|
+
function Fa(e) {
|
|
4684
|
+
return e.map((e) => e.map((e) => Pa(e, " ")).join(" ")).join("\r\n");
|
|
4628
4685
|
}
|
|
4629
|
-
function
|
|
4630
|
-
return `${
|
|
4686
|
+
function Ia(e, { separator: t }) {
|
|
4687
|
+
return `${Oa}sep=${t}\r\n${e.map((e) => e.map((e) => Pa(e, t)).join(t)).join("\r\n")}\r\n`;
|
|
4631
4688
|
}
|
|
4632
|
-
async function
|
|
4689
|
+
async function La(e) {
|
|
4633
4690
|
try {
|
|
4634
4691
|
return await navigator.clipboard.writeText(e), !0;
|
|
4635
4692
|
} catch {
|
|
4636
4693
|
return !1;
|
|
4637
4694
|
}
|
|
4638
4695
|
}
|
|
4639
|
-
function
|
|
4696
|
+
function Ra({ fileName: e, text: t, mimeType: n = "text/csv;charset=utf-8" }) {
|
|
4640
4697
|
let r = URL.createObjectURL(new Blob([t], { type: n })), i = document.createElement("a");
|
|
4641
4698
|
i.href = r, i.download = e, i.style.display = "none", document.body.append(i), i.click(), i.remove(), setTimeout(() => URL.revokeObjectURL(r), 0);
|
|
4642
4699
|
}
|
|
4643
4700
|
//#endregion
|
|
4644
4701
|
//#region src/tmdatagrid/core/rowPinning.ts
|
|
4645
|
-
function
|
|
4702
|
+
function za(e, t) {
|
|
4646
4703
|
let n = e.store.state.rowPinning[t];
|
|
4647
4704
|
if (n.length === 0) return [];
|
|
4648
4705
|
let r = e.getPrePaginatedRowModel().rowsById, i = e.getCoreRowModel().rowsById, a = [];
|
|
@@ -4654,17 +4711,17 @@ function ja(e, t) {
|
|
|
4654
4711
|
}
|
|
4655
4712
|
//#endregion
|
|
4656
4713
|
//#region src/tmdatagrid/core/matchHighlight.ts
|
|
4657
|
-
var
|
|
4714
|
+
var Ba = [
|
|
4658
4715
|
"contains",
|
|
4659
4716
|
"startsWith",
|
|
4660
4717
|
"endsWith"
|
|
4661
4718
|
];
|
|
4662
|
-
function
|
|
4719
|
+
function Va(e) {
|
|
4663
4720
|
let t = e.store.state, n = typeof t.globalFilter == "string" ? t.globalFilter.trim() : "", r = /* @__PURE__ */ new Map();
|
|
4664
4721
|
for (let e of t.columnFilters) {
|
|
4665
4722
|
if (!_t(e.value)) continue;
|
|
4666
4723
|
let { operator: t, value: n } = e.value;
|
|
4667
|
-
if (!
|
|
4724
|
+
if (!Ba.includes(t) || typeof n != "string" || n === "") continue;
|
|
4668
4725
|
let i = r.get(e.id) ?? [];
|
|
4669
4726
|
i.push(n), r.set(e.id, i);
|
|
4670
4727
|
}
|
|
@@ -4678,7 +4735,7 @@ function Na(e) {
|
|
|
4678
4735
|
}
|
|
4679
4736
|
return i.size > 0 ? i : null;
|
|
4680
4737
|
}
|
|
4681
|
-
function
|
|
4738
|
+
function Ha(e, t) {
|
|
4682
4739
|
let n = e.toLowerCase(), r = [];
|
|
4683
4740
|
for (let e of t) {
|
|
4684
4741
|
let t = e.toLowerCase();
|
|
@@ -4700,35 +4757,35 @@ function Pa(e, t) {
|
|
|
4700
4757
|
}
|
|
4701
4758
|
//#endregion
|
|
4702
4759
|
//#region src/tmdatagrid/components/TMDataGridTable.tsx
|
|
4703
|
-
var
|
|
4760
|
+
var Ua = {
|
|
4704
4761
|
pinnedAt: !1,
|
|
4705
4762
|
offset: 0,
|
|
4706
4763
|
isBoundary: !1
|
|
4707
4764
|
};
|
|
4708
|
-
function
|
|
4765
|
+
function Wa(e, t) {
|
|
4709
4766
|
return e.querySelector(`[data-cell="true"][data-row-id="${CSS.escape(t.rowId)}"][data-column-id="${CSS.escape(t.columnId)}"]`);
|
|
4710
4767
|
}
|
|
4711
|
-
function
|
|
4768
|
+
function Ga({ container: e, cellElement: t, leftPinnedWidth: n, rightPinnedWidth: r }) {
|
|
4712
4769
|
let i = t.getBoundingClientRect(), a = e.getBoundingClientRect(), o = a.left + n, s = a.right - r;
|
|
4713
4770
|
i.left < o ? e.scrollLeft -= o - i.left : i.right > s && (e.scrollLeft += i.right - s);
|
|
4714
4771
|
}
|
|
4715
|
-
function
|
|
4772
|
+
function Ka(e) {
|
|
4716
4773
|
if (e.getIsPlaceholder()) return null;
|
|
4717
4774
|
if (!e.getIsAggregated()) return Fe(e.column.columnDef.cell, e.getContext());
|
|
4718
4775
|
let { aggregatedCell: t, aggregationFn: n } = e.column.columnDef;
|
|
4719
4776
|
return t === void 0 ? n === void 0 ? null : Fe(e.column.columnDef.cell, e.getContext()) : Fe(t, e.getContext());
|
|
4720
4777
|
}
|
|
4721
|
-
function
|
|
4722
|
-
let n =
|
|
4778
|
+
function qa(e, t) {
|
|
4779
|
+
let n = Ha(e, t);
|
|
4723
4780
|
if (n === null) return e;
|
|
4724
4781
|
let r = [], i = 0;
|
|
4725
|
-
for (let t of n) t.start > i && r.push(e.slice(i, t.start)), r.push(/* @__PURE__ */
|
|
4782
|
+
for (let t of n) t.start > i && r.push(e.slice(i, t.start)), r.push(/* @__PURE__ */ Y("mark", {
|
|
4726
4783
|
className: $.matchHighlight,
|
|
4727
4784
|
children: e.slice(t.start, t.end)
|
|
4728
4785
|
}, t.start)), i = t.end;
|
|
4729
4786
|
return i < e.length && r.push(e.slice(i)), r;
|
|
4730
4787
|
}
|
|
4731
|
-
function
|
|
4788
|
+
function Ja(t) {
|
|
4732
4789
|
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: _ } = Q(), v;
|
|
4733
4790
|
n[0] === r.column ? v = n[1] : (v = Lt(r.column), n[0] = r.column, n[1] = v);
|
|
4734
4791
|
let y = v, b = r.row.id, x;
|
|
@@ -4747,36 +4804,36 @@ function Ba(t) {
|
|
|
4747
4804
|
}, n[7] = b, n[8] = y, n[9] = T) : T = n[9];
|
|
4748
4805
|
let E = j(_.store, T), D;
|
|
4749
4806
|
n[10] !== b || n[11] !== S ? (D = (e) => S ? void 0 : e.rows[b]?.values, n[10] = b, n[11] = S, n[12] = D) : D = n[12];
|
|
4750
|
-
let O = j(_.store, D), k = o ? "gridcell" : "cell", A = o?.columnIndex, M = o?.tabIndex, N = o ? !0 : void 0, P = r.row.id, F = r.column.id, I = o?.focused, L = o?.selected, R = o?.selected, z = o?.edges?.top, B = o?.edges?.bottom, V = o?.edges?.left, H = o?.edges?.right, ee = s !== void 0 || void 0,
|
|
4751
|
-
n[13] === r.column ?
|
|
4752
|
-
let
|
|
4753
|
-
n[15] !==
|
|
4807
|
+
let O = j(_.store, D), k = o ? "gridcell" : "cell", A = o?.columnIndex, M = o?.tabIndex, N = o ? !0 : void 0, P = r.row.id, F = r.column.id, I = o?.focused, L = o?.selected, R = o?.selected, z = o?.edges?.top, B = o?.edges?.bottom, V = o?.edges?.left, H = o?.edges?.right, ee = s !== void 0 || void 0, te = w || void 0, ne = E || void 0, re;
|
|
4808
|
+
n[13] === r.column ? re = n[14] : (re = Dn(r.column), n[13] = r.column, n[14] = re);
|
|
4809
|
+
let ie = a.isBoundary && a.pinnedAt === "left" ? Ci.stickyLeft : "", ae = a.isBoundary && a.pinnedAt === "right" ? Ci.stickyRight : "", oe;
|
|
4810
|
+
n[15] !== ie || n[16] !== ae ? (oe = [
|
|
4754
4811
|
$.bodyCell,
|
|
4755
|
-
|
|
4756
|
-
|
|
4757
|
-
].filter(Boolean), n[15] =
|
|
4758
|
-
let
|
|
4759
|
-
n[18] !== i || n[19] !== se || n[20] !== W || n[21] !== G || n[22] !==
|
|
4812
|
+
ie,
|
|
4813
|
+
ae
|
|
4814
|
+
].filter(Boolean), n[15] = ie, n[16] = ae, n[17] = oe) : oe = n[17];
|
|
4815
|
+
let U = oe.join(" "), se = a.pinnedAt === "left" ? a.offset : void 0, W = a.pinnedAt === "right" ? a.offset : void 0, G = a.pinnedAt ? "sticky" : o?.focused ? "relative" : void 0, K = o?.focused ? "var(--dg-z-focused-cell, 3)" : a.pinnedAt ? "var(--dg-z-pinned-cell, 2)" : void 0, ce;
|
|
4816
|
+
n[18] !== i || n[19] !== se || n[20] !== W || n[21] !== G || n[22] !== K ? (ce = {
|
|
4760
4817
|
minHeight: i,
|
|
4761
4818
|
left: se,
|
|
4762
4819
|
right: W,
|
|
4763
4820
|
position: G,
|
|
4764
|
-
zIndex:
|
|
4765
|
-
}, n[18] = i, n[19] = se, n[20] = W, n[21] = G, n[22] =
|
|
4766
|
-
let
|
|
4767
|
-
n[24] !== r || n[25] !== c || n[26] !== O || n[27] !== s || n[28] !== l || n[29] !== g ? (
|
|
4821
|
+
zIndex: K
|
|
4822
|
+
}, n[18] = i, n[19] = se, n[20] = W, n[21] = G, n[22] = K, n[23] = ce) : ce = n[23];
|
|
4823
|
+
let q;
|
|
4824
|
+
n[24] !== r || n[25] !== c || n[26] !== O || n[27] !== s || n[28] !== l || n[29] !== g ? (q = s ?? /* @__PURE__ */ Y("span", {
|
|
4768
4825
|
className: $.cellContent,
|
|
4769
4826
|
children: (() => {
|
|
4770
|
-
let e = O !== void 0 && c === void 0 && !r.getIsPlaceholder() && !r.getIsAggregated() ?
|
|
4827
|
+
let e = O !== void 0 && c === void 0 && !r.getIsPlaceholder() && !r.getIsAggregated() ? Ca(r, O) : void 0;
|
|
4771
4828
|
if (l !== void 0 && c === void 0 && !r.getIsPlaceholder() && !r.getIsAggregated() && r.column.columnDef.cell === g.getDefaultColumnDef().cell) {
|
|
4772
4829
|
let t = e === void 0 ? r.renderValue() : e.renderValue();
|
|
4773
|
-
if (typeof t == "string" || typeof t == "number") return
|
|
4830
|
+
if (typeof t == "string" || typeof t == "number") return qa(String(t), l);
|
|
4774
4831
|
}
|
|
4775
|
-
return e === void 0 ? c ??
|
|
4832
|
+
return e === void 0 ? c ?? Ka(r) : Fe(r.column.columnDef.cell, e);
|
|
4776
4833
|
})()
|
|
4777
|
-
}), n[24] = r, n[25] = c, n[26] = O, n[27] = s, n[28] = l, n[29] = g, n[30] =
|
|
4778
|
-
let
|
|
4779
|
-
return n[31] !== r.column.id || n[32] !== r.row.id || n[33] !== S || n[34] !== d || n[35] !== h || n[36] !== m || n[37] !== u || n[38] !== f || n[39] !== p || n[40] !== I || n[41] !== L || n[42] !== R || n[43] !== z || n[44] !== B || n[45] !== V || n[46] !== H || n[47] !== ee || n[48] !==
|
|
4834
|
+
}), n[24] = r, n[25] = c, n[26] = O, n[27] = s, n[28] = l, n[29] = g, n[30] = q) : q = n[30];
|
|
4835
|
+
let J;
|
|
4836
|
+
return n[31] !== r.column.id || n[32] !== r.row.id || n[33] !== S || n[34] !== d || n[35] !== h || n[36] !== m || n[37] !== u || n[38] !== f || n[39] !== p || n[40] !== I || n[41] !== L || n[42] !== R || n[43] !== z || n[44] !== B || n[45] !== V || n[46] !== H || n[47] !== ee || n[48] !== te || n[49] !== ne || n[50] !== re || n[51] !== U || n[52] !== ce || n[53] !== q || n[54] !== k || n[55] !== A || n[56] !== M || n[57] !== N ? (J = /* @__PURE__ */ Y("div", {
|
|
4780
4837
|
role: k,
|
|
4781
4838
|
"aria-colindex": A,
|
|
4782
4839
|
tabIndex: M,
|
|
@@ -4796,21 +4853,21 @@ function Ba(t) {
|
|
|
4796
4853
|
onMouseEnter: p,
|
|
4797
4854
|
onDoubleClick: m,
|
|
4798
4855
|
"data-editing": ee,
|
|
4799
|
-
"data-dirty":
|
|
4800
|
-
"data-invalid":
|
|
4801
|
-
"data-align":
|
|
4856
|
+
"data-dirty": te,
|
|
4857
|
+
"data-invalid": ne,
|
|
4858
|
+
"data-align": re,
|
|
4802
4859
|
"data-control-column": S,
|
|
4803
4860
|
onContextMenu: h,
|
|
4804
|
-
className:
|
|
4805
|
-
style:
|
|
4806
|
-
children:
|
|
4807
|
-
}), n[31] = r.column.id, n[32] = r.row.id, n[33] = S, n[34] = d, n[35] = h, n[36] = m, n[37] = u, n[38] = f, n[39] = p, n[40] = I, n[41] = L, n[42] = R, n[43] = z, n[44] = B, n[45] = V, n[46] = H, n[47] = ee, n[48] =
|
|
4861
|
+
className: U,
|
|
4862
|
+
style: ce,
|
|
4863
|
+
children: q
|
|
4864
|
+
}), n[31] = r.column.id, n[32] = r.row.id, n[33] = S, n[34] = d, n[35] = h, n[36] = m, n[37] = u, n[38] = f, n[39] = p, n[40] = I, n[41] = L, n[42] = R, n[43] = z, n[44] = B, n[45] = V, n[46] = H, n[47] = ee, n[48] = te, n[49] = ne, n[50] = re, n[51] = U, n[52] = ce, n[53] = q, n[54] = k, n[55] = A, n[56] = M, n[57] = N, n[58] = J) : J = n[58], J;
|
|
4808
4865
|
}
|
|
4809
|
-
function
|
|
4866
|
+
function Ya(t) {
|
|
4810
4867
|
let n = e(16), { enabled: r, menuContent: i, menuProps: a, onContextMenu: o, onClose: s, children: c } = t, l;
|
|
4811
4868
|
n[0] === Symbol.for("react.memo_cache_sentinel") ? (l = { display: "contents" }, n[0] = l) : l = n[0];
|
|
4812
4869
|
let u = r ? o : void 0, d;
|
|
4813
|
-
n[1] !== c || n[2] !== u ? (d = /* @__PURE__ */
|
|
4870
|
+
n[1] !== c || n[2] !== u ? (d = /* @__PURE__ */ Y("div", {
|
|
4814
4871
|
role: "rowgroup",
|
|
4815
4872
|
style: l,
|
|
4816
4873
|
onContextMenu: u,
|
|
@@ -4823,11 +4880,11 @@ function Va(t) {
|
|
|
4823
4880
|
e || s();
|
|
4824
4881
|
}, n[4] = s, n[5] = m);
|
|
4825
4882
|
let h;
|
|
4826
|
-
n[6] === f ? h = n[7] : (h = /* @__PURE__ */
|
|
4883
|
+
n[6] === f ? h = n[7] : (h = /* @__PURE__ */ Y(g.ContextMenu, { children: f }), n[6] = f, n[7] = h);
|
|
4827
4884
|
let _;
|
|
4828
|
-
n[8] === i ? _ = n[9] : (_ = /* @__PURE__ */
|
|
4885
|
+
n[8] === i ? _ = n[9] : (_ = /* @__PURE__ */ Y(g.Dropdown, { children: i }), n[8] = i, n[9] = _);
|
|
4829
4886
|
let v;
|
|
4830
|
-
return n[10] !== a || n[11] !== p || n[12] !== m || n[13] !== h || n[14] !== _ ? (v = /* @__PURE__ */
|
|
4887
|
+
return n[10] !== a || n[11] !== p || n[12] !== m || n[13] !== h || n[14] !== _ ? (v = /* @__PURE__ */ X(g, {
|
|
4831
4888
|
opened: p,
|
|
4832
4889
|
onChange: m,
|
|
4833
4890
|
position: "bottom-start",
|
|
@@ -4837,37 +4894,37 @@ function Va(t) {
|
|
|
4837
4894
|
children: [h, _]
|
|
4838
4895
|
}), n[10] = a, n[11] = p, n[12] = m, n[13] = h, n[14] = _, n[15] = v) : v = n[15], v;
|
|
4839
4896
|
}
|
|
4840
|
-
function
|
|
4897
|
+
function Xa({ onRowClick: e, onCellClick: t, onCellDoubleClick: r, onCellContextMenu: o, rowClassName: l, rowStyle: u, striped: d = !1, onScrollToTop: p, onScrollToBottom: m, onScrollToLeft: _, onScrollToRight: v, renderEmptyState: y, renderRowContextMenu: b, renderColumnMenuItems: x, rowContextMenuProps: S, cellExport: C, onReachEnd: w, reachEndThreshold: T = 10, "aria-label": D, "aria-labelledby": O }) {
|
|
4841
4898
|
let { table: k, ui: A, edit: M, features: N, labels: P, rowHeight: F, controlSize: I, renderDetails: L, renderDetailsEstHeight: R, overscan: z, scrollerRef: B } = Q();
|
|
4842
|
-
|
|
4843
|
-
let V = j(A, (e) => e.highlightedRowId), H = j(A, (e) => e.focusedCell), ee = j(A, (e) => e.cellRange),
|
|
4899
|
+
fi(k.store);
|
|
4900
|
+
let V = j(A, (e) => e.highlightedRowId), H = j(A, (e) => e.focusedCell), ee = j(A, (e) => e.cellRange), te = j(M.store, (e) => e.active), ne = j(M.store, (e) => e.openRowIds), re = j(M.store, (e) => e.newRows.length), ie = j(M.store, (e) => e.deletedRowIds), ae = j(M.store, (e) => e.openRowIds.filter((t) => (e.rows[t]?.dirtyFields.length ?? 0) > 0)), oe = j(M.store, (e) => e.committedRowIds), { loading: U, noResultsLabel: se = P.noResults } = k.options.meta ?? {}, W = s(null), G = dn(k, N), K = N.matchHighlighting ? Va(k) : null, q = N.rowPinning ? za(k, "top") : [], J = N.rowPinning ? za(k, "bottom") : [], ue = q.length + J.length, de = null;
|
|
4844
4901
|
if (N.rowNumbers) {
|
|
4845
|
-
|
|
4902
|
+
de = /* @__PURE__ */ new Map();
|
|
4846
4903
|
let e = fn(k, N) ? k.store.state.pagination.pageIndex * k.store.state.pagination.pageSize : 0;
|
|
4847
|
-
for (let t of G) t.getIsGrouped() ||
|
|
4904
|
+
for (let t of G) t.getIsGrouped() || de.set(t.id, ++e);
|
|
4848
4905
|
}
|
|
4849
|
-
let
|
|
4906
|
+
let fe = (e) => L !== void 0 && !e.getIsGrouped() && e.getIsExpanded(), pe = s(null);
|
|
4850
4907
|
i(() => {
|
|
4851
4908
|
let e = W.current;
|
|
4852
4909
|
if (e === null) return;
|
|
4853
|
-
|
|
4854
|
-
let t =
|
|
4910
|
+
pe.current ??= new Set(k.getAllLeafColumns().filter((e) => e.columnDef.meta?.autoSize === !0).map((e) => e.id));
|
|
4911
|
+
let t = pe.current;
|
|
4855
4912
|
if (t.size !== 0) for (let n of [...t]) {
|
|
4856
4913
|
if (n in k.store.state.columnSizing) {
|
|
4857
4914
|
t.delete(n);
|
|
4858
4915
|
continue;
|
|
4859
4916
|
}
|
|
4860
|
-
|
|
4917
|
+
ki(e, n) && (ji({
|
|
4861
4918
|
table: k,
|
|
4862
4919
|
columnId: n,
|
|
4863
4920
|
container: e
|
|
4864
4921
|
}), t.delete(n));
|
|
4865
4922
|
}
|
|
4866
4923
|
});
|
|
4867
|
-
let
|
|
4924
|
+
let me = s(null);
|
|
4868
4925
|
i(() => {
|
|
4869
|
-
if (
|
|
4870
|
-
let e =
|
|
4926
|
+
if (re === 0 && q.length === 0) return;
|
|
4927
|
+
let e = me.current;
|
|
4871
4928
|
if (e === null) return;
|
|
4872
4929
|
let t = e.querySelectorAll("[data-dg-header-row]"), n = () => {
|
|
4873
4930
|
let n = 0;
|
|
@@ -4878,9 +4935,9 @@ function Ha({ onRowClick: e, onCellClick: t, onCellDoubleClick: r, onCellContext
|
|
|
4878
4935
|
let r = new ResizeObserver(n);
|
|
4879
4936
|
for (let e of t) r.observe(e);
|
|
4880
4937
|
return () => r.disconnect();
|
|
4881
|
-
}, [
|
|
4882
|
-
if (
|
|
4883
|
-
let e =
|
|
4938
|
+
}, [re, q.length]), i(() => {
|
|
4939
|
+
if (re === 0 || q.length === 0) return;
|
|
4940
|
+
let e = me.current;
|
|
4884
4941
|
if (e === null) return;
|
|
4885
4942
|
let t = e.querySelector("[data-dg-entry-block]");
|
|
4886
4943
|
if (t === null) return;
|
|
@@ -4890,9 +4947,9 @@ function Ha({ onRowClick: e, onCellClick: t, onCellDoubleClick: r, onCellContext
|
|
|
4890
4947
|
return r.observe(t), () => {
|
|
4891
4948
|
r.disconnect(), e.style.removeProperty("--dg-entry-height");
|
|
4892
4949
|
};
|
|
4893
|
-
}, [
|
|
4894
|
-
if (
|
|
4895
|
-
let e =
|
|
4950
|
+
}, [re, q.length]), i(() => {
|
|
4951
|
+
if (J.length === 0) return;
|
|
4952
|
+
let e = me.current;
|
|
4896
4953
|
if (e === null) return;
|
|
4897
4954
|
let t = e.querySelector("[data-dg-part=\"summary-row\"]");
|
|
4898
4955
|
if (t === null) return;
|
|
@@ -4902,17 +4959,17 @@ function Ha({ onRowClick: e, onCellClick: t, onCellDoubleClick: r, onCellContext
|
|
|
4902
4959
|
return r.observe(t), () => {
|
|
4903
4960
|
r.disconnect(), e.style.removeProperty("--dg-summary-height");
|
|
4904
4961
|
};
|
|
4905
|
-
}, [
|
|
4962
|
+
}, [J.length]), i(() => {
|
|
4906
4963
|
if (!N.pagination) return;
|
|
4907
4964
|
let e = k.getPageCount();
|
|
4908
4965
|
e > 0 && k.store.state.pagination.pageIndex >= e && k.setPageIndex(e - 1);
|
|
4909
4966
|
});
|
|
4910
|
-
let
|
|
4967
|
+
let he = Je({
|
|
4911
4968
|
count: G.length,
|
|
4912
4969
|
getScrollElement: () => W.current,
|
|
4913
4970
|
estimateSize: (e) => {
|
|
4914
4971
|
let t = G[e];
|
|
4915
|
-
return t === void 0 ? F : F + (
|
|
4972
|
+
return t === void 0 ? F : F + (fe(t) ? R : 0);
|
|
4916
4973
|
},
|
|
4917
4974
|
measureElement: (e, t, n) => e.getBoundingClientRect().height || n.options.estimateSize(n.indexFromElement(e)),
|
|
4918
4975
|
getItemKey: n((e) => G[e]?.id ?? e, [G]),
|
|
@@ -4921,61 +4978,90 @@ function Ha({ onRowClick: e, onCellClick: t, onCellDoubleClick: r, onCellContext
|
|
|
4921
4978
|
height: 600,
|
|
4922
4979
|
width: 1200
|
|
4923
4980
|
}
|
|
4924
|
-
}),
|
|
4981
|
+
}), ge = s(F);
|
|
4925
4982
|
i(() => {
|
|
4926
|
-
|
|
4927
|
-
}, [F,
|
|
4928
|
-
let
|
|
4983
|
+
ge.current !== F && (ge.current = F, he.measure());
|
|
4984
|
+
}, [F, he]);
|
|
4985
|
+
let _e = he.getVirtualItems(), ve = _e[0]?.start ?? 0, ye = he.getTotalSize() - (_e.at(-1)?.end ?? 0);
|
|
4929
4986
|
i(() => (B.current = ({ rowId: e, align: t = "auto" }) => {
|
|
4930
|
-
if (
|
|
4987
|
+
if (q.some((t) => t.id === e) || J.some((t) => t.id === e)) return !0;
|
|
4931
4988
|
let n = G.findIndex((t) => t.id === e);
|
|
4932
|
-
return n < 0 ? !1 : (
|
|
4989
|
+
return n < 0 ? !1 : (he.scrollToIndex(n, { align: t }), !0);
|
|
4933
4990
|
}, () => {
|
|
4934
4991
|
B.current = () => !1;
|
|
4935
4992
|
}));
|
|
4936
|
-
let
|
|
4993
|
+
let be = s(null), xe = s(!1), Se = _e.at(-1)?.index ?? -1;
|
|
4937
4994
|
i(() => {
|
|
4938
|
-
w === void 0 || G.length === 0 || (N.pagination && !
|
|
4995
|
+
w === void 0 || G.length === 0 || (N.pagination && !xe.current && (xe.current = !0, console.warn("TMDataGrid: onReachEnd and pagination slice the same scroll - the pager caps the rows, so the end it reaches is the page's. Use one or the other.")), !(Se < G.length - 1 - T) && be.current !== G.length && (be.current = G.length, w()));
|
|
4939
4996
|
});
|
|
4940
|
-
let
|
|
4941
|
-
...
|
|
4942
|
-
...
|
|
4943
|
-
...
|
|
4944
|
-
],
|
|
4997
|
+
let Ce = k.getLeftVisibleLeafColumns(), we = k.getRightVisibleLeafColumns(), Te = k.getCenterVisibleLeafColumns(), Z = [
|
|
4998
|
+
...Ce,
|
|
4999
|
+
...Te,
|
|
5000
|
+
...we
|
|
5001
|
+
], Ee = k.getCenterHeaderGroups(), De = k.getLeftHeaderGroups(), Oe = k.getRightHeaderGroups(), ke = Ee.map((e, t) => ({
|
|
4945
5002
|
id: e.id,
|
|
4946
5003
|
headers: [
|
|
4947
5004
|
...De[t]?.headers ?? [],
|
|
4948
5005
|
...e.headers,
|
|
4949
5006
|
...Oe[t]?.headers ?? []
|
|
4950
5007
|
]
|
|
4951
|
-
})), Ae = k.store.state.columnSizing, je =
|
|
5008
|
+
})), Ae = k.store.state.columnSizing, je = Z.map((e) => {
|
|
4952
5009
|
let t = e.columnDef.minSize === e.columnDef.maxSize, n = e.id in Ae, r = e.getIsPinned() !== !1, i = e.columnDef.minSize ?? 80;
|
|
4953
5010
|
return t || n || r ? {
|
|
5011
|
+
id: e.id,
|
|
4954
5012
|
track: `${e.getSize()}px`,
|
|
4955
5013
|
minWidth: e.getSize()
|
|
4956
5014
|
} : {
|
|
5015
|
+
id: e.id,
|
|
4957
5016
|
track: `minmax(${i}px, ${e.columnDef.meta?.flex ?? 1}fr)`,
|
|
4958
5017
|
minWidth: i
|
|
4959
5018
|
};
|
|
4960
|
-
}), Me = je.map((e) => e.track).join(" "), Ne = je.reduce((e, t) => e + t.minWidth, 0), Pe = /* @__PURE__ */ new Map(), Ie = (e) => je[
|
|
4961
|
-
for (let e of
|
|
5019
|
+
}), Me = je.map((e) => e.track).join(" "), Ne = je.reduce((e, t) => e + t.minWidth, 0), Pe = /* @__PURE__ */ new Map(), Ie = (e) => je[Z.findIndex((t) => t.id === e)]?.minWidth ?? 0, Le = 0;
|
|
5020
|
+
for (let e of Ce) Pe.set(e.id, {
|
|
4962
5021
|
pinnedAt: "left",
|
|
4963
5022
|
offset: Le,
|
|
4964
|
-
isBoundary: e.id ===
|
|
5023
|
+
isBoundary: e.id === Ce.at(-1)?.id
|
|
4965
5024
|
}), Le += Ie(e.id);
|
|
4966
5025
|
let Re = 0;
|
|
4967
|
-
for (let e of [...
|
|
5026
|
+
for (let e of [...we].reverse()) Pe.set(e.id, {
|
|
4968
5027
|
pinnedAt: "right",
|
|
4969
5028
|
offset: Re,
|
|
4970
|
-
isBoundary: e.id ===
|
|
5029
|
+
isBoundary: e.id === we[0]?.id
|
|
4971
5030
|
}), Re += Ie(e.id);
|
|
4972
|
-
for (let e of
|
|
5031
|
+
for (let e of Te) Pe.set(e.id, {
|
|
4973
5032
|
pinnedAt: !1,
|
|
4974
5033
|
offset: 0,
|
|
4975
5034
|
isBoundary: !1
|
|
4976
5035
|
});
|
|
4977
|
-
let ze = (e) => Pe.get(e) ??
|
|
4978
|
-
|
|
5036
|
+
let ze = (e) => Pe.get(e) ?? Ua, Be = s({
|
|
5037
|
+
tracks: je,
|
|
5038
|
+
leftLane: [],
|
|
5039
|
+
rightLane: []
|
|
5040
|
+
});
|
|
5041
|
+
i(() => {
|
|
5042
|
+
Be.current = {
|
|
5043
|
+
tracks: je,
|
|
5044
|
+
leftLane: Ce.map((e) => e.id),
|
|
5045
|
+
rightLane: [...we].reverse().map((e) => e.id)
|
|
5046
|
+
};
|
|
5047
|
+
}), i(() => {
|
|
5048
|
+
let e = me.current;
|
|
5049
|
+
if (!e) return;
|
|
5050
|
+
let t = "", n = k.store.subscribe((n) => {
|
|
5051
|
+
let r = Sa({
|
|
5052
|
+
progress: n.columnResizing,
|
|
5053
|
+
boundsOf: (e) => k.getColumn(e)?.columnDef ?? {},
|
|
5054
|
+
...Be.current
|
|
5055
|
+
});
|
|
5056
|
+
if (!(!r || r.gridTemplateColumns === t)) {
|
|
5057
|
+
t = r.gridTemplateColumns, e.style.gridTemplateColumns = r.gridTemplateColumns, e.style.minWidth = `${r.minWidth}px`;
|
|
5058
|
+
for (let { columnId: t, side: n, offset: i } of r.offsets) for (let r of e.querySelectorAll(`[data-column-id="${CSS.escape(t)}"]`)) r.style[n] = `${i}px`;
|
|
5059
|
+
}
|
|
5060
|
+
});
|
|
5061
|
+
return () => n.unsubscribe();
|
|
5062
|
+
}, [k]);
|
|
5063
|
+
let Ve = G.length === 0 && ue === 0, He = k.store.state.globalFilter, Ue = k.store.state.columnFilters.length > 0 || (typeof He == "string" ? He.trim() !== "" : He != null), We = ke.at(-1)?.headers ?? [], Ge = Z.some((e) => e.columnDef.footer !== void 0), Ke = N.rowClickSelects, qe = Ke || N.highlightRow || e !== void 0, Ye = (e) => !e.getIsGrouped() && qe, Xe = (t, n) => {
|
|
5064
|
+
if (Ke && t.getCanSelect()) {
|
|
4979
5065
|
let e = mn({
|
|
4980
5066
|
rows: G,
|
|
4981
5067
|
rowId: t.id,
|
|
@@ -4987,115 +5073,115 @@ function Ha({ onRowClick: e, onCellClick: t, onCellDoubleClick: r, onCellContext
|
|
|
4987
5073
|
k.setRowSelection(e.selection), A.actions.setSelectionAnchor(e.anchorRowId);
|
|
4988
5074
|
}
|
|
4989
5075
|
N.highlightRow && A.actions.setHighlightedRow(t.id), e?.(t);
|
|
4990
|
-
},
|
|
5076
|
+
}, Ze = (e) => typeof l == "function" ? l(e) : l, Qe = (e) => typeof u == "function" ? u(e) : u, $e = (e, t, n) => ({
|
|
4991
5077
|
cell: e,
|
|
4992
5078
|
row: t,
|
|
4993
5079
|
column: e.column,
|
|
4994
5080
|
event: n
|
|
4995
|
-
}),
|
|
4996
|
-
rowId:
|
|
4997
|
-
columnId:
|
|
4998
|
-
} : null : null,
|
|
4999
|
-
range:
|
|
5081
|
+
}), et = N.cellSelection, tt = N.cellRangeSelection, nt = s(!1), rt = s(null), it = et && H !== null ? G.findIndex((e) => e.id === H.rowId) : -1, at = et && H !== null ? Z.findIndex((e) => e.id === H.columnId) : -1, ot = it >= 0 && _e.some((e) => e.index === it), st = G[_e[0]?.index ?? -1], ct = et ? ot && H !== null ? H : st && Z[0] ? {
|
|
5082
|
+
rowId: st.id,
|
|
5083
|
+
columnId: Z[0].id
|
|
5084
|
+
} : null : null, lt = (e, t, n) => e !== null && e.rowId === t && e.columnId === n, ut = wa({
|
|
5085
|
+
range: tt ? ee : null,
|
|
5000
5086
|
rowIndexOf: (e) => G.findIndex((t) => t.id === e),
|
|
5001
|
-
columnIndexOf: (e) =>
|
|
5002
|
-
}),
|
|
5003
|
-
if (!
|
|
5087
|
+
columnIndexOf: (e) => Z.findIndex((t) => t.id === e)
|
|
5088
|
+
}), dt = (e, { extend: t }) => {
|
|
5089
|
+
if (!tt) return;
|
|
5004
5090
|
let n = t ? ee?.anchor ?? e : e;
|
|
5005
5091
|
A.actions.setCellRange({
|
|
5006
5092
|
anchor: n,
|
|
5007
5093
|
focus: e
|
|
5008
5094
|
});
|
|
5009
|
-
},
|
|
5010
|
-
top:
|
|
5011
|
-
bottom:
|
|
5012
|
-
left:
|
|
5013
|
-
right:
|
|
5014
|
-
} : null),
|
|
5015
|
-
...
|
|
5095
|
+
}, ft = ut ?? (et && it >= 0 && at >= 0 ? {
|
|
5096
|
+
top: it,
|
|
5097
|
+
bottom: it,
|
|
5098
|
+
left: at,
|
|
5099
|
+
right: at
|
|
5100
|
+
} : null), pt = Ea(ft), mt = ft === null ? 0 : Z.slice(ft.left, ft.right + 1).filter((e) => !On(e.id)).length, ht = {
|
|
5101
|
+
...ka,
|
|
5016
5102
|
...C
|
|
5017
|
-
}, [
|
|
5103
|
+
}, [gt, _t] = c(ht.includeHeaders), vt = (e) => ft === null ? [] : ja({
|
|
5018
5104
|
rows: G,
|
|
5019
|
-
columns:
|
|
5020
|
-
bounds:
|
|
5105
|
+
columns: Z,
|
|
5106
|
+
bounds: ft,
|
|
5021
5107
|
includeHeaders: e,
|
|
5022
|
-
decimalComma:
|
|
5023
|
-
}),
|
|
5024
|
-
let e =
|
|
5025
|
-
e.length !== 0 && await
|
|
5026
|
-
}, [
|
|
5108
|
+
decimalComma: ht.decimalComma
|
|
5109
|
+
}), yt = async () => {
|
|
5110
|
+
let e = vt(!1);
|
|
5111
|
+
e.length !== 0 && await La(Fa(e));
|
|
5112
|
+
}, [bt, xt] = c(!1);
|
|
5027
5113
|
i(() => {
|
|
5028
|
-
if (!
|
|
5029
|
-
let e = () =>
|
|
5114
|
+
if (!bt) return;
|
|
5115
|
+
let e = () => xt(!1);
|
|
5030
5116
|
return window.addEventListener("mouseup", e), () => window.removeEventListener("mouseup", e);
|
|
5031
|
-
}, [
|
|
5032
|
-
let
|
|
5033
|
-
A.actions.setFocusedCell(e),
|
|
5034
|
-
},
|
|
5035
|
-
let t =
|
|
5036
|
-
t.length !== 0 &&
|
|
5037
|
-
fileName: `${
|
|
5038
|
-
text:
|
|
5117
|
+
}, [bt]);
|
|
5118
|
+
let St = (e, { extend: t }) => {
|
|
5119
|
+
A.actions.setFocusedCell(e), dt(e, { extend: t }), t || xt(!0);
|
|
5120
|
+
}, Ct = (e) => {
|
|
5121
|
+
let t = vt(e);
|
|
5122
|
+
t.length !== 0 && Ra({
|
|
5123
|
+
fileName: `${ht.fileName}.csv`,
|
|
5124
|
+
text: Ia(t, { separator: ht.separator })
|
|
5039
5125
|
});
|
|
5040
|
-
},
|
|
5041
|
-
let n = G[e.rowIndex], r =
|
|
5126
|
+
}, wt = (e, { extend: t } = { extend: !1 }) => {
|
|
5127
|
+
let n = G[e.rowIndex], r = Z[e.columnIndex];
|
|
5042
5128
|
if (!n || !r) return;
|
|
5043
5129
|
let i = {
|
|
5044
5130
|
rowId: n.id,
|
|
5045
5131
|
columnId: r.id
|
|
5046
5132
|
};
|
|
5047
|
-
|
|
5048
|
-
},
|
|
5049
|
-
let e =
|
|
5050
|
-
return
|
|
5051
|
-
},
|
|
5133
|
+
nt.current = !0, A.actions.setFocusedCell(i), dt(i, { extend: t });
|
|
5134
|
+
}, Tt = s(void 0), Et = () => {
|
|
5135
|
+
let e = Tt.current;
|
|
5136
|
+
return Tt.current = void 0, e;
|
|
5137
|
+
}, Dt = (e) => {
|
|
5052
5138
|
let t = G.find((t) => t.id === e);
|
|
5053
5139
|
return t === void 0 ? null : [
|
|
5054
5140
|
...t.getLeftVisibleCells(),
|
|
5055
5141
|
...t.getCenterVisibleCells(),
|
|
5056
5142
|
...t.getRightVisibleCells()
|
|
5057
5143
|
].find((e) => M.canEditCell(t, e.column))?.column.id ?? null;
|
|
5058
|
-
},
|
|
5144
|
+
}, Ot = s(null);
|
|
5059
5145
|
a(() => {
|
|
5060
|
-
if (
|
|
5061
|
-
|
|
5146
|
+
if (te === null) {
|
|
5147
|
+
Ot.current = null;
|
|
5062
5148
|
return;
|
|
5063
5149
|
}
|
|
5064
|
-
if (
|
|
5150
|
+
if (Ot.current === te) return;
|
|
5065
5151
|
let e = W.current;
|
|
5066
5152
|
if (e === null) return;
|
|
5067
|
-
let t =
|
|
5153
|
+
let t = te.columnId ?? Dt(te.rowId);
|
|
5068
5154
|
if (t === null) {
|
|
5069
|
-
|
|
5155
|
+
Ot.current = te;
|
|
5070
5156
|
return;
|
|
5071
5157
|
}
|
|
5072
|
-
let n = e.querySelector(`[data-dg-part="editor"][data-row-id="${CSS.escape(
|
|
5073
|
-
n !== null && (
|
|
5158
|
+
let n = e.querySelector(`[data-dg-part="editor"][data-row-id="${CSS.escape(te.rowId)}"][data-column-id="${CSS.escape(t)}"]`);
|
|
5159
|
+
n !== null && (Ot.current = te, la(n));
|
|
5074
5160
|
});
|
|
5075
|
-
let
|
|
5161
|
+
let kt = (e) => {
|
|
5076
5162
|
let t = W.current;
|
|
5077
|
-
t !== null && (
|
|
5078
|
-
},
|
|
5079
|
-
|
|
5163
|
+
t !== null && (nt.current = !0, Wa(t, e)?.focus());
|
|
5164
|
+
}, At = (e) => {
|
|
5165
|
+
et && A.actions.setFocusedCell(e), M.begin({
|
|
5080
5166
|
rowId: e.rowId,
|
|
5081
5167
|
columnId: e.columnId
|
|
5082
5168
|
});
|
|
5083
|
-
},
|
|
5169
|
+
}, jt = (e, t) => {
|
|
5084
5170
|
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;
|
|
5085
5171
|
if (n === null || N.editMode === "row") {
|
|
5086
|
-
|
|
5172
|
+
kt(e);
|
|
5087
5173
|
return;
|
|
5088
5174
|
}
|
|
5089
|
-
let r = G.findIndex((t) => t.id === e.rowId), i =
|
|
5175
|
+
let r = G.findIndex((t) => t.id === e.rowId), i = Z.findIndex((t) => t.id === e.columnId);
|
|
5090
5176
|
if (r < 0 || i < 0) {
|
|
5091
|
-
|
|
5177
|
+
kt(e);
|
|
5092
5178
|
return;
|
|
5093
5179
|
}
|
|
5094
5180
|
if (n === "down") {
|
|
5095
|
-
r + 1 < G.length ?
|
|
5181
|
+
r + 1 < G.length ? wt({
|
|
5096
5182
|
rowIndex: r + 1,
|
|
5097
5183
|
columnIndex: i
|
|
5098
|
-
}) :
|
|
5184
|
+
}) : kt(e);
|
|
5099
5185
|
return;
|
|
5100
5186
|
}
|
|
5101
5187
|
let a = Ur({
|
|
@@ -5105,14 +5191,14 @@ function Ha({ onRowClick: e, onCellClick: t, onCellDoubleClick: r, onCellContext
|
|
|
5105
5191
|
},
|
|
5106
5192
|
direction: n,
|
|
5107
5193
|
rowCount: G.length,
|
|
5108
|
-
columnCount:
|
|
5194
|
+
columnCount: Z.length,
|
|
5109
5195
|
isEditable: (e) => {
|
|
5110
|
-
let t = G[e.rowIndex], n =
|
|
5196
|
+
let t = G[e.rowIndex], n = Z[e.columnIndex];
|
|
5111
5197
|
return t !== void 0 && n !== void 0 && M.canEditCell(t, n);
|
|
5112
5198
|
}
|
|
5113
5199
|
});
|
|
5114
|
-
a === null ?
|
|
5115
|
-
},
|
|
5200
|
+
a === null ? kt(e) : wt(a);
|
|
5201
|
+
}, Mt = (e, { extend: t }) => {
|
|
5116
5202
|
if (N.rowSelection && pn(e).length > 0) {
|
|
5117
5203
|
let n = mn({
|
|
5118
5204
|
rows: G,
|
|
@@ -5129,7 +5215,7 @@ function Ha({ onRowClick: e, onCellClick: t, onCellDoubleClick: r, onCellContext
|
|
|
5129
5215
|
return;
|
|
5130
5216
|
}
|
|
5131
5217
|
N.highlightRow && !e.getIsGrouped() && A.actions.setHighlightedRow(e.id);
|
|
5132
|
-
},
|
|
5218
|
+
}, Nt = (e) => {
|
|
5133
5219
|
let t = e.target;
|
|
5134
5220
|
if (t.dataset.cell !== "true") {
|
|
5135
5221
|
if (e.key !== "Escape") return;
|
|
@@ -5140,17 +5226,17 @@ function Ha({ onRowClick: e, onCellClick: t, onCellDoubleClick: r, onCellContext
|
|
|
5140
5226
|
}
|
|
5141
5227
|
let { rowId: n, columnId: r } = t.dataset;
|
|
5142
5228
|
if (n === void 0 || r === void 0) return;
|
|
5143
|
-
let i = G.findIndex((e) => e.id === n), a =
|
|
5229
|
+
let i = G.findIndex((e) => e.id === n), a = Z.findIndex((e) => e.id === r);
|
|
5144
5230
|
if (i < 0 || a < 0) return;
|
|
5145
5231
|
if ((e.ctrlKey || e.metaKey) && (e.key === "c" || e.key === "C")) {
|
|
5146
|
-
if (
|
|
5147
|
-
e.preventDefault(),
|
|
5232
|
+
if (ft === null) return;
|
|
5233
|
+
e.preventDefault(), yt();
|
|
5148
5234
|
return;
|
|
5149
5235
|
}
|
|
5150
|
-
let o = G[i], s =
|
|
5236
|
+
let o = G[i], s = Z[a];
|
|
5151
5237
|
if (N.editing && o !== void 0 && s !== void 0 && M.canEditCell(o, s)) {
|
|
5152
5238
|
if (e.key === "Enter" || e.key === "F2") {
|
|
5153
|
-
e.preventDefault(),
|
|
5239
|
+
e.preventDefault(), At({
|
|
5154
5240
|
rowId: n,
|
|
5155
5241
|
columnId: r
|
|
5156
5242
|
});
|
|
@@ -5158,14 +5244,14 @@ function Ha({ onRowClick: e, onCellClick: t, onCellDoubleClick: r, onCellContext
|
|
|
5158
5244
|
}
|
|
5159
5245
|
if (N.editMode !== "row") {
|
|
5160
5246
|
if (e.key === "Delete" || e.key === "Backspace") {
|
|
5161
|
-
e.preventDefault(), M.clearCell(n, r).then(() =>
|
|
5247
|
+
e.preventDefault(), M.clearCell(n, r).then(() => kt({
|
|
5162
5248
|
rowId: n,
|
|
5163
5249
|
columnId: r
|
|
5164
5250
|
}));
|
|
5165
5251
|
return;
|
|
5166
5252
|
}
|
|
5167
5253
|
if (e.key.length === 1 && e.key !== " " && !e.ctrlKey && !e.metaKey && !e.altKey) {
|
|
5168
|
-
e.preventDefault(),
|
|
5254
|
+
e.preventDefault(), Tt.current = e.key, At({
|
|
5169
5255
|
rowId: n,
|
|
5170
5256
|
columnId: r
|
|
5171
5257
|
});
|
|
@@ -5174,14 +5260,14 @@ function Ha({ onRowClick: e, onCellClick: t, onCellDoubleClick: r, onCellContext
|
|
|
5174
5260
|
}
|
|
5175
5261
|
}
|
|
5176
5262
|
if (e.key === "Enter" || e.key === "F2") {
|
|
5177
|
-
let n = t.querySelector(
|
|
5263
|
+
let n = t.querySelector(ca);
|
|
5178
5264
|
if (n === null) return;
|
|
5179
5265
|
e.preventDefault(), n.focus();
|
|
5180
5266
|
return;
|
|
5181
5267
|
}
|
|
5182
5268
|
if (e.key === "Escape") {
|
|
5183
5269
|
if (ee === null) return;
|
|
5184
|
-
e.preventDefault(),
|
|
5270
|
+
e.preventDefault(), dt({
|
|
5185
5271
|
rowId: n,
|
|
5186
5272
|
columnId: r
|
|
5187
5273
|
}, { extend: !1 });
|
|
@@ -5190,7 +5276,7 @@ function Ha({ onRowClick: e, onCellClick: t, onCellDoubleClick: r, onCellContext
|
|
|
5190
5276
|
if (e.key === " ") {
|
|
5191
5277
|
e.preventDefault();
|
|
5192
5278
|
let t = G[i];
|
|
5193
|
-
t &&
|
|
5279
|
+
t && Mt(t, { extend: e.shiftKey });
|
|
5194
5280
|
return;
|
|
5195
5281
|
}
|
|
5196
5282
|
let c = Hr({
|
|
@@ -5201,250 +5287,250 @@ function Ha({ onRowClick: e, onCellClick: t, onCellDoubleClick: r, onCellContext
|
|
|
5201
5287
|
columnIndex: a
|
|
5202
5288
|
},
|
|
5203
5289
|
rowCount: G.length,
|
|
5204
|
-
columnCount:
|
|
5290
|
+
columnCount: Z.length,
|
|
5205
5291
|
pageRows: Math.max(1, Math.floor((W.current?.clientHeight ?? 0) / F) - 1)
|
|
5206
5292
|
});
|
|
5207
|
-
c !== null && (e.preventDefault(), !(c.rowIndex === i && c.columnIndex === a) &&
|
|
5293
|
+
c !== null && (e.preventDefault(), !(c.rowIndex === i && c.columnIndex === a) && wt(c, { extend: e.shiftKey && tt }));
|
|
5208
5294
|
};
|
|
5209
5295
|
i(() => {
|
|
5210
|
-
if (
|
|
5296
|
+
if (!et) return;
|
|
5211
5297
|
let e = W.current;
|
|
5212
5298
|
if (e === null) return;
|
|
5213
|
-
if (H !==
|
|
5214
|
-
|
|
5299
|
+
if (H !== rt.current && (rt.current = H, it >= 0 && he.scrollToIndex(it, { align: "auto" })), H === null) {
|
|
5300
|
+
nt.current = !1;
|
|
5215
5301
|
return;
|
|
5216
5302
|
}
|
|
5217
|
-
if (!
|
|
5218
|
-
let t =
|
|
5219
|
-
t !== null && (
|
|
5303
|
+
if (!nt.current && !e.contains(document.activeElement)) return;
|
|
5304
|
+
let t = Wa(e, H);
|
|
5305
|
+
t !== null && (nt.current = !1, !t.contains(document.activeElement) && (document.activeElement instanceof Element && document.activeElement.closest("[data-dg-part=\"editor\"]") !== null || (t.focus({ preventScroll: !0 }), ze(H.columnId).pinnedAt === !1 && Ga({
|
|
5220
5306
|
container: e,
|
|
5221
5307
|
cellElement: t,
|
|
5222
5308
|
leftPinnedWidth: Le,
|
|
5223
5309
|
rightPinnedWidth: Re
|
|
5224
5310
|
}))));
|
|
5225
5311
|
});
|
|
5226
|
-
let [
|
|
5227
|
-
let e =
|
|
5228
|
-
if (
|
|
5229
|
-
let n = G.findIndex((t) => t.id === e), r =
|
|
5230
|
-
n >= 0 && !
|
|
5312
|
+
let [Pt, Ft] = c(null), It = () => Ft(null), Lt = s(null), Rt = s(null), zt = () => {
|
|
5313
|
+
let e = Lt.current, t = Rt.current;
|
|
5314
|
+
if (Lt.current = null, Rt.current = null, et && e !== null && t !== null) {
|
|
5315
|
+
let n = G.findIndex((t) => t.id === e), r = Z.findIndex((e) => e.id === t);
|
|
5316
|
+
n >= 0 && !Ta(ft, n, r) && (A.actions.setFocusedCell({
|
|
5231
5317
|
rowId: e,
|
|
5232
5318
|
columnId: t
|
|
5233
|
-
}),
|
|
5319
|
+
}), dt({
|
|
5234
5320
|
rowId: e,
|
|
5235
5321
|
columnId: t
|
|
5236
5322
|
}, { extend: !1 }));
|
|
5237
5323
|
}
|
|
5238
|
-
|
|
5324
|
+
Ft(e === null ? null : {
|
|
5239
5325
|
rowId: e,
|
|
5240
5326
|
columnId: t
|
|
5241
5327
|
});
|
|
5242
|
-
},
|
|
5243
|
-
/* @__PURE__ */
|
|
5244
|
-
/* @__PURE__ */
|
|
5245
|
-
disabled:
|
|
5246
|
-
onClick: () => void
|
|
5328
|
+
}, Bt = Pt === null ? void 0 : G.find((e) => e.id === Pt.rowId) ?? q.find((e) => e.id === Pt.rowId) ?? J.find((e) => e.id === Pt.rowId), Vt = b !== void 0 && Pt !== null && Bt !== void 0 && !Bt.getIsGrouped(), Ht = tt && Pt !== null && ft !== null ? /* @__PURE__ */ X(le, { children: [
|
|
5329
|
+
/* @__PURE__ */ Y(g.Label, { children: P.cellCount(pt) }),
|
|
5330
|
+
/* @__PURE__ */ Y(g.Item, {
|
|
5331
|
+
disabled: mt === 0,
|
|
5332
|
+
onClick: () => void yt(),
|
|
5247
5333
|
children: P.copy
|
|
5248
5334
|
}),
|
|
5249
|
-
/* @__PURE__ */
|
|
5250
|
-
disabled:
|
|
5251
|
-
onClick: () =>
|
|
5335
|
+
/* @__PURE__ */ Y(g.Item, {
|
|
5336
|
+
disabled: mt === 0,
|
|
5337
|
+
onClick: () => Ct(gt),
|
|
5252
5338
|
children: P.exportCsv
|
|
5253
5339
|
}),
|
|
5254
|
-
/* @__PURE__ */
|
|
5340
|
+
/* @__PURE__ */ Y(g.Item, {
|
|
5255
5341
|
closeMenuOnClick: !1,
|
|
5256
|
-
onClick: () =>
|
|
5257
|
-
children: /* @__PURE__ */
|
|
5342
|
+
onClick: () => _t((e) => !e),
|
|
5343
|
+
children: /* @__PURE__ */ Y(f, {
|
|
5258
5344
|
size: "xs",
|
|
5259
|
-
checked:
|
|
5345
|
+
checked: gt,
|
|
5260
5346
|
label: P.includeHeaders,
|
|
5261
5347
|
readOnly: !0,
|
|
5262
5348
|
styles: { input: { cursor: "pointer" } }
|
|
5263
5349
|
})
|
|
5264
5350
|
})
|
|
5265
|
-
] }) : null,
|
|
5351
|
+
] }) : null, Ut = !1, Wt = Vt ? b({
|
|
5266
5352
|
table: k,
|
|
5267
|
-
row:
|
|
5268
|
-
cell:
|
|
5269
|
-
close:
|
|
5353
|
+
row: Bt,
|
|
5354
|
+
cell: Bt?.getAllCells().find((e) => e.column.id === Pt?.columnId) ?? null,
|
|
5355
|
+
close: It,
|
|
5270
5356
|
get internalItems() {
|
|
5271
|
-
return
|
|
5357
|
+
return Ut = !0, Ht;
|
|
5272
5358
|
}
|
|
5273
|
-
}) ?? null : null,
|
|
5274
|
-
|
|
5275
|
-
|
|
5276
|
-
|
|
5277
|
-
] }),
|
|
5359
|
+
}) ?? null : null, Gt = Ut ? Wt : Ht === null && Wt === null ? null : /* @__PURE__ */ X(le, { children: [
|
|
5360
|
+
Ht,
|
|
5361
|
+
Ht !== null && Wt !== null && /* @__PURE__ */ Y(g.Divider, {}),
|
|
5362
|
+
Wt
|
|
5363
|
+
] }), Kt = s({
|
|
5278
5364
|
top: !0,
|
|
5279
5365
|
bottom: !1,
|
|
5280
5366
|
left: !0,
|
|
5281
5367
|
right: !1
|
|
5282
|
-
}),
|
|
5283
|
-
if (
|
|
5368
|
+
}), qt = p !== void 0 || m !== void 0 || _ !== void 0 || v !== void 0, Jt = Pt || qt ? (e) => {
|
|
5369
|
+
if (Pt && It(), !qt) return;
|
|
5284
5370
|
let t = e.currentTarget, n = {
|
|
5285
5371
|
top: t.scrollTop <= 1,
|
|
5286
5372
|
bottom: t.scrollTop + t.clientHeight >= t.scrollHeight - 1,
|
|
5287
5373
|
left: t.scrollLeft <= 1,
|
|
5288
5374
|
right: t.scrollLeft + t.clientWidth >= t.scrollWidth - 1
|
|
5289
|
-
}, r =
|
|
5290
|
-
|
|
5375
|
+
}, r = Kt.current;
|
|
5376
|
+
Kt.current = n, n.top && !r.top && p?.(), n.bottom && !r.bottom && m?.(), n.left && !r.left && _?.(), n.right && !r.right && v?.();
|
|
5291
5377
|
} : void 0;
|
|
5292
|
-
return /* @__PURE__ */
|
|
5378
|
+
return /* @__PURE__ */ X("div", {
|
|
5293
5379
|
className: $.tableWrapper,
|
|
5294
|
-
children: [/* @__PURE__ */
|
|
5380
|
+
children: [/* @__PURE__ */ Y("div", {
|
|
5295
5381
|
ref: W,
|
|
5296
5382
|
className: $.scrollContainer,
|
|
5297
5383
|
"data-dg-scroll-container": !0,
|
|
5298
|
-
onScroll:
|
|
5299
|
-
children: /* @__PURE__ */
|
|
5300
|
-
ref:
|
|
5301
|
-
role:
|
|
5384
|
+
onScroll: Jt,
|
|
5385
|
+
children: /* @__PURE__ */ X("div", {
|
|
5386
|
+
ref: me,
|
|
5387
|
+
role: et ? "grid" : "table",
|
|
5302
5388
|
"aria-label": D,
|
|
5303
5389
|
"aria-labelledby": O,
|
|
5304
|
-
"aria-busy":
|
|
5305
|
-
"aria-multiselectable":
|
|
5306
|
-
onKeyDown:
|
|
5307
|
-
"data-range-dragging":
|
|
5390
|
+
"aria-busy": U === !0 || void 0,
|
|
5391
|
+
"aria-multiselectable": et && N.rowSelection && N.multiRowSelection ? !0 : void 0,
|
|
5392
|
+
onKeyDown: et ? Nt : void 0,
|
|
5393
|
+
"data-range-dragging": bt || void 0,
|
|
5308
5394
|
className: $.grid,
|
|
5309
|
-
"aria-rowcount": G.length +
|
|
5310
|
-
"aria-colcount":
|
|
5311
|
-
"data-dg-row-count": G.length +
|
|
5395
|
+
"aria-rowcount": G.length + ue + ke.length + +!!Ge,
|
|
5396
|
+
"aria-colcount": Z.length,
|
|
5397
|
+
"data-dg-row-count": G.length + ue,
|
|
5312
5398
|
style: {
|
|
5313
5399
|
gridTemplateColumns: Me,
|
|
5314
5400
|
minWidth: Ne
|
|
5315
5401
|
},
|
|
5316
5402
|
children: [
|
|
5317
|
-
/* @__PURE__ */
|
|
5403
|
+
/* @__PURE__ */ Y("div", {
|
|
5318
5404
|
role: "rowgroup",
|
|
5319
5405
|
style: { display: "contents" },
|
|
5320
|
-
children: ke.map((e, t) => /* @__PURE__ */
|
|
5406
|
+
children: ke.map((e, t) => /* @__PURE__ */ Y("div", {
|
|
5321
5407
|
role: "row",
|
|
5322
5408
|
"aria-rowindex": t + 1,
|
|
5323
5409
|
"data-dg-header-row": !0,
|
|
5324
5410
|
"data-dg-header-last": t === ke.length - 1 || void 0,
|
|
5325
5411
|
className: $.headerRow,
|
|
5326
|
-
children: e.headers.map((e) => /* @__PURE__ */
|
|
5412
|
+
children: e.headers.map((e) => /* @__PURE__ */ Y(zi, {
|
|
5327
5413
|
renderColumnMenuItems: x,
|
|
5328
5414
|
header: e,
|
|
5329
5415
|
layout: ze(e.column.id)
|
|
5330
5416
|
}, e.id))
|
|
5331
5417
|
}, e.id))
|
|
5332
5418
|
}),
|
|
5333
|
-
N.editing &&
|
|
5334
|
-
orderedColumns:
|
|
5419
|
+
N.editing && re > 0 && /* @__PURE__ */ Y(da, {
|
|
5420
|
+
orderedColumns: Z,
|
|
5335
5421
|
layoutFor: ze,
|
|
5336
5422
|
rowHeight: F
|
|
5337
5423
|
}),
|
|
5338
|
-
/* @__PURE__ */
|
|
5339
|
-
enabled: b !== void 0 ||
|
|
5340
|
-
menuContent:
|
|
5424
|
+
/* @__PURE__ */ Y(Ya, {
|
|
5425
|
+
enabled: b !== void 0 || tt,
|
|
5426
|
+
menuContent: Gt,
|
|
5341
5427
|
menuProps: S,
|
|
5342
|
-
onContextMenu:
|
|
5343
|
-
onClose:
|
|
5428
|
+
onContextMenu: zt,
|
|
5429
|
+
onClose: It,
|
|
5344
5430
|
children: (() => {
|
|
5345
5431
|
let e = (e, n, i, a) => {
|
|
5346
|
-
let s = e.getIsGrouped(), c =
|
|
5432
|
+
let s = e.getIsGrouped(), c = Ye(e), l = [
|
|
5347
5433
|
...e.getLeftVisibleCells(),
|
|
5348
5434
|
...e.getCenterVisibleCells(),
|
|
5349
5435
|
...e.getRightVisibleCells()
|
|
5350
|
-
], u = N.editMode === "row" &&
|
|
5351
|
-
return /* @__PURE__ */
|
|
5436
|
+
], u = N.editMode === "row" && ne.includes(e.id) && !oe.includes(e.id), f = !s && !et && (Ke || N.highlightRow);
|
|
5437
|
+
return /* @__PURE__ */ X("div", {
|
|
5352
5438
|
role: "row",
|
|
5353
5439
|
"aria-rowindex": i,
|
|
5354
5440
|
"data-dg-part": "row",
|
|
5355
5441
|
"data-row-id": e.id,
|
|
5356
5442
|
"data-index": L && n >= 0 ? n : void 0,
|
|
5357
|
-
ref: L && n >= 0 ?
|
|
5443
|
+
ref: L && n >= 0 ? he.measureElement : void 0,
|
|
5358
5444
|
"data-grouped": s,
|
|
5359
5445
|
"data-depth": e.depth,
|
|
5360
5446
|
"data-pinned": a,
|
|
5361
5447
|
"data-selected": N.rowSelection && e.getIsSelected(),
|
|
5362
5448
|
"data-selected-bg": N.rowSelection && N.showSelectedBackground && e.getIsSelected(),
|
|
5363
5449
|
"data-highlighted": N.highlightRow && e.id === V,
|
|
5364
|
-
"data-deleted":
|
|
5365
|
-
"data-dirty":
|
|
5366
|
-
"data-draft":
|
|
5367
|
-
"data-context-menu":
|
|
5368
|
-
"data-selects-on-click":
|
|
5450
|
+
"data-deleted": ie.length > 0 && ie.includes(e.id),
|
|
5451
|
+
"data-dirty": ae.length > 0 && ae.includes(e.id),
|
|
5452
|
+
"data-draft": oe.length > 0 && oe.includes(e.id),
|
|
5453
|
+
"data-context-menu": Gt !== null && Pt?.rowId === e.id,
|
|
5454
|
+
"data-selects-on-click": Ke && !s,
|
|
5369
5455
|
"aria-selected": N.rowSelection ? e.getIsSelected() : void 0,
|
|
5370
5456
|
"aria-current": N.highlightRow && e.id === V ? !0 : void 0,
|
|
5371
5457
|
"data-striped": d && n >= 0 ? n % 2 == 1 : void 0,
|
|
5372
|
-
className: [$.bodyRow,
|
|
5458
|
+
className: [$.bodyRow, Ze(e)].filter(Boolean).join(" "),
|
|
5373
5459
|
style: {
|
|
5374
5460
|
minHeight: F,
|
|
5375
5461
|
cursor: c ? "pointer" : void 0,
|
|
5376
|
-
...
|
|
5462
|
+
...Qe(e)
|
|
5377
5463
|
},
|
|
5378
5464
|
tabIndex: f ? 0 : void 0,
|
|
5379
|
-
onMouseDown:
|
|
5465
|
+
onMouseDown: Ke && !s ? (e) => {
|
|
5380
5466
|
e.shiftKey && e.preventDefault();
|
|
5381
5467
|
} : void 0,
|
|
5382
|
-
onClick: c ? (t) =>
|
|
5468
|
+
onClick: c ? (t) => Xe(e, {
|
|
5383
5469
|
toggle: t.ctrlKey || t.metaKey,
|
|
5384
5470
|
extend: t.shiftKey
|
|
5385
5471
|
}) : void 0,
|
|
5386
5472
|
onKeyDown: f ? (t) => {
|
|
5387
|
-
t.key !== " " && t.key !== "Enter" || t.target === t.currentTarget && (t.preventDefault(),
|
|
5473
|
+
t.key !== " " && t.key !== "Enter" || t.target === t.currentTarget && (t.preventDefault(), Xe(e, {
|
|
5388
5474
|
toggle: !0,
|
|
5389
5475
|
extend: t.shiftKey
|
|
5390
5476
|
}));
|
|
5391
5477
|
} : void 0,
|
|
5392
|
-
onContextMenu: b && !s ||
|
|
5393
|
-
|
|
5478
|
+
onContextMenu: b && !s || tt ? () => {
|
|
5479
|
+
Lt.current = e.id;
|
|
5394
5480
|
} : void 0,
|
|
5395
5481
|
children: [l.map((i, a) => {
|
|
5396
|
-
let c =
|
|
5397
|
-
return /* @__PURE__ */
|
|
5482
|
+
let c = te !== null && te.rowId === e.id && te.columnId === i.column.id || u && M.canEditCell(e, i.column);
|
|
5483
|
+
return /* @__PURE__ */ Y(Ja, {
|
|
5398
5484
|
cell: i,
|
|
5399
5485
|
rowHeight: F,
|
|
5400
5486
|
layout: ze(i.column.id),
|
|
5401
|
-
contentOverride:
|
|
5402
|
-
highlightNeedles:
|
|
5403
|
-
editor: c ? /* @__PURE__ */
|
|
5487
|
+
contentOverride: de !== null && i.column.id === "__rowNumber__" ? de.get(e.id) : void 0,
|
|
5488
|
+
highlightNeedles: K?.get(i.column.id),
|
|
5489
|
+
editor: c ? /* @__PURE__ */ Y(sa, {
|
|
5404
5490
|
cell: i,
|
|
5405
5491
|
row: e,
|
|
5406
|
-
takeSeedText:
|
|
5407
|
-
onClose: (t) =>
|
|
5492
|
+
takeSeedText: Et,
|
|
5493
|
+
onClose: (t) => jt({
|
|
5408
5494
|
rowId: e.id,
|
|
5409
5495
|
columnId: i.column.id
|
|
5410
5496
|
}, t)
|
|
5411
5497
|
}) : void 0,
|
|
5412
|
-
onClick: t && !s ? (n) => t(
|
|
5498
|
+
onClick: t && !s ? (n) => t($e(i, e, n)) : void 0,
|
|
5413
5499
|
onDoubleClick: (N.editing || r) && !s ? (t) => {
|
|
5414
|
-
r?.(
|
|
5500
|
+
r?.($e(i, e, t)), N.editing && M.canEditCell(e, i.column) && At({
|
|
5415
5501
|
rowId: e.id,
|
|
5416
5502
|
columnId: i.column.id
|
|
5417
5503
|
});
|
|
5418
5504
|
} : void 0,
|
|
5419
|
-
nav:
|
|
5505
|
+
nav: et ? {
|
|
5420
5506
|
rowId: e.id,
|
|
5421
5507
|
columnIndex: a + 1,
|
|
5422
|
-
focused:
|
|
5423
|
-
tabIndex: ct
|
|
5424
|
-
selected:
|
|
5425
|
-
edges:
|
|
5508
|
+
focused: lt(H, e.id, i.column.id),
|
|
5509
|
+
tabIndex: lt(ct, e.id, i.column.id) ? 0 : -1,
|
|
5510
|
+
selected: tt ? Ta(ut, n, a) : lt(H, e.id, i.column.id),
|
|
5511
|
+
edges: Da(ut, n, a)
|
|
5426
5512
|
} : void 0,
|
|
5427
|
-
onFocus:
|
|
5513
|
+
onFocus: et ? () => A.actions.setFocusedCell({
|
|
5428
5514
|
rowId: e.id,
|
|
5429
5515
|
columnId: i.column.id
|
|
5430
5516
|
}) : void 0,
|
|
5431
|
-
onMouseDown:
|
|
5432
|
-
t.button === 0 && (t.shiftKey && t.preventDefault(),
|
|
5517
|
+
onMouseDown: tt ? (t) => {
|
|
5518
|
+
t.button === 0 && (t.shiftKey && t.preventDefault(), nt.current = !0, St({
|
|
5433
5519
|
rowId: e.id,
|
|
5434
5520
|
columnId: i.column.id
|
|
5435
5521
|
}, { extend: t.shiftKey }));
|
|
5436
5522
|
} : void 0,
|
|
5437
|
-
onMouseEnter:
|
|
5523
|
+
onMouseEnter: tt && bt ? () => dt({
|
|
5438
5524
|
rowId: e.id,
|
|
5439
5525
|
columnId: i.column.id
|
|
5440
5526
|
}, { extend: !0 }) : void 0,
|
|
5441
|
-
onContextMenu: b ||
|
|
5442
|
-
|
|
5527
|
+
onContextMenu: b || tt || o ? (t) => {
|
|
5528
|
+
Rt.current = i.column.id, !s && o?.($e(i, e, t));
|
|
5443
5529
|
} : void 0
|
|
5444
5530
|
}, i.id);
|
|
5445
|
-
}),
|
|
5531
|
+
}), fe(e) && /* @__PURE__ */ Y("div", {
|
|
5446
5532
|
role: "cell",
|
|
5447
|
-
"aria-colspan":
|
|
5533
|
+
"aria-colspan": Z.length,
|
|
5448
5534
|
"data-dg-part": "details",
|
|
5449
5535
|
"data-row-id": e.id,
|
|
5450
5536
|
className: $.detailsCell,
|
|
@@ -5457,86 +5543,86 @@ function Ha({ onRowClick: e, onCellClick: t, onCellDoubleClick: r, onCellContext
|
|
|
5457
5543
|
})]
|
|
5458
5544
|
}, e.id);
|
|
5459
5545
|
};
|
|
5460
|
-
return /* @__PURE__ */
|
|
5461
|
-
|
|
5546
|
+
return /* @__PURE__ */ X(le, { children: [
|
|
5547
|
+
q.length > 0 && /* @__PURE__ */ Y("div", {
|
|
5462
5548
|
role: "presentation",
|
|
5463
5549
|
"data-dg-part": "pinned-top",
|
|
5464
5550
|
className: $.pinnedTopBlock,
|
|
5465
|
-
children:
|
|
5551
|
+
children: q.map((t, n) => e(t, -1, ke.length + n + 1, "top"))
|
|
5466
5552
|
}),
|
|
5467
|
-
|
|
5553
|
+
ve > 0 && /* @__PURE__ */ Y("div", {
|
|
5468
5554
|
"aria-hidden": !0,
|
|
5469
5555
|
style: {
|
|
5470
5556
|
gridColumn: "1/-1",
|
|
5471
|
-
height:
|
|
5557
|
+
height: ve
|
|
5472
5558
|
}
|
|
5473
5559
|
}),
|
|
5474
|
-
|
|
5560
|
+
_e.map((t) => {
|
|
5475
5561
|
let n = G[t.index];
|
|
5476
|
-
return n ? e(n, t.index, t.index + ke.length +
|
|
5562
|
+
return n ? e(n, t.index, t.index + ke.length + q.length + 1) : null;
|
|
5477
5563
|
}),
|
|
5478
|
-
|
|
5564
|
+
ye > 0 && /* @__PURE__ */ Y("div", {
|
|
5479
5565
|
"aria-hidden": !0,
|
|
5480
5566
|
style: {
|
|
5481
5567
|
gridColumn: "1/-1",
|
|
5482
|
-
height:
|
|
5568
|
+
height: ye
|
|
5483
5569
|
}
|
|
5484
5570
|
}),
|
|
5485
|
-
|
|
5571
|
+
J.length > 0 && /* @__PURE__ */ Y("div", {
|
|
5486
5572
|
role: "presentation",
|
|
5487
5573
|
"data-dg-part": "pinned-bottom",
|
|
5488
5574
|
className: $.pinnedBottomBlock,
|
|
5489
|
-
children:
|
|
5575
|
+
children: J.map((t, n) => e(t, -1, ke.length + q.length + G.length + n + 1, "bottom"))
|
|
5490
5576
|
})
|
|
5491
5577
|
] });
|
|
5492
5578
|
})()
|
|
5493
5579
|
}),
|
|
5494
|
-
|
|
5580
|
+
Ve && U === !0 && /* @__PURE__ */ Y("div", {
|
|
5495
5581
|
role: "row",
|
|
5496
5582
|
className: $.messageRow,
|
|
5497
|
-
children: /* @__PURE__ */
|
|
5583
|
+
children: /* @__PURE__ */ Y(h, {
|
|
5498
5584
|
size: "lg",
|
|
5499
5585
|
"aria-label": P.loading
|
|
5500
5586
|
})
|
|
5501
5587
|
}),
|
|
5502
|
-
|
|
5588
|
+
Ve && U !== !0 && re === 0 && /* @__PURE__ */ Y("div", {
|
|
5503
5589
|
role: "row",
|
|
5504
5590
|
className: $.messageRow,
|
|
5505
|
-
children: y === void 0 ?
|
|
5591
|
+
children: y === void 0 ? Ue ? /* @__PURE__ */ X(le, { children: [/* @__PURE__ */ Y(ce, {
|
|
5506
5592
|
size: 40,
|
|
5507
5593
|
stroke: 1.4,
|
|
5508
5594
|
opacity: .4
|
|
5509
|
-
}), /* @__PURE__ */
|
|
5595
|
+
}), /* @__PURE__ */ Y(E, {
|
|
5510
5596
|
span: !0,
|
|
5511
5597
|
size: I,
|
|
5512
5598
|
c: "dimmed",
|
|
5513
5599
|
children: se
|
|
5514
|
-
})] }) : /* @__PURE__ */
|
|
5600
|
+
})] }) : /* @__PURE__ */ Y(E, {
|
|
5515
5601
|
span: !0,
|
|
5516
5602
|
size: I,
|
|
5517
5603
|
c: "dimmed",
|
|
5518
5604
|
children: P.noRows
|
|
5519
5605
|
}) : y({
|
|
5520
|
-
hasActiveFilters:
|
|
5606
|
+
hasActiveFilters: Ue,
|
|
5521
5607
|
table: k
|
|
5522
5608
|
})
|
|
5523
5609
|
}),
|
|
5524
|
-
|
|
5610
|
+
Ge && /* @__PURE__ */ Y("div", {
|
|
5525
5611
|
role: "row",
|
|
5526
|
-
"aria-rowindex": G.length +
|
|
5612
|
+
"aria-rowindex": G.length + ue + ke.length + 1,
|
|
5527
5613
|
"data-dg-part": "summary-row",
|
|
5528
5614
|
className: $.summaryRow,
|
|
5529
|
-
children:
|
|
5615
|
+
children: We.map((e) => {
|
|
5530
5616
|
let t = ze(e.column.id);
|
|
5531
|
-
return /* @__PURE__ */
|
|
5617
|
+
return /* @__PURE__ */ Y("div", {
|
|
5532
5618
|
role: "cell",
|
|
5533
5619
|
"data-column-id": e.column.id,
|
|
5534
5620
|
"data-align": Dn(e.column),
|
|
5535
5621
|
"data-control-column": On(e.column.id),
|
|
5536
5622
|
className: [
|
|
5537
5623
|
$.summaryCell,
|
|
5538
|
-
t.isBoundary && t.pinnedAt === "left" ?
|
|
5539
|
-
t.isBoundary && t.pinnedAt === "right" ?
|
|
5624
|
+
t.isBoundary && t.pinnedAt === "left" ? Ci.stickyLeft : "",
|
|
5625
|
+
t.isBoundary && t.pinnedAt === "right" ? Ci.stickyRight : ""
|
|
5540
5626
|
].filter(Boolean).join(" "),
|
|
5541
5627
|
style: {
|
|
5542
5628
|
minHeight: F,
|
|
@@ -5545,7 +5631,7 @@ function Ha({ onRowClick: e, onCellClick: t, onCellDoubleClick: r, onCellContext
|
|
|
5545
5631
|
position: t.pinnedAt ? "sticky" : void 0,
|
|
5546
5632
|
zIndex: t.pinnedAt ? "var(--dg-z-summary-pinned-cell, 5)" : void 0
|
|
5547
5633
|
},
|
|
5548
|
-
children: /* @__PURE__ */
|
|
5634
|
+
children: /* @__PURE__ */ Y("span", {
|
|
5549
5635
|
className: $.cellContent,
|
|
5550
5636
|
children: e.isPlaceholder ? null : Fe(e.column.columnDef.footer, e.getContext())
|
|
5551
5637
|
})
|
|
@@ -5554,65 +5640,65 @@ function Ha({ onRowClick: e, onCellClick: t, onCellDoubleClick: r, onCellContext
|
|
|
5554
5640
|
})
|
|
5555
5641
|
]
|
|
5556
5642
|
})
|
|
5557
|
-
}), /* @__PURE__ */
|
|
5643
|
+
}), /* @__PURE__ */ Y(tr, {})]
|
|
5558
5644
|
});
|
|
5559
5645
|
}
|
|
5560
|
-
var
|
|
5646
|
+
var Za = {
|
|
5561
5647
|
toolbar: "_toolbar_1459c_1",
|
|
5562
5648
|
toolbarSpacer: "_toolbarSpacer_1459c_10",
|
|
5563
5649
|
summaryCount: "_summaryCount_1459c_14"
|
|
5564
5650
|
};
|
|
5565
5651
|
//#endregion
|
|
5566
5652
|
//#region src/tmdatagrid/components/TMDataGridToolbar.tsx
|
|
5567
|
-
function
|
|
5653
|
+
function Qa(t) {
|
|
5568
5654
|
let n = e(2), { children: r } = t, i;
|
|
5569
|
-
return n[0] === r ? i = n[1] : (i = /* @__PURE__ */
|
|
5655
|
+
return n[0] === r ? i = n[1] : (i = /* @__PURE__ */ Y("div", {
|
|
5570
5656
|
"data-dg-part": "toolbar",
|
|
5571
|
-
className:
|
|
5657
|
+
className: Za.toolbar,
|
|
5572
5658
|
children: r
|
|
5573
5659
|
}), n[0] = r, n[1] = i), i;
|
|
5574
5660
|
}
|
|
5575
|
-
function
|
|
5661
|
+
function $a() {
|
|
5576
5662
|
let t = e(1), n;
|
|
5577
|
-
return t[0] === Symbol.for("react.memo_cache_sentinel") ? (n = /* @__PURE__ */
|
|
5663
|
+
return t[0] === Symbol.for("react.memo_cache_sentinel") ? (n = /* @__PURE__ */ Y("div", { className: Za.toolbarSpacer }), t[0] = n) : n = t[0], n;
|
|
5578
5664
|
}
|
|
5579
|
-
function
|
|
5665
|
+
function eo() {
|
|
5580
5666
|
let t = e(2), { table: n, labels: r } = Q();
|
|
5581
5667
|
if (n.options.meta?.loading !== !0) return null;
|
|
5582
5668
|
let i;
|
|
5583
|
-
return t[0] === r.loading ? i = t[1] : (i = /* @__PURE__ */
|
|
5669
|
+
return t[0] === r.loading ? i = t[1] : (i = /* @__PURE__ */ Y(h, {
|
|
5584
5670
|
size: "xs",
|
|
5585
5671
|
"data-dg-part": "loading",
|
|
5586
5672
|
"aria-label": r.loading
|
|
5587
5673
|
}), t[0] = r.loading, t[1] = i), i;
|
|
5588
5674
|
}
|
|
5589
|
-
function
|
|
5675
|
+
function to(t) {
|
|
5590
5676
|
let n = e(7), { children: r } = t, { table: i, controlSize: a } = Q();
|
|
5591
|
-
|
|
5677
|
+
fi(i.store);
|
|
5592
5678
|
let o;
|
|
5593
5679
|
n[0] === i ? o = n[1] : (o = i.getRowCount(), n[0] = i, n[1] = o);
|
|
5594
5680
|
let s = o, c;
|
|
5595
5681
|
n[2] === i ? c = n[3] : (c = i.options.meta?.totalRowCount ?? i.getPreFilteredRowModel().rows.length, n[2] = i, n[3] = c);
|
|
5596
5682
|
let l = r === void 0 ? `${s} / ${c}` : r, u;
|
|
5597
|
-
return n[4] !== a || n[5] !== l ? (u = /* @__PURE__ */
|
|
5683
|
+
return n[4] !== a || n[5] !== l ? (u = /* @__PURE__ */ Y(E, {
|
|
5598
5684
|
span: !0,
|
|
5599
5685
|
size: a,
|
|
5600
5686
|
c: "dimmed",
|
|
5601
|
-
className:
|
|
5687
|
+
className: Za.summaryCount,
|
|
5602
5688
|
"data-dg-part": "summary-count",
|
|
5603
5689
|
children: l
|
|
5604
5690
|
}), n[4] = a, n[5] = l, n[6] = u) : u = n[6], u;
|
|
5605
5691
|
}
|
|
5606
|
-
function
|
|
5607
|
-
let t = e(13), { table: n, ui: r, features: i, labels: a, controlSize: o } = Q(), s = j(r,
|
|
5692
|
+
function no() {
|
|
5693
|
+
let t = e(13), { table: n, ui: r, features: i, labels: a, controlSize: o } = Q(), s = j(r, ro);
|
|
5608
5694
|
if (!Br(n, i).canHideAny) return null;
|
|
5609
5695
|
let c;
|
|
5610
|
-
t[0] === Symbol.for("react.memo_cache_sentinel") ? (c = /* @__PURE__ */
|
|
5696
|
+
t[0] === Symbol.for("react.memo_cache_sentinel") ? (c = /* @__PURE__ */ Y(se, {
|
|
5611
5697
|
size: 18,
|
|
5612
5698
|
stroke: 1.6
|
|
5613
5699
|
}), t[0] = c) : c = t[0];
|
|
5614
5700
|
let u;
|
|
5615
|
-
t[1] !== o || t[2] !== a.manageColumns || t[3] !== r.actions.toggleColumnsPanel ? (u = /* @__PURE__ */
|
|
5701
|
+
t[1] !== o || t[2] !== a.manageColumns || t[3] !== r.actions.toggleColumnsPanel ? (u = /* @__PURE__ */ Y(l, {
|
|
5616
5702
|
variant: "subtle",
|
|
5617
5703
|
color: "gray",
|
|
5618
5704
|
size: o,
|
|
@@ -5622,18 +5708,18 @@ function Ja() {
|
|
|
5622
5708
|
children: c
|
|
5623
5709
|
}), t[1] = o, t[2] = a.manageColumns, t[3] = r.actions.toggleColumnsPanel, t[4] = u) : u = t[4];
|
|
5624
5710
|
let d;
|
|
5625
|
-
t[5] !== a.manageColumns || t[6] !== u ? (d = /* @__PURE__ */
|
|
5711
|
+
t[5] !== a.manageColumns || t[6] !== u ? (d = /* @__PURE__ */ Y(b.Target, { children: /* @__PURE__ */ Y(O, {
|
|
5626
5712
|
label: a.manageColumns,
|
|
5627
5713
|
openDelay: 400,
|
|
5628
5714
|
children: u
|
|
5629
5715
|
}) }), t[5] = a.manageColumns, t[6] = u, t[7] = d) : d = t[7];
|
|
5630
5716
|
let f;
|
|
5631
|
-
t[8] === Symbol.for("react.memo_cache_sentinel") ? (f = /* @__PURE__ */
|
|
5717
|
+
t[8] === Symbol.for("react.memo_cache_sentinel") ? (f = /* @__PURE__ */ Y(b.Dropdown, {
|
|
5632
5718
|
p: 0,
|
|
5633
|
-
children: /* @__PURE__ */
|
|
5719
|
+
children: /* @__PURE__ */ Y(jn, {})
|
|
5634
5720
|
}), t[8] = f) : f = t[8];
|
|
5635
5721
|
let p;
|
|
5636
|
-
return t[9] !== s || t[10] !== d || t[11] !== r.actions.setColumnsPanelOpen ? (p = /* @__PURE__ */
|
|
5722
|
+
return t[9] !== s || t[10] !== d || t[11] !== r.actions.setColumnsPanelOpen ? (p = /* @__PURE__ */ X(b, {
|
|
5637
5723
|
opened: s,
|
|
5638
5724
|
onChange: r.actions.setColumnsPanelOpen,
|
|
5639
5725
|
position: "bottom-end",
|
|
@@ -5644,11 +5730,11 @@ function Ja() {
|
|
|
5644
5730
|
children: [d, f]
|
|
5645
5731
|
}), t[9] = s, t[10] = d, t[11] = r.actions.setColumnsPanelOpen, t[12] = p) : p = t[12], p;
|
|
5646
5732
|
}
|
|
5647
|
-
function
|
|
5733
|
+
function ro(e) {
|
|
5648
5734
|
return e.columnsPanelOpen;
|
|
5649
5735
|
}
|
|
5650
|
-
function
|
|
5651
|
-
let t = e(15), n = Q(), { table: r, ui: i, features: a, labels: o, controlSize: s } = n, c = j(i,
|
|
5736
|
+
function io() {
|
|
5737
|
+
let t = e(15), n = Q(), { table: r, ui: i, features: a, labels: o, controlSize: s } = n, c = j(i, co), u = j(r.store, so).filter(oo).length;
|
|
5652
5738
|
if (!Br(r, a).canFilterAny) return null;
|
|
5653
5739
|
let d = c || u > 0 ? "light" : "subtle", f = u > 0 ? void 0 : "gray", p;
|
|
5654
5740
|
t[0] !== n || t[1] !== c || t[2] !== r || t[3] !== i ? (p = () => {
|
|
@@ -5656,16 +5742,16 @@ function Xa() {
|
|
|
5656
5742
|
i.actions.closeFilterPanel();
|
|
5657
5743
|
return;
|
|
5658
5744
|
}
|
|
5659
|
-
let e = r.getAllLeafColumns().find(
|
|
5745
|
+
let e = r.getAllLeafColumns().find(ao);
|
|
5660
5746
|
e ? oi(n, e.id) : i.actions.openFilterPanel();
|
|
5661
5747
|
}, t[0] = n, t[1] = c, t[2] = r, t[3] = i, t[4] = p) : p = t[4];
|
|
5662
5748
|
let m;
|
|
5663
|
-
t[5] === Symbol.for("react.memo_cache_sentinel") ? (m = /* @__PURE__ */
|
|
5749
|
+
t[5] === Symbol.for("react.memo_cache_sentinel") ? (m = /* @__PURE__ */ Y(re, {
|
|
5664
5750
|
size: 16,
|
|
5665
5751
|
stroke: 1.6
|
|
5666
5752
|
}), t[5] = m) : m = t[5];
|
|
5667
5753
|
let h;
|
|
5668
|
-
t[6] !== s || t[7] !== o.filters || t[8] !== d || t[9] !== f || t[10] !== p ? (h = /* @__PURE__ */
|
|
5754
|
+
t[6] !== s || t[7] !== o.filters || t[8] !== d || t[9] !== f || t[10] !== p ? (h = /* @__PURE__ */ Y(l, {
|
|
5669
5755
|
variant: d,
|
|
5670
5756
|
color: f,
|
|
5671
5757
|
size: s,
|
|
@@ -5675,33 +5761,33 @@ function Xa() {
|
|
|
5675
5761
|
children: m
|
|
5676
5762
|
}), t[6] = s, t[7] = o.filters, t[8] = d, t[9] = f, t[10] = p, t[11] = h) : h = t[11];
|
|
5677
5763
|
let g;
|
|
5678
|
-
return t[12] !== o.filters || t[13] !== h ? (g = /* @__PURE__ */
|
|
5764
|
+
return t[12] !== o.filters || t[13] !== h ? (g = /* @__PURE__ */ Y(O, {
|
|
5679
5765
|
label: o.filters,
|
|
5680
5766
|
openDelay: 400,
|
|
5681
5767
|
children: h
|
|
5682
5768
|
}), t[12] = o.filters, t[13] = h, t[14] = g) : g = t[14], g;
|
|
5683
5769
|
}
|
|
5684
|
-
function
|
|
5770
|
+
function ao(e) {
|
|
5685
5771
|
return e.getCanFilter();
|
|
5686
5772
|
}
|
|
5687
|
-
function
|
|
5773
|
+
function oo(e) {
|
|
5688
5774
|
return vt(e.value);
|
|
5689
5775
|
}
|
|
5690
|
-
function
|
|
5776
|
+
function so(e) {
|
|
5691
5777
|
return e.columnFilters;
|
|
5692
5778
|
}
|
|
5693
|
-
function
|
|
5779
|
+
function co(e) {
|
|
5694
5780
|
return e.filterPanelOpen;
|
|
5695
5781
|
}
|
|
5696
5782
|
//#endregion
|
|
5697
5783
|
//#region src/tmdatagrid/core/sizes.ts
|
|
5698
|
-
var
|
|
5784
|
+
var lo = "md", uo = {
|
|
5699
5785
|
xs: 34,
|
|
5700
5786
|
sm: 42,
|
|
5701
5787
|
md: 52,
|
|
5702
5788
|
lg: 62,
|
|
5703
5789
|
xl: 72
|
|
5704
|
-
},
|
|
5790
|
+
}, fo = {
|
|
5705
5791
|
xs: "xs",
|
|
5706
5792
|
sm: "xs",
|
|
5707
5793
|
md: "sm",
|
|
@@ -5710,8 +5796,8 @@ var to = "md", no = {
|
|
|
5710
5796
|
};
|
|
5711
5797
|
//#endregion
|
|
5712
5798
|
//#region src/tmdatagrid/components/TMDataGrid.tsx
|
|
5713
|
-
function
|
|
5714
|
-
let n = e(27), { table: r, ui: i, edit: a, features: o, labels: s, renderDetails: c, renderDetailsEstHeight: l, overscan: u, resetSettings: d, scrollToRow: f, scrollerRef: p, size: m, children: h, className: g, style: _, id: v, "data-testid": y } = t, b = m === void 0 ? "md" : m, x = r.options.meta?.rowHeight ??
|
|
5799
|
+
function po(t) {
|
|
5800
|
+
let n = e(27), { table: r, ui: i, edit: a, features: o, labels: s, renderDetails: c, renderDetailsEstHeight: l, overscan: u, resetSettings: d, scrollToRow: f, scrollerRef: p, size: m, children: h, className: g, style: _, id: v, "data-testid": y } = t, b = m === void 0 ? "md" : m, x = r.options.meta?.rowHeight ?? uo[b], S = fo[b], C;
|
|
5715
5801
|
n[0] !== a || n[1] !== o || n[2] !== s || n[3] !== u || n[4] !== c || n[5] !== l || n[6] !== d || n[7] !== x || n[8] !== f || n[9] !== p || n[10] !== b || n[11] !== S || n[12] !== r || n[13] !== i ? (C = {
|
|
5716
5802
|
table: r,
|
|
5717
5803
|
ui: i,
|
|
@@ -5731,7 +5817,7 @@ function io(t) {
|
|
|
5731
5817
|
let w = C, T;
|
|
5732
5818
|
n[15] === g ? T = n[16] : (T = [Ye.root, g].filter(Boolean), n[15] = g, n[16] = T);
|
|
5733
5819
|
let E = T.join(" "), D;
|
|
5734
|
-
n[17] !== h || n[18] !== v || n[19] !== b || n[20] !== _ || n[21] !== E || n[22] !== y ? (D = /* @__PURE__ */
|
|
5820
|
+
n[17] !== h || n[18] !== v || n[19] !== b || n[20] !== _ || n[21] !== E || n[22] !== y ? (D = /* @__PURE__ */ Y("div", {
|
|
5735
5821
|
id: v,
|
|
5736
5822
|
"data-testid": y,
|
|
5737
5823
|
"data-dg-root": !0,
|
|
@@ -5741,33 +5827,33 @@ function io(t) {
|
|
|
5741
5827
|
children: h
|
|
5742
5828
|
}), n[17] = h, n[18] = v, n[19] = b, n[20] = _, n[21] = E, n[22] = y, n[23] = D) : D = n[23];
|
|
5743
5829
|
let O;
|
|
5744
|
-
return n[24] !== w || n[25] !== D ? (O = /* @__PURE__ */
|
|
5830
|
+
return n[24] !== w || n[25] !== D ? (O = /* @__PURE__ */ Y(Qe, {
|
|
5745
5831
|
value: w,
|
|
5746
5832
|
children: D
|
|
5747
5833
|
}), n[24] = w, n[25] = D, n[26] = O) : O = n[26], O;
|
|
5748
5834
|
}
|
|
5749
|
-
var
|
|
5750
|
-
Toolbar:
|
|
5751
|
-
Spacer:
|
|
5752
|
-
SummaryCount:
|
|
5753
|
-
LoadingIndicator:
|
|
5754
|
-
Search:
|
|
5835
|
+
var mo = Object.assign(po, {
|
|
5836
|
+
Toolbar: Qa,
|
|
5837
|
+
Spacer: $a,
|
|
5838
|
+
SummaryCount: to,
|
|
5839
|
+
LoadingIndicator: eo,
|
|
5840
|
+
Search: xi,
|
|
5755
5841
|
DraftActions: Gn,
|
|
5756
|
-
ColumnsButton:
|
|
5757
|
-
FilterButton:
|
|
5758
|
-
Table:
|
|
5759
|
-
Footer:
|
|
5842
|
+
ColumnsButton: no,
|
|
5843
|
+
FilterButton: io,
|
|
5844
|
+
Table: Xa,
|
|
5845
|
+
Footer: bi,
|
|
5760
5846
|
FilterPanel: tr,
|
|
5761
5847
|
FilterPills: si,
|
|
5762
5848
|
ColumnsPanel: jn
|
|
5763
5849
|
});
|
|
5764
5850
|
//#endregion
|
|
5765
5851
|
//#region src/tmdatagrid/components/filters/DgRangeSliderFilter.tsx
|
|
5766
|
-
function
|
|
5852
|
+
function ho(t) {
|
|
5767
5853
|
let n = e(23), { column: r, operator: i, value: a, onChange: o, size: s, labels: c } = t;
|
|
5768
5854
|
if (!ht(i)) {
|
|
5769
5855
|
let e;
|
|
5770
|
-
return n[0] === t ? e = n[1] : (e = /* @__PURE__ */
|
|
5856
|
+
return n[0] === t ? e = n[1] : (e = /* @__PURE__ */ Y(Zn, { ...t }), n[0] = t, n[1] = e), e;
|
|
5771
5857
|
}
|
|
5772
5858
|
let l;
|
|
5773
5859
|
if (n[2] !== r) {
|
|
@@ -5788,7 +5874,7 @@ function oo(t) {
|
|
|
5788
5874
|
return o([String(t), String(n)]);
|
|
5789
5875
|
}, n[9] = o, n[10] = S);
|
|
5790
5876
|
let C;
|
|
5791
|
-
n[11] !== c.filterFrom || n[12] !== c.filterTo || n[13] !== d || n[14] !== u || n[15] !== s || n[16] !== b || n[17] !== S ? (C = /* @__PURE__ */
|
|
5877
|
+
n[11] !== c.filterFrom || n[12] !== c.filterTo || n[13] !== d || n[14] !== u || n[15] !== s || n[16] !== b || n[17] !== S ? (C = /* @__PURE__ */ Y(x, {
|
|
5792
5878
|
size: s,
|
|
5793
5879
|
mt: 6,
|
|
5794
5880
|
min: u,
|
|
@@ -5800,7 +5886,7 @@ function oo(t) {
|
|
|
5800
5886
|
onChange: S
|
|
5801
5887
|
}), n[11] = c.filterFrom, n[12] = c.filterTo, n[13] = d, n[14] = u, n[15] = s, n[16] = b, n[17] = S, n[18] = C) : C = n[18];
|
|
5802
5888
|
let w;
|
|
5803
|
-
return n[19] !== c.filterValue || n[20] !== s || n[21] !== C ? (w = /* @__PURE__ */
|
|
5889
|
+
return n[19] !== c.filterValue || n[20] !== s || n[21] !== C ? (w = /* @__PURE__ */ Y(m.Wrapper, {
|
|
5804
5890
|
label: _,
|
|
5805
5891
|
size: s,
|
|
5806
5892
|
w: 180,
|
|
@@ -5809,18 +5895,18 @@ function oo(t) {
|
|
|
5809
5895
|
}
|
|
5810
5896
|
//#endregion
|
|
5811
5897
|
//#region src/tmdatagrid/components/filters/DgDateRangeFilter.tsx
|
|
5812
|
-
function
|
|
5898
|
+
function go(t) {
|
|
5813
5899
|
let n = e(23), { operator: r, value: i, onChange: a, size: o, labels: s } = t;
|
|
5814
5900
|
if (!ht(r)) {
|
|
5815
5901
|
let e;
|
|
5816
|
-
return n[0] === t ? e = n[1] : (e = /* @__PURE__ */
|
|
5902
|
+
return n[0] === t ? e = n[1] : (e = /* @__PURE__ */ Y(Zn, { ...t }), n[0] = t, n[1] = e), e;
|
|
5817
5903
|
}
|
|
5818
5904
|
let c;
|
|
5819
5905
|
n[2] === i ? c = n[3] : (c = Array.isArray(i) ? [String(i[0] ?? ""), String(i[1] ?? "")] : ["", ""], n[2] = i, n[3] = c);
|
|
5820
5906
|
let l = c, u;
|
|
5821
5907
|
n[4] !== a || n[5] !== l[1] ? (u = (e) => a([e.currentTarget.value, l[1]]), n[4] = a, n[5] = l[1], n[6] = u) : u = n[6];
|
|
5822
5908
|
let d;
|
|
5823
|
-
n[7] !== s.filterFrom || n[8] !== l[0] || n[9] !== o || n[10] !== u ? (d = /* @__PURE__ */
|
|
5909
|
+
n[7] !== s.filterFrom || n[8] !== l[0] || n[9] !== o || n[10] !== u ? (d = /* @__PURE__ */ Y(D, {
|
|
5824
5910
|
label: s.filterFrom,
|
|
5825
5911
|
size: o,
|
|
5826
5912
|
w: 88,
|
|
@@ -5831,7 +5917,7 @@ function so(t) {
|
|
|
5831
5917
|
let f;
|
|
5832
5918
|
n[12] !== a || n[13] !== l[0] ? (f = (e) => a([l[0], e.currentTarget.value]), n[12] = a, n[13] = l[0], n[14] = f) : f = n[14];
|
|
5833
5919
|
let m;
|
|
5834
|
-
n[15] !== s.filterTo || n[16] !== l[1] || n[17] !== o || n[18] !== f ? (m = /* @__PURE__ */
|
|
5920
|
+
n[15] !== s.filterTo || n[16] !== l[1] || n[17] !== o || n[18] !== f ? (m = /* @__PURE__ */ Y(D, {
|
|
5835
5921
|
label: s.filterTo,
|
|
5836
5922
|
size: o,
|
|
5837
5923
|
w: 88,
|
|
@@ -5840,7 +5926,7 @@ function so(t) {
|
|
|
5840
5926
|
onChange: f
|
|
5841
5927
|
}), n[15] = s.filterTo, n[16] = l[1], n[17] = o, n[18] = f, n[19] = m) : m = n[19];
|
|
5842
5928
|
let h;
|
|
5843
|
-
return n[20] !== d || n[21] !== m ? (h = /* @__PURE__ */
|
|
5929
|
+
return n[20] !== d || n[21] !== m ? (h = /* @__PURE__ */ X(p, {
|
|
5844
5930
|
gap: 4,
|
|
5845
5931
|
wrap: "nowrap",
|
|
5846
5932
|
align: "flex-start",
|
|
@@ -5849,11 +5935,11 @@ function so(t) {
|
|
|
5849
5935
|
}
|
|
5850
5936
|
//#endregion
|
|
5851
5937
|
//#region src/tmdatagrid/components/filters/DgAutocompleteFilter.tsx
|
|
5852
|
-
function
|
|
5938
|
+
function _o(t) {
|
|
5853
5939
|
let n = e(19), { column: r, table: i, operator: a, value: o, onChange: s, options: c, size: l, labels: d } = t;
|
|
5854
5940
|
if (mt(a) || ht(a)) {
|
|
5855
5941
|
let e;
|
|
5856
|
-
return n[0] === t ? e = n[1] : (e = /* @__PURE__ */
|
|
5942
|
+
return n[0] === t ? e = n[1] : (e = /* @__PURE__ */ Y(Zn, { ...t }), n[0] = t, n[1] = e), e;
|
|
5857
5943
|
}
|
|
5858
5944
|
let f;
|
|
5859
5945
|
n[2] === a ? f = n[3] : (f = pt(a), n[2] = a, n[3] = f);
|
|
@@ -5866,9 +5952,9 @@ function co(t) {
|
|
|
5866
5952
|
let h = m, g = d.filterValue, _;
|
|
5867
5953
|
n[8] === Symbol.for("react.memo_cache_sentinel") ? (_ = { withinPortal: !1 }, n[8] = _) : _ = n[8];
|
|
5868
5954
|
let v = !p, y = p ? d.filterValuePlaceholder : "", b;
|
|
5869
|
-
n[9] === h ? b = n[10] : (b = h.map(
|
|
5955
|
+
n[9] === h ? b = n[10] : (b = h.map(vo), n[9] = h, n[10] = b);
|
|
5870
5956
|
let x = p && typeof o == "string" ? o : "", S;
|
|
5871
|
-
return n[11] !== d.filterValue || n[12] !== s || n[13] !== l || n[14] !== v || n[15] !== y || n[16] !== b || n[17] !== x ? (S = /* @__PURE__ */
|
|
5957
|
+
return n[11] !== d.filterValue || n[12] !== s || n[13] !== l || n[14] !== v || n[15] !== y || n[16] !== b || n[17] !== x ? (S = /* @__PURE__ */ Y(u, {
|
|
5872
5958
|
label: g,
|
|
5873
5959
|
size: l,
|
|
5874
5960
|
w: 180,
|
|
@@ -5881,16 +5967,16 @@ function co(t) {
|
|
|
5881
5967
|
onChange: s
|
|
5882
5968
|
}), n[11] = d.filterValue, n[12] = s, n[13] = l, n[14] = v, n[15] = y, n[16] = b, n[17] = x, n[18] = S) : S = n[18], S;
|
|
5883
5969
|
}
|
|
5884
|
-
function
|
|
5970
|
+
function vo(e) {
|
|
5885
5971
|
return e.value;
|
|
5886
5972
|
}
|
|
5887
5973
|
//#endregion
|
|
5888
5974
|
//#region src/tmdatagrid/components/filters/DgTriStateFilter.tsx
|
|
5889
|
-
function
|
|
5975
|
+
function yo(t) {
|
|
5890
5976
|
let n = e(26), { operator: r, value: i, onChange: a, size: o, labels: s } = t;
|
|
5891
5977
|
if (mt(r) || ht(r)) {
|
|
5892
5978
|
let e;
|
|
5893
|
-
return n[0] === t ? e = n[1] : (e = /* @__PURE__ */
|
|
5979
|
+
return n[0] === t ? e = n[1] : (e = /* @__PURE__ */ Y(Zn, { ...t }), n[0] = t, n[1] = e), e;
|
|
5894
5980
|
}
|
|
5895
5981
|
let c;
|
|
5896
5982
|
n[2] === r ? c = n[3] : (c = pt(r), n[2] = r, n[3] = c);
|
|
@@ -5918,7 +6004,7 @@ function uo(t) {
|
|
|
5918
6004
|
let _ = u === "true" || u === "false" ? u : "all", v;
|
|
5919
6005
|
n[14] === a ? v = n[15] : (v = (e) => a(e === "all" ? "" : e), n[14] = a, n[15] = v);
|
|
5920
6006
|
let y;
|
|
5921
|
-
n[16] !== o || n[17] !== d || n[18] !== g || n[19] !== _ || n[20] !== v ? (y = /* @__PURE__ */
|
|
6007
|
+
n[16] !== o || n[17] !== d || n[18] !== g || n[19] !== _ || n[20] !== v ? (y = /* @__PURE__ */ Y(C, {
|
|
5922
6008
|
size: o,
|
|
5923
6009
|
disabled: d,
|
|
5924
6010
|
data: g,
|
|
@@ -5926,7 +6012,7 @@ function uo(t) {
|
|
|
5926
6012
|
onChange: v
|
|
5927
6013
|
}), n[16] = o, n[17] = d, n[18] = g, n[19] = _, n[20] = v, n[21] = y) : y = n[21];
|
|
5928
6014
|
let b;
|
|
5929
|
-
return n[22] !== s.filterValue || n[23] !== o || n[24] !== y ? (b = /* @__PURE__ */
|
|
6015
|
+
return n[22] !== s.filterValue || n[23] !== o || n[24] !== y ? (b = /* @__PURE__ */ Y(m.Wrapper, {
|
|
5930
6016
|
label: s.filterValue,
|
|
5931
6017
|
size: o,
|
|
5932
6018
|
children: y
|
|
@@ -5934,7 +6020,7 @@ function uo(t) {
|
|
|
5934
6020
|
}
|
|
5935
6021
|
//#endregion
|
|
5936
6022
|
//#region src/tmdatagrid/core/labelsSv.ts
|
|
5937
|
-
var
|
|
6023
|
+
var bo = {
|
|
5938
6024
|
operators: {
|
|
5939
6025
|
contains: "innehåller",
|
|
5940
6026
|
equals: "är lika med",
|
|
@@ -6046,11 +6132,11 @@ var fo = {
|
|
|
6046
6132
|
};
|
|
6047
6133
|
//#endregion
|
|
6048
6134
|
//#region src/tmdatagrid/core/summary.ts
|
|
6049
|
-
function
|
|
6135
|
+
function xo({ table: e, columnId: t, fn: n = "sum" }) {
|
|
6050
6136
|
let r = e.getFilteredRowModel().flatRows;
|
|
6051
|
-
return
|
|
6137
|
+
return _e[n](t, r, r);
|
|
6052
6138
|
}
|
|
6053
6139
|
//#endregion
|
|
6054
|
-
export { mr as DATA_STATE_SLICES,
|
|
6140
|
+
export { mr as DATA_STATE_SLICES, ka as DEFAULT_CELL_EXPORT_OPTIONS, lo as DEFAULT_TMDATAGRID_SIZE, At as DETAILS_COLUMN_ID, _o as DgAutocompleteFilter, go as DgDateRangeFilter, ho as DgRangeSliderFilter, yo as DgTriStateFilter, Jt as EDIT_COLUMN_ID, et as FILTER_OPERATOR_LABELS, en as GROUP_COLUMN_ID, gr as PERSIST_PAYLOAD_VERSION, ln as ROW_NUMBER_COLUMN_ID, hn as SELECT_COLUMN_ID, hr as SETTINGS_STATE_SLICES, fo as SIZE_CONTROL_SIZE, uo as SIZE_ROW_HEIGHT, fr as TMDATAGRID_LABELS_EN, bo as TMDATAGRID_LABELS_SV, mo as TMDataGrid, ea as TMDataGridBooleanEditor, ta as TMDataGridDateEditor, Gn as TMDataGridDraftActions, si as TMDataGridFilterPills, Zn as TMDataGridFilterValueInput, na as TMDataGridMultiSelectEditor, ra as TMDataGridNumberEditor, xi as TMDataGridSearch, ia as TMDataGridSelectEditor, aa as TMDataGridStringEditor, xo as aggregateColumn, Ot as areAllRowsExpanded, ji as autosizeColumn, Ea as boundsCellCount, Da as boundsEdges, ja as buildCellMatrix, Ma as buildGridCellMatrix, Rt as clearedValueForType, ei as createTMDataGridColumnHelper, Ra as downloadTextFile, gt as emptyValueForOperator, Na as exportGridToCsv, Aa as formatExportValue, yt as formatFilterLabel, rn as formatGroupValue, cr as fuzzyGlobalFilterFn, zr as getColumnCapabilities, Cn as getColumnDefaultOperator, wn as getColumnFilterControl, xn as getColumnLabel, Mi as getColumnRegion, Sn as getColumnType, ft as getDefaultOperator, dn as getDisplayedRows, Lt as getEditFieldName, Br as getGridCapabilities, $t as getGroupDataRows, dt as getOperatorsForType, pn as getSelectableRowIds, Li as getStepTargetColumn, mi as getTMDataGridPaginationApi, En as isColumnEditableForRow, An as isColumnReorderable, On as isControlColumn, vt as isFilterActive, kn as isGeneratedColumn, fn as isPagingActive, Wr as isSameCell, Ta as isWithinBounds, Fi as keepGeneratedColumnsOutermost, Ai as measureColumnContentWidth, pr as mergeLabels, Pi as moveColumn, Ri as moveColumnByStep, qt as normalizeFieldValidate, oi as openColumnFilter, pt as operatorNeedsValue, mt as operatorTakesArrayValue, ht as operatorTakesRangeValue, Xn as optionsToComboboxData, Rr as readFeatureFlags, Hr as resolveCellMove, Yn as resolveColumnOptions, kt as resolveExpandAll, wa as resolveRangeBounds, mn as resolveRowSelectionClick, $r as tmDataGridFeatures, Fa as toClipboardText, Ia as toExcelCsv, $e as useCellControlTabIndex, ai as useTMDataGrid, Q as useTMDataGridContext, La as writeClipboardText };
|
|
6055
6141
|
|
|
6056
6142
|
//# sourceMappingURL=index.js.map
|