react-crud-mobile 1.3.259 → 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.
- package/dist/elements/core/UIModal.d.ts +1 -1
- package/dist/react-crud-mobile.cjs.development.js +23 -24
- package/dist/react-crud-mobile.cjs.development.js.map +1 -1
- package/dist/react-crud-mobile.cjs.production.min.js +1 -1
- package/dist/react-crud-mobile.cjs.production.min.js.map +1 -1
- package/dist/react-crud-mobile.esm.js +23 -24
- package/dist/react-crud-mobile.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/elements/core/UIModal.tsx +20 -19
@@ -1364,22 +1364,32 @@ function UIToast() {
|
|
1364
1364
|
});
|
1365
1365
|
}
|
1366
1366
|
|
1367
|
-
|
1368
|
-
|
1369
|
-
var
|
1370
|
-
var scope = _ref.scope,
|
1371
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
1367
|
+
function UIModal(props) {
|
1368
|
+
var _main$dialog, _theme$styles;
|
1369
|
+
var owner = props.scope;
|
1372
1370
|
var _useState = useState(0),
|
1373
1371
|
index = _useState[0];
|
1374
|
-
var dialog =
|
1372
|
+
var dialog = owner.currentDialog;
|
1375
1373
|
var _useState2 = useState(!Utils.isEmpty(dialog)),
|
1376
1374
|
modalVisible = _useState2[0],
|
1377
1375
|
setModalVisible = _useState2[1];
|
1378
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;
|
1379
1387
|
var label = scope.getLabel();
|
1380
1388
|
var theme = scope.getTheme();
|
1381
1389
|
var headerStyle = Utils.nvl((_theme$styles = theme.styles) == null || (_theme$styles = _theme$styles.defaults) == null ? void 0 : _theme$styles.header, {});
|
1382
1390
|
var scrollRef = useRef(null);
|
1391
|
+
var headerRight = ComponentUtils.getDefine(props, 'header', 'right');
|
1392
|
+
var bottom = ComponentUtils.getDefine(props, 'bottom');
|
1383
1393
|
var style = function style(part, extra) {
|
1384
1394
|
var st = _extends({}, styles$8[part], extra);
|
1385
1395
|
return _extends({}, scope.getStyle(part, st));
|
@@ -1395,27 +1405,16 @@ function UIModal(_ref) {
|
|
1395
1405
|
modalVisible = vis;
|
1396
1406
|
setModalVisible(modalVisible);
|
1397
1407
|
};
|
1398
|
-
var curr = dialog == null ? void 0 : dialog.crud;
|
1399
|
-
var main = ViewUtils.getCrud('view');
|
1400
|
-
if (!dialog) {
|
1401
|
-
return /*#__PURE__*/jsx(Fragment, {});
|
1402
|
-
}
|
1403
|
-
if (dialog.debug) console.log(dialog);
|
1404
|
-
if (curr.uuid !== ((_main$dialog = main.dialog) == null || (_main$dialog = _main$dialog.crud) == null ? void 0 : _main$dialog.uuid)) {
|
1405
|
-
return /*#__PURE__*/jsx(Fragment, {});
|
1406
|
-
}
|
1407
|
-
var headerRight = ComponentUtils.getDefine(props, 'header', 'right');
|
1408
|
-
var bottom = ComponentUtils.getDefine(props, 'bottom');
|
1409
1408
|
scope.put('scrollRef', scrollRef);
|
1410
|
-
var original =
|
1409
|
+
var original = owner.original;
|
1411
1410
|
ComponentUtils.setViewScope(scope);
|
1412
1411
|
var color = Utils.nvl(headerStyle.color, 'white');
|
1413
1412
|
var defaults = {
|
1414
1413
|
color: color
|
1415
1414
|
};
|
1416
1415
|
var key = curr.name + "-" + index;
|
1417
|
-
var ModalContent = function ModalContent(
|
1418
|
-
var children =
|
1416
|
+
var ModalContent = function ModalContent(_ref) {
|
1417
|
+
var children = _ref.children;
|
1419
1418
|
var disableScroll = scope.part('disableScroll', false);
|
1420
1419
|
var disableContent = scope.part('disableContent', false);
|
1421
1420
|
if (disableContent) {
|
@@ -1440,8 +1439,8 @@ function UIModal(_ref) {
|
|
1440
1439
|
children: children
|
1441
1440
|
});
|
1442
1441
|
};
|
1443
|
-
var ModalView = function ModalView(
|
1444
|
-
var children =
|
1442
|
+
var ModalView = function ModalView(_ref2) {
|
1443
|
+
var children = _ref2.children;
|
1445
1444
|
if (original.gesture) {
|
1446
1445
|
return /*#__PURE__*/jsx(GestureHandlerRootView, {
|
1447
1446
|
style: {
|
@@ -2520,7 +2519,7 @@ function GestureView(props) {
|
|
2520
2519
|
});
|
2521
2520
|
}
|
2522
2521
|
|
2523
|
-
var _excluded
|
2522
|
+
var _excluded = ["type"];
|
2524
2523
|
var UI = {
|
2525
2524
|
Order: function Order(props) {
|
2526
2525
|
return /*#__PURE__*/jsx(UIElement, _extends({}, props, {
|
@@ -2564,7 +2563,7 @@ var UI = {
|
|
2564
2563
|
return /*#__PURE__*/jsx(UIInclude, _extends({}, props));
|
2565
2564
|
},
|
2566
2565
|
Column: function Column(_ref) {
|
2567
|
-
var props = _objectWithoutPropertiesLoose(_ref, _excluded
|
2566
|
+
var props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
2568
2567
|
return /*#__PURE__*/jsx(UIElement, _extends({}, props, {
|
2569
2568
|
type: "column"
|
2570
2569
|
}));
|