material-react-table 2.0.0-beta.4 → 2.0.0-beta.5
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/index.js +359 -436
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/material-react-table.esm.js +215 -204
- package/dist/esm/material-react-table.esm.js.map +1 -1
- package/dist/index.d.ts +41 -46
- package/locales/ar/index.d.ts +3 -0
- package/locales/ar/index.esm.d.ts +3 -0
- package/locales/{ar.esm.js → ar/index.esm.js} +0 -1
- package/locales/{ar.js → ar/index.js} +0 -3
- package/locales/ar/package.json +6 -0
- package/locales/az/index.d.ts +3 -0
- package/locales/az/index.esm.d.ts +3 -0
- package/locales/az/index.esm.js +93 -0
- package/locales/az/index.js +95 -0
- package/locales/az/package.json +6 -0
- package/locales/bg/index.d.ts +3 -0
- package/locales/bg/index.esm.d.ts +3 -0
- package/locales/{bg.esm.js → bg/index.esm.js} +0 -1
- package/locales/{bg.js → bg/index.js} +0 -3
- package/locales/bg/package.json +6 -0
- package/locales/cs/index.d.ts +3 -0
- package/locales/cs/index.esm.d.ts +3 -0
- package/locales/{cs.esm.js → cs/index.esm.js} +0 -1
- package/locales/{cs.js → cs/index.js} +0 -3
- package/locales/cs/package.json +6 -0
- package/locales/da/index.d.ts +3 -0
- package/locales/da/index.esm.d.ts +3 -0
- package/locales/{da.esm.js → da/index.esm.js} +0 -1
- package/locales/{da.js → da/index.js} +0 -3
- package/locales/da/package.json +6 -0
- package/locales/de/index.d.ts +3 -0
- package/locales/de/index.esm.d.ts +3 -0
- package/locales/{de.esm.js → de/index.esm.js} +0 -1
- package/locales/{de.js → de/index.js} +0 -3
- package/locales/de/package.json +6 -0
- package/locales/en/index.d.ts +3 -0
- package/locales/en/index.esm.d.ts +3 -0
- package/locales/{en.esm.js → en/index.esm.js} +0 -1
- package/locales/{en.js → en/index.js} +0 -3
- package/locales/en/package.json +6 -0
- package/locales/es/index.d.ts +3 -0
- package/locales/es/index.esm.d.ts +3 -0
- package/locales/{es.esm.js → es/index.esm.js} +0 -1
- package/locales/{es.js → es/index.js} +0 -3
- package/locales/es/package.json +6 -0
- package/locales/et/index.d.ts +3 -0
- package/locales/et/index.esm.d.ts +3 -0
- package/locales/{et.esm.js → et/index.esm.js} +0 -1
- package/locales/{et.js → et/index.js} +0 -3
- package/locales/et/package.json +6 -0
- package/locales/fa/index.d.ts +3 -0
- package/locales/fa/index.esm.d.ts +3 -0
- package/locales/{fa.esm.js → fa/index.esm.js} +0 -1
- package/locales/{fa.js → fa/index.js} +0 -3
- package/locales/fa/package.json +6 -0
- package/locales/fi/index.d.ts +3 -0
- package/locales/fi/index.esm.d.ts +3 -0
- package/locales/{fi.esm.js → fi/index.esm.js} +0 -1
- package/locales/{fi.js → fi/index.js} +0 -3
- package/locales/fi/package.json +6 -0
- package/locales/fr/index.d.ts +3 -0
- package/locales/fr/index.esm.d.ts +3 -0
- package/locales/{fr.esm.js → fr/index.esm.js} +0 -1
- package/locales/{fr.js → fr/index.js} +0 -3
- package/locales/fr/package.json +6 -0
- package/locales/hu/index.d.ts +3 -0
- package/locales/hu/index.esm.d.ts +3 -0
- package/locales/{hu.esm.js → hu/index.esm.js} +0 -1
- package/locales/{hu.js → hu/index.js} +0 -3
- package/locales/hu/package.json +6 -0
- package/locales/hy/index.d.ts +3 -0
- package/locales/hy/index.esm.d.ts +3 -0
- package/locales/{hy.esm.js → hy/index.esm.js} +0 -1
- package/locales/{hy.js → hy/index.js} +0 -3
- package/locales/hy/package.json +6 -0
- package/locales/id/index.d.ts +3 -0
- package/locales/id/index.esm.d.ts +3 -0
- package/locales/{id.esm.js → id/index.esm.js} +0 -1
- package/locales/{id.js → id/index.js} +0 -3
- package/locales/id/package.json +6 -0
- package/locales/it/index.d.ts +3 -0
- package/locales/it/index.esm.d.ts +3 -0
- package/locales/{it.esm.js → it/index.esm.js} +0 -1
- package/locales/{it.js → it/index.js} +0 -3
- package/locales/it/package.json +6 -0
- package/locales/ja/index.d.ts +3 -0
- package/locales/ja/index.esm.d.ts +3 -0
- package/locales/{ja.esm.js → ja/index.esm.js} +0 -1
- package/locales/{ja.js → ja/index.js} +0 -3
- package/locales/ja/package.json +6 -0
- package/locales/ko/index.d.ts +3 -0
- package/locales/ko/index.esm.d.ts +3 -0
- package/locales/{ko.esm.js → ko/index.esm.js} +0 -1
- package/locales/{ko.js → ko/index.js} +0 -3
- package/locales/ko/package.json +6 -0
- package/locales/nl/index.d.ts +3 -0
- package/locales/nl/index.esm.d.ts +3 -0
- package/locales/{nl.esm.js → nl/index.esm.js} +0 -1
- package/locales/{nl.js → nl/index.js} +0 -3
- package/locales/nl/package.json +6 -0
- package/locales/no/index.d.ts +3 -0
- package/locales/no/index.esm.d.ts +3 -0
- package/locales/{no.esm.js → no/index.esm.js} +0 -1
- package/locales/{no.js → no/index.js} +0 -3
- package/locales/no/package.json +6 -0
- package/locales/np/index.d.ts +3 -0
- package/locales/np/index.esm.d.ts +3 -0
- package/locales/{np.esm.js → np/index.esm.js} +0 -1
- package/locales/{np.js → np/index.js} +0 -3
- package/locales/np/package.json +6 -0
- package/locales/pl/index.d.ts +3 -0
- package/locales/pl/index.esm.d.ts +3 -0
- package/locales/{pl.esm.js → pl/index.esm.js} +0 -1
- package/locales/{pl.js → pl/index.js} +0 -3
- package/locales/pl/package.json +6 -0
- package/locales/pt/index.d.ts +3 -0
- package/locales/pt/index.esm.d.ts +3 -0
- package/locales/{pt.esm.js → pt/index.esm.js} +0 -1
- package/locales/{pt.js → pt/index.js} +0 -3
- package/locales/pt/package.json +6 -0
- package/locales/pt-BR/index.d.ts +3 -0
- package/locales/pt-BR/index.esm.d.ts +3 -0
- package/locales/{pt-BR.esm.js → pt-BR/index.esm.js} +0 -1
- package/locales/{pt-BR.js → pt-BR/index.js} +0 -3
- package/locales/pt-BR/package.json +6 -0
- package/locales/ro/index.d.ts +3 -0
- package/locales/ro/index.esm.d.ts +3 -0
- package/locales/{ro.esm.js → ro/index.esm.js} +0 -1
- package/locales/{ro.js → ro/index.js} +0 -3
- package/locales/ro/package.json +6 -0
- package/locales/ru/index.d.ts +3 -0
- package/locales/ru/index.esm.d.ts +3 -0
- package/locales/{ru.esm.js → ru/index.esm.js} +0 -1
- package/locales/{ru.js → ru/index.js} +0 -3
- package/locales/ru/package.json +6 -0
- package/locales/sk/index.d.ts +3 -0
- package/locales/sk/index.esm.d.ts +3 -0
- package/locales/{sk.esm.js → sk/index.esm.js} +0 -1
- package/locales/{sk.js → sk/index.js} +0 -3
- package/locales/sk/package.json +6 -0
- package/locales/sr-Cyrl-RS/index.d.ts +3 -0
- package/locales/sr-Cyrl-RS/index.esm.d.ts +3 -0
- package/locales/{sr-Cyrl-RS.esm.js → sr-Cyrl-RS/index.esm.js} +0 -1
- package/locales/{sr-Cyrl-RS.js → sr-Cyrl-RS/index.js} +0 -3
- package/locales/sr-Cyrl-RS/package.json +6 -0
- package/locales/sr-Latn-RS/index.d.ts +3 -0
- package/locales/sr-Latn-RS/index.esm.d.ts +3 -0
- package/locales/{sr-Latn-RS.esm.js → sr-Latn-RS/index.esm.js} +0 -1
- package/locales/{sr-Latn-RS.js → sr-Latn-RS/index.js} +0 -3
- package/locales/sr-Latn-RS/package.json +6 -0
- package/locales/sv/index.d.ts +3 -0
- package/locales/sv/index.esm.d.ts +3 -0
- package/locales/{sv.esm.js → sv/index.esm.js} +0 -1
- package/locales/{sv.js → sv/index.js} +0 -3
- package/locales/sv/package.json +6 -0
- package/locales/tr/index.d.ts +3 -0
- package/locales/tr/index.esm.d.ts +3 -0
- package/locales/{tr.esm.js → tr/index.esm.js} +0 -1
- package/locales/{tr.js → tr/index.js} +0 -3
- package/locales/tr/package.json +6 -0
- package/locales/uk/index.d.ts +3 -0
- package/locales/uk/index.esm.d.ts +3 -0
- package/locales/{uk.esm.js → uk/index.esm.js} +0 -1
- package/locales/{uk.js → uk/index.js} +0 -3
- package/locales/uk/package.json +6 -0
- package/locales/vi/index.d.ts +3 -0
- package/locales/vi/index.esm.d.ts +3 -0
- package/locales/{vi.esm.js → vi/index.esm.js} +0 -1
- package/locales/{vi.js → vi/index.js} +0 -3
- package/locales/vi/package.json +6 -0
- package/locales/zh-Hans/index.d.ts +3 -0
- package/locales/zh-Hans/index.esm.d.ts +3 -0
- package/locales/{zh-Hans.esm.js → zh-Hans/index.esm.js} +0 -1
- package/locales/{zh-Hans.js → zh-Hans/index.js} +0 -3
- package/locales/zh-Hans/package.json +6 -0
- package/locales/zh-Hant/index.d.ts +3 -0
- package/locales/zh-Hant/index.esm.d.ts +3 -0
- package/locales/{zh-Hant.esm.js → zh-Hant/index.esm.js} +0 -1
- package/locales/{zh-Hant.js → zh-Hant/index.js} +0 -3
- package/locales/zh-Hant/package.json +6 -0
- package/package.json +37 -28
- package/src/body/MRT_TableBody.tsx +1 -3
- package/src/body/MRT_TableBodyCell.tsx +8 -6
- package/src/body/MRT_TableBodyCellValue.tsx +6 -6
- package/src/body/MRT_TableBodyRow.tsx +13 -9
- package/src/body/MRT_TableDetailPanel.tsx +2 -2
- package/src/column.utils.ts +1 -120
- package/src/footer/MRT_TableFooterCell.tsx +3 -2
- package/src/footer/MRT_TableFooterRow.tsx +2 -2
- package/src/head/MRT_TableHeadCell.tsx +8 -10
- package/src/head/MRT_TableHeadCellColumnActionsButton.tsx +3 -7
- package/src/head/MRT_TableHeadCellGrabHandle.tsx +1 -1
- package/src/head/MRT_TableHeadCellSortLabel.tsx +3 -3
- package/src/head/MRT_TableHeadRow.tsx +3 -2
- package/src/hooks/useMRT_TableOptions.ts +22 -1
- package/src/index.ts +1 -0
- package/src/inputs/MRT_GlobalFilterTextField.tsx +14 -1
- package/src/locales/az.ts +94 -0
- package/src/locales/no.ts +1 -1
- package/src/menus/MRT_ShowHideColumnsMenuItems.tsx +3 -2
- package/src/style.utils.ts +149 -0
- package/src/table/MRT_Table.tsx +1 -1
- package/src/table/MRT_TableLoadingOverlay.tsx +3 -2
- package/src/table/MRT_TablePaper.tsx +1 -1
- package/src/toolbar/MRT_BottomToolbar.tsx +5 -5
- package/src/toolbar/MRT_TopToolbar.tsx +5 -15
- package/src/types.ts +8 -0
- package/src/useMaterialReactTable.ts +2 -5
- 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 -13
- 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 -10
- package/dist/cjs/types/body/MRT_TableBodyRowPinButton.d.ts +0 -8
- package/dist/cjs/types/body/MRT_TableDetailPanel.d.ts +0 -13
- package/dist/cjs/types/body/index.d.ts +0 -7
- package/dist/cjs/types/buttons/MRT_ColumnPinningButtons.d.ts +0 -8
- package/dist/cjs/types/buttons/MRT_CopyButton.d.ts +0 -8
- package/dist/cjs/types/buttons/MRT_EditActionButtons.d.ts +0 -9
- package/dist/cjs/types/buttons/MRT_ExpandAllButton.d.ts +0 -7
- package/dist/cjs/types/buttons/MRT_ExpandButton.d.ts +0 -8
- package/dist/cjs/types/buttons/MRT_GrabHandleButton.d.ts +0 -12
- package/dist/cjs/types/buttons/MRT_RowPinButton.d.ts +0 -10
- 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 -9
- package/dist/cjs/types/buttons/index.d.ts +0 -13
- package/dist/cjs/types/column.utils.d.ts +0 -149
- package/dist/cjs/types/filterFns.d.ts +0 -69
- package/dist/cjs/types/footer/MRT_TableFooter.d.ts +0 -11
- package/dist/cjs/types/footer/MRT_TableFooterCell.d.ts +0 -8
- package/dist/cjs/types/footer/MRT_TableFooterRow.d.ts +0 -12
- package/dist/cjs/types/footer/index.d.ts +0 -3
- package/dist/cjs/types/head/MRT_TableHead.d.ts +0 -11
- package/dist/cjs/types/head/MRT_TableHeadCell.d.ts +0 -8
- package/dist/cjs/types/head/MRT_TableHeadCellColumnActionsButton.d.ts +0 -8
- package/dist/cjs/types/head/MRT_TableHeadCellFilterContainer.d.ts +0 -8
- package/dist/cjs/types/head/MRT_TableHeadCellFilterLabel.d.ts +0 -8
- package/dist/cjs/types/head/MRT_TableHeadCellGrabHandle.d.ts +0 -10
- package/dist/cjs/types/head/MRT_TableHeadCellResizeHandle.d.ts +0 -8
- package/dist/cjs/types/head/MRT_TableHeadCellSortLabel.d.ts +0 -10
- package/dist/cjs/types/head/MRT_TableHeadRow.d.ts +0 -12
- 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 -8
- package/dist/cjs/types/inputs/MRT_FilterCheckbox.d.ts +0 -8
- package/dist/cjs/types/inputs/MRT_FilterRangeFields.d.ts +0 -8
- package/dist/cjs/types/inputs/MRT_FilterRangeSlider.d.ts +0 -8
- package/dist/cjs/types/inputs/MRT_FilterTextField.d.ts +0 -9
- package/dist/cjs/types/inputs/MRT_GlobalFilterTextField.d.ts +0 -7
- package/dist/cjs/types/inputs/MRT_SelectCheckbox.d.ts +0 -9
- 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 -20
- package/dist/cjs/types/menus/MRT_FilterOptionMenu.d.ts +0 -13
- package/dist/cjs/types/menus/MRT_RowActionMenu.d.ts +0 -12
- package/dist/cjs/types/menus/MRT_ShowHideColumnsMenu.d.ts +0 -10
- package/dist/cjs/types/menus/MRT_ShowHideColumnsMenuItems.d.ts +0 -12
- package/dist/cjs/types/menus/index.d.ts +0 -5
- package/dist/cjs/types/modals/MRT_EditRowModal.d.ts +0 -8
- 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 -7
- package/dist/cjs/types/table/MRT_TableContainer.d.ts +0 -7
- package/dist/cjs/types/table/MRT_TableLoadingOverlay.d.ts +0 -7
- package/dist/cjs/types/table/MRT_TablePaper.d.ts +0 -7
- package/dist/cjs/types/table/index.d.ts +0 -5
- package/dist/cjs/types/toolbar/MRT_BottomToolbar.d.ts +0 -7
- package/dist/cjs/types/toolbar/MRT_LinearProgressBar.d.ts +0 -8
- package/dist/cjs/types/toolbar/MRT_TablePagination.d.ts +0 -11
- package/dist/cjs/types/toolbar/MRT_ToolbarAlertBanner.d.ts +0 -8
- package/dist/cjs/types/toolbar/MRT_ToolbarDropZone.d.ts +0 -7
- package/dist/cjs/types/toolbar/MRT_ToolbarInternalButtons.d.ts +0 -7
- package/dist/cjs/types/toolbar/MRT_TopToolbar.d.ts +0 -20
- package/dist/cjs/types/toolbar/index.d.ts +0 -7
- package/dist/cjs/types/types.d.ts +0 -828
- package/dist/cjs/types/useMaterialReactTable.d.ts +0 -2
- 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 -13
- 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 -10
- package/dist/esm/types/body/MRT_TableBodyRowPinButton.d.ts +0 -8
- package/dist/esm/types/body/MRT_TableDetailPanel.d.ts +0 -13
- package/dist/esm/types/body/index.d.ts +0 -7
- package/dist/esm/types/buttons/MRT_ColumnPinningButtons.d.ts +0 -8
- package/dist/esm/types/buttons/MRT_CopyButton.d.ts +0 -8
- package/dist/esm/types/buttons/MRT_EditActionButtons.d.ts +0 -9
- package/dist/esm/types/buttons/MRT_ExpandAllButton.d.ts +0 -7
- package/dist/esm/types/buttons/MRT_ExpandButton.d.ts +0 -8
- package/dist/esm/types/buttons/MRT_GrabHandleButton.d.ts +0 -12
- package/dist/esm/types/buttons/MRT_RowPinButton.d.ts +0 -10
- 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 -9
- package/dist/esm/types/buttons/index.d.ts +0 -13
- package/dist/esm/types/column.utils.d.ts +0 -149
- package/dist/esm/types/filterFns.d.ts +0 -69
- package/dist/esm/types/footer/MRT_TableFooter.d.ts +0 -11
- package/dist/esm/types/footer/MRT_TableFooterCell.d.ts +0 -8
- package/dist/esm/types/footer/MRT_TableFooterRow.d.ts +0 -12
- package/dist/esm/types/footer/index.d.ts +0 -3
- package/dist/esm/types/head/MRT_TableHead.d.ts +0 -11
- package/dist/esm/types/head/MRT_TableHeadCell.d.ts +0 -8
- package/dist/esm/types/head/MRT_TableHeadCellColumnActionsButton.d.ts +0 -8
- package/dist/esm/types/head/MRT_TableHeadCellFilterContainer.d.ts +0 -8
- package/dist/esm/types/head/MRT_TableHeadCellFilterLabel.d.ts +0 -8
- package/dist/esm/types/head/MRT_TableHeadCellGrabHandle.d.ts +0 -10
- package/dist/esm/types/head/MRT_TableHeadCellResizeHandle.d.ts +0 -8
- package/dist/esm/types/head/MRT_TableHeadCellSortLabel.d.ts +0 -10
- package/dist/esm/types/head/MRT_TableHeadRow.d.ts +0 -12
- 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 -8
- package/dist/esm/types/inputs/MRT_FilterCheckbox.d.ts +0 -8
- package/dist/esm/types/inputs/MRT_FilterRangeFields.d.ts +0 -8
- package/dist/esm/types/inputs/MRT_FilterRangeSlider.d.ts +0 -8
- package/dist/esm/types/inputs/MRT_FilterTextField.d.ts +0 -9
- package/dist/esm/types/inputs/MRT_GlobalFilterTextField.d.ts +0 -7
- package/dist/esm/types/inputs/MRT_SelectCheckbox.d.ts +0 -9
- 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 -20
- package/dist/esm/types/menus/MRT_FilterOptionMenu.d.ts +0 -13
- package/dist/esm/types/menus/MRT_RowActionMenu.d.ts +0 -12
- package/dist/esm/types/menus/MRT_ShowHideColumnsMenu.d.ts +0 -10
- package/dist/esm/types/menus/MRT_ShowHideColumnsMenuItems.d.ts +0 -12
- package/dist/esm/types/menus/index.d.ts +0 -5
- package/dist/esm/types/modals/MRT_EditRowModal.d.ts +0 -8
- 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 -7
- package/dist/esm/types/table/MRT_TableContainer.d.ts +0 -7
- package/dist/esm/types/table/MRT_TableLoadingOverlay.d.ts +0 -7
- package/dist/esm/types/table/MRT_TablePaper.d.ts +0 -7
- package/dist/esm/types/table/index.d.ts +0 -5
- package/dist/esm/types/toolbar/MRT_BottomToolbar.d.ts +0 -7
- package/dist/esm/types/toolbar/MRT_LinearProgressBar.d.ts +0 -8
- package/dist/esm/types/toolbar/MRT_TablePagination.d.ts +0 -11
- package/dist/esm/types/toolbar/MRT_ToolbarAlertBanner.d.ts +0 -8
- package/dist/esm/types/toolbar/MRT_ToolbarDropZone.d.ts +0 -7
- package/dist/esm/types/toolbar/MRT_ToolbarInternalButtons.d.ts +0 -7
- package/dist/esm/types/toolbar/MRT_TopToolbar.d.ts +0 -20
- package/dist/esm/types/toolbar/index.d.ts +0 -7
- package/dist/esm/types/types.d.ts +0 -828
- package/dist/esm/types/useMaterialReactTable.d.ts +0 -2
- package/locales/ar.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.d.ts +0 -2
- 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.d.ts +0 -2
- 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.d.ts +0 -2
- 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.d.ts +0 -2
- 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.d.ts +0 -2
- 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.d.ts +0 -2
- 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.d.ts +0 -2
- 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.d.ts +0 -2
- 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.d.ts +0 -2
- 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.d.ts +0 -2
- 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.d.ts +0 -2
- 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.d.ts +0 -2
- 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.d.ts +0 -2
- 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.d.ts +0 -2
- 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.d.ts +0 -2
- 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.d.ts +0 -2
- 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.d.ts +0 -2
- 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.d.ts +0 -2
- 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.d.ts +0 -2
- 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.d.ts +0 -2
- 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.d.ts +0 -2
- 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.d.ts +0 -2
- 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.d.ts +0 -2
- 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.d.ts +0 -2
- 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.d.ts +0 -2
- 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.d.ts +0 -2
- 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.d.ts +0 -2
- 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.d.ts +0 -2
- 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.d.ts +0 -2
- 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.d.ts +0 -2
- 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.d.ts +0 -2
- 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.d.ts +0 -2
- 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.d.ts +0 -2
- 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
package/dist/cjs/index.js
CHANGED
@@ -1,7 +1,5 @@
|
|
1
1
|
'use strict';
|
2
2
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
4
|
-
|
5
3
|
var jsxRuntime = require('react/jsx-runtime');
|
6
4
|
var Paper = require('@mui/material/Paper');
|
7
5
|
var react = require('react');
|
@@ -15,10 +13,10 @@ var styles = require('@mui/material/styles');
|
|
15
13
|
var Skeleton = require('@mui/material/Skeleton');
|
16
14
|
var TableCell = require('@mui/material/TableCell');
|
17
15
|
var Box = require('@mui/material/Box');
|
16
|
+
var reactTable = require('@tanstack/react-table');
|
18
17
|
var highlightWords = require('highlight-words');
|
19
18
|
var IconButton = require('@mui/material/IconButton');
|
20
19
|
var Tooltip = require('@mui/material/Tooltip');
|
21
|
-
var reactTable = require('@tanstack/react-table');
|
22
20
|
var Button = require('@mui/material/Button');
|
23
21
|
var MenuItem = require('@mui/material/MenuItem');
|
24
22
|
var TextField = require('@mui/material/TextField');
|
@@ -26,6 +24,7 @@ var Collapse = require('@mui/material/Collapse');
|
|
26
24
|
var matchSorterUtils = require('@tanstack/match-sorter-utils');
|
27
25
|
var TableFooter = require('@mui/material/TableFooter');
|
28
26
|
var TableHead = require('@mui/material/TableHead');
|
27
|
+
var material = require('@mui/material');
|
29
28
|
var ListItemIcon = require('@mui/material/ListItemIcon');
|
30
29
|
var Menu = require('@mui/material/Menu');
|
31
30
|
var Checkbox = require('@mui/material/Checkbox');
|
@@ -93,91 +92,6 @@ var SyncAltIcon = require('@mui/icons-material/SyncAlt');
|
|
93
92
|
var ViewColumnIcon = require('@mui/icons-material/ViewColumn');
|
94
93
|
var VisibilityOffIcon = require('@mui/icons-material/VisibilityOff');
|
95
94
|
|
96
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
97
|
-
|
98
|
-
var Paper__default = /*#__PURE__*/_interopDefaultLegacy(Paper);
|
99
|
-
var TableContainer__default = /*#__PURE__*/_interopDefaultLegacy(TableContainer);
|
100
|
-
var Table__default = /*#__PURE__*/_interopDefaultLegacy(Table);
|
101
|
-
var TableBody__default = /*#__PURE__*/_interopDefaultLegacy(TableBody);
|
102
|
-
var Typography__default = /*#__PURE__*/_interopDefaultLegacy(Typography);
|
103
|
-
var TableRow__default = /*#__PURE__*/_interopDefaultLegacy(TableRow);
|
104
|
-
var Skeleton__default = /*#__PURE__*/_interopDefaultLegacy(Skeleton);
|
105
|
-
var TableCell__default = /*#__PURE__*/_interopDefaultLegacy(TableCell);
|
106
|
-
var Box__default = /*#__PURE__*/_interopDefaultLegacy(Box);
|
107
|
-
var highlightWords__default = /*#__PURE__*/_interopDefaultLegacy(highlightWords);
|
108
|
-
var IconButton__default = /*#__PURE__*/_interopDefaultLegacy(IconButton);
|
109
|
-
var Tooltip__default = /*#__PURE__*/_interopDefaultLegacy(Tooltip);
|
110
|
-
var Button__default = /*#__PURE__*/_interopDefaultLegacy(Button);
|
111
|
-
var MenuItem__default = /*#__PURE__*/_interopDefaultLegacy(MenuItem);
|
112
|
-
var TextField__default = /*#__PURE__*/_interopDefaultLegacy(TextField);
|
113
|
-
var Collapse__default = /*#__PURE__*/_interopDefaultLegacy(Collapse);
|
114
|
-
var TableFooter__default = /*#__PURE__*/_interopDefaultLegacy(TableFooter);
|
115
|
-
var TableHead__default = /*#__PURE__*/_interopDefaultLegacy(TableHead);
|
116
|
-
var ListItemIcon__default = /*#__PURE__*/_interopDefaultLegacy(ListItemIcon);
|
117
|
-
var Menu__default = /*#__PURE__*/_interopDefaultLegacy(Menu);
|
118
|
-
var Checkbox__default = /*#__PURE__*/_interopDefaultLegacy(Checkbox);
|
119
|
-
var FormControlLabel__default = /*#__PURE__*/_interopDefaultLegacy(FormControlLabel);
|
120
|
-
var Autocomplete__default = /*#__PURE__*/_interopDefaultLegacy(Autocomplete);
|
121
|
-
var Chip__default = /*#__PURE__*/_interopDefaultLegacy(Chip);
|
122
|
-
var InputAdornment__default = /*#__PURE__*/_interopDefaultLegacy(InputAdornment);
|
123
|
-
var FormHelperText__default = /*#__PURE__*/_interopDefaultLegacy(FormHelperText);
|
124
|
-
var Slider__default = /*#__PURE__*/_interopDefaultLegacy(Slider);
|
125
|
-
var Stack__default = /*#__PURE__*/_interopDefaultLegacy(Stack);
|
126
|
-
var Grow__default = /*#__PURE__*/_interopDefaultLegacy(Grow);
|
127
|
-
var Popover__default = /*#__PURE__*/_interopDefaultLegacy(Popover);
|
128
|
-
var Divider__default = /*#__PURE__*/_interopDefaultLegacy(Divider);
|
129
|
-
var Badge__default = /*#__PURE__*/_interopDefaultLegacy(Badge);
|
130
|
-
var TableSortLabel__default = /*#__PURE__*/_interopDefaultLegacy(TableSortLabel);
|
131
|
-
var useMediaQuery__default = /*#__PURE__*/_interopDefaultLegacy(useMediaQuery);
|
132
|
-
var LinearProgress__default = /*#__PURE__*/_interopDefaultLegacy(LinearProgress);
|
133
|
-
var InputLabel__default = /*#__PURE__*/_interopDefaultLegacy(InputLabel);
|
134
|
-
var Pagination__default = /*#__PURE__*/_interopDefaultLegacy(Pagination);
|
135
|
-
var PaginationItem__default = /*#__PURE__*/_interopDefaultLegacy(PaginationItem);
|
136
|
-
var Select__default = /*#__PURE__*/_interopDefaultLegacy(Select);
|
137
|
-
var Alert__default = /*#__PURE__*/_interopDefaultLegacy(Alert);
|
138
|
-
var AlertTitle__default = /*#__PURE__*/_interopDefaultLegacy(AlertTitle);
|
139
|
-
var Radio__default = /*#__PURE__*/_interopDefaultLegacy(Radio);
|
140
|
-
var Fade__default = /*#__PURE__*/_interopDefaultLegacy(Fade);
|
141
|
-
var Switch__default = /*#__PURE__*/_interopDefaultLegacy(Switch);
|
142
|
-
var CircularProgress__default = /*#__PURE__*/_interopDefaultLegacy(CircularProgress);
|
143
|
-
var Dialog__default = /*#__PURE__*/_interopDefaultLegacy(Dialog);
|
144
|
-
var DialogActions__default = /*#__PURE__*/_interopDefaultLegacy(DialogActions);
|
145
|
-
var DialogContent__default = /*#__PURE__*/_interopDefaultLegacy(DialogContent);
|
146
|
-
var DialogTitle__default = /*#__PURE__*/_interopDefaultLegacy(DialogTitle);
|
147
|
-
var ArrowDownwardIcon__default = /*#__PURE__*/_interopDefaultLegacy(ArrowDownwardIcon);
|
148
|
-
var ArrowRightIcon__default = /*#__PURE__*/_interopDefaultLegacy(ArrowRightIcon);
|
149
|
-
var CancelIcon__default = /*#__PURE__*/_interopDefaultLegacy(CancelIcon);
|
150
|
-
var ChevronLeftIcon__default = /*#__PURE__*/_interopDefaultLegacy(ChevronLeftIcon);
|
151
|
-
var ChevronRightIcon__default = /*#__PURE__*/_interopDefaultLegacy(ChevronRightIcon);
|
152
|
-
var ClearAllIcon__default = /*#__PURE__*/_interopDefaultLegacy(ClearAllIcon);
|
153
|
-
var CloseIcon__default = /*#__PURE__*/_interopDefaultLegacy(CloseIcon);
|
154
|
-
var DensityLargeIcon__default = /*#__PURE__*/_interopDefaultLegacy(DensityLargeIcon);
|
155
|
-
var DensityMediumIcon__default = /*#__PURE__*/_interopDefaultLegacy(DensityMediumIcon);
|
156
|
-
var DensitySmallIcon__default = /*#__PURE__*/_interopDefaultLegacy(DensitySmallIcon);
|
157
|
-
var DragHandleIcon__default = /*#__PURE__*/_interopDefaultLegacy(DragHandleIcon);
|
158
|
-
var DynamicFeedIcon__default = /*#__PURE__*/_interopDefaultLegacy(DynamicFeedIcon);
|
159
|
-
var EditIcon__default = /*#__PURE__*/_interopDefaultLegacy(EditIcon);
|
160
|
-
var ExpandMoreIcon__default = /*#__PURE__*/_interopDefaultLegacy(ExpandMoreIcon);
|
161
|
-
var FilterAltIcon__default = /*#__PURE__*/_interopDefaultLegacy(FilterAltIcon);
|
162
|
-
var FilterListIcon__default = /*#__PURE__*/_interopDefaultLegacy(FilterListIcon);
|
163
|
-
var FilterListOffIcon__default = /*#__PURE__*/_interopDefaultLegacy(FilterListOffIcon);
|
164
|
-
var FirstPageIcon__default = /*#__PURE__*/_interopDefaultLegacy(FirstPageIcon);
|
165
|
-
var FullscreenIcon__default = /*#__PURE__*/_interopDefaultLegacy(FullscreenIcon);
|
166
|
-
var FullscreenExitIcon__default = /*#__PURE__*/_interopDefaultLegacy(FullscreenExitIcon);
|
167
|
-
var KeyboardDoubleArrowDownIcon__default = /*#__PURE__*/_interopDefaultLegacy(KeyboardDoubleArrowDownIcon);
|
168
|
-
var LastPageIcon__default = /*#__PURE__*/_interopDefaultLegacy(LastPageIcon);
|
169
|
-
var MoreHorizIcon__default = /*#__PURE__*/_interopDefaultLegacy(MoreHorizIcon);
|
170
|
-
var MoreVertIcon__default = /*#__PURE__*/_interopDefaultLegacy(MoreVertIcon);
|
171
|
-
var PushPinIcon__default = /*#__PURE__*/_interopDefaultLegacy(PushPinIcon);
|
172
|
-
var RestartAltIcon__default = /*#__PURE__*/_interopDefaultLegacy(RestartAltIcon);
|
173
|
-
var SaveIcon__default = /*#__PURE__*/_interopDefaultLegacy(SaveIcon);
|
174
|
-
var SearchIcon__default = /*#__PURE__*/_interopDefaultLegacy(SearchIcon);
|
175
|
-
var SearchOffIcon__default = /*#__PURE__*/_interopDefaultLegacy(SearchOffIcon);
|
176
|
-
var SortIcon__default = /*#__PURE__*/_interopDefaultLegacy(SortIcon);
|
177
|
-
var SyncAltIcon__default = /*#__PURE__*/_interopDefaultLegacy(SyncAltIcon);
|
178
|
-
var ViewColumnIcon__default = /*#__PURE__*/_interopDefaultLegacy(ViewColumnIcon);
|
179
|
-
var VisibilityOffIcon__default = /*#__PURE__*/_interopDefaultLegacy(VisibilityOffIcon);
|
180
|
-
|
181
95
|
/******************************************************************************
|
182
96
|
Copyright (c) Microsoft Corporation.
|
183
97
|
|
@@ -192,6 +106,8 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
192
106
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
193
107
|
PERFORMANCE OF THIS SOFTWARE.
|
194
108
|
***************************************************************************** */
|
109
|
+
/* global Reflect, Promise, SuppressedError, Symbol */
|
110
|
+
|
195
111
|
function __rest(s, e) {
|
196
112
|
var t = {};
|
197
113
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
@@ -205,75 +121,6 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
|
|
205
121
|
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
206
122
|
};
|
207
123
|
|
208
|
-
const allowedTypes = ['string', 'number'];
|
209
|
-
const MRT_TableBodyCellValue = ({ cell, table, }) => {
|
210
|
-
var _a, _b, _c;
|
211
|
-
const { getState, options: { enableFilterMatchHighlighting }, } = table;
|
212
|
-
const { column, row } = cell;
|
213
|
-
const { columnDef } = column;
|
214
|
-
const { globalFilter, globalFilterFn } = getState();
|
215
|
-
const filterValue = column.getFilterValue();
|
216
|
-
let renderedCellValue = cell.getIsAggregated() && columnDef.AggregatedCell
|
217
|
-
? columnDef.AggregatedCell({
|
218
|
-
cell,
|
219
|
-
column,
|
220
|
-
row,
|
221
|
-
table,
|
222
|
-
})
|
223
|
-
: row.getIsGrouped() && !cell.getIsGrouped()
|
224
|
-
? null
|
225
|
-
: cell.getIsGrouped() && columnDef.GroupedCell
|
226
|
-
? columnDef.GroupedCell({
|
227
|
-
cell,
|
228
|
-
column,
|
229
|
-
row,
|
230
|
-
table,
|
231
|
-
})
|
232
|
-
: undefined;
|
233
|
-
const isGroupedValue = renderedCellValue !== undefined;
|
234
|
-
if (!isGroupedValue) {
|
235
|
-
renderedCellValue = cell.renderValue();
|
236
|
-
}
|
237
|
-
if (enableFilterMatchHighlighting &&
|
238
|
-
columnDef.enableFilterMatchHighlighting !== false &&
|
239
|
-
renderedCellValue &&
|
240
|
-
allowedTypes.includes(typeof renderedCellValue) &&
|
241
|
-
((filterValue &&
|
242
|
-
allowedTypes.includes(typeof filterValue) &&
|
243
|
-
columnDef.filterVariant === 'text') ||
|
244
|
-
(globalFilter &&
|
245
|
-
allowedTypes.includes(typeof globalFilter) &&
|
246
|
-
column.getCanGlobalFilter()))) {
|
247
|
-
const chunks = highlightWords__default["default"] === null || highlightWords__default["default"] === void 0 ? void 0 : highlightWords__default["default"]({
|
248
|
-
matchExactly: (filterValue ? columnDef._filterFn : globalFilterFn) !== 'fuzzy',
|
249
|
-
query: ((_a = filterValue !== null && filterValue !== void 0 ? filterValue : globalFilter) !== null && _a !== void 0 ? _a : '').toString(),
|
250
|
-
text: renderedCellValue === null || renderedCellValue === void 0 ? void 0 : renderedCellValue.toString(),
|
251
|
-
});
|
252
|
-
if ((chunks === null || chunks === void 0 ? void 0 : chunks.length) > 1 || ((_b = chunks === null || chunks === void 0 ? void 0 : chunks[0]) === null || _b === void 0 ? void 0 : _b.match)) {
|
253
|
-
renderedCellValue = (jsxRuntime.jsx("span", { "aria-label": renderedCellValue, role: "note", children: (_c = chunks === null || chunks === void 0 ? void 0 : chunks.map(({ key, match, text }) => (jsxRuntime.jsx(Box__default["default"], { "aria-hidden": "true", component: "span", sx: match
|
254
|
-
? {
|
255
|
-
backgroundColor: (theme) => theme.palette.mode === 'dark'
|
256
|
-
? styles.darken(theme.palette.warning.dark, 0.25)
|
257
|
-
: styles.lighten(theme.palette.warning.light, 0.5),
|
258
|
-
borderRadius: '2px',
|
259
|
-
color: (theme) => theme.palette.mode === 'dark' ? 'white' : 'black',
|
260
|
-
padding: '2px 1px',
|
261
|
-
}
|
262
|
-
: undefined, children: text }, key)))) !== null && _c !== void 0 ? _c : renderedCellValue }));
|
263
|
-
}
|
264
|
-
}
|
265
|
-
if (columnDef.Cell && !isGroupedValue) {
|
266
|
-
renderedCellValue = columnDef.Cell({
|
267
|
-
cell,
|
268
|
-
column,
|
269
|
-
renderedCellValue,
|
270
|
-
row,
|
271
|
-
table,
|
272
|
-
});
|
273
|
-
}
|
274
|
-
return jsxRuntime.jsx(jsxRuntime.Fragment, { children: renderedCellValue });
|
275
|
-
};
|
276
|
-
|
277
124
|
const getColumnId = (columnDef) => { var _a, _b, _c, _d; return (_d = (_a = columnDef.id) !== null && _a !== void 0 ? _a : (_c = (_b = columnDef.accessorKey) === null || _b === void 0 ? void 0 : _b.toString) === null || _c === void 0 ? void 0 : _c.call(_b)) !== null && _d !== void 0 ? _d : columnDef.header; };
|
278
125
|
const getAllLeafColumnDefs = (columns) => {
|
279
126
|
const allLeafColumnDefs = [];
|
@@ -440,7 +287,41 @@ const getCanRankRows = (table) => {
|
|
440
287
|
expanded !== true &&
|
441
288
|
!Object.values(expanded).some(Boolean));
|
442
289
|
};
|
443
|
-
const
|
290
|
+
const parseFromValuesOrFunc = (fn, arg) => (fn instanceof Function ? fn(arg) : fn);
|
291
|
+
const flexRender = reactTable.flexRender;
|
292
|
+
const createRow = (table, originalRow) => reactTable.createRow(table, 'mrt-row-create', originalRow !== null && originalRow !== void 0 ? originalRow : Object.assign({}, ...getAllLeafColumnDefs(table.options.columns).map((col) => ({
|
293
|
+
[getColumnId(col)]: '',
|
294
|
+
}))), -1, 0);
|
295
|
+
const extraIndexRangeExtractor = (range, draggingIndex) => {
|
296
|
+
const newIndexs = reactVirtual.defaultRangeExtractor(range);
|
297
|
+
if (draggingIndex >= 0 &&
|
298
|
+
draggingIndex < Math.max(range.startIndex - range.overscan, 0)) {
|
299
|
+
newIndexs.unshift(draggingIndex);
|
300
|
+
}
|
301
|
+
if (draggingIndex >= 0 && draggingIndex > range.endIndex + range.overscan) {
|
302
|
+
newIndexs.push(draggingIndex);
|
303
|
+
}
|
304
|
+
return newIndexs;
|
305
|
+
};
|
306
|
+
function createMRTColumnHelper() {
|
307
|
+
return {
|
308
|
+
accessor: (accessor, column) => {
|
309
|
+
return typeof accessor === 'function'
|
310
|
+
? Object.assign(Object.assign({}, column), { accessorFn: accessor })
|
311
|
+
: Object.assign(Object.assign({}, column), { accessorKey: accessor });
|
312
|
+
},
|
313
|
+
display: (column) => column,
|
314
|
+
group: (column) => column,
|
315
|
+
};
|
316
|
+
}
|
317
|
+
|
318
|
+
const parseCSSVarId = (id) => id.replace(/[^a-zA-Z0-9]/g, '_');
|
319
|
+
const getMRTTheme = (table, theme) => (Object.assign({ baseBackgroundColor: theme.palette.mode === 'dark'
|
320
|
+
? styles.lighten(theme.palette.background.default, 0.05)
|
321
|
+
: theme.palette.background.default, draggingBorderColor: theme.palette.primary.main, matchHighlightColor: theme.palette.mode === 'dark'
|
322
|
+
? styles.darken(theme.palette.warning.dark, 0.25)
|
323
|
+
: styles.lighten(theme.palette.warning.light, 0.5), pinnedRowBackgroundColor: styles.alpha(theme.palette.primary.main, 0.1), selectedRowBackgroundColor: styles.alpha(theme.palette.primary.main, 0.2) }, table.options.mrtTheme));
|
324
|
+
const getCommonMRTCellStyles = ({ column, header, table, tableCellProps, theme, }) => {
|
444
325
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
445
326
|
const { options: { layoutMode }, } = table;
|
446
327
|
const widthStyles = {
|
@@ -454,11 +335,11 @@ const getCommonCellStyles = ({ column, header, table, tableCellProps, theme, })
|
|
454
335
|
widthStyles.flex = '0 0 auto';
|
455
336
|
}
|
456
337
|
return Object.assign(Object.assign({ backgroundColor: column.getIsPinned() && column.columnDef.columnDefType !== 'group'
|
457
|
-
? styles.alpha(styles.
|
338
|
+
? styles.alpha(styles.darken(getMRTTheme(table, theme).baseBackgroundColor, theme.palette.mode === 'dark' ? 0.05 : 0.01), 0.97)
|
458
339
|
: 'inherit', backgroundImage: 'inherit', boxShadow: getIsLastLeftPinnedColumn(table, column)
|
459
|
-
? `-4px 0 8px -6px ${styles.alpha(theme.palette.
|
340
|
+
? `-4px 0 8px -6px ${styles.alpha(theme.palette.grey[700], 0.5)} inset`
|
460
341
|
: getIsFirstRightPinnedColumn(column)
|
461
|
-
? `4px 0 8px -6px ${styles.alpha(theme.palette.
|
342
|
+
? `4px 0 8px -6px ${styles.alpha(theme.palette.grey[700], 0.5)} inset`
|
462
343
|
: undefined, display: (layoutMode === null || layoutMode === void 0 ? void 0 : layoutMode.startsWith('grid')) ? 'flex' : undefined, left: column.getIsPinned() === 'left'
|
463
344
|
? `${column.getStart('left')}px`
|
464
345
|
: undefined, ml: table.options.enableColumnVirtualization &&
|
@@ -483,61 +364,93 @@ const getCommonCellStyles = ({ column, header, table, tableCellProps, theme, })
|
|
483
364
|
? 'none'
|
484
365
|
: `padding 150ms ease-in-out` }, widthStyles), parseFromValuesOrFunc(tableCellProps === null || tableCellProps === void 0 ? void 0 : tableCellProps.sx, theme));
|
485
366
|
};
|
486
|
-
const
|
487
|
-
|
488
|
-
|
489
|
-
|
490
|
-
|
491
|
-
|
492
|
-
|
493
|
-
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
|
498
|
-
|
499
|
-
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
|
504
|
-
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
|
513
|
-
|
514
|
-
|
515
|
-
|
516
|
-
|
367
|
+
const getCommonToolbarStyles = ({ table, theme, }) => ({
|
368
|
+
alignItems: 'flex-start',
|
369
|
+
backgroundColor: getMRTTheme(table, theme).baseBackgroundColor,
|
370
|
+
display: 'grid',
|
371
|
+
flexWrap: 'wrap-reverse',
|
372
|
+
minHeight: '3.5rem',
|
373
|
+
overflow: 'hidden',
|
374
|
+
position: 'relative',
|
375
|
+
transition: 'all 150ms ease-in-out',
|
376
|
+
zIndex: 1,
|
377
|
+
});
|
378
|
+
|
379
|
+
const allowedTypes = ['string', 'number'];
|
380
|
+
const MRT_TableBodyCellValue = ({ cell, table, }) => {
|
381
|
+
var _a, _b, _c;
|
382
|
+
const { getState, options: { enableFilterMatchHighlighting }, } = table;
|
383
|
+
const { column, row } = cell;
|
384
|
+
const { columnDef } = column;
|
385
|
+
const { globalFilter, globalFilterFn } = getState();
|
386
|
+
const filterValue = column.getFilterValue();
|
387
|
+
let renderedCellValue = cell.getIsAggregated() && columnDef.AggregatedCell
|
388
|
+
? columnDef.AggregatedCell({
|
389
|
+
cell,
|
390
|
+
column,
|
391
|
+
row,
|
392
|
+
table,
|
393
|
+
})
|
394
|
+
: row.getIsGrouped() && !cell.getIsGrouped()
|
395
|
+
? null
|
396
|
+
: cell.getIsGrouped() && columnDef.GroupedCell
|
397
|
+
? columnDef.GroupedCell({
|
398
|
+
cell,
|
399
|
+
column,
|
400
|
+
row,
|
401
|
+
table,
|
402
|
+
})
|
403
|
+
: undefined;
|
404
|
+
const isGroupedValue = renderedCellValue !== undefined;
|
405
|
+
if (!isGroupedValue) {
|
406
|
+
renderedCellValue = cell.renderValue();
|
517
407
|
}
|
518
|
-
if (
|
519
|
-
|
408
|
+
if (enableFilterMatchHighlighting &&
|
409
|
+
columnDef.enableFilterMatchHighlighting !== false &&
|
410
|
+
renderedCellValue &&
|
411
|
+
allowedTypes.includes(typeof renderedCellValue) &&
|
412
|
+
((filterValue &&
|
413
|
+
allowedTypes.includes(typeof filterValue) &&
|
414
|
+
columnDef.filterVariant === 'text') ||
|
415
|
+
(globalFilter &&
|
416
|
+
allowedTypes.includes(typeof globalFilter) &&
|
417
|
+
column.getCanGlobalFilter()))) {
|
418
|
+
const chunks = highlightWords === null || highlightWords === void 0 ? void 0 : highlightWords({
|
419
|
+
matchExactly: (filterValue ? columnDef._filterFn : globalFilterFn) !== 'fuzzy',
|
420
|
+
query: ((_a = filterValue !== null && filterValue !== void 0 ? filterValue : globalFilter) !== null && _a !== void 0 ? _a : '').toString(),
|
421
|
+
text: renderedCellValue === null || renderedCellValue === void 0 ? void 0 : renderedCellValue.toString(),
|
422
|
+
});
|
423
|
+
if ((chunks === null || chunks === void 0 ? void 0 : chunks.length) > 1 || ((_b = chunks === null || chunks === void 0 ? void 0 : chunks[0]) === null || _b === void 0 ? void 0 : _b.match)) {
|
424
|
+
renderedCellValue = (jsxRuntime.jsx("span", { "aria-label": renderedCellValue, role: "note", children: (_c = chunks === null || chunks === void 0 ? void 0 : chunks.map(({ key, match, text }) => (jsxRuntime.jsx(Box, { "aria-hidden": "true", component: "span", sx: match
|
425
|
+
? {
|
426
|
+
backgroundColor: (theme) => getMRTTheme(table, theme).matchHighlightColor,
|
427
|
+
borderRadius: '2px',
|
428
|
+
color: (theme) => theme.palette.mode === 'dark'
|
429
|
+
? theme.palette.common.white
|
430
|
+
: theme.palette.common.black,
|
431
|
+
padding: '2px 1px',
|
432
|
+
}
|
433
|
+
: undefined, children: text }, key)))) !== null && _c !== void 0 ? _c : renderedCellValue }));
|
434
|
+
}
|
520
435
|
}
|
521
|
-
|
436
|
+
if (columnDef.Cell && !isGroupedValue) {
|
437
|
+
renderedCellValue = columnDef.Cell({
|
438
|
+
cell,
|
439
|
+
column,
|
440
|
+
renderedCellValue,
|
441
|
+
row,
|
442
|
+
table,
|
443
|
+
});
|
444
|
+
}
|
445
|
+
return renderedCellValue;
|
522
446
|
};
|
523
|
-
function createMRTColumnHelper() {
|
524
|
-
return {
|
525
|
-
accessor: (accessor, column) => {
|
526
|
-
return typeof accessor === 'function'
|
527
|
-
? Object.assign(Object.assign({}, column), { accessorFn: accessor })
|
528
|
-
: Object.assign(Object.assign({}, column), { accessorKey: accessor });
|
529
|
-
},
|
530
|
-
display: (column) => column,
|
531
|
-
group: (column) => column,
|
532
|
-
};
|
533
|
-
}
|
534
447
|
|
535
448
|
const MRT_GrabHandleButton = (_a) => {
|
536
449
|
var _b;
|
537
450
|
var { iconButtonProps, location, onDragEnd, onDragStart, table } = _a, rest = __rest(_a, ["iconButtonProps", "location", "onDragEnd", "onDragStart", "table"]);
|
538
451
|
const { options: { icons: { DragHandleIcon }, localization, }, } = table;
|
539
452
|
const _iconButtonProps = Object.assign(Object.assign({}, iconButtonProps), rest);
|
540
|
-
return (jsxRuntime.jsx(
|
453
|
+
return (jsxRuntime.jsx(Tooltip, { arrow: true, enterDelay: 1000, enterNextDelay: 1000, placement: "top", title: (_b = _iconButtonProps === null || _iconButtonProps === void 0 ? void 0 : _iconButtonProps.title) !== null && _b !== void 0 ? _b : localization.move, children: jsxRuntime.jsx(IconButton, Object.assign({ disableRipple: true, draggable: "true", size: "small" }, _iconButtonProps, { onClick: (e) => {
|
541
454
|
var _a;
|
542
455
|
e.stopPropagation();
|
543
456
|
(_a = _iconButtonProps === null || _iconButtonProps === void 0 ? void 0 : _iconButtonProps.onClick) === null || _a === void 0 ? void 0 : _a.call(_iconButtonProps, e);
|
@@ -595,7 +508,7 @@ const MRT_CopyButton = (_a) => {
|
|
595
508
|
row,
|
596
509
|
table,
|
597
510
|
})), rest);
|
598
|
-
return (jsxRuntime.jsx(
|
511
|
+
return (jsxRuntime.jsx(Tooltip, { arrow: true, enterDelay: 1000, enterNextDelay: 1000, placement: "top", title: (_b = buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.title) !== null && _b !== void 0 ? _b : (copied ? localization.copiedToClipboard : localization.clickToCopy), children: jsxRuntime.jsx(Button, Object.assign({ onClick: (e) => handleCopy(e, cell.getValue()), size: "small", type: "button", variant: "text" }, buttonProps, { sx: (theme) => (Object.assign({ backgroundColor: 'transparent', border: 'none', color: 'inherit', cursor: 'copy', fontFamily: 'inherit', fontSize: 'inherit', letterSpacing: 'inherit', m: '-0.25rem', minWidth: 'unset', textAlign: 'inherit', textTransform: 'inherit' }, parseFromValuesOrFunc(buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.sx, theme))), title: undefined })) }));
|
599
512
|
};
|
600
513
|
|
601
514
|
const MRT_EditCellTextField = (_a) => {
|
@@ -654,7 +567,7 @@ const MRT_EditCellTextField = (_a) => {
|
|
654
567
|
if (columnDef.Edit) {
|
655
568
|
return jsxRuntime.jsx(jsxRuntime.Fragment, { children: (_b = columnDef.Edit) === null || _b === void 0 ? void 0 : _b.call(columnDef, { cell, column, row, table }) });
|
656
569
|
}
|
657
|
-
return (jsxRuntime.jsx(
|
570
|
+
return (jsxRuntime.jsx(TextField, Object.assign({ disabled: parseFromValuesOrFunc(columnDef.enableEditing, row) === false, fullWidth: true, inputRef: (inputRef) => {
|
658
571
|
if (inputRef) {
|
659
572
|
editInputRefs.current[column.id] = inputRef;
|
660
573
|
if (textFieldProps.inputRef) {
|
@@ -683,7 +596,7 @@ const MRT_EditCellTextField = (_a) => {
|
|
683
596
|
value = option.value;
|
684
597
|
text = option.text;
|
685
598
|
}
|
686
|
-
return (jsxRuntime.jsx(
|
599
|
+
return (jsxRuntime.jsx(MenuItem, { sx: {
|
687
600
|
alignItems: 'center',
|
688
601
|
display: 'flex',
|
689
602
|
gap: '0.5rem',
|
@@ -709,6 +622,7 @@ const MRT_TableBodyCell = (_a) => {
|
|
709
622
|
row,
|
710
623
|
table,
|
711
624
|
});
|
625
|
+
const { draggingBorderColor } = getMRTTheme(table, theme);
|
712
626
|
const [skeletonWidth, setSkeletonWidth] = react.useState(100);
|
713
627
|
react.useEffect(() => {
|
714
628
|
if ((!isLoading && !showSkeletons) || skeletonWidth !== 100)
|
@@ -727,13 +641,13 @@ const MRT_TableBodyCell = (_a) => {
|
|
727
641
|
const isLastColumn = getIsLastColumn(column, table);
|
728
642
|
const isLastRow = numRows && rowIndex === numRows - 1;
|
729
643
|
const borderStyle = columnSizingInfo.isResizingColumn === column.id
|
730
|
-
? `2px solid ${
|
644
|
+
? `2px solid ${draggingBorderColor} !important`
|
731
645
|
: isDraggingColumn || isDraggingRow
|
732
|
-
? `1px dashed ${theme.palette.
|
646
|
+
? `1px dashed ${theme.palette.grey[500]} !important`
|
733
647
|
: isHoveredColumn ||
|
734
648
|
isHoveredRow ||
|
735
649
|
columnSizingInfo.isResizingColumn === column.id
|
736
|
-
? `2px dashed ${
|
650
|
+
? `2px dashed ${draggingBorderColor} !important`
|
737
651
|
: undefined;
|
738
652
|
if (columnSizingInfo.isResizingColumn === column.id) {
|
739
653
|
return { borderRight: borderStyle };
|
@@ -798,13 +712,13 @@ const MRT_TableBodyCell = (_a) => {
|
|
798
712
|
setHoveredColumn(columnDef.enableColumnOrdering !== false ? column : null);
|
799
713
|
}
|
800
714
|
};
|
801
|
-
return (jsxRuntime.jsx(
|
715
|
+
return (jsxRuntime.jsx(TableCell, Object.assign({ "data-index": virtualIndex, ref: (node) => {
|
802
716
|
if (node) {
|
803
717
|
measureElement === null || measureElement === void 0 ? void 0 : measureElement(node);
|
804
718
|
}
|
805
719
|
} }, tableCellProps, { onDoubleClick: handleDoubleClick, onDragEnter: handleDragEnter, sx: (theme) => (Object.assign(Object.assign({ '&:hover': {
|
806
720
|
outline: ['cell', 'table'].includes(editDisplayMode !== null && editDisplayMode !== void 0 ? editDisplayMode : '') && isEditable
|
807
|
-
? `1px solid ${theme.palette.
|
721
|
+
? `1px solid ${theme.palette.grey[500]}`
|
808
722
|
: undefined,
|
809
723
|
outlineOffset: '-1px',
|
810
724
|
textOverflow: 'clip',
|
@@ -827,12 +741,12 @@ const MRT_TableBodyCell = (_a) => {
|
|
827
741
|
: density === 'comfortable'
|
828
742
|
? 0.75
|
829
743
|
: 1.25)}rem`
|
830
|
-
: undefined, textOverflow: columnDefType !== 'display' ? 'ellipsis' : undefined, whiteSpace: row.getIsPinned() || density === 'compact' ? 'nowrap' : 'normal', zIndex: (draggingColumn === null || draggingColumn === void 0 ? void 0 : draggingColumn.id) === column.id ? 2 : column.getIsPinned() ? 1 : 0 },
|
744
|
+
: undefined, textOverflow: columnDefType !== 'display' ? 'ellipsis' : undefined, whiteSpace: row.getIsPinned() || density === 'compact' ? 'nowrap' : 'normal', zIndex: (draggingColumn === null || draggingColumn === void 0 ? void 0 : draggingColumn.id) === column.id ? 2 : column.getIsPinned() ? 1 : 0 }, getCommonMRTCellStyles({
|
831
745
|
column,
|
832
746
|
table,
|
833
747
|
tableCellProps,
|
834
748
|
theme,
|
835
|
-
})), draggingBorders)), children: (_b = tableCellProps.children) !== null && _b !== void 0 ? _b : (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [cell.getIsPlaceholder() ? ((_d = (_c = columnDef.PlaceholderCell) === null || _c === void 0 ? void 0 : _c.call(columnDef, { cell, column, row, table })) !== null && _d !== void 0 ? _d : null) : showSkeletons !== false && (isLoading || showSkeletons) ? (jsxRuntime.jsx(
|
749
|
+
})), draggingBorders)), children: (_b = tableCellProps.children) !== null && _b !== void 0 ? _b : (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [cell.getIsPlaceholder() ? ((_d = (_c = columnDef.PlaceholderCell) === null || _c === void 0 ? void 0 : _c.call(columnDef, { cell, column, row, table })) !== null && _d !== void 0 ? _d : null) : showSkeletons !== false && (isLoading || showSkeletons) ? (jsxRuntime.jsx(Skeleton, Object.assign({ animation: "wave", height: 20, width: skeletonWidth }, skeletonProps))) : enableRowNumbers &&
|
836
750
|
rowNumberMode === 'static' &&
|
837
751
|
column.id === 'mrt-row-numbers' ? (rowIndex + 1) : column.id === 'mrt-row-drag' ? (jsxRuntime.jsx(MRT_TableBodyRowGrabHandle, { row: row, rowRef: rowRef, table: table })) : columnDefType === 'display' &&
|
838
752
|
(column.id === 'mrt-row-select' ||
|
@@ -862,16 +776,16 @@ const MRT_TableDetailPanel = (_a) => {
|
|
862
776
|
row,
|
863
777
|
table,
|
864
778
|
})), rest);
|
865
|
-
return (jsxRuntime.jsx(
|
779
|
+
return (jsxRuntime.jsx(TableRow, Object.assign({ className: "Mui-TableBodyCell-DetailPanel" }, tableRowProps, { sx: (theme) => {
|
866
780
|
var _a, _b;
|
867
781
|
return (Object.assign({ display: (layoutMode === null || layoutMode === void 0 ? void 0 : layoutMode.startsWith('grid')) ? 'flex' : undefined, position: virtualRow ? 'absolute' : undefined, top: virtualRow
|
868
782
|
? `${(_b = (_a = parentRowRef.current) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect()) === null || _b === void 0 ? void 0 : _b.height}px`
|
869
783
|
: undefined, transform: virtualRow
|
870
784
|
? `translateY(${virtualRow === null || virtualRow === void 0 ? void 0 : virtualRow.start}px)`
|
871
785
|
: undefined, width: '100%', zIndex: virtualRow ? 2 : undefined }, parseFromValuesOrFunc(tableRowProps === null || tableRowProps === void 0 ? void 0 : tableRowProps.sx, theme)));
|
872
|
-
}, children: jsxRuntime.jsx(
|
873
|
-
?
|
874
|
-
: undefined, borderBottom: !row.getIsExpanded() ? 'none' : undefined, display: (layoutMode === null || layoutMode === void 0 ? void 0 : layoutMode.startsWith('grid')) ? 'flex' : undefined, py: row.getIsExpanded() ? '1rem' : 0, transition: 'all 150ms ease-in-out', width: `${table.getTotalSize()}px` }, parseFromValuesOrFunc(tableCellProps === null || tableCellProps === void 0 ? void 0 : tableCellProps.sx, theme))), children: renderDetailPanel && (jsxRuntime.jsx(
|
786
|
+
}, children: jsxRuntime.jsx(TableCell, Object.assign({ className: "Mui-TableBodyCell-DetailPanel", colSpan: getVisibleLeafColumns().length }, tableCellProps, { sx: (theme) => (Object.assign({ backgroundColor: virtualRow
|
787
|
+
? getMRTTheme(table, theme).baseBackgroundColor
|
788
|
+
: undefined, borderBottom: !row.getIsExpanded() ? 'none' : undefined, display: (layoutMode === null || layoutMode === void 0 ? void 0 : layoutMode.startsWith('grid')) ? 'flex' : undefined, py: row.getIsExpanded() ? '1rem' : 0, transition: 'all 150ms ease-in-out', width: `${table.getTotalSize()}px` }, parseFromValuesOrFunc(tableCellProps === null || tableCellProps === void 0 ? void 0 : tableCellProps.sx, theme))), children: renderDetailPanel && (jsxRuntime.jsx(Collapse, { in: row.getIsExpanded(), mountOnEnter: true, unmountOnExit: true, children: !isLoading && renderDetailPanel({ row, table }) })) })) })));
|
875
789
|
};
|
876
790
|
|
877
791
|
const MRT_TableBodyRow = ({ columnVirtualizer, measureElement, numRows, pinnedRowIds, row, rowIndex, table, virtualColumns, virtualPaddingLeft, virtualPaddingRight, virtualRow, }) => {
|
@@ -911,7 +825,8 @@ const MRT_TableBodyRow = ({ columnVirtualizer, measureElement, numRows, pinnedRo
|
|
911
825
|
}
|
912
826
|
};
|
913
827
|
const rowRef = react.useRef(null);
|
914
|
-
|
828
|
+
const { baseBackgroundColor, pinnedRowBackgroundColor, selectedRowBackgroundColor, } = getMRTTheme(table, theme);
|
829
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs(TableRow, Object.assign({ "data-index": virtualRow === null || virtualRow === void 0 ? void 0 : virtualRow.index, onDragEnter: handleDragEnter, ref: (node) => {
|
915
830
|
if (node) {
|
916
831
|
rowRef.current = node;
|
917
832
|
measureElement === null || measureElement === void 0 ? void 0 : measureElement(node);
|
@@ -921,12 +836,12 @@ const MRT_TableBodyRow = ({ columnVirtualizer, measureElement, numRows, pinnedRo
|
|
921
836
|
: undefined }, tableRowProps === null || tableRowProps === void 0 ? void 0 : tableRowProps.style), sx: (theme) => (Object.assign({ '&:hover td': {
|
922
837
|
backgroundColor: (tableRowProps === null || tableRowProps === void 0 ? void 0 : tableRowProps.hover) !== false
|
923
838
|
? row.getIsSelected()
|
924
|
-
? `${styles.alpha(
|
839
|
+
? `${styles.alpha(selectedRowBackgroundColor, 0.3)}`
|
925
840
|
: theme.palette.mode === 'dark'
|
926
|
-
? `${styles.lighten(
|
927
|
-
: `${styles.darken(
|
841
|
+
? `${styles.lighten(baseBackgroundColor, 0.05)}`
|
842
|
+
: `${styles.darken(baseBackgroundColor, 0.05)}`
|
928
843
|
: undefined,
|
929
|
-
}, backgroundColor: `${
|
844
|
+
}, backgroundColor: `${baseBackgroundColor} !important`, bottom: !virtualRow && bottomPinnedIndex !== undefined && isPinned
|
930
845
|
? `${bottomPinnedIndex * rowHeight +
|
931
846
|
(enableStickyFooter ? tableFooterHeight - 1 : 0)}px`
|
932
847
|
: undefined, boxSizing: 'border-box', display: (layoutMode === null || layoutMode === void 0 ? void 0 : layoutMode.startsWith('grid')) ? 'flex' : undefined, opacity: isPinned
|
@@ -939,9 +854,9 @@ const MRT_TableBodyRow = ({ columnVirtualizer, measureElement, numRows, pinnedRo
|
|
939
854
|
? 'sticky'
|
940
855
|
: undefined, td: {
|
941
856
|
backgroundColor: row.getIsSelected()
|
942
|
-
?
|
857
|
+
? selectedRowBackgroundColor
|
943
858
|
: isPinned
|
944
|
-
?
|
859
|
+
? pinnedRowBackgroundColor
|
945
860
|
: undefined,
|
946
861
|
}, top: virtualRow
|
947
862
|
? 0
|
@@ -1063,7 +978,7 @@ const MRT_TableBody = (_a) => {
|
|
1063
978
|
? rowVirtualizer.getVirtualItems()
|
1064
979
|
: undefined;
|
1065
980
|
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [!(rowPinningDisplayMode === null || rowPinningDisplayMode === void 0 ? void 0 : rowPinningDisplayMode.includes('sticky')) &&
|
1066
|
-
getIsSomeRowsPinned('top') && (jsxRuntime.jsx(
|
981
|
+
getIsSomeRowsPinned('top') && (jsxRuntime.jsx(TableBody, Object.assign({}, tableBodyProps, { sx: (theme) => (Object.assign({ display: (layoutMode === null || layoutMode === void 0 ? void 0 : layoutMode.startsWith('grid')) ? 'grid' : undefined, position: 'sticky', top: tableHeadHeight - 1, zIndex: 1 }, parseFromValuesOrFunc(tableBodyProps === null || tableBodyProps === void 0 ? void 0 : tableBodyProps.sx, theme))), children: getTopRows().map((row, rowIndex) => {
|
1067
982
|
const props = {
|
1068
983
|
columnVirtualizer,
|
1069
984
|
measureElement: rowVirtualizer === null || rowVirtualizer === void 0 ? void 0 : rowVirtualizer.measureElement,
|
@@ -1076,15 +991,13 @@ const MRT_TableBody = (_a) => {
|
|
1076
991
|
virtualPaddingRight,
|
1077
992
|
};
|
1078
993
|
return memoMode === 'rows' ? (jsxRuntime.jsx(Memo_MRT_TableBodyRow, Object.assign({}, props), row.id)) : (jsxRuntime.jsx(MRT_TableBodyRow, Object.assign({}, props), row.id));
|
1079
|
-
}) }))), jsxRuntime.jsxs(
|
994
|
+
}) }))), jsxRuntime.jsxs(TableBody, Object.assign({}, tableBodyProps, { sx: (theme) => (Object.assign({ display: (layoutMode === null || layoutMode === void 0 ? void 0 : layoutMode.startsWith('grid')) ? 'grid' : undefined, height: rowVirtualizer
|
1080
995
|
? `${rowVirtualizer.getTotalSize()}px`
|
1081
996
|
: 'inherit', minHeight: !rows.length ? '100px' : undefined, position: 'relative' }, parseFromValuesOrFunc(tableBodyProps === null || tableBodyProps === void 0 ? void 0 : tableBodyProps.sx, theme))), children: [creatingRow && createDisplayMode === 'row' && (jsxRuntime.jsx(MRT_TableBodyRow, { row: creatingRow, rowIndex: -1, table: table })), (_d = tableBodyProps === null || tableBodyProps === void 0 ? void 0 : tableBodyProps.children) !== null && _d !== void 0 ? _d : (!rows.length ? (jsxRuntime.jsx("tr", { style: {
|
1082
997
|
display: (layoutMode === null || layoutMode === void 0 ? void 0 : layoutMode.startsWith('grid')) ? 'grid' : undefined,
|
1083
998
|
}, children: jsxRuntime.jsx("td", { colSpan: table.getVisibleLeafColumns().length, style: {
|
1084
|
-
display: (layoutMode === null || layoutMode === void 0 ? void 0 : layoutMode.startsWith('grid'))
|
1085
|
-
|
1086
|
-
: undefined,
|
1087
|
-
}, children: (_e = renderEmptyRowsFallback === null || renderEmptyRowsFallback === void 0 ? void 0 : renderEmptyRowsFallback({ table })) !== null && _e !== void 0 ? _e : (jsxRuntime.jsx(Typography__default["default"], { sx: {
|
999
|
+
display: (layoutMode === null || layoutMode === void 0 ? void 0 : layoutMode.startsWith('grid')) ? 'grid' : undefined,
|
1000
|
+
}, children: (_e = renderEmptyRowsFallback === null || renderEmptyRowsFallback === void 0 ? void 0 : renderEmptyRowsFallback({ table })) !== null && _e !== void 0 ? _e : (jsxRuntime.jsx(Typography, { sx: {
|
1088
1001
|
color: 'text.secondary',
|
1089
1002
|
fontStyle: 'italic',
|
1090
1003
|
maxWidth: `min(100vw, ${(_g = (_f = tablePaperRef.current) === null || _f === void 0 ? void 0 : _f.clientWidth) !== null && _g !== void 0 ? _g : 360}px)`,
|
@@ -1114,7 +1027,7 @@ const MRT_TableBody = (_a) => {
|
|
1114
1027
|
};
|
1115
1028
|
return memoMode === 'rows' ? (jsxRuntime.jsx(Memo_MRT_TableBodyRow, Object.assign({}, props), row.id)) : (jsxRuntime.jsx(MRT_TableBodyRow, Object.assign({}, props), row.id));
|
1116
1029
|
}) })))] })), !(rowPinningDisplayMode === null || rowPinningDisplayMode === void 0 ? void 0 : rowPinningDisplayMode.includes('sticky')) &&
|
1117
|
-
getIsSomeRowsPinned('bottom') && (jsxRuntime.jsx(
|
1030
|
+
getIsSomeRowsPinned('bottom') && (jsxRuntime.jsx(TableBody, Object.assign({}, tableBodyProps, { sx: (theme) => (Object.assign({ bottom: tableFooterHeight - 1, display: (layoutMode === null || layoutMode === void 0 ? void 0 : layoutMode.startsWith('grid')) ? 'grid' : undefined, position: 'sticky', zIndex: 1 }, parseFromValuesOrFunc(tableBodyProps === null || tableBodyProps === void 0 ? void 0 : tableBodyProps.sx, theme))), children: getBottomRows().map((row, rowIndex) => {
|
1118
1031
|
const props = {
|
1119
1032
|
columnVirtualizer,
|
1120
1033
|
measureElement: rowVirtualizer === null || rowVirtualizer === void 0 ? void 0 : rowVirtualizer.measureElement,
|
@@ -1141,11 +1054,11 @@ const MRT_TableFooterCell = (_a) => {
|
|
1141
1054
|
const { columnDefType } = columnDef;
|
1142
1055
|
const args = { column, table };
|
1143
1056
|
const tableCellProps = Object.assign(Object.assign(Object.assign({}, parseFromValuesOrFunc(muiTableFooterCellProps, args)), parseFromValuesOrFunc(columnDef.muiTableFooterCellProps, args)), rest);
|
1144
|
-
return (jsxRuntime.jsx(
|
1057
|
+
return (jsxRuntime.jsx(TableCell, Object.assign({ align: columnDefType === 'group' ? 'center' : 'left', colSpan: footer.colSpan, variant: "head" }, tableCellProps, { sx: (theme) => (Object.assign(Object.assign({ display: (layoutMode === null || layoutMode === void 0 ? void 0 : layoutMode.startsWith('grid')) ? 'grid' : undefined, fontWeight: 'bold', justifyContent: columnDefType === 'group' ? 'center' : undefined, p: density === 'compact'
|
1145
1058
|
? '0.5rem'
|
1146
1059
|
: density === 'comfortable'
|
1147
1060
|
? '1rem'
|
1148
|
-
: '1.5rem', verticalAlign: 'top', zIndex: column.getIsPinned() && columnDefType !== 'group' ? 2 : 1 },
|
1061
|
+
: '1.5rem', verticalAlign: 'top', zIndex: column.getIsPinned() && columnDefType !== 'group' ? 2 : 1 }, getCommonMRTCellStyles({
|
1149
1062
|
column,
|
1150
1063
|
table,
|
1151
1064
|
tableCellProps,
|
@@ -1172,7 +1085,7 @@ const MRT_TableFooterRow = (_a) => {
|
|
1172
1085
|
footerGroup,
|
1173
1086
|
table,
|
1174
1087
|
})), rest);
|
1175
|
-
return (jsxRuntime.jsxs(
|
1088
|
+
return (jsxRuntime.jsxs(TableRow, Object.assign({}, tableRowProps, { sx: (theme) => (Object.assign({ backgroundColor: getMRTTheme(table, theme).baseBackgroundColor, display: (layoutMode === null || layoutMode === void 0 ? void 0 : layoutMode.startsWith('grid')) ? 'flex' : undefined, width: '100%' }, parseFromValuesOrFunc(tableRowProps === null || tableRowProps === void 0 ? void 0 : tableRowProps.sx, theme))), children: [virtualPaddingLeft ? (jsxRuntime.jsx("th", { style: { display: 'flex', width: virtualPaddingLeft } })) : null, (virtualColumns !== null && virtualColumns !== void 0 ? virtualColumns : footerGroup.headers).map((footerOrVirtualFooter) => {
|
1176
1089
|
const footer = virtualColumns
|
1177
1090
|
? footerGroup.headers[footerOrVirtualFooter.index]
|
1178
1091
|
: footerOrVirtualFooter;
|
@@ -1188,7 +1101,7 @@ const MRT_TableFooter = (_a) => {
|
|
1188
1101
|
table,
|
1189
1102
|
})), rest);
|
1190
1103
|
const stickFooter = (isFullScreen || enableStickyFooter) && enableStickyFooter !== false;
|
1191
|
-
return (jsxRuntime.jsx(
|
1104
|
+
return (jsxRuntime.jsx(TableFooter, Object.assign({}, tableFooterProps, { ref: (ref) => {
|
1192
1105
|
tableFooterRef.current = ref;
|
1193
1106
|
if (tableFooterProps === null || tableFooterProps === void 0 ? void 0 : tableFooterProps.ref) {
|
1194
1107
|
// @ts-ignore
|
@@ -1373,7 +1286,7 @@ const MRT_FilterOptionMenu = (_a) => {
|
|
1373
1286
|
onSelect === null || onSelect === void 0 ? void 0 : onSelect();
|
1374
1287
|
};
|
1375
1288
|
const filterOption = !!header && columnDef ? columnDef._filterFn : globalFilterFn;
|
1376
|
-
return (jsxRuntime.jsx(
|
1289
|
+
return (jsxRuntime.jsx(Menu, Object.assign({ MenuListProps: {
|
1377
1290
|
dense: density === 'compact',
|
1378
1291
|
}, anchorEl: anchorEl, anchorOrigin: { horizontal: 'right', vertical: 'center' }, onClose: () => setAnchorEl(null), open: !!anchorEl }, rest, { children: (_e = (header && column && columnDef
|
1379
1292
|
? (_d = (_c = columnDef.renderColumnFilterModeMenuItems) === null || _c === void 0 ? void 0 : _c.call(columnDef, {
|
@@ -1391,13 +1304,13 @@ const MRT_FilterOptionMenu = (_a) => {
|
|
1391
1304
|
internalFilterOptions,
|
1392
1305
|
onSelectFilterMode: handleSelectFilterMode,
|
1393
1306
|
table,
|
1394
|
-
}))) !== null && _e !== void 0 ? _e : internalFilterOptions.map(({ divider, label, option, symbol }, index) => (jsxRuntime.jsxs(
|
1307
|
+
}))) !== null && _e !== void 0 ? _e : internalFilterOptions.map(({ divider, label, option, symbol }, index) => (jsxRuntime.jsxs(MenuItem, { divider: divider, onClick: () => handleSelectFilterMode(option), selected: option === filterOption, sx: {
|
1395
1308
|
alignItems: 'center',
|
1396
1309
|
display: 'flex',
|
1397
1310
|
gap: '2ch',
|
1398
1311
|
my: 0,
|
1399
1312
|
py: '6px',
|
1400
|
-
}, value: option, children: [jsxRuntime.jsx(
|
1313
|
+
}, value: option, children: [jsxRuntime.jsx(Box, { sx: { fontSize: '1.25rem', width: '2ch' }, children: symbol }), label] }, index))) })));
|
1401
1314
|
};
|
1402
1315
|
|
1403
1316
|
const commonMenuItemStyles = {
|
@@ -1476,48 +1389,48 @@ const MRT_ColumnActionMenu = (_a) => {
|
|
1476
1389
|
const internalColumnMenuItems = [
|
1477
1390
|
...(enableSorting && column.getCanSort()
|
1478
1391
|
? [
|
1479
|
-
enableSortingRemoval !== false && (jsxRuntime.jsx(
|
1480
|
-
jsxRuntime.jsx(
|
1481
|
-
jsxRuntime.jsx(
|
1392
|
+
enableSortingRemoval !== false && (jsxRuntime.jsx(MenuItem, { disabled: !column.getIsSorted(), onClick: handleClearSort, sx: commonMenuItemStyles, children: jsxRuntime.jsxs(Box, { sx: commonListItemStyles, children: [jsxRuntime.jsx(ListItemIcon, { children: jsxRuntime.jsx(ClearAllIcon, {}) }), localization.clearSort] }) }, 0)),
|
1393
|
+
jsxRuntime.jsx(MenuItem, { disabled: column.getIsSorted() === 'asc', onClick: handleSortAsc, sx: commonMenuItemStyles, children: jsxRuntime.jsxs(Box, { sx: commonListItemStyles, children: [jsxRuntime.jsx(ListItemIcon, { children: jsxRuntime.jsx(SortIcon, { style: { transform: 'rotate(180deg) scaleX(-1)' } }) }), (_c = localization.sortByColumnAsc) === null || _c === void 0 ? void 0 : _c.replace('{column}', String(columnDef.header))] }) }, 1),
|
1394
|
+
jsxRuntime.jsx(MenuItem, { disabled: column.getIsSorted() === 'desc', divider: enableColumnFilters || enableGrouping || enableHiding, onClick: handleSortDesc, sx: commonMenuItemStyles, children: jsxRuntime.jsxs(Box, { sx: commonListItemStyles, children: [jsxRuntime.jsx(ListItemIcon, { children: jsxRuntime.jsx(SortIcon, {}) }), (_d = localization.sortByColumnDesc) === null || _d === void 0 ? void 0 : _d.replace('{column}', String(columnDef.header))] }) }, 2),
|
1482
1395
|
]
|
1483
1396
|
: []),
|
1484
1397
|
...(enableColumnFilters && column.getCanFilter()
|
1485
1398
|
? [
|
1486
|
-
jsxRuntime.jsx(
|
1399
|
+
jsxRuntime.jsx(MenuItem, { disabled: !columnFilterValue ||
|
1487
1400
|
(Array.isArray(columnFilterValue) &&
|
1488
|
-
!columnFilterValue.filter((value) => value).length), onClick: handleClearFilter, sx: commonMenuItemStyles, children: jsxRuntime.jsxs(
|
1489
|
-
columnFilterDisplayMode === 'subheader' && (jsxRuntime.jsxs(
|
1401
|
+
!columnFilterValue.filter((value) => value).length), onClick: handleClearFilter, sx: commonMenuItemStyles, children: jsxRuntime.jsxs(Box, { sx: commonListItemStyles, children: [jsxRuntime.jsx(ListItemIcon, { children: jsxRuntime.jsx(FilterListOffIcon, {}) }), localization.clearFilter] }) }, 3),
|
1402
|
+
columnFilterDisplayMode === 'subheader' && (jsxRuntime.jsxs(MenuItem, { disabled: showColumnFilters && !enableColumnFilterModes, divider: enableGrouping || enableHiding, onClick: showColumnFilters
|
1490
1403
|
? handleOpenFilterModeMenu
|
1491
|
-
: handleFilterByColumn, sx: commonMenuItemStyles, children: [jsxRuntime.jsxs(
|
1404
|
+
: handleFilterByColumn, sx: commonMenuItemStyles, children: [jsxRuntime.jsxs(Box, { sx: commonListItemStyles, children: [jsxRuntime.jsx(ListItemIcon, { children: jsxRuntime.jsx(FilterListIcon, {}) }), (_e = localization.filterByColumn) === null || _e === void 0 ? void 0 : _e.replace('{column}', String(columnDef.header))] }), showFilterModeSubMenu && (jsxRuntime.jsx(IconButton, { onClick: handleOpenFilterModeMenu, onMouseEnter: handleOpenFilterModeMenu, size: "small", sx: { p: 0 }, children: jsxRuntime.jsx(ArrowRightIcon, {}) }))] }, 4)),
|
1492
1405
|
showFilterModeSubMenu && (jsxRuntime.jsx(MRT_FilterOptionMenu, { anchorEl: filterMenuAnchorEl, header: header, onSelect: handleFilterByColumn, setAnchorEl: setFilterMenuAnchorEl, table: table }, 5)),
|
1493
1406
|
].filter(Boolean)
|
1494
1407
|
: []),
|
1495
1408
|
...(enableGrouping && column.getCanGroup()
|
1496
1409
|
? [
|
1497
|
-
jsxRuntime.jsx(
|
1410
|
+
jsxRuntime.jsx(MenuItem, { divider: enableColumnPinning, onClick: handleGroupByColumn, sx: commonMenuItemStyles, children: jsxRuntime.jsxs(Box, { sx: commonListItemStyles, children: [jsxRuntime.jsx(ListItemIcon, { children: jsxRuntime.jsx(DynamicFeedIcon, {}) }), (_f = localization[column.getIsGrouped() ? 'ungroupByColumn' : 'groupByColumn']) === null || _f === void 0 ? void 0 : _f.replace('{column}', String(columnDef.header))] }) }, 6),
|
1498
1411
|
]
|
1499
1412
|
: []),
|
1500
1413
|
...(enableColumnPinning && column.getCanPin()
|
1501
1414
|
? [
|
1502
|
-
jsxRuntime.jsx(
|
1503
|
-
jsxRuntime.jsx(
|
1504
|
-
jsxRuntime.jsx(
|
1415
|
+
jsxRuntime.jsx(MenuItem, { disabled: column.getIsPinned() === 'left' || !column.getCanPin(), onClick: () => handlePinColumn('left'), sx: commonMenuItemStyles, children: jsxRuntime.jsxs(Box, { sx: commonListItemStyles, children: [jsxRuntime.jsx(ListItemIcon, { children: jsxRuntime.jsx(PushPinIcon, { style: { transform: 'rotate(90deg)' } }) }), localization.pinToLeft] }) }, 7),
|
1416
|
+
jsxRuntime.jsx(MenuItem, { disabled: column.getIsPinned() === 'right' || !column.getCanPin(), onClick: () => handlePinColumn('right'), sx: commonMenuItemStyles, children: jsxRuntime.jsxs(Box, { sx: commonListItemStyles, children: [jsxRuntime.jsx(ListItemIcon, { children: jsxRuntime.jsx(PushPinIcon, { style: { transform: 'rotate(-90deg)' } }) }), localization.pinToRight] }) }, 8),
|
1417
|
+
jsxRuntime.jsx(MenuItem, { disabled: !column.getIsPinned(), divider: enableHiding, onClick: () => handlePinColumn(false), sx: commonMenuItemStyles, children: jsxRuntime.jsxs(Box, { sx: commonListItemStyles, children: [jsxRuntime.jsx(ListItemIcon, { children: jsxRuntime.jsx(PushPinIcon, {}) }), localization.unpin] }) }, 9),
|
1505
1418
|
]
|
1506
1419
|
: []),
|
1507
1420
|
...(enableColumnResizing && column.getCanResize()
|
1508
1421
|
? [
|
1509
|
-
jsxRuntime.jsx(
|
1422
|
+
jsxRuntime.jsx(MenuItem, { disabled: !columnSizing[column.id], onClick: handleResetColumnSize, sx: commonMenuItemStyles, children: jsxRuntime.jsxs(Box, { sx: commonListItemStyles, children: [jsxRuntime.jsx(ListItemIcon, { children: jsxRuntime.jsx(RestartAltIcon, {}) }), localization.resetColumnSize] }) }, 10),
|
1510
1423
|
]
|
1511
1424
|
: []),
|
1512
1425
|
...(enableHiding
|
1513
1426
|
? [
|
1514
|
-
jsxRuntime.jsx(
|
1515
|
-
jsxRuntime.jsx(
|
1516
|
-
.length, onClick: handleShowAllColumns, sx: commonMenuItemStyles, children: jsxRuntime.jsxs(
|
1427
|
+
jsxRuntime.jsx(MenuItem, { disabled: !column.getCanHide(), onClick: handleHideColumn, sx: commonMenuItemStyles, children: jsxRuntime.jsxs(Box, { sx: commonListItemStyles, children: [jsxRuntime.jsx(ListItemIcon, { children: jsxRuntime.jsx(VisibilityOffIcon, {}) }), (_g = localization.hideColumn) === null || _g === void 0 ? void 0 : _g.replace('{column}', String(columnDef.header))] }) }, 11),
|
1428
|
+
jsxRuntime.jsx(MenuItem, { disabled: !Object.values(columnVisibility).filter((visible) => !visible)
|
1429
|
+
.length, onClick: handleShowAllColumns, sx: commonMenuItemStyles, children: jsxRuntime.jsxs(Box, { sx: commonListItemStyles, children: [jsxRuntime.jsx(ListItemIcon, { children: jsxRuntime.jsx(ViewColumnIcon, {}) }), (_h = localization.showAllColumns) === null || _h === void 0 ? void 0 : _h.replace('{column}', String(columnDef.header))] }) }, 12),
|
1517
1430
|
]
|
1518
1431
|
: []),
|
1519
1432
|
].filter(Boolean);
|
1520
|
-
return (jsxRuntime.jsx(
|
1433
|
+
return (jsxRuntime.jsx(Menu, Object.assign({ MenuListProps: {
|
1521
1434
|
dense: density === 'compact',
|
1522
1435
|
}, anchorEl: anchorEl, onClose: () => setAnchorEl(null), open: !!anchorEl }, rest, { children: (_l = (_k = (_j = columnDef.renderColumnActionsMenuItems) === null || _j === void 0 ? void 0 : _j.call(columnDef, {
|
1523
1436
|
closeMenu: () => setAnchorEl(null),
|
@@ -1535,7 +1448,7 @@ const MRT_ColumnActionMenu = (_a) => {
|
|
1535
1448
|
const MRT_TableHeadCellColumnActionsButton = (_a) => {
|
1536
1449
|
var _b;
|
1537
1450
|
var { header, table } = _a, rest = __rest(_a, ["header", "table"]);
|
1538
|
-
const { options: {
|
1451
|
+
const { options: { icons: { MoreVertIcon }, localization, muiColumnActionsButtonProps, }, } = table;
|
1539
1452
|
const { column } = header;
|
1540
1453
|
const { columnDef } = column;
|
1541
1454
|
const [anchorEl, setAnchorEl] = react.useState(null);
|
@@ -1551,9 +1464,9 @@ const MRT_TableHeadCellColumnActionsButton = (_a) => {
|
|
1551
1464
|
column,
|
1552
1465
|
table,
|
1553
1466
|
})), rest);
|
1554
|
-
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(
|
1467
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Tooltip, { arrow: true, enterDelay: 1000, enterNextDelay: 1000, placement: "top", title: (_b = iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.title) !== null && _b !== void 0 ? _b : localization.columnActions, children: jsxRuntime.jsx(IconButton, Object.assign({ "aria-label": localization.columnActions, onClick: handleClick, size: "small" }, iconButtonProps, { sx: (theme) => (Object.assign({ '&:hover': {
|
1555
1468
|
opacity: 1,
|
1556
|
-
}, height: '2rem', m: '-4px', opacity: 0.3,
|
1469
|
+
}, height: '2rem', m: '-8px -4px', opacity: 0.3, transition: 'all 150ms', width: '2rem' }, parseFromValuesOrFunc(iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.sx, theme))), title: undefined, children: jsxRuntime.jsx(MoreVertIcon, { style: { transform: 'scale(0.9)' } }) })) }), anchorEl && (jsxRuntime.jsx(MRT_ColumnActionMenu, { anchorEl: anchorEl, header: header, setAnchorEl: setAnchorEl, table: table }))] }));
|
1557
1470
|
};
|
1558
1471
|
|
1559
1472
|
const MRT_FilterCheckbox = (_a) => {
|
@@ -1570,7 +1483,7 @@ const MRT_FilterCheckbox = (_a) => {
|
|
1570
1483
|
table,
|
1571
1484
|
})), rest);
|
1572
1485
|
const filterLabel = (_b = localization.filterByColumn) === null || _b === void 0 ? void 0 : _b.replace('{column}', columnDef.header);
|
1573
|
-
return (jsxRuntime.jsx(
|
1486
|
+
return (jsxRuntime.jsx(Tooltip, { arrow: true, enterDelay: 1000, enterNextDelay: 1000, title: (_c = checkboxProps === null || checkboxProps === void 0 ? void 0 : checkboxProps.title) !== null && _c !== void 0 ? _c : filterLabel, children: jsxRuntime.jsx(FormControlLabel, { control: jsxRuntime.jsx(Checkbox, Object.assign({ checked: column.getFilterValue() === 'true', color: column.getFilterValue() === undefined ? 'default' : 'primary', indeterminate: column.getFilterValue() === undefined, size: density === 'compact' ? 'small' : 'medium' }, checkboxProps, { onChange: (e, checked) => {
|
1574
1487
|
var _a;
|
1575
1488
|
column.setFilterValue(column.getFilterValue() === undefined
|
1576
1489
|
? 'true'
|
@@ -1728,12 +1641,12 @@ const MRT_FilterTextField = (_a) => {
|
|
1728
1641
|
isMultiSelectFilter,
|
1729
1642
|
isSelectFilter,
|
1730
1643
|
]);
|
1731
|
-
const endAdornment = !isAutocompleteFilter && !isDateFilter && !filterChipLabel ? (jsxRuntime.jsx(
|
1644
|
+
const endAdornment = !isAutocompleteFilter && !isDateFilter && !filterChipLabel ? (jsxRuntime.jsx(InputAdornment, { position: "end", sx: { mr: isSelectFilter || isMultiSelectFilter ? '20px' : undefined }, children: jsxRuntime.jsx(Tooltip, { arrow: true, placement: "right", title: (_j = localization.clearFilter) !== null && _j !== void 0 ? _j : '', children: jsxRuntime.jsx("span", { children: jsxRuntime.jsx(IconButton, { "aria-label": localization.clearFilter, disabled: !((_k = filterValue === null || filterValue === void 0 ? void 0 : filterValue.toString()) === null || _k === void 0 ? void 0 : _k.length), onClick: handleClear, size: "small", sx: {
|
1732
1645
|
height: '2rem',
|
1733
1646
|
transform: 'scale(0.9)',
|
1734
1647
|
width: '2rem',
|
1735
1648
|
}, children: jsxRuntime.jsx(CloseIcon, {}) }) }) }) })) : null;
|
1736
|
-
const startAdornment = showChangeModeButton ? (jsxRuntime.jsxs(
|
1649
|
+
const startAdornment = showChangeModeButton ? (jsxRuntime.jsxs(InputAdornment, { position: "start", children: [jsxRuntime.jsx(Tooltip, { arrow: true, title: localization.changeFilterMode, children: jsxRuntime.jsx("span", { children: jsxRuntime.jsx(IconButton, { "aria-label": localization.changeFilterMode, onClick: handleFilterMenuOpen, size: "small", sx: { height: '1.75rem', width: '1.75rem' }, children: jsxRuntime.jsx(FilterListIcon, {}) }) }) }), filterChipLabel && (jsxRuntime.jsx(Chip, { label: filterChipLabel, onDelete: handleClearEmptyFilterChip }))] })) : null;
|
1737
1650
|
const commonTextFieldProps = Object.assign(Object.assign({ FormHelperTextProps: {
|
1738
1651
|
sx: {
|
1739
1652
|
fontSize: '0.75rem',
|
@@ -1775,24 +1688,24 @@ const MRT_FilterTextField = (_a) => {
|
|
1775
1688
|
}, value: filterValue || null }, datePickerProps, { slotProps: {
|
1776
1689
|
field: Object.assign({ clearable: true, onClear: () => handleClear() }, (_m = datePickerProps === null || datePickerProps === void 0 ? void 0 : datePickerProps.slotProps) === null || _m === void 0 ? void 0 : _m.field),
|
1777
1690
|
textField: Object.assign(Object.assign({}, commonTextFieldProps), (_o = datePickerProps === null || datePickerProps === void 0 ? void 0 : datePickerProps.slotProps) === null || _o === void 0 ? void 0 : _o.textField),
|
1778
|
-
} }))) : isAutocompleteFilter ? (jsxRuntime.jsx(
|
1691
|
+
} }))) : isAutocompleteFilter ? (jsxRuntime.jsx(Autocomplete, Object.assign({ freeSolo: true, getOptionLabel: (option) => option, onChange: (_e, newValue) => handleChange(newValue), options: dropdownOptions !== null && dropdownOptions !== void 0 ? dropdownOptions : [] }, autocompleteProps, { renderInput: (builtinTextFieldProps) => {
|
1779
1692
|
var _a;
|
1780
|
-
return (jsxRuntime.jsx(
|
1781
|
-
}, value: filterValue }))) : (jsxRuntime.jsx(
|
1693
|
+
return (jsxRuntime.jsx(TextField, Object.assign({}, builtinTextFieldProps, commonTextFieldProps, { InputProps: Object.assign(Object.assign({}, builtinTextFieldProps.InputProps), { startAdornment: (_a = commonTextFieldProps === null || commonTextFieldProps === void 0 ? void 0 : commonTextFieldProps.InputProps) === null || _a === void 0 ? void 0 : _a.startAdornment }), inputProps: Object.assign(Object.assign({}, builtinTextFieldProps.inputProps), commonTextFieldProps === null || commonTextFieldProps === void 0 ? void 0 : commonTextFieldProps.inputProps), onChange: handleTextFieldChange })));
|
1694
|
+
}, value: filterValue }))) : (jsxRuntime.jsx(TextField, Object.assign({ SelectProps: {
|
1782
1695
|
displayEmpty: true,
|
1783
1696
|
multiple: isMultiSelectFilter,
|
1784
1697
|
renderValue: isMultiSelectFilter
|
1785
|
-
? (selected) => !(selected === null || selected === void 0 ? void 0 : selected.length) ? (jsxRuntime.jsx(
|
1698
|
+
? (selected) => !(selected === null || selected === void 0 ? void 0 : selected.length) ? (jsxRuntime.jsx(Box, { sx: { opacity: 0.5 }, children: filterPlaceholder })) : (jsxRuntime.jsx(Box, { sx: { display: 'flex', flexWrap: 'wrap', gap: '2px' }, children: selected === null || selected === void 0 ? void 0 : selected.map((value) => {
|
1786
1699
|
const selectedValue = dropdownOptions === null || dropdownOptions === void 0 ? void 0 : dropdownOptions.find((option) => option instanceof Object
|
1787
1700
|
? option.value === value
|
1788
1701
|
: option === value);
|
1789
|
-
return (jsxRuntime.jsx(
|
1702
|
+
return (jsxRuntime.jsx(Chip, { label: selectedValue instanceof Object
|
1790
1703
|
? selectedValue.text
|
1791
1704
|
: selectedValue }, value));
|
1792
1705
|
}) }))
|
1793
1706
|
: undefined,
|
1794
1707
|
}, onChange: handleTextFieldChange, select: isSelectFilter || isMultiSelectFilter }, commonTextFieldProps, { value: filterValue !== null && filterValue !== void 0 ? filterValue : '', children: (isSelectFilter || isMultiSelectFilter) && [
|
1795
|
-
jsxRuntime.jsx(
|
1708
|
+
jsxRuntime.jsx(MenuItem, { disabled: true, divider: true, hidden: true, value: "", children: jsxRuntime.jsx(Box, { sx: { opacity: 0.5 }, children: filterPlaceholder }) }, "p"),
|
1796
1709
|
...[
|
1797
1710
|
(_p = textFieldProps.children) !== null && _p !== void 0 ? _p : dropdownOptions === null || dropdownOptions === void 0 ? void 0 : dropdownOptions.map((option, index) => {
|
1798
1711
|
var _a;
|
@@ -1808,12 +1721,12 @@ const MRT_FilterTextField = (_a) => {
|
|
1808
1721
|
value = option.value;
|
1809
1722
|
text = option.text;
|
1810
1723
|
}
|
1811
|
-
return (jsxRuntime.jsxs(
|
1724
|
+
return (jsxRuntime.jsxs(MenuItem, { sx: {
|
1812
1725
|
alignItems: 'center',
|
1813
1726
|
display: 'flex',
|
1814
1727
|
gap: '0.5rem',
|
1815
1728
|
m: 0,
|
1816
|
-
}, value: value, children: [isMultiSelectFilter && (jsxRuntime.jsx(
|
1729
|
+
}, value: value, children: [isMultiSelectFilter && (jsxRuntime.jsx(Checkbox, { checked: ((_a = column.getFilterValue()) !== null && _a !== void 0 ? _a : []).includes(value), sx: { mr: '0.5rem' } })), text, ' ', !columnDef.filterSelectOptions &&
|
1817
1730
|
`(${facetedUniqueValues.get(value)})`] }, `${index}-${value}`));
|
1818
1731
|
}),
|
1819
1732
|
],
|
@@ -1822,7 +1735,7 @@ const MRT_FilterTextField = (_a) => {
|
|
1822
1735
|
|
1823
1736
|
const MRT_FilterRangeFields = (_a) => {
|
1824
1737
|
var { header, table } = _a, rest = __rest(_a, ["header", "table"]);
|
1825
|
-
return (jsxRuntime.jsxs(
|
1738
|
+
return (jsxRuntime.jsxs(Box, Object.assign({}, rest, { sx: (theme) => (Object.assign({ display: 'grid', gap: '1rem', gridTemplateColumns: '1fr 1fr' }, parseFromValuesOrFunc(rest === null || rest === void 0 ? void 0 : rest.sx, theme))), children: [jsxRuntime.jsx(MRT_FilterTextField, { header: header, rangeFilterIndex: 0, table: table }), jsxRuntime.jsx(MRT_FilterTextField, { header: header, rangeFilterIndex: 1, table: table })] })));
|
1826
1739
|
};
|
1827
1740
|
|
1828
1741
|
const MRT_FilterRangeSlider = (_a) => {
|
@@ -1860,7 +1773,7 @@ const MRT_FilterRangeSlider = (_a) => {
|
|
1860
1773
|
}
|
1861
1774
|
isMounted.current = true;
|
1862
1775
|
}, [columnFilterValue, min, max]);
|
1863
|
-
return (jsxRuntime.jsxs(
|
1776
|
+
return (jsxRuntime.jsxs(Stack, { children: [jsxRuntime.jsx(Slider, Object.assign({ disableSwap: true, max: max, min: min, onChange: (_event, values) => {
|
1864
1777
|
setFilterValues(values);
|
1865
1778
|
}, onChangeCommitted: (_event, value) => {
|
1866
1779
|
if (Array.isArray(value)) {
|
@@ -1886,7 +1799,7 @@ const MRT_FilterRangeSlider = (_a) => {
|
|
1886
1799
|
}
|
1887
1800
|
},
|
1888
1801
|
},
|
1889
|
-
}, sx: (theme) => (Object.assign({ m: 'auto', mt: !showChangeModeButton ? '10px' : '6px', px: '4px', width: 'calc(100% - 8px)' }, parseFromValuesOrFunc(sliderProps === null || sliderProps === void 0 ? void 0 : sliderProps.sx, theme))) })), showChangeModeButton ? (jsxRuntime.jsx(
|
1802
|
+
}, sx: (theme) => (Object.assign({ m: 'auto', mt: !showChangeModeButton ? '10px' : '6px', px: '4px', width: 'calc(100% - 8px)' }, parseFromValuesOrFunc(sliderProps === null || sliderProps === void 0 ? void 0 : sliderProps.sx, theme))) })), showChangeModeButton ? (jsxRuntime.jsx(FormHelperText, { sx: {
|
1890
1803
|
fontSize: '0.75rem',
|
1891
1804
|
lineHeight: '0.8rem',
|
1892
1805
|
m: '-3px -6px',
|
@@ -1904,7 +1817,7 @@ const MRT_TableHeadCellFilterContainer = (_a) => {
|
|
1904
1817
|
const { showColumnFilters } = getState();
|
1905
1818
|
const { column } = header;
|
1906
1819
|
const { columnDef } = column;
|
1907
|
-
return (jsxRuntime.jsx(
|
1820
|
+
return (jsxRuntime.jsx(Collapse, Object.assign({ in: showColumnFilters || columnFilterDisplayMode === 'popover', mountOnEnter: true, unmountOnExit: true }, rest, { children: columnDef.filterVariant === 'checkbox' ? (jsxRuntime.jsx(MRT_FilterCheckbox, { column: column, table: table })) : columnDef.filterVariant === 'range-slider' ? (jsxRuntime.jsx(MRT_FilterRangeSlider, { header: header, table: table })) : ((_b = columnDef.filterVariant) === null || _b === void 0 ? void 0 : _b.includes('range')) ||
|
1908
1821
|
['between', 'betweenInclusive', 'inNumberRange'].includes(columnDef._filterFn) ? (jsxRuntime.jsx(MRT_FilterRangeFields, { header: header, table: table })) : (jsxRuntime.jsx(MRT_FilterTextField, { header: header, table: table })) })));
|
1909
1822
|
};
|
1910
1823
|
|
@@ -1934,10 +1847,10 @@ const MRT_TableHeadCellFilterLabel = (_a) => {
|
|
1934
1847
|
? filterValue.join(`" ${isRangeFilter ? localization.and : localization.or} "`)
|
1935
1848
|
: filterValue}"`)
|
1936
1849
|
.replace('" "', '');
|
1937
|
-
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(
|
1850
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Grow, { in: columnFilterDisplayMode === 'popover' ||
|
1938
1851
|
(!!filterValue && !isRangeFilter) ||
|
1939
1852
|
(isRangeFilter && // @ts-ignore
|
1940
|
-
(!!(filterValue === null || filterValue === void 0 ? void 0 : filterValue[0]) || !!(filterValue === null || filterValue === void 0 ? void 0 : filterValue[1]))), unmountOnExit: true, children: jsxRuntime.jsx(
|
1853
|
+
(!!(filterValue === null || filterValue === void 0 ? void 0 : filterValue[0]) || !!(filterValue === null || filterValue === void 0 ? void 0 : filterValue[1]))), unmountOnExit: true, children: jsxRuntime.jsx(Box, { component: "span", sx: { flex: '0 0' }, children: jsxRuntime.jsx(Tooltip, { arrow: true, placement: "top", title: filterTooltip, children: jsxRuntime.jsx(IconButton, Object.assign({ disableRipple: true, onClick: (event) => {
|
1941
1854
|
if (columnFilterDisplayMode === 'popover') {
|
1942
1855
|
setAnchorEl(event.currentTarget);
|
1943
1856
|
}
|
@@ -1950,7 +1863,7 @@ const MRT_TableHeadCellFilterLabel = (_a) => {
|
|
1950
1863
|
(_b = filterInputRefs.current[`${column.id}-0`]) === null || _b === void 0 ? void 0 : _b.select();
|
1951
1864
|
});
|
1952
1865
|
event.stopPropagation();
|
1953
|
-
}, size: "small" }, rest, { sx: (theme) => (Object.assign({ height: '16px', ml: '4px', opacity: isFilterActive ? 1 : 0.3, p: '8px', transform: 'scale(0.75)', transition: 'all 150ms ease-in-out', width: '16px' }, parseFromValuesOrFunc(rest === null || rest === void 0 ? void 0 : rest.sx, theme))), children: jsxRuntime.jsx(FilterAltIcon, {}) })) }) }) }), jsxRuntime.jsx(
|
1866
|
+
}, size: "small" }, rest, { sx: (theme) => (Object.assign({ height: '16px', ml: '4px', opacity: isFilterActive ? 1 : 0.3, p: '8px', transform: 'scale(0.75)', transition: 'all 150ms ease-in-out', width: '16px' }, parseFromValuesOrFunc(rest === null || rest === void 0 ? void 0 : rest.sx, theme))), children: jsxRuntime.jsx(FilterAltIcon, {}) })) }) }) }), jsxRuntime.jsx(Popover, { anchorEl: anchorEl, anchorOrigin: {
|
1954
1867
|
horizontal: 'center',
|
1955
1868
|
vertical: 'top',
|
1956
1869
|
}, onClick: (event) => event.stopPropagation(), onClose: (event) => {
|
@@ -1960,7 +1873,7 @@ const MRT_TableHeadCellFilterLabel = (_a) => {
|
|
1960
1873
|
}, onKeyDown: (event) => event.key === 'Enter' && setAnchorEl(null), open: !!anchorEl, transformOrigin: {
|
1961
1874
|
horizontal: 'center',
|
1962
1875
|
vertical: 'bottom',
|
1963
|
-
}, children: jsxRuntime.jsx(
|
1876
|
+
}, children: jsxRuntime.jsx(Box, { sx: { p: '1rem' }, children: jsxRuntime.jsx(MRT_TableHeadCellFilterContainer, { header: header, table: table }) }) })] }));
|
1964
1877
|
};
|
1965
1878
|
|
1966
1879
|
const MRT_TableHeadCellGrabHandle = (_a) => {
|
@@ -2001,7 +1914,7 @@ const MRT_TableHeadCellResizeHandle = (_a) => {
|
|
2001
1914
|
const { getState, options: { columnResizeMode }, setColumnSizingInfo, } = table;
|
2002
1915
|
const { density } = getState();
|
2003
1916
|
const { column } = header;
|
2004
|
-
return (jsxRuntime.jsx(
|
1917
|
+
return (jsxRuntime.jsx(Box, { className: "Mui-TableHeadCell-ResizeHandle-Wrapper", onDoubleClick: () => {
|
2005
1918
|
setColumnSizingInfo((old) => (Object.assign(Object.assign({}, old), { isResizingColumn: false })));
|
2006
1919
|
column.resetSize();
|
2007
1920
|
}, onMouseDown: header.getResizeHandler(), onTouchStart: header.getResizeHandler(), style: {
|
@@ -2022,7 +1935,7 @@ const MRT_TableHeadCellResizeHandle = (_a) => {
|
|
2022
1935
|
position: 'absolute',
|
2023
1936
|
px: '4px',
|
2024
1937
|
right: '0',
|
2025
|
-
}), children: jsxRuntime.jsx(
|
1938
|
+
}), children: jsxRuntime.jsx(Divider, { className: "Mui-TableHeadCell-ResizeHandle-Divider", flexItem: true, orientation: "vertical", sx: (theme) => (Object.assign({ borderRadius: '2px', borderWidth: '2px', height: '24px', touchAction: 'none', transition: column.getIsResizing()
|
2026
1939
|
? undefined
|
2027
1940
|
: 'all 150ms ease-in-out', userSelect: 'none', zIndex: 4 }, parseFromValuesOrFunc(rest === null || rest === void 0 ? void 0 : rest.sx, theme))) }) }));
|
2028
1941
|
};
|
@@ -2043,8 +1956,10 @@ const MRT_TableHeadCellSortLabel = (_a) => {
|
|
2043
1956
|
: column.getNextSortingOrder() === 'desc'
|
2044
1957
|
? localization.sortByColumnDesc.replace('{column}', columnDef.header)
|
2045
1958
|
: localization.sortByColumnAsc.replace('{column}', columnDef.header);
|
2046
|
-
return (jsxRuntime.jsx(
|
2047
|
-
? (props) => (jsxRuntime.jsx(SyncAltIcon, Object.assign({}, props, { style: {
|
1959
|
+
return (jsxRuntime.jsx(Tooltip, { arrow: true, placement: "top", title: sortTooltip, children: jsxRuntime.jsx(Badge, { badgeContent: sorting.length > 1 ? column.getSortIndex() + 1 : 0, overlap: "circular", children: jsxRuntime.jsx(TableSortLabel, Object.assign({ IconComponent: !isSorted
|
1960
|
+
? (props) => (jsxRuntime.jsx(SyncAltIcon, Object.assign({}, props, { style: {
|
1961
|
+
transform: 'rotate(-90deg) scaleX(0.9) translateX(-1px)',
|
1962
|
+
} })))
|
2048
1963
|
: ArrowDownwardIcon, active: true, "aria-label": sortTooltip, direction: isSorted ? column.getIsSorted() : undefined, onClick: (e) => {
|
2049
1964
|
var _a;
|
2050
1965
|
e.stopPropagation();
|
@@ -2069,6 +1984,7 @@ const MRT_TableHeadCell = (_a) => {
|
|
2069
1984
|
column,
|
2070
1985
|
table,
|
2071
1986
|
})), rest);
|
1987
|
+
const { draggingBorderColor } = getMRTTheme(table, theme);
|
2072
1988
|
const showColumnActions = (enableColumnActions || columnDef.enableColumnActions) &&
|
2073
1989
|
columnDef.enableColumnActions !== false;
|
2074
1990
|
const showDragHandle = enableColumnDragging !== false &&
|
@@ -2091,11 +2007,11 @@ const MRT_TableHeadCell = (_a) => {
|
|
2091
2007
|
const draggingBorders = react.useMemo(() => {
|
2092
2008
|
const borderStyle = columnSizingInfo.isResizingColumn === column.id &&
|
2093
2009
|
!header.subHeaders.length
|
2094
|
-
? `2px solid ${
|
2010
|
+
? `2px solid ${draggingBorderColor} !important`
|
2095
2011
|
: (draggingColumn === null || draggingColumn === void 0 ? void 0 : draggingColumn.id) === column.id
|
2096
|
-
? `1px dashed ${theme.palette.
|
2012
|
+
? `1px dashed ${theme.palette.grey[500]}`
|
2097
2013
|
: (hoveredColumn === null || hoveredColumn === void 0 ? void 0 : hoveredColumn.id) === column.id
|
2098
|
-
? `2px dashed ${
|
2014
|
+
? `2px dashed ${draggingBorderColor}`
|
2099
2015
|
: undefined;
|
2100
2016
|
if (columnSizingInfo.isResizingColumn === column.id) {
|
2101
2017
|
return { borderRight: borderStyle };
|
@@ -2122,7 +2038,7 @@ const MRT_TableHeadCell = (_a) => {
|
|
2122
2038
|
header,
|
2123
2039
|
table,
|
2124
2040
|
})) !== null && _b !== void 0 ? _b : columnDef.header;
|
2125
|
-
return (jsxRuntime.jsxs(
|
2041
|
+
return (jsxRuntime.jsxs(TableCell, Object.assign({ align: columnDefType === 'group' ? 'center' : 'left', colSpan: header.colSpan, onDragEnter: handleDragEnter, ref: (node) => {
|
2126
2042
|
if (node) {
|
2127
2043
|
tableHeadCellRefs.current[column.id] = node;
|
2128
2044
|
}
|
@@ -2150,7 +2066,7 @@ const MRT_TableHeadCell = (_a) => {
|
|
2150
2066
|
? 3
|
2151
2067
|
: column.getIsPinned() && columnDefType !== 'group'
|
2152
2068
|
? 2
|
2153
|
-
: 1 },
|
2069
|
+
: 1 }, getCommonMRTCellStyles({
|
2154
2070
|
column,
|
2155
2071
|
header,
|
2156
2072
|
table,
|
@@ -2158,7 +2074,7 @@ const MRT_TableHeadCell = (_a) => {
|
|
2158
2074
|
theme,
|
2159
2075
|
})), draggingBorders)), children: [header.isPlaceholder
|
2160
2076
|
? null
|
2161
|
-
: (_c = tableCellProps.children) !== null && _c !== void 0 ? _c : (jsxRuntime.jsxs(
|
2077
|
+
: (_c = tableCellProps.children) !== null && _c !== void 0 ? _c : (jsxRuntime.jsxs(Box, { className: "Mui-TableHeadCell-Content", sx: {
|
2162
2078
|
alignItems: 'center',
|
2163
2079
|
display: 'flex',
|
2164
2080
|
flexDirection: (tableCellProps === null || tableCellProps === void 0 ? void 0 : tableCellProps.align) === 'right' ? 'row-reverse' : 'row',
|
@@ -2170,7 +2086,7 @@ const MRT_TableHeadCell = (_a) => {
|
|
2170
2086
|
: 'flex-start',
|
2171
2087
|
position: 'relative',
|
2172
2088
|
width: '100%',
|
2173
|
-
}, children: [jsxRuntime.jsxs(
|
2089
|
+
}, children: [jsxRuntime.jsxs(Box, { className: "Mui-TableHeadCell-Content-Labels", onClick: column.getToggleSortingHandler(), sx: {
|
2174
2090
|
alignItems: 'center',
|
2175
2091
|
cursor: column.getCanSort() && columnDefType !== 'group'
|
2176
2092
|
? 'pointer'
|
@@ -2181,7 +2097,7 @@ const MRT_TableHeadCell = (_a) => {
|
|
2181
2097
|
pl: (tableCellProps === null || tableCellProps === void 0 ? void 0 : tableCellProps.align) === 'center'
|
2182
2098
|
? `${headerPL}rem`
|
2183
2099
|
: undefined,
|
2184
|
-
}, children: [jsxRuntime.jsx(
|
2100
|
+
}, children: [jsxRuntime.jsx(Box, { className: "Mui-TableHeadCell-Content-Wrapper", sx: {
|
2185
2101
|
'&:hover': {
|
2186
2102
|
textOverflow: 'clip',
|
2187
2103
|
},
|
@@ -2191,7 +2107,7 @@ const MRT_TableHeadCell = (_a) => {
|
|
2191
2107
|
whiteSpace: ((_h = (_g = columnDef.header) === null || _g === void 0 ? void 0 : _g.length) !== null && _h !== void 0 ? _h : 0) < 20
|
2192
2108
|
? 'nowrap'
|
2193
2109
|
: 'normal',
|
2194
|
-
}, title: columnDefType === 'data' ? columnDef.header : undefined, children: headerElement }), column.getCanFilter() && (jsxRuntime.jsx(MRT_TableHeadCellFilterLabel, { header: header, table: table })), column.getCanSort() && (jsxRuntime.jsx(MRT_TableHeadCellSortLabel, { header: header, table: table
|
2110
|
+
}, title: columnDefType === 'data' ? columnDef.header : undefined, children: headerElement }), column.getCanFilter() && (jsxRuntime.jsx(MRT_TableHeadCellFilterLabel, { header: header, table: table })), column.getCanSort() && (jsxRuntime.jsx(MRT_TableHeadCellSortLabel, { header: header, table: table }))] }), columnDefType !== 'group' && (jsxRuntime.jsxs(Box, { className: "Mui-TableHeadCell-Content-Actions", sx: { whiteSpace: 'nowrap' }, children: [showDragHandle && (jsxRuntime.jsx(MRT_TableHeadCellGrabHandle, { column: column, table: table, tableHeadCellRef: {
|
2195
2111
|
current: tableHeadCellRefs.current[column.id],
|
2196
2112
|
} })), showColumnActions && (jsxRuntime.jsx(MRT_TableHeadCellColumnActionsButton, { header: header, table: table }))] })), column.getCanResize() && (jsxRuntime.jsx(MRT_TableHeadCellResizeHandle, { header: header, table: table }))] })), columnFilterDisplayMode === 'subheader' && column.getCanFilter() && (jsxRuntime.jsx(MRT_TableHeadCellFilterContainer, { header: header, table: table }))] })));
|
2197
2113
|
};
|
@@ -2203,7 +2119,7 @@ const MRT_TableHeadRow = (_a) => {
|
|
2203
2119
|
headerGroup,
|
2204
2120
|
table,
|
2205
2121
|
})), { rest });
|
2206
|
-
return (jsxRuntime.jsxs(
|
2122
|
+
return (jsxRuntime.jsxs(TableRow, Object.assign({}, tableRowProps, { sx: (theme) => (Object.assign({ backgroundColor: getMRTTheme(table, theme).baseBackgroundColor, boxShadow: `4px 0 8px ${material.alpha(theme.palette.common.black, 0.1)}`, display: (layoutMode === null || layoutMode === void 0 ? void 0 : layoutMode.startsWith('grid')) ? 'flex' : undefined, top: 0 }, parseFromValuesOrFunc(tableRowProps === null || tableRowProps === void 0 ? void 0 : tableRowProps.sx, theme))), children: [virtualPaddingLeft ? (jsxRuntime.jsx("th", { style: { display: 'flex', width: virtualPaddingLeft } })) : null, (virtualColumns !== null && virtualColumns !== void 0 ? virtualColumns : headerGroup.headers).map((headerOrVirtualHeader) => {
|
2207
2123
|
const header = virtualColumns
|
2208
2124
|
? headerGroup.headers[headerOrVirtualHeader.index]
|
2209
2125
|
: headerOrVirtualHeader;
|
@@ -2219,12 +2135,12 @@ const MRT_LinearProgressBar = (_a) => {
|
|
2219
2135
|
isTopToolbar,
|
2220
2136
|
table,
|
2221
2137
|
})), rest);
|
2222
|
-
return (jsxRuntime.jsx(
|
2138
|
+
return (jsxRuntime.jsx(Collapse, { in: showProgressBars !== false && (showProgressBars || isSaving), mountOnEnter: true, sx: {
|
2223
2139
|
bottom: isTopToolbar ? 0 : undefined,
|
2224
2140
|
position: 'absolute',
|
2225
2141
|
top: !isTopToolbar ? 0 : undefined,
|
2226
2142
|
width: '100%',
|
2227
|
-
}, unmountOnExit: true, children: jsxRuntime.jsx(
|
2143
|
+
}, unmountOnExit: true, children: jsxRuntime.jsx(LinearProgress, Object.assign({ "aria-busy": "true", "aria-label": "Loading", sx: { position: 'relative' } }, linearProgressProps)) }));
|
2228
2144
|
};
|
2229
2145
|
|
2230
2146
|
const defaultRowsPerPage = [5, 10, 15, 20, 25, 30, 50, 100];
|
@@ -2241,7 +2157,7 @@ const MRT_TablePagination = (_a) => {
|
|
2241
2157
|
const firstRowIndex = pageIndex * pageSize;
|
2242
2158
|
const lastRowIndex = Math.min(pageIndex * pageSize + pageSize, totalRowCount);
|
2243
2159
|
const _b = paginationProps !== null && paginationProps !== void 0 ? paginationProps : {}, { rowsPerPageOptions = defaultRowsPerPage, showFirstButton = showFirstLastPageButtons, showLastButton = showFirstLastPageButtons, showRowsPerPage = true } = _b, _rest = __rest(_b, ["rowsPerPageOptions", "showFirstButton", "showLastButton", "showRowsPerPage"]);
|
2244
|
-
return (jsxRuntime.jsxs(
|
2160
|
+
return (jsxRuntime.jsxs(Box, { sx: {
|
2245
2161
|
alignItems: 'center',
|
2246
2162
|
display: 'flex',
|
2247
2163
|
flexWrap: 'wrap',
|
@@ -2257,12 +2173,12 @@ const MRT_TablePagination = (_a) => {
|
|
2257
2173
|
px: '8px',
|
2258
2174
|
py: '12px',
|
2259
2175
|
zIndex: 2,
|
2260
|
-
}, children: [showRowsPerPage && (jsxRuntime.jsxs(
|
2176
|
+
}, children: [showRowsPerPage && (jsxRuntime.jsxs(Box, { sx: { alignItems: 'center', display: 'flex', gap: '8px' }, children: [jsxRuntime.jsx(InputLabel, { htmlFor: "mrt-rows-per-page", sx: { mb: 0 }, children: localization.rowsPerPage }), jsxRuntime.jsx(Select, { disableUnderline: true, id: "mrt-rows-per-page", inputProps: { 'aria-label': localization.rowsPerPage }, label: localization.rowsPerPage, onChange: (event) => setPageSize(+event.target.value), sx: { mb: 0 }, value: pageSize, variant: "standard", children: rowsPerPageOptions.map((value) => (jsxRuntime.jsx(MenuItem, { sx: { m: 0 }, value: value, children: value }, value))) })] })), paginationDisplayMode === 'pages' ? (jsxRuntime.jsx(Pagination, Object.assign({ count: numberOfPages, onChange: (_e, newPageIndex) => setPageIndex(newPageIndex - 1), page: pageIndex + 1, renderItem: (item) => (jsxRuntime.jsx(PaginationItem, Object.assign({ slots: {
|
2261
2177
|
first: FirstPageIcon,
|
2262
2178
|
last: LastPageIcon,
|
2263
2179
|
next: ChevronRightIcon,
|
2264
2180
|
previous: ChevronLeftIcon,
|
2265
|
-
} }, item))), showFirstButton: showFirstButton, showLastButton: showLastButton }, _rest))) : paginationDisplayMode === 'default' ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(
|
2181
|
+
} }, item))), showFirstButton: showFirstButton, showLastButton: showLastButton }, _rest))) : paginationDisplayMode === 'default' ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Typography, { align: "center", sx: { mb: 0, minWidth: '8ch', mx: '4px' }, variant: "body2", children: `${lastRowIndex === 0 ? 0 : (firstRowIndex + 1).toLocaleString()}-${lastRowIndex.toLocaleString()} ${localization.of} ${totalRowCount.toLocaleString()}` }), jsxRuntime.jsxs(Box, { gap: "xs", children: [showFirstButton && (jsxRuntime.jsx(IconButton, { "aria-label": localization.goToFirstPage, disabled: pageIndex <= 0, onClick: () => setPageIndex(0), size: "small", children: jsxRuntime.jsx(FirstPageIcon, {}) })), jsxRuntime.jsx(IconButton, { "aria-label": localization.goToPreviousPage, disabled: pageIndex <= 0, onClick: () => setPageIndex(pageIndex - 1), size: "small", children: jsxRuntime.jsx(ChevronLeftIcon, {}) }), jsxRuntime.jsx(IconButton, { "aria-label": localization.goToNextPage, disabled: lastRowIndex >= totalRowCount, onClick: () => setPageIndex(pageIndex + 1), size: "small", children: jsxRuntime.jsx(ChevronRightIcon, {}) }), showLastButton && (jsxRuntime.jsx(IconButton, { "aria-label": localization.goToLastPage, disabled: lastRowIndex >= totalRowCount, onClick: () => setPageIndex(numberOfPages - 1), size: "small", children: jsxRuntime.jsx(LastPageIcon, {}) }))] })] })) : null] }));
|
2266
2182
|
};
|
2267
2183
|
|
2268
2184
|
const MRT_GlobalFilterTextField = (_a) => {
|
@@ -2302,10 +2218,10 @@ const MRT_GlobalFilterTextField = (_a) => {
|
|
2302
2218
|
}
|
2303
2219
|
isMounted.current = true;
|
2304
2220
|
}, [globalFilter]);
|
2305
|
-
return (jsxRuntime.jsxs(
|
2306
|
-
|
2307
|
-
|
2308
|
-
|
2221
|
+
return (jsxRuntime.jsxs(Collapse, { in: showGlobalFilter, mountOnEnter: true, orientation: "horizontal", unmountOnExit: true, children: [jsxRuntime.jsx(TextField, Object.assign({ InputProps: Object.assign(Object.assign({ endAdornment: (jsxRuntime.jsx(InputAdornment, { position: "end", children: jsxRuntime.jsx(Tooltip, { arrow: true, title: (_b = localization.clearSearch) !== null && _b !== void 0 ? _b : '', children: jsxRuntime.jsx("span", { children: jsxRuntime.jsx(IconButton, { "aria-label": localization.clearSearch, disabled: !(searchValue === null || searchValue === void 0 ? void 0 : searchValue.length), onClick: handleClear, size: "small", children: jsxRuntime.jsx(CloseIcon, {}) }) }) }) })), startAdornment: enableGlobalFilterModes ? (jsxRuntime.jsx(InputAdornment, { position: "start", children: jsxRuntime.jsx(Tooltip, { arrow: true, title: localization.changeSearchMode, children: jsxRuntime.jsx(IconButton, { "aria-label": localization.changeSearchMode, onClick: handleGlobalFilterMenuOpen, size: "small", sx: { height: '1.75rem', width: '1.75rem' }, children: jsxRuntime.jsx(SearchIcon, {}) }) }) })) : (jsxRuntime.jsx(SearchIcon, { style: { marginRight: '4px' } })) }, textFieldProps.InputProps), { sx: (theme) => {
|
2222
|
+
var _a;
|
2223
|
+
return (Object.assign({ mb: 0 }, parseFromValuesOrFunc((_a = textFieldProps === null || textFieldProps === void 0 ? void 0 : textFieldProps.InputProps) === null || _a === void 0 ? void 0 : _a.sx, theme)));
|
2224
|
+
} }), inputProps: Object.assign({ autoComplete: 'new-password' }, textFieldProps.inputProps), onChange: handleChange, placeholder: localization.search, size: "small", value: searchValue !== null && searchValue !== void 0 ? searchValue : '', variant: "outlined" }, textFieldProps, { inputRef: (inputRef) => {
|
2309
2225
|
searchInputRef.current = inputRef;
|
2310
2226
|
if (textFieldProps === null || textFieldProps === void 0 ? void 0 : textFieldProps.inputRef) {
|
2311
2227
|
textFieldProps.inputRef = inputRef;
|
@@ -2354,9 +2270,9 @@ const MRT_SelectCheckbox = (_a) => {
|
|
2354
2270
|
e.stopPropagation();
|
2355
2271
|
(_a = checkboxProps === null || checkboxProps === void 0 ? void 0 : checkboxProps.onClick) === null || _a === void 0 ? void 0 : _a.call(checkboxProps, e);
|
2356
2272
|
}, sx: (theme) => (Object.assign({ height: density === 'compact' ? '1.75rem' : '2.5rem', m: density !== 'compact' ? '-0.4rem' : undefined, width: density === 'compact' ? '1.75rem' : '2.5rem', zIndex: 0 }, parseFromValuesOrFunc(checkboxProps === null || checkboxProps === void 0 ? void 0 : checkboxProps.sx, theme))), title: undefined });
|
2357
|
-
return (jsxRuntime.jsx(
|
2273
|
+
return (jsxRuntime.jsx(Tooltip, { arrow: true, enterDelay: 1000, enterNextDelay: 1000, title: (_b = checkboxProps === null || checkboxProps === void 0 ? void 0 : checkboxProps.title) !== null && _b !== void 0 ? _b : (selectAll
|
2358
2274
|
? localization.toggleSelectAll
|
2359
|
-
: localization.toggleSelectRow), children: enableMultiRowSelection === false ? (jsxRuntime.jsx(
|
2275
|
+
: localization.toggleSelectRow), children: enableMultiRowSelection === false ? (jsxRuntime.jsx(Radio, Object.assign({}, commonProps))) : (jsxRuntime.jsx(Checkbox, Object.assign({ indeterminate: selectAll
|
2360
2276
|
? table.getIsSomeRowsSelected() && !allRowsSelected
|
2361
2277
|
: row === null || row === void 0 ? void 0 : row.getIsSomeSelected() }, commonProps))) }));
|
2362
2278
|
};
|
@@ -2375,8 +2291,8 @@ const MRT_ToolbarAlertBanner = (_a) => {
|
|
2375
2291
|
const selectedAlert = getSelectedRowModel().rows.length > 0
|
2376
2292
|
? (_c = (_b = localization.selectedCountOfRowCountRowsSelected) === null || _b === void 0 ? void 0 : _b.replace('{selectedCount}', getSelectedRowModel().rows.length.toString())) === null || _c === void 0 ? void 0 : _c.replace('{rowCount}', (rowCount !== null && rowCount !== void 0 ? rowCount : getPrePaginationRowModel().rows.length).toString())
|
2377
2293
|
: null;
|
2378
|
-
const groupedAlert = grouping.length > 0 ? (jsxRuntime.jsxs("span", { children: [localization.groupedBy, ' ', grouping.map((columnId, index) => (jsxRuntime.jsxs(react.Fragment, { children: [index > 0 ? localization.thenBy : '', jsxRuntime.jsx(
|
2379
|
-
return (jsxRuntime.jsx(
|
2294
|
+
const groupedAlert = grouping.length > 0 ? (jsxRuntime.jsxs("span", { children: [localization.groupedBy, ' ', grouping.map((columnId, index) => (jsxRuntime.jsxs(react.Fragment, { children: [index > 0 ? localization.thenBy : '', jsxRuntime.jsx(Chip, Object.assign({ label: table.getColumn(columnId).columnDef.header, onDelete: () => table.getColumn(columnId).toggleGrouping() }, chipProps))] }, `${index}-${columnId}`)))] })) : null;
|
2295
|
+
return (jsxRuntime.jsx(Collapse, { in: showAlertBanner || !!selectedAlert || !!groupedAlert, timeout: stackAlertBanner ? 200 : 0, children: jsxRuntime.jsx(Alert, Object.assign({ color: "info", icon: false }, alertProps, { sx: (theme) => {
|
2380
2296
|
var _a, _b;
|
2381
2297
|
return (Object.assign({ '& .MuiAlert-message': {
|
2382
2298
|
maxWidth: `calc(${(_b = (_a = tablePaperRef.current) === null || _a === void 0 ? void 0 : _a.clientWidth) !== null && _b !== void 0 ? _b : 360}px - 1rem)`,
|
@@ -2390,7 +2306,7 @@ const MRT_ToolbarAlertBanner = (_a) => {
|
|
2390
2306
|
groupedAlert,
|
2391
2307
|
selectedAlert,
|
2392
2308
|
table,
|
2393
|
-
})) !== null && _d !== void 0 ? _d : (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [(alertProps === null || alertProps === void 0 ? void 0 : alertProps.title) && jsxRuntime.jsx(
|
2309
|
+
})) !== null && _d !== void 0 ? _d : (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [(alertProps === null || alertProps === void 0 ? void 0 : alertProps.title) && jsxRuntime.jsx(AlertTitle, { children: alertProps.title }), jsxRuntime.jsxs(Stack, { sx: {
|
2394
2310
|
p: positionToolbarAlertBanner !== 'head-overlay'
|
2395
2311
|
? '0.5rem 1rem'
|
2396
2312
|
: density === 'spacious'
|
@@ -2398,7 +2314,7 @@ const MRT_ToolbarAlertBanner = (_a) => {
|
|
2398
2314
|
: density === 'comfortable'
|
2399
2315
|
? '0.5rem 0.75rem'
|
2400
2316
|
: '0.25rem 0.5rem',
|
2401
|
-
}, children: [alertProps === null || alertProps === void 0 ? void 0 : alertProps.children, (alertProps === null || alertProps === void 0 ? void 0 : alertProps.children) && (selectedAlert || groupedAlert) && (jsxRuntime.jsx("br", {})), jsxRuntime.jsxs(
|
2317
|
+
}, children: [alertProps === null || alertProps === void 0 ? void 0 : alertProps.children, (alertProps === null || alertProps === void 0 ? void 0 : alertProps.children) && (selectedAlert || groupedAlert) && (jsxRuntime.jsx("br", {})), jsxRuntime.jsxs(Box, { sx: { display: 'flex' }, children: [enableRowSelection &&
|
2402
2318
|
enableSelectAll &&
|
2403
2319
|
positionToolbarAlertBanner === 'head-overlay' && (jsxRuntime.jsx(MRT_SelectCheckbox, { selectAll: true, table: table })), ' ', selectedAlert] }), selectedAlert && groupedAlert && jsxRuntime.jsx("br", {}), groupedAlert] })] })) })) }));
|
2404
2320
|
};
|
@@ -2420,7 +2336,39 @@ const MRT_ToolbarDropZone = (_a) => {
|
|
2420
2336
|
!grouping.includes(draggingColumn.id));
|
2421
2337
|
}
|
2422
2338
|
}, [enableGrouping, draggingColumn, grouping]);
|
2423
|
-
return (jsxRuntime.jsx(
|
2339
|
+
return (jsxRuntime.jsx(Fade, { in: showToolbarDropZone, children: jsxRuntime.jsx(Box, Object.assign({ className: "Mui-ToolbarDropZone", onDragEnter: handleDragEnter }, rest, { sx: (theme) => (Object.assign({ alignItems: 'center', backdropFilter: 'blur(4px)', backgroundColor: styles.alpha(theme.palette.info.main, (hoveredColumn === null || hoveredColumn === void 0 ? void 0 : hoveredColumn.id) === 'drop-zone' ? 0.2 : 0.1), border: `dashed ${theme.palette.info.main} 2px`, boxSizing: 'border-box', display: 'flex', height: '100%', justifyContent: 'center', position: 'absolute', width: '100%', zIndex: 4 }, parseFromValuesOrFunc(rest === null || rest === void 0 ? void 0 : rest.sx, theme))), children: jsxRuntime.jsx(Typography, { fontStyle: "italic", children: localization.dropToGroupBy.replace('{column}', (_c = (_b = draggingColumn === null || draggingColumn === void 0 ? void 0 : draggingColumn.columnDef) === null || _b === void 0 ? void 0 : _b.header) !== null && _c !== void 0 ? _c : '') }) })) }));
|
2340
|
+
};
|
2341
|
+
|
2342
|
+
const MRT_BottomToolbar = (_a) => {
|
2343
|
+
var { table } = _a, rest = __rest(_a, ["table"]);
|
2344
|
+
const { getState, options: { enablePagination, muiBottomToolbarProps, positionPagination, positionToolbarAlertBanner, positionToolbarDropZone, renderBottomToolbarCustomActions, }, refs: { bottomToolbarRef }, } = table;
|
2345
|
+
const { isFullScreen } = getState();
|
2346
|
+
const isMobile = useMediaQuery('(max-width:720px)');
|
2347
|
+
const toolbarProps = Object.assign(Object.assign({}, parseFromValuesOrFunc(muiBottomToolbarProps, { table })), rest);
|
2348
|
+
const stackAlertBanner = isMobile || !!renderBottomToolbarCustomActions;
|
2349
|
+
return (jsxRuntime.jsxs(Box, Object.assign({}, toolbarProps, { ref: (node) => {
|
2350
|
+
if (node) {
|
2351
|
+
bottomToolbarRef.current = node;
|
2352
|
+
if (toolbarProps === null || toolbarProps === void 0 ? void 0 : toolbarProps.ref) {
|
2353
|
+
// @ts-ignore
|
2354
|
+
toolbarProps.ref.current = node;
|
2355
|
+
}
|
2356
|
+
}
|
2357
|
+
}, sx: (theme) => (Object.assign(Object.assign(Object.assign({}, getCommonToolbarStyles({ table, theme })), { bottom: isFullScreen ? '0' : undefined, boxShadow: `0 1px 2px -1px ${material.alpha(theme.palette.grey[700], 0.5)} inset`, left: 0, position: isFullScreen ? 'fixed' : 'relative', right: 0 }), parseFromValuesOrFunc(toolbarProps === null || toolbarProps === void 0 ? void 0 : toolbarProps.sx, theme))), children: [jsxRuntime.jsx(MRT_LinearProgressBar, { isTopToolbar: false, table: table }), positionToolbarAlertBanner === 'bottom' && (jsxRuntime.jsx(MRT_ToolbarAlertBanner, { stackAlertBanner: stackAlertBanner, table: table })), ['both', 'bottom'].includes(positionToolbarDropZone !== null && positionToolbarDropZone !== void 0 ? positionToolbarDropZone : '') && (jsxRuntime.jsx(MRT_ToolbarDropZone, { table: table })), jsxRuntime.jsxs(Box, { sx: {
|
2358
|
+
alignItems: 'center',
|
2359
|
+
boxSizing: 'border-box',
|
2360
|
+
display: 'flex',
|
2361
|
+
justifyContent: 'space-between',
|
2362
|
+
p: '0.5rem',
|
2363
|
+
width: '100%',
|
2364
|
+
}, children: [renderBottomToolbarCustomActions ? (renderBottomToolbarCustomActions({ table })) : (jsxRuntime.jsx("span", {})), jsxRuntime.jsx(Box, { sx: {
|
2365
|
+
display: 'flex',
|
2366
|
+
justifyContent: 'flex-end',
|
2367
|
+
position: stackAlertBanner ? 'relative' : 'absolute',
|
2368
|
+
right: 0,
|
2369
|
+
top: 0,
|
2370
|
+
}, children: enablePagination &&
|
2371
|
+
['both', 'bottom'].includes(positionPagination !== null && positionPagination !== void 0 ? positionPagination : '') && (jsxRuntime.jsx(MRT_TablePagination, { position: "bottom", table: table })) })] })] })));
|
2424
2372
|
};
|
2425
2373
|
|
2426
2374
|
const MRT_ColumnPinningButtons = (_a) => {
|
@@ -2429,9 +2377,9 @@ const MRT_ColumnPinningButtons = (_a) => {
|
|
2429
2377
|
const handlePinColumn = (pinDirection) => {
|
2430
2378
|
column.pin(pinDirection);
|
2431
2379
|
};
|
2432
|
-
return (jsxRuntime.jsx(
|
2380
|
+
return (jsxRuntime.jsx(Box, Object.assign({}, rest, { sx: (theme) => (Object.assign({ minWidth: '70px', textAlign: 'center' }, parseFromValuesOrFunc(rest === null || rest === void 0 ? void 0 : rest.sx, theme))), children: column.getIsPinned() ? (jsxRuntime.jsx(Tooltip, { arrow: true, title: localization.unpin, children: jsxRuntime.jsx(IconButton, { onClick: () => handlePinColumn(false), size: "small", children: jsxRuntime.jsx(PushPinIcon, {}) }) })) : (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Tooltip, { arrow: true, title: localization.pinToLeft, children: jsxRuntime.jsx(IconButton, { onClick: () => handlePinColumn('left'), size: "small", children: jsxRuntime.jsx(PushPinIcon, { style: {
|
2433
2381
|
transform: 'rotate(90deg)',
|
2434
|
-
} }) }) }), jsxRuntime.jsx(
|
2382
|
+
} }) }) }), jsxRuntime.jsx(Tooltip, { arrow: true, title: localization.pinToRight, children: jsxRuntime.jsx(IconButton, { onClick: () => handlePinColumn('right'), size: "small", children: jsxRuntime.jsx(PushPinIcon, { style: {
|
2435
2383
|
transform: 'rotate(-90deg)',
|
2436
2384
|
} }) }) })] })) })));
|
2437
2385
|
};
|
@@ -2475,26 +2423,26 @@ const MRT_ShowHideColumnsMenuItems = (_a) => {
|
|
2475
2423
|
setHoveredColumn(column);
|
2476
2424
|
}
|
2477
2425
|
};
|
2478
|
-
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(
|
2479
|
-
? `2px dashed ${theme.palette.
|
2426
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(MenuItem, Object.assign({ disableRipple: true, onDragEnter: handleDragEnter, ref: menuItemRef }, rest, { sx: (theme) => (Object.assign({ alignItems: 'center', justifyContent: 'flex-start', my: 0, opacity: isDragging ? 0.5 : 1, outline: isDragging
|
2427
|
+
? `2px dashed ${theme.palette.grey[500]}`
|
2480
2428
|
: (hoveredColumn === null || hoveredColumn === void 0 ? void 0 : hoveredColumn.id) === column.id
|
2481
|
-
? `2px dashed ${theme.
|
2482
|
-
: 'none', outlineOffset: '-2px', pl: `${(column.depth + 0.5) * 2}rem`, py: '6px' }, parseFromValuesOrFunc(rest === null || rest === void 0 ? void 0 : rest.sx, theme))), children: jsxRuntime.jsxs(
|
2429
|
+
? `2px dashed ${getMRTTheme(table, theme).draggingBorderColor}`
|
2430
|
+
: 'none', outlineOffset: '-2px', pl: `${(column.depth + 0.5) * 2}rem`, py: '6px' }, parseFromValuesOrFunc(rest === null || rest === void 0 ? void 0 : rest.sx, theme))), children: jsxRuntime.jsxs(Box, { sx: {
|
2483
2431
|
display: 'flex',
|
2484
2432
|
flexWrap: 'nowrap',
|
2485
2433
|
gap: '8px',
|
2486
2434
|
}, children: [columnDefType !== 'group' &&
|
2487
2435
|
enableColumnOrdering &&
|
2488
2436
|
!allColumns.some((col) => col.columnDef.columnDefType === 'group') &&
|
2489
|
-
(columnDef.enableColumnOrdering !== false ? (jsxRuntime.jsx(MRT_GrabHandleButton, { onDragEnd: handleDragEnd, onDragStart: handleDragStart, table: table })) : (jsxRuntime.jsx(
|
2490
|
-
(column.getCanPin() ? (jsxRuntime.jsx(MRT_ColumnPinningButtons, { column: column, table: table })) : (jsxRuntime.jsx(
|
2437
|
+
(columnDef.enableColumnOrdering !== false ? (jsxRuntime.jsx(MRT_GrabHandleButton, { onDragEnd: handleDragEnd, onDragStart: handleDragStart, table: table })) : (jsxRuntime.jsx(Box, { sx: { width: '28px' } }))), enableColumnPinning &&
|
2438
|
+
(column.getCanPin() ? (jsxRuntime.jsx(MRT_ColumnPinningButtons, { column: column, table: table })) : (jsxRuntime.jsx(Box, { sx: { width: '70px' } }))), enableHiding ? (jsxRuntime.jsx(FormControlLabel, { checked: switchChecked, componentsProps: {
|
2491
2439
|
typography: {
|
2492
2440
|
sx: {
|
2493
2441
|
mb: 0,
|
2494
2442
|
opacity: columnDefType !== 'display' ? 1 : 0.5,
|
2495
2443
|
},
|
2496
2444
|
},
|
2497
|
-
}, control: jsxRuntime.jsx(
|
2445
|
+
}, control: jsxRuntime.jsx(Tooltip, { arrow: true, enterDelay: 1000, enterNextDelay: 1000, title: localization.toggleVisibility, children: jsxRuntime.jsx(Switch, {}) }), disabled: !column.getCanHide(), label: columnDef.header, onChange: () => handleToggleColumnHidden(column) })) : (jsxRuntime.jsx(Typography, { sx: { alignSelf: 'center' }, children: columnDef.header }))] }) })), (_b = column.columns) === null || _b === void 0 ? void 0 : _b.map((c, i) => (jsxRuntime.jsx(MRT_ShowHideColumnsMenuItems, { allColumns: allColumns, column: c, hoveredColumn: hoveredColumn, setHoveredColumn: setHoveredColumn, table: table }, `${i}-${c.id}`)))] }));
|
2498
2446
|
};
|
2499
2447
|
|
2500
2448
|
const MRT_ShowHideColumnsMenu = (_a) => {
|
@@ -2526,14 +2474,14 @@ const MRT_ShowHideColumnsMenu = (_a) => {
|
|
2526
2474
|
getRightLeafColumns(),
|
2527
2475
|
]);
|
2528
2476
|
const [hoveredColumn, setHoveredColumn] = react.useState(null);
|
2529
|
-
return (jsxRuntime.jsxs(
|
2477
|
+
return (jsxRuntime.jsxs(Menu, Object.assign({ MenuListProps: {
|
2530
2478
|
dense: density === 'compact',
|
2531
|
-
}, anchorEl: anchorEl, onClose: () => setAnchorEl(null), open: !!anchorEl }, rest, { children: [jsxRuntime.jsxs(
|
2479
|
+
}, anchorEl: anchorEl, onClose: () => setAnchorEl(null), open: !!anchorEl }, rest, { children: [jsxRuntime.jsxs(Box, { sx: {
|
2532
2480
|
display: 'flex',
|
2533
2481
|
justifyContent: 'space-between',
|
2534
2482
|
p: '0.5rem',
|
2535
2483
|
pt: 0,
|
2536
|
-
}, children: [enableHiding && (jsxRuntime.jsx(
|
2484
|
+
}, children: [enableHiding && (jsxRuntime.jsx(Button, { disabled: !getIsSomeColumnsVisible(), onClick: hideAllColumns, children: localization.hideAll })), enableColumnOrdering && (jsxRuntime.jsx(Button, { onClick: () => table.setColumnOrder(getDefaultColumnOrderIds(table.options)), children: localization.resetOrder })), enableColumnPinning && (jsxRuntime.jsx(Button, { disabled: !getIsSomeColumnsPinned(), onClick: () => table.resetColumnPinning(true), children: localization.unpinAll })), enableHiding && (jsxRuntime.jsx(Button, { disabled: getIsAllColumnsVisible(), onClick: () => toggleAllColumnsVisible(true), children: localization.showAll }))] }), jsxRuntime.jsx(Divider, {}), allColumns.map((column, index) => (jsxRuntime.jsx(MRT_ShowHideColumnsMenuItems, { allColumns: allColumns, column: column, hoveredColumn: hoveredColumn, setHoveredColumn: setHoveredColumn, table: table }, `${index}-${column.id}`)))] })));
|
2537
2485
|
};
|
2538
2486
|
|
2539
2487
|
const MRT_ShowHideColumnsButton = (_a) => {
|
@@ -2544,7 +2492,7 @@ const MRT_ShowHideColumnsButton = (_a) => {
|
|
2544
2492
|
const handleClick = (event) => {
|
2545
2493
|
setAnchorEl(event.currentTarget);
|
2546
2494
|
};
|
2547
|
-
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(
|
2495
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Tooltip, { arrow: true, title: (_b = rest === null || rest === void 0 ? void 0 : rest.title) !== null && _b !== void 0 ? _b : localization.showHideColumns, children: jsxRuntime.jsx(IconButton, Object.assign({ "aria-label": localization.showHideColumns, onClick: handleClick }, rest, { title: undefined, children: jsxRuntime.jsx(ViewColumnIcon, {}) })) }), anchorEl && (jsxRuntime.jsx(MRT_ShowHideColumnsMenu, { anchorEl: anchorEl, setAnchorEl: setAnchorEl, table: table }))] }));
|
2548
2496
|
};
|
2549
2497
|
|
2550
2498
|
const MRT_ToggleDensePaddingButton = (_a) => {
|
@@ -2560,7 +2508,7 @@ const MRT_ToggleDensePaddingButton = (_a) => {
|
|
2560
2508
|
: 'comfortable';
|
2561
2509
|
setDensity(nextDensity);
|
2562
2510
|
};
|
2563
|
-
return (jsxRuntime.jsx(
|
2511
|
+
return (jsxRuntime.jsx(Tooltip, { arrow: true, title: (_b = rest === null || rest === void 0 ? void 0 : rest.title) !== null && _b !== void 0 ? _b : localization.toggleDensity, children: jsxRuntime.jsx(IconButton, Object.assign({ "aria-label": localization.toggleDensity, onClick: handleToggleDensePadding }, rest, { title: undefined, children: density === 'compact' ? (jsxRuntime.jsx(DensitySmallIcon, {})) : density === 'comfortable' ? (jsxRuntime.jsx(DensityMediumIcon, {})) : (jsxRuntime.jsx(DensityLargeIcon, {})) })) }));
|
2564
2512
|
};
|
2565
2513
|
|
2566
2514
|
const MRT_ToggleFiltersButton = (_a) => {
|
@@ -2571,7 +2519,7 @@ const MRT_ToggleFiltersButton = (_a) => {
|
|
2571
2519
|
const handleToggleShowFilters = () => {
|
2572
2520
|
setShowColumnFilters(!showColumnFilters);
|
2573
2521
|
};
|
2574
|
-
return (jsxRuntime.jsx(
|
2522
|
+
return (jsxRuntime.jsx(Tooltip, { arrow: true, title: (_b = rest === null || rest === void 0 ? void 0 : rest.title) !== null && _b !== void 0 ? _b : localization.showHideFilters, children: jsxRuntime.jsx(IconButton, Object.assign({ "aria-label": localization.showHideFilters, onClick: handleToggleShowFilters }, rest, { title: undefined, children: showColumnFilters ? jsxRuntime.jsx(FilterListOffIcon, {}) : jsxRuntime.jsx(FilterListIcon, {}) })) }));
|
2575
2523
|
};
|
2576
2524
|
|
2577
2525
|
const MRT_ToggleFullScreenButton = (_a) => {
|
@@ -2584,7 +2532,7 @@ const MRT_ToggleFullScreenButton = (_a) => {
|
|
2584
2532
|
setTooltipOpened(false);
|
2585
2533
|
setIsFullScreen(!isFullScreen);
|
2586
2534
|
};
|
2587
|
-
return (jsxRuntime.jsx(
|
2535
|
+
return (jsxRuntime.jsx(Tooltip, { arrow: true, open: tooltipOpened, title: (_b = rest === null || rest === void 0 ? void 0 : rest.title) !== null && _b !== void 0 ? _b : localization.toggleFullScreen, children: jsxRuntime.jsx(IconButton, Object.assign({ "aria-label": localization.toggleFullScreen, onClick: handleToggleFullScreen, onMouseEnter: () => setTooltipOpened(true), onMouseLeave: () => setTooltipOpened(false) }, rest, { title: undefined, children: isFullScreen ? jsxRuntime.jsx(FullscreenExitIcon, {}) : jsxRuntime.jsx(FullscreenIcon, {}) })) }));
|
2588
2536
|
};
|
2589
2537
|
|
2590
2538
|
const MRT_ToggleGlobalFilterButton = (_a) => {
|
@@ -2596,14 +2544,14 @@ const MRT_ToggleGlobalFilterButton = (_a) => {
|
|
2596
2544
|
setShowGlobalFilter(!showGlobalFilter);
|
2597
2545
|
queueMicrotask(() => { var _a; return (_a = searchInputRef.current) === null || _a === void 0 ? void 0 : _a.focus(); });
|
2598
2546
|
};
|
2599
|
-
return (jsxRuntime.jsx(
|
2547
|
+
return (jsxRuntime.jsx(Tooltip, { arrow: true, title: (_b = rest === null || rest === void 0 ? void 0 : rest.title) !== null && _b !== void 0 ? _b : localization.showHideSearch, children: jsxRuntime.jsx(IconButton, Object.assign({ "aria-label": (_c = rest === null || rest === void 0 ? void 0 : rest.title) !== null && _c !== void 0 ? _c : localization.showHideSearch, disabled: !!globalFilter, onClick: handleToggleSearch }, rest, { title: undefined, children: showGlobalFilter ? jsxRuntime.jsx(SearchOffIcon, {}) : jsxRuntime.jsx(SearchIcon, {}) })) }));
|
2600
2548
|
};
|
2601
2549
|
|
2602
2550
|
const MRT_ToolbarInternalButtons = (_a) => {
|
2603
2551
|
var _b;
|
2604
2552
|
var { table } = _a, rest = __rest(_a, ["table"]);
|
2605
2553
|
const { options: { columnFilterDisplayMode, enableColumnFilters, enableColumnOrdering, enableColumnPinning, enableDensityToggle, enableFilters, enableFullScreenToggle, enableGlobalFilter, enableHiding, initialState, renderToolbarInternalActions, }, } = table;
|
2606
|
-
return (jsxRuntime.jsx(
|
2554
|
+
return (jsxRuntime.jsx(Box, Object.assign({}, rest, { sx: (theme) => (Object.assign({ alignItems: 'center', display: 'flex', zIndex: 3 }, parseFromValuesOrFunc(rest === null || rest === void 0 ? void 0 : rest.sx, theme))), children: (_b = renderToolbarInternalActions === null || renderToolbarInternalActions === void 0 ? void 0 : renderToolbarInternalActions({
|
2607
2555
|
table,
|
2608
2556
|
})) !== null && _b !== void 0 ? _b : (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [enableFilters &&
|
2609
2557
|
enableGlobalFilter &&
|
@@ -2612,88 +2560,48 @@ const MRT_ToolbarInternalButtons = (_a) => {
|
|
2612
2560
|
columnFilterDisplayMode !== 'popover' && (jsxRuntime.jsx(MRT_ToggleFiltersButton, { table: table })), (enableHiding || enableColumnOrdering || enableColumnPinning) && (jsxRuntime.jsx(MRT_ShowHideColumnsButton, { table: table })), enableDensityToggle && (jsxRuntime.jsx(MRT_ToggleDensePaddingButton, { table: table })), enableFullScreenToggle && (jsxRuntime.jsx(MRT_ToggleFullScreenButton, { table: table }))] })) })));
|
2613
2561
|
};
|
2614
2562
|
|
2615
|
-
const commonToolbarStyles = ({ theme }) => ({
|
2616
|
-
alignItems: 'flex-start',
|
2617
|
-
backgroundColor: styles.lighten(theme.palette.background.default, 0.05),
|
2618
|
-
display: 'grid',
|
2619
|
-
flexWrap: 'wrap-reverse',
|
2620
|
-
minHeight: '3.5rem',
|
2621
|
-
overflow: 'hidden',
|
2622
|
-
position: 'relative',
|
2623
|
-
transition: 'all 150ms ease-in-out',
|
2624
|
-
zIndex: 1,
|
2625
|
-
});
|
2626
2563
|
const MRT_TopToolbar = ({ table, }) => {
|
2627
2564
|
var _a;
|
2628
2565
|
const { getState, options: { enableGlobalFilter, enablePagination, enableToolbarInternalActions, muiTopToolbarProps, positionGlobalFilter, positionPagination, positionToolbarAlertBanner, positionToolbarDropZone, renderTopToolbarCustomActions, }, refs: { topToolbarRef }, } = table;
|
2629
2566
|
const { isFullScreen, showGlobalFilter } = getState();
|
2630
|
-
const isMobile =
|
2567
|
+
const isMobile = useMediaQuery('(max-width:720px)');
|
2631
2568
|
const toolbarProps = parseFromValuesOrFunc(muiTopToolbarProps, { table });
|
2632
2569
|
const stackAlertBanner = isMobile || !!renderTopToolbarCustomActions || showGlobalFilter;
|
2633
|
-
return (jsxRuntime.jsxs(
|
2570
|
+
return (jsxRuntime.jsxs(Box, Object.assign({}, toolbarProps, { ref: (ref) => {
|
2634
2571
|
topToolbarRef.current = ref;
|
2635
2572
|
if (toolbarProps === null || toolbarProps === void 0 ? void 0 : toolbarProps.ref) {
|
2636
2573
|
// @ts-ignore
|
2637
2574
|
toolbarProps.ref.current = ref;
|
2638
2575
|
}
|
2639
|
-
}, sx: (theme) => (Object.assign(Object.assign(Object.assign({},
|
2576
|
+
}, sx: (theme) => (Object.assign(Object.assign(Object.assign({}, getCommonToolbarStyles({ table, theme })), { position: isFullScreen ? 'sticky' : 'relative', top: isFullScreen ? '0' : undefined }), parseFromValuesOrFunc(toolbarProps === null || toolbarProps === void 0 ? void 0 : toolbarProps.sx, theme))), children: [positionToolbarAlertBanner === 'top' && (jsxRuntime.jsx(MRT_ToolbarAlertBanner, { stackAlertBanner: stackAlertBanner, table: table })), ['both', 'top'].includes(positionToolbarDropZone !== null && positionToolbarDropZone !== void 0 ? positionToolbarDropZone : '') && (jsxRuntime.jsx(MRT_ToolbarDropZone, { table: table })), jsxRuntime.jsxs(Box, { sx: {
|
2640
2577
|
alignItems: 'flex-start',
|
2641
2578
|
boxSizing: 'border-box',
|
2642
2579
|
display: 'flex',
|
2580
|
+
gap: '0.5rem',
|
2643
2581
|
justifyContent: 'space-between',
|
2644
2582
|
p: '0.5rem',
|
2645
2583
|
position: stackAlertBanner ? 'relative' : 'absolute',
|
2646
2584
|
right: 0,
|
2647
2585
|
top: 0,
|
2648
2586
|
width: '100%',
|
2649
|
-
}, children: [enableGlobalFilter && positionGlobalFilter === 'left' && (jsxRuntime.jsx(MRT_GlobalFilterTextField, { table: table })), (_a = renderTopToolbarCustomActions === null || renderTopToolbarCustomActions === void 0 ? void 0 : renderTopToolbarCustomActions({ table })) !== null && _a !== void 0 ? _a : jsxRuntime.jsx("span", {}), enableToolbarInternalActions ? (jsxRuntime.jsxs(
|
2587
|
+
}, children: [enableGlobalFilter && positionGlobalFilter === 'left' && (jsxRuntime.jsx(MRT_GlobalFilterTextField, { table: table })), (_a = renderTopToolbarCustomActions === null || renderTopToolbarCustomActions === void 0 ? void 0 : renderTopToolbarCustomActions({ table })) !== null && _a !== void 0 ? _a : jsxRuntime.jsx("span", {}), enableToolbarInternalActions ? (jsxRuntime.jsxs(Box, { sx: {
|
2588
|
+
alignItems: 'center',
|
2650
2589
|
display: 'flex',
|
2651
2590
|
flexWrap: 'wrap-reverse',
|
2591
|
+
gap: '0.5rem',
|
2652
2592
|
justifyContent: 'flex-end',
|
2653
2593
|
}, children: [enableGlobalFilter && positionGlobalFilter === 'right' && (jsxRuntime.jsx(MRT_GlobalFilterTextField, { table: table })), jsxRuntime.jsx(MRT_ToolbarInternalButtons, { table: table })] })) : (enableGlobalFilter &&
|
2654
2594
|
positionGlobalFilter === 'right' && (jsxRuntime.jsx(MRT_GlobalFilterTextField, { table: table })))] }), enablePagination &&
|
2655
2595
|
['both', 'top'].includes(positionPagination !== null && positionPagination !== void 0 ? positionPagination : '') && (jsxRuntime.jsx(MRT_TablePagination, { position: "top", table: table })), jsxRuntime.jsx(MRT_LinearProgressBar, { isTopToolbar: true, table: table })] })));
|
2656
2596
|
};
|
2657
2597
|
|
2658
|
-
const MRT_BottomToolbar = (_a) => {
|
2659
|
-
var { table } = _a, rest = __rest(_a, ["table"]);
|
2660
|
-
const { getState, options: { enablePagination, muiBottomToolbarProps, positionPagination, positionToolbarAlertBanner, positionToolbarDropZone, renderBottomToolbarCustomActions, }, refs: { bottomToolbarRef }, } = table;
|
2661
|
-
const { isFullScreen } = getState();
|
2662
|
-
const isMobile = useMediaQuery__default["default"]('(max-width:720px)');
|
2663
|
-
const toolbarProps = Object.assign(Object.assign({}, parseFromValuesOrFunc(muiBottomToolbarProps, { table })), rest);
|
2664
|
-
const stackAlertBanner = isMobile || !!renderBottomToolbarCustomActions;
|
2665
|
-
return (jsxRuntime.jsxs(Box__default["default"], Object.assign({}, toolbarProps, { ref: (node) => {
|
2666
|
-
if (node) {
|
2667
|
-
bottomToolbarRef.current = node;
|
2668
|
-
if (toolbarProps === null || toolbarProps === void 0 ? void 0 : toolbarProps.ref) {
|
2669
|
-
// @ts-ignore
|
2670
|
-
toolbarProps.ref.current = node;
|
2671
|
-
}
|
2672
|
-
}
|
2673
|
-
}, sx: (theme) => (Object.assign(Object.assign(Object.assign({}, commonToolbarStyles({ theme })), { bottom: isFullScreen ? '0' : undefined, boxShadow: `0 1px 2px -1px ${styles.alpha(theme.palette.common.black, 0.1)} inset`, left: 0, position: isFullScreen ? 'fixed' : 'relative', right: 0 }), parseFromValuesOrFunc(toolbarProps === null || toolbarProps === void 0 ? void 0 : toolbarProps.sx, theme))), children: [jsxRuntime.jsx(MRT_LinearProgressBar, { isTopToolbar: false, table: table }), positionToolbarAlertBanner === 'bottom' && (jsxRuntime.jsx(MRT_ToolbarAlertBanner, { stackAlertBanner: stackAlertBanner, table: table })), ['both', 'bottom'].includes(positionToolbarDropZone !== null && positionToolbarDropZone !== void 0 ? positionToolbarDropZone : '') && (jsxRuntime.jsx(MRT_ToolbarDropZone, { table: table })), jsxRuntime.jsxs(Box__default["default"], { sx: {
|
2674
|
-
alignItems: 'center',
|
2675
|
-
boxSizing: 'border-box',
|
2676
|
-
display: 'flex',
|
2677
|
-
justifyContent: 'space-between',
|
2678
|
-
p: '0.5rem',
|
2679
|
-
width: '100%',
|
2680
|
-
}, children: [renderBottomToolbarCustomActions ? (renderBottomToolbarCustomActions({ table })) : (jsxRuntime.jsx("span", {})), jsxRuntime.jsx(Box__default["default"], { sx: {
|
2681
|
-
display: 'flex',
|
2682
|
-
justifyContent: 'flex-end',
|
2683
|
-
position: stackAlertBanner ? 'relative' : 'absolute',
|
2684
|
-
right: 0,
|
2685
|
-
top: 0,
|
2686
|
-
}, children: enablePagination &&
|
2687
|
-
['both', 'bottom'].includes(positionPagination !== null && positionPagination !== void 0 ? positionPagination : '') && (jsxRuntime.jsx(MRT_TablePagination, { position: "bottom", table: table })) })] })] })));
|
2688
|
-
};
|
2689
|
-
|
2690
2598
|
const MRT_TableHead = (_a) => {
|
2691
2599
|
var { table, virtualColumns, virtualPaddingLeft, virtualPaddingRight } = _a, rest = __rest(_a, ["table", "virtualColumns", "virtualPaddingLeft", "virtualPaddingRight"]);
|
2692
2600
|
const { getHeaderGroups, getSelectedRowModel, getState, options: { enableStickyHeader, layoutMode, muiTableHeadProps, positionToolbarAlertBanner, }, refs: { tableHeadRef }, } = table;
|
2693
2601
|
const { isFullScreen, showAlertBanner } = getState();
|
2694
2602
|
const tableHeadProps = Object.assign(Object.assign({}, parseFromValuesOrFunc(muiTableHeadProps, { table })), rest);
|
2695
2603
|
const stickyHeader = enableStickyHeader || isFullScreen;
|
2696
|
-
return (jsxRuntime.jsx(
|
2604
|
+
return (jsxRuntime.jsx(TableHead, Object.assign({}, tableHeadProps, { ref: (ref) => {
|
2697
2605
|
tableHeadRef.current = ref;
|
2698
2606
|
if (tableHeadProps === null || tableHeadProps === void 0 ? void 0 : tableHeadProps.ref) {
|
2699
2607
|
// @ts-ignore
|
@@ -2779,16 +2687,16 @@ const MRT_Table = (_a) => {
|
|
2779
2687
|
virtualPaddingLeft,
|
2780
2688
|
virtualPaddingRight,
|
2781
2689
|
};
|
2782
|
-
return (jsxRuntime.jsxs(
|
2690
|
+
return (jsxRuntime.jsxs(Table, Object.assign({ stickyHeader: enableStickyHeader || isFullScreen }, tableProps, { style: Object.assign(Object.assign({}, columnSizeVars), tableProps === null || tableProps === void 0 ? void 0 : tableProps.style), sx: (theme) => (Object.assign({ borderCollapse: 'separate', display: (layoutMode === null || layoutMode === void 0 ? void 0 : layoutMode.startsWith('grid')) ? 'grid' : undefined }, parseFromValuesOrFunc(tableProps === null || tableProps === void 0 ? void 0 : tableProps.sx, theme))), children: [enableTableHead && jsxRuntime.jsx(MRT_TableHead, Object.assign({}, props)), memoMode === 'table-body' || columnSizingInfo.isResizingColumn ? (jsxRuntime.jsx(Memo_MRT_TableBody, Object.assign({ columnVirtualizer: columnVirtualizer }, props))) : (jsxRuntime.jsx(MRT_TableBody, Object.assign({ columnVirtualizer: columnVirtualizer }, props))), enableTableFooter && jsxRuntime.jsx(MRT_TableFooter, Object.assign({}, props))] })));
|
2783
2691
|
};
|
2784
2692
|
|
2785
2693
|
const MRT_TableLoadingOverlay = (_a) => {
|
2786
2694
|
var { table } = _a, rest = __rest(_a, ["table"]);
|
2787
2695
|
const { options: { localization, muiCircularProgressProps }, } = table;
|
2788
2696
|
const circularProgressProps = Object.assign(Object.assign({}, parseFromValuesOrFunc(muiCircularProgressProps, { table })), rest);
|
2789
|
-
return (jsxRuntime.jsx(
|
2697
|
+
return (jsxRuntime.jsx(Box, { sx: (theme) => ({
|
2790
2698
|
alignItems: 'center',
|
2791
|
-
backgroundColor: styles.alpha(
|
2699
|
+
backgroundColor: styles.alpha(getMRTTheme(table, theme).baseBackgroundColor, 0.5),
|
2792
2700
|
bottom: 0,
|
2793
2701
|
display: 'flex',
|
2794
2702
|
justifyContent: 'center',
|
@@ -2799,7 +2707,7 @@ const MRT_TableLoadingOverlay = (_a) => {
|
|
2799
2707
|
top: 0,
|
2800
2708
|
width: '100%',
|
2801
2709
|
zIndex: 2,
|
2802
|
-
}), children: jsxRuntime.jsx(
|
2710
|
+
}), children: jsxRuntime.jsx(CircularProgress, Object.assign({ "aria-label": localization.noRecordsToDisplay, id: "mrt-progress" }, circularProgressProps)) }));
|
2803
2711
|
};
|
2804
2712
|
|
2805
2713
|
const MRT_EditActionButtons = (_a) => {
|
@@ -2846,7 +2754,7 @@ const MRT_EditActionButtons = (_a) => {
|
|
2846
2754
|
});
|
2847
2755
|
}
|
2848
2756
|
};
|
2849
|
-
return (jsxRuntime.jsx(
|
2757
|
+
return (jsxRuntime.jsx(Box, { onClick: (e) => e.stopPropagation(), sx: (theme) => (Object.assign({ display: 'flex', gap: '0.75rem' }, parseFromValuesOrFunc(rest === null || rest === void 0 ? void 0 : rest.sx, theme))), children: variant === 'icon' ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Tooltip, { arrow: true, title: localization.cancel, children: jsxRuntime.jsx(IconButton, { "aria-label": localization.cancel, onClick: handleCancel, children: jsxRuntime.jsx(CancelIcon, {}) }) }), jsxRuntime.jsx(Tooltip, { arrow: true, title: localization.save, children: jsxRuntime.jsx(IconButton, { "aria-label": localization.save, color: "info", onClick: handleSubmitRow, children: isSaving ? jsxRuntime.jsx(CircularProgress, { size: 18 }) : jsxRuntime.jsx(SaveIcon, {}) }) })] })) : (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Button, { onClick: handleCancel, sx: { minWidth: '100px' }, children: localization.cancel }), jsxRuntime.jsxs(Button, { onClick: handleSubmitRow, sx: { minWidth: '100px' }, variant: "contained", children: [isSaving && jsxRuntime.jsx(CircularProgress, { color: "inherit", size: 18 }), localization.save] })] })) }));
|
2850
2758
|
};
|
2851
2759
|
|
2852
2760
|
const MRT_EditRowModal = (_a) => {
|
@@ -2861,7 +2769,7 @@ const MRT_EditRowModal = (_a) => {
|
|
2861
2769
|
.getAllCells()
|
2862
2770
|
.filter((cell) => cell.column.columnDef.columnDefType === 'data')
|
2863
2771
|
.map((cell) => (jsxRuntime.jsx(MRT_EditCellTextField, { cell: cell, table: table }, cell.id)));
|
2864
|
-
return (jsxRuntime.jsx(
|
2772
|
+
return (jsxRuntime.jsx(Dialog, Object.assign({ fullWidth: true, maxWidth: "xs", onClose: (event, reason) => {
|
2865
2773
|
var _a;
|
2866
2774
|
if (creatingRow) {
|
2867
2775
|
onCreatingRowCancel === null || onCreatingRowCancel === void 0 ? void 0 : onCreatingRowCancel({ row, table });
|
@@ -2883,11 +2791,11 @@ const MRT_EditRowModal = (_a) => {
|
|
2883
2791
|
internalEditComponents,
|
2884
2792
|
row,
|
2885
2793
|
table,
|
2886
|
-
})))) !== null && _b !== void 0 ? _b : (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(
|
2794
|
+
})))) !== null && _b !== void 0 ? _b : (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(DialogTitle, { sx: { textAlign: 'center' }, children: localization.edit }), jsxRuntime.jsx(DialogContent, { children: jsxRuntime.jsx("form", { onSubmit: (e) => e.preventDefault(), children: jsxRuntime.jsx(Stack, { sx: {
|
2887
2795
|
gap: '32px',
|
2888
2796
|
paddingTop: '16px',
|
2889
2797
|
width: '100%',
|
2890
|
-
}, children: internalEditComponents }) }) }), jsxRuntime.jsx(
|
2798
|
+
}, children: internalEditComponents }) }) }), jsxRuntime.jsx(DialogActions, { sx: { p: '1.25rem' }, children: jsxRuntime.jsx(MRT_EditActionButtons, { row: row, table: table, variant: "text" }) })] })) })));
|
2891
2799
|
};
|
2892
2800
|
|
2893
2801
|
const useIsomorphicLayoutEffect = typeof window !== 'undefined' ? react.useLayoutEffect : react.useEffect;
|
@@ -2912,7 +2820,7 @@ const MRT_TableContainer = (_a) => {
|
|
2912
2820
|
});
|
2913
2821
|
const createModalOpen = createDisplayMode === 'modal' && creatingRow;
|
2914
2822
|
const editModalOpen = editDisplayMode === 'modal' && editingRow;
|
2915
|
-
return (jsxRuntime.jsxs(
|
2823
|
+
return (jsxRuntime.jsxs(TableContainer, Object.assign({ "aria-busy": loading, "aria-describedby": loading ? 'mrt-progress' : undefined }, tableContainerProps, { ref: (node) => {
|
2916
2824
|
if (node) {
|
2917
2825
|
tableContainerRef.current = node;
|
2918
2826
|
if (tableContainerProps === null || tableContainerProps === void 0 ? void 0 : tableContainerProps.ref) {
|
@@ -2933,7 +2841,7 @@ const MRT_TablePaper = (_a) => {
|
|
2933
2841
|
const { getState, options: { enableBottomToolbar, enableTopToolbar, muiTablePaperProps, renderBottomToolbar, renderTopToolbar, }, refs: { tablePaperRef }, } = table;
|
2934
2842
|
const { isFullScreen } = getState();
|
2935
2843
|
const tablePaperProps = Object.assign(Object.assign({}, parseFromValuesOrFunc(muiTablePaperProps, { table })), rest);
|
2936
|
-
return (jsxRuntime.jsxs(
|
2844
|
+
return (jsxRuntime.jsxs(Paper, Object.assign({ elevation: 2 }, tablePaperProps, { ref: (ref) => {
|
2937
2845
|
tablePaperRef.current = ref;
|
2938
2846
|
if (tablePaperProps === null || tablePaperProps === void 0 ? void 0 : tablePaperProps.ref) {
|
2939
2847
|
//@ts-ignore
|
@@ -2952,7 +2860,7 @@ const MRT_TablePaper = (_a) => {
|
|
2952
2860
|
right: 0,
|
2953
2861
|
top: 0,
|
2954
2862
|
width: '100vw',
|
2955
|
-
zIndex:
|
2863
|
+
zIndex: 999,
|
2956
2864
|
}
|
2957
2865
|
: {})), tablePaperProps === null || tablePaperProps === void 0 ? void 0 : tablePaperProps.style), sx: (theme) => (Object.assign({ overflow: 'hidden', transition: 'all 100ms ease-in-out' }, parseFromValuesOrFunc(tablePaperProps === null || tablePaperProps === void 0 ? void 0 : tablePaperProps.sx, theme))), children: [enableTopToolbar &&
|
2958
2866
|
((_b = parseFromValuesOrFunc(renderTopToolbar, { table })) !== null && _b !== void 0 ? _b : (jsxRuntime.jsx(MRT_TopToolbar, { table: table }))), jsxRuntime.jsx(MRT_TableContainer, { table: table }), enableBottomToolbar &&
|
@@ -2969,7 +2877,7 @@ const MRT_RowPinButton = (_a) => {
|
|
2969
2877
|
event.stopPropagation();
|
2970
2878
|
row.pin(isPinned ? false : pinningPosition);
|
2971
2879
|
};
|
2972
|
-
return (jsxRuntime.jsx(
|
2880
|
+
return (jsxRuntime.jsx(Tooltip, { arrow: true, enterDelay: 1000, enterNextDelay: 1000, open: tooltipOpened, title: isPinned ? localization.unpin : localization.pin, children: jsxRuntime.jsx(IconButton, Object.assign({ "aria-label": localization.pin, onClick: handleTogglePin, onMouseEnter: () => setTooltipOpened(true), onMouseLeave: () => setTooltipOpened(false), size: "small" }, rest, { sx: (theme) => (Object.assign({ height: '24px', width: '24px' }, parseFromValuesOrFunc(rest === null || rest === void 0 ? void 0 : rest.sx, theme))), children: isPinned ? (jsxRuntime.jsx(CloseIcon, {})) : (jsxRuntime.jsx(PushPinIcon, { fontSize: "small", style: {
|
2973
2881
|
transform: `rotate(${rowPinningDisplayMode === 'sticky'
|
2974
2882
|
? 135
|
2975
2883
|
: pinningPosition === 'top'
|
@@ -2988,7 +2896,7 @@ const MRT_TableBodyRowPinButton = (_a) => {
|
|
2988
2896
|
const rowPinButtonProps = Object.assign({ row,
|
2989
2897
|
table }, rest);
|
2990
2898
|
if (rowPinningDisplayMode === 'top-and-bottom' && !row.getIsPinned()) {
|
2991
|
-
return (jsxRuntime.jsxs(
|
2899
|
+
return (jsxRuntime.jsxs(Box, { sx: {
|
2992
2900
|
display: 'flex',
|
2993
2901
|
flexDirection: density === 'compact' ? 'row' : 'column',
|
2994
2902
|
}, children: [jsxRuntime.jsx(MRT_RowPinButton, Object.assign({ pinningPosition: "top" }, rowPinButtonProps)), jsxRuntime.jsx(MRT_RowPinButton, Object.assign({ pinningPosition: "bottom" }, rowPinButtonProps))] }));
|
@@ -3005,7 +2913,7 @@ const MRT_ExpandAllButton = (_a) => {
|
|
3005
2913
|
table,
|
3006
2914
|
})), rest);
|
3007
2915
|
const isAllRowsExpanded = getIsAllRowsExpanded();
|
3008
|
-
return (jsxRuntime.jsx(
|
2916
|
+
return (jsxRuntime.jsx(Tooltip, { arrow: true, enterDelay: 1000, enterNextDelay: 1000, title: (_b = iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.title) !== null && _b !== void 0 ? _b : (isAllRowsExpanded ? localization.collapseAll : localization.expandAll), children: jsxRuntime.jsx("span", { children: jsxRuntime.jsx(IconButton, Object.assign({ "aria-label": localization.expandAll, disabled: isLoading || (!renderDetailPanel && !getCanSomeRowsExpand()), onClick: () => toggleAllRowsExpanded(!isAllRowsExpanded) }, iconButtonProps, { sx: (theme) => (Object.assign({ height: density === 'compact' ? '1.75rem' : '2.25rem', mt: density !== 'compact' ? '-0.25rem' : undefined, width: density === 'compact' ? '1.75rem' : '2.25rem' }, parseFromValuesOrFunc(iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.sx, theme))), title: undefined, children: (_c = iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.children) !== null && _c !== void 0 ? _c : (jsxRuntime.jsx(KeyboardDoubleArrowDownIcon, { style: {
|
3009
2917
|
transform: `rotate(${isAllRowsExpanded ? -180 : getIsSomeRowsExpanded() ? -90 : 0}deg)`,
|
3010
2918
|
transition: 'transform 150ms',
|
3011
2919
|
} })) })) }) }));
|
@@ -3027,7 +2935,7 @@ const MRT_ExpandButton = ({ row, table, }) => {
|
|
3027
2935
|
row.toggleExpanded();
|
3028
2936
|
(_a = iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.onClick) === null || _a === void 0 ? void 0 : _a.call(iconButtonProps, event);
|
3029
2937
|
};
|
3030
|
-
return (jsxRuntime.jsx(
|
2938
|
+
return (jsxRuntime.jsx(Tooltip, { arrow: true, disableHoverListener: !canExpand && !renderDetailPanel, enterDelay: 1000, enterNextDelay: 1000, title: (_a = iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.title) !== null && _a !== void 0 ? _a : (isExpanded ? localization.collapse : localization.expand), children: jsxRuntime.jsx("span", { children: jsxRuntime.jsx(IconButton, Object.assign({ "aria-label": localization.expand, disabled: !canExpand && !renderDetailPanel }, iconButtonProps, { onClick: handleToggleExpand, sx: (theme) => (Object.assign({ height: density === 'compact' ? '1.75rem' : '2.25rem', opacity: !canExpand && !renderDetailPanel ? 0.3 : 1, width: density === 'compact' ? '1.75rem' : '2.25rem' }, parseFromValuesOrFunc(iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.sx, theme))), title: undefined, children: (_b = iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.children) !== null && _b !== void 0 ? _b : (jsxRuntime.jsx(ExpandMoreIcon, { style: {
|
3031
2939
|
transform: `rotate(${!canExpand && !renderDetailPanel ? -90 : isExpanded ? -180 : 0}deg)`,
|
3032
2940
|
transition: 'transform 150ms',
|
3033
2941
|
} })) })) }) }));
|
@@ -3037,9 +2945,9 @@ const MRT_RowActionMenu = (_a) => {
|
|
3037
2945
|
var { anchorEl, handleEdit, row, setAnchorEl, table } = _a, rest = __rest(_a, ["anchorEl", "handleEdit", "row", "setAnchorEl", "table"]);
|
3038
2946
|
const { getState, options: { enableEditing, icons: { EditIcon }, localization, renderRowActionMenuItems, }, } = table;
|
3039
2947
|
const { density } = getState();
|
3040
|
-
return (jsxRuntime.jsxs(
|
2948
|
+
return (jsxRuntime.jsxs(Menu, Object.assign({ MenuListProps: {
|
3041
2949
|
dense: density === 'compact',
|
3042
|
-
}, anchorEl: anchorEl, onClick: (event) => event.stopPropagation(), onClose: () => setAnchorEl(null), open: !!anchorEl }, rest, { children: [parseFromValuesOrFunc(enableEditing, row) && (jsxRuntime.jsx(
|
2950
|
+
}, anchorEl: anchorEl, onClick: (event) => event.stopPropagation(), onClose: () => setAnchorEl(null), open: !!anchorEl }, rest, { children: [parseFromValuesOrFunc(enableEditing, row) && (jsxRuntime.jsx(MenuItem, { onClick: handleEdit, sx: commonMenuItemStyles, children: jsxRuntime.jsxs(Box, { sx: commonListItemStyles, children: [jsxRuntime.jsx(ListItemIcon, { children: jsxRuntime.jsx(EditIcon, {}) }), localization.edit] }) })), renderRowActionMenuItems === null || renderRowActionMenuItems === void 0 ? void 0 : renderRowActionMenuItems({
|
3043
2951
|
closeMenu: () => setAnchorEl(null),
|
3044
2952
|
row,
|
3045
2953
|
table,
|
@@ -3077,7 +2985,7 @@ const MRT_ToggleRowActionMenuButton = (_a) => {
|
|
3077
2985
|
};
|
3078
2986
|
return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: renderRowActions && !showEditActionButtons ? (renderRowActions({ cell, row, table })) : showEditActionButtons ? (jsxRuntime.jsx(MRT_EditActionButtons, { row: row, table: table })) : !renderRowActionMenuItems &&
|
3079
2987
|
parseFromValuesOrFunc(enableEditing, row) &&
|
3080
|
-
['modal', 'row'].includes(editDisplayMode) ? (jsxRuntime.jsx(
|
2988
|
+
['modal', 'row'].includes(editDisplayMode) ? (jsxRuntime.jsx(Tooltip, { arrow: true, placement: "right", title: localization.edit, children: jsxRuntime.jsx(IconButton, Object.assign({ "aria-label": localization.edit, onClick: handleStartEditMode, sx: commonIconButtonStyles }, rest, { children: jsxRuntime.jsx(EditIcon, {}) })) })) : renderRowActionMenuItems ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Tooltip, { arrow: true, enterDelay: 1000, enterNextDelay: 1000, title: localization.rowActions, children: jsxRuntime.jsx(IconButton, Object.assign({ "aria-label": localization.rowActions, onClick: handleOpenRowActionMenu, size: "small", sx: commonIconButtonStyles }, rest, { children: jsxRuntime.jsx(MoreHorizIcon, {}) })) }), jsxRuntime.jsx(MRT_RowActionMenu, { anchorEl: anchorEl, handleEdit: handleStartEditMode, row: row, setAnchorEl: setAnchorEl, table: table })] })) : null }));
|
3081
2989
|
};
|
3082
2990
|
|
3083
2991
|
const blankColProps = {
|
@@ -3475,39 +3383,39 @@ const MRT_FilterFns = Object.assign(Object.assign({}, reactTable.filterFns), { b
|
|
3475
3383
|
startsWith });
|
3476
3384
|
|
3477
3385
|
const MRT_Default_Icons = {
|
3478
|
-
ArrowDownwardIcon
|
3479
|
-
ArrowRightIcon
|
3480
|
-
CancelIcon
|
3481
|
-
ChevronLeftIcon
|
3482
|
-
ChevronRightIcon
|
3483
|
-
ClearAllIcon
|
3484
|
-
CloseIcon
|
3485
|
-
DensityLargeIcon
|
3486
|
-
DensityMediumIcon
|
3487
|
-
DensitySmallIcon
|
3488
|
-
DragHandleIcon
|
3489
|
-
DynamicFeedIcon
|
3490
|
-
EditIcon
|
3491
|
-
ExpandMoreIcon
|
3492
|
-
FilterAltIcon
|
3493
|
-
FilterListIcon
|
3494
|
-
FilterListOffIcon
|
3495
|
-
FirstPageIcon
|
3496
|
-
FullscreenExitIcon
|
3497
|
-
FullscreenIcon
|
3498
|
-
KeyboardDoubleArrowDownIcon
|
3499
|
-
LastPageIcon
|
3500
|
-
MoreHorizIcon
|
3501
|
-
MoreVertIcon
|
3502
|
-
PushPinIcon
|
3503
|
-
RestartAltIcon
|
3504
|
-
SaveIcon
|
3505
|
-
SearchIcon
|
3506
|
-
SearchOffIcon
|
3507
|
-
SortIcon
|
3508
|
-
SyncAltIcon
|
3509
|
-
ViewColumnIcon
|
3510
|
-
VisibilityOffIcon
|
3386
|
+
ArrowDownwardIcon,
|
3387
|
+
ArrowRightIcon,
|
3388
|
+
CancelIcon,
|
3389
|
+
ChevronLeftIcon,
|
3390
|
+
ChevronRightIcon,
|
3391
|
+
ClearAllIcon,
|
3392
|
+
CloseIcon,
|
3393
|
+
DensityLargeIcon,
|
3394
|
+
DensityMediumIcon,
|
3395
|
+
DensitySmallIcon,
|
3396
|
+
DragHandleIcon,
|
3397
|
+
DynamicFeedIcon,
|
3398
|
+
EditIcon,
|
3399
|
+
ExpandMoreIcon,
|
3400
|
+
FilterAltIcon,
|
3401
|
+
FilterListIcon,
|
3402
|
+
FilterListOffIcon,
|
3403
|
+
FirstPageIcon,
|
3404
|
+
FullscreenExitIcon,
|
3405
|
+
FullscreenIcon,
|
3406
|
+
KeyboardDoubleArrowDownIcon,
|
3407
|
+
LastPageIcon,
|
3408
|
+
MoreHorizIcon,
|
3409
|
+
MoreVertIcon,
|
3410
|
+
PushPinIcon,
|
3411
|
+
RestartAltIcon,
|
3412
|
+
SaveIcon,
|
3413
|
+
SearchIcon,
|
3414
|
+
SearchOffIcon,
|
3415
|
+
SortIcon,
|
3416
|
+
SyncAltIcon,
|
3417
|
+
ViewColumnIcon,
|
3418
|
+
VisibilityOffIcon,
|
3511
3419
|
};
|
3512
3420
|
|
3513
3421
|
const MRT_Localization_EN = {
|
@@ -3602,6 +3510,26 @@ const MRT_Localization_EN = {
|
|
3602
3510
|
unpinAll: 'Unpin all',
|
3603
3511
|
};
|
3604
3512
|
|
3513
|
+
const MRT_DefaultColumn = {
|
3514
|
+
filterVariant: 'text',
|
3515
|
+
maxSize: 1000,
|
3516
|
+
minSize: 40,
|
3517
|
+
size: 180,
|
3518
|
+
};
|
3519
|
+
const MRT_DefaultDisplayColumn = {
|
3520
|
+
columnDefType: 'display',
|
3521
|
+
enableClickToCopy: false,
|
3522
|
+
enableColumnActions: false,
|
3523
|
+
enableColumnDragging: false,
|
3524
|
+
enableColumnFilter: false,
|
3525
|
+
enableColumnOrdering: false,
|
3526
|
+
enableEditing: false,
|
3527
|
+
enableGlobalFilter: false,
|
3528
|
+
enableGrouping: false,
|
3529
|
+
enableHiding: false,
|
3530
|
+
enableResizing: false,
|
3531
|
+
enableSorting: false,
|
3532
|
+
};
|
3605
3533
|
const useMRT_TableOptions = (_a) => {
|
3606
3534
|
var _b;
|
3607
3535
|
var { aggregationFns, autoResetExpanded = false, columnFilterDisplayMode = 'subheader', columnResizeMode = 'onChange', createDisplayMode = 'modal', defaultColumn, defaultDisplayColumn, editDisplayMode = 'modal', enableBottomToolbar = true, enableColumnActions = true, enableColumnFilters = true, enableColumnOrdering = false, enableColumnPinning = false, enableColumnResizing = false, enableDensityToggle = true, enableExpandAll = true, enableExpanding, enableFilterMatchHighlighting = true, enableFilters = true, enableFullScreenToggle = true, enableGlobalFilter = true, enableGlobalFilterRankedResults = true, enableGrouping = false, enableHiding = true, enableMultiRowSelection = true, enableMultiSort = true, enablePagination = true, enableRowPinning = false, enableRowSelection = false, enableSelectAll = true, enableSorting = true, enableStickyHeader = false, enableTableFooter = true, enableTableHead = true, enableToolbarInternalActions = true, enableTopToolbar = true, filterFns, icons, layoutMode = 'semantic', localization, manualFiltering, manualGrouping, manualPagination, manualSorting, paginationDisplayMode = 'default', positionActionsColumn = 'first', positionExpandColumn = 'first', positionGlobalFilter = 'right', positionPagination = 'bottom', positionToolbarAlertBanner = 'top', positionToolbarDropZone = 'top', rowNumberMode = 'static', rowPinningDisplayMode = 'sticky', selectAllMode = 'page', sortingFns } = _a, rest = __rest(_a, ["aggregationFns", "autoResetExpanded", "columnFilterDisplayMode", "columnResizeMode", "createDisplayMode", "defaultColumn", "defaultDisplayColumn", "editDisplayMode", "enableBottomToolbar", "enableColumnActions", "enableColumnFilters", "enableColumnOrdering", "enableColumnPinning", "enableColumnResizing", "enableDensityToggle", "enableExpandAll", "enableExpanding", "enableFilterMatchHighlighting", "enableFilters", "enableFullScreenToggle", "enableGlobalFilter", "enableGlobalFilterRankedResults", "enableGrouping", "enableHiding", "enableMultiRowSelection", "enableMultiSort", "enablePagination", "enableRowPinning", "enableRowSelection", "enableSelectAll", "enableSorting", "enableStickyHeader", "enableTableFooter", "enableTableHead", "enableToolbarInternalActions", "enableTopToolbar", "filterFns", "icons", "layoutMode", "localization", "manualFiltering", "manualGrouping", "manualPagination", "manualSorting", "paginationDisplayMode", "positionActionsColumn", "positionExpandColumn", "positionGlobalFilter", "positionPagination", "positionToolbarAlertBanner", "positionToolbarDropZone", "rowNumberMode", "rowPinningDisplayMode", "selectAllMode", "sortingFns"]);
|
@@ -3679,11 +3607,7 @@ const useMRT_TableOptions = (_a) => {
|
|
3679
3607
|
selectAllMode, sortingFns: _sortingFns }, rest);
|
3680
3608
|
};
|
3681
3609
|
|
3682
|
-
const useMaterialReactTable = (tableOptions) =>
|
3683
|
-
const parsedTableOptions = useMRT_TableOptions(tableOptions);
|
3684
|
-
const tableInstance = useMRT_TableInstance(parsedTableOptions);
|
3685
|
-
return tableInstance;
|
3686
|
-
};
|
3610
|
+
const useMaterialReactTable = (tableOptions) => useMRT_TableInstance(useMRT_TableOptions(tableOptions));
|
3687
3611
|
|
3688
3612
|
const isTableInstanceProp = (props) => props.table !== undefined;
|
3689
3613
|
const MaterialReactTable = (props) => {
|
@@ -3702,8 +3626,6 @@ exports.MRT_BottomToolbar = MRT_BottomToolbar;
|
|
3702
3626
|
exports.MRT_ColumnActionMenu = MRT_ColumnActionMenu;
|
3703
3627
|
exports.MRT_ColumnPinningButtons = MRT_ColumnPinningButtons;
|
3704
3628
|
exports.MRT_CopyButton = MRT_CopyButton;
|
3705
|
-
exports.MRT_DefaultColumn = MRT_DefaultColumn;
|
3706
|
-
exports.MRT_DefaultDisplayColumn = MRT_DefaultDisplayColumn;
|
3707
3629
|
exports.MRT_EditActionButtons = MRT_EditActionButtons;
|
3708
3630
|
exports.MRT_EditCellTextField = MRT_EditCellTextField;
|
3709
3631
|
exports.MRT_EditRowModal = MRT_EditRowModal;
|
@@ -3764,7 +3686,6 @@ exports.Memo_MRT_TableBodyCell = Memo_MRT_TableBodyCell;
|
|
3764
3686
|
exports.Memo_MRT_TableBodyRow = Memo_MRT_TableBodyRow;
|
3765
3687
|
exports.commonListItemStyles = commonListItemStyles;
|
3766
3688
|
exports.commonMenuItemStyles = commonMenuItemStyles;
|
3767
|
-
exports.commonToolbarStyles = commonToolbarStyles;
|
3768
3689
|
exports.createMRTColumnHelper = createMRTColumnHelper;
|
3769
3690
|
exports.createRow = createRow;
|
3770
3691
|
exports.extraIndexRangeExtractor = extraIndexRangeExtractor;
|
@@ -3772,7 +3693,8 @@ exports.flexRender = flexRender;
|
|
3772
3693
|
exports.getAllLeafColumnDefs = getAllLeafColumnDefs;
|
3773
3694
|
exports.getCanRankRows = getCanRankRows;
|
3774
3695
|
exports.getColumnId = getColumnId;
|
3775
|
-
exports.
|
3696
|
+
exports.getCommonMRTCellStyles = getCommonMRTCellStyles;
|
3697
|
+
exports.getCommonToolbarStyles = getCommonToolbarStyles;
|
3776
3698
|
exports.getDefaultColumnFilterFn = getDefaultColumnFilterFn;
|
3777
3699
|
exports.getDefaultColumnOrderIds = getDefaultColumnOrderIds;
|
3778
3700
|
exports.getIsFirstColumn = getIsFirstColumn;
|
@@ -3780,6 +3702,7 @@ exports.getIsFirstRightPinnedColumn = getIsFirstRightPinnedColumn;
|
|
3780
3702
|
exports.getIsLastColumn = getIsLastColumn;
|
3781
3703
|
exports.getIsLastLeftPinnedColumn = getIsLastLeftPinnedColumn;
|
3782
3704
|
exports.getLeadingDisplayColumnIds = getLeadingDisplayColumnIds;
|
3705
|
+
exports.getMRTTheme = getMRTTheme;
|
3783
3706
|
exports.getTotalRight = getTotalRight;
|
3784
3707
|
exports.getTrailingDisplayColumnIds = getTrailingDisplayColumnIds;
|
3785
3708
|
exports.mrtFilterOptions = mrtFilterOptions;
|