import { CellContext, HeaderContext } from '@tanstack/react-table'; import { ReactNode } from 'react'; import { SerializedStyles } from '@emotion/react'; export type RTableProps = { Records: TableRecords; tableContainerCssStyle?: SerializedStyles; emptyData?: string | React.ReactNode; callBack?: (table: any) => void; finishedOperation?: string | null | number; setFinishedOperation?: (value: string | null | number) => void; loading?: boolean; tableHeight?: string; enableRowSelection?: boolean; selectedRowIds?: string[]; onRowSelect?: (rowId: string, selected: boolean) => void; onSelectAll?: (selected: boolean) => void; getRowId?: (row: any) => string; }; export type TableRecords = { columns: CustomColumn[]; data: any[]; actions?: TableAction[]; removeDropDownActions?: boolean; triggerDropDownComponent?: (info: any) => React.ReactNode; dropDownSide?: 'bottom' | 'right' | 'top' | 'left'; dropDownAlign?: 'center' | 'end' | 'start'; dropDownContentClassName?: SerializedStyles; dropDownItemCssStyle?: SerializedStyles; onPointerDownHandler?: (info: any) => void; staticColumns?: boolean; staticHeight?: string; }; export type CustomColumn = { id: string; accessorKey?: string; renderHeader: (info: HeaderContext) => ReactNode; renderCell: (info: CellContext) => ReactNode; size?: number; }; export type TableAction = { name: string; onClick: (info: CellContext) => void; inDropdown?: boolean; hidden?: boolean; dynamicHidden?: (info: CellContext) => boolean; Icon?: keyof typeof import('@radix-ui/react-icons') | React.ReactNode; actionIconCssStyle?: SerializedStyles; actionTextCssStyle?: SerializedStyles; actionToolTipCssStyle?: SerializedStyles; needLoader?: boolean; iconFn?: (info: any) => string; dynamicName?: (info: CellContext) => string; dynamicIcon?: (info: CellContext) => keyof typeof import('@radix-ui/react-icons'); dynamicActionIconCssStyle?: (info: CellContext) => SerializedStyles; dynamicActionTextCssStyle?: (info: CellContext) => SerializedStyles; dynamicActionToolTipCssStyle?: (info: CellContext) => SerializedStyles | undefined; dialogTitle?: (info: any) => string; dialogDescription?: (info: any) => string; cancel?: string; confirm?: string; loading?: boolean; confirmAction?: (info: any) => void; confirmCssStyle?: SerializedStyles; disabled?: boolean; headerItemsPosition?: string; inDialog?: boolean; dialogIcon?: React.ReactNode; dialogIconBackgroundColor?: string; };