/** * @license * Copyright Datorama. All Rights Reserved. * * Use of this source code is governed by an Apache License 2.0 license that can be * found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE */ import { ChangeDetectorRef, ComponentFactoryResolver, ElementRef, EventEmitter, Injector, OnDestroy, QueryList } from '@angular/core'; import { Observable } from 'rxjs'; import { AgGridAngular } from '@ag-grid-community/angular'; import { GridReadyEvent } from '@ag-grid-community/core'; import { GridQuery } from '../grid-store/grid.query'; import { GridService } from '../grid-store/grid.service'; import { DatoGridOptions, DatoGridSort, GridChangeEvent } from '../grid/grid-v2.types'; import { IconRegistry } from '../../services/icon-registry'; import { DatoCustomHeaderTemplateComponent } from '../grid-custom-header/custom-header-template.component'; import { GridAction, RowAction } from '../grid-toolbar/grid-toolbar.types'; import { DatoTranslateService } from '../../services/translate.service'; import { GridStorageAPI } from '../grid-settings'; import { DatoHotkeys } from '../../hotkeys/hotkeys.service'; import { DatoGridExternalFilter } from '../grid-filter/grid-filter.types'; export declare class DatoGridControllerComponent implements OnDestroy { gridService: GridService; gridQuery: GridQuery; private cdr; private iconRegistry; private translate; private host; private injector; private resolver; private hotkeys; private storageAPI; customHeadersTemplates: QueryList; onGridChange: EventEmitter; rowActions: RowAction[]; gridActions: GridAction[]; set gridOptions(gridOptions: DatoGridOptions); get gridOptions(): DatoGridOptions; gridReady$: Observable; agGridEl: HTMLElement; /** * dato-grid-v2 renders only once options exist, since consumers may set them * asynchronously. AG Grid 27 reads its options and registered listeners when it creates the grid, * so the normalized options go in through the [gridOptions] input and gridReady through a template * (gridReady) binding, instead of assigning/subscribing from the ViewChild setter (too late under *ngIf). * @internal */ hasGridOptions$: Observable; get agGridOptions(): DatoGridOptions; private contentInit; private destroy$; private tooltip; private _gridOptions; private _agGridOptions; private hasGridOptions; private agGridReady; private rowHoverComponent; private lastHoveredRow; private gridElements; private readonly treeGridClass; private cellMouseOutTimer; constructor(gridService: GridService, gridQuery: GridQuery, cdr: ChangeDetectorRef, iconRegistry: IconRegistry, translate: DatoTranslateService, host: ElementRef, injector: Injector, resolver: ComponentFactoryResolver, hotkeys: DatoHotkeys, storageAPI: GridStorageAPI); ngOnDestroy(): void; onAgGridReady(event: GridReadyEvent): void; initializeGrid(agGrid: AgGridAngular, agGridEl: HTMLElement): void; private _initializeGrid; private normalizeOptions; setGridRows(data: T[]): void; setGridFilters(filters: DatoGridExternalFilter[]): void; setGridSort(sort: DatoGridSort): void; private getGridIcons; private registerSettingsListeners; private listenToColumnResize; private listenToGridEvents; private listenToStoreSettingsChanges; private registerGridListeners; private registerGridGroupListeners; /** * Check if a click was performed on the grids body and not a row, clear the rows selection */ private registerGridClickListener; private onHoverEnabled; private registerGridMouseListeners; /** * Dispose the tooltip */ clearTooltip(): void; private showTooltip; private createAndShowTooltip; /** * Update the tooltip element ref and content */ private updateTooltip; private addOnHoverElement; private get rowHoverEl(); private setOnHoverState; private updateOnHoverPos; private toggleRowHoverClass; private registerGridKeyboardListener; private registerWindowResizeListener; private getGridData; private registerEventsTriggeringClearSelectedRows; private registerPaginationChanged; }