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.umd.js CHANGED
@@ -1098,8 +1098,6 @@
1098
1098
  setLabel = _useState2[1];
1099
1099
 
1100
1100
  React.useEffect(function () {
1101
- console.log('DD change value', label);
1102
-
1103
1101
  if (Array.isArray(options)) {
1104
1102
  var option = options.find(function (option) {
1105
1103
  return option.value === value;
@@ -3461,7 +3459,8 @@
3461
3459
  onSuccess = _ref.onSuccess,
3462
3460
  onComplete = _ref.onComplete,
3463
3461
  onClose = _ref.onClose,
3464
- children = _ref.children;
3462
+ children = _ref.children,
3463
+ className = _ref.className;
3465
3464
  var site = React.useContext(SiteContext);
3466
3465
 
3467
3466
  function success(file, message) {
@@ -3492,7 +3491,8 @@
3492
3491
  title: title,
3493
3492
  open: true,
3494
3493
  onAction: onAction,
3495
- actions: actions
3494
+ actions: actions,
3495
+ className: className
3496
3496
  }, /*#__PURE__*/React__default["default"].createElement(Uploader, {
3497
3497
  label: label,
3498
3498
  accept: accept,
@@ -5351,6 +5351,16 @@
5351
5351
  }
5352
5352
  };
5353
5353
 
5354
+ var reload = function reload() {
5355
+ try {
5356
+ return Promise.resolve(pageContext.load()).then(function () {
5357
+ setPageContext(Object.assign({}, pageContext));
5358
+ });
5359
+ } catch (e) {
5360
+ return Promise.reject(e);
5361
+ }
5362
+ };
5363
+
5354
5364
  var site = React.useContext(SiteContext);
5355
5365
  var _props$id = props.id,
5356
5366
  id = _props$id === void 0 ? "table" : _props$id,
@@ -5398,6 +5408,7 @@
5398
5408
  pageContext = _useContext[0],
5399
5409
  setPageContext = _useContext[1];
5400
5410
 
5411
+ var context = TableContext(url, field, host, urlQuery);
5401
5412
  var selected = pageContext.selected;
5402
5413
  var timer = React.useRef(null);
5403
5414
 
@@ -5405,20 +5416,8 @@
5405
5416
  form = _useState[0],
5406
5417
  setForm = _useState[1];
5407
5418
 
5408
- React.useEffect(function () {
5409
- setForm(selected);
5410
- }, [selected]);
5411
- React.useEffect(function () {
5412
- if (autosave) {
5413
- clearTimeout(timer.current);
5414
- timer.current = setTimeout(function () {
5415
- if (canSave()) save();
5416
- }, delay);
5417
- }
5418
- }, [form]);
5419
5419
  React.useEffect(function () {
5420
5420
  try {
5421
- var context = TableContext(url, field, host, urlQuery);
5422
5421
  return Promise.resolve(context.load()).then(function () {
5423
5422
  function _temp2() {
5424
5423
  setPageContext(context);
@@ -5434,6 +5433,17 @@
5434
5433
  return Promise.reject(e);
5435
5434
  }
5436
5435
  }, []);
5436
+ React.useEffect(function () {
5437
+ setForm(selected);
5438
+ }, [selected]);
5439
+ React.useEffect(function () {
5440
+ if (autosave) {
5441
+ clearTimeout(timer.current);
5442
+ timer.current = setTimeout(function () {
5443
+ if (canSave()) save();
5444
+ }, delay);
5445
+ }
5446
+ }, [form]);
5437
5447
 
5438
5448
  function add() {
5439
5449
  var onOK = function onOK(form) {
@@ -5533,7 +5543,11 @@
5533
5543
  label: "A\xF1adir",
5534
5544
  action: add,
5535
5545
  raised: true
5536
- }) : null, dev ? /*#__PURE__*/React__default["default"].createElement(MenuIcon, {
5546
+ }) : null, "\xA0", /*#__PURE__*/React__default["default"].createElement(Button, {
5547
+ icon: "refresh",
5548
+ label: "Reload",
5549
+ action: reload
5550
+ }), dev ? /*#__PURE__*/React__default["default"].createElement(MenuIcon, {
5537
5551
  align: "alignRight"
5538
5552
  }, /*#__PURE__*/React__default["default"].createElement(MenuItem, {
5539
5553
  label: "Cargar Escenario 1",