import { RowModel } from '..'; import { RowData, Table, TableFeature } from '../types'; export interface FacetedColumn { _getFacetedMinMaxValues?: () => undefined | [number, number]; _getFacetedRowModel?: () => RowModel; _getFacetedUniqueValues?: () => Map; /** * A function that **computes and returns** a min/max tuple derived from `column.getFacetedRowModel`. Useful for displaying faceted result values. * > ⚠️ Requires that you pass a valid `getFacetedMinMaxValues` function to `options.getFacetedMinMaxValues`. A default implementation is provided via the exported `getFacetedMinMaxValues` function. * @link [API Docs](https://tanstack.com/table/v8/docs/api/features/column-faceting#getfacetedminmaxvalues) * @link [Guide](https://tanstack.com/table/v8/docs/guide/column-faceting) */ getFacetedMinMaxValues: () => undefined | [number, number]; /** * Returns the row model with all other column filters applied, excluding its own filter. Useful for displaying faceted result counts. * > ⚠️ Requires that you pass a valid `getFacetedRowModel` function to `options.facetedRowModel`. A default implementation is provided via the exported `getFacetedRowModel` function. * @link [API Docs](https://tanstack.com/table/v8/docs/api/features/column-faceting#getfacetedrowmodel) * @link [Guide](https://tanstack.com/table/v8/docs/guide/column-faceting) */ getFacetedRowModel: () => RowModel; /** * A function that **computes and returns** a `Map` of unique values and their occurrences derived from `column.getFacetedRowModel`. Useful for displaying faceted result values. * > ⚠️ Requires that you pass a valid `getFacetedUniqueValues` function to `options.getFacetedUniqueValues`. A default implementation is provided via the exported `getFacetedUniqueValues` function. * @link [API Docs](https://tanstack.com/table/v8/docs/api/features/column-faceting#getfaceteduniquevalues) * @link [Guide](https://tanstack.com/table/v8/docs/guide/column-faceting) */ getFacetedUniqueValues: () => Map; } export interface FacetedOptions { getFacetedMinMaxValues?: (table: Table, columnId: string) => () => undefined | [number, number]; getFacetedRowModel?: (table: Table, columnId: string) => () => RowModel; getFacetedUniqueValues?: (table: Table, columnId: string) => () => Map; } export declare const ColumnFaceting: TableFeature;