User-friendly query builder for React

Overview

react-awesome-query-builder

npm travis codecov antd mui Financial Contributors on Open Collective demo sandbox TS sandbox JS

Open in codesandbox.io

User-friendly React component to build queries.

Inspired by jQuery QueryBuilder

Using awesome Ant Design v4 for widgets

Now Material-UI is also supported!

Demo page

Features

Screenshot

  • Highly configurable
  • Fields can be of type:
    • simple (string, number, bool, date/time/datetime, list)
    • structs (will be displayed in selectbox as tree)
    • custom type (dev should add its own widget component in config for this)
  • Comparison operators can be:
    • binary (== != < > ..)
    • unary (is empty, is null)
    • 'between' (for numbers, dates, times)
    • complex operators like 'proximity'
  • Values of fields can be compared with:
    • values
    • another fields (of same type)
    • function (arguments also can be values/fields/funcs)
  • Reordering (drag-n-drop) support for rules and groups of rules
  • Using awesome Ant Design as UI framework with rich features.
    Now Material-UI is also supported!
    (Using another UI framework and custom widgets is possible, see below)
  • Export to MongoDb, SQL, JsonLogic or your custom format
  • Import from JsonLogic
  • TypeScript support (see types and demo in TS)

Getting started

Install:

npm i react-awesome-query-builder

For AntDesign widgets only:

npm i antd

For Material-UI widgets only:

npm i @material-ui/core
npm i @material-ui/icons
npm i @material-ui/pickers
npm i material-ui-confirm

See basic usage and API below.

Demo apps:

  • npm start - demo app with hot reload of demo code and local library code, uses TS, uses complex config to demonstrate anvanced usage.
  • npm run sandbox_ts - demo app with hot reload of only demo code (uses latest version of library from npm), uses TS, uses AntDesign widgets.
  • npm run sandbox_js - demo app with hot reload of only demo code (uses latest version of library from npm), not uses TS, uses vanilla widgets.

v2 Migration

From v2.0 of this lib AntDesign is now optional (peer) dependency, so you need to explicitly include antd (4.x) in package.json of your project if you want to use AntDesign UI.
Please import AntdConfig from react-awesome-query-builder/lib/config/antd and use it as base for your config (see below in usage).
Alternatively you can use BasicConfig for simple vanilla UI, which is by default.
Support of other UI frameworks (like Bootstrap) are planned for future, see Other UI frameworks.

Usage

import React, {Component} from 'react';
import {Query, Builder, BasicConfig, Utils as QbUtils} from 'react-awesome-query-builder';

// For AntDesign widgets only:
import AntdConfig from 'react-awesome-query-builder/lib/config/antd';
import 'react-awesome-query-builder/css/antd.less'; // or import "antd/dist/antd.css";
// For Material-UI widgets only:
import MaterialConfig from 'react-awesome-query-builder/lib/config/material';
// Choose your skin (ant/material/vanilla):
const InitialConfig = AntdConfig; // or MaterialConfig or BasicConfig

import 'react-awesome-query-builder/lib/css/styles.css';
import 'react-awesome-query-builder/lib/css/compact_styles.css'; //optional, for more compact styles

// You need to provide your own config. See below 'Config format'
const config = {
  ...InitialConfig,
  fields: {
    qty: {
        label: 'Qty',
        type: 'number',
        fieldSettings: {
            min: 0,
        },
        valueSources: ['value'],
        preferWidgets: ['number'],
    },
    price: {
        label: 'Price',
        type: 'number',
        valueSources: ['value'],
        fieldSettings: {
            min: 10,
            max: 100,
        },
        preferWidgets: ['slider', 'rangeslider'],
    },
    color: {
        label: 'Color',
        type: 'select',
        valueSources: ['value'],
        fieldSettings: {
          listValues: [
            { value: 'yellow', title: 'Yellow' },
            { value: 'green', title: 'Green' },
            { value: 'orange', title: 'Orange' }
          ],
        }
    },
    is_promotion: {
        label: 'Promo?',
        type: 'boolean',
        operators: ['equal'],
        valueSources: ['value'],
    },
  }
};

// You can load query value from your backend storage (for saving see `Query.onChange()`)
const queryValue = {"id": QbUtils.uuid(), "type": "group"};


class DemoQueryBuilder extends Component {
    state = {
      tree: QbUtils.checkTree(QbUtils.loadTree(queryValue), config),
      config: config
    };
    
    render = () => (
      <div>
        <Query
            {...config} 
            value={this.state.tree}
            onChange={this.onChange}
            renderBuilder={this.renderBuilder}
        />
        {this.renderResult(this.state)}
      </div>
    )

    renderBuilder = (props) => (
      <div className="query-builder-container" style={{padding: '10px'}}>
        <div className="query-builder qb-lite">
            <Builder {...props} />
        </div>
      </div>
    )

    renderResult = ({tree: immutableTree, config}) => (
      <div className="query-builder-result">
          <div>Query string: <pre>{JSON.stringify(QbUtils.queryString(immutableTree, config))}</pre></div>
          <div>MongoDb query: <pre>{JSON.stringify(QbUtils.mongodbFormat(immutableTree, config))}</pre></div>
          <div>SQL where: <pre>{JSON.stringify(QbUtils.sqlFormat(immutableTree, config))}</pre></div>
          <div>JsonLogic: <pre>{JSON.stringify(QbUtils.jsonLogicFormat(immutableTree, config))}</pre></div>
      </div>
    )
    
    onChange = (immutableTree, config) => {
      // Tip: for better performance you can apply `throttle` - see `examples/demo`
      this.setState({tree: immutableTree, config: config});

      const jsonTree = QbUtils.getTree(immutableTree);
      console.log(jsonTree);
      // `jsonTree` can be saved to backend, and later loaded to `queryValue`
    }
}

API

<Query />

Props:

  • {...config} - destructured query CONFIG
  • value - query value in internal Immutable format
  • onChange - callback when value changed. Params: value (in Immutable format), config.
  • renderBuilder - function to render query builder itself. Takes 1 param props you need to pass into <Builder {...props} />.

Notes:

  • If you put query builder component inside Material-UI's <Dialog /> or <Popover />, please:
    • use prop disableEnforceFocus={true} for dialog or popver
    • set css .MuiPopover-root, .MuiDialog-root { z-index: 900 !important; } (or 1000 for AntDesign v3)

<Builder />

Render this component only inside Query.renderBuilder() like in example above:

  renderBuilder = (props) => (
    <div className="query-builder-container">
      <div className="query-builder qb-lite">
          <Builder {...props} />
      </div>
    </div>
  )

Wrapping <Builder /> in div.query-builder is necessary.
Optionally you can add class .qb-lite to it for showing action buttons (like delete rule/group, add, etc.) only on hover, which will look cleaner.
Wrapping in div.query-builder-container is necessary if you put query builder inside scrollable block.

Utils

  • Save, load:

    getTree (immutableValue, light = true) -> Object

    Convert query value from internal Immutable format to JS format. You can use it to save value on backend in onChange callback of <Query>.
    Tip: Use light = false in case if you want to store query value in your state in JS format and pass it as value of <Query> after applying loadTree() (which is not recommended because of double conversion). See issue #190

    loadTree (jsValue, config) -> Immutable

    Convert query value from JS format to internal Immutable format. You can use it to load saved value from backend and pass as value prop to <Query> (don't forget to also apply checkTree()).

    checkTree (immutableValue, config) -> Immutable

    Validate query value corresponding to config. Invalid parts of query (eg. if field was removed from config) will be always deleted. Invalid values (values not passing validateValue in config, bad ranges) will be deleted if showErrorMessage is false OR marked with errors if showErrorMessage is true.

    isValidTree (immutableValue) -> Boolean

    If showErrorMessage in config.settings is true, use this method to check is query has bad values.
  • Export:

    queryString (immutableValue, config, isForDisplay = false) -> String

    Convert query value to custom string representation. isForDisplay = true can be used to make string more "human readable".

    mongodbFormat (immutableValue, config) -> Object

    Convert query value to MongoDb query object.

    sqlFormat (immutableValue, config) -> String

    Convert query value to SQL where string.

    jsonLogicFormat (immutableValue, config) -> {logic, data, errors}

    Convert query value to JsonLogic format. If there are no errors, logic will be rule object and data will contain all used fields with null values ("template" data).
  • Import:

    loadFromJsonLogic (jsonLogicObject, config) -> Immutable

    Convert query value from JsonLogic format to internal Immutable format.

Config format

See CONFIG

Changelog

See CHANGELOG

Other UI frameworks

Currently there are 3 collections of widgets:

Let's say you want to create new collection of Bootstrap widgets to be used in this lib (and submit PR which is always welcomed!).
You can use vanilla widgets as skeleton.
Then to enable new widgets you need to create config overrides like this: material config

Development

To build the component locally, clone this repo then run:
npm install
npm start
Then open localhost:3001 in a browser.

Scripts:

  • npm test - Run tests with Karma and update coverage. Recommended before commits. Requires Node.js v10+
  • npm run lint - Run ESLint. Recommended before commits.
  • npm run lint-fix - Run ESLint with --fix option. Recommended before commits.
  • npm run build-examples - Build examples with webpack. Output path: examples
  • npm run build-npm - Build npm module that can be published. Output path: lib

Feel free to open PR to add new reusable types/widgets/operators (eg., regex operator for string, IP type & widget).
Pull Requests are always welcomed :)

Contributors

Code Contributors

This project exists thanks to all the people who contribute. [Contribute].

Financial Contributors

Become a financial contributor and help us sustain our community. [Contribute]

Individuals

Organizations

Support this project with your organization. Your logo will show up here with a link to your website. [Contribute]

react-awesome-query-builder is being sponsored by the following tool; please help to support us by taking a look and signing up to a free trial

License

MIT. See also LICENSE.txt

Forked from https://github.com/fubhy/react-query-builder

Comments
  • Material UI

    Material UI

    • [x] MaterialTextWidget

    • [x] MaterialDateWidget

    • [x] MaterialDateTimeWidget

    • [x] MaterialTimeWidget

    • [x] MaterialSelectWidget

    • [x] MaterialNumberWidget

    • [x] MaterialSliderWidget

    • [x] MaterialRangeWidget

    • [x] MaterialBooleanWidget

    • [x] MaterialMultiSelectWidget

    • [x] MaterialFieldSelect

    • [x] MaterialButton

    • [x] MaterialButtonGroup

    • [x] MaterialConjs

    • [x] MaterialValueSources

    • [x] MaterialConfirm

    • [x] MaterialProvider


    • [x] Number Between: "Warning: value prop on input should not be null. Consider using an empty string to clear the component or undefined for uncontrolled components."
    • [x] Fix vertical position of "from"/"to" labels in Number Between
    • [x] Warning of nullish 2nd value source for Number Between: "Material-UI: You have provided an out-of-range value null for the select component. The available values are value, field, func."
    • [x] Try with showLabels: true
    • [x] ? MaterialFieldSelect - use renderValue as in MaterialSelect, instead of first item "Select field.." in field list
    • [x] TS def
    • [x] Update docs, readme (don't forget to mention al needed MUI packages), bump version
    opened by ukrbublik 22
  • Messing up the styles in an existing project

    Messing up the styles in an existing project

    I have a project and I wanted to integrate this query builder into it, but it messes up all my styles. Can anyone help me to find a way to "isolate" query builder own styles from the rest of the styles from the application?

    opened by MihaiPerju 17
  • Preserve rule/group order

    Preserve rule/group order

    Probably there is no way to enforce order of the query items. Is there?

    When I save an object containing query on server and then open it for editing, the order is not the same

    Looks like it's reordered by field name. Same with rule+group, think it sorts by groups first rule's field. Same ordering applies to sql query string. Would be great to have an opportunity to enforce order, is there a plan to do it? Or maybe it already exists? Maybe I can help?

    opened by danyrojj 12
  • Control do not restore fields correctly on load

    Control do not restore fields correctly on load

    Describe the bug I created a query from the control that i save in database as json format via JSON.stringify. When i open again my form in edit mode, the fields and associated operators has been restored to the control but not the value. I only use classic value (string or number), no any customizations

    To Reproduce

    • Save query as json to state using JSON.Stringify
    • reload query from json using QbUtils.checkTree(QbUtils.loadTree(JSON.parse(job.query)), config));

    Expected behavior The query parsed should be correctly restored in query control and associated value should be filled in value field.

    Additional context In ReactJS Component, Usage of state for the query and loaded via promise from database

    • configuration fields is generated before loading query component. Fields are requested to API
    • Using Material UI configuration

    sample data: JSON Query used: {"id":"b9a8988a-0123-4456-b89a-b177019fefc4","type":"group","children1":{"babb8a9b-cdef-4012-b456-717701a02d86":{"type":"rule","properties":{"field":"INTERVENANTS","operator":"equal","value":["aaaaaaaaé"],"valueSrc":["value"],"valueType":["text"]}}}}

    extract from config for fields: conjunctions: {AND: {…}} fields: INTERVENANTS: QueryField disabled: false fieldSettings: {} label: "Intervenants" mainWidget: "text" type: "text" valueSources: ["value"] widgets: {text: {…}, field: {…}} proto: Object

    Thanks for your help, Valentin

    opened by ioxFR 12
  • mongodbFormat creates incorrect mongo query for datetime fields

    mongodbFormat creates incorrect mongo query for datetime fields

    mongodbFormat creates query like this: {"alarmStartTS":{"$gt": "2020-03-18 10:40+01:00"}}

    It would be like this: {"alarmStartTS":{"$gt": new ISODate("2020-03-18 10:40+01:00")}}

    solution 
    opened by kovacs-miki 11
  • TypeError: Cannot read property 'interpose' of undefined

    TypeError: Cannot read property 'interpose' of undefined

    Steps to reproduce the bug 1.Select any field from the Select 2.Select the operator 3. Click on the value input field or if Select List field and select operator then click the dropdown selection and without selecting any value click the operator again

    After the third step app cashes.

    Screen Shot 2020-02-11 at 7 15 46 PM

    opened by sanojhettige 11
  • Input selection not refreshing with async loading

    Input selection not refreshing with async loading

    Describe the bug I use your component with a async autocompletion. When a user write something in the input I make a API call to retrieve data and provide it to the select input. After two refreshes the input selection doesn't refresh

    need example waiting response 
    opened by bastien-ricoeur 10
  • Unable to import AntD widgets in new version [Typescript]

    Unable to import AntD widgets in new version [Typescript]

    Describe the bug I upgraded to 2.0.1 because of #187, and looked at TS example. When importing AntdConfig / Widgets i get a module not found error

    Module not found: Can't resolve 'react-awesome-query-builder/components/widgets/antd' in '....\Web\wwwroot\src\queryBuilder\config'
    

    If i change the imports to prefix /modules/ (before /components/) i get an unexpected token error

    SyntaxError: ...\Web\wwwroot\node_modules\react-awesome-query-builder\modules\components\widgets\antd\index.js: Unexpected token (30:48)
    
      28 | 
      29 | import { ConfigProvider } from 'antd';
    > 30 | export const Provider = ({config, children}) => <ConfigProvider locale={config.settings.locale.antd}>{children}</ConfigProvider>;
         |                                                 ^
    

    To Reproduce

    • Update to ^2.0.1
    • Add
    import AntdConfig from 'react-awesome-query-builder/config/antd';
    import * as AntdWidgets from 'react-awesome-query-builder/components/widgets/antd';
    
    • Run yarn start

    Expected behavior Being able to resolve the modules. Screenshots

    image

    Additional context Add any other context about the problem here.

    opened by andersjoh 10
  • New type in query builder?

    New type in query builder?

    Is there any way to add new type other than existing? Like for between query builder I would like add slider control (other that two input controls), for that I tried to add new Type but its not working for my. Or is there any other way to add Slider widget in existing code?

    opened by ravipatil1982 10
  • Unable to load JsonLogic for custom operator

    Unable to load JsonLogic for custom operator

    Hello,

    I am trying to add a new operator for JsonLogic. Here my code :

    const multiselect_contains = {
        label: "Contains",
        labelForFormat: "CONTAINS",
        formatOp: (field, op, values, valueSrc, valueType, opDef, operatorOptions, isForDisplay) => {
          if (valueSrc == "value")
            return `${field} CONTAINS (${values.join(", ")})`;
          else
            return `${field} CONTAINS ${values}`;
        },
        reversedOp: "multiselect_not_contains",
        jsonLogic2: "some-in",
        jsonLogic: (field, op, vals) => ({
          "some": [ field, {"in": [{"var": ""}, vals]} ]
        })
      };
      const multiselect_not_contains = {
        isNotOp: true,
        label: "Not contains",
        labelForFormat: "NOT CONTAINS",
        formatOp: (field, op, values, valueSrc, valueType, opDef, operatorOptions, isForDisplay) => {
          if (valueSrc == "value")
            return `${field} NOT CONTAINS (${values.join(", ")})`;
          else
            return `${field} NOT CONTAINS ${values}`;
        },
        reversedOp: "multiselect_contains"
      };
    
    
      const types = {
        ...InitialConfig.types,
        multiselect: merge(InitialConfig.types.multiselect, {
          operators: [
            "multiselect_contains",
            "multiselect_not_contains",
            "multiselect_equals",
            "multiselect_not_equals",
            "is_null",
            "is_not_null"
          ],
          widgets:
          {
            multiselect:{
              operators:[
                "multiselect_contains",
                "multiselect_not_contains",
                "multiselect_equals",
                "multiselect_not_equals",
                "is_null",
                "is_not_null"
              ]
            }
          }
        })
      };
    
      const operators = {
        ...InitialConfig.operators,
        multiselect_contains,
        multiselect_not_contains
      };
    
      const config = {
        ...InitialConfig,
        fields,
        operators,
        types
      };
    

    In the edition time, it works nicely. I can choose the operators and the values. But in the load time, it doesn't work. The field is correctly selected but not the operator and the values.

    Thanks for your help.

    opened by gstrit 9
  • Dragging a rule freezes the builder when used within a Office UI fabric Panel

    Dragging a rule freezes the builder when used within a Office UI fabric Panel

    Describe the bug When I am using the react awesome query builder within a Office UI Fabric Panel as below, and then click on the draggable icon next to the rules I get an error "out of tree bounds!" and then window gets freezed, the hover features to add rule and group is gone, and nothing can be done

    To Reproduce Steps to reproduce the behavior.

    RulesGrid.tsx

    import { Modal, Panel, PanelType } from "office-ui-fabric-react";

    <Panel isBlocking={false} isOpen={this.state.isOpenRulePanel} type={ PanelType.custom } customWidth={"65%"} closeButtonAriaLabel="Close"

    style={{ width: '100%', height: '100%' , position: 'relative', // top: '5', // left:'5', // right:'0', // bottom:'0', cursor: 'pointer', // zIndex:2, backgroundColor:'#fff', border:3 }}

    MyDemoQueryBuilder code: import * as React from "react"; import { Query, Builder, Utils, //types: ImmutableTree, Config, BuilderProps, JsonTree, JsonLogicTree } from "react-awesome-query-builder"; import {throttle} from 'lodash'; // import loadedConfig from "./config_simple"; // <- you can try './config' for more complex examples import loadedConfig from "./config_uline"; // <- you can try './config' for more complex examples //Pratibha for uline // import loadedInitValue from "./init_value"; import loadedInitValue from "./init_value_uline"; import loadedInitLogic from "./init_logic"; const stringify = JSON.stringify;

    const {queryBuilderFormat, jsonLogicFormat, queryString, mongodbFormat, sqlFormat, getTree, checkTree, loadTree, uuid, loadFromJsonLogic} = Utils;

    const preStyle = { backgroundColor: "darkgrey", margin: "10px", padding: "10px" }; const preErrorStyle = { backgroundColor: "lightpink", margin: "10px", padding: "10px" };

    const emptyInitValue: JsonTree = {"id": uuid(), "type": "group"}; // get init value in JsonTree format: const myinitValue: JsonTree = loadedInitValue && Object.keys(loadedInitValue).length > 0 ? loadedInitValue as JsonTree : emptyInitValue;//Pratibha for uline // const myinitValue: JsonTree = emptyInitValue; //Pratibha for uline const myinitTree: ImmutableTree = checkTree(loadTree(myinitValue), loadedConfig);

    interface MyDemoQueryBuilderState { tree: ImmutableTree; config: Config; }

    export default class MyDemoQueryBuilder extends React.Component<{}, MyDemoQueryBuilderState> { /** * */ private immutableTree: ImmutableTree; private config: Config;

    constructor(props) { super(props); this.state = { tree: myinitTree, config: loadedConfig }; }

    resetValue = () => { this.setState({ tree: myinitTree, }); };

    clearValue = () => { this.setState({ tree: loadTree(emptyInitValue), }); };

    onChange = (immutableTree: ImmutableTree, config: Config) => { this.immutableTree = immutableTree; this.config = config; this.updateResult();

    // `jsonTree` or `logic` can be saved to backend
    // (and then loaded with `loadTree` or `loadFromJsonLogic` as seen above)
    const jsonTree = getTree(immutableTree);
    const {logic, data, errors} = jsonLogicFormat(immutableTree, config);
    

    }

    updateResult = throttle(() => { this.setState({tree: this.immutableTree, config: this.config}); }, 100)

    renderResult = ({tree: immutableTree, config} : {tree: ImmutableTree, config: Config}) => { // debugger; const {logic, data, errors} = jsonLogicFormat(immutableTree, config); return (


      <hr/>
      <div>
      humanStringFormat: 
        <pre style={preStyle}>
          {stringify(queryString(immutableTree, config, true), undefined, 2)}
        </pre>
      </div>
      <hr/>
      <div>
      sqlFormat: 
        <pre style={preStyle}>
          {stringify(sqlFormat(immutableTree, config), undefined, 2)}
        </pre>
      </div>
      <hr/>
     
    </div>
    

    ); }

    renderBuilder = (props: BuilderProps) => ( <div className="query-builder-container" style={{padding: "10px"}}>

    <Builder {...props} />
    )

    public render(){ return( <div style={{ width: '100%', height: '100%' }}> <div id="myquerybuilder" style={{ height: '100%', width: '100%', overflow:'auto' }}

        >
              <Query 
      {...loadedConfig} 
      value={this.state.tree}
      onChange={this.onChange}
      renderBuilder={this.renderBuilder}
    />
    
            <button onClick={this.resetValue}>Reset</button>
        <button onClick={this.clearValue}>Clear</button>
        <div>
      {this.renderResult(this.state)}
    </div>
        </div>
        </div>
    );
    

    } }

    bug 
    opened by pratukrish1985 9
  • Ant Design: White Spaces on selected dropdown value - Rule Field

    Ant Design: White Spaces on selected dropdown value - Rule Field

    Describe the bug White spaces are visible on the rule - field dropdown when we have nested fields or subfields

    To Reproduce Sample config for Fields:: const fields: Fields = { user: { label: "User", tooltip: "Group of fields", type: "!struct", subfields: { firstName: { label2: "Username", //only for menu's toggler type: "text", excludeOperators: ["proximity"], mainWidgetProps: { valueLabel: "Name", valuePlaceholder: "Enter name" }, fieldSettings: { validateValue: (val: string, fieldSettings) => { return val.length < 10; } } }, login: { type: "text", excludeOperators: ["proximity"], fieldSettings: { validateValue: (val: string, fieldSettings) => { return ( val.length < 10 && (val === "" || val.match(/^[A-Za-z0-9_-]+$/) !== null) ); } }, mainWidgetProps: { valueLabel: "Login", valuePlaceholder: "Enter login" } }, child: { type: "!struct", subfields: { address: { type: "text" }, street: { type: "text" } } } } }, }

    Library version used :: "react-awesome-query-builder": "^5.3.1", "antd": "^4.24.3", "@ant-design/icons": "^4.8.0", "react": "17.0.2",

    Expected behavior The selected value of the dropdown must be trimmed and no extra white spaces must be dispalyed

    Screenshots image

    image

    Additional context Add any other context about the problem here.

    opened by SMNaik123 0
  • Bump @types/react-dom from 17.0.18 to 18.0.10

    Bump @types/react-dom from 17.0.18 to 18.0.10

    Bumps @types/react-dom from 17.0.18 to 18.0.10.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 1
  • Bump puppeteer from 13.7.0 to 19.4.1

    Bump puppeteer from 13.7.0 to 19.4.1

    Bumps puppeteer from 13.7.0 to 19.4.1.

    Release notes

    Sourced from puppeteer's releases.

    puppeteer-core: v19.4.1

    19.4.1 (2022-12-16)

    Bug Fixes

    • improve a11y snapshot handling if the tree is not correct (#9405) (02fe501), closes #9404
    • remove oopif expectations and fix oopif flakiness (#9375) (810e0cd)

    puppeteer: v19.4.1

    19.4.1 (2022-12-16)

    Miscellaneous Chores

    • puppeteer: Synchronize puppeteer versions

    Dependencies

    • The following workspace dependencies were updated
      • dependencies
        • puppeteer-core bumped from 19.4.0 to 19.4.1

    puppeteer-core: v19.4.0

    19.4.0 (2022-12-07)

    Features

    • ability to send headers via ws connection to browser in node.js environment (#9314) (937fffa), closes #7218
    • chromium: roll to Chromium 109.0.5412.0 (r1069273) (#9364) (1875da6), closes #9233
    • puppeteer-core: keydown supports commands (#9357) (b7ebc5d)

    Bug Fixes

    puppeteer: v19.4.0

    19.4.0 (2022-12-07)

    Features

    Dependencies

    ... (truncated)

    Commits
    • 848c849 chore: release main (#9395)
    • fe986c6 chore: trigger reindexing on doc deployment (#9425)
    • f0951aa docs: use a number of documented versions for indexing (#9424)
    • 68c53df chore(deps): Bump loader-utils from 2.0.2 to 2.0.4 in /website (#9423)
    • 69b03df chore(deps): Bump @​angular-devkit/schematics from 15.0.3 to 15.0.4 (#9420)
    • fa05a1c chore(deps): Bump @​angular-devkit/core from 15.0.3 to 15.0.4 (#9414)
    • 0f0e717 chore(deps): Bump @​angular-devkit/architect from 0.1402.10 to 0.1500.4 (#9415)
    • cd073ab chore(deps): Bump ws from 8.10.0 to 8.11.0 (#9412)
    • cd8eec3 chore(deps): Bump @​angular-devkit/schematics from 14.2.8 to 15.0.3 (#9413)
    • 28cedac chore: Revert Dependabot config (#9411)
    • Additional commits viewable in compare view
    Maintainer changes

    This version was pushed to npm by google-wombot, a new releaser for puppeteer since your current version.


    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 1
  • Bump sinon from 13.0.2 to 15.0.1

    Bump sinon from 13.0.2 to 15.0.1

    Bumps sinon from 13.0.2 to 15.0.1.

    Changelog

    Sourced from sinon's changelog.

    15.0.1

    • aa493da4 Upgrade to fake-timers v10.0.2 (Carl-Erik Kopseng)

      Contains several fixes

    • b3ee0aa5 Use Node version 18 in Runkit examples (Carl-Erik Kopseng)

    Released by Carl-Erik Kopseng on 2022-12-15.

    15.0.0

    • b75fbfa9 Fix 2448: remove custom formatter (Morgan Roderick)

      Remove option to pass a custom formatter.

      The sub libraries of Sinon has long moved on to use util.inspect from Node. By using that in Sinon itself, we align all the libraries.

    Released by Morgan Roderick on 2022-11-28.

    14.0.2

    • 4d70f6e0 Upgrade nise to latest (Morgan Roderick)
    • 96a0d756 Update @​sinonjs/samsam to latest (Morgan Roderick)
    • babb4736 Prefer @​sinonjs/commons@​2 (Morgan Roderick)

      That makes ES2017 support explicit

    Released by Morgan Roderick on 2022-11-07.

    14.0.1

    • 6c4753ef Fixed CSS selectors in _base.scss and changed blockquote default size to 16px. (Jose Lupianez)
    • A bunch of dependency updates

    Released by Carl-Erik Kopseng on 2022-10-03.

    14.0.0

    Released by Morgan Roderick on 2022-05-07.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 1
  • Bump mocha from 9.2.2 to 10.2.0

    Bump mocha from 9.2.2 to 10.2.0

    Bumps mocha from 9.2.2 to 10.2.0.

    Release notes

    Sourced from mocha's releases.

    v10.2.0

    10.2.0 / 2022-12-11

    :tada: Enhancements

    • #4945: API: add possibility to decorate ESM name before import (@​j0tunn)

    :bug: Fixes

    :book: Documentation

    v10.1.0

    10.1.0 / 2022-10-16

    :tada: Enhancements

    :nut_and_bolt: Other

    v10.0.0

    10.0.0 / 2022-05-01

    :boom: Breaking Changes

    :nut_and_bolt: Other

    ... (truncated)

    Changelog

    Sourced from mocha's changelog.

    10.2.0 / 2022-12-11

    :tada: Enhancements

    • #4945: API: add possibility to decorate ESM name before import (@​j0tunn)

    :bug: Fixes

    :book: Documentation

    10.1.0 / 2022-10-16

    :tada: Enhancements

    :nut_and_bolt: Other

    10.0.0 / 2022-05-01

    :boom: Breaking Changes

    :nut_and_bolt: Other

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 1
  • MUI styling broken & type errors on drag

    MUI styling broken & type errors on drag

    Describe the bug Using the MUI theme seems to break the styles. The buttons aren't the correct colors and dragging and dropping components causes re-render issues. Works fine when using AntD. How do you solve this? Anyway to customize these styles?

    To Reproduce Use any example project and switch to the MUI config

    Expected behavior No broken styling and no re-rendering and type issues on drag and interaction

    Screenshots image

    image

    Additional context How can I edit the mui config to try fix these issues?

    opened by RGDEV2022 7
Releases(6.0.0)
  • 6.0.0(Dec 28, 2022)

  • 5.4.0(Nov 29, 2022)

  • 5.3.2(Nov 29, 2022)

    • Fix drag-n-drop issue in React 18 using ReactDOM.createRoot() (PR #815) (issue #792)
    • Type fix: add id for JsonRule (PR #799) (issue #791)
    • Type fix: Add typings for groupOperators (PR #798)
    • Fix: not operation at the root not detected when importing from SpEL (PR #767) (issue #766)
    Source code(tar.gz)
    Source code(zip)
  • 5.3.1(Sep 1, 2022)

  • 5.2.1(Aug 25, 2022)

    • 5.2.1
      • Fix type applied to filter funcs as another func's arg value (PR #743) (issue #586)
      • Allow self nesting of functions with allowSelfNesting (PR #698)
      • ES: Fix greater op (PR #749) (issue #744)
      • ES: Fix NOT (PR #750) (issue #723)
    Source code(tar.gz)
    Source code(zip)
  • 5.2.0(Aug 19, 2022)

    • 5.2.0
      • ! Breaking change: children1 is now array in result of getTree() to preserve items order (PR #672) (issues #589, #670) Utils.getTree(tree, true, false) will behave same as before this change.
      • Support React 18. Migrate to x-date-pickers. (PR #734) (issues #710, #732)
      • Add path property at index.d.ts (PR #671) (issue #669)
      • Fixed getTotalRulesCountInTree() == 1 (should be 0) for clear tree (PR #673) (issue #583)
      • Handle validation of bad multiselect value correctly (PR #733) (issue #674) Remove bad values from list, don't unset whole value. Added config removeInvalidMultiSelectValuesOnLoad (true by default, false for AntDesign)
      • Fix loadFromSpel for select_equals op (PR #740) (issue #704)
      • Fix loadFromSpel for is_empty and is_not_empty ops (PR #713) (issues #714, #699)
    Source code(tar.gz)
    Source code(zip)
  • 5.1.2(Mar 15, 2022)

    • Added config removeIncompleteRulesOnLoad (default false) (PR #661) (issue #642)
    • Fix error when using same field for comparison as argument of function (PR #662) (issue #612)
    • Set missing id in fixPathsInTree() (PR #665) (issue #664)
    • Use func arg type in field selection (PR #666) (issue #615)
    Source code(tar.gz)
    Source code(zip)
  • 5.1.1(Mar 9, 2022)

  • 5.1.0(Mar 8, 2022)

    • Use spel2js 0.2.8 instead of my branch (PR #638) (issues #634, #643, #654)
    • Add async load to antd (PR #640) (issues #616, #425)
    • Fix autocomplete (PRs #655, #641)
    • Fix setting defaultValue on set value src (PR #639) (issue #635)
    • Fix validation of multiselect func arg (PR #656) (issue #587)
    Source code(tar.gz)
    Source code(zip)
  • 4.10.0(Jan 18, 2022)

  • 4.9.0(Jan 18, 2022)

    • Added is_null and is_not_null operators (issue #494) (PR #522)
    • ! Breaking change for operators is_empty and is_not_empty. Left for text type only, for other types will be auto converted to is_null/is_not_null. Changed meaning of is_empty - now it's just strict comparing with empty string. Before change meaning was similar to is_null (and export to SQL was wrong because of non-existent operator IS EMPTY). (issue #494) (PR #573)
    • Fixed order of operators for field when merging operators from 2+ widgets (PR #573)
    • Added last param fieldDef for functions to format operators (PR #573)
    • Added jsonLogic to widget TS def (PR #572)
    • Export TreeUtils (PR #597)
    Source code(tar.gz)
    Source code(zip)
  • 4.8.0(Nov 17, 2021)

    4.8.0

    • Added read-only mode switch for rules and groups. See showLock and canDeleteLocked config options, custom JsonLogic op locked, setLock action, lockLabel and lockedLabel. Added Switch components, see renderSwitch. (issue #377) (PR #490)
    • Fixed issue with frozen config (Object.freeze) by using clone (issue #345) (PR #490)
    • Fix: Filter value sources for func args correctly. LHS field can be used as arg in RHS function. (PR #490)
    • MUI - Support showSearch (autocomplete) for field select widget (issue #479 #521) (PR #563)
    • AntDesign - Fix FieldSelect with 3+ level !struct nesting (issue #224) (PR #564)
    Source code(tar.gz)
    Source code(zip)
  • 4.7.2(Nov 11, 2021)

  • 4.7.1(Nov 9, 2021)

    • 4.7.1
      • Fixed potential inconsistent order of fields (issue #335) (PR #553)
      • Bump webpack-dev-server from 3.11.2 to 4.4.0 (PR #540)
      • Change FieldItems type definition from map to array (issues #550, #363) (PR #551)
      • Spreading customProps to vanilla widgets (PR #546)
      • Fix for allowCustomValues (PR #545)
      • Use minimum material-ui version 4.12.3 and use new createTheme instead of deprecated createMuiTheme (issue #463) (PR #531)
    Source code(tar.gz)
    Source code(zip)
  • 4.7.0(Oct 23, 2021)

    • Add explicit not: false in new group (issue #512)
    • Fix: don't automatically add one rule to query when it become empty when canLeaveEmptyGroup=true (issue #504)
    • Added config forceShowConj (issue #474)
    • Fixed import of complex hierarchy fields (combination of !group and !struct) from JsonLogic (issues #517, #333)
    • Fixed non-ordered map bug (issue #501)
    Source code(tar.gz)
    Source code(zip)
  • 4.6.0(Oct 19, 2021)

    • 4.6.0
      • Added groupId (id of the parent Item - Group, RuleGroup, RuleGroupExt etc) to field's, operartor's and widget's props (PR #510)
      • Fixed export to ES when group is empty (broken 'Clear' button in demo app) (PR #511)
      • Added 3rd param actionMeta to onChange() to get info about action (PR #445) (issue #351)
      • Added demo of using actions programmatically (see run actions in demo app) (PR #445)
      • Added config shouldCreateEmptyGroup (default false) (PR #445)
      • Now config canLeaveEmptyGroup is true by default (PR #445) (issue #504)
      • Breaking changes for format with isForDisplay=true - don't wrap strings with ", replace == with = (PR #518)
      • Fixed type definition for export utils - can return undefined (PR #516)
      • Fixed use of hideOperator (PR #523) (issue #292)
    Source code(tar.gz)
    Source code(zip)
  • 4.5.0(Sep 15, 2021)

    • 4.5.0
      • Added basic support of export to ElasticSearch (PR #469)
      • Export all helper funcs from configUtils (PR #493)
      • Fixed bug with zero value in MaterialSelect (PR #392)
    Source code(tar.gz)
    Source code(zip)
  • 4.4.3(Aug 19, 2021)

    • babel: use "@babel/plugin-transform-runtime" to avoid globally defined regenerator runtime (PR #480)
    • Fix export of not in some!group into JsonLogic (issue #476) (PR #484)
    • Fixed issue with default import/export in Vite build (PR #481)
    Source code(tar.gz)
    Source code(zip)
  • 4.3.0(Jun 28, 2021)

    • Functions used in examples now moved to BasicFuncs (exported with lib)
    • Added funcs RELATIVE_DATETIME, NOW, UPPER
    • Added option showPrefix for func args (false by default)
    • Added missing mongoFormatValue for all types in basic config (now dates are exported as Date objects)
    Source code(tar.gz)
    Source code(zip)
  • 4.1.1(Jun 23, 2021)

    • 4.1.1
      • Fix warning about showSearch in MUI theme
      • Fix incorrect override of vanilla button label (issue #347)
      • Fix display default conj (issue #426)
      • Don't wrap in MUI ThemeProvider if no theme or locale provided (issue #325)
      • Fix canLeaveEmptyGroup logic (issue #378)
    Source code(tar.gz)
    Source code(zip)
  • 4.1.0(Jun 18, 2021)

    • 4.1.0
      • Fixed lint errors in code
      • Reorganized files in tests
      • Updated packages
      • Now minimum supported NodeJs is 12.13
      • Added TSC linting
      • Now ESLint checks types in TS files
      • Added new scripts: install-all, clean, reinstall, build-all, check-hot, tsc, eslint, smoke, resmoke. Renamed sandbox_ts to sandbox-ts, sandbox_js to sandbox-js.
      • Fixed problems with VSCode's TSLint plugin
      • Moved from deprecated prepublish to prepare in package.json
    Source code(tar.gz)
    Source code(zip)
  • 4.0.4(Jun 15, 2021)

Owner
Denis Oblogin
Spice must flow. State must flux.
Denis Oblogin
React Query Typed Api - An opinioneted wrapper around react-query to implement fully typed api requests

React Query Typed Api - An opinioneted wrapper around react-query to implement fully typed api requests

Apperside 5 Jan 2, 2023
A React Library to update API url with query parameters by looking at query parameters in the browser.

A React Library to update API url with query parameters by looking at query parameters in the browser.

Casey Bui 17 Dec 29, 2022
A simple webpack builder for react

ll-script a simple webpack builder for react feat support mock support customize webpack config install yarn add ll-script -D use Update the scripts s

TrickyPi 1 Dec 14, 2021
Pimp my README is an open source profile builder that you can use to add some cool components to your README profile - Made with <3 by webapp.io :)

Pimp my README This repository is the open-source project for Pimp my README. How this came to be So basically, GitHub added a feature where you can a

Joshua D'Souza 105 Dec 27, 2022
Single Page Resume Builder

Free and open source, fully customizable professional single page resume builder

Deepanshu Tiwari 9 Dec 18, 2022
A React hook to wrap react-query results with fp-ts-remote-data results.

@jvlk/remote-data-query Work with responses from @tanstack/react-query using @jvlk/fp-ts-remote-data and fp-ts. Installing npm npm i @jvlk/remote-data

Josh Derocher-Vlk 2 Nov 10, 2022
Tutorial for using react query and supabase

This is a Next.js project bootstrapped with create-next-app. Getting Started First, run the development server: npm run

Ankit Jena 28 Nov 11, 2022
React Query for Firestore, that you can actually use in production, on every screen.

React Query for Firestore, that you can actually use in production, on every screen.

Amine Bl 96 Nov 27, 2022
React Query and Axios example with CRUD operation - GET/POST/PUT/DELETE request with Rest API

React Query Axios example with Rest API React Client with React Query and Axios to make CRUD requests to Rest API in that: React Query Axios GET reque

null 16 Nov 7, 2022
Just a small collection of hooks that make it easy to integrate React Query into a REST API

react-query-restful is just a small collection of hooks that make it easy to integrate React Query into a REST API.

Quasar Systems 4 Sep 16, 2022
Angular bindings for react-query

Angular bindings for react-query

null 9 Oct 5, 2022
:fire: An extremely fast, React-like JavaScript library for building modern user interfaces

Inferno is an insanely fast, React-like library for building high-performance user interfaces on both the client and server. Description The main obje

Inferno 15.6k Jan 1, 2023
React project with Google Firebase API, create partys with admin view and user view. Users can ask topics to admin, and support other topics.

?? Tecnologias Esse projeto foi desenvolvido com as seguintes tecnologias: React Firebase TypeScript ?? Como executar Clone o projeto e acesse a pasta

Felipe Souza 3 Aug 27, 2021
TSDX React w/ Storybook User Guide

TSDX React w/ Storybook User Guide Congrats! You just saved yourself hours of work by bootstrapping this project with TSDX. Let’s get you oriented wit

Achraf 0 Nov 30, 2021
Ysauth - This library is helper to aws amplify (with Cognito user pool) authentication with react

Ysauth - This library is helper to aws amplify (with Cognito user pool) authentication with react

Yossi Shaish 4 Jun 6, 2022
Generate fun kaleidoscope for user avatars.

React Avatar Generator This was inspired by an old website called LayerVault. You can see an example of how that used to look like here. Getting Start

Joseph Smith 54 Dec 5, 2022
Consuming GitHub API, showing user's profile and repositories, with ReactJS

GitHubProfiles Project made with ReactJS to practice API consuming using GitHub API, in order to show in a simple way user's profile and repositories.

Hugo Ferreira 7 Jun 16, 2022
User interface for Trunion web app

Tronion UI Run dev server: npm run dev Home page is in pages/index.js, the user pages are in pages/account directory, theme file utils/theme.js, modal

Milaham 2 Dec 23, 2021
This is a Web User Interface Sample Project. Using ReactJs.

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

Mindula Dilthushan Manamperi 13 Jul 14, 2022