import type { ColumnConfig, FilterValue } from '../types.js'; /** Operators whose value is a list of choices. */ export declare const MANY_OPERATORS: string[]; /** * A filter value that asks for nothing: no value, an empty string, or a list whose every entry is one of those. Such a * value is no condition at all, wherever it comes from (a column's default, the filters form), so it never becomes a * filter. `false` and `0` are values. */ export declare function isEmptyFilterValue(value: unknown): boolean; /** Operators that take no value: `is_true`, `is_empty` and the like are a whole condition with `value: null`. */ export declare const VALUELESS_OPERATORS: string[]; /** * Whether a filter is a condition to send: an operator that takes no value always is; any other is when its value says * something (`isEmptyFilterValue`). A screen that turns its grid's filters into a query keeps every filter this says is * a condition, and changes only the ones it is for - by name, operator and value form together. */ export declare function isFilterCondition(filter: { operator: string; value?: unknown; }): boolean; /** * One shape per operator: a list operator's value is an array. A single choice written as a scalar (a column's * default, a hand-written link, a form) is taken as a one-element array where it enters the grid. A list operator * with no choice is no condition and does not enter at all, as the filters form never reads one: an address written * with `in []` would otherwise reach the server, which reads it as matching nothing. */ export declare function normalizeFilters(filters: FilterValue[]): FilterValue[]; /** A field owns one unambiguous predicate with exactly the shape it can edit. */ export declare function ownedFilterIndex(filters: FilterValue[], column: ColumnConfig): number; export declare function externalFilters(filters: FilterValue[], columns: ColumnConfig[]): { filter: FilterValue; index: number; }[]; /** * Replace only fields the user changed, keeping every external predicate and every other field intact. * * A changed field's predicate is replaced where it stands. A select reports a change each time it closes; moving the * predicate to the end made the same conditions a different address, so closing a field without choosing wrote a new * history entry. */ export declare function patchFilterFields(base: FilterValue[], fields: FilterValue[], columns: ColumnConfig[], changed: string[]): FilterValue[];