ywana-core8 0.0.420 → 0.0.423
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 +30 -19
- package/dist/index.cjs.map +1 -1
- package/dist/index.modern.js +30 -19
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +30 -19
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/domain/TablePage.js +13 -6
- package/src/html/table.js +0 -2
- package/src/html/table.test.js +6 -1
- package/src/html/textfield.js +0 -1
- package/src/html/textfield.test.js +7 -0
- package/src/html/tokenfield.js +0 -1
- package/src/widgets/upload/UploadDialog.js +2 -1
package/dist/index.cjs
CHANGED
@@ -1103,8 +1103,6 @@ var DropDown = function DropDown(props) {
|
|
1103
1103
|
setLabel = _useState2[1];
|
1104
1104
|
|
1105
1105
|
React.useEffect(function () {
|
1106
|
-
console.log('DD change value', label);
|
1107
|
-
|
1108
1106
|
if (Array.isArray(options)) {
|
1109
1107
|
var option = options.find(function (option) {
|
1110
1108
|
return option.value === value;
|
@@ -1908,8 +1906,6 @@ var TokenField = function TokenField(_ref) {
|
|
1908
1906
|
value = _useState[0],
|
1909
1907
|
setValue = _useState[1];
|
1910
1908
|
|
1911
|
-
React.useState(false);
|
1912
|
-
|
1913
1909
|
function remove(index) {
|
1914
1910
|
var next = tokens.slice();
|
1915
1911
|
next.splice(index, 1);
|
@@ -3467,7 +3463,8 @@ var UploadDialog = function UploadDialog(_ref) {
|
|
3467
3463
|
accept = _ref.accept,
|
3468
3464
|
onSuccess = _ref.onSuccess,
|
3469
3465
|
onComplete = _ref.onComplete,
|
3470
|
-
onClose = _ref.onClose
|
3466
|
+
onClose = _ref.onClose,
|
3467
|
+
children = _ref.children;
|
3471
3468
|
var site = React.useContext(SiteContext);
|
3472
3469
|
|
3473
3470
|
function success(file, message) {
|
@@ -3505,7 +3502,7 @@ var UploadDialog = function UploadDialog(_ref) {
|
|
3505
3502
|
target: target,
|
3506
3503
|
onSuccess: success,
|
3507
3504
|
onComplete: complete
|
3508
|
-
}));
|
3505
|
+
}), children);
|
3509
3506
|
};
|
3510
3507
|
|
3511
3508
|
/**
|
@@ -5357,6 +5354,16 @@ var TablePage = function TablePage(props) {
|
|
5357
5354
|
}
|
5358
5355
|
};
|
5359
5356
|
|
5357
|
+
var reload = function reload() {
|
5358
|
+
try {
|
5359
|
+
return Promise.resolve(pageContext.load()).then(function () {
|
5360
|
+
setPageContext(Object.assign({}, pageContext));
|
5361
|
+
});
|
5362
|
+
} catch (e) {
|
5363
|
+
return Promise.reject(e);
|
5364
|
+
}
|
5365
|
+
};
|
5366
|
+
|
5360
5367
|
var site = React.useContext(SiteContext);
|
5361
5368
|
var _props$id = props.id,
|
5362
5369
|
id = _props$id === void 0 ? "table" : _props$id,
|
@@ -5404,6 +5411,7 @@ var TablePage = function TablePage(props) {
|
|
5404
5411
|
pageContext = _useContext[0],
|
5405
5412
|
setPageContext = _useContext[1];
|
5406
5413
|
|
5414
|
+
var context = TableContext(url, field, host, urlQuery);
|
5407
5415
|
var selected = pageContext.selected;
|
5408
5416
|
var timer = React.useRef(null);
|
5409
5417
|
|
@@ -5411,20 +5419,8 @@ var TablePage = function TablePage(props) {
|
|
5411
5419
|
form = _useState[0],
|
5412
5420
|
setForm = _useState[1];
|
5413
5421
|
|
5414
|
-
React.useEffect(function () {
|
5415
|
-
setForm(selected);
|
5416
|
-
}, [selected]);
|
5417
|
-
React.useEffect(function () {
|
5418
|
-
if (autosave) {
|
5419
|
-
clearTimeout(timer.current);
|
5420
|
-
timer.current = setTimeout(function () {
|
5421
|
-
if (canSave()) save();
|
5422
|
-
}, delay);
|
5423
|
-
}
|
5424
|
-
}, [form]);
|
5425
5422
|
React.useEffect(function () {
|
5426
5423
|
try {
|
5427
|
-
var context = TableContext(url, field, host, urlQuery);
|
5428
5424
|
return Promise.resolve(context.load()).then(function () {
|
5429
5425
|
function _temp2() {
|
5430
5426
|
setPageContext(context);
|
@@ -5440,6 +5436,17 @@ var TablePage = function TablePage(props) {
|
|
5440
5436
|
return Promise.reject(e);
|
5441
5437
|
}
|
5442
5438
|
}, []);
|
5439
|
+
React.useEffect(function () {
|
5440
|
+
setForm(selected);
|
5441
|
+
}, [selected]);
|
5442
|
+
React.useEffect(function () {
|
5443
|
+
if (autosave) {
|
5444
|
+
clearTimeout(timer.current);
|
5445
|
+
timer.current = setTimeout(function () {
|
5446
|
+
if (canSave()) save();
|
5447
|
+
}, delay);
|
5448
|
+
}
|
5449
|
+
}, [form]);
|
5443
5450
|
|
5444
5451
|
function add() {
|
5445
5452
|
var onOK = function onOK(form) {
|
@@ -5539,7 +5546,11 @@ var TablePage = function TablePage(props) {
|
|
5539
5546
|
label: "A\xF1adir",
|
5540
5547
|
action: add,
|
5541
5548
|
raised: true
|
5542
|
-
}) : null,
|
5549
|
+
}) : null, "\xA0", /*#__PURE__*/React__default["default"].createElement(Button, {
|
5550
|
+
icon: "refresh",
|
5551
|
+
label: "Reload",
|
5552
|
+
action: reload
|
5553
|
+
}), dev ? /*#__PURE__*/React__default["default"].createElement(MenuIcon, {
|
5543
5554
|
align: "alignRight"
|
5544
5555
|
}, /*#__PURE__*/React__default["default"].createElement(MenuItem, {
|
5545
5556
|
label: "Cargar Escenario 1",
|