UNPKG

igniteui-angular

Version:

Ignite UI for Angular is a dependency-free Angular toolkit for building modern web apps

66 lines (65 loc) 2.7 kB
import { EventEmitter } from '@angular/core'; import { BaseToolbarDirective } from './grid-toolbar.base'; import { IgxBaseExporter, IgxCsvExporterOptions, IgxCsvExporterService, IgxExcelExporterOptions, IgxExcelExporterService } from '../../services/public_api'; import { IgxToggleDirective } from '../../directives/toggle/toggle.directive'; import { GridType } from '../common/grid.interface'; import { IgxToolbarToken } from './token'; import * as i0 from "@angular/core"; export type IgxExporterOptions = IgxCsvExporterOptions | IgxExcelExporterOptions; export interface IgxExporterEvent { exporter: IgxBaseExporter; options: IgxExporterOptions; grid: GridType; cancel: boolean; } /** * Provides a pre-configured exporter component for the grid. * * @remarks * This component still needs the actual exporter service(s) provided in the DI chain * in order to export something. * * @igxModule IgxGridToolbarModule * @igxParent IgxGridToolbarComponent * */ export declare class IgxGridToolbarExporterComponent extends BaseToolbarDirective { private excelExporter; private csvExporter; /** * Show entry for CSV export. */ exportCSV: boolean; /** * Show entry for Excel export. */ exportExcel: boolean; /** * The name for the exported file. */ filename: string; /** * Emitted when starting an export operation. Re-emitted additionally * by the grid itself. */ exportStarted: EventEmitter<IgxExporterEvent>; /** * Emitted on successful ending of an export operation. */ exportEnded: EventEmitter<void>; /** * Indicates whether there is an export in progress. */ protected isExporting: boolean; constructor(toolbar: IgxToolbarToken, excelExporter: IgxExcelExporterService, csvExporter: IgxCsvExporterService); protected exportClicked(type: 'excel' | 'csv', toggleRef?: IgxToggleDirective): void; /** * Export the grid's data * @param type File type to export */ export(type: 'excel' | 'csv'): void; static ɵfac: i0.ɵɵFactoryDeclaration<IgxGridToolbarExporterComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<IgxGridToolbarExporterComponent, "igx-grid-toolbar-exporter", never, { "exportCSV": { "alias": "exportCSV"; "required": false; }; "exportExcel": { "alias": "exportExcel"; "required": false; }; "filename": { "alias": "filename"; "required": false; }; }, { "exportStarted": "exportStarted"; "exportEnded": "exportEnded"; }, never, ["*", "[excelText],excel-text", "[csvText],csv-text"], true, never>; static ngAcceptInputType_exportCSV: unknown; static ngAcceptInputType_exportExcel: unknown; }