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

joy-query-box

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

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)

  • 1.1.4
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
50
increased by38.89%
Maintainers
1
Weekly downloads
 
Created
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.

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

Package last updated on 07 Jun 2019

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc