import { AfterViewInit, ChangeDetectorRef, EventEmitter, OnDestroy } from '@angular/core'; import { MatTable } from '@angular/material/table'; import { Subject, Subscription } from 'rxjs'; export declare abstract class RdsResizeableTableComponent implements AfterViewInit, OnDestroy { protected cdr: ChangeDetectorRef; table: MatTable; /** Map of user-customized column widths (in px) */ set columnWidths(widths: { [id: string]: number; }); /** Whether to enable column resize, defaults to false */ get enableColumnResize(): boolean; set enableColumnResize(enable: boolean); private _enableColumnResize; resize: EventEmitter<{ [id: string]: number; }>; /** Whether the columns have been set */ abstract get areColumnsSet(): boolean; /** Minimum column width */ abstract get minColWidth(): number; /** The table columns to render */ displayedColumns: Array; /** Map of column IDs to column width */ _columnWidth: { [id: string]: number; }; /** Whether a column is being resized */ _resizingColumn: boolean; /** ID of the column being resized */ _currentResizeId: string; /** Horizontal coordinate where the mouse was clicked when starting to drag */ _dragEventStartX: number; /** Width of column before it is resized */ _columnStartWidth: number; _destroyed$: Subject; _mousemoveSub: Subscription; _mouseupSub: Subscription; constructor(cdr: ChangeDetectorRef); ngAfterViewInit(): void; ngOnDestroy(): void; /** * Handle the `mousedown` event when a column is being resized via the drag handle * @param event mousedown `MouseEvent` * @param id ID of the column being resized */ _onResizeColumn(event: MouseEvent, id: string): void; /** * Determine the initial column width for any column. * You may want to override this and add extra logic if you want to change the logic. * i.e. if you want ghost columns or numeric columns to have a smaller width * * @param id The ID of the column */ protected getColumnWidth(id: string): number; /** * Initialize columns widths when resize is enabled. * The displaytedColumns need to be set prior this initialization. */ protected initializeColumnWidths(): void; /** Updates the underlying CDK table's sticky column styles */ protected updateStickyColumnStyles(): void; /** * Update a column's width * * @param id ID of the column to update * @param width new width to set */ private _updateColumnWidth; /** * Listen for `mousemove` events to resize the column and listen for the `mouseup` event to stop. * * @param id ID of the column being resized */ private _watchMouseDragMovement; }