ordering-ui-react-native 0.17.23 → 0.17.24-test

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 (211) hide show
  1. package/package.json +8 -7
  2. package/src/DeliveryApp.tsx +43 -1
  3. package/src/components/BusinessesListing/index.tsx +1 -1
  4. package/src/components/OrderCreating/index.tsx +1 -21
  5. package/src/components/PaymentOptionsWebView/index.tsx +119 -120
  6. package/src/components/StripeMethodForm/index.tsx +108 -79
  7. package/src/components/VerifyPhone/styles.tsx +1 -2
  8. package/src/components/shared/OToast.tsx +4 -4
  9. package/src/types/index.tsx +5 -0
  10. package/src/utils/index.tsx +7 -1
  11. package/themes/business/index.tsx +2 -0
  12. package/themes/business/src/components/AcceptOrRejectOrder/index.tsx +265 -240
  13. package/themes/business/src/components/AcceptOrRejectOrder/styles.tsx +6 -4
  14. package/themes/business/src/components/BusinessController/index.tsx +0 -1
  15. package/themes/business/src/components/Chat/index.tsx +118 -107
  16. package/themes/business/src/components/DriverMap/index.tsx +17 -6
  17. package/themes/business/src/components/GoogleMap/index.tsx +58 -57
  18. package/themes/business/src/components/LoginForm/Otp/index.tsx +120 -0
  19. package/themes/business/src/components/LoginForm/Otp/styles.tsx +7 -0
  20. package/themes/business/src/components/LoginForm/index.tsx +238 -80
  21. package/themes/business/src/components/LoginForm/styles.tsx +10 -0
  22. package/themes/business/src/components/MapView/index.tsx +10 -10
  23. package/themes/business/src/components/NewOrderNotification/index.tsx +43 -50
  24. package/themes/business/src/components/OrderDetails/Delivery.tsx +4 -3
  25. package/themes/business/src/components/OrderDetails/OrderContentComponent.tsx +90 -47
  26. package/themes/business/src/components/OrderDetails/OrderHeaderComponent.tsx +59 -62
  27. package/themes/business/src/components/OrderDetailsLogistic/index.tsx +195 -0
  28. package/themes/business/src/components/OrderDetailsLogistic/styles.tsx +5 -0
  29. package/themes/business/src/components/OrderMessage/index.tsx +18 -17
  30. package/themes/business/src/components/OrderSummary/index.tsx +113 -121
  31. package/themes/business/src/components/OrdersOption/index.tsx +32 -75
  32. package/themes/business/src/components/PreviousOrders/OrderItem.tsx +250 -0
  33. package/themes/business/src/components/PreviousOrders/OrdersGroupedItem.tsx +115 -0
  34. package/themes/business/src/components/PreviousOrders/index.tsx +445 -243
  35. package/themes/business/src/components/PreviousOrders/styles.tsx +31 -3
  36. package/themes/business/src/components/ProductItemAccordion/index.tsx +27 -3
  37. package/themes/business/src/components/ReviewCustomer/index.tsx +41 -24
  38. package/themes/business/src/components/StoresList/index.tsx +2 -2
  39. package/themes/business/src/components/shared/OLink.tsx +33 -13
  40. package/themes/business/src/components/shared/OModal.tsx +16 -9
  41. package/themes/business/src/components/shared/OText.tsx +8 -2
  42. package/themes/business/src/types/index.tsx +32 -2
  43. package/themes/business/src/utils/index.tsx +44 -1
  44. package/themes/doordash/src/components/BusinessesListing/index.tsx +1 -1
  45. package/themes/doordash/src/components/LoginForm/index.tsx +1 -2
  46. package/themes/instacart/src/components/BusinessesListing/index.tsx +1 -1
  47. package/themes/kiosk/src/components/BusinessesListing/index.tsx +2 -1
  48. package/themes/kiosk/src/components/Checkout/index.tsx +6 -0
  49. package/themes/kiosk/src/components/LoginForm/Otp/index.tsx +92 -0
  50. package/themes/kiosk/src/components/LoginForm/Otp/styles.tsx +7 -0
  51. package/themes/kiosk/src/components/LoginForm/index.tsx +473 -151
  52. package/themes/kiosk/src/components/LoginForm/styles.tsx +14 -1
  53. package/themes/kiosk/src/components/NavBar/index.tsx +14 -14
  54. package/themes/kiosk/src/components/OptionCard/index.tsx +1 -1
  55. package/themes/kiosk/src/components/OrderTypeCardSelector/index.tsx +8 -10
  56. package/themes/kiosk/src/components/PhoneInputNumber/index.tsx +3 -2
  57. package/themes/kiosk/src/components/PhoneInputNumber/styles.tsx +1 -3
  58. package/themes/kiosk/src/components/ProductForm/index.tsx +1 -14
  59. package/themes/kiosk/src/components/shared/OButton.tsx +5 -18
  60. package/themes/kiosk/src/components/shared/OModal.tsx +14 -11
  61. package/themes/kiosk/src/layouts/Container.tsx +7 -1
  62. package/themes/kiosk/src/types/index.d.ts +13 -0
  63. package/themes/kiosk/src/utils/index.tsx +15 -0
  64. package/themes/original/index.tsx +6 -0
  65. package/themes/original/src/components/AddressDetails/index.tsx +29 -11
  66. package/themes/original/src/components/AddressForm/index.tsx +49 -19
  67. package/themes/original/src/components/AddressList/index.tsx +26 -21
  68. package/themes/original/src/components/AddressList/styles.tsx +4 -2
  69. package/themes/original/src/components/AnalyticsSegment/index.tsx +193 -10
  70. package/themes/original/src/components/AppleLogin/index.tsx +4 -4
  71. package/themes/original/src/components/BusinessBasicInformation/index.tsx +166 -89
  72. package/themes/original/src/components/BusinessBasicInformation/styles.tsx +9 -7
  73. package/themes/original/src/components/BusinessController/index.tsx +145 -68
  74. package/themes/original/src/components/BusinessController/styles.tsx +22 -9
  75. package/themes/original/src/components/BusinessFeaturedController/index.tsx +21 -54
  76. package/themes/original/src/components/BusinessFeaturedController/styles.tsx +8 -0
  77. package/themes/original/src/components/BusinessInformation/index.tsx +10 -31
  78. package/themes/original/src/components/BusinessItemAccordion/index.tsx +23 -22
  79. package/themes/original/src/components/BusinessListingSearch/index.tsx +350 -323
  80. package/themes/original/src/components/BusinessPreorder/index.tsx +97 -16
  81. package/themes/original/src/components/BusinessProductsList/index.tsx +20 -11
  82. package/themes/original/src/components/BusinessProductsList/styles.tsx +8 -3
  83. package/themes/original/src/components/BusinessProductsListing/index.tsx +616 -495
  84. package/themes/original/src/components/BusinessProductsListing/styles.tsx +7 -9
  85. package/themes/original/src/components/BusinessReviews/index.tsx +3 -1
  86. package/themes/original/src/components/BusinessesListing/Layout/Appointment/index.tsx +1 -1
  87. package/themes/original/src/components/BusinessesListing/Layout/Original/index.tsx +105 -78
  88. package/themes/original/src/components/BusinessesListing/Layout/Original/styles.tsx +1 -9
  89. package/themes/original/src/components/BusinessesListing/index.tsx +5 -3
  90. package/themes/original/src/components/Cart/index.tsx +102 -69
  91. package/themes/original/src/components/CartContent/index.tsx +110 -19
  92. package/themes/original/src/components/CartContent/styles.tsx +15 -1
  93. package/themes/original/src/components/Checkout/index.tsx +323 -178
  94. package/themes/original/src/components/Checkout/styles.tsx +4 -2
  95. package/themes/original/src/components/CitiesControl/index.tsx +89 -0
  96. package/themes/original/src/components/CitiesControl/styles.tsx +17 -0
  97. package/themes/original/src/components/CouponControl/index.tsx +10 -3
  98. package/themes/original/src/components/DriverTips/index.tsx +52 -34
  99. package/themes/original/src/components/Favorite/index.tsx +7 -4
  100. package/themes/original/src/components/Favorite/styles.tsx +1 -1
  101. package/themes/original/src/components/FavoriteList/index.tsx +51 -80
  102. package/themes/original/src/components/FloatingButton/index.tsx +1 -2
  103. package/themes/original/src/components/FloatingButton/styles.tsx +1 -1
  104. package/themes/original/src/components/GPSButton/index.tsx +6 -4
  105. package/themes/original/src/components/GPSButton/styles.ts +3 -3
  106. package/themes/original/src/components/GiftCard/GiftCardUI/index.tsx +96 -0
  107. package/themes/original/src/components/GiftCard/GiftCardUI/styles.tsx +5 -0
  108. package/themes/original/src/components/GiftCard/PurchaseGiftCard/index.tsx +100 -0
  109. package/themes/original/src/components/GiftCard/PurchaseGiftCard/styles.tsx +8 -0
  110. package/themes/original/src/components/GiftCard/RedeemGiftCard/index.tsx +178 -0
  111. package/themes/original/src/components/GiftCard/RedeemGiftCard/styles.tsx +8 -0
  112. package/themes/original/src/components/GiftCard/SendGiftCard/index.tsx +165 -0
  113. package/themes/original/src/components/GiftCard/SendGiftCard/styles.tsx +9 -0
  114. package/themes/original/src/components/GoogleMap/index.tsx +4 -2
  115. package/themes/original/src/components/Help/index.tsx +8 -8
  116. package/themes/original/src/components/HelpAccountAndPayment/index.tsx +11 -22
  117. package/themes/original/src/components/HelpAccountAndPayment/styles.tsx +6 -0
  118. package/themes/original/src/components/HelpGuide/index.tsx +12 -16
  119. package/themes/original/src/components/HelpGuide/styles.tsx +6 -0
  120. package/themes/original/src/components/HelpOrder/index.tsx +12 -25
  121. package/themes/original/src/components/HelpOrder/styles.tsx +8 -1
  122. package/themes/original/src/components/Home/index.tsx +13 -4
  123. package/themes/original/src/components/LanguageSelector/index.tsx +17 -13
  124. package/themes/original/src/components/LastOrder/index.tsx +1 -34
  125. package/themes/original/src/components/LoginForm/Otp/index.tsx +89 -73
  126. package/themes/original/src/components/LoginForm/Otp/styles.tsx +0 -1
  127. package/themes/original/src/components/LoginForm/index.tsx +59 -22
  128. package/themes/original/src/components/LottieAnimation/index.tsx +78 -0
  129. package/themes/original/src/components/MessageListing/index.tsx +16 -42
  130. package/themes/original/src/components/Messages/index.tsx +32 -10
  131. package/themes/original/src/components/MomentOption/index.tsx +195 -88
  132. package/themes/original/src/components/MultiCart/index.tsx +50 -0
  133. package/themes/original/src/components/MultiCartsPaymethodsAndWallets/index.tsx +197 -116
  134. package/themes/original/src/components/MultiCheckout/index.tsx +288 -86
  135. package/themes/original/src/components/MultiOrdersDetails/SingleOrderCard.tsx +37 -224
  136. package/themes/original/src/components/MultiOrdersDetails/index.tsx +67 -20
  137. package/themes/original/src/components/MultiOrdersDetails/styles.tsx +1 -1
  138. package/themes/original/src/components/MyOrders/index.tsx +55 -51
  139. package/themes/original/src/components/NavBar/index.tsx +6 -11
  140. package/themes/original/src/components/Notifications/index.tsx +46 -50
  141. package/themes/original/src/components/Notifications/styles.tsx +6 -3
  142. package/themes/original/src/components/OrderDetails/OrderEta.tsx +64 -0
  143. package/themes/original/src/components/OrderDetails/OrderHistory.tsx +15 -3
  144. package/themes/original/src/components/OrderDetails/index.tsx +262 -368
  145. package/themes/original/src/components/OrderDetails/styles.tsx +3 -4
  146. package/themes/original/src/components/OrderItAgain/index.tsx +3 -1
  147. package/themes/original/src/components/OrderProgress/index.tsx +74 -112
  148. package/themes/original/src/components/OrderProgress/styles.tsx +5 -0
  149. package/themes/original/src/components/OrderSummary/index.tsx +87 -59
  150. package/themes/original/src/components/OrderTypeSelector/index.tsx +3 -2
  151. package/themes/original/src/components/OrdersOption/PreviousBusinessOrdered/index.tsx +24 -19
  152. package/themes/original/src/components/OrdersOption/index.tsx +96 -88
  153. package/themes/original/src/components/PageBanner/index.tsx +171 -0
  154. package/themes/original/src/components/PageBanner/styles.tsx +11 -0
  155. package/themes/original/src/components/PaymentOptionStripe/styles.tsx +1 -1
  156. package/themes/original/src/components/PaymentOptionWallet/index.tsx +56 -56
  157. package/themes/original/src/components/PaymentOptions/index.tsx +34 -6
  158. package/themes/original/src/components/PhoneInputNumber/index.tsx +3 -3
  159. package/themes/original/src/components/PlaceSpot/index.tsx +12 -6
  160. package/themes/original/src/components/PreviousOrders/index.tsx +3 -2
  161. package/themes/original/src/components/ProductForm/index.tsx +230 -261
  162. package/themes/original/src/components/ProductForm/styles.tsx +4 -7
  163. package/themes/original/src/components/ProductItemAccordion/index.tsx +197 -138
  164. package/themes/original/src/components/ProductOptionSubOption/index.tsx +18 -10
  165. package/themes/original/src/components/ProductOptionSubOption/styles.tsx +1 -2
  166. package/themes/original/src/components/ProfessionalFilter/SingleProfessionalCard/index.tsx +108 -0
  167. package/themes/original/src/components/ProfessionalFilter/index.tsx +20 -50
  168. package/themes/original/src/components/ProfessionalProfile/index.tsx +36 -7
  169. package/themes/original/src/components/Promotions/index.tsx +234 -220
  170. package/themes/original/src/components/Promotions/styles.tsx +10 -3
  171. package/themes/original/src/components/ReviewDriver/index.tsx +3 -3
  172. package/themes/original/src/components/ReviewOrder/index.tsx +26 -9
  173. package/themes/original/src/components/ReviewOrder/styles.tsx +7 -0
  174. package/themes/original/src/components/ReviewProducts/index.tsx +23 -11
  175. package/themes/original/src/components/ReviewTrigger/index.tsx +27 -9
  176. package/themes/original/src/components/ReviewTrigger/styles.tsx +8 -1
  177. package/themes/original/src/components/ScheduleAccordion/index.tsx +68 -0
  178. package/themes/original/src/components/ScheduleAccordion/styles.tsx +14 -0
  179. package/themes/original/src/components/ServiceForm/index.tsx +366 -288
  180. package/themes/original/src/components/Sessions/index.tsx +11 -8
  181. package/themes/original/src/components/Sessions/styles.tsx +5 -0
  182. package/themes/original/src/components/SignupForm/index.tsx +82 -67
  183. package/themes/original/src/components/SingleOrderCard/index.tsx +149 -63
  184. package/themes/original/src/components/SingleOrderCard/styles.tsx +11 -9
  185. package/themes/original/src/components/SingleProductCard/index.tsx +99 -55
  186. package/themes/original/src/components/SingleProductCard/styles.tsx +27 -13
  187. package/themes/original/src/components/SingleProductReview/index.tsx +8 -2
  188. package/themes/original/src/components/SingleProductReview/styles.tsx +1 -1
  189. package/themes/original/src/components/StripeCardsList/index.tsx +9 -2
  190. package/themes/original/src/components/StripeElementsForm/index.tsx +28 -15
  191. package/themes/original/src/components/UpsellingProducts/index.tsx +238 -224
  192. package/themes/original/src/components/UpsellingProducts/styles.tsx +12 -1
  193. package/themes/original/src/components/UserDetails/index.tsx +8 -4
  194. package/themes/original/src/components/UserFormDetails/index.tsx +47 -7
  195. package/themes/original/src/components/UserProfile/index.tsx +9 -14
  196. package/themes/original/src/components/UserProfileForm/index.tsx +21 -28
  197. package/themes/original/src/components/UserProfileForm/styles.tsx +7 -0
  198. package/themes/original/src/components/WalletTransactionItem/index.tsx +2 -2
  199. package/themes/original/src/components/Wallets/index.tsx +94 -33
  200. package/themes/original/src/components/Wallets/styles.tsx +2 -0
  201. package/themes/original/src/components/shared/CardAnimation.tsx +47 -0
  202. package/themes/original/src/components/shared/HeaderTitle.tsx +8 -3
  203. package/themes/original/src/components/shared/OBottomPopup.tsx +1 -1
  204. package/themes/original/src/components/shared/OButton.tsx +6 -2
  205. package/themes/original/src/components/shared/OIcon.tsx +8 -1
  206. package/themes/original/src/components/shared/OInput.tsx +16 -2
  207. package/themes/original/src/components/shared/OModal.tsx +3 -3
  208. package/themes/original/src/layouts/Container.tsx +13 -9
  209. package/themes/original/src/types/index.tsx +38 -9
  210. package/themes/original/src/utils/index.tsx +375 -58
  211. package/themes/uber-eats/src/components/BusinessesListing/index.tsx +1 -1
@@ -49,6 +49,8 @@ const ProfileListUI = (props: ProfileParams) => {
49
49
 
50
50
  const theme = useTheme();
51
51
 
52
+ const isChewLayout = theme?.header?.components?.layout?.type?.toLowerCase() === 'chew'
53
+
52
54
  const langPickerStyle = StyleSheet.create({
53
55
  inputAndroid: {
54
56
  color: theme.colors.textNormal,
@@ -89,8 +91,7 @@ const ProfileListUI = (props: ProfileParams) => {
89
91
  marginEnd: 14
90
92
  },
91
93
  pagePadding: {
92
- paddingLeft: 40,
93
- paddingRight: 40
94
+ paddingHorizontal: isChewLayout ? 20 : 40
94
95
  },
95
96
  messageIconStyle: {
96
97
  fontSize: 18,
@@ -114,7 +115,6 @@ const ProfileListUI = (props: ProfileParams) => {
114
115
  const [confirm, setConfirm] = useState<any>({ open: false, content: null, handleOnAccept: null, id: null, title: null })
115
116
  const isWalletEnabled = configs?.cash_wallet?.value && configs?.wallet_enabled?.value === '1' && (configs?.wallet_cash_enabled?.value === '1' || configs?.wallet_credit_point_enabled?.value === '1')
116
117
  const IsPromotionsEnabled = configs?.advanced_offers_module?.value === '1' || configs?.advanced_offers_module?.value === true
117
- const isChewLayout = theme?.business_view?.components?.header?.components?.layout?.type === 'chew'
118
118
  const onRedirect = (route: string, params?: any) => {
119
119
  navigation.navigate(route, params)
120
120
  }
@@ -164,10 +164,7 @@ const ProfileListUI = (props: ProfileParams) => {
164
164
  }, [removeAccountState])
165
165
 
166
166
  return (
167
- <View style={{ flex: 1, height: height - top - bottom - 62, paddingTop: 20 }}>
168
- {/* <OText size={24} style={{ marginTop: 15, paddingHorizontal: 40 }}>
169
- {t('PROFILE', 'Profile')}
170
- </OText> */}
167
+ <View style={{ flex: 1, height: height - top - bottom, paddingTop: 20 }}>
171
168
  <CenterView style={styles.pagePadding}>
172
169
  {user?.photo && (
173
170
  <View style={styles.photo}>
@@ -184,7 +181,7 @@ const ProfileListUI = (props: ProfileParams) => {
184
181
  <View style={{ flexBasis: '70%' }}>
185
182
  <OText size={20} lineHeight={30} weight={Platform.OS === 'ios' ? '500' : 'bold'} color={theme.colors.textNormal}>{user?.name} {user?.lastname}</OText>
186
183
  <TouchableOpacity onPress={() => navigation.navigate('ProfileForm', { ...detailProps })}>
187
- <OText size={12} lineHeight={18} color={theme.colors.textSecondary} style={{ textDecorationLine: 'underline' }}>{t('VIEW_ACCOUNT', 'View account')}</OText>
184
+ <OText size={12} lineHeight={18} color={theme.colors.primary} style={{ textDecorationLine: 'underline' }}>{t('VIEW_ACCOUNT', 'View account')}</OText>
188
185
  </TouchableOpacity>
189
186
  </View>
190
187
  </CenterView>
@@ -200,12 +197,10 @@ const ProfileListUI = (props: ProfileParams) => {
200
197
  <MessageCircle name='message1' style={styles.messageIconStyle} color={theme.colors.textNormal} />
201
198
  <OText size={14} lineHeight={24} weight={'400'} color={theme.colors.textNormal}>{t('MESSAGES', 'Messages')}</OText>
202
199
  </ListItem>
203
- {isChewLayout && (
204
- <ListItem onPress={() => onRedirect('MyOrders', { isFromProfile: true, isGoBack: true })} activeOpacity={0.7}>
205
- <FontAwesome name='list-alt' style={styles.messageIconStyle} color={theme.colors.textNormal} />
206
- <OText size={14} lineHeight={24} weight={'400'} color={theme.colors.textNormal}>{t('MY_ORDERS', 'My Orders')}</OText>
207
- </ListItem>
208
- )}
200
+ <ListItem onPress={() => onRedirect('MyOrders', { isFromProfile: true, isGoBack: true })} activeOpacity={0.7}>
201
+ <FontAwesome name='list-alt' style={styles.messageIconStyle} color={theme.colors.textNormal} />
202
+ <OText size={14} lineHeight={24} weight={'400'} color={theme.colors.textNormal}>{t('MY_ORDERS', 'My Orders')}</OText>
203
+ </ListItem>
209
204
  {isWalletEnabled && (
210
205
  <ListItem onPress={() => onRedirect('Wallets', { isFromProfile: true, isGoBack: true })} activeOpacity={0.7}>
211
206
  <Ionicons name='wallet-outline' style={styles.messageIconStyle} color={theme.colors.textNormal} />
@@ -16,9 +16,8 @@ import { ProfileParams } from '../../types';
16
16
  import { UserFormDetailsUI } from '../UserFormDetails';
17
17
 
18
18
  import { OIcon, OIconButton, OModal } from '../shared';
19
- import { CenterView } from './styles';
19
+ import { CenterView, Container } from './styles';
20
20
  import NavBar from '../NavBar';
21
- import { Container } from '../../layouts/Container';
22
21
  import { VerifyPhone } from '../VerifyPhone'
23
22
  import Ionicons from 'react-native-vector-icons/Ionicons'
24
23
  import FastImage from 'react-native-fast-image'
@@ -51,11 +50,6 @@ const ProfileUI = (props: ProfileParams) => {
51
50
  shadowOpacity: 0.2,
52
51
  backgroundColor: theme.colors.white,
53
52
  },
54
- pagePadding: {
55
- paddingLeft: 40,
56
- paddingRight: 40,
57
- justifyContent: 'center',
58
- },
59
53
  navBarStyle: {
60
54
  paddingLeft: 40,
61
55
  paddingRight: 40,
@@ -284,17 +278,18 @@ const ProfileUI = (props: ProfileParams) => {
284
278
 
285
279
  return (
286
280
  <>
287
- <NavBar
288
- title={t('ACCOUNT', 'Account')}
289
- titleAlign={'center'}
290
- onActionLeft={() => navigation.goBack()}
291
- showCall={false}
292
- style={{ paddingHorizontal: 40, paddingVertical: Platform.OS === 'ios' ? 0 : 30 }}
293
- />
294
- <KeyboardAvoidingView behavior={Platform.OS == 'ios' ? 'padding' : 'height'} enabled style={{ flex: 1, flexDirection: 'column', justifyContent: 'center' }}>
295
- <Container noPadding>
296
-
297
- <CenterView style={styles.pagePadding}>
281
+ <Container
282
+ pdng={Platform.OS === 'ios' ? '20px' : '10px'}
283
+ >
284
+ <NavBar
285
+ title={t('ACCOUNT', 'Account')}
286
+ titleAlign={'center'}
287
+ onActionLeft={() => navigation.goBack()}
288
+ showCall={false}
289
+ btnStyle={{ paddingLeft: 0 }}
290
+ />
291
+ <KeyboardAvoidingView behavior={Platform.OS == 'ios' ? 'padding' : 'height'} enabled style={{ flex: 1, flexDirection: 'column', justifyContent: 'center' }}>
292
+ <CenterView>
298
293
  <View style={styles.photo}>
299
294
  {user?.photo ? (
300
295
  <FastImage
@@ -317,17 +312,15 @@ const ProfileUI = (props: ProfileParams) => {
317
312
  onClick={() => handleImagePicker()}
318
313
  />
319
314
  </CenterView>
320
- <View style={{ height: 8, marginLeft: -40, marginRight: -40, backgroundColor: theme.colors.backgroundGray100, marginVertical: 32, zIndex: 10 }} />
315
+ <View style={{ height: 8, backgroundColor: theme.colors.backgroundGray100, marginVertical: 32, zIndex: 10 }} />
321
316
  <Spinner visible={formState?.loading || verifyPhoneState?.loading} />
322
- <View style={styles.pagePadding}>
323
- <UserFormDetailsUI
324
- {...props}
325
- isEdit
326
- setWillVerifyOtpState={setWillVerifyOtpState}
327
- />
328
- </View>
329
- </Container>
330
- </KeyboardAvoidingView>
317
+ <UserFormDetailsUI
318
+ {...props}
319
+ isEdit
320
+ setWillVerifyOtpState={setWillVerifyOtpState}
321
+ />
322
+ </KeyboardAvoidingView>
323
+ </Container>
331
324
  <OModal
332
325
  open={isModalVisible}
333
326
  onClose={() => setIsModalVisible(false)}
@@ -9,6 +9,13 @@ export const UserData = styled.View`
9
9
  text-align: center;
10
10
  `
11
11
 
12
+ export const Container = styled.ScrollView`
13
+ position: relative;
14
+ flex: 1;
15
+ padding-top: ${(props: any) => props.pdng};
16
+ margin-bottom: 40px;
17
+ `
18
+
12
19
  export const Names = styled.View`
13
20
  flex-direction: row;
14
21
  `
@@ -54,7 +54,7 @@ export const WalletTransactionItem = (props: any) => {
54
54
  <OText>{item?.description}</OText>
55
55
  </DescriptionBlock>
56
56
  )}
57
- {!!item?.code && (
57
+ {/* {!!item?.code && (
58
58
  <DescriptionBlock>
59
59
  <OText weight={'bold'}>
60
60
  {t('CODE', 'Code')}
@@ -63,7 +63,7 @@ export const WalletTransactionItem = (props: any) => {
63
63
  </OText>
64
64
  </OText>
65
65
  </DescriptionBlock>
66
- )}
66
+ )} */}
67
67
  </Container>
68
68
  )
69
69
  }
@@ -1,5 +1,5 @@
1
1
  import React, { useState, useEffect } from 'react'
2
- import { Pressable, StyleSheet, View, ScrollView } from 'react-native';
2
+ import { Pressable, StyleSheet, View, ScrollView, TouchableOpacity, Platform } from 'react-native';
3
3
  import { useTheme } from 'styled-components/native'
4
4
  import { Fade, Placeholder, PlaceholderLine } from 'rn-placeholder';
5
5
  import FastImage from 'react-native-fast-image'
@@ -24,10 +24,10 @@ import {
24
24
  WalletTransactionsWrapper
25
25
  } from './styles'
26
26
 
27
- import NavBar from '../NavBar'
28
27
  import { OButton, OIcon, OText, OModal } from '../shared';
29
28
  import { NotFoundSource } from '../NotFoundSource';
30
29
  import { WalletTransactions } from '../WalletTransactions'
30
+ import { GiftCardUI } from '../GiftCard/GiftCardUI'
31
31
 
32
32
  const WalletsUI = (props: any) => {
33
33
  const {
@@ -48,6 +48,7 @@ const WalletsUI = (props: any) => {
48
48
  const [{ parsePrice }] = useUtils()
49
49
  const [{ configs }] = useConfig()
50
50
 
51
+
51
52
  const styles = StyleSheet.create({
52
53
  logoStyle: {
53
54
  width: 120,
@@ -58,12 +59,20 @@ const WalletsUI = (props: any) => {
58
59
  flexDirection: 'column',
59
60
  justifyContent: 'center',
60
61
  alignItems: 'center',
62
+ },
63
+ dividerStyle: {
64
+ height: 8,
65
+ backgroundColor: theme.colors.backgroundGray100,
66
+ marginVertical: 25,
67
+ marginHorizontal: -40,
68
+ width: '100%'
61
69
  }
62
70
  });
63
71
 
64
72
  const [tabSelected, setTabSelected] = useState(isWalletCashEnabled ? 'cash' : 'credit_point')
65
73
  const [openHistory, setOpenHistory] = useState(false)
66
- const isChewLayout = theme?.wallets_view?.components?.layout?.type === 'chew'
74
+ const isChewLayout = theme?.header?.components?.layout?.type === 'chew'
75
+ const hideWalletsTheme = theme?.bar_menu?.components?.wallets?.hidden
67
76
 
68
77
  const isWalletEnabled = configs?.cash_wallet?.value && configs?.wallet_enabled?.value === '1' && (isWalletCashEnabled || isWalletPointsEnabled)
69
78
 
@@ -78,7 +87,7 @@ const WalletsUI = (props: any) => {
78
87
  isActive: isWalletCashEnabled
79
88
  },
80
89
  credit_point: {
81
- name: t('CREDITS_POINTS_WALLET', 'Credit Points Wallet'),
90
+ name: t('POINTS_WALLET', 'Points Wallet'),
82
91
  value: 1,
83
92
  isActive: isWalletPointsEnabled
84
93
  }
@@ -112,26 +121,62 @@ const WalletsUI = (props: any) => {
112
121
  <>
113
122
  <Container>
114
123
  <Header>
115
- <NavBar
116
- title={isChewLayout ? '' : t('WALLETS', 'Wallets')}
117
- titleAlign={'center'}
118
- onActionLeft={goToBack}
119
- showCall={false}
120
- paddingTop={10}
121
- btnStyle={{ paddingLeft: 0 }}
122
- style={{ flex: 1 }}
123
- />
124
- {isChewLayout && (
125
- <OButton
126
- text={t('WALLET_HISTORY', 'Wallet history')}
127
- bgColor={theme.colors.white}
128
- borderColor={theme.colors.lightGray}
129
- imgRightSrc={null}
130
- textStyle={{ fontSize: 12, color: theme.colors.disabled }}
131
- onClick={() => setOpenHistory(true)}
132
- style={{ borderRadius: 8, height: 40 }}
133
- />
134
- )}
124
+ <View style={{
125
+ ...{
126
+ width: '100%',
127
+ display: 'flex',
128
+ flexDirection: 'row',
129
+ alignItems: 'center',
130
+ marginTop: 30,
131
+ justifyContent: 'space-between',
132
+ alignContent: 'center'
133
+ },
134
+ }}>
135
+ {(!props.hideBackBtn || !hideWalletsTheme) && !isChewLayout && (
136
+ <OButton
137
+ imgLeftStyle={{ width: 18 }}
138
+ imgRightSrc={null}
139
+ style={{
140
+ borderWidth: 0,
141
+ width: 26,
142
+ height: 26,
143
+ backgroundColor: '#FFF',
144
+ borderColor: '#FFF',
145
+ shadowColor: '#FFF',
146
+ paddingLeft: 0,
147
+ paddingRight: 0,
148
+ marginTop: 30,
149
+ }}
150
+ onClick={goToBack}
151
+ icon={AntDesignIcon}
152
+ iconProps={{
153
+ name: 'arrowleft',
154
+ size: 26
155
+ }}
156
+ />
157
+ )}
158
+ <OText
159
+ size={20}
160
+ style={{
161
+ marginLeft: (!props.hideBackBtn || !hideWalletsTheme) && !isChewLayout ? 40 : 0,
162
+ color: theme.colors.textNormal,
163
+ }}
164
+ weight={Platform.OS === 'ios' ? '600' : 'bold'}
165
+ >
166
+ {t('WALLETS', 'Wallets')}
167
+ </OText>
168
+ {isChewLayout && (
169
+ <OButton
170
+ text={t('WALLET_HISTORY', 'Wallet history')}
171
+ bgColor={theme.colors.white}
172
+ borderColor={theme.colors.lightGray}
173
+ imgRightSrc={null}
174
+ textStyle={{ fontSize: 12, color: theme.colors.disabled }}
175
+ onClick={() => setOpenHistory(true)}
176
+ style={{ borderRadius: 8, height: 40 }}
177
+ />
178
+ )}
179
+ </View>
135
180
  </Header>
136
181
 
137
182
  {!walletList.loading &&
@@ -145,16 +190,25 @@ const WalletsUI = (props: any) => {
145
190
  showsHorizontalScrollIndicator={false}
146
191
  >
147
192
  {walletList.wallets?.map((wallet: any) => walletName[wallet.type]?.isActive && (
148
- <Pressable
193
+ <TouchableOpacity
149
194
  key={wallet.id}
150
195
  onPress={() => handleChangeTab(wallet)}
151
196
  >
152
- <OTab isSelected={tabSelected === wallet.type}>
153
- <OText size={18} color={tabSelected === wallet.type && theme.colors.primary}>
197
+ <OTab
198
+ isSelected={tabSelected === wallet.type}
199
+ style={{
200
+ borderBottomWidth: 1,
201
+ borderBottomColor:
202
+ tabSelected === wallet.type
203
+ ? theme.colors.textNormal
204
+ : theme.colors.border
205
+ }}
206
+ >
207
+ <OText>
154
208
  {walletName[wallet.type]?.name}
155
209
  </OText>
156
210
  </OTab>
157
- </Pressable>
211
+ </TouchableOpacity>
158
212
  ))}
159
213
  </OTabs>
160
214
 
@@ -206,6 +260,10 @@ const WalletsUI = (props: any) => {
206
260
  </OText>
207
261
  </BalanceElement>
208
262
 
263
+ <View style={styles.dividerStyle} />
264
+ <GiftCardUI navigation={navigation} />
265
+ <View style={styles.dividerStyle} />
266
+
209
267
  {!isChewLayout && (
210
268
  <WalletTransactions
211
269
  transactionsList={transactionsList}
@@ -259,15 +317,18 @@ const WalletsUI = (props: any) => {
259
317
  <ScrollView>
260
318
  <WalletTransactionsWrapper>
261
319
  <OButton
320
+ imgLeftStyle={{ width: 18 }}
262
321
  imgRightSrc={null}
263
322
  style={{
264
323
  borderWidth: 0,
265
- backgroundColor: theme.colors.white,
266
- padding: 0,
267
- paddingHorizontal: 0,
268
- width: 30,
324
+ width: 26,
325
+ height: 26,
326
+ backgroundColor: '#FFF',
327
+ borderColor: '#FFF',
328
+ shadowColor: '#FFF',
269
329
  paddingLeft: 0,
270
- paddingRight: 0
330
+ paddingRight: 0,
331
+ marginBottom: 10
271
332
  }}
272
333
  onClick={() => setOpenHistory(false)}
273
334
  icon={AntDesignIcon}
@@ -34,10 +34,12 @@ export const OTabs = styled.View`
34
34
  flex-direction: row;
35
35
  width: 100%;
36
36
  flex-wrap: wrap;
37
+ padding-vertical: 5px;
37
38
  `;
38
39
 
39
40
  export const OTab = styled.View`
40
41
  padding-horizontal: 10px;
42
+ padding-vertical: 10px;
41
43
  `;
42
44
 
43
45
  export const LoyaltyContent = styled.View`
@@ -0,0 +1,47 @@
1
+ import React, { useState } from 'react'
2
+ import { StyleSheet, ViewStyle } from 'react-native'
3
+ import styled from 'styled-components/native'
4
+
5
+ const CardContainerTouchable = styled.TouchableOpacity``
6
+
7
+ interface Props {
8
+ children: React.ReactChildren | Element,
9
+ style?: Array<ViewStyle> | any,
10
+ onClick: any
11
+ }
12
+
13
+ export const CardAnimation = (props: Props) => {
14
+ const {
15
+ children,
16
+ onClick,
17
+ style
18
+ } = props
19
+ const [isPressed, setIsPressed] = useState(false)
20
+ const styles = StyleSheet.create({
21
+ cardAnimation: {
22
+ elevation: isPressed ? 2 : 0,
23
+ shadowColor: '#888',
24
+ shadowOffset: { width: 0, height: 0 },
25
+ shadowRadius: 0,
26
+ shadowOpacity: isPressed ? 0.8 : 0,
27
+ borderRadius: 12,
28
+ }
29
+ })
30
+
31
+ const styleProvided = style || []
32
+ return (
33
+ <CardContainerTouchable
34
+ onPress={onClick}
35
+ activeOpacity={0.8}
36
+ delayPressIn={20}
37
+ onPressIn={() => setIsPressed(true)}
38
+ onPressOut={() => setIsPressed(false)}
39
+ style={[
40
+ ...styleProvided,
41
+ styles.cardAnimation
42
+ ]}
43
+ >
44
+ {children}
45
+ </CardContainerTouchable>
46
+ )
47
+ }
@@ -1,16 +1,21 @@
1
1
  import React from 'react';
2
2
  import { Platform } from 'react-native';
3
3
  import OText from './OText';
4
+ import { useTheme } from 'styled-components/native'
4
5
 
5
6
  const HeaderTitle = (props: any) => {
6
7
  const { text, style } = props
8
+ const theme = useTheme();
9
+
7
10
  return (
8
11
  <OText
9
- size={24}
12
+ size={20}
13
+ weight={Platform.OS === 'ios' ? '600' : 'bold'}
10
14
  style={style ?? {
11
15
  marginTop: Platform.OS === 'android' ? 50 : 30,
12
- paddingHorizontal: 40,
13
- textTransform: 'capitalize'
16
+ paddingHorizontal: props.ph ?? 40,
17
+ textTransform: 'capitalize',
18
+ color: props.titleColor || theme.colors.textNormal,
14
19
  }}
15
20
  >
16
21
  {text}
@@ -33,7 +33,7 @@ const OBottomPopup = (props: Props) => {
33
33
 
34
34
  return (
35
35
  <Modal
36
- animationType='slide'
36
+ animationType='fade'
37
37
  transparent={transparent}
38
38
  visible={open}
39
39
  onRequestClose={() => onClose()}
@@ -12,6 +12,7 @@ import {
12
12
  import * as React from 'react';
13
13
  import styled, { useTheme } from 'styled-components/native';
14
14
  import { OIcon } from './';
15
+ import { css } from 'styled-components';
15
16
 
16
17
  const StyledButton = styled.View<Props>`
17
18
  background-color: ${(props: any) => props.theme.colors.primary};
@@ -26,6 +27,9 @@ const StyledButton = styled.View<Props>`
26
27
  padding-left: 20px;
27
28
  padding-right: 20px;
28
29
  position: relative;
30
+ ${(props: any) => props?.theme?.general?.components?.buttons?.borderRadius && css`
31
+ border-radius: ${props?.theme?.general?.components?.buttons?.borderRadius}px;
32
+ `}
29
33
  `
30
34
  const StyledButtonDisabled = styled(StyledButton)`
31
35
  background-color: ${(props: any) => props.theme.colors.disabled};
@@ -115,12 +119,12 @@ const OButton = (props: Props): React.ReactElement => {
115
119
  style={{ width: props.isCircle ? 52 : props.style?.width, ...props.parentStyle }}
116
120
  disabled={props.isDisabledWithSameStyles}
117
121
  >
118
- <StyledButton style={props.bgColor ? { ...props.style, backgroundColor: props.bgColor, borderColor: props.borderColor } : props.style}>
122
+ <StyledButton style={props.bgColor ? { ...props.style, backgroundColor: props.bgColor, borderColor: props.borderColor, borderRadius: parseInt(theme?.general?.components?.buttons?.borderRadius) || props.style?.borderRadius } : { ...props.style, borderRadius: parseInt(theme?.general?.components?.buttons?.borderRadius) || props.style?.borderRadius }}>
119
123
  {props.icon ? (
120
124
  <props.icon {...props.iconProps} />
121
125
  ) : null}
122
126
  {props.imgLeftSrc ? (
123
- <OIcon style={props.imgLeftStyle} src={props.imgLeftSrc} />
127
+ <OIcon style={props.imgLeftStyle} src={props.imgLeftSrc} color={theme.colors.textNormal} />
124
128
  ) : null}
125
129
  {props.text ? (
126
130
  <StyledText style={props.textStyle}>{props.text}</StyledText>
@@ -26,7 +26,14 @@ const OImage = (props: Props): React.ReactElement => {
26
26
  return (
27
27
  <Wrapper style={{ borderRadius: props.style?.borderRadius, overflow: 'hidden', marginHorizontal: props.style?.marginHorizontal }}>
28
28
  <SImage
29
- source={props.src ? props.src : props.url ? { uri: props.url } : props.dummy}
29
+ source={
30
+ props.src
31
+ ? props.src
32
+ : props.url
33
+ ? typeof props.url === 'number'
34
+ ? props.url
35
+ : { uri: props.url }
36
+ : props.dummy}
30
37
  style={{
31
38
  tintColor: props.color,
32
39
  flex: props.isWrap ? 1 : 0,
@@ -3,6 +3,7 @@ import { ImageSourcePropType, ImageStyle, ViewStyle, TextInputProps, TextStyle }
3
3
  import styled from 'styled-components/native';
4
4
  import OIcon from './OIcon';
5
5
  import MaterialIcon from 'react-native-vector-icons/MaterialIcons'
6
+ import { useTheme } from 'styled-components/native';
6
7
 
7
8
  const Input = styled.TextInput`
8
9
  flex-grow: 1;
@@ -39,6 +40,7 @@ interface Props extends TextInputProps {
39
40
  inputStyle?: TextStyle;
40
41
  wrapperRef?: any;
41
42
  onPress?: any;
43
+ isFocusHighlight?: boolean
42
44
  }
43
45
 
44
46
  const Wrapper = styled.Pressable`
@@ -54,12 +56,16 @@ const Wrapper = styled.Pressable`
54
56
  `;
55
57
 
56
58
  const OInput = (props: Props): React.ReactElement => {
59
+ const theme = useTheme();
60
+ const [inputFocused, setInputFocused] = React.useState(false)
57
61
  return (
58
62
  <Wrapper
59
63
  onPress={() => { props.forwardRef?.current?.focus?.(); props.onPress && props.onPress() }}
60
64
  style={{
61
65
  backgroundColor: props.bgColor,
62
- borderColor: props.borderColor,
66
+ borderColor: !props.isFocusHighlight
67
+ ? props.borderColor
68
+ : inputFocused ? theme.colors.primary : theme.colors.border,
63
69
  ...props.style,
64
70
  }}>
65
71
  {props.icon ? (
@@ -94,7 +100,14 @@ const OInput = (props: Props): React.ReactElement => {
94
100
  ref={(e: any) => {
95
101
  props.forwardRef && (props.forwardRef.current = e)
96
102
  }}
97
- style={props?.inputStyle}
103
+ style={{
104
+ ...(theme?.general?.components?.inputs?.color && {
105
+ color: theme?.general?.components?.inputs?.color
106
+ }),
107
+ ...props?.inputStyle
108
+ }}
109
+ onFocus={() => setInputFocused(true)}
110
+ onBlur={() => setInputFocused(false)}
98
111
  />
99
112
  {props.iconRight && (
100
113
  <OIcon
@@ -114,6 +127,7 @@ OInput.defaultProps = {
114
127
  iconColor: '#959595',
115
128
  bgColor: 'white',
116
129
  borderColor: 'white',
130
+ isFocusHighlight: false
117
131
  };
118
132
 
119
133
  export default OInput;
@@ -52,7 +52,7 @@ const OModal = (props: Props): React.ReactElement => {
52
52
 
53
53
  const theme = useTheme();
54
54
 
55
- const RenderSafeAreaView = () => (
55
+ const renderSafeAreaView = () => (
56
56
  <SafeAreaView style={styles.container}>
57
57
  {!entireModal ? (
58
58
  <View style={styles.centeredView}>
@@ -101,10 +101,10 @@ const OModal = (props: Props): React.ReactElement => {
101
101
  enabled
102
102
  behavior={Platform.OS === 'ios' ? 'padding' : 'height'}
103
103
  >
104
- <RenderSafeAreaView/>
104
+ {renderSafeAreaView()}
105
105
  </KeyboardView>
106
106
  ) : (
107
- <RenderSafeAreaView/>
107
+ renderSafeAreaView()
108
108
  )}
109
109
  </Modal>
110
110
  );
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
- import styled, { css } from 'styled-components/native';
3
- import { Platform } from 'react-native';
2
+ import { useSafeAreaInsets } from 'react-native-safe-area-context'
3
+ import styled, { css, useTheme } from 'styled-components/native';
4
+ import { Platform, View } from 'react-native';
4
5
 
5
6
  const ContainerStyled = styled.ScrollView`
6
7
  flex: 1;
@@ -10,17 +11,20 @@ const ContainerStyled = styled.ScrollView`
10
11
  background-color: ${(props: any) => props.theme.colors.backgroundPage};
11
12
  `;
12
13
 
13
- const SafeAreaStyled = styled.SafeAreaView`
14
- flex: 1;
15
- background-color: ${(props: any) => props.theme.colors.backgroundPage};
16
- `;
17
-
18
14
  export const Container = (props: any) => {
15
+ const theme = useTheme()
16
+ const insets = useSafeAreaInsets()
19
17
  return (
20
- <SafeAreaStyled>
18
+ <View
19
+ style={{
20
+ flex: 1,
21
+ paddingTop: props.pt ?? insets.top,
22
+ backgroundColor: theme.colors.backgroundPage
23
+ }}
24
+ >
21
25
  <ContainerStyled {...props} ref={props?.forwardRef} keyboardShouldPersistTaps='handled' style={{...props.style}}>
22
26
  {props.children}
23
27
  </ContainerStyled>
24
- </SafeAreaStyled>
28
+ </View>
25
29
  )
26
30
  }