UNPKG

@empathyco/x-components

Version:
30 lines 1.14 kB
import type { Facet, Filter, HierarchicalFilter } from '@empathyco/x-types'; /** * This function flattens the Hierarchical Filters, returning an array with all filters including * the children. * * @param hierarchicalFilters - The list of Hierarchical Filters to flatten. * @returns An array with all the Hierarchical filters. * * @public */ export declare function flatHierarchicalFilters(hierarchicalFilters: HierarchicalFilter[]): HierarchicalFilter[]; /** * Flattens all filters from an array of facets, including hierarchical filters. * * @param facets - The list of facets to extract filters from. * @returns A flat array of all filters from all facets. * * @public */ export declare function flattenAllFilters(facets: Facet[]): Filter[]; /** * Recursively applies the selected state to hierarchical filters and their children. * * @param filters - The hierarchical filters to update. * @param selectedIds - The set of selected filter ids. * * @public */ export declare function applyHierarchicalSelection(filters: HierarchicalFilter[], selectedIds: Set<string | number>): void; //# sourceMappingURL=utils.d.ts.map