react-crud-mobile 1.3.248 → 1.3.249

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,19 @@ 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
1376
  index = _useState2[0],
1379
1377
  setIndex = _useState2[1];
1380
- //v1
1378
+ if (!scope.isType('dialog') && !(scope != null && scope.currentDialog)) return /*#__PURE__*/jsx(Fragment, {});
1379
+ var dialog = scope == null ? void 0 : scope.currentDialog;
1381
1380
  var label = scope.getLabel();
1382
1381
  var theme = scope.getTheme();
1383
1382
  var headerStyle = Utils.nvl((_theme$styles = theme.styles) == null || (_theme$styles = _theme$styles.defaults) == null ? void 0 : _theme$styles.header, {});
@@ -2131,7 +2130,6 @@ function UIElement(props) {
2131
2130
  return /*#__PURE__*/jsx(Fragment, {});
2132
2131
  };
2133
2132
  var Container = function Container() {
2134
- var _scope$currentDialog2, _scope$currentDialog3, _scope$currentDialog4;
2135
2133
  return /*#__PURE__*/jsxs(Fragment, {
2136
2134
  children: [isShowLabel() && /*#__PURE__*/jsxs(View, {
2137
2135
  style: getStyle('outerLabel', {
@@ -2169,15 +2167,7 @@ function UIElement(props) {
2169
2167
  })), scope.isType('order') && /*#__PURE__*/jsx(UIOrder, _extends({}, props, {
2170
2168
  scope: scope,
2171
2169
  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, {
2170
+ })), scope.isType('chart') && /*#__PURE__*/jsx(ElChart, _extends({}, props, {
2181
2171
  scope: scope,
2182
2172
  crud: crud
2183
2173
  })), scope.isType('tabs') && /*#__PURE__*/jsx(ElTabs, _extends({}, props, {
@@ -2190,6 +2180,9 @@ function UIElement(props) {
2190
2180
  scope: scope,
2191
2181
  crud: crud,
2192
2182
  style: getStyle('inner')
2183
+ })), /*#__PURE__*/jsx(UIModal, _extends({}, props, {
2184
+ scope: scope,
2185
+ crud: crud
2193
2186
  }))]
2194
2187
  });
2195
2188
  };