Socket
Socket
Sign inDemoInstall

joy-query-box

Package Overview
Dependencies
3
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    joy-query-box

A react-text-box component which will transform simple expression as free-text to object ![Example](/assets/simple-query-example.png)


Version published
Weekly downloads
49
decreased by-30%
Maintainers
1
Install size
59.8 MB
Created
Weekly downloads
 

Readme

Source

joy-query-box

A react-text-box component which will transform simple expression as free-text to object Example

Operators

OperatorsMeaningProperty Name
=/equalEqual$eq
>Greater than$gt
>=Greater than or equal$gte
<Less than$lt
<=Less than or equal$lte
likeLike$like
containsContains$contains
startwithStartWith$startWith
&And$and
|Or$or

Features

  • Syntax highlight
  • Auto-complete on typing
  • Result as object.
  • Speech to text (ex. quantity greater than or equal 18)

Next update

  • Support more operators is, in, between (1.1.x)
  • Filter completions operator based on primary types: number, date, string (1.1.x)
  • Filter completions based on a variable name & it's options (1.2.x)
  • Support complex expression (1.3.x)

NPM Install & use

npm i joy-query-box
import QueryBox from 'joy-query-box';
...
const suggessionwords = [
    {
        word: 'company',
        desc: 'Field: company name'
    },
    {
        word: 'email',
        desc: 'Field: Company Email'
    },
    {
        word: 'vat',
        desc: 'Field: Company VAT number'
    }
];

<QueryBox
    words={suggessionwords}
    onSearch={this.handleOnSeach}
    queryText={"defaultText = 'a text value'"}
/>

Run demo

$ git clone https://github.com/TamVoMinh/joy-query-box.git
$ cd joy-query-box 
$ npm install
$ yarn start

Build component

yarn build:component

Note

joy-query-box use bootstrap as default style.

Keywords

FAQs

Last updated on 28 Sep 2019

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc