material-react-table 0.22.0 → 0.22.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/README.md +90 -18
- package/dist/MaterialReactTable.d.ts +158 -152
- package/dist/filtersFns.d.ts +22 -22
- package/dist/material-react-table.cjs.development.js.map +1 -1
- package/dist/material-react-table.cjs.production.min.js.map +1 -1
- package/dist/material-react-table.esm.js.map +1 -1
- package/dist/sortingFns.d.ts +2 -2
- package/dist/table/MRT_TableRoot.d.ts +1 -1
- package/dist/utils.d.ts +7 -7
- package/package.json +6 -6
- package/src/MaterialReactTable.tsx +189 -174
- package/src/filtersFns.ts +22 -22
- package/src/sortingFns.ts +6 -6
- package/src/table/MRT_TableRoot.tsx +9 -10
- package/src/utils.ts +28 -22
package/dist/sortingFns.d.ts
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
import { Row } from '@tanstack/react-table';
|
2
2
|
import { MRT_Row } from '.';
|
3
3
|
export declare const MRT_SortingFns: {
|
4
|
-
fuzzy: <
|
4
|
+
fuzzy: <TData extends Record<string, any> = {}>(rowA: Row<TData>, rowB: Row<TData>, columnId: string) => number;
|
5
5
|
alphanumeric: import("@tanstack/table-core").SortingFn<any>;
|
6
6
|
alphanumericCaseSensitive: import("@tanstack/table-core").SortingFn<any>;
|
7
7
|
text: import("@tanstack/table-core").SortingFn<any>;
|
@@ -9,4 +9,4 @@ export declare const MRT_SortingFns: {
|
|
9
9
|
datetime: import("@tanstack/table-core").SortingFn<any>;
|
10
10
|
basic: import("@tanstack/table-core").SortingFn<any>;
|
11
11
|
};
|
12
|
-
export declare const rankGlobalFuzzy: <
|
12
|
+
export declare const rankGlobalFuzzy: <TData extends Record<string, any> = {}>(rowA: MRT_Row<TData>, rowB: MRT_Row<TData>) => number;
|
@@ -1,3 +1,3 @@
|
|
1
1
|
/// <reference types="react" />
|
2
2
|
import { MaterialReactTableProps } from '../MaterialReactTable';
|
3
|
-
export declare const MRT_TableRoot: <
|
3
|
+
export declare const MRT_TableRoot: <TData extends Record<string, any> = {}>(props: MaterialReactTableProps<TData>) => JSX.Element;
|
package/dist/utils.d.ts
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
import { ColumnOrderState } from '@tanstack/react-table';
|
2
2
|
import { MaterialReactTableProps, MRT_Column, MRT_ColumnDef, MRT_DefinedColumnDef, MRT_FilterOption } from '.';
|
3
|
-
export declare const getAllLeafColumnDefs: <
|
4
|
-
export declare const prepareColumns: <
|
3
|
+
export declare const getAllLeafColumnDefs: <TData extends Record<string, any> = {}>(columns: MRT_ColumnDef<TData>[]) => MRT_ColumnDef<TData>[];
|
4
|
+
export declare const prepareColumns: <TData extends Record<string, any> = {}>(columnDefs: MRT_ColumnDef<TData>[], currentFilterFns: {
|
5
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<
|
7
|
-
export declare const reorderColumn: <
|
8
|
-
export declare const getLeadingDisplayColumnIds: <
|
9
|
-
export declare const getTrailingDisplayColumnIds: <
|
10
|
-
export declare const getDefaultColumnOrderIds: <
|
6
|
+
}) => MRT_DefinedColumnDef<TData>[];
|
7
|
+
export declare const reorderColumn: <TData extends Record<string, any> = {}>(movingColumn: MRT_Column<TData>, receivingColumn: MRT_Column<TData>, columnOrder: ColumnOrderState) => ColumnOrderState;
|
8
|
+
export declare const getLeadingDisplayColumnIds: <TData extends Record<string, any> = {}>(props: MaterialReactTableProps<TData>) => string[];
|
9
|
+
export declare const getTrailingDisplayColumnIds: <TData extends Record<string, any> = {}>(props: MaterialReactTableProps<TData>) => (string | false | undefined)[];
|
10
|
+
export declare const getDefaultColumnOrderIds: <TData extends Record<string, any> = {}>(props: MaterialReactTableProps<TData>) => string[];
|
package/package.json
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
{
|
2
|
-
"version": "0.22.
|
2
|
+
"version": "0.22.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.",
|
@@ -48,11 +48,11 @@
|
|
48
48
|
"size-limit": [
|
49
49
|
{
|
50
50
|
"path": "dist/material-react-table.cjs.production.min.js",
|
51
|
-
"limit": "
|
51
|
+
"limit": "40 KB"
|
52
52
|
},
|
53
53
|
{
|
54
54
|
"path": "dist/material-react-table.esm.js",
|
55
|
-
"limit": "
|
55
|
+
"limit": "40 KB"
|
56
56
|
}
|
57
57
|
],
|
58
58
|
"devDependencies": {
|
@@ -70,8 +70,8 @@
|
|
70
70
|
"@storybook/addon-links": "^6.5.9",
|
71
71
|
"@storybook/addons": "^6.5.9",
|
72
72
|
"@storybook/react": "^6.5.9",
|
73
|
-
"@types/react": "^18.0.
|
74
|
-
"@types/react-dom": "^18.0.
|
73
|
+
"@types/react": "^18.0.15",
|
74
|
+
"@types/react-dom": "^18.0.6",
|
75
75
|
"babel-loader": "^8.2.5",
|
76
76
|
"eslint": "^8.19.0",
|
77
77
|
"eslint-plugin-react-hooks": "^4.6.0",
|
@@ -98,7 +98,7 @@
|
|
98
98
|
},
|
99
99
|
"dependencies": {
|
100
100
|
"@tanstack/match-sorter-utils": "8.1.1",
|
101
|
-
"@tanstack/react-table": "8.1.
|
101
|
+
"@tanstack/react-table": "8.1.4",
|
102
102
|
"react-virtual": "^2.10.4"
|
103
103
|
}
|
104
104
|
}
|