react-crud-mobile 1.3.248 → 1.3.249
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 +8 -15
- 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 +8 -15
- package/dist/react-crud-mobile.esm.js.map +1 -1
- package/package.json +2 -2
- package/src/elements/UIElement.tsx +1 -14
- package/src/elements/core/UIModal.tsx +5 -8
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "react-crud-mobile",
|
3
|
-
"version": "1.3.
|
3
|
+
"version": "1.3.249",
|
4
4
|
"license": "MIT",
|
5
5
|
"description": "Uma biblioteca de componentes para React Native",
|
6
6
|
"main": "dist/index.js",
|
@@ -46,7 +46,7 @@
|
|
46
46
|
"@react-native-vector-icons/material-icons": "^0.0.1",
|
47
47
|
"expo-status-bar": "~3.0.8",
|
48
48
|
"react": "19.1.0",
|
49
|
-
"react-crud-utils": "^0.1.
|
49
|
+
"react-crud-utils": "^0.1.417",
|
50
50
|
"react-dom": "19.1.0",
|
51
51
|
"react-native": "0.81.4",
|
52
52
|
"react-native-draggable-flatlist": "^4.0.3",
|
@@ -541,20 +541,6 @@ export default function UIElement(props: ElementType) {
|
|
541
541
|
{scope.isType('order') && (
|
542
542
|
<UIOrder {...props} scope={scope} crud={crud} />
|
543
543
|
)}
|
544
|
-
|
545
|
-
{scope.isType('dialog') && (
|
546
|
-
<UIModal {...props} scope={scope} crud={crud} />
|
547
|
-
)}
|
548
|
-
|
549
|
-
{scope.currentDialog?.component && (
|
550
|
-
<UIModal
|
551
|
-
scope={scope.currentDialog?.scope}
|
552
|
-
crud={scope.currentDialog?.crud}
|
553
|
-
open
|
554
|
-
dialog={scope.currentDialog}
|
555
|
-
/>
|
556
|
-
)}
|
557
|
-
|
558
544
|
{scope.isType('chart') && (
|
559
545
|
<ElChart {...props} scope={scope} crud={crud} />
|
560
546
|
)}
|
@@ -574,6 +560,7 @@ export default function UIElement(props: ElementType) {
|
|
574
560
|
style={getStyle('inner')}
|
575
561
|
/>
|
576
562
|
)}
|
563
|
+
<UIModal {...props} scope={scope} crud={crud} />
|
577
564
|
</>
|
578
565
|
);
|
579
566
|
};
|
@@ -26,16 +26,13 @@ interface UIModalType extends ChildType {
|
|
26
26
|
dialog?: any;
|
27
27
|
}
|
28
28
|
|
29
|
-
export default function UIModal({
|
30
|
-
|
31
|
-
open,
|
32
|
-
dialog,
|
33
|
-
...props
|
34
|
-
}: UIModalType) {
|
35
|
-
let [modalVisible, setModalVisible] = useState(open === true);
|
29
|
+
export default function UIModal({ scope, ...props }: UIModalType) {
|
30
|
+
let [modalVisible, setModalVisible] = useState(true);
|
36
31
|
let [index, setIndex] = useState(0);
|
37
|
-
//v1
|
38
32
|
|
33
|
+
if (!scope.isType('dialog') && !scope?.currentDialog) return <></>;
|
34
|
+
|
35
|
+
const dialog = scope?.currentDialog;
|
39
36
|
const label = scope.getLabel();
|
40
37
|
const theme = scope.getTheme();
|
41
38
|
const headerStyle = Utils.nvl(theme.styles?.defaults?.header, {});
|