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.
- package/dist/cjs/MaterialReactTable.d.ts +22 -3
- package/dist/cjs/body/MRT_EditRowModal.d.ts +1 -0
- package/dist/cjs/buttons/MRT_ColumnPinningButtons.d.ts +1 -0
- package/dist/cjs/buttons/MRT_EditActionButtons.d.ts +1 -0
- package/dist/cjs/buttons/MRT_FullScreenToggleButton.d.ts +2 -1
- package/dist/cjs/buttons/MRT_GrabHandleButton.d.ts +1 -1
- package/dist/cjs/buttons/MRT_ShowHideColumnsButton.d.ts +2 -1
- package/dist/cjs/buttons/MRT_ToggleDensePaddingButton.d.ts +2 -1
- package/dist/cjs/buttons/MRT_ToggleFiltersButton.d.ts +2 -1
- package/dist/cjs/buttons/MRT_ToggleGlobalFilterButton.d.ts +2 -1
- package/dist/cjs/column.utils.d.ts +3 -2
- package/dist/cjs/head/MRT_TableHeadCellSortLabel.d.ts +1 -1
- package/dist/cjs/index.js +288 -209
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/inputs/MRT_EditCellTextField.d.ts +1 -0
- package/dist/cjs/inputs/MRT_GlobalFilterTextField.d.ts +1 -0
- package/dist/cjs/menus/MRT_FilterOptionMenu.d.ts +1 -0
- package/dist/cjs/menus/MRT_ShowHideColumnsMenu.d.ts +1 -0
- package/dist/cjs/table/MRT_TableRoot.d.ts +3 -2
- package/dist/cjs/toolbar/MRT_TablePagination.d.ts +1 -0
- package/dist/cjs/toolbar/MRT_ToolbarInternalButtons.d.ts +1 -0
- package/dist/cjs/toolbar/MRT_TopToolbar.d.ts +1 -1
- package/dist/esm/MaterialReactTable.d.ts +22 -3
- package/dist/esm/body/MRT_EditRowModal.d.ts +1 -0
- package/dist/esm/buttons/MRT_ColumnPinningButtons.d.ts +1 -0
- package/dist/esm/buttons/MRT_EditActionButtons.d.ts +1 -0
- package/dist/esm/buttons/MRT_FullScreenToggleButton.d.ts +2 -1
- package/dist/esm/buttons/MRT_GrabHandleButton.d.ts +1 -1
- package/dist/esm/buttons/MRT_ShowHideColumnsButton.d.ts +2 -1
- package/dist/esm/buttons/MRT_ToggleDensePaddingButton.d.ts +2 -1
- package/dist/esm/buttons/MRT_ToggleFiltersButton.d.ts +2 -1
- package/dist/esm/buttons/MRT_ToggleGlobalFilterButton.d.ts +2 -1
- package/dist/esm/column.utils.d.ts +3 -2
- package/dist/esm/head/MRT_TableHeadCellSortLabel.d.ts +1 -1
- package/dist/esm/inputs/MRT_EditCellTextField.d.ts +1 -0
- package/dist/esm/inputs/MRT_GlobalFilterTextField.d.ts +1 -0
- package/dist/esm/material-react-table.esm.js +49 -11
- package/dist/esm/material-react-table.esm.js.map +1 -1
- package/dist/esm/menus/MRT_FilterOptionMenu.d.ts +1 -0
- package/dist/esm/menus/MRT_ShowHideColumnsMenu.d.ts +1 -0
- package/dist/esm/table/MRT_TableRoot.d.ts +3 -2
- package/dist/esm/toolbar/MRT_TablePagination.d.ts +1 -0
- package/dist/esm/toolbar/MRT_ToolbarInternalButtons.d.ts +1 -0
- package/dist/esm/toolbar/MRT_TopToolbar.d.ts +1 -1
- package/dist/index.d.ts +23 -3
- package/locales/cs.esm.js.map +1 -1
- package/locales/cs.js.map +1 -1
- package/package.json +10 -8
- package/src/MaterialReactTable.tsx +22 -22
- package/src/_locales/cs.ts +4 -2
- package/src/body/MRT_EditRowModal.tsx +6 -8
- package/src/body/MRT_TableBody.tsx +4 -3
- package/src/body/MRT_TableBodyCell.tsx +3 -1
- package/src/body/MRT_TableBodyRow.tsx +2 -1
- package/src/body/MRT_TableDetailPanel.tsx +3 -1
- package/src/buttons/MRT_ColumnPinningButtons.tsx +3 -1
- package/src/buttons/MRT_CopyButton.tsx +2 -1
- package/src/buttons/MRT_EditActionButtons.tsx +4 -1
- package/src/buttons/MRT_ExpandAllButton.tsx +2 -1
- package/src/buttons/MRT_ExpandButton.tsx +2 -1
- package/src/buttons/MRT_FullScreenToggleButton.tsx +3 -1
- package/src/buttons/MRT_GrabHandleButton.tsx +3 -1
- package/src/buttons/MRT_ShowHideColumnsButton.tsx +3 -1
- package/src/buttons/MRT_ToggleDensePaddingButton.tsx +3 -1
- package/src/buttons/MRT_ToggleFiltersButton.tsx +3 -1
- package/src/buttons/MRT_ToggleGlobalFilterButton.tsx +3 -1
- package/src/buttons/MRT_ToggleRowActionMenuButton.tsx +2 -1
- package/src/column.utils.ts +5 -3
- package/src/footer/MRT_TableFooter.tsx +2 -1
- package/src/footer/MRT_TableFooterCell.tsx +1 -1
- package/src/footer/MRT_TableFooterRow.tsx +1 -1
- package/src/head/MRT_TableHead.tsx +1 -1
- package/src/head/MRT_TableHeadCell.tsx +4 -1
- package/src/head/MRT_TableHeadCellColumnActionsButton.tsx +2 -1
- package/src/head/MRT_TableHeadCellFilterContainer.tsx +1 -1
- package/src/head/MRT_TableHeadCellFilterLabel.tsx +4 -1
- package/src/head/MRT_TableHeadCellResizeHandle.tsx +2 -1
- package/src/head/MRT_TableHeadCellSortLabel.tsx +4 -2
- package/src/head/MRT_TableHeadRow.tsx +2 -1
- package/src/inputs/MRT_EditCellTextField.tsx +2 -1
- package/src/inputs/MRT_FilterCheckbox.tsx +4 -6
- package/src/inputs/MRT_FilterRangeFields.tsx +1 -1
- package/src/inputs/MRT_FilterTextField.tsx +11 -13
- package/src/inputs/MRT_GlobalFilterTextField.tsx +6 -8
- package/src/inputs/MRT_SelectCheckbox.tsx +4 -1
- package/src/menus/MRT_ColumnActionMenu.tsx +6 -2
- package/src/menus/MRT_FilterOptionMenu.tsx +3 -1
- package/src/menus/MRT_RowActionMenu.tsx +5 -2
- package/src/menus/MRT_ShowHideColumnsMenu.tsx +5 -2
- package/src/menus/MRT_ShowHideColumnsMenuItems.tsx +6 -8
- package/src/sortingFns.ts +2 -2
- package/src/table/MRT_Table.tsx +1 -1
- package/src/table/MRT_TableContainer.tsx +1 -1
- package/src/table/MRT_TablePaper.tsx +1 -1
- package/src/table/MRT_TableRoot.tsx +6 -8
- package/src/toolbar/MRT_BottomToolbar.tsx +4 -1
- package/src/toolbar/MRT_LinearProgressBar.tsx +2 -1
- package/src/toolbar/MRT_TablePagination.tsx +1 -1
- package/src/toolbar/MRT_ToolbarAlertBanner.tsx +5 -1
- package/src/toolbar/MRT_ToolbarDropZone.tsx +4 -1
- package/src/toolbar/MRT_ToolbarInternalButtons.tsx +1 -1
- package/src/toolbar/MRT_TopToolbar.tsx +5 -1
|
@@ -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,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;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { MutableRefObject, Dispatch, SetStateAction, ReactNode } from 'react';
|
|
2
|
-
import {
|
|
3
|
+
import { AlertProps } from '@mui/material/Alert';
|
|
4
|
+
import { ButtonProps } from '@mui/material/Button';
|
|
5
|
+
import { CheckboxProps } from '@mui/material/Checkbox';
|
|
6
|
+
import { ChipProps } from '@mui/material/Chip';
|
|
7
|
+
import { IconButtonProps } from '@mui/material/IconButton';
|
|
8
|
+
import { LinearProgressProps } from '@mui/material/LinearProgress';
|
|
9
|
+
import { PaperProps } from '@mui/material/Paper';
|
|
10
|
+
import { RadioProps } from '@mui/material/Radio';
|
|
11
|
+
import { SkeletonProps } from '@mui/material/Skeleton';
|
|
12
|
+
import { TableBodyProps } from '@mui/material/TableBody';
|
|
13
|
+
import { TableCellProps } from '@mui/material/TableCell';
|
|
14
|
+
import { TableContainerProps } from '@mui/material/TableContainer';
|
|
15
|
+
import { TableFooterProps } from '@mui/material/TableFooter';
|
|
16
|
+
import { TableHeadProps } from '@mui/material/TableHead';
|
|
17
|
+
import { TablePaginationProps } from '@mui/material/TablePagination';
|
|
18
|
+
import { TableProps } from '@mui/material/Table';
|
|
19
|
+
import { TableRowProps } from '@mui/material/TableRow';
|
|
20
|
+
import { TextFieldProps } from '@mui/material/TextField';
|
|
21
|
+
import { ToolbarProps } from '@mui/material/Toolbar';
|
|
3
22
|
import { Row, Table, TableState, ColumnDef, DeepKeys, Column, Header, HeaderGroup, Cell, SortingFn, FilterFn, TableOptions, OnChangeFn } from '@tanstack/react-table';
|
|
4
23
|
import { Options, VirtualItem } from 'react-virtual';
|
|
5
24
|
import * as _tanstack_table_core from '@tanstack/table-core';
|
|
@@ -490,7 +509,7 @@ declare type MRT_DisplayColumnIds = 'mrt-row-actions' | 'mrt-row-drag' | 'mrt-ro
|
|
|
490
509
|
* See the full props list on the official docs site:
|
|
491
510
|
* @link https://www.material-react-table.com/docs/api/props
|
|
492
511
|
*/
|
|
493
|
-
declare type MaterialReactTableProps<TData extends Record<string, any> = {}> = Omit<Partial<TableOptions<TData>>, 'columns' | 'data' | 'defaultColumn' | 'enableRowSelection' | 'expandRowsFn' | 'initialState' | 'onStateChange' | 'state'> & {
|
|
512
|
+
declare type MaterialReactTableProps<TData extends Record<string, any> = {}> = Omit<Partial<TableOptions<TData>>, 'columns' | 'data' | 'defaultColumn' | 'enableRowSelection' | 'expandRowsFn' | 'globalFilterFn' | 'initialState' | 'onStateChange' | 'state'> & {
|
|
494
513
|
columnFilterModeOptions?: (MRT_FilterOption | string)[] | null;
|
|
495
514
|
/**
|
|
496
515
|
* The columns to display in the table. `accessorKey`s or `accessorFn`s must match keys in the `data` prop.
|
|
@@ -548,8 +567,9 @@ declare type MaterialReactTableProps<TData extends Record<string, any> = {}> = O
|
|
|
548
567
|
enableTableHead?: boolean;
|
|
549
568
|
enableToolbarInternalActions?: boolean;
|
|
550
569
|
enableTopToolbar?: boolean;
|
|
551
|
-
globalFilterModeOptions?: (MRT_FilterOption | string)[] | null;
|
|
552
570
|
expandRowsFn?: (dataRow: TData) => TData[];
|
|
571
|
+
globalFilterFn?: MRT_FilterOption;
|
|
572
|
+
globalFilterModeOptions?: MRT_FilterOption[] | null;
|
|
553
573
|
icons?: Partial<MRT_Icons>;
|
|
554
574
|
initialState?: Partial<MRT_TableState<TData>>;
|
|
555
575
|
/**
|
package/locales/cs.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cs.esm.js","sources":["../src/_locales/cs.ts"],"sourcesContent":[null],"names":[],"mappings":"AAEa,MAAA,mBAAmB,GAAqB;AACnD,IAAA,OAAO,EAAE,MAAM;AACf,IAAA,GAAG,EAAE,GAAG;AACR,IAAA,MAAM,EAAE,QAAQ;AAChB,IAAA,gBAAgB,EAAE,qBAAqB;AACvC,IAAA,gBAAgB,EAAE,sBAAsB;AACxC,IAAA,WAAW,EAAE,gBAAgB;AAC7B,IAAA,WAAW,EAAE,kBAAkB;AAC/B,IAAA,SAAS,EAAE,iBAAiB;AAC5B,IAAA,WAAW,EAAE,sBAAsB;AACnC,IAAA,aAAa,EAAE,cAAc;AAC7B,IAAA,iBAAiB,EAAE,wBAAwB;AAC3C,IAAA,aAAa,EAAE,8CAA8C;AAC7D,IAAA,IAAI,EAAE,SAAS;AACf,IAAA,MAAM,EAAE,SAAS;AACjB,IAAA,SAAS,EAAE,aAAa;AACxB,IAAA,iBAAiB,EAAE,UAAU;AAC7B,IAAA,oBAAoB,EAAE,kBAAkB;AACxC,IAAA,qBAAqB,EAAE,kBAAkB;AACzC,IAAA,aAAa,EAAE,MAAM;AACrB,IAAA,sBAAsB,EAAE,MAAM;AAC9B,IAAA,cAAc,EAAE,kCAAkC;AAClD,IAAA,cAAc,EAAE,UAAU;AAC1B,IAAA,WAAW,EAAE,SAAS;AACtB,IAAA,cAAc,EAAE,UAAU;AAC1B,IAAA,YAAY,EAAE,UAAU;AACxB,IAAA,kBAAkB,EAAE,UAAU;AAC9B,IAAA,WAAW,EAAE,SAAS;AACtB,IAAA,iBAAiB,EAAE,WAAW;AAC9B,IAAA,0BAA0B,EAAE,kBAAkB;AAC9C,IAAA,mBAAmB,EAAE,MAAM;AAC3B,IAAA,oBAAoB,EAAE,UAAU;AAChC,IAAA,6BAA6B,EAAE,U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Ac;AAC/B,IAAA,gBAAgB,EAAE,WAAW;AAC7B,IAAA,eAAe,EAAE,qCAAqC;AACtD,IAAA,KAAK,EAAE,UAAU;AACjB,IAAA,QAAQ,EAAE,cAAc;AACxB,IAAA,QAAQ,EAAE,YAAY;;;;;"}
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.2.
|
|
2
|
+
"version": "1.2.5",
|
|
3
3
|
"license": "MIT",
|
|
4
4
|
"name": "material-react-table",
|
|
5
5
|
"description": "A fully featured Material UI V5 implementation of TanStack React Table V8, written from the ground up in TypeScript.",
|
|
@@ -50,13 +50,13 @@
|
|
|
50
50
|
"storybook": "start-storybook -p 6006"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"@babel/core": "^7.19.
|
|
53
|
+
"@babel/core": "^7.19.3",
|
|
54
54
|
"@babel/preset-react": "^7.18.6",
|
|
55
55
|
"@emotion/react": "^11.10.4",
|
|
56
56
|
"@emotion/styled": "^11.10.4",
|
|
57
57
|
"@faker-js/faker": "^7.5.0",
|
|
58
58
|
"@mui/icons-material": "^5.10.6",
|
|
59
|
-
"@mui/material": "^5.10.
|
|
59
|
+
"@mui/material": "^5.10.7",
|
|
60
60
|
"@rollup/plugin-babel": "^5.3.1",
|
|
61
61
|
"@rollup/plugin-node-resolve": "^14.1.0",
|
|
62
62
|
"@rollup/plugin-typescript": "^8.5.0",
|
|
@@ -69,24 +69,26 @@
|
|
|
69
69
|
"@storybook/addon-storysource": "^6.5.12",
|
|
70
70
|
"@storybook/addons": "^6.5.12",
|
|
71
71
|
"@storybook/react": "^6.5.12",
|
|
72
|
-
"@types/react": "^18.0.
|
|
72
|
+
"@types/react": "^18.0.21",
|
|
73
73
|
"@types/react-dom": "^18.0.6",
|
|
74
|
+
"@typescript-eslint/eslint-plugin": "^5.38.1",
|
|
75
|
+
"@typescript-eslint/parser": "^5.38.1",
|
|
74
76
|
"babel-loader": "^8.2.5",
|
|
75
|
-
"eslint": "^8.
|
|
76
|
-
"eslint-plugin-
|
|
77
|
+
"eslint": "^8.24.0",
|
|
78
|
+
"eslint-plugin-mui-path-imports": "^0.0.3",
|
|
77
79
|
"husky": "^8.0.1",
|
|
78
80
|
"prettier": "^2.7.1",
|
|
79
81
|
"react": "^18.2.0",
|
|
80
82
|
"react-dom": "^18.2.0",
|
|
81
83
|
"react-is": "^18.2.0",
|
|
82
|
-
"rollup": "^2.79.
|
|
84
|
+
"rollup": "^2.79.1",
|
|
83
85
|
"rollup-plugin-copy": "^3.4.0",
|
|
84
86
|
"rollup-plugin-dts": "^4.2.2",
|
|
85
87
|
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
86
88
|
"size-limit": "^8.1.0",
|
|
87
89
|
"storybook-dark-mode": "^1.1.2",
|
|
88
90
|
"tslib": "^2.4.0",
|
|
89
|
-
"typescript": "^4.8.
|
|
91
|
+
"typescript": "^4.8.4"
|
|
90
92
|
},
|
|
91
93
|
"peerDependencies": {
|
|
92
94
|
"@emotion/react": ">=11",
|
|
@@ -5,27 +5,25 @@ import React, {
|
|
|
5
5
|
SetStateAction,
|
|
6
6
|
useMemo,
|
|
7
7
|
} from 'react';
|
|
8
|
-
import type {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
ToolbarProps,
|
|
28
|
-
} from '@mui/material';
|
|
8
|
+
import type { AlertProps } from '@mui/material/Alert';
|
|
9
|
+
import type { ButtonProps } from '@mui/material/Button';
|
|
10
|
+
import type { CheckboxProps } from '@mui/material/Checkbox';
|
|
11
|
+
import type { ChipProps } from '@mui/material/Chip';
|
|
12
|
+
import type { IconButtonProps } from '@mui/material/IconButton';
|
|
13
|
+
import type { LinearProgressProps } from '@mui/material/LinearProgress';
|
|
14
|
+
import type { PaperProps } from '@mui/material/Paper';
|
|
15
|
+
import type { RadioProps } from '@mui/material/Radio';
|
|
16
|
+
import type { SkeletonProps } from '@mui/material/Skeleton';
|
|
17
|
+
import type { TableBodyProps } from '@mui/material/TableBody';
|
|
18
|
+
import type { TableCellProps } from '@mui/material/TableCell';
|
|
19
|
+
import type { TableContainerProps } from '@mui/material/TableContainer';
|
|
20
|
+
import type { TableFooterProps } from '@mui/material/TableFooter';
|
|
21
|
+
import type { TableHeadProps } from '@mui/material/TableHead';
|
|
22
|
+
import type { TablePaginationProps } from '@mui/material/TablePagination';
|
|
23
|
+
import type { TableProps } from '@mui/material/Table';
|
|
24
|
+
import type { TableRowProps } from '@mui/material/TableRow';
|
|
25
|
+
import type { TextFieldProps } from '@mui/material/TextField';
|
|
26
|
+
import type { ToolbarProps } from '@mui/material/Toolbar';
|
|
29
27
|
import type {
|
|
30
28
|
Cell,
|
|
31
29
|
Column,
|
|
@@ -603,6 +601,7 @@ export type MaterialReactTableProps<TData extends Record<string, any> = {}> =
|
|
|
603
601
|
| 'defaultColumn'
|
|
604
602
|
| 'enableRowSelection'
|
|
605
603
|
| 'expandRowsFn'
|
|
604
|
+
| 'globalFilterFn'
|
|
606
605
|
| 'initialState'
|
|
607
606
|
| 'onStateChange'
|
|
608
607
|
| 'state'
|
|
@@ -664,8 +663,9 @@ export type MaterialReactTableProps<TData extends Record<string, any> = {}> =
|
|
|
664
663
|
enableTableHead?: boolean;
|
|
665
664
|
enableToolbarInternalActions?: boolean;
|
|
666
665
|
enableTopToolbar?: boolean;
|
|
667
|
-
globalFilterModeOptions?: (MRT_FilterOption | string)[] | null;
|
|
668
666
|
expandRowsFn?: (dataRow: TData) => TData[];
|
|
667
|
+
globalFilterFn?: MRT_FilterOption;
|
|
668
|
+
globalFilterModeOptions?: MRT_FilterOption[] | null;
|
|
669
669
|
icons?: Partial<MRT_Icons>;
|
|
670
670
|
initialState?: Partial<MRT_TableState<TData>>;
|
|
671
671
|
/**
|
package/src/_locales/cs.ts
CHANGED
|
@@ -40,7 +40,8 @@ export const MRT_Localization_CS: MRT_Localization = {
|
|
|
40
40
|
filterNotEquals: 'Nerovná se',
|
|
41
41
|
filterStartsWith: 'Začíná na',
|
|
42
42
|
filterWeakEquals: 'Rovná se',
|
|
43
|
-
filteringByColumn:
|
|
43
|
+
filteringByColumn:
|
|
44
|
+
'Filtrováno podle sloupce {column} - {filterType} {filterValue}',
|
|
44
45
|
goToFirstPage: 'První strana',
|
|
45
46
|
goToLastPage: 'Poslední strana',
|
|
46
47
|
goToNextPage: 'Další strana',
|
|
@@ -67,7 +68,8 @@ export const MRT_Localization_CS: MRT_Localization = {
|
|
|
67
68
|
rowsPerPage: 'Řádek na stránce',
|
|
68
69
|
save: 'Uložit',
|
|
69
70
|
search: 'Hledat',
|
|
70
|
-
selectedCountOfRowCountRowsSelected:
|
|
71
|
+
selectedCountOfRowCountRowsSelected:
|
|
72
|
+
'Vybráno {selectedCount} z {rowCount} řádek',
|
|
71
73
|
select: 'Vybrat',
|
|
72
74
|
showAll: 'Zobrazit vše',
|
|
73
75
|
showAllColumns: 'Zobrazit všechny sloupce',
|
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
Stack,
|
|
8
|
-
} from '@mui/material';
|
|
2
|
+
import Dialog from '@mui/material/Dialog';
|
|
3
|
+
import DialogActions from '@mui/material/DialogActions';
|
|
4
|
+
import DialogContent from '@mui/material/DialogContent';
|
|
5
|
+
import DialogTitle from '@mui/material/DialogTitle';
|
|
6
|
+
import Stack from '@mui/material/Stack';
|
|
9
7
|
import { MRT_EditActionButtons } from '../buttons/MRT_EditActionButtons';
|
|
10
|
-
import type { MRT_Row, MRT_TableInstance } from '..';
|
|
11
8
|
import { MRT_EditCellTextField } from '../inputs/MRT_EditCellTextField';
|
|
9
|
+
import type { MRT_Row, MRT_TableInstance } from '..';
|
|
12
10
|
|
|
13
11
|
interface Props<TData extends Record<string, any> = {}> {
|
|
14
12
|
open: boolean;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React, { FC, memo, useMemo } from 'react';
|
|
2
2
|
import { useVirtual } from 'react-virtual'; //stuck on v2 for now
|
|
3
3
|
// import { useVirtualizer, Virtualizer } from '@tanstack/react-virtual';
|
|
4
|
-
import
|
|
4
|
+
import TableBody from '@mui/material/TableBody';
|
|
5
|
+
import Typography from '@mui/material/Typography';
|
|
5
6
|
import { Memo_MRT_TableBodyRow, MRT_TableBodyRow } from './MRT_TableBodyRow';
|
|
6
7
|
import { rankGlobalFuzzy } from '../sortingFns';
|
|
7
8
|
import type { MRT_Row, MRT_TableInstance } from '..';
|
|
@@ -104,8 +105,8 @@ export const MRT_TableBody: FC<Props> = ({ table }) => {
|
|
|
104
105
|
let paddingTop = 0;
|
|
105
106
|
let paddingBottom = 0;
|
|
106
107
|
if (enableRowVirtualization) {
|
|
107
|
-
paddingTop =
|
|
108
|
-
paddingBottom =
|
|
108
|
+
paddingTop = virtualRows.length ? virtualRows[0].start : 0;
|
|
109
|
+
paddingBottom = virtualRows.length
|
|
109
110
|
? virtualizer.totalSize - virtualRows[virtualRows.length - 1].end
|
|
110
111
|
: 0;
|
|
111
112
|
}
|
|
@@ -8,7 +8,9 @@ import React, {
|
|
|
8
8
|
useMemo,
|
|
9
9
|
useState,
|
|
10
10
|
} from 'react';
|
|
11
|
-
import
|
|
11
|
+
import Skeleton from '@mui/material/Skeleton';
|
|
12
|
+
import TableCell from '@mui/material/TableCell';
|
|
13
|
+
import { darken, lighten, useTheme } from '@mui/material/styles';
|
|
12
14
|
import { MRT_EditCellTextField } from '../inputs/MRT_EditCellTextField';
|
|
13
15
|
import { MRT_CopyButton } from '../buttons/MRT_CopyButton';
|
|
14
16
|
import { MRT_TableBodyRowGrabHandle } from './MRT_TableBodyRowGrabHandle';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React, { DragEvent, FC, memo, useMemo, useRef } from 'react';
|
|
2
|
-
import
|
|
2
|
+
import TableRow from '@mui/material/TableRow';
|
|
3
|
+
import { darken, lighten, useTheme } from '@mui/material/styles';
|
|
3
4
|
import { Memo_MRT_TableBodyCell, MRT_TableBodyCell } from './MRT_TableBodyCell';
|
|
4
5
|
import { MRT_TableDetailPanel } from './MRT_TableDetailPanel';
|
|
5
6
|
import type { MRT_Row, MRT_TableInstance } from '..';
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import React, { FC } from 'react';
|
|
2
|
-
import
|
|
2
|
+
import Collapse from '@mui/material/Collapse';
|
|
3
|
+
import TableCell from '@mui/material/TableCell';
|
|
4
|
+
import TableRow from '@mui/material/TableRow';
|
|
3
5
|
import type { MRT_Row, MRT_TableInstance } from '..';
|
|
4
6
|
|
|
5
7
|
interface Props {
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
2
|
+
import Box from '@mui/material/Box';
|
|
3
|
+
import IconButton from '@mui/material/IconButton';
|
|
4
|
+
import Tooltip from '@mui/material/Tooltip';
|
|
3
5
|
import type { MRT_Column, MRT_TableInstance } from '..';
|
|
4
6
|
|
|
5
7
|
interface Props<TData extends Record<string, any> = {}> {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React, { MouseEvent, ReactNode, useState } from 'react';
|
|
2
|
-
import
|
|
2
|
+
import Button from '@mui/material/Button';
|
|
3
|
+
import Tooltip from '@mui/material/Tooltip';
|
|
3
4
|
import { MRT_Cell, MRT_TableInstance } from '..';
|
|
4
5
|
|
|
5
6
|
interface Props<TData extends Record<string, any> = {}> {
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
2
|
+
import Box from '@mui/material/Box';
|
|
3
|
+
import Button from '@mui/material/Button';
|
|
4
|
+
import IconButton from '@mui/material/IconButton';
|
|
5
|
+
import Tooltip from '@mui/material/Tooltip';
|
|
3
6
|
import type { MRT_Row, MRT_TableInstance } from '..';
|
|
4
7
|
|
|
5
8
|
interface Props<TData extends Record<string, any> = {}> {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React, { FC, MouseEvent } from 'react';
|
|
2
|
-
import
|
|
2
|
+
import IconButton from '@mui/material/IconButton';
|
|
3
|
+
import Tooltip from '@mui/material/Tooltip';
|
|
3
4
|
import type { MRT_Row, MRT_TableInstance } from '..';
|
|
4
5
|
|
|
5
6
|
interface Props {
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
2
|
+
import IconButton from '@mui/material/IconButton';
|
|
3
|
+
import type { IconButtonProps } from '@mui/material/IconButton';
|
|
4
|
+
import Tooltip from '@mui/material/Tooltip';
|
|
3
5
|
import { MRT_TableInstance } from '..';
|
|
4
6
|
|
|
5
7
|
interface Props<TData extends Record<string, any> = {}>
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import { IconButton, IconButtonProps, Tooltip } from '@mui/material';
|
|
2
1
|
import React, { DragEventHandler } from 'react';
|
|
2
|
+
import IconButton from '@mui/material/IconButton';
|
|
3
|
+
import type { IconButtonProps } from '@mui/material/IconButton';
|
|
4
|
+
import Tooltip from '@mui/material/Tooltip';
|
|
3
5
|
import { MRT_TableInstance } from '..';
|
|
4
6
|
|
|
5
7
|
interface Props<TData extends Record<string, any> = {}> {
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import React, { MouseEvent, useState } from 'react';
|
|
2
|
-
import
|
|
2
|
+
import IconButton from '@mui/material/IconButton';
|
|
3
|
+
import type { IconButtonProps } from '@mui/material/IconButton';
|
|
4
|
+
import Tooltip from '@mui/material/Tooltip';
|
|
3
5
|
import { MRT_ShowHideColumnsMenu } from '../menus/MRT_ShowHideColumnsMenu';
|
|
4
6
|
import { MRT_TableInstance } from '..';
|
|
5
7
|
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
2
|
+
import IconButton from '@mui/material/IconButton';
|
|
3
|
+
import type { IconButtonProps } from '@mui/material/IconButton';
|
|
4
|
+
import Tooltip from '@mui/material/Tooltip';
|
|
3
5
|
import { MRT_TableInstance } from '..';
|
|
4
6
|
|
|
5
7
|
interface Props<TData extends Record<string, any> = {}>
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
2
|
+
import IconButton from '@mui/material/IconButton';
|
|
3
|
+
import type { IconButtonProps } from '@mui/material/IconButton';
|
|
4
|
+
import Tooltip from '@mui/material/Tooltip';
|
|
3
5
|
import { MRT_TableInstance } from '..';
|
|
4
6
|
|
|
5
7
|
interface Props<TData extends Record<string, any> = {}>
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
2
|
+
import IconButton from '@mui/material/IconButton';
|
|
3
|
+
import type { IconButtonProps } from '@mui/material/IconButton';
|
|
4
|
+
import Tooltip from '@mui/material/Tooltip';
|
|
3
5
|
import { MRT_TableInstance } from '..';
|
|
4
6
|
|
|
5
7
|
interface Props<TData extends Record<string, any> = {}>
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React, { FC, MouseEvent, useState } from 'react';
|
|
2
|
-
import
|
|
2
|
+
import IconButton from '@mui/material/IconButton';
|
|
3
|
+
import Tooltip from '@mui/material/Tooltip';
|
|
3
4
|
import { MRT_RowActionMenu } from '../menus/MRT_RowActionMenu';
|
|
4
5
|
import { MRT_EditActionButtons } from './MRT_EditActionButtons';
|
|
5
6
|
import type { MRT_Cell, MRT_Row, MRT_TableInstance } from '..';
|
package/src/column.utils.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import { ColumnOrderState, GroupingState } from '@tanstack/react-table';
|
|
2
|
-
import { alpha, lighten, 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 { alpha, lighten } from '@mui/material/styles';
|
|
5
|
+
import type { TableCellProps } from '@mui/material/TableCell';
|
|
6
|
+
import type { Theme } from '@mui/material/styles';
|
|
5
7
|
import type {
|
|
6
8
|
MaterialReactTableProps,
|
|
7
9
|
MRT_Column,
|
|
@@ -57,7 +59,7 @@ export const prepareColumns = <TData extends Record<string, any> = {}>({
|
|
|
57
59
|
);
|
|
58
60
|
}
|
|
59
61
|
if (!columnDef.columnDefType) columnDef.columnDefType = 'data';
|
|
60
|
-
if (
|
|
62
|
+
if (columnDef.columns?.length) {
|
|
61
63
|
columnDef.columnDefType = 'group';
|
|
62
64
|
columnDef.columns = prepareColumns({
|
|
63
65
|
columnDefs: columnDef.columns,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React, { FC } from 'react';
|
|
2
|
-
import
|
|
2
|
+
import TableFooter from '@mui/material/TableFooter';
|
|
3
|
+
import { lighten } from '@mui/material/styles';
|
|
3
4
|
import { MRT_TableFooterRow } from './MRT_TableFooterRow';
|
|
4
5
|
import type { MRT_TableInstance } from '..';
|
|
5
6
|
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import React, { DragEvent, FC, ReactNode, useMemo } from 'react';
|
|
2
|
-
import
|
|
2
|
+
import Box from '@mui/material/Box';
|
|
3
|
+
import TableCell from '@mui/material/TableCell';
|
|
4
|
+
import { useTheme } from '@mui/material/styles';
|
|
3
5
|
import { MRT_TableHeadCellColumnActionsButton } from './MRT_TableHeadCellColumnActionsButton';
|
|
4
6
|
import { MRT_TableHeadCellFilterContainer } from './MRT_TableHeadCellFilterContainer';
|
|
5
7
|
import { MRT_TableHeadCellFilterLabel } from './MRT_TableHeadCellFilterLabel';
|
|
@@ -7,6 +9,7 @@ import { MRT_TableHeadCellGrabHandle } from './MRT_TableHeadCellGrabHandle';
|
|
|
7
9
|
import { MRT_TableHeadCellResizeHandle } from './MRT_TableHeadCellResizeHandle';
|
|
8
10
|
import { MRT_TableHeadCellSortLabel } from './MRT_TableHeadCellSortLabel';
|
|
9
11
|
import { getCommonCellStyles } from '../column.utils';
|
|
12
|
+
import type { Theme } from '@mui/material/styles';
|
|
10
13
|
import type { MRT_Header, MRT_TableInstance } from '..';
|
|
11
14
|
|
|
12
15
|
interface Props {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React, { FC, MouseEvent, useState } from 'react';
|
|
2
|
-
import
|
|
2
|
+
import IconButton from '@mui/material/IconButton';
|
|
3
|
+
import Tooltip from '@mui/material/Tooltip';
|
|
3
4
|
import { MRT_ColumnActionMenu } from '../menus/MRT_ColumnActionMenu';
|
|
4
5
|
import type { MRT_Header, MRT_TableInstance } from '..';
|
|
5
6
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { FC } from 'react';
|
|
2
|
-
import
|
|
2
|
+
import Collapse from '@mui/material/Collapse';
|
|
3
3
|
import { MRT_FilterRangeFields } from '../inputs/MRT_FilterRangeFields';
|
|
4
4
|
import { MRT_FilterTextField } from '../inputs/MRT_FilterTextField';
|
|
5
5
|
import { MRT_Header, MRT_TableInstance } from '..';
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import React, { FC, MouseEvent } from 'react';
|
|
2
|
-
import
|
|
2
|
+
import Box from '@mui/material/Box';
|
|
3
|
+
import Grow from '@mui/material/Grow';
|
|
4
|
+
import IconButton from '@mui/material/IconButton';
|
|
5
|
+
import Tooltip from '@mui/material/Tooltip';
|
|
3
6
|
import { MRT_Header, MRT_TableInstance } from '..';
|
|
4
7
|
|
|
5
8
|
interface Props {
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import React, { FC } from 'react';
|
|
2
|
-
import
|
|
2
|
+
import TableSortLabel from '@mui/material/TableSortLabel';
|
|
3
|
+
import Tooltip from '@mui/material/Tooltip';
|
|
3
4
|
import { MRT_Header, MRT_TableInstance } from '..';
|
|
5
|
+
import type { TableCellProps } from '@mui/material/TableCell';
|
|
4
6
|
|
|
5
7
|
interface Props {
|
|
6
8
|
header: MRT_Header;
|
|
@@ -19,7 +21,7 @@ export const MRT_TableHeadCellSortLabel: FC<Props> = ({
|
|
|
19
21
|
const { column } = header;
|
|
20
22
|
const { columnDef } = column;
|
|
21
23
|
|
|
22
|
-
const sortTooltip =
|
|
24
|
+
const sortTooltip = column.getIsSorted()
|
|
23
25
|
? column.getIsSorted() === 'desc'
|
|
24
26
|
? localization.sortedByColumnDesc.replace('{column}', columnDef.header)
|
|
25
27
|
: localization.sortedByColumnAsc.replace('{column}', columnDef.header)
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React, { FC } from 'react';
|
|
2
|
-
import
|
|
2
|
+
import TableRow from '@mui/material/TableRow';
|
|
3
|
+
import { alpha, lighten } from '@mui/material/styles';
|
|
3
4
|
import { MRT_TableHeadCell } from './MRT_TableHeadCell';
|
|
4
5
|
import type { MRT_Header, MRT_HeaderGroup, MRT_TableInstance } from '..';
|
|
5
6
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React, { ChangeEvent, FocusEvent, KeyboardEvent, useState } from 'react';
|
|
2
|
-
import
|
|
2
|
+
import TextField from '@mui/material/TextField';
|
|
3
|
+
import type { TextFieldProps } from '@mui/material/TextField';
|
|
3
4
|
import type { MRT_Cell, MRT_TableInstance } from '..';
|
|
4
5
|
|
|
5
6
|
interface Props<TData extends Record<string, any> = {}> {
|