Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@react-querybuilder/antd

Package Overview
Dependencies
Maintainers
1
Versions
121
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@react-querybuilder/antd - npm Package Versions

1
13

5.0.0

Diff

Changelog

Source

[v5.0.0] - 2022-10-22

Changed

  • Internet Explorer is no longer supported.
  • The minimum TypeScript version is now 4.5.
  • When defaultQuery is defined, an id property will be added to each rule and group in the query hierarchy. This will be reflected in the onQueryChange callback parameter. In previous versions defaultQuery was not modified by the component itself, but id is now added because it is a required attribute internally.
  • Related to the previous bullet, the prepareRuleGroup utility function will no longer coerce the not property of groups to be a boolean type (or even defined at all).
  • [#385] MongoDB output has been simplified: The $eq and $and operators are only used when necessary.
  • [#343] Drag-and-drop functionality migrated
    • In order to make the react-dnd dependency completely optional when the enableDragAndDrop prop was not set to true, drag-and-drop functionality was extracted from react-querybuilder into a new package called @react-querybuilder/dnd.
    • The new package has peerDependencies of react-dnd and react-dnd-html5-backend (each of which can be any version >= 14, as long as they match), but no hard dependencies. The only external dependencies in the main package now are immer and clsx.
    • Upgrade path: To enable drag-and-drop functionality in v5, nest <QueryBuilder /> within a <QueryBuilderDnD /> element. The enableDragAndDrop prop is implicitly true when using QueryBuilderDnD, so you no longer need to set it explicitly unless it should be false (which can be set on QueryBuilderDnD or QueryBuilder).
       export function App() {
         return (
      -    <QueryBuilder enableDragAndDrop />
      +    <QueryBuilderDnD>
      +      <QueryBuilder />
      +    </QueryBuilderDnD>
         );
       }
      
    • If your application already uses react-dnd and renders DndProvider higher in the component tree, replace QueryBuilderDnD with QueryBuilderDndWithoutProvider.

Fixed

  • [#324] The @react-querybuilder/material package now properly inherits the theme configuration from ancestor ThemeProviders. Note: the @mui/material components are now loaded asynchronously by default, so the query builder will initially be rendered with the default components. See the documentation or the README to find out how to render the MUI components immediately.
  • parseCEL now handles strings correctly (including multi-line strings).
  • [#389] AntDValueSelector properly handles empty string values in multiselect mode.

Added

  • Each compatibility package now exports its own context provider that injects the appropriate controlElements and controlClassnames properties into any descendant QueryBuilder components (composition FTW!). This is now the recommended usage for all compatibility packages.
  • The onAddRule and onAddGroup callback props now receive an optional "context" parameter as the fourth argument. This parameter can be provided by a custom addRuleAction/addGroupAction component to its handleOnClick prop. This allows users to alter or replace the default rule based on arbitrary data. For example, the addRuleAction component could render two "add rule" buttons which add different rules depending on which one was clicked, as long as they provided a different context parameter.
  • When drag-and-drop is enabled, rules will be copied instead of moved if the user has a modifier key (Alt on Windows/Linux, Option/ on Mac) pressed when the drop occurs.
  • formatQuery has a new ruleProcessor configuration option applicable to non-SQL query language formats. When provided, the entire rule output will be determined by the function. For the relevant formats, valueProcessor already behaved this way; the default "value" processors have been renamed to defaultRuleProcessor[Format] to clarify the behavior. The default processors' original "value" names are deprecated but still available (with no immediate plans to remove them).
  • parseSQL will now ignore a leading WHERE keyword, e.g. parseSQL("WHERE firstName = 'Steve'") will not fail to produce a query rule like in v4.
<details> <summary>Miscellaneous</summary>
  • The documentation site now has separate documentation for past versions.
  • The controlElements prop has a new option: inlineCombinator. By default, this is a small wrapper around the combinatorSelector component that is used when either showCombinatorsBetweenRules or independentCombinators is true. The inlineCombinator option was only added to support @react-querybuilder/dnd, so there is almost certainly no reason to use it directly.
</details>
jakeboone02
published 5.0.0-alpha.9 •

jakeboone02
published 5.0.0-alpha.8 •

jakeboone02
published 5.0.0-alpha.7 •

jakeboone02
published 4.5.3 •

Changelog

Source

[v4.5.3] - 2022-09-28

Fixed

  • [#364] The array passed to the fields prop was being mutated if it contained duplicates, whether they were duplicate field names or option group labels. The fields prop is now treated as immutable.
  • [#374] RuleGroup was using unstable keys to render elements in the rules array. Keys are now stable based on id properties, which are auto-generated if not provided in the query/defaultQuery prop.
jakeboone02
published 5.0.0-alpha.6 •

jakeboone02
published 5.0.0-alpha.5 •

jakeboone02
published 5.0.0-alpha.3 •

jakeboone02
published 5.0.0-alpha.2 •

jakeboone02
published 5.0.0-alpha.0 •

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