import { CdkDragDrop } from '@angular/cdk/drag-drop'; import { CdkVirtualScrollViewport } from '@angular/cdk/scrolling'; import { DecimalPipe } from '@angular/common'; import { AfterViewInit, ChangeDetectorRef, DoCheck, ElementRef, IterableDiffers, OnDestroy, OnInit, QueryList, Renderer2, TemplateRef } from '@angular/core'; import { PoDateService } from '../../services/po-date/po-date.service'; import { PoLanguageService } from '../../services/po-language/po-language.service'; import { PoNotificationService } from '../../services/po-notification/po-notification.service'; import { PoModalAction, PoModalComponent } from '../po-modal'; import { PoPopupComponent } from '../po-popup/po-popup.component'; import { PoTableColumnLabel } from './po-table-column-label/po-table-column-label.interface'; import { PoTableAction } from './interfaces/po-table-action.interface'; import { PoTableColumn } from './interfaces/po-table-column.interface'; import { PoTableBaseComponent, QueryParamsType } from './po-table-base.component'; import { PoTableCellTemplateDirective } from './po-table-cell-template/po-table-cell-template.directive'; import { PoTableColumnTemplateDirective } from './po-table-column-template/po-table-column-template.directive'; import { PoTableRowTemplateDirective } from './po-table-row-template/po-table-row-template.directive'; import { PoTableSubtitleColumn } from './po-table-subtitle-footer/po-table-subtitle-column.interface'; import { PoTableService } from './services/po-table.service'; import { PoTableColumnSpacing } from './enums/po-table-spacing.enum'; /** * @docsExtends PoTableBaseComponent * * @example * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ export declare class PoTableComponent extends PoTableBaseComponent implements AfterViewInit, DoCheck, OnDestroy, OnInit { private readonly changeDetector; private readonly decimalPipe; private readonly defaultService; tableRowTemplate: PoTableRowTemplateDirective; tableCellTemplate: PoTableCellTemplateDirective; tableColumnTemplates: QueryList; noColumnsHeader: any; poPopupComponent: PoPopupComponent; modalDelete: PoModalComponent; tableFooterElement: any; tableWrapperElement: any; tableTemplate: any; tableVirtualScroll: any; tableScrollable: any; columnManager: any; columnBatchActions: any; columnActionLeft: any; actionsIconElement: QueryList; actionsElement: QueryList; filterInput: ElementRef; poSearchInput: ElementRef; viewPort: CdkVirtualScrollViewport; poNotification: PoNotificationService; heightTableContainer: number; heightTableVirtual: number; popupTarget: any; tableOpacity: number; tooltipText: string; itemSize: number; lastVisibleColumnsSelected: Array; tagColor: string; idRadio: string; inputFieldValue: string; JSON: JSON; newOrderColumns: Array; sizeLoading: string; headerWidth: number; close: PoModalAction; confirm: PoModalAction; private _columnManagerTarget; private _columnManagerTargetFixed; private readonly differ; private footerHeight; private timeoutResize; private visibleElement; private scrollEvent$; private subscriptionScrollEvent; private readonly subscriptionService; private readonly clickListener; private readonly resizeListener; set columnManagerTarget(value: ElementRef); get columnManagerTarget(): ElementRef; set columnManagerTargetFixed(value: ElementRef); get columnManagerTargetFixed(): ElementRef; constructor(poDate: PoDateService, differs: IterableDiffers, renderer: Renderer2, poLanguageService: PoLanguageService, changeDetector: ChangeDetectorRef, decimalPipe: DecimalPipe, defaultService: PoTableService); get hasRowTemplateWithArrowDirectionRight(): boolean; get columnCount(): number; get columnCountForMasterDetail(): number; get detailHideSelect(): boolean; get hasVisibleActions(): boolean; get firstAction(): PoTableAction; get hasFooter(): boolean; get hasMasterDetailColumn(): boolean; get hasRowTemplate(): boolean; get hasSelectableColumn(): boolean; get hasValidColumns(): boolean; get hasVisibleSubtitleColumns(): boolean; get isSingleAction(): boolean; get isDraggable(): boolean; get inverseOfTranslation(): string; ngOnInit(): void; changeHeaderWidth(): void; ngAfterViewInit(): void; showMoreInfiniteScroll({ target }: { target: any; }): void; ngDoCheck(): void; ngOnDestroy(): void; /** * Método responsável por realizar busca no serviço de dados podendo informar filtros e com o retorno, atualiza a tabela. * * Caso não seja informado parâmetro, nada será adicionado ao GET, conforme abaixo: * ``` * url + ?page=1&pageSize=10 * ``` * > Obs: os parâmetros `page` e `pageSize` sempre serão chamados independente de ser enviados outros parâmetros. * * Caso sejam informados os parâmetros `{ name: 'JOHN', age: '23' }`, todos serão adicionados ao GET, conforme abaixo: * ``` * url + ?page=1&pageSize=10&name=JOHN&age=23 * ``` * * @param { { key: value } } queryParams Formato do objeto a ser enviado. * > Pode ser utilizada qualquer string como key, e qualquer string ou number como value. */ applyFilters(queryParams?: { [key: string]: QueryParamsType; }): void; /** * Verifica se columns possuem a propriedade width. */ applyFixedColumns(): boolean; /** * Método que colapsa uma linha com detalhe quando executada. * * @param { number } rowIndex Índice da linha que será colapsada. * > Ao reordenar os dados da tabela, o valor contido neste índice será alterado conforme a ordenação. */ collapse(rowIndex: number): void; /** * Método que expande uma linha com detalhe quando executada. * * @param { number } rowIndex Índice da linha que será expandida. * > Ao reordenar os dados da tabela, o valor contido neste índice será alterado conforme a ordenação. */ expand(rowIndex: number): void; /** * Retorna as linhas do `po-table` que estão selecionadas. */ getSelectedRows(): any[]; /** * Retorna as linhas do `po-table` que não estão selecionadas. */ getUnselectedRows(): any[]; /** * Desmarca as linhas que estão selecionadas. */ unselectRows(): void; checkDisabled(row: any, column: PoTableColumn): any; containsMasterDetail(row: any): any; executeTableAction(row: any, tableAction: any): void; /** * Desmarca uma linha que está selecionada. */ unselectRowItem(itemfn: { [key: string]: any; } | ((item: any) => boolean)): void; /** * Seleciona uma linha do 'po-table'. */ selectRowItem(itemfn: { [key: string]: any; } | ((item: any) => boolean)): void; /** * Método responsável pela exclusão de itens em lote. * Caso a tabela esteja executando a propriedade `p-service-delete`, será necessário excluir 1 item por vez. * * Ao utilizar `p-service-delete` mas sem a propriedade `p-service-api`, será responsabilidade do usuário o tratamento * após a requisição DELETE ser executada. * * Caso a tabela utilize `p-height` e esteja sem serviço, é necessário a reatribuição dos itens utilizando o evento `(p-delete-items)`, por exemplo: * * ``` * * * ``` */ deleteItems(): void; formatNumber(value: any, format: string): any; getCellData(row: any, column: PoTableColumn): any; getBooleanLabel(rowValue: any, columnBoolean: PoTableColumn): string; getColumnIcons(row: any, column: PoTableColumn): any; getColumnLabel(row: any, columnLabel: PoTableColumn): PoTableColumnLabel; getSubtitleColumn(row: any, subtitleColumn: PoTableColumn): PoTableSubtitleColumn; isShowMasterDetail(row: any): boolean; isShowRowTemplate(row: any, index: number): boolean; onClickLink(event: any, row: any, column: PoTableColumn): void; onChangeVisibleColumns(columns: Array): void; onChangeFixedColumns(columns: Array): void; onColumnRestoreManager(value: Array): void; onVisibleColumnsChange(columns: Array): void; tooltipMouseEnter(event: any, column?: PoTableColumn, row?: any): any; tooltipMouseLeave(): void; togglePopup(row: any, targetRef: any): void; trackBy(index: number): number; validateTableAction(row: any, tableAction: any): any; onOpenColumnManager(): void; onFilteredItemsChange(items: Array): void; /** * Método que remove um item da tabela. * * @param { number | { key: value } } item Índice da linha ou o item que será removido. * > Ao remover o item, a linha que o representa será excluída da tabela. */ removeItem(item: number | { [key: string]: any; }): void; /** * Método que atualiza um item da tabela. * * @param { number | { key: value } } item Índice da linha ou o item que será atualizado. * @param { { key: value } } updatedItem Item que foi atualizado. * > Ao atualizar o item, a informação será alterada na tabela. */ updateItem(item: number | { [key: string]: any; }, updatedItem: { [key: string]: any; }): void; drop(event: CdkDragDrop>): void; getTemplate(column: PoTableColumn): TemplateRef; getWidthColumnManager(): any; getColumnWidthActionsLeft(): any; hasSomeFixed(): boolean; protected calculateHeightTableContainer(height: number): void; protected verifyCalculateHeightTableContainer(): void; protected checkInfiniteScroll(): void; private changesAfterDelete; protected changeSizeLoading(): void; protected getDefaultSpacing(): PoTableColumnSpacing; protected reapplySort(): void; private checkChangesItems; private checkingIfColumnHasTooltip; private countExtraColumns; private debounceResize; private deleteItemsLocal; private deleteItemsService; private findCustomIcon; private getHeightTableFooter; private hasInfiniteScroll; private includeInfiniteScroll; private mergeCustomIcons; private removeListeners; private setTableOpacity; private verifyChangeHeightInFooter; private toggleSelect; }