react-crud-mui 0.2.61 → 0.2.63
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.
|
@@ -4,7 +4,7 @@ import { SxProps, Theme } from '@mui/material/styles';
|
|
|
4
4
|
import { TableProps as MuiTableProps } from '@mui/material/Table';
|
|
5
5
|
import { TablePaginationProps } from '@mui/material/TablePagination';
|
|
6
6
|
import { TableRowProps } from '@mui/material/TableRow';
|
|
7
|
-
import { Header, Cell, ColumnDef, Row, RowData, TableOptions } from '@tanstack/react-table';
|
|
7
|
+
import { Header, Cell, ColumnDef, Row, RowData, TableOptions, Table as TableType } from '@tanstack/react-table';
|
|
8
8
|
import { SpinDelayOptions } from '../hooks/useSpinDelay';
|
|
9
9
|
import { ScrollbarProps } from '../scrollbar/Scrollbar';
|
|
10
10
|
import { BodyTableCell } from './components/BodyTableCell';
|
|
@@ -53,9 +53,10 @@ export interface TableProps<TData extends FieldValues> extends Omit<TableOptions
|
|
|
53
53
|
onRenderNestedComponent?: (props: RenderSubComponentProps<TData>) => React.ReactNode;
|
|
54
54
|
onRowClick?: (e: React.MouseEvent<HTMLTableRowElement>, row: Row<TData>) => void;
|
|
55
55
|
onRowEnterPress?: (row: Row<TData>) => void;
|
|
56
|
-
onRowProps?: (row: Row<TData>) => React.ComponentProps<typeof BodyTableRow> | undefined;
|
|
57
|
-
onCellProps?: (cell: Cell<TData, unknown>) => React.ComponentProps<typeof BodyTableCell> | undefined;
|
|
58
|
-
onHeadCellProps?: (header: Header<TData, unknown>) => React.ComponentProps<typeof HeadTableCell> | undefined;
|
|
56
|
+
onRowProps?: (row: Row<TData>, table: TableType<TData>) => React.ComponentProps<typeof BodyTableRow> | undefined;
|
|
57
|
+
onCellProps?: (cell: Cell<TData, unknown>, table: TableType<TData>) => React.ComponentProps<typeof BodyTableCell> | undefined;
|
|
58
|
+
onHeadCellProps?: (header: Header<TData, unknown>, table: TableType<TData>) => React.ComponentProps<typeof HeadTableCell> | undefined;
|
|
59
|
+
onFooterCellProps?: (header: Header<TData, unknown>, table: TableType<TData>) => React.ComponentProps<typeof BodyTableCell> | undefined;
|
|
59
60
|
onSubTreeRows?: Path<TData> | ((originalRow: TData) => unknown[] | undefined);
|
|
60
61
|
rowIdField?: Path<TData>;
|
|
61
62
|
scrollProps?: Partial<ScrollbarProps>;
|
|
@@ -73,7 +74,7 @@ export interface TableProps<TData extends FieldValues> extends Omit<TableOptions
|
|
|
73
74
|
alternateColor?: boolean;
|
|
74
75
|
delayOptions?: SpinDelayOptions;
|
|
75
76
|
}
|
|
76
|
-
declare function Table<TData extends FieldValues>({ alternateColor, autoFocus, bordered, columns, data, delayOptions, descriptionField, emptyText, enablePagination, enableRowClickSelect, enableNestedComponent, enableSkeleton, headerSx, loading, newRowButtonText, newRowButtonContent, onCellProps, onHeadCellProps, onNewRow, onRenderNestedComponent, onRowClick, onRowEnterPress, onRowProps, onSubTreeRows, paginationProps, rowIdField, rowSx, size, showEmptyText, showHeader, showFooter, stickyHeader, scrollProps, showEmptyImage, showNewRowButton, skeletonRows, state, sx, ...tableProps }: TableProps<TData>): import("react/jsx-runtime").JSX.Element;
|
|
77
|
+
declare function Table<TData extends FieldValues>({ alternateColor, autoFocus, bordered, columns, data, delayOptions, descriptionField, emptyText, enablePagination, enableRowClickSelect, enableNestedComponent, enableSkeleton, headerSx, loading, newRowButtonText, newRowButtonContent, onCellProps, onFooterCellProps, onHeadCellProps, onNewRow, onRenderNestedComponent, onRowClick, onRowEnterPress, onRowProps, onSubTreeRows, paginationProps, rowIdField, rowSx, size, showEmptyText, showHeader, showFooter, stickyHeader, scrollProps, showEmptyImage, showNewRowButton, skeletonRows, state, sx, ...tableProps }: TableProps<TData>): import("react/jsx-runtime").JSX.Element;
|
|
77
78
|
declare namespace Table {
|
|
78
79
|
var MoreMenu: typeof TableMoreMenu;
|
|
79
80
|
var MoreMenuItem: typeof TableMoreMenuItem;
|
|
@@ -12,9 +12,6 @@ declare module '@mui/material/styles' {
|
|
|
12
12
|
800: string;
|
|
13
13
|
900: string;
|
|
14
14
|
}
|
|
15
|
-
interface TypeBackground {
|
|
16
|
-
header?: string;
|
|
17
|
-
}
|
|
18
15
|
}
|
|
19
16
|
export declare const primary: {
|
|
20
17
|
25: string;
|
|
@@ -148,8 +145,8 @@ export declare const lightPalette: {
|
|
|
148
145
|
disabledBackground: string;
|
|
149
146
|
};
|
|
150
147
|
background: {
|
|
151
|
-
default: string;
|
|
152
148
|
paper: string;
|
|
149
|
+
default: string;
|
|
153
150
|
header: string;
|
|
154
151
|
};
|
|
155
152
|
grey: {
|
|
@@ -262,9 +259,8 @@ export declare const darkPalette: {
|
|
|
262
259
|
disabledBackground: string;
|
|
263
260
|
};
|
|
264
261
|
background: {
|
|
265
|
-
default: string;
|
|
266
262
|
paper: string;
|
|
267
|
-
|
|
263
|
+
default: string;
|
|
268
264
|
};
|
|
269
265
|
grey: {
|
|
270
266
|
25: string;
|