{"_id":"@danteissaias/react-google-drive-picker","_rev":"2-4309d94fddfa638ef135d4414eb4679f","name":"@danteissaias/react-google-drive-picker","dist-tags":{"latest":"1.3.2"},"versions":{"1.2.2":{"name":"@danteissaias/react-google-drive-picker","version":"1.2.2","keywords":["react","google","drive","picker"],"author":{"name":"Jose-cd"},"license":"MIT","_id":"@danteissaias/react-google-drive-picker@1.2.2","maintainers":[{"name":"danteissaias","email":"dante@issaias.com"}],"homepage":"https://github.com/Jose-cd/React-google-drive-picker#readme","bugs":{"url":"https://github.com/Jose-cd/React-google-drive-picker/issues"},"dist":{"shasum":"b651728ec71aa4d2548eebd7568b18221c72a7aa","tarball":"https://registry.npmjs.org/@danteissaias/react-google-drive-picker/-/react-google-drive-picker-1.2.2.tgz","fileCount":4,"integrity":"sha512-lfCUAd4cYYF6CIQD6paDC21fUXz489v4iA8IaPA+a97V0+p4c7du7rQJ0f0aJPmcxpFxW7TE8JEQBd36OnQuew==","signatures":[{"sig":"MEYCIQCMN+kuJBjw46wmbayY9YxtG9hAVidalMV3RaWa1kiw2gIhAI16PfdXMnJ5Ow4zFx2fhz4uYs0tHxUyjXE7Bp2hrJZq","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":12987},"main":"./dist/index.js","types":"./dist","gitHead":"5b32233e3b4f455b092e17719040b3111b8d177a","scripts":{"dev":"nodemon ./dist/index.js","lint":"eslint 'src/**/*.{js,ts,tsx}' --fix","build":"tsc","watch":"tsc -w","format":"prettier --write ./src/*"},"_npmUser":{"name":"danteissaias","email":"dante@issaias.com"},"repository":{"url":"git+https://github.com/Jose-cd/React-google-drive-picker.git","type":"git"},"_npmVersion":"10.9.2","description":"React google drive picker api","directories":{},"_nodeVersion":"22.14.0","_hasShrinkwrap":false,"devDependencies":{"eslint":"^7.26.0","nodemon":"^2.0.7","prettier":"2.3.2","typescript":"^4.2.4","@types/react":"^17.0.5","prettier-eslint":"^12.0.0","eslint-plugin-react":"^7.30.0","eslint-config-airbnb":"^18.2.1","eslint-plugin-import":"^2.23.2","eslint-plugin-jsx-a11y":"^6.4.1","@typescript-eslint/parser":"^4.23.0","eslint-plugin-react-hooks":"^4.2.0","@typescript-eslint/eslint-plugin":"^4.23.0"},"peerDependencies":{"react":">=17.0.0","react-dom":">=17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/react-google-drive-picker_1.2.2_1742334148315_0.2523222564846823","host":"s3://npm-registry-packages-npm-production"}},"1.3.2":{"name":"@danteissaias/react-google-drive-picker","version":"1.3.2","description":"React google drive picker api","types":"./dist","main":"./dist/index.js","scripts":{"build":"tsc","watch":"tsc -w","dev":"nodemon ./dist/index.js","lint":"eslint 'src/**/*.{js,ts,tsx}' --fix","format":"prettier --write ./src/*"},"author":{"name":"Jose-cd"},"repository":{"type":"git","url":"git+https://github.com/Jose-cd/React-google-drive-picker.git"},"bugs":{"url":"https://github.com/Jose-cd/React-google-drive-picker/issues"},"license":"MIT","keywords":["react","google","drive","picker"],"devDependencies":{"@types/react":"^17.0.5","@typescript-eslint/eslint-plugin":"^4.23.0","@typescript-eslint/parser":"^4.23.0","eslint":"^7.26.0","eslint-config-airbnb":"^18.2.1","eslint-plugin-import":"^2.23.2","eslint-plugin-jsx-a11y":"^6.4.1","eslint-plugin-react":"^7.30.0","eslint-plugin-react-hooks":"^4.2.0","nodemon":"^2.0.7","prettier":"2.3.2","prettier-eslint":"^12.0.0","typescript":"^4.2.4"},"peerDependencies":{"react":">=17.0.0","react-dom":">=17.0.0"},"_id":"@danteissaias/react-google-drive-picker@1.3.2","gitHead":"5b32233e3b4f455b092e17719040b3111b8d177a","homepage":"https://github.com/Jose-cd/React-google-drive-picker#readme","_nodeVersion":"22.14.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-P4cwr0bunkf1KgVhIATBbUi1xqqftgQ0lMeABuU+K9rkD/1r8NAIkv0z01+0jSWl6H1/R2fUKJyIWrBD4gEN0Q==","shasum":"3913a2016d7dd571b26561c95765ad8f35d4bff1","tarball":"https://registry.npmjs.org/@danteissaias/react-google-drive-picker/-/react-google-drive-picker-1.3.2.tgz","fileCount":16,"unpackedSize":35876,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDIQJ/6LFLLpWMvJtNVYA79i3ZVkh6Z8GB9z6Q1M2vXzwIgdhILg5xaRAUy/2Bp7LVe3rDQzW6LMiiS7dxE7WnAUbc="}]},"_npmUser":{"name":"danteissaias","email":"dante@issaias.com"},"directories":{},"maintainers":[{"name":"danteissaias","email":"dante@issaias.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/react-google-drive-picker_1.3.2_1742334173340_0.09549945766486156"},"_hasShrinkwrap":false}},"time":{"created":"2025-03-18T21:42:28.223Z","modified":"2025-03-18T21:42:53.715Z","1.2.2":"2025-03-18T21:42:28.495Z","1.3.2":"2025-03-18T21:42:53.538Z"},"bugs":{"url":"https://github.com/Jose-cd/React-google-drive-picker/issues"},"author":{"name":"Jose-cd"},"license":"MIT","homepage":"https://github.com/Jose-cd/React-google-drive-picker#readme","keywords":["react","google","drive","picker"],"repository":{"type":"git","url":"git+https://github.com/Jose-cd/React-google-drive-picker.git"},"description":"React google drive picker api","maintainers":[{"name":"danteissaias","email":"dante@issaias.com"}],"readme":"# React-google-drive-picker\n\nGoogle drive picker\n\n## Description\n\nGoogle drive picker custom hook.\n\n## Getting Started\n\n### Installing\n\nWith npm\n```\nnpm i react-google-drive-picker\n```\nWith yarn\n```\nyarn add react-google-drive-picker\n```\n\n### Usage\n\n```js\nimport  { useEffect } from 'react';\nimport useDrivePicker from 'react-google-drive-picker'\n\n\nfunction App() {\n  const [openPicker, authResponse] = useDrivePicker();  \n  // const customViewsArray = [new google.picker.DocsView()]; // custom view\n  const handleOpenPicker = () => {\n    openPicker({\n      clientId: \"xxxxxxxxxxxxxxxxx\",\n      developerKey: \"xxxxxxxxxxxx\",\n      viewId: \"DOCS\",\n      // token: token, // pass oauth token in case you already have one\n      showUploadView: true,\n      showUploadFolders: true,\n      supportDrives: true,\n      multiselect: true,\n      // customViews: customViewsArray, // custom view\n      callbackFunction: (data) => {\n        if (data.action === 'cancel') {\n          console.log('User clicked cancel/close button')\n        }\n        console.log(data)\n      },\n    })\n  }\n\n\n  \n  return (\n    <div>\n        <button onClick={() => handleOpenPicker()}>Open Picker</button>\n    </div>\n  );\n}\n\nexport default App;\n```\n\n\n## Picker configuration props\n\n## Picker Props\n\n|    params        |   value  |  default value   |          description          |\n|------------------|----------|------------------|-------------------------------|\n| callbackFunction  |function    |  REQUIRED       |Callback function that will be called on picker action |\n|    clientId      |  string  |     REQUIRED     |      Google client id         |\n|    developerKey  |  string  |     REQUIRED     |      Google developer key     |\n|    disableDefaultView  |  boolean  |     false     |      disables default view     |\n|    viewId        |  string  |     DOCS         |         ViewIdOptions         |\n|    viewMimeTypes |  string  |     optional     |Comma separated mimetypes. Use this in place of viewId if you need to filter multiple type of files. list: https://developers.google.com/drive/api/v3/mime-types.|\n|    viewMode      |  string  |     optional     | can be 'GRID' or 'LIST'       |\n|    appId         |  string  |     ''           | See \"Project number\" under \"IAM & Admin\" > \"Settings\" in the GCP console |\n|setIncludeFolders|  boolean  |     false        |Show folders in the view items.|\n|setSelectFolderEnabled|boolean|     false       |Allows the user to select a folder in Google Drive.|\n|   token          |  string  |     optional     | access_token to skip auth part|\n| setOrigin        |  string  |     optional     | Sets the origin of the Google Picker dialog |\n|  multiselect     |  boolean |     false        | Enable picker multiselect     |\n| supportDrives    |  boolean |     false        |    Support shared drives      |\n| showUploadView   |  boolean |     false        |     Enable upload view        |\n| showUploadFolders|  boolean |     false        |Enable folder selection(upload)|\n| setParentFolder  |  string  |     disabled     |  Drive folder id to upload    |\n| customViews      |ViewClass[]|    optional     |  Array of custom views you want to add to the picker|\n| customScopes      |string[]|    ['https://www.googleapis.com/auth/drive.readonly']     |  Array of custom scopes you want to add to the picker|\n| locale           |string    |    en            | List of supported locales https://developers.google.com/picker/docs#i18n|\n\n\n  ## viewId options\n|    option            |         description             |\n|----------------------|---------------------------------|\n|    DOCS            |All Google Drive document types. |\n|  DOCS_IMAGES          |Google Drive photos.             \n|DOCS_IMAGES_AND_VIDEOS |Google Drive photos and videos.  |\n|    DOCS_VIDEOS        |Google Drive videos.             |\n|    DOCUMENTS          |\tGoogle Drive Documents.         |\n|    FOLDERS            |Google Drive Folders.            |\n|    DRAWINGS           |Google Drive Drawings.           |\n|    FORMS              |\tGoogle Drive Forms.             |\n|    PDFS               |PDF files stored in Google Drive.|\n|    SPREADSHEETS       |Google Drive Spreadsheets.       |\n\n## Author\n\n[@Jose medina](https://www.linkedin.com/in/jos%C3%A9-medina-56479a128/)\n\n\n## Acknowledgments\nInspiration, code snippets\n* [sdoomz](https://github.com/sdoomz/react-google-picker)\n* [obonyojimmy](https://github.com/obonyojimmy/react-drive-picker#readme)","readmeFilename":"README.md"}