ywana-core8 0.0.383 → 0.0.386
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 +7 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.modern.js +7 -11
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +7 -11
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/widgets/upload/UploadArea.js +5 -7
package/dist/index.modern.js
CHANGED
@@ -2743,7 +2743,8 @@ var EventCard = function EventCard(props) {
|
|
2743
2743
|
*/
|
2744
2744
|
|
2745
2745
|
var UploadArea = function UploadArea(props) {
|
2746
|
-
var
|
2746
|
+
var resumable = props.resumable,
|
2747
|
+
icon = props.icon,
|
2747
2748
|
_props$label = props.label,
|
2748
2749
|
label = _props$label === void 0 ? 'Add file or drop file here...' : _props$label;
|
2749
2750
|
var areaElement = useRef();
|
@@ -2753,13 +2754,10 @@ var UploadArea = function UploadArea(props) {
|
|
2753
2754
|
setDrag = _useState[1];
|
2754
2755
|
|
2755
2756
|
useEffect(function () {
|
2756
|
-
|
2757
|
-
|
2758
|
-
if (resumable && areaElement) {
|
2757
|
+
if (resumable && areaElement.current) {
|
2759
2758
|
resumable.assignDrop(areaElement.current);
|
2760
|
-
resumable.assignBrowse(areaElement.current);
|
2761
2759
|
}
|
2762
|
-
}, []);
|
2760
|
+
}, [areaElement]);
|
2763
2761
|
|
2764
2762
|
var onDragOver = function onDragOver() {
|
2765
2763
|
setDrag(true);
|
@@ -2775,10 +2773,9 @@ var UploadArea = function UploadArea(props) {
|
|
2775
2773
|
onDragOver: onDragOver,
|
2776
2774
|
onDragLeave: onDragLeave,
|
2777
2775
|
ref: areaElement
|
2778
|
-
}, /*#__PURE__*/React.createElement(
|
2776
|
+
}, /*#__PURE__*/React.createElement(UploadIcon, {
|
2779
2777
|
icon: icon,
|
2780
|
-
|
2781
|
-
eventPropagation: false
|
2778
|
+
resumable: resumable
|
2782
2779
|
}), /*#__PURE__*/React.createElement("label", null, label));
|
2783
2780
|
};
|
2784
2781
|
/**
|
@@ -2800,8 +2797,7 @@ var UploadIcon = function UploadIcon(_ref) {
|
|
2800
2797
|
className: "upload-icon",
|
2801
2798
|
ref: iconElement
|
2802
2799
|
}, /*#__PURE__*/React.createElement(Icon, {
|
2803
|
-
icon: icon
|
2804
|
-
clickable: true
|
2800
|
+
icon: icon
|
2805
2801
|
}));
|
2806
2802
|
};
|
2807
2803
|
|