react-crud-mobile 1.3.85 → 1.3.87

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.
@@ -1337,7 +1337,7 @@ function UIToast() {
1337
1337
 
1338
1338
  var _excluded = ["scope", "open", "dialog"];
1339
1339
  function UIModal(_ref) {
1340
- var _theme$styles, _main$dialog2;
1340
+ var _theme$styles, _scope$currentDialog2, _main$dialog2;
1341
1341
  var scope = _ref.scope,
1342
1342
  open = _ref.open,
1343
1343
  dialog = _ref.dialog,
@@ -1359,9 +1359,10 @@ function UIModal(_ref) {
1359
1359
  return _extends({}, scope.getStyle(part, st));
1360
1360
  };
1361
1361
  var onClose = function onClose() {
1362
+ var _scope$currentDialog;
1362
1363
  scope.close({
1363
1364
  scope: scope,
1364
- crud: scope.currentDialog,
1365
+ crud: (_scope$currentDialog = scope.currentDialog) == null ? void 0 : _scope$currentDialog.crud,
1365
1366
  event: {}
1366
1367
  });
1367
1368
  };
@@ -1397,7 +1398,9 @@ function UIModal(_ref) {
1397
1398
  scope: scope
1398
1399
  }, def));
1399
1400
  main.dialog = d;
1400
- scope.currentDialog = d;
1401
+ scope.currentDialog = {
1402
+ crud: d
1403
+ };
1401
1404
  toggle(true);
1402
1405
  scope.update();
1403
1406
  };
@@ -1412,7 +1415,7 @@ function UIModal(_ref) {
1412
1415
  }
1413
1416
  scope.update();
1414
1417
  };
1415
- var curr = scope.currentDialog;
1418
+ var curr = (_scope$currentDialog2 = scope.currentDialog) == null ? void 0 : _scope$currentDialog2.crud;
1416
1419
  if (!curr) {
1417
1420
  return /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {});
1418
1421
  }
@@ -1427,17 +1430,17 @@ function UIModal(_ref) {
1427
1430
  var defaults = {
1428
1431
  color: color
1429
1432
  };
1430
- var key = scope.currentDialog.name + "-" + index;
1433
+ var key = curr.name + "-" + index;
1431
1434
  var Content = function Content() {
1432
1435
  if (dialog != null && dialog.component) {
1433
1436
  var Aux = dialog == null ? void 0 : dialog.component;
1434
1437
  return /*#__PURE__*/jsxRuntime.jsx(Aux, {
1435
- crud: scope.currentDialog
1438
+ crud: curr
1436
1439
  });
1437
1440
  }
1438
1441
  return /*#__PURE__*/jsxRuntime.jsx(UIChildren, {
1439
1442
  scope: scope,
1440
- crud: scope.currentDialog,
1443
+ crud: curr,
1441
1444
  children: props.children
1442
1445
  });
1443
1446
  };
@@ -1466,7 +1469,7 @@ function UIModal(_ref) {
1466
1469
  children: label
1467
1470
  }), !reactCrudUtils.Utils.isEmpty(headerRight) && /*#__PURE__*/jsxRuntime.jsx(UIChildren, {
1468
1471
  scope: scope,
1469
- crud: scope.currentDialog,
1472
+ crud: curr,
1470
1473
  "transient": true,
1471
1474
  children: headerRight
1472
1475
  })]
@@ -1723,11 +1726,8 @@ function UIElement(props) {
1723
1726
  index = _useState2[0],
1724
1727
  setIndex = _useState2[1];
1725
1728
  var _useState3 = React.useState(null),
1726
- dialog = _useState3[0],
1727
- setDialog = _useState3[1];
1728
- var _useState4 = React.useState(null),
1729
- error = _useState4[0],
1730
- setError = _useState4[1];
1729
+ error = _useState3[0],
1730
+ setError = _useState3[1];
1731
1731
  scope.compile(props);
1732
1732
  crud = scope.crud;
1733
1733
  var options = scope.getOptions();
@@ -2031,6 +2031,7 @@ function UIElement(props) {
2031
2031
  return /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {});
2032
2032
  };
2033
2033
  var Container = function Container() {
2034
+ var _scope$currentDialog, _scope$currentDialog2;
2034
2035
  return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
2035
2036
  children: [isShowLabel() && /*#__PURE__*/jsxRuntime.jsxs(reactNative.View, {
2036
2037
  style: getStyle('outerLabel', {
@@ -2067,12 +2068,11 @@ function UIElement(props) {
2067
2068
  })), scope.isType('dialog') && /*#__PURE__*/jsxRuntime.jsx(UIModal, _extends({}, props, {
2068
2069
  scope: scope,
2069
2070
  crud: crud
2070
- })), dialog && /*#__PURE__*/jsxRuntime.jsx(UIModal, _extends({}, props, {
2071
+ })), ((_scope$currentDialog = scope.currentDialog) == null ? void 0 : _scope$currentDialog.component) && /*#__PURE__*/jsxRuntime.jsx(UIModal, _extends({}, props, {
2071
2072
  scope: scope,
2072
- crud: dialog.crud,
2073
+ crud: (_scope$currentDialog2 = scope.currentDialog) == null ? void 0 : _scope$currentDialog2.crud,
2073
2074
  open: true,
2074
- dialog: dialog,
2075
- children: dialog.component
2075
+ dialog: scope.currentDialog
2076
2076
  })), scope.isType('chart') && /*#__PURE__*/jsxRuntime.jsx(ElChart, _extends({}, props, {
2077
2077
  scope: scope,
2078
2078
  crud: crud
@@ -2148,12 +2148,11 @@ function UIElement(props) {
2148
2148
  scope: scope
2149
2149
  }, def));
2150
2150
  main.dialog = d;
2151
- scope.currentDialog = d;
2152
- dialog = {
2151
+ scope.currentDialog = {
2153
2152
  component: component,
2154
2153
  crud: d
2155
2154
  };
2156
- setDialog(dialog);
2155
+ scope.update();
2157
2156
  }
2158
2157
  };
2159
2158
  return /*#__PURE__*/jsxRuntime.jsx(CrudContext.Provider, {