import { KettalColumnSort, KettalPageActions, KettalQTableColumn, KettalTableAdvancedFilters, } from "@/types/KTable"; export interface KTableProps { /** Boolean that indicates if table is in loading mode */ tableLoading?: boolean; /** List that contains the actions for the actual table */ tableActions?: KettalPageActions[]; /** Function that inserts a custom styling into a row */ // eslint-disable-next-line @typescript-eslint/ban-types customStyleRow?: Function; /** Background color of the top header of the table */ backgroundColor?: string; /** The column definitions (Array of Objects) */ columns: KettalQTableColumn[]; /** Rows of data to display */ rows: TableRow[]; /** */ actionSelected?: KettalPageActions[]; /** Name of the active action */ startSortedBy?: KettalColumnSort[]; /** Header Color */ headerColor?: string; /** Key of the row */ rowKey: string | string[]; separator: "horizontal" | "vertical" | "cell"; tooltipColumn?: string; tooltipMessage?: string; /** External filters to apply to the table fields. Keys are column names, values are filter values. */ externalFilters?: KettalTableAdvancedFilters; /** When true, column visibility and order are synced to the URL query string */ syncColumnsWithUrl?: boolean; /** When true, advanced filters are synced to the URL query string */ syncFiltersWithUrl?: boolean; } export interface TableRow { [key: string]: string | number | Date | boolean; }