react-crud-mobile 1.3.247 → 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.
@@ -4,5 +4,5 @@ interface UIModalType extends ChildType {
4
4
  open?: boolean;
5
5
  dialog?: any;
6
6
  }
7
- export default function UIModal({ scope, open, dialog, ...props }: UIModalType): import("react").JSX.Element;
7
+ export default function UIModal({ scope, ...props }: UIModalType): import("react").JSX.Element;
8
8
  export {};
@@ -1373,20 +1373,19 @@ function UIToast() {
1373
1373
  });
1374
1374
  }
1375
1375
 
1376
- var _excluded = ["scope", "open", "dialog"];
1376
+ var _excluded = ["scope"];
1377
1377
  function UIModal(_ref) {
1378
1378
  var _theme$styles, _scope$currentDialog2, _main$dialog;
1379
1379
  var scope = _ref.scope,
1380
- open = _ref.open,
1381
- dialog = _ref.dialog,
1382
1380
  props = _objectWithoutPropertiesLoose(_ref, _excluded);
1383
- var _useState = React.useState(open === true),
1381
+ var _useState = React.useState(true),
1384
1382
  modalVisible = _useState[0],
1385
1383
  setModalVisible = _useState[1];
1386
1384
  var _useState2 = React.useState(0),
1387
1385
  index = _useState2[0],
1388
1386
  setIndex = _useState2[1];
1389
- //v1
1387
+ if (!scope.isType('dialog') && !(scope != null && scope.currentDialog)) return /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {});
1388
+ var dialog = scope == null ? void 0 : scope.currentDialog;
1390
1389
  var label = scope.getLabel();
1391
1390
  var theme = scope.getTheme();
1392
1391
  var headerStyle = reactCrudUtils.Utils.nvl((_theme$styles = theme.styles) == null || (_theme$styles = _theme$styles.defaults) == null ? void 0 : _theme$styles.header, {});
@@ -2140,7 +2139,6 @@ function UIElement(props) {
2140
2139
  return /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {});
2141
2140
  };
2142
2141
  var Container = function Container() {
2143
- var _scope$currentDialog2, _scope$currentDialog3, _scope$currentDialog4;
2144
2142
  return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
2145
2143
  children: [isShowLabel() && /*#__PURE__*/jsxRuntime.jsxs(reactNative.View, {
2146
2144
  style: getStyle('outerLabel', {
@@ -2178,15 +2176,7 @@ function UIElement(props) {
2178
2176
  })), scope.isType('order') && /*#__PURE__*/jsxRuntime.jsx(UIOrder, _extends({}, props, {
2179
2177
  scope: scope,
2180
2178
  crud: crud
2181
- })), scope.isType('dialog') && /*#__PURE__*/jsxRuntime.jsx(UIModal, _extends({}, props, {
2182
- scope: scope,
2183
- crud: crud
2184
- })), ((_scope$currentDialog2 = scope.currentDialog) == null ? void 0 : _scope$currentDialog2.component) && /*#__PURE__*/jsxRuntime.jsx(UIModal, {
2185
- scope: (_scope$currentDialog3 = scope.currentDialog) == null ? void 0 : _scope$currentDialog3.scope,
2186
- crud: (_scope$currentDialog4 = scope.currentDialog) == null ? void 0 : _scope$currentDialog4.crud,
2187
- open: true,
2188
- dialog: scope.currentDialog
2189
- }), scope.isType('chart') && /*#__PURE__*/jsxRuntime.jsx(ElChart, _extends({}, props, {
2179
+ })), scope.isType('chart') && /*#__PURE__*/jsxRuntime.jsx(ElChart, _extends({}, props, {
2190
2180
  scope: scope,
2191
2181
  crud: crud
2192
2182
  })), scope.isType('tabs') && /*#__PURE__*/jsxRuntime.jsx(ElTabs, _extends({}, props, {
@@ -2199,6 +2189,9 @@ function UIElement(props) {
2199
2189
  scope: scope,
2200
2190
  crud: crud,
2201
2191
  style: getStyle('inner')
2192
+ })), /*#__PURE__*/jsxRuntime.jsx(UIModal, _extends({}, props, {
2193
+ scope: scope,
2194
+ crud: crud
2202
2195
  }))]
2203
2196
  });
2204
2197
  };