import { ColumnDefLike } from './columnIds'; /** UX round 4 (D16): the room a sortable column's triangle needs, in px. */ export declare const SORTABLE_EXTRA_WIDTH = 20; /** ui-core's own minimum width of a resizable column. It does not grow with D16. */ export declare const RESIZABLE_MIN_SIZE = 100; /** The parts of a column definition that decide its default width. */ export interface SizableColumnDef extends ColumnDefLike { size?: number; minSize?: number; maxSize?: number; } interface ColumnSizingDefaultsOptions { /** The table's own `defaultColumn`, which each column definition is merged over. */ defaultColumn?: SizableColumnDef; /** The table's `enableSorting`. */ enableSorting?: boolean; /** Whether the table can resize its columns (D15): only then does a column get ui-core's minimum width. */ canResize: boolean; } /** * Resolves the default `size`, `minSize` and `maxSize` of every leaf column before TanStack sees the definitions * (ASMA-8597, UX round 4, P2e). It changes defaults only: a width the user saved, an app's `initialState.columnSizing` * and a controlled `state.columnSizing` are applied on top by TanStack as given (DEC-D16). * * - **D16, +20 px for a sortable column.** A data column that can sort (the rule `getLeafColumnInfos` already uses, which is * TanStack's `getCanSort()` for a leaf) gets `size` + 20, where `size` is its own, else the table's `defaultColumn.size`, * else TanStack's 150. Its `minSize` and `maxSize` grow by 20 when the column or `defaultColumn` sets them. A sortable * column that opts out of resizing grows too (DEC-D16-OPTOUTS): it keeps no handle, and a `minSize === maxSize` column * stays fixed, at the new width. Columns that cannot sort, group headers and ui-core's own columns are left as they are. * - **DEC-NARROW, the minimum of a resizable column.** A column that sets no `minSize` gets the smaller of 100 px and its * default width (its `size` after D16) as its minimum, so turning resizing on never widens a column past its default * width. A column with no `size` at all keeps the 100 px minimum. A column that sets its own `minSize` keeps it. * ui-core's own columns keep the 100 px minimum they have always had. */ export declare const resolveColumnSizingDefaults: (columns: readonly TDef[], options: ColumnSizingDefaultsOptions) => TDef[]; /** * Whether a column has a fixed width: it sets `maxSize` equal to `minSize`. Such a column has no resize handle (OQ-15, * the apps' own decision), however resizing came to be on. Reads the resolved definition (`column.columnDef`). */ export declare const hasFixedWidth: (columnDef: Pick) => boolean; export {};