ordering-ui-react-native 0.16.51 → 0.16.52-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 (204) hide show
  1. package/package.json +6 -5
  2. package/src/DeliveryApp.tsx +43 -1
  3. package/src/components/ActiveOrders/index.tsx +61 -63
  4. package/src/components/ActiveOrders/styles.tsx +8 -14
  5. package/src/components/BusinessInformation/index.tsx +33 -4
  6. package/src/components/BusinessInformation/styles.tsx +2 -2
  7. package/src/components/BusinessProductsList/index.tsx +10 -10
  8. package/src/components/BusinessesListing/index.tsx +1 -1
  9. package/src/components/Checkout/index.tsx +2 -1
  10. package/src/components/LanguageSelector/index.tsx +21 -16
  11. package/src/components/Messages/index.tsx +2 -2
  12. package/src/components/NotificationSetting/index.tsx +85 -0
  13. package/src/components/OrdersOption/index.tsx +54 -56
  14. package/src/components/PaymentOptions/index.tsx +298 -345
  15. package/src/components/PaymentOptionsWebView/index.tsx +120 -121
  16. package/src/components/SingleProductReview/index.tsx +7 -4
  17. package/src/components/StripeElementsForm/index.tsx +25 -16
  18. package/src/components/VerifyPhone/styles.tsx +1 -2
  19. package/src/components/shared/OBottomPopup.tsx +6 -2
  20. package/src/components/shared/OToast.tsx +4 -4
  21. package/src/index.tsx +2 -0
  22. package/src/types/@fatnlazycat/react-native-recaptcha-v3/index.d.ts +1 -0
  23. package/src/utils/index.tsx +2 -1
  24. package/themes/business/src/components/AcceptOrRejectOrder/index.tsx +259 -238
  25. package/themes/business/src/components/AcceptOrRejectOrder/styles.tsx +6 -4
  26. package/themes/business/src/components/BusinessController/index.tsx +2 -2
  27. package/themes/business/src/components/Chat/index.tsx +40 -32
  28. package/themes/business/src/components/DriverMap/index.tsx +7 -5
  29. package/themes/business/src/components/DriverSchedule/index.tsx +36 -19
  30. package/themes/business/src/components/LoginForm/index.tsx +111 -74
  31. package/themes/business/src/components/MapView/index.tsx +12 -1
  32. package/themes/business/src/components/MessagesOption/index.tsx +11 -1
  33. package/themes/business/src/components/NewOrderNotification/index.tsx +26 -41
  34. package/themes/business/src/components/OrderDetails/OrderContentComponent.tsx +40 -30
  35. package/themes/business/src/components/OrderDetails/OrderHeaderComponent.tsx +3 -3
  36. package/themes/business/src/components/OrdersListManager/index.tsx +10 -3
  37. package/themes/business/src/components/OrdersOption/index.tsx +76 -77
  38. package/themes/business/src/components/OrdersOption/styles.tsx +5 -1
  39. package/themes/business/src/components/OrdersOptionBusiness/index.tsx +15 -1
  40. package/themes/business/src/components/OrdersOptionCity/index.tsx +15 -1
  41. package/themes/business/src/components/OrdersOptionDate/index.tsx +19 -6
  42. package/themes/business/src/components/OrdersOptionDelivery/index.tsx +15 -1
  43. package/themes/business/src/components/OrdersOptionDriver/index.tsx +15 -1
  44. package/themes/business/src/components/OrdersOptionPaymethod/index.tsx +15 -1
  45. package/themes/business/src/components/OrdersOptionStatus/index.tsx +10 -1
  46. package/themes/business/src/components/PreviousMessages/index.tsx +17 -18
  47. package/themes/business/src/components/PreviousOrders/OrderItem.tsx +250 -0
  48. package/themes/business/src/components/PreviousOrders/OrdersGroupedItem.tsx +115 -0
  49. package/themes/business/src/components/PreviousOrders/index.tsx +332 -244
  50. package/themes/business/src/components/PreviousOrders/styles.tsx +30 -2
  51. package/themes/business/src/components/ProductItemAccordion/index.tsx +3 -2
  52. package/themes/business/src/components/ReviewCustomer/index.tsx +39 -15
  53. package/themes/business/src/components/ScheduleBlocked/index.tsx +2 -2
  54. package/themes/business/src/components/UserFormDetails/index.tsx +5 -2
  55. package/themes/business/src/components/UserProfileForm/index.tsx +2 -0
  56. package/themes/business/src/components/shared/ODropDown.tsx +42 -8
  57. package/themes/business/src/components/shared/ODropDownCalendar.tsx +36 -7
  58. package/themes/business/src/components/shared/OLink.tsx +24 -12
  59. package/themes/business/src/components/shared/OText.tsx +3 -2
  60. package/themes/business/src/types/index.tsx +25 -11
  61. package/themes/business/src/utils/index.tsx +10 -0
  62. package/themes/doordash/src/components/BusinessesListing/index.tsx +1 -1
  63. package/themes/doordash/src/components/LoginForm/index.tsx +1 -2
  64. package/themes/instacart/src/components/BusinessesListing/index.tsx +1 -1
  65. package/themes/kiosk/src/components/BusinessesListing/index.tsx +2 -1
  66. package/themes/kiosk/src/components/Checkout/index.tsx +6 -0
  67. package/themes/kiosk/src/components/LoginForm/index.tsx +121 -10
  68. package/themes/kiosk/src/components/LoginForm/styles.tsx +5 -0
  69. package/themes/kiosk/src/components/NavBar/index.tsx +14 -14
  70. package/themes/kiosk/src/components/OptionCard/index.tsx +1 -1
  71. package/themes/kiosk/src/components/OrderTypeCardSelector/index.tsx +8 -10
  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/types/index.d.ts +2 -0
  75. package/themes/original/index.tsx +8 -0
  76. package/themes/original/src/components/AddressDetails/index.tsx +10 -8
  77. package/themes/original/src/components/AddressForm/index.tsx +157 -140
  78. package/themes/original/src/components/AddressList/index.tsx +1 -1
  79. package/themes/original/src/components/AppleLogin/index.tsx +4 -4
  80. package/themes/original/src/components/BusinessBasicInformation/index.tsx +218 -147
  81. package/themes/original/src/components/BusinessBasicInformation/styles.tsx +2 -2
  82. package/themes/original/src/components/BusinessController/index.tsx +192 -91
  83. package/themes/original/src/components/BusinessController/styles.tsx +14 -9
  84. package/themes/original/src/components/BusinessInformation/index.tsx +10 -31
  85. package/themes/original/src/components/BusinessItemAccordion/index.tsx +12 -6
  86. package/themes/original/src/components/BusinessListingSearch/BusinessControllerSkeletons/index.tsx +57 -0
  87. package/themes/original/src/components/BusinessListingSearch/MaxSectionItem/index.tsx +59 -0
  88. package/themes/original/src/components/BusinessListingSearch/MaxSectionItem/styles.tsx +13 -0
  89. package/themes/original/src/components/BusinessListingSearch/index.tsx +85 -137
  90. package/themes/original/src/components/BusinessListingSearch/styles.tsx +10 -12
  91. package/themes/original/src/components/BusinessProductsList/SubcategoriesComponent/index.tsx +87 -0
  92. package/themes/original/src/components/BusinessProductsList/SubcategoriesComponent/styles.tsx +12 -0
  93. package/themes/original/src/components/BusinessProductsList/index.tsx +59 -61
  94. package/themes/original/src/components/BusinessProductsList/styles.tsx +0 -3
  95. package/themes/original/src/components/BusinessProductsListing/index.tsx +179 -83
  96. package/themes/original/src/components/BusinessProductsListing/styles.tsx +19 -12
  97. package/themes/original/src/components/BusinessTypeFilter/index.tsx +3 -2
  98. package/themes/original/src/components/BusinessesListing/Layout/Appointment/index.tsx +37 -30
  99. package/themes/original/src/components/BusinessesListing/Layout/Appointment/styles.tsx +3 -2
  100. package/themes/original/src/components/BusinessesListing/Layout/Original/index.tsx +299 -148
  101. package/themes/original/src/components/BusinessesListing/Layout/Original/styles.tsx +47 -11
  102. package/themes/original/src/components/BusinessesListing/index.tsx +80 -25
  103. package/themes/original/src/components/Cart/index.tsx +82 -15
  104. package/themes/original/src/components/Cart/styles.tsx +4 -0
  105. package/themes/original/src/components/CartContent/index.tsx +27 -17
  106. package/themes/original/src/components/CartContent/styles.tsx +1 -1
  107. package/themes/original/src/components/Checkout/index.tsx +114 -118
  108. package/themes/original/src/components/Checkout/styles.tsx +4 -3
  109. package/themes/original/src/components/CitiesControl/index.tsx +89 -0
  110. package/themes/original/src/components/CitiesControl/styles.tsx +17 -0
  111. package/themes/original/src/components/DriverTips/index.tsx +4 -4
  112. package/themes/original/src/components/DriverTips/styles.tsx +2 -1
  113. package/themes/original/src/components/FavoriteList/index.tsx +69 -45
  114. package/themes/original/src/components/FloatingButton/index.tsx +13 -11
  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 +20 -12
  119. package/themes/original/src/components/HelpAccountAndPayment/index.tsx +25 -10
  120. package/themes/original/src/components/HelpAccountAndPayment/styles.tsx +4 -0
  121. package/themes/original/src/components/HelpGuide/index.tsx +9 -8
  122. package/themes/original/src/components/HelpOrder/index.tsx +9 -8
  123. package/themes/original/src/components/LanguageSelector/index.tsx +19 -14
  124. package/themes/original/src/components/LoginForm/Otp/index.tsx +89 -73
  125. package/themes/original/src/components/LoginForm/Otp/styles.tsx +0 -1
  126. package/themes/original/src/components/LoginForm/index.tsx +98 -41
  127. package/themes/original/src/components/LottieAnimation/index.tsx +69 -0
  128. package/themes/original/src/components/Messages/index.tsx +35 -20
  129. package/themes/original/src/components/MomentOption/index.tsx +8 -6
  130. package/themes/original/src/components/MultiCart/index.tsx +63 -0
  131. package/themes/original/src/components/MultiCartsPaymethodsAndWallets/index.tsx +92 -93
  132. package/themes/original/src/components/MultiCheckout/index.tsx +10 -2
  133. package/themes/original/src/components/MultiOrdersDetails/index.tsx +34 -16
  134. package/themes/original/src/components/MyOrders/index.tsx +88 -24
  135. package/themes/original/src/components/NavBar/index.tsx +11 -5
  136. package/themes/original/src/components/NetworkError/index.tsx +5 -3
  137. package/themes/original/src/components/NotFoundSource/index.tsx +2 -1
  138. package/themes/original/src/components/Notifications/index.tsx +148 -0
  139. package/themes/original/src/components/Notifications/styles.tsx +20 -0
  140. package/themes/original/src/components/OrderDetails/index.tsx +162 -50
  141. package/themes/original/src/components/OrderDetails/styles.tsx +15 -2
  142. package/themes/original/src/components/OrderItAgain/index.tsx +75 -0
  143. package/themes/original/src/components/OrderItAgain/styles.tsx +10 -0
  144. package/themes/original/src/components/OrderProgress/index.tsx +77 -66
  145. package/themes/original/src/components/OrderProgress/styles.tsx +5 -0
  146. package/themes/original/src/components/OrderSummary/index.tsx +2 -35
  147. package/themes/original/src/components/OrderTypeSelector/index.tsx +85 -36
  148. package/themes/original/src/components/OrderTypeSelector/styles.tsx +19 -1
  149. package/themes/original/src/components/OrdersOption/PreviousBusinessOrdered/index.tsx +94 -98
  150. package/themes/original/src/components/OrdersOption/PreviousProductsOrdered/index.tsx +3 -0
  151. package/themes/original/src/components/OrdersOption/index.tsx +91 -53
  152. package/themes/original/src/components/PaymentOptionWallet/index.tsx +56 -56
  153. package/themes/original/src/components/PaymentOptions/index.tsx +1 -2
  154. package/themes/original/src/components/PhoneInputNumber/index.tsx +1 -1
  155. package/themes/original/src/components/PlaceSpot/index.tsx +249 -47
  156. package/themes/original/src/components/PlaceSpot/styles.tsx +0 -2
  157. package/themes/original/src/components/PreviousOrders/index.tsx +3 -2
  158. package/themes/original/src/components/ProductForm/index.tsx +365 -384
  159. package/themes/original/src/components/ProductForm/styles.tsx +7 -12
  160. package/themes/original/src/components/ProductItemAccordion/index.tsx +199 -128
  161. package/themes/original/src/components/ProductOption/index.tsx +1 -1
  162. package/themes/original/src/components/ProductOptionSubOption/index.tsx +16 -8
  163. package/themes/original/src/components/ProductOptionSubOption/styles.tsx +0 -1
  164. package/themes/original/src/components/ProfessionalFilter/index.tsx +2 -1
  165. package/themes/original/src/components/ProfessionalProfile/index.tsx +19 -8
  166. package/themes/original/src/components/Promotions/index.tsx +232 -219
  167. package/themes/original/src/components/Promotions/styles.tsx +7 -2
  168. package/themes/original/src/components/ReviewDriver/index.tsx +3 -3
  169. package/themes/original/src/components/ReviewOrder/index.tsx +120 -108
  170. package/themes/original/src/components/ReviewOrder/styles.tsx +5 -7
  171. package/themes/original/src/components/ReviewProducts/index.tsx +8 -5
  172. package/themes/original/src/components/ReviewTrigger/index.tsx +136 -0
  173. package/themes/original/src/components/ReviewTrigger/styles.tsx +41 -0
  174. package/themes/original/src/components/ScheduleAccordion/index.tsx +68 -0
  175. package/themes/original/src/components/ScheduleAccordion/styles.tsx +14 -0
  176. package/themes/original/src/components/ServiceForm/index.tsx +341 -267
  177. package/themes/original/src/components/SignupForm/index.tsx +134 -89
  178. package/themes/original/src/components/SingleOrderCard/index.tsx +219 -129
  179. package/themes/original/src/components/SingleOrderCard/styles.tsx +10 -8
  180. package/themes/original/src/components/SingleProductCard/index.tsx +180 -104
  181. package/themes/original/src/components/SingleProductCard/styles.tsx +3 -10
  182. package/themes/original/src/components/SingleProductReview/index.tsx +38 -5
  183. package/themes/original/src/components/SingleProductReview/styles.tsx +12 -0
  184. package/themes/original/src/components/StripeElementsForm/index.tsx +13 -2
  185. package/themes/original/src/components/UpsellingProducts/index.tsx +15 -5
  186. package/themes/original/src/components/UserDetails/index.tsx +5 -3
  187. package/themes/original/src/components/UserFormDetails/index.tsx +6 -48
  188. package/themes/original/src/components/UserProfile/index.tsx +58 -35
  189. package/themes/original/src/components/UserProfile/styles.ts +17 -0
  190. package/themes/original/src/components/WalletTransactions/index.tsx +76 -0
  191. package/themes/original/src/components/WalletTransactions/styles.tsx +13 -0
  192. package/themes/original/src/components/Wallets/index.tsx +176 -164
  193. package/themes/original/src/components/Wallets/styles.tsx +12 -8
  194. package/themes/original/src/components/shared/CardAnimation.tsx +47 -0
  195. package/themes/original/src/components/shared/HeaderTitle.tsx +8 -3
  196. package/themes/original/src/components/shared/OBottomPopup.tsx +48 -15
  197. package/themes/original/src/components/shared/OButton.tsx +10 -3
  198. package/themes/original/src/components/shared/OIcon.tsx +8 -1
  199. package/themes/original/src/components/shared/OInput.tsx +10 -1
  200. package/themes/original/src/layouts/Container.tsx +13 -9
  201. package/themes/original/src/layouts/FloatingBottomContainer.tsx +5 -1
  202. package/themes/original/src/types/index.tsx +79 -23
  203. package/themes/original/src/utils/index.tsx +103 -58
  204. package/themes/uber-eats/src/components/BusinessesListing/index.tsx +1 -1
@@ -1,5 +1,6 @@
1
1
  import React, { useState, useEffect } from 'react';
2
- import { StyleSheet, View, TouchableOpacity, Linking } from 'react-native';
2
+ import { StyleSheet, View, TouchableOpacity, Linking, Pressable } from 'react-native';
3
+ import FastImage from 'react-native-fast-image'
3
4
  import { useUtils, useOrder, useLanguage } from 'ordering-components/native';
4
5
  import { useTheme } from 'styled-components/native';
5
6
  import { OIcon, OText, OModal } from '../shared';
@@ -45,24 +46,26 @@ export const BusinessBasicInformation = (
45
46
  const [openBusinessReviews, setOpenBusinessReviews] = useState(false);
46
47
  const [businessInformationObtained, setBusinessInformationObtained] = useState(false)
47
48
  const [businessReviewsObtained, setBusinessReviewsObtainedbtained] = useState(false)
49
+ const isChewLayout = theme?.header?.components?.layout?.type === 'chew'
50
+ const showLogo = !theme?.business_view?.components?.header?.components?.business?.components?.logo?.hidden
48
51
 
49
52
  const styles = StyleSheet.create({
50
53
  businesInfoheaderStyle: {
51
54
  height: 150,
52
55
  },
53
56
  headerStyle: {
54
- height: 260,
57
+ height: isChewLayout ? 170 : 260,
55
58
  },
56
- businessLogo: {
59
+ logoStyle: {
57
60
  width: 72,
58
61
  height: 72,
59
62
  borderRadius: 7.6,
60
63
  justifyContent: 'flex-start',
61
- alignItems: 'flex-start',
64
+ alignItems: 'flex-start'
62
65
  },
63
66
  businessInfo: {
64
67
  paddingHorizontal: 40,
65
- paddingTop: 56,
68
+ paddingTop: isChewLayout ? 0 : 56,
66
69
  },
67
70
  bullet: {
68
71
  flexDirection: 'row',
@@ -89,7 +92,7 @@ export const BusinessBasicInformation = (
89
92
  socialIcon: {
90
93
  borderRadius: 3,
91
94
  borderColor: theme.colors.border,
92
- borderWidth: 1,
95
+ borderWidth: isChewLayout ? 0 : 1,
93
96
  width: 20,
94
97
  height: 20,
95
98
  justifyContent: 'center',
@@ -101,7 +104,20 @@ export const BusinessBasicInformation = (
101
104
  height: 12,
102
105
  width: 12,
103
106
  margin: 0,
104
- padding: 0
107
+ padding: 0,
108
+ display: 'flex',
109
+ justifyContent: 'center',
110
+ alignItems: 'center'
111
+ },
112
+ headerChewStyle: {
113
+ paddingHorizontal: 30,
114
+ justifyContent: 'center',
115
+ height: '100%'
116
+ },
117
+ socialIconsChewContainer: {
118
+ flexDirection: 'row',
119
+ justifyContent: 'flex-start',
120
+ marginTop: 5
105
121
  }
106
122
  });
107
123
 
@@ -135,14 +151,14 @@ export const BusinessBasicInformation = (
135
151
  };
136
152
 
137
153
  const SocialNetWork = (props: any) => {
138
- const { socialLink, iconTitle} = props
154
+ const { socialLink, iconTitle } = props
139
155
 
140
156
  return (
141
157
  <TouchableOpacity style={styles.socialIcon} onPress={() => Linking.openURL(socialLink)}>
142
158
  <MaterialComIcon
143
159
  name={iconTitle}
144
- color={theme.colors.textNormal}
145
- size={14}
160
+ color={isChewLayout ? theme.colors.black : theme.colors.textNormal}
161
+ size={isChewLayout ? 18 : 14}
146
162
  />
147
163
  </TouchableOpacity>
148
164
  )
@@ -172,85 +188,9 @@ export const BusinessBasicInformation = (
172
188
  }
173
189
  }, [businessState?.business])
174
190
 
175
- return (
176
- <BusinessContainer>
177
- <BusinessHeader
178
- style={
179
- isBusinessInfoShow
180
- ? styles.businesInfoheaderStyle
181
- : { ...styles.headerStyle, backgroundColor: theme.colors.backgroundGray }
182
- }
183
- source={{
184
- uri:
185
- header ||
186
- optimizeImage(businessState?.business?.header, 'h_250,c_limit'),
187
- }}>
188
- {!isBusinessInfoShow && (
189
- <WrapBusinessInfo onPress={() => handleClickBusinessInformation()}>
190
- <OIcon src={theme.images.general.info} width={24} />
191
- </WrapBusinessInfo>
192
- )}
193
- </BusinessHeader>
194
- <BusinessInfo style={styles.businessInfo}>
195
- <BusinessLogo>
196
- {loading ? (
197
- <View>
198
- <Placeholder Animation={Fade}>
199
- <PlaceholderLine height={50} width={20} />
200
- </Placeholder>
201
- </View>
202
- ) : (
203
- !isBusinessInfoShow && (
204
- <OIcon
205
- url={
206
- logo ||
207
- optimizeImage(businessState?.business?.logo, 'h_70,c_limit')
208
- }
209
- style={styles.businessLogo}
210
- />
211
- )
212
- )}
213
- </BusinessLogo>
214
- <BusinessInfoItem>
215
- {loading ? (
216
- <Placeholder Animation={Fade}>
217
- <PlaceholderLine height={30} width={20} />
218
- </Placeholder>
219
- ) : (
220
- <TitleWrapper>
221
- <OText size={24} weight={'600'}>
222
- {business?.name}
223
- </OText>
224
- {business?.ribbon?.enabled && (
225
- <RibbonBox
226
- bgColor={business?.ribbon?.color}
227
- isRoundRect={business?.ribbon?.shape === shape?.rectangleRound}
228
- isCapsule={business?.ribbon?.shape === shape?.capsuleShape}
229
- >
230
- <OText
231
- size={10}
232
- weight={'400'}
233
- color={theme.colors.white}
234
- numberOfLines={2}
235
- ellipsizeMode='tail'
236
- lineHeight={13}
237
- >
238
- {business?.ribbon?.text}
239
- </OText>
240
- </RibbonBox>
241
- )}
242
- </TitleWrapper>
243
- )}
244
- </BusinessInfoItem>
245
- {loading ? (
246
- <Placeholder Animation={Fade}>
247
- <PlaceholderLine width={10} />
248
- </Placeholder>
249
- ) : (
250
- <View style={{ width: '75%' }}>
251
- <OText color={theme.colors.textNormal}>{getBusinessType()}</OText>
252
- </View>
253
- )}
191
+ const SocialIcons = () => {
192
+ return (
193
+ <>
254
194
  {loading ? (
255
195
  <Placeholder Animation={Fade}>
256
196
  <View style={{ flexDirection: 'row' }}>
@@ -266,7 +206,7 @@ export const BusinessBasicInformation = (
266
206
  showsVerticalScrollIndicator={false}
267
207
  showsHorizontalScrollIndicator={false}
268
208
  horizontal
269
- contentContainerStyle={{ flex: 1}}
209
+ contentContainerStyle={{ flex: 1 }}
270
210
  >
271
211
  {!!business?.facebook_profile && (
272
212
  <SocialNetWork
@@ -281,14 +221,15 @@ export const BusinessBasicInformation = (
281
221
  />
282
222
  )}
283
223
  {!!business?.tiktok_profile && (
284
- <TouchableOpacity style={styles.socialIcon} onPress={() => Linking.openURL(business?.tiktok_profile)}>
224
+ <Pressable style={styles.socialIcon} onPress={() => Linking.openURL(business?.tiktok_profile)}>
285
225
  <View style={styles.tiktokIcon}>
286
226
  <OIcon
287
227
  src={theme.images.general.tiktok}
288
- style={{ width: '100%', height: '100%'}}
228
+ style={{ width: 10, height: 12 }}
229
+ cover
289
230
  />
290
231
  </View>
291
- </TouchableOpacity>
232
+ </Pressable>
292
233
  )}
293
234
  {!!business?.pinterest_profile && (
294
235
  <SocialNetWork
@@ -308,72 +249,202 @@ export const BusinessBasicInformation = (
308
249
  iconTitle='snapchat'
309
250
  />
310
251
  )}
252
+ {isChewLayout && (
253
+ <TouchableOpacity onPress={() => handleClickBusinessInformation()}>
254
+ <OText
255
+ color={theme.colors.primary}
256
+ style={{ textDecorationColor: theme.colors.primary, textDecorationLine: 'underline' }}
257
+ size={12}
258
+ >
259
+ {t('SEE_MORE_DESCRIPTION', 'See more')}
260
+ </OText>
261
+ </TouchableOpacity>
262
+ )}
311
263
  </SocialListWrapper>
312
264
  )}
313
- <View>
314
- <BusinessInfoItem>
315
- {loading && (
316
- <Placeholder Animation={Fade}>
317
- <View style={{ flexDirection: 'row' }}>
318
- <PlaceholderLine width={13} style={{ marginRight: 10 }} />
319
- <PlaceholderLine width={13} style={{ marginRight: 10 }} />
320
- <PlaceholderLine width={13} style={{ marginRight: 10 }} />
321
- <PlaceholderLine width={13} />
322
- </View>
323
- </Placeholder>
324
- )}
325
- <View style={styles.bullet}>
326
- <OText color={theme.colors.textSecondary} size={12} style={styles.metadata}>
327
- {`${t('DELIVERY_FEE', 'Delivery fee')} ${business && parsePrice(business?.delivery_price || 0)} \u2022 `}
265
+ </>
266
+ )
267
+ }
268
+
269
+ return (
270
+ <BusinessContainer isChewLayout={isChewLayout && !showLogo}>
271
+ <BusinessHeader
272
+ isChewLayout={isChewLayout}
273
+ style={
274
+ isBusinessInfoShow
275
+ ? styles.businesInfoheaderStyle
276
+ : { ...styles.headerStyle, backgroundColor: theme.colors.backgroundGray }
277
+ }
278
+ {...(!loading && {
279
+ source: (header || businessState?.business?.header) ? {
280
+ uri: header || optimizeImage(businessState?.business?.header, 'h_250,c_limit')
281
+ } : theme?.images?.dummies?.businessHeader
282
+ })}
283
+ imageStyle={{ opacity: isChewLayout ? 0.5 : 1 }}
284
+ >
285
+ {!isBusinessInfoShow && !isChewLayout && (
286
+ <WrapBusinessInfo onPress={() => handleClickBusinessInformation()}>
287
+ <OIcon src={theme.images.general.info} width={24} />
288
+ </WrapBusinessInfo>
289
+ )}
290
+ {isChewLayout && !loading && (
291
+ <View style={styles.headerChewStyle}>
292
+ <OText size={24} weight={'600'} mBottom={-5}>
293
+ {business?.name}
294
+ </OText>
295
+ {business?.city?.name && (
296
+ <OText>
297
+ {business?.city?.name}
328
298
  </OText>
329
- {orderState?.options?.type === 1 ? (
330
- <OText color={theme.colors.textSecondary} size={12} style={styles.metadata}>
331
- {convertHoursToMinutes(business?.delivery_time) + ` \u2022 `}
332
- </OText>
299
+ )}
300
+ <View style={styles.socialIconsChewContainer}>
301
+ <SocialIcons />
302
+ </View>
303
+ </View>
304
+ )}
305
+ </BusinessHeader>
306
+ <BusinessInfo style={styles.businessInfo}>
307
+ {showLogo && (
308
+ <BusinessLogo isChewLayout={isChewLayout}>
309
+ {!isBusinessInfoShow && (
310
+ logo || businessState?.business?.logo ?
311
+ <FastImage
312
+ style={styles.logoStyle}
313
+ source={{
314
+ uri: logo || optimizeImage(businessState?.business?.logo, 'h_70,c_limit'),
315
+ priority: FastImage.priority.high,
316
+ cache: FastImage.cacheControl.web
317
+ }}
318
+ resizeMode={FastImage.resizeMode.contain}
319
+ />
320
+ :
321
+ <OIcon
322
+ src={theme?.images?.dummies?.businessLogo}
323
+ style={styles.logoStyle}
324
+ />
325
+ )}
326
+ </BusinessLogo>
327
+ )}
328
+ {!isChewLayout && (
329
+
330
+ <>
331
+ <BusinessInfoItem>
332
+ {loading ? (
333
+ <Placeholder Animation={Fade}>
334
+ <PlaceholderLine height={30} width={20} />
335
+ </Placeholder>
333
336
  ) : (
334
- <OText color={theme.colors.textSecondary} size={12} style={styles.metadata}>
335
- {convertHoursToMinutes(business?.pickup_time) + ` \u2022 `}
336
- </OText>
337
+ <TitleWrapper>
338
+ <OText size={24} weight={'600'} numberOfLines={2}>
339
+ {business?.name}
340
+ </OText>
341
+ {business?.ribbon?.enabled && (
342
+ <RibbonBox
343
+ bgColor={business?.ribbon?.color}
344
+ isRoundRect={business?.ribbon?.shape === shape?.rectangleRound}
345
+ isCapsule={business?.ribbon?.shape === shape?.capsuleShape}
346
+ >
347
+ <OText
348
+ size={10}
349
+ weight={'400'}
350
+ color={theme.colors.white}
351
+ numberOfLines={2}
352
+ ellipsizeMode='tail'
353
+ lineHeight={13}
354
+ >
355
+ {business?.ribbon?.text}
356
+ </OText>
357
+ </RibbonBox>
358
+ )}
359
+ </TitleWrapper>
337
360
  )}
338
- <OText color={theme.colors.textSecondary} size={12} style={styles.metadata}>
339
- {parseDistance(business?.distance || 0) + ` \u2022 `}
340
- </OText>
341
- </View>
361
+ </BusinessInfoItem>
362
+ {loading ? (
363
+ <Placeholder Animation={Fade}>
364
+ <PlaceholderLine width={10} />
365
+ </Placeholder>
366
+ ) : (
367
+ <View style={{ width: '75%' }}>
368
+ <OText color={theme.colors.textNormal}>{getBusinessType()}</OText>
369
+ </View>
370
+ )}
371
+ {!isChewLayout && (
372
+ <SocialIcons />
373
+ )}
374
+ <View>
375
+ <BusinessInfoItem>
376
+ {loading && (
377
+ <Placeholder Animation={Fade}>
378
+ <View style={{ flexDirection: 'row' }}>
379
+ <PlaceholderLine width={13} style={{ marginRight: 10 }} />
380
+ <PlaceholderLine width={13} style={{ marginRight: 10 }} />
381
+ <PlaceholderLine width={13} style={{ marginRight: 10 }} />
382
+ <PlaceholderLine width={13} />
383
+ </View>
384
+ </Placeholder>
385
+ )}
386
+ <View style={styles.bullet}>
387
+ <OText color={theme.colors.textSecondary} size={12} style={styles.metadata}>
388
+ {`${t('DELIVERY_FEE', 'Delivery fee')} ${business && parsePrice(business?.delivery_price || 0)} \u2022 `}
389
+ </OText>
390
+ {orderState?.options?.type === 1 ? (
391
+ <OText color={theme.colors.textSecondary} size={12} style={styles.metadata}>
392
+ {convertHoursToMinutes(business?.delivery_time) + ` \u2022 `}
393
+ </OText>
394
+ ) : (
395
+ <OText color={theme.colors.textSecondary} size={12} style={styles.metadata}>
396
+ {convertHoursToMinutes(business?.pickup_time) + ` \u2022 `}
397
+ </OText>
398
+ )}
399
+ <OText color={theme.colors.textSecondary} size={12} style={styles.metadata}>
400
+ {parseDistance(business?.distance || 0) + ` \u2022 `}
401
+ </OText>
402
+ </View>
342
403
 
343
- <View style={styles.reviewStyle}>
344
- <OIcon
345
- src={theme.images.general.star}
346
- width={14}
347
- color={theme.colors.textSecondary}
348
- style={{ marginTop: -2, marginEnd: 2 }}
349
- />
350
- <OText size={12} color={theme.colors.textSecondary}>
351
- {business?.reviews?.total}
352
- </OText>
404
+ <View style={styles.reviewStyle}>
405
+ <OIcon
406
+ src={theme.images.general.star}
407
+ width={14}
408
+ color={theme.colors.textSecondary}
409
+ style={{ marginTop: -2, marginEnd: 2 }}
410
+ />
411
+ <OText size={12} color={theme.colors.textSecondary}>
412
+ {business?.reviews?.total}
413
+ </OText>
414
+ </View>
415
+ </BusinessInfoItem>
353
416
  </View>
354
- </BusinessInfoItem>
355
- </View>
356
- <WrapReviews>
357
- {!isBusinessInfoShow && (
358
- <>
359
- {isPreOrder && (!business?.professionals || business?.professionals?.length === 0) && (
417
+ <WrapReviews>
418
+ {!isBusinessInfoShow && (
360
419
  <>
361
- <TouchableOpacity onPress={() => navigation.navigate('BusinessPreorder', { business: businessState?.business, handleBusinessClick: () => navigation?.goBack() })}>
362
- <OText color={theme.colors.textSecondary} style={{ textDecorationLine: 'underline' }}>
363
- {t('PRE_ORDER', 'Preorder')}
420
+ {isPreOrder && (!business?.professionals || business?.professionals?.length === 0) && (
421
+ <>
422
+ <TouchableOpacity onPress={() => navigation.navigate('BusinessPreorder', { business: businessState?.business, handleBusinessClick: () => navigation?.goBack() })}>
423
+ <OText
424
+ color={theme.colors.primary}
425
+ style={{ textDecorationColor: theme.colors.primary, textDecorationLine: 'underline' }}
426
+ size={12}
427
+ >
428
+ {t('PREORDER', 'Preorder')}
429
+ </OText>
430
+ </TouchableOpacity>
431
+ <OText size={12} color={theme.colors.textSecondary}>{' \u2022 '}</OText>
432
+ </>
433
+ )}
434
+ <TouchableOpacity onPress={() => handleClickBusinessReviews()}>
435
+ <OText
436
+ color={theme.colors.primary}
437
+ style={{ textDecorationColor: theme.colors.primary, textDecorationLine: 'underline' }}
438
+ size={12}
439
+ >
440
+ {t('REVIEWS', 'Reviews')}
364
441
  </OText>
365
442
  </TouchableOpacity>
366
- <OText size={12} color={theme.colors.textSecondary}>{' \u2022 '}</OText>
367
443
  </>
368
444
  )}
369
- <TouchableOpacity onPress={() => handleClickBusinessReviews()}>
370
- <OText color={theme.colors.textSecondary} style={{ textDecorationLine: 'underline' }}>
371
- {t('REVIEWS', 'Reviews')}
372
- </OText>
373
- </TouchableOpacity>
374
- </>
375
- )}
376
- </WrapReviews>
445
+ </WrapReviews>
446
+ </>
447
+ )}
377
448
  </BusinessInfo>
378
449
  {businessInformationObtained ? (
379
450
  <OModal
@@ -3,7 +3,7 @@ import { Platform } from 'react-native';
3
3
 
4
4
  export const BusinessContainer = styled.View`
5
5
  flex-direction: column;
6
- padding-bottom: 35px;
6
+ padding-bottom: ${(props: any) => props.isChewLayout ? '0' : '35px'};
7
7
  `;
8
8
  export const BusinessHeader = styled.ImageBackground`
9
9
  width: 100%;
@@ -20,7 +20,7 @@ export const BusinessLogo = styled.View`
20
20
  box-shadow: 0 0 2px ${Platform.OS == 'android' ? '#000000DD' : '#0000001A'};
21
21
  elevation: 2;
22
22
  background-color: white;
23
- border-radius: 7.6px;
23
+ border-radius: 7.6px;
24
24
  `;
25
25
  export const BusinessInfo = styled.View`
26
26
  justify-content: flex-start;