UNPKG

@iotize/ionic

Version:

Iotize specific building blocks on top of @ionic/angular.

58 lines (57 loc) 1.52 kB
export interface Options { filename: string; fieldSeparator: string; quoteStrings: string; decimalseparator: string; showLabels: boolean; showTitle: boolean; title: string; useBom: boolean; headers: string[]; noDownload: boolean; nullToEmptyString: boolean; } export declare class CsvConfigConsts { static EOL: string; static BOM: string; static DEFAULT_FIELD_SEPARATOR: string; static DEFAULT_DECIMAL_SEPARATOR: string; static DEFAULT_QUOTE: string; static DEFAULT_SHOW_TITLE: boolean; static DEFAULT_TITLE: string; static DEFAULT_FILENAME: string; static DEFAULT_SHOW_LABELS: boolean; static DEFAULT_USE_BOM: boolean; static DEFAULT_HEADER: any[]; static DEFAULT_NO_DOWNLOAD: boolean; static DEFAULT_NULL_TO_EMPTY_STRING: boolean; } export declare const ConfigDefaults: Options; export declare class ExportToCsv { constructor(DataJSON: Record<string, any>[] | string, filename: string, options?: Partial<Options>); data: any[]; private _options; private csv; /** * Check if is Float * @param {any} input */ static isFloat(input: any): boolean; /** * Generate CSV To string */ csvToString(): string; /** * Create Headers */ getHeaders(): void; /** * Create Body */ getBody(): void; /** * Format Data * @param {any} data */ formatData(data: any): any; }