import { AfterContentInit, AfterViewInit, ChangeDetectorRef, EventEmitter, OnChanges, OnDestroy, PipeTransform, SimpleChanges, TemplateRef } from '@angular/core'; import { MatSort } from '@angular/material/sort'; import { MatTableDataSource } from '@angular/material/table'; import { MatTooltip } from '@angular/material/tooltip'; import { MessageNotificaionService } from '../../services/messageNotificationService/message-notification-service.service'; import { PageEvent } from '@angular/material/paginator'; import { Router } from '@angular/router'; import { TableColumn, TableHeaderIcon } from './table.model'; import { ApplyPipe } from '../../pipes/apply-pipe.pipe'; import { PaginatedTableItemContext } from './paginated-table-item.directive'; import * as i0 from "@angular/core"; export declare class PaginatedTableComponent implements OnChanges, AfterContentInit, AfterViewInit, OnDestroy { private notificationService; private cdr; router: Router; private applyPipe; readonly selectionColumnDef = "__epagSelection__"; sort: MatSort; private readonly itemTemplates?; displayedColumns: TableColumn[]; dataSource: MatTableDataSource; tableClass: string; isLoading: boolean; /** * Message shown in place of rows when the table has no data. * * - Omitted or nullish → the default {@link defaultEmptyMessage} is shown. * - A non-empty string → shown verbatim. * - An empty string → opts out of the built-in empty state entirely * (nothing is rendered, matching the pre-feature bare table). */ emptyMessage: string; /** * Optional template projected into the empty state instead of {@link emptyMessage}, * for richer content (e.g. an illustration or a retry button). When set it takes * precedence over the string message. */ emptyTemplate?: TemplateRef; readonly defaultEmptyMessage = "No records found"; isSelectable: boolean; selectedRows: any[]; selectionKey?: string | ((row: any) => string); resetSelectionOnDataChange: boolean; pageSize: number; totalLength: number; saveFiltersAndNavigate: (element: any) => void; pageSizeOptions: number[]; pageIndex: number; /** * Internal page index used to drive `mat-paginator`. Kept separate from the * `pageIndex` @Input to avoid mutating an input directly. It is synced from * the input via `ngOnChanges` and updated locally when the user navigates. */ currentPageIndex: number; pageChange: EventEmitter; selectedRowsChange: EventEmitter; toggleChange: EventEmitter<{ element: any; checked: boolean; }>; columnDefs: string[]; private readonly itemTemplateMap; private itemTemplateChangesSubscription?; constructor(notificationService: MessageNotificaionService, cdr: ChangeDetectorRef, router: Router, applyPipe: ApplyPipe); ngOnChanges(changes: SimpleChanges): void; ngAfterContentInit(): void; ngAfterViewInit(): void; ngOnDestroy(): void; /** Text rendered in the empty state, falling back to the default when nullish. */ get emptyMessageText(): string; /** An explicit empty string opts out of the built-in empty state (unless a template is provided). */ get shouldShowEmptyMessage(): boolean; /** True while the empty-state message is actually visible to the user. */ get isEmptyStateVisible(): boolean; onPageChange(event: PageEvent): void; copyToClipboard(value: string): void; isTextOverflowing(element: HTMLElement | null): boolean; /** * Shows the cell tooltip only when the text is actually truncated. * * The overflow check reads layout (`scrollWidth`/`clientWidth`), which is not * stable across change-detection passes. Driving it from `mouseenter` instead * of a template binding keeps the tooltip message constant during change * detection and avoids `ExpressionChangedAfterItHasBeenCheckedError` (NG0100). * * The message comes from {@link getCellDisplayValue}, the same resolver the * template renders with, so the tooltip always spells out the text that was * truncated rather than the untransformed source value. */ showOverflowTooltip(tooltip: MatTooltip, cell: HTMLElement, column: TableColumn, element: any): void; /** * Header counterpart to {@link showOverflowTooltip}: reveals the full column * header once `.header-label` has ellipsed it. * * The overflow check reads the label rather than the cell, because the label * is the only part of the header allowed to shrink — the header icons sit * beside it and never truncate. */ showHeaderOverflowTooltip(tooltip: MatTooltip, label: HTMLElement, column: TableColumn): void; hideOverflowTooltip(tooltip: MatTooltip): void; getQueryParams(queryParams: any, element: any): any; onToggleChange(element: any, checked: boolean): void; onToggleRowSelection(row: any, checked: boolean): void; onToggleAllRows(checked: boolean): void; isRowSelected(row: any): boolean; isAllCurrentRowsSelected(): boolean; isSelectionIndeterminate(): boolean; hasItemTemplate(columnDef: string): boolean; getItemTemplate(columnDef: string): TemplateRef | null; getItemTemplateContext(column: TableColumn, element: any): PaginatedTableItemContext; getNestedValue(element: any, path: string): any; /** * Resolves the value a cell displays: the fixed text when one is configured, * otherwise the (possibly nested) row value passed through `column.pipe`. * * This is the single source of truth for cell text — the template renders it * and {@link showOverflowTooltip} repeats it. Resolving the value twice, in * two places, is what previously let a piped cell and its tooltip disagree. */ getCellDisplayValue(column: TableColumn, element: any): any; /** Whether a cell has a value to display, or falls back to the `-` placeholder. */ hasCellValue(column: TableColumn, element: any): boolean; applyDynamicPipe(value: any, pipe: string | PipeTransform, args?: any[]): any; /** * Toggle and checkbox columns render a control instead of their value, and * projected templates render whatever the consumer chose, so neither has cell * text an overflow tooltip could repeat. */ private hasCellText; private rebuildItemTemplateMap; /** * Normalizes {@link TableColumn.headerIcon} to a list so the header renders * one icon or several through a single loop. */ getHeaderIcons(column: TableColumn): TableHeaderIcon[]; private updateColumnDefs; private getCurrentRows; private hasSelectedRow; private addRowsByIdentity; private removeRowsByIdentity; private areRowsEquivalent; private areRowsEquivalentBySelectionKey; private getSelectionKeyValue; private areRowsEquivalentByIdColumn; private getIdColumnDef; private areRowsEquivalentByJson; private safeStringify; private setSelectedRows; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; }