ywana-core8 0.0.787 → 0.0.789
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 +12 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.modern.js +12 -3
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +12 -3
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/widgets/upload/UploadDialog.js +7 -3
package/dist/index.cjs
CHANGED
@@ -4352,7 +4352,10 @@ var UploadDialog = function UploadDialog(_ref) {
|
|
4352
4352
|
onClose = _ref.onClose,
|
4353
4353
|
children = _ref.children,
|
4354
4354
|
className = _ref.className,
|
4355
|
-
disabled = _ref.disabled
|
4355
|
+
disabled = _ref.disabled,
|
4356
|
+
onCanClose = _ref.onCanClose,
|
4357
|
+
_ref$overlayCanClose = _ref.overlayCanClose,
|
4358
|
+
overlayCanClose = _ref$overlayCanClose === void 0 ? true : _ref$overlayCanClose;
|
4356
4359
|
var site = React.useContext(SiteContext);
|
4357
4360
|
|
4358
4361
|
function success(file, message) {
|
@@ -4370,11 +4373,16 @@ var UploadDialog = function UploadDialog(_ref) {
|
|
4370
4373
|
}
|
4371
4374
|
}
|
4372
4375
|
|
4376
|
+
function canClose() {
|
4377
|
+
return onCanClose ? onCanClose() : true;
|
4378
|
+
}
|
4379
|
+
|
4373
4380
|
var actions = /*#__PURE__*/React__default["default"].createElement(React.Fragment, null, /*#__PURE__*/React__default["default"].createElement(Button, {
|
4374
4381
|
label: "CERRAR",
|
4375
4382
|
action: function action() {
|
4376
4383
|
return onAction("CLOSE");
|
4377
|
-
}
|
4384
|
+
},
|
4385
|
+
disabled: canClose()
|
4378
4386
|
}));
|
4379
4387
|
var title = /*#__PURE__*/React__default["default"].createElement(Text, {
|
4380
4388
|
use: "headline6"
|
@@ -4384,7 +4392,8 @@ var UploadDialog = function UploadDialog(_ref) {
|
|
4384
4392
|
open: true,
|
4385
4393
|
onAction: onAction,
|
4386
4394
|
actions: actions,
|
4387
|
-
className: className
|
4395
|
+
className: className,
|
4396
|
+
overlayCanClose: overlayCanClose
|
4388
4397
|
}, disabled ? "" : /*#__PURE__*/React__default["default"].createElement(Uploader, {
|
4389
4398
|
label: label,
|
4390
4399
|
accept: accept,
|