import type OlFeature from 'ol/Feature.js'; import { GridDataById } from '../../../tools/featuretogriddatabyid.js'; import { ColumnDefinition, RowComponent } from 'tabulator-tables'; import IGirafeContext from '../../../tools/context/icontext.js'; /** * Represents the header text and state of a tab. */ export interface TabHeader { id: string; text: string; active: boolean; } /** * Represents a column in a data table. */ export interface Column { id: string; name: string; } /** * Represents the content and backrefs of a tab. */ export interface TabContent { columns: Column[]; data: unknown[][]; features: OlFeature[]; } export default class SelectionTabulatorManager { private readonly featureToGridData; private idTab; private tabHeaders; private table; private element; private data; private readonly context; private readonly columnAliasHelper; constructor(context: IGirafeContext); /** * Set the HTML element to be used by the grid. */ setElement(htmlElement: HTMLElement): void; /** * Replace the data of the current grid with the data of the specified tab. */ replaceData(id: string): void; /** * Activates a tab matching the given id. */ activateTab(id: string): void; /** * Creates (replace) the Tabulator grid based on the provided tab id and related data and features. */ displayGrid(id: string): void; /** * Transforms the given features into grid data and sets tab headers. * The grid data are completely replaced. */ featuresToGridData(features: OlFeature[]): void; /** * Converts grid data to grid tab format and adds it to the idTab object. * @private */ private gridDataToGridTab; columnsToGridColumns(idTable: string, columns: string[]): ColumnDefinition[]; filterEmptyColumnsOnData(data: GridDataById): GridDataById; /** * @returns A newly created grid column object. * @private */ private createGridColumn; blockRedraw(): void; restoreRedraw(): void; selectAll(): void; selectNone(): void; invertSelection(): void; getSelectedRows(): RowComponent[]; getSelectedData(): any[]; getColumnFields(): string[]; getTabHeaders(): TabHeader[]; clearTabHeaders(): void; getTabIds(): string[]; }