@konstructio/ui 0.1.2-alpha.65 → 0.1.2-alpha.66
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/assets/icons/components/AlertOutline.d.ts +3 -0
- package/dist/assets/icons/components/AlertOutline.js +28 -0
- package/dist/assets/icons/components/index.d.ts +1 -0
- package/dist/assets/icons/components/index.js +126 -124
- package/dist/assets/icons/index.js +122 -120
- package/dist/components/AlertDialog/AlertDialog.js +1 -1
- package/dist/components/AlertDialog/components/AlertDialogTrigger.js +1 -1
- package/dist/components/AlertDialog/components/index.js +1 -1
- package/dist/components/Breadcrumb/components/Item/Item.js +1 -1
- package/dist/components/Breadcrumb/hooks/useBreadcrumb.js +1 -1
- package/dist/components/ButtonGroup/ButtonGroup.js +1 -1
- package/dist/components/ButtonGroup/components/ButtonGroupItem/ButtonGroupItem.js +1 -1
- package/dist/components/Checkbox/Checkbox.js +51 -51
- package/dist/components/Command/Command.js +1 -1
- package/dist/components/Command/components/Command.js +1 -1
- package/dist/components/Command/components/CommandEmpty.js +1 -1
- package/dist/components/Command/components/CommandGroup.js +1 -1
- package/dist/components/Command/components/CommandInput.js +1 -1
- package/dist/components/Command/components/CommandItem.js +1 -1
- package/dist/components/Command/components/CommandList.js +1 -1
- package/dist/components/Command/components/CommandSeparator.js +1 -1
- package/dist/components/Command/components/DialogContent.js +1 -1
- package/dist/components/Command/components/DialogOverlay.js +1 -1
- package/dist/components/DateRangePicker/components/CalendarPanel/components/IndependentModeCalendar/IndependentModeCalendar.js +1 -1
- package/dist/components/DateRangePicker/components/CalendarPanel/components/TogetherModeCalendar/TogetherModeCalendar.js +1 -1
- package/dist/components/Drawer/components/index.js +6 -6
- package/dist/components/PhoneNumberInput/components/FlagSelectorList/FlagSelectorList.js +1 -0
- package/dist/components/PhoneNumberInput/components/TruncateText/TruncateText.js +1 -1
- package/dist/components/PhoneNumberInput/contexts/phone-number.provider.js +1 -1
- package/dist/components/PhoneNumberInput/utils/index.js +1 -1
- package/dist/components/ProgressBar/ProgressBar.d.ts +0 -17
- package/dist/components/ProgressBar/ProgressBar.js +38 -59
- package/dist/components/ProgressBar/ProgressBar.types.d.ts +12 -28
- package/dist/components/ProgressBar/ProgressBar.variants.d.ts +3 -3
- package/dist/components/ProgressBar/ProgressBar.variants.js +23 -24
- package/dist/components/Range/Range.js +1 -1
- package/dist/components/Slider/Slider.js +1 -1
- package/dist/components/Spinner/Spinner.d.ts +4 -0
- package/dist/components/Spinner/Spinner.js +57 -0
- package/dist/components/Spinner/Spinner.types.d.ts +13 -0
- package/dist/components/Spinner/Spinner.variants.d.ts +6 -0
- package/dist/components/Spinner/Spinner.variants.js +54 -0
- package/dist/components/Switch/Switch.js +47 -47
- package/dist/components/Tabs/Tabs.js +1 -1
- package/dist/components/Tabs/components/Content.js +1 -1
- package/dist/components/Tabs/components/List.js +1 -1
- package/dist/components/Tabs/components/Trigger.js +1 -1
- package/dist/components/Toast/Toast.js +9 -9
- package/dist/components/VirtualizedTable/VirtualizedTable.js +71 -65
- package/dist/components/VirtualizedTable/VirtualizedTable.types.d.ts +5 -0
- package/dist/components/VirtualizedTable/components/Body/Body.js +42 -41
- package/dist/components/VirtualizedTable/components/TruncateText/TruncateText.js +1 -1
- package/dist/components/VirtualizedTable/components/WrapperBody/WrapperBody.js +2 -2
- package/dist/components/VirtualizedTable/contexts/table.context.d.ts +2 -1
- package/dist/components/VirtualizedTable/contexts/table.provider.d.ts +1 -1
- package/dist/components/VirtualizedTable/contexts/table.provider.js +190 -108
- package/dist/components/VirtualizedTable/contexts/table.types.d.ts +4 -1
- package/dist/components/VirtualizedTable/events/index.d.ts +12 -0
- package/dist/components/VirtualizedTable/events/index.js +23 -0
- package/dist/components/index.d.ts +3 -0
- package/dist/components/index.js +98 -91
- package/dist/icons.d.ts +1 -1
- package/dist/icons.js +122 -120
- package/dist/{index-DKfEnhKr.js → index--l0zux8V.js} +2 -2
- package/dist/{index-AV6ZtGhy.js → index-3fEdeexs.js} +1 -1
- package/dist/{index-CeZcoQDw.js → index-9a-FL_6D.js} +6 -6
- package/dist/{index-Dy59FQl5.js → index-BKMaItIC.js} +1 -1
- package/dist/{index-DtEcCIrM.js → index-BRXMsxSL.js} +1 -1
- package/dist/{index-DMb4KD0b.js → index-CESXsoMn.js} +1 -1
- package/dist/{index-BG8O18ZY.js → index-CJnS4BVW.js} +1 -1
- package/dist/{index-vcSp8YRZ.js → index-Cmf-IG4l.js} +10 -10
- package/dist/{index-Byr10W8m.js → index-DPcwqB8q.js} +618 -613
- package/dist/{index-BqhYevy7.js → index-Dd_ZmIqU.js} +19 -19
- package/dist/{index-D9SSJ6om.js → index-Dfq4O3b4.js} +3 -3
- package/dist/{index-gSPwC-1I.js → index-Jr0cra7i.js} +9 -9
- package/dist/{index-BlSRBdPy.js → index-URQGEGX7.js} +1 -1
- package/dist/index.js +142 -135
- package/dist/{libphonenumber-C9G59k5J.js → libphonenumber-aZ-2KWIf.js} +3 -3
- package/dist/package.json +2 -2
- package/dist/{proxy-BhEKW5n7.js → proxy-BIRlSMN_.js} +856 -851
- package/dist/styles.css +1 -1
- package/dist/useBreadcrumb-C_Wb2cXs.js +1435 -0
- package/dist/utils/index.js +514 -355
- package/package.json +2 -2
- package/dist/useBreadcrumb-vSs0pRo3.js +0 -1412
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { jsx as r, jsxs as s } from "react/jsx-runtime";
|
|
2
|
-
import { useMemo as
|
|
2
|
+
import { useMemo as U } from "react";
|
|
3
3
|
import { cn as c } from "../../utils/index.js";
|
|
4
|
-
import { TableProvider as
|
|
5
|
-
import { Filter as
|
|
6
|
-
import { WrapperBody as
|
|
7
|
-
import { Header as
|
|
8
|
-
import { Body as
|
|
9
|
-
import { Pagination as
|
|
10
|
-
import { TruncateText as
|
|
11
|
-
import { Actions as
|
|
12
|
-
const
|
|
4
|
+
import { TableProvider as X } from "./contexts/table.provider.js";
|
|
5
|
+
import { Filter as Y } from "./components/Filter/Filter.js";
|
|
6
|
+
import { WrapperBody as Z } from "./components/WrapperBody/WrapperBody.js";
|
|
7
|
+
import { Header as _ } from "./components/Header/Header.js";
|
|
8
|
+
import { Body as $ } from "./components/Body/Body.js";
|
|
9
|
+
import { Pagination as D } from "./components/Pagination/Pagination.js";
|
|
10
|
+
import { TruncateText as L } from "./components/TruncateText/TruncateText.js";
|
|
11
|
+
import { Actions as rr } from "./components/Actions/Actions.js";
|
|
12
|
+
const er = ({
|
|
13
13
|
id: n,
|
|
14
14
|
ariaLabel: p,
|
|
15
15
|
columns: d,
|
|
@@ -22,39 +22,42 @@ const D = ({
|
|
|
22
22
|
classNameTable: A,
|
|
23
23
|
classNameWrapperTable: y,
|
|
24
24
|
isLoading: a,
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
getRowId: h,
|
|
26
|
+
fetchData: z,
|
|
27
|
+
queryOptions: B,
|
|
27
28
|
// Pagination
|
|
28
|
-
showPagination:
|
|
29
|
+
showPagination: V,
|
|
29
30
|
showTotalItems: t,
|
|
30
31
|
showDropdownPagination: i,
|
|
31
32
|
showDotPagination: l,
|
|
32
33
|
showFormPagination: m,
|
|
33
|
-
pageSizes:
|
|
34
|
+
pageSizes: j,
|
|
34
35
|
// Filter
|
|
35
|
-
showFilter:
|
|
36
|
-
showFilterInput:
|
|
37
|
-
filterSearchPlaceholder:
|
|
38
|
-
multiSelectFilter:
|
|
39
|
-
filterActions:
|
|
40
|
-
showResetButton:
|
|
41
|
-
resetButtonClassName:
|
|
36
|
+
showFilter: k = !1,
|
|
37
|
+
showFilterInput: v,
|
|
38
|
+
filterSearchPlaceholder: w = "",
|
|
39
|
+
multiSelectFilter: P,
|
|
40
|
+
filterActions: E,
|
|
41
|
+
showResetButton: H = !0,
|
|
42
|
+
resetButtonClassName: I,
|
|
42
43
|
// Hover row
|
|
43
|
-
enableHoverRow:
|
|
44
|
-
classNameHoverRow:
|
|
44
|
+
enableHoverRow: K,
|
|
45
|
+
classNameHoverRow: M,
|
|
45
46
|
// Expandable rows
|
|
46
|
-
enableExpandedRow:
|
|
47
|
-
expandedState:
|
|
48
|
-
defaultExpanded:
|
|
49
|
-
classNameExpandedRow:
|
|
50
|
-
classNameExpandedCell:
|
|
51
|
-
classNameExpandedContent:
|
|
52
|
-
classNameExpandedHeader:
|
|
53
|
-
classNameActiveExpandedRow:
|
|
54
|
-
onExpandedChange:
|
|
47
|
+
enableExpandedRow: W,
|
|
48
|
+
expandedState: g,
|
|
49
|
+
defaultExpanded: q,
|
|
50
|
+
classNameExpandedRow: C,
|
|
51
|
+
classNameExpandedCell: F,
|
|
52
|
+
classNameExpandedContent: G,
|
|
53
|
+
classNameExpandedHeader: J,
|
|
54
|
+
classNameActiveExpandedRow: O,
|
|
55
|
+
onExpandedChange: Q,
|
|
56
|
+
renderExpandedRow: R,
|
|
57
|
+
keepExpandColumnVisible: S
|
|
55
58
|
}) => {
|
|
56
|
-
const e =
|
|
57
|
-
() =>
|
|
59
|
+
const e = U(
|
|
60
|
+
() => V || [
|
|
58
61
|
t,
|
|
59
62
|
i,
|
|
60
63
|
l,
|
|
@@ -63,40 +66,43 @@ const D = ({
|
|
|
63
66
|
[]
|
|
64
67
|
);
|
|
65
68
|
return /* @__PURE__ */ r(
|
|
66
|
-
|
|
69
|
+
X,
|
|
67
70
|
{
|
|
68
71
|
id: n,
|
|
69
72
|
columns: d,
|
|
70
73
|
data: f,
|
|
71
|
-
|
|
74
|
+
getRowId: h,
|
|
75
|
+
fetchData: z,
|
|
72
76
|
totalItems: u,
|
|
73
|
-
queryOptions:
|
|
77
|
+
queryOptions: B,
|
|
74
78
|
isPaginationEnabled: e,
|
|
75
|
-
enableExpandedRow:
|
|
76
|
-
expandedState:
|
|
77
|
-
onExpandedChange:
|
|
78
|
-
defaultExpanded:
|
|
79
|
-
classNameExpandedRow:
|
|
80
|
-
classNameExpandedCell:
|
|
81
|
-
classNameExpandedContent:
|
|
82
|
-
classNameExpandedHeader:
|
|
83
|
-
classNameActiveExpandedRow:
|
|
84
|
-
enableHoverRow:
|
|
85
|
-
classNameHoverRow:
|
|
79
|
+
enableExpandedRow: W,
|
|
80
|
+
expandedState: g,
|
|
81
|
+
onExpandedChange: Q,
|
|
82
|
+
defaultExpanded: q,
|
|
83
|
+
classNameExpandedRow: C,
|
|
84
|
+
classNameExpandedCell: F,
|
|
85
|
+
classNameExpandedContent: G,
|
|
86
|
+
classNameExpandedHeader: J,
|
|
87
|
+
classNameActiveExpandedRow: O,
|
|
88
|
+
enableHoverRow: K,
|
|
89
|
+
classNameHoverRow: M,
|
|
90
|
+
renderExpandedRow: R,
|
|
91
|
+
keepExpandColumnVisible: S,
|
|
86
92
|
children: /* @__PURE__ */ s("section", { className: c("w-full min-w-fit", b), children: [
|
|
87
|
-
|
|
88
|
-
|
|
93
|
+
k && /* @__PURE__ */ r(
|
|
94
|
+
Y,
|
|
89
95
|
{
|
|
90
|
-
actions:
|
|
91
|
-
multiSelectFilter:
|
|
92
|
-
placeholder:
|
|
93
|
-
showFilterInput:
|
|
94
|
-
showResetButton:
|
|
95
|
-
resetButtonClassName:
|
|
96
|
+
actions: E,
|
|
97
|
+
multiSelectFilter: P,
|
|
98
|
+
placeholder: w,
|
|
99
|
+
showFilterInput: v,
|
|
100
|
+
showResetButton: H,
|
|
101
|
+
resetButtonClassName: I
|
|
96
102
|
}
|
|
97
103
|
),
|
|
98
104
|
/* @__PURE__ */ r(
|
|
99
|
-
|
|
105
|
+
Z,
|
|
100
106
|
{
|
|
101
107
|
showPagination: e,
|
|
102
108
|
classNameWrapperTable: y,
|
|
@@ -112,38 +118,38 @@ const D = ({
|
|
|
112
118
|
"aria-label": p,
|
|
113
119
|
children: [
|
|
114
120
|
/* @__PURE__ */ r(
|
|
115
|
-
|
|
121
|
+
_,
|
|
116
122
|
{
|
|
117
123
|
className: x,
|
|
118
124
|
classNameArrows: N,
|
|
119
125
|
classNameActiveArrows: T
|
|
120
126
|
}
|
|
121
127
|
),
|
|
122
|
-
/* @__PURE__ */ r(
|
|
128
|
+
/* @__PURE__ */ r($, { isLoading: a, showPagination: e })
|
|
123
129
|
]
|
|
124
130
|
}
|
|
125
131
|
)
|
|
126
132
|
}
|
|
127
133
|
),
|
|
128
134
|
e && /* @__PURE__ */ r(
|
|
129
|
-
|
|
135
|
+
D,
|
|
130
136
|
{
|
|
131
137
|
showTotalItems: t,
|
|
132
138
|
showDropdownPagination: i,
|
|
133
139
|
showDotPagination: l,
|
|
134
140
|
showFormPagination: m,
|
|
135
|
-
pageSizes:
|
|
141
|
+
pageSizes: j,
|
|
136
142
|
isLoading: a
|
|
137
143
|
}
|
|
138
144
|
)
|
|
139
145
|
] })
|
|
140
146
|
}
|
|
141
147
|
);
|
|
142
|
-
}, o =
|
|
148
|
+
}, o = er;
|
|
143
149
|
o.displayName = "KonstructVirtualizedTable";
|
|
144
|
-
o.TruncateText =
|
|
145
|
-
o.Actions =
|
|
150
|
+
o.TruncateText = L;
|
|
151
|
+
o.Actions = rr;
|
|
146
152
|
export {
|
|
147
|
-
|
|
153
|
+
L as TruncateText,
|
|
148
154
|
o as VirtualizedTable
|
|
149
155
|
};
|
|
@@ -73,6 +73,7 @@ export type Props<TData extends RowDataPrimitive> = VariantProps<typeof virtuali
|
|
|
73
73
|
classNameHoverRow?: string;
|
|
74
74
|
queryOptions?: Omit<UseQueryOptions<any, any, any, any>, 'queryKey' | 'queryFn'>;
|
|
75
75
|
isLoading?: boolean;
|
|
76
|
+
getRowId?: (originalRow: TData, index: number) => string;
|
|
76
77
|
fetchData?: (params: Record<string, string | number | string[] | number[] | undefined>) => Promise<{
|
|
77
78
|
data: TData[];
|
|
78
79
|
totalItemsCount?: number;
|
|
@@ -119,6 +120,8 @@ export type Props<TData extends RowDataPrimitive> = VariantProps<typeof virtuali
|
|
|
119
120
|
classNameExpandedHeader?: string;
|
|
120
121
|
classNameActiveExpandedRow?: string;
|
|
121
122
|
onExpandedChange?: OnChangeFn<ExpandedState>;
|
|
123
|
+
renderExpandedRow?: (data: TData) => ReactNode;
|
|
124
|
+
keepExpandColumnVisible?: boolean | Record<string, boolean>;
|
|
122
125
|
} | {
|
|
123
126
|
enableExpandedRow?: false | undefined;
|
|
124
127
|
expandedState?: never;
|
|
@@ -129,4 +132,6 @@ export type Props<TData extends RowDataPrimitive> = VariantProps<typeof virtuali
|
|
|
129
132
|
classNameExpandedHeader?: never;
|
|
130
133
|
classNameActiveExpandedRow?: never;
|
|
131
134
|
onExpandedChange?: never;
|
|
135
|
+
renderExpandedRow?: never;
|
|
136
|
+
keepExpandColumnVisible?: never;
|
|
132
137
|
});
|
|
@@ -1,29 +1,30 @@
|
|
|
1
|
-
import { jsx as a, jsxs as
|
|
2
|
-
import { f as
|
|
3
|
-
import { Fragment as
|
|
4
|
-
import { Skeleton as
|
|
1
|
+
import { jsx as a, jsxs as S } from "react/jsx-runtime";
|
|
2
|
+
import { f as j } from "../../../../index-CSWGJT-v.js";
|
|
3
|
+
import { Fragment as H } from "react";
|
|
4
|
+
import { Skeleton as M } from "../Skeleton/Skeleton.js";
|
|
5
5
|
import { cn as s } from "../../../../utils/index.js";
|
|
6
|
-
import { ExpandableRow as
|
|
7
|
-
import { useTableContext as
|
|
8
|
-
const
|
|
6
|
+
import { ExpandableRow as A } from "../ExpandableRow/ExpandableRow.js";
|
|
7
|
+
import { useTableContext as B } from "../../contexts/table.hook.js";
|
|
8
|
+
const J = ({
|
|
9
9
|
isLoading: f,
|
|
10
10
|
showPagination: t
|
|
11
11
|
}) => {
|
|
12
12
|
const {
|
|
13
|
-
table:
|
|
14
|
-
pageSize:
|
|
15
|
-
tableFetching:
|
|
16
|
-
enableExpandedRow:
|
|
13
|
+
table: b,
|
|
14
|
+
pageSize: u,
|
|
15
|
+
tableFetching: h,
|
|
16
|
+
enableExpandedRow: w,
|
|
17
17
|
classNameExpandedRow: N,
|
|
18
|
-
classNameExpandedCell:
|
|
19
|
-
classNameExpandedContent:
|
|
20
|
-
enableHoverRow:
|
|
21
|
-
classNameHoverRow:
|
|
22
|
-
classNameActiveExpandedRow:
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
18
|
+
classNameExpandedCell: R,
|
|
19
|
+
classNameExpandedContent: k,
|
|
20
|
+
enableHoverRow: p,
|
|
21
|
+
classNameHoverRow: E,
|
|
22
|
+
classNameActiveExpandedRow: v,
|
|
23
|
+
renderExpandedRow: i
|
|
24
|
+
} = B();
|
|
25
|
+
if (f || h)
|
|
26
|
+
return /* @__PURE__ */ a(M, { numberOfRows: u, table: b });
|
|
27
|
+
const o = b.getRowModel().rows ?? [];
|
|
27
28
|
return /* @__PURE__ */ a(
|
|
28
29
|
"tbody",
|
|
29
30
|
{
|
|
@@ -34,14 +35,14 @@ const G = ({
|
|
|
34
35
|
"relative",
|
|
35
36
|
"dark:border-x"
|
|
36
37
|
),
|
|
37
|
-
children: o.map((
|
|
38
|
-
const { id: n, original:
|
|
39
|
-
return /* @__PURE__ */
|
|
38
|
+
children: o.map((g, l) => {
|
|
39
|
+
const { id: n, original: m, getVisibleCells: y } = g, { meta: d = {} } = m, c = y(), e = w && g.getIsExpanded(), C = !!d.expandedRow || !!i;
|
|
40
|
+
return /* @__PURE__ */ S(H, { children: [
|
|
40
41
|
/* @__PURE__ */ a(
|
|
41
42
|
"tr",
|
|
42
43
|
{
|
|
43
44
|
className: s(
|
|
44
|
-
{ "group/row":
|
|
45
|
+
{ "group/row": p },
|
|
45
46
|
"border-b",
|
|
46
47
|
"border-b-gray-200",
|
|
47
48
|
"dark:text-metal-50",
|
|
@@ -51,8 +52,8 @@ const G = ({
|
|
|
51
52
|
),
|
|
52
53
|
"data-row-id": n,
|
|
53
54
|
...d.attributes ?? {},
|
|
54
|
-
children:
|
|
55
|
-
const
|
|
55
|
+
children: c.map(({ id: D, column: r, getContext: z }, x) => {
|
|
56
|
+
const F = typeof r.columnDef.meta?.className == "function" ? r.columnDef.meta?.className(m) : r.columnDef.meta?.className;
|
|
56
57
|
return /* @__PURE__ */ a(
|
|
57
58
|
"td",
|
|
58
59
|
{
|
|
@@ -67,40 +68,40 @@ const G = ({
|
|
|
67
68
|
"dark:first:border-l",
|
|
68
69
|
"dark:last:border-r",
|
|
69
70
|
{
|
|
70
|
-
"group-hover/row:bg-zinc-100 dark:group-hover/row:bg-metal-800":
|
|
71
|
+
"group-hover/row:bg-zinc-100 dark:group-hover/row:bg-metal-800": p,
|
|
71
72
|
[s(
|
|
72
73
|
"bg-zinc-100 dark:bg-metal-800",
|
|
73
|
-
|
|
74
|
+
v
|
|
74
75
|
)]: !!e
|
|
75
76
|
},
|
|
76
|
-
|
|
77
|
-
|
|
77
|
+
E,
|
|
78
|
+
F,
|
|
78
79
|
{
|
|
79
|
-
"first:rounded-bl-lg": l === o.length - 1 &&
|
|
80
|
-
"last:rounded-br-lg": l === o.length - 1 &&
|
|
80
|
+
"first:rounded-bl-lg": l === o.length - 1 && x === 0 && !t && !e,
|
|
81
|
+
"last:rounded-br-lg": l === o.length - 1 && x === c.length - 1 && !t && !e,
|
|
81
82
|
"dark:[tr:last-child_&]:border-b": !t
|
|
82
83
|
}
|
|
83
84
|
),
|
|
84
85
|
"data-expanded": e ? !0 : void 0,
|
|
85
86
|
...r.columnDef.meta?.attributes ?? {},
|
|
86
|
-
children:
|
|
87
|
+
children: j(r.columnDef.cell, z())
|
|
87
88
|
},
|
|
88
|
-
|
|
89
|
+
D
|
|
89
90
|
);
|
|
90
91
|
})
|
|
91
92
|
}
|
|
92
93
|
),
|
|
93
|
-
|
|
94
|
-
|
|
94
|
+
C && /* @__PURE__ */ a(
|
|
95
|
+
A,
|
|
95
96
|
{
|
|
96
|
-
classNameExpandedCell:
|
|
97
|
-
classNameExpandedContent:
|
|
97
|
+
classNameExpandedCell: R,
|
|
98
|
+
classNameExpandedContent: k,
|
|
98
99
|
classNameExpandedRow: N,
|
|
99
|
-
colSpan:
|
|
100
|
+
colSpan: c.length,
|
|
100
101
|
id: n,
|
|
101
102
|
isExpanded: !!e,
|
|
102
103
|
isLastRow: l === o.length - 1 && !t,
|
|
103
|
-
children: d.expandedRow
|
|
104
|
+
children: d.expandedRow ?? i?.(m)
|
|
104
105
|
}
|
|
105
106
|
)
|
|
106
107
|
] }, n);
|
|
@@ -109,5 +110,5 @@ const G = ({
|
|
|
109
110
|
);
|
|
110
111
|
};
|
|
111
112
|
export {
|
|
112
|
-
|
|
113
|
+
J as Body
|
|
113
114
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as r, jsxs as d } from "react/jsx-runtime";
|
|
2
|
-
import { P as u, R as b, T as m, C as p } from "../../../../index-
|
|
2
|
+
import { P as u, R as b, T as m, C as p } from "../../../../index-DPcwqB8q.js";
|
|
3
3
|
import { d as h } from "../../../../debounce-DJveWHr_.js";
|
|
4
4
|
import { useRef as x, useState as w, useCallback as g, useEffect as s } from "react";
|
|
5
5
|
const v = ({ getValue: l, value: i }) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ColumnSort, SortingState, Table } from '@tanstack/react-table';
|
|
2
|
-
import { Dispatch, SetStateAction } from 'react';
|
|
2
|
+
import { Dispatch, ReactNode, SetStateAction } from 'react';
|
|
3
3
|
import { RowData } from '../VirtualizedTable.types';
|
|
4
4
|
export type ContextType<TData extends RowData = RowData> = {
|
|
5
5
|
sortedData: ColumnSort[];
|
|
@@ -20,6 +20,7 @@ export type ContextType<TData extends RowData = RowData> = {
|
|
|
20
20
|
classNameActiveExpandedRow?: string;
|
|
21
21
|
enableHoverRow?: boolean;
|
|
22
22
|
classNameHoverRow?: string;
|
|
23
|
+
renderExpandedRow?: (data: RowData) => ReactNode;
|
|
23
24
|
handlePage: (newPage: number) => void;
|
|
24
25
|
onPageSize: (newPageSize: number) => void;
|
|
25
26
|
onSorting: Dispatch<SetStateAction<SortingState>>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { RowData } from '../VirtualizedTable.types';
|
|
2
2
|
import { Props } from './table.types';
|
|
3
|
-
export declare const TableProvider: <TData extends RowData = RowData>({ children, classNameExpandedCell, classNameExpandedContent, classNameExpandedRow, classNameExpandedHeader, classNameActiveExpandedRow, classNameHoverRow, columns, data: defaultData, defaultExpanded, enableExpandedRow, enableHoverRow, expandedState, id, isPaginationEnabled, queryOptions, totalItems, fetchData, onExpandedChange, }: Props<TData>) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare const TableProvider: <TData extends RowData = RowData>({ children, classNameExpandedCell, classNameExpandedContent, classNameExpandedRow, classNameExpandedHeader, classNameActiveExpandedRow, classNameHoverRow, columns, data: defaultData, defaultExpanded, enableExpandedRow, enableHoverRow, expandedState, id, isPaginationEnabled, queryOptions, totalItems, getRowId, fetchData, onExpandedChange, renderExpandedRow, keepExpandColumnVisible, }: Props<TData>) => import("react/jsx-runtime").JSX.Element;
|