react-crud-mobile 1.3.260 → 1.3.261

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.
@@ -1365,20 +1365,31 @@ function UIToast() {
1365
1365
  }
1366
1366
 
1367
1367
  function UIModal(props) {
1368
- var _theme$styles, _main$dialog;
1368
+ var _main$dialog, _theme$styles;
1369
1369
  var owner = props.scope;
1370
1370
  var _useState = useState(0),
1371
1371
  index = _useState[0];
1372
1372
  var dialog = owner.currentDialog;
1373
- var scope = dialog.scope;
1374
1373
  var _useState2 = useState(!Utils.isEmpty(dialog)),
1375
1374
  modalVisible = _useState2[0],
1376
1375
  setModalVisible = _useState2[1];
1377
1376
  //v1
1377
+ var curr = dialog == null ? void 0 : dialog.crud;
1378
+ var main = ViewUtils.getCrud('view');
1379
+ if (!dialog) {
1380
+ return /*#__PURE__*/jsx(Fragment, {});
1381
+ }
1382
+ if (dialog.debug) console.log(dialog);
1383
+ if (curr.uuid !== ((_main$dialog = main.dialog) == null || (_main$dialog = _main$dialog.crud) == null ? void 0 : _main$dialog.uuid)) {
1384
+ return /*#__PURE__*/jsx(Fragment, {});
1385
+ }
1386
+ var scope = dialog.scope;
1378
1387
  var label = scope.getLabel();
1379
1388
  var theme = scope.getTheme();
1380
1389
  var headerStyle = Utils.nvl((_theme$styles = theme.styles) == null || (_theme$styles = _theme$styles.defaults) == null ? void 0 : _theme$styles.header, {});
1381
1390
  var scrollRef = useRef(null);
1391
+ var headerRight = ComponentUtils.getDefine(props, 'header', 'right');
1392
+ var bottom = ComponentUtils.getDefine(props, 'bottom');
1382
1393
  var style = function style(part, extra) {
1383
1394
  var st = _extends({}, styles$8[part], extra);
1384
1395
  return _extends({}, scope.getStyle(part, st));
@@ -1394,17 +1405,6 @@ function UIModal(props) {
1394
1405
  modalVisible = vis;
1395
1406
  setModalVisible(modalVisible);
1396
1407
  };
1397
- var curr = dialog == null ? void 0 : dialog.crud;
1398
- var main = ViewUtils.getCrud('view');
1399
- if (!dialog) {
1400
- return /*#__PURE__*/jsx(Fragment, {});
1401
- }
1402
- if (dialog.debug) console.log(dialog);
1403
- if (curr.uuid !== ((_main$dialog = main.dialog) == null || (_main$dialog = _main$dialog.crud) == null ? void 0 : _main$dialog.uuid)) {
1404
- return /*#__PURE__*/jsx(Fragment, {});
1405
- }
1406
- var headerRight = ComponentUtils.getDefine(props, 'header', 'right');
1407
- var bottom = ComponentUtils.getDefine(props, 'bottom');
1408
1408
  scope.put('scrollRef', scrollRef);
1409
1409
  var original = owner.original;
1410
1410
  ComponentUtils.setViewScope(scope);