/** * DataTable props extensions for the download feature. * @public * @deprecated Will be removed. Please use the `onDownloadData` callback on the `DataTable.DownloadData` slot instead. */ export interface DataTableDownloadProps { /** * Called when table data was downloaded (programmatically or via the toolbar). * @param subset - indicates which data was downloaded (all data, current page or selected rows). * @param excludedColumns - array of column IDs that were excluded from the download. * @deprecated Will be removed. Please use the `onDownloadData` callback on the `DataTable.DownloadData` slot instead. */ onDownloadData?: (subset: 'all' | 'page' | 'selected', excludedColumns?: string[]) => void; } /** * DataTable slot definition for the Download action. * @public */ export interface DataTableDownloadSlotProps { /** * Array of column IDs that can optionally be excluded from the download. */ excludeColumns?: string[]; /** * Called when table data was downloaded via the toolbar, or programmatically when the slot is configured. * @param subset - indicates which data was downloaded (all data, current page or selected rows). * @param excludedColumns - array of column IDs that were excluded from the download. */ onDownloadData?: (subset: 'all' | 'page' | 'selected', excludedColumns?: string[]) => void; } /** * Extension interface for the TanStack table instance. * @internal */ export interface DataTableDownloadDataInstance { /** * Allows to download the entire table as a csv file. * Will only include the visible columns, and columns that are not excluded via `excludeColumns`. * @param excludeColumns - defines which visible columns should be excluded from the download. * @param onDownloadEnd - internal callback fired when the download finishes, independent of success or failure. */ downloadAllData: (excludeColumns?: string[], onDownloadEnd?: () => void) => void; /** * Allows to download the current page as a csv file. * Will only include the visible columns, and columns that are not excluded via `excludeColumns`. * @param excludeColumns - defines which visible columns should be excluded from the download. * @param onDownloadEnd - internal callback fired when the download finishes, independent of success or failure. */ downloadPageData: (excludeColumns?: string[], onDownloadEnd?: () => void) => void; /** * Allows to download the current selected rows as a csv file. * Will only include the visible columns, and columns that are not excluded via `excludeColumns`. * @param excludeColumns - defines which visible columns should be excluded from the download. * @param onDownloadEnd - internal callback fired when the download finishes, independent of success or failure. */ downloadSelectedData: (excludeColumns?: string[], onDownloadEnd?: () => void) => void; } /** * Extension interface for the TanStack table instance. * @internal */ export interface DataTableDownloadDataHeader { _getDownloadString: () => string; } /** * Extension interface for the TanStack table instance. * @internal */ export interface DataTableDownloadDataCell { _getDownloadString: () => string; } export interface DataTableDownloadDataOptions { onDownloadData?: (subset: 'all' | 'page' | 'selected', excludedColumns?: string[]) => void; }