UNPKG

ag-grid-enterprise

Version:

Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue

60 lines (59 loc) 2.21 kB
import type { AgColumn, AgColumnGroup, GridSerializingParams, HeaderRowAccumulator, PdfCellStyle, PdfCustomContent, PdfExportParams, PdfImage, RowAccumulator, RowNode, RowPinnedType } from 'ag-grid-community'; import { BaseGridSerializingSession } from 'ag-grid-community'; export type PdfRowType = 'HEADER_GROUPING' | 'HEADER' | 'BODY' | 'CUSTOM'; type PdfElementType = 'cell' | 'row' | 'rowgroup' | 'header' | 'groupheader' | 'custom'; interface PdfSerializingCell { value: string; hyperlink?: string; image?: PdfImage; mergeAcross?: number; mergeDown?: number; covered?: boolean; style?: PdfCellStyle; elementType?: PdfElementType; sourceColumn?: AgColumn | AgColumnGroup; sourceNode?: RowNode; groupLevel?: number; } export interface PdfRow { type: PdfRowType; cells: PdfSerializingCell[]; style?: PdfCellStyle; sourceNode?: RowNode; rowPinned?: RowPinnedType; groupLevel?: number; } type PdfGridSerializingParams = GridSerializingParams & PdfExportParams & { resolveColor?: (value?: string) => string | undefined; }; export declare class PdfSerializingSession extends BaseGridSerializingSession<PdfCustomContent> { private readonly config; readonly useGridHeaderLayout: boolean; private readonly rows; private columnsToExport; private rowIndex; private bodyRowIndex; constructor(config: PdfGridSerializingParams); prepare(columnsToExport: AgColumn[]): void; addCustomContent(content: PdfCustomContent): void; onNewHeaderGroupingRow(): HeaderRowAccumulator; onNewHeaderRow(): HeaderRowAccumulator; private createHeaderCellAccumulator; onNewBodyRow(node?: RowNode): RowAccumulator; parse(): string; private createRow; private resolveRowPdfStyle; private extractPdfRowCellValue; private resolveCellPdfStyle; private resolveColumnHeaderPdfStyle; private resolveColumnGroupHeaderPdfStyle; private resolveHeaderPdfStyle; private getNodeRowIndex; private resolveCallbackPdfStyle; private resolveCellHyperlink; private resolveCellImage; private isRowGroupCell; private isFullWidthGroupCell; private shouldSkipGridStyles; } export {};