mg-library 1.0.679 → 1.0.681
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 +102 -8
- package/package.json +1 -1
package/blocks.js
CHANGED
|
@@ -5,7 +5,7 @@ import MaterialCommunityIcons from 'react-native-vector-icons/MaterialCommunityI
|
|
|
5
5
|
import * as ImageManipulator from 'expo-image-manipulator';
|
|
6
6
|
import { Camera, CameraType, CameraView } from 'expo-camera';
|
|
7
7
|
import axios from 'axios';
|
|
8
|
-
import { Box } from '@gluestack-ui/themed';
|
|
8
|
+
import { Box, Input, InputField } from '@gluestack-ui/themed';
|
|
9
9
|
import { uploadFile } from '@uploadcare/upload-client';
|
|
10
10
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
11
11
|
|
|
@@ -223,6 +223,98 @@ export function MGLogin(props) {
|
|
|
223
223
|
</View>
|
|
224
224
|
);
|
|
225
225
|
|
|
226
|
+
/* return (
|
|
227
|
+
<View style={{ flex: 1 }}>
|
|
228
|
+
<Box style={[mgFunctionsLib.safeAreaViewStyleSheet(insets).safeAreaView, { display: 'flex', flexDirection: 'column', flexGrow: 1 }]}>
|
|
229
|
+
<View style={{ flexDirection: 'column', flexGrow: 1, justifyContent: 'center' }}>
|
|
230
|
+
{isKeyboardVisible &&
|
|
231
|
+
<View style={{ flexDirection: 'column', alignItems: 'center', marginBottom: 10 }}>
|
|
232
|
+
<>
|
|
233
|
+
<Image
|
|
234
|
+
source={require('./assets/clubonline.png')}
|
|
235
|
+
style={{ width: 180, height: 90 }} />
|
|
236
|
+
</>
|
|
237
|
+
</View>
|
|
238
|
+
}
|
|
239
|
+
{!isKeyboardVisible &&
|
|
240
|
+
<View style={{ flexDirection: 'column', alignItems: 'center', marginBottom: 100 }}>
|
|
241
|
+
<>
|
|
242
|
+
<Image
|
|
243
|
+
source={require('./assets/clubonline.png')}
|
|
244
|
+
style={{ width: 300, height: 150 }} />
|
|
245
|
+
<View style={{ marginHorizontal: 10, flexDirection: 'column', alignItems: 'center' }}>
|
|
246
|
+
<MGText style={{ alignSelf: 'center', textAlign: 'center' }} category='h6'>{props.appDescription}</MGText>
|
|
247
|
+
<MGText style={{ alignSelf: 'center' }} category='p2'>{props.appVersion}</MGText>
|
|
248
|
+
</View>
|
|
249
|
+
</>
|
|
250
|
+
</View>
|
|
251
|
+
}
|
|
252
|
+
<View>
|
|
253
|
+
<MGCard style={{ flexDirection: 'column', justifyContent: 'center', alignContent: 'center', marginLeft: 30, marginRight: 30 }}
|
|
254
|
+
header={cardHeader}
|
|
255
|
+
footer={cardFooter}>
|
|
256
|
+
<Controller
|
|
257
|
+
control={control}
|
|
258
|
+
rules={{ maxLength: 50 }}
|
|
259
|
+
render={({ field: { onChange, value } }) => (
|
|
260
|
+
<TextInput
|
|
261
|
+
style={nbStyles.input}
|
|
262
|
+
placeholder={mgFunctionsLib.i18nString('userName', props.language)}
|
|
263
|
+
placeholderTextColor="#888"
|
|
264
|
+
onChangeText={onChange}
|
|
265
|
+
value={value}
|
|
266
|
+
/>
|
|
267
|
+
)}
|
|
268
|
+
name="userName" />
|
|
269
|
+
{props.useNumericKeyboardOnPassword &&
|
|
270
|
+
<Controller
|
|
271
|
+
control={control}
|
|
272
|
+
rules={{ maxLength: 50 }}
|
|
273
|
+
render={({ field: { onChange, value } }) => (
|
|
274
|
+
<TextInput
|
|
275
|
+
style={nbStyles.input}
|
|
276
|
+
placeholder={mgFunctionsLib.i18nString('password', props.language)}
|
|
277
|
+
placeholderTextColor="#888"
|
|
278
|
+
onChangeText={onChange}
|
|
279
|
+
value={value}
|
|
280
|
+
secureTextEntry
|
|
281
|
+
maxLength={12}
|
|
282
|
+
keyboardType="numeric"
|
|
283
|
+
autoCapitalize="none"
|
|
284
|
+
autoCorrect={false}
|
|
285
|
+
returnKeyType="done"
|
|
286
|
+
/>
|
|
287
|
+
)}
|
|
288
|
+
name='password' />
|
|
289
|
+
}
|
|
290
|
+
{!props.useNumericKeyboardOnPassword &&
|
|
291
|
+
<Controller
|
|
292
|
+
control={control}
|
|
293
|
+
rules={{ maxLength: 50 }}
|
|
294
|
+
render={({ field: { onChange, value } }) => (
|
|
295
|
+
<TextInput
|
|
296
|
+
style={nbStyles.input}
|
|
297
|
+
placeholder={mgFunctionsLib.i18nString('password', props.language)}
|
|
298
|
+
placeholderTextColor="#888"
|
|
299
|
+
onChangeText={onChange}
|
|
300
|
+
value={value}
|
|
301
|
+
secureTextEntry
|
|
302
|
+
maxLength={12}
|
|
303
|
+
autoCapitalize="none"
|
|
304
|
+
autoCorrect={false}
|
|
305
|
+
returnKeyType="done"
|
|
306
|
+
/>
|
|
307
|
+
)}
|
|
308
|
+
name="password" />
|
|
309
|
+
}
|
|
310
|
+
</MGCard>
|
|
311
|
+
</View>
|
|
312
|
+
</View>
|
|
313
|
+
</Box>
|
|
314
|
+
</View>
|
|
315
|
+
);
|
|
316
|
+
*/
|
|
317
|
+
|
|
226
318
|
return (
|
|
227
319
|
<View style={{ flex: 1 }}>
|
|
228
320
|
<Box style={[mgFunctionsLib.safeAreaViewStyleSheet(insets).safeAreaView, { display: 'flex', flexDirection: 'column', flexGrow: 1 }]}>
|
|
@@ -257,13 +349,15 @@ export function MGLogin(props) {
|
|
|
257
349
|
control={control}
|
|
258
350
|
rules={{ maxLength: 50 }}
|
|
259
351
|
render={({ field: { onChange, value } }) => (
|
|
260
|
-
<
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
352
|
+
<Input size="lg" variant="outline" h={40} px="$3" rounded="$md" bg="$white" borderColor="$trueGray300">
|
|
353
|
+
<InputField
|
|
354
|
+
placeholder={mgFunctionsLib.i18nString('userName', props.language)}
|
|
355
|
+
placeholderTextColor="$trueGray300"
|
|
356
|
+
value={value}
|
|
357
|
+
onChangeText={onChange}
|
|
358
|
+
autoCapitalize="none"
|
|
359
|
+
/>
|
|
360
|
+
</Input>
|
|
267
361
|
)}
|
|
268
362
|
name="userName" />
|
|
269
363
|
{props.useNumericKeyboardOnPassword &&
|