import * as vscode from 'vscode'; import { Cell } from './helper'; /** * Generic table view which provides a cellClicked event to be able to build interaction with the webview. */ export declare class TableWebview { protected disposables: vscode.Disposable[]; protected title: string; protected headers: string[]; static viewCount: number; readonly identifier: string; readonly localResourceRoots: vscode.Uri[]; readonly scriptUri: vscode.Uri; readonly cssUri: vscode.Uri | undefined; webview: vscode.Webview; diagramPanel: vscode.WebviewPanel; private resolveWebviewReady; private readonly webviewReady; protected selectedCell: { rowId: string; columnId: string; text?: string; }; readonly cellClickedEmitter: vscode.EventEmitter<{ rowId: string; columnId: string; text?: string | undefined; } | undefined>; readonly cellClicked: vscode.Event<{ rowId: string; columnId: string; text?: string; } | undefined>; readonly initializedEmitter: vscode.EventEmitter; readonly initialized: vscode.Event; constructor(identifier: string, localResourceRoots: vscode.Uri[], scriptUri: vscode.Uri, cssUri?: vscode.Uri); ready(): Promise; getTitle(): string; getSelectedRow(): { rowId: string; columnId: string; text?: string | undefined; }; /** * Creates a diagram panel and initializes the webview. * @param headers Headers of the table. */ protected createWebviewPanel(headers: string[]): void; /** * Initializes the webview html and saves the headers. * @param webview The webview to initialize. * @param title The title of the webview. * @param headers The headers of the table. */ initializeWebview(webview: vscode.Webview, title: string, headers: string[]): Promise; /** * Adds a row to the table. * @param values The values of the row in correct ordering. * @param rowId Id of the row to add. */ addRow(rowId: string, ...values: Cell[]): Promise; /** * Updates a cells. * @param rowId The Id of the row of the cell. * @param columnId The id of the column of the cell. * @param value The new value for the cell. */ updateCell(rowId: string, columnId: string, value: Cell): Promise; /** * Resets the table to the headers. */ reset(): Promise; /** * Registers listener for webview notifications. */ protected connect(): Promise; /** * Sends identifier to the webview. */ protected sendTableIdentifier(): Promise; /** * Handles messages from the webview. * @param message The message received from the webview. */ protected receiveFromWebview(message: any): Promise; /** * Sends messages to the webview. * @param message The message to send. */ sendToWebview(message: any): void; dispose(): void; } //# sourceMappingURL=table-webview.d.ts.map