export function table(options: { element?: HTMLElement; filterBy?: Selection; as?: Selection; align?: { [name: string]: "left" | "right" | "center"; }; format?: { [name: string]: (value: any) => string; }; from?: string; columns?: string[]; width?: number | { [name: string]: number; }; maxWidth?: number; height?: number; rowBatch?: number; }): HTMLElement; /** * A HTML table based table component. * @extends {Input} */ export class Table extends Input { /** * Create a new Table instance. * @param {object} options Options object * @param {HTMLElement} [options.element] The parent DOM element in which to * place the table element. If undefined, a new `div` element is created. * @param {Selection} [options.filterBy] A selection to filter the database * table indicated by the *from* option. * @param {Selection} [options.as] The output selection. A selection * clause is added for the currently selected table row. * @param {{ [name: string]: 'left' | 'right' | 'center' }} [options.align] * An object that maps column names to horizontal text alignment values. If * unspecified, alignment is determined based on the column data type. * @param {{ [name: string]: (value: any) => string }} [options.format] An * object that maps column names to format functions to use for that * column's data. Each format function takes a value as input and generates * formatted text to show in the table. * @param {string} [options.from] The name of a database table to use as a data * source for this widget. Used in conjunction with the *columns* option. * @param {string[]} [options.columns] The name of database columns to include * in the table component. If unspecified, all columns are included. * Used in conjunction with the *from* option. * @param {number | { [name: string]: number }} [options.width] If a number, * sets the desired width of the table, in pixels. If an object, is used to * set explicit pixel widths for each named column included in the object. * @param {number} [options.maxWidth] The maximum width of the table, in pixels. * @param {number} [options.height] The desired height of the table, in pixels. * @param {number} [options.rowBatch] The number of rows to request per query * batch. The batch size will be used to prefetch data beyond the currently * visible range. */ constructor({ element, filterBy, from, columns, align, format, width, maxWidth, height, rowBatch, as }?: { element?: HTMLElement; filterBy?: Selection; as?: Selection; align?: { [name: string]: "left" | "right" | "center"; }; format?: { [name: string]: (value: any) => string; }; from?: string; columns?: string[]; width?: number | { [name: string]: number; }; maxWidth?: number; height?: number; rowBatch?: number; }); id: string; from: string; columns: string[]; format: { [name: string]: (value: any) => string; }; align: { [name: string]: "left" | "right" | "center"; }; widths: { [name: string]: number; }; offset: number; limit: number; isPending: boolean; selection: Selection; currentRow: number; sortHeader: any; sortColumn: any; sortDesc: boolean; tbl: HTMLTableElement; head: HTMLTableSectionElement; body: HTMLTableSectionElement; style: HTMLStyleElement; sourceTable(): any; clause(rows?: any[]): import("@uwdata/mosaic-core").SelectionClause; requestData(offset?: number): void; schema: import("@uwdata/mosaic-core").FieldInfo[]; formats: any; /** * @param {FilterExpr} filter */ query(filter?: FilterExpr): import("@uwdata/mosaic-sql").SelectQuery; queryResult(data: any): this; loaded: boolean; data: any[]; update(): this; sort(event: any, column: any): void; } import type { Selection } from '@uwdata/mosaic-core'; import { Input } from './input.js'; import type { FilterExpr } from '@uwdata/mosaic-sql'; //# sourceMappingURL=Table.d.ts.map