{"_id":"@adactiveasia/adasia-search","_rev":"1-15d059329c4ed4c0a4a03f9ae905b8d2","name":"@adactiveasia/adasia-search","dist-tags":{"latest":"0.0.1"},"versions":{"0.0.1":{"name":"@adactiveasia/adasia-search","version":"0.0.1","description":"Adsum Search Component","main":"index.js","author":{"name":"Stanley Ong","email":"stanley.ong@adactive.com"},"license":"UNLISENCED","repository":{"type":"git","url":"git://github.com/adactiveasia/adsum-react-components.git"},"bugs":{"url":"https://github.com/adactiveasia/adsum-react-components.git/issues"},"scripts":{},"publishConfig":{"access":"public"},"dependencies":{"chalk":"^1.1.3","commander":"^2.9.0","fuse.js":"^3.2.0"},"devDependencies":{"prop-types":"^15.6.1","react":"^16.3.1"},"peerDependencies":{"prop-types":"^15.6.1","react":"^16.3.1"},"keywords":["adsum","react","redux"],"bin":{"arc-search":"./cli.js"},"homepage":"https://github.com/adactiveasia/adsum-react-components#readme","_id":"@adactiveasia/adasia-search@0.0.1","_npmVersion":"6.4.1","_nodeVersion":"8.16.0","_npmUser":{"name":"devadactiveasia","email":"dev@adactive.asia"},"dist":{"integrity":"sha512-JZ1Bmvnd41F9bU+ksXy/nGD6XWoS/NkMn2RaM5NZPSQYYwV0y9tsXYm1bPeA1WfsrAwDIHAyZ9zkKV+9FjUqEw==","shasum":"b6b6c799e9de59b2f358edf3fc60e41b7b9d9daf","tarball":"https://registry.npmjs.org/@adactiveasia/adasia-search/-/adasia-search-0.0.1.tgz","fileCount":10,"unpackedSize":9365,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdjIW9CRA9TVsSAnZWagAArHYQAJDa086tBTNlIHZN5dC7\nBcNXod1TbCwSyNgvjtXrkTnYRO+wjpgYsHjej8Iwo8a+M5WjMkMogtgrlgLY\n/spMf4GpXzRIiAy1SoLDM14GofiE1PicjdXslEx+zBKN6HhDaunAYZ+4I+o9\n56mQSbc4Ejxk9gwqUE+fZtLIkXTwYR4e6G3myQlTJafYgBedvzwDe9QuI5eG\nqKcoLA9vJ2N5orY7EHzuLoyUzj2n5whyVFid6btE5VT24tLPDoMwYax7Supa\nOtDOSkeaZ5xFdlIqswtqj29QKr2TF9U8eXlBQvzcmMCWRXsHpbGEEfSy09zT\nVY3pAlRGn0cUJJDlPfOQQp4M7Wj3qVkQfmP8KclIRcsV7WMesoLvPYEXJkiJ\nyjjZKtrBAZlg8H0qSYUNNhjUEhgSVHHpZx04tGEYQQnr4s9jJDuj8St4SPeq\n4K2B4eR0Twd6xIc2RgUD8402jsml+rvhtCTzKAeLxF2HZTjvOKTKUYGyDMiz\n+blNHBwKI3aFbTE2p06SogAc8Z1QvOFVq91q854aYFVb6CKtHGfHEE637Nat\nMDCueBxpkChqxS/BLNIaPsPkjfVT/AnK9MMjXqoWKYWv/Vuluvku2YumEyWI\nImpNX4DUAKmXx67jEoJxmueOHpn/e1TTEiYFrwPA34BmofSp5R+JV6ygvRMs\na1CL\r\n=Mu4z\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCQ1Aevm9sqOwstANnURgeM3/ZB75Bni/HZI92ybTo8ygIhAPsGID7TjGAVa9ADT+RvRSn5p++53OrUZmRVDiWba1Sn"}]},"maintainers":[{"name":"devadactiveasia","email":"dev@adactive.asia"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/adasia-search_0.0.1_1569490365164_0.028380646745323146"},"_hasShrinkwrap":false}},"time":{"created":"2019-09-26T09:32:44.899Z","0.0.1":"2019-09-26T09:32:45.268Z","modified":"2022-04-04T11:22:40.352Z"},"maintainers":[{"name":"devadactiveasia","email":"dev@adactive.asia"}],"description":"Adsum Search Component","homepage":"https://github.com/adactiveasia/adsum-react-components#readme","keywords":["adsum","react","redux"],"repository":{"type":"git","url":"git://github.com/adactiveasia/adsum-react-components.git"},"author":{"name":"Stanley Ong","email":"stanley.ong@adactive.com"},"bugs":{"url":"https://github.com/adactiveasia/adsum-react-components.git/issues"},"license":"UNLISENCED","readme":"# Search component\n\n![search 1](https://user-images.githubusercontent.com/8574893/40287867-f3ca6440-5ce2-11e8-8237-22165597d769.png)\n\n![search 2](https://user-images.githubusercontent.com/8574893/40287868-f3f527a2-5ce2-11e8-8dc8-8a322017268e.png)\n\n[Live examples here](https://adactivesas.github.io/adsum-react-components/packages/adsum-search/examples/)\n\n## Getting started\n\n```javascript\n    npm i --save @adactive/arc-search\n```\nOR\n```javascript\n    yarn add @adactive/arc-search\n```\n\n```javascript\n    import AdsumSearch from \"@adactive/arc-Search\"\n     ...\n    constructor(props) {    \n        this.searchResultRef = React.createRef();\n    }\n    \n    <AdsumSearch \n        isOpen={true}\n        lang={\"en\"}\n        data={[]}\n        fuseOptions={fuseOptions}\n        queryValue={''}\n        ref={this.searchResultRef}\n    />\n```\n\n### Functions\n- search(searchInput: string)\n    - expects a string as parameter \n    - returns an array of results\n\n### Props\n \n```javascript\ntype PropTypes = {|\n    +isOpen: boolean,\n    +lang: 'en' | 'fr',\n    +data: Array<Object>,\n    +queryValue: string,\n    +fuseOptions: Object,\n    +searchWrapperCSS?: CSSStyleDeclaration,\n    +inputCSS?: CSSStyleDeclaration,\n    +placeHolder?: string\n|};\n\nstatic defaultProps = {\n    isOpen: false,\n    lang: 'en',\n    queryValue: '',\n    data: [],\n    fuseOptions: {} \n};\n```\n**isOpen** -> To show or hide search bar\n\n**lang** -> Language for displaying placeholder\n\n**data** -> An array of data to be injected into fusejs to perform the search\n\n**queryValue** -> String to be displayed on the search bar and to be searched\n\n**fuseOptions** -> Refer to [fusejs.io](http://fusejs.io/) for more information\n\n**searchWrapperCSS** -> To customise the overall CSS for the entire component\n\n**inputCSS** -> To customise the CSS for the search bar\n\n**placeHolder** -> To customise placeholder message\n\n```javascript\nconst fuseOptions = {\n  id: string,\n  caseSensitive: boolean,\n  shouldSort: boolean,\n  tokenize: boolean,\n  matchAllTokens: boolean,\n  findAllMatches: boolean,\n  includeScore: boolean,\n  includeMatches: boolean,\n  threshold: number,\n  location: number,\n  distance: number,\n  maxPatternLength: number,\n  minMatchCharLength: number,\n  keys: Array<Object>\n};\n```\n\n## Additional Information\n- AdsumSearch component should be used together with [AdsumKeyboard component](https://github.com/adactiveasia/adsum-react-components/tree/master/packages/adsum-keyboard) to perform search.\n\n\n## Copy component inside your project src folder  \n\n### Less only\n    `npx @adactive/arc-search copy --less-only`\n    \n### Full copy\n    `npx @adactive/arc-search copy`\n","readmeFilename":"README.md"}