react-crud-mobile 1.3.248 → 1.3.250

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,20 +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
1369
  var _theme$styles, _scope$currentDialog2, _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(true),
1375
1373
  modalVisible = _useState[0],
1376
1374
  setModalVisible = _useState[1];
1377
1375
  var _useState2 = useState(0),
1378
- index = _useState2[0],
1379
- setIndex = _useState2[1];
1380
- //v1
1376
+ index = _useState2[0];
1377
+ var dialog = scope == null ? void 0 : scope.currentDialog;
1381
1378
  var label = scope.getLabel();
1382
1379
  var theme = scope.getTheme();
1383
1380
  var headerStyle = Utils.nvl((_theme$styles = theme.styles) == null || (_theme$styles = _theme$styles.defaults) == null ? void 0 : _theme$styles.header, {});
@@ -1398,11 +1395,9 @@ function UIModal(_ref) {
1398
1395
  modalVisible = vis;
1399
1396
  setModalVisible(modalVisible);
1400
1397
  };
1401
- scope.update = function () {
1402
- setIndex(++index);
1403
- };
1404
1398
  var curr = (_scope$currentDialog2 = scope.currentDialog) == null ? void 0 : _scope$currentDialog2.crud;
1405
1399
  var main = ViewUtils.getCrud('view');
1400
+ if (!scope.isType('dialog') && !(scope != null && scope.currentDialog)) return /*#__PURE__*/jsx(Fragment, {});
1406
1401
  if (!curr) {
1407
1402
  return /*#__PURE__*/jsx(Fragment, {});
1408
1403
  }
@@ -2131,7 +2126,6 @@ function UIElement(props) {
2131
2126
  return /*#__PURE__*/jsx(Fragment, {});
2132
2127
  };
2133
2128
  var Container = function Container() {
2134
- var _scope$currentDialog2, _scope$currentDialog3, _scope$currentDialog4;
2135
2129
  return /*#__PURE__*/jsxs(Fragment, {
2136
2130
  children: [isShowLabel() && /*#__PURE__*/jsxs(View, {
2137
2131
  style: getStyle('outerLabel', {
@@ -2169,15 +2163,7 @@ function UIElement(props) {
2169
2163
  })), scope.isType('order') && /*#__PURE__*/jsx(UIOrder, _extends({}, props, {
2170
2164
  scope: scope,
2171
2165
  crud: crud
2172
- })), scope.isType('dialog') && /*#__PURE__*/jsx(UIModal, _extends({}, props, {
2173
- scope: scope,
2174
- crud: crud
2175
- })), ((_scope$currentDialog2 = scope.currentDialog) == null ? void 0 : _scope$currentDialog2.component) && /*#__PURE__*/jsx(UIModal, {
2176
- scope: (_scope$currentDialog3 = scope.currentDialog) == null ? void 0 : _scope$currentDialog3.scope,
2177
- crud: (_scope$currentDialog4 = scope.currentDialog) == null ? void 0 : _scope$currentDialog4.crud,
2178
- open: true,
2179
- dialog: scope.currentDialog
2180
- }), scope.isType('chart') && /*#__PURE__*/jsx(ElChart, _extends({}, props, {
2166
+ })), scope.isType('chart') && /*#__PURE__*/jsx(ElChart, _extends({}, props, {
2181
2167
  scope: scope,
2182
2168
  crud: crud
2183
2169
  })), scope.isType('tabs') && /*#__PURE__*/jsx(ElTabs, _extends({}, props, {
@@ -2190,6 +2176,9 @@ function UIElement(props) {
2190
2176
  scope: scope,
2191
2177
  crud: crud,
2192
2178
  style: getStyle('inner')
2179
+ })), /*#__PURE__*/jsx(UIModal, _extends({}, props, {
2180
+ scope: scope,
2181
+ crud: crud
2193
2182
  }))]
2194
2183
  });
2195
2184
  };