{"name":"filestack-react","version":"1.3.7","main":"dist/filestack-react.js","description":"react component for filestack","scripts":{"test":"jest --watch --no-cache --coverage","build":"rimraf dist && webpack --colors --debug --display-error-details","prepublish":"npm run build","lint":"eslint"},"repository":{"type":"git","url":"git+https://github.com/filestack/filestack-react.git"},"keywords":["filestack-react","filestack","filepicker","react","uploader","upload","file","image","ssr","server"],"author":{"name":"ZeroCho"},"license":"MIT","bugs":{"url":"https://github.com/filestack/filestack-react/issues"},"homepage":"https://github.com/filestack/filestack-react#readme","devDependencies":{"babel-cli":"^6.24.0","babel-core":"^6.24.0","babel-eslint":"^7.2.1","babel-jest":"^20.0.3","babel-loader":"^6.4.1","babel-plugin-transform-class-properties":"^6.24.1","babel-preset-es2015":"^6.24.0","babel-preset-latest":"^6.24.1","babel-preset-react":"^6.23.0","babel-preset-stage-1":"^6.22.0","babel-preset-stage-2":"^6.24.1","babel-runtime":"^6.23.0","css-loader":"^0.27.3","enzyme":"^2.8.2","enzyme-to-json":"^1.5.1","eslint":"^3.18.0","eslint-config-airbnb":"^14.1.0","eslint-plugin-babel":"^4.1.1","eslint-plugin-import":"^2.2.0","eslint-plugin-jsx-a11y":"^4.0.0","eslint-plugin-react":"^6.10.3","imports-loader":"^0.7.1","jasmine-reporters":"^2.2.1","jest-cli":"^20.0.3","prop-types":"^15.5.10","raw-loader":"^0.5.1","react":"^15.5.4","react-addons-test-utils":"^15.5.1","react-dom":"^15.5.4","react-test-renderer":"^15.5.4","rimraf":"^2.6.1","style-loader":"^0.16.0","webpack":"^2.3.2"},"dependencies":{"filestack-js":"^0.9.1"},"jest":{"roots":["<rootDir>/tests/"],"moduleDirectories":["node_modules"],"testRegex":"\\.(spec|e2e|snapshot)\\.js$","coverageDirectory":"<rootDir>/tests/__coverage__/","setupTestFrameworkScriptFile":"<rootDir>/setup-jasmine-env.js","coverageReporters":["json","html","text"],"browser":true,"moduleNameMapper":{"components":"<rootDir>/src/components","utils":"<rootDir>/src/utils","constants":"<rootDir>/src/constants","containers":"<rootDir>/src/containers","reducers":"<rootDir>/src/reducers","routing":"<rootDir>/src/routing","actions":"<rootDir>/src/actions","sagas":"<rootDir>/src/sagas","widget":"<rootDir>/widget","mock-data":"<rootDir>/tests/__mocks__/mockData.js","^.+\\.(scss|css|svg|png)$":"identity-obj-proxy","src":"<rootDir>/src"}},"gitHead":"88cf6b62cc185b93f581e0a20a341e33d75117fa","_id":"filestack-react@1.3.7","_shasum":"b19c962fadb4b899c565182ac94afe6b6957fa13","_from":".","_npmVersion":"4.1.2","_nodeVersion":"7.7.1","_npmUser":{"name":"samuxyz","email":"zaza.samuele@gmail.com"},"dist":{"shasum":"b19c962fadb4b899c565182ac94afe6b6957fa13","tarball":"http://registry-npm.ywwl.com/filestack-react/download/filestack-react-1.3.7.tgz","integrity":"sha512-jl1BV5Su1hc3WsGpHuVlyB99hgLWz2VbWJC+dB8GOJL8UQQ3Xjw3nN+oxW7t87Evr5XCblYnKgEHPnEJdLNDXw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICnH1MbvF2aoTQsGeOWSHnPm2KBdtF9Get+DIIHREd2wAiA2mSteQJcRmD47iRLByW92xSX6S7SmeyW01a1hBz4nsQ=="}],"size":383356,"noattachment":false,"key":"/filestack-react/-/filestack-react-1.3.7.tgz"},"maintainers":[{"name":"filestack-dev","email":"dev@filestack.com"},{"name":"mariahtree","email":"mariah@filestack.com"},{"name":"samuxyz","email":"zaza.samuele@gmail.com"},{"name":"zerocho","email":"zerohch0@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/filestack-react-1.3.7.tgz_1507522083894_0.2761257824022323"},"directories":{},"readme":"<p align=\"center\"><img src=\"logo.svg\" align=\"center\" width=\"80\"/></p>\n<h1 align=\"center\">\n  filestack-react\n</h1>\n<p align=\"center\">\n  React component which allow you to easily integrate powerful filestack-api into your app.\n</p>\n<p align=\"center\">\n  <a href=\"https://travis-ci.org/filestack/filestack-react\">\n    <img src=\"https://travis-ci.org/filestack/filestack-react.svg?branch=master\" />\n  </a>\n  <a href=\"https://npmjs.com/package/filestack-react\">\n    <img src=\"https://img.shields.io/npm/v/filestack-react.svg\" />\n  </a>\n  <img src=\"https://img.shields.io/bundlephobia/min/filestack-react.svg\" />\n  <br>\n  <img src=\"https://badges.herokuapp.com/browsers?labels=none&googlechrome=latest&firefox=latest&microsoftedge=latest&iexplore=11&safari=latest&iphone=latest\" />\n</p>\n<hr>\n\n**Table of Contents**\n- [Overview](#overview)\n- [Usage](#usage)\n  - [Props](#props)\n  - [Examples](#examples)\n  - [filestack-js Client](#filestack-js-client)\n  - [SSR](#ssr)\n  - [Migration from 3.x.x and 4.x.x](#migration-from-3xx-and-4xx)\n  - [Migration from 1.x.x and 2.x.x](#migration-from-1xx-and-2xx)\n- [Live demo](#live-demo)\n- [Development](#development)\n- [Documentation](#documentation)\n- [Contribution](#contribution)\n- [Future](#future)\n\n## Overview\nfilestack-react is a wrapper on [filestack-js](https://github.com/filestack/filestack-js) sdk which allow you to integrate with Filestack service in just a few lines of code. Almost all you can do with [filestack-js](https://filestack.github.io/filestack-js/index.html) you can do with this component.\n\n## Usage\nInstall it through NPM\n```bash\nnpm install filestack-react\n```\nthen just insert into your app\n```jsx\nimport { PickerOverlay } from 'filestack-react';\n\n<PickerOverlay\n  apikey={YOUR_API_KEY}\n  onSuccess={(res) => console.log(res)}\n  onUploadDone={(res) => console.log(res)}\n/>\n```\n### Props\n| Key                              | Type          | Required | Default                       | Description                                                                                                                                                                                                |\n|----------------------------------|---------------|----------|-------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| apikey                           | String        |  true    |                               | Filestack api key                                                                                                                                                                                          |\n| clientOptions                    | Object        |  false   |                               | https://filestack.github.io/filestack-js/interfaces/clientoptions.html                                                                                                                                                          |\n| pickerOptions                    | Object        |  false   |                               | https://filestack.github.io/filestack-js/interfaces/pickeroptions.html                                                                                                                                                          |\n| @deprecated onSuccess            | Function      |  false   | result => console.log(result) |  A function to be called after successful completed action                                                                                                                                                  |\n| onUploadDone                     | Function      |  false   | result => console.log(result) | Called when all files have been uploaded                                                                                                                                                  |\n| onError                          | Function      |  false   | error => console.error(error) | A function to be called when error occurs                                                                                                                                                                  |\n| onError                          | Function      |  false   | error => console.error(error) | A function to be called when error occurs                                                                                                                                                                  |\n\n### Examples\n**Render basic Overlay Picker**\n```jsx\n<PickerOverlay apikey='YOUR_APIKEY'/>\n```\n**Render basic Inline Picker**\n```jsx\n<PickerInline apikey='YOUR_APIKEY'/>\n```\n**Render basic Drop Pane Picker**\n```jsx\n<PickerDropPane apikey='YOUR_APIKEY'/>\n```\n\n**Show picker directly and embed it inside specific container**\n```jsx\n<PickerInline apikey='YOUR_APIKEY'><div className=\"your-container\"></div></PickerInline>\n```\n\n### filestack-js Client\nIf you need to use Client just try\n```jsx\nimport { client } from 'filestack-react';\n```\n\n### SSR\nIf you need to use filestack-react with SSR project or site generators like Gatsby check some workarounds in this issues\n<br>\n[issue57](https://github.com/filestack/filestack-react/issues/57)\n<br>\n[issue65](https://github.com/filestack/filestack-react/issues/65)\n\n### Migration from 3.x.x and 4.x.x\n\n| 3.x.x          | 4.0.0                            | Comment                                                                       |\n|----------------|----------------------------------|-------------------------------------------------------------------------------|\n| apikey         | apikey                           |                                                                               |\n| actionOptions  | pickerOptions                    | We want to be consistent with other filestack libs                            |\n| clientOptions  | clientOptions                    |                                                                               |\n| onSuccess      | onSuccess                        |                                                                               |\n| onError        | onError                          |                                                                               |\n| N/A            | children                         | Children prop will be used now in case you'll want to use specific container  |\n| action         | N/A                              | Default picker action will be 'pick' always                                   |\n| file           | N/A                              | Removed                                                                       |\n| source         | N/A                              | Removed                                                                       |\n| customRender   | N/A                              | Removed, from now on clients will be responsible for rendering                |\n| componentDisplayMode   | N/A                      | Removed, from now on clients will be responsible for rendering                |\n\n### Migration from 1.x.x and 2.x.x\nOne of the changes introduced in the new version are rethinked props that the component accepts, so that the use of the component is as straightforward as possible.\nBelow you will find information about what happened to each of the options available in 2.x.x :\n\n| 2.x.x          | 3.0.0                            | Comment                                                                       |\n|----------------|----------------------------------|-------------------------------------------------------------------------------|\n| apikey         | apikey                           |                                                                               |\n| mode           | action                           |                                                                               |\n| options        | actionOptions                    | We want to emphasize that this option is associated with 'action'             |\n| preload        | N/A                              | Now, component is at default preloading necessary js assets, styles, images  |\n| file           | file                             |                                                                               |\n| onSuccess      | onSuccess                        |                                                                               |\n| onError        | onError                          |                                                                               |\n| options.handle | source                           | Handle or url used by specific action is now stored in separate prop           |\n| options.url    | source                           | Handle or url used by specific action is now stored in separate prop           |\n| security       | clientOptions.security           | Options used to initialize filestack client are now grouped in ‘clientOptions’ |\n| buttonText     | componentDisplayMode.customText  | Use componentDisplayMode option (see examples)                                |\n| buttonClass    | componentDisplayMode.customClass | Use componentDisplayMode option (see examples)                                |\n| cname          | clientOptions.cname              | Options used to initialize filestack client are now grouped in ‘clientOptions’ |\n| sessionCache   | clientOptions.sessionCache       | Options used to initialize filestack client are now grouped in ‘clientOptions’ |\n| render         | customRender                     |                                                                               |\n| children       | N/A                              | Use customRender instead                                                      |\n\n\n## Live demo\nCheck demo at codepen\nhttps://codepen.io/Filestack/pen/KEpVdR - needs to be updated for 4.0 version\n\n## Development\nAll components are located inside src/picker/\n\nAfter you add some changes just type\n\n```\nnpm run build\n```\n\nBe sure that your change doesn't break existing tests and are compatible with linter\n\n```\nnpm run test\n```\n\n## Documentation\nYou can find info about available options for actions (Client class methods) in\n[https://filestack.github.io/filestack-js/](https://filestack.github.io/filestack-js/)\n\n## Contribution\nAny your contributions or ideas are more than welcome.\nPlease consider that we follow the conventional commits specification to ensure consistent commit messages and changelog formatting.\n\n## Future\n\nCurrent ideas:\n- Better support for SSR, static site generator and isomorphic apps\n","publish_time":1507522084196,"_cnpm_publish_time":1507522084196,"dist-tags":{"beta":"7.0.0-beta.1","latest":"7.0.1"}}