Events

Model.model:add

Description

After a node of the model has been added

Parameters
Name Type Description
parent Node
node Node
index int
Details

Model.model:drop

Description

After a node of the model has been removed

Parameters
Name Type Description
node Node
Details

Model.model:move

Description

After a node of the model has been moved

Parameters
Name Type Description
node Node
target Node
index int
Details

Model.model:update

Description

After a value of the model changed

Parameters
Name Type Description
node Node
field string
value *
previousValue *
Details

plugins.ChangeFilters.changer:setFilters

Description

Modifies the filters before module:plugins.ChangeFilters.setFilters method

Parameters
Name Type Description
filters Array.<QueryBuilder.Filter>
Returns

plugins.ChangeFilters.afterSetFilters

Description

After module:plugins.ChangeFilters.setFilters method

Parameters
Name Type Description
filters Array.<QueryBuilder.Filter>

plugins.Invert.afterInvert

Description

After module:plugins.Invert.invert method

Parameters
Name Type Description
node Node

the main group or rule that has been modified

options object

plugins.MongoDbSupport.changer:getMongoDBField

Description

Modifies the MongoDB field used by a rule

Parameters
Name Type Description
field string
rule Rule
Returns

plugins.MongoDbSupport.changer:getMongoDBFieldID

Description

Returns a filter identifier from the MongoDB field

Parameters
Name Type Description
field string
value *
Returns

plugins.MongoDbSupport.changer:groupToMongo

Description

Modifies the MongoDB expression generated for a group

Parameters
Name Type Description
expression object
group Group
Returns

plugins.MongoDbSupport.changer:mongoToGroup

Description

Modifies the group generated from the MongoDB expression

Parameters
Name Type Description
group object
expression object
Returns

plugins.MongoDbSupport.changer:mongoToRule

Description

Modifies the rule generated from the MongoDB expression

Parameters
Name Type Description
rule object
expression object
Returns

plugins.MongoDbSupport.changer:parseMongoNode

Description

Custom parsing of a MongoDB expression, you can return a sub-part of the expression, or a well formed group or rule JSON

Parameters
Name Type Description
expression object
Returns

expression, rule or group


plugins.MongoDbSupport.changer:ruleToMongo

Description

Modifies the MongoDB expression generated for a rul

Parameters
Name Type Description
expression object
rule Rule
value *
valueWrapper function

function that takes the value and adds the operator

Returns

plugins.NotGroup.afterUpdateGroupNot

Description

After the group's not flag has been modified

Parameters
Name Type Description
group Group

plugins.Sortable.afterMove

Description

After a node has been moved with module:plugins.Sortable

Parameters
Name Type Description
node Node

plugins.SqlSupport.changer:getSQLField

Description

Modifies the SQL field used by a rule

Parameters
Name Type Description
field string
rule Rule
Returns

plugins.SqlSupport.changer:getSQLFieldID

Description

Returns a filter identifier from the SQL field

Parameters
Name Type Description
field string
value *
Returns

plugins.SqlSupport.changer:groupToSQL

Description

Modifies the SQL generated for a group

Parameters
Name Type Description
expression string
group Group
Returns

plugins.SqlSupport.changer:parseSQLNode

Description

Custom parsing of an AST node generated by SQLParser, you can return a sub-part of the tree, or a well formed group or rule JSON

Parameters
Name Type Description
AST object

node

Returns

tree, rule or group


plugins.SqlSupport.changer:ruleToSQL

Description

Modifies the SQL generated for a rule

Parameters
Name Type Description
expression string
rule Rule
value *
valueWrapper function

function that takes the value and adds the operator

Returns

plugins.SqlSupport.changer:sqlToGroup

Description

Modifies the group generated from the SQL expression (this is called before the group is filled with rules)

Parameters
Name Type Description
group object
AST object
Returns

plugins.SqlSupport.changer:sqlToRule

Description

Modifies the rule generated from the SQL expression

Parameters
Name Type Description
rule object
AST object
Returns

QueryBuilder.changer:displayError

Description

Modifies an error message before display

Parameters
Name Type Description
errorMessage string

the error message (translated and formatted)

error array

the raw error array (error code and optional arguments)

node Node
Returns
Details

QueryBuilder.changer:getDefaultFilter

Description

Modifies the default filter for a rule

Parameters
Name Type Description
filter QueryBuilder.Filter
rule Rule
Details

QueryBuilder.changer:getGroupTemplate

Description

Modifies the raw HTML of a group

Parameters
Name Type Description
html string
level int
Returns
Details

QueryBuilder.changer:getOperators

Description

Modifies the operators available for a filter

Parameters
Name Type Description
operators Array.<QueryBuilder.Operator>
filter QueryBuilder.Filter
Returns
Details

QueryBuilder.changer:getRuleFilters

Description

Modifies the list a filters available for a rule

Parameters
Name Type Description
filters Array.<QueryBuilder.Filter>
rule Rule
Returns
Details

QueryBuilder.changer:getRuleFilterTemplate

Description

Modifies the raw HTML of the rule's filter dropdown

Parameters
Name Type Description
html string
rule Rule
filters Array.<QueryBuilder.Filter>
Returns
Details

QueryBuilder.changer:getRuleInput

Description

Modifies the raw HTML of the rule's input

Parameters
Name Type Description
html string
rule Rule
name string

the name that the input must have

Returns
Details

QueryBuilder.changer:getRuleOperatorTemplate

Description

Modifies the raw HTML of the rule's operator dropdown

Parameters
Name Type Description
html string
rule Rule
operators Array.<QueryBuilder.Operator>
Returns
Details

QueryBuilder.changer:getRules

Description

Modifies the result of the QueryBuilder#getRules method

Parameters
Name Type Description
json object
Returns
Details

QueryBuilder.changer:getRuleTemplate

Description

Modifies the raw HTML of a rule

Parameters
Name Type Description
html string
Returns
Details

QueryBuilder.changer:getRuleValue

Description

Modifies the rule's value grabbed from the DOM

Parameters
Name Type Description
value *
rule Rule
Returns
Details

QueryBuilder.changer:groupToJson

Description

Modifies the JSON generated from a Group object

Parameters
Name Type Description
json object
group Group
Returns
Details

QueryBuilder.changer:jsonToGroup

Description

Modifies the Group object generated from the JSON

Parameters
Name Type Description
group Group
json object
Returns

the same group

Details

QueryBuilder.changer:jsonToRule

Description

Modifies the Rule object generated from the JSON

Parameters
Name Type Description
rule Rule
json object
Returns

the same rule

Details

QueryBuilder.changer:parseGroupFlags

Description

Modifies the consolidated group's flags

Parameters
Name Type Description
flags object
group object

not a Group object

Returns
Details

QueryBuilder.changer:parseRuleFlags

Description

Modifies the consolidated rule's flags

Parameters
Name Type Description
flags object
rule object

not a Rule object

Returns
Details

QueryBuilder.changer:ruleToJson

Description

Modifies the JSON generated from a Rule object

Parameters
Name Type Description
json object
rule Rule
Returns
Details

QueryBuilder.changer:setRules

Description

Modifies data before the QueryBuilder#setRules method

Parameters
Name Type Description
json object
options object
Returns
Details

QueryBuilder.changer:translate

Description

Modifies the translated label

Parameters
Name Type Attributes Description
translation string
key string | object
category string <optional>
Returns
Details

QueryBuilder.changer:validate

Description

Modifies the result of the QueryBuilder#validate method

Parameters
Name Type Description
valid boolean
Returns
Details

QueryBuilder.changer:validateValue

Description

Modifies the result of the rule validation method

Parameters
Name Type Description
result array | boolean

true or an error array

value *
rule Rule
Returns
Details

QueryBuilder.afterAddGroup

Description

Just after adding a group

Parameters
Name Type Description
group Group
Details

QueryBuilder.afterAddRule

Description

Just after adding a rule

Parameters
Name Type Description
rule Rule
Details

QueryBuilder.afterApplyGroupFlags

Description

After group's flags has been applied

Parameters
Name Type Description
group Group
Details

QueryBuilder.afterApplyRuleFlags

Description

After rule's flags has been applied

Parameters
Name Type Description
rule Rule
Details

QueryBuilder.afterClear

Description

After the QueryBuilder#clear method

Details

QueryBuilder.afterCreateRuleFilters

Description

After creating the dropdown for filters

Parameters
Name Type Description
rule Rule
Details

QueryBuilder.afterCreateRuleInput

Description

After creating the input for a rule and initializing optional plugin

Parameters
Name Type Description
rule Rule
Details

QueryBuilder.afterCreateRuleOperators

Description

After creating the dropdown for operators

Parameters
Name Type Description
rule Rule
operators Array.<QueryBuilder.Operator>

allowed operators for this rule

Details

QueryBuilder.afterDeleteGroup

Description

Just after deleting a group

Details

QueryBuilder.afterDeleteRule

Description

Just after deleting a rule

Details

QueryBuilder.afterInit

Description

When the initilization is done, just before creating the root group

Details

QueryBuilder.afterReset

Description

After the QueryBuilder#reset method

Details

QueryBuilder.afterSetRules

Description

After the QueryBuilder#setRules method

Details

QueryBuilder.afterUpdateGroupCondition

Description

After the group condition has been modified

Parameters
Name Type Description
group Group
Details

QueryBuilder.afterUpdateRuleFilter

Description

After the filter has been updated and the operators and input re-created

Parameters
Name Type Description
rule Rule
Details

QueryBuilder.afterUpdateRuleOperator

Description

After the operator has been updated and the input optionally re-created

Parameters
Name Type Description
rule Rule
Details

QueryBuilder.afterUpdateRuleValue

Description

After the rule value has been modified

Parameters
Name Type Description
rule Rule
Details

QueryBuilder.beforeAddGroup

Description

Just before adding a group, can be prevented.

Parameters
Name Type Description
parent Group
addRule boolean

if an empty rule will be added in the group

level int

nesting level of the group, 1 is the root group

Details

QueryBuilder.beforeAddRule

Description

Just before adding a rule, can be prevented

Parameters
Name Type Description
parent Group
Details

QueryBuilder.beforeClear

Description

Before the QueryBuilder#clear method, can be prevented

Details

QueryBuilder.beforeDeleteGroup

Description

Just before deleting a group, can be prevented

Parameters
Name Type Description
parent Group
Details

QueryBuilder.beforeDeleteRule

Description

Just before deleting a rule, can be prevented

Parameters
Name Type Description
rule Rule
Details

QueryBuilder.beforeDestroy

Description

Before the QueryBuilder#destroy method

Details

QueryBuilder.beforeReset

Description

Before the QueryBuilder#reset method, can be prevented

Details

QueryBuilder.validationError

Description

Fired when a validation error occurred, can be prevented

Parameters
Name Type Description
node Node
error string
value *
Details