muba-posting 8.0.1 → 8.0.3

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/Preview.js CHANGED
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
- import { Text, View, TouchableOpacity, ImageBackground, Image } from 'react-native';
2
+ import { Text, View, TouchableOpacity, ImageBackground } from 'react-native';
3
+ import { Image } from 'expo-image';
3
4
  import DisplayPrice from 'muba-display-price'
4
5
  import { strings } from 'muba-i18n';
5
6
  import commonStyles from './commonStyles';
@@ -70,26 +71,18 @@ export default class Preview extends React.Component {
70
71
  </View>
71
72
  </View>
72
73
 
73
- {this.state.mainPicture !== null ?
74
- <View style={commonStyles.progressbarInputArea}>
75
- <ImageBackground style={[commonStyles.previewBox, commonStyles.photoBoxImage]} source={{ uri: this.state.mainPicture }} resizeMode='cover' borderRadius={10}>
76
- {this.props.postingAd.reference ?
77
- <View style={commonStyles.previewReference}>
78
- <Text style={commonStyles.previewTitleText}>{strings('setup.ref')} {this.props.postingAd.reference}</Text>
79
- </View>
80
- :
81
- <View />
82
- }
74
+ {this.state.mainPicture !== null &&
75
+ <Image style={[commonStyles.previewBox, commonStyles.photoBoxImage]} source={{ uri: this.state.mainPicture }} contentFit='cover' borderRadius={10} /> }
83
76
 
84
- <ImageBackground style={[commonStyles.photoControls, commonStyles.previewControls]} source={require('./assets/images/bg-shadow.png')} resizeMode='stretch' borderRadius={1.5}>
85
- <View style={commonStyles.previewTitle}>
86
- <Text style={commonStyles.previewTitleText}>{this.props.postingAd.languages[0].title}</Text>
87
- </View>
88
- <Text style={[commonStyles.subNote, commonStyles.subNotePreview, commonStyles.previewText]}>{this.props.postingAd.languages[0].description != null && this.props.postingAd.languages[0].description.length > 114 ? this.props.postingAd.languages[0].description.substring(0, 114) + '...' : this.props.postingAd.languages[0].description}</Text>
89
- </ImageBackground>
90
- </ImageBackground>
77
+ <View style={[commonStyles.infoPreview, commonStyles.previewControls, {marginBottom: 10}]}>
78
+ {this.props.postingAd.reference &&
79
+ <Text style={commonStyles.previewTitleText}>{strings('setup.ref')} {this.props.postingAd.reference}</Text>
80
+ }
81
+ <View style={commonStyles.previewTitle}>
82
+ <Text style={commonStyles.previewTitleText}>{this.props.postingAd.languages[0].title}</Text>
91
83
  </View>
92
- : null}
84
+ <Text style={[commonStyles.subNote, commonStyles.subNotePreview, commonStyles.previewText]}>{this.props.postingAd.languages[0].description != null && this.props.postingAd.languages[0].description.length > 114 ? this.props.postingAd.languages[0].description.substring(0, 114) + '...' : this.props.postingAd.languages[0].description}</Text>
85
+ </View>
93
86
 
94
87
  {this.props.businessId && !this.state.showPaymentOnline ?
95
88
  <View style={commonStyles.promoBox}>
package/Publish6.js CHANGED
@@ -23,6 +23,8 @@ export default class Publish6 extends React.Component {
23
23
 
24
24
  this.languageItem = [];
25
25
 
26
+ this.phoneGroup = React.createRef();
27
+
26
28
  this.state = {
27
29
  hideSave: false,
28
30
  requiredPhoneError: false,
@@ -106,7 +108,7 @@ export default class Publish6 extends React.Component {
106
108
  }
107
109
 
108
110
  async validateForm() {
109
- let validate = this.refs.phoneGroup.onSubmitValidate();
111
+ let validate = this.phoneGroup.onSubmitValidate();
110
112
 
111
113
  if (validate) {
112
114
  const phones = this.props.postingAd.phonesObject.map(phone => phone.fullPhone).join(PHONE_SEPARATOR);
@@ -192,7 +194,7 @@ export default class Publish6 extends React.Component {
192
194
  returnKeyType={"next"}
193
195
  maxLength={50}
194
196
  disabled={!this.props.allowedToModify.clientRef}
195
- onSubmitEditing={(event) => { this.refs.phoneGroup.focus(); }} />
197
+ onSubmitEditing={(event) => { this.phoneGroup.focus(); }} />
196
198
  </View>
197
199
 
198
200
  <View style={this.state.requiredPhoneError ? [commonStyles.progressbarFieldContainer, commonStyles.fieldError] : commonStyles.progressbarFieldContainer} ref={(element) => this.phoneView = element}>
@@ -203,7 +205,7 @@ export default class Publish6 extends React.Component {
203
205
  </View>
204
206
 
205
207
  <PhoneGroup
206
- ref='phoneGroup'
208
+ ref={this.phoneGroup}
207
209
  inputStyle={commonStyles.input}
208
210
  phoneBoxStyle={this.state.requiredPhoneError ? commonStyles.inputPhoneBoxError : commonStyles.inputPhoneBox}
209
211
  value={this.props.postingAd.phonesObject}
package/commonStyles.js CHANGED
@@ -858,19 +858,12 @@ export default StyleSheet.create({
858
858
  previewTitleText: {
859
859
  fontFamily: 'PostingMedium',
860
860
  fontSize: 19,
861
- color: '#fff',
862
- textShadowColor: '#333333',
863
- textShadowOffset: { width: -1, height: 1 },
864
- textShadowRadius: 4,
865
- lineHeight: 21,
861
+ color: '#858585',
866
862
  textAlign: 'left'
867
863
  },
868
864
 
869
865
  previewText: {
870
- color: '#fff',
871
- textShadowColor: '#333333',
872
- textShadowOffset: { width: -1, height: 1 },
873
- textShadowRadius: 4,
866
+ color: '#858585',
874
867
  textAlign: 'left'
875
868
  },
876
869
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "muba-posting",
3
- "version": "8.0.1",
3
+ "version": "8.0.3",
4
4
  "description": "Posting",
5
5
  "main": "Posting.js",
6
6
  "scripts": {