import { default as default_2 } from 'react'; export declare const Filter: default_2.ForwardRefExoticComponent void; }>>; export declare interface FilterOption { id: string; label: string; } export declare interface FilterProps { filter: FilterValue; sourceOptions: FilterOption[]; rules: FilterRules; onSourceChange?: (sourceId: string) => void; onRemoveFilter: (id: string | number) => void; onFilterChange: (filter: FilterValue) => void; selectPlaceholder?: string; customValuePlaceholder?: string; customValueButtonLabel?: string; sourceFirstMessage?: string; } /** * Filter rules for each source * How this works: * - You can define the rules for each source * - The rules are used to determine the available operators and value type * - The input type is used to determine the type of input displayed in when the dropdown is opened * - The getValueOptions function is used to determine the available options for the value * - multiSelect determines if multiple values can be selected for dropdown type * * @example * { * 'sourceId': { * operators: [ * { id: 'is', label: 'is' }, * { id: 'is not', label: 'is not' }, * ], * inputType: 'dropdown' | 'custom', * multiSelect?: boolean, * getValueOptions?: () => FilterOption[], * }, * } */ export declare interface FilterRules { [sourceId: string]: { operators: FilterOption[]; inputType: 'dropdown' | 'custom'; multiSelect?: boolean; getValueOptions?: () => FilterOption[]; }; } export declare const Filters: ({ filters, onFilterChange, onFilterRemove, onFilterAdd, sourceOptions, rules, className, }: FiltersProps) => default_2.JSX.Element; declare interface FiltersProps extends default_2.HTMLAttributes { filters: FilterValue[]; onFilterChange: (filter: FilterValue) => void; onFilterRemove: (filterId: string | number) => void; onFilterAdd?: (filter: FilterValue) => void; sourceOptions: FilterOption[]; rules: FilterRules; } export declare interface FilterValue { id: string | number; source?: string; operator?: Operator; value?: string | string[]; } export declare enum Operator { IS = "is", IS_NOT = "is not", CONTAINS = "contains", DOES_NOT_CONTAIN = "does not contain", STARTS_WITH = "starts with" } export { }