@3mo/data-grid
Version:
A data grid web component
38 lines • 1.99 kB
TypeScript
import { Component, type HTMLTemplateResult } from '@a11d/lit';
import { DataGrid } from '../DataGrid.js';
import { DataGridColumn, type DataGridColumnAlignment, type DataGridColumnMenuItems, type DataGridColumnSticky } from '../DataGridColumn.js';
/**
* @attr width - The width of the column
* @attr hidden - Whether the column is hidden. The column can be made visible by the user in the settings panel if available.
* @attr heading - The heading of the column
* @attr textAlign - The text alignment of the column
* @attr description - The description of the column. It will be displayed as a tooltip on the heading.
* @attr dataSelector - The data selector of the column
* @attr sortDataSelector - The data selector of the column
* @attr nonSortable - Whether the column is sortable
* @attr nonEditable - Whether the column is editable
* @attr sticky - The sticky position of the column, either 'start', 'end', or 'both'
*/
export declare abstract class DataGridColumnComponent<TData, TValue> extends Component {
dataGrid?: DataGrid<TData, any> | undefined;
width: string;
hidden: boolean;
sticky?: DataGridColumnSticky;
heading: string;
description?: string;
textAlign: DataGridColumnAlignment;
dataSelector: KeyPath.Of<TData>;
sortDataSelector?: KeyPath.Of<TData>;
nonSortable: boolean;
nonEditable: boolean | Predicate<TData>;
get column(): DataGridColumn<TData, TValue>;
protected getMenuItemsTemplate?(): DataGridColumnMenuItems;
abstract getContentTemplate(value: TValue | undefined, data: TData): HTMLTemplateResult;
abstract getEditContentTemplate?(value: TValue | undefined, data: TData): HTMLTemplateResult;
protected handleEdit(value: TValue | undefined, data: TData): void;
connectedCallback(): void;
protected updated(): void;
generateCsvHeading(): Generator<string>;
generateCsvValue(value: any, data: TData): Generator<string>;
}
//# sourceMappingURL=DataGridColumnComponent.d.ts.map