react-crud-mobile 1.3.253 → 1.3.254

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.
@@ -1364,18 +1364,17 @@ function UIToast() {
1364
1364
  });
1365
1365
  }
1366
1366
 
1367
- var _excluded = ["scope", "open", "dialog"];
1367
+ var _excluded = ["scope"];
1368
1368
  function UIModal(_ref) {
1369
- var _theme$styles, _scope$currentDialog2, _main$dialog;
1369
+ var _theme$styles, _main$dialog;
1370
1370
  var scope = _ref.scope,
1371
- open = _ref.open,
1372
- dialog = _ref.dialog,
1373
1371
  props = _objectWithoutPropertiesLoose(_ref, _excluded);
1374
- var _useState = useState(open === true),
1372
+ var _useState = useState(false),
1375
1373
  modalVisible = _useState[0],
1376
1374
  setModalVisible = _useState[1];
1377
1375
  var _useState2 = useState(0),
1378
1376
  index = _useState2[0];
1377
+ var dialog = scope.currentDialog;
1379
1378
  //v1
1380
1379
  var label = scope.getLabel();
1381
1380
  var theme = scope.getTheme();
@@ -1386,10 +1385,9 @@ function UIModal(_ref) {
1386
1385
  return _extends({}, scope.getStyle(part, st));
1387
1386
  };
1388
1387
  var onClose = function onClose() {
1389
- var _scope$currentDialog;
1390
1388
  scope.close({
1391
1389
  scope: scope,
1392
- crud: (_scope$currentDialog = scope.currentDialog) == null ? void 0 : _scope$currentDialog.crud,
1390
+ crud: dialog == null ? void 0 : dialog.crud,
1393
1391
  event: {}
1394
1392
  });
1395
1393
  };
@@ -1397,9 +1395,9 @@ function UIModal(_ref) {
1397
1395
  modalVisible = vis;
1398
1396
  setModalVisible(modalVisible);
1399
1397
  };
1400
- var curr = (_scope$currentDialog2 = scope.currentDialog) == null ? void 0 : _scope$currentDialog2.crud;
1398
+ var curr = dialog == null ? void 0 : dialog.crud;
1401
1399
  var main = ViewUtils.getCrud('view');
1402
- if (!curr) {
1400
+ if (!curr || dialog) {
1403
1401
  return /*#__PURE__*/jsx(Fragment, {});
1404
1402
  }
1405
1403
  if (curr.uuid !== ((_main$dialog = main.dialog) == null || (_main$dialog = _main$dialog.crud) == null ? void 0 : _main$dialog.uuid)) {
@@ -2127,7 +2125,6 @@ function UIElement(props) {
2127
2125
  return /*#__PURE__*/jsx(Fragment, {});
2128
2126
  };
2129
2127
  var Container = function Container() {
2130
- var _scope$currentDialog2, _scope$currentDialog3, _scope$currentDialog4;
2131
2128
  return /*#__PURE__*/jsxs(Fragment, {
2132
2129
  children: [isShowLabel() && /*#__PURE__*/jsxs(View, {
2133
2130
  style: getStyle('outerLabel', {
@@ -2165,15 +2162,7 @@ function UIElement(props) {
2165
2162
  })), scope.isType('order') && /*#__PURE__*/jsx(UIOrder, _extends({}, props, {
2166
2163
  scope: scope,
2167
2164
  crud: crud
2168
- })), scope.isType('dialog') && /*#__PURE__*/jsx(UIModal, _extends({}, props, {
2169
- scope: scope,
2170
- crud: crud
2171
- })), ((_scope$currentDialog2 = scope.currentDialog) == null ? void 0 : _scope$currentDialog2.component) && /*#__PURE__*/jsx(UIModal, {
2172
- scope: (_scope$currentDialog3 = scope.currentDialog) == null ? void 0 : _scope$currentDialog3.scope,
2173
- crud: (_scope$currentDialog4 = scope.currentDialog) == null ? void 0 : _scope$currentDialog4.crud,
2174
- open: true,
2175
- dialog: scope.currentDialog
2176
- }), scope.isType('chart') && /*#__PURE__*/jsx(ElChart, _extends({}, props, {
2165
+ })), scope.isType('chart') && /*#__PURE__*/jsx(ElChart, _extends({}, props, {
2177
2166
  scope: scope,
2178
2167
  crud: crud
2179
2168
  })), scope.isType('tabs') && /*#__PURE__*/jsx(ElTabs, _extends({}, props, {
@@ -2186,6 +2175,9 @@ function UIElement(props) {
2186
2175
  scope: scope,
2187
2176
  crud: crud,
2188
2177
  style: getStyle('inner')
2178
+ })), /*#__PURE__*/jsx(UIModal, _extends({}, props, {
2179
+ scope: scope,
2180
+ crud: crud
2189
2181
  }))]
2190
2182
  });
2191
2183
  };