mg-library 1.0.678 → 1.0.680

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.
Files changed (3) hide show
  1. package/blocks.js +110 -16
  2. package/functions.js +2 -3
  3. package/package.json +1 -1
package/blocks.js CHANGED
@@ -55,7 +55,7 @@ export function MGWelcome(props) {
55
55
  <>
56
56
  <View style={{ flex: 1, flexDirection: 'column', marginVertical: 5, marginHorizontal: 10 }}>
57
57
  {item.isImportant &&
58
- <MaterialCommunityIcons style={{ flex: 1 }} name='alert-circle-outline' color={props.colors.primary['500']} size={30} />
58
+ <MaterialCommunityIcons style={{ flex: 1 }} name='alert-circle-outline' color={props.colors.primary500} size={30} />
59
59
  }
60
60
  <MGText style={{ flex: 1 }} category='h6'>{item.description}</MGText>
61
61
  <MGText style={{ flex: 1 }} category='c1'>{mgFunctionsLib.getDateForExposition(item.noticeDate, props.language)}, {item.noticeTime._asTime()}</MGText>
@@ -124,7 +124,7 @@ export function MGBenefits(props) {
124
124
  <>
125
125
  <View style={{ flex: 1, flexDirection: 'column', marginVertical: 5, marginHorizontal: 10 }}>
126
126
  {item.isImportant &&
127
- <MaterialCommunityIcons style={{ flex: 1 }} name='alert-circle-outline' color={props.colors.primary['500']} size={30} />
127
+ <MaterialCommunityIcons style={{ flex: 1 }} name='alert-circle-outline' color={props.colors.primary500} size={30} />
128
128
  }
129
129
  <MGText style={{ flex: 1 }} category='h6'>{item.description}</MGText>
130
130
  </View>
@@ -192,7 +192,7 @@ export function MGLogin(props) {
192
192
 
193
193
  let cardHeader = (
194
194
  <View>
195
- <MGText category='h6' style={{ alignSelf: 'center', color: props.colors.primary['500'] }}>{mgFunctionsLib.i18nString('credentials', props.language)}</MGText>
195
+ <MGText category='h6' style={{ alignSelf: 'center', color: props.colors.primary500 }}>{mgFunctionsLib.i18nString('credentials', props.language)}</MGText>
196
196
  </View>
197
197
  );
198
198
 
@@ -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
- <TextInput
261
- style={nbStyles.input}
262
- placeholder={mgFunctionsLib.i18nString('userName', props.language)}
263
- placeholderTextColor="#888"
264
- onChangeText={onChange}
265
- value={value}
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 &&
@@ -322,7 +416,7 @@ export function MGCurrentAccount(props) {
322
416
  <>
323
417
  <View style={{ flexDirection: 'row', marginTop: 10, marginBottom: 10, marginLeft: 10 }}>
324
418
  <View style={{ flexGrow: 0.05 }}>
325
- <MaterialCommunityIcons name='file-account-outline' color={props.colors.primary['500']} size={30} style={{ flex: 1 }} />
419
+ <MaterialCommunityIcons name='file-account-outline' color={props.colors.primary500} size={30} style={{ flex: 1 }} />
326
420
  </View>
327
421
  <View style={{ flexGrow: 0.95 }}>
328
422
  <MGText category='h6'>{item.document} {mgFunctionsLib.i18nString('number', props.language)} {item.number}</MGText>
@@ -561,7 +655,7 @@ export function MGGoBack(props) {
561
655
  variant="ghost"
562
656
  action="primary"
563
657
  iconSize={28}
564
- iconColor={props.colors.primary['500']}
658
+ iconColor={props.colors.primary500}
565
659
  onPress={() => props.process.goBack()}
566
660
  />
567
661
  </View>
@@ -593,7 +687,7 @@ export function MGFlatListHeader(props) {
593
687
  marginBottom: 20,
594
688
  paddingHorizontal: 10,
595
689
  paddingVertical: 10,
596
- borderColor: props.colors.primary['500'],
690
+ borderColor: props.colors.primary500,
597
691
  borderRadius: 10,
598
692
  borderStyle: 'solid',
599
693
  borderWidth: 1
@@ -623,14 +717,14 @@ export function MGSessionHeader(props) {
623
717
  <View>
624
718
  <View style={{ display: 'flex', flexDirection: 'row', alignItems: 'stretch' }}>
625
719
  <View style={{ flexGrow: 0.5, alignSelf: 'center' }}>
626
- <MGText category='h5' style={{ color: props.colors.primary['500'], marginLeft: 5 }}>{props.module}</MGText>
720
+ <MGText category='h5' style={{ color: props.colors.primary500, marginLeft: 5 }}>{props.module}</MGText>
627
721
  </View>
628
722
  <View style={{ flexGrow: 0.35, flexDirection: 'column', justifyContent: 'center' }}>
629
723
  <MGText style={{ alignSelf: 'flex-end', marginBottom: -5 }} category='h6'>{props.person.lastName}</MGText>
630
724
  <MGText style={{ alignSelf: 'flex-end' }}>{props.person.firstName}</MGText>
631
725
  </View>
632
726
  <View style={{ flexGrow: 0.15, flexDirection: 'column' }}>
633
- <MaterialCommunityIcons name='account' size={40} style={{ alignSelf: 'center', color: props.colors.primary['700'] }} />
727
+ <MaterialCommunityIcons name='account' size={40} style={{ alignSelf: 'center', color: props.colors.primary700 }} />
634
728
  <MGText category='c1' style={{ alignSelf: 'center', marginTop: -5 }}>{props.person.profile}</MGText>
635
729
  </View>
636
730
  </View>
@@ -644,7 +738,7 @@ export function MGSessionHeader(props) {
644
738
  export function MGActivityIndicator(props) {
645
739
  return (
646
740
  <View style={{ flex: 1, flexDirection: 'column', justifyContent: 'center', alignContent: 'center' }}>
647
- <ActivityIndicator size="large" color={props.colors.primary['500']} />
741
+ <ActivityIndicator size="large" color={props.colors.primary500} />
648
742
  </View>
649
743
  )
650
744
  }
package/functions.js CHANGED
@@ -9,16 +9,15 @@ import { Camera } from 'expo-camera';
9
9
 
10
10
  import { MGText, MGButton } from './components.js';
11
11
  import * as mgConstants from './constants.js';
12
- import gsConfig from './gluestack.config.js';
13
12
 
14
13
  // Navigator
15
14
 
16
- export function navigatorHeader(insets, onPressLogout, company) {
15
+ export function navigatorHeader(insets, colors, onPressLogout, company) {
17
16
  let companyDescription = company.description;
18
17
  if (companyDescription.length > 25)
19
18
  companyDescription = companyDescription.substring(0, 25) + '...';
20
19
  return (
21
- <Box style={[safeAreaViewForNavigatorHeaderStyleSheet(insets).safeAreaView, { backgroundColor: gsConfig.tokens.colors.primary500, flexDirection: 'column', justifyContent: 'flex-end' }]}>
20
+ <Box style={[safeAreaViewForNavigatorHeaderStyleSheet(insets).safeAreaView, { backgroundColor: colors.primary500, flexDirection: 'column', justifyContent: 'flex-end' }]}>
22
21
  <View style={{ flexDirection: 'row', flexGrow: 1 }}>
23
22
  <View style={{ flexGrow: 0.9, marginLeft: 10, alignSelf: 'center' }}>
24
23
  <MGText category='h5' style={{ color: 'white' }}>{companyDescription}</MGText>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mg-library",
3
- "version": "1.0.678",
3
+ "version": "1.0.680",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {