react-crud-mobile 1.0.494 → 1.0.495
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/react-crud-mobile.cjs.development.js.map +1 -1
- package/dist/react-crud-mobile.cjs.production.min.js.map +1 -1
- package/dist/react-crud-mobile.esm.js.map +1 -1
- package/package.json +6 -6
- package/src/elements/core/UIAutoComplete.tsx +17 -17
- package/src/elements/core/UILink.tsx +17 -17
- package/src/elements/core/UIListItem.tsx +32 -32
- package/src/elements/core/UIOption.tsx +17 -17
- package/src/elements/core/UIRadio.tsx +17 -17
- package/src/elements/core/UISwitch.tsx +26 -26
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { Text, TouchableOpacity, Linking, StyleSheet } from 'react-native';
|
|
2
|
-
|
|
3
|
-
export default function UIAutoComplete(props: any) {
|
|
4
|
-
const handlePress = () => {
|
|
5
|
-
Linking.openURL('https://reactnative.dev/');
|
|
6
|
-
};
|
|
7
|
-
|
|
8
|
-
return (
|
|
9
|
-
<TouchableOpacity onPress={handlePress}>
|
|
10
|
-
<Text style={styles.link}>Clique aqui para acessar o React Native</Text>
|
|
11
|
-
</TouchableOpacity>
|
|
12
|
-
);
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
const styles = {
|
|
16
|
-
link: {},
|
|
17
|
-
};
|
|
1
|
+
import { Text, TouchableOpacity, Linking, StyleSheet } from 'react-native';
|
|
2
|
+
|
|
3
|
+
export default function UIAutoComplete(props: any) {
|
|
4
|
+
const handlePress = () => {
|
|
5
|
+
Linking.openURL('https://reactnative.dev/');
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
return (
|
|
9
|
+
<TouchableOpacity onPress={handlePress}>
|
|
10
|
+
<Text style={styles.link}>Clique aqui para acessar o React Native</Text>
|
|
11
|
+
</TouchableOpacity>
|
|
12
|
+
);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const styles = {
|
|
16
|
+
link: {},
|
|
17
|
+
};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { Text, TouchableOpacity, Linking, StyleSheet } from 'react-native';
|
|
2
|
-
|
|
3
|
-
export default function UILink(props: any) {
|
|
4
|
-
const handlePress = () => {
|
|
5
|
-
Linking.openURL('https://reactnative.dev/');
|
|
6
|
-
};
|
|
7
|
-
|
|
8
|
-
return (
|
|
9
|
-
<TouchableOpacity onPress={handlePress}>
|
|
10
|
-
<Text style={styles.link}>Clique aqui para acessar o React Native</Text>
|
|
11
|
-
</TouchableOpacity>
|
|
12
|
-
);
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
const styles = {
|
|
16
|
-
link: {},
|
|
17
|
-
};
|
|
1
|
+
import { Text, TouchableOpacity, Linking, StyleSheet } from 'react-native';
|
|
2
|
+
|
|
3
|
+
export default function UILink(props: any) {
|
|
4
|
+
const handlePress = () => {
|
|
5
|
+
Linking.openURL('https://reactnative.dev/');
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
return (
|
|
9
|
+
<TouchableOpacity onPress={handlePress}>
|
|
10
|
+
<Text style={styles.link}>Clique aqui para acessar o React Native</Text>
|
|
11
|
+
</TouchableOpacity>
|
|
12
|
+
);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const styles = {
|
|
16
|
+
link: {},
|
|
17
|
+
};
|
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import { useState } from 'react';
|
|
2
|
-
import { ChildType, Utils } from 'react-crud-utils';
|
|
3
|
-
import { FlatList, StyleSheet, Switch, Text, View } from 'react-native';
|
|
4
|
-
|
|
5
|
-
interface UIListItemType extends ChildType {
|
|
6
|
-
data: any;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export default function UIListItem(props: UIListItemType) {
|
|
10
|
-
const scope = props.scope;
|
|
11
|
-
const crud = props.crud;
|
|
12
|
-
|
|
13
|
-
return <View style={styles.item}></View>;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
const styles = StyleSheet.create({
|
|
17
|
-
container: {
|
|
18
|
-
flex: 1,
|
|
19
|
-
padding: 20,
|
|
20
|
-
backgroundColor: '#fff',
|
|
21
|
-
},
|
|
22
|
-
item: {
|
|
23
|
-
padding: 15,
|
|
24
|
-
marginVertical: 8,
|
|
25
|
-
backgroundColor: '#f9c2ff',
|
|
26
|
-
borderRadius: 8,
|
|
27
|
-
},
|
|
28
|
-
text: {
|
|
29
|
-
fontSize: 18,
|
|
30
|
-
fontWeight: 'bold',
|
|
31
|
-
},
|
|
32
|
-
});
|
|
1
|
+
import { useState } from 'react';
|
|
2
|
+
import { ChildType, Utils } from 'react-crud-utils';
|
|
3
|
+
import { FlatList, StyleSheet, Switch, Text, View } from 'react-native';
|
|
4
|
+
|
|
5
|
+
interface UIListItemType extends ChildType {
|
|
6
|
+
data: any;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export default function UIListItem(props: UIListItemType) {
|
|
10
|
+
const scope = props.scope;
|
|
11
|
+
const crud = props.crud;
|
|
12
|
+
|
|
13
|
+
return <View style={styles.item}></View>;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const styles = StyleSheet.create({
|
|
17
|
+
container: {
|
|
18
|
+
flex: 1,
|
|
19
|
+
padding: 20,
|
|
20
|
+
backgroundColor: '#fff',
|
|
21
|
+
},
|
|
22
|
+
item: {
|
|
23
|
+
padding: 15,
|
|
24
|
+
marginVertical: 8,
|
|
25
|
+
backgroundColor: '#f9c2ff',
|
|
26
|
+
borderRadius: 8,
|
|
27
|
+
},
|
|
28
|
+
text: {
|
|
29
|
+
fontSize: 18,
|
|
30
|
+
fontWeight: 'bold',
|
|
31
|
+
},
|
|
32
|
+
});
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { Text, TouchableOpacity, Linking, StyleSheet } from 'react-native';
|
|
2
|
-
|
|
3
|
-
export default function UIOption(props: any) {
|
|
4
|
-
const handlePress = () => {
|
|
5
|
-
Linking.openURL('https://reactnative.dev/');
|
|
6
|
-
};
|
|
7
|
-
|
|
8
|
-
return (
|
|
9
|
-
<TouchableOpacity onPress={handlePress}>
|
|
10
|
-
<Text style={styles.link}>Clique aqui para acessar o React Native</Text>
|
|
11
|
-
</TouchableOpacity>
|
|
12
|
-
);
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
const styles = {
|
|
16
|
-
link: {},
|
|
17
|
-
};
|
|
1
|
+
import { Text, TouchableOpacity, Linking, StyleSheet } from 'react-native';
|
|
2
|
+
|
|
3
|
+
export default function UIOption(props: any) {
|
|
4
|
+
const handlePress = () => {
|
|
5
|
+
Linking.openURL('https://reactnative.dev/');
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
return (
|
|
9
|
+
<TouchableOpacity onPress={handlePress}>
|
|
10
|
+
<Text style={styles.link}>Clique aqui para acessar o React Native</Text>
|
|
11
|
+
</TouchableOpacity>
|
|
12
|
+
);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const styles = {
|
|
16
|
+
link: {},
|
|
17
|
+
};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { Text, TouchableOpacity, Linking, StyleSheet } from 'react-native';
|
|
2
|
-
|
|
3
|
-
export default function UIRadio(props: any) {
|
|
4
|
-
const handlePress = () => {
|
|
5
|
-
Linking.openURL('https://reactnative.dev/');
|
|
6
|
-
};
|
|
7
|
-
|
|
8
|
-
return (
|
|
9
|
-
<TouchableOpacity onPress={handlePress}>
|
|
10
|
-
<Text style={styles.link}>Clique aqui para acessar o React Native</Text>
|
|
11
|
-
</TouchableOpacity>
|
|
12
|
-
);
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
const styles = {
|
|
16
|
-
link: {},
|
|
17
|
-
};
|
|
1
|
+
import { Text, TouchableOpacity, Linking, StyleSheet } from 'react-native';
|
|
2
|
+
|
|
3
|
+
export default function UIRadio(props: any) {
|
|
4
|
+
const handlePress = () => {
|
|
5
|
+
Linking.openURL('https://reactnative.dev/');
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
return (
|
|
9
|
+
<TouchableOpacity onPress={handlePress}>
|
|
10
|
+
<Text style={styles.link}>Clique aqui para acessar o React Native</Text>
|
|
11
|
+
</TouchableOpacity>
|
|
12
|
+
);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const styles = {
|
|
16
|
+
link: {},
|
|
17
|
+
};
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { useState } from 'react';
|
|
2
|
-
import { ChildType, Utils } from 'react-crud-utils';
|
|
3
|
-
import { Switch } from 'react-native';
|
|
4
|
-
|
|
5
|
-
export default function UISwitch(props: ChildType) {
|
|
6
|
-
const scope = props.scope;
|
|
7
|
-
const initial = Utils.nvl(scope.getValue(), false) as boolean;
|
|
8
|
-
const [value, setValue] = useState(initial);
|
|
9
|
-
|
|
10
|
-
let onChange = v => {
|
|
11
|
-
scope.changeValue(v);
|
|
12
|
-
|
|
13
|
-
setValue(v);
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
return (
|
|
17
|
-
<Switch
|
|
18
|
-
value={value}
|
|
19
|
-
onValueChange={onChange} // Alterna o estado
|
|
20
|
-
/>
|
|
21
|
-
);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
const styles = {
|
|
25
|
-
link: {},
|
|
26
|
-
};
|
|
1
|
+
import { useState } from 'react';
|
|
2
|
+
import { ChildType, Utils } from 'react-crud-utils';
|
|
3
|
+
import { Switch } from 'react-native';
|
|
4
|
+
|
|
5
|
+
export default function UISwitch(props: ChildType) {
|
|
6
|
+
const scope = props.scope;
|
|
7
|
+
const initial = Utils.nvl(scope.getValue(), false) as boolean;
|
|
8
|
+
const [value, setValue] = useState(initial);
|
|
9
|
+
|
|
10
|
+
let onChange = v => {
|
|
11
|
+
scope.changeValue(v);
|
|
12
|
+
|
|
13
|
+
setValue(v);
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
return (
|
|
17
|
+
<Switch
|
|
18
|
+
value={value}
|
|
19
|
+
onValueChange={onChange} // Alterna o estado
|
|
20
|
+
/>
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const styles = {
|
|
25
|
+
link: {},
|
|
26
|
+
};
|