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
@@ -4,5 +4,5 @@ interface UIModalType extends ChildType {
|
|
4
4
|
open?: boolean;
|
5
5
|
dialog?: any;
|
6
6
|
}
|
7
|
-
export default function UIModal(
|
7
|
+
export default function UIModal(props: UIModalType): import("react").JSX.Element;
|
8
8
|
export {};
|
@@ -1373,22 +1373,32 @@ function UIToast() {
|
|
1373
1373
|
});
|
1374
1374
|
}
|
1375
1375
|
|
1376
|
-
|
1377
|
-
|
1378
|
-
var
|
1379
|
-
var scope = _ref.scope,
|
1380
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
1376
|
+
function UIModal(props) {
|
1377
|
+
var _main$dialog, _theme$styles;
|
1378
|
+
var owner = props.scope;
|
1381
1379
|
var _useState = React.useState(0),
|
1382
1380
|
index = _useState[0];
|
1383
|
-
var dialog =
|
1381
|
+
var dialog = owner.currentDialog;
|
1384
1382
|
var _useState2 = React.useState(!reactCrudUtils.Utils.isEmpty(dialog)),
|
1385
1383
|
modalVisible = _useState2[0],
|
1386
1384
|
setModalVisible = _useState2[1];
|
1387
1385
|
//v1
|
1386
|
+
var curr = dialog == null ? void 0 : dialog.crud;
|
1387
|
+
var main = reactCrudUtils.ViewUtils.getCrud('view');
|
1388
|
+
if (!dialog) {
|
1389
|
+
return /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {});
|
1390
|
+
}
|
1391
|
+
if (dialog.debug) console.log(dialog);
|
1392
|
+
if (curr.uuid !== ((_main$dialog = main.dialog) == null || (_main$dialog = _main$dialog.crud) == null ? void 0 : _main$dialog.uuid)) {
|
1393
|
+
return /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {});
|
1394
|
+
}
|
1395
|
+
var scope = dialog.scope;
|
1388
1396
|
var label = scope.getLabel();
|
1389
1397
|
var theme = scope.getTheme();
|
1390
1398
|
var headerStyle = reactCrudUtils.Utils.nvl((_theme$styles = theme.styles) == null || (_theme$styles = _theme$styles.defaults) == null ? void 0 : _theme$styles.header, {});
|
1391
1399
|
var scrollRef = React.useRef(null);
|
1400
|
+
var headerRight = reactCrudUtils.ComponentUtils.getDefine(props, 'header', 'right');
|
1401
|
+
var bottom = reactCrudUtils.ComponentUtils.getDefine(props, 'bottom');
|
1392
1402
|
var style = function style(part, extra) {
|
1393
1403
|
var st = _extends({}, styles$8[part], extra);
|
1394
1404
|
return _extends({}, scope.getStyle(part, st));
|
@@ -1404,27 +1414,16 @@ function UIModal(_ref) {
|
|
1404
1414
|
modalVisible = vis;
|
1405
1415
|
setModalVisible(modalVisible);
|
1406
1416
|
};
|
1407
|
-
var curr = dialog == null ? void 0 : dialog.crud;
|
1408
|
-
var main = reactCrudUtils.ViewUtils.getCrud('view');
|
1409
|
-
if (!dialog) {
|
1410
|
-
return /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {});
|
1411
|
-
}
|
1412
|
-
if (dialog.debug) console.log(dialog);
|
1413
|
-
if (curr.uuid !== ((_main$dialog = main.dialog) == null || (_main$dialog = _main$dialog.crud) == null ? void 0 : _main$dialog.uuid)) {
|
1414
|
-
return /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {});
|
1415
|
-
}
|
1416
|
-
var headerRight = reactCrudUtils.ComponentUtils.getDefine(props, 'header', 'right');
|
1417
|
-
var bottom = reactCrudUtils.ComponentUtils.getDefine(props, 'bottom');
|
1418
1417
|
scope.put('scrollRef', scrollRef);
|
1419
|
-
var original =
|
1418
|
+
var original = owner.original;
|
1420
1419
|
reactCrudUtils.ComponentUtils.setViewScope(scope);
|
1421
1420
|
var color = reactCrudUtils.Utils.nvl(headerStyle.color, 'white');
|
1422
1421
|
var defaults = {
|
1423
1422
|
color: color
|
1424
1423
|
};
|
1425
1424
|
var key = curr.name + "-" + index;
|
1426
|
-
var ModalContent = function ModalContent(
|
1427
|
-
var children =
|
1425
|
+
var ModalContent = function ModalContent(_ref) {
|
1426
|
+
var children = _ref.children;
|
1428
1427
|
var disableScroll = scope.part('disableScroll', false);
|
1429
1428
|
var disableContent = scope.part('disableContent', false);
|
1430
1429
|
if (disableContent) {
|
@@ -1449,8 +1448,8 @@ function UIModal(_ref) {
|
|
1449
1448
|
children: children
|
1450
1449
|
});
|
1451
1450
|
};
|
1452
|
-
var ModalView = function ModalView(
|
1453
|
-
var children =
|
1451
|
+
var ModalView = function ModalView(_ref2) {
|
1452
|
+
var children = _ref2.children;
|
1454
1453
|
if (original.gesture) {
|
1455
1454
|
return /*#__PURE__*/jsxRuntime.jsx(reactNativeGestureHandler.GestureHandlerRootView, {
|
1456
1455
|
style: {
|
@@ -2529,7 +2528,7 @@ function GestureView(props) {
|
|
2529
2528
|
});
|
2530
2529
|
}
|
2531
2530
|
|
2532
|
-
var _excluded
|
2531
|
+
var _excluded = ["type"];
|
2533
2532
|
var UI = {
|
2534
2533
|
Order: function Order(props) {
|
2535
2534
|
return /*#__PURE__*/jsxRuntime.jsx(UIElement, _extends({}, props, {
|
@@ -2573,7 +2572,7 @@ var UI = {
|
|
2573
2572
|
return /*#__PURE__*/jsxRuntime.jsx(UIInclude, _extends({}, props));
|
2574
2573
|
},
|
2575
2574
|
Column: function Column(_ref) {
|
2576
|
-
var props = _objectWithoutPropertiesLoose(_ref, _excluded
|
2575
|
+
var props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
2577
2576
|
return /*#__PURE__*/jsxRuntime.jsx(UIElement, _extends({}, props, {
|
2578
2577
|
type: "column"
|
2579
2578
|
}));
|