import type { dh } from '@deephaven/jsapi-types'; import type { SelectionT } from '@deephaven/utils'; import type TableUtils from './TableUtils'; export interface FilterConditionFactory { (table: dh.Table | dh.TreeTable | null | undefined): dh.FilterCondition | null; } /** * Create args for a filter derived from a combobox selection. * @param value */ export declare function createComboboxFilterArgs(value: string, allValue: string): { operator: 'eq' | 'notEq'; value: string; }; /** * Create a filter condition factory for a `contains` filter that matches the * given search text. * @param tableUtils TableUtils instance to create filter from * @param columnNames Names of the columns to filter * @param searchText Text to search (will be trimmed of leading / trailing whitespace) * @param timeZone Timezone to use for date parsing */ export declare function createSearchTextFilter(tableUtils: TableUtils, columnNames: string | string[], searchText: string, timeZone: string): FilterConditionFactory; /** * Create a filter condition factory function. * @param columnNames Column names that filter conditions will target * @param createColumnCondition Function that can create a `FilterCondition` from * a given column. This will be run across all columns corresponding to the given * list of column names. * @param conditionOperator Operator that will be used to combine multiple * `FilterConditions` if multiple column names are given. */ export declare function createFilterConditionFactory(columnNames: string | string[], createColumnCondition: (column: dh.Column) => dh.FilterCondition, conditionOperator?: 'and' | 'or'): FilterConditionFactory; /** * Create a filter condition factory for a filter operator that matches the * given value. * @param tableUtils TableUtils instance to create filter from * @param columnNames Column names to compare value to * @param value Value to match * @param operator Operator to use for matching */ export declare function createValueFilter(tableUtils: TableUtils, columnNames: string | string[], value: string, operator: 'contains' | 'containsIgnoreCase' | 'eq' | 'eqIgnoreCase' | 'notEq' | 'notEqIgnoreCase'): FilterConditionFactory; /** * Create a filter condition factory for a filter that matches a given Selection. * If column is not found or selection parameter is 'all', the factory will return * null to indicate the results will be unfiltered. * @param tableUtils TableUtils instance to create filter from * @param columnName The column name to filter * @param selection 'all' or an array of values to filter by * @param emptySelectionEqAll If true, empty selection means select * all. If false, it means select none. * @param invertSelection Invert the selection (eg. All items are selected, * then you deselect items) */ export declare function createSelectedValuesFilter(tableUtils: TableUtils, columnName: string, selection: SelectionT, emptySelectionEqAll: boolean, invertSelection: boolean): FilterConditionFactory; /** * Creates a `notNullOrEmptyFilterCondition` function. * @param tableUtils TableUtils instance to use for making filters. */ export declare function createNotNullOrEmptyFilterCondition(tableUtils: TableUtils): (column: dh.Column) => dh.FilterCondition; /** * Creates a `showOnlyEmptyFilterCondition` function that can be toggled on or * off. * @param tableUtils TableUtils instance to use for making filters. * @param isOn Flag to indicate if the filter should be on or off. */ export declare function createShowOnlyEmptyFilterCondition(tableUtils: TableUtils, isOn: boolean): (column: dh.Column) => dh.FilterCondition; //# sourceMappingURL=FilterUtils.d.ts.map