/** Row heights: xs 24 · sm 32 · md 40 · lg 48 (Carbon default) · xl 64. */ export type TableSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl'; /** A column's sort state (Carbon `TABLE_SORT_DIRECTION`). */ export type TableSortDirection = 'none' | 'ascending' | 'descending'; /** The states a header steps through on each click (Carbon `TABLE_SORT_CYCLE`). */ export type TableSortCycle = 'bi-states-from-ascending' | 'bi-states-from-descending' | 'tri-states-from-ascending' | 'tri-states-from-descending'; /** Carbon `TABLE_SORT_CYCLES`. */ export declare const TABLE_SORT_CYCLES: Record; /** The direction after `current` in `cycle` (Carbon `_getNextSort`; an unsorted column starts the cycle). */ export declare function nextTableSort(current: TableSortDirection, cycle?: TableSortCycle): TableSortDirection; /** `ui-table-header-cell-sort` detail (cancelable: `preventDefault()` keeps the rows where they are). */ export interface TableHeaderCellSortDetail { oldSortDirection: TableSortDirection; sortDirection: TableSortDirection; } /** `ui-table-sorted` detail. */ export interface TableSortedDetail { sortedHeader: HTMLElement; } /** `ui-table-row-change-selection` / `ui-table-change-selection-all` detail (cancelable). */ export interface TableSelectionDetail { selected: boolean; } /** `ui-table-row-expando-beingtoggled` (cancelable) / `ui-table-row-expando-toggled` detail. */ export interface TableExpandoDetail { expanded: boolean; } /** `ui-table-row-selected` detail: the row the user chose or released, and every chosen row. */ export interface TableRowSelectedDetail { selectedRow: HTMLElement; selectedRows: HTMLElement[]; } /** `ui-table-row-all-selected` detail: every chosen row after select-all (or Cancel). */ export interface TableAllSelectedDetail { selectedRows: HTMLElement[]; } /** `ui-table-filtered` detail: the rows the search left in. */ export interface TableFilteredDetail { unfilteredRows: HTMLElement[]; } /** `ui-table-column-resize` detail: the column (its `column`, else its place) and its new width in px. */ export interface TableColumnResizeDetail { column: string; width: number; } /** `ui-table-columns-change` detail: every hidden column, and the one the user just showed or hid ('' after Reset). */ export interface TableColumnsChangeDetail { hiddenColumns: string[]; column: string; hidden: boolean; } /** `ui-table-page-change` detail. */ export interface TablePageChangeDetail { page: number; pageSize: number; } /** The editor of a column whose cells can be edited in place (a header's `editable`). */ export type TableCellEditor = 'text' | 'number' | 'select'; /** A choice of a `select` column (a header's `options`): the value saved and the label shown. */ export interface TableEditOption { value: string; label: string; } /** * `ui-table-cell-edit` detail (cancelable, before the cell changes): the row, the cell, its column, the new value * (a number in a `number` column, unless left empty) and the one it had (its `sort-value`, else its text). */ export interface TableCellEditDetail { row: HTMLElement; cell: HTMLElement; column: string; value: string | number; previous: string; } /** Which rows CSV takes: those the search shows (every page, in their order), the chosen ones, or all. */ export type TableCsvScope = 'shown' | 'selected' | 'all'; /** `ui-table-csv-export` detail (cancelable): what the toolbar's Export CSV button is about to download. */ export interface TableCsvExportDetail { csv: string; rows: HTMLElement[]; fileName: string; }