/// /// Copyright © 2016-2021 The Thingsboard Authors /// /// Licensed under the Apache License, Version 2.0 (the "License"); /// you may not use this file except in compliance with the License. /// You may obtain a copy of the License at /// /// http://www.apache.org/licenses/LICENSE-2.0 /// /// Unless required by applicable law or agreed to in writing, software /// distributed under the License is distributed on an "AS IS" BASIS, /// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. /// See the License for the specific language governing permissions and /// limitations under the License. /// import { BaseData, HasId } from '@shared/models/base-data'; import { EntityTypeTranslation } from '@shared/models/entity-type.models'; import { SafeHtml } from '@angular/platform-browser'; import { PageLink } from '@shared/models/page/page-link'; import { Timewindow } from '@shared/models/time/time.models'; import { EntitiesDataSource } from '@home/models/datasource/entity-datasource'; import { ElementRef, EventEmitter } from '@angular/core'; import { TbAnchorComponent } from '@shared/components/tb-anchor.component'; import { MatPaginator } from '@angular/material/paginator'; import { MatSort } from '@angular/material/sort'; import { EntityAction } from '@home/models/entity/entity-component.models'; import { CellActionDescriptor, EntityActionTableColumn, EntityColumn, EntityTableColumn, EntityTableConfig, GroupActionDescriptor, HeaderActionDescriptor } from '@home/models/entity/entities-table-config.models'; export interface IEntitiesTableComponent { entitiesTableConfig: EntityTableConfig>; translations: EntityTypeTranslation; headerActionDescriptors: Array; groupActionDescriptors: Array>>; cellActionDescriptors: Array>>; actionColumns: Array>>; entityColumns: Array>>; displayedColumns: string[]; headerCellStyleCache: Array; cellContentCache: Array; cellTooltipCache: Array; cellStyleCache: Array; selectionEnabled: boolean; defaultPageSize: number; displayPagination: boolean; pageSizeOptions: number[]; pageLink: PageLink; pageMode: boolean; textSearchMode: boolean; timewindow: Timewindow; dataSource: EntitiesDataSource>; isDetailsOpen: boolean; detailsPanelOpened: EventEmitter; entityTableHeaderAnchor: TbAnchorComponent; searchInputField: ElementRef; paginator: MatPaginator; sort: MatSort; addEnabled(): boolean; clearSelection(): void; updateData(closeDetails?: boolean): void; onRowClick($event: Event, entity): void; toggleEntityDetails($event: Event, entity); addEntity($event: Event): void; onEntityUpdated(entity: BaseData): void; onEntityAction(action: EntityAction>): void; deleteEntity($event: Event, entity: BaseData): void; deleteEntities($event: Event, entities: BaseData[]): void; onTimewindowChange(): void; enterFilterMode(): void; exitFilterMode(): void; resetSortAndFilter(update?: boolean, preserveTimewindow?: boolean): void; columnsUpdated(resetData?: boolean): void; headerCellStyle(column: EntityColumn>): any; clearCellCache(col: number, row: number): void; cellContent(entity: BaseData, column: EntityColumn>, row: number): any; cellTooltip(entity: BaseData, column: EntityColumn>, row: number): string; cellStyle(entity: BaseData, column: EntityColumn>, row: number): any; trackByColumnKey(index, column: EntityTableColumn>): string; trackByEntityId(index: number, entity: BaseData): string; }