material-react-table 1.2.3 → 1.2.5

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 (102) hide show
  1. package/dist/cjs/MaterialReactTable.d.ts +22 -3
  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 +3 -2
  12. package/dist/cjs/head/MRT_TableHeadCellSortLabel.d.ts +1 -1
  13. package/dist/cjs/index.js +288 -209
  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 +3 -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 +22 -3
  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 +3 -2
  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 +49 -11
  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 +3 -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 +23 -3
  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 +22 -22
  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 +5 -3
  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/inputs/MRT_EditCellTextField.tsx +2 -1
  81. package/src/inputs/MRT_FilterCheckbox.tsx +4 -6
  82. package/src/inputs/MRT_FilterRangeFields.tsx +1 -1
  83. package/src/inputs/MRT_FilterTextField.tsx +11 -13
  84. package/src/inputs/MRT_GlobalFilterTextField.tsx +6 -8
  85. package/src/inputs/MRT_SelectCheckbox.tsx +4 -1
  86. package/src/menus/MRT_ColumnActionMenu.tsx +6 -2
  87. package/src/menus/MRT_FilterOptionMenu.tsx +3 -1
  88. package/src/menus/MRT_RowActionMenu.tsx +5 -2
  89. package/src/menus/MRT_ShowHideColumnsMenu.tsx +5 -2
  90. package/src/menus/MRT_ShowHideColumnsMenuItems.tsx +6 -8
  91. package/src/sortingFns.ts +2 -2
  92. package/src/table/MRT_Table.tsx +1 -1
  93. package/src/table/MRT_TableContainer.tsx +1 -1
  94. package/src/table/MRT_TablePaper.tsx +1 -1
  95. package/src/table/MRT_TableRoot.tsx +6 -8
  96. package/src/toolbar/MRT_BottomToolbar.tsx +4 -1
  97. package/src/toolbar/MRT_LinearProgressBar.tsx +2 -1
  98. package/src/toolbar/MRT_TablePagination.tsx +1 -1
  99. package/src/toolbar/MRT_ToolbarAlertBanner.tsx +5 -1
  100. package/src/toolbar/MRT_ToolbarDropZone.tsx +4 -1
  101. package/src/toolbar/MRT_ToolbarInternalButtons.tsx +1 -1
  102. 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>>, "state" | "data" | "onStateChange" | "initialState" | "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" | "globalFilterFn" | "enableRowSelection" | "expandRowsFn"> & {
4
4
  columnFilterModeOptions?: (string | (string & Record<never, never>))[] | null | undefined;
5
5
  columns: MRT_ColumnDef<TData>[];
6
6
  data: TData[];
@@ -40,8 +40,9 @@ export declare const MRT_TableRoot: <TData extends Record<string, any> = {}>(pro
40
40
  enableTableHead?: boolean | undefined;
41
41
  enableToolbarInternalActions?: boolean | undefined;
42
42
  enableTopToolbar?: boolean | undefined;
43
- globalFilterModeOptions?: (string | (string & Record<never, never>))[] | null | undefined;
44
43
  expandRowsFn?: ((dataRow: TData) => TData[]) | undefined;
44
+ globalFilterFn?: MRT_FilterOption | undefined;
45
+ globalFilterModeOptions?: MRT_FilterOption[] | null | undefined;
45
46
  icons?: Partial<import("..").MRT_Icons> | undefined;
46
47
  initialState?: Partial<MRT_TableState<TData>> | undefined;
47
48
  localization?: Partial<MRT_Localization> | 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';
@@ -380,7 +398,7 @@ export declare type MRT_DisplayColumnIds = 'mrt-row-actions' | 'mrt-row-drag' |
380
398
  * See the full props list on the official docs site:
381
399
  * @link https://www.material-react-table.com/docs/api/props
382
400
  */
383
- export declare type MaterialReactTableProps<TData extends Record<string, any> = {}> = Omit<Partial<TableOptions<TData>>, 'columns' | 'data' | 'defaultColumn' | 'enableRowSelection' | 'expandRowsFn' | 'initialState' | 'onStateChange' | 'state'> & {
401
+ export declare type MaterialReactTableProps<TData extends Record<string, any> = {}> = Omit<Partial<TableOptions<TData>>, 'columns' | 'data' | 'defaultColumn' | 'enableRowSelection' | 'expandRowsFn' | 'globalFilterFn' | 'initialState' | 'onStateChange' | 'state'> & {
384
402
  columnFilterModeOptions?: (MRT_FilterOption | string)[] | null;
385
403
  /**
386
404
  * The columns to display in the table. `accessorKey`s or `accessorFn`s must match keys in the `data` prop.
@@ -438,8 +456,9 @@ export declare type MaterialReactTableProps<TData extends Record<string, any> =
438
456
  enableTableHead?: boolean;
439
457
  enableToolbarInternalActions?: boolean;
440
458
  enableTopToolbar?: boolean;
441
- globalFilterModeOptions?: (MRT_FilterOption | string)[] | null;
442
459
  expandRowsFn?: (dataRow: TData) => TData[];
460
+ globalFilterFn?: MRT_FilterOption;
461
+ globalFilterModeOptions?: MRT_FilterOption[] | null;
443
462
  icons?: Partial<MRT_Icons>;
444
463
  initialState?: Partial<MRT_TableState<TData>>;
445
464
  /**
@@ -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,7 +1,8 @@
1
- import { ColumnOrderState, GroupingState } from '@tanstack/react-table';
2
- import { TableCellProps, Theme } from '@mui/material';
1
+ import type { ColumnOrderState, GroupingState } from '@tanstack/react-table';
3
2
  import { MRT_FilterFns } from './filterFns';
4
3
  import { MRT_SortingFns } from './sortingFns';
4
+ import type { TableCellProps } from '@mui/material/TableCell';
5
+ import type { Theme } from '@mui/material/styles';
5
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>[];
@@ -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,6 +1,6 @@
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
5
  import ArrowRightIcon from '@mui/icons-material/ArrowRight';
6
6
  import CancelIcon from '@mui/icons-material/Cancel';
@@ -32,7 +32,48 @@ import SearchOffIcon from '@mui/icons-material/SearchOff';
32
32
  import SortIcon from '@mui/icons-material/Sort';
33
33
  import ViewColumnIcon from '@mui/icons-material/ViewColumn';
34
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';
35
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';
36
77
 
37
78
  /******************************************************************************
38
79
  Copyright (c) Microsoft Corporation.
@@ -88,7 +129,7 @@ const prepareColumns = ({ columnDefs, columnFilterFns, defaultDisplayColumn, fil
88
129
  }
89
130
  if (!columnDef.columnDefType)
90
131
  columnDef.columnDefType = 'data';
91
- 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) {
92
133
  columnDef.columnDefType = 'group';
93
134
  columnDef.columns = prepareColumns({
94
135
  columnDefs: columnDef.columns,
@@ -1448,7 +1489,7 @@ const MRT_FilterTextField = ({ header, rangeFilterIndex, table, }) => {
1448
1489
  : (_b = column.getFilterValue()) !== null && _b !== void 0 ? _b : '';
1449
1490
  });
1450
1491
  const handleChangeDebounced = useCallback(debounce((event) => {
1451
- let value = textFieldProps.type === 'date'
1492
+ const value = textFieldProps.type === 'date'
1452
1493
  ? event.target.valueAsDate
1453
1494
  : textFieldProps.type === 'number'
1454
1495
  ? event.target.valueAsNumber
@@ -1752,7 +1793,7 @@ const MRT_TableHeadCellSortLabel = ({ header, table, tableCellProps, }) => {
1752
1793
  const { options: { localization }, } = table;
1753
1794
  const { column } = header;
1754
1795
  const { columnDef } = column;
1755
- const sortTooltip = !!column.getIsSorted()
1796
+ const sortTooltip = column.getIsSorted()
1756
1797
  ? column.getIsSorted() === 'desc'
1757
1798
  ? localization.sortedByColumnDesc.replace('{column}', columnDef.header)
1758
1799
  : localization.sortedByColumnAsc.replace('{column}', columnDef.header)
@@ -2301,8 +2342,8 @@ const MRT_TableBody = ({ table }) => {
2301
2342
  let paddingTop = 0;
2302
2343
  let paddingBottom = 0;
2303
2344
  if (enableRowVirtualization) {
2304
- paddingTop = !!virtualRows.length ? virtualRows[0].start : 0;
2305
- paddingBottom = !!virtualRows.length
2345
+ paddingTop = virtualRows.length ? virtualRows[0].start : 0;
2346
+ paddingBottom = virtualRows.length
2306
2347
  ? virtualizer.totalSize - virtualRows[virtualRows.length - 1].end
2307
2348
  : 0;
2308
2349
  }
@@ -2520,14 +2561,11 @@ const MRT_TableRoot = (props) => {
2520
2561
  const tablePaperRef = useRef(null);
2521
2562
  const topToolbarRef = useRef(null);
2522
2563
  const initialState = useMemo(() => {
2523
- var _a, _b;
2564
+ var _a, _b, _c;
2524
2565
  const initState = (_a = props.initialState) !== null && _a !== void 0 ? _a : {};
2525
2566
  initState.columnOrder =
2526
2567
  (_b = initState.columnOrder) !== null && _b !== void 0 ? _b : getDefaultColumnOrderIds(props);
2527
- initState.globalFilterFn =
2528
- props.globalFilterFn instanceof String
2529
- ? props.globalFilterFn
2530
- : 'fuzzy';
2568
+ initState.globalFilterFn = (_c = props.globalFilterFn) !== null && _c !== void 0 ? _c : 'fuzzy';
2531
2569
  return initState;
2532
2570
  }, []);
2533
2571
  const [columnFilterFns, setColumnFilterFns] = useState(() => Object.assign({}, ...getAllLeafColumnDefs(props.columns).map((col) => {