mg-library 1.0.397 → 1.0.399
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/blocks.js +20 -6
- package/package.json +1 -1
- package/mg-library.rar +0 -0
package/blocks.js
CHANGED
@@ -1,7 +1,6 @@
|
|
1
1
|
import { useCallback, useState } from 'react';
|
2
|
-
import { useSelector } from 'react-redux';
|
3
2
|
import { useForm, Controller } from 'react-hook-form';
|
4
|
-
import { View, ActivityIndicator, Pressable, Image, FlatList } from 'react-native';
|
3
|
+
import { View, ActivityIndicator, Pressable, Image, FlatList, Keyboard } from 'react-native';
|
5
4
|
import { Text, Divider, Button, Popover, Card, Layout, Input } from '@ui-kitten/components';
|
6
5
|
import MaterialCommunityIcons from 'react-native-vector-icons/MaterialCommunityIcons';
|
7
6
|
import * as ImageManipulator from 'expo-image-manipulator';
|
@@ -65,7 +64,7 @@ export function MGWelcome(props) {
|
|
65
64
|
<Image style={{ width: 300, height: 150, marginTop: 70 }} source={require('./assets/welcome.png')} />
|
66
65
|
</View>
|
67
66
|
);
|
68
|
-
}
|
67
|
+
}
|
69
68
|
|
70
69
|
return (
|
71
70
|
<View style={mgFunctionsLib.getBasicStyleSheet().availableArea}>
|
@@ -81,7 +80,7 @@ export function MGWelcome(props) {
|
|
81
80
|
)}
|
82
81
|
ListHeaderComponent={listHeaderComponent}
|
83
82
|
ListFooterComponent={listFooterComponent}
|
84
|
-
/>
|
83
|
+
/>
|
85
84
|
</View>
|
86
85
|
)
|
87
86
|
|
@@ -89,10 +88,21 @@ export function MGWelcome(props) {
|
|
89
88
|
|
90
89
|
export function MGLogin(props) {
|
91
90
|
|
91
|
+
const [isKeyboardVisible, setIsKeyboardVisible] = useState(false);
|
92
|
+
|
92
93
|
const { control, handleSubmit, formState: { errors } } = useForm({
|
93
94
|
defaultValues: props.defaultValues,
|
94
95
|
});
|
95
96
|
|
97
|
+
useEffect(() => {
|
98
|
+
Keyboard.addListener("keyboardDidShow", () => setIsKeyboardVisible(true));
|
99
|
+
Keyboard.addListener("keyboardDidHide", () => setIsKeyboardVisible(false));
|
100
|
+
return () => {
|
101
|
+
Keyboard.removeAllListeners("keyboardDidShow");
|
102
|
+
Keyboard.removeAllListeners("keyboardDidHide");
|
103
|
+
};
|
104
|
+
}, [register]);
|
105
|
+
|
96
106
|
const insets = useSafeAreaInsets();
|
97
107
|
|
98
108
|
let cardHeader = (
|
@@ -132,8 +142,12 @@ export function MGLogin(props) {
|
|
132
142
|
<Image
|
133
143
|
source={require('./assets/clubonline.png')}
|
134
144
|
style={{ width: 300, height: 150 }} />
|
135
|
-
|
136
|
-
|
145
|
+
{!isKeyboardVisible &&
|
146
|
+
<View>
|
147
|
+
<Text category='h6'>{props.appDescription}</Text>
|
148
|
+
<Text category='p2'>{props.appVersion}</Text>
|
149
|
+
</View>
|
150
|
+
}
|
137
151
|
</View>
|
138
152
|
<View>
|
139
153
|
<Card style={{ flexDirection: 'column', justifyContent: 'center', alignContent: 'center', marginLeft: 30, marginRight: 30 }}
|
package/package.json
CHANGED
package/mg-library.rar
DELETED
Binary file
|