import { Type } from '@angular/core'; import { MatTableDataSource } from '@angular/material/table'; import { ISort } from './ISort'; import { ITablePaginator } from './ITablePaginator'; import { TableTypeColumns } from './TableTypeColumns'; export interface ITable { data: T[]; columns: ITableColumn[]; name: string; sortOptions: ISort; isLoading?: boolean; showDeleteElementIcon?: boolean; hideHeader?: boolean; canOpenOnClick?: boolean; canExpandOnClick?: boolean; canMoveColumns?: boolean; showEditElementIcon?: boolean; paginator?: ITablePaginator; expandedElement?: T | null; setPairRows?: boolean; tableData: MatTableDataSource; customCellComponents?: any; customEditSvgIcon?: string; customDeleteSvgIcon?: string; expanderComponent?: Type; showExpandElementIcon?: boolean; } export interface ITableColumn { value: string; type: TableTypeColumns; headerName?: string; headerSvgIcon?: string; headerIcon?: string; headerIconClass?: string; tooltip?: string; translationLabel?: string; footer?: TableTypeColumns; hideHeader?: boolean; valueAux?: string; dateFormat?: string; currencyFormat?: string; currencySymbol?: string; currencyDigits?: string; /** Prefix before the number (e.g. 'US $' or 'ARS $'). When set with currencyLocale, number is formatted with that locale. */ currencyPrefix?: string; /** Locale for number formatting (e.g. 'en-US' for 1,000,000.00 or 'es-AR' for 1.000.000,00). */ currencyLocale?: string; customClass?: string; customStyles?: any; customCellClass?: string; customCellStyles?: any; hideColumn?: boolean; disableSorting?: boolean; stickyOnEnd?: boolean; stickyOnStart?: boolean; showNA?: boolean; customComponentName?: string; customComponent?: Type; customHeaderComponent?: Type; sortValue?: string; allSelected?: boolean; expandIconHeader?: boolean; picSize?: number; picRound?: boolean; imageErrorURL?: string; imagePlaceholderURL?: string; customTooltip?: string; hasTooltip?: boolean; customHeaderClass?: string; customHeaderStyles?: any; hideHeaderCheckbox?: boolean; disableCheckParamName?: string; idKey?: string; } export interface ICustomTableCellEvent { component: string; action: string; element: T; data?: any; column?: string; timestamp?: number; } export interface ICustomTableExpanderEvent { component: string; action: string; element: T; data?: any; timestamp?: number; } export interface ICustomEventPayload { action: string; element: T; column?: string; }