import { SortableTableOptions } from './sortable-table.types'; /** * Headless sortable-table controller. Adds drag- and keyboard-driven row and * column reordering (pointer drag powered by `@atlaskit/pragmatic-drag-and-drop`) * plus pointer/keyboard column resizing to an existing ``. It manipulates * DOM order and column widths, reflects `data-dragging`, and emits typed * events — it applies no visual styles. * * Assumes the Nth `[data-c42-sortable-col]` header maps to the Nth cell in * each row. * * Markup: * ```html *
* * * * * * * * * * *
* Name * * *
Ada
* ``` */ export declare class SortableTable { private readonly root; private readonly reorderRows; private readonly reorderColumns; private readonly resizeColumns; private readonly resizeStep; private readonly minColumnWidth; private readonly colWidths; /** Scopes pragmatic-dnd interactions to this table instance. */ private readonly dndKey; private resize; private cleanups; constructor(root: HTMLElement, options?: SortableTableOptions); private columns; private rowEls; private rowContainer; private init; private prepareHandle; private emitReorder; /** Current row order as an array of `data-value`s. */ getRowOrder(): string[]; /** Move a row (by `data-value`) to the position of another row. */ moveRow(fromValue: string, toValue: string): void; /** Move the row at `from` to land at final index `to`. Emits when it changes. */ private moveRowToIndex; private moveRowByOffset; private onRowKeydown; private registerRowDnd; /** Current column order as an array of `data-value`s. */ getColumnOrder(): string[]; /** Move a column (by `data-value`) to the position of another column. */ moveColumn(fromValue: string, toValue: string): void; private moveColumnByIndex; private onColumnKeydown; private registerColumnDnd; private applyDrop; private getColWidth; /** Set a column's width (px) by its `data-value`. */ setColumnWidth(value: string, width: number): void; private onResizeKeydown; private onResizePointerDown; private readonly onResizeMove; private readonly onResizeUp; /** Subscribe to a DOM event on the root element. Returns an unsubscribe fn. */ on(event: string, handler: (event: E) => void): () => void; destroy(): void; }