material-react-table 1.2.2 → 1.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (103) hide show
  1. package/dist/cjs/MaterialReactTable.d.ts +19 -1
  2. package/dist/cjs/body/MRT_EditRowModal.d.ts +1 -0
  3. package/dist/cjs/buttons/MRT_ColumnPinningButtons.d.ts +1 -0
  4. package/dist/cjs/buttons/MRT_EditActionButtons.d.ts +1 -0
  5. package/dist/cjs/buttons/MRT_FullScreenToggleButton.d.ts +2 -1
  6. package/dist/cjs/buttons/MRT_GrabHandleButton.d.ts +1 -1
  7. package/dist/cjs/buttons/MRT_ShowHideColumnsButton.d.ts +2 -1
  8. package/dist/cjs/buttons/MRT_ToggleDensePaddingButton.d.ts +2 -1
  9. package/dist/cjs/buttons/MRT_ToggleFiltersButton.d.ts +2 -1
  10. package/dist/cjs/buttons/MRT_ToggleGlobalFilterButton.d.ts +2 -1
  11. package/dist/cjs/column.utils.d.ts +4 -3
  12. package/dist/cjs/head/MRT_TableHeadCellSortLabel.d.ts +1 -1
  13. package/dist/cjs/index.js +376 -235
  14. package/dist/cjs/index.js.map +1 -1
  15. package/dist/cjs/inputs/MRT_EditCellTextField.d.ts +1 -0
  16. package/dist/cjs/inputs/MRT_GlobalFilterTextField.d.ts +1 -0
  17. package/dist/cjs/menus/MRT_FilterOptionMenu.d.ts +1 -0
  18. package/dist/cjs/menus/MRT_ShowHideColumnsMenu.d.ts +1 -0
  19. package/dist/cjs/table/MRT_TableRoot.d.ts +2 -2
  20. package/dist/cjs/toolbar/MRT_TablePagination.d.ts +1 -0
  21. package/dist/cjs/toolbar/MRT_ToolbarInternalButtons.d.ts +1 -0
  22. package/dist/cjs/toolbar/MRT_TopToolbar.d.ts +1 -1
  23. package/dist/esm/MaterialReactTable.d.ts +19 -1
  24. package/dist/esm/body/MRT_EditRowModal.d.ts +1 -0
  25. package/dist/esm/buttons/MRT_ColumnPinningButtons.d.ts +1 -0
  26. package/dist/esm/buttons/MRT_EditActionButtons.d.ts +1 -0
  27. package/dist/esm/buttons/MRT_FullScreenToggleButton.d.ts +2 -1
  28. package/dist/esm/buttons/MRT_GrabHandleButton.d.ts +1 -1
  29. package/dist/esm/buttons/MRT_ShowHideColumnsButton.d.ts +2 -1
  30. package/dist/esm/buttons/MRT_ToggleDensePaddingButton.d.ts +2 -1
  31. package/dist/esm/buttons/MRT_ToggleFiltersButton.d.ts +2 -1
  32. package/dist/esm/buttons/MRT_ToggleGlobalFilterButton.d.ts +2 -1
  33. package/dist/esm/column.utils.d.ts +4 -3
  34. package/dist/esm/head/MRT_TableHeadCellSortLabel.d.ts +1 -1
  35. package/dist/esm/inputs/MRT_EditCellTextField.d.ts +1 -0
  36. package/dist/esm/inputs/MRT_GlobalFilterTextField.d.ts +1 -0
  37. package/dist/esm/material-react-table.esm.js +107 -37
  38. package/dist/esm/material-react-table.esm.js.map +1 -1
  39. package/dist/esm/menus/MRT_FilterOptionMenu.d.ts +1 -0
  40. package/dist/esm/menus/MRT_ShowHideColumnsMenu.d.ts +1 -0
  41. package/dist/esm/table/MRT_TableRoot.d.ts +2 -2
  42. package/dist/esm/toolbar/MRT_TablePagination.d.ts +1 -0
  43. package/dist/esm/toolbar/MRT_ToolbarInternalButtons.d.ts +1 -0
  44. package/dist/esm/toolbar/MRT_TopToolbar.d.ts +1 -1
  45. package/dist/index.d.ts +20 -1
  46. package/locales/cs.esm.js.map +1 -1
  47. package/locales/cs.js.map +1 -1
  48. package/package.json +10 -8
  49. package/src/MaterialReactTable.tsx +19 -21
  50. package/src/_locales/cs.ts +4 -2
  51. package/src/body/MRT_EditRowModal.tsx +6 -8
  52. package/src/body/MRT_TableBody.tsx +4 -3
  53. package/src/body/MRT_TableBodyCell.tsx +3 -1
  54. package/src/body/MRT_TableBodyRow.tsx +2 -1
  55. package/src/body/MRT_TableDetailPanel.tsx +3 -1
  56. package/src/buttons/MRT_ColumnPinningButtons.tsx +3 -1
  57. package/src/buttons/MRT_CopyButton.tsx +2 -1
  58. package/src/buttons/MRT_EditActionButtons.tsx +4 -1
  59. package/src/buttons/MRT_ExpandAllButton.tsx +2 -1
  60. package/src/buttons/MRT_ExpandButton.tsx +2 -1
  61. package/src/buttons/MRT_FullScreenToggleButton.tsx +3 -1
  62. package/src/buttons/MRT_GrabHandleButton.tsx +3 -1
  63. package/src/buttons/MRT_ShowHideColumnsButton.tsx +3 -1
  64. package/src/buttons/MRT_ToggleDensePaddingButton.tsx +3 -1
  65. package/src/buttons/MRT_ToggleFiltersButton.tsx +3 -1
  66. package/src/buttons/MRT_ToggleGlobalFilterButton.tsx +3 -1
  67. package/src/buttons/MRT_ToggleRowActionMenuButton.tsx +2 -1
  68. package/src/column.utils.ts +8 -6
  69. package/src/footer/MRT_TableFooter.tsx +2 -1
  70. package/src/footer/MRT_TableFooterCell.tsx +1 -1
  71. package/src/footer/MRT_TableFooterRow.tsx +1 -1
  72. package/src/head/MRT_TableHead.tsx +1 -1
  73. package/src/head/MRT_TableHeadCell.tsx +4 -1
  74. package/src/head/MRT_TableHeadCellColumnActionsButton.tsx +2 -1
  75. package/src/head/MRT_TableHeadCellFilterContainer.tsx +1 -1
  76. package/src/head/MRT_TableHeadCellFilterLabel.tsx +4 -1
  77. package/src/head/MRT_TableHeadCellResizeHandle.tsx +2 -1
  78. package/src/head/MRT_TableHeadCellSortLabel.tsx +4 -2
  79. package/src/head/MRT_TableHeadRow.tsx +2 -1
  80. package/src/icons.ts +60 -62
  81. package/src/inputs/MRT_EditCellTextField.tsx +2 -1
  82. package/src/inputs/MRT_FilterCheckbox.tsx +4 -6
  83. package/src/inputs/MRT_FilterRangeFields.tsx +1 -1
  84. package/src/inputs/MRT_FilterTextField.tsx +11 -13
  85. package/src/inputs/MRT_GlobalFilterTextField.tsx +6 -8
  86. package/src/inputs/MRT_SelectCheckbox.tsx +4 -1
  87. package/src/menus/MRT_ColumnActionMenu.tsx +6 -2
  88. package/src/menus/MRT_FilterOptionMenu.tsx +3 -1
  89. package/src/menus/MRT_RowActionMenu.tsx +5 -2
  90. package/src/menus/MRT_ShowHideColumnsMenu.tsx +5 -2
  91. package/src/menus/MRT_ShowHideColumnsMenuItems.tsx +6 -8
  92. package/src/sortingFns.ts +2 -2
  93. package/src/table/MRT_Table.tsx +1 -1
  94. package/src/table/MRT_TableContainer.tsx +1 -1
  95. package/src/table/MRT_TablePaper.tsx +1 -1
  96. package/src/table/MRT_TableRoot.tsx +5 -4
  97. package/src/toolbar/MRT_BottomToolbar.tsx +4 -1
  98. package/src/toolbar/MRT_LinearProgressBar.tsx +2 -1
  99. package/src/toolbar/MRT_TablePagination.tsx +1 -1
  100. package/src/toolbar/MRT_ToolbarAlertBanner.tsx +5 -1
  101. package/src/toolbar/MRT_ToolbarDropZone.tsx +4 -1
  102. package/src/toolbar/MRT_ToolbarInternalButtons.tsx +1 -1
  103. package/src/toolbar/MRT_TopToolbar.tsx +5 -1
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import type { MRT_Cell, MRT_TableInstance } from '..';
2
3
  interface Props<TData extends Record<string, any> = {}> {
3
4
  cell: MRT_Cell<TData>;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { MRT_TableInstance } from '..';
2
3
  interface Props<TData extends Record<string, any> = {}> {
3
4
  table: MRT_TableInstance<TData>;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import type { MRT_Header, MRT_InternalFilterOption, MRT_Localization, MRT_TableInstance } from '..';
2
3
  export declare const mrtFilterOptions: (localization: MRT_Localization) => MRT_InternalFilterOption[];
3
4
  interface Props<TData extends Record<string, any> = {}> {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import type { MRT_TableInstance } from '..';
2
3
  interface Props<TData extends Record<string, any> = {}> {
3
4
  anchorEl: HTMLElement | null;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import type { MRT_Cell, MRT_Column, MRT_ColumnDef, MRT_FilterOption, MRT_Row, MRT_TableInstance, MRT_TableState, MaterialReactTableProps, MRT_Localization } from '..';
3
- export declare const MRT_TableRoot: <TData extends Record<string, any> = {}>(props: Omit<Partial<import("@tanstack/table-core").TableOptions<TData>>, "initialState" | "state" | "onStateChange" | "data" | "columns" | "defaultColumn" | "enableRowSelection" | "expandRowsFn"> & {
3
+ export declare const MRT_TableRoot: <TData extends Record<string, any> = {}>(props: Omit<Partial<import("@tanstack/table-core").TableOptions<TData>>, "state" | "data" | "onStateChange" | "initialState" | "columns" | "defaultColumn" | "enableRowSelection" | "expandRowsFn"> & {
4
4
  columnFilterModeOptions?: (string | (string & Record<never, never>))[] | null | undefined;
5
5
  columns: MRT_ColumnDef<TData>[];
6
6
  data: TData[];
@@ -13,7 +13,7 @@ export declare const MRT_TableRoot: <TData extends Record<string, any> = {}>(pro
13
13
  "mrt-row-select": Partial<MRT_ColumnDef<{}>>;
14
14
  "mrt-row-numbers": Partial<MRT_ColumnDef<{}>>;
15
15
  }> | undefined;
16
- editingMode?: "row" | "cell" | "table" | "modal" | undefined;
16
+ editingMode?: "cell" | "row" | "table" | "modal" | undefined;
17
17
  enableBottomToolbar?: boolean | undefined;
18
18
  enableClickToCopy?: boolean | undefined;
19
19
  enableColumnActions?: boolean | undefined;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { MRT_TableInstance } from '..';
2
3
  interface Props<TData extends Record<string, any> = {}> {
3
4
  position: 'top' | 'bottom';
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import type { MRT_TableInstance } from '..';
2
3
  interface Props<TData extends Record<string, any> = {}> {
3
4
  table: MRT_TableInstance<TData>;
@@ -1,6 +1,6 @@
1
1
  import { FC } from 'react';
2
- import { Theme } from '@mui/material';
3
2
  import { MRT_TableInstance } from '..';
3
+ import type { Theme } from '@mui/material/styles';
4
4
  export declare const commonToolbarStyles: ({ theme }: {
5
5
  theme: Theme;
6
6
  }) => {
@@ -1,5 +1,23 @@
1
1
  import { Dispatch, MutableRefObject, ReactNode, SetStateAction } from 'react';
2
- import type { AlertProps, ButtonProps, CheckboxProps, ChipProps, IconButtonProps, LinearProgressProps, PaperProps, RadioProps, SkeletonProps, TableBodyProps, TableCellProps, TableContainerProps, TableFooterProps, TableHeadProps, TablePaginationProps, TableProps, TableRowProps, TextFieldProps, ToolbarProps } from '@mui/material';
2
+ import type { AlertProps } from '@mui/material/Alert';
3
+ import type { ButtonProps } from '@mui/material/Button';
4
+ import type { CheckboxProps } from '@mui/material/Checkbox';
5
+ import type { ChipProps } from '@mui/material/Chip';
6
+ import type { IconButtonProps } from '@mui/material/IconButton';
7
+ import type { LinearProgressProps } from '@mui/material/LinearProgress';
8
+ import type { PaperProps } from '@mui/material/Paper';
9
+ import type { RadioProps } from '@mui/material/Radio';
10
+ import type { SkeletonProps } from '@mui/material/Skeleton';
11
+ import type { TableBodyProps } from '@mui/material/TableBody';
12
+ import type { TableCellProps } from '@mui/material/TableCell';
13
+ import type { TableContainerProps } from '@mui/material/TableContainer';
14
+ import type { TableFooterProps } from '@mui/material/TableFooter';
15
+ import type { TableHeadProps } from '@mui/material/TableHead';
16
+ import type { TablePaginationProps } from '@mui/material/TablePagination';
17
+ import type { TableProps } from '@mui/material/Table';
18
+ import type { TableRowProps } from '@mui/material/TableRow';
19
+ import type { TextFieldProps } from '@mui/material/TextField';
20
+ import type { ToolbarProps } from '@mui/material/Toolbar';
3
21
  import type { Cell, Column, ColumnDef, DeepKeys, FilterFn, Header, HeaderGroup, OnChangeFn, Row, SortingFn, Table, TableOptions, TableState } from '@tanstack/react-table';
4
22
  import type { Options as VirtualizerOptions, VirtualItem } from 'react-virtual';
5
23
  import { MRT_FilterFns } from './filterFns';
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import type { MRT_Row, MRT_TableInstance } from '..';
2
3
  interface Props<TData extends Record<string, any> = {}> {
3
4
  open: boolean;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import type { MRT_Column, MRT_TableInstance } from '..';
2
3
  interface Props<TData extends Record<string, any> = {}> {
3
4
  column: MRT_Column<TData>;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import type { MRT_Row, MRT_TableInstance } from '..';
2
3
  interface Props<TData extends Record<string, any> = {}> {
3
4
  row: MRT_Row<TData>;
@@ -1,4 +1,5 @@
1
- import { IconButtonProps } from '@mui/material';
1
+ /// <reference types="react" />
2
+ import type { IconButtonProps } from '@mui/material/IconButton';
2
3
  import { MRT_TableInstance } from '..';
3
4
  interface Props<TData extends Record<string, any> = {}> extends IconButtonProps {
4
5
  table: MRT_TableInstance<TData>;
@@ -1,5 +1,5 @@
1
- import { IconButtonProps } from '@mui/material';
2
1
  import { DragEventHandler } from 'react';
2
+ import type { IconButtonProps } from '@mui/material/IconButton';
3
3
  import { MRT_TableInstance } from '..';
4
4
  interface Props<TData extends Record<string, any> = {}> {
5
5
  iconButtonProps?: IconButtonProps;
@@ -1,4 +1,5 @@
1
- import { IconButtonProps } from '@mui/material';
1
+ /// <reference types="react" />
2
+ import type { IconButtonProps } from '@mui/material/IconButton';
2
3
  import { MRT_TableInstance } from '..';
3
4
  interface Props<TData extends Record<string, any> = {}> extends IconButtonProps {
4
5
  table: MRT_TableInstance<TData>;
@@ -1,4 +1,5 @@
1
- import { IconButtonProps } from '@mui/material';
1
+ /// <reference types="react" />
2
+ import type { IconButtonProps } from '@mui/material/IconButton';
2
3
  import { MRT_TableInstance } from '..';
3
4
  interface Props<TData extends Record<string, any> = {}> extends IconButtonProps {
4
5
  table: MRT_TableInstance<TData>;
@@ -1,4 +1,5 @@
1
- import { IconButtonProps } from '@mui/material';
1
+ /// <reference types="react" />
2
+ import type { IconButtonProps } from '@mui/material/IconButton';
2
3
  import { MRT_TableInstance } from '..';
3
4
  interface Props<TData extends Record<string, any> = {}> extends IconButtonProps {
4
5
  table: MRT_TableInstance<TData>;
@@ -1,4 +1,5 @@
1
- import { IconButtonProps } from '@mui/material';
1
+ /// <reference types="react" />
2
+ import type { IconButtonProps } from '@mui/material/IconButton';
2
3
  import { MRT_TableInstance } from '..';
3
4
  interface Props<TData extends Record<string, any> = {}> extends IconButtonProps {
4
5
  table: MRT_TableInstance<TData>;
@@ -1,8 +1,9 @@
1
- import { ColumnOrderState, GroupingState } from '@tanstack/react-table';
2
- import { TableCellProps, Theme } from '@mui/material';
3
- import { MaterialReactTableProps, MRT_Column, MRT_ColumnDef, MRT_DefinedColumnDef, MRT_DisplayColumnIds, MRT_FilterOption, MRT_Header, MRT_TableInstance } from '.';
1
+ import type { ColumnOrderState, GroupingState } from '@tanstack/react-table';
4
2
  import { MRT_FilterFns } from './filterFns';
5
3
  import { MRT_SortingFns } from './sortingFns';
4
+ import type { TableCellProps } from '@mui/material/TableCell';
5
+ import type { Theme } from '@mui/material/styles';
6
+ import type { MaterialReactTableProps, MRT_Column, MRT_ColumnDef, MRT_DefinedColumnDef, MRT_DisplayColumnIds, MRT_FilterOption, MRT_Header, MRT_TableInstance } from '.';
6
7
  export declare const getColumnId: <TData extends Record<string, any> = {}>(columnDef: MRT_ColumnDef<TData>) => string;
7
8
  export declare const getAllLeafColumnDefs: <TData extends Record<string, any> = {}>(columns: MRT_ColumnDef<TData>[]) => MRT_ColumnDef<TData>[];
8
9
  export declare const prepareColumns: <TData extends Record<string, any> = {}>({ columnDefs, columnFilterFns, defaultDisplayColumn, filterFns, sortingFns, }: {
@@ -1,6 +1,6 @@
1
1
  import { FC } from 'react';
2
- import { TableCellProps } from '@mui/material';
3
2
  import { MRT_Header, MRT_TableInstance } from '..';
3
+ import type { TableCellProps } from '@mui/material/TableCell';
4
4
  interface Props {
5
5
  header: MRT_Header;
6
6
  table: MRT_TableInstance;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import type { MRT_Cell, MRT_TableInstance } from '..';
2
3
  interface Props<TData extends Record<string, any> = {}> {
3
4
  cell: MRT_Cell<TData>;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { MRT_TableInstance } from '..';
2
3
  interface Props<TData extends Record<string, any> = {}> {
3
4
  table: MRT_TableInstance<TData>;
@@ -1,9 +1,79 @@
1
1
  import React, { useMemo, useRef, useState, useCallback, useEffect, Fragment, memo, useLayoutEffect } from 'react';
2
2
  import { aggregationFns, filterFns, sortingFns, useReactTable, getCoreRowModel, getExpandedRowModel, getFacetedRowModel, getFilteredRowModel, getGroupedRowModel, getPaginationRowModel, getSortedRowModel } from '@tanstack/react-table';
3
- import { alpha, lighten, Tooltip, IconButton, Menu, MenuItem, Box, FormControlLabel, Switch, Typography, Button, Divider, ListItemIcon, Radio, Checkbox, debounce, Collapse, TextField, InputAdornment, LinearProgress, TablePagination, Chip, Alert, AlertTitle, Fade, useMediaQuery, Toolbar, Grow, TableSortLabel, useTheme, TableCell, TableRow, TableHead, darken, Skeleton, TableBody, TableFooter, Table, TableContainer, Paper, Dialog, DialogTitle, DialogContent, Stack, DialogActions } from '@mui/material';
3
+ import { alpha, lighten, useTheme, darken } from '@mui/material/styles';
4
4
  import { rankItem, rankings, compareItems } from '@tanstack/match-sorter-utils';
5
- import { ArrowRight, Cancel, CheckBox, ClearAll, Close, DensityLarge, DensityMedium, DensitySmall, DragHandle, DynamicFeed, Edit, ExpandLess, ExpandMore, FilterAlt, FilterAltOff, FilterList, FilterListOff, FullscreenExit, Fullscreen, KeyboardDoubleArrowDown, MoreHoriz, MoreVert, PushPin, RestartAlt, Save, Search, SearchOff, Sort, ViewColumn, VisibilityOff } from '@mui/icons-material';
5
+ import ArrowRightIcon from '@mui/icons-material/ArrowRight';
6
+ import CancelIcon from '@mui/icons-material/Cancel';
7
+ import CheckBoxIcon from '@mui/icons-material/CheckBox';
8
+ import ClearAllIcon from '@mui/icons-material/ClearAll';
9
+ import CloseIcon from '@mui/icons-material/Close';
10
+ import DensityLargeIcon from '@mui/icons-material/DensityLarge';
11
+ import DensityMediumIcon from '@mui/icons-material/DensityMedium';
12
+ import DensitySmallIcon from '@mui/icons-material/DensitySmall';
13
+ import DragHandleIcon from '@mui/icons-material/DragHandle';
14
+ import DynamicFeedIcon from '@mui/icons-material/DynamicFeed';
15
+ import EditIcon from '@mui/icons-material/Edit';
16
+ import ExpandLessIcon from '@mui/icons-material/ExpandLess';
17
+ import ExpandMoreIcon from '@mui/icons-material/ExpandMore';
18
+ import FilterAltIcon from '@mui/icons-material/FilterAlt';
19
+ import FilterAltOffIcon from '@mui/icons-material/FilterAltOff';
20
+ import FilterListIcon from '@mui/icons-material/FilterList';
21
+ import FilterListOffIcon from '@mui/icons-material/FilterListOff';
22
+ import FullscreenExitIcon from '@mui/icons-material/FullscreenExit';
23
+ import FullscreenIcon from '@mui/icons-material/Fullscreen';
24
+ import KeyboardDoubleArrowDownIcon from '@mui/icons-material/KeyboardDoubleArrowDown';
25
+ import MoreHorizIcon from '@mui/icons-material/MoreHoriz';
26
+ import MoreVertIcon from '@mui/icons-material/MoreVert';
27
+ import PushPinIcon from '@mui/icons-material/PushPin';
28
+ import RestartAltIcon from '@mui/icons-material/RestartAlt';
29
+ import SaveIcon from '@mui/icons-material/Save';
30
+ import SearchIcon from '@mui/icons-material/Search';
31
+ import SearchOffIcon from '@mui/icons-material/SearchOff';
32
+ import SortIcon from '@mui/icons-material/Sort';
33
+ import ViewColumnIcon from '@mui/icons-material/ViewColumn';
34
+ import VisibilityOffIcon from '@mui/icons-material/VisibilityOff';
35
+ import Box from '@mui/material/Box';
36
+ import Dialog from '@mui/material/Dialog';
37
+ import Grow from '@mui/material/Grow';
38
+ import IconButton from '@mui/material/IconButton';
39
+ import Tooltip from '@mui/material/Tooltip';
40
+ import ListItemIcon from '@mui/material/ListItemIcon';
41
+ import Menu from '@mui/material/Menu';
42
+ import MenuItem from '@mui/material/MenuItem';
43
+ import Button from '@mui/material/Button';
44
+ import Divider from '@mui/material/Divider';
45
+ import FormControlLabel from '@mui/material/FormControlLabel';
46
+ import Switch from '@mui/material/Switch';
47
+ import Typography from '@mui/material/Typography';
48
+ import Checkbox from '@mui/material/Checkbox';
49
+ import Radio from '@mui/material/Radio';
50
+ import Paper from '@mui/material/Paper';
51
+ import Toolbar from '@mui/material/Toolbar';
52
+ import useMediaQuery from '@mui/material/useMediaQuery';
53
+ import Collapse from '@mui/material/Collapse';
54
+ import InputAdornment from '@mui/material/InputAdornment';
55
+ import TextField from '@mui/material/TextField';
56
+ import debounce from '@mui/material/utils/debounce';
57
+ import LinearProgress from '@mui/material/LinearProgress';
58
+ import TablePagination from '@mui/material/TablePagination';
59
+ import Alert from '@mui/material/Alert';
60
+ import AlertTitle from '@mui/material/AlertTitle';
61
+ import Chip from '@mui/material/Chip';
62
+ import Fade from '@mui/material/Fade';
63
+ import TableContainer from '@mui/material/TableContainer';
64
+ import Table from '@mui/material/Table';
65
+ import TableHead from '@mui/material/TableHead';
66
+ import TableRow from '@mui/material/TableRow';
67
+ import TableCell from '@mui/material/TableCell';
68
+ import TableSortLabel from '@mui/material/TableSortLabel';
6
69
  import { useVirtual } from 'react-virtual';
70
+ import TableBody from '@mui/material/TableBody';
71
+ import Skeleton from '@mui/material/Skeleton';
72
+ import TableFooter from '@mui/material/TableFooter';
73
+ import DialogActions from '@mui/material/DialogActions';
74
+ import DialogContent from '@mui/material/DialogContent';
75
+ import DialogTitle from '@mui/material/DialogTitle';
76
+ import Stack from '@mui/material/Stack';
7
77
 
8
78
  /******************************************************************************
9
79
  Copyright (c) Microsoft Corporation.
@@ -59,7 +129,7 @@ const prepareColumns = ({ columnDefs, columnFilterFns, defaultDisplayColumn, fil
59
129
  }
60
130
  if (!columnDef.columnDefType)
61
131
  columnDef.columnDefType = 'data';
62
- if (!!((_a = columnDef.columns) === null || _a === void 0 ? void 0 : _a.length)) {
132
+ if ((_a = columnDef.columns) === null || _a === void 0 ? void 0 : _a.length) {
63
133
  columnDef.columnDefType = 'group';
64
134
  columnDef.columns = prepareColumns({
65
135
  columnDefs: columnDef.columns,
@@ -276,36 +346,36 @@ const MRT_FilterFns = Object.assign(Object.assign({}, filterFns), { between,
276
346
  startsWith });
277
347
 
278
348
  const MRT_Default_Icons = {
279
- ArrowRightIcon: ArrowRight,
280
- CancelIcon: Cancel,
281
- CheckBoxIcon: CheckBox,
282
- ClearAllIcon: ClearAll,
283
- CloseIcon: Close,
284
- DensityLargeIcon: DensityLarge,
285
- DensityMediumIcon: DensityMedium,
286
- DensitySmallIcon: DensitySmall,
287
- DragHandleIcon: DragHandle,
288
- DynamicFeedIcon: DynamicFeed,
289
- EditIcon: Edit,
290
- ExpandLessIcon: ExpandLess,
291
- ExpandMoreIcon: ExpandMore,
292
- FilterAltIcon: FilterAlt,
293
- FilterAltOffIcon: FilterAltOff,
294
- FilterListIcon: FilterList,
295
- FilterListOffIcon: FilterListOff,
296
- FullscreenExitIcon: FullscreenExit,
297
- FullscreenIcon: Fullscreen,
298
- KeyboardDoubleArrowDownIcon: KeyboardDoubleArrowDown,
299
- MoreHorizIcon: MoreHoriz,
300
- MoreVertIcon: MoreVert,
301
- PushPinIcon: PushPin,
302
- RestartAltIcon: RestartAlt,
303
- SaveIcon: Save,
304
- SearchIcon: Search,
305
- SearchOffIcon: SearchOff,
306
- SortIcon: Sort,
307
- ViewColumnIcon: ViewColumn,
308
- VisibilityOffIcon: VisibilityOff,
349
+ ArrowRightIcon,
350
+ CancelIcon,
351
+ CheckBoxIcon,
352
+ ClearAllIcon,
353
+ CloseIcon,
354
+ DensityLargeIcon,
355
+ DensityMediumIcon,
356
+ DensitySmallIcon,
357
+ DragHandleIcon,
358
+ DynamicFeedIcon,
359
+ EditIcon,
360
+ ExpandLessIcon,
361
+ ExpandMoreIcon,
362
+ FilterAltIcon,
363
+ FilterAltOffIcon,
364
+ FilterListIcon,
365
+ FilterListOffIcon,
366
+ FullscreenExitIcon,
367
+ FullscreenIcon,
368
+ KeyboardDoubleArrowDownIcon,
369
+ MoreHorizIcon,
370
+ MoreVertIcon,
371
+ PushPinIcon,
372
+ RestartAltIcon,
373
+ SaveIcon,
374
+ SearchIcon,
375
+ SearchOffIcon,
376
+ SortIcon,
377
+ ViewColumnIcon,
378
+ VisibilityOffIcon,
309
379
  };
310
380
 
311
381
  const fuzzy = (rowA, rowB, columnId) => {
@@ -1419,7 +1489,7 @@ const MRT_FilterTextField = ({ header, rangeFilterIndex, table, }) => {
1419
1489
  : (_b = column.getFilterValue()) !== null && _b !== void 0 ? _b : '';
1420
1490
  });
1421
1491
  const handleChangeDebounced = useCallback(debounce((event) => {
1422
- let value = textFieldProps.type === 'date'
1492
+ const value = textFieldProps.type === 'date'
1423
1493
  ? event.target.valueAsDate
1424
1494
  : textFieldProps.type === 'number'
1425
1495
  ? event.target.valueAsNumber
@@ -1723,7 +1793,7 @@ const MRT_TableHeadCellSortLabel = ({ header, table, tableCellProps, }) => {
1723
1793
  const { options: { localization }, } = table;
1724
1794
  const { column } = header;
1725
1795
  const { columnDef } = column;
1726
- const sortTooltip = !!column.getIsSorted()
1796
+ const sortTooltip = column.getIsSorted()
1727
1797
  ? column.getIsSorted() === 'desc'
1728
1798
  ? localization.sortedByColumnDesc.replace('{column}', columnDef.header)
1729
1799
  : localization.sortedByColumnAsc.replace('{column}', columnDef.header)
@@ -2272,8 +2342,8 @@ const MRT_TableBody = ({ table }) => {
2272
2342
  let paddingTop = 0;
2273
2343
  let paddingBottom = 0;
2274
2344
  if (enableRowVirtualization) {
2275
- paddingTop = !!virtualRows.length ? virtualRows[0].start : 0;
2276
- paddingBottom = !!virtualRows.length
2345
+ paddingTop = virtualRows.length ? virtualRows[0].start : 0;
2346
+ paddingBottom = virtualRows.length
2277
2347
  ? virtualizer.totalSize - virtualRows[virtualRows.length - 1].end
2278
2348
  : 0;
2279
2349
  }