ywana-core8 0.0.874 → 0.0.876
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 +27 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.modern.js +27 -6
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +27 -6
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/domain/CollectionPage.js +1 -0
- package/src/widgets/upload/Upload.test.js +1 -1
- package/src/widgets/upload/Uploader.js +13 -3
package/dist/index.modern.js
CHANGED
@@ -3593,6 +3593,8 @@ var UploadProgress = function UploadProgress(_ref) {
|
|
3593
3593
|
var Uploader = function Uploader(_ref) {
|
3594
3594
|
var icon = _ref.icon,
|
3595
3595
|
label = _ref.label,
|
3596
|
+
_ref$view = _ref.view,
|
3597
|
+
view = _ref$view === void 0 ? "area" : _ref$view,
|
3596
3598
|
target = _ref.target,
|
3597
3599
|
accept = _ref.accept,
|
3598
3600
|
_ref$simultaneousUplo = _ref.simultaneousUploads,
|
@@ -3652,13 +3654,30 @@ var Uploader = function Uploader(_ref) {
|
|
3652
3654
|
setState(UPLOAD_STATES.COMPLETED);
|
3653
3655
|
if (onComplete) onComplete(files);
|
3654
3656
|
}
|
3657
|
+
function renderView() {
|
3658
|
+
switch (view) {
|
3659
|
+
case "area":
|
3660
|
+
return /*#__PURE__*/React.createElement(UploadArea, {
|
3661
|
+
resumable: resumable,
|
3662
|
+
icon: icon,
|
3663
|
+
label: label
|
3664
|
+
});
|
3665
|
+
case "icon":
|
3666
|
+
return /*#__PURE__*/React.createElement(UploadIcon, {
|
3667
|
+
resumable: resumable,
|
3668
|
+
icon: icon
|
3669
|
+
});
|
3670
|
+
default:
|
3671
|
+
return /*#__PURE__*/React.createElement(UploadArea, {
|
3672
|
+
resumable: resumable,
|
3673
|
+
icon: icon,
|
3674
|
+
label: label
|
3675
|
+
});
|
3676
|
+
}
|
3677
|
+
}
|
3655
3678
|
return /*#__PURE__*/React.createElement("div", {
|
3656
3679
|
className: "uploader " + className
|
3657
|
-
}, state === UPLOAD_STATES.IDLE ? /*#__PURE__*/React.createElement(
|
3658
|
-
resumable: resumable,
|
3659
|
-
icon: icon,
|
3660
|
-
label: label
|
3661
|
-
}) : /*#__PURE__*/React.createElement(UploadProgress, {
|
3680
|
+
}, state === UPLOAD_STATES.IDLE ? renderView() : /*#__PURE__*/React.createElement(UploadProgress, {
|
3662
3681
|
files: files
|
3663
3682
|
}));
|
3664
3683
|
};
|
@@ -7194,7 +7213,9 @@ var CollectionContext$1 = function CollectionContext(url, field, host, page, fet
|
|
7194
7213
|
});
|
7195
7214
|
});
|
7196
7215
|
}, function (error) {
|
7197
|
-
|
7216
|
+
return Promise.resolve(_this4.load()).then(function () {
|
7217
|
+
console.log(error);
|
7218
|
+
});
|
7198
7219
|
});
|
7199
7220
|
return Promise.resolve(_temp6 && _temp6.then ? _temp6.then(function () {}) : void 0);
|
7200
7221
|
} catch (e) {
|