import { type PropsWithChildren } from 'react'; import { type DataTestId, type MaskingProps, type StylingProps } from '@dynatrace/strato-components/core'; import type { FilterFieldSuggestionProps } from './suggestions/Suggestion.js'; import type { FilterFieldSuggestionsCallback } from './types/suggestions.js'; import type { FilterFieldTree } from './types/tree-nodes.js'; import type { FilterFieldValidatorMap } from './types/validation.js'; import type { FormControlProps } from '../../core/types/form-control-props.js'; import type { FormControlWithOverlayRef } from '../../forms/shared-types.js'; /** * Accepted properties for FilterField. * @public */ export type FilterFieldProps = PropsWithChildren void> & { /** * Placeholder text displayed when the filter field is empty. * @defaultValue 'Type to filter' */ placeholder?: string; /** * The syntax used for parsing the input. * The basic syntax uses a narrowed down set of rules, not supporting grouping * and logical 'or'. The complex syntax provides the full set of rules. * @defaultValue 'complex' * @deprecated The basic syntax will no longer be supported after the next breaking change. The syntax will default to `complex` and the `syntax` prop will be removed. */ syntax?: 'basic' | 'complex'; /** * Whether the automatically determined suggestions (logical / comparison operators) should be shown. * If set to true, the suggestions will automatically be added to the suggestions overlay. * @defaultValue false */ autoSuggestions?: boolean; /** * Callback triggered when the suggestions may need to be updated. * @defaultValue undefined */ onSuggest?: FilterFieldSuggestionsCallback; /** * Callback triggered when the user submits the currently entered filter for filtering. * @defaultValue undefined */ onFilter?: (filterState: { /** The current value of the filter field. */ value: string; /** Syntax tree of the current value. */ syntaxTree: FilterFieldTree; /** Whether the current value is valid. */ isValid: boolean; }) => void; /** Validators to restrict allowed keys and their operators. */ validatorMap?: FilterFieldValidatorMap; }>; /** * FilterField component that uses a fallback formFieldMessages-context if it wasn't wrapped in a FormField. * @internal */ export declare const InternalFilterField: (props: FilterFieldProps & import("react").RefAttributes>) => React.ReactElement | null; /** * The `FilterField` component is a text-based input component that allows users * to enter filters using an intuitive and easily understandable syntax. * Since the input is text-based, users can always enter anything they want. * To provide guidance to the user, we recommend always using the `FilterField` * in combination with suggestions. * @public */ export declare const FilterField: ((props: FilterFieldProps & import("react").RefAttributes>) => React.ReactElement | null) & { Suggestions: { (props: import("./suggestions/Suggestions.js").FilterFieldSuggestionsProps): import("react/jsx-runtime.js").JSX.Element; displayValue: string; }; Suggestion: { (props: FilterFieldSuggestionProps): import("react/jsx-runtime.js").JSX.Element | null; displayValue: string; }; SuggestionGroup: { (props: import("./suggestions/SuggestionGroup.js").FilterFieldSuggestionGroupProps): import("react/jsx-runtime.js").JSX.Element; displayValue: string; }; SuggestionGroupLabel: { (props: import("./suggestions/SuggestionGroupLabel.js").FilterFieldSuggestionGroupLabelProps): import("react/jsx-runtime.js").JSX.Element; displayValue: string; }; SuggestionDetails: { (props: import("./suggestions/SuggestionDetails.js").FilterFieldSuggestionDetailsProps): import("react/jsx-runtime.js").JSX.Element; displayValue: string; }; };