file-select-dialog
Advanced tools
Comparing version 1.4.0 to 1.4.1
@@ -0,1 +1,8 @@ | ||
## [1.4.1](https://github.com/TomokiMiyauci/file-select-dialog/compare/v1.4.0...v1.4.1) (2020-11-28) | ||
### Performance Improvements | ||
* **rollup.config.ts:** change output format ([de7de62](https://github.com/TomokiMiyauci/file-select-dialog/commit/de7de62b4ae4664ef547cbd0e87a1429c24a6f84)) | ||
# [1.4.0](https://github.com/TomokiMiyauci/file-select-dialog/compare/v1.3.1...v1.4.0) (2020-11-22) | ||
@@ -2,0 +9,0 @@ |
@@ -1,2 +0,2 @@ | ||
class e extends Error{}class t extends e{}class n extends e{}const c=(e,t=",")=>e.join(t),l={accept:"*",multiple:!1},r=e=>{const{accept:t,multiple:n}={...l,...e},r=p({multiple:n,accept:Array.isArray(t)?c(t):t});return new Promise((e=>{r.onchange=()=>{e(s(r.files,n)),r.remove()},r.click()}))},s=(e,c)=>new Promise(((l,r)=>{if(!e)return r(new t);const s=i(e,c);if(!s)return r(new n);l(s)})),i=(e,t)=>t?e:1===e.length?e[0]:null,p=({accept:e,multiple:t})=>{const n=document.createElement("input");return n.type="file",n.multiple=t,n.accept=e,n};export{r as fileDialog}; | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});class e extends Error{}class t extends e{}class c extends e{}const l=(e,t=",")=>e.join(t),n={accept:"*",multiple:!1},r=(e,l)=>new Promise(((n,r)=>{if(!e)return r(new t);const i=s(e,l);if(!i)return r(new c);n(i)})),s=(e,t)=>t?e:1===e.length?e[0]:null,i=({accept:e,multiple:t})=>{const c=document.createElement("input");return c.type="file",c.multiple=t,c.accept=e,c};exports.fileDialog=e=>{const{accept:t,multiple:c}={...n,...e},s=i({multiple:c,accept:Array.isArray(t)?l(t):t});return new Promise((e=>{s.onchange=()=>{e(r(s.files,c)),s.remove()},s.click()}))}; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "file-select-dialog", | ||
"version": "1.4.0", | ||
"version": "1.4.1", | ||
"description": "Call file select dialog programmatically", | ||
"types": "dist/index.d.ts", | ||
"main": "dist/index.js", | ||
"module": "dist/file-select-dialog.esm.js", | ||
"unpkg": "dist/file-select-dialog.global.js", | ||
"jsdelivr": "dist/file-select-dialog.global.js", | ||
"sideEffects": false, | ||
"author": "TomokiMiyauci <development.operation.6.6.6@gmail.com>", | ||
@@ -8,0 +12,0 @@ "repository": "https://github.com/TomokiMiyauci/file-select-dialog", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
24210
18
36