asma-ui-core 3.45.2 → 3.46.1
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/asma-ui-core.css +1 -1
- package/dist/src/table/helpers/injectColumns.d.ts +1 -1
- package/dist/src/table/hooks/useColumnSizingPersistence.d.ts +3 -0
- package/dist/table/components/StyledTable.module.js +52 -52
- package/dist/table/components/StyledTableIndex.js +31 -27
- package/dist/table/components/TableRow.js +69 -61
- package/dist/table/components/columns/action-column/actionColumn.js +1 -0
- package/dist/table/components/columns/action-column/components/HeaderActionMenu.js +1 -1
- package/dist/table/components/columns/dndHandleColumn.js +6 -4
- package/dist/table/components/columns/expandColumn.js +14 -10
- package/dist/table/components/columns/showTextColumn.js +20 -16
- package/dist/table/components/table-header/TableHeaderCell.js +34 -53
- package/dist/table/custom-features/order-columns/OrderColumnsFeature.js +14 -14
- package/dist/table/helpers/injectColumns.js +7 -7
- package/dist/table/hooks/useColumnSizingPersistence.js +36 -0
- package/dist/table/hooks/useColumnVirtualizer.js +4 -3
- package/dist/table/hooks/useStyledTable.js +48 -40
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { SHOW_FULL_TEXT_ID as i } from "../../types.js";
|
|
2
|
-
import { ChevronDownIcon as
|
|
2
|
+
import { ChevronDownIcon as s } from "../../shared-components/ChevronDownIcon.js";
|
|
3
3
|
import { StyledButton as l } from "../../shared-components/button/StyledButton.js";
|
|
4
|
-
import { jsx as
|
|
5
|
-
function
|
|
4
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
5
|
+
function f(e, n) {
|
|
6
6
|
return {
|
|
7
7
|
id: i,
|
|
8
8
|
minSize: 38,
|
|
@@ -11,24 +11,24 @@ function g(e, o) {
|
|
|
11
11
|
enableHiding: !1,
|
|
12
12
|
enableSorting: !1,
|
|
13
13
|
header: () => null,
|
|
14
|
-
cell: (r) => /* @__PURE__ */
|
|
14
|
+
cell: (r) => /* @__PURE__ */ o(u, {
|
|
15
15
|
info: r,
|
|
16
|
-
rowHeight:
|
|
16
|
+
rowHeight: n
|
|
17
17
|
}),
|
|
18
18
|
fixedLeft: e
|
|
19
19
|
};
|
|
20
20
|
}
|
|
21
|
-
function
|
|
22
|
-
const r = e.row.getCanExpand();
|
|
23
|
-
return /* @__PURE__ */
|
|
21
|
+
function u({ info: e, rowHeight: n }) {
|
|
22
|
+
const r = e.row.getCanExpand(), a = e.row.isExpanded();
|
|
23
|
+
return /* @__PURE__ */ o("div", {
|
|
24
24
|
className: "flex w-full items-center justify-center",
|
|
25
|
-
style: { height:
|
|
26
|
-
children: /* @__PURE__ */
|
|
25
|
+
style: { height: n ?? "auto" },
|
|
26
|
+
children: /* @__PURE__ */ o(l, {
|
|
27
27
|
dataTest: "expand-text-button",
|
|
28
28
|
size: "small",
|
|
29
29
|
variant: "textGray",
|
|
30
|
-
onClick: () => {
|
|
31
|
-
r && e.row.getToggleExpandedHandler()(), e.row.toggleExpand();
|
|
30
|
+
onClick: (t) => {
|
|
31
|
+
t.stopPropagation(), r && e.row.getToggleExpandedHandler()(), e.row.toggleExpand();
|
|
32
32
|
},
|
|
33
33
|
onMouseDown: (t) => {
|
|
34
34
|
t.preventDefault(), t.stopPropagation();
|
|
@@ -36,13 +36,17 @@ function s({ info: e, rowHeight: o }) {
|
|
|
36
36
|
onMouseUp: (t) => {
|
|
37
37
|
t.preventDefault(), t.stopPropagation();
|
|
38
38
|
},
|
|
39
|
-
startIcon: /* @__PURE__ */
|
|
39
|
+
startIcon: /* @__PURE__ */ o(s, {
|
|
40
|
+
className: "block size-5 shrink-0",
|
|
40
41
|
width: 20,
|
|
41
42
|
height: 20,
|
|
42
43
|
style: {
|
|
43
|
-
|
|
44
|
-
|
|
44
|
+
transform: a ? "rotate(180deg)" : "rotate(0deg)",
|
|
45
|
+
transformBox: "fill-box",
|
|
46
|
+
transformOrigin: "center",
|
|
47
|
+
transitionProperty: "transform",
|
|
45
48
|
transitionDuration: "500ms",
|
|
49
|
+
transitionTimingFunction: "cubic-bezier(0.4, 0, 0.2, 1)",
|
|
46
50
|
cursor: "pointer"
|
|
47
51
|
}
|
|
48
52
|
})
|
|
@@ -50,5 +54,5 @@ function s({ info: e, rowHeight: o }) {
|
|
|
50
54
|
});
|
|
51
55
|
}
|
|
52
56
|
export {
|
|
53
|
-
|
|
57
|
+
f as generateShowFullTextColumn
|
|
54
58
|
};
|
|
@@ -1,61 +1,55 @@
|
|
|
1
|
-
import { ACTIONS_COLUMN_ID as
|
|
1
|
+
import { ACTIONS_COLUMN_ID as S, INTERNAL_COLUMN_IDS as y } from "../../types.js";
|
|
2
2
|
import { useRootContext as G } from "../../context/RootContext.js";
|
|
3
3
|
import n from "../StyledTable.module.js";
|
|
4
|
-
import { DropUpIcon as
|
|
5
|
-
import { DropDownIcon as
|
|
6
|
-
import { getTableHeaderStyle as
|
|
7
|
-
import
|
|
8
|
-
import { useMemo as
|
|
9
|
-
import { jsx as
|
|
10
|
-
import { flexRender as
|
|
11
|
-
function
|
|
12
|
-
const { hideHeader:
|
|
13
|
-
return /* @__PURE__ */
|
|
4
|
+
import { DropUpIcon as A } from "../../shared-components/DropUpIcon.js";
|
|
5
|
+
import { DropDownIcon as k } from "../../shared-components/DropDownIcon.js";
|
|
6
|
+
import { getTableHeaderStyle as w } from "../../helpers/getTableHeaderStyle.js";
|
|
7
|
+
import _ from "clsx";
|
|
8
|
+
import { useMemo as c } from "react";
|
|
9
|
+
import { jsx as i, jsxs as F } from "react/jsx-runtime";
|
|
10
|
+
import { flexRender as B } from "@tanstack/react-table";
|
|
11
|
+
function J({ styledTableProps: C, header: o, tableCanResize: D = !1, left: b, right: N, tableWidth: z }) {
|
|
12
|
+
const { hideHeader: r = !1, enableResizing: a = !1, actions: I, customActionsNode: h } = C, { isResizing: m, enableResizingFlag: u, disableResizingFlag: d } = G(), g = o.column.columnDef.fixedLeft, f = !!o.column.columnDef.fixedRight, l = o.column.id === S, p = !!I || !!h, x = c(() => o.headerGroup.headers.some((e) => e.id === S), [o.headerGroup.headers]), H = c(() => o.headerGroup.headers.some((e) => !!e.column.columnDef.fixedRight), [o.headerGroup.headers]), T = c(() => o.headerGroup.headers[o.headerGroup.headers.length - (x ? 2 : 1)], [o.headerGroup.headers, x]), t = o.column.getCanSort(), R = o.column.getIsSorted(), v = t ? R === "asc" ? "ascending" : R === "desc" ? "descending" : "none" : void 0;
|
|
13
|
+
return /* @__PURE__ */ i("th", {
|
|
14
14
|
colSpan: o.colSpan,
|
|
15
|
-
"aria-sort":
|
|
16
|
-
className:
|
|
15
|
+
"aria-sort": v,
|
|
16
|
+
className: _(n["t-cell"], r && n["hide-header"], l && n["t-cell__actions"], l && !p && n["t-cell__actions--not-fixed"], l && p && H && n["t-cell__actions--no-shadow"], g && n["t-cell__fixed"], f && n["t-cell__fixed-right"]),
|
|
17
17
|
style: {
|
|
18
|
-
...
|
|
19
|
-
enableResizing:
|
|
18
|
+
...w({
|
|
19
|
+
enableResizing: a,
|
|
20
20
|
header: o,
|
|
21
|
-
tableWidth:
|
|
21
|
+
tableWidth: z
|
|
22
22
|
}),
|
|
23
|
-
...
|
|
24
|
-
...
|
|
23
|
+
...g && { left: b },
|
|
24
|
+
...f && { right: N }
|
|
25
25
|
},
|
|
26
|
-
children: /* @__PURE__ */
|
|
27
|
-
className:
|
|
28
|
-
role:
|
|
29
|
-
tabIndex:
|
|
26
|
+
children: /* @__PURE__ */ F("div", {
|
|
27
|
+
className: _("flex items-center justify-start", r ? n["hide-table-header"] : n["show-table-header"], t && n["sortable-column"], o.column.columnDef.className),
|
|
28
|
+
role: t ? "button" : void 0,
|
|
29
|
+
tabIndex: t ? 0 : void 0,
|
|
30
30
|
onClick: (e) => {
|
|
31
|
-
const
|
|
32
|
-
!
|
|
31
|
+
const s = o.column.getToggleSortingHandler();
|
|
32
|
+
!m && s && s(e), d();
|
|
33
33
|
},
|
|
34
|
-
onKeyDown:
|
|
34
|
+
onKeyDown: t ? (e) => {
|
|
35
35
|
if (e.key !== "Enter" && e.key !== " ") return;
|
|
36
36
|
e.preventDefault();
|
|
37
|
-
const
|
|
38
|
-
!
|
|
37
|
+
const s = o.column.getToggleSortingHandler();
|
|
38
|
+
!m && s && s(e), d();
|
|
39
39
|
} : void 0,
|
|
40
40
|
children: [
|
|
41
|
-
|
|
41
|
+
B(o.column.columnDef.header, o.getContext()),
|
|
42
42
|
{
|
|
43
|
-
asc: /* @__PURE__ */
|
|
44
|
-
desc: /* @__PURE__ */
|
|
43
|
+
asc: /* @__PURE__ */ i(A, { className: n["sort-icon"] }),
|
|
44
|
+
desc: /* @__PURE__ */ i(k, { className: n["sort-icon"] })
|
|
45
45
|
}[o.column.getIsSorted()] ?? null,
|
|
46
|
-
|
|
46
|
+
D && (a ? !0 : o.id !== T?.id) && o.column.getCanResize() && !y.includes(o.column.id) && /* @__PURE__ */ i("div", {
|
|
47
47
|
onDoubleClick: () => o.column.resetSize(),
|
|
48
48
|
onMouseDown: (e) => {
|
|
49
|
-
e.stopPropagation(),
|
|
50
|
-
styledTableProps: t,
|
|
51
|
-
header: o
|
|
52
|
-
}));
|
|
49
|
+
e.stopPropagation(), u(), o.getResizeHandler()(e);
|
|
53
50
|
},
|
|
54
51
|
onTouchStart: (e) => {
|
|
55
|
-
e.stopPropagation(),
|
|
56
|
-
styledTableProps: t,
|
|
57
|
-
header: o
|
|
58
|
-
}));
|
|
52
|
+
e.stopPropagation(), u(), o.getResizeHandler()(e);
|
|
59
53
|
},
|
|
60
54
|
className: `${n.resizer} ${o.column.getIsResizing() ? n.isResizing : ""}`
|
|
61
55
|
})
|
|
@@ -63,19 +57,6 @@ function V({ styledTableProps: t, header: o, tableCanResize: r = !1, left: a, ri
|
|
|
63
57
|
})
|
|
64
58
|
}, o.id);
|
|
65
59
|
}
|
|
66
|
-
function z({ styledTableProps: t, header: o }) {
|
|
67
|
-
if (t.uniqueKey) {
|
|
68
|
-
const r = t.uniqueKey, a = localStorage.getItem(r);
|
|
69
|
-
let i = {};
|
|
70
|
-
if (a) try {
|
|
71
|
-
const s = JSON.parse(a);
|
|
72
|
-
s && typeof s == "object" && !Array.isArray(s) && (i = Object.fromEntries(Object.entries(s).filter((m) => typeof m[1] == "number")));
|
|
73
|
-
} catch {
|
|
74
|
-
console.warn("Failed to parse stored dimensions. Resetting."), i = {};
|
|
75
|
-
}
|
|
76
|
-
i[o.column.id] = o.column.getSize(), localStorage.setItem(r, JSON.stringify(i));
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
60
|
export {
|
|
80
|
-
|
|
61
|
+
J as TableHeaderCell
|
|
81
62
|
};
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { functionalUpdate as u, makeStateUpdater as
|
|
2
|
-
var
|
|
3
|
-
getInitialState: (
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { functionalUpdate as u, makeStateUpdater as d } from "@tanstack/react-table";
|
|
2
|
+
var a = {
|
|
3
|
+
getInitialState: (r) => ({
|
|
4
|
+
...r,
|
|
5
|
+
columnOrder: r?.columnOrder ?? []
|
|
6
6
|
}),
|
|
7
|
-
getDefaultOptions: (
|
|
8
|
-
createTable: (
|
|
9
|
-
const n =
|
|
10
|
-
|
|
11
|
-
const
|
|
12
|
-
return
|
|
13
|
-
},
|
|
14
|
-
|
|
7
|
+
getDefaultOptions: (r) => ({ onColumnOrderChange: d("columnOrder", r) }),
|
|
8
|
+
createTable: (r) => {
|
|
9
|
+
const n = r.getAllLeafColumns().map((e) => e.id);
|
|
10
|
+
r.setColumnOrder = (e) => {
|
|
11
|
+
const o = (t) => u(e, t);
|
|
12
|
+
return r.options.onColumnOrderChange?.(o);
|
|
13
|
+
}, r.resetColumnOrder = () => {
|
|
14
|
+
r.setColumnOrder(n);
|
|
15
15
|
};
|
|
16
16
|
}
|
|
17
17
|
};
|
|
18
18
|
export {
|
|
19
|
-
|
|
19
|
+
a as OrderColumnsFeature
|
|
20
20
|
};
|
|
@@ -4,17 +4,17 @@ import { generateExpandColumn as h } from "../components/columns/expandColumn.js
|
|
|
4
4
|
import { generateActionsColumn as x } from "../components/columns/action-column/actionColumn.js";
|
|
5
5
|
import { generateDndHandleColumn as _ } from "../components/columns/dndHandleColumn.js";
|
|
6
6
|
import { generateShowFullTextColumn as A } from "../components/columns/showTextColumn.js";
|
|
7
|
-
var T = (
|
|
8
|
-
const {
|
|
9
|
-
!
|
|
7
|
+
var T = (i) => {
|
|
8
|
+
const { actions: r, customActionsNode: m, headerPin: d = !0, enableRowSelection: u, expandArrow: f, enableDnd: c, customDndColumnProps: a, rowHeight: e, textExpandArrow: s, customActionsColumnProps: p, rowActionsState: C, locale: l } = i, n = [...i.columns], t = n.some((o) => o.fixedLeft === !0);
|
|
9
|
+
return !n.find((o) => o.id === "actions") && (r || m || d) && n.push(x({
|
|
10
10
|
headerPin: d,
|
|
11
|
-
actions:
|
|
12
|
-
customActionsNode:
|
|
11
|
+
actions: r,
|
|
12
|
+
customActionsNode: m,
|
|
13
13
|
rowHeight: e,
|
|
14
14
|
customActionsColumnProps: p,
|
|
15
15
|
rowActionsState: C,
|
|
16
|
-
locale:
|
|
17
|
-
})),
|
|
16
|
+
locale: l
|
|
17
|
+
})), s && !n.find((o) => o.id === "show-full-text") && n.unshift(A(t, e)), f && !s && !n.find((o) => o.id === "expand-column-id") && n.unshift(h(t, e)), c && !n.find((o) => o.id === "dnd-handle") && n.unshift(_(a, e)), u && !n.find((o) => o.id === "select") && n.unshift(D(t, e, l)), n;
|
|
18
18
|
};
|
|
19
19
|
export {
|
|
20
20
|
T as injectColumns
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { useEffect as s, useMemo as c } from "react";
|
|
2
|
+
var a = ":column-sizing", g = (t) => {
|
|
3
|
+
if (t)
|
|
4
|
+
try {
|
|
5
|
+
const r = JSON.parse(t);
|
|
6
|
+
return !r || typeof r != "object" || Array.isArray(r) ? void 0 : Object.fromEntries(Object.entries(r).filter((e) => typeof e[1] == "number" && Number.isFinite(e[1]) && e[1] > 0));
|
|
7
|
+
} catch {
|
|
8
|
+
return;
|
|
9
|
+
}
|
|
10
|
+
}, o = (t) => t ? `${t}${a}` : void 0, m = (t) => c(() => {
|
|
11
|
+
const r = o(t);
|
|
12
|
+
if (!(!r || !t))
|
|
13
|
+
try {
|
|
14
|
+
return g(localStorage.getItem(r));
|
|
15
|
+
} catch {
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
}, [t]), S = (t, r) => {
|
|
19
|
+
const e = o(r), i = t.getState().columnSizing, n = !!t.getState().columnSizingInfo.isResizingColumn;
|
|
20
|
+
s(() => {
|
|
21
|
+
if (!(!e || n))
|
|
22
|
+
try {
|
|
23
|
+
localStorage.setItem(e, JSON.stringify(i));
|
|
24
|
+
} catch {
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
}, [
|
|
28
|
+
i,
|
|
29
|
+
n,
|
|
30
|
+
e
|
|
31
|
+
]);
|
|
32
|
+
};
|
|
33
|
+
export {
|
|
34
|
+
S as usePersistColumnSizing,
|
|
35
|
+
m as usePersistedColumnSizing
|
|
36
|
+
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import "../types.js";
|
|
2
2
|
import { useVirtualizer as d } from "@tanstack/react-virtual";
|
|
3
|
-
|
|
3
|
+
var m = 20;
|
|
4
|
+
function f({ table: o, scrollRef: r, isMobileView: l }) {
|
|
4
5
|
const i = o.getVisibleLeafColumns().filter((e) => !e.columnDef.fixedLeft && !e.columnDef.fixedRight && e.id !== "actions"), n = d({
|
|
5
6
|
count: i.length,
|
|
6
7
|
getScrollElement: () => r?.current ?? null,
|
|
@@ -8,7 +9,7 @@ function c({ table: o, scrollRef: r, isMobileView: l }) {
|
|
|
8
9
|
horizontal: !0,
|
|
9
10
|
overscan: 2
|
|
10
11
|
});
|
|
11
|
-
if (l) return { columnWindow: {
|
|
12
|
+
if (l || i.length <= m) return { columnWindow: {
|
|
12
13
|
indexes: i.map((e, u) => u),
|
|
13
14
|
paddingLeft: 0,
|
|
14
15
|
paddingRight: 0
|
|
@@ -21,5 +22,5 @@ function c({ table: o, scrollRef: r, isMobileView: l }) {
|
|
|
21
22
|
} };
|
|
22
23
|
}
|
|
23
24
|
export {
|
|
24
|
-
|
|
25
|
+
f as useColumnVirtualizer
|
|
25
26
|
};
|
|
@@ -1,59 +1,67 @@
|
|
|
1
|
-
import { SELECT_COLUMN_ID as
|
|
2
|
-
import { ExpandedRowsFeature as
|
|
3
|
-
import { FocusedRowsFeature as
|
|
4
|
-
import { OrderColumnsFeature as
|
|
5
|
-
import { usePersistColumnOrder as
|
|
6
|
-
import { usePersistedColumnOrder as
|
|
7
|
-
import { getPersistedPageSizeKey as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
import { SELECT_COLUMN_ID as y } from "../types.js";
|
|
2
|
+
import { ExpandedRowsFeature as E } from "../custom-features/expand-rows/ExpandRowsFeature.js";
|
|
3
|
+
import { FocusedRowsFeature as I } from "../custom-features/focus-rows/FocusRowsFeature.js";
|
|
4
|
+
import { OrderColumnsFeature as b } from "../custom-features/order-columns/OrderColumnsFeature.js";
|
|
5
|
+
import { usePersistColumnOrder as F } from "../custom-features/order-columns/usePersistColumnOrder.js";
|
|
6
|
+
import { usePersistedColumnOrder as O } from "../custom-features/order-columns/usePersistedColumnOrder.js";
|
|
7
|
+
import { getPersistedPageSizeKey as _, usePersistedPageSize as x } from "./usePersistedPageSize.js";
|
|
8
|
+
import { usePersistColumnSizing as v, usePersistedColumnSizing as K } from "./useColumnSizingPersistence.js";
|
|
9
|
+
import { RowSelectionTooltipFeature as L } from "../custom-features/row-selection-tooltip/RowSelectionTooltipFeature.js";
|
|
10
|
+
import { useEffect as p, useRef as T } from "react";
|
|
11
|
+
import { getCoreRowModel as N, getExpandedRowModel as U, getFilteredRowModel as h, getPaginationRowModel as A, getSortedRowModel as D, useReactTable as V } from "@tanstack/react-table";
|
|
12
|
+
var Z = 100, ee = (n) => {
|
|
13
|
+
const { columns: z, data: C, initialState: a, pageSize: w, enableRowSelection: M, tableInstanceRef: d, locale: P, persistColumnOrderKey: u, uniqueKey: l, defaultColumn: g, ...m } = n, S = O(u), c = n.enableColumnResizing ? l : void 0, f = K(c), t = x(l) ?? w ?? 50, e = V({
|
|
13
14
|
_features: [
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
E,
|
|
16
|
+
I,
|
|
17
|
+
b,
|
|
18
|
+
L
|
|
18
19
|
],
|
|
19
|
-
columns:
|
|
20
|
-
data:
|
|
21
|
-
meta: { locale:
|
|
20
|
+
columns: z,
|
|
21
|
+
data: C,
|
|
22
|
+
meta: { locale: P ?? "en" },
|
|
22
23
|
initialState: {
|
|
23
24
|
pagination: {
|
|
24
25
|
pageIndex: 0,
|
|
25
26
|
pageSize: t
|
|
26
27
|
},
|
|
27
28
|
columnVisibility: {
|
|
28
|
-
...
|
|
29
|
-
[
|
|
29
|
+
...a?.columnVisibility,
|
|
30
|
+
[y]: !1
|
|
30
31
|
},
|
|
31
|
-
columnOrder:
|
|
32
|
-
...
|
|
32
|
+
...S && { columnOrder: S },
|
|
33
|
+
...a,
|
|
34
|
+
...f && { columnSizing: {
|
|
35
|
+
...a?.columnSizing,
|
|
36
|
+
...f
|
|
37
|
+
} }
|
|
33
38
|
},
|
|
34
|
-
enableRowSelection:
|
|
35
|
-
getCoreRowModel:
|
|
36
|
-
getExpandedRowModel:
|
|
37
|
-
getFilteredRowModel:
|
|
38
|
-
getSortedRowModel:
|
|
39
|
-
getPaginationRowModel:
|
|
40
|
-
getRowId:
|
|
41
|
-
defaultColumn: n.
|
|
42
|
-
|
|
39
|
+
enableRowSelection: M,
|
|
40
|
+
getCoreRowModel: N(),
|
|
41
|
+
getExpandedRowModel: U(),
|
|
42
|
+
getFilteredRowModel: h(),
|
|
43
|
+
getSortedRowModel: D(),
|
|
44
|
+
getPaginationRowModel: A(),
|
|
45
|
+
getRowId: m.getRowId ?? ((r, j, R) => R ? [R.id, r.id].join(".") : r.id.toString()),
|
|
46
|
+
defaultColumn: n.enableColumnResizing ? {
|
|
47
|
+
minSize: Z,
|
|
48
|
+
...g
|
|
49
|
+
} : g,
|
|
50
|
+
...m
|
|
43
51
|
});
|
|
44
|
-
|
|
45
|
-
const o =
|
|
46
|
-
return
|
|
47
|
-
|
|
52
|
+
d && (d.current = e), F(e, u), v(e, c);
|
|
53
|
+
const o = _(l), i = e.getState().pagination?.pageSize, s = T(void 0);
|
|
54
|
+
return p(() => {
|
|
55
|
+
s.current = void 0, e.getState().pagination?.pageSize !== t && (e.setPageIndex(0), e.setPageSize(t));
|
|
48
56
|
}, [
|
|
49
57
|
t,
|
|
50
58
|
o,
|
|
51
59
|
e
|
|
52
|
-
]),
|
|
60
|
+
]), p(() => {
|
|
53
61
|
if (!(!o || i == null)) {
|
|
54
|
-
if (
|
|
62
|
+
if (s.current !== o) {
|
|
55
63
|
if (i !== t) return;
|
|
56
|
-
|
|
64
|
+
s.current = o;
|
|
57
65
|
}
|
|
58
66
|
try {
|
|
59
67
|
localStorage.setItem(o, JSON.stringify(i));
|
|
@@ -68,5 +76,5 @@ var H = (n) => {
|
|
|
68
76
|
]), { table: e };
|
|
69
77
|
};
|
|
70
78
|
export {
|
|
71
|
-
|
|
79
|
+
ee as useStyledTable
|
|
72
80
|
};
|