index
Components
Name | Description |
---|---|
QueryBuilderContextProvider | - |
DragHandle | Default drag handle component used by QueryBuilder when enableDragAndDrop is true . |
Rule | Default component to display RuleType objects. This is actually a small wrapper around RuleComponents. |
RuleComponents | Renders a React.Fragment containing an array of form controls for managing a RuleType. |
RuleGroup | Default component to display RuleGroupType and RuleGroupTypeIC objects. This is actually a small wrapper around RuleGroupHeaderComponents and RuleGroupBodyComponents. |
RuleGroupBodyComponents | Renders a React.Fragment containing an array of either (1) Rule and RuleGroup, or (2) Rule, RuleGroup, and InlineCombinator. |
RuleGroupHeaderComponents | Renders a React.Fragment containing an array of form controls for managing a RuleGroupType or RuleGroupTypeIC. |
ActionElement | Default <button> component used by QueryBuilder. |
InlineCombinator | Default inlineCombinator component used by QueryBuilder. A small <div> wrapper around the combinatorSelector component, used when either showCombinatorsBetweenRules or independentCombinators are true . |
NotToggle | Default notToggle (aka inversion) component used by QueryBuilder. |
QueryBuilder | The query builder component for React. |
QueryBuilderStateProvider | Context provider for the {@link QueryBuilder} state store. |
ShiftActions | Default "shift up"/"shift down" buttons used by QueryBuilder. |
ValueEditor | Default valueEditor component used by QueryBuilder. |
ValueSelector | Default <select> component used by QueryBuilder. |
Props
Name | Description |
---|---|
ActionProps | Props passed to every action component (rendered as <button> by default). |
ActionWithRulesAndAddersProps | Props passed to every action component that adds a rule or group. |
ActionWithRulesProps | Props passed to every group action component. |
Classnames | Classnames applied to each component. |
CombinatorSelectorProps | Props for combinatorSelector components. |
CommonRuleSubComponentProps | Base interface for all rule subcomponents. |
CommonSubComponentProps | Base interface for all subcomponents. |
DragHandleProps | Props for dragHandle components. |
FieldSelectorProps | Props for fieldSelector components. |
InlineCombinatorProps | Props passed to inlineCombinator components. |
NotToggleProps | Props for notToggle components. |
OperatorSelectorProps | Props for operatorSelector components. |
QueryActions | Functions included in the actions prop passed to every subcomponent. |
QueryBuilderContextProps | Props passed down through context from a QueryBuilderContextProvider. |
RuleGroupProps | RuleGroup props. |
RuleProps | Rule props. |
Schema | Configuration options passed in the schema prop from QueryBuilder to each subcomponent. |
SelectorOrEditorProps | Base interface for selectors and editors. |
ShiftActionsProps | Props passed to shiftActions components. |
Translation | A translation for a component with title only. |
Translations | The shape of the translations prop. |
TranslationWithLabel | A translation for a component with title and label . |
TranslationWithPlaceholders | A translation for a component with title and a placeholder. |
ValueEditorProps | Props passed to valueEditor components. |
ValueSelectorProps | Props for all value selector components. |
ValueSourceSelectorProps | Props for valueSourceSelector components. |
ControlElementsProp | Subcomponents. |
Controls | All subcomponents. |
QueryBuilderContextProviderProps | - |
QueryBuilderProps | Props for QueryBuilder. |
TranslationsFull | The full translations interface with all properties required. |
VersatileSelectorProps | Utility type representing props for selector components that could potentially be any of the standard selector types. |
Hooks
Name | Description |
---|---|
useQueryBuilderSelector | A Redux useSelector hook for RQB's internal store. See also getQuerySelectorById. |
useControlledOrUncontrolled | Logs a warning when the component changes from controlled to uncontrolled, vice versa, or both query and defaultQuery are provided. |
useDeprecatedProps | Logs 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 ) |
useMergedContext | Merges inherited context values with props, giving precedence to props. |
usePreferAnyProp | For given default, prop, and context values, return the first provided of prop, context, and default, in that order. |
usePreferProp | For given default, prop, and context values, return the first provided of prop, context, and default, in that order. |
usePrevious | Returns the prop value from the last render. |
useQueryBuilder | Calls 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. |
useQueryBuilderQuery | Retrieves the full, latest query object for the nearest ancestor QueryBuilder component. |
useQueryBuilderSchema | For given QueryBuilderProps and setup values from useQueryBuilderSetup, prepares and returns all values required to render a query builder. |
useQueryBuilderSetup | Massages the props as necessary and prepares the basic update/generate methods for use by the QueryBuilder component. |
useReactDndWarning | Logs 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. |
useRule | Prepares all values and methods used by the Rule component. |
useRuleGroup | Prepares all values and methods used by the RuleGroup component. |
useSelectElementChangeHandler | Returns a memoized change handler for HTML <select> elements. |
useStopEventPropagation | Wraps 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. |
useValueEditor | This hook is primarily concerned with multi-value editors like date range pickers, editors for 'in' and 'between' operators, etc. |
useValueSelector | Transforms a value into an array when appropriate and provides a memoized change handler. |
Export
Name | Description |
---|---|
FormatQueryOptions | Options object shape for formatQuery. |
ParameterizedNamedSQL | Object produced by formatQuery for the "parameterized_named" format. |
ParameterizedSQL | Object produced by formatQuery for the "parameterized" format. |
RQBJsonLogicEndsWith | - |
RQBJsonLogicStartsWith | - |
RQBJsonLogicVar | - |
ValueProcessorOptions | Options object for ValueProcessorByRule functions. |
ExportFormat | Available export formats for formatQuery. |
ExportObjectFormats | Export formats for formatQuery that produce objects instead of strings. |
RQBJsonLogic | JsonLogic rule object with additional operators generated by formatQuery and accepted by parseJsonLogic!parseJsonLogic. |
RuleProcessor | Function to produce a result that formatQuery uses when processing a RuleType object. |
SQLPreset | Available presets for the "sql" export format. |
ValueProcessor | - |
ValueProcessorByRule | Function that produces a processed value for a given RuleType. |
ValueProcessorLegacy | Function that produces a processed value for a given field , operator , value , and valueSource . |
celCombinatorMap | Maps a DefaultCombinatorName to a CEL combinator. |
defaultRuleProcessorCEL | Default rule processor used by formatQuery for "cel" format. |
defaultRuleProcessorElasticSearch | Default rule processor used by formatQuery for "elasticsearch" format. |
defaultRuleProcessorJSONata | Default rule processor used by formatQuery for "jsonata" format. |
defaultRuleProcessorJsonLogic | Default rule processor used by formatQuery for "jsonlogic" format. |
defaultRuleProcessorMongoDB | Default rule processor used by formatQuery for "mongodb" format. |
defaultRuleProcessorMongoDBQuery | Default rule processor used by formatQuery for "mongodb_query" format. |
defaultRuleProcessorParameterized | Default rule processor used by formatQuery for "sql" format. |
defaultRuleProcessorSpEL | Default rule processor used by formatQuery for "spel" format. |
defaultRuleProcessorSQL | Default rule processor used by formatQuery for "sql" format. |
defaultValueProcessorByRule | Default value processor used by formatQuery for "sql" format. |
jsonLogicAdditionalOperators | Register these operators with jsonLogic before applying the result of formatQuery(query, 'jsonlogic') . |
mongoOperators | Maps a DefaultOperatorName to a MongoDB operator. |
sqlDialectPresets | - |
formatQuery | Generates a formatted (indented two spaces) JSON string from a query object. |
getQuotedFieldName | Given a field name and relevant ValueProcessorOptions, returns the field name wrapped in the configured quote character(s). |
getQuoteFieldNamesWithArray | Converts the quoteFieldNamesWith option into an array of two strings. If the option is a string, the array elements are both that string. |
isValidValue | Determines whether a value is anything except an empty string or NaN . |
isValueProcessorLegacy | Used 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. |
mapSQLOperator | Maps a DefaultOperatorName to a SQL operator. |
numerifyValues | Converts all string -type value properties of a query object into number where appropriate. |
shouldRenderAsNumber | Determines 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
Variable | Description |
---|---|
defaultCombinators | Default combinator list. |
defaultCombinatorsExtended | Default combinator list, with XOR added. |
defaultControlClassnames | Default classnames for each component. |
defaultControlElements | Default components used by QueryBuilder. |
defaultJoinChar | Default character used to .join and .split arrays. |
defaultOperatorNegationMap | Map of default operators to their respective opposite/negating operators. |
defaultOperators | Default operator list. |
defaultPlaceholderFieldGroupLabel | Default label for placeholder option group in the fields array. |
defaultPlaceholderFieldLabel | Default label for placeholder option in the fields array. |
defaultPlaceholderFieldName | Default name for placeholder option in the fields array. |
defaultPlaceholderLabel | - |
defaultPlaceholderName | - |
defaultPlaceholderOperatorGroupLabel | Default label for placeholder option group in the operators array. |
defaultPlaceholderOperatorLabel | Default label for placeholder option in the operators array. |
defaultPlaceholderOperatorName | Default name for placeholder option in the operators array. |
defaultPlaceholderValueGroupLabel | Default label for placeholder option group in the values array. |
defaultPlaceholderValueLabel | Default label for placeholder option in the values array. |
defaultPlaceholderValueName | Default name for placeholder option in the values array. |
defaultTranslations | Default configuration of translatable strings. |
groupInvalidReasons | Default reason codes for a group being invalid. |
rootPath | The Path of the root group. |
standardClassnames | Standard classnames applied to each component. |
TestID | Component identifiers for testing. |
Option Lists
Name | Description |
---|---|
BaseOption | Do 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. |
FullOperator | Full 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. |
OptionGroup | A group of Options, usually within an OptionList. |
BaseFullOption | This type is identical to FullOption but without the unknown index property. Extend from this type instead of FullOption directly. |
BaseOptionMap | Map of option identifiers to their respective Option. |
Combinator | Combinator definition used in the combinators prop of QueryBuilder. This type is an extension of FullCombinator where only name and label are required. |
CombinatorByValue | Combinator definition used in the combinators prop of QueryBuilder. This type is an extension of FullCombinator where only value and label are required. |
DefaultCombinator | A FullCombinator definition with a DefaultCombinatorName name property. |
DefaultCombinatorExtended | A FullCombinator definition with a DefaultCombinatorNameExtended name property. |
DefaultCombinatorName | Default allowed values for the combinator property. |
DefaultCombinatorNameExtended | Default allowed values for the combinator property, plus "xor" . |
DefaultOperator | An FullOperator definition with a DefaultOperatorName name property. |
DefaultOperatorName | Default values for the operator property. |
Field | Field definition used in the fields prop of QueryBuilder. This type is an extension of FullField where only name and label are required. |
FieldByValue | Field definition used in the fields prop of QueryBuilder. This type is an extension of FullField where only value and label are required. |
FlexibleOption | A 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. |
FlexibleOptionGroup | A group of BaseOptions, usually within a FlexibleOptionList. |
FlexibleOptionList | An array of options or option groups, like OptionList, but the option type may use either name or value as the primary identifier. |
FullCombinator | Full 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. |
FullField | Full 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. |
FullOption | A 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. |
FullOptionList | An 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 . |
FullOptionMap | Map of option identifiers to their respective FullOption. |
FullOptionRecord | Map of option identifiers to their respective FullOption. Must include all possible strings from the identifier type. |
GetOptionIdentifierType | Extracts the type of the identifying property from a Option, ValueOption, or FullOption. |
GetOptionType | Extracts the Option type from a FlexibleOptionList. |
- | |
Operator | Operator definition used in the operators /getOperators props of QueryBuilder. This type is an extension of FullOperator where only name and label are required. |
OperatorByValue | Operator definition used in the operators /getOperators props of QueryBuilder. This type is an extension of FullOperator where only value and label are required. |
Option | A generic option. Used directly in OptionList or as the child element of an OptionGroup. |
OptionList | Either an array of Options or an array of OptionGroups. |
ToFlexibleOption | Utility type to turn an Option, ValueOption, or BaseOption into a FlexibleOption. |
ToFullOption | Utility type to turn an Option, ValueOption or BaseOption into a FullOption. |
ValueOption | Like Option but requiring value instead of name . |
filterFieldsByComparator | For 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. |
getFirstOption | Gets the first option from an OptionList. |
getOption | Gets the option from an OptionList with the given name . Handles Option arrays as well as OptionGroup arrays. |
isFlexibleOptionArray | Determines if an array is a flat array of FlexibleOption. |
isFlexibleOptionGroupArray | Determines if a FlexibleOptionList is a FlexibleOptionGroup array. |
isFullOptionArray | Determines if an array is a flat array of FullOption. |
isFullOptionGroupArray | Determines if a FlexibleOptionList is a OptionGroup array of FullOption. |
isOptionGroupArray | Determines if an OptionList is an OptionGroup array. |
toFlatOptionArray | Flattens FlexibleOptionGroup arrays into BaseOption arrays. If the array is already flat, it is returned as is. |
toFullOption | Converts an Option or ValueOption (i.e., BaseOption) into a FullOption. Full options are left unchanged. |
toFullOptionList | Converts an OptionList or FlexibleOptionList into a FullOptionList. Lists of full options are left unchanged. |
toFullOptionMap | Converts a FlexibleOptionList into a FullOptionList. Lists of full options are left unchanged. |
toOptions | Generates an array of <option> or <optgroup> elements from a given OptionList. |
uniqByIdentifier | Generates a new array of objects with duplicates removed based on the identifying property (value or name ) |
- | |
uniqOptGroups | Generates a new OptionGroup array with duplicates removed based on the identifying property (value or name ). |
uniqOptList | Generates a new Option or OptionGroup array with duplicates removed based on the identifier property (value or name ). |
Query Tools
Name | Description |
---|---|
AddOptions | Options for add. |
GroupOptions | Options for group. |
InsertOptions | Options for insert. |
MoveOptions | Options for move. |
UpdateOptions | Options for update. |
add | Adds a rule or group to a query. |
group | Creates 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. |
insert | Inserts a rule or group into a query. |
move | Moves a rule or group from one path to another. In the options parameter, pass { clone: true } to copy instead of move. |
remove | Removes a rule or group from a query. |
update | Updates a property of a rule or group within a query. |
Functions
Function | Description |
---|---|
convertFromIC | Converts a RuleGroupTypeIC to RuleGroupType. |
convertQuery | Converts a RuleGroupType to RuleGroupTypeIC. For a more explicit operation, use convertToIC. |
convertToIC | Converts a RuleGroupType to RuleGroupTypeIC. |
findPath | Returns the RuleType or RuleGroupType/RuleGroupTypeIC at the given path within a query. |
generateID | Default 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 |
getCommonAncestorPath | Finds the deepest/longest path that two paths have in common. |
getCompatContextProvider | Generates a context provider for a compatibility package. |
getParentPath | Truncates the last element of an array and returns the result as a new array. |
getParseNumberMethod | - |
getQuerySelectorById | Given a qbId (passed to every component as part of the schema prop), returns a Redux selector for use with useQueryBuilderSelector. |
getValidationClassNames | Gets the standard classname for valid or invalid components based on the given validation result. |
getValueSourcesUtil | Utility 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. |
isAncestor | Determines 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. |
isPojo | Determines if a variable is a plain old JavaScript object, aka POJO. |
isRuleGroup | Determines if an object is a RuleGroupType or RuleGroupTypeIC. |
isRuleGroupType | Determines if an object is a RuleGroupType. |
isRuleGroupTypeIC | Determines if an object is a RuleGroupTypeIC. |
isRuleOrGroupValid | Determines if a rule or group is valid based on a validation result (if defined) or a validator function. Returns true if neither are defined. |
isValidationResult | Determines if an object is useful as a validation result. |
joinWith | Joins 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. |
mergeClassnames | Merges a list of partial Classnames definitions into a single definition. |
mergeTranslation | - |
mergeTranslations | Merges any number of partial Translations into a single definition. |
nullFreeArray | Determines if an array is free of null /undefined . |
nullOrUndefinedOrEmpty | Simple helper to determine whether a value is null, undefined, or an empty string. |
parseNumber | Converts 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. |
pathIsDisabled | Determines if the rule or group at the specified path is either disabled itself or disabled by an ancestor group. |
pathsAreEqual | Determines if two paths (each Path ) are equivalent. |
preferProp | - |
prepareRule | Ensures that a rule is valid by adding an id property if it does not already exist. |
prepareRuleGroup | Ensures 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. |
prepareRuleOrGroup | Ensures that a rule or group is valid. See prepareRule and prepareRuleGroup. |
regenerateID | Generates a new id property for a rule. |
regenerateIDs | Recursively generates new id properties for a group and all its rules and subgroups. |
splitBy | Splits 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. |
toArray | Splits a string by comma then trims each element. Arrays are returned as is except any string elements are trimmed. |
trimIfString | Trims the value if it is a string. Otherwise returns the value as is. |
Interfaces
Interface | Description |
---|---|
CommonRuleAndGroupProperties | Properties common to both rules and groups. |
DefaultRuleGroupTypeIC | RuleGroupTypeIC with combinators limited to DefaultCombinatorName and rules limited to DefaultRuleType. |
DragCollection | - |
DropCollection | - |
DropResult | - |
ParseNumberOptions | Options object for parseNumber. |
PreparerOptions | Options for prepareRule/prepareRuleGroup. |
RegenerateIdOptions | Options object for regenerateID/regenerateIDs. |
RuleGroupType | The main rule group type. This type is used for query definitions as well as all sub-groups of queries. |
RuleGroupTypeIC | The main rule group interface when using independent combinators. This type is used for query definitions as well as all sub-groups of queries. |
RuleType | The main rule type. The field , operator , and value properties can be narrowed with generics. |
UseControlledOrUncontrolledParams | - |
UseRuleDnD | Return type of @react-querybuilder/dnd!useRuleDnD hook. |
UseRuleGroupDnD | Return type of @react-querybuilder/dnd!useRuleGroupDnD hook. |
UseSelectElementChangeHandlerParams | - |
ValidationResult | Object with a valid boolean value and optional reasons . |
Type Aliases
Type Alias | Description |
---|---|
AccessibleDescriptionGenerator | Signature of accessibleDescriptionGenerator prop, used by QueryBuilder to generate accessible descriptions for each RuleGroup. |
ActionElementEventHandler | - |
Arity | Allowed values of the FullOperator property arity . A value of "unary" or a number less than two will cause the default ValueEditor to render null . |
Classname | String 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 | - |
DefaultRuleGroupArray | The type of the rules array in a DefaultRuleGroupType. |
DefaultRuleGroupICArray | The type of the rules array in a DefaultRuleGroupTypeIC. |
DefaultRuleGroupType | RuleGroupType with the combinator property limited to DefaultCombinatorNameExtended and rules limited to DefaultRuleType. |
DefaultRuleGroupTypeAny | Shorthand for "either DefaultRuleGroupType or DefaultRuleGroupTypeIC". |
DefaultRuleOrGroupArray | Shorthand for "either DefaultRuleGroupArray or DefaultRuleGroupICArray". |
DefaultRuleType | RuleType with the operator property limited to DefaultOperatorName. |
DndDropTargetType | - |
DraggedItem | - |
DropEffect | - |
FindPathReturnType | Return type for findPath. |
GetCompatContextProviderProps | - |
GetRuleGroupType | Determines if a type extending RuleGroupTypeAny is actually RuleGroupType or RuleGroupTypeIC. |
GetRuleTypeFromGroupWithFieldAndOperator | Determines 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. |
InputType | HTML5 input types |
JsonLogicAnd | - |
JsonLogicDoubleNegation | - |
JsonLogicEqual | - |
JsonLogicGreaterThan | - |
JsonLogicGreaterThanOrEqual | - |
JsonLogicInArray | - |
JsonLogicInString | - |
JsonLogicLessThan | - |
JsonLogicLessThanOrEqual | - |
JsonLogicNegation | - |
JsonLogicNotEqual | - |
JsonLogicOr | - |
JsonLogicReservedOperations | - |
JsonLogicRulesLogic | - |
JsonLogicStrictEqual | - |
JsonLogicStrictNotEqual | - |
JsonLogicVar | - |
ParseNumberMethod | Parsing algorithms used by parseNumber. |
ParseNumbersPropConfig | Options for the parseNumbers prop of QueryBuilder. |
Path | - |
QueryValidator | Function that validates a query. |
RemoveNullability | Utility type to make all properties non-nullable. |
RqbState | - |
RqbStore | - |
RuleGroupArray | The type of the rules array in a RuleGroupType. |
RuleGroupICArray | The type of the rules array in a RuleGroupTypeIC. |
RuleGroupTypeAny | Shorthand for "either RuleGroupType or RuleGroupTypeIC". |
RuleOrGroupArray | Shorthand for "either RuleGroupArray or RuleGroupICArray". |
RuleValidator | Function that validates a rule. |
UpdateableProperties | All updateable properties of rules and groups (everything except id , path , and rules ). |
UseMergedContextParams | - |
UseMergedContextReturn | - |
UseQueryBuilderSchema | - |
UseQueryBuilderSetup | - |
UseRule | - |
UseRuleGroup | - |
UseValueSelectorParams | - |
ValidationMap | Map of rule/group id to its respective ValidationResult. |
ValueChangeEventHandler | - |
ValueEditorType | Type of ValueEditor that will be displayed. |
ValueSource | A source for the value property of a rule. |
ValueSourceOptions | - |
ValueSources | A valid array of potential value sources. |
WithRequired | Utility type to make one or more properties required. |
WithUnknownIndex | Adds an unknown index property to an interface. |
Variables
Variable | Description |
---|---|
defaultValidator | This 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 | - |
numericRegex | Regex matching numeric strings. Passes for positive/negative integers, decimals, and E notation, with optional surrounding whitespace. |
objectEntries | A strongly-typed version of Object.entries() . |
objectKeys | A strongly-typed version of Object.keys() . |
QueryBuilderContext | Context 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 Alias | Description |
---|---|
And | Returns a boolean for whether two given types are both true. |
Except | Create a type from an object type without certain keys. |
Finite | A finite number . You can't pass a bigint as they are already guaranteed to be finite. |
Float | A number that is not an integer. |
GreaterThan | Returns a boolean for whether a given number is greater than another number. |
GreaterThanOrEqual | Returns a boolean for whether a given number is greater than or equal to another number. |
IfAny | An if-else-like type that resolves depending on whether the given type is any . |
IfNever | An if-else-like type that resolves depending on whether the given type is never . |
Integer | A number that is an integer. |
IsAny | Returns a boolean for whether the given type is any . |
IsBooleanLiteral | Returns a boolean for whether the given type is a true or false literal type. |
IsEqual | Returns a boolean for whether the two given types are equal. |
IsFloat | Returns a boolean for whether the given number is a float, like 1.5 or -1.5 . |
IsInteger | Returns a boolean for whether the given number is a integer, like -5 , 1.0 or 100 . |
IsLiteral | Returns a boolean for whether the given type is a literal type. |
IsNegative | Returns a boolean for whether the given number is a negative number. |
IsNever | Returns a boolean for whether the given type is never . |
IsNumericLiteral | Returns a boolean for whether the given type is a number or bigint literal type. |
IsStringLiteral | Returns a boolean for whether the given type is a string literal type. |
IsSymbolLiteral | Returns a boolean for whether the given type is a symbol literal type. |
KeysOfUnion | Create a union of all keys from a given type, even those exclusive to specific union members. |
LessThan | Returns a boolean for whether a given number is less than another number. |
Merge | Merge two types into a new type. Keys of the second type overrides keys of the first type. |
Negative | A negative number /bigint (-∞ < x < 0 ) |
NegativeFloat | A negative (-∞ < x < 0 ) number that is not an integer. Equivalent to Negative<Float<T>> . |
NegativeInfinity | Matches the hidden -Infinity type. |
NegativeInteger | A negative (-∞ < x < 0 ) number that is an integer. Equivalent to Negative<Integer<T>> . |
NonNegative | A non-negative number /bigint (0 <= x < ∞ ). |
NonNegativeInteger | A non-negative (0 <= x < ∞ ) number that is an integer. Equivalent to NonNegative<Integer<T>> . |
Numeric | - |
OmitIndexSignature | Omit any index signatures from the given object type, leaving only explicitly defined properties. |
OptionalKeysOf | Extract all optional keys from the given type. |
Or | Returns a boolean for whether either of two given types are true. |
OverrideProperties | Override existing properties of the given type. Similar to Merge , but enforces that the original type has the properties you want to override. |
PickIndexSignature | Pick only index signatures from the given object type, leaving out all explicitly defined properties. |
PositiveInfinity | Matches the hidden Infinity type. |
Primitive | Matches any primitive value. |
RequireAtLeastOne | Create a type that requires at least one of the given keys. The remaining keys are kept as is. |
RequiredKeysOf | Extract all required keys from the given type. |
SetNonNullable | Create a type that makes the given keys non-nullable, where the remaining keys are kept as is. |
SetOptional | Create a type that makes the given keys optional. The remaining keys are kept as is. The sister of the SetRequired type. |
SetRequired | Create a type that makes the given keys required. The remaining keys are kept as is. The sister of the SetOptional type. |
Simplify | Useful 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. |
Trim | Remove leading and trailing spaces from a string. |
UnionToIntersection | Convert a union type to an intersection type using distributive conditional types. |
UnknownArray | Represents an array with unknown value. |
Writable | Create 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.