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.
@@ -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;
@@ -1900,8 +1898,6 @@ var TokenField = function TokenField(_ref) {
1900
1898
  value = _useState[0],
1901
1899
  setValue = _useState[1];
1902
1900
 
1903
- useState(false);
1904
-
1905
1901
  function remove(index) {
1906
1902
  var next = tokens.slice();
1907
1903
  next.splice(index, 1);
@@ -3459,7 +3455,8 @@ var UploadDialog = function UploadDialog(_ref) {
3459
3455
  accept = _ref.accept,
3460
3456
  onSuccess = _ref.onSuccess,
3461
3457
  onComplete = _ref.onComplete,
3462
- onClose = _ref.onClose;
3458
+ onClose = _ref.onClose,
3459
+ children = _ref.children;
3463
3460
  var site = useContext(SiteContext);
3464
3461
 
3465
3462
  function success(file, message) {
@@ -3497,7 +3494,7 @@ var UploadDialog = function UploadDialog(_ref) {
3497
3494
  target: target,
3498
3495
  onSuccess: success,
3499
3496
  onComplete: complete
3500
- }));
3497
+ }), children);
3501
3498
  };
3502
3499
 
3503
3500
  /**
@@ -5349,6 +5346,16 @@ var TablePage = function TablePage(props) {
5349
5346
  }
5350
5347
  };
5351
5348
 
5349
+ var reload = function reload() {
5350
+ try {
5351
+ return Promise.resolve(pageContext.load()).then(function () {
5352
+ setPageContext(Object.assign({}, pageContext));
5353
+ });
5354
+ } catch (e) {
5355
+ return Promise.reject(e);
5356
+ }
5357
+ };
5358
+
5352
5359
  var site = useContext(SiteContext);
5353
5360
  var _props$id = props.id,
5354
5361
  id = _props$id === void 0 ? "table" : _props$id,
@@ -5396,6 +5403,7 @@ var TablePage = function TablePage(props) {
5396
5403
  pageContext = _useContext[0],
5397
5404
  setPageContext = _useContext[1];
5398
5405
 
5406
+ var context = TableContext(url, field, host, urlQuery);
5399
5407
  var selected = pageContext.selected;
5400
5408
  var timer = useRef(null);
5401
5409
 
@@ -5403,20 +5411,8 @@ var TablePage = function TablePage(props) {
5403
5411
  form = _useState[0],
5404
5412
  setForm = _useState[1];
5405
5413
 
5406
- useEffect(function () {
5407
- setForm(selected);
5408
- }, [selected]);
5409
- useEffect(function () {
5410
- if (autosave) {
5411
- clearTimeout(timer.current);
5412
- timer.current = setTimeout(function () {
5413
- if (canSave()) save();
5414
- }, delay);
5415
- }
5416
- }, [form]);
5417
5414
  useEffect(function () {
5418
5415
  try {
5419
- var context = TableContext(url, field, host, urlQuery);
5420
5416
  return Promise.resolve(context.load()).then(function () {
5421
5417
  function _temp2() {
5422
5418
  setPageContext(context);
@@ -5432,6 +5428,17 @@ var TablePage = function TablePage(props) {
5432
5428
  return Promise.reject(e);
5433
5429
  }
5434
5430
  }, []);
5431
+ useEffect(function () {
5432
+ setForm(selected);
5433
+ }, [selected]);
5434
+ useEffect(function () {
5435
+ if (autosave) {
5436
+ clearTimeout(timer.current);
5437
+ timer.current = setTimeout(function () {
5438
+ if (canSave()) save();
5439
+ }, delay);
5440
+ }
5441
+ }, [form]);
5435
5442
 
5436
5443
  function add() {
5437
5444
  var onOK = function onOK(form) {
@@ -5531,7 +5538,11 @@ var TablePage = function TablePage(props) {
5531
5538
  label: "A\xF1adir",
5532
5539
  action: add,
5533
5540
  raised: true
5534
- }) : null, dev ? /*#__PURE__*/React.createElement(MenuIcon, {
5541
+ }) : null, "\xA0", /*#__PURE__*/React.createElement(Button, {
5542
+ icon: "refresh",
5543
+ label: "Reload",
5544
+ action: reload
5545
+ }), dev ? /*#__PURE__*/React.createElement(MenuIcon, {
5535
5546
  align: "alignRight"
5536
5547
  }, /*#__PURE__*/React.createElement(MenuItem, {
5537
5548
  label: "Cargar Escenario 1",