react-crud-mui 0.2.50 → 0.2.51
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/components/table/Table.d.ts +22 -2
- package/dist/coreui.js +3731 -3723
- package/package.json +1 -1
|
@@ -4,11 +4,13 @@ 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 { ColumnDef, Row, RowData, TableOptions } from '@tanstack/react-table';
|
|
7
|
+
import { Header, Cell, ColumnDef, Row, RowData, TableOptions } from '@tanstack/react-table';
|
|
8
8
|
import { SpinDelayOptions } from '../hooks/useSpinDelay';
|
|
9
9
|
import { ScrollbarProps } from '../scrollbar/Scrollbar';
|
|
10
|
+
import { BodyTableCell } from './components/BodyTableCell';
|
|
10
11
|
import { BodyTableRow } from './components/BodyTableRow';
|
|
11
12
|
import { EmptyTextProps } from './components/EmptyText';
|
|
13
|
+
import { HeadTableCell } from './components/HeadTableCell';
|
|
12
14
|
import { default as TableMoreMenu } from './components/TableMoreMenu';
|
|
13
15
|
import { default as TableMoreMenuItem } from './components/TableMoreMenuItem';
|
|
14
16
|
declare module '@tanstack/react-table' {
|
|
@@ -52,6 +54,8 @@ export interface TableProps<TData extends FieldValues> extends Omit<TableOptions
|
|
|
52
54
|
onRowClick?: (e: React.MouseEvent<HTMLTableRowElement>, row: Row<TData>) => void;
|
|
53
55
|
onRowEnterPress?: (row: Row<TData>) => void;
|
|
54
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;
|
|
55
59
|
onSubTreeRows?: Path<TData> | ((originalRow: TData) => unknown[] | undefined);
|
|
56
60
|
rowIdField?: Path<TData>;
|
|
57
61
|
scrollProps?: Partial<ScrollbarProps>;
|
|
@@ -69,9 +73,25 @@ export interface TableProps<TData extends FieldValues> extends Omit<TableOptions
|
|
|
69
73
|
alternateColor?: boolean;
|
|
70
74
|
delayOptions?: SpinDelayOptions;
|
|
71
75
|
}
|
|
72
|
-
declare function Table<TData extends FieldValues>({ alternateColor, autoFocus, bordered, columns, data, delayOptions, descriptionField, emptyText, enablePagination, enableRowClickSelect, enableNestedComponent, enableSkeleton, headerSx, loading, newRowButtonText, newRowButtonContent, 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;
|
|
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;
|
|
73
77
|
declare namespace Table {
|
|
74
78
|
var MoreMenu: typeof TableMoreMenu;
|
|
75
79
|
var MoreMenuItem: typeof TableMoreMenuItem;
|
|
80
|
+
var Row: import("@emotion/styled").StyledComponent<import("@mui/material").TableRowOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLTableRowElement>, HTMLTableRowElement>, "ref"> & {
|
|
81
|
+
ref?: ((instance: HTMLTableRowElement | null) => void | React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | React.RefObject<HTMLTableRowElement> | null | undefined;
|
|
82
|
+
}, "className" | "style" | "classes" | "children" | "sx" | "selected" | "hover"> & import("@mui/system").MUIStyledCommonProps<Theme> & {
|
|
83
|
+
indicatorColor?: string;
|
|
84
|
+
bgColor?: string;
|
|
85
|
+
bordered?: boolean;
|
|
86
|
+
}, {}, {}>;
|
|
87
|
+
var Cell: import("@emotion/styled").StyledComponent<import("@mui/material").TableCellProps & import("@mui/system").MUIStyledCommonProps<Theme> & {
|
|
88
|
+
ellipsis?: boolean;
|
|
89
|
+
}, {}, {}>;
|
|
90
|
+
var HeadCell: import("@emotion/styled").StyledComponent<import("@mui/material").TableCellProps & import("@mui/system").MUIStyledCommonProps<Theme> & {
|
|
91
|
+
ellipsis?: boolean;
|
|
92
|
+
}, {}, {}>;
|
|
93
|
+
var NewRowButton: import("@emotion/styled").StyledComponent<import("@mui/material").ButtonBaseOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
|
|
94
|
+
ref?: ((instance: HTMLButtonElement | null) => void | React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | React.RefObject<HTMLButtonElement> | null | undefined;
|
|
95
|
+
}, "className" | "style" | "classes" | "children" | "sx" | "tabIndex" | "disabled" | "action" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef"> & import("@mui/system").MUIStyledCommonProps<Theme>, {}, {}>;
|
|
76
96
|
}
|
|
77
97
|
export default Table;
|