Skip to main content

index

Components

NameDescription
QueryBuilderContextProvider-
DragHandleDefault drag handle component used by QueryBuilder when enableDragAndDrop is true.
RuleDefault component to display RuleType objects. This is actually a small wrapper around RuleComponents.
RuleComponentsRenders a React.Fragment containing an array of form controls for managing a RuleType.
RuleGroupDefault component to display RuleGroupType and RuleGroupTypeIC objects. This is actually a small wrapper around RuleGroupHeaderComponents and RuleGroupBodyComponents.
RuleGroupBodyComponentsRenders a React.Fragment containing an array of either (1) Rule and RuleGroup, or (2) Rule, RuleGroup, and InlineCombinator.
RuleGroupHeaderComponentsRenders a React.Fragment containing an array of form controls for managing a RuleGroupType or RuleGroupTypeIC.
ActionElementDefault <button> component used by QueryBuilder.
InlineCombinatorDefault inlineCombinator component used by QueryBuilder. A small <div> wrapper around the combinatorSelector component, used when either showCombinatorsBetweenRules or independentCombinators are true.
NotToggleDefault notToggle (aka inversion) component used by QueryBuilder.
QueryBuilderThe query builder component for React.
QueryBuilderStateProviderContext provider for the {@link QueryBuilder} state store.
ShiftActionsDefault "shift up"/"shift down" buttons used by QueryBuilder.
ValueEditorDefault valueEditor component used by QueryBuilder.
ValueSelectorDefault <select> component used by QueryBuilder.

Props

NameDescription
ActionPropsProps passed to every action component (rendered as <button> by default).
ActionWithRulesAndAddersPropsProps passed to every action component that adds a rule or group.
ActionWithRulesPropsProps passed to every group action component.
ClassnamesClassnames applied to each component.
CombinatorSelectorPropsProps for combinatorSelector components.
CommonRuleSubComponentPropsBase interface for all rule subcomponents.
CommonSubComponentPropsBase interface for all subcomponents.
DragHandlePropsProps for dragHandle components.
FieldSelectorPropsProps for fieldSelector components.
InlineCombinatorPropsProps passed to inlineCombinator components.
NotTogglePropsProps for notToggle components.
OperatorSelectorPropsProps for operatorSelector components.
QueryActionsFunctions included in the actions prop passed to every subcomponent.
QueryBuilderContextPropsProps passed down through context from a QueryBuilderContextProvider.
RuleGroupPropsRuleGroup props.
RulePropsRule props.
SchemaConfiguration options passed in the schema prop from QueryBuilder to each subcomponent.
SelectorOrEditorPropsBase interface for selectors and editors.
ShiftActionsPropsProps passed to shiftActions components.
TranslationA translation for a component with title only.
TranslationsThe shape of the translations prop.
TranslationWithLabelA translation for a component with title and label.
TranslationWithPlaceholdersA translation for a component with title and a placeholder.
ValueEditorPropsProps passed to valueEditor components.
ValueSelectorPropsProps for all value selector components.
ValueSourceSelectorPropsProps for valueSourceSelector components.
ControlElementsPropSubcomponents.
ControlsAll subcomponents.
QueryBuilderContextProviderProps-
QueryBuilderPropsProps for QueryBuilder.
TranslationsFullThe full translations interface with all properties required.
VersatileSelectorPropsUtility type representing props for selector components that could potentially be any of the standard selector types.

Hooks

NameDescription
useQueryBuilderSelectorA Redux useSelector hook for RQB's internal store. See also getQuerySelectorById.
useControlledOrUncontrolledLogs a warning when the component changes from controlled to uncontrolled, vice versa, or both query and defaultQuery are provided.
useDeprecatedPropsLogs an error to the console if any of the following are true: - QueryBuilder is rendered with an independentCombinators prop - RuleGroup is rendered with combinator or rules props (deprecated in favor of ruleGroup) - Rule is rendered with field, operator, or value props (deprecated in favor of rule)
useMergedContextMerges inherited context values with props, giving precedence to props.
usePreferAnyPropFor given default, prop, and context values, return the first provided of prop, context, and default, in that order.
usePreferPropFor given default, prop, and context values, return the first provided of prop, context, and default, in that order.
usePreviousReturns the prop value from the last render.
useQueryBuilderCalls useQueryBuilderSetup to massage the props and prepare basic update/generate methods, then passes the result to useQueryBuilderSchema to prepare and return all values required to render QueryBuilder.
useQueryBuilderQueryRetrieves the full, latest query object for the nearest ancestor QueryBuilder component.
useQueryBuilderSchemaFor given QueryBuilderProps and setup values from useQueryBuilderSetup, prepares and returns all values required to render a query builder.
useQueryBuilderSetupMassages the props as necessary and prepares the basic update/generate methods for use by the QueryBuilder component.
useReactDndWarningLogs a warning if drag-and-drop is enabled but the required dependencies (react-dnd and either react-dnd-html5-backend or react-dnd-touch-backend) were not detected.
useRulePrepares all values and methods used by the Rule component.
useRuleGroupPrepares all values and methods used by the RuleGroup component.
useSelectElementChangeHandlerReturns a memoized change handler for HTML <select> elements.
useStopEventPropagationWraps an event handler function in another function that calls event.preventDefault() and event.stopPropagation() first. The returned function accepts and forwards a second context argument.
useValueEditorThis hook is primarily concerned with multi-value editors like date range pickers, editors for 'in' and 'between' operators, etc.
useValueSelectorTransforms a value into an array when appropriate and provides a memoized change handler.

Export

NameDescription
FormatQueryOptionsOptions object shape for formatQuery.
ParameterizedNamedSQLObject produced by formatQuery for the "parameterized_named" format.
ParameterizedSQLObject produced by formatQuery for the "parameterized" format.
RQBJsonLogicEndsWith-
RQBJsonLogicStartsWith-
RQBJsonLogicVar-
ValueProcessorOptionsOptions object for ValueProcessorByRule functions.
ExportFormatAvailable export formats for formatQuery.
ExportObjectFormatsExport formats for formatQuery that produce objects instead of strings.
RQBJsonLogicJsonLogic rule object with additional operators generated by formatQuery and accepted by parseJsonLogic!parseJsonLogic.
RuleProcessorFunction to produce a result that formatQuery uses when processing a RuleType object.
SQLPresetAvailable presets for the "sql" export format.
ValueProcessor-
ValueProcessorByRuleFunction that produces a processed value for a given RuleType.
ValueProcessorLegacyFunction that produces a processed value for a given field, operator, value, and valueSource.
celCombinatorMapMaps a DefaultCombinatorName to a CEL combinator.
defaultRuleProcessorCELDefault rule processor used by formatQuery for "cel" format.
defaultRuleProcessorElasticSearchDefault rule processor used by formatQuery for "elasticsearch" format.
defaultRuleProcessorJSONataDefault rule processor used by formatQuery for "jsonata" format.
defaultRuleProcessorJsonLogicDefault rule processor used by formatQuery for "jsonlogic" format.
defaultRuleProcessorMongoDBDefault rule processor used by formatQuery for "mongodb" format.
defaultRuleProcessorMongoDBQueryDefault rule processor used by formatQuery for "mongodb_query" format.
defaultRuleProcessorParameterizedDefault rule processor used by formatQuery for "sql" format.
defaultRuleProcessorSpELDefault rule processor used by formatQuery for "spel" format.
defaultRuleProcessorSQLDefault rule processor used by formatQuery for "sql" format.
defaultValueProcessorByRuleDefault value processor used by formatQuery for "sql" format.
jsonLogicAdditionalOperatorsRegister these operators with jsonLogic before applying the result of formatQuery(query, 'jsonlogic').
mongoOperatorsMaps a DefaultOperatorName to a MongoDB operator.
sqlDialectPresets-
formatQueryGenerates a formatted (indented two spaces) JSON string from a query object.
getQuotedFieldNameGiven a field name and relevant ValueProcessorOptions, returns the field name wrapped in the configured quote character(s).
getQuoteFieldNamesWithArrayConverts the quoteFieldNamesWith option into an array of two strings. If the option is a string, the array elements are both that string.
isValidValueDetermines whether a value is anything except an empty string or NaN.
isValueProcessorLegacyUsed by formatQuery to determine whether the given value processor is a "legacy" value processor by counting the number of arguments. Legacy value processors take 3 arguments (not counting any arguments with default values), while rule-based value processors take no more than 2 arguments.
mapSQLOperatorMaps a DefaultOperatorName to a SQL operator.
numerifyValuesConverts all string-type value properties of a query object into number where appropriate.
shouldRenderAsNumberDetermines whether formatQuery should render the given value as a number. As long as parseNumbers is true, number and bigint values will return true and string values will return true if they test positive against numericRegex.

Defaults

VariableDescription
defaultCombinatorsDefault combinator list.
defaultCombinatorsExtendedDefault combinator list, with XOR added.
defaultControlClassnamesDefault classnames for each component.
defaultControlElementsDefault components used by QueryBuilder.
defaultJoinCharDefault character used to .join and .split arrays.
defaultOperatorNegationMapMap of default operators to their respective opposite/negating operators.
defaultOperatorsDefault operator list.
defaultPlaceholderFieldGroupLabelDefault label for placeholder option group in the fields array.
defaultPlaceholderFieldLabelDefault label for placeholder option in the fields array.
defaultPlaceholderFieldNameDefault name for placeholder option in the fields array.
defaultPlaceholderLabel-
defaultPlaceholderName-
defaultPlaceholderOperatorGroupLabelDefault label for placeholder option group in the operators array.
defaultPlaceholderOperatorLabelDefault label for placeholder option in the operators array.
defaultPlaceholderOperatorNameDefault name for placeholder option in the operators array.
defaultPlaceholderValueGroupLabelDefault label for placeholder option group in the values array.
defaultPlaceholderValueLabelDefault label for placeholder option in the values array.
defaultPlaceholderValueNameDefault name for placeholder option in the values array.
defaultTranslationsDefault configuration of translatable strings.
groupInvalidReasonsDefault reason codes for a group being invalid.
rootPathThe Path of the root group.
standardClassnamesStandard classnames applied to each component.
TestIDComponent identifiers for testing.

Option Lists

NameDescription
BaseOptionDo not use this type directly; use Option, ValueOption, or FullOption instead. For specific option types, you can use FullField, FullOperator, or FullCombinator, all of which extend FullOption.
FullOperatorFull operator definition used in the operators/getOperators props of QueryBuilder. This type requires both name and value, but the operators/getOperators props themselves can use a FlexibleOption where only one of name or value is required, or FullOperator where only name is required.
OptionGroupA group of Options, usually within an OptionList.
BaseFullOptionThis type is identical to FullOption but without the unknown index property. Extend from this type instead of FullOption directly.
BaseOptionMapMap of option identifiers to their respective Option.
CombinatorCombinator definition used in the combinators prop of QueryBuilder. This type is an extension of FullCombinator where only name and label are required.
CombinatorByValueCombinator definition used in the combinators prop of QueryBuilder. This type is an extension of FullCombinator where only value and label are required.
DefaultCombinatorA FullCombinator definition with a DefaultCombinatorName name property.
DefaultCombinatorExtendedA FullCombinator definition with a DefaultCombinatorNameExtended name property.
DefaultCombinatorNameDefault allowed values for the combinator property.
DefaultCombinatorNameExtendedDefault allowed values for the combinator property, plus "xor".
DefaultOperatorAn FullOperator definition with a DefaultOperatorName name property.
DefaultOperatorNameDefault values for the operator property.
FieldField definition used in the fields prop of QueryBuilder. This type is an extension of FullField where only name and label are required.
FieldByValueField definition used in the fields prop of QueryBuilder. This type is an extension of FullField where only value and label are required.
FlexibleOptionA generic Option with either a name or value as its primary identifier. OptionList-type props on the QueryBuilder component accept this type, but corresponding props passed down to subcomponents will always be translated to FullOption first.
FlexibleOptionGroupA group of BaseOptions, usually within a FlexibleOptionList.
FlexibleOptionListAn array of options or option groups, like OptionList, but the option type may use either name or value as the primary identifier.
FullCombinatorFull combinator definition used in the combinators prop of QueryBuilder. This type requires both name and value, but the combinators prop itself can use a FlexibleOption where only one of name or value is required, or Combinator where only name is required.
FullFieldFull field definition used in the fields prop of QueryBuilder. This type requires both name and value, but the fields prop itself can use a FlexibleOption where only one of name or value is required (along with label), or Field where only name and label are required.
FullOptionA generic Option requiring both name and value properties. Props that extend OptionList accept BaseOption, but corresponding props sent to subcomponents will always be translated to this type first to ensure both name and value are available.
FullOptionListAn array of options or option groups, like OptionList, but using FullOption instead of Option. This means that every member is guaranteed to have both name and value.
FullOptionMapMap of option identifiers to their respective FullOption.
FullOptionRecordMap of option identifiers to their respective FullOption. Must include all possible strings from the identifier type.
GetOptionIdentifierTypeExtracts the type of the identifying property from a Option, ValueOption, or FullOption.
GetOptionTypeExtracts the Option type from a FlexibleOptionList.
NameLabelPair-
OperatorOperator definition used in the operators/getOperators props of QueryBuilder. This type is an extension of FullOperator where only name and label are required.
OperatorByValueOperator definition used in the operators/getOperators props of QueryBuilder. This type is an extension of FullOperator where only value and label are required.
OptionA generic option. Used directly in OptionList or as the child element of an OptionGroup.
OptionListEither an array of Options or an array of OptionGroups.
ToFlexibleOptionUtility type to turn an Option, ValueOption, or BaseOption into a FlexibleOption.
ToFullOptionUtility type to turn an Option, ValueOption or BaseOption into a FullOption.
ValueOptionLike Option but requiring value instead of name.
filterFieldsByComparatorFor a given FullField, returns the fields list filtered for other fields that match by comparator. Only fields other than the one in question will ever be included, even if comparator is null or undefined. If comparator is a string, fields with the same value for that property will be included. If comparator is a function, each field will be passed to the function along with the operator and fields for which the function returns true will be included.
getFirstOptionGets the first option from an OptionList.
getOptionGets the option from an OptionList with the given name. Handles Option arrays as well as OptionGroup arrays.
isFlexibleOptionArrayDetermines if an array is a flat array of FlexibleOption.
isFlexibleOptionGroupArrayDetermines if a FlexibleOptionList is a FlexibleOptionGroup array.
isFullOptionArrayDetermines if an array is a flat array of FullOption.
isFullOptionGroupArrayDetermines if a FlexibleOptionList is a OptionGroup array of FullOption.
isOptionGroupArrayDetermines if an OptionList is an OptionGroup array.
toFlatOptionArrayFlattens FlexibleOptionGroup arrays into BaseOption arrays. If the array is already flat, it is returned as is.
toFullOptionConverts an Option or ValueOption (i.e., BaseOption) into a FullOption. Full options are left unchanged.
toFullOptionListConverts an OptionList or FlexibleOptionList into a FullOptionList. Lists of full options are left unchanged.
toFullOptionMapConverts a FlexibleOptionList into a FullOptionList. Lists of full options are left unchanged.
toOptionsGenerates an array of <option> or <optgroup> elements from a given OptionList.
uniqByIdentifierGenerates a new array of objects with duplicates removed based on the identifying property (value or name)
uniqByName-
uniqOptGroupsGenerates a new OptionGroup array with duplicates removed based on the identifying property (value or name).
uniqOptListGenerates a new Option or OptionGroup array with duplicates removed based on the identifier property (value or name).

Query Tools

NameDescription
AddOptionsOptions for add.
GroupOptionsOptions for group.
InsertOptionsOptions for insert.
MoveOptionsOptions for move.
UpdateOptionsOptions for update.
addAdds a rule or group to a query.
groupCreates a new group at a target path with its rules array containing the current objects at the target path and the source path. In the options parameter, pass { clone: true } to copy the source rule/group instead of move.
insertInserts a rule or group into a query.
moveMoves a rule or group from one path to another. In the options parameter, pass { clone: true } to copy instead of move.
removeRemoves a rule or group from a query.
updateUpdates a property of a rule or group within a query.

Functions

FunctionDescription
convertFromICConverts a RuleGroupTypeIC to RuleGroupType.
convertQueryConverts a RuleGroupType to RuleGroupTypeIC. For a more explicit operation, use convertToIC.
convertToICConverts a RuleGroupType to RuleGroupTypeIC.
findPathReturns the RuleType or RuleGroupType/RuleGroupTypeIC at the given path within a query.
generateIDDefault id generator. Generates a valid v4 UUID. Uses crypto.randomUUID() when available, otherwise uses an alternate method based on getRandomValues. The returned string is guaranteed to match this regex: /^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i
getCommonAncestorPathFinds the deepest/longest path that two paths have in common.
getCompatContextProviderGenerates a context provider for a compatibility package.
getParentPathTruncates the last element of an array and returns the result as a new array.
getParseNumberMethod-
getQuerySelectorByIdGiven a qbId (passed to every component as part of the schema prop), returns a Redux selector for use with useQueryBuilderSelector.
getValidationClassNamesGets the standard classname for valid or invalid components based on the given validation result.
getValueSourcesUtilUtility function to get the value sources array for the given field and operator. If the field definition does not define a valueSources property, the getValueSources prop is used. Returns ["value"] by default.
isAncestorDetermines if the first path is an ancestor of the second path. The first path must be shorter and exactly match the second path up through the length of the first path.
isPojoDetermines if a variable is a plain old JavaScript object, aka POJO.
isRuleGroupDetermines if an object is a RuleGroupType or RuleGroupTypeIC.
isRuleGroupTypeDetermines if an object is a RuleGroupType.
isRuleGroupTypeICDetermines if an object is a RuleGroupTypeIC.
isRuleOrGroupValidDetermines if a rule or group is valid based on a validation result (if defined) or a validator function. Returns true if neither are defined.
isValidationResultDetermines if an object is useful as a validation result.
joinWithJoins an array of strings using the given character (see defaultJoinChar). When the given character appears in an array element, a backslash will be added just before it to distinguish it from the join character. Effectively the inverse of splitBy.
mergeClassnamesMerges a list of partial Classnames definitions into a single definition.
mergeTranslation-
mergeTranslationsMerges any number of partial Translations into a single definition.
nullFreeArrayDetermines if an array is free of null/undefined.
nullOrUndefinedOrEmptySimple helper to determine whether a value is null, undefined, or an empty string.
parseNumberConverts a string to a number. Uses native parseFloat if parseNumbers is "native", otherwise uses numeric-quantity. If that returns NaN, the string is returned unchanged. Numeric values are returned as-is regardless of the parseNumbers option.
pathIsDisabledDetermines if the rule or group at the specified path is either disabled itself or disabled by an ancestor group.
pathsAreEqualDetermines if two paths (each Path) are equivalent.
preferProp-
prepareRuleEnsures that a rule is valid by adding an id property if it does not already exist.
prepareRuleGroupEnsures that a rule group is valid by recursively adding an id property to the group itself and all its rules and subgroups where one does not already exist.
prepareRuleOrGroupEnsures that a rule or group is valid. See prepareRule and prepareRuleGroup.
regenerateIDGenerates a new id property for a rule.
regenerateIDsRecursively generates new id properties for a group and all its rules and subgroups.
splitBySplits a string by a given character (see defaultJoinChar). Escaped characters (characters preceded by a backslash) will not apply to the split, and the backslash will be removed in the array element. Inverse of joinWith.
toArraySplits a string by comma then trims each element. Arrays are returned as is except any string elements are trimmed.
trimIfStringTrims the value if it is a string. Otherwise returns the value as is.

Interfaces

InterfaceDescription
CommonRuleAndGroupPropertiesProperties common to both rules and groups.
DefaultRuleGroupTypeICRuleGroupTypeIC with combinators limited to DefaultCombinatorName and rules limited to DefaultRuleType.
DragCollection-
DropCollection-
DropResult-
ParseNumberOptionsOptions object for parseNumber.
PreparerOptionsOptions for prepareRule/prepareRuleGroup.
RegenerateIdOptionsOptions object for regenerateID/regenerateIDs.
RuleGroupTypeThe main rule group type. This type is used for query definitions as well as all sub-groups of queries.
RuleGroupTypeICThe main rule group interface when using independent combinators. This type is used for query definitions as well as all sub-groups of queries.
RuleTypeThe main rule type. The field, operator, and value properties can be narrowed with generics.
UseControlledOrUncontrolledParams-
UseRuleDnDReturn type of @react-querybuilder/dnd!useRuleDnD hook.
UseRuleGroupDnDReturn type of @react-querybuilder/dnd!useRuleGroupDnD hook.
UseSelectElementChangeHandlerParams-
ValidationResultObject with a valid boolean value and optional reasons.

Type Aliases

Type AliasDescription
AccessibleDescriptionGeneratorSignature of accessibleDescriptionGenerator prop, used by QueryBuilder to generate accessible descriptions for each RuleGroup.
ActionElementEventHandler-
ArityAllowed values of the FullOperator property arity. A value of "unary" or a number less than two will cause the default ValueEditor to render null.
ClassnameString of classnames, array of classname strings, or object where the keys are classnames and those with truthy values will be included. Suitable for passing to the clsx package.
DefaultCombinators-
DefaultCombinatorsExtended-
DefaultOperators-
DefaultRuleGroupArrayThe type of the rules array in a DefaultRuleGroupType.
DefaultRuleGroupICArrayThe type of the rules array in a DefaultRuleGroupTypeIC.
DefaultRuleGroupTypeRuleGroupType with the combinator property limited to DefaultCombinatorNameExtended and rules limited to DefaultRuleType.
DefaultRuleGroupTypeAnyShorthand for "either DefaultRuleGroupType or DefaultRuleGroupTypeIC".
DefaultRuleOrGroupArrayShorthand for "either DefaultRuleGroupArray or DefaultRuleGroupICArray".
DefaultRuleTypeRuleType with the operator property limited to DefaultOperatorName.
DndDropTargetType-
DraggedItem-
DropEffect-
FindPathReturnTypeReturn type for findPath.
GetCompatContextProviderProps-
GetRuleGroupTypeDetermines if a type extending RuleGroupTypeAny is actually RuleGroupType or RuleGroupTypeIC.
GetRuleTypeFromGroupWithFieldAndOperatorDetermines the RuleType of a given RuleGroupType or RuleGroupTypeIC. If the field and operator name types of the rule type extend the identifier types of the provided Field and Operator types, the given rule type is returned as is. Otherwise, the rule type has its field and operator types narrowed to the identifier types of the provided Field and Operator types.
InputTypeHTML5 input types
JsonLogicAnd-
JsonLogicDoubleNegation-
JsonLogicEqual-
JsonLogicGreaterThan-
JsonLogicGreaterThanOrEqual-
JsonLogicInArray-
JsonLogicInString-
JsonLogicLessThan-
JsonLogicLessThanOrEqual-
JsonLogicNegation-
JsonLogicNotEqual-
JsonLogicOr-
JsonLogicReservedOperations-
JsonLogicRulesLogic-
JsonLogicStrictEqual-
JsonLogicStrictNotEqual-
JsonLogicVar-
ParseNumberMethodParsing algorithms used by parseNumber.
ParseNumbersPropConfigOptions for the parseNumbers prop of QueryBuilder.
Path-
QueryValidatorFunction that validates a query.
RemoveNullabilityUtility type to make all properties non-nullable.
RqbState-
RqbStore-
RuleGroupArrayThe type of the rules array in a RuleGroupType.
RuleGroupICArrayThe type of the rules array in a RuleGroupTypeIC.
RuleGroupTypeAnyShorthand for "either RuleGroupType or RuleGroupTypeIC".
RuleOrGroupArrayShorthand for "either RuleGroupArray or RuleGroupICArray".
RuleValidatorFunction that validates a rule.
UpdateablePropertiesAll updateable properties of rules and groups (everything except id, path, and rules).
UseMergedContextParams-
UseMergedContextReturn-
UseQueryBuilderSchema-
UseQueryBuilderSetup-
UseRule-
UseRuleGroup-
UseValueSelectorParams-
ValidationMapMap of rule/group id to its respective ValidationResult.
ValueChangeEventHandler-
ValueEditorTypeType of ValueEditor that will be displayed.
ValueSourceA source for the value property of a rule.
ValueSourceOptions-
ValueSourcesA valid array of potential value sources.
WithRequiredUtility type to make one or more properties required.
WithUnknownIndexAdds an unknown index property to an interface.

Variables

VariableDescription
defaultValidatorThis is an example validation function you can pass to QueryBuilder in the validator prop. It assumes that you want to validate groups, and has a no-op for validating rules which you can replace with your own implementation.
generateAccessibleDescription-
LogType-
messages-
numericRegexRegex matching numeric strings. Passes for positive/negative integers, decimals, and E notation, with optional surrounding whitespace.
objectEntriesA strongly-typed version of Object.entries().
objectKeysA strongly-typed version of Object.keys().
QueryBuilderContextContext provider for QueryBuilder. Any descendant query builders will inherit the props from a context provider.
QueryBuilderStateContext-
queryBuilderStore-

default

Renames and re-exports QueryBuilder


defaultCELValueProcessor

Re-exports defaultCELValueProcessor


defaultMongoDBValueProcessor

Re-exports defaultMongoDBValueProcessor


defaultSpELValueProcessor

Re-exports defaultSpELValueProcessor


defaultValueProcessor

Re-exports defaultValueProcessor


defaultValueProcessorCELByRule

Re-exports defaultValueProcessorCELByRule


defaultValueProcessorMongoDBByRule

Re-exports defaultValueProcessorMongoDBByRule


defaultValueProcessorSpELByRule

Re-exports defaultValueProcessorSpELByRule


transformQuery

Re-exports transformQuery


TransformQueryOptions

Re-exports TransformQueryOptions


type-fest

Type AliasDescription
AndReturns a boolean for whether two given types are both true.
ExceptCreate a type from an object type without certain keys.
FiniteA finite number. You can't pass a bigint as they are already guaranteed to be finite.
FloatA number that is not an integer.
GreaterThanReturns a boolean for whether a given number is greater than another number.
GreaterThanOrEqualReturns a boolean for whether a given number is greater than or equal to another number.
IfAnyAn if-else-like type that resolves depending on whether the given type is any.
IfNeverAn if-else-like type that resolves depending on whether the given type is never.
IntegerA number that is an integer.
IsAnyReturns a boolean for whether the given type is any.
IsBooleanLiteralReturns a boolean for whether the given type is a true or false literal type.
IsEqualReturns a boolean for whether the two given types are equal.
IsFloatReturns a boolean for whether the given number is a float, like 1.5 or -1.5.
IsIntegerReturns a boolean for whether the given number is a integer, like -5, 1.0 or 100.
IsLiteralReturns a boolean for whether the given type is a literal type.
IsNegativeReturns a boolean for whether the given number is a negative number.
IsNeverReturns a boolean for whether the given type is never.
IsNumericLiteralReturns a boolean for whether the given type is a number or bigint literal type.
IsStringLiteralReturns a boolean for whether the given type is a string literal type.
IsSymbolLiteralReturns a boolean for whether the given type is a symbol literal type.
KeysOfUnionCreate a union of all keys from a given type, even those exclusive to specific union members.
LessThanReturns a boolean for whether a given number is less than another number.
MergeMerge two types into a new type. Keys of the second type overrides keys of the first type.
NegativeA negative number/bigint (-∞ < x < 0)
NegativeFloatA negative (-∞ < x < 0) number that is not an integer. Equivalent to Negative<Float<T>>.
NegativeInfinityMatches the hidden -Infinity type.
NegativeIntegerA negative (-∞ < x < 0) number that is an integer. Equivalent to Negative<Integer<T>>.
NonNegativeA non-negative number/bigint (0 <= x < ∞).
NonNegativeIntegerA non-negative (0 <= x < ∞) number that is an integer. Equivalent to NonNegative<Integer<T>>.
Numeric-
OmitIndexSignatureOmit any index signatures from the given object type, leaving only explicitly defined properties.
OptionalKeysOfExtract all optional keys from the given type.
OrReturns a boolean for whether either of two given types are true.
OverridePropertiesOverride existing properties of the given type. Similar to Merge, but enforces that the original type has the properties you want to override.
PickIndexSignaturePick only index signatures from the given object type, leaving out all explicitly defined properties.
PositiveInfinityMatches the hidden Infinity type.
PrimitiveMatches any primitive value.
RequireAtLeastOneCreate a type that requires at least one of the given keys. The remaining keys are kept as is.
RequiredKeysOfExtract all required keys from the given type.
SetNonNullableCreate a type that makes the given keys non-nullable, where the remaining keys are kept as is.
SetOptionalCreate a type that makes the given keys optional. The remaining keys are kept as is. The sister of the SetRequired type.
SetRequiredCreate a type that makes the given keys required. The remaining keys are kept as is. The sister of the SetOptional type.
SimplifyUseful to flatten the type output to improve type hints shown in editors. And also to transform an interface into a type to aide with assignability.
TrimRemove leading and trailing spaces from a string.
UnionToIntersectionConvert a union type to an intersection type using distributive conditional types.
UnknownArrayRepresents an array with unknown value.
WritableCreate a type that strips readonly from the given type. Inverse of Readonly<T>.
Zero-

caution

API documentation is generated from the latest commit on the main branch. It may be somewhat inconsistent with official releases of React Query Builder.