react-crud-mobile 1.3.59 → 1.3.61

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/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.3.59",
2
+ "version": "1.3.61",
3
3
  "license": "MIT",
4
4
  "description": "Uma biblioteca de componentes para React Native",
5
5
  "main": "dist/index.js",
@@ -510,13 +510,6 @@ export default function UIElement(props: ElementType) {
510
510
  <UIList {...props} scope={scope} crud={crud} />
511
511
  )}
512
512
 
513
- {scope.isType('order') && (
514
- <UIOrder {...props} scope={scope} crud={crud} />
515
- )}
516
-
517
- {scope.isType('dialog') && (
518
- <UIModal {...props} scope={scope} crud={crud} />
519
- )}
520
513
  {scope.isType('chart') && (
521
514
  <ElChart {...props} scope={scope} crud={crud} />
522
515
  )}
@@ -572,13 +565,31 @@ export default function UIElement(props: ElementType) {
572
565
  return <>{props.children}</>;
573
566
  };
574
567
 
575
- return (
576
- <CrudContext.Provider value={{ crud, theme }}>
568
+ let Decorate = (props: any) => {
569
+ if (scope.isType('order')) {
570
+ return <UIOrder {...props} scope={scope} crud={crud} />;
571
+ }
572
+
573
+ if (scope.isType('dialog')) {
574
+ return <UIModal {...props} scope={scope} crud={crud} />;
575
+ }
576
+
577
+ return (
577
578
  <Tag ref={ref} style={getStyle()} {...custom}>
578
- <Card>
579
- <Container />
580
- </Card>
579
+ {props.children}
581
580
  </Tag>
581
+ );
582
+ };
583
+
584
+ return (
585
+ <CrudContext.Provider value={{ crud, theme }}>
586
+ <Decorate>
587
+ <Tag ref={ref} style={getStyle()} {...custom}>
588
+ <Card>
589
+ <Container />
590
+ </Card>
591
+ </Tag>
592
+ </Decorate>
582
593
  </CrudContext.Provider>
583
594
  );
584
595
  }
@@ -76,7 +76,9 @@ export default function UIOrder(props: ChildType) {
76
76
  const [data, setData] = useState(items);
77
77
 
78
78
  return (
79
- <GestureHandlerRootView style={{ flex: 1, ...scope.getStyle('container') }}>
79
+ <GestureHandlerRootView
80
+ style={{ flex: 1, width: '100%', ...scope.getStyle('container') }}
81
+ >
80
82
  {original.search !== false && (
81
83
  <UI.Text
82
84
  placeholder="Pesquisar..."