UNPKG

@3mo/data-grid

Version:
49 lines 2.61 kB
import { Component, type HTMLTemplateResult, type PropertyValues } from '@a11d/lit'; import { DataGrid } from '../DataGrid.js'; import { DataGridColumn, type DataGridColumnAlignment, type DataGridColumnContentStyle, 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' * @attr getContentTemplate - The content template of the column. * @attr contentStyle - The content style of the column. It can be a string, CSSResult, or a function that returns either based on the cell value and data. * @attr getEditContentTemplate - The edit content template of the column. */ export declare class DataGridColumnComponent<TData, TValue> extends Component { private readonly updateEvent; 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>; contentStyle?: DataGridColumnContentStyle<TData, TValue>; protected getMenuItemsTemplate?(): DataGridColumnMenuItems; getContentTemplate?(value: TValue | undefined, data: TData): HTMLTemplateResult; getEditContentTemplate?(value: TValue | undefined, data: TData): HTMLTemplateResult; protected handleEdit(value: TValue | undefined, data: TData): void; connectedCallback(): void; disconnectedCallback(): void; protected updated(props: PropertyValues<this>): void; generateCsvHeading(): Generator<string>; generateCsvValue(value: any, data: TData): Generator<string>; get column(): DataGridColumn<TData, TValue>; } declare global { interface HTMLElementTagNameMap { 'mo-data-grid-column': DataGridColumnComponent<unknown, unknown>; } } //# sourceMappingURL=DataGridColumnComponent.d.ts.map