New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@react-querybuilder/chakra

Package Overview
Dependencies
Maintainers
1
Versions
126
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@react-querybuilder/chakra - npm Package Versions

1
1113

4.3.1

Diff

Changelog

Source

[v4.3.1] - 2022-05-21

Changed

  • If using TypeScript, custom operatorSelector components will now need to accommodate OptionGroup<NameLabelPair>[] in addition to the normal NameLabelPair[].

Added

  • [#304] Many compatibility components now accept the props of the rendered library component in addition to the standard props (see documentation), allowing customization specific to the style library.
  • [#306] New prop autoSelectOperator (documentation) behaves like autoSelectField but for the operator selector.
    • The fields and operators properties of the translations prop object now accept placeholderName, placeholderLabel, and placeholderGroupLabel properties (documentation). These translatable strings set the default field and operator values and labels when autoSelectField and/or autoSelectOperator are set to false.
    • Corresponding options were also added to formatQuery, which will now ignore rules where the field or operator match the placeholder values for most export formats.
  • [#303] Added support for wildcards concatenated to field names in parseSQL. Examples:
<table> <tr> <th>

SQL

</th> <th>

Generated RuleType object

</th> </tr> <tr> <td>

"lastName LIKE firstName || '%'"

</td> <td>
{
  "field": "lastName",
  "operator": "beginsWith",
  "value": "firstName",
  "valueSource": "field"
}
</td> </tr> <tr> <td>

"lastName NOT LIKE '%' || firstName || '%'"

</td> <td>
{
  "field": "lastName",
  "operator": "doesNotContain",
  "value": "firstName",
  "valueSource": "field"
}
</td> </tr> </table>

Fixed

  • [#301] react-querybuilder and the compatibility packages are all built with React v18 now (the peerDependencies version is still ">=16.8.0"). Previous 4.x versions were usable within React 18 applications, but now the build and tests explicitly use it.
  • [#308] The CodeSandbox CI template is now located within the repository, and several other CodeSandbox-compatible examples have been added as well (see examples folder).
jakeboone02
published 4.3.0 •

jakeboone02
published 4.2.5 •

Changelog

Source

[v4.2.5] - 2022-05-12

Added

  • Added two options to the translations prop: fields.placeholderLabel and fields.placeholderGroupLabel. These will be used in place of the default "------" when the autoSelectField prop is set to false.
  • All translation properties are now optional.
jakeboone02
published 4.2.4 •

Changelog

Source

[v4.2.4] - 2022-05-12

Added

  • Added a parseNumbers option for formatQuery.
  • Added a debugMode prop on <QueryBuilder />.
jakeboone02
published 4.2.3 •

Changelog

Source

[v4.2.3] - 2022-04-05

Added

jakeboone02
published 4.2.2 •

Changelog

Source

[v4.2.2] - 2022-03-12

Fixed

  • This release fixes the "IC" aka "independent combinator" type exports (RuleGroupTypeIC, etc.).
jakeboone02
published 4.2.1 •

Changelog

Source

[v4.2.1] - 2022-03-03

Added

  • This release adds an operator parameter to the comparator function property of the Field interface.
jakeboone02
published 4.2.0 •

Changelog

Source

[v4.2.0] - 2022-02-02

Changed

  • When calling formatQuery with the "mongodb" format and a custom valueProcessor, the valueProcessor function will now need to return the full expression object and not just the operator/value portion. For example, defaultMongoDBValueProcessor('firstName', '=', 'Steve') previously returned {"$eq":"Steve"}, but now returns {"firstName":{"$eq":"Steve"}}.

Fixed

  • [#276] When using react-querybuilder v4 within an application that already implemented react-dnd, an error would appear: "Cannot have two HTML5 backends at the same time." This can now be resolved by using the <QueryBuilderWithoutDndProvider /> component instead of <QueryBuilder />. They are functionally the same, but the former allows (in fact, relies on) a react-dnd backend (e.g. react-dnd-html5-backend) to be implemented higher up in the component tree.
  • Previously, the parseSQL method would accept boolean comparison clauses with an identifier (field name) on the left or right of the operator, but not on both sides (at least one side had to be a primitive string, numeric, or boolean). If the identifier was on the right, parseSQL would flip the clause so that the field name was on the left and the value on the right, but it wouldn't flip the operator (< should become >, etc.). The operator will now be flipped when appropriate.

Added

  • Compare fields to other fields. The default <ValueEditor /> component can now display a filterable list of fields from the fields prop given the right configuration. formatQuery and parseSQL have also been updated to support this feature.
  • Query tools: Several methods are now available to assist with manipulation of query objects outside the context of a <QueryBuilder /> element:
    • add - appends a new rule or group (and a preceding independent combinator if appropriate) to the end of a rule group's rules array
    • remove - removes a rule or group (and the preceding independent combinator if one exists)
    • update - updates a property of a rule or group, or updates an independent combinator
    • move - moves (or clones, with new id and path) a rule or group to a new location in the query tree
  • Lock buttons: Use the showLockButtons prop to enable locking/unlocking (i.e. disabling/enabling) individual rules and groups (demo).
  • New valueEditorType and inputType options: In addition to the previously available options ("text", "select", "checkbox", "radio"), the following new options are now officially implemented in the default <ValueEditor /> and all compatibility packages:
    • valueEditorType
      • "textarea"
      • "multiselect"
    • inputType
      • "date"
      • "datetime-local"
      • "time"
  • A UMD build is now available (demo).
  • The fields prop can now accept an object of type Record<string, Field>. (Field[] and OptionGroup<Field>[] are still supported.)
  • Each compatibility package now exports an object ready-made for the controlElements prop (as well as controlClassnames in the case of Bootstrap). No need to assign each component individually anymore.
jakeboone02
published 4.1.3 •

Changelog

Source

[v4.1.3] - 2022-01-18

Fixed

  • The path to the CommonJS build was wrong in package.json for the main package. This has been fixed.
  • The RuleGroupArray type (used for the rules property of RuleGroupType) has been simplified to (RuleType | RuleGroupType)[]. This should make it easier to extend and/or narrow RuleGroupType.
jakeboone02
published 4.1.2 •

Changelog

Source

[v4.1.2] - 2022-01-12

Fixed

  • parseSQL was returning conventional rule groups (combinators at the group level) in some situations even when the independentCombinators option was set to true. The option will now guarantee a return type of RuleGroupTypeIC.

Added

  • Added convertQuery method to toggle a query between the conventional structure with combinators at the group level (RuleGroupType) and the "independent combinator" structure (RuleGroupTypeIC, used with the independentCombinators prop). For unidirectional conversions, convertToIC and convertFromIC are also available.
  • The specific return type of the parseSQL method (RuleGroupType or RuleGroupTypeIC) is now inferred from the parameters.
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc