import type { IColumnProps, IVirtualTable, TablePosition, SortingOrder, TableFooterProps } from '../../../types/index.js'; import { type TableHeadProps } from '@mui/material/TableHead'; import { type CSSProperties } from 'react'; export interface ISheetViewVirtualTable extends Omit { onColumnPin?: (columnId: string, isPinned: boolean) => void; isPinnable?: boolean; clearBackdropVisibilityTimeout?: number; overscanCount?: number; windowId?: string; serviceCode?: string; } export interface SheetViewTableHeaderProps { columns: IColumnProps[]; headerProps?: TableHeadProps; columnsSorting?: IVirtualTable['columnsSorting']; onColumnSort?: IVirtualTable['onColumnSort']; showBackDrop: boolean; pinnedColumns?: string[]; onColumnPin?: (columnId: string, position: 'start' | 'end' | 'unpin') => void; isPinnable?: boolean; lastColumnId?: string | null; selectedColumn?: string | null; onColumnClick?: (columnIndex: number, event: React.MouseEvent, pinnedType?: 'start' | 'end') => void; tablePosition?: TablePosition; hasPinnedStart?: boolean; hasPinnedEnd?: boolean; onStartResize?: (e: React.MouseEvent, columnId: string) => void; isResizing?: boolean; resizingColumn?: string | null; totalCount?: number; } export interface VirtualTableContainerProps { columnsData: IColumnProps[]; containerKey: 'pinnedStart' | 'pinnedEnd' | 'scrollable'; isPinned?: boolean; fixedWidth?: number; } export interface CommonTableProps { showHeader?: boolean; columnsSorting?: Record; onColumnSort?: (columnsSorting: Record) => void; headerProps?: TableHeadProps; showBackDrop: boolean; onColumnPin: (columnId: string, position: 'start' | 'end' | 'unpin') => void; isPinnable: boolean; lastColumnId?: string | null; selectedColumn?: string | null; onColumnClick?: (columnIndex: number, event: React.MouseEvent, pinnedType?: 'start' | 'end') => void; tableTitle?: string; areAllRowsLoaded?: boolean; isFetchingNextPage?: boolean; scrollToIndex?: number; isLoading?: boolean; isError: boolean; hasTimeoutError: boolean; tableMode?: string; showNoDataView: boolean; tableBodyStyles?: CSSProperties; onStartResize?: (e: React.MouseEvent, columnId: string) => void; isResizing?: boolean; resizingColumn?: string | null; } export interface PinnedColumnProps extends CommonTableProps { position: 'start' | 'end'; columnsData: IColumnProps[]; columnsWidth: number; pinnedColumnsList: string[]; hasPinnedStart: boolean; hasPinnedEnd: boolean; createVirtualTableContainer: (columnsData: IColumnProps[], containerKey: 'pinnedStart' | 'pinnedEnd' | 'scrollable', isPinned?: boolean, fixedWidth?: number) => JSX.Element; tableLoading: boolean; } export interface MainTableProps extends CommonTableProps { hasPinnedStart: boolean; hasPinnedEnd: boolean; unpinnedColumnsData: IColumnProps[]; pinnedStartColumns: string[]; pinnedEndColumns: string[]; createVirtualTableContainer: (columnsData: IColumnProps[], containerKey: 'pinnedStart' | 'pinnedEnd' | 'scrollable', isPinned?: boolean, fixedWidth?: number) => JSX.Element; tableLoading: boolean; } export interface NoDataViewProps extends CommonTableProps { tableLoading: boolean; tableError: boolean; tableEmpty: boolean; hasTimeoutError: boolean; orderedColumns: IColumnProps[]; error?: Error | null; triggerDataRefetch?: () => Promise; footerProps?: TableFooterProps; customNoDataComponent?: React.ReactNode; } export interface LoadingMainTableProps extends CommonTableProps { hasPinnedStart: boolean; hasPinnedEnd: boolean; unpinnedColumnsData: IColumnProps[]; pinnedStartColumns: string[]; pinnedEndColumns: string[]; tableLoading: boolean; }