@bsol-oss/react-datatable5 3.4.2 → 4.0.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/README.md +1 -1
- package/dist/index.d.ts +13 -16
- package/dist/index.js +268 -124
- package/dist/index.mjs +220 -94
- package/dist/types/components/Controls/EditFilterButton.d.ts +1 -1
- package/dist/types/components/DataTable/DefaultTable.d.ts +3 -1
- package/dist/types/components/DataTable/Table.d.ts +4 -3
- package/dist/types/components/DataTable/TableHeader.d.ts +3 -1
- package/dist/types/components/DataTable/TablePagination.d.ts +1 -3
- package/dist/types/components/DataTable/TextCell.d.ts +2 -3
- package/dist/types/components/Filter/GlobalFilter.d.ts +1 -3
- package/dist/types/components/ui/avatar.d.ts +17 -0
- package/dist/types/components/ui/button.d.ts +10 -0
- package/dist/types/components/ui/checkbox.d.ts +8 -0
- package/dist/types/components/ui/close-button.d.ts +4 -0
- package/dist/types/components/ui/color-mode.d.ts +17 -0
- package/dist/types/components/ui/dialog.d.ts +19 -0
- package/dist/types/components/ui/drawer.d.ts +19 -0
- package/dist/types/components/ui/empty-state.d.ts +8 -0
- package/dist/types/components/ui/field.d.ts +9 -0
- package/dist/types/components/ui/input-group.d.ts +12 -0
- package/dist/types/components/ui/menu.d.ts +24 -0
- package/dist/types/components/ui/popover.d.ts +17 -0
- package/dist/types/components/ui/provider.d.ts +2 -0
- package/dist/types/components/ui/radio.d.ts +8 -0
- package/dist/types/components/ui/select.d.ts +25 -0
- package/dist/types/components/ui/slider.d.ts +11 -0
- package/dist/types/components/ui/switch.d.ts +15 -0
- package/dist/types/components/ui/tag.d.ts +9 -0
- package/dist/types/components/ui/tooltip.d.ts +11 -0
- package/package.json +7 -6
package/dist/index.mjs
CHANGED
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { IconButton, Button,
|
|
2
|
+
import { IconButton, Button as Button$1, Portal, Dialog, useDisclosure, Flex, DialogRoot as DialogRoot$1, DialogBackdrop, DialogTrigger as DialogTrigger$1, DialogContent as DialogContent$1, DialogCloseTrigger as DialogCloseTrigger$1, DialogHeader as DialogHeader$1, DialogTitle as DialogTitle$1, DialogBody as DialogBody$1, DialogFooter as DialogFooter$1, Text, Menu, AbsoluteCenter, Tag as Tag$1, Grid, Image, Checkbox as Checkbox$1, Table as Table$1, Box, Tooltip as Tooltip$1, Spinner, Icon, MenuRoot as MenuRoot$1, MenuTrigger as MenuTrigger$1, Span, EmptyState as EmptyState$1, VStack, List, Card, Input, Slider as Slider$1, HStack, For, RadioGroup as RadioGroup$1, Group, Switch as Switch$1, InputElement } from '@chakra-ui/react';
|
|
3
3
|
import { AiOutlineColumnWidth } from 'react-icons/ai';
|
|
4
4
|
import { MdFilterAlt, MdOutlineMoveDown, MdOutlineSort, MdOutlineViewColumn, MdFilterListAlt, MdPushPin, MdCancel, MdClear, MdArrowUpward, MdArrowDownward, MdFirstPage, MdArrowBack, MdArrowForward, MdLastPage, MdOutlineChecklist, MdClose, MdSearch } from 'react-icons/md';
|
|
5
|
-
import
|
|
5
|
+
import * as React from 'react';
|
|
6
6
|
import { createContext, useContext, useEffect, useState } from 'react';
|
|
7
|
+
import { LuX, LuCheck, LuChevronRight } from 'react-icons/lu';
|
|
8
|
+
import { UpDownIcon, ChevronDownIcon, ChevronUpIcon, CloseIcon } from '@chakra-ui/icons';
|
|
7
9
|
import { IoMdEye, IoMdCheckbox } from 'react-icons/io';
|
|
8
10
|
import { makeStateUpdater, functionalUpdate, useReactTable, getCoreRowModel, getFilteredRowModel, getSortedRowModel, getPaginationRowModel, flexRender } from '@tanstack/react-table';
|
|
9
11
|
import { rankItem } from '@tanstack/match-sorter-utils';
|
|
10
|
-
import { Tbody, Tr, Td } from '@chakra-ui/table';
|
|
11
12
|
import { BsExclamationCircleFill } from 'react-icons/bs';
|
|
12
13
|
import { GrAscend, GrDescend } from 'react-icons/gr';
|
|
13
14
|
import { IoReload } from 'react-icons/io5';
|
|
15
|
+
import { HiColorSwatch } from 'react-icons/hi';
|
|
16
|
+
import { CgClose } from 'react-icons/cg';
|
|
14
17
|
import { DragDropContext, Droppable, Draggable } from 'react-beautiful-dnd';
|
|
15
18
|
import { FaGripLinesVertical } from 'react-icons/fa';
|
|
16
19
|
import axios from 'axios';
|
|
@@ -19,19 +22,39 @@ const DensityToggleButton = ({ text, icon = jsx(AiOutlineColumnWidth, {}), }) =>
|
|
|
19
22
|
const { table } = useDataTableContext();
|
|
20
23
|
return (jsxs(Fragment, { children: [!!text === false && (jsx(IconButton, { variant: "ghost", "aria-label": "Toggle Density", icon: icon, onClick: () => {
|
|
21
24
|
table.toggleDensity();
|
|
22
|
-
} })), !!text !== false && (jsx(Button, { leftIcon: icon, variant: "ghost", "aria-label": "Toggle Density", onClick: () => {
|
|
25
|
+
} })), !!text !== false && (jsx(Button$1, { leftIcon: icon, variant: "ghost", "aria-label": "Toggle Density", onClick: () => {
|
|
23
26
|
table.toggleDensity();
|
|
24
27
|
}, children: text }))] }));
|
|
25
28
|
};
|
|
26
29
|
|
|
27
|
-
const
|
|
30
|
+
const CloseButton = React.forwardRef(function CloseButton(props, ref) {
|
|
31
|
+
return (jsx(IconButton, { variant: "ghost", "aria-label": "Close", ref: ref, ...props, children: props.children ?? jsx(LuX, {}) }));
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
const DialogContent = React.forwardRef(function DialogContent(props, ref) {
|
|
35
|
+
const { children, portalled = true, portalRef, backdrop = true, ...rest } = props;
|
|
36
|
+
return (jsxs(Portal, { disabled: !portalled, container: portalRef, children: [backdrop && jsx(Dialog.Backdrop, {}), jsx(Dialog.Positioner, { children: jsx(Dialog.Content, { ref: ref, ...rest, asChild: false, children: children }) })] }));
|
|
37
|
+
});
|
|
38
|
+
const DialogCloseTrigger = React.forwardRef(function DialogCloseTrigger(props, ref) {
|
|
39
|
+
return (jsx(Dialog.CloseTrigger, { position: "absolute", top: "2", insetEnd: "2", ...props, asChild: true, children: jsx(CloseButton, { size: "sm", ref: ref, children: props.children }) }));
|
|
40
|
+
});
|
|
41
|
+
const DialogRoot = Dialog.Root;
|
|
42
|
+
const DialogFooter = Dialog.Footer;
|
|
43
|
+
const DialogHeader = Dialog.Header;
|
|
44
|
+
const DialogBody = Dialog.Body;
|
|
45
|
+
Dialog.Backdrop;
|
|
46
|
+
const DialogTitle = Dialog.Title;
|
|
47
|
+
Dialog.Description;
|
|
48
|
+
const DialogTrigger = Dialog.Trigger;
|
|
49
|
+
const DialogActionTrigger = Dialog.ActionTrigger;
|
|
50
|
+
|
|
51
|
+
const EditFilterButton = ({ text, title = "Edit Filter", closeText = "Close", resetText = "Reset", icon = jsx(MdFilterAlt, {}), }) => {
|
|
28
52
|
const filterModal = useDisclosure();
|
|
29
|
-
return (
|
|
53
|
+
return (jsx(Fragment, { children: jsx(DialogRoot, { size: ["full", "full", "md", "md"], children: jsxs(DialogRoot, { children: [jsx(DialogTrigger, { asChild: true, children: jsxs(Button$1, { variant: "outline", children: [icon, " ", text] }) }), jsxs(DialogContent, { children: [jsx(DialogHeader, { children: jsx(DialogTitle, { children: title }) }), jsx(DialogBody, { children: jsxs(Flex, { flexFlow: "column", gap: "1rem", children: [jsx(TableFilter, {}), jsx(ResetFilteringButton, { text: resetText })] }) }), jsxs(DialogFooter, { children: [jsx(DialogActionTrigger, { asChild: true, children: jsx(Button$1, { onClick: filterModal.onClose, children: closeText }) }), jsx(Button$1, { children: "Save" })] }), jsx(DialogCloseTrigger, {})] })] }) }) }));
|
|
30
54
|
};
|
|
31
55
|
|
|
32
56
|
const EditOrderButton = ({ text, icon = jsx(MdOutlineMoveDown, {}), title = "Change Order", }) => {
|
|
33
|
-
|
|
34
|
-
return (jsxs(Fragment, { children: [!!text === false && (jsx(IconButton, { icon: icon, variant: "ghost", onClick: orderModal.onOpen, "aria-label": "change order" })), !!text !== false && (jsx(Button, { leftIcon: icon, variant: "ghost", onClick: orderModal.onOpen, children: text })), jsxs(Modal, { isOpen: orderModal.isOpen, onClose: orderModal.onClose, size: ["full", "full", "md", "md"], children: [jsx(ModalOverlay, {}), jsxs(ModalContent, { padding: "0 0 1rem 0", children: [jsx(ModalHeader, { children: title }), jsx(ModalCloseButton, {}), jsx(ModalBody, { children: jsx(Flex, { flexFlow: "column", gap: "0.25rem", children: jsx(TableOrderer, {}) }) })] })] })] }));
|
|
57
|
+
return (jsx(Fragment, { children: jsxs(DialogRoot$1, { size: "cover", children: [jsx(DialogBackdrop, {}), jsx(DialogTrigger$1, { asChild: true, children: jsxs(Button$1, { variant: "ghost", children: [icon, text] }) }), jsxs(DialogContent$1, { children: [jsx(DialogCloseTrigger$1, {}), jsxs(DialogHeader$1, { children: [jsx(DialogTitle$1, {}), title] }), jsx(DialogBody$1, { children: jsx(Flex, { flexFlow: "column", gap: "0.25rem", children: jsx(TableOrderer, {}) }) }), jsx(DialogFooter$1, {})] })] }) }));
|
|
35
58
|
};
|
|
36
59
|
|
|
37
60
|
const TableContext = createContext({
|
|
@@ -61,9 +84,9 @@ const TableSorter = () => {
|
|
|
61
84
|
const displayName = header.column.columnDef.meta === undefined
|
|
62
85
|
? header.column.id
|
|
63
86
|
: header.column.columnDef.meta.displayName;
|
|
64
|
-
return (jsx(Fragment, { children: header.column.getCanSort() && (jsxs(Flex, { alignItems: "center", gap: "0.5rem", padding: "0.5rem", children: [jsx(Text, { children: displayName }), jsxs(Button, { variant: "ghost", onClick: () => {
|
|
87
|
+
return (jsx(Fragment, { children: header.column.getCanSort() && (jsxs(Flex, { alignItems: "center", gap: "0.5rem", padding: "0.5rem", children: [jsx(Text, { children: displayName }), jsxs(Button$1, { variant: "ghost", onClick: () => {
|
|
65
88
|
header.column.toggleSorting();
|
|
66
|
-
}, children: [header.column.getIsSorted() === false && jsx(UpDownIcon, {}), header.column.getIsSorted() === "asc" && (jsx(ChevronDownIcon, {})), header.column.getIsSorted() === "desc" && (jsx(ChevronUpIcon, {}))] }), header.column.getIsSorted() && (jsx(Button, { onClick: () => {
|
|
89
|
+
}, children: [header.column.getIsSorted() === false && jsx(UpDownIcon, {}), header.column.getIsSorted() === "asc" && (jsx(ChevronDownIcon, {})), header.column.getIsSorted() === "desc" && (jsx(ChevronUpIcon, {}))] }), header.column.getIsSorted() && (jsx(Button$1, { onClick: () => {
|
|
67
90
|
header.column.clearSorting();
|
|
68
91
|
}, children: jsx(CloseIcon, {}) }))] })) }));
|
|
69
92
|
}) }))) }));
|
|
@@ -71,38 +94,69 @@ const TableSorter = () => {
|
|
|
71
94
|
|
|
72
95
|
const EditSortingButton = ({ text, icon = jsx(MdOutlineSort, {}), title = "Edit Sorting", }) => {
|
|
73
96
|
const sortingModal = useDisclosure();
|
|
74
|
-
return (
|
|
97
|
+
return (jsx(Fragment, { children: jsxs(DialogRoot, { size: ["full", "full", "md", "md"], children: [jsx(DialogBackdrop, {}), jsx(DialogTrigger, { children: jsxs(Button$1, { variant: "ghost", onClick: sortingModal.onOpen, children: [icon, " ", text] }) }), jsxs(DialogContent, { children: [jsx(DialogCloseTrigger, {}), jsxs(DialogHeader, { children: [jsx(DialogTitle, {}), title] }), jsx(DialogBody, { children: jsxs(Flex, { flexFlow: "column", gap: "0.25rem", children: [jsx(TableSorter, {}), jsx(ResetSortingButton, {})] }) }), jsx(DialogFooter, {})] })] }) }));
|
|
75
98
|
};
|
|
76
99
|
|
|
77
100
|
const EditViewButton = ({ text, icon = jsx(IoMdEye, {}), title = "Edit View", }) => {
|
|
78
101
|
const viewModel = useDisclosure();
|
|
79
|
-
return (
|
|
102
|
+
return (jsx(Fragment, { children: jsxs(DialogRoot, { children: [jsx(DialogBackdrop, {}), jsx(DialogTrigger, { children: jsxs(Button$1, { variant: "ghost", onClick: viewModel.onOpen, children: [icon, " ", text] }) }), jsxs(DialogContent, { children: [jsx(DialogCloseTrigger, {}), jsxs(DialogHeader, { children: [jsx(DialogTitle, {}), title] }), jsx(DialogBody, { children: jsx(TableViewer, {}) }), jsx(DialogFooter, {})] })] }) }));
|
|
80
103
|
};
|
|
81
104
|
|
|
105
|
+
const MenuContent = React.forwardRef(function MenuContent(props, ref) {
|
|
106
|
+
const { portalled = true, portalRef, ...rest } = props;
|
|
107
|
+
return (jsx(Portal, { disabled: !portalled, container: portalRef, children: jsx(Menu.Positioner, { children: jsx(Menu.Content, { ref: ref, ...rest }) }) }));
|
|
108
|
+
});
|
|
109
|
+
React.forwardRef(function MenuArrow(props, ref) {
|
|
110
|
+
return (jsx(Menu.Arrow, { ref: ref, ...props, children: jsx(Menu.ArrowTip, {}) }));
|
|
111
|
+
});
|
|
112
|
+
React.forwardRef(function MenuCheckboxItem(props, ref) {
|
|
113
|
+
return (jsxs(Menu.CheckboxItem, { ref: ref, ...props, children: [jsx(Menu.ItemIndicator, { hidden: false, children: jsx(LuCheck, {}) }), props.children] }));
|
|
114
|
+
});
|
|
115
|
+
React.forwardRef(function MenuRadioItem(props, ref) {
|
|
116
|
+
const { children, ...rest } = props;
|
|
117
|
+
return (jsxs(Menu.RadioItem, { ps: "8", ref: ref, ...rest, children: [jsx(AbsoluteCenter, { axis: "horizontal", left: "4", asChild: true, children: jsx(Menu.ItemIndicator, { children: jsx(LuCheck, {}) }) }), jsx(Menu.ItemText, { children: children })] }));
|
|
118
|
+
});
|
|
119
|
+
React.forwardRef(function MenuItemGroup(props, ref) {
|
|
120
|
+
const { title, children, ...rest } = props;
|
|
121
|
+
return (jsxs(Menu.ItemGroup, { ref: ref, ...rest, children: [title && (jsx(Menu.ItemGroupLabel, { userSelect: "none", children: title })), children] }));
|
|
122
|
+
});
|
|
123
|
+
React.forwardRef(function MenuTriggerItem(props, ref) {
|
|
124
|
+
const { startIcon, children, ...rest } = props;
|
|
125
|
+
return (jsxs(Menu.TriggerItem, { ref: ref, ...rest, children: [startIcon, children, jsx(LuChevronRight, {})] }));
|
|
126
|
+
});
|
|
127
|
+
Menu.RadioItemGroup;
|
|
128
|
+
Menu.ContextTrigger;
|
|
129
|
+
const MenuRoot = Menu.Root;
|
|
130
|
+
Menu.Separator;
|
|
131
|
+
const MenuItem = Menu.Item;
|
|
132
|
+
Menu.ItemText;
|
|
133
|
+
Menu.ItemCommand;
|
|
134
|
+
const MenuTrigger = Menu.Trigger;
|
|
135
|
+
|
|
82
136
|
const PageSizeControl = ({ pageSizes = [10, 20, 30, 40, 50], }) => {
|
|
83
137
|
const { table } = useDataTableContext();
|
|
84
|
-
return (jsx(Fragment, { children: jsxs(
|
|
138
|
+
return (jsx(Fragment, { children: jsxs(MenuRoot, { children: [jsx(MenuTrigger, { asChild: true, children: jsxs(Button$1, { variant: "ghost", gap: "0.5rem", children: [table.getState().pagination.pageSize, " ", jsx(ChevronDownIcon, {})] }) }), jsx(MenuContent, { children: pageSizes.map((pageSize) => (jsx(MenuItem, { value: `chakra-table-pageSize-${pageSize}`, onClick: () => {
|
|
85
139
|
table.setPageSize(Number(pageSize));
|
|
86
|
-
}, children: pageSize }
|
|
140
|
+
}, children: pageSize }))) })] }) }));
|
|
87
141
|
};
|
|
88
142
|
|
|
89
143
|
const ResetFilteringButton = ({ text = "Reset Filtering", }) => {
|
|
90
144
|
const { table } = useDataTableContext();
|
|
91
|
-
return (jsx(Button, { onClick: () => {
|
|
145
|
+
return (jsx(Button$1, { onClick: () => {
|
|
92
146
|
table.resetColumnFilters();
|
|
93
147
|
}, children: text }));
|
|
94
148
|
};
|
|
95
149
|
|
|
96
150
|
const ResetSelectionButton = ({ text = "Reset Selection", }) => {
|
|
97
151
|
const { table } = useDataTableContext();
|
|
98
|
-
return (jsx(Button, { onClick: () => {
|
|
152
|
+
return (jsx(Button$1, { onClick: () => {
|
|
99
153
|
table.resetRowSelection();
|
|
100
154
|
}, children: text }));
|
|
101
155
|
};
|
|
102
156
|
|
|
103
157
|
const ResetSortingButton = ({ text = "Reset Sorting", }) => {
|
|
104
158
|
const { table } = useDataTableContext();
|
|
105
|
-
return (jsx(Button, { onClick: () => {
|
|
159
|
+
return (jsx(Button$1, { onClick: () => {
|
|
106
160
|
table.resetSorting();
|
|
107
161
|
}, children: text }));
|
|
108
162
|
};
|
|
@@ -328,6 +382,11 @@ const DataTableServer = ({ columns, enableRowSelection = true, enableMultiRowSel
|
|
|
328
382
|
}, children: children }));
|
|
329
383
|
};
|
|
330
384
|
|
|
385
|
+
const Tag = React.forwardRef(function Tag(props, ref) {
|
|
386
|
+
const { startElement, endElement, onClose, closable = !!onClose, children, ...rest } = props;
|
|
387
|
+
return (jsxs(Tag$1.Root, { ref: ref, ...rest, children: [startElement && (jsx(Tag$1.StartElement, { children: startElement })), jsx(Tag$1.Label, { children: children }), endElement && (jsx(Tag$1.EndElement, { children: endElement })), closable && (jsx(Tag$1.EndElement, { children: jsx(Tag$1.CloseTrigger, { onClick: onClose }) }))] }));
|
|
388
|
+
});
|
|
389
|
+
|
|
331
390
|
const DefaultCard = ({ row, imageColumnId = undefined, titleColumnId = undefined, tagColumnId = undefined, tagIcon = undefined, showTag = true, }) => {
|
|
332
391
|
if (!!row.original === false) {
|
|
333
392
|
return jsx(Fragment, {});
|
|
@@ -341,9 +400,14 @@ const DefaultCard = ({ row, imageColumnId = undefined, titleColumnId = undefined
|
|
|
341
400
|
// const tagIdExists = Object.keys(row.original).some((key) => {
|
|
342
401
|
// return key === tagColumnId;
|
|
343
402
|
// });
|
|
344
|
-
return (jsxs(Grid, { templateRows: "auto auto", gap: "1rem", children: [jsx(Flex, { justifyContent: "center", alignItems: "center", children: jsx(Image, { src: row.original[imageColumnId] }) }), jsxs(Flex, { gap: "0.5rem", flexFlow: "wrap", children: [jsx(Text, { fontWeight: "bold", fontSize: "large", children: row.original[titleColumnId] }), showTag && (
|
|
403
|
+
return (jsxs(Grid, { templateRows: "auto auto", gap: "1rem", children: [jsx(Flex, { justifyContent: "center", alignItems: "center", children: jsx(Image, { src: row.original[imageColumnId] }) }), jsxs(Flex, { gap: "0.5rem", flexFlow: "wrap", children: [jsx(Text, { fontWeight: "bold", fontSize: "large", children: row.original[titleColumnId] }), showTag && (jsx(Tag, { fontSize: "large", startElement: tagIcon && tagIcon({}), children: row.original[tagColumnId] }))] })] }));
|
|
345
404
|
};
|
|
346
405
|
|
|
406
|
+
const Checkbox = React.forwardRef(function Checkbox(props, ref) {
|
|
407
|
+
const { icon, children, inputProps, rootRef, ...rest } = props;
|
|
408
|
+
return (jsxs(Checkbox$1.Root, { ref: rootRef, ...rest, children: [jsx(Checkbox$1.HiddenInput, { ref: ref, ...inputProps }), jsx(Checkbox$1.Control, { children: icon || jsx(Checkbox$1.Indicator, {}) }), children != null && (jsx(Checkbox$1.Label, { children: children }))] }));
|
|
409
|
+
});
|
|
410
|
+
|
|
347
411
|
const TableBody = ({ pinnedBgColor = { light: "gray.50", dark: "gray.700" }, showSelector = false, alwaysShowSelector = true, }) => {
|
|
348
412
|
const { table } = useContext(TableContext);
|
|
349
413
|
const SELECTION_BOX_WIDTH = 20;
|
|
@@ -356,10 +420,10 @@ const TableBody = ({ pinnedBgColor = { light: "gray.50", dark: "gray.700" }, sho
|
|
|
356
420
|
? {
|
|
357
421
|
left: showSelector
|
|
358
422
|
? `${cell.column.getStart("left") + SELECTION_BOX_WIDTH + table.getDensityValue() * 2}px`
|
|
359
|
-
: `${cell.column.getStart("left")
|
|
423
|
+
: `${cell.column.getStart("left")}px`,
|
|
360
424
|
background: pinnedBgColor.light,
|
|
361
425
|
position: "sticky",
|
|
362
|
-
zIndex: 1,
|
|
426
|
+
zIndex: -1,
|
|
363
427
|
_dark: {
|
|
364
428
|
backgroundColor: pinnedBgColor.dark,
|
|
365
429
|
},
|
|
@@ -367,9 +431,9 @@ const TableBody = ({ pinnedBgColor = { light: "gray.50", dark: "gray.700" }, sho
|
|
|
367
431
|
: {};
|
|
368
432
|
return tdProps;
|
|
369
433
|
};
|
|
370
|
-
return (jsx(
|
|
371
|
-
return (jsxs(
|
|
372
|
-
return (jsx(
|
|
434
|
+
return (jsx(Table$1.Body, { children: table.getRowModel().rows.map((row, index) => {
|
|
435
|
+
return (jsxs(Table$1.Row, { display: "flex", _hover: { backgroundColor: "rgba(178,178,178,0.1)" }, zIndex: 1, onMouseEnter: () => handleRowHover(index), onMouseLeave: () => handleRowHover(-1), children: [showSelector && (jsx(TableRowSelector, { index: index, row: row, hoveredRow: hoveredRow, alwaysShowSelector: alwaysShowSelector })), row.getVisibleCells().map((cell, index) => {
|
|
436
|
+
return (jsx(Table$1.Cell, { padding: `${table.getDensityValue()}px`,
|
|
373
437
|
// styling resize and pinning start
|
|
374
438
|
maxWidth: `${cell.column.getSize()}px`, width: `${cell.column.getSize()}px`, ...getTdProps(cell), children: flexRender(cell.column.columnDef.cell, cell.getContext()) }, `chakra-table-rowcell-${cell.id}-${index}`));
|
|
375
439
|
})] }, `chakra-table-row-${row.id}`));
|
|
@@ -390,7 +454,7 @@ const TableRowSelector = ({ index, row, hoveredRow, pinnedBgColor = { light: "gr
|
|
|
390
454
|
}
|
|
391
455
|
return false;
|
|
392
456
|
};
|
|
393
|
-
return (jsxs(
|
|
457
|
+
return (jsxs(Table$1.Cell, { padding: `${table.getDensityValue()}px`, ...(table.getIsSomeColumnsPinned("left")
|
|
394
458
|
? {
|
|
395
459
|
left: `0px`,
|
|
396
460
|
backgroundColor: pinnedBgColor.light,
|
|
@@ -400,15 +464,22 @@ const TableRowSelector = ({ index, row, hoveredRow, pinnedBgColor = { light: "gr
|
|
|
400
464
|
}
|
|
401
465
|
: {}),
|
|
402
466
|
// styling resize and pinning end
|
|
403
|
-
display: "grid", children: [!isCheckBoxVisible(index, row) && (jsx(Box, { as: "span", margin: "0rem", display: "grid", justifyItems: "center", alignItems: "center", width: `${SELECTION_BOX_WIDTH}px`, height: `${SELECTION_BOX_WIDTH}px` })), isCheckBoxVisible(index, row) && (jsx(
|
|
467
|
+
display: "grid", children: [!isCheckBoxVisible(index, row) && (jsx(Box, { as: "span", margin: "0rem", display: "grid", justifyItems: "center", alignItems: "center", width: `${SELECTION_BOX_WIDTH}px`, height: `${SELECTION_BOX_WIDTH}px` })), isCheckBoxVisible(index, row) && (jsx(Box, { margin: "0rem", display: "grid", justifyItems: "center", alignItems: "center", children: jsx(Checkbox, { width: `${SELECTION_BOX_WIDTH}px`, height: `${SELECTION_BOX_WIDTH}px`, isChecked: row.getIsSelected(),
|
|
404
468
|
disabled: !row.getCanSelect(),
|
|
405
469
|
// indeterminate: row.getIsSomeSelected(),
|
|
406
470
|
onChange: row.getToggleSelectedHandler() }) }))] }));
|
|
407
471
|
};
|
|
408
472
|
|
|
473
|
+
const Tooltip = React.forwardRef(function Tooltip(props, ref) {
|
|
474
|
+
const { showArrow, children, disabled, portalled, content, contentProps, portalRef, ...rest } = props;
|
|
475
|
+
if (disabled)
|
|
476
|
+
return children;
|
|
477
|
+
return (jsxs(Tooltip$1.Root, { ...rest, children: [jsx(Tooltip$1.Trigger, { asChild: true, children: children }), jsx(Portal, { disabled: !portalled, container: portalRef, children: jsx(Tooltip$1.Positioner, { children: jsxs(Tooltip$1.Content, { ref: ref, ...contentProps, children: [showArrow && (jsx(Tooltip$1.Arrow, { children: jsx(Tooltip$1.ArrowTip, {}) })), content] }) }) })] }));
|
|
478
|
+
});
|
|
479
|
+
|
|
409
480
|
const TableControls = ({ totalText = "Total:", showFilter = false, fitTableWidth = false, fitTableHeight = false, isMobile = false, children = jsx(Fragment, {}), showFilterName = false, showFilterTags = false, showReload = false, filterOptions = [], extraItems = jsx(Fragment, {}), }) => {
|
|
410
481
|
const { loading, hasError } = useDataTableContext();
|
|
411
|
-
return (jsxs(Grid, { templateRows: "auto auto auto 1fr auto", templateColumns: "1fr 1fr", width: fitTableWidth ? "fit-content" : "100%", height: fitTableHeight ? "fit-content" : "100%", justifySelf: "center", alignSelf: "center", gap: "0.5rem", children: [jsxs(Flex, { justifyContent: "space-between", gridColumn: "1 / span 2", children: [jsx(Box, { children: jsx(EditViewButton, { text: isMobile ? undefined : "View", icon: jsx(MdOutlineViewColumn, {}) }) }), jsxs(Flex, { gap: "0.5rem", alignItems: "center", justifySelf: "end", children: [loading && jsx(Spinner, { size: "sm" }), hasError && (jsx(Tooltip, {
|
|
482
|
+
return (jsxs(Grid, { templateRows: "auto auto auto 1fr auto", templateColumns: "1fr 1fr", width: fitTableWidth ? "fit-content" : "100%", height: fitTableHeight ? "fit-content" : "100%", justifySelf: "center", alignSelf: "center", gap: "0.5rem", children: [jsxs(Flex, { justifyContent: "space-between", gridColumn: "1 / span 2", children: [jsx(Box, { children: jsx(EditViewButton, { text: isMobile ? undefined : "View", icon: jsx(MdOutlineViewColumn, {}) }) }), jsxs(Flex, { gap: "0.5rem", alignItems: "center", justifySelf: "end", children: [loading && jsx(Spinner, { size: "sm" }), hasError && (jsx(Tooltip, { content: "An error occurred while fetching data", children: jsx(Icon, { as: BsExclamationCircleFill, color: "red.400" }) })), showFilter && (jsxs(Fragment, { children: [jsx(GlobalFilter, {}), jsx(EditFilterButton, { text: isMobile ? undefined : "Advanced Filter" })] })), showReload && jsx(ReloadButton, {}), extraItems] })] }), jsx(Flex, { gridColumn: "1 / span 2", flexFlow: "column", gap: "0.5rem", children: filterOptions.map((column) => {
|
|
412
483
|
return (jsxs(Flex, { alignItems: "center", flexFlow: "wrap", gap: "0.5rem", children: [showFilterName && jsxs(Text, { children: [column, ":"] }), jsx(FilterOptions, { column: column })] }, column));
|
|
413
484
|
}) }), jsx(Flex, { gridColumn: "1 / span 2", children: showFilterTags && jsx(TableFilterTags, {}) }), jsx(Box, { overflow: "auto", gridColumn: "1 / span 2", width: "100%", height: "100%", children: children }), jsxs(Flex, { gap: "1rem", alignItems: "center", children: [jsx(PageSizeControl, {}), jsxs(Flex, { children: [jsx(Text, { paddingRight: "0.5rem", children: totalText }), jsx(RowCountText, {})] })] }), jsx(Box, { justifySelf: "end", children: jsx(TablePagination, {}) })] }));
|
|
414
485
|
};
|
|
@@ -448,7 +519,7 @@ const TableFooter = ({ pinnedBgColor = { light: "gray.50", dark: "gray.700" }, s
|
|
|
448
519
|
: {};
|
|
449
520
|
return thProps;
|
|
450
521
|
};
|
|
451
|
-
return (jsx(
|
|
522
|
+
return (jsx(Table$1.Footer, { children: table.getFooterGroups().map((footerGroup) => (jsxs(Table$1.Row, { display: "flex", children: [showSelector && (jsxs(Table$1.Header
|
|
452
523
|
// styling resize and pinning start
|
|
453
524
|
, {
|
|
454
525
|
// styling resize and pinning start
|
|
@@ -462,18 +533,23 @@ const TableFooter = ({ pinnedBgColor = { light: "gray.50", dark: "gray.700" }, s
|
|
|
462
533
|
}
|
|
463
534
|
: {}),
|
|
464
535
|
// styling resize and pinning end
|
|
465
|
-
onMouseEnter: () => handleRowHover(true), onMouseLeave: () => handleRowHover(false), display: "grid", children: [isCheckBoxVisible() && (jsx(
|
|
536
|
+
onMouseEnter: () => handleRowHover(true), onMouseLeave: () => handleRowHover(false), display: "grid", children: [isCheckBoxVisible() && (jsx(Box, { margin: "0rem", display: "grid", justifyItems: "center", alignItems: "center", children: jsx(Checkbox, { width: `${SELECTION_BOX_WIDTH}px`, height: `${SELECTION_BOX_WIDTH}px`, isChecked: table.getIsAllRowsSelected(),
|
|
466
537
|
// indeterminate: table.getIsSomeRowsSelected(),
|
|
467
|
-
onChange: table.getToggleAllRowsSelectedHandler() }) })), !isCheckBoxVisible() && (jsx(Box, { as: "span", margin: "0rem", display: "grid", justifyItems: "center", alignItems: "center", width: `${SELECTION_BOX_WIDTH}px`, height: `${SELECTION_BOX_WIDTH}px` }))] })), footerGroup.headers.map((header) => (jsx(
|
|
538
|
+
onChange: table.getToggleAllRowsSelectedHandler() }) })), !isCheckBoxVisible() && (jsx(Box, { as: "span", margin: "0rem", display: "grid", justifyItems: "center", alignItems: "center", width: `${SELECTION_BOX_WIDTH}px`, height: `${SELECTION_BOX_WIDTH}px` }))] })), footerGroup.headers.map((header) => (jsx(Table$1.Header, { padding: "0", columnSpan: `${header.colSpan}`,
|
|
468
539
|
// styling resize and pinning start
|
|
469
|
-
maxWidth: `${header.getSize()}px`, width: `${header.getSize()}px`, display: "grid", ...getThProps(header), children: jsx(
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
540
|
+
maxWidth: `${header.getSize()}px`, width: `${header.getSize()}px`, display: "grid", ...getThProps(header), children: jsx(MenuRoot$1, { children: jsx(MenuTrigger$1, { asChild: true, children: jsx(Box, { padding: `${table.getDensityValue()}px`, display: "flex", alignItems: "center", justifyContent: "start", borderRadius: "0rem", _hover: { backgroundColor: "gray.100" }, children: jsxs(Flex, { gap: "0.5rem", alignItems: "center", children: [header.isPlaceholder
|
|
541
|
+
? null
|
|
542
|
+
: flexRender(header.column.columnDef.footer, header.getContext()), jsx(Box, { children: header.column.getCanSort() && (jsxs(Fragment, { children: [header.column.getIsSorted() === false && (
|
|
543
|
+
// <UpDownIcon />
|
|
544
|
+
jsx(Fragment, {})), header.column.getIsSorted() === "asc" && (jsx(ChevronUpIcon, {})), header.column.getIsSorted() === "desc" && (jsx(ChevronDownIcon, {}))] })) })] }) }) }) }) }, `chakra-table-footer-${footerGroup.id}`)))] }, `chakra-table-footergroup-${footerGroup.id}`))) }));
|
|
474
545
|
};
|
|
475
546
|
|
|
476
|
-
const
|
|
547
|
+
const Button = React.forwardRef(function Button(props, ref) {
|
|
548
|
+
const { loading, disabled, loadingText, children, ...rest } = props;
|
|
549
|
+
return (jsx(Button$1, { disabled: loading || disabled, ref: ref, ...rest, children: loading && !loadingText ? (jsxs(Fragment, { children: [jsx(AbsoluteCenter, { display: "inline-flex", children: jsx(Spinner, { size: "inherit", color: "inherit" }) }), jsx(Span, { opacity: 0, children: children })] })) : loading && loadingText ? (jsxs(Fragment, { children: [jsx(Spinner, { size: "inherit", color: "inherit" }), loadingText] })) : (children) }));
|
|
550
|
+
});
|
|
551
|
+
|
|
552
|
+
const TableHeader = ({ canResize, pinnedBgColor = { light: "gray.50", dark: "gray.700" }, showSelector = false, isSticky = true, alwaysShowSelector = true, tHeadProps = {}, }) => {
|
|
477
553
|
const { table } = useDataTableContext();
|
|
478
554
|
const SELECTION_BOX_WIDTH = 20;
|
|
479
555
|
const [hoveredCheckBox, setHoveredCheckBox] = useState(false);
|
|
@@ -497,7 +573,7 @@ const TableHeader = ({ canResize, pinnedBgColor = { light: "gray.50", dark: "gra
|
|
|
497
573
|
? {
|
|
498
574
|
left: showSelector
|
|
499
575
|
? `${header.getStart("left") + SELECTION_BOX_WIDTH + table.getDensityValue() * 2}px`
|
|
500
|
-
: `${header.getStart("left")
|
|
576
|
+
: `${header.getStart("left")}px`,
|
|
501
577
|
background: pinnedBgColor.light,
|
|
502
578
|
position: "sticky",
|
|
503
579
|
zIndex: 1,
|
|
@@ -508,14 +584,11 @@ const TableHeader = ({ canResize, pinnedBgColor = { light: "gray.50", dark: "gra
|
|
|
508
584
|
: {};
|
|
509
585
|
return thProps;
|
|
510
586
|
};
|
|
511
|
-
const
|
|
587
|
+
const stickyProps = {
|
|
512
588
|
position: "sticky",
|
|
513
|
-
|
|
514
|
-
_dark: {
|
|
515
|
-
backgroundColor: "gray.800",
|
|
516
|
-
},
|
|
589
|
+
top: 0,
|
|
517
590
|
};
|
|
518
|
-
return (jsx(
|
|
591
|
+
return (jsx(Table$1.Header, { ...(isSticky ? stickyProps : {}), ...tHeadProps, children: table.getHeaderGroups().map((headerGroup) => (jsxs(Table$1.Row, { display: "flex", children: [showSelector && (jsxs(Table$1.ColumnHeader
|
|
519
592
|
// styling resize and pinning start
|
|
520
593
|
, { ...(table.getIsSomeColumnsPinned("left")
|
|
521
594
|
? {
|
|
@@ -527,7 +600,7 @@ const TableHeader = ({ canResize, pinnedBgColor = { light: "gray.50", dark: "gra
|
|
|
527
600
|
}
|
|
528
601
|
: {}),
|
|
529
602
|
// styling resize and pinning end
|
|
530
|
-
padding: `${table.getDensityValue()}px`, onMouseEnter: () => handleRowHover(true), onMouseLeave: () => handleRowHover(false), display: "grid", children: [isCheckBoxVisible() && (jsx(
|
|
603
|
+
padding: `${table.getDensityValue()}px`, onMouseEnter: () => handleRowHover(true), onMouseLeave: () => handleRowHover(false), display: "grid", children: [isCheckBoxVisible() && (jsx(Box, { margin: "0rem", display: "grid", justifyItems: "center", alignItems: "center", children: jsx(Checkbox, { width: `${SELECTION_BOX_WIDTH}px`, height: `${SELECTION_BOX_WIDTH}px`, isChecked: table.getIsAllRowsSelected(),
|
|
531
604
|
// indeterminate: table.getIsSomeRowsSelected(),
|
|
532
605
|
onChange: table.getToggleAllRowsSelectedHandler() }) })), !isCheckBoxVisible() && (jsx(Box, { as: "span", margin: "0rem", display: "grid", justifyItems: "center", alignItems: "center", width: `${SELECTION_BOX_WIDTH}px`, height: `${SELECTION_BOX_WIDTH}px` }))] })), headerGroup.headers.map((header) => {
|
|
533
606
|
const resizeProps = {
|
|
@@ -535,15 +608,15 @@ const TableHeader = ({ canResize, pinnedBgColor = { light: "gray.50", dark: "gra
|
|
|
535
608
|
onTouchStart: header.getResizeHandler(),
|
|
536
609
|
cursor: "col-resize",
|
|
537
610
|
};
|
|
538
|
-
return (jsxs(
|
|
611
|
+
return (jsxs(Table$1.ColumnHeader, { padding: "0rem", columnSpan: `${header.colSpan}`,
|
|
539
612
|
// styling resize and pinning start
|
|
540
|
-
width: `${header.getSize()}px`, display: "grid", gridTemplateColumns: "1fr auto", zIndex: header.index, ...getThProps(header), children: [jsxs(
|
|
541
|
-
|
|
542
|
-
|
|
613
|
+
width: `${header.getSize()}px`, display: "grid", gridTemplateColumns: "1fr auto", zIndex: header.index, ...getThProps(header), children: [jsxs(MenuRoot, { children: [jsx(MenuTrigger, { asChild: true, children: jsx(Grid, { padding: `${table.getDensityValue()}px`, display: "flex", alignItems: "center", justifyContent: "start", borderRadius: "0rem", overflow: "auto", _hover: { backgroundColor: "gray.100" }, children: jsxs(Flex, { gap: "0.5rem", alignItems: "center", children: [header.isPlaceholder
|
|
614
|
+
? null
|
|
615
|
+
: flexRender(header.column.columnDef.header, header.getContext()), jsx(Box, { children: header.column.getCanSort() && (jsxs(Fragment, { children: [header.column.getIsSorted() === false && jsx(Fragment, {}), header.column.getIsSorted() === "asc" && (jsx(ChevronUpIcon, {})), header.column.getIsSorted() === "desc" && (jsx(ChevronDownIcon, {}))] })) }), jsx(Box, { children: header.column.getIsFiltered() && jsx(MdFilterListAlt, {}) })] }) }) }), jsxs(MenuContent, { children: [!header.column.getIsPinned() && (jsx(MenuItem, { asChild: true, value: "pin-column", children: jsxs(Button, { variant: "ghost", onClick: () => {
|
|
543
616
|
header.column.pin("left");
|
|
544
|
-
}, children: "Pin Column" })), header.column.getIsPinned() && (jsx(MenuItem, {
|
|
617
|
+
}, children: [jsx(MdPushPin, {}), "Pin Column"] }) })), header.column.getIsPinned() && (jsx(MenuItem, { asChild: true, value: "cancel-pin", children: jsxs(Button, { variant: "ghost", onClick: () => {
|
|
545
618
|
header.column.pin(false);
|
|
546
|
-
}, children: "Cancel Pin" })), header.column.getCanSort() && (jsxs(Fragment, { children: [jsx(MenuItem, {
|
|
619
|
+
}, children: [jsx(MdCancel, {}), "Cancel Pin"] }) })), header.column.getCanSort() && (jsxs(Fragment, { children: [jsx(MenuItem, { asChild: true, value: "sort-ascend", children: jsxs(Button, { variant: "ghost", onClick: () => {
|
|
547
620
|
table.setSorting((state) => {
|
|
548
621
|
return [
|
|
549
622
|
...state.filter((column) => {
|
|
@@ -552,7 +625,7 @@ const TableHeader = ({ canResize, pinnedBgColor = { light: "gray.50", dark: "gra
|
|
|
552
625
|
{ id: header.id, desc: false },
|
|
553
626
|
];
|
|
554
627
|
});
|
|
555
|
-
}, children: "Sort Ascending" }), jsx(MenuItem, {
|
|
628
|
+
}, children: [jsx(GrAscend, {}), "Sort Ascending"] }) }), jsx(MenuItem, { asChild: true, value: "sort-descend", children: jsxs(Button, { variant: "ghost", onClick: () => {
|
|
556
629
|
table.setSorting((state) => {
|
|
557
630
|
return [
|
|
558
631
|
...state.filter((column) => {
|
|
@@ -561,9 +634,9 @@ const TableHeader = ({ canResize, pinnedBgColor = { light: "gray.50", dark: "gra
|
|
|
561
634
|
{ id: header.id, desc: true },
|
|
562
635
|
];
|
|
563
636
|
});
|
|
564
|
-
}, children: "Sort Descending" }), header.column.getIsSorted() && (jsx(MenuItem, {
|
|
637
|
+
}, children: [jsx(GrDescend, {}), "Sort Descending"] }) }), header.column.getIsSorted() && (jsx(MenuItem, { asChild: true, value: "sort-descend", children: jsxs(Button, { variant: "ghost", onClick: () => {
|
|
565
638
|
header.column.clearSorting();
|
|
566
|
-
}, children: "Clear Sorting" })
|
|
639
|
+
}, children: [jsx(MdClear, {}), "Clear Sorting"] }) }))] }))] })] }), canResize && (jsx(Box, { borderRight: "0.2rem solid", borderRightColor: header.column.getIsResizing() ? "gray.700" : "transparent", position: "relative", right: "0.1rem", width: "2px", height: "100%", userSelect: "none", style: { touchAction: "none" }, _hover: {
|
|
567
640
|
borderRightColor: header.column.getIsResizing()
|
|
568
641
|
? "gray.700"
|
|
569
642
|
: "gray.400",
|
|
@@ -571,28 +644,34 @@ const TableHeader = ({ canResize, pinnedBgColor = { light: "gray.50", dark: "gra
|
|
|
571
644
|
})] }, `chakra-table-headergroup-${headerGroup.id}`))) }));
|
|
572
645
|
};
|
|
573
646
|
|
|
574
|
-
const DefaultTable = ({ totalText = "Total:", showFilter = false, showFooter = false, fitTableWidth = false, fitTableHeight = false, isMobile = false, filterOptions = [], showFilterTags = false, showFilterName = false, showReload = false, showSelector = false, extraItems = jsx(Fragment, {}), tableProps = {}, }) => {
|
|
575
|
-
return (jsx(TableControls, { totalText: totalText, showFilter: showFilter, fitTableWidth: fitTableWidth, fitTableHeight: fitTableHeight, isMobile: isMobile, filterOptions: filterOptions, showFilterName: showFilterName, showFilterTags: showFilterTags, showReload: showReload, extraItems: extraItems, children: jsxs(Table, { ...tableProps, children: [jsx(TableHeader, { canResize: true, showSelector: showSelector }), jsx(TableBody, { showSelector: showSelector }), showFooter && jsx(TableFooter, { showSelector: showSelector })] }) }));
|
|
647
|
+
const DefaultTable = ({ totalText = "Total:", showFilter = false, showFooter = false, fitTableWidth = false, fitTableHeight = false, isMobile = false, filterOptions = [], showFilterTags = false, showFilterName = false, showReload = false, showSelector = false, extraItems = jsx(Fragment, {}), tableProps = {}, tHeadProps = {}, }) => {
|
|
648
|
+
return (jsx(TableControls, { totalText: totalText, showFilter: showFilter, fitTableWidth: fitTableWidth, fitTableHeight: fitTableHeight, isMobile: isMobile, filterOptions: filterOptions, showFilterName: showFilterName, showFilterTags: showFilterTags, showReload: showReload, extraItems: extraItems, children: jsxs(Table, { ...tableProps, children: [jsx(TableHeader, { canResize: true, showSelector: showSelector, tHeadProps: tHeadProps }), jsx(TableBody, { showSelector: showSelector }), showFooter && jsx(TableFooter, { showSelector: showSelector })] }) }));
|
|
576
649
|
};
|
|
577
650
|
|
|
578
651
|
const ReloadButton = ({ text = "Reload", variant = "icon", }) => {
|
|
579
652
|
const { refreshData } = useDataTableContext();
|
|
580
653
|
if (variant === "icon") {
|
|
581
|
-
return (jsx(Tooltip, {
|
|
654
|
+
return (jsx(Tooltip, { showArrow: true, content: "This is the tooltip content", children: jsx(Button, { variant: "ghost", onClick: () => {
|
|
582
655
|
refreshData();
|
|
583
|
-
}, "aria-label": "refresh" }) }));
|
|
656
|
+
}, "aria-label": "refresh", children: jsx(IoReload, {}) }) }));
|
|
584
657
|
}
|
|
585
658
|
return (jsx(Button, { variant: "ghost", leftIcon: jsx(IoReload, {}), onClick: () => {
|
|
586
659
|
refreshData();
|
|
587
660
|
}, children: text }));
|
|
588
661
|
};
|
|
589
662
|
|
|
590
|
-
const
|
|
591
|
-
const {
|
|
592
|
-
|
|
593
|
-
|
|
663
|
+
const EmptyState = React.forwardRef(function EmptyState(props, ref) {
|
|
664
|
+
const { title, description, icon, children, ...rest } = props;
|
|
665
|
+
return (jsx(EmptyState$1.Root, { ref: ref, ...rest, children: jsxs(EmptyState$1.Content, { children: [icon && (jsx(EmptyState$1.Indicator, { children: icon })), description ? (jsxs(VStack, { textAlign: "center", children: [jsx(EmptyState$1.Title, { children: title }), jsx(EmptyState$1.Description, { children: description })] })) : (jsx(EmptyState$1.Title, { children: title })), children] }) }));
|
|
666
|
+
});
|
|
667
|
+
|
|
668
|
+
const EmptyResult = (jsx(EmptyState, { icon: jsx(HiColorSwatch, {}), title: "No results found", description: "Try adjusting your search", children: jsxs(List.Root, { variant: "marker", children: [jsx(List.Item, { children: "Try removing filters" }), jsx(List.Item, { children: "Try different keywords" })] }) }));
|
|
669
|
+
const Table = ({ children, emptyComponent = EmptyResult, ...props }) => {
|
|
670
|
+
const { table } = useDataTableContext();
|
|
671
|
+
if (table.getRowModel().rows.length <= 0) {
|
|
672
|
+
return emptyComponent;
|
|
594
673
|
}
|
|
595
|
-
return (jsx(
|
|
674
|
+
return (jsx(Table$1.Root, { stickyHeader: true, variant: "outline", width: table.getCenterTotalSize(), ...props, children: children }));
|
|
596
675
|
};
|
|
597
676
|
|
|
598
677
|
const TableCardContainer = ({ children, ...props }) => {
|
|
@@ -605,11 +684,10 @@ const DefaultCardTitle = () => {
|
|
|
605
684
|
const TableCards = ({ isSelectable = false, showDisplayNameOnly = false, renderTitle = DefaultCardTitle, cardBodyProps = {} }) => {
|
|
606
685
|
const { table } = useContext(TableContext);
|
|
607
686
|
return (jsx(Fragment, { children: table.getRowModel().rows.map((row) => {
|
|
608
|
-
return (jsx(Card, { children: jsxs(
|
|
687
|
+
return (jsx(Card.Root, { children: jsxs(Card.Body, { display: "flex", flexFlow: "column", gap: "0.5rem", ...cardBodyProps, children: [isSelectable && (jsx(Checkbox, { isChecked: row.getIsSelected(),
|
|
609
688
|
disabled: !row.getCanSelect(),
|
|
610
689
|
// indeterminate: row.getIsSomeSelected(),
|
|
611
690
|
onChange: row.getToggleSelectedHandler() })), renderTitle(row), jsx(Grid, { templateColumns: "auto 1fr", gap: "1rem", children: row.getVisibleCells().map((cell) => {
|
|
612
|
-
console.log(table.getColumn(cell.column.id), "dko");
|
|
613
691
|
return (jsxs(Fragment, { children: [jsxs(Box, { children: [showDisplayNameOnly && (jsx(Text, { fontWeight: "bold", children: cell.column.columnDef.meta?.displayName ??
|
|
614
692
|
cell.column.id })), !showDisplayNameOnly && (jsx(Fragment, { children: flexRender(cell.column.columnDef.header,
|
|
615
693
|
// @ts-expect-error Assuming the CellContext interface is the same as HeaderContext
|
|
@@ -627,11 +705,39 @@ const TableComponent = ({ render = () => {
|
|
|
627
705
|
|
|
628
706
|
const DateRangeFilter = ({ startDate, endDate, setStartDate, setEndDate, }) => {
|
|
629
707
|
console.log(startDate, endDate, "dflp");
|
|
630
|
-
return (jsx(Box, { p:
|
|
708
|
+
return (jsx(Box, { p: "1rem", children: jsxs(VStack, { children: [jsxs(Box, { children: [jsx(Box, { children: "Start Date" }), jsx(Input, { id: "start-date", type: "date", value: startDate, onChange: (e) => setStartDate(e.target.value) })] }), jsxs(Box, { children: [jsx(Box, { children: "End Date" }), jsx(Input, { id: "end-date", type: "date", value: endDate, onChange: (e) => setEndDate(e.target.value) })] })] }) }));
|
|
631
709
|
};
|
|
632
710
|
|
|
711
|
+
const Slider = React.forwardRef(function Slider(props, ref) {
|
|
712
|
+
const { marks: marksProp, label, showValue, ...rest } = props;
|
|
713
|
+
const value = props.defaultValue ?? props.value;
|
|
714
|
+
const marks = marksProp?.map((mark) => {
|
|
715
|
+
if (typeof mark === "number")
|
|
716
|
+
return { value: mark, label: undefined };
|
|
717
|
+
return mark;
|
|
718
|
+
});
|
|
719
|
+
const hasMarkLabel = !!marks?.some((mark) => mark.label);
|
|
720
|
+
return (jsxs(Slider$1.Root, { ref: ref, thumbAlignment: "center", ...rest, children: [label && !showValue && (jsx(Slider$1.Label, { children: label })), label && showValue && (jsxs(HStack, { justify: "space-between", children: [jsx(Slider$1.Label, { children: label }), jsx(Slider$1.ValueText, {})] })), jsxs(Slider$1.Control, { "data-has-mark-label": hasMarkLabel || undefined, children: [jsx(Slider$1.Track, { children: jsx(Slider$1.Range, {}) }), jsx(SliderThumbs, { value: value }), jsx(SliderMarks, { marks: marks })] })] }));
|
|
721
|
+
});
|
|
722
|
+
function SliderThumbs(props) {
|
|
723
|
+
const { value } = props;
|
|
724
|
+
return (jsx(For, { each: value, children: (_, index) => (jsx(Slider$1.Thumb, { index: index, children: jsx(Slider$1.HiddenInput, {}) }, index)) }));
|
|
725
|
+
}
|
|
726
|
+
const SliderMarks = React.forwardRef(function SliderMarks(props, ref) {
|
|
727
|
+
const { marks } = props;
|
|
728
|
+
if (!marks?.length)
|
|
729
|
+
return null;
|
|
730
|
+
return (jsx(Slider$1.MarkerGroup, { ref: ref, children: marks.map((mark, index) => {
|
|
731
|
+
const value = typeof mark === "number" ? mark : mark.value;
|
|
732
|
+
const label = typeof mark === "number" ? undefined : mark.label;
|
|
733
|
+
return (jsxs(Slider$1.Marker, { value: value, children: [jsx(Slider$1.MarkerIndicator, {}), label] }, index));
|
|
734
|
+
}) }));
|
|
735
|
+
});
|
|
736
|
+
|
|
633
737
|
const RangeFilter = ({ range, setRange, defaultValue, min, max, step, }) => {
|
|
634
|
-
return (jsx(Box, { p: 8, children:
|
|
738
|
+
return (jsx(Box, { p: 8, children: jsx(Slider, { width: "full", min: min, max: max, defaultValue: defaultValue, step: step, name: `Selected Range: ${range[0]} - ${range[1]}`,
|
|
739
|
+
// value={field.value}
|
|
740
|
+
onValueChange: (val) => setRange(val.value) }) }));
|
|
635
741
|
};
|
|
636
742
|
|
|
637
743
|
const TagFilter = ({ availableTags, selectedTags, onTagChange, }) => {
|
|
@@ -643,13 +749,22 @@ const TagFilter = ({ availableTags, selectedTags, onTagChange, }) => {
|
|
|
643
749
|
onTagChange([...selectedTags, tag]);
|
|
644
750
|
}
|
|
645
751
|
};
|
|
646
|
-
return (jsx(Flex, { flexFlow: "wrap", p: "0.5rem", gap: "0.5rem", children: availableTags.map((tag) => (jsx(
|
|
752
|
+
return (jsx(Flex, { flexFlow: "wrap", p: "0.5rem", gap: "0.5rem", children: availableTags.map((tag) => (jsx(Tag, { variant: selectedTags.includes(tag) ? "solid" : "outline", cursor: "pointer", closable: selectedTags.includes(tag) ? true : undefined, onClick: () => toggleTag(tag), children: tag }))) }));
|
|
647
753
|
};
|
|
648
754
|
|
|
649
|
-
function
|
|
755
|
+
const Radio = React.forwardRef(function Radio(props, ref) {
|
|
756
|
+
const { children, inputProps, rootRef, ...rest } = props;
|
|
757
|
+
return (jsxs(RadioGroup$1.Item, { ref: rootRef, ...rest, children: [jsx(RadioGroup$1.ItemHiddenInput, { ref: ref, ...inputProps }), jsx(RadioGroup$1.ItemIndicator, {}), children && (jsx(RadioGroup$1.ItemText, { children: children }))] }));
|
|
758
|
+
});
|
|
759
|
+
const RadioGroup = RadioGroup$1.Root;
|
|
760
|
+
|
|
761
|
+
const Filter = ({ column }) => {
|
|
650
762
|
const { filterVariant } = column.columnDef.meta ?? {};
|
|
651
763
|
const displayName = column.columnDef.meta?.displayName ?? column.id;
|
|
652
764
|
const filterOptions = column.columnDef.meta?.filterOptions ?? [];
|
|
765
|
+
// const collection = createListCollection({
|
|
766
|
+
// items: filterOptions,
|
|
767
|
+
// });
|
|
653
768
|
if (column.columns.length > 0) {
|
|
654
769
|
return (jsxs(Flex, { flexFlow: "column", gap: "0.25rem", children: [jsx(Text, { children: displayName }), column.columns.map((column) => {
|
|
655
770
|
return jsx(Filter, { column: column }, column.id);
|
|
@@ -659,11 +774,9 @@ function Filter({ column }) {
|
|
|
659
774
|
return jsx(Fragment, {});
|
|
660
775
|
}
|
|
661
776
|
if (filterVariant === "select") {
|
|
662
|
-
return (jsxs(Flex, { flexFlow: "column", gap: "0.25rem", children: [jsx(Text, { children: displayName }), jsx(
|
|
663
|
-
column.setFilterValue(
|
|
664
|
-
}, children: filterOptions.map((
|
|
665
|
-
return (jsx("option", { value: option, children: option }, `${option}`));
|
|
666
|
-
}) })] }, column.id));
|
|
777
|
+
return (jsxs(Flex, { flexFlow: "column", gap: "0.25rem", children: [jsx(Text, { children: displayName }), jsx(RadioGroup, { value: column.getFilterValue() ? String(column.getFilterValue()) : "", onValueChange: (details) => {
|
|
778
|
+
column.setFilterValue(details.value);
|
|
779
|
+
}, children: jsx(Flex, { flexFlow: 'wrap', gap: '0.5rem', children: filterOptions.map((item) => (jsx(Radio, { value: item, children: item }, item))) }) })] }, column.id));
|
|
667
780
|
}
|
|
668
781
|
if (filterVariant === "tag") {
|
|
669
782
|
return (jsxs(Flex, { flexFlow: "column", gap: "0.25rem", children: [jsx(Text, { children: displayName }), jsx(TagFilter, { availableTags: filterOptions, selectedTags: (column.getFilterValue() ?? []), onTagChange: (tags) => {
|
|
@@ -723,7 +836,7 @@ function Filter({ column }) {
|
|
|
723
836
|
return (jsxs(Flex, { flexFlow: "column", gap: "0.25rem", children: [jsx(Text, { children: displayName }), jsx(Input, { value: column.getFilterValue() ? String(column.getFilterValue()) : "", onChange: (e) => {
|
|
724
837
|
column.setFilterValue(e.target.value);
|
|
725
838
|
} })] }, column.id));
|
|
726
|
-
}
|
|
839
|
+
};
|
|
727
840
|
const TableFilter = () => {
|
|
728
841
|
const { table } = useDataTableContext();
|
|
729
842
|
return (jsx(Fragment, { children: table.getAllColumns().map((column) => {
|
|
@@ -734,11 +847,11 @@ const TableFilter = () => {
|
|
|
734
847
|
const TableFilterTags = () => {
|
|
735
848
|
const { table } = useDataTableContext();
|
|
736
849
|
return (jsx(Flex, { gap: "0.5rem", flexFlow: "wrap", children: table.getState().columnFilters.map(({ id, value }) => {
|
|
737
|
-
return (jsxs(Tag, {
|
|
850
|
+
return (jsxs(Tag, { gap: "0.5rem", children: [`${id}: ${value}`, jsx(IconButton, { variant: "ghost", "aria-label": "remove filter", onClick: () => {
|
|
738
851
|
table.setColumnFilters(table.getState().columnFilters.filter((filter) => {
|
|
739
852
|
return filter.value != value;
|
|
740
853
|
}));
|
|
741
|
-
},
|
|
854
|
+
}, children: jsx(CgClose, {}) })] }, `${id}-${value}`));
|
|
742
855
|
}) }));
|
|
743
856
|
};
|
|
744
857
|
|
|
@@ -789,9 +902,9 @@ const ColumnOrderChanger = ({ columns }) => {
|
|
|
789
902
|
if (nextIndex < order.length) {
|
|
790
903
|
handleChangeOrder(index, nextIndex);
|
|
791
904
|
}
|
|
792
|
-
}, disabled: index === order.length - 1, "aria-label": "", children: jsx(MdArrowDownward, {}) })] }, columnId))) }), jsxs(Flex, { gap: "0.25rem", children: [jsx(Button, { onClick: () => {
|
|
905
|
+
}, disabled: index === order.length - 1, "aria-label": "", children: jsx(MdArrowDownward, {}) })] }, columnId))) }), jsxs(Flex, { gap: "0.25rem", children: [jsx(Button$1, { onClick: () => {
|
|
793
906
|
table.setColumnOrder(order);
|
|
794
|
-
}, children: "Apply" }), jsx(Button, { onClick: () => {
|
|
907
|
+
}, children: "Apply" }), jsx(Button$1, { onClick: () => {
|
|
795
908
|
table.setColumnOrder(originalOrder);
|
|
796
909
|
}, children: "Reset" })] })] }));
|
|
797
910
|
};
|
|
@@ -800,31 +913,36 @@ const TableOrderer = () => {
|
|
|
800
913
|
return (jsx(Fragment, { children: jsx(ColumnOrderChanger, { columns: table.getState().columnOrder }) }));
|
|
801
914
|
};
|
|
802
915
|
|
|
803
|
-
const TablePagination = (
|
|
916
|
+
const TablePagination = () => {
|
|
804
917
|
const { firstPage, getCanPreviousPage, previousPage, getState, nextPage, getCanNextPage, lastPage, } = useDataTableContext().table;
|
|
805
|
-
return (jsxs(
|
|
918
|
+
return (jsxs(Group, { attached: true, children: [jsx(IconButton, { onClick: () => firstPage(), disabled: !getCanPreviousPage(), "aria-label": "first-page", variant: "ghost", children: jsx(MdFirstPage, {}) }), jsx(IconButton, { onClick: () => previousPage(), disabled: !getCanPreviousPage(), "aria-label": "previous-page", variant: "ghost", children: jsx(MdArrowBack, {}) }), jsx(Button, { variant: "ghost", onClick: () => { }, disabled: !getCanPreviousPage(), children: getState().pagination.pageIndex + 1 }), jsx(IconButton, { onClick: () => nextPage(), disabled: !getCanNextPage(), "aria-label": "next-page", variant: "ghost", children: jsx(MdArrowForward, {}) }), jsx(IconButton, { onClick: () => lastPage(), disabled: !getCanNextPage(), "aria-label": "last-page", variant: "ghost", children: jsx(MdLastPage, {}) })] }));
|
|
806
919
|
};
|
|
807
920
|
|
|
808
921
|
const SelectAllRowsToggle = ({ selectAllIcon = jsx(MdOutlineChecklist, {}), clearAllIcon = jsx(MdClear, {}), selectAllText = "", clearAllText = "", }) => {
|
|
809
922
|
const { table } = useDataTableContext();
|
|
810
923
|
return (jsxs(Fragment, { children: [!!selectAllText === false && (jsx(IconButton, { icon: table.getIsAllRowsSelected() ? clearAllIcon : selectAllIcon, variant: "ghost", "aria-label": table.getIsAllRowsSelected() ? clearAllText : selectAllText, onClick: (event) => {
|
|
811
924
|
table.getToggleAllRowsSelectedHandler()(event);
|
|
812
|
-
} })), !!selectAllText !== false && (jsx(Button, { leftIcon: table.getIsAllRowsSelected() ? clearAllIcon : selectAllIcon, variant: "ghost", onClick: (event) => {
|
|
925
|
+
} })), !!selectAllText !== false && (jsx(Button$1, { leftIcon: table.getIsAllRowsSelected() ? clearAllIcon : selectAllIcon, variant: "ghost", onClick: (event) => {
|
|
813
926
|
table.getToggleAllRowsSelectedHandler()(event);
|
|
814
927
|
}, children: table.getIsAllRowsSelected() ? clearAllText : selectAllText }))] }));
|
|
815
928
|
};
|
|
816
929
|
|
|
817
930
|
const TableSelector = () => {
|
|
818
931
|
const { table } = useContext(TableContext);
|
|
819
|
-
return (jsxs(Fragment, { children: [table.getSelectedRowModel().rows.length > 0 && (jsxs(Button, { onClick: () => { }, variant: "ghost", display: "flex", gap: "0.25rem", children: [jsx(Box, { fontSize: "sm", children: `${table.getSelectedRowModel().rows.length}` }), jsx(Icon, { as: IoMdCheckbox })] })), !table.getIsAllPageRowsSelected() && jsx(SelectAllRowsToggle, {}), table.getSelectedRowModel().rows.length > 0 && (jsx(IconButton, { variant: "ghost", icon: jsx(Icon, { as: MdClear }), onClick: () => {
|
|
932
|
+
return (jsxs(Fragment, { children: [table.getSelectedRowModel().rows.length > 0 && (jsxs(Button$1, { onClick: () => { }, variant: "ghost", display: "flex", gap: "0.25rem", children: [jsx(Box, { fontSize: "sm", children: `${table.getSelectedRowModel().rows.length}` }), jsx(Icon, { as: IoMdCheckbox })] })), !table.getIsAllPageRowsSelected() && jsx(SelectAllRowsToggle, {}), table.getSelectedRowModel().rows.length > 0 && (jsx(IconButton, { variant: "ghost", icon: jsx(Icon, { as: MdClear }), onClick: () => {
|
|
820
933
|
table.resetRowSelection();
|
|
821
934
|
}, "aria-label": "reset selection" }))] }));
|
|
822
935
|
};
|
|
823
936
|
|
|
937
|
+
const Switch = React.forwardRef(function Switch(props, ref) {
|
|
938
|
+
const { inputProps, children, rootRef, trackLabel, thumbLabel, ...rest } = props;
|
|
939
|
+
return (jsxs(Switch$1.Root, { ref: rootRef, ...rest, children: [jsx(Switch$1.HiddenInput, { ref: ref, ...inputProps }), jsxs(Switch$1.Control, { children: [jsx(Switch$1.Thumb, { children: thumbLabel && (jsx(Switch$1.ThumbIndicator, { fallback: thumbLabel?.off, children: thumbLabel?.on })) }), trackLabel && (jsx(Switch$1.Indicator, { fallback: trackLabel.off, children: trackLabel.on }))] }), children != null && (jsx(Switch$1.Label, { children: children }))] }));
|
|
940
|
+
});
|
|
941
|
+
|
|
824
942
|
const TableViewer = () => {
|
|
825
943
|
const { table } = useDataTableContext();
|
|
826
944
|
const columns = table.getAllLeafColumns();
|
|
827
|
-
const [columnOrder, setColumnOrder] = useState(columns.map(column => column.id));
|
|
945
|
+
const [columnOrder, setColumnOrder] = useState(columns.map((column) => column.id));
|
|
828
946
|
const handleDragEnd = (result) => {
|
|
829
947
|
if (!result.destination)
|
|
830
948
|
return;
|
|
@@ -836,15 +954,15 @@ const TableViewer = () => {
|
|
|
836
954
|
};
|
|
837
955
|
return (jsx(DragDropContext, { onDragEnd: handleDragEnd, children: jsx(Droppable, { droppableId: "columns", children: (provided) => (jsxs(Flex, { flexFlow: "column", gap: "0.5rem", ref: provided.innerRef, ...provided.droppableProps, children: [columns.map((column, index) => {
|
|
838
956
|
const displayName = column.columnDef.meta?.displayName || column.id;
|
|
839
|
-
return (jsx(Draggable, { draggableId: column.id, index: index, children: (provided) => (jsxs(Grid, { ref: provided.innerRef, ...provided.draggableProps, templateColumns: "auto 1fr", gap: "0.5rem", alignItems: "center", children: [jsx(Flex, { ...provided.dragHandleProps, alignItems: "center", padding: "0", children: jsx(
|
|
957
|
+
return (jsx(Draggable, { draggableId: column.id, index: index, children: (provided) => (jsxs(Grid, { ref: provided.innerRef, ...provided.draggableProps, templateColumns: "auto 1fr", gap: "0.5rem", alignItems: "center", children: [jsx(Flex, { ...provided.dragHandleProps, alignItems: "center", padding: "0", children: jsx(FaGripLinesVertical, { color: "gray.400" }) }), jsxs(Flex, { justifyContent: "space-between", alignItems: "center", children: [jsx(Box, { children: displayName }), jsx(Switch, { checked: column.getIsVisible(), onChange: column.getToggleVisibilityHandler() })] })] })) }, column.id));
|
|
840
958
|
}), provided.placeholder] })) }) }));
|
|
841
959
|
};
|
|
842
960
|
|
|
843
|
-
const TextCell = ({ label,
|
|
961
|
+
const TextCell = ({ label, padding = "0rem", children, ...props }) => {
|
|
844
962
|
if (label) {
|
|
845
|
-
return (jsx(Flex, { alignItems: "center", height: "100%", padding: padding, children: jsx(Tooltip, {
|
|
963
|
+
return (jsx(Flex, { alignItems: "center", height: "100%", padding: padding, children: jsx(Tooltip, { content: jsx(Text, { as: "span", overflow: "hidden", textOverflow: "ellipsis", children: label }), children: jsx(Text, { as: "span", overflow: "hidden", textOverflow: "ellipsis", wordBreak: "break-all", ...props, children: children }) }) }));
|
|
846
964
|
}
|
|
847
|
-
return (jsx(Flex, { alignItems: "center", height: "100%", padding: padding, children: jsx(Text, { as: "span", overflow: "hidden", textOverflow: "ellipsis", wordBreak: "break-all",
|
|
965
|
+
return (jsx(Flex, { alignItems: "center", height: "100%", padding: padding, children: jsx(Text, { as: "span", overflow: "hidden", textOverflow: "ellipsis", wordBreak: "break-all", ...props, children: children }) }));
|
|
848
966
|
};
|
|
849
967
|
|
|
850
968
|
const useDataFromUrl = ({ url, params = {}, disableFirstFetch = false, onFetchSuccess = () => { }, defaultData, }) => {
|
|
@@ -1034,7 +1152,7 @@ const FilterOptions = ({ column }) => {
|
|
|
1034
1152
|
const options = tableColumn?.columnDef.meta?.filterOptions ?? [];
|
|
1035
1153
|
return (jsx(Fragment, { children: options.map((option) => {
|
|
1036
1154
|
const selected = table.getColumn(column)?.getFilterValue() === option;
|
|
1037
|
-
return (jsxs(Button, { size: "sm", onClick: () => {
|
|
1155
|
+
return (jsxs(Button$1, { size: "sm", onClick: () => {
|
|
1038
1156
|
if (selected) {
|
|
1039
1157
|
table.setColumnFilters((state) => {
|
|
1040
1158
|
return state.filter((filter) => {
|
|
@@ -1048,14 +1166,22 @@ const FilterOptions = ({ column }) => {
|
|
|
1048
1166
|
}) }));
|
|
1049
1167
|
};
|
|
1050
1168
|
|
|
1051
|
-
const
|
|
1169
|
+
const InputGroup = React.forwardRef(function InputGroup(props, ref) {
|
|
1170
|
+
const { startElement, startElementProps, endElement, endElementProps, children, startOffset = "6px", endOffset = "6px", ...rest } = props;
|
|
1171
|
+
return (jsxs(Group, { ref: ref, ...rest, children: [startElement && (jsx(InputElement, { pointerEvents: "none", ...startElementProps, children: startElement })), React.cloneElement(children, {
|
|
1172
|
+
...(startElement && {
|
|
1173
|
+
ps: `calc(var(--input-height) - ${startOffset})`,
|
|
1174
|
+
}),
|
|
1175
|
+
...(endElement && { pe: `calc(var(--input-height) - ${endOffset})` }),
|
|
1176
|
+
...children.props,
|
|
1177
|
+
}), endElement && (jsx(InputElement, { placement: "end", ...endElementProps, children: endElement }))] }));
|
|
1178
|
+
});
|
|
1179
|
+
|
|
1180
|
+
const GlobalFilter = () => {
|
|
1052
1181
|
const { table } = useDataTableContext();
|
|
1053
|
-
return (jsx(Fragment, { children: jsx(
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
}
|
|
1057
|
-
table.setGlobalFilter(e.target.value);
|
|
1058
|
-
} })] }) }) }));
|
|
1182
|
+
return (jsx(Fragment, { children: jsx(InputGroup, { flex: "1", startElement: jsx(MdSearch, {}), children: jsx(Input, { placeholder: "Outline", variant: "outline", onChange: (e) => {
|
|
1183
|
+
table.setGlobalFilter(e.target.value);
|
|
1184
|
+
} }) }) }));
|
|
1059
1185
|
};
|
|
1060
1186
|
|
|
1061
1187
|
export { DataTable, DataTableServer, DefaultCard, DefaultCardTitle, DefaultTable, DensityToggleButton, EditFilterButton, EditOrderButton, EditSortingButton, EditViewButton, FilterOptions, GlobalFilter, PageSizeControl, ReloadButton, ResetFilteringButton, ResetSelectionButton, ResetSortingButton, RowCountText, Table, TableBody, TableCardContainer, TableCards, TableComponent, TableControls, TableFilter, TableFilterTags, TableFooter, TableHeader, TableLoadingComponent, TableOrderer, TablePagination, TableSelector, TableSorter, TableViewer, TextCell, useDataFromUrl, useDataTable, useDataTableContext, useDataTableServer };
|