import type { ColumnOrderState, ColumnPinningState } from '@tanstack/react-table'; import type { Column, Table } from '../../hooks/useTable/types.js'; import type { DataTableRowData } from '../../public.api.js'; /** * Utility function to check if a column can be moved to the left. * * @param column - the column to be re-ordered * @param columnsToCompare - columns to compare against when re-ordering * @returns true if the column can be moved left, false if it's already at the leftmost position */ export declare function canMoveColumnLeft(column: Column, columnsToCompare: Column[]): boolean; /** * Utility function to check if a column can be moved to the right. * * @param column - the column to be re-ordered * @param columnsToCompare - columns to compare against when re-ordering * @returns true if the column can be moved right, false if it's already at the rightmost position */ export declare function canMoveColumnRight(column: Column, columnsToCompare: Column[]): boolean; /** * Gets the relevant columns to compare against when moving a column. */ export declare function getColumnsToCompareForMove(table: Table, column: Column): Column[]; /** * Moves the current column one position to the left and updates the table state. * * Depending on whether the column is a nested column or a standalone column, * whether its neighboring columns are pinned, hidden, or nested, * we need to consider different scenarios to calculate the new column order correctly. * * CASE1: Column itself is a nested child column. * - Constraint1: Can only move within the parent group. * - Constraint2: Skip pinned siblings. * - Constraint3: Skip hidden siblings. * * CASE2: Column is a standalone column or a parent column. * - Constraint1: Skip entire nested columns as a whole. * - Constraint2: Skip pinned columns. * - Constraint3: Skip hidden columns. */ export declare function moveColumnLeft(column: Column, currentColumnOrder: ColumnOrderState, columnsPinned: ColumnPinningState, leafColumns: Column[]): string[]; /** * Moves the current column one position to the right and returns the new column order. * * Depending on whether the column is a nested column or a standalone column, * whether its neighboring columns are pinned, hidden, or nested, * we need to consider different scenarios to calculate the new column order correctly. *a * CASE1: Column itself is a nested child column. * - Constraint1: Can only move within the parent group. * - Constraint2: Skip pinned siblings. * - Constraint3: Skip hidden siblings. * * CASE2: Column is a standalone column or a parent column. * - Constraint1: Skip entire nested columns as a whole. * - Constraint2: Skip pinned columns. * - Constraint3: Skip hidden columns. */ export declare function moveColumnRight(column: Column, currentColumnOrder: ColumnOrderState, columnsPinned: ColumnPinningState, leafColumns: Column[]): string[];