import { EventEmitter, OnDestroy, OnInit } from '@angular/core'; import { SelectionType } from '../../types/selection.type'; import { RowHeightCache } from '../../utils/row-height-cache'; import { ScrollerComponent } from './scroller.component'; import { DataTableSelectionComponent } from './selection.component'; import { ScrollbarHelper } from '../../services/scrollbar-helper.service'; /** @docs-private */ export declare class DataTableBodyComponent implements OnInit, OnDestroy { private scrollbarHelper; activeRow: any; scrollbarV: boolean; scrollbarH: boolean; externalPaging: boolean; rowHeight: number | ((row: any) => number); offsetX: number; emptyMessage: string; propogateSelectionState: boolean; selectionType: SelectionType; selected: any[]; rowIdentity: Function; rowDetail: any; selectCheck: any; trackByProp: string; rowClass: any; uniqueTableId: string; selectionDisabled: (row: any) => boolean; pageSize: number; rows: any[]; columns: any[]; offset: number; rowCount: number; innerWidth: number; readonly bodyWidth: string; bodyHeight: any; scroll: EventEmitter; page: EventEmitter; activate: EventEmitter; lastActiveRow: EventEmitter; select: EventEmitter; detailToggle: EventEmitter; rowContextmenu: EventEmitter<{ event: MouseEvent; row: any; }>; scroller: ScrollerComponent; selector: DataTableSelectionComponent; /** * Property that would calculate the height of scroll bar * based on the row heights cache for virtual scroll. Other scenarios * calculate scroll height automatically (as height will be undefined). * */ readonly scrollHeight: number; rowHeightsCache: RowHeightCache; temp: any[]; offsetY: number; indexes: any; columnGroupWidths: any; rowTrackingFn: any; listener: any; _rows: any[]; _bodyHeight: any; _columns: any[]; _rowCount: number; _offset: number; _pageSize: number; /** * Creates an instance of DataTableBodyComponent. */ constructor(scrollbarHelper: ScrollbarHelper); /** * Called after the constructor, initializing input properties * */ ngOnInit(): void; /** * Called once, before the instance is destroyed. */ ngOnDestroy(): void; /** * Updates the Y offset given a new offset. * * @param [offset] */ updateOffsetY(offset?: number): void; /** * Body was scrolled, this is mainly useful for * when a user is server-side pagination via virtual scroll. * * @param event */ onBodyScroll(event: any): void; /** * Updates the page given a direction. * * @param direction */ updatePage(direction: string): void; /** * Updates the rows in the view port */ updateRows(): void; /** * Get the row height * * @param row * @return */ getRowHeight(row: any): number; /** * Calculate row height based on the expanded state of the row. * * @param row the row for which the height need to be calculated. * @return height of the row. */ getRowAndDetailHeight(row: any): number; /** * Get the height of the detail row. * * @param [row] * @param [index] * @return * */ getDetailRowHeight: (row?: any, index?: any) => number; /** * Calculates the styles for the row so that the rows can be moved in 2D space * during virtual scroll inside the DOM. In the below case the Y position is * manipulated. As an example, if the height of row 0 is 30 px and row 1 is * 100 px then following styles are generated: * * transform: translate3d(0px, 0px, 0px); -> row0 * transform: translate3d(0px, 30px, 0px); -> row1 * transform: translate3d(0px, 130px, 0px); -> row2 * * Row heights have to be calculated based on the row heights cache as we wont * be able to determine which row is of what height before hand. In the above * case the positionY of the translate3d for row2 would be the sum of all the * heights of the rows before it (i.e. row0 and row1). * * @param row The row that needs to be placed in the 2D space. * @return Returns the CSS3 style to be applied * */ getRowsStyles(row: any): any; /** * Updates the index of the rows in the viewport * */ updateIndexes(): void; /** * Refreshes the full Row Height cache. Should be used * when the entire row array state has changed. * * @return * */ refreshRowHeightCache(): void; getActiveRow(selector: any): any; /** * Gets the index for the view port * * @return * */ getAdjustedViewPortIndex(): number; /** * Toggle the Expansion of the row i.e. if the row is expanded then it will * collapse and vice versa. Note that the expanded status is stored as * a part of the row object itself as we have to preserve the expanded row * status in case of sorting and filtering of the row set. * * @param row The row for which the expansion needs to be toggled. * */ toggleRowExpansion(row: any): void; /** * Expand/Collapse all the rows no matter what their state is. * * @param expanded When true, all rows are expanded and when false, all rows will be collapsed. * */ toggleAllRows(expanded: boolean): void; /** * Recalculates the table * */ recalcLayout(): void; }