{"_id":"@apideck/file-picker-js","_rev":"18-5f9defcdeb07d18dda80d3260625909f","name":"@apideck/file-picker-js","dist-tags":{"latest":"1.0.2"},"versions":{"1.0.1":{"name":"@apideck/file-picker-js","version":"1.0.1","keywords":["apideck","filepicker","javascript"],"author":{"name":"Jake Prins"},"license":"MIT","_id":"@apideck/file-picker-js@1.0.1","maintainers":[{"name":"brahimmouhamou","email":"brahim@stravan.be"},{"name":"gdewilde","email":"gertjan@apideck.com"},{"name":"geertwille","email":"geertwille9@gmail.com"},{"name":"jakeprins","email":"jake@apideck.com"},{"name":"nicklloyd","email":"nick@apideck.com"},{"name":"eliasmeire","email":"elias@meire.dev"},{"name":"trinix","email":"timhaselaars@gmail.com"}],"dist":{"shasum":"4ca17fb6fcdb62a947f7a89edcf8987f7911b4ff","tarball":"https://registry.npmjs.org/@apideck/file-picker-js/-/file-picker-js-1.0.1.tgz","fileCount":26,"integrity":"sha512-R7gYOCfCEuXMOzw4qtUTE9sIlGR/c3z1KXBj/ZjhhTNo6dsKvV7nbxsctPt6R4JNQ8jS6GTYWBxoRwxlo0Mc5w==","signatures":[{"sig":"MEUCIQCikbJfeovQFXaeVXCJynBYzzkSPzoztWIJFdhs/OGT3gIgHbAkxy6JxwmB/3L8/KjjjWwjc7w9UaPKhf6glEk0AgM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":96629,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj26KqACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpWKw/9EuxssMNoC0CLyaQkU19HAPCbO0Lk1qBf3HptKbQ/tvGib7oa\r\n/zf5Tm2w4CpR3FY/ByberL0Ye0x0pz8JE1yBt5m342mjPnAYEUs4MojOOa7t\r\n13koOP7yqWR/F5Q9ud3SwAxfpDua9zPGulXyAJXu8U6OQqed+PFWvkgiWoFM\r\nSfZNTDW8MW1OIaqLPJ0/dFF9oHthEDVYQ44852VD0GnlpFNS/MJlM6chWxbJ\r\nvz17udPq+l/aaovrSuelF90ybpKursoMkYDrLEO1oYLiMvmn3cwHMjYC+AIU\r\ny2bLS6V46yQO5LawGmlsZb0MyMMKI9CumtAeiqArJEcherTBhDv60PnqpR2d\r\n88HPDK22Sn1eLhU3CQWSGWKdR1Vat2v6QPANDalj3GX++fv6mU7ux/fi2kdn\r\np4U58QVCcBYBKdOdd+4aRMTRb1Pjwwdg/Bh8unxcsV3BuNpCo0/SJ8e9NhUv\r\n+yHqRC6tuTbzsqhPADQqMXu5OQTP4NIxcpwMwFDpfPv+QeiN9VQyzOL5m+dg\r\ne301l2DCrgfXl/LRLTM1B8sreJjYv96Dea/Js9gepdEnWrM36KHTS4lCIC/s\r\n3nCwAlxpqs1LbO7Zt353k1ITzTwh5B2R5GbsJmrSZV8sY9XgC1rMms9nBbT2\r\n7OgeXhBT4ZK6nMgHJScegXQDIiqjO/KgK88=\r\n=DL4U\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","husky":{"hooks":{"pre-commit":"tsdx lint"}},"unpkg":"dist/file-picker-js.umd.production.min.js","module":"dist/file-picker-js.esm.js","engines":{"node":">=12"},"scripts":{"dev":"parcel dev/index.html","lint":"tsdx lint","size":"size-limit","test":"tsdx test","build":"tsdx build --format umd,esm,cjs","start":"tsdx watch","analyze":"size-limit --why","prepare":"yarn build","release":"np --no-publish && npm publish --access public --registry https://registry.npmjs.org"},"typings":"dist/index.d.ts","_npmUser":{"name":"jakeprins","email":"jake@apideck.com"},"prettier":{"semi":true,"printWidth":80,"singleQuote":true,"trailingComma":"es5"},"repository":{"url":"https://github.com/apideck-libraries/file-picker-js","type":"git"},"size-limit":[{"path":"dist/file-picker-js.cjs.production.min.js","limit":"10 KB"},{"path":"dist/file-picker-js.esm.js","limit":"10 KB"}],"description":"A vanilla JavaScript library to embed the [Apideck FilePicker](https://www.apideck.com/samples/file-picker) in any web application.","directories":{},"licenseText":"MIT License\n\nCopyright (c) 2022 Elias Meire\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"np":"^7.6.2","tsdx":"^0.14.1","husky":"^8.0.2","tslib":"^2.4.1","parcel":"^2.8.2","size-limit":"^8.1.0","typescript":"^4.9.4","@size-limit/preset-small-lib":"^8.1.0"},"peerDependencies":{},"_npmOperationalInternal":{"tmp":"tmp/file-picker-js_1.0.1_1675338410216_0.1133248978248953","host":"s3://npm-registry-packages"}},"1.0.2":{"name":"@apideck/file-picker-js","version":"1.0.2","keywords":["apideck","filepicker","javascript"],"author":{"name":"Jake Prins"},"license":"MIT","_id":"@apideck/file-picker-js@1.0.2","maintainers":[{"name":"brahimmouhamou","email":"brahim@stravan.be"},{"name":"gdewilde","email":"gertjan@apideck.com"},{"name":"geertwille","email":"geertwille9@gmail.com"},{"name":"jakeprins","email":"jake@apideck.com"},{"name":"nicklloyd","email":"nick@apideck.com"},{"name":"eliasmeire","email":"elias@meire.dev"},{"name":"trinix","email":"timhaselaars@gmail.com"}],"dist":{"shasum":"362bd48a2d330720f8d771a7271c97520c99c31a","tarball":"https://registry.npmjs.org/@apideck/file-picker-js/-/file-picker-js-1.0.2.tgz","fileCount":26,"integrity":"sha512-fAEAsKwVdWmM6vL7o6rcjNa2zRZOwHX2XhlNGkeDfsaQZvX3I2M/uRLMPxE1B/GBXSMSF+zJdwVH3wScVxqWmw==","signatures":[{"sig":"MEUCIECxRjLR5+wZKRPwiTWiacL/IL2gtzvmvDiUPumi0f0hAiEA77NIJj4KB4P/zDZxACTb4Dwh7yLka3lE6cGGMEnmV/I=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":96622,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj26SfACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpzdhAAkegty7NaYjsnED2Vs7ByJGjej/DAj7AlFhwdlRFpLWXthTJs\r\nC992M6KruF1KbUxNIqTr3ZRoyhGRx81lwvHQs7rjwLapql3SmOeZ3jNIyJl3\r\nEG7EjfwtXZFKIDWWNjVxo7bWYz08Dhsu1YMwOssAdTG2lPHhi4XwNnVVgBf7\r\nstaqfkeGA1hpIZ/6zgfC8e2CH1GZAQU/wR2drdpiOx7tVRXSfV9sJRKArqn+\r\na7Raf6eYZqo+9fVTWseFxEQPxiL+Guw2jlsUR4X3DqxOS4Dm3Dfp9b+EJZbp\r\nfA2zzUnE4fkyy8bVQ++oi+fDZq43ENhyXfvW9eu7qx/PRZSghRrcF3bJgvYC\r\nO3iQoTV4K6NfT2gmqMUAhgQlshsRtU4cIhmTYm4hrDFCdTqclmjPd1hTNYQd\r\n0tHklk4MVYLI2ISN35zy8g0mblvGL9jt6AgSWrbxgUri0ZydhHE4faQWKKWW\r\nXNkbK/f/SMJyfcapo0zj8KeZgmNPg0xGge+OEmH9Sx/PHEuprPrfgqEAFq5+\r\nG4wnoEMCKVrQgR8rTTbjvKZbCczyfg1x1zaRZ8ICph3QOaDSZcOS77VKwX1u\r\nNdiKXcFYGi9j6AaPXR+5xR17qtn7AqMP37bjoak6eAAeWkc0w0fNO3Yi6HB3\r\nZZimzV7fzdNo/sxx+00Wtv3fFvD8AOLQZGc=\r\n=yyxF\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","husky":{"hooks":{"pre-commit":"tsdx lint"}},"unpkg":"dist/file-picker-js.umd.production.min.js","module":"dist/file-picker-js.esm.js","engines":{"node":">=12"},"scripts":{"dev":"parcel dev/index.html","lint":"tsdx lint","size":"size-limit","test":"tsdx test","build":"tsdx build --format umd,esm,cjs","start":"tsdx watch","analyze":"size-limit --why","prepare":"yarn build","release":"np --no-publish && npm publish --access public --registry https://registry.npmjs.org"},"typings":"dist/index.d.ts","_npmUser":{"name":"jakeprins","email":"jake@apideck.com"},"prettier":{"semi":true,"printWidth":80,"singleQuote":true,"trailingComma":"es5"},"repository":{"url":"https://github.com/apideck-libraries/file-picker-js","type":"git"},"size-limit":[{"path":"dist/file-picker-js.cjs.production.min.js","limit":"10 KB"},{"path":"dist/file-picker-js.esm.js","limit":"10 KB"}],"description":"A vanilla JavaScript library to embed the [Apideck FilePicker](https://www.apideck.com/samples/file-picker) in any web application.","directories":{},"licenseText":"MIT License\n\nCopyright (c) 2022 Elias Meire\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"np":"^7.6.2","tsdx":"^0.14.1","husky":"^8.0.2","tslib":"^2.4.1","parcel":"^2.8.2","size-limit":"^8.1.0","typescript":"^4.9.4","@size-limit/preset-small-lib":"^8.1.0"},"peerDependencies":{},"_npmOperationalInternal":{"tmp":"tmp/file-picker-js_1.0.2_1675338911058_0.6132631922126806","host":"s3://npm-registry-packages"}}},"time":{"created":"2023-02-02T11:46:50.121Z","modified":"2026-09-17T09:13:35.125Z","1.0.1":"2023-02-02T11:46:50.389Z","1.0.2":"2023-02-02T11:55:11.188Z"},"author":{"name":"Jake Prins"},"license":"MIT","keywords":["apideck","filepicker","javascript"],"repository":{"url":"https://github.com/apideck-libraries/file-picker-js","type":"git"},"description":"A vanilla JavaScript library to embed the [Apideck FilePicker](https://www.apideck.com/samples/file-picker) in any web application.","maintainers":[{"email":"gertjan@apideck.com","name":"gdewilde"},{"email":"nick@apideck.com","name":"nicklloyd"},{"email":"ritik@apideck.com","name":"ritiksingh7"},{"email":"samir.amzani@gmail.com","name":"samzani"},{"email":"mithgroth@gmail.com","name":"mithgroth"},{"email":"gmenoiaa@gmail.com","name":"gmenoiaa"}],"readme":"<img src=\"https://developers.apideck.com/_next/image?url=%2Ffile-picker-guide.png&w=1920&q=75\" width=\"100%\" />\n\n# FilePicker JS\n\nA vanilla JavaScript library to embed the [Apideck FilePicker](https://www.apideck.com/samples/file-picker) in any web application.\n\n**FilePicker JS** | [FilePicker React](https://github.com/apideck-libraries/file-picker)\n\n## Installation\n\n### Package\n\n```sh\nnpm install @apideck/file-picker-js\n```\n\n### Script\n\nIf you don't want to set up a build environment, you can get `@apideck/file-picker-js` from a CDN like unpkg.com and it will be globally available through the `window.FilePicker` object.\n\n```html\n<script src=\"https://unpkg.com/@apideck/file-picker-js\"></script>\n```\n\n## Prerequisites\n\nBefore opening the FilePicker modal with `@apideck/file-picker-js`, you need to create a Vault session from your backend using the Vault API or one of our [SDKs](https://docs.apideck.com/sdks). Find out more in the [docs](https://docs.apideck.com/apis/vault/reference#operation/sessionsCreate).\n\n## Usage\n\nPass the JWT you got from the Vault session to `@apideck/file-picker-js` and provide an `onSelect` function that acts upon selection of a file:\n\n```js\nimport { FilePicker } from '@apideck/file-picker-js';\n\nFilePicker.open({\n  token: 'REPLACE_WITH_SESSION_TOKEN',\n  onSelect: file => console.log(file),\n});\n```\n\nIf you want to get notified when the modal opens and closes, you can provide the `onReady` and `onClose` options. You could also get notified when the consumer switches from integration by using the `onConnectionSelect` option.\n\n```jsx\nimport { FilePicker } from '@apideck/file-picker-js';\n\nFilePicker.open({\n  token: 'REPLACE_WITH_SESSION_TOKEN',\n  onSelect: file => console.log(file),\n  onClose: () => {\n    console.log('closed!');\n  },\n  onReady: () => {\n    console.log('ready!');\n  },\n  onConnectionSelect: connection => {\n    console.log(connection);\n  },\n});\n```\n\nYou can also provide a file through the `fileToSave` options that will force the FilePicker to go into \"Upload\" mode. This will allow the user to select the connector and folder that the file needs to get saved to.\n\n```jsx\nimport { FilePicker } from '@apideck/file-picker-js';\n\nFilePicker.open({\n  token: 'REPLACE_WITH_SESSION_TOKEN',\n  fileToSave: '<add-file-here>',\n});\n```\n\n### Properties\n\n| Property           | Type    | Required | Default             | Description                                                           |\n| ------------------ | ------- | -------- | ------------------- | --------------------------------------------------------------------- |\n| token              | string  | true     | -                   | The JSON Web Token returned from the Create Session call              |\n| onSelect           | event   | false    | -                   | The function that gets called when a file is selected                 |\n| onConnectionSelect | event   | false    | -                   | The function that gets called when a connection is selected           |\n| title              | string  | false    | Apideck File Picker | Title shown in the modal                                              |\n| subTitle           | string  | false    | Select a file       | Subtitle shown in the modal                                           |\n| showAttribution    | boolean | false    | true                | Show \"Powered by Apideck\" in the backdrop of the modal backdrop       |\n| open               | boolean | false    | false               | Opens the file picker if set to true                                  |\n| onClose            | event   | false    | -                   | Function that gets called when the modal is closed                    |\n| fileToSave         | file    | false    | -                   | Forces \"Upload\" mode to select the folder to upload the provided file |\n","readmeFilename":"README.md"}