import { AccessibleDescriptionGenerator, ActionElementEventHandler, BaseOption, BaseOptionMap, BaseTranslation, BaseTranslationWithLabel, BaseTranslationWithPlaceholders, BaseTranslations, Classname, Classnames, CommonRuleSubComponentProps, DropEffect, FlexibleOption, FlexibleOptionList, FlexibleOptionListProp, FullCombinator, FullField, FullOperator, FullOption, FullOptionList, FullOptionMap, FullOptionRecord, GenericizeRuleGroupType, GetOptionIdentifierType, GetRuleTypeFromGroupWithFieldAndOperator, GroupOptions, InputType, MatchConfig, MatchMode, MatchModeOptions, MoveOptions, Option, OptionGroup, OptionList, ParseNumberMethod, ParseNumbersPropConfig, Path, PrepareOptionListParams, PreparedOptionList, QueryActions, QueryBuilderFlags, QueryValidator, RemoveNullability, RuleGroupType, RuleGroupTypeAny, RuleGroupTypeIC, RuleOrGroupArray, RuleType, ToFullOption, ValidationMap, ValidationResult, ValueChangeEventHandler, ValueEditorType, ValueSource, ValueSourceFlexibleOptions, ValueSourceFullOptions, ValueSources, WithUnknownIndex } from "@react-querybuilder/core"; import * as React from "react"; import { ChangeEvent, ComponentType, Context, ForwardRefExoticComponent, MouseEvent, ReactNode, Ref, RefAttributes } from "react"; import { EnhancedStore, Slice, StoreEnhancer, ThunkDispatch, Tuple, UnknownAction } from "@reduxjs/toolkit"; import { ReactReduxContextValue, TypedUseSelectorHook } from "react-redux"; //#region ../../node_modules/type-fest/source/set-non-nullable.d.ts /** Create a type that makes the given keys non-nullable, while keeping the remaining keys as is. If no keys are given, all keys will be made non-nullable. Use-case: You want to define a single model where the only thing that changes is whether or not some or all of the keys are non-nullable. @example ``` import type {SetNonNullable} from 'type-fest'; type Foo = { a: number | null; b: string | undefined; c?: boolean | null; }; // Note: In the following example, `c` can no longer be `null`, but it's still optional. type SomeNonNullable = SetNonNullable; //=> {a: null | number; b: string; c?: boolean} type AllNonNullable = SetNonNullable; //=> {a: number; b: string; c?: boolean} ``` @category Object */ type SetNonNullable = { [Key in keyof BaseType]: Key extends Keys ? NonNullable : BaseType[Key] }; //#endregion //#region src/components/RuleGroup.d.ts /** * Default component to display {@link RuleGroupType} and {@link RuleGroupTypeIC} * objects. This is actually a small wrapper around {@link RuleGroupHeaderComponents} * and {@link RuleGroupBodyComponents}. * * @group Components */ declare const RuleGroup: React.MemoExoticComponent<(props: RuleGroupProps) => React.JSX.Element>; /** * Renders a `React.Fragment` containing an array of form controls for managing * a {@link RuleGroupType} or {@link RuleGroupTypeIC}. * * @group Components */ declare const RuleGroupHeaderComponents: React.MemoExoticComponent<(rg: UseRuleGroup) => React.JSX.Element>; /** * Renders a `React.Fragment` containing an array of either (1) {@link Rule} and * {@link RuleGroup}, or (2) {@link Rule}, {@link RuleGroup}, and {@link InlineCombinator}. * * @group Components */ declare const RuleGroupBodyComponents: React.MemoExoticComponent<(rg: UseRuleGroup) => React.JSX.Element>; interface UseRuleGroup extends RuleGroupProps { addGroup: ActionElementEventHandler; addRule: ActionElementEventHandler; accessibleDescription: string; muted?: boolean; classNames: Pick<{ [k in keyof Classnames]: string }, "header" | "shiftActions" | "dragHandle" | "combinators" | "notToggle" | "addRule" | "addGroup" | "cloneGroup" | "lockGroup" | "muteGroup" | "removeGroup" | "body">; cloneGroup: ActionElementEventHandler; onCombinatorChange: ValueChangeEventHandler; onGroupAdd: (group: RuleGroupTypeAny, parentPath: Path, context?: any) => void; onIndependentCombinatorChange: (value: any, index: number, context?: any) => void; onNotToggleChange: (checked: boolean, context?: any) => void; outerClassName: string; pathsMemo: { path: Path; disabled: boolean; }[]; removeGroup: ActionElementEventHandler; ruleGroup: RuleGroupType | RuleGroupTypeIC; shiftGroupDown: (event?: MouseEvent, context?: any) => void; shiftGroupUp: (event?: MouseEvent, context?: any) => void; toggleLockGroup: ActionElementEventHandler; toggleMuteGroup: ActionElementEventHandler; validationClassName: string; validationResult: boolean | ValidationResult; } /** * Prepares all values and methods used by the {@link RuleGroup} component. * * @group Hooks */ declare const useRuleGroup: (props: RuleGroupProps) => UseRuleGroup; //#endregion //#region src/types/props.d.ts /** * Base interface for all subcomponents. * * @group Props */ interface CommonSubComponentProps { /** * CSS classNames to be applied. * * This is `string` and not {@link Classname} because the {@link Rule} * and {@link RuleGroup} components run `clsx()` to produce the `className` * that gets passed to each subcomponent. */ className?: string; /** * Path to this subcomponent's rule/group within the query. */ path: Path; /** * The level of the current group. Always equal to `path.length`. */ level: number; /** * The title/tooltip for this control. */ title?: string; /** * Disables the control. */ disabled?: boolean; /** * Container for custom props that are passed to all components. */ context?: any; /** * Validation result of the parent rule/group. */ validation?: boolean | ValidationResult; /** * Test ID for this component. */ testID?: string; /** * All subcomponents receive the configuration schema as a prop. */ schema: Schema; } /** * Base interface for selectors and editors. * * @group Props */ interface SelectorOrEditorProps extends CommonSubComponentProps { value?: string; handleOnChange(value: any): void; } /** * Base interface for selector components. */ interface BaseSelectorProps extends SelectorOrEditorProps> { options: FullOptionList; } /** * Props for all `value` selector components. * * @group Props */ interface ValueSelectorProps extends BaseSelectorProps { multiple?: boolean; listsAsArrays?: boolean; } /** * Props for `combinatorSelector` components. * * @group Props */ interface CombinatorSelectorProps extends BaseSelectorProps { options: FullOptionList; rules: RuleOrGroupArray; ruleGroup: RuleGroupTypeAny; } /** * Props for `fieldSelector` components. * * @group Props */ interface FieldSelectorProps extends BaseSelectorProps, CommonRuleSubComponentProps { operator?: F extends FullField ? OperatorName : string; } /** * Props for `matchModeEditor` components. * * @group Props */ interface MatchModeEditorProps extends BaseSelectorProps, CommonRuleSubComponentProps { match: MatchConfig; selectorComponent?: ComponentType; numericEditorComponent?: ComponentType; thresholdPlaceholder?: string; classNames: { matchMode: string; matchThreshold: string; }; options: FullOptionList>; field: string; fieldData: FullField; } /** * Props for `operatorSelector` components. * * @group Props */ interface OperatorSelectorProps extends BaseSelectorProps, CommonRuleSubComponentProps { options: FullOptionList; field: string; fieldData: FullField; } /** * Props for `valueSourceSelector` components. * * @group Props */ interface ValueSourceSelectorProps extends BaseSelectorProps, CommonRuleSubComponentProps { options: FullOptionList>; field: string; fieldData: FullField; } /** * Utility type representing props for selector components * that could potentially be any of the standard selector types. * * @group Props */ type VersatileSelectorProps = ValueSelectorProps & Partial & Partial & Partial; /** * A translation for a component with `title` and `label`. * * @group Props */ interface TranslationWithLabel extends BaseTranslationWithLabel {} /** * A translation for a component with `title` only. * * @group Props */ interface Translation extends BaseTranslation {} /** * A translation for a component with `title` and a placeholder. * * @group Props */ interface TranslationWithPlaceholders extends BaseTranslationWithPlaceholders {} /** * The shape of the `translations` prop. * * @group Props */ interface Translations extends BaseTranslations {} /** * The full `translations` interface with all properties required. * * @group Props */ type TranslationsFull = { [K in keyof Translations]: { [T in keyof Translations[K]]-?: Translations[K][T] } }; /** * Props passed to every action component (rendered as `