import type { ColumnPinningState, RowData, TableFeatures, Column_Internal } from '@tanstack/react-table'; import { type JSX } from 'react'; import { type IntlShape } from 'react-intl'; import type { DataTableColumnVisibilityState, DataTableVisibleColumnLimits } from '../../../features/ColumnVisibility/column-visibility-types.js'; /** * Generates a map of column IDs to their lowercase labels for efficient filtering. * * @param columns - The columns to generate labels for. * @returns A map of column IDs to lowercase labels. * @internal */ export declare function generateColumnLabelsMap(columns: Column_Internal[]): Map; /** * Processes a filter string into an array of lowercase words. * @param filterValue - The filter string to process. * @returns An array of lowercase words. * @internal */ export declare function processFilterValue(filterValue: string): string[]; /** * Returns the configuration object form of a programmatic column settings override, * or `undefined` when the override is a boolean toggle or not provided. * @param override - The override value for a column setting (`columnOrder`, `columnVisibility`, * or `columnPinning`), as passed to the programmatic `openColumnSettings` call. * @param key - The key of the configuration object to return when `override` is an object. * @returns the configuration object or undefined. * * @internal */ export declare function getOverrideValue(override: boolean | T | undefined, key: K): T[K] | undefined; /** * Resolves whether a column settings feature is enabled. An override of `false` disables it. * Falls back to the toolbar slot value when no override is provided. * @param override - The override value for the feature. * @param fallback - The fallback value from the toolbar slot. * @returns `true` if the feature is enabled, `false` otherwise. * * @internal */ export declare function getIsSettingEnabled(override: boolean | T | undefined, fallback: boolean): boolean; /** * Resolves effective warning and error thresholds for `visibleColumnLimits`. * Values less than 1 are invalid and treated as unset. * * @param rawLimit - raw `visibleColumnLimits` value from the consumer; `undefined` when no limits are configured * @param mandatoryVisibleCount - number of non-built-in leaf columns with `disableColumnHiding: true` * @internal */ export declare function resolveEffectiveLimit(rawLimit: DataTableVisibleColumnLimits | undefined, mandatoryVisibleCount: number): { warningLimit: number | undefined; errorLimit: number | undefined; }; /** * Builds the footer feedback message for the column visibility limit feature. * * Priority: min-error (< 1 visible) → max-error (exceeds hard limit) → max-warning (exceeds soft limit). * Returns `undefined` when no condition is active so callers can gate layout on its presence. * * @param showMinError - Whether the minimum-column error (< 1 visible) is active. * @param errorLimit - Resolved hard upper limit; `undefined` when not configured. * @param warningLimit - Resolved soft upper limit; `undefined` when not configured. * @param visibleColumnCount - Number of currently visible columns in the local (unsaved) state. * @param intl - IntlShape instance from the calling component. * @internal */ export declare function getVisibilityLimitMessage(showMinError: boolean, errorLimit: number | undefined, warningLimit: number | undefined, visibleColumnCount: number, intl: IntlShape): JSX.Element | undefined; /** * Adds the parent column before adjacent leaf columns. * @param columns - the leaf column ids. * @remarks The same parent column may appear multiple times in the pinned areas. */ export declare function groupColumns(columns: Column_Internal[]): Column_Internal[]; /** * @returns true if *at least one* of the child columns can be hidden, false otherwise. */ export declare function isParentColumnHideable(childColumns: Column_Internal[]): boolean; /** * Generates an object with the visibility of each column. * @param columns - The columns in the table. * @param columnVisibility - The visibility of the table columns. * @returns an object that contains the column ids as keys with their visibility as values. * @internal */ export declare function generateColumnVisibilityObject(columns: Column_Internal[], columnVisibility?: Record): Record; /** * Returns the local column visibility of multiple columns used when clicking show/hide all or parent column checkboxes. * @param columns - The columns in the table. * @param currentVisibility - The current column visibility state in the table. * @param localColumnsVisibilityState - The current column visibility state in the settings. * @internal */ export declare function getMultipleLocalColumnVisibility(columns: Column_Internal[], currentVisibility: boolean | 'indeterminate', localColumnsVisibilityState?: Record): Record; /** * Returns the current checkbox state based on the column visibility state. * @param columnVisibilityState - the current column visibility state. * @param column - the column to get the visibility state for. */ export declare function getVisibilityCheckboxState(columnVisibilityState: Record, column: Column_Internal): boolean | 'indeterminate'; /** * Gets the combined checked value for a parent visibility checkbox * @param columnVisibilityState - The visibility of the table columns. * @param columns - The columns to check whether visibility can be toggled. * @returns * - `true` if all columns are visible or disabled, * - `false` if all columns are hidden, * - `indeterminate` otherwise. * @internal */ export declare function getCombinedVisibilityCheckboxState(columnVisibilityState: Record, columns: Column_Internal[]): boolean | 'indeterminate'; /** * Determines whether the visibility of one or multiple columns has changed. * @param columnVisibilityToReset - The column visibility state that is used to reset. * @param localColumnVisibility - The current column visibility state in the settings. * @returns `true` if the visibility has changed for at least one column, `false` otherwise. * @internal */ export declare function getHasVisibilityChanged(columnVisibilityToReset: DataTableColumnVisibilityState | undefined, localColumnVisibility: Record): boolean; /** * Generates a column order that includes parent ids. * @param getColumn - the function to get a column by its id. * @param columnOrder - the column order with leaf columns only. * @returns the column order including parent ids and a list of unique parent ids. */ export declare function generateColumnOrderWithParentIds(getColumn: (columnId: string) => Column_Internal | undefined, columnOrder?: string[]): { columnOrderWithParents: string[]; uniqueParentIds: string[]; }; /** * Determines whether the order of one or multiple columns has changed. * @param columnOrderToReset - The column order state that is used to reset. * @param localColumnOrder - The current column order state in the settings. * @returns `true` if the order has changed for at least one column, `false` otherwise. * @internal */ export declare function getHasColumnOrderChanged(columnOrderToReset: string[] | undefined, localColumnOrder: string[]): boolean; /** * Determines whether the pinned state of one or multiple columns has changed. * @param columnPinnedToReset - The column pinning state that is used to reset. * @param localColumnsPinned - The current column pinning state in the settings. * @returns `true` if the pinned state has changed for at least one column, `false` otherwise. * @internal */ export declare function getHasColumnPinningChanged(columnPinnedToReset: ColumnPinningState | undefined, localColumnsPinned: ColumnPinningState): boolean;