ywana-core8 0.0.421 → 0.0.424
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 +31 -17
- package/dist/index.cjs.map +1 -1
- package/dist/index.modern.js +31 -17
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +31 -17
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/domain/TablePage.js +13 -6
- package/src/html/textfield.js +0 -1
- package/src/html/textfield.test.js +7 -0
- package/src/widgets/upload/UploadDialog.js +2 -2
package/dist/index.modern.js
CHANGED
@@ -1095,8 +1095,6 @@ var DropDown = function DropDown(props) {
|
|
1095
1095
|
setLabel = _useState2[1];
|
1096
1096
|
|
1097
1097
|
useEffect(function () {
|
1098
|
-
console.log('DD change value', label);
|
1099
|
-
|
1100
1098
|
if (Array.isArray(options)) {
|
1101
1099
|
var option = options.find(function (option) {
|
1102
1100
|
return option.value === value;
|
@@ -3458,7 +3456,8 @@ var UploadDialog = function UploadDialog(_ref) {
|
|
3458
3456
|
onSuccess = _ref.onSuccess,
|
3459
3457
|
onComplete = _ref.onComplete,
|
3460
3458
|
onClose = _ref.onClose,
|
3461
|
-
children = _ref.children
|
3459
|
+
children = _ref.children,
|
3460
|
+
className = _ref.className;
|
3462
3461
|
var site = useContext(SiteContext);
|
3463
3462
|
|
3464
3463
|
function success(file, message) {
|
@@ -3489,7 +3488,8 @@ var UploadDialog = function UploadDialog(_ref) {
|
|
3489
3488
|
title: title,
|
3490
3489
|
open: true,
|
3491
3490
|
onAction: onAction,
|
3492
|
-
actions: actions
|
3491
|
+
actions: actions,
|
3492
|
+
className: className
|
3493
3493
|
}, /*#__PURE__*/React.createElement(Uploader, {
|
3494
3494
|
label: label,
|
3495
3495
|
accept: accept,
|
@@ -5348,6 +5348,16 @@ var TablePage = function TablePage(props) {
|
|
5348
5348
|
}
|
5349
5349
|
};
|
5350
5350
|
|
5351
|
+
var reload = function reload() {
|
5352
|
+
try {
|
5353
|
+
return Promise.resolve(pageContext.load()).then(function () {
|
5354
|
+
setPageContext(Object.assign({}, pageContext));
|
5355
|
+
});
|
5356
|
+
} catch (e) {
|
5357
|
+
return Promise.reject(e);
|
5358
|
+
}
|
5359
|
+
};
|
5360
|
+
|
5351
5361
|
var site = useContext(SiteContext);
|
5352
5362
|
var _props$id = props.id,
|
5353
5363
|
id = _props$id === void 0 ? "table" : _props$id,
|
@@ -5395,6 +5405,7 @@ var TablePage = function TablePage(props) {
|
|
5395
5405
|
pageContext = _useContext[0],
|
5396
5406
|
setPageContext = _useContext[1];
|
5397
5407
|
|
5408
|
+
var context = TableContext(url, field, host, urlQuery);
|
5398
5409
|
var selected = pageContext.selected;
|
5399
5410
|
var timer = useRef(null);
|
5400
5411
|
|
@@ -5402,20 +5413,8 @@ var TablePage = function TablePage(props) {
|
|
5402
5413
|
form = _useState[0],
|
5403
5414
|
setForm = _useState[1];
|
5404
5415
|
|
5405
|
-
useEffect(function () {
|
5406
|
-
setForm(selected);
|
5407
|
-
}, [selected]);
|
5408
|
-
useEffect(function () {
|
5409
|
-
if (autosave) {
|
5410
|
-
clearTimeout(timer.current);
|
5411
|
-
timer.current = setTimeout(function () {
|
5412
|
-
if (canSave()) save();
|
5413
|
-
}, delay);
|
5414
|
-
}
|
5415
|
-
}, [form]);
|
5416
5416
|
useEffect(function () {
|
5417
5417
|
try {
|
5418
|
-
var context = TableContext(url, field, host, urlQuery);
|
5419
5418
|
return Promise.resolve(context.load()).then(function () {
|
5420
5419
|
function _temp2() {
|
5421
5420
|
setPageContext(context);
|
@@ -5431,6 +5430,17 @@ var TablePage = function TablePage(props) {
|
|
5431
5430
|
return Promise.reject(e);
|
5432
5431
|
}
|
5433
5432
|
}, []);
|
5433
|
+
useEffect(function () {
|
5434
|
+
setForm(selected);
|
5435
|
+
}, [selected]);
|
5436
|
+
useEffect(function () {
|
5437
|
+
if (autosave) {
|
5438
|
+
clearTimeout(timer.current);
|
5439
|
+
timer.current = setTimeout(function () {
|
5440
|
+
if (canSave()) save();
|
5441
|
+
}, delay);
|
5442
|
+
}
|
5443
|
+
}, [form]);
|
5434
5444
|
|
5435
5445
|
function add() {
|
5436
5446
|
var onOK = function onOK(form) {
|
@@ -5530,7 +5540,11 @@ var TablePage = function TablePage(props) {
|
|
5530
5540
|
label: "A\xF1adir",
|
5531
5541
|
action: add,
|
5532
5542
|
raised: true
|
5533
|
-
}) : null,
|
5543
|
+
}) : null, "\xA0", /*#__PURE__*/React.createElement(Button, {
|
5544
|
+
icon: "refresh",
|
5545
|
+
label: "Reload",
|
5546
|
+
action: reload
|
5547
|
+
}), dev ? /*#__PURE__*/React.createElement(MenuIcon, {
|
5534
5548
|
align: "alignRight"
|
5535
5549
|
}, /*#__PURE__*/React.createElement(MenuItem, {
|
5536
5550
|
label: "Cargar Escenario 1",
|