@bigbinary/neeto-image-uploader-frontend 1.5.5 → 1.5.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +14 -19
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +14 -19
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2176,7 +2176,7 @@ var ImageWithFallback = function ImageWithFallback(_ref) {
|
|
|
2176
2176
|
return isLoaded ? /*#__PURE__*/React.createElement("img", _extends$1({}, _objectSpread$2({
|
|
2177
2177
|
src: src
|
|
2178
2178
|
}, props), {
|
|
2179
|
-
className: "h-full w-auto"
|
|
2179
|
+
className: "h-full w-auto object-contain"
|
|
2180
2180
|
})) : /*#__PURE__*/React.createElement(Fallback, _objectSpread$2({
|
|
2181
2181
|
className: className
|
|
2182
2182
|
}, props));
|
|
@@ -3374,8 +3374,8 @@ var useImageUploader = function useImageUploader(_ref) {
|
|
|
3374
3374
|
onUploadComplete(mergeRight(keysToCamelCase(blob), {
|
|
3375
3375
|
url: blob.blob_url
|
|
3376
3376
|
}));
|
|
3377
|
+
setIsUploading(false);
|
|
3377
3378
|
});
|
|
3378
|
-
setIsUploading(false);
|
|
3379
3379
|
} catch (error) {
|
|
3380
3380
|
Toastr.error(error);
|
|
3381
3381
|
}
|
|
@@ -3405,21 +3405,18 @@ var useImageUploader = function useImageUploader(_ref) {
|
|
|
3405
3405
|
case 5:
|
|
3406
3406
|
result = _context.sent;
|
|
3407
3407
|
onUploadComplete(result);
|
|
3408
|
-
|
|
3408
|
+
setIsUploading(false);
|
|
3409
|
+
_context.next = 13;
|
|
3409
3410
|
break;
|
|
3410
|
-
case
|
|
3411
|
-
_context.prev =
|
|
3411
|
+
case 10:
|
|
3412
|
+
_context.prev = 10;
|
|
3412
3413
|
_context.t0 = _context["catch"](0);
|
|
3413
3414
|
Toastr.error(_context.t0);
|
|
3414
|
-
case
|
|
3415
|
-
_context.prev = 12;
|
|
3416
|
-
setIsUploading(false);
|
|
3417
|
-
return _context.finish(12);
|
|
3418
|
-
case 15:
|
|
3415
|
+
case 13:
|
|
3419
3416
|
case "end":
|
|
3420
3417
|
return _context.stop();
|
|
3421
3418
|
}
|
|
3422
|
-
}, _callee, null, [[0,
|
|
3419
|
+
}, _callee, null, [[0, 10]]);
|
|
3423
3420
|
}));
|
|
3424
3421
|
return function productionUpload(_x, _x2) {
|
|
3425
3422
|
return _ref2.apply(this, arguments);
|
|
@@ -3443,18 +3440,16 @@ var useImageUploader = function useImageUploader(_ref) {
|
|
|
3443
3440
|
handleUploadProgress(e, fileSize, setUploadProgress);
|
|
3444
3441
|
});
|
|
3445
3442
|
if (!IS_DEVELOPMENT_OR_HEROKU_ENV) {
|
|
3446
|
-
_context2.next =
|
|
3443
|
+
_context2.next = 9;
|
|
3447
3444
|
break;
|
|
3448
3445
|
}
|
|
3449
|
-
|
|
3450
|
-
|
|
3451
|
-
case 8:
|
|
3452
|
-
_context2.next = 12;
|
|
3446
|
+
developmentUpload(file, setUploadProgress);
|
|
3447
|
+
_context2.next = 11;
|
|
3453
3448
|
break;
|
|
3454
|
-
case
|
|
3455
|
-
_context2.next =
|
|
3449
|
+
case 9:
|
|
3450
|
+
_context2.next = 11;
|
|
3456
3451
|
return productionUpload(file, XHRProgress);
|
|
3457
|
-
case
|
|
3452
|
+
case 11:
|
|
3458
3453
|
case "end":
|
|
3459
3454
|
return _context2.stop();
|
|
3460
3455
|
}
|