material-react-table 1.11.4 → 1.12.0-beta.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/cjs/index.js +770 -1004
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/MaterialReactTable.d.ts +4 -743
- package/dist/cjs/types/_locales/cs.d.ts +1 -1
- package/dist/cjs/types/_locales/da.d.ts +1 -1
- package/dist/cjs/types/_locales/de.d.ts +1 -1
- package/dist/cjs/types/_locales/en.d.ts +1 -1
- package/dist/cjs/types/_locales/es.d.ts +1 -1
- package/dist/cjs/types/_locales/fa.d.ts +1 -1
- package/dist/cjs/types/_locales/fi.d.ts +1 -1
- package/dist/cjs/types/_locales/fr.d.ts +1 -1
- package/dist/cjs/types/_locales/hu.d.ts +1 -1
- package/dist/cjs/types/_locales/id.d.ts +1 -1
- package/dist/cjs/types/_locales/it.d.ts +1 -1
- package/dist/cjs/types/_locales/ja.d.ts +1 -1
- package/dist/cjs/types/_locales/nl.d.ts +1 -1
- package/dist/cjs/types/_locales/pl.d.ts +1 -1
- package/dist/cjs/types/_locales/pt-BR.d.ts +1 -1
- package/dist/cjs/types/_locales/pt.d.ts +1 -1
- package/dist/cjs/types/_locales/ro.d.ts +1 -1
- package/dist/cjs/types/_locales/ru.d.ts +1 -1
- package/dist/cjs/types/_locales/sk.d.ts +1 -1
- package/dist/cjs/types/_locales/sr-Cyrl-RS.d.ts +1 -1
- package/dist/cjs/types/_locales/sr-Latn-RS.d.ts +1 -1
- package/dist/cjs/types/_locales/sv.d.ts +1 -1
- package/dist/cjs/types/_locales/tr.d.ts +1 -1
- package/dist/cjs/types/_locales/uk.d.ts +1 -1
- package/dist/cjs/types/_locales/vi.d.ts +1 -1
- package/dist/cjs/types/_locales/zh-Hans.d.ts +1 -1
- package/dist/cjs/types/_locales/zh-Hant.d.ts +1 -1
- package/dist/cjs/types/body/MRT_EditRowModal.d.ts +2 -3
- package/dist/cjs/types/body/MRT_TableBody.d.ts +4 -4
- package/dist/cjs/types/body/MRT_TableBodyCell.d.ts +5 -5
- package/dist/cjs/types/body/MRT_TableBodyCellValue.d.ts +2 -3
- package/dist/cjs/types/body/MRT_TableBodyRow.d.ts +5 -5
- package/dist/cjs/types/body/MRT_TableBodyRowGrabHandle.d.ts +3 -3
- package/dist/cjs/types/body/MRT_TableDetailPanel.d.ts +4 -4
- package/dist/cjs/types/buttons/MRT_ColumnPinningButtons.d.ts +2 -3
- package/dist/cjs/types/buttons/MRT_CopyButton.d.ts +3 -3
- package/dist/cjs/types/buttons/MRT_EditActionButtons.d.ts +2 -3
- package/dist/cjs/types/buttons/MRT_ExpandAllButton.d.ts +2 -3
- package/dist/cjs/types/buttons/MRT_ExpandButton.d.ts +2 -3
- package/dist/cjs/types/buttons/MRT_FullScreenToggleButton.d.ts +3 -4
- package/dist/cjs/types/buttons/MRT_GrabHandleButton.d.ts +4 -4
- package/dist/cjs/types/buttons/MRT_ShowHideColumnsButton.d.ts +3 -4
- package/dist/cjs/types/buttons/MRT_ToggleDensePaddingButton.d.ts +3 -4
- package/dist/cjs/types/buttons/MRT_ToggleFiltersButton.d.ts +3 -4
- package/dist/cjs/types/buttons/MRT_ToggleGlobalFilterButton.d.ts +3 -4
- package/dist/cjs/types/buttons/MRT_ToggleRowActionMenuButton.d.ts +2 -3
- package/dist/cjs/types/column.utils.d.ts +10 -10
- package/dist/cjs/types/filterFns.d.ts +1 -1
- package/dist/cjs/types/footer/MRT_TableFooter.d.ts +3 -4
- package/dist/cjs/types/footer/MRT_TableFooterCell.d.ts +2 -3
- package/dist/cjs/types/footer/MRT_TableFooterRow.d.ts +3 -4
- package/dist/cjs/types/head/MRT_TableHead.d.ts +3 -4
- package/dist/cjs/types/head/MRT_TableHeadCell.d.ts +2 -3
- package/dist/cjs/types/head/MRT_TableHeadCellColumnActionsButton.d.ts +2 -3
- package/dist/cjs/types/head/MRT_TableHeadCellFilterContainer.d.ts +2 -3
- package/dist/cjs/types/head/MRT_TableHeadCellFilterLabel.d.ts +2 -3
- package/dist/cjs/types/head/MRT_TableHeadCellGrabHandle.d.ts +3 -3
- package/dist/cjs/types/head/MRT_TableHeadCellResizeHandle.d.ts +2 -3
- package/dist/cjs/types/head/MRT_TableHeadCellSortLabel.d.ts +3 -4
- package/dist/cjs/types/head/MRT_TableHeadRow.d.ts +3 -4
- package/dist/cjs/types/index.d.ts +6 -4
- package/dist/cjs/types/inputs/MRT_EditCellTextField.d.ts +2 -3
- package/dist/cjs/types/inputs/MRT_FilterCheckbox.d.ts +2 -3
- package/dist/cjs/types/inputs/MRT_FilterRangeFields.d.ts +2 -3
- package/dist/cjs/types/inputs/MRT_FilterTextField.d.ts +2 -3
- package/dist/cjs/types/inputs/MRT_GlobalFilterTextField.d.ts +2 -3
- package/dist/cjs/types/inputs/MRT_SelectCheckbox.d.ts +2 -3
- package/dist/cjs/types/menus/MRT_ColumnActionMenu.d.ts +2 -3
- package/dist/cjs/types/menus/MRT_FilterOptionMenu.d.ts +2 -3
- package/dist/cjs/types/menus/MRT_RowActionMenu.d.ts +3 -3
- package/dist/cjs/types/menus/MRT_ShowHideColumnsMenu.d.ts +2 -3
- package/dist/cjs/types/menus/MRT_ShowHideColumnsMenuItems.d.ts +3 -3
- package/dist/cjs/types/sortingFns.d.ts +17 -17
- package/dist/cjs/types/table/MRT_Table.d.ts +2 -3
- package/dist/cjs/types/table/MRT_TableContainer.d.ts +2 -3
- package/dist/cjs/types/table/MRT_TablePaper.d.ts +2 -3
- package/dist/cjs/types/toolbar/MRT_BottomToolbar.d.ts +2 -3
- package/dist/cjs/types/toolbar/MRT_LinearProgressBar.d.ts +2 -3
- package/dist/cjs/types/toolbar/MRT_TablePagination.d.ts +2 -3
- package/dist/cjs/types/toolbar/MRT_ToolbarAlertBanner.d.ts +2 -3
- package/dist/cjs/types/toolbar/MRT_ToolbarDropZone.d.ts +2 -3
- package/dist/cjs/types/toolbar/MRT_ToolbarInternalButtons.d.ts +2 -3
- package/dist/cjs/types/toolbar/MRT_TopToolbar.d.ts +3 -4
- package/dist/cjs/types/types.d.ts +745 -0
- package/dist/esm/material-react-table.esm.js +691 -925
- package/dist/esm/material-react-table.esm.js.map +1 -1
- package/dist/esm/types/MaterialReactTable.d.ts +4 -743
- package/dist/esm/types/_locales/cs.d.ts +1 -1
- package/dist/esm/types/_locales/da.d.ts +1 -1
- package/dist/esm/types/_locales/de.d.ts +1 -1
- package/dist/esm/types/_locales/en.d.ts +1 -1
- package/dist/esm/types/_locales/es.d.ts +1 -1
- package/dist/esm/types/_locales/fa.d.ts +1 -1
- package/dist/esm/types/_locales/fi.d.ts +1 -1
- package/dist/esm/types/_locales/fr.d.ts +1 -1
- package/dist/esm/types/_locales/hu.d.ts +1 -1
- package/dist/esm/types/_locales/id.d.ts +1 -1
- package/dist/esm/types/_locales/it.d.ts +1 -1
- package/dist/esm/types/_locales/ja.d.ts +1 -1
- package/dist/esm/types/_locales/nl.d.ts +1 -1
- package/dist/esm/types/_locales/pl.d.ts +1 -1
- package/dist/esm/types/_locales/pt-BR.d.ts +1 -1
- package/dist/esm/types/_locales/pt.d.ts +1 -1
- package/dist/esm/types/_locales/ro.d.ts +1 -1
- package/dist/esm/types/_locales/ru.d.ts +1 -1
- package/dist/esm/types/_locales/sk.d.ts +1 -1
- package/dist/esm/types/_locales/sr-Cyrl-RS.d.ts +1 -1
- package/dist/esm/types/_locales/sr-Latn-RS.d.ts +1 -1
- package/dist/esm/types/_locales/sv.d.ts +1 -1
- package/dist/esm/types/_locales/tr.d.ts +1 -1
- package/dist/esm/types/_locales/uk.d.ts +1 -1
- package/dist/esm/types/_locales/vi.d.ts +1 -1
- package/dist/esm/types/_locales/zh-Hans.d.ts +1 -1
- package/dist/esm/types/_locales/zh-Hant.d.ts +1 -1
- package/dist/esm/types/body/MRT_EditRowModal.d.ts +2 -3
- package/dist/esm/types/body/MRT_TableBody.d.ts +4 -4
- package/dist/esm/types/body/MRT_TableBodyCell.d.ts +5 -5
- package/dist/esm/types/body/MRT_TableBodyCellValue.d.ts +2 -3
- package/dist/esm/types/body/MRT_TableBodyRow.d.ts +5 -5
- package/dist/esm/types/body/MRT_TableBodyRowGrabHandle.d.ts +3 -3
- package/dist/esm/types/body/MRT_TableDetailPanel.d.ts +4 -4
- package/dist/esm/types/buttons/MRT_ColumnPinningButtons.d.ts +2 -3
- package/dist/esm/types/buttons/MRT_CopyButton.d.ts +3 -3
- package/dist/esm/types/buttons/MRT_EditActionButtons.d.ts +2 -3
- package/dist/esm/types/buttons/MRT_ExpandAllButton.d.ts +2 -3
- package/dist/esm/types/buttons/MRT_ExpandButton.d.ts +2 -3
- package/dist/esm/types/buttons/MRT_FullScreenToggleButton.d.ts +3 -4
- package/dist/esm/types/buttons/MRT_GrabHandleButton.d.ts +4 -4
- package/dist/esm/types/buttons/MRT_ShowHideColumnsButton.d.ts +3 -4
- package/dist/esm/types/buttons/MRT_ToggleDensePaddingButton.d.ts +3 -4
- package/dist/esm/types/buttons/MRT_ToggleFiltersButton.d.ts +3 -4
- package/dist/esm/types/buttons/MRT_ToggleGlobalFilterButton.d.ts +3 -4
- package/dist/esm/types/buttons/MRT_ToggleRowActionMenuButton.d.ts +2 -3
- package/dist/esm/types/column.utils.d.ts +10 -10
- package/dist/esm/types/filterFns.d.ts +1 -1
- package/dist/esm/types/footer/MRT_TableFooter.d.ts +3 -4
- package/dist/esm/types/footer/MRT_TableFooterCell.d.ts +2 -3
- package/dist/esm/types/footer/MRT_TableFooterRow.d.ts +3 -4
- package/dist/esm/types/head/MRT_TableHead.d.ts +3 -4
- package/dist/esm/types/head/MRT_TableHeadCell.d.ts +2 -3
- package/dist/esm/types/head/MRT_TableHeadCellColumnActionsButton.d.ts +2 -3
- package/dist/esm/types/head/MRT_TableHeadCellFilterContainer.d.ts +2 -3
- package/dist/esm/types/head/MRT_TableHeadCellFilterLabel.d.ts +2 -3
- package/dist/esm/types/head/MRT_TableHeadCellGrabHandle.d.ts +3 -3
- package/dist/esm/types/head/MRT_TableHeadCellResizeHandle.d.ts +2 -3
- package/dist/esm/types/head/MRT_TableHeadCellSortLabel.d.ts +3 -4
- package/dist/esm/types/head/MRT_TableHeadRow.d.ts +3 -4
- package/dist/esm/types/index.d.ts +6 -4
- package/dist/esm/types/inputs/MRT_EditCellTextField.d.ts +2 -3
- package/dist/esm/types/inputs/MRT_FilterCheckbox.d.ts +2 -3
- package/dist/esm/types/inputs/MRT_FilterRangeFields.d.ts +2 -3
- package/dist/esm/types/inputs/MRT_FilterTextField.d.ts +2 -3
- package/dist/esm/types/inputs/MRT_GlobalFilterTextField.d.ts +2 -3
- package/dist/esm/types/inputs/MRT_SelectCheckbox.d.ts +2 -3
- package/dist/esm/types/menus/MRT_ColumnActionMenu.d.ts +2 -3
- package/dist/esm/types/menus/MRT_FilterOptionMenu.d.ts +2 -3
- package/dist/esm/types/menus/MRT_RowActionMenu.d.ts +3 -3
- package/dist/esm/types/menus/MRT_ShowHideColumnsMenu.d.ts +2 -3
- package/dist/esm/types/menus/MRT_ShowHideColumnsMenuItems.d.ts +3 -3
- package/dist/esm/types/sortingFns.d.ts +17 -17
- package/dist/esm/types/table/MRT_Table.d.ts +2 -3
- package/dist/esm/types/table/MRT_TableContainer.d.ts +2 -3
- package/dist/esm/types/table/MRT_TablePaper.d.ts +2 -3
- package/dist/esm/types/toolbar/MRT_BottomToolbar.d.ts +2 -3
- package/dist/esm/types/toolbar/MRT_LinearProgressBar.d.ts +2 -3
- package/dist/esm/types/toolbar/MRT_TablePagination.d.ts +2 -3
- package/dist/esm/types/toolbar/MRT_ToolbarAlertBanner.d.ts +2 -3
- package/dist/esm/types/toolbar/MRT_ToolbarDropZone.d.ts +2 -3
- package/dist/esm/types/toolbar/MRT_ToolbarInternalButtons.d.ts +2 -3
- package/dist/esm/types/toolbar/MRT_TopToolbar.d.ts +3 -4
- package/dist/esm/types/types.d.ts +745 -0
- package/dist/index.d.ts +40 -35
- package/locales/cs.d.ts +1 -1
- package/locales/cs.esm.d.ts +1 -1
- package/locales/da.d.ts +1 -1
- package/locales/da.esm.d.ts +1 -1
- package/locales/de.d.ts +1 -1
- package/locales/de.esm.d.ts +1 -1
- package/locales/en.d.ts +1 -1
- package/locales/en.esm.d.ts +1 -1
- package/locales/es.d.ts +1 -1
- package/locales/es.esm.d.ts +1 -1
- package/locales/fa.d.ts +1 -1
- package/locales/fa.esm.d.ts +1 -1
- package/locales/fi.d.ts +1 -1
- package/locales/fi.esm.d.ts +1 -1
- package/locales/fr.d.ts +1 -1
- package/locales/fr.esm.d.ts +1 -1
- package/locales/hu.d.ts +1 -1
- package/locales/hu.esm.d.ts +1 -1
- package/locales/id.d.ts +1 -1
- package/locales/id.esm.d.ts +1 -1
- package/locales/it.d.ts +1 -1
- package/locales/it.esm.d.ts +1 -1
- package/locales/ja.d.ts +1 -1
- package/locales/ja.esm.d.ts +1 -1
- package/locales/nl.d.ts +1 -1
- package/locales/nl.esm.d.ts +1 -1
- package/locales/pl.d.ts +1 -1
- package/locales/pl.esm.d.ts +1 -1
- package/locales/pt-BR.d.ts +1 -1
- package/locales/pt-BR.esm.d.ts +1 -1
- package/locales/pt.d.ts +1 -1
- package/locales/pt.esm.d.ts +1 -1
- package/locales/ro.d.ts +1 -1
- package/locales/ro.esm.d.ts +1 -1
- package/locales/ru.d.ts +1 -1
- package/locales/ru.esm.d.ts +1 -1
- package/locales/sk.d.ts +1 -1
- package/locales/sk.esm.d.ts +1 -1
- package/locales/sr-Cyrl-RS.d.ts +1 -1
- package/locales/sr-Cyrl-RS.esm.d.ts +1 -1
- package/locales/sr-Latn-RS.d.ts +1 -1
- package/locales/sr-Latn-RS.esm.d.ts +1 -1
- package/locales/sv.d.ts +1 -1
- package/locales/sv.esm.d.ts +1 -1
- package/locales/tr.d.ts +1 -1
- package/locales/tr.esm.d.ts +1 -1
- package/locales/uk.d.ts +1 -1
- package/locales/uk.esm.d.ts +1 -1
- package/locales/vi.d.ts +1 -1
- package/locales/vi.esm.d.ts +1 -1
- package/locales/zh-Hans.d.ts +1 -1
- package/locales/zh-Hans.esm.d.ts +1 -1
- package/locales/zh-Hant.d.ts +1 -1
- package/locales/zh-Hant.esm.d.ts +1 -1
- package/package.json +35 -17
- package/src/MaterialReactTable.tsx +10 -984
- package/src/_locales/cs.ts +1 -1
- package/src/_locales/da.ts +1 -1
- package/src/_locales/de.ts +1 -1
- package/src/_locales/en.ts +1 -1
- package/src/_locales/es.ts +1 -1
- package/src/_locales/fa.ts +1 -1
- package/src/_locales/fi.ts +1 -1
- package/src/_locales/fr.ts +1 -1
- package/src/_locales/hu.ts +1 -1
- package/src/_locales/id.ts +1 -1
- package/src/_locales/it.ts +1 -1
- package/src/_locales/ja.ts +1 -1
- package/src/_locales/nl.ts +1 -1
- package/src/_locales/pl.ts +1 -1
- package/src/_locales/pt-BR.ts +1 -1
- package/src/_locales/pt.ts +1 -1
- package/src/_locales/ro.ts +1 -1
- package/src/_locales/ru.ts +1 -1
- package/src/_locales/sk.ts +1 -1
- package/src/_locales/sr-Cyrl-RS.ts +1 -1
- package/src/_locales/sr-Latn-RS.ts +1 -1
- package/src/_locales/sv.ts +1 -1
- package/src/_locales/tr.ts +1 -1
- package/src/_locales/uk.ts +1 -1
- package/src/_locales/vi.ts +1 -1
- package/src/_locales/zh-Hans.ts +1 -1
- package/src/_locales/zh-Hant.ts +1 -1
- package/src/body/MRT_EditRowModal.tsx +1 -2
- package/src/body/MRT_TableBody.tsx +2 -2
- package/src/body/MRT_TableBodyCell.tsx +6 -6
- package/src/body/MRT_TableBodyCellValue.tsx +2 -2
- package/src/body/MRT_TableBodyRow.tsx +3 -3
- package/src/body/MRT_TableBodyRowGrabHandle.tsx +2 -2
- package/src/body/MRT_TableDetailPanel.tsx +3 -3
- package/src/buttons/MRT_ColumnPinningButtons.tsx +1 -2
- package/src/buttons/MRT_CopyButton.tsx +2 -2
- package/src/buttons/MRT_EditActionButtons.tsx +1 -2
- package/src/buttons/MRT_ExpandAllButton.tsx +1 -2
- package/src/buttons/MRT_ExpandButton.tsx +2 -2
- package/src/buttons/MRT_FullScreenToggleButton.tsx +2 -3
- package/src/buttons/MRT_GrabHandleButton.tsx +3 -3
- package/src/buttons/MRT_ShowHideColumnsButton.tsx +3 -3
- package/src/buttons/MRT_ToggleDensePaddingButton.tsx +2 -3
- package/src/buttons/MRT_ToggleFiltersButton.tsx +2 -3
- package/src/buttons/MRT_ToggleGlobalFilterButton.tsx +2 -3
- package/src/buttons/MRT_ToggleRowActionMenuButton.tsx +2 -2
- package/src/column.utils.ts +23 -22
- package/src/filterFns.ts +1 -1
- package/src/footer/MRT_TableFooter.tsx +2 -3
- package/src/footer/MRT_TableFooterCell.tsx +1 -2
- package/src/footer/MRT_TableFooterRow.tsx +2 -3
- package/src/head/MRT_TableHead.tsx +2 -3
- package/src/head/MRT_TableHeadCell.tsx +3 -3
- package/src/head/MRT_TableHeadCellColumnActionsButton.tsx +2 -2
- package/src/head/MRT_TableHeadCellFilterContainer.tsx +1 -2
- package/src/head/MRT_TableHeadCellFilterLabel.tsx +2 -2
- package/src/head/MRT_TableHeadCellGrabHandle.tsx +2 -2
- package/src/head/MRT_TableHeadCellResizeHandle.tsx +1 -2
- package/src/head/MRT_TableHeadCellSortLabel.tsx +2 -3
- package/src/head/MRT_TableHeadRow.tsx +2 -3
- package/src/index.tsx +7 -5
- package/src/inputs/MRT_EditCellTextField.tsx +3 -3
- package/src/inputs/MRT_FilterCheckbox.tsx +2 -3
- package/src/inputs/MRT_FilterRangeFields.tsx +1 -2
- package/src/inputs/MRT_FilterTextField.tsx +5 -5
- package/src/inputs/MRT_GlobalFilterTextField.tsx +4 -4
- package/src/inputs/MRT_SelectCheckbox.tsx +3 -3
- package/src/menus/MRT_ColumnActionMenu.tsx +3 -2
- package/src/menus/MRT_FilterOptionMenu.tsx +8 -8
- package/src/menus/MRT_RowActionMenu.tsx +2 -2
- package/src/menus/MRT_ShowHideColumnsMenu.tsx +2 -2
- package/src/menus/MRT_ShowHideColumnsMenuItems.tsx +2 -8
- package/src/sortingFns.ts +1 -1
- package/src/table/MRT_Table.tsx +2 -2
- package/src/table/MRT_TableContainer.tsx +2 -2
- package/src/table/MRT_TablePaper.tsx +1 -2
- package/src/table/MRT_TableRoot.tsx +16 -16
- package/src/toolbar/MRT_BottomToolbar.tsx +1 -2
- package/src/toolbar/MRT_LinearProgressBar.tsx +1 -2
- package/src/toolbar/MRT_TablePagination.tsx +2 -2
- package/src/toolbar/MRT_ToolbarAlertBanner.tsx +2 -2
- package/src/toolbar/MRT_ToolbarDropZone.tsx +2 -2
- package/src/toolbar/MRT_ToolbarInternalButtons.tsx +1 -2
- package/src/toolbar/MRT_TopToolbar.tsx +2 -3
- package/src/types.ts +981 -0
@@ -1,7 +1,7 @@
|
|
1
|
-
import
|
1
|
+
import { type DragEvent, type RefObject } from 'react';
|
2
2
|
import { MRT_GrabHandleButton } from '../buttons/MRT_GrabHandleButton';
|
3
3
|
import { reorderColumn } from '../column.utils';
|
4
|
-
import type
|
4
|
+
import { type MRT_Column, type MRT_TableInstance } from '../types';
|
5
5
|
|
6
6
|
interface Props {
|
7
7
|
column: MRT_Column;
|
@@ -1,7 +1,6 @@
|
|
1
|
-
import React from 'react';
|
2
1
|
import Box from '@mui/material/Box';
|
3
2
|
import Divider from '@mui/material/Divider';
|
4
|
-
import { MRT_Header, MRT_TableInstance } from '
|
3
|
+
import { type MRT_Header, type MRT_TableInstance } from '../types';
|
5
4
|
|
6
5
|
interface Props {
|
7
6
|
header: MRT_Header;
|
@@ -1,9 +1,8 @@
|
|
1
|
-
import React from 'react';
|
2
1
|
import Badge from '@mui/material/Badge';
|
3
2
|
import TableSortLabel from '@mui/material/TableSortLabel';
|
4
3
|
import Tooltip from '@mui/material/Tooltip';
|
5
|
-
import { MRT_Header, MRT_TableInstance } from '
|
6
|
-
import type
|
4
|
+
import { type MRT_Header, type MRT_TableInstance } from '../types';
|
5
|
+
import { type TableCellProps } from '@mui/material/TableCell';
|
7
6
|
|
8
7
|
interface Props {
|
9
8
|
header: MRT_Header;
|
@@ -1,9 +1,8 @@
|
|
1
|
-
import React from 'react';
|
2
1
|
import TableRow from '@mui/material/TableRow';
|
3
2
|
import { alpha, lighten } from '@mui/material/styles';
|
4
3
|
import { MRT_TableHeadCell } from './MRT_TableHeadCell';
|
5
|
-
import type
|
6
|
-
import type
|
4
|
+
import { type VirtualItem } from '@tanstack/react-virtual';
|
5
|
+
import { type MRT_Header, type MRT_HeaderGroup, type MRT_TableInstance } from '../types';
|
7
6
|
|
8
7
|
interface Props {
|
9
8
|
headerGroup: MRT_HeaderGroup;
|
package/src/index.tsx
CHANGED
@@ -1,9 +1,5 @@
|
|
1
|
-
import MaterialReactTable from './MaterialReactTable';
|
2
|
-
export default MaterialReactTable;
|
3
1
|
export * from './MaterialReactTable';
|
4
|
-
|
5
|
-
import type { MRT_Icons } from './icons';
|
6
|
-
export type { MRT_Icons };
|
2
|
+
export * from './types';
|
7
3
|
|
8
4
|
import { MRT_BottomToolbar } from './toolbar/MRT_BottomToolbar';
|
9
5
|
import { MRT_CopyButton } from './buttons/MRT_CopyButton';
|
@@ -46,3 +42,9 @@ export {
|
|
46
42
|
MRT_ToolbarInternalButtons,
|
47
43
|
MRT_TopToolbar,
|
48
44
|
};
|
45
|
+
|
46
|
+
/**
|
47
|
+
* @deprecated Use named exports instead of default export (will be removed in v2)
|
48
|
+
* @example import { MaterialReactTable } from 'material-react-table';
|
49
|
+
*/
|
50
|
+
export { default } from './MaterialReactTable';
|
@@ -1,8 +1,8 @@
|
|
1
|
-
import
|
1
|
+
import { type ChangeEvent, type FocusEvent, type KeyboardEvent, useState } from 'react';
|
2
2
|
import TextField from '@mui/material/TextField';
|
3
3
|
import MenuItem from '@mui/material/MenuItem';
|
4
|
-
import type
|
5
|
-
import type
|
4
|
+
import { type TextFieldProps } from '@mui/material/TextField';
|
5
|
+
import { type MRT_Cell, type MRT_TableInstance } from '../types';
|
6
6
|
|
7
7
|
interface Props<TData extends Record<string, any> = {}> {
|
8
8
|
cell: MRT_Cell<TData>;
|
@@ -1,9 +1,8 @@
|
|
1
|
-
import React from 'react';
|
2
1
|
import Checkbox from '@mui/material/Checkbox';
|
3
2
|
import FormControlLabel from '@mui/material/FormControlLabel';
|
4
3
|
import Tooltip from '@mui/material/Tooltip';
|
5
|
-
import type
|
6
|
-
import type
|
4
|
+
import { type CheckboxProps } from '@mui/material/Checkbox';
|
5
|
+
import { type MRT_Column, type MRT_TableInstance } from '../types';
|
7
6
|
|
8
7
|
interface Props {
|
9
8
|
column: MRT_Column;
|
@@ -1,7 +1,6 @@
|
|
1
|
-
import React from 'react';
|
2
1
|
import Box from '@mui/material/Box';
|
3
2
|
import { MRT_FilterTextField } from './MRT_FilterTextField';
|
4
|
-
import { MRT_Header, MRT_TableInstance } from '
|
3
|
+
import { type MRT_Header, type MRT_TableInstance } from '../types';
|
5
4
|
|
6
5
|
interface Props {
|
7
6
|
header: MRT_Header;
|
@@ -1,6 +1,6 @@
|
|
1
|
-
import
|
2
|
-
ChangeEvent,
|
3
|
-
MouseEvent,
|
1
|
+
import {
|
2
|
+
type ChangeEvent,
|
3
|
+
type MouseEvent,
|
4
4
|
useCallback,
|
5
5
|
useEffect,
|
6
6
|
useRef,
|
@@ -16,8 +16,8 @@ import TextField from '@mui/material/TextField';
|
|
16
16
|
import Tooltip from '@mui/material/Tooltip';
|
17
17
|
import { debounce } from '@mui/material/utils';
|
18
18
|
import { MRT_FilterOptionMenu } from '../menus/MRT_FilterOptionMenu';
|
19
|
-
import type
|
20
|
-
import type
|
19
|
+
import { type TextFieldProps } from '@mui/material/TextField';
|
20
|
+
import { type MRT_Header, type MRT_TableInstance } from '../types';
|
21
21
|
|
22
22
|
interface Props {
|
23
23
|
header: MRT_Header;
|
@@ -1,6 +1,6 @@
|
|
1
|
-
import
|
2
|
-
ChangeEvent,
|
3
|
-
MouseEvent,
|
1
|
+
import {
|
2
|
+
type ChangeEvent,
|
3
|
+
type MouseEvent,
|
4
4
|
useCallback,
|
5
5
|
useEffect,
|
6
6
|
useRef,
|
@@ -13,7 +13,7 @@ import TextField from '@mui/material/TextField';
|
|
13
13
|
import Tooltip from '@mui/material/Tooltip';
|
14
14
|
import { debounce } from '@mui/material/utils';
|
15
15
|
import { MRT_FilterOptionMenu } from '../menus/MRT_FilterOptionMenu';
|
16
|
-
import type
|
16
|
+
import { type MRT_TableInstance } from '../types';
|
17
17
|
|
18
18
|
interface Props<TData extends Record<string, any> = {}> {
|
19
19
|
table: MRT_TableInstance<TData>;
|
@@ -1,9 +1,9 @@
|
|
1
|
-
import
|
1
|
+
import { type MouseEvent } from 'react';
|
2
2
|
import Checkbox from '@mui/material/Checkbox';
|
3
3
|
import Tooltip from '@mui/material/Tooltip';
|
4
4
|
import Radio from '@mui/material/Radio';
|
5
|
-
import type
|
6
|
-
import type
|
5
|
+
import { type Theme } from '@mui/material/styles';
|
6
|
+
import { type MRT_Row, type MRT_TableInstance } from '../types';
|
7
7
|
|
8
8
|
interface Props {
|
9
9
|
row?: MRT_Row;
|
@@ -1,11 +1,12 @@
|
|
1
|
-
import
|
1
|
+
import { useState } from 'react';
|
2
|
+
import * as React from 'react';
|
2
3
|
import Box from '@mui/material/Box';
|
3
4
|
import IconButton from '@mui/material/IconButton';
|
4
5
|
import ListItemIcon from '@mui/material/ListItemIcon';
|
5
6
|
import Menu from '@mui/material/Menu';
|
6
7
|
import MenuItem from '@mui/material/MenuItem';
|
7
8
|
import { MRT_FilterOptionMenu } from './MRT_FilterOptionMenu';
|
8
|
-
import type
|
9
|
+
import { type MRT_Header, type MRT_TableInstance } from '../types';
|
9
10
|
|
10
11
|
export const commonMenuItemStyles = {
|
11
12
|
py: '6px',
|
@@ -1,14 +1,14 @@
|
|
1
|
-
import
|
1
|
+
import { useMemo } from 'react';
|
2
2
|
import Box from '@mui/material/Box';
|
3
3
|
import Menu from '@mui/material/Menu';
|
4
4
|
import MenuItem from '@mui/material/MenuItem';
|
5
|
-
import
|
6
|
-
MRT_FilterOption,
|
7
|
-
MRT_Header,
|
8
|
-
MRT_InternalFilterOption,
|
9
|
-
MRT_Localization,
|
10
|
-
MRT_TableInstance,
|
11
|
-
} from '
|
5
|
+
import {
|
6
|
+
type MRT_FilterOption,
|
7
|
+
type MRT_Header,
|
8
|
+
type MRT_InternalFilterOption,
|
9
|
+
type MRT_Localization,
|
10
|
+
type MRT_TableInstance,
|
11
|
+
} from '../types';
|
12
12
|
|
13
13
|
export const mrtFilterOptions = (
|
14
14
|
localization: MRT_Localization,
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import
|
1
|
+
import { type MouseEvent } from 'react';
|
2
2
|
import Box from '@mui/material/Box';
|
3
3
|
import ListItemIcon from '@mui/material/ListItemIcon';
|
4
4
|
import Menu from '@mui/material/Menu';
|
@@ -7,7 +7,7 @@ import {
|
|
7
7
|
commonListItemStyles,
|
8
8
|
commonMenuItemStyles,
|
9
9
|
} from './MRT_ColumnActionMenu';
|
10
|
-
import type
|
10
|
+
import { type MRT_Row, type MRT_TableInstance } from '../types';
|
11
11
|
|
12
12
|
interface Props {
|
13
13
|
anchorEl: HTMLElement | null;
|
@@ -1,11 +1,11 @@
|
|
1
|
-
import
|
1
|
+
import { useMemo, useState } from 'react';
|
2
2
|
import Box from '@mui/material/Box';
|
3
3
|
import Button from '@mui/material/Button';
|
4
4
|
import Divider from '@mui/material/Divider';
|
5
5
|
import Menu from '@mui/material/Menu';
|
6
6
|
import { MRT_ShowHideColumnsMenuItems } from './MRT_ShowHideColumnsMenuItems';
|
7
7
|
import { getDefaultColumnOrderIds } from '../column.utils';
|
8
|
-
import type
|
8
|
+
import { type MRT_Column, type MRT_TableInstance } from '../types';
|
9
9
|
|
10
10
|
interface Props<TData extends Record<string, any> = {}> {
|
11
11
|
anchorEl: HTMLElement | null;
|
@@ -1,10 +1,4 @@
|
|
1
|
-
import
|
2
|
-
Dispatch,
|
3
|
-
DragEvent,
|
4
|
-
SetStateAction,
|
5
|
-
useRef,
|
6
|
-
useState,
|
7
|
-
} from 'react';
|
1
|
+
import { type Dispatch, type DragEvent, type SetStateAction, useRef, useState } from 'react';
|
8
2
|
import Box from '@mui/material/Box';
|
9
3
|
import FormControlLabel from '@mui/material/FormControlLabel';
|
10
4
|
import MenuItem from '@mui/material/MenuItem';
|
@@ -14,7 +8,7 @@ import Typography from '@mui/material/Typography';
|
|
14
8
|
import { MRT_ColumnPinningButtons } from '../buttons/MRT_ColumnPinningButtons';
|
15
9
|
import { MRT_GrabHandleButton } from '../buttons/MRT_GrabHandleButton';
|
16
10
|
import { reorderColumn } from '../column.utils';
|
17
|
-
import type
|
11
|
+
import { type MRT_Column, type MRT_TableInstance } from '../types';
|
18
12
|
|
19
13
|
interface Props<TData extends Record<string, any> = {}> {
|
20
14
|
allColumns: MRT_Column<TData>[];
|
package/src/sortingFns.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import { compareItems, type RankingInfo } from '@tanstack/match-sorter-utils';
|
2
2
|
import { type Row, sortingFns } from '@tanstack/react-table';
|
3
|
-
import type
|
3
|
+
import { type MRT_Row } from './types';
|
4
4
|
|
5
5
|
const fuzzy = <TData extends Record<string, any> = {}>(
|
6
6
|
rowA: Row<TData>,
|
package/src/table/MRT_Table.tsx
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import
|
1
|
+
import { useCallback, useMemo } from 'react';
|
2
2
|
import {
|
3
3
|
defaultRangeExtractor,
|
4
4
|
useVirtualizer,
|
@@ -10,7 +10,7 @@ import { MRT_TableHead } from '../head/MRT_TableHead';
|
|
10
10
|
import { Memo_MRT_TableBody, MRT_TableBody } from '../body/MRT_TableBody';
|
11
11
|
import { MRT_TableFooter } from '../footer/MRT_TableFooter';
|
12
12
|
import { parseCSSVarId } from '../column.utils';
|
13
|
-
import type
|
13
|
+
import { type MRT_TableInstance } from '../types';
|
14
14
|
|
15
15
|
interface Props {
|
16
16
|
table: MRT_TableInstance;
|
@@ -1,7 +1,7 @@
|
|
1
|
-
import
|
1
|
+
import { useEffect, useLayoutEffect, useState } from 'react';
|
2
2
|
import TableContainer from '@mui/material/TableContainer';
|
3
3
|
import { MRT_Table } from './MRT_Table';
|
4
|
-
import type
|
4
|
+
import { type MRT_TableInstance } from '../types';
|
5
5
|
|
6
6
|
const useIsomorphicLayoutEffect =
|
7
7
|
typeof window !== 'undefined' ? useLayoutEffect : useEffect;
|
@@ -1,9 +1,8 @@
|
|
1
|
-
import React from 'react';
|
2
1
|
import Paper from '@mui/material/Paper';
|
3
2
|
import { MRT_TopToolbar } from '../toolbar/MRT_TopToolbar';
|
4
3
|
import { MRT_BottomToolbar } from '../toolbar/MRT_BottomToolbar';
|
5
4
|
import { MRT_TableContainer } from './MRT_TableContainer';
|
6
|
-
import type
|
5
|
+
import { type MRT_TableInstance } from '../types';
|
7
6
|
|
8
7
|
interface Props {
|
9
8
|
table: MRT_TableInstance;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import
|
1
|
+
import { useEffect, useMemo, useRef, useState } from 'react';
|
2
2
|
import {
|
3
3
|
getCoreRowModel,
|
4
4
|
getExpandedRowModel,
|
@@ -26,21 +26,21 @@ import {
|
|
26
26
|
showExpandColumn,
|
27
27
|
getColumnId,
|
28
28
|
} from '../column.utils';
|
29
|
-
import
|
30
|
-
MRT_Cell,
|
31
|
-
MRT_Column,
|
32
|
-
MRT_ColumnDef,
|
33
|
-
MRT_FilterOption,
|
34
|
-
MRT_Localization,
|
35
|
-
MRT_Row,
|
36
|
-
MRT_TableInstance,
|
37
|
-
MRT_TableState,
|
38
|
-
MaterialReactTableProps,
|
39
|
-
MRT_DensityState,
|
40
|
-
MRT_ColumnOrderState,
|
41
|
-
MRT_GroupingState,
|
42
|
-
MRT_FilterFnsState,
|
43
|
-
} from '
|
29
|
+
import {
|
30
|
+
type MRT_Cell,
|
31
|
+
type MRT_Column,
|
32
|
+
type MRT_ColumnDef,
|
33
|
+
type MRT_FilterOption,
|
34
|
+
type MRT_Localization,
|
35
|
+
type MRT_Row,
|
36
|
+
type MRT_TableInstance,
|
37
|
+
type MRT_TableState,
|
38
|
+
type MaterialReactTableProps,
|
39
|
+
type MRT_DensityState,
|
40
|
+
type MRT_ColumnOrderState,
|
41
|
+
type MRT_GroupingState,
|
42
|
+
type MRT_FilterFnsState,
|
43
|
+
} from '../types';
|
44
44
|
|
45
45
|
export const MRT_TableRoot: any = <TData extends Record<string, any> = {}>(
|
46
46
|
props: MaterialReactTableProps<TData> & { localization: MRT_Localization },
|
@@ -1,4 +1,3 @@
|
|
1
|
-
import React from 'react';
|
2
1
|
import Box from '@mui/material/Box';
|
3
2
|
import Toolbar from '@mui/material/Toolbar';
|
4
3
|
import useMediaQuery from '@mui/material/useMediaQuery';
|
@@ -8,7 +7,7 @@ import { MRT_ToolbarAlertBanner } from './MRT_ToolbarAlertBanner';
|
|
8
7
|
import { MRT_ToolbarDropZone } from './MRT_ToolbarDropZone';
|
9
8
|
import { MRT_LinearProgressBar } from './MRT_LinearProgressBar';
|
10
9
|
import { commonToolbarStyles } from './MRT_TopToolbar';
|
11
|
-
import type
|
10
|
+
import { type MRT_TableInstance } from '../types';
|
12
11
|
|
13
12
|
interface Props<TData extends Record<string, any> = {}> {
|
14
13
|
table: MRT_TableInstance<TData>;
|
@@ -1,7 +1,6 @@
|
|
1
|
-
import React from 'react';
|
2
1
|
import Collapse from '@mui/material/Collapse';
|
3
2
|
import LinearProgress from '@mui/material/LinearProgress';
|
4
|
-
import type
|
3
|
+
import { type MRT_TableInstance } from '../types';
|
5
4
|
|
6
5
|
interface Props<TData extends Record<string, any> = {}> {
|
7
6
|
isTopToolbar: boolean;
|
@@ -1,6 +1,6 @@
|
|
1
|
-
import
|
1
|
+
import { type ChangeEvent } from 'react';
|
2
2
|
import TablePagination from '@mui/material/TablePagination';
|
3
|
-
import type
|
3
|
+
import { type MRT_TableInstance } from '../types';
|
4
4
|
|
5
5
|
interface Props<TData extends Record<string, any> = {}> {
|
6
6
|
position?: 'top' | 'bottom';
|
@@ -1,10 +1,10 @@
|
|
1
|
-
import
|
1
|
+
import { Fragment } from 'react';
|
2
2
|
import Alert from '@mui/material/Alert';
|
3
3
|
import AlertTitle from '@mui/material/AlertTitle';
|
4
4
|
import Box from '@mui/material/Box';
|
5
5
|
import Chip from '@mui/material/Chip';
|
6
6
|
import Collapse from '@mui/material/Collapse';
|
7
|
-
import type
|
7
|
+
import { type MRT_TableInstance } from '../types';
|
8
8
|
|
9
9
|
interface Props<TData extends Record<string, any> = {}> {
|
10
10
|
stackAlertBanner: boolean;
|
@@ -1,9 +1,9 @@
|
|
1
|
-
import
|
1
|
+
import { type DragEvent, useEffect } from 'react';
|
2
2
|
import { alpha } from '@mui/material/styles';
|
3
3
|
import Box from '@mui/material/Box';
|
4
4
|
import Fade from '@mui/material/Fade';
|
5
5
|
import Typography from '@mui/material/Typography';
|
6
|
-
import type
|
6
|
+
import { type MRT_TableInstance } from '../types';
|
7
7
|
|
8
8
|
interface Props<TData extends Record<string, any> = {}> {
|
9
9
|
table: MRT_TableInstance<TData>;
|
@@ -1,11 +1,10 @@
|
|
1
|
-
import React from 'react';
|
2
1
|
import Box from '@mui/material/Box';
|
3
2
|
import { MRT_FullScreenToggleButton } from '../buttons/MRT_FullScreenToggleButton';
|
4
3
|
import { MRT_ShowHideColumnsButton } from '../buttons/MRT_ShowHideColumnsButton';
|
5
4
|
import { MRT_ToggleDensePaddingButton } from '../buttons/MRT_ToggleDensePaddingButton';
|
6
5
|
import { MRT_ToggleFiltersButton } from '../buttons/MRT_ToggleFiltersButton';
|
7
6
|
import { MRT_ToggleGlobalFilterButton } from '../buttons/MRT_ToggleGlobalFilterButton';
|
8
|
-
import type
|
7
|
+
import { type MRT_TableInstance } from '../types';
|
9
8
|
|
10
9
|
interface Props<TData extends Record<string, any> = {}> {
|
11
10
|
table: MRT_TableInstance<TData>;
|
@@ -1,4 +1,3 @@
|
|
1
|
-
import React from 'react';
|
2
1
|
import Box from '@mui/material/Box';
|
3
2
|
import Toolbar from '@mui/material/Toolbar';
|
4
3
|
import useMediaQuery from '@mui/material/useMediaQuery';
|
@@ -9,8 +8,8 @@ import { MRT_TablePagination } from './MRT_TablePagination';
|
|
9
8
|
import { MRT_ToolbarAlertBanner } from './MRT_ToolbarAlertBanner';
|
10
9
|
import { MRT_ToolbarInternalButtons } from './MRT_ToolbarInternalButtons';
|
11
10
|
import { MRT_ToolbarDropZone } from './MRT_ToolbarDropZone';
|
12
|
-
import type
|
13
|
-
import type
|
11
|
+
import { type MRT_TableInstance } from '../types';
|
12
|
+
import { type Theme } from '@mui/material/styles';
|
14
13
|
|
15
14
|
export const commonToolbarStyles = ({ theme }: { theme: Theme }) => ({
|
16
15
|
alignItems: 'flex-start',
|