@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.cjs.js
CHANGED
|
@@ -2187,7 +2187,7 @@ var ImageWithFallback = function ImageWithFallback(_ref) {
|
|
|
2187
2187
|
return isLoaded ? /*#__PURE__*/React__default["default"].createElement("img", _extends$1({}, _objectSpread$2({
|
|
2188
2188
|
src: src
|
|
2189
2189
|
}, props), {
|
|
2190
|
-
className: "h-full w-auto"
|
|
2190
|
+
className: "h-full w-auto object-contain"
|
|
2191
2191
|
})) : /*#__PURE__*/React__default["default"].createElement(Fallback, _objectSpread$2({
|
|
2192
2192
|
className: className
|
|
2193
2193
|
}, props));
|
|
@@ -3385,8 +3385,8 @@ var useImageUploader = function useImageUploader(_ref) {
|
|
|
3385
3385
|
onUploadComplete(ramda.mergeRight(neetoCist.keysToCamelCase(blob), {
|
|
3386
3386
|
url: blob.blob_url
|
|
3387
3387
|
}));
|
|
3388
|
+
setIsUploading(false);
|
|
3388
3389
|
});
|
|
3389
|
-
setIsUploading(false);
|
|
3390
3390
|
} catch (error) {
|
|
3391
3391
|
neetoui.Toastr.error(error);
|
|
3392
3392
|
}
|
|
@@ -3416,21 +3416,18 @@ var useImageUploader = function useImageUploader(_ref) {
|
|
|
3416
3416
|
case 5:
|
|
3417
3417
|
result = _context.sent;
|
|
3418
3418
|
onUploadComplete(result);
|
|
3419
|
-
|
|
3419
|
+
setIsUploading(false);
|
|
3420
|
+
_context.next = 13;
|
|
3420
3421
|
break;
|
|
3421
|
-
case
|
|
3422
|
-
_context.prev =
|
|
3422
|
+
case 10:
|
|
3423
|
+
_context.prev = 10;
|
|
3423
3424
|
_context.t0 = _context["catch"](0);
|
|
3424
3425
|
neetoui.Toastr.error(_context.t0);
|
|
3425
|
-
case
|
|
3426
|
-
_context.prev = 12;
|
|
3427
|
-
setIsUploading(false);
|
|
3428
|
-
return _context.finish(12);
|
|
3429
|
-
case 15:
|
|
3426
|
+
case 13:
|
|
3430
3427
|
case "end":
|
|
3431
3428
|
return _context.stop();
|
|
3432
3429
|
}
|
|
3433
|
-
}, _callee, null, [[0,
|
|
3430
|
+
}, _callee, null, [[0, 10]]);
|
|
3434
3431
|
}));
|
|
3435
3432
|
return function productionUpload(_x, _x2) {
|
|
3436
3433
|
return _ref2.apply(this, arguments);
|
|
@@ -3454,18 +3451,16 @@ var useImageUploader = function useImageUploader(_ref) {
|
|
|
3454
3451
|
handleUploadProgress(e, fileSize, setUploadProgress);
|
|
3455
3452
|
});
|
|
3456
3453
|
if (!IS_DEVELOPMENT_OR_HEROKU_ENV) {
|
|
3457
|
-
_context2.next =
|
|
3454
|
+
_context2.next = 9;
|
|
3458
3455
|
break;
|
|
3459
3456
|
}
|
|
3460
|
-
|
|
3461
|
-
|
|
3462
|
-
case 8:
|
|
3463
|
-
_context2.next = 12;
|
|
3457
|
+
developmentUpload(file, setUploadProgress);
|
|
3458
|
+
_context2.next = 11;
|
|
3464
3459
|
break;
|
|
3465
|
-
case
|
|
3466
|
-
_context2.next =
|
|
3460
|
+
case 9:
|
|
3461
|
+
_context2.next = 11;
|
|
3467
3462
|
return productionUpload(file, XHRProgress);
|
|
3468
|
-
case
|
|
3463
|
+
case 11:
|
|
3469
3464
|
case "end":
|
|
3470
3465
|
return _context2.stop();
|
|
3471
3466
|
}
|