react-uploader
Advanced tools
Comparing version 1.2.0 to 1.3.0
@@ -1,1 +0,1 @@ | ||
!function(){"use strict";var t={n:function(r){var n=r&&r.__esModule?function(){return r.default}:function(){return r};return t.d(n,{a:n}),n},d:function(r,n){for(var e in n)t.o(n,e)&&!t.o(r,e)&&Object.defineProperty(r,e,{enumerable:!0,get:n[e]})},o:function(t,r){return Object.prototype.hasOwnProperty.call(t,r)},r:function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},r={};t.r(r),t.d(r,{UploadButton:function(){return n},UploadDropzone:function(){return a}});var n=function(t){var r=t.uploader,n=t.options,e=t.onComplete;return(0,t.children)({onClick:function(t){t.preventDefault(),r.open(n).then((function(t){void 0!==e&&e(t)}),(function(t){return console.error("Uploader error.",t)}))}})},e=require("react"),o=t.n(e);function i(t,r){(null==r||r>t.length)&&(r=t.length);for(var n=0,e=new Array(r);n<r;n++)e[n]=t[n];return e}function u(t,r){(null==r||r>t.length)&&(r=t.length);for(var n=0,e=new Array(r);n<r;n++)e[n]=t[n];return e}var a=function(t){var r,n,a=t.uploader,l=t.options,c=t.onComplete,f=t.onUpdate,d=t.width,y=(t.height,function(){var t,r,n=(t=(0,e.useState)(void 0),r=2,function(t){if(Array.isArray(t))return t}(t)||function(t,r){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var e,o,i=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(e=n.next()).done)&&(i.push(e.value),!r||i.length!==r);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(a)throw o}}return i}}(t,r)||function(t,r){if(t){if("string"==typeof t)return i(t,r);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(t,r):void 0}}(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),o=n[0],u=n[1];return[o,(0,e.useCallback)((function(t){u(null!=t?t:void 0)}),[])]}()),p=(n=2,function(t){if(Array.isArray(t))return t}(r=y)||function(t,r){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var e,o,i=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(e=n.next()).done)&&(i.push(e.value),!r||i.length!==r);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(a)throw o}}return i}}(r,n)||function(t,r){if(t){if("string"==typeof t)return u(t,r);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(t,r):void 0}}(r,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),s=p[0],v=p[1];return(0,e.useLayoutEffect)((function(){if(void 0!==s){var t=void 0===f?{}:{onUpdate:f};a.open(Object.assign(Object.assign(Object.assign({},l),t),{container:s,layout:"inline"})).then((function(t){void 0!==c&&c(t)}),(function(t){return console.error("Uploader error.",t)}))}}),[s]),o().createElement("div",{ref:v,style:{position:"relative",width:"100%",maxWidth:null!=d?d:"600px",height:"375px"}})};module.exports=r}(); | ||
!function(){"use strict";var t={n:function(r){var n=r&&r.__esModule?function(){return r.default}:function(){return r};return t.d(n,{a:n}),n},d:function(r,n){for(var e in n)t.o(n,e)&&!t.o(r,e)&&Object.defineProperty(r,e,{enumerable:!0,get:n[e]})},o:function(t,r){return Object.prototype.hasOwnProperty.call(t,r)},r:function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},r={};t.r(r),t.d(r,{UploadButton:function(){return n},UploadDropzone:function(){return a}});var n=function(t){var r=t.uploader,n=t.options,e=t.onComplete;return(0,t.children)({onClick:function(t){t.preventDefault(),r.open(n).then((function(t){void 0!==e&&e(t)}),(function(t){return console.error("Uploader error.",t)}))}})},e=require("react"),o=t.n(e);function i(t,r){(null==r||r>t.length)&&(r=t.length);for(var n=0,e=new Array(r);n<r;n++)e[n]=t[n];return e}function u(t,r){(null==r||r>t.length)&&(r=t.length);for(var n=0,e=new Array(r);n<r;n++)e[n]=t[n];return e}var a=function(t){var r,n,a=t.uploader,l=t.options,c=t.onComplete,f=t.onUpdate,d=t.width,y=t.height,p=function(){var t,r,n=(t=(0,e.useState)(void 0),r=2,function(t){if(Array.isArray(t))return t}(t)||function(t,r){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var e,o,i=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(e=n.next()).done)&&(i.push(e.value),!r||i.length!==r);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(a)throw o}}return i}}(t,r)||function(t,r){if(t){if("string"==typeof t)return i(t,r);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(t,r):void 0}}(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),o=n[0],u=n[1];return[o,(0,e.useCallback)((function(t){u(null!=t?t:void 0)}),[])]}(),s=(n=2,function(t){if(Array.isArray(t))return t}(r=p)||function(t,r){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var e,o,i=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(e=n.next()).done)&&(i.push(e.value),!r||i.length!==r);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(a)throw o}}return i}}(r,n)||function(t,r){if(t){if("string"==typeof t)return u(t,r);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(t,r):void 0}}(r,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),v=s[0],b=s[1];return(0,e.useLayoutEffect)((function(){if(void 0!==v){var t=void 0===f?{}:{onUpdate:f};a.open(Object.assign(Object.assign(Object.assign({},l),t),{container:v,layout:"inline"})).then((function(t){void 0!==c&&c(t)}),(function(t){return console.error("Uploader error.",t)}))}}),[v]),o().createElement("div",{ref:b,style:{position:"relative",width:"100%",maxWidth:null!=d?d:"600px",height:null!=y?y:"375px"}})};module.exports=r}(); |
{ | ||
"name": "react-uploader", | ||
"version": "1.2.0", | ||
"version": "1.3.0", | ||
"author": "Upload <hello@upload.io> (https://upload.io)", | ||
@@ -5,0 +5,0 @@ "description": "React Uploader | React File Upload Component | Powered by Upload.io 🚀", |
@@ -176,3 +176,3 @@ <h1 align="center"> | ||
1. Add a [GitHub Star](https://github.com/upload-io/uploader/stargazers) to the project (if you're feeling generous!). | ||
1. Add a [GitHub Star](https://github.com/upload-io/react-uploader/stargazers) to the project (if you're feeling generous!). | ||
2. Determine whether you're raising a bug, feature request or question. | ||
@@ -179,0 +179,0 @@ 3. Raise your issue or PR. |
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
424668