import { default as React } from 'react'; import { MRT_ColumnDef, MRT_ColumnPinningState, MRT_ColumnSizingState, MRT_Header, MRT_Row, MRT_RowData, MRT_TableInstance, MRT_TableState, MaterialReactTableProps } from 'material-react-table'; import { IPaginationModel } from '../../@types/pagination-model'; type ExtraEditVariants = 'file' | 'image' | 'date' | 'number' | 'time' | 'date_time' | 'phone' | 'checkbox'; type DisableFunction = (row: any, virtualRow?: any) => boolean; export type TypeBooleanLabels = { 1: string; 0: string; true: string; false: string; }; export interface MaterialTableColumnProps extends Omit, 'editVariant'> { visible?: boolean; type?: string; required?: boolean; showDefaultCurrency?: boolean; valueGet?: string; custom_class?: string; /** when type is an array of objects */ typeArrayAccessorKey?: string; /** when type is a boolean */ typeBooleanLabels?: TypeBooleanLabels; editVariant?: MRT_ColumnDef['editVariant'] | ExtraEditVariants; editProperties?: { field_name?: string; valueKey?: string; placeholder?: string; dateFormat?: string; validations?: any[]; is_multiple?: boolean; is_multiline?: boolean; disable?: boolean | DisableFunction; }; redirectionPathWithId?: string; handleRowClick?: (row: any) => void; idField?: string; } export interface MaterialTableColumnHeaderProps { column: MRT_ColumnDef; header: MRT_Header; table: MRT_TableInstance; } type RowSelectionCallback = (row: MRT_Row) => boolean; export interface MaterialTablePropsType { rows: any[]; columns: MaterialTableColumnProps[]; totalPages: number; paginationModel: IPaginationModel; getSelectedData: any; enablePagination?: boolean; disableMaxHeight?: boolean; columnOrder?: string[]; columnPinning?: MRT_ColumnPinningState; updateData?: (value: any, column: any, rowId: any) => void; handleColumnOrdering?: (colOrder: any) => void; enableEditing?: boolean | ((row: MRT_Row) => boolean); enableColumnDragging?: boolean; rowActionMenu?: any[]; destructiveActionMenu?: any[]; getRowId?: (row: any, index: number) => string; states?: Partial>; onSortingChange?: any; disableDefaultActionColumn?: boolean; enableRowSelection?: boolean | RowSelectionCallback; defaultActionColumnItems?: React.ReactElement[]; enableBottomToolbar?: boolean; SetSelectedRowId?: (rows: MRT_Row[]) => void; isResetRow?: boolean; onCreateRow?: (data: any) => Promise; onEditRow?: (data: any, action?: string) => Promise; onDeleteRow?: (data: any) => Promise; editDisplayMode?: MaterialReactTableProps['editDisplayMode']; enableRowCreate?: boolean; onChangeRowField?: (e: any, type: string, row: any) => void; onSelectRow?: (rows: any, prevSelected?: any) => any; onRowClick?: (row: MRT_Row) => void; enableColumnResizing?: boolean; /** * `onEnd` (default) commits the width once the drag finishes: no per-mousemove * re-render of the whole table, which is the main source of visible jitter. * Pass `onChange` to restore the previous live-resize behaviour. */ columnResizeMode?: 'onChange' | 'onEnd'; selectedRowIds?: any[]; onColumnVisibility?: (columns: MaterialTableColumnProps[]) => void; enableAddCustomField?: boolean; disableAddColumn?: boolean; disabledDefaultActionColumnIcon?: boolean; enableRowDragging?: boolean; handleColumnResizing?: (sizes: MRT_ColumnSizingState) => void; columnSizes?: MRT_ColumnSizingState; showPreview?: boolean; handlePreview?: (row: MRT_RowData) => void; /** Opaque background applied to every pinned header/body cell. */ pinnedColumnBgColor?: string; defaultColumnProps?: Partial>; deleteConfirmTitle?: string; deleteConfirmDescription?: string; [key: string]: any; } export declare const MaterialTable: React.MemoExoticComponent<({ rows, columns, totalPages, paginationModel, getSelectedData, enablePagination, columnOrder, columnPinning, updateData, handleColumnOrdering, enableEditing, enableColumnDragging, states, rowActionMenu, destructiveActionMenu, disableDefaultActionColumn, enableRowSelection, defaultActionColumnItems, enableBottomToolbar, SetSelectedRowId, isResetRow, onCreateRow, onEditRow, onDeleteRow, editDisplayMode, enableRowCreate, onChangeRowField, onSelectRow, onRowClick, enableColumnResizing, columnResizeMode, selectedRowIds, onColumnVisibility, onSortingChange, disabledDefaultActionColumnIcon, enableAddCustomField, disableAddColumn, enableRowDragging, handleColumnResizing, columnSizes, disableMaxHeight, showPreview, handlePreview, pinnedColumnBgColor, getRowId, defaultColumnProps, deleteConfirmTitle, deleteConfirmDescription, ...rest }: MaterialTablePropsType) => import("react/jsx-runtime").JSX.Element>; export default MaterialTable;