react-crud-mobile 1.3.251 → 1.3.253

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,17 +1364,19 @@ function UIToast() {
1364
1364
  });
1365
1365
  }
1366
1366
 
1367
- var _excluded = ["scope"];
1367
+ var _excluded = ["scope", "open", "dialog"];
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,
1371
1373
  props = _objectWithoutPropertiesLoose(_ref, _excluded);
1372
- var _useState = useState(true),
1374
+ var _useState = useState(open === true),
1373
1375
  modalVisible = _useState[0],
1374
1376
  setModalVisible = _useState[1];
1375
1377
  var _useState2 = useState(0),
1376
1378
  index = _useState2[0];
1377
- var dialog = scope == null ? void 0 : scope.currentDialog;
1379
+ //v1
1378
1380
  var label = scope.getLabel();
1379
1381
  var theme = scope.getTheme();
1380
1382
  var headerStyle = Utils.nvl((_theme$styles = theme.styles) == null || (_theme$styles = _theme$styles.defaults) == null ? void 0 : _theme$styles.header, {});
@@ -1397,7 +1399,6 @@ function UIModal(_ref) {
1397
1399
  };
1398
1400
  var curr = (_scope$currentDialog2 = scope.currentDialog) == null ? void 0 : _scope$currentDialog2.crud;
1399
1401
  var main = ViewUtils.getCrud('view');
1400
- if (!scope.isType('dialog') && !(scope != null && scope.currentDialog)) return /*#__PURE__*/jsx(Fragment, {});
1401
1402
  if (!curr) {
1402
1403
  return /*#__PURE__*/jsx(Fragment, {});
1403
1404
  }
@@ -2126,6 +2127,7 @@ function UIElement(props) {
2126
2127
  return /*#__PURE__*/jsx(Fragment, {});
2127
2128
  };
2128
2129
  var Container = function Container() {
2130
+ var _scope$currentDialog2, _scope$currentDialog3, _scope$currentDialog4;
2129
2131
  return /*#__PURE__*/jsxs(Fragment, {
2130
2132
  children: [isShowLabel() && /*#__PURE__*/jsxs(View, {
2131
2133
  style: getStyle('outerLabel', {
@@ -2163,7 +2165,15 @@ function UIElement(props) {
2163
2165
  })), scope.isType('order') && /*#__PURE__*/jsx(UIOrder, _extends({}, props, {
2164
2166
  scope: scope,
2165
2167
  crud: crud
2166
- })), scope.isType('chart') && /*#__PURE__*/jsx(ElChart, _extends({}, props, {
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, {
2167
2177
  scope: scope,
2168
2178
  crud: crud
2169
2179
  })), scope.isType('tabs') && /*#__PURE__*/jsx(ElTabs, _extends({}, props, {
@@ -2176,9 +2186,6 @@ function UIElement(props) {
2176
2186
  scope: scope,
2177
2187
  crud: crud,
2178
2188
  style: getStyle('inner')
2179
- })), /*#__PURE__*/jsx(UIModal, _extends({}, props, {
2180
- scope: scope,
2181
- crud: crud
2182
2189
  }))]
2183
2190
  });
2184
2191
  };