material-react-table 0.18.1 → 0.19.0-alpha.1
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/MaterialReactTable.d.ts +166 -133
- package/dist/body/MRT_TableBody.d.ts +1 -1
- package/dist/body/MRT_TableBodyCell.d.ts +1 -1
- package/dist/body/MRT_TableBodyRow.d.ts +1 -1
- package/dist/body/MRT_TableDetailPanel.d.ts +1 -1
- package/dist/buttons/MRT_ColumnPinningButtons.d.ts +1 -1
- package/dist/buttons/MRT_CopyButton.d.ts +1 -1
- package/dist/buttons/MRT_EditActionButtons.d.ts +1 -1
- package/dist/buttons/MRT_ExpandAllButton.d.ts +1 -1
- package/dist/buttons/MRT_ExpandButton.d.ts +1 -1
- package/dist/buttons/MRT_FullScreenToggleButton.d.ts +1 -1
- package/dist/buttons/MRT_GrabHandleButton.d.ts +1 -1
- package/dist/buttons/MRT_ShowHideColumnsButton.d.ts +1 -1
- package/dist/buttons/MRT_ToggleDensePaddingButton.d.ts +1 -1
- package/dist/buttons/MRT_ToggleFiltersButton.d.ts +1 -1
- package/dist/buttons/MRT_ToggleGlobalFilterButton.d.ts +1 -1
- package/dist/buttons/MRT_ToggleRowActionMenuButton.d.ts +1 -1
- package/dist/filtersFns.d.ts +31 -23
- package/dist/footer/MRT_TableFooter.d.ts +1 -1
- package/dist/footer/MRT_TableFooterCell.d.ts +1 -1
- package/dist/footer/MRT_TableFooterRow.d.ts +1 -1
- package/dist/head/MRT_DraggableTableHeadCell.d.ts +1 -1
- package/dist/head/MRT_TableHead.d.ts +1 -1
- package/dist/head/MRT_TableHeadCell.d.ts +1 -1
- package/dist/head/MRT_TableHeadCellColumnActionsButton.d.ts +1 -1
- package/dist/head/MRT_TableHeadCellFilterContainer.d.ts +1 -1
- package/dist/head/MRT_TableHeadCellFilterLabel.d.ts +1 -1
- package/dist/head/MRT_TableHeadCellResizeHandle.d.ts +1 -1
- package/dist/head/MRT_TableHeadCellSortLabel.d.ts +1 -1
- package/dist/head/MRT_TableHeadRow.d.ts +1 -1
- package/dist/inputs/MRT_EditCellTextField.d.ts +1 -1
- package/dist/inputs/MRT_FilterRangeFields.d.ts +1 -1
- package/dist/inputs/MRT_FilterTextField.d.ts +1 -1
- package/dist/inputs/MRT_GlobalFilterTextField.d.ts +1 -1
- package/dist/inputs/MRT_SelectCheckbox.d.ts +1 -1
- package/dist/material-react-table.cjs.development.js +756 -756
- package/dist/material-react-table.cjs.development.js.map +1 -1
- package/dist/material-react-table.cjs.production.min.js +1 -1
- package/dist/material-react-table.cjs.production.min.js.map +1 -1
- package/dist/material-react-table.esm.js +757 -757
- package/dist/material-react-table.esm.js.map +1 -1
- package/dist/menus/MRT_ColumnActionMenu.d.ts +1 -1
- package/dist/menus/MRT_FilterOptionMenu.d.ts +1 -1
- package/dist/menus/MRT_RowActionMenu.d.ts +1 -1
- package/dist/menus/MRT_ShowHideColumnsMenu.d.ts +1 -1
- package/dist/menus/MRT_ShowHideColumnsMenuItems.d.ts +1 -1
- package/dist/sortingFns.d.ts +10 -3
- package/dist/table/MRT_Table.d.ts +1 -1
- package/dist/table/MRT_TableContainer.d.ts +1 -1
- package/dist/table/MRT_TablePaper.d.ts +1 -1
- package/dist/toolbar/MRT_LinearProgressBar.d.ts +1 -1
- package/dist/toolbar/MRT_TablePagination.d.ts +1 -1
- package/dist/toolbar/MRT_ToolbarAlertBanner.d.ts +1 -1
- package/dist/toolbar/MRT_ToolbarBottom.d.ts +1 -1
- package/dist/toolbar/MRT_ToolbarInternalButtons.d.ts +1 -1
- package/dist/toolbar/MRT_ToolbarTop.d.ts +1 -1
- package/dist/utils.d.ts +10 -16
- package/package.json +4 -4
- package/src/MaterialReactTable.tsx +163 -156
- package/src/body/MRT_TableBody.tsx +5 -6
- package/src/body/MRT_TableBodyCell.tsx +18 -27
- package/src/body/MRT_TableBodyRow.tsx +7 -7
- package/src/body/MRT_TableDetailPanel.tsx +7 -7
- package/src/buttons/MRT_ColumnPinningButtons.tsx +3 -3
- package/src/buttons/MRT_CopyButton.tsx +5 -7
- package/src/buttons/MRT_EditActionButtons.tsx +4 -5
- package/src/buttons/MRT_ExpandAllButton.tsx +4 -5
- package/src/buttons/MRT_ExpandButton.tsx +4 -5
- package/src/buttons/MRT_FullScreenToggleButton.tsx +3 -7
- package/src/buttons/MRT_GrabHandleButton.tsx +39 -41
- package/src/buttons/MRT_ShowHideColumnsButton.tsx +4 -4
- package/src/buttons/MRT_ToggleDensePaddingButton.tsx +3 -7
- package/src/buttons/MRT_ToggleFiltersButton.tsx +3 -4
- package/src/buttons/MRT_ToggleGlobalFilterButton.tsx +4 -8
- package/src/buttons/MRT_ToggleRowActionMenuButton.tsx +6 -6
- package/src/filtersFns.ts +24 -23
- package/src/footer/MRT_TableFooter.tsx +5 -6
- package/src/footer/MRT_TableFooterCell.tsx +8 -11
- package/src/footer/MRT_TableFooterRow.tsx +5 -9
- package/src/head/MRT_DraggableTableHeadCell.tsx +4 -6
- package/src/head/MRT_TableHead.tsx +5 -5
- package/src/head/MRT_TableHeadCell.tsx +18 -29
- package/src/head/MRT_TableHeadCellColumnActionsButton.tsx +6 -8
- package/src/head/MRT_TableHeadCellFilterContainer.tsx +5 -7
- package/src/head/MRT_TableHeadCellFilterLabel.tsx +13 -19
- package/src/head/MRT_TableHeadCellResizeHandle.tsx +12 -11
- package/src/head/MRT_TableHeadCellSortLabel.tsx +3 -5
- package/src/head/MRT_TableHeadRow.tsx +6 -6
- package/src/inputs/MRT_EditCellTextField.tsx +12 -14
- package/src/inputs/MRT_FilterRangeFields.tsx +4 -4
- package/src/inputs/MRT_FilterTextField.tsx +27 -38
- package/src/inputs/MRT_GlobalFilterTextField.tsx +5 -6
- package/src/inputs/MRT_SelectCheckbox.tsx +9 -12
- package/src/menus/MRT_ColumnActionMenu.tsx +5 -9
- package/src/menus/MRT_FilterOptionMenu.tsx +16 -48
- package/src/menus/MRT_RowActionMenu.tsx +4 -5
- package/src/menus/MRT_ShowHideColumnsMenu.tsx +8 -9
- package/src/menus/MRT_ShowHideColumnsMenuItems.tsx +11 -10
- package/src/sortingFns.ts +11 -3
- package/src/table/MRT_Table.tsx +7 -11
- package/src/table/MRT_TableContainer.tsx +5 -6
- package/src/table/MRT_TablePaper.tsx +7 -8
- package/src/table/MRT_TableRoot.tsx +118 -132
- package/src/toolbar/MRT_LinearProgressBar.tsx +4 -5
- package/src/toolbar/MRT_TablePagination.tsx +7 -9
- package/src/toolbar/MRT_ToolbarAlertBanner.tsx +6 -7
- package/src/toolbar/MRT_ToolbarBottom.tsx +8 -9
- package/src/toolbar/MRT_ToolbarInternalButtons.tsx +10 -10
- package/src/toolbar/MRT_ToolbarTop.tsx +11 -11
- package/src/utils.ts +56 -50
|
@@ -14,7 +14,7 @@ interface Props {
|
|
|
14
14
|
anchorEl: HTMLElement | null;
|
|
15
15
|
header: MRT_Header;
|
|
16
16
|
setAnchorEl: (anchorEl: HTMLElement | null) => void;
|
|
17
|
-
|
|
17
|
+
table: MRT_TableInstance;
|
|
18
18
|
}
|
|
19
19
|
export declare const MRT_ColumnActionMenu: FC<Props>;
|
|
20
20
|
export {};
|
package/dist/sortingFns.d.ts
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Row } from '@tanstack/react-table';
|
|
2
|
+
import { MRT_Row } from '.';
|
|
2
3
|
export declare const MRT_SortingFns: {
|
|
3
|
-
fuzzy: (rowA:
|
|
4
|
+
fuzzy: <D extends Record<string, any> = {}>(rowA: Row<D>, rowB: Row<D>, columnId: string) => number;
|
|
5
|
+
alphanumeric: import("@tanstack/table-core").SortingFn<any>;
|
|
6
|
+
alphanumericCaseSensitive: import("@tanstack/table-core").SortingFn<any>;
|
|
7
|
+
text: import("@tanstack/table-core").SortingFn<any>;
|
|
8
|
+
textCaseSensitive: import("@tanstack/table-core").SortingFn<any>;
|
|
9
|
+
datetime: import("@tanstack/table-core").SortingFn<any>;
|
|
10
|
+
basic: import("@tanstack/table-core").SortingFn<any>;
|
|
4
11
|
};
|
|
5
|
-
export declare const rankGlobalFuzzy: (rowA: MRT_Row
|
|
12
|
+
export declare const rankGlobalFuzzy: <D extends Record<string, any> = {}>(rowA: MRT_Row<D>, rowB: MRT_Row<D>) => number;
|
|
@@ -2,7 +2,7 @@ import { FC, RefObject } from 'react';
|
|
|
2
2
|
import { MRT_TableInstance } from '..';
|
|
3
3
|
interface Props {
|
|
4
4
|
tableContainerRef: RefObject<HTMLDivElement>;
|
|
5
|
-
|
|
5
|
+
table: MRT_TableInstance;
|
|
6
6
|
}
|
|
7
7
|
export declare const MRT_Table: FC<Props>;
|
|
8
8
|
export {};
|
package/dist/utils.d.ts
CHANGED
|
@@ -1,16 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { MaterialReactTableProps, MRT_Column, MRT_ColumnDef,
|
|
3
|
-
export declare const getAllLeafColumnDefs: (columns: MRT_ColumnDef[]) => MRT_ColumnDef[];
|
|
4
|
-
export declare const
|
|
5
|
-
[key: string]:
|
|
6
|
-
}) =>
|
|
7
|
-
export declare const
|
|
8
|
-
|
|
9
|
-
}) =>
|
|
10
|
-
export declare const
|
|
11
|
-
header?: string | undefined;
|
|
12
|
-
}) => ColumnDef<D>;
|
|
13
|
-
export declare const reorderColumn: (movingColumn: MRT_Column, receivingColumn: MRT_Column, columnOrder: ColumnOrderState) => ColumnOrderState;
|
|
14
|
-
export declare const getLeadingDisplayColumnIds: (props: MaterialReactTableProps<any>) => string[];
|
|
15
|
-
export declare const getTrailingDisplayColumnIds: (props: MaterialReactTableProps<any>) => (string | false | undefined)[];
|
|
16
|
-
export declare const getDefaultColumnOrderIds: (props: MaterialReactTableProps<any>) => string[];
|
|
1
|
+
import { ColumnOrderState } from '@tanstack/react-table';
|
|
2
|
+
import { MaterialReactTableProps, MRT_Column, MRT_ColumnDef, MRT_DefinedColumnDef, MRT_FilterOption } from '.';
|
|
3
|
+
export declare const getAllLeafColumnDefs: <D extends Record<string, any> = {}>(columns: MRT_ColumnDef<D>[]) => MRT_ColumnDef<D>[];
|
|
4
|
+
export declare const prepareColumns: <D extends Record<string, any> = {}>(columnDefs: MRT_ColumnDef<D>[], currentFilterFns: {
|
|
5
|
+
[key: string]: "between" | "contains" | "empty" | "endsWith" | "equals" | "fuzzy" | "greaterThan" | "lessThan" | "notEmpty" | "notEquals" | "startsWith" | "includesString" | "includesStringSensitive" | "equalsString" | "arrIncludes" | "arrIncludesAll" | "arrIncludesSome" | "weakEquals" | "inNumberRange";
|
|
6
|
+
}) => MRT_DefinedColumnDef<D>[];
|
|
7
|
+
export declare const reorderColumn: <D extends Record<string, any> = {}>(movingColumn: MRT_Column<D>, receivingColumn: MRT_Column<D>, columnOrder: ColumnOrderState) => ColumnOrderState;
|
|
8
|
+
export declare const getLeadingDisplayColumnIds: <D extends Record<string, any> = {}>(props: MaterialReactTableProps<D>) => string[];
|
|
9
|
+
export declare const getTrailingDisplayColumnIds: <D extends Record<string, any> = {}>(props: MaterialReactTableProps<D>) => (string | false | undefined)[];
|
|
10
|
+
export declare const getDefaultColumnOrderIds: <D extends Record<string, any> = {}>(props: MaterialReactTableProps<D>) => string[];
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.
|
|
2
|
+
"version": "0.19.0-alpha.1",
|
|
3
3
|
"license": "MIT",
|
|
4
4
|
"name": "material-react-table",
|
|
5
5
|
"description": "A fully featured Material UI implementation of TanStack React Table, inspired by material-table and the MUI X DataGrid, written from the ground up in TypeScript.",
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"@types/react": "^18.0.14",
|
|
74
74
|
"@types/react-dom": "^18.0.5",
|
|
75
75
|
"babel-loader": "^8.2.5",
|
|
76
|
-
"eslint": "^8.
|
|
76
|
+
"eslint": "^8.19.0",
|
|
77
77
|
"eslint-plugin-react-hooks": "^4.6.0",
|
|
78
78
|
"husky": "^8.0.1",
|
|
79
79
|
"prettier": "^2.7.1",
|
|
@@ -97,8 +97,8 @@
|
|
|
97
97
|
"react": ">=16.8"
|
|
98
98
|
},
|
|
99
99
|
"dependencies": {
|
|
100
|
-
"@tanstack/match-sorter-utils": "8.
|
|
101
|
-
"@tanstack/react-table": "8.
|
|
100
|
+
"@tanstack/match-sorter-utils": "8.1.1",
|
|
101
|
+
"@tanstack/react-table": "8.1.3",
|
|
102
102
|
"react-dnd": "^16.0.1",
|
|
103
103
|
"react-dnd-html5-backend": "^16.0.1",
|
|
104
104
|
"react-virtual": "^2.10.4"
|