import { AfterContentChecked, AfterContentInit, ChangeDetectorRef, EventEmitter, OnChanges, QueryList, TemplateRef, TrackByFunction } from '@angular/core'; import { TableDataSource } from './models'; import { UsaDataRowDef, UsaTableData, UsaTableDataDef } from './table-data'; import { UsaHeaderRowDef, UsaTableHeader, UsaTableHeaderDef } from './table-header'; import { UsaSort } from './table-sort.component'; import { UsaTableConfig } from './table.config'; import * as i0 from "@angular/core"; export declare class UsaColumnDef { tableHeaderTemplate: UsaTableHeaderDef; tableHeader: UsaTableHeader; tableDataTemplate: UsaTableDataDef; tableData: QueryList; tableSort: UsaSort; usaColumnDef: string; isSortActive: boolean; setSortActive(sortState: 'ascending' | 'descending'): void; setSortInactive(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } export declare class UsaTableComponent implements AfterContentInit, OnChanges, AfterContentChecked { private config; cdr: ChangeDetectorRef; /** * Display table without column borders * @default false */ borderless: boolean; /** * Allow table to scroll horizontally when content expand view width * @default true */ scrollable: boolean; /** * Add alternating light/grey background color when displaying table rows * @default false */ striped: boolean; /** * Minimize table cell padding * @default false */ compact: boolean; /** * Stack table when in mobile sized view */ stacked: boolean; /** * Displays first column as header when in stacked mode */ stackedHeader: boolean; /** * Tracking function that will be used to check the differences in data changes. * Used similarly to ngFor trackBy function Optimize row operations by identifying * a row based on its data relative to the function to know if a row should be * added/removed/moved. Accepts a function that takes two parameters, index and item. */ trackBy: TrackByFunction; /** * Whether or not the data is sorted server side. If set to true, then * the table will not perform sort operations on given data, but simply * handle bookkeeping of sort state and event emission */ serverSideSort: boolean; /** * Highlight row which is currently being hovered by cursor */ highlightRowOnHover: boolean; /** * Emitted whenever a column's sort button is clicked. Emits columns name and * sort state (ascending/descending) value */ sortClicked: EventEmitter<{ column: string; sortState: 'ascending' | 'descending'; }>; rowClicked: EventEmitter; /** * The column definitions provided by the user that contain what the header, data, and footer * cells should render for each column. */ _contentColumnDefs: QueryList; /** Set of data row definitions that were provided to the table as content children. */ _tableDataDefs: UsaDataRowDef; /** Set of header row definitions that were provided to the table as content children. */ _contentHeaderRowDefs: QueryList; /** Array Populated by Content Childern of UsaHeaderRowDef */ _headerRowDefs: UsaHeaderRowDef[]; displayedData: TableDataSource[]; _columnHeaderMap: Map; _columnDataMap: Map>; /** * Reference of table sort info if new data is dynamically added / removed */ _sortedColumnInfo: { sortState: 'ascending' | 'descending'; sortFn: Function; sortColumn: UsaColumnDef; }; _ariaLiveSortMessage: string; /** * Internal flag that gets raised anytime input data reference changes to indicate * next content check cycle, we need to re-evaluate the column with data sort active */ _resortAfterContentCheck: boolean; /** * Event bubbled up from sort button on click. Sorts the table based on * sort function for the given column * @param $event */ onSortClicked($event: CustomEvent): void; constructor(config: UsaTableConfig, cdr: ChangeDetectorRef); ngAfterContentInit(): void; ngOnChanges(changes: any): void; ngAfterContentChecked(): void; private _sortColumnData; private setAriaLiveOnSort; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; }