import { CdkCell, CdkCellDef, CdkColumnDef, CdkFooterCell, CdkFooterCellDef, CdkHeaderCell, CdkHeaderCellDef } from '@angular/cdk/table'; import { ElementRef, EventEmitter, NgZone, OnDestroy, OnInit, Renderer2 } from '@angular/core'; import { TsDocumentService } from '@terminus/ngx-tools/browser'; import { TsColumnDefDirective } from './column'; /** * The minimum width for columns */ export declare const TS_TABLE_MIN_COLUMN_WIDTH = 70; /** * Set the column alignment styles * * @param column - The column definition * @param renderer - The Renderer2 * @param elementRef - The element ref to add the class to */ export declare function setColumnAlignment(column: TsColumnDefDirective, renderer: Renderer2, elementRef: ElementRef): void; /** * Cell definition for the {@link TsTableComponent}. * * Captures the template of a column's data row cell as well as cell-specific properties. */ export declare class TsCellDefDirective extends CdkCellDef { } /** * Header cell definition for the {@link TsTableComponent}. * * Captures the template of a column's header cell and as well as cell-specific properties. */ export declare class TsHeaderCellDefDirective extends CdkHeaderCellDef { } /** * Define the event object for header cell resize events */ export declare class TsHeaderCellResizeEvent { instance: TsHeaderCellDirective; width: number; constructor(instance: TsHeaderCellDirective, width: number); } /** * Header cell template container that adds the right classes and role. */ export declare class TsHeaderCellDirective extends CdkHeaderCell implements OnInit, OnDestroy { columnDef: CdkColumnDef; elementRef: ElementRef; private renderer; private documentService; private ngZone; /** * Store a reference to the column */ column: TsColumnDefDirective; /** * Stream used inside takeUntil pipes */ private killStream$; /** * Define the class for the resizable element */ private readonly resizerClass; /** * Store the starting offset when a resize event begins */ startOffsetX: number; /** * Store the starting width of a cell before resizing */ startWidth: number; /** * Define the default component ID */ readonly uid: string; /** * Store the current cell width */ width: string; /** * Return the current set width */ get cellWidth(): number; /** * Return a reference to the resize element */ private get resizeElement(); /** * Event emitted when the cell is resized */ readonly resized: EventEmitter; constructor(columnDef: CdkColumnDef, elementRef: ElementRef, renderer: Renderer2, documentService: TsDocumentService, ngZone: NgZone); /** * Initial setup */ ngOnInit(): void; /** * Remove all event listeners when destroyed */ ngOnDestroy(): void; /** * Inject the resize 'grabber' element. * * Called by {@link TsTableComponent} */ injectResizeElement(): void; /** * Return the new width if above the minimum width * * @param start - The starting width * @param difference - The amount moved * @returns The final column width */ private static determineWidth; /** * Save initial width and offset, bind to more events * * @param event - The mouse event */ private onResizeColumn; /** * Set the column width style and save the width * * @param width - The width to set */ setColumnWidth(width: number): void; /** * Sync the hovered class * * @param isHovered - Whether the resize element is currently hovered */ private syncHoverClass; } /** * Cell template container that adds the right classes and role. */ export declare class TsCellDirective extends CdkCell implements OnInit { elementRef: ElementRef; private columnDef; private renderer; /** * Store a reference to the column */ column: TsColumnDefDirective; /** * Define the default component ID */ readonly uid: string; constructor(elementRef: ElementRef, columnDef: CdkColumnDef, renderer: Renderer2); /** * Initial setup */ ngOnInit(): void; } /** * Footer cell definition for the mat-table. * * Captures the template of a column's footer cell and as well as cell-specific properties. */ export declare class TsFooterCellDefDirective extends CdkFooterCellDef { } /** * Footer cell template container that adds the right classes and role. */ export declare class TsFooterCellDirective extends CdkFooterCell implements OnInit { columnDef: CdkColumnDef; elementRef: ElementRef; private renderer; /** * Store a reference to the column */ column: TsColumnDefDirective; constructor(columnDef: CdkColumnDef, elementRef: ElementRef, renderer: Renderer2); /** * Initial setup */ ngOnInit(): void; }