import { DataTableProps } from '../datatable'; import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers.d'; export interface ButtonDownloadLocaleConfig { /** * Message to display on loading ovevrlay while downloading */ downloadingMessage: string; /** * Text when booleanValue is true */ trueText: string; /** * Text when booleanValue is false */ falseText: string; } export interface ButtonDownloadProps { /** * The file name of excel without the extension. */ fileName: string; /** * Text of the button. */ label?: string; /** * Specify which table to be exported. * When it is not specified, the default name of data table will be used. * * @default 'datatable' */ tableName?: string; /** * If you want to download multiple table in 1 excel */ multiTableNames?: string[]; /** * Texts below table in downloaded excel */ additionalTextBelowTable?: (string | string[])[]; /** * If this props exist, download data from provided configs instead syncing with data tables */ dataConfigs?: Pick< DataTableProps, 'columns' | 'fetchFunction' | 'data' | 'tableTitle' >[]; /** * Specify the error message download excel when tableConfigs is in use * * @example 'Error, failed to download {fileName}' - fileName will be replaced */ excelToastErrorMessage?: string; } /** * **WangsVue - ButtonDownload** * * _Trigger DataTable Export Excel_ * * [Live Demo](https://fewangsit.github.io/wangsvue/button) * --- --- * ![WangsVue](https://www.wangsit.id/wp-content/uploads/2023/12/cropped-Logo_Wangsid-removebg-preview-192x192.png) * * @group Component */ declare class ButtonDownload extends ClassComponent< ButtonDownloadProps, unknown, unknown > {} declare module '@vue/runtime-core' { interface GlobalComponents { ButtonDownload: GlobalComponentConstructor; } } export default ButtonDownload;