import { Field } from '../types'; import { ValueMatcher } from './types'; /** * Create matcher for one filter type. * Features: * 1) fields that use different filter type are skipped * 2) positive match if there are no selected filter values or no fields support the chosen filter type (vacuous truth) * 3) all fields need to pass the test (AND condition) * 4) a field is accepted if at least one filter value returns positive match (OR condtion) */ export declare const createMatcher: ({ selectedFilters, filterType, matchValue, fields, }: { selectedFilters: { [id: string]: string[]; }; filterType: string; matchValue: (value: unknown) => (filterValue: string) => boolean; fields: Field[]; }) => (entity: any) => boolean; /** * The value is accepted if it contains the filter as substring. */ export declare const freetextMatcher: { filterType: string; matchValue: (value: string) => (filter: string) => boolean; }; export declare const defaultValueMatchers: ValueMatcher[]; /** * Create matcher for multiple filter types. * Positive match requires that all sub-matchers (per filter type) return positve result (AND condtion). * No filter values or no filter types also yields a positve result(vacuous truth). * * @see createMatcher */ export declare const createMetaMatcher: (selectedFilters: { [id: string]: string[]; }, fields: Field[], valueMatchers?: ValueMatcher[]) => (entity: any) => boolean;