import { BarData } from '.'; import { DisplayStateConfigInterface } from '../_abstract/display-state-manager'; export declare const defaultMaxDisplayedItems = 10; export type BarsConfigInterface = DisplayStateConfigInterface & { /** * The maximum number of bars to display in the bars visualization. * When exceeded, a "show more" button will appear to display additional items. * @default 10 */ maxDisplayedItems?: number; /** * Specifies whether the sorting block should be visible. * The sorting block allows users to sort bars by count or alphabetically. * @default true */ showSortingBlock?: boolean; /** * Specifies whether the search container should be visible. * @default true */ showSearch?: boolean; /** * Specifies the sort order for the bars visualization. Can be either 'alphabetical' to sort the bars alphabetically, or 'count' to sort the bars by their associated count values. * @default 'count' */ sort?: 'alphabetical' | 'count'; /** * Moves filtered bars to the top while filtering is active. * If `false`, filtering does not reorder bars. * @default false */ moveFilteredToTop?: boolean; /** * Enables smooth transition when bars re-order (sort/search/filter updates). * Automatically disabled when the user has `prefers-reduced-motion: reduce`. * @default true */ animateSort?: boolean; /** * Sort animation duration in milliseconds. * @default 250 */ sortAnimationDurationMs?: number; /** * Specifies whether the total count should be displayed alongside the filtered count when filtering is active. * If set to `true`, the count will be displayed as "filtered / total" (e.g., "5 / 10"). * If set to `false`, only the filtered count will be displayed. * @default false */ showTotalWhenFiltered?: boolean; /** * Specifies whether the bars should be sorted in ascending or descending order. * If `sort` is set to `'count'`, this determines whether the bars are sorted by their associated count values in ascending or descending order. * If `sort` is set to `'alphabetical'`, this determines whether the bars are sorted alphabetically in ascending or descending order. * @default false */ sortAscending?: boolean; /** * A formatter function that is used to format the count values displayed on the bars. * This allows for custom formatting of numbers (e.g., adding thousand separators, currency symbols, etc.). * @param count - The numeric value to format * @returns The formatted string representation of the count */ countFormatter?: (count: number) => string; /** * Determines whether the bars visualization is initially expanded or collapsed. * When `expanded` is `true`, the bars visualization is initially displayed in an expanded state. * When `false`, the bars visualization is initially displayed in a collapsed state. * @default false */ expanded?: boolean; /** * Callback function that is called when a bar in the bars visualization is clicked. * The handler is passed the `BarData` object for the clicked bar. * @param data - The data for the clicked bar, or undefined if no bar is selected * @param event - Native mouse event for click metadata (e.g. `shiftKey`) */ onClick?: (data?: BarData, event?: MouseEvent) => void; /** * Callback function that is called when the mouse hovers over a bar in the bars visualization. * The handler is passed the `BarData` object for the hovered bar. * @param data - The data for the hovered bar */ onBarHover?: (data: BarData) => void; }; export declare const defaultBarsConfig: BarsConfigInterface;