Skip to main content

@react-querybuilder/rules-engine

Props

NameDescription
TranslationsREThe shape of the translations prop for RulesEngineBuilder.
TranslationsFullREThe full translations interface for RulesEngineBuilder, with all properties required.

Functions

FunctionDescription
findConditionIDReturns the RuleGroupType/RuleGroupTypeIC with the given id within a rules engine.
findConditionPathReturns the RuleGroupType/RuleGroupTypeIC at the given path within a rules engine.
getConditionPathOfIDReturns the Path of the RuleGroupType/RuleGroupTypeIC with the given id within a rules engine.
isRulesEngineDetermines if an object is a RulesEngine.
isRulesEngineAnyDetermines if an object is a RulesEngine or RulesEngineIC.
isRulesEngineConditionDetermines if an object is a RulesEngineAntecedent.
isRulesEngineConditionAnyDetermines if an object is a RulesEngineAntecedent or REConditionIC.
isRulesEngineConditionICDetermines if an object is a REConditionIC.
isRulesEngineConsequentDetermines if an object is a RulesEngine or RulesEngineIC.
isRulesEngineICDetermines if an object is a RulesEngineIC.
mergeClassnamesREMerges a list of partial ClassnamesRE definitions into a single definition.
prepareRulesEngineEnsures 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.
prepareRulesEngineCondition-
regenerateREIDsRecursively generates new id properties for a rule group or rules engine and all its rules/conditions and subgroups/subconditions.
RulesEngineBuilder-

Interfaces

InterfaceDescription
ActionElementREProps-
ClassnamesRE-
ComponentsRE-
ConditionCascadeProps-
ConditionProps-
Consequent-
ConsequentProps-
FormatRulesEngineOptions-
PreparerOptionsREOptions for prepareRulesEngine.
REConditionProperties common to both rules and groups.
REConditionICProperties common to both rules and groups.
RulesEngineProperties common to both rules and groups.
RulesEngineBuilderHeaderProps-
RulesEngineICProperties common to both rules and groups.
RulesEngineProps-
SchemaRE-
ValueSelectorREProps-

Type Aliases

Type AliasDescription
ConsequentBase-
FindConditionPathReturn type for findConditionPath.
REConditionAny-
REConditionCascade-
RulesEngineAny-
RulesEngineExportFormat-
RulesEngineProcessor-

Variables

VariableDescription
ActionElementRE-
ConditionBuilderHeaderDefault header component for RulesEngineConditionBuilder.
ConsequentBuilderAnalogous to the body of an "if" or "else-if" block.
ConsequentBuilderBodyDefault body component for ConsequentBuilder.
ConsequentBuilderHeaderDefault header component for ConsequentBuilder.
defaultComponentsRE-
RulesEngineBuilderHeader-
RulesEngineConditionBuilderAnalogous to an "if" or "else-if" block.
RulesEngineConditionBuilderBodyDefault body component for RulesEngineConditionBuilder.
RulesEngineConditionCascadeRenders a sequential list of if/else-if/else blocks in a rules engine.
ValueSelectorRE-

Rules Engine Tools

NameDescription
AddOptionsREOptions for addRE.
InsertOptionsREOptions for insertRE.
MoveOptionsREOptions for moveRE.
UpdateOptionsREOptions for updateRE.
addREAdds a rule or group to a query.
insertREInserts a rule engine condition into a rules engine.
moveREMoves a rule engine condition from one path to another. In the options parameter, pass { clone: true } to copy instead of move.
removeRERemoves a rule engine condition from a rules engine.
updateREUpdates a property of a rule or group within a query.

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.