import type { ColumnPinning } from '../../../Types/ColumnPinning'; import type { SortDirection } from '../../../Types/SortDirection'; import type { CellTemplateFunction, HeaderCellTemplateFunction, PathFn, SortCompareFn } from './CellTemplateFunction'; /** * Represents the `IDataTableColumnDefinition` interface. * * @public */ export interface IDataTableColumnDefinition { /** * Identifies the data item to be displayed in this column. * * @public */ key: string; /** * Column title, if not provided key is used as title. * * @public */ title?: string; /** * The member path or value getter function for the data to bind in the table cell. * Accepts either a dot-separated string path (e.g., `'customer.name'`, `'approvals.[].approvedBy'`) * or a callback function that extracts the display value from the data item. * * @public */ pathFn?: PathFn; /** * Whether this column is hidden. * * @public */ hidden?: boolean; /** * Whether this column is sortable. * * @public */ sortable?: boolean; /** * The sort direction of this column. * * @public */ sortDirection?: SortDirection | 'none'; /** * Whether this column is pinable. * * @public */ pinable?: boolean; /** * The pin position of this column. * * @public */ pinned?: ColumnPinning; /** * Whether this column is resizable. * * @public */ resizable?: boolean; /** * The minimum width of this column. * * @public */ minWidth?: string; /** * The maximum width of this column. * * @public */ maxWidth?: string; /** * Whether this column is hideable (can be hidden by the user). * * @public */ hideable?: boolean; /** * Whether this column supports auto-sizing. * * @public */ autoSizeable?: boolean; /** * Whether the column chooser is available for this column. * * @public */ columnChoosable?: boolean; /** * Whether this column can be reordered via drag and drop. * * @public */ reorderable?: boolean; /** * A callback function that renders a custom cell template for this column. * When provided, this function is called for each row instead of the default text rendering. * The function receives the data item and the column definition, and must return a `TemplateResult` or `string`. * * @public */ cellTemplate?: CellTemplateFunction; /** * A callback function that renders a custom header cell template for this column. * When provided, this function is called instead of the default header text rendering. * The function receives the column definition and must return a `TemplateResult` or `string`. * * @public */ headerCellTemplate?: HeaderCellTemplateFunction; /** * A custom comparator function for sorting this column. * When provided, this function is used instead of the default string-based comparison. * Receives both data items and the current sort direction. * * @public */ sortFn?: SortCompareFn; } //# sourceMappingURL=IDataTableColumnDefinition.d.ts.map