mg-library 1.0.604 → 1.0.606

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 +12 -12
  2. package/functions.js +2 -2
  3. package/package.json +1 -1
package/blocks.js CHANGED
@@ -39,7 +39,7 @@ export function MGWelcome(props) {
39
39
 
40
40
  let listHeaderComponent = (
41
41
  <View>
42
- <MGSessionHeader module={subTitle} person={props.person} theme={props.theme} />
42
+ <MGSessionHeader module={subTitle} person={props.person} colors={props.colors} />
43
43
  {companyInfoComponent}
44
44
  <MGDivider />
45
45
  {props.beforeNotices != undefined &&
@@ -56,7 +56,7 @@ export function MGWelcome(props) {
56
56
  <>
57
57
  <View style={{ flex: 1, flexDirection: 'column', marginVertical: 5, marginHorizontal: 10 }}>
58
58
  {item.isImportant &&
59
- <MaterialCommunityIcons style={{ flex: 1 }} name='alert-circle-outline' color={props.theme['color-primary-500']} size={30} />
59
+ <MaterialCommunityIcons style={{ flex: 1 }} name='alert-circle-outline' color={props.colors.primary['500']} size={30} />
60
60
  }
61
61
  <MGText style={{ flex: 1 }} category='h6'>{item.description}</MGText>
62
62
  <MGText style={{ flex: 1 }} category='c1'>{mgFunctionsLib.getDateForExposition(item.noticeDate, props.language)}, {item.noticeTime._asTime()}</MGText>
@@ -110,7 +110,7 @@ export function MGBenefits(props) {
110
110
 
111
111
  let listHeaderComponent = (
112
112
  <View>
113
- <MGSessionHeader module={subTitle} person={props.person} theme={props.theme} />
113
+ <MGSessionHeader module={subTitle} person={props.person} colors={props.colors} />
114
114
  {props.beforeBenefits != undefined &&
115
115
  <>
116
116
  {props.beforeBenefits}
@@ -125,7 +125,7 @@ export function MGBenefits(props) {
125
125
  <>
126
126
  <View style={{ flex: 1, flexDirection: 'column', marginVertical: 5, marginHorizontal: 10 }}>
127
127
  {item.isImportant &&
128
- <MaterialCommunityIcons style={{ flex: 1 }} name='alert-circle-outline' color={props.theme['color-primary-500']} size={30} />
128
+ <MaterialCommunityIcons style={{ flex: 1 }} name='alert-circle-outline' color={props.colors.primary['500']} size={30} />
129
129
  }
130
130
  <MGText style={{ flex: 1 }} category='h6'>{item.description}</MGText>
131
131
  </View>
@@ -181,7 +181,7 @@ export function MGLogin(props) {
181
181
 
182
182
  let cardHeader = (
183
183
  <View style={{ flex: 1, flexGrow: 1, flexDirection: 'row' }}>
184
- <MGText category='h6' style={{ alignSelf: 'center', color: props.theme['color-primary-500'] }}>{mgFunctionsLib.i18nString('credentials', props.language)}</MGText>
184
+ <MGText category='h6' style={{ alignSelf: 'center', color: props.colors.primary['500'] }}>{mgFunctionsLib.i18nString('credentials', props.language)}</MGText>
185
185
  </View>
186
186
  );
187
187
 
@@ -306,7 +306,7 @@ export function MGCurrentAccount(props) {
306
306
  <>
307
307
  <View style={{ flexDirection: 'row', marginTop: 10, marginBottom: 10, marginLeft: 10 }}>
308
308
  <View style={{ flexGrow: 0.05 }}>
309
- <MaterialCommunityIcons name='file-account-outline' color={props.theme['color-primary-500']} size={30} style={{ flex: 1 }} />
309
+ <MaterialCommunityIcons name='file-account-outline' color={props.colors.primary['500']} size={30} style={{ flex: 1 }} />
310
310
  </View>
311
311
  <View style={{ flexGrow: 0.95 }}>
312
312
  <MGText category='h6'>{item.document} {mgFunctionsLib.i18nString('number', props.language)} {item.number}</MGText>
@@ -618,7 +618,7 @@ export function MGPopover(props) {
618
618
  <NBPopover.CloseButton />
619
619
  <NBPopover.Body>
620
620
  <Box alignItems="center" justifyContent="center">
621
- <NBIcon as={MaterialCommunityIcons} name="alert-outline" size={16} color={props.theme['color-primary-500']} mb={3} />
621
+ <NBIcon as={MaterialCommunityIcons} name="alert-outline" size={16} color={props.colors.primary['500']} mb={3} />
622
622
  <MGText textAlign="center">
623
623
  {mgFunctionsLib.i18nString('confirm', props.language)}?
624
624
  </MGText>
@@ -639,7 +639,7 @@ export function MGGoBack(props) {
639
639
  appearance='ghost'
640
640
  bg='transparent'
641
641
  onPress={() => props.process.goBack()}>
642
- <NBIcon as={MaterialCommunityIcons} name='keyboard-backspace' size='2xl' color={props.theme['color-primary-500']}
642
+ <NBIcon as={MaterialCommunityIcons} name='keyboard-backspace' size='2xl' color={props.colors.primary['500']}
643
643
  />
644
644
  </NBButton>
645
645
  </View>
@@ -666,7 +666,7 @@ export function MGFlatListHeader(props) {
666
666
  {props.beforeTitle != undefined &&
667
667
  props.beforeTitle
668
668
  }
669
- <View style={{ marginHorizontal: 10, marginBottom: 20, paddingHorizontal: 10, paddingVertical: 10, borderColor: props.theme['color-primary-500'], borderRadius: 10, borderStyle: 'solid', borderWidth: 1 }}>
669
+ <View style={{ marginHorizontal: 10, marginBottom: 20, paddingHorizontal: 10, paddingVertical: 10, borderColor: props.colors.primary['500'], borderRadius: 10, borderStyle: 'solid', borderWidth: 1 }}>
670
670
  <MGText category='h6' style={{ marginLeft: 10 }}>{props.title}</MGText>
671
671
  {props.subTitle != undefined &&
672
672
  props.subTitle
@@ -685,14 +685,14 @@ export function MGSessionHeader(props) {
685
685
  <View>
686
686
  <View style={{ display: 'flex', flexDirection: 'row', alignItems: 'stretch' }}>
687
687
  <View style={{ flexGrow: 0.5, alignSelf: 'center' }}>
688
- <MGText category='h5' style={{ color: props.theme['color-primary-500'], marginLeft: 5 }}>{props.module}</MGText>
688
+ <MGText category='h5' style={{ color: props.colors.primary['500'], marginLeft: 5 }}>{props.module}</MGText>
689
689
  </View>
690
690
  <View style={{ flexGrow: 0.35, flexDirection: 'column', justifyContent: 'center' }}>
691
691
  <MGText style={{ alignSelf: 'flex-end', marginBottom: -5 }} category='h6'>{props.person.lastName}</MGText>
692
692
  <MGText style={{ alignSelf: 'flex-end' }}>{props.person.firstName}</MGText>
693
693
  </View>
694
694
  <View style={{ flexGrow: 0.15, flexDirection: 'column' }}>
695
- <MaterialCommunityIcons name='account' size={40} style={{ alignSelf: 'center', color: props.theme['color-primary-700'] }} />
695
+ <MaterialCommunityIcons name='account' size={40} style={{ alignSelf: 'center', color: props.colors.primary['700'] }} />
696
696
  <MGText category='c1' style={{ alignSelf: 'center', marginTop: -5 }}>{props.person.profile}</MGText>
697
697
  </View>
698
698
  </View>
@@ -713,7 +713,7 @@ export function MGDivider() {
713
713
  export function MGActivityIndicator(props) {
714
714
  return (
715
715
  <View style={{ flex: 1, flexDirection: 'column', justifyContent: 'center', alignContent: 'center' }}>
716
- <ActivityIndicator size="large" color={props.theme['color-primary-500']} />
716
+ <ActivityIndicator size="large" color={props.colors.primary['500']} />
717
717
  </View>
718
718
  )
719
719
  }
package/functions.js CHANGED
@@ -13,12 +13,12 @@ import * as mgConstants from './constants.js';
13
13
 
14
14
  // Navigator
15
15
 
16
- export function navigatorHeader(insets, theme, onPressLogout, company) {
16
+ export function navigatorHeader(insets, colors, onPressLogout, company) {
17
17
  let companyDescription = company.description;
18
18
  if (companyDescription.length > 25)
19
19
  companyDescription = companyDescription.substring(0, 25) + '...';
20
20
  return (
21
- <Box style={[safeAreaViewForNavigatorHeaderStyleSheet(insets).safeAreaView, { backgroundColor: theme['color-primary-500'], flexDirection: 'column', justifyContent: 'flex-end' }]}>
21
+ <Box style={[safeAreaViewForNavigatorHeaderStyleSheet(insets).safeAreaView, { backgroundColor: colors.primary['500'], flexDirection: 'column', justifyContent: 'flex-end' }]}>
22
22
  <View style={{ flexDirection: 'row', flexGrow: 1 }}>
23
23
  <View style={{ flexGrow: 0.9, marginLeft: 10, alignSelf: 'center' }}>
24
24
  <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.604",
3
+ "version": "1.0.606",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {