ordering-ui-react-native 0.16.87 → 0.16.88-release

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 (215) hide show
  1. package/package.json +5 -5
  2. package/src/DeliveryApp.tsx +43 -1
  3. package/src/components/ActiveOrders/styles.tsx +8 -14
  4. package/src/components/BusinessInformation/index.tsx +19 -4
  5. package/src/components/BusinessInformation/styles.tsx +2 -2
  6. package/src/components/BusinessProductsList/index.tsx +1 -1
  7. package/src/components/BusinessesListing/index.tsx +1 -1
  8. package/src/components/OrderCreating/index.tsx +1 -21
  9. package/src/components/OrdersOption/index.tsx +54 -56
  10. package/src/components/PaymentOptionsWebView/index.tsx +119 -120
  11. package/src/components/SingleProductReview/index.tsx +7 -4
  12. package/src/components/VerifyPhone/styles.tsx +1 -2
  13. package/src/components/shared/OToast.tsx +4 -4
  14. package/src/utils/index.tsx +2 -1
  15. package/themes/business/index.tsx +2 -0
  16. package/themes/business/src/components/AcceptOrRejectOrder/index.tsx +265 -240
  17. package/themes/business/src/components/AcceptOrRejectOrder/styles.tsx +6 -4
  18. package/themes/business/src/components/BusinessController/index.tsx +2 -2
  19. package/themes/business/src/components/Chat/index.tsx +31 -31
  20. package/themes/business/src/components/DriverMap/index.tsx +22 -9
  21. package/themes/business/src/components/GoogleMap/index.tsx +58 -57
  22. package/themes/business/src/components/LoginForm/Otp/index.tsx +120 -0
  23. package/themes/business/src/components/LoginForm/Otp/styles.tsx +7 -0
  24. package/themes/business/src/components/LoginForm/index.tsx +239 -80
  25. package/themes/business/src/components/LoginForm/styles.tsx +10 -0
  26. package/themes/business/src/components/MapView/index.tsx +18 -7
  27. package/themes/business/src/components/MessagesOption/index.tsx +11 -1
  28. package/themes/business/src/components/NewOrderNotification/index.tsx +31 -41
  29. package/themes/business/src/components/OrderDetails/Delivery.tsx +4 -3
  30. package/themes/business/src/components/OrderDetails/OrderContentComponent.tsx +96 -50
  31. package/themes/business/src/components/OrderDetails/OrderHeaderComponent.tsx +59 -62
  32. package/themes/business/src/components/OrderDetailsLogistic/index.tsx +195 -0
  33. package/themes/business/src/components/OrderDetailsLogistic/styles.tsx +5 -0
  34. package/themes/business/src/components/OrderMessage/index.tsx +18 -17
  35. package/themes/business/src/components/OrdersOption/index.tsx +79 -87
  36. package/themes/business/src/components/OrdersOption/styles.tsx +5 -1
  37. package/themes/business/src/components/OrdersOptionBusiness/index.tsx +15 -1
  38. package/themes/business/src/components/OrdersOptionCity/index.tsx +15 -1
  39. package/themes/business/src/components/OrdersOptionDate/index.tsx +19 -6
  40. package/themes/business/src/components/OrdersOptionDelivery/index.tsx +15 -1
  41. package/themes/business/src/components/OrdersOptionDriver/index.tsx +15 -1
  42. package/themes/business/src/components/OrdersOptionPaymethod/index.tsx +15 -1
  43. package/themes/business/src/components/OrdersOptionStatus/index.tsx +10 -1
  44. package/themes/business/src/components/PreviousMessages/index.tsx +17 -18
  45. package/themes/business/src/components/PreviousOrders/OrderItem.tsx +250 -0
  46. package/themes/business/src/components/PreviousOrders/OrdersGroupedItem.tsx +115 -0
  47. package/themes/business/src/components/PreviousOrders/index.tsx +447 -247
  48. package/themes/business/src/components/PreviousOrders/styles.tsx +31 -3
  49. package/themes/business/src/components/ProductItemAccordion/index.tsx +27 -3
  50. package/themes/business/src/components/ReviewCustomer/index.tsx +54 -27
  51. package/themes/business/src/components/shared/ODropDown.tsx +42 -8
  52. package/themes/business/src/components/shared/ODropDownCalendar.tsx +36 -7
  53. package/themes/business/src/components/shared/OLink.tsx +33 -13
  54. package/themes/business/src/components/shared/OModal.tsx +16 -9
  55. package/themes/business/src/components/shared/OText.tsx +8 -2
  56. package/themes/business/src/types/index.tsx +35 -3
  57. package/themes/business/src/utils/index.tsx +53 -0
  58. package/themes/doordash/src/components/BusinessesListing/index.tsx +1 -1
  59. package/themes/doordash/src/components/LoginForm/index.tsx +1 -2
  60. package/themes/instacart/src/components/BusinessesListing/index.tsx +1 -1
  61. package/themes/kiosk/src/components/BusinessesListing/index.tsx +2 -1
  62. package/themes/kiosk/src/components/Checkout/index.tsx +6 -0
  63. package/themes/kiosk/src/components/LoginForm/Otp/index.tsx +92 -0
  64. package/themes/kiosk/src/components/LoginForm/Otp/styles.tsx +7 -0
  65. package/themes/kiosk/src/components/LoginForm/index.tsx +473 -151
  66. package/themes/kiosk/src/components/LoginForm/styles.tsx +14 -1
  67. package/themes/kiosk/src/components/NavBar/index.tsx +14 -14
  68. package/themes/kiosk/src/components/OptionCard/index.tsx +1 -1
  69. package/themes/kiosk/src/components/OrderTypeCardSelector/index.tsx +8 -10
  70. package/themes/kiosk/src/components/PhoneInputNumber/index.tsx +1 -0
  71. package/themes/kiosk/src/components/PhoneInputNumber/styles.tsx +1 -3
  72. package/themes/kiosk/src/components/ProductForm/index.tsx +1 -14
  73. package/themes/kiosk/src/components/shared/OButton.tsx +5 -18
  74. package/themes/kiosk/src/components/shared/OModal.tsx +14 -11
  75. package/themes/kiosk/src/layouts/Container.tsx +7 -1
  76. package/themes/kiosk/src/types/index.d.ts +13 -0
  77. package/themes/kiosk/src/utils/index.tsx +15 -0
  78. package/themes/original/index.tsx +8 -0
  79. package/themes/original/src/components/AddressDetails/index.tsx +10 -8
  80. package/themes/original/src/components/AddressForm/index.tsx +155 -139
  81. package/themes/original/src/components/AddressList/index.tsx +18 -18
  82. package/themes/original/src/components/AddressList/styles.tsx +4 -2
  83. package/themes/original/src/components/AppleLogin/index.tsx +4 -4
  84. package/themes/original/src/components/BusinessBasicInformation/index.tsx +118 -76
  85. package/themes/original/src/components/BusinessBasicInformation/styles.tsx +1 -4
  86. package/themes/original/src/components/BusinessController/index.tsx +100 -47
  87. package/themes/original/src/components/BusinessController/styles.tsx +14 -9
  88. package/themes/original/src/components/BusinessInformation/index.tsx +10 -31
  89. package/themes/original/src/components/BusinessItemAccordion/index.tsx +9 -3
  90. package/themes/original/src/components/BusinessListingSearch/index.tsx +87 -34
  91. package/themes/original/src/components/BusinessListingSearch/styles.tsx +6 -0
  92. package/themes/original/src/components/BusinessPreorder/index.tsx +96 -15
  93. package/themes/original/src/components/BusinessProductsList/index.tsx +10 -8
  94. package/themes/original/src/components/BusinessProductsList/styles.tsx +0 -3
  95. package/themes/original/src/components/BusinessProductsListing/index.tsx +564 -495
  96. package/themes/original/src/components/BusinessProductsListing/styles.tsx +13 -12
  97. package/themes/original/src/components/BusinessTypeFilter/index.tsx +3 -2
  98. package/themes/original/src/components/BusinessesListing/Layout/Appointment/index.tsx +2 -1
  99. package/themes/original/src/components/BusinessesListing/Layout/Original/index.tsx +116 -81
  100. package/themes/original/src/components/BusinessesListing/Layout/Original/styles.tsx +1 -9
  101. package/themes/original/src/components/BusinessesListing/index.tsx +6 -6
  102. package/themes/original/src/components/Cart/index.tsx +83 -42
  103. package/themes/original/src/components/CartContent/index.tsx +77 -15
  104. package/themes/original/src/components/CartContent/styles.tsx +11 -1
  105. package/themes/original/src/components/Checkout/index.tsx +280 -173
  106. package/themes/original/src/components/Checkout/styles.tsx +4 -2
  107. package/themes/original/src/components/CitiesControl/index.tsx +89 -0
  108. package/themes/original/src/components/CitiesControl/styles.tsx +17 -0
  109. package/themes/original/src/components/DriverTips/index.tsx +52 -37
  110. package/themes/original/src/components/DriverTips/styles.tsx +2 -1
  111. package/themes/original/src/components/Favorite/index.tsx +7 -4
  112. package/themes/original/src/components/Favorite/styles.tsx +1 -1
  113. package/themes/original/src/components/FavoriteList/index.tsx +70 -80
  114. package/themes/original/src/components/FloatingButton/index.tsx +1 -2
  115. package/themes/original/src/components/FloatingButton/styles.tsx +1 -1
  116. package/themes/original/src/components/GPSButton/index.tsx +20 -19
  117. package/themes/original/src/components/GPSButton/styles.ts +3 -3
  118. package/themes/original/src/components/GoogleMap/index.tsx +10 -1
  119. package/themes/original/src/components/Help/index.tsx +8 -8
  120. package/themes/original/src/components/HelpAccountAndPayment/index.tsx +11 -22
  121. package/themes/original/src/components/HelpAccountAndPayment/styles.tsx +6 -0
  122. package/themes/original/src/components/HelpGuide/index.tsx +12 -16
  123. package/themes/original/src/components/HelpGuide/styles.tsx +6 -0
  124. package/themes/original/src/components/HelpOrder/index.tsx +12 -25
  125. package/themes/original/src/components/HelpOrder/styles.tsx +8 -1
  126. package/themes/original/src/components/LanguageSelector/index.tsx +19 -14
  127. package/themes/original/src/components/LastOrder/index.tsx +1 -34
  128. package/themes/original/src/components/LoginForm/Otp/index.tsx +89 -73
  129. package/themes/original/src/components/LoginForm/Otp/styles.tsx +0 -1
  130. package/themes/original/src/components/LoginForm/index.tsx +43 -19
  131. package/themes/original/src/components/LottieAnimation/index.tsx +78 -0
  132. package/themes/original/src/components/MessageListing/index.tsx +7 -40
  133. package/themes/original/src/components/Messages/index.tsx +26 -10
  134. package/themes/original/src/components/MomentOption/index.tsx +195 -88
  135. package/themes/original/src/components/MultiCart/index.tsx +50 -0
  136. package/themes/original/src/components/MultiCartsPaymethodsAndWallets/index.tsx +92 -93
  137. package/themes/original/src/components/MultiCheckout/index.tsx +193 -79
  138. package/themes/original/src/components/MultiOrdersDetails/SingleOrderCard.tsx +37 -224
  139. package/themes/original/src/components/MultiOrdersDetails/index.tsx +67 -20
  140. package/themes/original/src/components/MultiOrdersDetails/styles.tsx +1 -1
  141. package/themes/original/src/components/MyOrders/index.tsx +66 -17
  142. package/themes/original/src/components/NavBar/index.tsx +6 -11
  143. package/themes/original/src/components/NetworkError/index.tsx +5 -3
  144. package/themes/original/src/components/NotFoundSource/index.tsx +2 -1
  145. package/themes/original/src/components/Notifications/index.tsx +144 -0
  146. package/themes/original/src/components/Notifications/styles.tsx +20 -0
  147. package/themes/original/src/components/OrderDetails/OrderEta.tsx +59 -0
  148. package/themes/original/src/components/OrderDetails/index.tsx +110 -221
  149. package/themes/original/src/components/OrderDetails/styles.tsx +10 -1
  150. package/themes/original/src/components/OrderItAgain/index.tsx +44 -42
  151. package/themes/original/src/components/OrderProgress/index.tsx +74 -112
  152. package/themes/original/src/components/OrderProgress/styles.tsx +5 -0
  153. package/themes/original/src/components/OrderSummary/index.tsx +52 -17
  154. package/themes/original/src/components/OrderTypeSelector/index.tsx +9 -3
  155. package/themes/original/src/components/OrdersOption/PreviousBusinessOrdered/index.tsx +29 -20
  156. package/themes/original/src/components/OrdersOption/PreviousProductsOrdered/index.tsx +3 -0
  157. package/themes/original/src/components/OrdersOption/index.tsx +76 -83
  158. package/themes/original/src/components/PageBanner/index.tsx +146 -0
  159. package/themes/original/src/components/PageBanner/styles.tsx +11 -0
  160. package/themes/original/src/components/PaymentOptionStripe/styles.tsx +1 -1
  161. package/themes/original/src/components/PaymentOptionWallet/index.tsx +56 -56
  162. package/themes/original/src/components/PaymentOptions/index.tsx +2 -2
  163. package/themes/original/src/components/PhoneInputNumber/index.tsx +1 -1
  164. package/themes/original/src/components/PlaceSpot/index.tsx +12 -6
  165. package/themes/original/src/components/PreviousOrders/index.tsx +3 -2
  166. package/themes/original/src/components/ProductForm/index.tsx +240 -256
  167. package/themes/original/src/components/ProductForm/styles.tsx +5 -8
  168. package/themes/original/src/components/ProductItemAccordion/index.tsx +199 -128
  169. package/themes/original/src/components/ProductOptionSubOption/index.tsx +18 -10
  170. package/themes/original/src/components/ProductOptionSubOption/styles.tsx +1 -2
  171. package/themes/original/src/components/ProfessionalFilter/SingleProfessionalCard/index.tsx +108 -0
  172. package/themes/original/src/components/ProfessionalFilter/index.tsx +20 -49
  173. package/themes/original/src/components/ProfessionalProfile/index.tsx +54 -14
  174. package/themes/original/src/components/Promotions/index.tsx +234 -220
  175. package/themes/original/src/components/Promotions/styles.tsx +7 -2
  176. package/themes/original/src/components/ReviewDriver/index.tsx +3 -3
  177. package/themes/original/src/components/ReviewOrder/index.tsx +43 -11
  178. package/themes/original/src/components/ReviewOrder/styles.tsx +7 -0
  179. package/themes/original/src/components/ReviewProducts/index.tsx +8 -5
  180. package/themes/original/src/components/ReviewTrigger/index.tsx +27 -9
  181. package/themes/original/src/components/ReviewTrigger/styles.tsx +8 -1
  182. package/themes/original/src/components/ScheduleAccordion/index.tsx +68 -0
  183. package/themes/original/src/components/ScheduleAccordion/styles.tsx +14 -0
  184. package/themes/original/src/components/ServiceForm/index.tsx +377 -270
  185. package/themes/original/src/components/Sessions/index.tsx +11 -8
  186. package/themes/original/src/components/Sessions/styles.tsx +5 -0
  187. package/themes/original/src/components/SignupForm/index.tsx +79 -67
  188. package/themes/original/src/components/SingleOrderCard/index.tsx +126 -57
  189. package/themes/original/src/components/SingleOrderCard/styles.tsx +10 -8
  190. package/themes/original/src/components/SingleProductCard/index.tsx +104 -45
  191. package/themes/original/src/components/SingleProductCard/styles.tsx +14 -13
  192. package/themes/original/src/components/SingleProductReview/index.tsx +38 -5
  193. package/themes/original/src/components/SingleProductReview/styles.tsx +12 -0
  194. package/themes/original/src/components/StripeCardsList/index.tsx +1 -1
  195. package/themes/original/src/components/StripeElementsForm/index.tsx +4 -1
  196. package/themes/original/src/components/UpsellingProducts/index.tsx +243 -218
  197. package/themes/original/src/components/UpsellingProducts/styles.tsx +12 -1
  198. package/themes/original/src/components/UserDetails/index.tsx +8 -4
  199. package/themes/original/src/components/UserFormDetails/index.tsx +53 -54
  200. package/themes/original/src/components/UserProfile/index.tsx +58 -35
  201. package/themes/original/src/components/UserProfile/styles.ts +17 -0
  202. package/themes/original/src/components/UserProfileForm/index.tsx +21 -28
  203. package/themes/original/src/components/UserProfileForm/styles.tsx +7 -0
  204. package/themes/original/src/components/Wallets/index.tsx +96 -93
  205. package/themes/original/src/components/Wallets/styles.tsx +2 -0
  206. package/themes/original/src/components/shared/CardAnimation.tsx +47 -0
  207. package/themes/original/src/components/shared/HeaderTitle.tsx +8 -3
  208. package/themes/original/src/components/shared/OBottomPopup.tsx +1 -1
  209. package/themes/original/src/components/shared/OButton.tsx +6 -2
  210. package/themes/original/src/components/shared/OIcon.tsx +8 -1
  211. package/themes/original/src/components/shared/OInput.tsx +10 -1
  212. package/themes/original/src/layouts/Container.tsx +13 -9
  213. package/themes/original/src/types/index.tsx +37 -5
  214. package/themes/original/src/utils/index.tsx +321 -58
  215. package/themes/uber-eats/src/components/BusinessesListing/index.tsx +1 -1
@@ -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 } 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'
@@ -9,6 +9,7 @@ import {
9
9
  useUtils,
10
10
  useConfig
11
11
  } from 'ordering-components/native'
12
+ import AntDesignIcon from 'react-native-vector-icons/AntDesign'
12
13
 
13
14
  import {
14
15
  Container,
@@ -23,7 +24,6 @@ import {
23
24
  WalletTransactionsWrapper
24
25
  } from './styles'
25
26
 
26
- import NavBar from '../NavBar'
27
27
  import { OButton, OIcon, OText, OModal } from '../shared';
28
28
  import { NotFoundSource } from '../NotFoundSource';
29
29
  import { WalletTransactions } from '../WalletTransactions'
@@ -47,8 +47,6 @@ const WalletsUI = (props: any) => {
47
47
  const [{ parsePrice }] = useUtils()
48
48
  const [{ configs }] = useConfig()
49
49
 
50
- console.log(theme)
51
-
52
50
  const styles = StyleSheet.create({
53
51
  logoStyle: {
54
52
  width: 120,
@@ -64,7 +62,8 @@ const WalletsUI = (props: any) => {
64
62
 
65
63
  const [tabSelected, setTabSelected] = useState(isWalletCashEnabled ? 'cash' : 'credit_point')
66
64
  const [openHistory, setOpenHistory] = useState(false)
67
- const isChewLayout = theme?.wallets_view?.components?.layout?.type === 'original'
65
+ const isChewLayout = theme?.header?.components?.layout?.type === 'chew'
66
+ const hideWalletsTheme = theme?.bar_menu?.components?.wallets?.hidden
68
67
 
69
68
  const isWalletEnabled = configs?.cash_wallet?.value && configs?.wallet_enabled?.value === '1' && (isWalletCashEnabled || isWalletPointsEnabled)
70
69
 
@@ -79,7 +78,7 @@ const WalletsUI = (props: any) => {
79
78
  isActive: isWalletCashEnabled
80
79
  },
81
80
  credit_point: {
82
- name: t('CREDITS_POINTS_WALLET', 'Credit Points Wallet'),
81
+ name: t('POINTS_WALLET', 'Points Wallet'),
83
82
  value: 1,
84
83
  isActive: isWalletPointsEnabled
85
84
  }
@@ -103,7 +102,7 @@ const WalletsUI = (props: any) => {
103
102
  }, [configs])
104
103
 
105
104
  useEffect(() => {
106
- if(refreshWallets){
105
+ if (refreshWallets) {
107
106
  getWallets()
108
107
  setRefreshWallets && setRefreshWallets(false)
109
108
  }
@@ -113,15 +112,7 @@ const WalletsUI = (props: any) => {
113
112
  <>
114
113
  <Container>
115
114
  <Header>
116
- <NavBar
117
- title={isChewLayout ? '' : t('WALLETS', 'Wallets')}
118
- titleAlign={'center'}
119
- onActionLeft={goToBack}
120
- showCall={false}
121
- paddingTop={10}
122
- btnStyle={{ paddingLeft: 0 }}
123
- style={{ flex: 1 }}
124
- />
115
+ <OText size={24} style={{ marginTop: 30 }}>{t('WALLETS', 'Wallets')}</OText>
125
116
  {isChewLayout && (
126
117
  <OButton
127
118
  text={t('WALLET_HISTORY', 'Wallet history')}
@@ -139,83 +130,92 @@ const WalletsUI = (props: any) => {
139
130
  !userLoyaltyLevel.loading &&
140
131
  !walletList.error &&
141
132
  walletList.wallets?.length > 0 &&
142
- (
143
- <>
144
- <OTabs
145
- horizontal
146
- showsHorizontalScrollIndicator={false}
147
- >
148
- {walletList.wallets?.map((wallet: any) => walletName[wallet.type]?.isActive && (
149
- <Pressable
150
- key={wallet.id}
151
- onPress={() => handleChangeTab(wallet)}
152
- >
153
- <OTab isSelected={tabSelected === wallet.type}>
154
- <OText size={18}>
155
- {walletName[wallet.type]?.name}
156
- </OText>
157
- </OTab>
158
- </Pressable>
159
- ))}
160
- </OTabs>
161
-
162
- <SectionContent>
163
- {!!loyaltyLevel && tabSelected === 'credit_point' && (
164
- <LoyaltyContent>
165
- <LoyaltyWrapp>
166
- <OText size={20}>
167
- {`${t('LOYALTY_LEVEL_TITLE', 'Your level is')}:`}
168
- </OText>
169
- {loyaltyLevel.image ? (
170
- <FastImage
171
- style={styles.logoStyle}
172
- source={{
173
- uri: loyaltyLevel.image,
174
- priority: FastImage.priority.high,
175
- cache:FastImage.cacheControl.web
176
- }}
177
- resizeMode={FastImage.resizeMode.contain}
178
- />
179
- ) : (
180
- <LoyaltyImg
181
- source={theme.images.dummies.loyaltyLevel}
182
- resizeMode='contain'
183
- />
184
- )}
185
- <OText
186
- size={22}
187
- weight='bold'
188
- style={{ textTransform: 'uppercase' }}
189
- color={theme.colors.primary}
133
+ (
134
+ <>
135
+ <OTabs
136
+ horizontal
137
+ showsHorizontalScrollIndicator={false}
138
+ >
139
+ {walletList.wallets?.map((wallet: any) => walletName[wallet.type]?.isActive && (
140
+ <TouchableOpacity
141
+ key={wallet.id}
142
+ onPress={() => handleChangeTab(wallet)}
143
+ >
144
+ <OTab
145
+ isSelected={tabSelected === wallet.type}
146
+ style={{
147
+ borderBottomWidth: 1,
148
+ borderBottomColor:
149
+ tabSelected === wallet.type
150
+ ? theme.colors.textNormal
151
+ : theme.colors.border
152
+ }}
190
153
  >
191
- {loyaltyLevel.name}
192
- </OText>
193
- </LoyaltyWrapp>
194
- </LoyaltyContent>
195
- )}
196
- <BalanceElement>
197
- <OText size={20} style={{fontWeight: '600'}}>
198
- {currentWalletSelected?.type === 'cash'
199
- ? parsePrice(currentWalletSelected?.balance)
200
- : currentWalletSelected?.balance
201
- }
202
- </OText>
203
- <OText style={{ paddingLeft: 5 }}>
204
- {currentWalletSelected?.type === 'cash'
205
- ? configs?.stripe_currency?.value
206
- : t('POINTS', 'Points')}
207
- </OText>
208
- </BalanceElement>
154
+ <OText>
155
+ {walletName[wallet.type]?.name}
156
+ </OText>
157
+ </OTab>
158
+ </TouchableOpacity>
159
+ ))}
160
+ </OTabs>
209
161
 
210
- {!isChewLayout && (
211
- <WalletTransactions
212
- transactionsList={transactionsList}
213
- currentWalletSelected={currentWalletSelected}
214
- />
215
- )}
216
- </SectionContent>
217
- </>
218
- )}
162
+ <SectionContent>
163
+ {!!loyaltyLevel && tabSelected === 'credit_point' && (
164
+ <LoyaltyContent>
165
+ <LoyaltyWrapp>
166
+ <OText size={20}>
167
+ {`${t('LOYALTY_LEVEL_TITLE', 'Your level is')}:`}
168
+ </OText>
169
+ {/* {loyaltyLevel.image ? (
170
+ <FastImage
171
+ style={styles.logoStyle}
172
+ source={{
173
+ uri: loyaltyLevel.image,
174
+ priority: FastImage.priority.high,
175
+ cache: FastImage.cacheControl.web
176
+ }}
177
+ resizeMode={FastImage.resizeMode.contain}
178
+ />
179
+ ) : (
180
+ <LoyaltyImg
181
+ source={theme.images.dummies.loyaltyLevel}
182
+ resizeMode='contain'
183
+ />
184
+ )} */}
185
+ <OText
186
+ size={22}
187
+ weight='bold'
188
+ style={{ textTransform: 'uppercase' }}
189
+ color={theme.colors.primary}
190
+ >
191
+ {loyaltyLevel.name}
192
+ </OText>
193
+ </LoyaltyWrapp>
194
+ </LoyaltyContent>
195
+ )}
196
+ <BalanceElement>
197
+ <OText size={20} style={{ fontWeight: '600' }}>
198
+ {currentWalletSelected?.type === 'cash'
199
+ ? parsePrice(currentWalletSelected?.balance)
200
+ : currentWalletSelected?.balance
201
+ }
202
+ </OText>
203
+ <OText style={{ paddingLeft: 5 }}>
204
+ {currentWalletSelected?.type === 'cash'
205
+ ? configs?.stripe_currency?.value
206
+ : t('POINTS', 'Points')}
207
+ </OText>
208
+ </BalanceElement>
209
+
210
+ {!isChewLayout && (
211
+ <WalletTransactions
212
+ transactionsList={transactionsList}
213
+ currentWalletSelected={currentWalletSelected}
214
+ />
215
+ )}
216
+ </SectionContent>
217
+ </>
218
+ )}
219
219
 
220
220
  {(walletList?.loading || userLoyaltyLevel.loading) && (
221
221
  <>
@@ -260,8 +260,6 @@ const WalletsUI = (props: any) => {
260
260
  <ScrollView>
261
261
  <WalletTransactionsWrapper>
262
262
  <OButton
263
- imgLeftSrc={theme.images.general.arrow_left}
264
- imgLeftStyle={{ width: 18 }}
265
263
  imgRightSrc={null}
266
264
  style={{
267
265
  borderWidth: 0,
@@ -273,6 +271,11 @@ const WalletsUI = (props: any) => {
273
271
  paddingRight: 0
274
272
  }}
275
273
  onClick={() => setOpenHistory(false)}
274
+ icon={AntDesignIcon}
275
+ iconProps={{
276
+ name: 'arrowleft',
277
+ size: 26
278
+ }}
276
279
  />
277
280
  <WalletTransactions
278
281
  transactionsList={transactionsList}
@@ -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 ? (
@@ -95,6 +101,8 @@ const OInput = (props: Props): React.ReactElement => {
95
101
  props.forwardRef && (props.forwardRef.current = e)
96
102
  }}
97
103
  style={props?.inputStyle}
104
+ onFocus={() => setInputFocused(true)}
105
+ onBlur={() => setInputFocused(false)}
98
106
  />
99
107
  {props.iconRight && (
100
108
  <OIcon
@@ -114,6 +122,7 @@ OInput.defaultProps = {
114
122
  iconColor: '#959595',
115
123
  bgColor: 'white',
116
124
  borderColor: 'white',
125
+ isFocusHighlight: false
117
126
  };
118
127
 
119
128
  export default OInput;
@@ -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
  }
@@ -19,6 +19,7 @@ export interface LoginParams {
19
19
  notificationState?: any;
20
20
  handleReCaptcha?: any;
21
21
  enableReCaptcha?: any;
22
+ isGuest?: any;
22
23
  otpType?: string,
23
24
  setOtpType: (type: string) => void,
24
25
  generateOtpCode: (values?: any) => void,
@@ -47,6 +48,8 @@ export interface ProfileParams {
47
48
  isVerifiedPhone?: any;
48
49
  handleRemoveAccount?: any;
49
50
  removeAccountState?: any;
51
+ handleChangePromotions?: any;
52
+ notificationsGroup?: any;
50
53
  }
51
54
 
52
55
  export interface AddressListParams {
@@ -80,6 +83,7 @@ export interface AddressFormParams {
80
83
  saveAddress?: any,
81
84
  userCustomerSetup?: boolean,
82
85
  isRequiredField?: (field: string) => {},
86
+ showField?: (field: string) => {},
83
87
  isGuestUser?: boolean,
84
88
  useValidationFileds?: boolean,
85
89
  isSelectedAfterAdd?: boolean,
@@ -115,6 +119,7 @@ export interface SignupParams {
115
119
  useSignUpOtpEmail?: boolean;
116
120
  useSignUpOtpCellphone?: boolean;
117
121
  willVerifyOtpState?: boolean;
122
+ isGuest?: any;
118
123
  numOtpInputs?: number;
119
124
  handleChangePromotions: () => void;
120
125
  handleChangeInput?: (in1: any, in2: any) => void;
@@ -170,6 +175,9 @@ export interface BusinessesListingParams {
170
175
  handleChangePriceLevel?: any;
171
176
  businessTypeSelected?: any;
172
177
  logosLayout?: boolean;
178
+ isCustomLayout?: boolean;
179
+ citiesState?: any;
180
+ actualSlug?: any;
173
181
  }
174
182
  export interface HighestRatedBusinessesParams {
175
183
  businessesList: { businesses: Array<any>, loading: boolean, error: null | string };
@@ -215,6 +223,9 @@ export interface BusinessControllerParams {
215
223
  setFavoriteIds?: any;
216
224
  handleUpdateBusinessList?: any;
217
225
  enableIntersection?: boolean;
226
+ isCustomLayout?: boolean;
227
+ getBusinessOffer?: any;
228
+ handleCustomUpdate?: (businessId: number, changes: any) => {};
218
229
  }
219
230
  export interface BusinessProductsListingParams {
220
231
  navigation?: any;
@@ -240,6 +251,9 @@ export interface BusinessProductsListingParams {
240
251
  handleUpdateProducts?: any;
241
252
  professionalSelected?: any;
242
253
  handleChangeProfessionalSelected?: any;
254
+ handleUpdateProfessionals?: any;
255
+ onBusinessClick?: any;
256
+ onNavigationRedirect?: any;
243
257
  }
244
258
  export interface BusinessBasicInformationParams {
245
259
  navigation?: any;
@@ -305,6 +319,7 @@ export interface SingleProductCardParams {
305
319
  enableIntersection?: boolean;
306
320
  navigation?: any;
307
321
  isPreviously?: any;
322
+ isProductId?: any;
308
323
  }
309
324
  export interface BusinessInformationParams {
310
325
  navigation?: any,
@@ -359,6 +374,8 @@ export interface OrdersOptionParams {
359
374
  refreshOrders?: boolean,
360
375
  setRefreshOrders?: (value: boolean) => void,
361
376
  handleUpdateOrderList?: (orderId: number, changes: any) => {},
377
+ handleUpdateProducts?: (productId: number, changes: any) => {},
378
+ handleUpdateBusinesses?: (businessId: number, changes: any) => {},
362
379
  isBusiness?: boolean,
363
380
  isProducts?: boolean,
364
381
  businessOrderIds?: any,
@@ -389,6 +406,7 @@ export interface PreviousOrdersParams {
389
406
  getOrderStatus?: any,
390
407
  orderID?: number
391
408
  reorderLoading?: boolean,
409
+ loading?: boolean,
392
410
  loadMoreOrders?: () => {},
393
411
  handleReorder?: (orderId: number) => {},
394
412
  onNavigationRedirect?: (route: string, params?: any) => {}
@@ -520,6 +538,7 @@ export interface FloatingButtonParams {
520
538
  }
521
539
  export interface MomentOptionParams {
522
540
  navigation: any;
541
+ isCart?: any;
523
542
  nopadding?: boolean;
524
543
  datesList: Array<any>;
525
544
  hoursList: Array<any>;
@@ -566,7 +585,7 @@ export interface UpsellingProductsParams {
566
585
  business?: any;
567
586
  businessId?: number;
568
587
  cartProducts?: Array<any>;
569
- handleUpsellingPage: () => void;
588
+ handleUpsellingPage: (cart ?: any) => void;
570
589
  openUpselling: boolean;
571
590
  canOpenUpselling?: boolean;
572
591
  setCanOpenUpselling?: (value: any) => void;
@@ -577,6 +596,8 @@ export interface UpsellingProductsParams {
577
596
  products?: any;
578
597
  onNavigationRedirect?: any;
579
598
  onGoBack?: any;
599
+ singleBusiness?: any;
600
+ isFranchiseApp?: any;
580
601
  }
581
602
 
582
603
  export interface GoogleMapsParams {
@@ -637,6 +658,7 @@ export interface BusinessSearchParams {
637
658
  onNavigationRedirect?: any,
638
659
  handleUpdateProducts: any,
639
660
  handleUpdateBusinessList?: any;
661
+ brandId?: number
640
662
  }
641
663
 
642
664
  export interface NoNetworkParams {
@@ -650,14 +672,15 @@ export interface PlaceSpotParams {
650
672
  spotNumberDefault?: any,
651
673
  vehicleDefault?: any,
652
674
  spotNumber?: any,
653
- setSpotNumber?: any,
675
+ setSpotNumber?: any,
654
676
  orderTypes?: any,
655
677
  placesState?: any,
656
- handleChangePlace? : any,
678
+ handleChangePlace?: any,
657
679
  spotState?: any,
658
680
  vehicle?: any,
659
681
  setVehicle?: any,
660
682
  handleChangeSpot?: any
683
+ setPlaceSpotNumber?: any
661
684
  }
662
685
 
663
686
  export interface PromotionParams {
@@ -723,6 +746,7 @@ export interface PreviousBusinessOrderedParams {
723
746
  isBusinessesSearchList?: any,
724
747
  businessLoading?: boolean,
725
748
  businesses?: any
749
+ handleUpdateBusinesses?: (businessId: number, changes: any) => {},
726
750
  }
727
751
 
728
752
  export interface ServiceFormParams {
@@ -735,13 +759,19 @@ export interface ServiceFormParams {
735
759
  maxProductQuantity: any,
736
760
  businessSlug?: string,
737
761
  onClose: any,
738
- professionalList: any
762
+ professionalList: any,
763
+ productObject?: any,
764
+ professionalListState?: any,
765
+ isCartProduct?: any,
766
+ actionStatus?: any,
767
+ handleCreateGuestUser?: any
739
768
  }
740
769
 
741
770
  export interface ProfessionalFilterParams {
742
771
  professionals?: any,
743
772
  professionalSelected?: any,
744
- handleChangeProfessionalSelected: any
773
+ handleChangeProfessionalSelected: any,
774
+ handleUpdateProfessionals?: any
745
775
  }
746
776
 
747
777
  export interface ProfessionalProfileParams {
@@ -763,6 +793,8 @@ export interface OrderItAgainParams {
763
793
 
764
794
  export interface PreviousProductsOrderedParams {
765
795
  products?: any,
796
+ isProductId?: boolean
766
797
  onProductClick?: any,
767
798
  isBusinessesSearchList?: boolean
799
+ handleUpdateProducts?: any
768
800
  }