import type { CSSProperties, FunctionalComponent, RendererElement, RendererNode, VNode } from 'vue'; import type { FixedDir, SortOrder } from './constants'; export declare type Alignment = 'left' | 'center' | 'right'; export declare type FixedDirection = FixedDir; export declare type KeyType = string | number | symbol; /** * Param types */ export declare type CellRendererParams = { cellData: T; } & RowCommonParams & ColumnCommonParams; export declare type ColumnCommonParams = { columns: Column[]; column: Column; columnIndex: number; }; export declare type HeaderCellRendererParams = { headerIndex: number; } & ColumnCommonParams; export declare type RowCommonParams = { rowData: any; rowIndex: number; }; export declare type ClassNameGetterParams = { cellData: T; } & RowCommonParams & ColumnCommonParams; export declare type DataGetterParams = { columns: Column[]; column: Column; columnIndex: number; } & RowCommonParams; export declare type DataGetter = (params: DataGetterParams) => T; export declare type ClassNameGetter = (params: ClassNameGetterParams) => string; export declare type HeaderClassGetter = (params: ColumnCommonParams & { headerIndex: number; }) => string; /** * Renderer/Getter types */ export declare type CellRenderer = (params: CellRendererParams) => VNode; export declare type HeaderCellRenderer = (params: HeaderCellRendererParams) => VNode; export declare type Column = { /** * Attributes */ align?: Alignment; class?: string | ClassNameGetter; key?: KeyType; dataKey?: KeyType; fixed?: true | FixedDirection; flexGrow?: CSSProperties['flexGrow']; flexShrink?: CSSProperties['flexShrink']; title?: string; hidden?: boolean; headerClass?: HeaderClassGetter | string; maxWidth?: number; minWidth?: number; style?: CSSProperties; sortable?: boolean; width: number; /** * Renderers */ cellRenderer?: CellRenderer; headerCellRenderer?: HeaderCellRenderer; /** * Extendable sections */ [key: string]: any; }; export declare type Columns = Column[]; export declare type AnyColumns = Columns; export declare type SortBy = { key: KeyType; order: SortOrder; }; export declare type SortState = { [key: KeyType]: SortOrder; }; export declare type CustomizedCellsType = VNode[]; export declare type DefaultCellsType = VNode[][]; export declare type ColumnCellsType = DefaultCellsType | CustomizedCellsType; export declare type TableV2CustomizedHeaderSlotParam = { cells: VNode[]; columns: Columns; headerIndex: number; }; export declare type SimpleFunctionalComponentProps = { class?: JSX.IntrinsicAttributes['class']; style?: CSSProperties; } & T; export declare type SimpleFunctionalComponent = FunctionalComponent>;