react-crud-mobile 1.3.250 → 1.3.252
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 +15 -8
- 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 +15 -8
- package/dist/react-crud-mobile.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/elements/UIElement.tsx +14 -1
- package/src/elements/core/UIModal.tsx +8 -5
package/package.json
CHANGED
@@ -541,6 +541,20 @@ 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
|
+
|
544
558
|
{scope.isType('chart') && (
|
545
559
|
<ElChart {...props} scope={scope} crud={crud} />
|
546
560
|
)}
|
@@ -560,7 +574,6 @@ export default function UIElement(props: ElementType) {
|
|
560
574
|
style={getStyle('inner')}
|
561
575
|
/>
|
562
576
|
)}
|
563
|
-
<UIModal {...props} scope={scope} crud={crud} />
|
564
577
|
</>
|
565
578
|
);
|
566
579
|
};
|
@@ -26,11 +26,16 @@ interface UIModalType extends ChildType {
|
|
26
26
|
dialog?: any;
|
27
27
|
}
|
28
28
|
|
29
|
-
export default function UIModal({
|
30
|
-
|
29
|
+
export default function UIModal({
|
30
|
+
scope,
|
31
|
+
open,
|
32
|
+
dialog,
|
33
|
+
...props
|
34
|
+
}: UIModalType) {
|
35
|
+
let [modalVisible, setModalVisible] = useState(open === true);
|
31
36
|
let [index, setIndex] = useState(0);
|
37
|
+
//v1
|
32
38
|
|
33
|
-
const dialog = scope?.currentDialog;
|
34
39
|
const label = scope.getLabel();
|
35
40
|
const theme = scope.getTheme();
|
36
41
|
const headerStyle = Utils.nvl(theme.styles?.defaults?.header, {});
|
@@ -54,8 +59,6 @@ export default function UIModal({ scope, ...props }: UIModalType) {
|
|
54
59
|
let curr = scope.currentDialog?.crud;
|
55
60
|
let main = ViewUtils.getCrud('view');
|
56
61
|
|
57
|
-
if (!scope.isType('dialog') && !scope?.currentDialog) return <></>;
|
58
|
-
|
59
62
|
if (!curr) {
|
60
63
|
return <></>;
|
61
64
|
}
|