ordering-ui-react-native 0.16.40 → 0.16.41-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 (202) hide show
  1. package/package.json +7 -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/BusinessBasicInformation/index.tsx +11 -19
  6. package/src/components/BusinessInformation/index.tsx +33 -4
  7. package/src/components/BusinessInformation/styles.tsx +2 -2
  8. package/src/components/BusinessProductsList/index.tsx +10 -10
  9. package/src/components/BusinessesListing/index.tsx +1 -1
  10. package/src/components/Checkout/index.tsx +2 -1
  11. package/src/components/LanguageSelector/index.tsx +21 -16
  12. package/src/components/LoginForm/index.tsx +15 -0
  13. package/src/components/Messages/index.tsx +2 -2
  14. package/src/components/NotificationSetting/index.tsx +85 -0
  15. package/src/components/OrdersOption/index.tsx +54 -56
  16. package/src/components/PaymentOptions/index.tsx +298 -345
  17. package/src/components/PaymentOptionsWebView/index.tsx +120 -121
  18. package/src/components/ReviewDriver/index.tsx +1 -1
  19. package/src/components/ReviewOrder/index.tsx +1 -1
  20. package/src/components/ReviewProducts/index.tsx +11 -0
  21. package/src/components/SignupForm/index.tsx +15 -0
  22. package/src/components/SingleProductReview/index.tsx +8 -5
  23. package/src/components/StripeElementsForm/index.tsx +25 -16
  24. package/src/components/VerifyPhone/styles.tsx +1 -2
  25. package/src/components/shared/OBottomPopup.tsx +6 -2
  26. package/src/index.tsx +2 -0
  27. package/src/pages/BusinessesListing.tsx +7 -6
  28. package/src/pages/OrderDetails.tsx +1 -1
  29. package/src/pages/ReviewDriver.tsx +2 -2
  30. package/src/pages/ReviewOrder.tsx +2 -2
  31. package/src/types/@fatnlazycat/react-native-recaptcha-v3/index.d.ts +1 -0
  32. package/src/utils/index.tsx +2 -1
  33. package/themes/business/src/components/BusinessController/index.tsx +2 -2
  34. package/themes/business/src/components/Chat/index.tsx +40 -32
  35. package/themes/business/src/components/DriverMap/index.tsx +7 -5
  36. package/themes/business/src/components/DriverSchedule/index.tsx +36 -19
  37. package/themes/business/src/components/LoginForm/index.tsx +111 -74
  38. package/themes/business/src/components/MapView/index.tsx +12 -1
  39. package/themes/business/src/components/MessagesOption/index.tsx +11 -1
  40. package/themes/business/src/components/NewOrderNotification/index.tsx +26 -41
  41. package/themes/business/src/components/OrderDetails/Business.tsx +1 -1
  42. package/themes/business/src/components/OrderDetails/OrderContentComponent.tsx +25 -19
  43. package/themes/business/src/components/OrdersListManager/index.tsx +10 -3
  44. package/themes/business/src/components/OrdersOption/index.tsx +65 -21
  45. package/themes/business/src/components/OrdersOption/styles.tsx +5 -1
  46. package/themes/business/src/components/OrdersOptionBusiness/index.tsx +15 -1
  47. package/themes/business/src/components/OrdersOptionCity/index.tsx +15 -1
  48. package/themes/business/src/components/OrdersOptionDate/index.tsx +19 -6
  49. package/themes/business/src/components/OrdersOptionDelivery/index.tsx +15 -1
  50. package/themes/business/src/components/OrdersOptionDriver/index.tsx +15 -1
  51. package/themes/business/src/components/OrdersOptionPaymethod/index.tsx +15 -1
  52. package/themes/business/src/components/OrdersOptionStatus/index.tsx +10 -1
  53. package/themes/business/src/components/PreviousMessages/index.tsx +17 -18
  54. package/themes/business/src/components/PreviousOrders/index.tsx +22 -24
  55. package/themes/business/src/components/ProductItemAccordion/index.tsx +3 -2
  56. package/themes/business/src/components/ReviewCustomer/index.tsx +27 -13
  57. package/themes/business/src/components/ScheduleBlocked/index.tsx +2 -2
  58. package/themes/business/src/components/UserFormDetails/index.tsx +5 -2
  59. package/themes/business/src/components/UserProfileForm/index.tsx +2 -0
  60. package/themes/business/src/components/shared/ODropDown.tsx +42 -8
  61. package/themes/business/src/components/shared/ODropDownCalendar.tsx +36 -7
  62. package/themes/business/src/types/index.tsx +15 -9
  63. package/themes/business/src/utils/index.tsx +10 -0
  64. package/themes/doordash/src/components/BusinessesListing/index.tsx +1 -1
  65. package/themes/doordash/src/components/LoginForm/index.tsx +1 -2
  66. package/themes/instacart/src/components/BusinessesListing/index.tsx +1 -1
  67. package/themes/kiosk/src/components/BusinessesListing/index.tsx +2 -1
  68. package/themes/kiosk/src/components/Checkout/index.tsx +6 -0
  69. package/themes/kiosk/src/components/LoginForm/index.tsx +121 -10
  70. package/themes/kiosk/src/components/LoginForm/styles.tsx +5 -0
  71. package/themes/kiosk/src/components/NavBar/index.tsx +14 -14
  72. package/themes/kiosk/src/components/OptionCard/index.tsx +1 -1
  73. package/themes/kiosk/src/components/OrderTypeCardSelector/index.tsx +8 -10
  74. package/themes/kiosk/src/components/ProductForm/index.tsx +1 -14
  75. package/themes/kiosk/src/components/shared/OButton.tsx +5 -18
  76. package/themes/kiosk/src/types/index.d.ts +2 -0
  77. package/themes/original/index.tsx +4 -0
  78. package/themes/original/src/components/AddressDetails/index.tsx +10 -8
  79. package/themes/original/src/components/AddressForm/index.tsx +157 -140
  80. package/themes/original/src/components/AddressList/index.tsx +1 -1
  81. package/themes/original/src/components/AppleLogin/index.tsx +4 -4
  82. package/themes/original/src/components/BusinessBasicInformation/index.tsx +260 -176
  83. package/themes/original/src/components/BusinessBasicInformation/styles.tsx +2 -2
  84. package/themes/original/src/components/BusinessController/index.tsx +216 -113
  85. package/themes/original/src/components/BusinessController/styles.tsx +1 -8
  86. package/themes/original/src/components/BusinessItemAccordion/index.tsx +12 -6
  87. package/themes/original/src/components/BusinessListingSearch/BusinessControllerSkeletons/index.tsx +57 -0
  88. package/themes/original/src/components/BusinessListingSearch/MaxSectionItem/index.tsx +59 -0
  89. package/themes/original/src/components/BusinessListingSearch/MaxSectionItem/styles.tsx +13 -0
  90. package/themes/original/src/components/BusinessListingSearch/index.tsx +109 -139
  91. package/themes/original/src/components/BusinessListingSearch/styles.tsx +10 -12
  92. package/themes/original/src/components/BusinessProductsList/SubcategoriesComponent/index.tsx +87 -0
  93. package/themes/original/src/components/BusinessProductsList/SubcategoriesComponent/styles.tsx +12 -0
  94. package/themes/original/src/components/BusinessProductsList/index.tsx +59 -60
  95. package/themes/original/src/components/BusinessProductsList/styles.tsx +0 -3
  96. package/themes/original/src/components/BusinessProductsListing/index.tsx +210 -115
  97. package/themes/original/src/components/BusinessProductsListing/styles.tsx +18 -11
  98. package/themes/original/src/components/BusinessReviews/index.tsx +6 -1
  99. package/themes/original/src/components/BusinessTypeFilter/index.tsx +3 -2
  100. package/themes/original/src/components/BusinessesListing/Layout/Appointment/index.tsx +37 -25
  101. package/themes/original/src/components/BusinessesListing/Layout/Appointment/styles.tsx +5 -4
  102. package/themes/original/src/components/BusinessesListing/Layout/Original/index.tsx +260 -109
  103. package/themes/original/src/components/BusinessesListing/Layout/Original/styles.tsx +47 -10
  104. package/themes/original/src/components/BusinessesListing/index.tsx +95 -7
  105. package/themes/original/src/components/Cart/index.tsx +53 -15
  106. package/themes/original/src/components/Cart/styles.tsx +4 -0
  107. package/themes/original/src/components/CartContent/index.tsx +22 -16
  108. package/themes/original/src/components/Checkout/index.tsx +114 -118
  109. package/themes/original/src/components/Checkout/styles.tsx +4 -3
  110. package/themes/original/src/components/CitiesControl/index.tsx +89 -0
  111. package/themes/original/src/components/CitiesControl/styles.tsx +17 -0
  112. package/themes/original/src/components/DriverTips/index.tsx +4 -4
  113. package/themes/original/src/components/DriverTips/styles.tsx +2 -1
  114. package/themes/original/src/components/FavoriteList/index.tsx +19 -0
  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 +95 -73
  125. package/themes/original/src/components/LoginForm/index.tsx +98 -41
  126. package/themes/original/src/components/LottieAnimation/index.tsx +69 -0
  127. package/themes/original/src/components/Messages/index.tsx +20 -20
  128. package/themes/original/src/components/MomentOption/index.tsx +8 -6
  129. package/themes/original/src/components/MultiCartsPaymethodsAndWallets/index.tsx +92 -92
  130. package/themes/original/src/components/MultiCheckout/index.tsx +6 -0
  131. package/themes/original/src/components/MultiOrdersDetails/index.tsx +20 -16
  132. package/themes/original/src/components/MyOrders/index.tsx +88 -22
  133. package/themes/original/src/components/NavBar/index.tsx +15 -9
  134. package/themes/original/src/components/NetworkError/index.tsx +5 -3
  135. package/themes/original/src/components/NotFoundSource/index.tsx +2 -1
  136. package/themes/original/src/components/Notifications/index.tsx +148 -0
  137. package/themes/original/src/components/Notifications/styles.tsx +17 -0
  138. package/themes/original/src/components/OrderDetails/OrderHistory.tsx +167 -0
  139. package/themes/original/src/components/OrderDetails/index.tsx +200 -37
  140. package/themes/original/src/components/OrderDetails/styles.tsx +15 -2
  141. package/themes/original/src/components/OrderItAgain/index.tsx +75 -0
  142. package/themes/original/src/components/OrderItAgain/styles.tsx +10 -0
  143. package/themes/original/src/components/OrderProgress/index.tsx +77 -66
  144. package/themes/original/src/components/OrderProgress/styles.tsx +5 -0
  145. package/themes/original/src/components/OrderSummary/index.tsx +2 -35
  146. package/themes/original/src/components/OrderTypeSelector/index.tsx +85 -36
  147. package/themes/original/src/components/OrderTypeSelector/styles.tsx +19 -1
  148. package/themes/original/src/components/OrdersOption/PreviousBusinessOrdered/index.tsx +97 -106
  149. package/themes/original/src/components/OrdersOption/PreviousProductsOrdered/index.tsx +3 -0
  150. package/themes/original/src/components/OrdersOption/index.tsx +71 -55
  151. package/themes/original/src/components/PaymentOptionWallet/index.tsx +56 -56
  152. package/themes/original/src/components/PaymentOptions/index.tsx +1 -2
  153. package/themes/original/src/components/PhoneInputNumber/index.tsx +5 -11
  154. package/themes/original/src/components/PlaceSpot/index.tsx +249 -47
  155. package/themes/original/src/components/PlaceSpot/styles.tsx +0 -2
  156. package/themes/original/src/components/PreviousOrders/index.tsx +3 -2
  157. package/themes/original/src/components/ProductForm/index.tsx +639 -664
  158. package/themes/original/src/components/ProductForm/styles.tsx +10 -11
  159. package/themes/original/src/components/ProductItemAccordion/index.tsx +199 -128
  160. package/themes/original/src/components/ProductOption/index.tsx +1 -1
  161. package/themes/original/src/components/ProductOptionSubOption/index.tsx +16 -8
  162. package/themes/original/src/components/ProductOptionSubOption/styles.tsx +0 -1
  163. package/themes/original/src/components/ProfessionalFilter/index.tsx +2 -1
  164. package/themes/original/src/components/ProfessionalProfile/index.tsx +26 -14
  165. package/themes/original/src/components/Promotions/index.tsx +232 -219
  166. package/themes/original/src/components/Promotions/styles.tsx +7 -2
  167. package/themes/original/src/components/ReviewDriver/index.tsx +7 -7
  168. package/themes/original/src/components/ReviewOrder/index.tsx +18 -3
  169. package/themes/original/src/components/ReviewProducts/index.tsx +2 -2
  170. package/themes/original/src/components/ReviewTrigger/index.tsx +118 -0
  171. package/themes/original/src/components/ReviewTrigger/styles.tsx +34 -0
  172. package/themes/original/src/components/SearchBar/index.tsx +5 -3
  173. package/themes/original/src/components/ServiceForm/index.tsx +410 -258
  174. package/themes/original/src/components/SignupForm/index.tsx +184 -127
  175. package/themes/original/src/components/SingleOrderCard/index.tsx +229 -181
  176. package/themes/original/src/components/SingleOrderCard/styles.tsx +0 -7
  177. package/themes/original/src/components/SingleProductCard/index.tsx +198 -112
  178. package/themes/original/src/components/SingleProductCard/styles.tsx +3 -10
  179. package/themes/original/src/components/SingleProductReview/index.tsx +38 -5
  180. package/themes/original/src/components/SingleProductReview/styles.tsx +12 -0
  181. package/themes/original/src/components/StripeElementsForm/index.tsx +13 -2
  182. package/themes/original/src/components/UpsellingProducts/index.tsx +15 -5
  183. package/themes/original/src/components/UserDetails/index.tsx +5 -3
  184. package/themes/original/src/components/UserFormDetails/index.tsx +6 -48
  185. package/themes/original/src/components/UserProfile/index.tsx +56 -31
  186. package/themes/original/src/components/UserProfile/styles.ts +17 -0
  187. package/themes/original/src/components/UserProfileForm/index.tsx +10 -10
  188. package/themes/original/src/components/WalletTransactions/index.tsx +76 -0
  189. package/themes/original/src/components/WalletTransactions/styles.tsx +13 -0
  190. package/themes/original/src/components/Wallets/index.tsx +176 -164
  191. package/themes/original/src/components/Wallets/styles.tsx +12 -8
  192. package/themes/original/src/components/shared/CardAnimation.tsx +47 -0
  193. package/themes/original/src/components/shared/HeaderTitle.tsx +8 -3
  194. package/themes/original/src/components/shared/OBottomPopup.tsx +48 -15
  195. package/themes/original/src/components/shared/OButton.tsx +10 -3
  196. package/themes/original/src/components/shared/OIcon.tsx +8 -1
  197. package/themes/original/src/components/shared/OInput.tsx +13 -3
  198. package/themes/original/src/layouts/Container.tsx +13 -9
  199. package/themes/original/src/layouts/FloatingBottomContainer.tsx +5 -1
  200. package/themes/original/src/types/index.tsx +83 -29
  201. package/themes/original/src/utils/index.tsx +121 -10
  202. package/themes/uber-eats/src/components/BusinessesListing/index.tsx +1 -1
@@ -0,0 +1,118 @@
1
+ import React, { useState } from 'react'
2
+ import FontAwesome from 'react-native-vector-icons/FontAwesome';
3
+ import { useLanguage, useUtils } from 'ordering-components/native'
4
+
5
+ import {
6
+ ReviewOrderContainer,
7
+ BusinessLogo,
8
+ FormReviews,
9
+ ActionContainer,
10
+ RatingStarContainer,
11
+ PlacedDate
12
+ } from './styles'
13
+ import { OButton, OIcon, OText } from '../shared'
14
+ import { StyleSheet, View, I18nManager } from 'react-native';
15
+ import { FloatingBottomContainer } from '../../layouts/FloatingBottomContainer'
16
+
17
+ import { useTheme } from 'styled-components/native'
18
+
19
+ export const ReviewTrigger = (props: any) => {
20
+ const {
21
+ order,
22
+ handleOpenOrderReview
23
+ } = props
24
+
25
+ const theme = useTheme()
26
+
27
+ const styles = StyleSheet.create({
28
+ logoWrapper: {
29
+ shadowColor: theme.colors.black,
30
+ shadowRadius: 3,
31
+ shadowOffset: { width: 1, height: 4 },
32
+ elevation: 3,
33
+ borderRadius: 8,
34
+ shadowOpacity: 0.1,
35
+ overflow: 'hidden'
36
+ },
37
+ inputTextArea: {
38
+ borderColor: theme.colors.lightGray,
39
+ borderRadius: 8,
40
+ marginTop: 10,
41
+ marginBottom: 40,
42
+ height: 100,
43
+ alignItems: 'flex-start'
44
+ },
45
+ statusBar: {
46
+ transform: [{ scaleX: I18nManager.isRTL ? -1 : 1 }],
47
+ height: 10,
48
+ borderRadius: 5,
49
+ marginTop: 5
50
+ },
51
+ ratingItemContainer: {
52
+ position: 'absolute',
53
+ top: -20
54
+ },
55
+ ratingItem: {
56
+ left: '-50%',
57
+ flexDirection: 'column',
58
+ alignItems: 'center'
59
+ },
60
+ ratingLineStyle: {
61
+ height: 10,
62
+ width: 1,
63
+ marginBottom: 10,
64
+ backgroundColor: theme.colors.dusk
65
+ },
66
+ reviewedStyle: {
67
+ flexDirection: 'row',
68
+ justifyContent: 'center',
69
+ marginVertical: 20
70
+ },
71
+ })
72
+
73
+ const [, t] = useLanguage()
74
+ const [{ parseDate }] = useUtils()
75
+ const placedOnDate = parseDate(order?.delivery_datetime, { utc: true, outputFormat: 'dddd MMMM DD, YYYY' })
76
+ const [star, setStar] = useState(5)
77
+
78
+ return (
79
+ <>
80
+ <ReviewOrderContainer>
81
+ <BusinessLogo>
82
+ <View style={styles.logoWrapper}>
83
+ <OIcon
84
+ url={order?.logo}
85
+ width={80}
86
+ height={80}
87
+ />
88
+ </View>
89
+ </BusinessLogo>
90
+ {!!order?.business_name && <OText style={{ textAlign: 'center', marginTop: 15 }} color={theme.colors.textNormal}>{order?.business_name}</OText>}
91
+ <View style={{ flex: 1, justifyContent: 'flex-end' }}>
92
+ <FormReviews>
93
+ <RatingStarContainer>
94
+ {[...Array(5).keys()].map((index: number) => (<FontAwesome name={(index <= (star - 1)) ? 'star' : 'star-o'} size={28} key={`star-symbol-${index}`} onPress={() => setStar(index + 1)} color={theme?.colors?.primary} />)
95
+ )}
96
+ </RatingStarContainer>
97
+ <PlacedDate>
98
+ <OText color={theme.colors.textNormal}>{t('DONOT_FORGET_RATE_YOUR_ORDER', 'Do not forget to rate your order placed on ')}</OText>
99
+ <OText color={theme.colors.textNormal} style={{ fontWeight: "bold" }}>{placedOnDate}</OText>
100
+ </PlacedDate>
101
+ </FormReviews>
102
+ </View>
103
+ </ReviewOrderContainer>
104
+ <FloatingBottomContainer borderTopWidth={0} borderRadius={10}>
105
+ <ActionContainer>
106
+ <OButton
107
+ textStyle={{ color: theme.colors.white, paddingRight: 10 }}
108
+ text={t('GOTO_REVIEW', 'Go to review')}
109
+ style={{ borderRadius: 8 }}
110
+ imgRightSrc={theme.images.general.arrow_right}
111
+ imgRightStyle={{ tintColor: theme.colors.white, right: 5, margin: 5 }}
112
+ onClick={() => handleOpenOrderReview(star)}
113
+ />
114
+ </ActionContainer>
115
+ </FloatingBottomContainer>
116
+ </>
117
+ )
118
+ }
@@ -0,0 +1,34 @@
1
+ import styled from 'styled-components/native'
2
+
3
+ export const ReviewOrderContainer = styled.ScrollView`
4
+ padding: 0 25px;
5
+ margin-bottom: 100px;
6
+ `
7
+
8
+ export const BusinessLogo = styled.View`
9
+ margin-vertical: 5px;
10
+ align-items: center;
11
+ `
12
+
13
+ export const FormReviews = styled.View`
14
+ flex: 1;
15
+ height: 100%;
16
+ margin-top: 10px;
17
+ `
18
+
19
+ export const ActionContainer = styled.View`
20
+ flex-direction: row;
21
+ align-items: center;
22
+ justify-content: center;
23
+ padding: 3px 30px;
24
+ `
25
+
26
+ export const RatingStarContainer = styled.View`
27
+ flex-direction: row;
28
+ align-items: center;
29
+ justify-content: space-between;
30
+ margin-top: 10px;
31
+ `
32
+ export const PlacedDate = styled.View`
33
+ margin-top: 30px;
34
+ `
@@ -25,7 +25,8 @@ export const SearchBar = (props: any) => {
25
25
  blurOnSubmit,
26
26
  inputContainerStyles,
27
27
  containerStyles,
28
- hideIcon
28
+ hideIcon,
29
+ autoFocus
29
30
  } = props
30
31
 
31
32
  const theme = useTheme();
@@ -82,15 +83,16 @@ export const SearchBar = (props: any) => {
82
83
  return (
83
84
  <Pressable style={[styles.container, containerStyles, { height: height }]}>
84
85
  <OInput
86
+ autoFocus={autoFocus}
85
87
  value={searchValue}
86
88
  onChange={onChangeSearch}
87
- style={{...styles.inputStyle, ...inputContainerStyles}}
89
+ style={{ ...styles.inputStyle, ...inputContainerStyles }}
88
90
  placeholder={placeholder}
89
91
  icon={!hideIcon && theme.images.general.search}
90
92
  isDisabled={isDisabled}
91
93
  iconStyle={{ width: 12 }}
92
94
  returnKeyType='done'
93
- inputStyle={{padding: 0, paddingTop: Platform.OS == 'android' ? 2 : 0, ...inputStyle}}
95
+ inputStyle={{ padding: 0, paddingTop: Platform.OS == 'android' ? 2 : 0, ...inputStyle }}
94
96
  onPress={() => onPress && onPress()}
95
97
  iconCustomRight={iconCustomRight}
96
98
  onSubmitEditing={() => onSubmitEditing && onSubmitEditing()}