@jielga/tmdatagrid 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +397 -37
- package/dist/index.js +1550 -978
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/skills/columns/SKILL.md +1 -1
- package/skills/features/SKILL.md +1 -1
- package/skills/getting-started/SKILL.md +41 -6
- package/skills/options/SKILL.md +1 -1
- package/skills/server-side/SKILL.md +1 -1
- package/src/tmdatagrid/components/TMDataGrid.module.css +11 -1
- package/src/tmdatagrid/components/TMDataGrid.tsx +6 -0
- package/src/tmdatagrid/components/TMDataGridColumnsPanel.tsx +7 -1
- package/src/tmdatagrid/components/TMDataGridFilterPanel.module.css +15 -0
- package/src/tmdatagrid/components/TMDataGridFilterPanel.tsx +87 -10
- package/src/tmdatagrid/components/TMDataGridFilterPills.module.css +35 -0
- package/src/tmdatagrid/components/TMDataGridFilterPills.tsx +135 -0
- package/src/tmdatagrid/components/TMDataGridFooter.module.css +8 -0
- package/src/tmdatagrid/components/TMDataGridFooter.tsx +70 -42
- package/src/tmdatagrid/components/TMDataGridGroupColumn.module.css +48 -0
- package/src/tmdatagrid/components/TMDataGridGroupColumn.tsx +147 -0
- package/src/tmdatagrid/components/TMDataGridHeaderCell.module.css +6 -0
- package/src/tmdatagrid/components/TMDataGridHeaderCell.tsx +77 -1
- package/src/tmdatagrid/components/TMDataGridSelectColumn.tsx +83 -6
- package/src/tmdatagrid/components/TMDataGridTable.module.css +38 -4
- package/src/tmdatagrid/components/TMDataGridTable.tsx +396 -32
- package/src/tmdatagrid/components/TMDataGridToolbar.tsx +3 -0
- package/src/tmdatagrid/components/icons.ts +5 -0
- package/src/tmdatagrid/core/capabilities.ts +81 -11
- package/src/tmdatagrid/core/filterOperators.ts +25 -0
- package/src/tmdatagrid/core/grouping.ts +21 -0
- package/src/tmdatagrid/core/persistence.ts +12 -0
- package/src/tmdatagrid/core/rowSelection.ts +202 -0
- package/src/tmdatagrid/index.ts +26 -2
- package/src/tmdatagrid/useTMDataGrid.tsx +240 -35
package/dist/index.js
CHANGED
|
@@ -1,77 +1,185 @@
|
|
|
1
1
|
import { c as e } from "react/compiler-runtime";
|
|
2
2
|
import { createContext as t, useCallback as n, useContext as r, useEffect as i, useRef as a, useState as o } from "react";
|
|
3
|
-
import { ActionIcon as s, Button as c, Checkbox as l, Group as u, Loader as d, Menu as f,
|
|
4
|
-
import { useCreateStore as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
var
|
|
3
|
+
import { ActionIcon as s, Button as c, Checkbox as l, Group as u, Loader as d, Menu as f, Pill as p, Popover as m, ScrollArea as h, Select as g, Stack as _, Text as v, TextInput as y, Tooltip as b, UnstyledButton as x } from "@mantine/core";
|
|
4
|
+
import { useCreateStore as S, useSelector as C } from "@tanstack/react-store";
|
|
5
|
+
import { shallow as w } from "@tanstack/store";
|
|
6
|
+
import { IconArrowBarToLeft as T, IconArrowBarToRight as E, IconArrowDown as D, IconArrowLeft as O, IconArrowRight as k, IconArrowUp as A, IconChevronLeft as j, IconChevronRight as M, IconColumns3 as N, IconDotsVertical as P, IconEyeOff as F, IconFilter as I, IconFoldDown as L, IconFoldUp as R, IconIndentDecrease as z, IconIndentIncrease as B, IconMenu2 as V, IconPinnedOff as H, IconSearch as U, IconX as W } from "@tabler/icons-react";
|
|
7
|
+
import { Fragment as ee, jsx as G, jsxs as K } from "react/jsx-runtime";
|
|
8
|
+
import { aggregationFns as q, columnFacetingFeature as J, columnFilteringFeature as te, columnGroupingFeature as ne, columnOrderingFeature as re, columnPinningFeature as ie, columnResizingFeature as ae, columnSizingFeature as oe, columnVisibilityFeature as se, createColumnHelper as Y, createExpandedRowModel as ce, createFacetedMinMaxValues as le, createFacetedRowModel as X, createFacetedUniqueValues as ue, createFilteredRowModel as de, createGroupedRowModel as fe, createPaginatedRowModel as pe, createSortedRowModel as me, filterFns as he, flexRender as ge, globalFilteringFeature as _e, metaHelper as ve, rowExpandingFeature as ye, rowPaginationFeature as be, rowSelectionFeature as xe, rowSortingFeature as Se, sortFns as Ce, tableFeatures as we, useTable as Te } from "@tanstack/react-table";
|
|
9
|
+
import { useVirtualizer as Ee } from "@tanstack/react-virtual";
|
|
10
|
+
var De = { root: "_root_13dg1_8" }, Oe = {
|
|
11
11
|
columnsPanel: "_columnsPanel_1492o_1",
|
|
12
12
|
columnsPanelSearch: "_columnsPanelSearch_1492o_7",
|
|
13
13
|
columnsPanelList: "_columnsPanelList_1492o_11",
|
|
14
14
|
columnsPanelFooter: "_columnsPanelFooter_1492o_18"
|
|
15
|
-
},
|
|
16
|
-
function
|
|
17
|
-
let e = r(
|
|
15
|
+
}, ke = t(null), Ae = ke.Provider;
|
|
16
|
+
function je() {
|
|
17
|
+
let e = r(ke);
|
|
18
18
|
if (!e) throw Error("TMDataGrid compound components must be rendered inside <TMDataGrid>");
|
|
19
19
|
return e;
|
|
20
20
|
}
|
|
21
21
|
//#endregion
|
|
22
22
|
//#region src/tmdatagrid/core/columnUtils.ts
|
|
23
|
-
function
|
|
23
|
+
function Me(e) {
|
|
24
24
|
let t = e.columnDef.meta?.label;
|
|
25
25
|
if (t) return t;
|
|
26
26
|
let n = e.columnDef.header;
|
|
27
27
|
return typeof n == "string" ? n : e.id;
|
|
28
28
|
}
|
|
29
|
-
function
|
|
29
|
+
function Ne(e) {
|
|
30
30
|
return e.columnDef.meta?.type ?? "string";
|
|
31
31
|
}
|
|
32
|
-
function
|
|
32
|
+
function Pe(e) {
|
|
33
33
|
return e.columnDef.meta?.align ?? "left";
|
|
34
34
|
}
|
|
35
|
-
function
|
|
35
|
+
function Fe(e) {
|
|
36
36
|
return e.columnDef.meta?.enableOrdering !== !1 && e.parent === void 0;
|
|
37
37
|
}
|
|
38
|
+
var Ie = {
|
|
39
|
+
groupToggle: "_groupToggle_h06xv_4",
|
|
40
|
+
chevron: "_chevron_h06xv_14",
|
|
41
|
+
groupLabel: "_groupLabel_h06xv_34",
|
|
42
|
+
groupCount: "_groupCount_h06xv_44"
|
|
43
|
+
};
|
|
44
|
+
//#endregion
|
|
45
|
+
//#region src/tmdatagrid/core/grouping.ts
|
|
46
|
+
function Le(e) {
|
|
47
|
+
return e.subRows.length === 0 ? [e] : e.getLeafRows().filter((e) => e.subRows.length === 0);
|
|
48
|
+
}
|
|
49
|
+
//#endregion
|
|
50
|
+
//#region src/tmdatagrid/components/TMDataGridGroupColumn.tsx
|
|
51
|
+
var Re = "__group__", Z = 16, Q = "(Blank)";
|
|
52
|
+
function ze(e) {
|
|
53
|
+
return e == null || e === "" ? Q : e instanceof Date ? e.toLocaleDateString() : String(e);
|
|
54
|
+
}
|
|
55
|
+
function Be(t) {
|
|
56
|
+
let n = e(25), { row: r } = t, i;
|
|
57
|
+
n[0] === r ? i = n[1] : (i = () => r.getIsExpanded(), n[0] = r, n[1] = i);
|
|
58
|
+
let a = C(r.table.store, i);
|
|
59
|
+
if (!r.getIsGrouped()) return null;
|
|
60
|
+
let o;
|
|
61
|
+
n[2] === r.groupingValue ? o = n[3] : (o = ze(r.groupingValue), n[2] = r.groupingValue, n[3] = o);
|
|
62
|
+
let s = o, c = r.depth * Z, l;
|
|
63
|
+
n[4] === c ? l = n[5] : (l = { paddingInlineStart: c }, n[4] = c, n[5] = l);
|
|
64
|
+
let u = `${a ? "Collapse" : "Expand"} ${s}`, d;
|
|
65
|
+
n[6] === r ? d = n[7] : (d = (e) => {
|
|
66
|
+
e.stopPropagation(), r.toggleExpanded();
|
|
67
|
+
}, n[6] = r, n[7] = d);
|
|
68
|
+
let f;
|
|
69
|
+
n[8] === Symbol.for("react.memo_cache_sentinel") ? (f = /* @__PURE__ */ G(M, {
|
|
70
|
+
size: 16,
|
|
71
|
+
stroke: 1.6
|
|
72
|
+
}), n[8] = f) : f = n[8];
|
|
73
|
+
let p;
|
|
74
|
+
n[9] === a ? p = n[10] : (p = /* @__PURE__ */ G("span", {
|
|
75
|
+
className: Ie.chevron,
|
|
76
|
+
"data-expanded": a,
|
|
77
|
+
children: f
|
|
78
|
+
}), n[9] = a, n[10] = p);
|
|
79
|
+
let m;
|
|
80
|
+
n[11] === s ? m = n[12] : (m = /* @__PURE__ */ G("span", {
|
|
81
|
+
className: Ie.groupLabel,
|
|
82
|
+
children: s
|
|
83
|
+
}), n[11] = s, n[12] = m);
|
|
84
|
+
let h;
|
|
85
|
+
n[13] === r ? h = n[14] : (h = Le(r), n[13] = r, n[14] = h);
|
|
86
|
+
let g;
|
|
87
|
+
n[15] === h.length ? g = n[16] : (g = /* @__PURE__ */ K("span", {
|
|
88
|
+
className: Ie.groupCount,
|
|
89
|
+
children: [
|
|
90
|
+
"(",
|
|
91
|
+
h.length,
|
|
92
|
+
")"
|
|
93
|
+
]
|
|
94
|
+
}), n[15] = h.length, n[16] = g);
|
|
95
|
+
let _;
|
|
96
|
+
return n[17] !== a || n[18] !== g || n[19] !== l || n[20] !== u || n[21] !== d || n[22] !== p || n[23] !== m ? (_ = /* @__PURE__ */ K(x, {
|
|
97
|
+
className: Ie.groupToggle,
|
|
98
|
+
style: l,
|
|
99
|
+
"aria-expanded": a,
|
|
100
|
+
"aria-label": u,
|
|
101
|
+
onClick: d,
|
|
102
|
+
children: [
|
|
103
|
+
p,
|
|
104
|
+
m,
|
|
105
|
+
g
|
|
106
|
+
]
|
|
107
|
+
}), n[17] = a, n[18] = g, n[19] = l, n[20] = u, n[21] = d, n[22] = p, n[23] = m, n[24] = _) : _ = n[24], _;
|
|
108
|
+
}
|
|
109
|
+
function Ve(t) {
|
|
110
|
+
let n = e(6), { table: r } = t, i;
|
|
111
|
+
n[0] === Symbol.for("react.memo_cache_sentinel") ? (i = { compare: w }, n[0] = i) : i = n[0];
|
|
112
|
+
let a = C(r.store, He, i);
|
|
113
|
+
if (a.length === 0) return "Group";
|
|
114
|
+
let o;
|
|
115
|
+
if (n[1] !== a || n[2] !== r) {
|
|
116
|
+
let e;
|
|
117
|
+
n[4] === r ? e = n[5] : (e = (e) => {
|
|
118
|
+
let t = r.getColumn(e);
|
|
119
|
+
return t ? Me(t) : e;
|
|
120
|
+
}, n[4] = r, n[5] = e), o = a.map(e).join(" / "), n[1] = a, n[2] = r, n[3] = o;
|
|
121
|
+
} else o = n[3];
|
|
122
|
+
return o;
|
|
123
|
+
}
|
|
124
|
+
function He(e) {
|
|
125
|
+
return e.grouping;
|
|
126
|
+
}
|
|
127
|
+
function Ue() {
|
|
128
|
+
return {
|
|
129
|
+
id: Re,
|
|
130
|
+
meta: {
|
|
131
|
+
label: "Group",
|
|
132
|
+
enableOrdering: !1
|
|
133
|
+
},
|
|
134
|
+
size: 260,
|
|
135
|
+
minSize: 180,
|
|
136
|
+
enableSorting: !1,
|
|
137
|
+
enableColumnFilter: !1,
|
|
138
|
+
enableGlobalFilter: !1,
|
|
139
|
+
enableHiding: !1,
|
|
140
|
+
enablePinning: !1,
|
|
141
|
+
cell: ({ row: e }) => /* @__PURE__ */ G(Be, { row: e }),
|
|
142
|
+
aggregatedCell: ({ row: e }) => /* @__PURE__ */ G(Be, { row: e }),
|
|
143
|
+
header: ({ table: e }) => /* @__PURE__ */ G(Ve, { table: e })
|
|
144
|
+
};
|
|
145
|
+
}
|
|
38
146
|
//#endregion
|
|
39
147
|
//#region src/tmdatagrid/components/TMDataGridColumnsPanel.tsx
|
|
40
|
-
function
|
|
41
|
-
let t = e(54), { table: n, controlSize: r } =
|
|
148
|
+
function We() {
|
|
149
|
+
let t = e(54), { table: n, controlSize: r } = je(), [i, a] = o(""), s = C(n.store, qe), u, d, f, p, m, g, _, b, x, S;
|
|
42
150
|
if (t[0] !== s || t[1] !== r || t[2] !== i || t[3] !== n) {
|
|
43
|
-
let e = n.getAllLeafColumns(), o = i.trim().toLowerCase();
|
|
44
|
-
|
|
151
|
+
let e = n.getAllLeafColumns().filter(Ke), o = i.trim().toLowerCase();
|
|
152
|
+
S = o ? e.filter((e) => Me(e).toLowerCase().includes(o)) : e, d = e.filter(Ge);
|
|
45
153
|
let c;
|
|
46
|
-
t[14] === s ? c = t[15] : (c = (e) => s[e.id] !== !1, t[14] = s, t[15] = c), f = d.filter(c).length, b =
|
|
47
|
-
let
|
|
48
|
-
t[16] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
49
|
-
let
|
|
50
|
-
t[17] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
154
|
+
t[14] === s ? c = t[15] : (c = (e) => s[e.id] !== !1, t[14] = s, t[15] = c), f = d.filter(c).length, b = Oe.columnsPanel;
|
|
155
|
+
let v;
|
|
156
|
+
t[16] === Symbol.for("react.memo_cache_sentinel") ? (v = (e) => a(e.currentTarget.value), t[16] = v) : v = t[16];
|
|
157
|
+
let C;
|
|
158
|
+
t[17] === Symbol.for("react.memo_cache_sentinel") ? (C = /* @__PURE__ */ G(U, {
|
|
51
159
|
size: 16,
|
|
52
160
|
stroke: 1.6
|
|
53
|
-
}), t[17] =
|
|
54
|
-
className:
|
|
55
|
-
children: /* @__PURE__ */
|
|
161
|
+
}), t[17] = C) : C = t[17], t[18] !== r || t[19] !== i ? (x = /* @__PURE__ */ G("div", {
|
|
162
|
+
className: Oe.columnsPanelSearch,
|
|
163
|
+
children: /* @__PURE__ */ G(y, {
|
|
56
164
|
value: i,
|
|
57
|
-
onChange:
|
|
165
|
+
onChange: v,
|
|
58
166
|
placeholder: "Search",
|
|
59
|
-
leftSection:
|
|
167
|
+
leftSection: C,
|
|
60
168
|
size: r,
|
|
61
169
|
"data-autofocus": !0
|
|
62
170
|
})
|
|
63
|
-
}), t[18] = r, t[19] = i, t[20] =
|
|
171
|
+
}), t[18] = r, t[19] = i, t[20] = x) : x = t[20], u = h.Autosize, g = 260, _ = "auto", p = Oe.columnsPanelList;
|
|
64
172
|
let w;
|
|
65
|
-
t[21] !== s || t[22] !== r ? (w = (e) => /* @__PURE__ */
|
|
173
|
+
t[21] !== s || t[22] !== r ? (w = (e) => /* @__PURE__ */ G(l, {
|
|
66
174
|
size: r,
|
|
67
|
-
label:
|
|
175
|
+
label: Me(e),
|
|
68
176
|
disabled: !e.getCanHide(),
|
|
69
177
|
checked: s[e.id] !== !1,
|
|
70
178
|
onChange: (t) => e.toggleVisibility(t.currentTarget.checked)
|
|
71
|
-
}, e.id), t[21] = s, t[22] = r, t[23] = w) : w = t[23],
|
|
72
|
-
} else u = t[4], d = t[5], f = t[6], p = t[7],
|
|
179
|
+
}, e.id), t[21] = s, t[22] = r, t[23] = w) : w = t[23], m = S.map(w), t[0] = s, t[1] = r, t[2] = i, t[3] = n, t[4] = u, t[5] = d, t[6] = f, t[7] = p, t[8] = m, t[9] = g, t[10] = _, t[11] = b, t[12] = x, t[13] = S;
|
|
180
|
+
} else u = t[4], d = t[5], f = t[6], p = t[7], m = t[8], g = t[9], _ = t[10], b = t[11], x = t[12], S = t[13];
|
|
73
181
|
let w;
|
|
74
|
-
t[24] !== r || t[25] !== i || t[26] !==
|
|
182
|
+
t[24] !== r || t[25] !== i || t[26] !== S.length ? (w = S.length === 0 && /* @__PURE__ */ K(v, {
|
|
75
183
|
size: r,
|
|
76
184
|
c: "dimmed",
|
|
77
185
|
children: [
|
|
@@ -79,22 +187,22 @@ function De() {
|
|
|
79
187
|
i,
|
|
80
188
|
"”"
|
|
81
189
|
]
|
|
82
|
-
}), t[24] = r, t[25] = i, t[26] =
|
|
190
|
+
}), t[24] = r, t[25] = i, t[26] = S.length, t[27] = w) : w = t[27];
|
|
83
191
|
let T;
|
|
84
|
-
t[28] !== p || t[29] !==
|
|
192
|
+
t[28] !== p || t[29] !== m || t[30] !== w ? (T = /* @__PURE__ */ K("div", {
|
|
85
193
|
className: p,
|
|
86
|
-
children: [
|
|
87
|
-
}), t[28] = p, t[29] =
|
|
194
|
+
children: [m, w]
|
|
195
|
+
}), t[28] = p, t[29] = m, t[30] = w, t[31] = T) : T = t[31];
|
|
88
196
|
let E;
|
|
89
|
-
t[32] !== u || t[33] !== g || t[34] !==
|
|
197
|
+
t[32] !== u || t[33] !== g || t[34] !== _ || t[35] !== T ? (E = /* @__PURE__ */ G(u, {
|
|
90
198
|
mah: g,
|
|
91
|
-
type:
|
|
199
|
+
type: _,
|
|
92
200
|
children: T
|
|
93
|
-
}), t[32] = u, t[33] = g, t[34] =
|
|
201
|
+
}), t[32] = u, t[33] = g, t[34] = _, t[35] = T, t[36] = E) : E = t[36];
|
|
94
202
|
let D = f === d.length, O = f > 0 && f < d.length, k;
|
|
95
203
|
t[37] === n ? k = t[38] : (k = (e) => n.toggleAllColumnsVisible(e.currentTarget.checked), t[37] = n, t[38] = k);
|
|
96
204
|
let A;
|
|
97
|
-
t[39] !== r || t[40] !== O || t[41] !== k || t[42] !== D ? (A = /* @__PURE__ */
|
|
205
|
+
t[39] !== r || t[40] !== O || t[41] !== k || t[42] !== D ? (A = /* @__PURE__ */ G(l, {
|
|
98
206
|
size: r,
|
|
99
207
|
label: "Show/Hide All",
|
|
100
208
|
checked: D,
|
|
@@ -102,37 +210,42 @@ function De() {
|
|
|
102
210
|
onChange: k
|
|
103
211
|
}), t[39] = r, t[40] = O, t[41] = k, t[42] = D, t[43] = A) : A = t[43];
|
|
104
212
|
let j;
|
|
105
|
-
t[44] === n ? j = t[45] : (j = /* @__PURE__ */
|
|
213
|
+
t[44] === n ? j = t[45] : (j = /* @__PURE__ */ G(c, {
|
|
106
214
|
variant: "subtle",
|
|
107
215
|
size: "compact-sm",
|
|
108
216
|
onClick: () => n.resetColumnVisibility(),
|
|
109
217
|
children: "RESET"
|
|
110
218
|
}), t[44] = n, t[45] = j);
|
|
111
219
|
let M;
|
|
112
|
-
t[46] !== A || t[47] !== j ? (M = /* @__PURE__ */
|
|
113
|
-
className:
|
|
220
|
+
t[46] !== A || t[47] !== j ? (M = /* @__PURE__ */ K("div", {
|
|
221
|
+
className: Oe.columnsPanelFooter,
|
|
114
222
|
children: [A, j]
|
|
115
223
|
}), t[46] = A, t[47] = j, t[48] = M) : M = t[48];
|
|
116
224
|
let N;
|
|
117
|
-
return t[49] !== M || t[50] !== b || t[51] !==
|
|
225
|
+
return t[49] !== M || t[50] !== b || t[51] !== x || t[52] !== E ? (N = /* @__PURE__ */ K("div", {
|
|
118
226
|
className: b,
|
|
119
227
|
children: [
|
|
120
|
-
|
|
228
|
+
x,
|
|
121
229
|
E,
|
|
122
230
|
M
|
|
123
231
|
]
|
|
124
|
-
}), t[49] = M, t[50] = b, t[51] =
|
|
232
|
+
}), t[49] = M, t[50] = b, t[51] = x, t[52] = E, t[53] = N) : N = t[53], N;
|
|
125
233
|
}
|
|
126
|
-
function
|
|
234
|
+
function Ge(e) {
|
|
127
235
|
return e.getCanHide();
|
|
128
236
|
}
|
|
129
|
-
function
|
|
237
|
+
function Ke(e) {
|
|
238
|
+
return e.id !== Re;
|
|
239
|
+
}
|
|
240
|
+
function qe(e) {
|
|
130
241
|
return e.columnVisibility;
|
|
131
242
|
}
|
|
132
|
-
var
|
|
133
|
-
filterPanel: "
|
|
134
|
-
filterRow: "
|
|
135
|
-
|
|
243
|
+
var Je = {
|
|
244
|
+
filterPanel: "_filterPanel_izakx_4",
|
|
245
|
+
filterRow: "_filterRow_izakx_16",
|
|
246
|
+
filterPanelHeader: "_filterPanelHeader_izakx_22",
|
|
247
|
+
filterPanelFooter: "_filterPanelFooter_izakx_30"
|
|
248
|
+
}, Ye = {
|
|
136
249
|
contains: "contains",
|
|
137
250
|
equals: "equals",
|
|
138
251
|
notEquals: "does not equal",
|
|
@@ -144,7 +257,7 @@ var Ae = {
|
|
|
144
257
|
lessThanOrEqual: "is less than or equal to",
|
|
145
258
|
isEmpty: "is empty",
|
|
146
259
|
isNotEmpty: "is not empty"
|
|
147
|
-
},
|
|
260
|
+
}, Xe = [
|
|
148
261
|
"contains",
|
|
149
262
|
"equals",
|
|
150
263
|
"notEquals",
|
|
@@ -152,7 +265,7 @@ var Ae = {
|
|
|
152
265
|
"endsWith",
|
|
153
266
|
"isEmpty",
|
|
154
267
|
"isNotEmpty"
|
|
155
|
-
],
|
|
268
|
+
], Ze = [
|
|
156
269
|
"equals",
|
|
157
270
|
"notEquals",
|
|
158
271
|
"greaterThan",
|
|
@@ -161,23 +274,29 @@ var Ae = {
|
|
|
161
274
|
"lessThanOrEqual",
|
|
162
275
|
"isEmpty",
|
|
163
276
|
"isNotEmpty"
|
|
164
|
-
],
|
|
165
|
-
function
|
|
166
|
-
return e === "number" ?
|
|
277
|
+
], Qe = ["isEmpty", "isNotEmpty"];
|
|
278
|
+
function $e(e) {
|
|
279
|
+
return e === "number" ? Ze : Xe;
|
|
167
280
|
}
|
|
168
|
-
function
|
|
281
|
+
function et(e) {
|
|
169
282
|
return e === "number" ? "equals" : "contains";
|
|
170
283
|
}
|
|
171
|
-
function
|
|
172
|
-
return !
|
|
284
|
+
function tt(e) {
|
|
285
|
+
return !Qe.includes(e);
|
|
173
286
|
}
|
|
174
|
-
function
|
|
287
|
+
function nt(e) {
|
|
175
288
|
return typeof e == "object" && !!e && "operator" in e && typeof e.operator == "string";
|
|
176
289
|
}
|
|
177
|
-
function
|
|
178
|
-
return
|
|
290
|
+
function rt(e) {
|
|
291
|
+
return nt(e) ? !tt(e.operator) || e.value.trim() !== "" : !1;
|
|
179
292
|
}
|
|
180
|
-
function
|
|
293
|
+
function it({ label: e, type: t, filter: n }) {
|
|
294
|
+
let { operator: r, value: i } = n;
|
|
295
|
+
if (!tt(r)) return `${e} ${Ye[r]}`;
|
|
296
|
+
let a = i.trim();
|
|
297
|
+
return r === et(t) ? `${e}: ${a}` : `${e} ${Ye[r]} ${a}`;
|
|
298
|
+
}
|
|
299
|
+
function at(e, { operator: t, value: n }) {
|
|
181
300
|
if (t === "isEmpty") return e == null || e === "";
|
|
182
301
|
if (t === "isNotEmpty") return e != null && e !== "";
|
|
183
302
|
let r = n.trim();
|
|
@@ -200,155 +319,326 @@ function Re(e, { operator: t, value: n }) {
|
|
|
200
319
|
default: return !0;
|
|
201
320
|
}
|
|
202
321
|
}
|
|
203
|
-
function
|
|
204
|
-
return !
|
|
322
|
+
function ot(e, t, n) {
|
|
323
|
+
return !nt(n) || at(e.getValue(t), n);
|
|
205
324
|
}
|
|
206
325
|
//#endregion
|
|
207
326
|
//#region src/tmdatagrid/components/TMDataGridFilterPanel.tsx
|
|
208
|
-
var
|
|
327
|
+
var st = {
|
|
209
328
|
operator: "contains",
|
|
210
329
|
value: ""
|
|
211
330
|
};
|
|
212
|
-
function
|
|
213
|
-
return
|
|
214
|
-
}
|
|
215
|
-
function
|
|
216
|
-
let t = e(
|
|
217
|
-
if (
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
}, t[
|
|
225
|
-
let
|
|
226
|
-
t[
|
|
227
|
-
let
|
|
228
|
-
|
|
229
|
-
id
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
331
|
+
function ct(e) {
|
|
332
|
+
return nt(e) ? e : st;
|
|
333
|
+
}
|
|
334
|
+
function lt() {
|
|
335
|
+
let t = e(63), { table: n, ui: r, controlSize: o } = je(), l = C(r, mt), u = C(n.store, pt), d = a(null), f, p;
|
|
336
|
+
if (t[0] !== l || t[1] !== r ? (f = () => {
|
|
337
|
+
if (!l) return;
|
|
338
|
+
let e = (e) => {
|
|
339
|
+
let t = e.target;
|
|
340
|
+
t instanceof Element && (d.current?.contains(t) || t.closest("[data-dg-filter-toggle]") || r.actions.closeFilterPanel());
|
|
341
|
+
};
|
|
342
|
+
return document.addEventListener("pointerdown", e), () => document.removeEventListener("pointerdown", e);
|
|
343
|
+
}, p = [l, r], t[0] = l, t[1] = r, t[2] = f, t[3] = p) : (f = t[2], p = t[3]), i(f, p), !l) return null;
|
|
344
|
+
let m, h, b, x, S, w, T;
|
|
345
|
+
if (t[4] !== u || t[5] !== n || t[6] !== r.actions) {
|
|
346
|
+
let e = n.getAllLeafColumns().filter(ft);
|
|
347
|
+
x = e.map(dt), w = function(e) {
|
|
348
|
+
let t = u.filter((t) => t.id !== e);
|
|
349
|
+
n.setColumnFilters(t), t.length === 0 && r.actions.closeFilterPanel();
|
|
350
|
+
}, h = function(e, t) {
|
|
351
|
+
let i = ct(u.find((t) => t.id === e)?.value), a = n.getColumn(t);
|
|
352
|
+
n.setColumnFilters(u.filter((e) => e.id !== t).map((n) => n.id === e ? {
|
|
353
|
+
id: t,
|
|
354
|
+
value: {
|
|
355
|
+
operator: et(a ? Ne(a) : "string"),
|
|
356
|
+
value: i.value
|
|
357
|
+
}
|
|
358
|
+
} : n)), r.actions.openFilterPanel(t);
|
|
359
|
+
};
|
|
360
|
+
let i;
|
|
361
|
+
t[14] !== u || t[15] !== n ? (i = function(e, t) {
|
|
362
|
+
n.setColumnFilters(u.map((n) => n.id === e ? {
|
|
363
|
+
...n,
|
|
364
|
+
value: {
|
|
365
|
+
...ct(n.value),
|
|
366
|
+
...t
|
|
367
|
+
}
|
|
368
|
+
} : n));
|
|
369
|
+
}, t[14] = u, t[15] = n, t[16] = i) : i = t[16], S = i;
|
|
370
|
+
let a;
|
|
371
|
+
t[17] !== n || t[18] !== r.actions ? (a = function() {
|
|
372
|
+
n.setColumnFilters([]), r.actions.closeFilterPanel();
|
|
373
|
+
}, t[17] = n, t[18] = r.actions, t[19] = a) : a = t[19], b = a, m = function() {
|
|
374
|
+
let t = e.find((e) => !u.some((t) => t.id === e.id));
|
|
375
|
+
t && n.setColumnFilters([...u, {
|
|
376
|
+
id: t.id,
|
|
377
|
+
value: {
|
|
378
|
+
operator: et(Ne(t)),
|
|
379
|
+
value: ""
|
|
380
|
+
}
|
|
381
|
+
}]);
|
|
382
|
+
};
|
|
383
|
+
let o;
|
|
384
|
+
t[20] === u ? o = t[21] : (o = (e) => !u.some((t) => t.id === e.id), t[20] = u, t[21] = o), T = e.some(o), t[4] = u, t[5] = n, t[6] = r.actions, t[7] = m, t[8] = h, t[9] = b, t[10] = x, t[11] = S, t[12] = w, t[13] = T;
|
|
385
|
+
} else m = t[7], h = t[8], b = t[9], x = t[10], S = t[11], w = t[12], T = t[13];
|
|
386
|
+
let E = T, D;
|
|
387
|
+
t[22] === r.actions ? D = t[23] : (D = (e) => {
|
|
388
|
+
e.key === "Escape" && (e.stopPropagation(), r.actions.closeFilterPanel());
|
|
389
|
+
}, t[22] = r.actions, t[23] = D);
|
|
390
|
+
let O;
|
|
391
|
+
t[24] === o ? O = t[25] : (O = /* @__PURE__ */ G(v, {
|
|
392
|
+
size: o,
|
|
393
|
+
fw: 600,
|
|
394
|
+
children: "Filters"
|
|
395
|
+
}), t[24] = o, t[25] = O);
|
|
396
|
+
let k;
|
|
397
|
+
t[26] === Symbol.for("react.memo_cache_sentinel") ? (k = /* @__PURE__ */ G(W, {
|
|
398
|
+
size: 16,
|
|
399
|
+
stroke: 1.6
|
|
400
|
+
}), t[26] = k) : k = t[26];
|
|
401
|
+
let A;
|
|
402
|
+
t[27] === r.actions.closeFilterPanel ? A = t[28] : (A = /* @__PURE__ */ G(s, {
|
|
403
|
+
variant: "subtle",
|
|
404
|
+
color: "gray",
|
|
405
|
+
size: "sm",
|
|
406
|
+
"aria-label": "Close filters",
|
|
407
|
+
onClick: r.actions.closeFilterPanel,
|
|
408
|
+
children: k
|
|
409
|
+
}), t[27] = r.actions.closeFilterPanel, t[28] = A);
|
|
410
|
+
let j;
|
|
411
|
+
t[29] !== O || t[30] !== A ? (j = /* @__PURE__ */ K("div", {
|
|
412
|
+
className: Je.filterPanelHeader,
|
|
413
|
+
children: [O, A]
|
|
414
|
+
}), t[29] = O, t[30] = A, t[31] = j) : j = t[31];
|
|
415
|
+
let M;
|
|
416
|
+
if (t[32] !== h || t[33] !== u || t[34] !== x || t[35] !== o || t[36] !== S || t[37] !== w || t[38] !== n) {
|
|
259
417
|
let e;
|
|
260
|
-
t[
|
|
261
|
-
let t = n.getColumn(e.id), r =
|
|
262
|
-
return /* @__PURE__ */
|
|
263
|
-
className:
|
|
418
|
+
t[40] !== h || t[41] !== x || t[42] !== o || t[43] !== S || t[44] !== w || t[45] !== n ? (e = (e) => {
|
|
419
|
+
let t = n.getColumn(e.id), r = ct(e.value), i = t ? Ne(t) : "string", a = tt(r.operator);
|
|
420
|
+
return /* @__PURE__ */ K("div", {
|
|
421
|
+
className: Je.filterRow,
|
|
264
422
|
children: [
|
|
265
|
-
/* @__PURE__ */
|
|
423
|
+
/* @__PURE__ */ G(s, {
|
|
266
424
|
variant: "subtle",
|
|
267
425
|
color: "gray",
|
|
268
426
|
size: "lg",
|
|
269
427
|
"aria-label": "Remove filter",
|
|
270
|
-
onClick: () =>
|
|
271
|
-
children: /* @__PURE__ */
|
|
428
|
+
onClick: () => w(e.id),
|
|
429
|
+
children: /* @__PURE__ */ G(W, {
|
|
272
430
|
size: 18,
|
|
273
431
|
stroke: 1.6
|
|
274
432
|
})
|
|
275
433
|
}),
|
|
276
|
-
/* @__PURE__ */
|
|
434
|
+
/* @__PURE__ */ G(g, {
|
|
277
435
|
label: "Column",
|
|
278
|
-
size:
|
|
436
|
+
size: o,
|
|
279
437
|
w: 160,
|
|
280
438
|
allowDeselect: !1,
|
|
281
|
-
|
|
439
|
+
comboboxProps: { withinPortal: !1 },
|
|
440
|
+
data: x,
|
|
282
441
|
value: e.id,
|
|
283
|
-
onChange: (t) => t &&
|
|
442
|
+
onChange: (t) => t && h(e.id, t)
|
|
284
443
|
}),
|
|
285
|
-
/* @__PURE__ */
|
|
444
|
+
/* @__PURE__ */ G(g, {
|
|
286
445
|
label: "Operator",
|
|
287
|
-
size:
|
|
446
|
+
size: o,
|
|
288
447
|
w: 170,
|
|
289
448
|
allowDeselect: !1,
|
|
290
|
-
|
|
449
|
+
comboboxProps: { withinPortal: !1 },
|
|
450
|
+
data: $e(i).map(ut),
|
|
291
451
|
value: r.operator,
|
|
292
|
-
onChange: (t) => t &&
|
|
452
|
+
onChange: (t) => t && S(e.id, { operator: t })
|
|
293
453
|
}),
|
|
294
|
-
/* @__PURE__ */
|
|
454
|
+
/* @__PURE__ */ G(y, {
|
|
295
455
|
label: "Value",
|
|
296
|
-
size:
|
|
456
|
+
size: o,
|
|
297
457
|
w: 180,
|
|
298
|
-
type:
|
|
299
|
-
disabled: !
|
|
300
|
-
placeholder:
|
|
301
|
-
value:
|
|
302
|
-
onChange: (t) =>
|
|
458
|
+
type: i === "number" && a ? "number" : "text",
|
|
459
|
+
disabled: !a,
|
|
460
|
+
placeholder: a ? "Filter value" : "",
|
|
461
|
+
value: a ? r.value : "",
|
|
462
|
+
onChange: (t) => S(e.id, { value: t.currentTarget.value })
|
|
303
463
|
})
|
|
304
464
|
]
|
|
305
465
|
}, e.id);
|
|
306
|
-
}, t[
|
|
307
|
-
} else
|
|
308
|
-
let
|
|
309
|
-
t[
|
|
310
|
-
let E;
|
|
311
|
-
t[34] === C ? E = t[35] : (E = /* @__PURE__ */ L(c, {
|
|
466
|
+
}, t[40] = h, t[41] = x, t[42] = o, t[43] = S, t[44] = w, t[45] = n, t[46] = e) : e = t[46], M = u.map(e), t[32] = h, t[33] = u, t[34] = x, t[35] = o, t[36] = S, t[37] = w, t[38] = n, t[39] = M;
|
|
467
|
+
} else M = t[39];
|
|
468
|
+
let N = !E, P;
|
|
469
|
+
t[47] !== m || t[48] !== N ? (P = /* @__PURE__ */ G(c, {
|
|
312
470
|
variant: "subtle",
|
|
313
471
|
size: "compact-sm",
|
|
314
|
-
|
|
315
|
-
onClick:
|
|
472
|
+
disabled: N,
|
|
473
|
+
onClick: m,
|
|
316
474
|
children: "Add filter"
|
|
317
|
-
}), t[
|
|
318
|
-
let
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
475
|
+
}), t[47] = m, t[48] = N, t[49] = P) : P = t[49];
|
|
476
|
+
let F = u.length === 0, I;
|
|
477
|
+
t[50] !== b || t[51] !== F ? (I = /* @__PURE__ */ G(c, {
|
|
478
|
+
variant: "subtle",
|
|
479
|
+
color: "gray",
|
|
480
|
+
size: "compact-sm",
|
|
481
|
+
disabled: F,
|
|
482
|
+
onClick: b,
|
|
483
|
+
children: "Clear all"
|
|
484
|
+
}), t[50] = b, t[51] = F, t[52] = I) : I = t[52];
|
|
485
|
+
let L;
|
|
486
|
+
t[53] !== P || t[54] !== I ? (L = /* @__PURE__ */ K("div", {
|
|
487
|
+
className: Je.filterPanelFooter,
|
|
488
|
+
children: [P, I]
|
|
489
|
+
}), t[53] = P, t[54] = I, t[55] = L) : L = t[55];
|
|
490
|
+
let R;
|
|
491
|
+
t[56] !== L || t[57] !== M ? (R = /* @__PURE__ */ K(_, {
|
|
492
|
+
gap: "xs",
|
|
493
|
+
children: [M, L]
|
|
494
|
+
}), t[56] = L, t[57] = M, t[58] = R) : R = t[58];
|
|
495
|
+
let z;
|
|
496
|
+
return t[59] !== R || t[60] !== D || t[61] !== j ? (z = /* @__PURE__ */ K("div", {
|
|
497
|
+
ref: d,
|
|
498
|
+
role: "group",
|
|
499
|
+
"aria-label": "Filters",
|
|
500
|
+
className: Je.filterPanel,
|
|
501
|
+
onKeyDown: D,
|
|
502
|
+
children: [j, R]
|
|
503
|
+
}), t[59] = R, t[60] = D, t[61] = j, t[62] = z) : z = t[62], z;
|
|
326
504
|
}
|
|
327
|
-
function
|
|
505
|
+
function ut(e) {
|
|
328
506
|
return {
|
|
329
507
|
value: e,
|
|
330
|
-
label:
|
|
508
|
+
label: Ye[e]
|
|
331
509
|
};
|
|
332
510
|
}
|
|
333
|
-
function
|
|
511
|
+
function dt(e) {
|
|
334
512
|
return {
|
|
335
513
|
value: e.id,
|
|
336
|
-
label:
|
|
514
|
+
label: Me(e)
|
|
337
515
|
};
|
|
338
516
|
}
|
|
339
|
-
function
|
|
517
|
+
function ft(e) {
|
|
340
518
|
return e.getCanFilter();
|
|
341
519
|
}
|
|
342
|
-
function
|
|
520
|
+
function pt(e) {
|
|
343
521
|
return e.columnFilters;
|
|
344
522
|
}
|
|
345
|
-
function
|
|
523
|
+
function mt(e) {
|
|
346
524
|
return e.filterPanelOpen;
|
|
347
525
|
}
|
|
348
|
-
var
|
|
526
|
+
var ht = {
|
|
527
|
+
filterPills: "_filterPills_1yybb_3",
|
|
528
|
+
pill: "_pill_1yybb_15",
|
|
529
|
+
pillLabel: "_pillLabel_1yybb_27"
|
|
530
|
+
}, gt = [
|
|
531
|
+
"columnFilters",
|
|
532
|
+
"globalFilter",
|
|
533
|
+
"sorting",
|
|
534
|
+
"pagination",
|
|
535
|
+
"expanded"
|
|
536
|
+
], _t = [
|
|
537
|
+
"columnVisibility",
|
|
538
|
+
"columnSizing",
|
|
539
|
+
"columnOrder",
|
|
540
|
+
"columnPinning",
|
|
541
|
+
"grouping"
|
|
542
|
+
];
|
|
543
|
+
function vt(e, t) {
|
|
544
|
+
if (!e) return null;
|
|
545
|
+
if (typeof e == "string") return {
|
|
546
|
+
key: e,
|
|
547
|
+
slices: t
|
|
548
|
+
};
|
|
549
|
+
let [n, r] = e;
|
|
550
|
+
return n ? {
|
|
551
|
+
key: n,
|
|
552
|
+
slices: r
|
|
553
|
+
} : null;
|
|
554
|
+
}
|
|
555
|
+
function yt(e) {
|
|
556
|
+
if (!e) return null;
|
|
557
|
+
try {
|
|
558
|
+
return typeof window > "u" ? null : e.storageMode === "sessionStorage" ? window.sessionStorage : window.localStorage;
|
|
559
|
+
} catch {
|
|
560
|
+
return null;
|
|
561
|
+
}
|
|
562
|
+
}
|
|
563
|
+
function bt(e, t) {
|
|
564
|
+
return typeof e == "object" && e ? e[t] : void 0;
|
|
565
|
+
}
|
|
566
|
+
var xt = (e) => typeof e == "string", St = (e) => typeof e == "number" && Number.isFinite(e);
|
|
567
|
+
function Ct(e, t) {
|
|
568
|
+
return Array.isArray(e) && e.every(t);
|
|
569
|
+
}
|
|
570
|
+
function wt(e, t) {
|
|
571
|
+
return typeof e != "object" || !e || Array.isArray(e) ? !1 : Object.values(e).every(t);
|
|
572
|
+
}
|
|
573
|
+
var Tt = (e) => xt(bt(e, "id")), Et = {
|
|
574
|
+
columnFilters: (e) => Ct(e, Tt),
|
|
575
|
+
globalFilter: () => !0,
|
|
576
|
+
sorting: (e) => Ct(e, (e) => Tt(e) && typeof bt(e, "desc") == "boolean"),
|
|
577
|
+
pagination: (e) => {
|
|
578
|
+
let t = bt(e, "pageIndex"), n = bt(e, "pageSize");
|
|
579
|
+
return St(t) && t >= 0 && St(n) && n > 0;
|
|
580
|
+
},
|
|
581
|
+
expanded: (e) => e === !0 || wt(e, (e) => typeof e == "boolean"),
|
|
582
|
+
columnVisibility: (e) => wt(e, (e) => typeof e == "boolean"),
|
|
583
|
+
columnSizing: (e) => wt(e, St),
|
|
584
|
+
columnOrder: (e) => Ct(e, xt),
|
|
585
|
+
columnPinning: (e) => Ct(bt(e, "left"), xt) && Ct(bt(e, "right"), xt),
|
|
586
|
+
grouping: (e) => Ct(e, xt)
|
|
587
|
+
};
|
|
588
|
+
function Dt(e, t) {
|
|
589
|
+
let n = Et[e];
|
|
590
|
+
return n === void 0 || n(t);
|
|
591
|
+
}
|
|
592
|
+
function Ot(e, t, n) {
|
|
593
|
+
if (!e || !t) return {};
|
|
594
|
+
try {
|
|
595
|
+
let r = e.getItem(t.key);
|
|
596
|
+
if (!r) return {};
|
|
597
|
+
let i = n(r);
|
|
598
|
+
if (typeof i != "object" || !i) return {};
|
|
599
|
+
let a = i, o = {};
|
|
600
|
+
for (let e of t.slices) e in a && Dt(e, a[e]) && (o[e] = a[e]);
|
|
601
|
+
return o;
|
|
602
|
+
} catch {
|
|
603
|
+
return {};
|
|
604
|
+
}
|
|
605
|
+
}
|
|
606
|
+
function kt(e, t, n, r) {
|
|
607
|
+
if (!e || !t) return;
|
|
608
|
+
let i = {};
|
|
609
|
+
for (let e of t.slices) i[e] = n[e];
|
|
610
|
+
try {
|
|
611
|
+
e.setItem(t.key, r(i));
|
|
612
|
+
} catch {}
|
|
613
|
+
}
|
|
614
|
+
function At(e) {
|
|
615
|
+
return {
|
|
616
|
+
data: vt(e?.dataKey, gt),
|
|
617
|
+
settings: vt(e?.settingsKey, _t)
|
|
618
|
+
};
|
|
619
|
+
}
|
|
620
|
+
function jt(e) {
|
|
621
|
+
let { data: t, settings: n } = At(e);
|
|
622
|
+
return t !== null || n !== null;
|
|
623
|
+
}
|
|
624
|
+
var Mt = (e) => JSON.parse(e), Nt = (e) => JSON.stringify(e);
|
|
625
|
+
function Pt(e) {
|
|
626
|
+
let t = yt(e), { data: n, settings: r } = At(e), i = e?.deserialize ?? Mt;
|
|
627
|
+
return {
|
|
628
|
+
...Ot(t, r, i),
|
|
629
|
+
...Ot(t, n, i)
|
|
630
|
+
};
|
|
631
|
+
}
|
|
632
|
+
function Ft(e, t) {
|
|
633
|
+
let n = yt(t);
|
|
634
|
+
if (!n) return;
|
|
635
|
+
let { data: r, settings: i } = At(t), a = t?.serialize ?? Nt;
|
|
636
|
+
kt(n, r, e, a), kt(n, i, e, a);
|
|
637
|
+
}
|
|
349
638
|
//#endregion
|
|
350
639
|
//#region src/tmdatagrid/core/capabilities.ts
|
|
351
|
-
function
|
|
640
|
+
function It(e) {
|
|
641
|
+
let t = e.selectionMode ?? "checkbox", n = t !== "highlight" && e.enableRowSelection !== !1;
|
|
352
642
|
return {
|
|
353
643
|
sorting: e.enableSorting !== !1,
|
|
354
644
|
filtering: e.enableColumnFilters !== !1,
|
|
@@ -356,246 +646,109 @@ function Ye(e) {
|
|
|
356
646
|
pinning: e.enableColumnPinning !== !1,
|
|
357
647
|
resizing: e.enableColumnResizing !== !1,
|
|
358
648
|
ordering: e.enableColumnOrdering !== !1,
|
|
359
|
-
rowSelection:
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
649
|
+
rowSelection: n,
|
|
650
|
+
selectionMode: t,
|
|
651
|
+
selectColumn: n && (t === "checkbox" || t === "checkboxAndHighlight"),
|
|
652
|
+
rowClickSelects: n && t === "row",
|
|
653
|
+
multiRowSelection: e.enableMultiRowSelection !== !1,
|
|
654
|
+
showSelectedBackground: e.showSelectedBackground ?? t === "row",
|
|
655
|
+
highlightRow: t === "checkboxAndHighlight" || t === "highlight",
|
|
656
|
+
pagination: e.enablePagination === !0 || e.manualPagination === !0,
|
|
657
|
+
grouping: e.enableGrouping ?? e.manualPagination !== !0
|
|
363
658
|
};
|
|
364
659
|
}
|
|
365
|
-
function
|
|
660
|
+
function Lt(e, t) {
|
|
366
661
|
return {
|
|
367
662
|
canSort: t.sorting && e.getCanSort(),
|
|
368
663
|
canFilter: t.filtering && e.getCanFilter(),
|
|
369
664
|
canHide: t.hiding && e.getCanHide(),
|
|
370
665
|
canPin: t.pinning && e.getCanPin(),
|
|
371
666
|
canResize: t.resizing && e.getCanResize(),
|
|
372
|
-
canReorder: t.ordering &&
|
|
667
|
+
canReorder: t.ordering && Fe(e),
|
|
668
|
+
canGroup: t.grouping && e.getCanGroup()
|
|
373
669
|
};
|
|
374
670
|
}
|
|
375
|
-
function
|
|
376
|
-
let n = e.getAllLeafColumns(), r = (e) => n.some((n) => e(
|
|
671
|
+
function Rt(e, t) {
|
|
672
|
+
let n = e.getAllLeafColumns(), r = (e) => n.some((n) => e(Lt(n, t)));
|
|
377
673
|
return {
|
|
378
674
|
canSortAny: r((e) => e.canSort),
|
|
379
675
|
canFilterAny: r((e) => e.canFilter),
|
|
380
676
|
canHideAny: r((e) => e.canHide),
|
|
381
677
|
canPinAny: r((e) => e.canPin),
|
|
382
678
|
canReorderAny: r((e) => e.canReorder),
|
|
679
|
+
canGroupAny: r((e) => e.canGroup),
|
|
383
680
|
canSelectRows: t.rowSelection,
|
|
384
681
|
canPaginate: t.pagination
|
|
385
682
|
};
|
|
386
683
|
}
|
|
387
684
|
//#endregion
|
|
388
|
-
//#region src/tmdatagrid/
|
|
389
|
-
function
|
|
390
|
-
|
|
391
|
-
return {
|
|
392
|
-
pageIndex: t,
|
|
393
|
-
pageSize: n,
|
|
394
|
-
pageCount: e.getPageCount(),
|
|
395
|
-
rowCount: e.getRowCount(),
|
|
396
|
-
canPreviousPage: e.getCanPreviousPage(),
|
|
397
|
-
canNextPage: e.getCanNextPage(),
|
|
398
|
-
setPageIndex: (t) => e.setPageIndex(t),
|
|
399
|
-
setPageSize: (t) => e.setPageSize(t),
|
|
400
|
-
previousPage: () => e.previousPage(),
|
|
401
|
-
nextPage: () => e.nextPage(),
|
|
402
|
-
firstPage: () => e.firstPage(),
|
|
403
|
-
lastPage: () => e.lastPage()
|
|
404
|
-
};
|
|
405
|
-
}
|
|
406
|
-
function $e(t) {
|
|
407
|
-
let n = e(50), { pageSizeOptions: r, pagination: i } = t, a = r === void 0 ? [
|
|
408
|
-
10,
|
|
409
|
-
25,
|
|
410
|
-
50,
|
|
411
|
-
100
|
|
412
|
-
] : r, { table: o, features: c, controlSize: l } = q();
|
|
413
|
-
if (x(o.store), !Ze(o, c).canPaginate) return null;
|
|
414
|
-
if (i) {
|
|
415
|
-
let e;
|
|
416
|
-
n[0] !== i || n[1] !== o ? (e = i(Qe(o)), n[0] = i, n[1] = o, n[2] = e) : e = n[2];
|
|
417
|
-
let t;
|
|
418
|
-
return n[3] === e ? t = n[4] : (t = /* @__PURE__ */ L("div", {
|
|
419
|
-
className: Je.footer,
|
|
420
|
-
children: e
|
|
421
|
-
}), n[3] = e, n[4] = t), t;
|
|
422
|
-
}
|
|
423
|
-
let { pageIndex: d, pageSize: f } = o.store.state.pagination, p;
|
|
424
|
-
n[5] === o ? p = n[6] : (p = o.getRowCount(), n[5] = o, n[6] = p);
|
|
425
|
-
let m = p, g = m === 0 ? 0 : d * f + 1, v = Math.min(m, (d + 1) * f), y = a.includes(f) ? a : [...a, f].sort(et), b;
|
|
426
|
-
n[7] === l ? b = n[8] : (b = /* @__PURE__ */ L(_, {
|
|
427
|
-
size: l,
|
|
428
|
-
c: "dimmed",
|
|
429
|
-
children: "Rows per page:"
|
|
430
|
-
}), n[7] = l, n[8] = b);
|
|
431
|
-
let S;
|
|
432
|
-
n[9] === y ? S = n[10] : (S = y.map(String), n[9] = y, n[10] = S);
|
|
433
|
-
let C = String(f), w;
|
|
434
|
-
n[11] !== a || n[12] !== o ? (w = (e) => {
|
|
435
|
-
o.setPageSize(Number(e) || a[0]), o.setPageIndex(0);
|
|
436
|
-
}, n[11] = a, n[12] = o, n[13] = w) : w = n[13];
|
|
437
|
-
let T;
|
|
438
|
-
n[14] !== l || n[15] !== S || n[16] !== C || n[17] !== w ? (T = /* @__PURE__ */ L(h, {
|
|
439
|
-
size: l,
|
|
440
|
-
w: 78,
|
|
441
|
-
allowDeselect: !1,
|
|
442
|
-
variant: "unstyled",
|
|
443
|
-
data: S,
|
|
444
|
-
value: C,
|
|
445
|
-
onChange: w
|
|
446
|
-
}), n[14] = l, n[15] = S, n[16] = C, n[17] = w, n[18] = T) : T = n[18];
|
|
447
|
-
let E;
|
|
448
|
-
n[19] !== b || n[20] !== T ? (E = /* @__PURE__ */ R(u, {
|
|
449
|
-
gap: "xs",
|
|
450
|
-
wrap: "nowrap",
|
|
451
|
-
children: [b, T]
|
|
452
|
-
}), n[19] = b, n[20] = T, n[21] = E) : E = n[21];
|
|
453
|
-
let D;
|
|
454
|
-
n[22] !== l || n[23] !== g || n[24] !== v || n[25] !== m ? (D = /* @__PURE__ */ R(_, {
|
|
455
|
-
size: l,
|
|
456
|
-
c: "dimmed",
|
|
457
|
-
children: [
|
|
458
|
-
g,
|
|
459
|
-
"–",
|
|
460
|
-
v,
|
|
461
|
-
" of ",
|
|
462
|
-
m
|
|
463
|
-
]
|
|
464
|
-
}), n[22] = l, n[23] = g, n[24] = v, n[25] = m, n[26] = D) : D = n[26];
|
|
465
|
-
let A;
|
|
466
|
-
n[27] === o ? A = n[28] : (A = o.getCanPreviousPage(), n[27] = o, n[28] = A);
|
|
467
|
-
let j = !A, M;
|
|
468
|
-
n[29] === o ? M = n[30] : (M = () => o.previousPage(), n[29] = o, n[30] = M);
|
|
469
|
-
let N;
|
|
470
|
-
n[31] === Symbol.for("react.memo_cache_sentinel") ? (N = /* @__PURE__ */ L(O, {
|
|
471
|
-
size: 18,
|
|
472
|
-
stroke: 1.6
|
|
473
|
-
}), n[31] = N) : N = n[31];
|
|
474
|
-
let P;
|
|
475
|
-
n[32] !== j || n[33] !== M ? (P = /* @__PURE__ */ L(s, {
|
|
476
|
-
variant: "subtle",
|
|
477
|
-
color: "gray",
|
|
478
|
-
"aria-label": "Previous page",
|
|
479
|
-
disabled: j,
|
|
480
|
-
onClick: M,
|
|
481
|
-
children: N
|
|
482
|
-
}), n[32] = j, n[33] = M, n[34] = P) : P = n[34];
|
|
483
|
-
let F;
|
|
484
|
-
n[35] === o ? F = n[36] : (F = o.getCanNextPage(), n[35] = o, n[36] = F);
|
|
485
|
-
let ee = !F, I;
|
|
486
|
-
n[37] === o ? I = n[38] : (I = () => o.nextPage(), n[37] = o, n[38] = I);
|
|
487
|
-
let z;
|
|
488
|
-
n[39] === Symbol.for("react.memo_cache_sentinel") ? (z = /* @__PURE__ */ L(k, {
|
|
489
|
-
size: 18,
|
|
490
|
-
stroke: 1.6
|
|
491
|
-
}), n[39] = z) : z = n[39];
|
|
492
|
-
let B;
|
|
493
|
-
n[40] !== ee || n[41] !== I ? (B = /* @__PURE__ */ L(s, {
|
|
494
|
-
variant: "subtle",
|
|
495
|
-
color: "gray",
|
|
496
|
-
"aria-label": "Next page",
|
|
497
|
-
disabled: ee,
|
|
498
|
-
onClick: I,
|
|
499
|
-
children: z
|
|
500
|
-
}), n[40] = ee, n[41] = I, n[42] = B) : B = n[42];
|
|
501
|
-
let V;
|
|
502
|
-
n[43] !== P || n[44] !== B ? (V = /* @__PURE__ */ R(u, {
|
|
503
|
-
gap: 4,
|
|
504
|
-
wrap: "nowrap",
|
|
505
|
-
children: [P, B]
|
|
506
|
-
}), n[43] = P, n[44] = B, n[45] = V) : V = n[45];
|
|
507
|
-
let H;
|
|
508
|
-
return n[46] !== V || n[47] !== E || n[48] !== D ? (H = /* @__PURE__ */ R("div", {
|
|
509
|
-
className: Je.footer,
|
|
510
|
-
children: [
|
|
511
|
-
E,
|
|
512
|
-
D,
|
|
513
|
-
V
|
|
514
|
-
]
|
|
515
|
-
}), n[46] = V, n[47] = E, n[48] = D, n[49] = H) : H = n[49], H;
|
|
516
|
-
}
|
|
517
|
-
function et(e, t) {
|
|
518
|
-
return e - t;
|
|
519
|
-
}
|
|
520
|
-
var X = {
|
|
521
|
-
tableWrapper: "_tableWrapper_utldp_2",
|
|
522
|
-
scrollContainer: "_scrollContainer_utldp_10",
|
|
523
|
-
grid: "_grid_utldp_18",
|
|
524
|
-
headerRow: "_headerRow_utldp_24",
|
|
525
|
-
bodyRow: "_bodyRow_utldp_33",
|
|
526
|
-
bodyCell: "_bodyCell_utldp_65",
|
|
527
|
-
cellContent: "_cellContent_utldp_63",
|
|
528
|
-
messageRow: "_messageRow_utldp_95"
|
|
529
|
-
}, tt = {
|
|
530
|
-
stickyLeft: "_stickyLeft_1iqrf_11",
|
|
531
|
-
stickyRight: "_stickyRight_1iqrf_15"
|
|
532
|
-
}, Z = {
|
|
533
|
-
headerCell: "_headerCell_1oqkm_1",
|
|
534
|
-
headerTitle: "_headerTitle_1oqkm_25",
|
|
535
|
-
headerActions: "_headerActions_1oqkm_48",
|
|
536
|
-
headerAction: "_headerAction_1oqkm_48",
|
|
537
|
-
headerCellSortable: "_headerCellSortable_1oqkm_77",
|
|
538
|
-
headerCellDragging: "_headerCellDragging_1oqkm_84",
|
|
539
|
-
headerCellDropBefore: "_headerCellDropBefore_1oqkm_88",
|
|
540
|
-
headerCellDropAfter: "_headerCellDropAfter_1oqkm_89",
|
|
541
|
-
columnSeparator: "_columnSeparator_1oqkm_109",
|
|
542
|
-
columnSeparatorResizable: "_columnSeparatorResizable_1oqkm_121",
|
|
543
|
-
columnSeparatorActive: "_columnSeparatorActive_1oqkm_144",
|
|
544
|
-
menuItemActive: "_menuItemActive_1oqkm_150"
|
|
545
|
-
};
|
|
546
|
-
//#endregion
|
|
547
|
-
//#region src/tmdatagrid/core/columnOrdering.ts
|
|
548
|
-
function nt(e, t) {
|
|
549
|
-
return e.left.includes(t) ? "left" : e.right.includes(t) ? "right" : "center";
|
|
550
|
-
}
|
|
551
|
-
function rt(e, t, n, r) {
|
|
552
|
-
let i = e.filter((e) => e !== t), a = i.indexOf(n);
|
|
553
|
-
return a === -1 ? [...e] : (i.splice(r === "before" ? a : a + 1, 0, t), i);
|
|
554
|
-
}
|
|
555
|
-
function it({ table: e, columnId: t, targetId: n, side: r }) {
|
|
556
|
-
if (t === n) return;
|
|
557
|
-
let i = e.store.state.columnPinning, a = nt(i, t);
|
|
558
|
-
if (a !== nt(i, n)) return;
|
|
559
|
-
let o = e.getAllLeafColumns().map((e) => e.id);
|
|
560
|
-
e.setColumnOrder(rt(o, t, n, r)), a !== "center" && e.setColumnPinning((e) => ({
|
|
561
|
-
...e,
|
|
562
|
-
[a]: rt(e[a], t, n, r)
|
|
563
|
-
}));
|
|
685
|
+
//#region src/tmdatagrid/core/rowSelection.ts
|
|
686
|
+
function zt(e, t) {
|
|
687
|
+
return Bt(e, t) ? e.getPaginatedRowModel().rows : e.getPrePaginatedRowModel().rows;
|
|
564
688
|
}
|
|
565
|
-
function
|
|
566
|
-
return t
|
|
689
|
+
function Bt(e, t) {
|
|
690
|
+
return t.pagination && e.store.state.grouping.length === 0;
|
|
567
691
|
}
|
|
568
|
-
function
|
|
569
|
-
|
|
570
|
-
if (i === -1) return null;
|
|
571
|
-
let a = r[i + n];
|
|
572
|
-
return !a || !Ee(a) ? null : a;
|
|
692
|
+
function Vt(e) {
|
|
693
|
+
return Le(e).filter((e) => e.getCanSelect()).map((e) => e.id);
|
|
573
694
|
}
|
|
574
|
-
function
|
|
575
|
-
let
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
}
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
695
|
+
function Ht({ rows: e, rowId: t, anchorRowId: n, modifiers: r, selection: i, canReplaceSelection: a }) {
|
|
696
|
+
let o = e.findIndex((e) => e.id === t), s = e[o];
|
|
697
|
+
if (o === -1 || s === void 0) return {
|
|
698
|
+
selection: i,
|
|
699
|
+
anchorRowId: n
|
|
700
|
+
};
|
|
701
|
+
let c = Vt(s);
|
|
702
|
+
if (c.length === 0) return {
|
|
703
|
+
selection: i,
|
|
704
|
+
anchorRowId: n
|
|
705
|
+
};
|
|
706
|
+
if (!s.getCanMultiSelect()) {
|
|
707
|
+
let e = c.length === 1 ? c[0] : void 0;
|
|
708
|
+
return e === void 0 ? {
|
|
709
|
+
selection: i,
|
|
710
|
+
anchorRowId: n
|
|
711
|
+
} : {
|
|
712
|
+
selection: !a && i[e] === !0 ? {} : { [e]: !0 },
|
|
713
|
+
anchorRowId: t
|
|
714
|
+
};
|
|
715
|
+
}
|
|
716
|
+
let l = n === null ? -1 : e.findIndex((e) => e.id === n);
|
|
717
|
+
if (r.extend && l !== -1) {
|
|
718
|
+
let t = Math.min(l, o), s = Math.max(l, o), c = r.toggle || !a ? { ...i } : {};
|
|
719
|
+
for (let n of e.slice(t, s + 1)) for (let e of Vt(n)) c[e] = !0;
|
|
720
|
+
return {
|
|
721
|
+
selection: c,
|
|
722
|
+
anchorRowId: n
|
|
723
|
+
};
|
|
724
|
+
}
|
|
725
|
+
if (r.toggle || !a) {
|
|
726
|
+
let e = { ...i }, n = c.every((e) => i[e] === !0);
|
|
727
|
+
for (let t of c) n ? delete e[t] : e[t] = !0;
|
|
728
|
+
return {
|
|
729
|
+
selection: e,
|
|
730
|
+
anchorRowId: t
|
|
731
|
+
};
|
|
732
|
+
}
|
|
733
|
+
let u = {};
|
|
734
|
+
for (let e of c) u[e] = !0;
|
|
735
|
+
return {
|
|
736
|
+
selection: u,
|
|
737
|
+
anchorRowId: t
|
|
738
|
+
};
|
|
586
739
|
}
|
|
587
740
|
//#endregion
|
|
588
741
|
//#region src/tmdatagrid/components/TMDataGridSelectColumn.tsx
|
|
589
|
-
var
|
|
590
|
-
function
|
|
742
|
+
var Ut = "__select__";
|
|
743
|
+
function Wt(t) {
|
|
591
744
|
let n = e(10), { table: r } = t, i;
|
|
592
745
|
n[0] === r ? i = n[1] : (i = () => r.getIsAllRowsSelected(), n[0] = r, n[1] = i);
|
|
593
|
-
let a =
|
|
746
|
+
let a = C(r.store, i), o;
|
|
594
747
|
n[2] === r ? o = n[3] : (o = () => r.getIsSomeRowsSelected(), n[2] = r, n[3] = o);
|
|
595
|
-
let s =
|
|
748
|
+
let s = C(r.store, o) && !a, c;
|
|
596
749
|
n[4] === r ? c = n[5] : (c = r.getToggleAllRowsSelectedHandler(), n[4] = r, n[5] = c);
|
|
597
750
|
let u;
|
|
598
|
-
return n[6] !== a || n[7] !== s || n[8] !== c ? (u = /* @__PURE__ */
|
|
751
|
+
return n[6] !== a || n[7] !== s || n[8] !== c ? (u = /* @__PURE__ */ G(l, {
|
|
599
752
|
size: "xs",
|
|
600
753
|
"aria-label": "Select all rows",
|
|
601
754
|
checked: a,
|
|
@@ -603,32 +756,53 @@ function ct(t) {
|
|
|
603
756
|
onChange: c
|
|
604
757
|
}), n[6] = a, n[7] = s, n[8] = c, n[9] = u) : u = n[9], u;
|
|
605
758
|
}
|
|
606
|
-
function
|
|
607
|
-
let n = e(
|
|
608
|
-
|
|
609
|
-
let a
|
|
610
|
-
n[
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
let
|
|
614
|
-
n[
|
|
615
|
-
let
|
|
616
|
-
|
|
759
|
+
function Gt(t) {
|
|
760
|
+
let n = e(2), { table: r } = t, { features: i } = je();
|
|
761
|
+
if (!i.multiRowSelection) return null;
|
|
762
|
+
let a;
|
|
763
|
+
return n[0] === r ? a = n[1] : (a = /* @__PURE__ */ G(Wt, { table: r }), n[0] = r, n[1] = a), a;
|
|
764
|
+
}
|
|
765
|
+
function Kt(t) {
|
|
766
|
+
let n = e(19), { row: r } = t, { ui: i, features: a } = je(), o = r.subRows.length > 0, s;
|
|
767
|
+
n[0] !== o || n[1] !== r ? (s = () => o ? r.getIsAllSubRowsSelected() : r.getIsSelected(), n[0] = o, n[1] = r, n[2] = s) : s = n[2];
|
|
768
|
+
let c = C(r.table.store, s), u;
|
|
769
|
+
n[3] === r ? u = n[4] : (u = () => r.getIsSomeSelected(), n[3] = r, n[4] = u);
|
|
770
|
+
let d = C(r.table.store, u), f;
|
|
771
|
+
n[5] === r ? f = n[6] : (f = Vt(r), n[5] = r, n[6] = f);
|
|
772
|
+
let p = f;
|
|
773
|
+
if (o && !r.getCanMultiSelect()) return null;
|
|
774
|
+
let m = o ? "Select group" : "Select row", h = p.length === 0, g = d && !c, _;
|
|
775
|
+
n[7] !== a || n[8] !== r.id || n[9] !== r.table || n[10] !== i.actions || n[11] !== i.state.selectionAnchorRowId ? (_ = (e) => {
|
|
776
|
+
let t = e.nativeEvent, n = t instanceof MouseEvent, o = Ht({
|
|
777
|
+
rows: zt(r.table, a),
|
|
778
|
+
rowId: r.id,
|
|
779
|
+
anchorRowId: i.state.selectionAnchorRowId,
|
|
780
|
+
modifiers: {
|
|
781
|
+
toggle: n && (t.ctrlKey || t.metaKey),
|
|
782
|
+
extend: n && t.shiftKey
|
|
783
|
+
},
|
|
784
|
+
selection: r.table.store.state.rowSelection,
|
|
785
|
+
canReplaceSelection: !1
|
|
786
|
+
});
|
|
787
|
+
r.table.setRowSelection(o.selection), i.actions.setSelectionAnchor(o.anchorRowId);
|
|
788
|
+
}, n[7] = a, n[8] = r.id, n[9] = r.table, n[10] = i.actions, n[11] = i.state.selectionAnchorRowId, n[12] = _) : _ = n[12];
|
|
789
|
+
let v;
|
|
790
|
+
return n[13] !== c || n[14] !== m || n[15] !== h || n[16] !== g || n[17] !== _ ? (v = /* @__PURE__ */ G(l, {
|
|
617
791
|
size: "xs",
|
|
618
|
-
"aria-label":
|
|
619
|
-
checked:
|
|
620
|
-
disabled:
|
|
621
|
-
indeterminate:
|
|
622
|
-
onChange:
|
|
623
|
-
onClick:
|
|
624
|
-
}), n[
|
|
792
|
+
"aria-label": m,
|
|
793
|
+
checked: c,
|
|
794
|
+
disabled: h,
|
|
795
|
+
indeterminate: g,
|
|
796
|
+
onChange: _,
|
|
797
|
+
onClick: qt
|
|
798
|
+
}), n[13] = c, n[14] = m, n[15] = h, n[16] = g, n[17] = _, n[18] = v) : v = n[18], v;
|
|
625
799
|
}
|
|
626
|
-
function
|
|
800
|
+
function qt(e) {
|
|
627
801
|
return e.stopPropagation();
|
|
628
802
|
}
|
|
629
|
-
function
|
|
803
|
+
function Jt() {
|
|
630
804
|
return {
|
|
631
|
-
id:
|
|
805
|
+
id: Ut,
|
|
632
806
|
meta: {
|
|
633
807
|
label: "Checkbox selection",
|
|
634
808
|
align: "center",
|
|
@@ -642,238 +816,189 @@ function dt() {
|
|
|
642
816
|
enableColumnFilter: !1,
|
|
643
817
|
enableGlobalFilter: !1,
|
|
644
818
|
enablePinning: !1,
|
|
645
|
-
header: ({ table: e }) => /* @__PURE__ */
|
|
646
|
-
cell: ({ row: e }) => /* @__PURE__ */
|
|
819
|
+
header: ({ table: e }) => /* @__PURE__ */ G(Gt, { table: e }),
|
|
820
|
+
cell: ({ row: e }) => /* @__PURE__ */ G(Kt, { row: e }),
|
|
821
|
+
aggregatedCell: ({ row: e }) => /* @__PURE__ */ G(Kt, { row: e })
|
|
647
822
|
};
|
|
648
823
|
}
|
|
649
824
|
//#endregion
|
|
650
|
-
//#region src/tmdatagrid/core/persistence.ts
|
|
651
|
-
var ft = [
|
|
652
|
-
"columnFilters",
|
|
653
|
-
"globalFilter",
|
|
654
|
-
"sorting",
|
|
655
|
-
"pagination"
|
|
656
|
-
], pt = [
|
|
657
|
-
"columnVisibility",
|
|
658
|
-
"columnSizing",
|
|
659
|
-
"columnOrder",
|
|
660
|
-
"columnPinning"
|
|
661
|
-
];
|
|
662
|
-
function mt(e, t) {
|
|
663
|
-
if (!e) return null;
|
|
664
|
-
if (typeof e == "string") return {
|
|
665
|
-
key: e,
|
|
666
|
-
slices: t
|
|
667
|
-
};
|
|
668
|
-
let [n, r] = e;
|
|
669
|
-
return n ? {
|
|
670
|
-
key: n,
|
|
671
|
-
slices: r
|
|
672
|
-
} : null;
|
|
673
|
-
}
|
|
674
|
-
function ht(e) {
|
|
675
|
-
if (!e) return null;
|
|
676
|
-
try {
|
|
677
|
-
return typeof window > "u" ? null : e.storageMode === "sessionStorage" ? window.sessionStorage : window.localStorage;
|
|
678
|
-
} catch {
|
|
679
|
-
return null;
|
|
680
|
-
}
|
|
681
|
-
}
|
|
682
|
-
function $(e, t) {
|
|
683
|
-
return typeof e == "object" && e ? e[t] : void 0;
|
|
684
|
-
}
|
|
685
|
-
var gt = (e) => typeof e == "string", _t = (e) => typeof e == "number" && Number.isFinite(e);
|
|
686
|
-
function vt(e, t) {
|
|
687
|
-
return Array.isArray(e) && e.every(t);
|
|
688
|
-
}
|
|
689
|
-
function yt(e, t) {
|
|
690
|
-
return typeof e != "object" || !e || Array.isArray(e) ? !1 : Object.values(e).every(t);
|
|
691
|
-
}
|
|
692
|
-
var bt = (e) => gt($(e, "id")), xt = {
|
|
693
|
-
columnFilters: (e) => vt(e, bt),
|
|
694
|
-
globalFilter: () => !0,
|
|
695
|
-
sorting: (e) => vt(e, (e) => bt(e) && typeof $(e, "desc") == "boolean"),
|
|
696
|
-
pagination: (e) => {
|
|
697
|
-
let t = $(e, "pageIndex"), n = $(e, "pageSize");
|
|
698
|
-
return _t(t) && t >= 0 && _t(n) && n > 0;
|
|
699
|
-
},
|
|
700
|
-
columnVisibility: (e) => yt(e, (e) => typeof e == "boolean"),
|
|
701
|
-
columnSizing: (e) => yt(e, _t),
|
|
702
|
-
columnOrder: (e) => vt(e, gt),
|
|
703
|
-
columnPinning: (e) => vt($(e, "left"), gt) && vt($(e, "right"), gt)
|
|
704
|
-
};
|
|
705
|
-
function St(e, t) {
|
|
706
|
-
let n = xt[e];
|
|
707
|
-
return n === void 0 || n(t);
|
|
708
|
-
}
|
|
709
|
-
function Ct(e, t, n) {
|
|
710
|
-
if (!e || !t) return {};
|
|
711
|
-
try {
|
|
712
|
-
let r = e.getItem(t.key);
|
|
713
|
-
if (!r) return {};
|
|
714
|
-
let i = n(r);
|
|
715
|
-
if (typeof i != "object" || !i) return {};
|
|
716
|
-
let a = i, o = {};
|
|
717
|
-
for (let e of t.slices) e in a && St(e, a[e]) && (o[e] = a[e]);
|
|
718
|
-
return o;
|
|
719
|
-
} catch {
|
|
720
|
-
return {};
|
|
721
|
-
}
|
|
722
|
-
}
|
|
723
|
-
function wt(e, t, n, r) {
|
|
724
|
-
if (!e || !t) return;
|
|
725
|
-
let i = {};
|
|
726
|
-
for (let e of t.slices) i[e] = n[e];
|
|
727
|
-
try {
|
|
728
|
-
e.setItem(t.key, r(i));
|
|
729
|
-
} catch {}
|
|
730
|
-
}
|
|
731
|
-
function Tt(e) {
|
|
732
|
-
return {
|
|
733
|
-
data: mt(e?.dataKey, ft),
|
|
734
|
-
settings: mt(e?.settingsKey, pt)
|
|
735
|
-
};
|
|
736
|
-
}
|
|
737
|
-
function Et(e) {
|
|
738
|
-
let { data: t, settings: n } = Tt(e);
|
|
739
|
-
return t !== null || n !== null;
|
|
740
|
-
}
|
|
741
|
-
var Dt = (e) => JSON.parse(e), Ot = (e) => JSON.stringify(e);
|
|
742
|
-
function kt(e) {
|
|
743
|
-
let t = ht(e), { data: n, settings: r } = Tt(e), i = e?.deserialize ?? Dt;
|
|
744
|
-
return {
|
|
745
|
-
...Ct(t, r, i),
|
|
746
|
-
...Ct(t, n, i)
|
|
747
|
-
};
|
|
748
|
-
}
|
|
749
|
-
function At(e, t) {
|
|
750
|
-
let n = ht(t);
|
|
751
|
-
if (!n) return;
|
|
752
|
-
let { data: r, settings: i } = Tt(t), a = t?.serialize ?? Ot;
|
|
753
|
-
wt(n, r, e, a), wt(n, i, e, a);
|
|
754
|
-
}
|
|
755
|
-
//#endregion
|
|
756
825
|
//#region src/tmdatagrid/useTMDataGrid.tsx
|
|
757
|
-
var
|
|
758
|
-
columnFilteringFeature:
|
|
759
|
-
globalFilteringFeature:
|
|
760
|
-
rowSortingFeature:
|
|
761
|
-
rowPaginationFeature:
|
|
762
|
-
rowSelectionFeature:
|
|
763
|
-
columnPinningFeature:
|
|
764
|
-
columnVisibilityFeature:
|
|
765
|
-
columnOrderingFeature:
|
|
766
|
-
columnSizingFeature:
|
|
767
|
-
columnResizingFeature:
|
|
768
|
-
columnFacetingFeature:
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
826
|
+
var Yt = 200, Xt = we({
|
|
827
|
+
columnFilteringFeature: te,
|
|
828
|
+
globalFilteringFeature: _e,
|
|
829
|
+
rowSortingFeature: Se,
|
|
830
|
+
rowPaginationFeature: be,
|
|
831
|
+
rowSelectionFeature: xe,
|
|
832
|
+
columnPinningFeature: ie,
|
|
833
|
+
columnVisibilityFeature: se,
|
|
834
|
+
columnOrderingFeature: re,
|
|
835
|
+
columnSizingFeature: oe,
|
|
836
|
+
columnResizingFeature: ae,
|
|
837
|
+
columnFacetingFeature: J,
|
|
838
|
+
columnGroupingFeature: ne,
|
|
839
|
+
rowExpandingFeature: ye,
|
|
840
|
+
filteredRowModel: de(),
|
|
841
|
+
groupedRowModel: fe(),
|
|
842
|
+
sortedRowModel: me(),
|
|
843
|
+
expandedRowModel: ce(),
|
|
844
|
+
paginatedRowModel: pe(),
|
|
845
|
+
facetedRowModel: X(),
|
|
846
|
+
facetedMinMaxValues: le(),
|
|
847
|
+
facetedUniqueValues: ue(),
|
|
775
848
|
filterFns: {
|
|
776
|
-
...
|
|
777
|
-
tmDataGrid:
|
|
849
|
+
...he,
|
|
850
|
+
tmDataGrid: ot
|
|
778
851
|
},
|
|
779
|
-
sortFns:
|
|
780
|
-
|
|
781
|
-
|
|
852
|
+
sortFns: Ce,
|
|
853
|
+
aggregationFns: q,
|
|
854
|
+
tableMeta: ve(),
|
|
855
|
+
columnMeta: ve()
|
|
782
856
|
});
|
|
783
|
-
function
|
|
784
|
-
return
|
|
857
|
+
function Zt() {
|
|
858
|
+
return Y();
|
|
785
859
|
}
|
|
786
|
-
function
|
|
860
|
+
function Qt(e) {
|
|
787
861
|
return e.map((e) => "columns" in e && Array.isArray(e.columns) ? {
|
|
788
862
|
...e,
|
|
789
|
-
columns:
|
|
863
|
+
columns: Qt(e.columns)
|
|
790
864
|
} : {
|
|
791
865
|
filterFn: "tmDataGrid",
|
|
866
|
+
aggregationFn: void 0,
|
|
867
|
+
aggregatedCell: void 0,
|
|
792
868
|
...e
|
|
793
869
|
});
|
|
794
870
|
}
|
|
795
|
-
function
|
|
796
|
-
let n = e(
|
|
797
|
-
n[0]
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
let
|
|
808
|
-
n[
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
871
|
+
function $t(t) {
|
|
872
|
+
let n = e(76), r, s, c, l, u;
|
|
873
|
+
if (n[0] !== t) {
|
|
874
|
+
let { persist: e, enableColumnOrdering: i, enablePagination: a, selectionMode: o, showSelectedBackground: d, defaultHighlightedRowId: f, onHighlightedRowChange: p, ...m } = t;
|
|
875
|
+
l = e, r = f, s = p, c = m, u = It({
|
|
876
|
+
...c,
|
|
877
|
+
enableColumnOrdering: i,
|
|
878
|
+
enablePagination: a,
|
|
879
|
+
selectionMode: o,
|
|
880
|
+
showSelectedBackground: d
|
|
881
|
+
}), n[0] = t, n[1] = r, n[2] = s, n[3] = c, n[4] = l, n[5] = u;
|
|
882
|
+
} else r = n[1], s = n[2], c = n[3], l = n[4], u = n[5];
|
|
883
|
+
let d = u, f = c.enableColumnPinning !== !1, p = d.selectColumn, m = d.grouping, h;
|
|
884
|
+
if (n[6] !== m || n[7] !== c.columns || n[8] !== p) {
|
|
885
|
+
let e = Qt(c.columns), t;
|
|
886
|
+
n[10] === p ? t = n[11] : (t = p ? [Jt()] : [], n[10] = p, n[11] = t);
|
|
887
|
+
let r;
|
|
888
|
+
n[12] === m ? r = n[13] : (r = m ? [Ue()] : [], n[12] = m, n[13] = r), h = [
|
|
889
|
+
...t,
|
|
890
|
+
...r,
|
|
891
|
+
...e
|
|
892
|
+
], n[6] = m, n[7] = c.columns, n[8] = p, n[9] = h;
|
|
893
|
+
} else h = n[9];
|
|
894
|
+
let g = h, _;
|
|
895
|
+
n[14] === l ? _ = n[15] : (_ = () => Pt(l), n[14] = l, n[15] = _);
|
|
896
|
+
let [v] = o(_), y;
|
|
897
|
+
n[16] !== c.initialState?.grouping || n[17] !== v.grouping ? (y = v.grouping ?? c.initialState?.grouping ?? [], n[16] = c.initialState?.grouping, n[17] = v.grouping, n[18] = y) : y = n[18];
|
|
898
|
+
let b = y, x = g, C = c.initialState?.columnVisibility, w;
|
|
899
|
+
n[19] !== m || n[20] !== b ? (w = m ? { [Re]: b.length > 0 } : {}, n[19] = m, n[20] = b, n[21] = w) : w = n[21];
|
|
900
|
+
let T;
|
|
901
|
+
n[22] !== v.columnVisibility || n[23] !== C || n[24] !== w ? (T = {
|
|
902
|
+
...C,
|
|
903
|
+
...v.columnVisibility,
|
|
904
|
+
...w
|
|
905
|
+
}, n[22] = v.columnVisibility, n[23] = C, n[24] = w, n[25] = T) : T = n[25];
|
|
906
|
+
let E;
|
|
907
|
+
n[26] !== f || n[27] !== p ? (E = p && f ? [Ut] : [], n[26] = f, n[27] = p, n[28] = E) : E = n[28];
|
|
908
|
+
let D;
|
|
909
|
+
n[29] !== m || n[30] !== f ? (D = m && f ? [Re] : [], n[29] = m, n[30] = f, n[31] = D) : D = n[31];
|
|
910
|
+
let O;
|
|
911
|
+
n[32] !== c.initialState?.columnPinning?.left || n[33] !== v.columnPinning?.left || n[34] !== D || n[35] !== E ? (O = [
|
|
912
|
+
...E,
|
|
913
|
+
...D,
|
|
914
|
+
...(v.columnPinning?.left ?? c.initialState?.columnPinning?.left ?? []).filter(on)
|
|
915
|
+
], n[32] = c.initialState?.columnPinning?.left, n[33] = v.columnPinning?.left, n[34] = D, n[35] = E, n[36] = O) : O = n[36];
|
|
916
|
+
let k;
|
|
917
|
+
n[37] !== c.initialState?.columnPinning?.right || n[38] !== v.columnPinning?.right ? (k = v.columnPinning?.right ?? c.initialState?.columnPinning?.right ?? [], n[37] = c.initialState?.columnPinning?.right, n[38] = v.columnPinning?.right, n[39] = k) : k = n[39];
|
|
918
|
+
let A;
|
|
919
|
+
n[40] !== O || n[41] !== k ? (A = {
|
|
920
|
+
left: O,
|
|
921
|
+
right: k
|
|
922
|
+
}, n[40] = O, n[41] = k, n[42] = A) : A = n[42];
|
|
923
|
+
let j = c.initialState?.pagination, M;
|
|
924
|
+
n[43] !== v.pagination || n[44] !== j ? (M = {
|
|
818
925
|
pageIndex: 0,
|
|
819
926
|
pageSize: 25,
|
|
820
|
-
...
|
|
821
|
-
...
|
|
822
|
-
}, n[
|
|
823
|
-
let
|
|
824
|
-
n[
|
|
927
|
+
...j,
|
|
928
|
+
...v.pagination
|
|
929
|
+
}, n[43] = v.pagination, n[44] = j, n[45] = M) : M = n[45];
|
|
930
|
+
let N;
|
|
931
|
+
n[46] !== c.initialState || n[47] !== v || n[48] !== A || n[49] !== M || n[50] !== T ? (N = {
|
|
825
932
|
...c.initialState,
|
|
826
|
-
...
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
933
|
+
...v,
|
|
934
|
+
columnVisibility: T,
|
|
935
|
+
columnPinning: A,
|
|
936
|
+
pagination: M
|
|
937
|
+
}, n[46] = c.initialState, n[47] = v, n[48] = A, n[49] = M, n[50] = T, n[51] = N) : N = n[51];
|
|
938
|
+
let P;
|
|
939
|
+
n[52] !== c || n[53] !== N || n[54] !== x ? (P = {
|
|
832
940
|
columnResizeMode: "onChange",
|
|
833
941
|
enableSorting: !0,
|
|
834
942
|
enableColumnResizing: !0,
|
|
835
943
|
globalFilterFn: "includesString",
|
|
944
|
+
groupedColumnMode: "remove",
|
|
836
945
|
...c,
|
|
837
|
-
features:
|
|
838
|
-
columns:
|
|
839
|
-
initialState:
|
|
840
|
-
}, n[
|
|
841
|
-
let
|
|
842
|
-
n[
|
|
843
|
-
if (!
|
|
844
|
-
|
|
946
|
+
features: Xt,
|
|
947
|
+
columns: x,
|
|
948
|
+
initialState: N
|
|
949
|
+
}, n[52] = c, n[53] = N, n[54] = x, n[55] = P) : P = n[55];
|
|
950
|
+
let F = Te(P), I, L;
|
|
951
|
+
n[56] !== m || n[57] !== F ? (I = () => {
|
|
952
|
+
if (!m) return;
|
|
953
|
+
let e = F.store.state.grouping, t = F.store.subscribe((t) => {
|
|
954
|
+
t.grouping !== e && (e = t.grouping, F.setColumnVisibility((e) => ({
|
|
955
|
+
...e,
|
|
956
|
+
[Re]: t.grouping.length > 0
|
|
957
|
+
})), F.setColumnOrder(an));
|
|
958
|
+
});
|
|
959
|
+
return () => t.unsubscribe();
|
|
960
|
+
}, L = [m, F], n[56] = m, n[57] = F, n[58] = I, n[59] = L) : (I = n[58], L = n[59]), i(I, L);
|
|
961
|
+
let R, z;
|
|
962
|
+
n[60] !== l || n[61] !== F ? (R = () => {
|
|
963
|
+
if (!jt(l)) return;
|
|
964
|
+
Ft(F.store.state, l);
|
|
845
965
|
let e, t = null, n = () => {
|
|
846
|
-
e = void 0, t !== null && (
|
|
847
|
-
}, r =
|
|
848
|
-
t = r, e !== void 0 && clearTimeout(e), e = setTimeout(n,
|
|
966
|
+
e = void 0, t !== null && (Ft(t, l), t = null);
|
|
967
|
+
}, r = F.store.subscribe((r) => {
|
|
968
|
+
t = r, e !== void 0 && clearTimeout(e), e = setTimeout(n, Yt);
|
|
849
969
|
});
|
|
850
970
|
return () => {
|
|
851
971
|
r.unsubscribe(), e !== void 0 && clearTimeout(e), n();
|
|
852
972
|
};
|
|
853
|
-
},
|
|
854
|
-
let
|
|
855
|
-
n[
|
|
973
|
+
}, z = [l, F], n[60] = l, n[61] = F, n[62] = R, n[63] = z) : (R = n[62], z = n[63]), i(R, z);
|
|
974
|
+
let B = r ?? null, V;
|
|
975
|
+
n[64] === B ? V = n[65] : (V = {
|
|
856
976
|
filterPanelOpen: !1,
|
|
857
977
|
columnsPanelOpen: !1,
|
|
858
978
|
filterPanelColumnId: null,
|
|
859
|
-
draggedColumnId: null
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
979
|
+
draggedColumnId: null,
|
|
980
|
+
highlightedRowId: B,
|
|
981
|
+
selectionAnchorRowId: null
|
|
982
|
+
}, n[64] = B, n[65] = V);
|
|
983
|
+
let H = S(V, en), U = a(s), W, ee;
|
|
984
|
+
n[66] === s ? (W = n[67], ee = n[68]) : (W = () => {
|
|
985
|
+
U.current = s;
|
|
986
|
+
}, ee = [s], n[66] = s, n[67] = W, n[68] = ee), i(W, ee);
|
|
987
|
+
let G, K;
|
|
988
|
+
n[69] === H ? (G = n[70], K = n[71]) : (G = () => {
|
|
989
|
+
let e = H.state.highlightedRowId, t = H.subscribe((t) => {
|
|
990
|
+
t.highlightedRowId !== e && (e = t.highlightedRowId, U.current?.(t.highlightedRowId));
|
|
991
|
+
});
|
|
992
|
+
return () => t.unsubscribe();
|
|
993
|
+
}, K = [H], n[69] = H, n[70] = G, n[71] = K), i(G, K);
|
|
994
|
+
let q;
|
|
995
|
+
return n[72] !== d || n[73] !== F || n[74] !== H ? (q = {
|
|
996
|
+
table: F,
|
|
997
|
+
ui: H,
|
|
998
|
+
features: d
|
|
999
|
+
}, n[72] = d, n[73] = F, n[74] = H, n[75] = q) : q = n[75], q;
|
|
1000
|
+
}
|
|
1001
|
+
function en(e) {
|
|
877
1002
|
let { setState: t } = e;
|
|
878
1003
|
return {
|
|
879
1004
|
openFilterPanel: (e) => {
|
|
@@ -884,101 +1009,402 @@ function It(e) {
|
|
|
884
1009
|
filterPanelColumnId: n
|
|
885
1010
|
}));
|
|
886
1011
|
},
|
|
887
|
-
closeFilterPanel: () => t(
|
|
1012
|
+
closeFilterPanel: () => t(rn),
|
|
888
1013
|
setColumnsPanelOpen: (e) => t((t) => ({
|
|
889
1014
|
...t,
|
|
890
1015
|
columnsPanelOpen: e
|
|
891
1016
|
})),
|
|
892
|
-
toggleColumnsPanel: () => t(
|
|
1017
|
+
toggleColumnsPanel: () => t(nn),
|
|
893
1018
|
startColumnDrag: (e) => t((t) => ({
|
|
894
1019
|
...t,
|
|
895
1020
|
draggedColumnId: e
|
|
896
1021
|
})),
|
|
897
|
-
endColumnDrag: () => t(
|
|
1022
|
+
endColumnDrag: () => t(tn),
|
|
1023
|
+
setHighlightedRow: (e) => t((t) => ({
|
|
1024
|
+
...t,
|
|
1025
|
+
highlightedRowId: e
|
|
1026
|
+
})),
|
|
1027
|
+
setSelectionAnchor: (e) => t((t) => ({
|
|
1028
|
+
...t,
|
|
1029
|
+
selectionAnchorRowId: e
|
|
1030
|
+
}))
|
|
898
1031
|
};
|
|
899
1032
|
}
|
|
900
|
-
function
|
|
1033
|
+
function tn(e) {
|
|
901
1034
|
return {
|
|
902
1035
|
...e,
|
|
903
1036
|
draggedColumnId: null
|
|
904
1037
|
};
|
|
905
1038
|
}
|
|
906
|
-
function
|
|
1039
|
+
function nn(e) {
|
|
907
1040
|
return {
|
|
908
1041
|
...e,
|
|
909
1042
|
columnsPanelOpen: !e.columnsPanelOpen
|
|
910
1043
|
};
|
|
911
1044
|
}
|
|
912
|
-
function
|
|
1045
|
+
function rn(e) {
|
|
913
1046
|
return {
|
|
914
1047
|
...e,
|
|
915
1048
|
filterPanelOpen: !1,
|
|
916
1049
|
filterPanelColumnId: null
|
|
917
1050
|
};
|
|
918
1051
|
}
|
|
919
|
-
function
|
|
920
|
-
return e
|
|
1052
|
+
function an(e) {
|
|
1053
|
+
return [...e];
|
|
1054
|
+
}
|
|
1055
|
+
function on(e) {
|
|
1056
|
+
return e !== "__select__" && e !== "__group__";
|
|
921
1057
|
}
|
|
922
|
-
function
|
|
1058
|
+
function sn(e, t) {
|
|
923
1059
|
let n = e.table.getColumn(t);
|
|
924
1060
|
n && n.getFilterValue() === void 0 && n.setFilterValue({
|
|
925
|
-
operator:
|
|
1061
|
+
operator: et(n.columnDef.meta?.type ?? "string"),
|
|
926
1062
|
value: ""
|
|
927
1063
|
}), e.ui.actions.openFilterPanel(t);
|
|
928
1064
|
}
|
|
929
1065
|
//#endregion
|
|
1066
|
+
//#region src/tmdatagrid/components/TMDataGridFilterPills.tsx
|
|
1067
|
+
function cn(t) {
|
|
1068
|
+
let n = e(36), { api: r, size: i, showClearAll: a, onPillClick: o, className: s } = t, l = i === void 0 ? "sm" : i, u = a === void 0 || a, { table: d } = r, f = C(d.store, un), m, h, g, _, v, y, b, S;
|
|
1069
|
+
if (n[0] !== r || n[1] !== s || n[2] !== f || n[3] !== o || n[4] !== l || n[5] !== d) {
|
|
1070
|
+
S = Symbol.for("react.early_return_sentinel");
|
|
1071
|
+
bb0: {
|
|
1072
|
+
if (h = f.filter(ln), h.length === 0) {
|
|
1073
|
+
S = null;
|
|
1074
|
+
break bb0;
|
|
1075
|
+
}
|
|
1076
|
+
v = "group", y = "Active filters";
|
|
1077
|
+
let e;
|
|
1078
|
+
n[14] === s ? e = n[15] : (e = [ht.filterPills, s].filter(Boolean), n[14] = s, n[15] = e), b = e.join(" "), m = p.Group, g = l;
|
|
1079
|
+
let t;
|
|
1080
|
+
n[16] !== r || n[17] !== f || n[18] !== o || n[19] !== l || n[20] !== d ? (t = (e) => {
|
|
1081
|
+
let t = d.getColumn(e.id), n = t ? Me(t) : e.id, i = e.value;
|
|
1082
|
+
return nt(i) ? /* @__PURE__ */ G(p, {
|
|
1083
|
+
size: l,
|
|
1084
|
+
className: ht.pill,
|
|
1085
|
+
withRemoveButton: !0,
|
|
1086
|
+
onRemove: () => d.setColumnFilters(f.filter((t) => t.id !== e.id)),
|
|
1087
|
+
removeButtonProps: {
|
|
1088
|
+
"aria-label": `Clear ${n} filter`,
|
|
1089
|
+
"aria-hidden": !1,
|
|
1090
|
+
tabIndex: 0
|
|
1091
|
+
},
|
|
1092
|
+
children: /* @__PURE__ */ G(x, {
|
|
1093
|
+
className: ht.pillLabel,
|
|
1094
|
+
onClick: () => o ? o(e.id) : sn(r, e.id),
|
|
1095
|
+
children: it({
|
|
1096
|
+
label: n,
|
|
1097
|
+
type: t ? Ne(t) : "string",
|
|
1098
|
+
filter: i
|
|
1099
|
+
})
|
|
1100
|
+
})
|
|
1101
|
+
}, e.id) : null;
|
|
1102
|
+
}, n[16] = r, n[17] = f, n[18] = o, n[19] = l, n[20] = d, n[21] = t) : t = n[21], _ = h.map(t);
|
|
1103
|
+
}
|
|
1104
|
+
n[0] = r, n[1] = s, n[2] = f, n[3] = o, n[4] = l, n[5] = d, n[6] = m, n[7] = h, n[8] = g, n[9] = _, n[10] = v, n[11] = y, n[12] = b, n[13] = S;
|
|
1105
|
+
} else m = n[6], h = n[7], g = n[8], _ = n[9], v = n[10], y = n[11], b = n[12], S = n[13];
|
|
1106
|
+
if (S !== Symbol.for("react.early_return_sentinel")) return S;
|
|
1107
|
+
let w;
|
|
1108
|
+
n[22] !== m || n[23] !== g || n[24] !== _ ? (w = /* @__PURE__ */ G(m, {
|
|
1109
|
+
size: g,
|
|
1110
|
+
children: _
|
|
1111
|
+
}), n[22] = m, n[23] = g, n[24] = _, n[25] = w) : w = n[25];
|
|
1112
|
+
let T;
|
|
1113
|
+
n[26] !== h || n[27] !== u || n[28] !== d ? (T = u && h.length > 1 && /* @__PURE__ */ G(c, {
|
|
1114
|
+
variant: "subtle",
|
|
1115
|
+
color: "gray",
|
|
1116
|
+
size: "compact-xs",
|
|
1117
|
+
onClick: () => d.setColumnFilters([]),
|
|
1118
|
+
children: "Clear all"
|
|
1119
|
+
}), n[26] = h, n[27] = u, n[28] = d, n[29] = T) : T = n[29];
|
|
1120
|
+
let E;
|
|
1121
|
+
return n[30] !== T || n[31] !== v || n[32] !== y || n[33] !== b || n[34] !== w ? (E = /* @__PURE__ */ K("div", {
|
|
1122
|
+
role: v,
|
|
1123
|
+
"aria-label": y,
|
|
1124
|
+
className: b,
|
|
1125
|
+
children: [w, T]
|
|
1126
|
+
}), n[30] = T, n[31] = v, n[32] = y, n[33] = b, n[34] = w, n[35] = E) : E = n[35], E;
|
|
1127
|
+
}
|
|
1128
|
+
function ln(e) {
|
|
1129
|
+
return rt(e.value);
|
|
1130
|
+
}
|
|
1131
|
+
function un(e) {
|
|
1132
|
+
return e.columnFilters;
|
|
1133
|
+
}
|
|
1134
|
+
var dn = { footer: "_footer_149ca_1" }, fn = "Paging is off while the rows are grouped: the whole tree is rendered and virtualized. Ungroup to page again.";
|
|
1135
|
+
function pn(e) {
|
|
1136
|
+
let { pageIndex: t, pageSize: n } = e.store.state.pagination;
|
|
1137
|
+
return {
|
|
1138
|
+
pageIndex: t,
|
|
1139
|
+
pageSize: n,
|
|
1140
|
+
pageCount: e.getPageCount(),
|
|
1141
|
+
rowCount: e.getRowCount(),
|
|
1142
|
+
canPreviousPage: e.getCanPreviousPage(),
|
|
1143
|
+
canNextPage: e.getCanNextPage(),
|
|
1144
|
+
setPageIndex: (t) => e.setPageIndex(t),
|
|
1145
|
+
setPageSize: (t) => e.setPageSize(t),
|
|
1146
|
+
previousPage: () => e.previousPage(),
|
|
1147
|
+
nextPage: () => e.nextPage(),
|
|
1148
|
+
firstPage: () => e.firstPage(),
|
|
1149
|
+
lastPage: () => e.lastPage()
|
|
1150
|
+
};
|
|
1151
|
+
}
|
|
1152
|
+
function mn(t) {
|
|
1153
|
+
let n = e(64), { pageSizeOptions: r, pagination: i } = t, a = r === void 0 ? [
|
|
1154
|
+
10,
|
|
1155
|
+
25,
|
|
1156
|
+
50,
|
|
1157
|
+
100
|
|
1158
|
+
] : r, { table: o, features: c, controlSize: l } = je();
|
|
1159
|
+
if (C(o.store), !Rt(o, c).canPaginate) return null;
|
|
1160
|
+
if (i) {
|
|
1161
|
+
let e;
|
|
1162
|
+
n[0] !== i || n[1] !== o ? (e = i(pn(o)), n[0] = i, n[1] = o, n[2] = e) : e = n[2];
|
|
1163
|
+
let t;
|
|
1164
|
+
return n[3] === e ? t = n[4] : (t = /* @__PURE__ */ G("div", {
|
|
1165
|
+
className: dn.footer,
|
|
1166
|
+
children: e
|
|
1167
|
+
}), n[3] = e, n[4] = t), t;
|
|
1168
|
+
}
|
|
1169
|
+
let d;
|
|
1170
|
+
n[5] !== c || n[6] !== o ? (d = Bt(o, c), n[5] = c, n[6] = o, n[7] = d) : d = n[7];
|
|
1171
|
+
let f = d, { pageIndex: p, pageSize: m } = o.store.state.pagination, h;
|
|
1172
|
+
n[8] === o ? h = n[9] : (h = o.getRowCount(), n[8] = o, n[9] = h);
|
|
1173
|
+
let _ = h, y = _ === 0 ? 0 : p * m + 1, x = Math.min(_, (p + 1) * m), S = a.includes(m) ? a : [...a, m].sort(hn), w = !f, T;
|
|
1174
|
+
n[10] === l ? T = n[11] : (T = /* @__PURE__ */ G(v, {
|
|
1175
|
+
size: l,
|
|
1176
|
+
c: "dimmed",
|
|
1177
|
+
children: "Rows per page:"
|
|
1178
|
+
}), n[10] = l, n[11] = T);
|
|
1179
|
+
let E = !f, D;
|
|
1180
|
+
n[12] === S ? D = n[13] : (D = S.map(String), n[12] = S, n[13] = D);
|
|
1181
|
+
let O = String(m), k;
|
|
1182
|
+
n[14] !== a || n[15] !== o ? (k = (e) => {
|
|
1183
|
+
o.setPageSize(Number(e) || a[0]), o.setPageIndex(0);
|
|
1184
|
+
}, n[14] = a, n[15] = o, n[16] = k) : k = n[16];
|
|
1185
|
+
let A;
|
|
1186
|
+
n[17] !== l || n[18] !== E || n[19] !== D || n[20] !== O || n[21] !== k ? (A = /* @__PURE__ */ G(g, {
|
|
1187
|
+
size: l,
|
|
1188
|
+
w: 78,
|
|
1189
|
+
allowDeselect: !1,
|
|
1190
|
+
variant: "unstyled",
|
|
1191
|
+
disabled: E,
|
|
1192
|
+
data: D,
|
|
1193
|
+
value: O,
|
|
1194
|
+
onChange: k
|
|
1195
|
+
}), n[17] = l, n[18] = E, n[19] = D, n[20] = O, n[21] = k, n[22] = A) : A = n[22];
|
|
1196
|
+
let N;
|
|
1197
|
+
n[23] !== A || n[24] !== T ? (N = /* @__PURE__ */ K(u, {
|
|
1198
|
+
gap: "xs",
|
|
1199
|
+
wrap: "nowrap",
|
|
1200
|
+
children: [T, A]
|
|
1201
|
+
}), n[23] = A, n[24] = T, n[25] = N) : N = n[25];
|
|
1202
|
+
let P;
|
|
1203
|
+
n[26] !== y || n[27] !== f || n[28] !== o || n[29] !== x || n[30] !== _ ? (P = f ? /* @__PURE__ */ K(ee, { children: [
|
|
1204
|
+
y,
|
|
1205
|
+
"–",
|
|
1206
|
+
x,
|
|
1207
|
+
" of ",
|
|
1208
|
+
_
|
|
1209
|
+
] }) : /* @__PURE__ */ K(ee, { children: [
|
|
1210
|
+
"Grouped · all ",
|
|
1211
|
+
o.getFilteredRowModel().rows.length,
|
|
1212
|
+
" rows"
|
|
1213
|
+
] }), n[26] = y, n[27] = f, n[28] = o, n[29] = x, n[30] = _, n[31] = P) : P = n[31];
|
|
1214
|
+
let F;
|
|
1215
|
+
n[32] !== l || n[33] !== P ? (F = /* @__PURE__ */ G(v, {
|
|
1216
|
+
size: l,
|
|
1217
|
+
c: "dimmed",
|
|
1218
|
+
children: P
|
|
1219
|
+
}), n[32] = l, n[33] = P, n[34] = F) : F = n[34];
|
|
1220
|
+
let I;
|
|
1221
|
+
n[35] !== f || n[36] !== o ? (I = !f || !o.getCanPreviousPage(), n[35] = f, n[36] = o, n[37] = I) : I = n[37];
|
|
1222
|
+
let L;
|
|
1223
|
+
n[38] === o ? L = n[39] : (L = () => o.previousPage(), n[38] = o, n[39] = L);
|
|
1224
|
+
let R;
|
|
1225
|
+
n[40] === Symbol.for("react.memo_cache_sentinel") ? (R = /* @__PURE__ */ G(j, {
|
|
1226
|
+
size: 18,
|
|
1227
|
+
stroke: 1.6
|
|
1228
|
+
}), n[40] = R) : R = n[40];
|
|
1229
|
+
let z;
|
|
1230
|
+
n[41] !== I || n[42] !== L ? (z = /* @__PURE__ */ G(s, {
|
|
1231
|
+
variant: "subtle",
|
|
1232
|
+
color: "gray",
|
|
1233
|
+
"aria-label": "Previous page",
|
|
1234
|
+
disabled: I,
|
|
1235
|
+
onClick: L,
|
|
1236
|
+
children: R
|
|
1237
|
+
}), n[41] = I, n[42] = L, n[43] = z) : z = n[43];
|
|
1238
|
+
let B;
|
|
1239
|
+
n[44] !== f || n[45] !== o ? (B = !f || !o.getCanNextPage(), n[44] = f, n[45] = o, n[46] = B) : B = n[46];
|
|
1240
|
+
let V;
|
|
1241
|
+
n[47] === o ? V = n[48] : (V = () => o.nextPage(), n[47] = o, n[48] = V);
|
|
1242
|
+
let H;
|
|
1243
|
+
n[49] === Symbol.for("react.memo_cache_sentinel") ? (H = /* @__PURE__ */ G(M, {
|
|
1244
|
+
size: 18,
|
|
1245
|
+
stroke: 1.6
|
|
1246
|
+
}), n[49] = H) : H = n[49];
|
|
1247
|
+
let U;
|
|
1248
|
+
n[50] !== B || n[51] !== V ? (U = /* @__PURE__ */ G(s, {
|
|
1249
|
+
variant: "subtle",
|
|
1250
|
+
color: "gray",
|
|
1251
|
+
"aria-label": "Next page",
|
|
1252
|
+
disabled: B,
|
|
1253
|
+
onClick: V,
|
|
1254
|
+
children: H
|
|
1255
|
+
}), n[50] = B, n[51] = V, n[52] = U) : U = n[52];
|
|
1256
|
+
let W;
|
|
1257
|
+
n[53] !== z || n[54] !== U ? (W = /* @__PURE__ */ K(u, {
|
|
1258
|
+
gap: 4,
|
|
1259
|
+
wrap: "nowrap",
|
|
1260
|
+
children: [z, U]
|
|
1261
|
+
}), n[53] = z, n[54] = U, n[55] = W) : W = n[55];
|
|
1262
|
+
let q;
|
|
1263
|
+
n[56] !== N || n[57] !== F || n[58] !== W || n[59] !== w ? (q = /* @__PURE__ */ K("div", {
|
|
1264
|
+
className: dn.footer,
|
|
1265
|
+
"data-paging-suspended": w,
|
|
1266
|
+
children: [
|
|
1267
|
+
N,
|
|
1268
|
+
F,
|
|
1269
|
+
W
|
|
1270
|
+
]
|
|
1271
|
+
}), n[56] = N, n[57] = F, n[58] = W, n[59] = w, n[60] = q) : q = n[60];
|
|
1272
|
+
let J;
|
|
1273
|
+
return n[61] !== f || n[62] !== q ? (J = /* @__PURE__ */ G(b, {
|
|
1274
|
+
label: fn,
|
|
1275
|
+
disabled: f,
|
|
1276
|
+
withArrow: !0,
|
|
1277
|
+
multiline: !0,
|
|
1278
|
+
w: 260,
|
|
1279
|
+
position: "top",
|
|
1280
|
+
children: q
|
|
1281
|
+
}), n[61] = f, n[62] = q, n[63] = J) : J = n[63], J;
|
|
1282
|
+
}
|
|
1283
|
+
function hn(e, t) {
|
|
1284
|
+
return e - t;
|
|
1285
|
+
}
|
|
1286
|
+
var gn = {
|
|
1287
|
+
tableWrapper: "_tableWrapper_chabz_2",
|
|
1288
|
+
scrollContainer: "_scrollContainer_chabz_10",
|
|
1289
|
+
grid: "_grid_chabz_18",
|
|
1290
|
+
headerRow: "_headerRow_chabz_24",
|
|
1291
|
+
bodyRow: "_bodyRow_chabz_33",
|
|
1292
|
+
bodyCell: "_bodyCell_chabz_91",
|
|
1293
|
+
cellContent: "_cellContent_chabz_89",
|
|
1294
|
+
messageRow: "_messageRow_chabz_129"
|
|
1295
|
+
}, _n = {
|
|
1296
|
+
stickyLeft: "_stickyLeft_1iqrf_11",
|
|
1297
|
+
stickyRight: "_stickyRight_1iqrf_15"
|
|
1298
|
+
}, $ = {
|
|
1299
|
+
headerCell: "_headerCell_49xbo_1",
|
|
1300
|
+
headerTitle: "_headerTitle_49xbo_31",
|
|
1301
|
+
headerActions: "_headerActions_49xbo_54",
|
|
1302
|
+
headerAction: "_headerAction_49xbo_54",
|
|
1303
|
+
headerCellSortable: "_headerCellSortable_49xbo_83",
|
|
1304
|
+
headerCellDragging: "_headerCellDragging_49xbo_90",
|
|
1305
|
+
headerCellDropBefore: "_headerCellDropBefore_49xbo_94",
|
|
1306
|
+
headerCellDropAfter: "_headerCellDropAfter_49xbo_95",
|
|
1307
|
+
columnSeparator: "_columnSeparator_49xbo_115",
|
|
1308
|
+
columnSeparatorResizable: "_columnSeparatorResizable_49xbo_127",
|
|
1309
|
+
columnSeparatorActive: "_columnSeparatorActive_49xbo_150",
|
|
1310
|
+
menuItemActive: "_menuItemActive_49xbo_156"
|
|
1311
|
+
};
|
|
1312
|
+
//#endregion
|
|
1313
|
+
//#region src/tmdatagrid/core/columnOrdering.ts
|
|
1314
|
+
function vn(e, t) {
|
|
1315
|
+
return e.left.includes(t) ? "left" : e.right.includes(t) ? "right" : "center";
|
|
1316
|
+
}
|
|
1317
|
+
function yn(e, t, n, r) {
|
|
1318
|
+
let i = e.filter((e) => e !== t), a = i.indexOf(n);
|
|
1319
|
+
return a === -1 ? [...e] : (i.splice(r === "before" ? a : a + 1, 0, t), i);
|
|
1320
|
+
}
|
|
1321
|
+
function bn({ table: e, columnId: t, targetId: n, side: r }) {
|
|
1322
|
+
if (t === n) return;
|
|
1323
|
+
let i = e.store.state.columnPinning, a = vn(i, t);
|
|
1324
|
+
if (a !== vn(i, n)) return;
|
|
1325
|
+
let o = e.getAllLeafColumns().map((e) => e.id);
|
|
1326
|
+
e.setColumnOrder(yn(o, t, n, r)), a !== "center" && e.setColumnPinning((e) => ({
|
|
1327
|
+
...e,
|
|
1328
|
+
[a]: yn(e[a], t, n, r)
|
|
1329
|
+
}));
|
|
1330
|
+
}
|
|
1331
|
+
function xn(e, t) {
|
|
1332
|
+
return t === "left" ? e.getLeftVisibleLeafColumns() : t === "right" ? e.getRightVisibleLeafColumns() : e.getCenterVisibleLeafColumns();
|
|
1333
|
+
}
|
|
1334
|
+
function Sn({ table: e, columnId: t, direction: n }) {
|
|
1335
|
+
let r = xn(e, vn(e.store.state.columnPinning, t)), i = r.findIndex((e) => e.id === t);
|
|
1336
|
+
if (i === -1) return null;
|
|
1337
|
+
let a = r[i + n];
|
|
1338
|
+
return !a || !Fe(a) ? null : a;
|
|
1339
|
+
}
|
|
1340
|
+
function Cn({ table: e, columnId: t, direction: n }) {
|
|
1341
|
+
let r = Sn({
|
|
1342
|
+
table: e,
|
|
1343
|
+
columnId: t,
|
|
1344
|
+
direction: n
|
|
1345
|
+
});
|
|
1346
|
+
r && bn({
|
|
1347
|
+
table: e,
|
|
1348
|
+
columnId: t,
|
|
1349
|
+
targetId: r.id,
|
|
1350
|
+
side: n === -1 ? "before" : "after"
|
|
1351
|
+
});
|
|
1352
|
+
}
|
|
1353
|
+
//#endregion
|
|
930
1354
|
//#region src/tmdatagrid/components/TMDataGridHeaderCell.tsx
|
|
931
|
-
function
|
|
932
|
-
let n = e(
|
|
933
|
-
n[0] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
934
|
-
let { sorting:
|
|
935
|
-
n[1] === d ?
|
|
936
|
-
let
|
|
937
|
-
n[3] === d ?
|
|
938
|
-
let te =
|
|
939
|
-
n[5] !== d.id || n[6] !==
|
|
1355
|
+
function wn(t) {
|
|
1356
|
+
let n = e(199), { header: r, layout: i } = t, c = je(), { table: l, features: u } = c, d = r.column, [p, m] = o(!1), [h, g] = o(null), _ = a(null), v = a(!1), y;
|
|
1357
|
+
n[0] === Symbol.for("react.memo_cache_sentinel") ? (y = { compare: w }, n[0] = y) : y = n[0];
|
|
1358
|
+
let { sorting: x, columnFilters: S, resizingColumnId: j, columnPinning: M, grouping: V } = C(l.store, kn, y), U = C(c.ui, On), W = r.subHeaders.length === 0, ee;
|
|
1359
|
+
n[1] === d ? ee = n[2] : (ee = Me(d), n[1] = d, n[2] = ee);
|
|
1360
|
+
let q = ee, J;
|
|
1361
|
+
n[3] === d ? J = n[4] : (J = Pe(d), n[3] = d, n[4] = J);
|
|
1362
|
+
let te = J, ne;
|
|
1363
|
+
n[5] !== d.id || n[6] !== x ? (ne = x.find((e) => e.id === d.id)?.desc, n[5] = d.id, n[6] = x, n[7] = ne) : ne = n[7];
|
|
940
1364
|
let re = ne, ie = re !== void 0, ae;
|
|
941
|
-
if (n[8] !== d.id || n[9] !==
|
|
1365
|
+
if (n[8] !== d.id || n[9] !== S) {
|
|
942
1366
|
let e;
|
|
943
|
-
n[11] === d.id ? e = n[12] : (e = (e) => e.id === d.id &&
|
|
1367
|
+
n[11] === d.id ? e = n[12] : (e = (e) => e.id === d.id && rt(e.value), n[11] = d.id, n[12] = e), ae = S.some(e), n[8] = d.id, n[9] = S, n[10] = ae;
|
|
944
1368
|
} else ae = n[10];
|
|
945
|
-
let oe = ae, se =
|
|
946
|
-
n[13] !== d || n[14] !== u ? (ce =
|
|
947
|
-
let le = ce,
|
|
948
|
-
n[16] !== u || n[17] !==
|
|
949
|
-
let
|
|
950
|
-
n[20] !==
|
|
951
|
-
let
|
|
952
|
-
n[
|
|
1369
|
+
let oe = ae, se = j === d.id, Y = i.pinnedAt, ce;
|
|
1370
|
+
n[13] !== d || n[14] !== u ? (ce = Lt(d, u), n[13] = d, n[14] = u, n[15] = ce) : ce = n[15];
|
|
1371
|
+
let le = ce, X = W && le.canSort, ue = W && le.canFilter, de = W && le.canHide, fe = W && le.canPin, pe = le.canResize, me = W && le.canReorder, he = W && le.canGroup, _e;
|
|
1372
|
+
n[16] !== u || n[17] !== W || n[18] !== l ? (_e = W && Rt(l, u).canHideAny, n[16] = u, n[17] = W, n[18] = l, n[19] = _e) : _e = n[19];
|
|
1373
|
+
let ve = _e, ye;
|
|
1374
|
+
n[20] !== d.id || n[21] !== V ? (ye = V.includes(d.id), n[20] = d.id, n[21] = V, n[22] = ye) : ye = n[22];
|
|
1375
|
+
let be = ye, xe = V.length > 0, Se = U === d.id, Ce;
|
|
1376
|
+
n[23] !== me || n[24] !== d.id || n[25] !== M || n[26] !== U || n[27] !== Se ? (Ce = me && U !== null && !Se && vn(M, U) === vn(M, d.id), n[23] = me, n[24] = d.id, n[25] = M, n[26] = U, n[27] = Se, n[28] = Ce) : Ce = n[28];
|
|
1377
|
+
let we = Ce, Te;
|
|
1378
|
+
n[29] !== c.ui || n[30] !== d.id ? (Te = function(e) {
|
|
953
1379
|
e.dataTransfer.effectAllowed = "move", e.dataTransfer.setData("text/plain", d.id), c.ui.actions.startColumnDrag(d.id);
|
|
954
|
-
}, n[
|
|
955
|
-
let
|
|
956
|
-
n[
|
|
957
|
-
if (!
|
|
1380
|
+
}, n[29] = c.ui, n[30] = d.id, n[31] = Te) : Te = n[31];
|
|
1381
|
+
let Ee = Te, De;
|
|
1382
|
+
n[32] === we ? De = n[33] : (De = function(e) {
|
|
1383
|
+
if (!we) return;
|
|
958
1384
|
e.preventDefault(), e.dataTransfer.dropEffect = "move";
|
|
959
1385
|
let t = _.current?.getBoundingClientRect();
|
|
960
1386
|
t && g(e.clientX < t.left + t.width / 2 ? "before" : "after");
|
|
961
|
-
}, n[
|
|
962
|
-
let
|
|
963
|
-
n[
|
|
1387
|
+
}, n[32] = we, n[33] = De);
|
|
1388
|
+
let Oe = De, ke;
|
|
1389
|
+
n[34] === Symbol.for("react.memo_cache_sentinel") ? (ke = function(e) {
|
|
964
1390
|
let t = e.relatedTarget;
|
|
965
1391
|
t instanceof Node && e.currentTarget.contains(t) || g(null);
|
|
966
|
-
}, n[
|
|
967
|
-
let
|
|
968
|
-
n[
|
|
969
|
-
e.preventDefault(), g(null), c.ui.actions.endColumnDrag(), !(!
|
|
1392
|
+
}, n[34] = ke) : ke = n[34];
|
|
1393
|
+
let Ae = ke, Ne;
|
|
1394
|
+
n[35] !== c.ui || n[36] !== d.id || n[37] !== U || n[38] !== h || n[39] !== we || n[40] !== l ? (Ne = function(e) {
|
|
1395
|
+
e.preventDefault(), g(null), c.ui.actions.endColumnDrag(), !(!we || !h || !U) && bn({
|
|
970
1396
|
table: l,
|
|
971
|
-
columnId:
|
|
1397
|
+
columnId: U,
|
|
972
1398
|
targetId: d.id,
|
|
973
1399
|
side: h
|
|
974
1400
|
});
|
|
975
|
-
}, n[
|
|
976
|
-
let
|
|
977
|
-
n[
|
|
1401
|
+
}, n[35] = c.ui, n[36] = d.id, n[37] = U, n[38] = h, n[39] = we, n[40] = l, n[41] = Ne) : Ne = n[41];
|
|
1402
|
+
let Fe = Ne, Ie;
|
|
1403
|
+
n[42] === c.ui ? Ie = n[43] : (Ie = function() {
|
|
978
1404
|
g(null), c.ui.actions.endColumnDrag();
|
|
979
|
-
}, n[
|
|
980
|
-
let
|
|
981
|
-
n[
|
|
1405
|
+
}, n[42] = c.ui, n[43] = Ie);
|
|
1406
|
+
let Le = Ie, Re;
|
|
1407
|
+
n[44] !== d || n[45] !== l ? (Re = function(e) {
|
|
982
1408
|
if (e && !(d.id in l.store.state.columnSizing)) {
|
|
983
1409
|
let e = _.current?.getBoundingClientRect().width;
|
|
984
1410
|
e && l.setColumnSizing((t) => ({
|
|
@@ -987,414 +1413,510 @@ function Ht(t) {
|
|
|
987
1413
|
}));
|
|
988
1414
|
}
|
|
989
1415
|
d.pin(e);
|
|
990
|
-
}, n[
|
|
991
|
-
let
|
|
992
|
-
if (n[
|
|
993
|
-
if (
|
|
1416
|
+
}, n[44] = d, n[45] = l, n[46] = Re) : Re = n[46];
|
|
1417
|
+
let Z = Re, Q;
|
|
1418
|
+
if (n[47] !== c || n[48] !== ue || n[49] !== he || n[50] !== de || n[51] !== ve || n[52] !== fe || n[53] !== me || n[54] !== X || n[55] !== d || n[56] !== V || n[57] !== be || n[58] !== xe || n[59] !== q || n[60] !== Y || n[61] !== Z || n[62] !== l) {
|
|
1419
|
+
if (Q = [], X) {
|
|
994
1420
|
let e;
|
|
995
|
-
n[
|
|
1421
|
+
n[64] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ G(A, {
|
|
996
1422
|
size: 16,
|
|
997
1423
|
stroke: 1.6
|
|
998
|
-
}), n[
|
|
1424
|
+
}), n[64] = e) : e = n[64];
|
|
999
1425
|
let t;
|
|
1000
|
-
n[
|
|
1426
|
+
n[65] === d ? t = n[66] : (t = /* @__PURE__ */ G(f.Item, {
|
|
1001
1427
|
leftSection: e,
|
|
1002
1428
|
onClick: () => d.toggleSorting(!1),
|
|
1003
1429
|
children: "Sort by ASC"
|
|
1004
|
-
}, "sort-asc"), n[
|
|
1430
|
+
}, "sort-asc"), n[65] = d, n[66] = t);
|
|
1005
1431
|
let r;
|
|
1006
|
-
n[
|
|
1432
|
+
n[67] === Symbol.for("react.memo_cache_sentinel") ? (r = /* @__PURE__ */ G(D, {
|
|
1007
1433
|
size: 16,
|
|
1008
1434
|
stroke: 1.6
|
|
1009
|
-
}), n[
|
|
1435
|
+
}), n[67] = r) : r = n[67];
|
|
1010
1436
|
let i;
|
|
1011
|
-
n[
|
|
1437
|
+
n[68] === d ? i = n[69] : (i = /* @__PURE__ */ G(f.Item, {
|
|
1012
1438
|
leftSection: r,
|
|
1013
1439
|
onClick: () => d.toggleSorting(!0),
|
|
1014
1440
|
children: "Sort by DESC"
|
|
1015
|
-
}, "sort-desc"), n[
|
|
1441
|
+
}, "sort-desc"), n[68] = d, n[69] = i);
|
|
1016
1442
|
let a;
|
|
1017
|
-
n[
|
|
1443
|
+
n[70] === Symbol.for("react.memo_cache_sentinel") ? (a = /* @__PURE__ */ G(f.Divider, {}, "sort-divider"), n[70] = a) : a = n[70], Q.push(t, i, a);
|
|
1018
1444
|
}
|
|
1019
|
-
if (
|
|
1445
|
+
if (ue) {
|
|
1020
1446
|
let e;
|
|
1021
|
-
n[
|
|
1447
|
+
n[71] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ G(I, {
|
|
1022
1448
|
size: 16,
|
|
1023
1449
|
stroke: 1.6
|
|
1024
|
-
}), n[
|
|
1450
|
+
}), n[71] = e) : e = n[71];
|
|
1025
1451
|
let t;
|
|
1026
|
-
n[
|
|
1452
|
+
n[72] !== c || n[73] !== d.id ? (t = /* @__PURE__ */ G(f.Item, {
|
|
1027
1453
|
leftSection: e,
|
|
1028
|
-
onClick: () =>
|
|
1454
|
+
onClick: () => sn(c, d.id),
|
|
1029
1455
|
children: "Filter"
|
|
1030
|
-
}, "filter"), n[
|
|
1456
|
+
}, "filter"), n[72] = c, n[73] = d.id, n[74] = t) : t = n[74];
|
|
1457
|
+
let r;
|
|
1458
|
+
n[75] === Symbol.for("react.memo_cache_sentinel") ? (r = /* @__PURE__ */ G(f.Divider, {}, "filter-divider"), n[75] = r) : r = n[75], Q.push(t, r);
|
|
1459
|
+
}
|
|
1460
|
+
if (he) {
|
|
1461
|
+
let e = be ? $.menuItemActive : void 0, t;
|
|
1462
|
+
n[76] === be ? t = n[77] : (t = G(be ? z : B, {
|
|
1463
|
+
size: 16,
|
|
1464
|
+
stroke: 1.6
|
|
1465
|
+
}), n[76] = be, n[77] = t);
|
|
1031
1466
|
let r;
|
|
1032
|
-
n[
|
|
1467
|
+
n[78] === d ? r = n[79] : (r = d.getToggleGroupingHandler(), n[78] = d, n[79] = r);
|
|
1468
|
+
let i = be ? `Ungroup ${q}` : `Group by ${q}`, a;
|
|
1469
|
+
n[80] !== e || n[81] !== t || n[82] !== r || n[83] !== i ? (a = /* @__PURE__ */ G(f.Item, {
|
|
1470
|
+
className: e,
|
|
1471
|
+
leftSection: t,
|
|
1472
|
+
onClick: r,
|
|
1473
|
+
children: i
|
|
1474
|
+
}, "group"), n[80] = e, n[81] = t, n[82] = r, n[83] = i, n[84] = a) : a = n[84], Q.push(a);
|
|
1033
1475
|
}
|
|
1034
|
-
if (
|
|
1035
|
-
|
|
1036
|
-
|
|
1476
|
+
if (xe) {
|
|
1477
|
+
if (d.id === "__group__") for (let e of V) {
|
|
1478
|
+
let t = l.getColumn(e);
|
|
1479
|
+
t && Q.push(/* @__PURE__ */ G(f.Item, {
|
|
1480
|
+
leftSection: /* @__PURE__ */ G(z, {
|
|
1481
|
+
size: 16,
|
|
1482
|
+
stroke: 1.6
|
|
1483
|
+
}),
|
|
1484
|
+
onClick: () => t.toggleGrouping(),
|
|
1485
|
+
children: `Ungroup ${Me(t)}`
|
|
1486
|
+
}, `ungroup-${e}`));
|
|
1487
|
+
}
|
|
1488
|
+
let e;
|
|
1489
|
+
n[85] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ G(L, {
|
|
1037
1490
|
size: 16,
|
|
1038
1491
|
stroke: 1.6
|
|
1039
|
-
}), n[
|
|
1492
|
+
}), n[85] = e) : e = n[85];
|
|
1493
|
+
let t;
|
|
1494
|
+
n[86] === l ? t = n[87] : (t = /* @__PURE__ */ G(f.Item, {
|
|
1495
|
+
leftSection: e,
|
|
1496
|
+
onClick: () => l.toggleAllRowsExpanded(!0),
|
|
1497
|
+
children: "Expand all groups"
|
|
1498
|
+
}, "expand-all"), n[86] = l, n[87] = t);
|
|
1040
1499
|
let r;
|
|
1041
|
-
n[
|
|
1500
|
+
n[88] === Symbol.for("react.memo_cache_sentinel") ? (r = /* @__PURE__ */ G(R, {
|
|
1501
|
+
size: 16,
|
|
1502
|
+
stroke: 1.6
|
|
1503
|
+
}), n[88] = r) : r = n[88];
|
|
1042
1504
|
let i;
|
|
1043
|
-
n[
|
|
1505
|
+
n[89] === l ? i = n[90] : (i = /* @__PURE__ */ G(f.Item, {
|
|
1506
|
+
leftSection: r,
|
|
1507
|
+
onClick: () => l.toggleAllRowsExpanded(!1),
|
|
1508
|
+
children: "Collapse all groups"
|
|
1509
|
+
}, "collapse-all"), n[89] = l, n[90] = i), Q.push(t, i);
|
|
1510
|
+
}
|
|
1511
|
+
if (he || xe) {
|
|
1512
|
+
let e;
|
|
1513
|
+
n[91] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ G(f.Divider, {}, "group-divider"), n[91] = e) : e = n[91], Q.push(e);
|
|
1514
|
+
}
|
|
1515
|
+
if (fe) {
|
|
1516
|
+
let e = Y === "left" ? $.menuItemActive : void 0, t;
|
|
1517
|
+
n[92] === Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */ G(T, {
|
|
1518
|
+
size: 16,
|
|
1519
|
+
stroke: 1.6
|
|
1520
|
+
}), n[92] = t) : t = n[92];
|
|
1521
|
+
let r;
|
|
1522
|
+
n[93] !== Y || n[94] !== Z ? (r = () => Z(Y !== "left" && "left"), n[93] = Y, n[94] = Z, n[95] = r) : r = n[95];
|
|
1523
|
+
let i;
|
|
1524
|
+
n[96] !== e || n[97] !== r ? (i = /* @__PURE__ */ G(f.Item, {
|
|
1044
1525
|
className: e,
|
|
1045
1526
|
leftSection: t,
|
|
1046
1527
|
onClick: r,
|
|
1047
1528
|
children: "Pin to left"
|
|
1048
|
-
}, "pin-left"), n[
|
|
1049
|
-
let a =
|
|
1050
|
-
n[
|
|
1529
|
+
}, "pin-left"), n[96] = e, n[97] = r, n[98] = i) : i = n[98];
|
|
1530
|
+
let a = Y === "right" ? $.menuItemActive : void 0, o;
|
|
1531
|
+
n[99] === Symbol.for("react.memo_cache_sentinel") ? (o = /* @__PURE__ */ G(E, {
|
|
1051
1532
|
size: 16,
|
|
1052
1533
|
stroke: 1.6
|
|
1053
|
-
}), n[
|
|
1534
|
+
}), n[99] = o) : o = n[99];
|
|
1054
1535
|
let s;
|
|
1055
|
-
n[
|
|
1536
|
+
n[100] !== Y || n[101] !== Z ? (s = () => Z(Y !== "right" && "right"), n[100] = Y, n[101] = Z, n[102] = s) : s = n[102];
|
|
1056
1537
|
let c;
|
|
1057
|
-
if (n[
|
|
1538
|
+
if (n[103] !== a || n[104] !== s ? (c = /* @__PURE__ */ G(f.Item, {
|
|
1058
1539
|
className: a,
|
|
1059
1540
|
leftSection: o,
|
|
1060
1541
|
onClick: s,
|
|
1061
1542
|
children: "Pin to right"
|
|
1062
|
-
}, "pin-right"), n[
|
|
1543
|
+
}, "pin-right"), n[103] = a, n[104] = s, n[105] = c) : c = n[105], Q.push(i, c), Y) {
|
|
1063
1544
|
let e;
|
|
1064
|
-
n[
|
|
1545
|
+
n[106] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ G(H, {
|
|
1065
1546
|
size: 16,
|
|
1066
1547
|
stroke: 1.6
|
|
1067
|
-
}), n[
|
|
1548
|
+
}), n[106] = e) : e = n[106];
|
|
1068
1549
|
let t;
|
|
1069
|
-
n[
|
|
1550
|
+
n[107] === Z ? t = n[108] : (t = /* @__PURE__ */ G(f.Item, {
|
|
1070
1551
|
leftSection: e,
|
|
1071
|
-
onClick: () =>
|
|
1552
|
+
onClick: () => Z(!1),
|
|
1072
1553
|
children: "Unpin"
|
|
1073
|
-
}, "unpin"), n[
|
|
1554
|
+
}, "unpin"), n[107] = Z, n[108] = t), Q.push(t);
|
|
1074
1555
|
}
|
|
1075
1556
|
let l;
|
|
1076
|
-
n[
|
|
1557
|
+
n[109] === Symbol.for("react.memo_cache_sentinel") ? (l = /* @__PURE__ */ G(f.Divider, {}, "pin-divider"), n[109] = l) : l = n[109], Q.push(l);
|
|
1077
1558
|
}
|
|
1078
|
-
if (
|
|
1559
|
+
if (me) {
|
|
1079
1560
|
let e;
|
|
1080
|
-
n[
|
|
1561
|
+
n[110] !== d.id || n[111] !== l ? (e = Sn({
|
|
1081
1562
|
table: l,
|
|
1082
1563
|
columnId: d.id,
|
|
1083
1564
|
direction: -1
|
|
1084
|
-
}), n[
|
|
1565
|
+
}), n[110] = d.id, n[111] = l, n[112] = e) : e = n[112];
|
|
1085
1566
|
let t = e, r;
|
|
1086
|
-
n[
|
|
1567
|
+
n[113] !== d.id || n[114] !== l ? (r = Sn({
|
|
1087
1568
|
table: l,
|
|
1088
1569
|
columnId: d.id,
|
|
1089
1570
|
direction: 1
|
|
1090
|
-
}), n[
|
|
1571
|
+
}), n[113] = d.id, n[114] = l, n[115] = r) : r = n[115];
|
|
1091
1572
|
let i = r;
|
|
1092
1573
|
if (t || i) {
|
|
1093
1574
|
let e = !t, r;
|
|
1094
|
-
n[
|
|
1575
|
+
n[116] === Symbol.for("react.memo_cache_sentinel") ? (r = /* @__PURE__ */ G(O, {
|
|
1095
1576
|
size: 16,
|
|
1096
1577
|
stroke: 1.6
|
|
1097
|
-
}), n[
|
|
1578
|
+
}), n[116] = r) : r = n[116];
|
|
1098
1579
|
let a;
|
|
1099
|
-
n[
|
|
1580
|
+
n[117] !== d.id || n[118] !== l ? (a = () => Cn({
|
|
1100
1581
|
table: l,
|
|
1101
1582
|
columnId: d.id,
|
|
1102
1583
|
direction: -1
|
|
1103
|
-
}), n[
|
|
1584
|
+
}), n[117] = d.id, n[118] = l, n[119] = a) : a = n[119];
|
|
1104
1585
|
let o;
|
|
1105
|
-
n[
|
|
1586
|
+
n[120] !== e || n[121] !== a ? (o = /* @__PURE__ */ G(f.Item, {
|
|
1106
1587
|
disabled: e,
|
|
1107
1588
|
leftSection: r,
|
|
1108
1589
|
onClick: a,
|
|
1109
1590
|
children: "Move left"
|
|
1110
|
-
}, "move-left"), n[
|
|
1591
|
+
}, "move-left"), n[120] = e, n[121] = a, n[122] = o) : o = n[122];
|
|
1111
1592
|
let s = !i, c;
|
|
1112
|
-
n[
|
|
1593
|
+
n[123] === Symbol.for("react.memo_cache_sentinel") ? (c = /* @__PURE__ */ G(k, {
|
|
1113
1594
|
size: 16,
|
|
1114
1595
|
stroke: 1.6
|
|
1115
|
-
}), n[
|
|
1596
|
+
}), n[123] = c) : c = n[123];
|
|
1116
1597
|
let u;
|
|
1117
|
-
n[
|
|
1598
|
+
n[124] !== d.id || n[125] !== l ? (u = () => Cn({
|
|
1118
1599
|
table: l,
|
|
1119
1600
|
columnId: d.id,
|
|
1120
1601
|
direction: 1
|
|
1121
|
-
}), n[
|
|
1602
|
+
}), n[124] = d.id, n[125] = l, n[126] = u) : u = n[126];
|
|
1122
1603
|
let p;
|
|
1123
|
-
n[
|
|
1604
|
+
n[127] !== s || n[128] !== u ? (p = /* @__PURE__ */ G(f.Item, {
|
|
1124
1605
|
disabled: s,
|
|
1125
1606
|
leftSection: c,
|
|
1126
1607
|
onClick: u,
|
|
1127
1608
|
children: "Move right"
|
|
1128
|
-
}, "move-right"), n[
|
|
1609
|
+
}, "move-right"), n[127] = s, n[128] = u, n[129] = p) : p = n[129];
|
|
1129
1610
|
let m;
|
|
1130
|
-
n[
|
|
1611
|
+
n[130] === Symbol.for("react.memo_cache_sentinel") ? (m = /* @__PURE__ */ G(f.Divider, {}, "move-divider"), n[130] = m) : m = n[130], Q.push(o, p, m);
|
|
1131
1612
|
}
|
|
1132
1613
|
}
|
|
1133
|
-
if (
|
|
1614
|
+
if (de) {
|
|
1134
1615
|
let e;
|
|
1135
|
-
n[
|
|
1616
|
+
n[131] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ G(F, {
|
|
1136
1617
|
size: 16,
|
|
1137
1618
|
stroke: 1.6
|
|
1138
|
-
}), n[
|
|
1619
|
+
}), n[131] = e) : e = n[131];
|
|
1139
1620
|
let t;
|
|
1140
|
-
n[
|
|
1621
|
+
n[132] === d ? t = n[133] : (t = /* @__PURE__ */ G(f.Item, {
|
|
1141
1622
|
leftSection: e,
|
|
1142
1623
|
onClick: () => d.toggleVisibility(!1),
|
|
1143
1624
|
children: "Hide column"
|
|
1144
|
-
}, "hide"), n[
|
|
1625
|
+
}, "hide"), n[132] = d, n[133] = t), Q.push(t);
|
|
1145
1626
|
}
|
|
1146
|
-
if (
|
|
1627
|
+
if (ve) {
|
|
1147
1628
|
let e;
|
|
1148
|
-
n[
|
|
1629
|
+
n[134] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ G(N, {
|
|
1149
1630
|
size: 16,
|
|
1150
1631
|
stroke: 1.6
|
|
1151
|
-
}), n[
|
|
1632
|
+
}), n[134] = e) : e = n[134];
|
|
1152
1633
|
let t;
|
|
1153
|
-
n[
|
|
1634
|
+
n[135] === c.ui.actions ? t = n[136] : (t = /* @__PURE__ */ G(f.Item, {
|
|
1154
1635
|
leftSection: e,
|
|
1155
1636
|
onClick: () => c.ui.actions.setColumnsPanelOpen(!0),
|
|
1156
1637
|
children: "Manage columns"
|
|
1157
|
-
}, "manage"), n[
|
|
1638
|
+
}, "manage"), n[135] = c.ui.actions, n[136] = t), Q.push(t);
|
|
1158
1639
|
}
|
|
1159
|
-
for (;
|
|
1160
|
-
n[
|
|
1161
|
-
} else
|
|
1162
|
-
let
|
|
1163
|
-
n[
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
].filter(Boolean), n[
|
|
1172
|
-
let
|
|
1173
|
-
n[
|
|
1174
|
-
left:
|
|
1175
|
-
right:
|
|
1176
|
-
position:
|
|
1177
|
-
zIndex:
|
|
1178
|
-
}, n[
|
|
1179
|
-
let
|
|
1180
|
-
n[
|
|
1640
|
+
for (; Q.length > 0 && An(Q.at(-1));) Q.pop();
|
|
1641
|
+
n[47] = c, n[48] = ue, n[49] = he, n[50] = de, n[51] = ve, n[52] = fe, n[53] = me, n[54] = X, n[55] = d, n[56] = V, n[57] = be, n[58] = xe, n[59] = q, n[60] = Y, n[61] = Z, n[62] = l, n[63] = Q;
|
|
1642
|
+
} else Q = n[63];
|
|
1643
|
+
let ze = X ? $.headerCellSortable : "", Be = Se ? $.headerCellDragging : "", Ve = h === "before" ? $.headerCellDropBefore : "", He = h === "after" ? $.headerCellDropAfter : "", Ue = i.isBoundary && Y === "left" ? _n.stickyLeft : "", We = i.isBoundary && Y === "right" ? _n.stickyRight : "", Ge;
|
|
1644
|
+
n[137] !== ze || n[138] !== Be || n[139] !== Ve || n[140] !== He || n[141] !== Ue || n[142] !== We ? (Ge = [
|
|
1645
|
+
$.headerCell,
|
|
1646
|
+
ze,
|
|
1647
|
+
Be,
|
|
1648
|
+
Ve,
|
|
1649
|
+
He,
|
|
1650
|
+
Ue,
|
|
1651
|
+
We
|
|
1652
|
+
].filter(Boolean), n[137] = ze, n[138] = Be, n[139] = Ve, n[140] = He, n[141] = Ue, n[142] = We, n[143] = Ge) : Ge = n[143];
|
|
1653
|
+
let Ke = Ge.join(" "), qe = `dg-header-${d.id}`, Je = ie || oe, Ye = d.id === Ut, Xe = X ? ie ? re ? "descending" : "ascending" : "none" : void 0, Ze = me && !se, Qe = me ? Ee : void 0, $e = me ? Le : void 0, et = we ? Oe : void 0, tt = we ? Ae : void 0, nt = we ? Fe : void 0, it = Y === "left" ? i.offset : void 0, at = Y === "right" ? i.offset : void 0, ot = Y ? "sticky" : void 0, st = Y ? 4 : void 0, ct;
|
|
1654
|
+
n[144] !== it || n[145] !== at || n[146] !== ot || n[147] !== st ? (ct = {
|
|
1655
|
+
left: it,
|
|
1656
|
+
right: at,
|
|
1657
|
+
position: ot,
|
|
1658
|
+
zIndex: st
|
|
1659
|
+
}, n[144] = it, n[145] = at, n[146] = ot, n[147] = st, n[148] = ct) : ct = n[148];
|
|
1660
|
+
let lt;
|
|
1661
|
+
n[149] !== X || n[150] !== d ? (lt = X ? (e) => {
|
|
1181
1662
|
if (v.current) {
|
|
1182
1663
|
v.current = !1;
|
|
1183
1664
|
return;
|
|
1184
1665
|
}
|
|
1185
1666
|
d.getToggleSortingHandler()?.(e);
|
|
1186
|
-
} : void 0, n[
|
|
1187
|
-
let
|
|
1188
|
-
n[
|
|
1189
|
-
label:
|
|
1667
|
+
} : void 0, n[149] = X, n[150] = d, n[151] = lt) : lt = n[151];
|
|
1668
|
+
let ut;
|
|
1669
|
+
n[152] !== d.columnDef || n[153] !== r || n[154] !== W || n[155] !== q ? (ut = r.isPlaceholder ? null : /* @__PURE__ */ G(b, {
|
|
1670
|
+
label: q,
|
|
1190
1671
|
openDelay: 600,
|
|
1191
1672
|
withinPortal: !0,
|
|
1192
|
-
disabled: !
|
|
1193
|
-
children: /* @__PURE__ */
|
|
1194
|
-
className:
|
|
1195
|
-
children:
|
|
1673
|
+
disabled: !W,
|
|
1674
|
+
children: /* @__PURE__ */ G("span", {
|
|
1675
|
+
className: $.headerTitle,
|
|
1676
|
+
children: ge(d.columnDef.header, r.getContext())
|
|
1196
1677
|
})
|
|
1197
|
-
}), n[
|
|
1198
|
-
let
|
|
1199
|
-
n[
|
|
1200
|
-
className:
|
|
1678
|
+
}), n[152] = d.columnDef, n[153] = r, n[154] = W, n[155] = q, n[156] = ut) : ut = n[156];
|
|
1679
|
+
let dt;
|
|
1680
|
+
n[157] !== c || n[158] !== X || n[159] !== d || n[160] !== oe || n[161] !== W || n[162] !== ie || n[163] !== q || n[164] !== Q || n[165] !== p || n[166] !== re ? (dt = W && /* @__PURE__ */ K("div", {
|
|
1681
|
+
className: $.headerActions,
|
|
1201
1682
|
children: [
|
|
1202
|
-
oe && /* @__PURE__ */
|
|
1203
|
-
className:
|
|
1683
|
+
oe && /* @__PURE__ */ G(s, {
|
|
1684
|
+
className: $.headerAction,
|
|
1204
1685
|
"data-pinned-visible": "true",
|
|
1205
1686
|
variant: "subtle",
|
|
1206
1687
|
color: "gray",
|
|
1207
1688
|
size: "xs",
|
|
1208
|
-
"aria-label": `Filter on ${
|
|
1689
|
+
"aria-label": `Filter on ${q}`,
|
|
1209
1690
|
onClick: (e) => {
|
|
1210
|
-
e.stopPropagation(),
|
|
1691
|
+
e.stopPropagation(), sn(c, d.id);
|
|
1211
1692
|
},
|
|
1212
|
-
children: /* @__PURE__ */
|
|
1693
|
+
children: /* @__PURE__ */ G(I, {
|
|
1213
1694
|
size: 14,
|
|
1214
1695
|
stroke: 1.6
|
|
1215
1696
|
})
|
|
1216
1697
|
}),
|
|
1217
|
-
|
|
1218
|
-
className:
|
|
1698
|
+
X && /* @__PURE__ */ G(s, {
|
|
1699
|
+
className: $.headerAction,
|
|
1219
1700
|
"data-pinned-visible": ie,
|
|
1220
1701
|
variant: "subtle",
|
|
1221
1702
|
color: "gray",
|
|
1222
1703
|
size: "xs",
|
|
1223
|
-
"aria-label": `Sort ${
|
|
1704
|
+
"aria-label": `Sort ${q}`,
|
|
1224
1705
|
onClick: d.getToggleSortingHandler(),
|
|
1225
|
-
children:
|
|
1706
|
+
children: G(re ? D : A, {
|
|
1226
1707
|
size: 14,
|
|
1227
1708
|
stroke: 1.6
|
|
1228
1709
|
})
|
|
1229
1710
|
}),
|
|
1230
|
-
|
|
1711
|
+
Q.length > 0 && d.id !== "__select__" && /* @__PURE__ */ K(f, {
|
|
1231
1712
|
opened: p,
|
|
1232
1713
|
onChange: m,
|
|
1233
1714
|
position: "bottom-start",
|
|
1234
1715
|
shadow: "md",
|
|
1235
1716
|
width: 220,
|
|
1236
1717
|
withinPortal: !0,
|
|
1237
|
-
children: [/* @__PURE__ */
|
|
1238
|
-
className:
|
|
1718
|
+
children: [/* @__PURE__ */ G(f.Target, { children: /* @__PURE__ */ G(s, {
|
|
1719
|
+
className: $.headerAction,
|
|
1239
1720
|
"data-pinned-visible": p,
|
|
1240
1721
|
variant: "subtle",
|
|
1241
1722
|
color: "gray",
|
|
1242
1723
|
size: "xs",
|
|
1243
|
-
"aria-label": `${
|
|
1724
|
+
"aria-label": `${q} column menu`,
|
|
1244
1725
|
onClick: (e) => {
|
|
1245
|
-
e.stopPropagation(), m(
|
|
1726
|
+
e.stopPropagation(), m(Dn);
|
|
1246
1727
|
},
|
|
1247
|
-
children: /* @__PURE__ */
|
|
1728
|
+
children: /* @__PURE__ */ G(P, {
|
|
1248
1729
|
size: 14,
|
|
1249
1730
|
stroke: 1.6
|
|
1250
1731
|
})
|
|
1251
|
-
}) }), /* @__PURE__ */
|
|
1252
|
-
onClick:
|
|
1253
|
-
children:
|
|
1732
|
+
}) }), /* @__PURE__ */ G(f.Dropdown, {
|
|
1733
|
+
onClick: En,
|
|
1734
|
+
children: Q
|
|
1254
1735
|
})]
|
|
1255
1736
|
})
|
|
1256
1737
|
]
|
|
1257
|
-
}), n[
|
|
1258
|
-
let
|
|
1259
|
-
n[
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
].filter(Boolean), n[
|
|
1264
|
-
let
|
|
1265
|
-
n[
|
|
1738
|
+
}), n[157] = c, n[158] = X, n[159] = d, n[160] = oe, n[161] = W, n[162] = ie, n[163] = q, n[164] = Q, n[165] = p, n[166] = re, n[167] = dt) : dt = n[167];
|
|
1739
|
+
let ft = pe ? $.columnSeparatorResizable : "", pt = se ? $.columnSeparatorActive : "", mt;
|
|
1740
|
+
n[168] !== ft || n[169] !== pt ? (mt = [
|
|
1741
|
+
$.columnSeparator,
|
|
1742
|
+
ft,
|
|
1743
|
+
pt
|
|
1744
|
+
].filter(Boolean), n[168] = ft, n[169] = pt, n[170] = mt) : mt = n[170];
|
|
1745
|
+
let ht = mt.join(" "), gt;
|
|
1746
|
+
n[171] !== pe || n[172] !== r ? (gt = pe ? (e) => {
|
|
1266
1747
|
v.current = !0, r.getResizeHandler()(e);
|
|
1267
|
-
} : void 0, n[
|
|
1268
|
-
let
|
|
1269
|
-
n[
|
|
1270
|
-
let
|
|
1271
|
-
n[
|
|
1272
|
-
className:
|
|
1748
|
+
} : void 0, n[171] = pe, n[172] = r, n[173] = gt) : gt = n[173];
|
|
1749
|
+
let _t;
|
|
1750
|
+
n[174] !== pe || n[175] !== r ? (_t = pe ? r.getResizeHandler() : void 0, n[174] = pe, n[175] = r, n[176] = _t) : _t = n[176];
|
|
1751
|
+
let vt;
|
|
1752
|
+
n[177] !== ht || n[178] !== gt || n[179] !== _t ? (vt = /* @__PURE__ */ G("div", {
|
|
1753
|
+
className: ht,
|
|
1273
1754
|
draggable: !1,
|
|
1274
|
-
onMouseDown:
|
|
1275
|
-
onTouchStart:
|
|
1276
|
-
onClick:
|
|
1277
|
-
}), n[
|
|
1278
|
-
let
|
|
1279
|
-
return n[
|
|
1755
|
+
onMouseDown: gt,
|
|
1756
|
+
onTouchStart: _t,
|
|
1757
|
+
onClick: Tn
|
|
1758
|
+
}), n[177] = ht, n[178] = gt, n[179] = _t, n[180] = vt) : vt = n[180];
|
|
1759
|
+
let yt;
|
|
1760
|
+
return n[181] !== te || n[182] !== Ke || n[183] !== qe || n[184] !== Je || n[185] !== Ye || n[186] !== Xe || n[187] !== Ze || n[188] !== Qe || n[189] !== $e || n[190] !== et || n[191] !== tt || n[192] !== nt || n[193] !== ct || n[194] !== lt || n[195] !== ut || n[196] !== dt || n[197] !== vt ? (yt = /* @__PURE__ */ K("div", {
|
|
1280
1761
|
ref: _,
|
|
1281
1762
|
role: "columnheader",
|
|
1282
|
-
"data-testid":
|
|
1283
|
-
"data-active":
|
|
1763
|
+
"data-testid": qe,
|
|
1764
|
+
"data-active": Je,
|
|
1284
1765
|
"data-align": te,
|
|
1285
|
-
"
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1766
|
+
"data-select-column": Ye,
|
|
1767
|
+
"aria-sort": Xe,
|
|
1768
|
+
className: Ke,
|
|
1769
|
+
draggable: Ze,
|
|
1770
|
+
onDragStart: Qe,
|
|
1771
|
+
onDragEnd: $e,
|
|
1772
|
+
onDragOver: et,
|
|
1773
|
+
onDragLeave: tt,
|
|
1774
|
+
onDrop: nt,
|
|
1775
|
+
style: ct,
|
|
1776
|
+
onClick: lt,
|
|
1295
1777
|
children: [
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1778
|
+
ut,
|
|
1779
|
+
dt,
|
|
1780
|
+
vt
|
|
1299
1781
|
]
|
|
1300
|
-
}), n[
|
|
1782
|
+
}), n[181] = te, n[182] = Ke, n[183] = qe, n[184] = Je, n[185] = Ye, n[186] = Xe, n[187] = Ze, n[188] = Qe, n[189] = $e, n[190] = et, n[191] = tt, n[192] = nt, n[193] = ct, n[194] = lt, n[195] = ut, n[196] = dt, n[197] = vt, n[198] = yt) : yt = n[198], yt;
|
|
1301
1783
|
}
|
|
1302
|
-
function
|
|
1784
|
+
function Tn(e) {
|
|
1303
1785
|
return e.stopPropagation();
|
|
1304
1786
|
}
|
|
1305
|
-
function
|
|
1787
|
+
function En(e) {
|
|
1306
1788
|
return e.stopPropagation();
|
|
1307
1789
|
}
|
|
1308
|
-
function
|
|
1790
|
+
function Dn(e) {
|
|
1309
1791
|
return !e;
|
|
1310
1792
|
}
|
|
1311
|
-
function
|
|
1793
|
+
function On(e) {
|
|
1312
1794
|
return e.draggedColumnId;
|
|
1313
1795
|
}
|
|
1314
|
-
function
|
|
1796
|
+
function kn(e) {
|
|
1315
1797
|
return {
|
|
1316
1798
|
sorting: e.sorting,
|
|
1317
1799
|
columnFilters: e.columnFilters,
|
|
1318
1800
|
resizingColumnId: e.columnResizing.isResizingColumn,
|
|
1319
1801
|
columnPinning: e.columnPinning,
|
|
1320
|
-
columnOrder: e.columnOrder
|
|
1802
|
+
columnOrder: e.columnOrder,
|
|
1803
|
+
grouping: e.grouping
|
|
1321
1804
|
};
|
|
1322
1805
|
}
|
|
1323
|
-
function
|
|
1806
|
+
function An(e) {
|
|
1324
1807
|
return typeof e == "object" && !!e && "type" in e && e.type === f.Divider;
|
|
1325
1808
|
}
|
|
1326
1809
|
//#endregion
|
|
1327
1810
|
//#region src/tmdatagrid/components/TMDataGridTable.tsx
|
|
1328
|
-
var
|
|
1811
|
+
var jn = {
|
|
1329
1812
|
pinnedAt: !1,
|
|
1330
1813
|
offset: 0,
|
|
1331
1814
|
isBoundary: !1
|
|
1332
1815
|
};
|
|
1333
|
-
function
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
let
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
].
|
|
1342
|
-
let
|
|
1343
|
-
n[
|
|
1816
|
+
function Mn(e) {
|
|
1817
|
+
if (e.getIsPlaceholder()) return null;
|
|
1818
|
+
if (!e.getIsAggregated()) return ge(e.column.columnDef.cell, e.getContext());
|
|
1819
|
+
let { aggregatedCell: t, aggregationFn: n } = e.column.columnDef;
|
|
1820
|
+
return t === void 0 ? n === void 0 ? null : ge(e.column.columnDef.cell, e.getContext()) : ge(t, e.getContext());
|
|
1821
|
+
}
|
|
1822
|
+
function Nn(t) {
|
|
1823
|
+
let n = e(22), { cell: r, rowHeight: i, layout: a, onContextMenu: o } = t, s;
|
|
1824
|
+
n[0] === r.column ? s = n[1] : (s = Pe(r.column), n[0] = r.column, n[1] = s);
|
|
1825
|
+
let c = r.column.id === Ut, l = a.isBoundary && a.pinnedAt === "left" ? _n.stickyLeft : "", u = a.isBoundary && a.pinnedAt === "right" ? _n.stickyRight : "", d;
|
|
1826
|
+
n[2] !== l || n[3] !== u ? (d = [
|
|
1827
|
+
gn.bodyCell,
|
|
1828
|
+
l,
|
|
1829
|
+
u
|
|
1830
|
+
].filter(Boolean), n[2] = l, n[3] = u, n[4] = d) : d = n[4];
|
|
1831
|
+
let f = d.join(" "), p = a.pinnedAt === "left" ? a.offset : void 0, m = a.pinnedAt === "right" ? a.offset : void 0, h = a.pinnedAt ? "sticky" : void 0, g = a.pinnedAt ? 2 : void 0, _;
|
|
1832
|
+
n[5] !== i || n[6] !== g || n[7] !== p || n[8] !== m || n[9] !== h ? (_ = {
|
|
1344
1833
|
minHeight: i,
|
|
1345
|
-
left:
|
|
1346
|
-
right:
|
|
1347
|
-
position:
|
|
1348
|
-
zIndex:
|
|
1349
|
-
}, n[5] = i, n[6] =
|
|
1834
|
+
left: p,
|
|
1835
|
+
right: m,
|
|
1836
|
+
position: h,
|
|
1837
|
+
zIndex: g
|
|
1838
|
+
}, n[5] = i, n[6] = g, n[7] = p, n[8] = m, n[9] = h, n[10] = _) : _ = n[10];
|
|
1839
|
+
let v;
|
|
1840
|
+
n[11] === r ? v = n[12] : (v = Mn(r), n[11] = r, n[12] = v);
|
|
1841
|
+
let y;
|
|
1842
|
+
n[13] === v ? y = n[14] : (y = /* @__PURE__ */ G("span", {
|
|
1843
|
+
className: gn.cellContent,
|
|
1844
|
+
children: v
|
|
1845
|
+
}), n[13] = v, n[14] = y);
|
|
1846
|
+
let b;
|
|
1847
|
+
return n[15] !== o || n[16] !== s || n[17] !== _ || n[18] !== y || n[19] !== c || n[20] !== f ? (b = /* @__PURE__ */ G("div", {
|
|
1848
|
+
role: "cell",
|
|
1849
|
+
"data-align": s,
|
|
1850
|
+
"data-select-column": c,
|
|
1851
|
+
onContextMenu: o,
|
|
1852
|
+
className: f,
|
|
1853
|
+
style: _,
|
|
1854
|
+
children: y
|
|
1855
|
+
}), n[15] = o, n[16] = s, n[17] = _, n[18] = y, n[19] = c, n[20] = f, n[21] = b) : b = n[21], b;
|
|
1856
|
+
}
|
|
1857
|
+
function Pn(t) {
|
|
1858
|
+
let n = e(16), { enabled: r, menuContent: i, menuProps: a, onContextMenu: o, onClose: s, children: c } = t, l;
|
|
1859
|
+
n[0] === Symbol.for("react.memo_cache_sentinel") ? (l = { display: "contents" }, n[0] = l) : l = n[0];
|
|
1860
|
+
let u = r ? o : void 0, d;
|
|
1861
|
+
n[1] !== c || n[2] !== u ? (d = /* @__PURE__ */ G("div", {
|
|
1862
|
+
role: "rowgroup",
|
|
1863
|
+
style: l,
|
|
1864
|
+
onContextMenu: u,
|
|
1865
|
+
children: c
|
|
1866
|
+
}), n[1] = c, n[2] = u, n[3] = d) : d = n[3];
|
|
1867
|
+
let p = d;
|
|
1868
|
+
if (!r) return p;
|
|
1869
|
+
let m = i !== null, h;
|
|
1870
|
+
n[4] === s ? h = n[5] : (h = (e) => {
|
|
1871
|
+
e || s();
|
|
1872
|
+
}, n[4] = s, n[5] = h);
|
|
1350
1873
|
let g;
|
|
1351
|
-
n[
|
|
1874
|
+
n[6] === p ? g = n[7] : (g = /* @__PURE__ */ G(f.ContextMenu, { children: p }), n[6] = p, n[7] = g);
|
|
1352
1875
|
let _;
|
|
1353
|
-
n[
|
|
1354
|
-
className: X.cellContent,
|
|
1355
|
-
children: g
|
|
1356
|
-
}), n[13] = g, n[14] = _);
|
|
1876
|
+
n[8] === i ? _ = n[9] : (_ = /* @__PURE__ */ G(f.Dropdown, { children: i }), n[8] = i, n[9] = _);
|
|
1357
1877
|
let v;
|
|
1358
|
-
return n[
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
let {
|
|
1878
|
+
return n[10] !== a || n[11] !== m || n[12] !== h || n[13] !== g || n[14] !== _ ? (v = /* @__PURE__ */ K(f, {
|
|
1879
|
+
opened: m,
|
|
1880
|
+
onChange: h,
|
|
1881
|
+
position: "bottom-start",
|
|
1882
|
+
shadow: "md",
|
|
1883
|
+
width: 220,
|
|
1884
|
+
...a,
|
|
1885
|
+
children: [g, _]
|
|
1886
|
+
}), n[10] = a, n[11] = m, n[12] = h, n[13] = g, n[14] = _, n[15] = v) : v = n[15], v;
|
|
1887
|
+
}
|
|
1888
|
+
function Fn({ onRowClick: e, rowContextMenu: t, rowContextMenuProps: r }) {
|
|
1889
|
+
let { table: s, ui: c, features: l, rowHeight: u, controlSize: f } = je();
|
|
1890
|
+
C(s.store);
|
|
1891
|
+
let p = C(c, (e) => e.highlightedRowId), { loading: m, noResultsLabel: h = "No rows match your filters" } = s.options.meta ?? {}, g = a(null), _ = zt(s, l);
|
|
1370
1892
|
i(() => {
|
|
1371
|
-
if (!
|
|
1372
|
-
let e =
|
|
1373
|
-
e > 0 &&
|
|
1893
|
+
if (!l.pagination) return;
|
|
1894
|
+
let e = s.getPageCount();
|
|
1895
|
+
e > 0 && s.store.state.pagination.pageIndex >= e && s.setPageIndex(e - 1);
|
|
1374
1896
|
});
|
|
1375
|
-
let
|
|
1376
|
-
count:
|
|
1377
|
-
getScrollElement: () =>
|
|
1378
|
-
estimateSize: n(() =>
|
|
1379
|
-
getItemKey: n((e) =>
|
|
1897
|
+
let y = Ee({
|
|
1898
|
+
count: _.length,
|
|
1899
|
+
getScrollElement: () => g.current,
|
|
1900
|
+
estimateSize: n(() => u, [u]),
|
|
1901
|
+
getItemKey: n((e) => _[e]?.id ?? e, [_]),
|
|
1380
1902
|
overscan: 6,
|
|
1381
1903
|
initialRect: {
|
|
1382
1904
|
height: 600,
|
|
1383
1905
|
width: 1200
|
|
1384
1906
|
}
|
|
1385
|
-
}),
|
|
1386
|
-
...
|
|
1387
|
-
...
|
|
1388
|
-
...
|
|
1389
|
-
],
|
|
1907
|
+
}), b = y.getVirtualItems(), x = b[0]?.start ?? 0, S = y.getTotalSize() - (b.at(-1)?.end ?? 0), w = s.getLeftVisibleLeafColumns(), T = s.getRightVisibleLeafColumns(), E = s.getCenterVisibleLeafColumns(), D = [
|
|
1908
|
+
...w,
|
|
1909
|
+
...E,
|
|
1910
|
+
...T
|
|
1911
|
+
], O = s.getCenterHeaderGroups(), k = s.getLeftHeaderGroups(), A = s.getRightHeaderGroups(), j = O.map((e, t) => ({
|
|
1390
1912
|
id: e.id,
|
|
1391
1913
|
headers: [
|
|
1392
|
-
...
|
|
1914
|
+
...k[t]?.headers ?? [],
|
|
1393
1915
|
...e.headers,
|
|
1394
|
-
...
|
|
1916
|
+
...A[t]?.headers ?? []
|
|
1395
1917
|
]
|
|
1396
|
-
})),
|
|
1397
|
-
let t = e.columnDef.minSize === e.columnDef.maxSize, n = e.id in
|
|
1918
|
+
})), M = s.store.state.columnSizing, N = D.map((e) => {
|
|
1919
|
+
let t = e.columnDef.minSize === e.columnDef.maxSize, n = e.id in M, r = e.getIsPinned() !== !1, i = e.columnDef.minSize ?? 80;
|
|
1398
1920
|
return t || n || r ? {
|
|
1399
1921
|
track: `${e.getSize()}px`,
|
|
1400
1922
|
minWidth: e.getSize()
|
|
@@ -1402,148 +1924,196 @@ function Zt({ onRowClick: e }) {
|
|
|
1402
1924
|
track: `minmax(${i}px, ${e.columnDef.meta?.flex ?? 1}fr)`,
|
|
1403
1925
|
minWidth: i
|
|
1404
1926
|
};
|
|
1405
|
-
}),
|
|
1406
|
-
for (let e of
|
|
1927
|
+
}), P = N.map((e) => e.track).join(" "), F = N.reduce((e, t) => e + t.minWidth, 0), I = /* @__PURE__ */ new Map(), L = (e) => N[D.findIndex((t) => t.id === e)]?.minWidth ?? 0, R = 0;
|
|
1928
|
+
for (let e of w) I.set(e.id, {
|
|
1407
1929
|
pinnedAt: "left",
|
|
1408
|
-
offset:
|
|
1409
|
-
isBoundary: e.id ===
|
|
1410
|
-
}),
|
|
1411
|
-
let
|
|
1412
|
-
for (let e of [...
|
|
1930
|
+
offset: R,
|
|
1931
|
+
isBoundary: e.id === w.at(-1)?.id
|
|
1932
|
+
}), R += L(e.id);
|
|
1933
|
+
let z = 0;
|
|
1934
|
+
for (let e of [...T].reverse()) I.set(e.id, {
|
|
1413
1935
|
pinnedAt: "right",
|
|
1414
|
-
offset:
|
|
1415
|
-
isBoundary: e.id ===
|
|
1416
|
-
}),
|
|
1417
|
-
for (let e of
|
|
1936
|
+
offset: z,
|
|
1937
|
+
isBoundary: e.id === T[0]?.id
|
|
1938
|
+
}), z += L(e.id);
|
|
1939
|
+
for (let e of E) I.set(e.id, {
|
|
1418
1940
|
pinnedAt: !1,
|
|
1419
1941
|
offset: 0,
|
|
1420
1942
|
isBoundary: !1
|
|
1421
1943
|
});
|
|
1422
|
-
let
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1944
|
+
let B = (e) => I.get(e) ?? jn, V = _.length === 0, H = l.rowClickSelects, W = H || l.highlightRow || e !== void 0, ee = (e) => !e.getIsGrouped() && W, q = (t, n) => {
|
|
1945
|
+
if (H && t.getCanSelect()) {
|
|
1946
|
+
let e = Ht({
|
|
1947
|
+
rows: _,
|
|
1948
|
+
rowId: t.id,
|
|
1949
|
+
anchorRowId: c.state.selectionAnchorRowId,
|
|
1950
|
+
modifiers: n,
|
|
1951
|
+
selection: s.store.state.rowSelection,
|
|
1952
|
+
canReplaceSelection: !0
|
|
1953
|
+
});
|
|
1954
|
+
s.setRowSelection(e.selection), c.actions.setSelectionAnchor(e.anchorRowId);
|
|
1955
|
+
}
|
|
1956
|
+
l.highlightRow && c.actions.setHighlightedRow(t.id), e?.(t);
|
|
1957
|
+
}, [J, te] = o(null), ne = () => te(null), re = a(null), ie = a(null), ae = () => {
|
|
1958
|
+
let e = re.current, t = ie.current;
|
|
1959
|
+
re.current = null, ie.current = null, te(e === null ? null : {
|
|
1960
|
+
rowId: e,
|
|
1961
|
+
columnId: t
|
|
1962
|
+
});
|
|
1963
|
+
}, oe = J === null ? void 0 : _.find((e) => e.id === J.rowId), se = t && J && oe ? t({
|
|
1964
|
+
table: s,
|
|
1965
|
+
row: oe,
|
|
1966
|
+
cell: oe.getAllCells().find((e) => e.column.id === J.columnId) ?? null,
|
|
1967
|
+
close: ne
|
|
1968
|
+
}) ?? null : null, Y = J ? ne : void 0;
|
|
1969
|
+
return /* @__PURE__ */ K("div", {
|
|
1970
|
+
className: gn.tableWrapper,
|
|
1971
|
+
children: [/* @__PURE__ */ G("div", {
|
|
1972
|
+
ref: g,
|
|
1973
|
+
className: gn.scrollContainer,
|
|
1974
|
+
onScroll: Y,
|
|
1975
|
+
children: /* @__PURE__ */ K("div", {
|
|
1431
1976
|
role: "table",
|
|
1432
|
-
className:
|
|
1433
|
-
"aria-rowcount":
|
|
1434
|
-
"aria-colcount":
|
|
1977
|
+
className: gn.grid,
|
|
1978
|
+
"aria-rowcount": _.length + j.length,
|
|
1979
|
+
"aria-colcount": D.length,
|
|
1435
1980
|
style: {
|
|
1436
|
-
gridTemplateColumns:
|
|
1437
|
-
minWidth:
|
|
1981
|
+
gridTemplateColumns: P,
|
|
1982
|
+
minWidth: F
|
|
1438
1983
|
},
|
|
1439
1984
|
children: [
|
|
1440
|
-
/* @__PURE__ */
|
|
1985
|
+
/* @__PURE__ */ G("div", {
|
|
1441
1986
|
role: "rowgroup",
|
|
1442
1987
|
style: { display: "contents" },
|
|
1443
|
-
children:
|
|
1988
|
+
children: j.map((e, t) => /* @__PURE__ */ G("div", {
|
|
1444
1989
|
role: "row",
|
|
1445
1990
|
"aria-rowindex": t + 1,
|
|
1446
|
-
className:
|
|
1447
|
-
children: e.headers.map((e) => /* @__PURE__ */
|
|
1991
|
+
className: gn.headerRow,
|
|
1992
|
+
children: e.headers.map((e) => /* @__PURE__ */ G(wn, {
|
|
1448
1993
|
header: e,
|
|
1449
|
-
layout:
|
|
1994
|
+
layout: B(e.column.id)
|
|
1450
1995
|
}, e.id))
|
|
1451
1996
|
}, e.id))
|
|
1452
1997
|
}),
|
|
1453
|
-
|
|
1998
|
+
x > 0 && /* @__PURE__ */ G("div", {
|
|
1454
1999
|
"aria-hidden": !0,
|
|
1455
2000
|
style: {
|
|
1456
2001
|
gridColumn: "1/-1",
|
|
1457
|
-
height:
|
|
2002
|
+
height: x
|
|
1458
2003
|
}
|
|
1459
2004
|
}),
|
|
1460
|
-
/* @__PURE__ */
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
2005
|
+
/* @__PURE__ */ G(Pn, {
|
|
2006
|
+
enabled: t !== void 0,
|
|
2007
|
+
menuContent: se,
|
|
2008
|
+
menuProps: r,
|
|
2009
|
+
onContextMenu: ae,
|
|
2010
|
+
onClose: ne,
|
|
2011
|
+
children: b.map((e) => {
|
|
2012
|
+
let n = _[e.index];
|
|
2013
|
+
if (!n) return null;
|
|
2014
|
+
let r = n.getIsGrouped(), i = ee(n), a = !r && (H || l.highlightRow);
|
|
2015
|
+
return /* @__PURE__ */ G("div", {
|
|
1466
2016
|
role: "row",
|
|
1467
|
-
"aria-rowindex": e.index +
|
|
1468
|
-
"data-testid": `dg-row-${
|
|
1469
|
-
"data-
|
|
1470
|
-
"data-
|
|
1471
|
-
"data-
|
|
1472
|
-
"
|
|
1473
|
-
|
|
2017
|
+
"aria-rowindex": e.index + j.length + 1,
|
|
2018
|
+
"data-testid": `dg-row-${n.id}`,
|
|
2019
|
+
"data-grouped": r,
|
|
2020
|
+
"data-depth": n.depth,
|
|
2021
|
+
"data-selected": l.rowSelection && n.getIsSelected(),
|
|
2022
|
+
"data-selected-bg": l.rowSelection && l.showSelectedBackground && n.getIsSelected(),
|
|
2023
|
+
"data-highlighted": l.highlightRow && n.id === p,
|
|
2024
|
+
"data-context-menu": se !== null && J?.rowId === n.id,
|
|
2025
|
+
"data-selects-on-click": H && !r,
|
|
2026
|
+
"aria-selected": l.rowSelection ? n.getIsSelected() : void 0,
|
|
2027
|
+
"aria-current": l.highlightRow && n.id === p ? !0 : void 0,
|
|
2028
|
+
className: gn.bodyRow,
|
|
1474
2029
|
style: {
|
|
1475
|
-
minHeight:
|
|
1476
|
-
cursor:
|
|
2030
|
+
minHeight: u,
|
|
2031
|
+
cursor: i ? "pointer" : void 0
|
|
1477
2032
|
},
|
|
1478
|
-
tabIndex:
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
2033
|
+
tabIndex: a ? 0 : void 0,
|
|
2034
|
+
onMouseDown: H && !r ? (e) => {
|
|
2035
|
+
e.shiftKey && e.preventDefault();
|
|
2036
|
+
} : void 0,
|
|
2037
|
+
onClick: i ? (e) => q(n, {
|
|
2038
|
+
toggle: e.ctrlKey || e.metaKey,
|
|
2039
|
+
extend: e.shiftKey
|
|
2040
|
+
}) : void 0,
|
|
2041
|
+
onKeyDown: a ? (e) => {
|
|
2042
|
+
e.key !== " " && e.key !== "Enter" || e.target === e.currentTarget && (e.preventDefault(), q(n, {
|
|
2043
|
+
toggle: !0,
|
|
2044
|
+
extend: e.shiftKey
|
|
2045
|
+
}));
|
|
2046
|
+
} : void 0,
|
|
2047
|
+
onContextMenu: t && !r ? () => {
|
|
2048
|
+
re.current = n.id;
|
|
1482
2049
|
} : void 0,
|
|
1483
2050
|
children: [
|
|
1484
|
-
...
|
|
1485
|
-
...
|
|
1486
|
-
...
|
|
1487
|
-
].map((e) => /* @__PURE__ */
|
|
2051
|
+
...n.getLeftVisibleCells(),
|
|
2052
|
+
...n.getCenterVisibleCells(),
|
|
2053
|
+
...n.getRightVisibleCells()
|
|
2054
|
+
].map((e) => /* @__PURE__ */ G(Nn, {
|
|
1488
2055
|
cell: e,
|
|
1489
|
-
rowHeight:
|
|
1490
|
-
layout:
|
|
2056
|
+
rowHeight: u,
|
|
2057
|
+
layout: B(e.column.id),
|
|
2058
|
+
onContextMenu: t ? () => {
|
|
2059
|
+
ie.current = e.column.id;
|
|
2060
|
+
} : void 0
|
|
1491
2061
|
}, e.id))
|
|
1492
|
-
}, e.key)
|
|
2062
|
+
}, e.key);
|
|
1493
2063
|
})
|
|
1494
2064
|
}),
|
|
1495
|
-
|
|
2065
|
+
V && m === !0 && /* @__PURE__ */ G("div", {
|
|
1496
2066
|
role: "row",
|
|
1497
|
-
className:
|
|
1498
|
-
children: /* @__PURE__ */
|
|
2067
|
+
className: gn.messageRow,
|
|
2068
|
+
children: /* @__PURE__ */ G(d, { size: "lg" })
|
|
1499
2069
|
}),
|
|
1500
|
-
|
|
2070
|
+
V && m !== !0 && /* @__PURE__ */ K("div", {
|
|
1501
2071
|
role: "row",
|
|
1502
|
-
className:
|
|
1503
|
-
children: [/* @__PURE__ */
|
|
2072
|
+
className: gn.messageRow,
|
|
2073
|
+
children: [/* @__PURE__ */ G(U, {
|
|
1504
2074
|
size: 40,
|
|
1505
2075
|
stroke: 1.4,
|
|
1506
2076
|
opacity: .4
|
|
1507
|
-
}), /* @__PURE__ */
|
|
1508
|
-
size:
|
|
2077
|
+
}), /* @__PURE__ */ G(v, {
|
|
2078
|
+
size: f,
|
|
1509
2079
|
c: "dimmed",
|
|
1510
|
-
children:
|
|
2080
|
+
children: h
|
|
1511
2081
|
})]
|
|
1512
2082
|
}),
|
|
1513
|
-
|
|
2083
|
+
S > 0 && /* @__PURE__ */ G("div", {
|
|
1514
2084
|
"aria-hidden": !0,
|
|
1515
2085
|
style: {
|
|
1516
2086
|
gridColumn: "1/-1",
|
|
1517
|
-
height:
|
|
2087
|
+
height: S
|
|
1518
2088
|
}
|
|
1519
2089
|
})
|
|
1520
2090
|
]
|
|
1521
2091
|
})
|
|
1522
|
-
}), /* @__PURE__ */
|
|
2092
|
+
}), /* @__PURE__ */ G(lt, {})]
|
|
1523
2093
|
});
|
|
1524
2094
|
}
|
|
1525
|
-
var
|
|
2095
|
+
var In = {
|
|
1526
2096
|
toolbar: "_toolbar_4my8t_1",
|
|
1527
2097
|
toolbarSpacer: "_toolbarSpacer_4my8t_10"
|
|
1528
2098
|
};
|
|
1529
2099
|
//#endregion
|
|
1530
2100
|
//#region src/tmdatagrid/components/TMDataGridToolbar.tsx
|
|
1531
|
-
function
|
|
2101
|
+
function Ln(t) {
|
|
1532
2102
|
let n = e(2), { children: r } = t, i;
|
|
1533
|
-
return n[0] === r ? i = n[1] : (i = /* @__PURE__ */
|
|
1534
|
-
className:
|
|
2103
|
+
return n[0] === r ? i = n[1] : (i = /* @__PURE__ */ G("div", {
|
|
2104
|
+
className: In.toolbar,
|
|
1535
2105
|
children: r
|
|
1536
2106
|
}), n[0] = r, n[1] = i), i;
|
|
1537
2107
|
}
|
|
1538
|
-
function
|
|
2108
|
+
function Rn() {
|
|
1539
2109
|
let t = e(1), n;
|
|
1540
|
-
return t[0] === Symbol.for("react.memo_cache_sentinel") ? (n = /* @__PURE__ */
|
|
2110
|
+
return t[0] === Symbol.for("react.memo_cache_sentinel") ? (n = /* @__PURE__ */ G("div", { className: In.toolbarSpacer }), t[0] = n) : n = t[0], n;
|
|
1541
2111
|
}
|
|
1542
|
-
function
|
|
1543
|
-
let n = e(11), { children: r } = t, { table: i, controlSize: a } =
|
|
1544
|
-
if (
|
|
2112
|
+
function zn(t) {
|
|
2113
|
+
let n = e(11), { children: r } = t, { table: i, controlSize: a } = je();
|
|
2114
|
+
if (C(i.store), r !== void 0) {
|
|
1545
2115
|
let e;
|
|
1546
|
-
return n[0] !== r || n[1] !== a ? (e = /* @__PURE__ */
|
|
2116
|
+
return n[0] !== r || n[1] !== a ? (e = /* @__PURE__ */ G(v, {
|
|
1547
2117
|
size: a,
|
|
1548
2118
|
c: "dimmed",
|
|
1549
2119
|
children: r
|
|
@@ -1554,7 +2124,7 @@ function tn(t) {
|
|
|
1554
2124
|
let s = o, c;
|
|
1555
2125
|
n[5] === i ? c = n[6] : (c = i.options.meta?.totalRowCount ?? i.getPreFilteredRowModel().rows.length, n[5] = i, n[6] = c);
|
|
1556
2126
|
let l = c, u;
|
|
1557
|
-
return n[7] !== a || n[8] !== s || n[9] !== l ? (u = /* @__PURE__ */
|
|
2127
|
+
return n[7] !== a || n[8] !== s || n[9] !== l ? (u = /* @__PURE__ */ K(v, {
|
|
1558
2128
|
size: a,
|
|
1559
2129
|
c: "dimmed",
|
|
1560
2130
|
children: [
|
|
@@ -1564,19 +2134,19 @@ function tn(t) {
|
|
|
1564
2134
|
]
|
|
1565
2135
|
}), n[7] = a, n[8] = s, n[9] = l, n[10] = u) : u = n[10], u;
|
|
1566
2136
|
}
|
|
1567
|
-
function
|
|
1568
|
-
let t = e(9), { table: n, ui: r, features: i, controlSize: a } =
|
|
1569
|
-
if (!
|
|
2137
|
+
function Bn() {
|
|
2138
|
+
let t = e(9), { table: n, ui: r, features: i, controlSize: a } = je(), o = C(r, Vn);
|
|
2139
|
+
if (!Rt(n, i).canHideAny) return null;
|
|
1570
2140
|
let c;
|
|
1571
|
-
t[0] === Symbol.for("react.memo_cache_sentinel") ? (c = /* @__PURE__ */
|
|
2141
|
+
t[0] === Symbol.for("react.memo_cache_sentinel") ? (c = /* @__PURE__ */ G(V, {
|
|
1572
2142
|
size: 18,
|
|
1573
2143
|
stroke: 1.6
|
|
1574
2144
|
}), t[0] = c) : c = t[0];
|
|
1575
2145
|
let l;
|
|
1576
|
-
t[1] !== a || t[2] !== r.actions.toggleColumnsPanel ? (l = /* @__PURE__ */
|
|
2146
|
+
t[1] !== a || t[2] !== r.actions.toggleColumnsPanel ? (l = /* @__PURE__ */ G(m.Target, { children: /* @__PURE__ */ G(b, {
|
|
1577
2147
|
label: "Manage columns",
|
|
1578
2148
|
openDelay: 400,
|
|
1579
|
-
children: /* @__PURE__ */
|
|
2149
|
+
children: /* @__PURE__ */ G(s, {
|
|
1580
2150
|
variant: "subtle",
|
|
1581
2151
|
color: "gray",
|
|
1582
2152
|
size: a,
|
|
@@ -1586,12 +2156,12 @@ function nn() {
|
|
|
1586
2156
|
})
|
|
1587
2157
|
}) }), t[1] = a, t[2] = r.actions.toggleColumnsPanel, t[3] = l) : l = t[3];
|
|
1588
2158
|
let u;
|
|
1589
|
-
t[4] === Symbol.for("react.memo_cache_sentinel") ? (u = /* @__PURE__ */
|
|
2159
|
+
t[4] === Symbol.for("react.memo_cache_sentinel") ? (u = /* @__PURE__ */ G(m.Dropdown, {
|
|
1590
2160
|
p: 0,
|
|
1591
|
-
children: /* @__PURE__ */
|
|
2161
|
+
children: /* @__PURE__ */ G(We, {})
|
|
1592
2162
|
}), t[4] = u) : u = t[4];
|
|
1593
2163
|
let d;
|
|
1594
|
-
return t[5] !== o || t[6] !== l || t[7] !== r.actions.setColumnsPanelOpen ? (d = /* @__PURE__ */
|
|
2164
|
+
return t[5] !== o || t[6] !== l || t[7] !== r.actions.setColumnsPanelOpen ? (d = /* @__PURE__ */ K(m, {
|
|
1595
2165
|
opened: o,
|
|
1596
2166
|
onChange: r.actions.setColumnsPanelOpen,
|
|
1597
2167
|
position: "bottom-end",
|
|
@@ -1602,61 +2172,62 @@ function nn() {
|
|
|
1602
2172
|
children: [l, u]
|
|
1603
2173
|
}), t[5] = o, t[6] = l, t[7] = r.actions.setColumnsPanelOpen, t[8] = d) : d = t[8], d;
|
|
1604
2174
|
}
|
|
1605
|
-
function
|
|
2175
|
+
function Vn(e) {
|
|
1606
2176
|
return e.columnsPanelOpen;
|
|
1607
2177
|
}
|
|
1608
|
-
function
|
|
1609
|
-
let t = e(11), n =
|
|
1610
|
-
if (!
|
|
2178
|
+
function Hn() {
|
|
2179
|
+
let t = e(11), n = je(), { table: r, ui: i, features: a, controlSize: o } = n, c = C(i, Kn), l = C(r.store, Gn).filter(Wn).length;
|
|
2180
|
+
if (!Rt(r, a).canFilterAny) return null;
|
|
1611
2181
|
let u = c || l > 0 ? "light" : "subtle", d = l > 0 ? void 0 : "gray", f;
|
|
1612
2182
|
t[0] !== n || t[1] !== c || t[2] !== r || t[3] !== i ? (f = () => {
|
|
1613
2183
|
if (c) {
|
|
1614
2184
|
i.actions.closeFilterPanel();
|
|
1615
2185
|
return;
|
|
1616
2186
|
}
|
|
1617
|
-
let e = r.getAllLeafColumns().find(
|
|
1618
|
-
e ?
|
|
2187
|
+
let e = r.getAllLeafColumns().find(Un);
|
|
2188
|
+
e ? sn(n, e.id) : i.actions.openFilterPanel();
|
|
1619
2189
|
}, t[0] = n, t[1] = c, t[2] = r, t[3] = i, t[4] = f) : f = t[4];
|
|
1620
2190
|
let p;
|
|
1621
|
-
t[5] === Symbol.for("react.memo_cache_sentinel") ? (p = /* @__PURE__ */
|
|
2191
|
+
t[5] === Symbol.for("react.memo_cache_sentinel") ? (p = /* @__PURE__ */ G(I, {
|
|
1622
2192
|
size: 16,
|
|
1623
2193
|
stroke: 1.6
|
|
1624
2194
|
}), t[5] = p) : p = t[5];
|
|
1625
2195
|
let m;
|
|
1626
|
-
return t[6] !== o || t[7] !== u || t[8] !== d || t[9] !== f ? (m = /* @__PURE__ */
|
|
2196
|
+
return t[6] !== o || t[7] !== u || t[8] !== d || t[9] !== f ? (m = /* @__PURE__ */ G(b, {
|
|
1627
2197
|
label: "Filters",
|
|
1628
2198
|
openDelay: 400,
|
|
1629
|
-
children: /* @__PURE__ */
|
|
2199
|
+
children: /* @__PURE__ */ G(s, {
|
|
1630
2200
|
variant: u,
|
|
1631
2201
|
color: d,
|
|
1632
2202
|
size: o,
|
|
1633
2203
|
"aria-label": "Filters",
|
|
2204
|
+
"data-dg-filter-toggle": !0,
|
|
1634
2205
|
onClick: f,
|
|
1635
2206
|
children: p
|
|
1636
2207
|
})
|
|
1637
2208
|
}), t[6] = o, t[7] = u, t[8] = d, t[9] = f, t[10] = m) : m = t[10], m;
|
|
1638
2209
|
}
|
|
1639
|
-
function
|
|
2210
|
+
function Un(e) {
|
|
1640
2211
|
return e.getCanFilter();
|
|
1641
2212
|
}
|
|
1642
|
-
function
|
|
1643
|
-
return
|
|
2213
|
+
function Wn(e) {
|
|
2214
|
+
return rt(e.value);
|
|
1644
2215
|
}
|
|
1645
|
-
function
|
|
2216
|
+
function Gn(e) {
|
|
1646
2217
|
return e.columnFilters;
|
|
1647
2218
|
}
|
|
1648
|
-
function
|
|
2219
|
+
function Kn(e) {
|
|
1649
2220
|
return e.filterPanelOpen;
|
|
1650
2221
|
}
|
|
1651
2222
|
//#endregion
|
|
1652
2223
|
//#region src/tmdatagrid/core/sizes.ts
|
|
1653
|
-
var
|
|
2224
|
+
var qn = "md", Jn = {
|
|
1654
2225
|
xs: 34,
|
|
1655
2226
|
sm: 42,
|
|
1656
2227
|
md: 52,
|
|
1657
2228
|
lg: 62,
|
|
1658
2229
|
xl: 72
|
|
1659
|
-
},
|
|
2230
|
+
}, Yn = {
|
|
1660
2231
|
xs: "xs",
|
|
1661
2232
|
sm: "xs",
|
|
1662
2233
|
md: "sm",
|
|
@@ -1665,8 +2236,8 @@ var un = "md", dn = {
|
|
|
1665
2236
|
};
|
|
1666
2237
|
//#endregion
|
|
1667
2238
|
//#region src/tmdatagrid/components/TMDataGrid.tsx
|
|
1668
|
-
function
|
|
1669
|
-
let n = e(17), { table: r, ui: i, features: a, size: o, children: s, className: c, style: l } = t, u = o === void 0 ? "md" : o, d = r.options.meta?.rowHeight ??
|
|
2239
|
+
function Xn(t) {
|
|
2240
|
+
let n = e(17), { table: r, ui: i, features: a, size: o, children: s, className: c, style: l } = t, u = o === void 0 ? "md" : o, d = r.options.meta?.rowHeight ?? Jn[u], f = Yn[u], p;
|
|
1670
2241
|
n[0] !== a || n[1] !== d || n[2] !== u || n[3] !== f || n[4] !== r || n[5] !== i ? (p = {
|
|
1671
2242
|
table: r,
|
|
1672
2243
|
ui: i,
|
|
@@ -1676,32 +2247,33 @@ function pn(t) {
|
|
|
1676
2247
|
controlSize: f
|
|
1677
2248
|
}, n[0] = a, n[1] = d, n[2] = u, n[3] = f, n[4] = r, n[5] = i, n[6] = p) : p = n[6];
|
|
1678
2249
|
let m = p, h;
|
|
1679
|
-
n[7] === c ? h = n[8] : (h = [
|
|
2250
|
+
n[7] === c ? h = n[8] : (h = [De.root, c].filter(Boolean), n[7] = c, n[8] = h);
|
|
1680
2251
|
let g = h.join(" "), _;
|
|
1681
|
-
n[9] !== s || n[10] !== u || n[11] !== l || n[12] !== g ? (_ = /* @__PURE__ */
|
|
2252
|
+
n[9] !== s || n[10] !== u || n[11] !== l || n[12] !== g ? (_ = /* @__PURE__ */ G("div", {
|
|
1682
2253
|
"data-size": u,
|
|
1683
2254
|
className: g,
|
|
1684
2255
|
style: l,
|
|
1685
2256
|
children: s
|
|
1686
2257
|
}), n[9] = s, n[10] = u, n[11] = l, n[12] = g, n[13] = _) : _ = n[13];
|
|
1687
2258
|
let v;
|
|
1688
|
-
return n[14] !== m || n[15] !== _ ? (v = /* @__PURE__ */
|
|
2259
|
+
return n[14] !== m || n[15] !== _ ? (v = /* @__PURE__ */ G(Ae, {
|
|
1689
2260
|
value: m,
|
|
1690
2261
|
children: _
|
|
1691
2262
|
}), n[14] = m, n[15] = _, n[16] = v) : v = n[16], v;
|
|
1692
2263
|
}
|
|
1693
|
-
var
|
|
1694
|
-
Toolbar:
|
|
1695
|
-
Spacer:
|
|
1696
|
-
SummaryCount:
|
|
1697
|
-
ColumnsButton:
|
|
1698
|
-
FilterButton:
|
|
1699
|
-
Table:
|
|
1700
|
-
Footer:
|
|
1701
|
-
FilterPanel:
|
|
1702
|
-
|
|
2264
|
+
var Zn = Object.assign(Xn, {
|
|
2265
|
+
Toolbar: Ln,
|
|
2266
|
+
Spacer: Rn,
|
|
2267
|
+
SummaryCount: zn,
|
|
2268
|
+
ColumnsButton: Bn,
|
|
2269
|
+
FilterButton: Hn,
|
|
2270
|
+
Table: Fn,
|
|
2271
|
+
Footer: mn,
|
|
2272
|
+
FilterPanel: lt,
|
|
2273
|
+
FilterPills: cn,
|
|
2274
|
+
ColumnsPanel: We
|
|
1703
2275
|
});
|
|
1704
2276
|
//#endregion
|
|
1705
|
-
export {
|
|
2277
|
+
export { gt as DATA_STATE_SLICES, qn as DEFAULT_TMDATAGRID_SIZE, Ye as FILTER_OPERATOR_LABELS, Re as GROUP_COLUMN_ID, Ut as SELECT_COLUMN_ID, _t as SETTINGS_STATE_SLICES, Yn as SIZE_CONTROL_SIZE, Jn as SIZE_ROW_HEIGHT, Zn as TMDataGrid, cn as TMDataGridFilterPills, Zt as createTMDataGridColumnHelper, it as formatFilterLabel, ze as formatGroupValue, Lt as getColumnCapabilities, Me as getColumnLabel, vn as getColumnRegion, Ne as getColumnType, zt as getDisplayedRows, Rt as getGridCapabilities, Le as getGroupDataRows, Vt as getSelectableRowIds, Sn as getStepTargetColumn, pn as getTMDataGridPaginationApi, Fe as isColumnReorderable, rt as isFilterActive, Bt as isPagingActive, bn as moveColumn, Cn as moveColumnByStep, sn as openColumnFilter, It as readFeatureFlags, Ht as resolveRowSelectionClick, Xt as tmDataGridFeatures, $t as useTMDataGrid, je as useTMDataGridContext };
|
|
1706
2278
|
|
|
1707
2279
|
//# sourceMappingURL=index.js.map
|