react-crud-mobile 1.3.253 → 1.3.254
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 +11 -19
- 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 +11 -19
- package/dist/react-crud-mobile.esm.js.map +1 -1
- package/package.json +2 -2
- package/src/elements/UIElement.tsx +1 -13
- package/src/elements/core/UIModal.tsx +6 -10
@@ -4,5 +4,5 @@ interface UIModalType extends ChildType {
|
|
4
4
|
open?: boolean;
|
5
5
|
dialog?: any;
|
6
6
|
}
|
7
|
-
export default function UIModal({ scope,
|
7
|
+
export default function UIModal({ scope, ...props }: UIModalType): import("react").JSX.Element;
|
8
8
|
export {};
|
@@ -1373,18 +1373,17 @@ function UIToast() {
|
|
1373
1373
|
});
|
1374
1374
|
}
|
1375
1375
|
|
1376
|
-
var _excluded = ["scope"
|
1376
|
+
var _excluded = ["scope"];
|
1377
1377
|
function UIModal(_ref) {
|
1378
|
-
var _theme$styles,
|
1378
|
+
var _theme$styles, _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(
|
1381
|
+
var _useState = React.useState(false),
|
1384
1382
|
modalVisible = _useState[0],
|
1385
1383
|
setModalVisible = _useState[1];
|
1386
1384
|
var _useState2 = React.useState(0),
|
1387
1385
|
index = _useState2[0];
|
1386
|
+
var dialog = scope.currentDialog;
|
1388
1387
|
//v1
|
1389
1388
|
var label = scope.getLabel();
|
1390
1389
|
var theme = scope.getTheme();
|
@@ -1395,10 +1394,9 @@ function UIModal(_ref) {
|
|
1395
1394
|
return _extends({}, scope.getStyle(part, st));
|
1396
1395
|
};
|
1397
1396
|
var onClose = function onClose() {
|
1398
|
-
var _scope$currentDialog;
|
1399
1397
|
scope.close({
|
1400
1398
|
scope: scope,
|
1401
|
-
crud:
|
1399
|
+
crud: dialog == null ? void 0 : dialog.crud,
|
1402
1400
|
event: {}
|
1403
1401
|
});
|
1404
1402
|
};
|
@@ -1406,9 +1404,9 @@ function UIModal(_ref) {
|
|
1406
1404
|
modalVisible = vis;
|
1407
1405
|
setModalVisible(modalVisible);
|
1408
1406
|
};
|
1409
|
-
var curr =
|
1407
|
+
var curr = dialog == null ? void 0 : dialog.crud;
|
1410
1408
|
var main = reactCrudUtils.ViewUtils.getCrud('view');
|
1411
|
-
if (!curr) {
|
1409
|
+
if (!curr || dialog) {
|
1412
1410
|
return /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {});
|
1413
1411
|
}
|
1414
1412
|
if (curr.uuid !== ((_main$dialog = main.dialog) == null || (_main$dialog = _main$dialog.crud) == null ? void 0 : _main$dialog.uuid)) {
|
@@ -2136,7 +2134,6 @@ function UIElement(props) {
|
|
2136
2134
|
return /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {});
|
2137
2135
|
};
|
2138
2136
|
var Container = function Container() {
|
2139
|
-
var _scope$currentDialog2, _scope$currentDialog3, _scope$currentDialog4;
|
2140
2137
|
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
2141
2138
|
children: [isShowLabel() && /*#__PURE__*/jsxRuntime.jsxs(reactNative.View, {
|
2142
2139
|
style: getStyle('outerLabel', {
|
@@ -2174,15 +2171,7 @@ function UIElement(props) {
|
|
2174
2171
|
})), scope.isType('order') && /*#__PURE__*/jsxRuntime.jsx(UIOrder, _extends({}, props, {
|
2175
2172
|
scope: scope,
|
2176
2173
|
crud: crud
|
2177
|
-
})), scope.isType('
|
2178
|
-
scope: scope,
|
2179
|
-
crud: crud
|
2180
|
-
})), ((_scope$currentDialog2 = scope.currentDialog) == null ? void 0 : _scope$currentDialog2.component) && /*#__PURE__*/jsxRuntime.jsx(UIModal, {
|
2181
|
-
scope: (_scope$currentDialog3 = scope.currentDialog) == null ? void 0 : _scope$currentDialog3.scope,
|
2182
|
-
crud: (_scope$currentDialog4 = scope.currentDialog) == null ? void 0 : _scope$currentDialog4.crud,
|
2183
|
-
open: true,
|
2184
|
-
dialog: scope.currentDialog
|
2185
|
-
}), scope.isType('chart') && /*#__PURE__*/jsxRuntime.jsx(ElChart, _extends({}, props, {
|
2174
|
+
})), scope.isType('chart') && /*#__PURE__*/jsxRuntime.jsx(ElChart, _extends({}, props, {
|
2186
2175
|
scope: scope,
|
2187
2176
|
crud: crud
|
2188
2177
|
})), scope.isType('tabs') && /*#__PURE__*/jsxRuntime.jsx(ElTabs, _extends({}, props, {
|
@@ -2195,6 +2184,9 @@ function UIElement(props) {
|
|
2195
2184
|
scope: scope,
|
2196
2185
|
crud: crud,
|
2197
2186
|
style: getStyle('inner')
|
2187
|
+
})), /*#__PURE__*/jsxRuntime.jsx(UIModal, _extends({}, props, {
|
2188
|
+
scope: scope,
|
2189
|
+
crud: crud
|
2198
2190
|
}))]
|
2199
2191
|
});
|
2200
2192
|
};
|