material-react-table 2.0.0-beta.0 → 2.0.0-beta.10
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 +281 -263
- package/dist/{esm/material-react-table.esm.js → index.esm.js} +1018 -968
- package/dist/index.esm.js.map +1 -0
- package/dist/{cjs/index.js → index.js} +1098 -1135
- package/dist/index.js.map +1 -0
- package/locales/ar.d.ts +1 -0
- package/locales/ar.js +0 -3
- package/locales/{ar.esm.js → ar.mjs} +0 -1
- package/locales/az.d.ts +3 -0
- package/locales/az.js +95 -0
- package/locales/az.mjs +93 -0
- package/locales/bg.d.ts +1 -0
- package/locales/bg.js +0 -3
- package/locales/{bg.esm.js → bg.mjs} +0 -1
- package/locales/cs.d.ts +1 -0
- package/locales/cs.js +0 -3
- package/locales/{cs.esm.js → cs.mjs} +0 -1
- package/locales/da.d.ts +1 -0
- package/locales/da.js +0 -3
- package/locales/{da.esm.js → da.mjs} +0 -1
- package/locales/de.d.ts +1 -0
- package/locales/de.js +0 -3
- package/locales/{de.esm.js → de.mjs} +0 -1
- package/locales/en.d.ts +1 -0
- package/locales/en.js +0 -3
- package/locales/{en.esm.js → en.mjs} +0 -1
- package/locales/es.d.ts +1 -0
- package/locales/es.js +0 -3
- package/locales/{es.esm.js → es.mjs} +0 -1
- package/locales/et.d.ts +1 -0
- package/locales/et.js +0 -3
- package/locales/{et.esm.js → et.mjs} +0 -1
- package/locales/fa.d.ts +1 -0
- package/locales/fa.js +0 -3
- package/locales/{fa.esm.js → fa.mjs} +0 -1
- package/locales/fi.d.ts +1 -0
- package/locales/fi.js +0 -3
- package/locales/{fi.esm.js → fi.mjs} +0 -1
- package/locales/fr.d.ts +1 -0
- package/locales/fr.js +0 -3
- package/locales/{fr.esm.js → fr.mjs} +0 -1
- package/locales/hu.d.ts +1 -0
- package/locales/hu.js +0 -3
- package/locales/{hu.esm.js → hu.mjs} +0 -1
- package/locales/hy.d.ts +1 -0
- package/locales/hy.js +0 -3
- package/locales/{hy.esm.js → hy.mjs} +0 -1
- package/locales/id.d.ts +1 -0
- package/locales/id.js +0 -3
- package/locales/{id.esm.js → id.mjs} +0 -1
- package/locales/it.d.ts +1 -0
- package/locales/it.js +0 -3
- package/locales/{it.esm.js → it.mjs} +0 -1
- package/locales/ja.d.ts +1 -0
- package/locales/ja.js +0 -3
- package/locales/{ja.esm.js → ja.mjs} +0 -1
- package/locales/ko.d.ts +1 -0
- package/locales/ko.js +0 -3
- package/locales/{ko.esm.js → ko.mjs} +0 -1
- package/locales/nl.d.ts +1 -0
- package/locales/nl.js +0 -3
- package/locales/{nl.esm.js → nl.mjs} +0 -1
- package/locales/no.d.ts +2 -1
- package/locales/no.js +0 -3
- package/locales/{no.esm.js → no.mjs} +0 -1
- package/locales/np.d.ts +1 -0
- package/locales/np.js +0 -3
- package/locales/{np.esm.js → np.mjs} +0 -1
- package/locales/pl.d.ts +1 -0
- package/locales/pl.js +0 -3
- package/locales/{pl.esm.js → pl.mjs} +0 -1
- package/locales/pt-BR.d.ts +1 -0
- package/locales/pt-BR.js +0 -3
- package/locales/{pt-BR.esm.js → pt-BR.mjs} +0 -1
- package/locales/pt.d.ts +1 -0
- package/locales/pt.js +0 -3
- package/locales/{pt.esm.js → pt.mjs} +0 -1
- package/locales/ro.d.ts +1 -0
- package/locales/ro.js +0 -3
- package/locales/{ro.esm.js → ro.mjs} +0 -1
- package/locales/ru.d.ts +1 -0
- package/locales/ru.js +0 -3
- package/locales/{ru.esm.js → ru.mjs} +0 -1
- package/locales/sk.d.ts +1 -0
- package/locales/sk.js +0 -3
- package/locales/{sk.esm.js → sk.mjs} +0 -1
- package/locales/sr-Cyrl-RS.d.ts +1 -0
- package/locales/sr-Cyrl-RS.js +0 -3
- package/locales/{sr-Cyrl-RS.esm.js → sr-Cyrl-RS.mjs} +0 -1
- package/locales/sr-Latn-RS.d.ts +1 -0
- package/locales/sr-Latn-RS.js +0 -3
- package/locales/{sr-Latn-RS.esm.js → sr-Latn-RS.mjs} +0 -1
- package/locales/sv.d.ts +1 -0
- package/locales/sv.js +0 -3
- package/locales/{sv.esm.js → sv.mjs} +0 -1
- package/locales/tr.d.ts +1 -0
- package/locales/tr.js +0 -3
- package/locales/{tr.esm.js → tr.mjs} +0 -1
- package/locales/uk.d.ts +1 -0
- package/locales/uk.js +0 -3
- package/locales/{uk.esm.js → uk.mjs} +0 -1
- package/locales/vi.d.ts +1 -0
- package/locales/vi.js +0 -3
- package/locales/{vi.esm.js → vi.mjs} +0 -1
- package/locales/zh-Hans.d.ts +1 -0
- package/locales/zh-Hans.js +17 -20
- package/locales/{zh-Hans.esm.js → zh-Hans.mjs} +17 -18
- package/locales/zh-Hant.d.ts +1 -0
- package/locales/zh-Hant.js +0 -3
- package/locales/{zh-Hant.esm.js → zh-Hant.mjs} +0 -1
- package/package.json +215 -32
- package/src/MaterialReactTable.tsx +5 -4
- package/src/body/MRT_TableBody.tsx +19 -8
- package/src/body/MRT_TableBodyCell.tsx +95 -74
- package/src/body/MRT_TableBodyCellValue.tsx +13 -9
- package/src/body/MRT_TableBodyRow.tsx +27 -16
- package/src/body/MRT_TableBodyRowGrabHandle.tsx +16 -7
- package/src/body/MRT_TableBodyRowPinButton.tsx +18 -7
- package/src/body/MRT_TableDetailPanel.tsx +20 -13
- package/src/buttons/MRT_ColumnPinningButtons.tsx +21 -8
- package/src/buttons/MRT_CopyButton.tsx +12 -11
- package/src/buttons/MRT_EditActionButtons.tsx +17 -7
- package/src/buttons/MRT_ExpandAllButton.tsx +13 -11
- package/src/buttons/MRT_ExpandButton.tsx +10 -8
- package/src/buttons/MRT_GrabHandleButton.tsx +10 -8
- package/src/buttons/MRT_RowPinButton.tsx +14 -7
- package/src/buttons/MRT_ShowHideColumnsButton.tsx +4 -4
- package/src/buttons/MRT_ToggleDensePaddingButton.tsx +4 -6
- package/src/buttons/MRT_ToggleFiltersButton.tsx +4 -4
- package/src/buttons/MRT_ToggleFullScreenButton.tsx +3 -4
- package/src/buttons/MRT_ToggleGlobalFilterButton.tsx +4 -6
- package/src/buttons/MRT_ToggleRowActionMenuButton.tsx +15 -9
- package/src/column.utils.ts +46 -141
- package/src/filterFns.ts +15 -14
- package/src/footer/MRT_TableFooter.tsx +11 -7
- package/src/footer/MRT_TableFooterCell.tsx +21 -16
- package/src/footer/MRT_TableFooterRow.tsx +14 -9
- package/src/head/MRT_TableHead.tsx +10 -6
- package/src/head/MRT_TableHeadCell.tsx +122 -103
- package/src/head/MRT_TableHeadCellColumnActionsButton.tsx +13 -12
- package/src/head/MRT_TableHeadCellFilterContainer.tsx +10 -6
- package/src/head/MRT_TableHeadCellFilterLabel.tsx +15 -9
- package/src/head/MRT_TableHeadCellGrabHandle.tsx +10 -3
- package/src/head/MRT_TableHeadCellResizeHandle.tsx +21 -11
- package/src/head/MRT_TableHeadCellSortLabel.tsx +38 -18
- package/src/head/MRT_TableHeadRow.tsx +15 -9
- package/src/hooks/useMRT_DisplayColumns.tsx +14 -10
- package/src/hooks/useMRT_Effects.ts +6 -2
- package/src/hooks/useMRT_TableInstance.ts +3 -2
- package/src/hooks/useMRT_TableOptions.ts +29 -4
- package/src/index.ts +1 -0
- package/src/inputs/MRT_EditCellTextField.tsx +26 -4
- package/src/inputs/MRT_FilterCheckbox.tsx +10 -5
- package/src/inputs/MRT_FilterRangeFields.tsx +19 -5
- package/src/inputs/MRT_FilterRangeSlider.tsx +10 -4
- package/src/inputs/MRT_FilterTextField.tsx +13 -5
- package/src/inputs/MRT_GlobalFilterTextField.tsx +27 -10
- package/src/inputs/MRT_SelectCheckbox.tsx +14 -7
- package/src/locales/az.ts +94 -0
- package/src/locales/no.ts +1 -1
- package/src/locales/zh-Hans.ts +17 -17
- package/src/menus/MRT_ColumnActionMenu.tsx +10 -4
- package/src/menus/MRT_FilterOptionMenu.tsx +6 -3
- package/src/menus/MRT_RowActionMenu.tsx +10 -4
- package/src/menus/MRT_ShowHideColumnsMenu.tsx +10 -4
- package/src/menus/MRT_ShowHideColumnsMenuItems.tsx +17 -10
- package/src/modals/MRT_EditRowModal.tsx +17 -11
- package/src/sortingFns.ts +3 -3
- package/src/style.utils.ts +149 -0
- package/src/table/MRT_Table.tsx +28 -34
- package/src/table/MRT_TableContainer.tsx +17 -46
- package/src/table/MRT_TableLoadingOverlay.tsx +54 -0
- package/src/table/MRT_TablePaper.tsx +13 -6
- package/src/table/index.ts +1 -0
- package/src/toolbar/MRT_BottomToolbar.tsx +16 -14
- package/src/toolbar/MRT_LinearProgressBar.tsx +16 -10
- package/src/toolbar/MRT_TablePagination.tsx +25 -12
- package/src/toolbar/MRT_ToolbarAlertBanner.tsx +11 -7
- package/src/toolbar/MRT_ToolbarDropZone.tsx +8 -4
- package/src/toolbar/MRT_ToolbarInternalButtons.tsx +10 -6
- package/src/toolbar/MRT_TopToolbar.tsx +11 -24
- package/src/types.ts +98 -56
- package/src/useMaterialReactTable.ts +8 -7
- package/dist/cjs/index.js.map +0 -1
- package/dist/cjs/types/MaterialReactTable.d.ts +0 -7
- package/dist/cjs/types/aggregationFns.d.ts +0 -11
- package/dist/cjs/types/body/MRT_TableBody.d.ts +0 -12
- package/dist/cjs/types/body/MRT_TableBodyCell.d.ts +0 -15
- package/dist/cjs/types/body/MRT_TableBodyCellValue.d.ts +0 -7
- package/dist/cjs/types/body/MRT_TableBodyRow.d.ts +0 -18
- package/dist/cjs/types/body/MRT_TableBodyRowGrabHandle.d.ts +0 -9
- package/dist/cjs/types/body/MRT_TableBodyRowPinButton.d.ts +0 -7
- package/dist/cjs/types/body/MRT_TableDetailPanel.d.ts +0 -12
- package/dist/cjs/types/body/index.d.ts +0 -7
- package/dist/cjs/types/buttons/MRT_ColumnPinningButtons.d.ts +0 -7
- package/dist/cjs/types/buttons/MRT_CopyButton.d.ts +0 -9
- package/dist/cjs/types/buttons/MRT_EditActionButtons.d.ts +0 -8
- package/dist/cjs/types/buttons/MRT_ExpandAllButton.d.ts +0 -6
- package/dist/cjs/types/buttons/MRT_ExpandButton.d.ts +0 -7
- package/dist/cjs/types/buttons/MRT_GrabHandleButton.d.ts +0 -12
- package/dist/cjs/types/buttons/MRT_RowPinButton.d.ts +0 -9
- package/dist/cjs/types/buttons/MRT_ShowHideColumnsButton.d.ts +0 -7
- package/dist/cjs/types/buttons/MRT_ToggleDensePaddingButton.d.ts +0 -7
- package/dist/cjs/types/buttons/MRT_ToggleFiltersButton.d.ts +0 -7
- package/dist/cjs/types/buttons/MRT_ToggleFullScreenButton.d.ts +0 -7
- package/dist/cjs/types/buttons/MRT_ToggleGlobalFilterButton.d.ts +0 -7
- package/dist/cjs/types/buttons/MRT_ToggleRowActionMenuButton.d.ts +0 -8
- package/dist/cjs/types/buttons/index.d.ts +0 -13
- package/dist/cjs/types/column.utils.d.ts +0 -148
- package/dist/cjs/types/filterFns.d.ts +0 -68
- package/dist/cjs/types/footer/MRT_TableFooter.d.ts +0 -10
- package/dist/cjs/types/footer/MRT_TableFooterCell.d.ts +0 -7
- package/dist/cjs/types/footer/MRT_TableFooterRow.d.ts +0 -11
- package/dist/cjs/types/footer/index.d.ts +0 -3
- package/dist/cjs/types/head/MRT_TableHead.d.ts +0 -10
- package/dist/cjs/types/head/MRT_TableHeadCell.d.ts +0 -7
- package/dist/cjs/types/head/MRT_TableHeadCellColumnActionsButton.d.ts +0 -7
- package/dist/cjs/types/head/MRT_TableHeadCellFilterContainer.d.ts +0 -7
- package/dist/cjs/types/head/MRT_TableHeadCellFilterLabel.d.ts +0 -7
- package/dist/cjs/types/head/MRT_TableHeadCellGrabHandle.d.ts +0 -9
- package/dist/cjs/types/head/MRT_TableHeadCellResizeHandle.d.ts +0 -7
- package/dist/cjs/types/head/MRT_TableHeadCellSortLabel.d.ts +0 -9
- package/dist/cjs/types/head/MRT_TableHeadRow.d.ts +0 -11
- package/dist/cjs/types/head/index.d.ts +0 -9
- package/dist/cjs/types/hooks/useMRT_DisplayColumns.d.ts +0 -9
- package/dist/cjs/types/hooks/useMRT_Effects.d.ts +0 -2
- package/dist/cjs/types/hooks/useMRT_TableInstance.d.ts +0 -2
- package/dist/cjs/types/hooks/useMRT_TableOptions.d.ts +0 -2
- package/dist/cjs/types/icons.d.ts +0 -36
- package/dist/cjs/types/index.d.ts +0 -16
- package/dist/cjs/types/inputs/MRT_EditCellTextField.d.ts +0 -7
- package/dist/cjs/types/inputs/MRT_FilterCheckbox.d.ts +0 -7
- package/dist/cjs/types/inputs/MRT_FilterRangeFields.d.ts +0 -7
- package/dist/cjs/types/inputs/MRT_FilterRangeSlider.d.ts +0 -7
- package/dist/cjs/types/inputs/MRT_FilterTextField.d.ts +0 -8
- package/dist/cjs/types/inputs/MRT_GlobalFilterTextField.d.ts +0 -6
- package/dist/cjs/types/inputs/MRT_SelectCheckbox.d.ts +0 -8
- package/dist/cjs/types/inputs/index.d.ts +0 -7
- package/dist/cjs/types/locales/ar.d.ts +0 -2
- package/dist/cjs/types/locales/bg.d.ts +0 -2
- package/dist/cjs/types/locales/cs.d.ts +0 -2
- package/dist/cjs/types/locales/da.d.ts +0 -2
- package/dist/cjs/types/locales/de.d.ts +0 -2
- package/dist/cjs/types/locales/en.d.ts +0 -2
- package/dist/cjs/types/locales/es.d.ts +0 -2
- package/dist/cjs/types/locales/et.d.ts +0 -2
- package/dist/cjs/types/locales/fa.d.ts +0 -2
- package/dist/cjs/types/locales/fi.d.ts +0 -2
- package/dist/cjs/types/locales/fr.d.ts +0 -2
- package/dist/cjs/types/locales/hu.d.ts +0 -2
- package/dist/cjs/types/locales/hy.d.ts +0 -2
- package/dist/cjs/types/locales/id.d.ts +0 -2
- package/dist/cjs/types/locales/it.d.ts +0 -2
- package/dist/cjs/types/locales/ja.d.ts +0 -2
- package/dist/cjs/types/locales/ko.d.ts +0 -2
- package/dist/cjs/types/locales/nl.d.ts +0 -2
- package/dist/cjs/types/locales/no.d.ts +0 -2
- package/dist/cjs/types/locales/np.d.ts +0 -2
- package/dist/cjs/types/locales/pl.d.ts +0 -2
- package/dist/cjs/types/locales/pt-BR.d.ts +0 -2
- package/dist/cjs/types/locales/pt.d.ts +0 -2
- package/dist/cjs/types/locales/ro.d.ts +0 -2
- package/dist/cjs/types/locales/ru.d.ts +0 -2
- package/dist/cjs/types/locales/sk.d.ts +0 -2
- package/dist/cjs/types/locales/sr-Cyrl-RS.d.ts +0 -2
- package/dist/cjs/types/locales/sr-Latn-RS.d.ts +0 -2
- package/dist/cjs/types/locales/sv.d.ts +0 -2
- package/dist/cjs/types/locales/tr.d.ts +0 -2
- package/dist/cjs/types/locales/uk.d.ts +0 -2
- package/dist/cjs/types/locales/vi.d.ts +0 -2
- package/dist/cjs/types/locales/zh-Hans.d.ts +0 -2
- package/dist/cjs/types/locales/zh-Hant.d.ts +0 -2
- package/dist/cjs/types/menus/MRT_ColumnActionMenu.d.ts +0 -19
- package/dist/cjs/types/menus/MRT_FilterOptionMenu.d.ts +0 -12
- package/dist/cjs/types/menus/MRT_RowActionMenu.d.ts +0 -11
- package/dist/cjs/types/menus/MRT_ShowHideColumnsMenu.d.ts +0 -9
- package/dist/cjs/types/menus/MRT_ShowHideColumnsMenuItems.d.ts +0 -11
- package/dist/cjs/types/menus/index.d.ts +0 -5
- package/dist/cjs/types/modals/MRT_EditRowModal.d.ts +0 -7
- package/dist/cjs/types/modals/index.d.ts +0 -1
- package/dist/cjs/types/sortingFns.d.ts +0 -12
- package/dist/cjs/types/table/MRT_Table.d.ts +0 -6
- package/dist/cjs/types/table/MRT_TableContainer.d.ts +0 -6
- package/dist/cjs/types/table/MRT_TablePaper.d.ts +0 -6
- package/dist/cjs/types/table/index.d.ts +0 -4
- package/dist/cjs/types/toolbar/MRT_BottomToolbar.d.ts +0 -6
- package/dist/cjs/types/toolbar/MRT_LinearProgressBar.d.ts +0 -7
- package/dist/cjs/types/toolbar/MRT_TablePagination.d.ts +0 -7
- package/dist/cjs/types/toolbar/MRT_ToolbarAlertBanner.d.ts +0 -7
- package/dist/cjs/types/toolbar/MRT_ToolbarDropZone.d.ts +0 -6
- package/dist/cjs/types/toolbar/MRT_ToolbarInternalButtons.d.ts +0 -6
- package/dist/cjs/types/toolbar/MRT_TopToolbar.d.ts +0 -21
- package/dist/cjs/types/toolbar/index.d.ts +0 -7
- package/dist/cjs/types/types.d.ts +0 -818
- package/dist/cjs/types/useMaterialReactTable.d.ts +0 -2
- package/dist/esm/material-react-table.esm.js.map +0 -1
- package/dist/esm/types/MaterialReactTable.d.ts +0 -7
- package/dist/esm/types/aggregationFns.d.ts +0 -11
- package/dist/esm/types/body/MRT_TableBody.d.ts +0 -12
- package/dist/esm/types/body/MRT_TableBodyCell.d.ts +0 -15
- package/dist/esm/types/body/MRT_TableBodyCellValue.d.ts +0 -7
- package/dist/esm/types/body/MRT_TableBodyRow.d.ts +0 -18
- package/dist/esm/types/body/MRT_TableBodyRowGrabHandle.d.ts +0 -9
- package/dist/esm/types/body/MRT_TableBodyRowPinButton.d.ts +0 -7
- package/dist/esm/types/body/MRT_TableDetailPanel.d.ts +0 -12
- package/dist/esm/types/body/index.d.ts +0 -7
- package/dist/esm/types/buttons/MRT_ColumnPinningButtons.d.ts +0 -7
- package/dist/esm/types/buttons/MRT_CopyButton.d.ts +0 -9
- package/dist/esm/types/buttons/MRT_EditActionButtons.d.ts +0 -8
- package/dist/esm/types/buttons/MRT_ExpandAllButton.d.ts +0 -6
- package/dist/esm/types/buttons/MRT_ExpandButton.d.ts +0 -7
- package/dist/esm/types/buttons/MRT_GrabHandleButton.d.ts +0 -12
- package/dist/esm/types/buttons/MRT_RowPinButton.d.ts +0 -9
- package/dist/esm/types/buttons/MRT_ShowHideColumnsButton.d.ts +0 -7
- package/dist/esm/types/buttons/MRT_ToggleDensePaddingButton.d.ts +0 -7
- package/dist/esm/types/buttons/MRT_ToggleFiltersButton.d.ts +0 -7
- package/dist/esm/types/buttons/MRT_ToggleFullScreenButton.d.ts +0 -7
- package/dist/esm/types/buttons/MRT_ToggleGlobalFilterButton.d.ts +0 -7
- package/dist/esm/types/buttons/MRT_ToggleRowActionMenuButton.d.ts +0 -8
- package/dist/esm/types/buttons/index.d.ts +0 -13
- package/dist/esm/types/column.utils.d.ts +0 -148
- package/dist/esm/types/filterFns.d.ts +0 -68
- package/dist/esm/types/footer/MRT_TableFooter.d.ts +0 -10
- package/dist/esm/types/footer/MRT_TableFooterCell.d.ts +0 -7
- package/dist/esm/types/footer/MRT_TableFooterRow.d.ts +0 -11
- package/dist/esm/types/footer/index.d.ts +0 -3
- package/dist/esm/types/head/MRT_TableHead.d.ts +0 -10
- package/dist/esm/types/head/MRT_TableHeadCell.d.ts +0 -7
- package/dist/esm/types/head/MRT_TableHeadCellColumnActionsButton.d.ts +0 -7
- package/dist/esm/types/head/MRT_TableHeadCellFilterContainer.d.ts +0 -7
- package/dist/esm/types/head/MRT_TableHeadCellFilterLabel.d.ts +0 -7
- package/dist/esm/types/head/MRT_TableHeadCellGrabHandle.d.ts +0 -9
- package/dist/esm/types/head/MRT_TableHeadCellResizeHandle.d.ts +0 -7
- package/dist/esm/types/head/MRT_TableHeadCellSortLabel.d.ts +0 -9
- package/dist/esm/types/head/MRT_TableHeadRow.d.ts +0 -11
- package/dist/esm/types/head/index.d.ts +0 -9
- package/dist/esm/types/hooks/useMRT_DisplayColumns.d.ts +0 -9
- package/dist/esm/types/hooks/useMRT_Effects.d.ts +0 -2
- package/dist/esm/types/hooks/useMRT_TableInstance.d.ts +0 -2
- package/dist/esm/types/hooks/useMRT_TableOptions.d.ts +0 -2
- package/dist/esm/types/icons.d.ts +0 -36
- package/dist/esm/types/index.d.ts +0 -16
- package/dist/esm/types/inputs/MRT_EditCellTextField.d.ts +0 -7
- package/dist/esm/types/inputs/MRT_FilterCheckbox.d.ts +0 -7
- package/dist/esm/types/inputs/MRT_FilterRangeFields.d.ts +0 -7
- package/dist/esm/types/inputs/MRT_FilterRangeSlider.d.ts +0 -7
- package/dist/esm/types/inputs/MRT_FilterTextField.d.ts +0 -8
- package/dist/esm/types/inputs/MRT_GlobalFilterTextField.d.ts +0 -6
- package/dist/esm/types/inputs/MRT_SelectCheckbox.d.ts +0 -8
- package/dist/esm/types/inputs/index.d.ts +0 -7
- package/dist/esm/types/locales/ar.d.ts +0 -2
- package/dist/esm/types/locales/bg.d.ts +0 -2
- package/dist/esm/types/locales/cs.d.ts +0 -2
- package/dist/esm/types/locales/da.d.ts +0 -2
- package/dist/esm/types/locales/de.d.ts +0 -2
- package/dist/esm/types/locales/en.d.ts +0 -2
- package/dist/esm/types/locales/es.d.ts +0 -2
- package/dist/esm/types/locales/et.d.ts +0 -2
- package/dist/esm/types/locales/fa.d.ts +0 -2
- package/dist/esm/types/locales/fi.d.ts +0 -2
- package/dist/esm/types/locales/fr.d.ts +0 -2
- package/dist/esm/types/locales/hu.d.ts +0 -2
- package/dist/esm/types/locales/hy.d.ts +0 -2
- package/dist/esm/types/locales/id.d.ts +0 -2
- package/dist/esm/types/locales/it.d.ts +0 -2
- package/dist/esm/types/locales/ja.d.ts +0 -2
- package/dist/esm/types/locales/ko.d.ts +0 -2
- package/dist/esm/types/locales/nl.d.ts +0 -2
- package/dist/esm/types/locales/no.d.ts +0 -2
- package/dist/esm/types/locales/np.d.ts +0 -2
- package/dist/esm/types/locales/pl.d.ts +0 -2
- package/dist/esm/types/locales/pt-BR.d.ts +0 -2
- package/dist/esm/types/locales/pt.d.ts +0 -2
- package/dist/esm/types/locales/ro.d.ts +0 -2
- package/dist/esm/types/locales/ru.d.ts +0 -2
- package/dist/esm/types/locales/sk.d.ts +0 -2
- package/dist/esm/types/locales/sr-Cyrl-RS.d.ts +0 -2
- package/dist/esm/types/locales/sr-Latn-RS.d.ts +0 -2
- package/dist/esm/types/locales/sv.d.ts +0 -2
- package/dist/esm/types/locales/tr.d.ts +0 -2
- package/dist/esm/types/locales/uk.d.ts +0 -2
- package/dist/esm/types/locales/vi.d.ts +0 -2
- package/dist/esm/types/locales/zh-Hans.d.ts +0 -2
- package/dist/esm/types/locales/zh-Hant.d.ts +0 -2
- package/dist/esm/types/menus/MRT_ColumnActionMenu.d.ts +0 -19
- package/dist/esm/types/menus/MRT_FilterOptionMenu.d.ts +0 -12
- package/dist/esm/types/menus/MRT_RowActionMenu.d.ts +0 -11
- package/dist/esm/types/menus/MRT_ShowHideColumnsMenu.d.ts +0 -9
- package/dist/esm/types/menus/MRT_ShowHideColumnsMenuItems.d.ts +0 -11
- package/dist/esm/types/menus/index.d.ts +0 -5
- package/dist/esm/types/modals/MRT_EditRowModal.d.ts +0 -7
- package/dist/esm/types/modals/index.d.ts +0 -1
- package/dist/esm/types/sortingFns.d.ts +0 -12
- package/dist/esm/types/table/MRT_Table.d.ts +0 -6
- package/dist/esm/types/table/MRT_TableContainer.d.ts +0 -6
- package/dist/esm/types/table/MRT_TablePaper.d.ts +0 -6
- package/dist/esm/types/table/index.d.ts +0 -4
- package/dist/esm/types/toolbar/MRT_BottomToolbar.d.ts +0 -6
- package/dist/esm/types/toolbar/MRT_LinearProgressBar.d.ts +0 -7
- package/dist/esm/types/toolbar/MRT_TablePagination.d.ts +0 -7
- package/dist/esm/types/toolbar/MRT_ToolbarAlertBanner.d.ts +0 -7
- package/dist/esm/types/toolbar/MRT_ToolbarDropZone.d.ts +0 -6
- package/dist/esm/types/toolbar/MRT_ToolbarInternalButtons.d.ts +0 -6
- package/dist/esm/types/toolbar/MRT_TopToolbar.d.ts +0 -21
- package/dist/esm/types/toolbar/index.d.ts +0 -7
- package/dist/esm/types/types.d.ts +0 -818
- package/dist/esm/types/useMaterialReactTable.d.ts +0 -2
- package/locales/ar.esm.d.ts +0 -2
- package/locales/ar.esm.js.map +0 -1
- package/locales/ar.js.map +0 -1
- package/locales/bg.esm.d.ts +0 -2
- package/locales/bg.esm.js.map +0 -1
- package/locales/bg.js.map +0 -1
- package/locales/cs.esm.d.ts +0 -2
- package/locales/cs.esm.js.map +0 -1
- package/locales/cs.js.map +0 -1
- package/locales/da.esm.d.ts +0 -2
- package/locales/da.esm.js.map +0 -1
- package/locales/da.js.map +0 -1
- package/locales/de.esm.d.ts +0 -2
- package/locales/de.esm.js.map +0 -1
- package/locales/de.js.map +0 -1
- package/locales/en.esm.d.ts +0 -2
- package/locales/en.esm.js.map +0 -1
- package/locales/en.js.map +0 -1
- package/locales/es.esm.d.ts +0 -2
- package/locales/es.esm.js.map +0 -1
- package/locales/es.js.map +0 -1
- package/locales/et.esm.d.ts +0 -2
- package/locales/et.esm.js.map +0 -1
- package/locales/et.js.map +0 -1
- package/locales/fa.esm.d.ts +0 -2
- package/locales/fa.esm.js.map +0 -1
- package/locales/fa.js.map +0 -1
- package/locales/fi.esm.d.ts +0 -2
- package/locales/fi.esm.js.map +0 -1
- package/locales/fi.js.map +0 -1
- package/locales/fr.esm.d.ts +0 -2
- package/locales/fr.esm.js.map +0 -1
- package/locales/fr.js.map +0 -1
- package/locales/hu.esm.d.ts +0 -2
- package/locales/hu.esm.js.map +0 -1
- package/locales/hu.js.map +0 -1
- package/locales/hy.esm.d.ts +0 -2
- package/locales/hy.esm.js.map +0 -1
- package/locales/hy.js.map +0 -1
- package/locales/id.esm.d.ts +0 -2
- package/locales/id.esm.js.map +0 -1
- package/locales/id.js.map +0 -1
- package/locales/it.esm.d.ts +0 -2
- package/locales/it.esm.js.map +0 -1
- package/locales/it.js.map +0 -1
- package/locales/ja.esm.d.ts +0 -2
- package/locales/ja.esm.js.map +0 -1
- package/locales/ja.js.map +0 -1
- package/locales/ko.esm.d.ts +0 -2
- package/locales/ko.esm.js.map +0 -1
- package/locales/ko.js.map +0 -1
- package/locales/nl.esm.d.ts +0 -2
- package/locales/nl.esm.js.map +0 -1
- package/locales/nl.js.map +0 -1
- package/locales/no.esm.d.ts +0 -2
- package/locales/no.esm.js.map +0 -1
- package/locales/no.js.map +0 -1
- package/locales/np.esm.d.ts +0 -2
- package/locales/np.esm.js.map +0 -1
- package/locales/np.js.map +0 -1
- package/locales/pl.esm.d.ts +0 -2
- package/locales/pl.esm.js.map +0 -1
- package/locales/pl.js.map +0 -1
- package/locales/pt-BR.esm.d.ts +0 -2
- package/locales/pt-BR.esm.js.map +0 -1
- package/locales/pt-BR.js.map +0 -1
- package/locales/pt.esm.d.ts +0 -2
- package/locales/pt.esm.js.map +0 -1
- package/locales/pt.js.map +0 -1
- package/locales/ro.esm.d.ts +0 -2
- package/locales/ro.esm.js.map +0 -1
- package/locales/ro.js.map +0 -1
- package/locales/ru.esm.d.ts +0 -2
- package/locales/ru.esm.js.map +0 -1
- package/locales/ru.js.map +0 -1
- package/locales/sk.esm.d.ts +0 -2
- package/locales/sk.esm.js.map +0 -1
- package/locales/sk.js.map +0 -1
- package/locales/sr-Cyrl-RS.esm.d.ts +0 -2
- package/locales/sr-Cyrl-RS.esm.js.map +0 -1
- package/locales/sr-Cyrl-RS.js.map +0 -1
- package/locales/sr-Latn-RS.esm.d.ts +0 -2
- package/locales/sr-Latn-RS.esm.js.map +0 -1
- package/locales/sr-Latn-RS.js.map +0 -1
- package/locales/sv.esm.d.ts +0 -2
- package/locales/sv.esm.js.map +0 -1
- package/locales/sv.js.map +0 -1
- package/locales/tr.esm.d.ts +0 -2
- package/locales/tr.esm.js.map +0 -1
- package/locales/tr.js.map +0 -1
- package/locales/uk.esm.d.ts +0 -2
- package/locales/uk.esm.js.map +0 -1
- package/locales/uk.js.map +0 -1
- package/locales/vi.esm.d.ts +0 -2
- package/locales/vi.esm.js.map +0 -1
- package/locales/vi.js.map +0 -1
- package/locales/zh-Hans.esm.d.ts +0 -2
- package/locales/zh-Hans.esm.js.map +0 -1
- package/locales/zh-Hans.js.map +0 -1
- package/locales/zh-Hant.esm.d.ts +0 -2
- package/locales/zh-Hant.esm.js.map +0 -1
- package/locales/zh-Hant.js.map +0 -1
@@ -1,19 +1,22 @@
|
|
1
|
-
import { type MouseEvent,
|
2
|
-
import Button from '@mui/material/Button';
|
1
|
+
import { type MouseEvent, useState } from 'react';
|
2
|
+
import Button, { type ButtonProps } from '@mui/material/Button';
|
3
3
|
import Tooltip from '@mui/material/Tooltip';
|
4
4
|
import { parseFromValuesOrFunc } from '../column.utils';
|
5
|
-
import {
|
5
|
+
import {
|
6
|
+
type MRT_Cell,
|
7
|
+
type MRT_RowData,
|
8
|
+
type MRT_TableInstance,
|
9
|
+
} from '../types';
|
6
10
|
|
7
|
-
interface Props<TData extends
|
11
|
+
interface Props<TData extends MRT_RowData> extends ButtonProps {
|
8
12
|
cell: MRT_Cell<TData>;
|
9
|
-
children: ReactNode;
|
10
13
|
table: MRT_TableInstance<TData>;
|
11
14
|
}
|
12
15
|
|
13
|
-
export const MRT_CopyButton = <TData extends
|
16
|
+
export const MRT_CopyButton = <TData extends MRT_RowData>({
|
14
17
|
cell,
|
15
|
-
children,
|
16
18
|
table,
|
19
|
+
...rest
|
17
20
|
}: Props<TData>) => {
|
18
21
|
const {
|
19
22
|
options: { localization, muiCopyButtonProps },
|
@@ -43,11 +46,11 @@ export const MRT_CopyButton = <TData extends Record<string, any>>({
|
|
43
46
|
row,
|
44
47
|
table,
|
45
48
|
}),
|
49
|
+
...rest,
|
46
50
|
};
|
47
51
|
|
48
52
|
return (
|
49
53
|
<Tooltip
|
50
|
-
arrow
|
51
54
|
enterDelay={1000}
|
52
55
|
enterNextDelay={1000}
|
53
56
|
placement="top"
|
@@ -77,9 +80,7 @@ export const MRT_CopyButton = <TData extends Record<string, any>>({
|
|
77
80
|
...(parseFromValuesOrFunc(buttonProps?.sx, theme) as any),
|
78
81
|
})}
|
79
82
|
title={undefined}
|
80
|
-
|
81
|
-
{children}
|
82
|
-
</Button>
|
83
|
+
/>
|
83
84
|
</Tooltip>
|
84
85
|
);
|
85
86
|
};
|
@@ -1,20 +1,26 @@
|
|
1
|
-
import Box from '@mui/material/Box';
|
1
|
+
import Box, { type BoxProps } from '@mui/material/Box';
|
2
2
|
import Button from '@mui/material/Button';
|
3
3
|
import CircularProgress from '@mui/material/CircularProgress';
|
4
4
|
import IconButton from '@mui/material/IconButton';
|
5
5
|
import Tooltip from '@mui/material/Tooltip';
|
6
|
-
import {
|
6
|
+
import { parseFromValuesOrFunc } from '../column.utils';
|
7
|
+
import {
|
8
|
+
type MRT_Row,
|
9
|
+
type MRT_RowData,
|
10
|
+
type MRT_TableInstance,
|
11
|
+
} from '../types';
|
7
12
|
|
8
|
-
interface Props<TData extends
|
13
|
+
interface Props<TData extends MRT_RowData> extends BoxProps {
|
9
14
|
row: MRT_Row<TData>;
|
10
15
|
table: MRT_TableInstance<TData>;
|
11
16
|
variant?: 'icon' | 'text';
|
12
17
|
}
|
13
18
|
|
14
|
-
export const MRT_EditActionButtons = <TData extends
|
19
|
+
export const MRT_EditActionButtons = <TData extends MRT_RowData>({
|
15
20
|
row,
|
16
21
|
table,
|
17
22
|
variant = 'icon',
|
23
|
+
...rest
|
18
24
|
}: Props<TData>) => {
|
19
25
|
const {
|
20
26
|
getState,
|
@@ -79,16 +85,20 @@ export const MRT_EditActionButtons = <TData extends Record<string, any>>({
|
|
79
85
|
return (
|
80
86
|
<Box
|
81
87
|
onClick={(e) => e.stopPropagation()}
|
82
|
-
sx={
|
88
|
+
sx={(theme) => ({
|
89
|
+
display: 'flex',
|
90
|
+
gap: '0.75rem',
|
91
|
+
...(parseFromValuesOrFunc(rest?.sx, theme) as any),
|
92
|
+
})}
|
83
93
|
>
|
84
94
|
{variant === 'icon' ? (
|
85
95
|
<>
|
86
|
-
<Tooltip
|
96
|
+
<Tooltip title={localization.cancel}>
|
87
97
|
<IconButton aria-label={localization.cancel} onClick={handleCancel}>
|
88
98
|
<CancelIcon />
|
89
99
|
</IconButton>
|
90
100
|
</Tooltip>
|
91
|
-
<Tooltip
|
101
|
+
<Tooltip title={localization.save}>
|
92
102
|
<IconButton
|
93
103
|
aria-label={localization.save}
|
94
104
|
color="info"
|
@@ -1,14 +1,15 @@
|
|
1
|
-
import IconButton from '@mui/material/IconButton';
|
1
|
+
import IconButton, { type IconButtonProps } from '@mui/material/IconButton';
|
2
2
|
import Tooltip from '@mui/material/Tooltip';
|
3
3
|
import { parseFromValuesOrFunc } from '../column.utils';
|
4
|
-
import { type MRT_TableInstance } from '../types';
|
4
|
+
import { type MRT_RowData, type MRT_TableInstance } from '../types';
|
5
5
|
|
6
|
-
interface Props<TData extends
|
6
|
+
interface Props<TData extends MRT_RowData> extends IconButtonProps {
|
7
7
|
table: MRT_TableInstance<TData>;
|
8
8
|
}
|
9
9
|
|
10
|
-
export const MRT_ExpandAllButton = <TData extends
|
10
|
+
export const MRT_ExpandAllButton = <TData extends MRT_RowData>({
|
11
11
|
table,
|
12
|
+
...rest
|
12
13
|
}: Props<TData>) => {
|
13
14
|
const {
|
14
15
|
getCanSomeRowsExpand,
|
@@ -25,21 +26,22 @@ export const MRT_ExpandAllButton = <TData extends Record<string, any>>({
|
|
25
26
|
} = table;
|
26
27
|
const { density, isLoading } = getState();
|
27
28
|
|
28
|
-
const iconButtonProps =
|
29
|
-
|
30
|
-
|
29
|
+
const iconButtonProps = {
|
30
|
+
...parseFromValuesOrFunc(muiExpandAllButtonProps, {
|
31
|
+
table,
|
32
|
+
}),
|
33
|
+
...rest,
|
34
|
+
};
|
31
35
|
|
32
36
|
const isAllRowsExpanded = getIsAllRowsExpanded();
|
33
37
|
|
34
38
|
return (
|
35
39
|
<Tooltip
|
36
|
-
arrow
|
37
40
|
enterDelay={1000}
|
38
41
|
enterNextDelay={1000}
|
39
42
|
title={
|
40
|
-
iconButtonProps?.title ??
|
41
|
-
|
42
|
-
: localization.expandAll
|
43
|
+
iconButtonProps?.title ??
|
44
|
+
(isAllRowsExpanded ? localization.collapseAll : localization.expandAll)
|
43
45
|
}
|
44
46
|
>
|
45
47
|
<span>
|
@@ -1,15 +1,19 @@
|
|
1
1
|
import { type MouseEvent } from 'react';
|
2
|
-
import IconButton from '@mui/material/IconButton';
|
2
|
+
import IconButton, { type IconButtonProps } from '@mui/material/IconButton';
|
3
3
|
import Tooltip from '@mui/material/Tooltip';
|
4
4
|
import { parseFromValuesOrFunc } from '../column.utils';
|
5
|
-
import {
|
5
|
+
import {
|
6
|
+
type MRT_Row,
|
7
|
+
type MRT_RowData,
|
8
|
+
type MRT_TableInstance,
|
9
|
+
} from '../types';
|
6
10
|
|
7
|
-
interface Props<TData extends
|
11
|
+
interface Props<TData extends MRT_RowData> extends IconButtonProps {
|
8
12
|
row: MRT_Row<TData>;
|
9
13
|
table: MRT_TableInstance<TData>;
|
10
14
|
}
|
11
15
|
|
12
|
-
export const MRT_ExpandButton = <TData extends
|
16
|
+
export const MRT_ExpandButton = <TData extends MRT_RowData>({
|
13
17
|
row,
|
14
18
|
table,
|
15
19
|
}: Props<TData>) => {
|
@@ -40,14 +44,12 @@ export const MRT_ExpandButton = <TData extends Record<string, any>>({
|
|
40
44
|
|
41
45
|
return (
|
42
46
|
<Tooltip
|
43
|
-
arrow
|
44
47
|
disableHoverListener={!canExpand && !renderDetailPanel}
|
45
48
|
enterDelay={1000}
|
46
49
|
enterNextDelay={1000}
|
47
50
|
title={
|
48
|
-
iconButtonProps?.title ??
|
49
|
-
|
50
|
-
: localization.expand
|
51
|
+
iconButtonProps?.title ??
|
52
|
+
(isExpanded ? localization.collapse : localization.expand)
|
51
53
|
}
|
52
54
|
>
|
53
55
|
<span>
|
@@ -2,9 +2,9 @@ import { type DragEventHandler } from 'react';
|
|
2
2
|
import IconButton, { type IconButtonProps } from '@mui/material/IconButton';
|
3
3
|
import Tooltip from '@mui/material/Tooltip';
|
4
4
|
import { parseFromValuesOrFunc } from '../column.utils';
|
5
|
-
import { type MRT_TableInstance } from '../types';
|
5
|
+
import { type MRT_RowData, type MRT_TableInstance } from '../types';
|
6
6
|
|
7
|
-
interface Props<TData extends
|
7
|
+
interface Props<TData extends MRT_RowData> extends IconButtonProps {
|
8
8
|
iconButtonProps?: IconButtonProps;
|
9
9
|
location?: 'column' | 'row';
|
10
10
|
onDragEnd: DragEventHandler<HTMLButtonElement>;
|
@@ -12,12 +12,13 @@ interface Props<TData extends Record<string, any>> {
|
|
12
12
|
table: MRT_TableInstance<TData>;
|
13
13
|
}
|
14
14
|
|
15
|
-
export const MRT_GrabHandleButton = <TData extends
|
15
|
+
export const MRT_GrabHandleButton = <TData extends MRT_RowData>({
|
16
16
|
iconButtonProps,
|
17
17
|
location,
|
18
18
|
onDragEnd,
|
19
19
|
onDragStart,
|
20
20
|
table,
|
21
|
+
...rest
|
21
22
|
}: Props<TData>) => {
|
22
23
|
const {
|
23
24
|
options: {
|
@@ -26,22 +27,23 @@ export const MRT_GrabHandleButton = <TData extends Record<string, any>>({
|
|
26
27
|
},
|
27
28
|
} = table;
|
28
29
|
|
30
|
+
const _iconButtonProps = { ...iconButtonProps, ...rest };
|
31
|
+
|
29
32
|
return (
|
30
33
|
<Tooltip
|
31
|
-
arrow
|
32
34
|
enterDelay={1000}
|
33
35
|
enterNextDelay={1000}
|
34
36
|
placement="top"
|
35
|
-
title={
|
37
|
+
title={_iconButtonProps?.title ?? localization.move}
|
36
38
|
>
|
37
39
|
<IconButton
|
38
40
|
disableRipple
|
39
41
|
draggable="true"
|
40
42
|
size="small"
|
41
|
-
{...
|
43
|
+
{..._iconButtonProps}
|
42
44
|
onClick={(e) => {
|
43
45
|
e.stopPropagation();
|
44
|
-
|
46
|
+
_iconButtonProps?.onClick?.(e);
|
45
47
|
}}
|
46
48
|
onDragEnd={onDragEnd}
|
47
49
|
onDragStart={onDragStart}
|
@@ -58,7 +60,7 @@ export const MRT_GrabHandleButton = <TData extends Record<string, any>>({
|
|
58
60
|
opacity: location === 'row' ? 1 : 0.3,
|
59
61
|
p: '2px',
|
60
62
|
transition: 'all 150ms ease-in-out',
|
61
|
-
...(parseFromValuesOrFunc(
|
63
|
+
...(parseFromValuesOrFunc(_iconButtonProps?.sx, theme) as any),
|
62
64
|
})}
|
63
65
|
title={undefined}
|
64
66
|
>
|
@@ -1,19 +1,25 @@
|
|
1
1
|
import { type MouseEvent, useState } from 'react';
|
2
2
|
import { type RowPinningPosition } from '@tanstack/react-table';
|
3
|
-
import IconButton from '@mui/material/IconButton';
|
3
|
+
import IconButton, { type IconButtonProps } from '@mui/material/IconButton';
|
4
4
|
import Tooltip from '@mui/material/Tooltip';
|
5
|
-
import {
|
5
|
+
import { parseFromValuesOrFunc } from '../column.utils';
|
6
|
+
import {
|
7
|
+
type MRT_Row,
|
8
|
+
type MRT_RowData,
|
9
|
+
type MRT_TableInstance,
|
10
|
+
} from '../types';
|
6
11
|
|
7
|
-
interface Props<TData extends
|
12
|
+
interface Props<TData extends MRT_RowData> extends IconButtonProps {
|
8
13
|
pinningPosition: RowPinningPosition;
|
9
14
|
row: MRT_Row<TData>;
|
10
15
|
table: MRT_TableInstance<TData>;
|
11
16
|
}
|
12
17
|
|
13
|
-
export const MRT_RowPinButton = <TData extends
|
18
|
+
export const MRT_RowPinButton = <TData extends MRT_RowData>({
|
14
19
|
pinningPosition,
|
15
20
|
row,
|
16
21
|
table,
|
22
|
+
...rest
|
17
23
|
}: Props<TData>) => {
|
18
24
|
const {
|
19
25
|
options: {
|
@@ -35,7 +41,6 @@ export const MRT_RowPinButton = <TData extends Record<string, any>>({
|
|
35
41
|
|
36
42
|
return (
|
37
43
|
<Tooltip
|
38
|
-
arrow
|
39
44
|
enterDelay={1000}
|
40
45
|
enterNextDelay={1000}
|
41
46
|
open={tooltipOpened}
|
@@ -47,10 +52,12 @@ export const MRT_RowPinButton = <TData extends Record<string, any>>({
|
|
47
52
|
onMouseEnter={() => setTooltipOpened(true)}
|
48
53
|
onMouseLeave={() => setTooltipOpened(false)}
|
49
54
|
size="small"
|
50
|
-
|
55
|
+
{...rest}
|
56
|
+
sx={(theme) => ({
|
51
57
|
height: '24px',
|
52
58
|
width: '24px',
|
53
|
-
|
59
|
+
...(parseFromValuesOrFunc(rest?.sx, theme) as any),
|
60
|
+
})}
|
54
61
|
>
|
55
62
|
{isPinned ? (
|
56
63
|
<CloseIcon />
|
@@ -2,13 +2,13 @@ import { type MouseEvent, useState } from 'react';
|
|
2
2
|
import IconButton, { type IconButtonProps } from '@mui/material/IconButton';
|
3
3
|
import Tooltip from '@mui/material/Tooltip';
|
4
4
|
import { MRT_ShowHideColumnsMenu } from '../menus/MRT_ShowHideColumnsMenu';
|
5
|
-
import { type MRT_TableInstance } from '../types';
|
5
|
+
import { type MRT_RowData, type MRT_TableInstance } from '../types';
|
6
6
|
|
7
|
-
interface Props<TData extends
|
7
|
+
interface Props<TData extends MRT_RowData> extends IconButtonProps {
|
8
8
|
table: MRT_TableInstance<TData>;
|
9
9
|
}
|
10
10
|
|
11
|
-
export const MRT_ShowHideColumnsButton = <TData extends
|
11
|
+
export const MRT_ShowHideColumnsButton = <TData extends MRT_RowData>({
|
12
12
|
table,
|
13
13
|
...rest
|
14
14
|
}: Props<TData>) => {
|
@@ -27,7 +27,7 @@ export const MRT_ShowHideColumnsButton = <TData extends Record<string, any>>({
|
|
27
27
|
|
28
28
|
return (
|
29
29
|
<>
|
30
|
-
<Tooltip
|
30
|
+
<Tooltip title={rest?.title ?? localization.showHideColumns}>
|
31
31
|
<IconButton
|
32
32
|
aria-label={localization.showHideColumns}
|
33
33
|
onClick={handleClick}
|
@@ -1,14 +1,12 @@
|
|
1
1
|
import IconButton, { type IconButtonProps } from '@mui/material/IconButton';
|
2
2
|
import Tooltip from '@mui/material/Tooltip';
|
3
|
-
import { type MRT_TableInstance } from '../types';
|
3
|
+
import { type MRT_RowData, type MRT_TableInstance } from '../types';
|
4
4
|
|
5
|
-
interface Props<TData extends
|
5
|
+
interface Props<TData extends MRT_RowData> extends IconButtonProps {
|
6
6
|
table: MRT_TableInstance<TData>;
|
7
7
|
}
|
8
8
|
|
9
|
-
export const MRT_ToggleDensePaddingButton = <
|
10
|
-
TData extends Record<string, any>,
|
11
|
-
>({
|
9
|
+
export const MRT_ToggleDensePaddingButton = <TData extends MRT_RowData>({
|
12
10
|
table,
|
13
11
|
...rest
|
14
12
|
}: Props<TData>) => {
|
@@ -33,7 +31,7 @@ export const MRT_ToggleDensePaddingButton = <
|
|
33
31
|
};
|
34
32
|
|
35
33
|
return (
|
36
|
-
<Tooltip
|
34
|
+
<Tooltip title={rest?.title ?? localization.toggleDensity}>
|
37
35
|
<IconButton
|
38
36
|
aria-label={localization.toggleDensity}
|
39
37
|
onClick={handleToggleDensePadding}
|
@@ -1,12 +1,12 @@
|
|
1
1
|
import IconButton, { type IconButtonProps } from '@mui/material/IconButton';
|
2
2
|
import Tooltip from '@mui/material/Tooltip';
|
3
|
-
import { type MRT_TableInstance } from '../types';
|
3
|
+
import { type MRT_RowData, type MRT_TableInstance } from '../types';
|
4
4
|
|
5
|
-
interface Props<TData extends
|
5
|
+
interface Props<TData extends MRT_RowData> extends IconButtonProps {
|
6
6
|
table: MRT_TableInstance<TData>;
|
7
7
|
}
|
8
8
|
|
9
|
-
export const MRT_ToggleFiltersButton = <TData extends
|
9
|
+
export const MRT_ToggleFiltersButton = <TData extends MRT_RowData>({
|
10
10
|
table,
|
11
11
|
...rest
|
12
12
|
}: Props<TData>) => {
|
@@ -25,7 +25,7 @@ export const MRT_ToggleFiltersButton = <TData extends Record<string, any>>({
|
|
25
25
|
};
|
26
26
|
|
27
27
|
return (
|
28
|
-
<Tooltip
|
28
|
+
<Tooltip title={rest?.title ?? localization.showHideFilters}>
|
29
29
|
<IconButton
|
30
30
|
aria-label={localization.showHideFilters}
|
31
31
|
onClick={handleToggleShowFilters}
|
@@ -1,13 +1,13 @@
|
|
1
1
|
import { useState } from 'react';
|
2
2
|
import IconButton, { type IconButtonProps } from '@mui/material/IconButton';
|
3
3
|
import Tooltip from '@mui/material/Tooltip';
|
4
|
-
import { type MRT_TableInstance } from '../types';
|
4
|
+
import { type MRT_RowData, type MRT_TableInstance } from '../types';
|
5
5
|
|
6
|
-
interface Props<TData extends
|
6
|
+
interface Props<TData extends MRT_RowData> extends IconButtonProps {
|
7
7
|
table: MRT_TableInstance<TData>;
|
8
8
|
}
|
9
9
|
|
10
|
-
export const MRT_ToggleFullScreenButton = <TData extends
|
10
|
+
export const MRT_ToggleFullScreenButton = <TData extends MRT_RowData>({
|
11
11
|
table,
|
12
12
|
...rest
|
13
13
|
}: Props<TData>) => {
|
@@ -30,7 +30,6 @@ export const MRT_ToggleFullScreenButton = <TData extends Record<string, any>>({
|
|
30
30
|
|
31
31
|
return (
|
32
32
|
<Tooltip
|
33
|
-
arrow
|
34
33
|
open={tooltipOpened}
|
35
34
|
title={rest?.title ?? localization.toggleFullScreen}
|
36
35
|
>
|
@@ -1,14 +1,12 @@
|
|
1
1
|
import IconButton, { type IconButtonProps } from '@mui/material/IconButton';
|
2
2
|
import Tooltip from '@mui/material/Tooltip';
|
3
|
-
import { type MRT_TableInstance } from '../types';
|
3
|
+
import { type MRT_RowData, type MRT_TableInstance } from '../types';
|
4
4
|
|
5
|
-
interface Props<TData extends
|
5
|
+
interface Props<TData extends MRT_RowData> extends IconButtonProps {
|
6
6
|
table: MRT_TableInstance<TData>;
|
7
7
|
}
|
8
8
|
|
9
|
-
export const MRT_ToggleGlobalFilterButton = <
|
10
|
-
TData extends Record<string, any>,
|
11
|
-
>({
|
9
|
+
export const MRT_ToggleGlobalFilterButton = <TData extends MRT_RowData>({
|
12
10
|
table,
|
13
11
|
...rest
|
14
12
|
}: Props<TData>) => {
|
@@ -30,7 +28,7 @@ export const MRT_ToggleGlobalFilterButton = <
|
|
30
28
|
};
|
31
29
|
|
32
30
|
return (
|
33
|
-
<Tooltip
|
31
|
+
<Tooltip title={rest?.title ?? localization.showHideSearch}>
|
34
32
|
<IconButton
|
35
33
|
aria-label={rest?.title ?? localization.showHideSearch}
|
36
34
|
disabled={!!globalFilter}
|
@@ -1,10 +1,15 @@
|
|
1
1
|
import { type MouseEvent, useState } from 'react';
|
2
|
-
import IconButton from '@mui/material/IconButton';
|
2
|
+
import IconButton, { type IconButtonProps } from '@mui/material/IconButton';
|
3
3
|
import Tooltip from '@mui/material/Tooltip';
|
4
4
|
import { MRT_EditActionButtons } from './MRT_EditActionButtons';
|
5
5
|
import { parseFromValuesOrFunc } from '../column.utils';
|
6
6
|
import { MRT_RowActionMenu } from '../menus/MRT_RowActionMenu';
|
7
|
-
import {
|
7
|
+
import {
|
8
|
+
type MRT_Cell,
|
9
|
+
type MRT_Row,
|
10
|
+
type MRT_RowData,
|
11
|
+
type MRT_TableInstance,
|
12
|
+
} from '../types';
|
8
13
|
|
9
14
|
const commonIconButtonStyles = {
|
10
15
|
'&:hover': {
|
@@ -17,18 +22,17 @@ const commonIconButtonStyles = {
|
|
17
22
|
width: '2rem',
|
18
23
|
};
|
19
24
|
|
20
|
-
interface Props<TData extends
|
25
|
+
interface Props<TData extends MRT_RowData> extends IconButtonProps {
|
21
26
|
cell: MRT_Cell<TData>;
|
22
27
|
row: MRT_Row<TData>;
|
23
28
|
table: MRT_TableInstance<TData>;
|
24
29
|
}
|
25
30
|
|
26
|
-
export const MRT_ToggleRowActionMenuButton = <
|
27
|
-
TData extends Record<string, any>,
|
28
|
-
>({
|
31
|
+
export const MRT_ToggleRowActionMenuButton = <TData extends MRT_RowData>({
|
29
32
|
cell,
|
30
33
|
row,
|
31
34
|
table,
|
35
|
+
...rest
|
32
36
|
}: Props<TData>) => {
|
33
37
|
const {
|
34
38
|
getState,
|
@@ -74,12 +78,14 @@ export const MRT_ToggleRowActionMenuButton = <
|
|
74
78
|
) : showEditActionButtons ? (
|
75
79
|
<MRT_EditActionButtons row={row} table={table} />
|
76
80
|
) : !renderRowActionMenuItems &&
|
77
|
-
parseFromValuesOrFunc(enableEditing, row)
|
78
|
-
|
81
|
+
parseFromValuesOrFunc(enableEditing, row) &&
|
82
|
+
['modal', 'row'].includes(editDisplayMode!) ? (
|
83
|
+
<Tooltip placement="right" title={localization.edit}>
|
79
84
|
<IconButton
|
80
85
|
aria-label={localization.edit}
|
81
86
|
onClick={handleStartEditMode}
|
82
87
|
sx={commonIconButtonStyles}
|
88
|
+
{...rest}
|
83
89
|
>
|
84
90
|
<EditIcon />
|
85
91
|
</IconButton>
|
@@ -87,7 +93,6 @@ export const MRT_ToggleRowActionMenuButton = <
|
|
87
93
|
) : renderRowActionMenuItems ? (
|
88
94
|
<>
|
89
95
|
<Tooltip
|
90
|
-
arrow
|
91
96
|
enterDelay={1000}
|
92
97
|
enterNextDelay={1000}
|
93
98
|
title={localization.rowActions}
|
@@ -97,6 +102,7 @@ export const MRT_ToggleRowActionMenuButton = <
|
|
97
102
|
onClick={handleOpenRowActionMenu}
|
98
103
|
size="small"
|
99
104
|
sx={commonIconButtonStyles}
|
105
|
+
{...rest}
|
100
106
|
>
|
101
107
|
<MoreHorizIcon />
|
102
108
|
</IconButton>
|