react-crud-mobile 1.3.53 → 1.3.55

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.53",
2
+ "version": "1.3.55",
3
3
  "license": "MIT",
4
4
  "description": "Uma biblioteca de componentes para React Native",
5
5
  "main": "dist/index.js",
@@ -45,7 +45,7 @@
45
45
  "@react-native-vector-icons/ionicons": "^7.4.0",
46
46
  "@react-native-vector-icons/material-icons": "^0.0.1",
47
47
  "react": "19.0.0",
48
- "react-crud-utils": "^0.1.368",
48
+ "react-crud-utils": "^0.1.370",
49
49
  "react-dom": "19.0.0",
50
50
  "react-native": "0.79.2",
51
51
  "react-native-draggable-flatlist": "^4.0.3",
@@ -4,13 +4,13 @@ import { StyleSheet, Text, TouchableOpacity, View } from 'react-native';
4
4
  import UI from '../UI';
5
5
  import { Ionicons } from '@expo/vector-icons';
6
6
  import DraggableFlatList from 'react-native-draggable-flatlist';
7
+ import { GestureHandlerRootView } from 'react-native-gesture-handler';
7
8
 
8
9
  export default function UIOrder(props: ChildType) {
9
10
  const scope = props.scope;
10
11
  const crud = scope.crud;
11
12
  const original = scope.original;
12
13
  const cols = Utils.nvl(scope.getPart('cols', undefined, 1));
13
- const add = ComponentUtils.getDefine(props, 'add');
14
14
  const hideAddWhenEmpty = original.hideAddWhenEmpty;
15
15
 
16
16
  const getStyle = (key: string, extra?: any) => {
@@ -67,45 +67,6 @@ export default function UIOrder(props: ChildType) {
67
67
  return list;
68
68
  });
69
69
 
70
- const isShowAdd = () => {
71
- if (!Utils.isEmpty(items)) {
72
- return true;
73
- }
74
- return hideAddWhenEmpty !== true;
75
- };
76
-
77
- let Empty = () => {
78
- if (!Utils.isEmpty(items)) {
79
- return <></>;
80
- }
81
-
82
- let empty = scope.attr('empty', 'Sem registro');
83
-
84
- if (!empty) {
85
- return <></>;
86
- }
87
-
88
- if (typeof empty === 'string') {
89
- return (
90
- <Text
91
- style={scope.getStyle('empty', {
92
- flex: 1,
93
- fontWeight: 500,
94
- fontSize: 20,
95
- padding: 10,
96
- textAlign: 'center',
97
- justifyContent: 'center',
98
- alignItems: 'center',
99
- })}
100
- >
101
- {empty}
102
- </Text>
103
- );
104
- }
105
-
106
- return <>{empty}</>;
107
- };
108
-
109
70
  const renderItem = ({ item, drag, isActive }) => {
110
71
  return (
111
72
  <TouchableOpacity
@@ -121,8 +82,7 @@ export default function UIOrder(props: ChildType) {
121
82
  };
122
83
 
123
84
  return (
124
- <View key={keyData} style={getContainerStyle()}>
125
- <Empty />
85
+ <GestureHandlerRootView key={keyData} style={getContainerStyle()}>
126
86
  <DraggableFlatList
127
87
  data={items}
128
88
  renderItem={renderItem}
@@ -131,8 +91,7 @@ export default function UIOrder(props: ChildType) {
131
91
  scope.changeValue(data);
132
92
  }}
133
93
  />
134
- {isShowAdd() && <>{add}</>}
135
- </View>
94
+ </GestureHandlerRootView>
136
95
  );
137
96
  };
138
97