react-crud-mobile 1.3.83 → 1.3.85
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 +2 -1
- package/dist/react-crud-mobile.cjs.development.js +25 -11
- 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 +25 -11
- package/dist/react-crud-mobile.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/elements/UIElement.tsx +7 -1
- package/src/elements/core/UIModal.tsx +23 -7
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { ChildType } from 'react-crud-utils';
|
|
3
3
|
interface UIModalType extends ChildType {
|
|
4
4
|
open?: boolean;
|
|
5
|
+
dialog?: any;
|
|
5
6
|
}
|
|
6
|
-
export default function UIModal(props: UIModalType): import("react").JSX.Element;
|
|
7
|
+
export default function UIModal({ scope, open, dialog, ...props }: UIModalType): import("react").JSX.Element;
|
|
7
8
|
export {};
|
|
@@ -1335,17 +1335,21 @@ function UIToast() {
|
|
|
1335
1335
|
});
|
|
1336
1336
|
}
|
|
1337
1337
|
|
|
1338
|
-
|
|
1338
|
+
var _excluded = ["scope", "open", "dialog"];
|
|
1339
|
+
function UIModal(_ref) {
|
|
1339
1340
|
var _theme$styles, _main$dialog2;
|
|
1340
|
-
var
|
|
1341
|
+
var scope = _ref.scope,
|
|
1342
|
+
open = _ref.open,
|
|
1343
|
+
dialog = _ref.dialog,
|
|
1344
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
1345
|
+
var _useState = React.useState(open === true),
|
|
1341
1346
|
modalVisible = _useState[0],
|
|
1342
1347
|
setModalVisible = _useState[1];
|
|
1343
1348
|
var _useState2 = React.useState(0),
|
|
1344
1349
|
index = _useState2[0],
|
|
1345
1350
|
setIndex = _useState2[1];
|
|
1346
1351
|
var main = reactCrudUtils.ViewUtils.getCrud('view');
|
|
1347
|
-
//
|
|
1348
|
-
var scope = props.scope;
|
|
1352
|
+
//v4
|
|
1349
1353
|
var label = scope.getLabel();
|
|
1350
1354
|
var theme = scope.getTheme();
|
|
1351
1355
|
var headerStyle = reactCrudUtils.Utils.nvl((_theme$styles = theme.styles) == null || (_theme$styles = _theme$styles.defaults) == null ? void 0 : _theme$styles.header, {});
|
|
@@ -1424,6 +1428,19 @@ function UIModal(props) {
|
|
|
1424
1428
|
color: color
|
|
1425
1429
|
};
|
|
1426
1430
|
var key = scope.currentDialog.name + "-" + index;
|
|
1431
|
+
var Content = function Content() {
|
|
1432
|
+
if (dialog != null && dialog.component) {
|
|
1433
|
+
var Aux = dialog == null ? void 0 : dialog.component;
|
|
1434
|
+
return /*#__PURE__*/jsxRuntime.jsx(Aux, {
|
|
1435
|
+
crud: scope.currentDialog
|
|
1436
|
+
});
|
|
1437
|
+
}
|
|
1438
|
+
return /*#__PURE__*/jsxRuntime.jsx(UIChildren, {
|
|
1439
|
+
scope: scope,
|
|
1440
|
+
crud: scope.currentDialog,
|
|
1441
|
+
children: props.children
|
|
1442
|
+
});
|
|
1443
|
+
};
|
|
1427
1444
|
return /*#__PURE__*/jsxRuntime.jsxs(reactNative.Modal, {
|
|
1428
1445
|
animationType: "slide",
|
|
1429
1446
|
transparent: true,
|
|
@@ -1469,11 +1486,7 @@ function UIModal(props) {
|
|
|
1469
1486
|
paddingTop: 10,
|
|
1470
1487
|
paddingBottom: 10
|
|
1471
1488
|
},
|
|
1472
|
-
children: /*#__PURE__*/jsxRuntime.jsx(
|
|
1473
|
-
scope: scope,
|
|
1474
|
-
crud: scope.currentDialog,
|
|
1475
|
-
children: props.children
|
|
1476
|
-
})
|
|
1489
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Content, {})
|
|
1477
1490
|
})
|
|
1478
1491
|
}), bottom]
|
|
1479
1492
|
}), /*#__PURE__*/jsxRuntime.jsx(UIToast, {})]
|
|
@@ -2058,6 +2071,7 @@ function UIElement(props) {
|
|
|
2058
2071
|
scope: scope,
|
|
2059
2072
|
crud: dialog.crud,
|
|
2060
2073
|
open: true,
|
|
2074
|
+
dialog: dialog,
|
|
2061
2075
|
children: dialog.component
|
|
2062
2076
|
})), scope.isType('chart') && /*#__PURE__*/jsxRuntime.jsx(ElChart, _extends({}, props, {
|
|
2063
2077
|
scope: scope,
|
|
@@ -2344,7 +2358,7 @@ function SafeView(props) {
|
|
|
2344
2358
|
});
|
|
2345
2359
|
}
|
|
2346
2360
|
|
|
2347
|
-
var _excluded = ["type"];
|
|
2361
|
+
var _excluded$1 = ["type"];
|
|
2348
2362
|
var UI = {
|
|
2349
2363
|
Order: function Order(props) {
|
|
2350
2364
|
return /*#__PURE__*/jsxRuntime.jsx(UIElement, _extends({}, props, {
|
|
@@ -2388,7 +2402,7 @@ var UI = {
|
|
|
2388
2402
|
return /*#__PURE__*/jsxRuntime.jsx(UIInclude, _extends({}, props));
|
|
2389
2403
|
},
|
|
2390
2404
|
Column: function Column(_ref) {
|
|
2391
|
-
var props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
2405
|
+
var props = _objectWithoutPropertiesLoose(_ref, _excluded$1);
|
|
2392
2406
|
return /*#__PURE__*/jsxRuntime.jsx(UIElement, _extends({}, props, {
|
|
2393
2407
|
type: "column"
|
|
2394
2408
|
}));
|