ordering-ui-react-native 0.15.68 → 0.15.70-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 (220) hide show
  1. package/package.json +7 -3
  2. package/src/DeliveryApp.tsx +43 -1
  3. package/src/components/ActiveOrders/index.tsx +61 -63
  4. package/src/components/ActiveOrders/styles.tsx +1 -1
  5. package/src/components/AddressForm/index.tsx +18 -2
  6. package/src/components/BusinessBasicInformation/index.tsx +11 -19
  7. package/src/components/BusinessController/index.tsx +16 -8
  8. package/src/components/BusinessInformation/index.tsx +14 -0
  9. package/src/components/BusinessTypeFilter/index.tsx +1 -2
  10. package/src/components/BusinessesListing/index.tsx +1 -1
  11. package/src/components/Checkout/index.tsx +23 -2
  12. package/src/components/DriverTips/index.tsx +11 -6
  13. package/src/components/LanguageSelector/index.tsx +6 -2
  14. package/src/components/LoginForm/index.tsx +120 -30
  15. package/src/components/LoginForm/styles.tsx +6 -0
  16. package/src/components/NotificationSetting/index.tsx +85 -0
  17. package/src/components/OrderDetails/index.tsx +7 -21
  18. package/src/components/PaymentOptions/index.tsx +67 -50
  19. package/src/components/PaymentOptionsWebView/index.tsx +120 -121
  20. package/src/components/ReviewDriver/index.tsx +1 -1
  21. package/src/components/ReviewOrder/index.tsx +2 -1
  22. package/src/components/ReviewProducts/index.tsx +11 -0
  23. package/src/components/SignupForm/index.tsx +145 -61
  24. package/src/components/SingleProductCard/index.tsx +16 -4
  25. package/src/components/SingleProductReview/index.tsx +1 -1
  26. package/src/components/StripeMethodForm/index.tsx +22 -24
  27. package/src/components/UpsellingProducts/index.tsx +1 -1
  28. package/src/components/UserProfileForm/index.tsx +63 -6
  29. package/src/components/UserProfileForm/styles.tsx +8 -0
  30. package/src/components/VerifyPhone/styles.tsx +1 -2
  31. package/src/components/shared/OBottomPopup.tsx +6 -2
  32. package/src/components/shared/OModal.tsx +1 -1
  33. package/src/hooks/useCountdownTimer.tsx +26 -0
  34. package/src/index.tsx +2 -0
  35. package/src/navigators/CheckoutNavigator.tsx +6 -0
  36. package/src/navigators/HomeNavigator.tsx +12 -0
  37. package/src/pages/BusinessesListing.tsx +7 -6
  38. package/src/pages/MultiCheckout.tsx +31 -0
  39. package/src/pages/MultiOrdersDetails.tsx +27 -0
  40. package/src/pages/OrderDetails.tsx +1 -1
  41. package/src/pages/ReviewDriver.tsx +2 -2
  42. package/src/pages/ReviewOrder.tsx +2 -2
  43. package/src/pages/Sessions.tsx +22 -0
  44. package/src/theme.json +0 -1
  45. package/src/types/index.tsx +18 -11
  46. package/src/utils/index.tsx +68 -2
  47. package/themes/business/index.tsx +4 -0
  48. package/themes/business/src/components/AcceptOrRejectOrder/index.tsx +103 -15
  49. package/themes/business/src/components/AcceptOrRejectOrder/styles.tsx +6 -0
  50. package/themes/business/src/components/Chat/index.tsx +51 -91
  51. package/themes/business/src/components/DriverMap/index.tsx +6 -5
  52. package/themes/business/src/components/DriverSchedule/index.tsx +71 -0
  53. package/themes/business/src/components/DriverSchedule/styles.tsx +6 -0
  54. package/themes/business/src/components/LoginForm/index.tsx +89 -2
  55. package/themes/business/src/components/LoginForm/styles.tsx +6 -0
  56. package/themes/business/src/components/LogoutButton/index.tsx +1 -1
  57. package/themes/business/src/components/NewOrderNotification/index.tsx +26 -13
  58. package/themes/business/src/components/OrderDetails/Business.tsx +2 -2
  59. package/themes/business/src/components/OrderDetails/Delivery.tsx +28 -11
  60. package/themes/business/src/components/OrderDetails/OrderContentComponent.tsx +14 -7
  61. package/themes/business/src/components/OrderDetails/OrderHeaderComponent.tsx +6 -0
  62. package/themes/business/src/components/OrdersListManager/index.tsx +11 -4
  63. package/themes/business/src/components/OrdersOption/index.tsx +16 -4
  64. package/themes/business/src/components/PreviousOrders/index.tsx +7 -7
  65. package/themes/business/src/components/ProductItemAccordion/index.tsx +2 -2
  66. package/themes/business/src/components/ScheduleBlocked/index.tsx +53 -0
  67. package/themes/business/src/components/UserFormDetails/index.tsx +5 -2
  68. package/themes/business/src/components/UserProfileForm/index.tsx +28 -4
  69. package/themes/business/src/components/shared/OModal.tsx +41 -38
  70. package/themes/business/src/types/index.tsx +14 -7
  71. package/themes/doordash/src/components/BusinessesListing/index.tsx +1 -1
  72. package/themes/doordash/src/components/LoginForm/index.tsx +1 -2
  73. package/themes/instacart/src/components/BusinessesListing/index.tsx +1 -1
  74. package/themes/kiosk/src/components/BusinessMenu/index.tsx +39 -28
  75. package/themes/kiosk/src/components/BusinessesListing/index.tsx +2 -3
  76. package/themes/kiosk/src/components/Cart/index.tsx +11 -12
  77. package/themes/kiosk/src/components/CartBottomSheet/index.tsx +9 -2
  78. package/themes/kiosk/src/components/CartContent/index.tsx +0 -11
  79. package/themes/kiosk/src/components/CartItem/index.tsx +4 -3
  80. package/themes/kiosk/src/components/CategoriesMenu/index.tsx +107 -62
  81. package/themes/kiosk/src/components/Checkout/index.tsx +40 -22
  82. package/themes/kiosk/src/components/CustomerName/index.tsx +0 -6
  83. package/themes/kiosk/src/components/DrawerView/index.tsx +1 -0
  84. package/themes/kiosk/src/components/DrawerView/styles.tsx +2 -2
  85. package/themes/kiosk/src/components/NavBar/index.tsx +29 -20
  86. package/themes/kiosk/src/components/OptionCard/index.tsx +1 -1
  87. package/themes/kiosk/src/components/OrderDetails/index.tsx +32 -27
  88. package/themes/kiosk/src/components/OrderTypeCardSelector/index.tsx +9 -11
  89. package/themes/kiosk/src/components/PaymentOptions/index.tsx +56 -54
  90. package/themes/kiosk/src/components/ProductForm/index.tsx +7 -8
  91. package/themes/kiosk/src/components/ProductItemAccordion/index.tsx +2 -2
  92. package/themes/kiosk/src/components/ProductOption/index.tsx +1 -1
  93. package/themes/kiosk/src/components/ProductOptionSubOption/index.tsx +3 -1
  94. package/themes/kiosk/src/components/UpsellingProducts/index.tsx +16 -5
  95. package/themes/kiosk/src/components/shared/OButton.tsx +5 -18
  96. package/themes/kiosk/src/types/index.d.ts +1 -0
  97. package/themes/original/index.tsx +24 -0
  98. package/themes/original/src/components/ActiveOrders/index.tsx +15 -132
  99. package/themes/original/src/components/ActiveOrders/styles.tsx +0 -54
  100. package/themes/original/src/components/AddressForm/index.tsx +7 -6
  101. package/themes/original/src/components/AddressList/index.tsx +30 -18
  102. package/themes/original/src/components/AppleLogin/index.tsx +6 -8
  103. package/themes/original/src/components/BusinessBasicInformation/index.tsx +304 -158
  104. package/themes/original/src/components/BusinessBasicInformation/styles.tsx +6 -2
  105. package/themes/original/src/components/BusinessController/index.tsx +201 -96
  106. package/themes/original/src/components/BusinessController/styles.tsx +5 -0
  107. package/themes/original/src/components/BusinessItemAccordion/index.tsx +8 -5
  108. package/themes/original/src/components/BusinessItemAccordion/styles.tsx +3 -1
  109. package/themes/original/src/components/BusinessListingSearch/index.tsx +231 -63
  110. package/themes/original/src/components/BusinessListingSearch/styles.tsx +22 -2
  111. package/themes/original/src/components/BusinessPreorder/index.tsx +1 -1
  112. package/themes/original/src/components/BusinessProductsCategories/index.tsx +2 -2
  113. package/themes/original/src/components/BusinessProductsList/CategoryDescription/index.tsx +44 -0
  114. package/themes/original/src/components/BusinessProductsList/index.tsx +70 -52
  115. package/themes/original/src/components/BusinessProductsList/styles.tsx +0 -3
  116. package/themes/original/src/components/BusinessProductsListing/index.tsx +342 -154
  117. package/themes/original/src/components/BusinessProductsListing/styles.tsx +33 -0
  118. package/themes/original/src/components/BusinessReviews/index.tsx +6 -1
  119. package/themes/original/src/components/BusinessTypeFilter/index.tsx +106 -39
  120. package/themes/original/src/components/BusinessTypeFilter/styles.tsx +2 -0
  121. package/themes/original/src/components/BusinessesListing/Layout/Appointment/index.tsx +560 -0
  122. package/themes/original/src/components/BusinessesListing/{styles.tsx → Layout/Appointment/styles.tsx} +24 -2
  123. package/themes/original/src/components/BusinessesListing/Layout/Original/index.tsx +671 -0
  124. package/themes/original/src/components/BusinessesListing/Layout/Original/styles.tsx +137 -0
  125. package/themes/original/src/components/BusinessesListing/index.tsx +104 -458
  126. package/themes/original/src/components/Cart/index.tsx +93 -43
  127. package/themes/original/src/components/Cart/styles.tsx +4 -0
  128. package/themes/original/src/components/Checkout/index.tsx +90 -39
  129. package/themes/original/src/components/DriverTips/index.tsx +17 -12
  130. package/themes/original/src/components/Favorite/index.tsx +92 -0
  131. package/themes/original/src/components/Favorite/styles.tsx +22 -0
  132. package/themes/original/src/components/FavoriteList/index.tsx +298 -0
  133. package/themes/original/src/components/FavoriteList/styles.tsx +5 -0
  134. package/themes/original/src/components/ForgotPasswordForm/index.tsx +84 -4
  135. package/themes/original/src/components/GPSButton/index.tsx +15 -8
  136. package/themes/original/src/components/GoogleMap/index.tsx +11 -11
  137. package/themes/original/src/components/Help/index.tsx +21 -4
  138. package/themes/original/src/components/HighestRatedBusinesses/index.tsx +18 -1
  139. package/themes/original/src/components/LastOrders/index.tsx +12 -1
  140. package/themes/original/src/components/LoginForm/Otp/index.tsx +91 -0
  141. package/themes/original/src/components/LoginForm/Otp/styles.tsx +7 -0
  142. package/themes/original/src/components/LoginForm/index.tsx +332 -164
  143. package/themes/original/src/components/LoginForm/styles.tsx +1 -3
  144. package/themes/original/src/components/MessageListing/index.tsx +10 -1
  145. package/themes/original/src/components/Messages/index.tsx +1 -1
  146. package/themes/original/src/components/MomentSelector/index.tsx +197 -0
  147. package/themes/original/src/components/MomentSelector/styles.tsx +6 -0
  148. package/themes/original/src/components/MultiCartsPaymethodsAndWallets/index.tsx +243 -0
  149. package/themes/original/src/components/MultiCartsPaymethodsAndWallets/styles.tsx +46 -0
  150. package/themes/original/src/components/MultiCheckout/index.tsx +298 -0
  151. package/themes/original/src/components/MultiCheckout/styles.tsx +59 -0
  152. package/themes/original/src/components/MultiOrdersDetails/SingleOrderCard.tsx +372 -0
  153. package/themes/original/src/components/MultiOrdersDetails/index.tsx +258 -0
  154. package/themes/original/src/components/MultiOrdersDetails/styles.tsx +50 -0
  155. package/themes/original/src/components/MyOrders/index.tsx +120 -32
  156. package/themes/original/src/components/MyOrders/styles.tsx +8 -1
  157. package/themes/original/src/components/NavBar/index.tsx +4 -4
  158. package/themes/original/src/components/OrderDetails/OrderHistory.tsx +167 -0
  159. package/themes/original/src/components/OrderDetails/index.tsx +148 -63
  160. package/themes/original/src/components/OrderDetails/styles.tsx +1 -2
  161. package/themes/original/src/components/OrderItAgain/index.tsx +72 -0
  162. package/themes/original/src/components/OrderItAgain/styles.tsx +10 -0
  163. package/themes/original/src/components/OrderSummary/index.tsx +6 -6
  164. package/themes/original/src/components/OrderTypeSelector/index.tsx +79 -35
  165. package/themes/original/src/components/OrderTypeSelector/styles.tsx +19 -1
  166. package/themes/original/src/components/OrdersOption/PreviousBusinessOrdered/index.tsx +153 -0
  167. package/themes/original/src/components/OrdersOption/PreviousBusinessOrdered/styles.tsx +6 -0
  168. package/themes/original/src/components/OrdersOption/PreviousProductsOrdered/index.tsx +53 -0
  169. package/themes/original/src/components/OrdersOption/PreviousProductsOrdered/styles.tsx +6 -0
  170. package/themes/original/src/components/OrdersOption/index.tsx +137 -38
  171. package/themes/original/src/components/OrdersOption/styles.tsx +4 -1
  172. package/themes/original/src/components/PaymentOptionCash/index.tsx +2 -2
  173. package/themes/original/src/components/PaymentOptionWallet/index.tsx +17 -23
  174. package/themes/original/src/components/PaymentOptionWallet/styles.tsx +1 -1
  175. package/themes/original/src/components/PaymentOptions/index.tsx +58 -37
  176. package/themes/original/src/components/PhoneInputNumber/index.tsx +5 -11
  177. package/themes/original/src/components/PreviousOrders/index.tsx +18 -147
  178. package/themes/original/src/components/ProductForm/index.tsx +718 -679
  179. package/themes/original/src/components/ProductForm/styles.tsx +9 -7
  180. package/themes/original/src/components/ProductItemAccordion/index.tsx +2 -2
  181. package/themes/original/src/components/ProductOption/index.tsx +1 -1
  182. package/themes/original/src/components/ProductOptionSubOption/index.tsx +18 -12
  183. package/themes/original/src/components/ProfessionalFilter/index.tsx +128 -0
  184. package/themes/original/src/components/ProfessionalFilter/styles.tsx +0 -0
  185. package/themes/original/src/components/ProfessionalProfile/index.tsx +298 -0
  186. package/themes/original/src/components/ProfessionalProfile/styles.tsx +46 -0
  187. package/themes/original/src/components/Promotions/index.tsx +151 -133
  188. package/themes/original/src/components/Promotions/styles.tsx +2 -1
  189. package/themes/original/src/components/ReviewDriver/index.tsx +6 -6
  190. package/themes/original/src/components/ReviewOrder/index.tsx +1 -1
  191. package/themes/original/src/components/ReviewTrigger/index.tsx +118 -0
  192. package/themes/original/src/components/ReviewTrigger/styles.tsx +34 -0
  193. package/themes/original/src/components/SearchBar/index.tsx +13 -5
  194. package/themes/original/src/components/ServiceForm/index.tsx +579 -0
  195. package/themes/original/src/components/ServiceForm/styles.tsx +50 -0
  196. package/themes/original/src/components/Sessions/index.tsx +160 -0
  197. package/themes/original/src/components/Sessions/styles.tsx +15 -0
  198. package/themes/original/src/components/SignupForm/index.tsx +237 -126
  199. package/themes/original/src/components/SingleOrderCard/index.tsx +316 -0
  200. package/themes/original/src/components/SingleOrderCard/styles.tsx +54 -0
  201. package/themes/original/src/components/SingleProductCard/index.tsx +214 -90
  202. package/themes/original/src/components/SingleProductCard/styles.tsx +2 -2
  203. package/themes/original/src/components/StripeElementsForm/index.tsx +16 -8
  204. package/themes/original/src/components/StripeElementsForm/naked.tsx +2 -2
  205. package/themes/original/src/components/UpsellingProducts/index.tsx +86 -74
  206. package/themes/original/src/components/UserDetails/index.tsx +32 -18
  207. package/themes/original/src/components/UserFormDetails/index.tsx +102 -66
  208. package/themes/original/src/components/UserProfile/index.tsx +10 -1
  209. package/themes/original/src/components/UserProfileForm/index.tsx +32 -25
  210. package/themes/original/src/components/UserVerification/index.tsx +178 -192
  211. package/themes/original/src/components/Wallets/index.tsx +25 -12
  212. package/themes/original/src/components/shared/OBottomPopup.tsx +44 -13
  213. package/themes/original/src/components/shared/OButton.tsx +2 -0
  214. package/themes/original/src/components/shared/OInput.tsx +3 -2
  215. package/themes/original/src/components/shared/OModal.tsx +4 -2
  216. package/themes/original/src/layouts/FloatingBottomContainer.tsx +5 -1
  217. package/themes/original/src/types/index.tsx +203 -35
  218. package/themes/original/src/utils/index.tsx +94 -1
  219. package/themes/single-business/src/components/OrderTypeSelector/index.tsx +1 -1
  220. package/themes/uber-eats/src/components/BusinessesListing/index.tsx +1 -1
@@ -56,7 +56,7 @@ const Wrapper = styled.Pressable`
56
56
  const OInput = (props: Props): React.ReactElement => {
57
57
  return (
58
58
  <Wrapper
59
- onPress={() => {props.forwardRef?.current?.focus?.(); props.onPress && props.onPress()}}
59
+ onPress={() => { props.forwardRef?.current?.focus?.(); props.onPress && props.onPress() }}
60
60
  style={{
61
61
  backgroundColor: props.bgColor,
62
62
  borderColor: props.borderColor,
@@ -75,6 +75,7 @@ const OInput = (props: Props): React.ReactElement => {
75
75
  <MaterialIcon name={props?.vertorIcon} size={20} color={props?.vectorIconColor} style={{ marginHorizontal: 10 }} />
76
76
  )}
77
77
  <Input
78
+ autoFocus={props?.autoFocus}
78
79
  name={props.name}
79
80
  secureTextEntry={props.isSecured}
80
81
  onChangeText={(txt: any) => props.name ? props.onChange({ target: { name: props.name, value: txt } }) : props.onChange(txt)}
@@ -90,7 +91,7 @@ const OInput = (props: Props): React.ReactElement => {
90
91
  returnKeyType={props.returnKeyType}
91
92
  onSubmitEditing={props.onSubmitEditing}
92
93
  blurOnSubmit={props.blurOnSubmit}
93
- ref={(e : any) => {
94
+ ref={(e: any) => {
94
95
  props.forwardRef && (props.forwardRef.current = e)
95
96
  }}
96
97
  style={props?.inputStyle}
@@ -21,6 +21,7 @@ interface Props {
21
21
  isNotDecoration?: boolean;
22
22
  styleCloseButton?: any,
23
23
  isAvoidKeyBoardView?: boolean;
24
+ styleContainerCloseButton?: any;
24
25
  }
25
26
  const KeyboardView = styled.KeyboardAvoidingView`
26
27
  flex-grow: 1;
@@ -45,6 +46,7 @@ const OModal = (props: Props): React.ReactElement => {
45
46
  isNotDecoration,
46
47
  style,
47
48
  styleCloseButton,
49
+ styleContainerCloseButton,
48
50
  isAvoidKeyBoardView
49
51
  } = props
50
52
 
@@ -55,7 +57,7 @@ const OModal = (props: Props): React.ReactElement => {
55
57
  {!entireModal ? (
56
58
  <View style={styles.centeredView}>
57
59
  <View style={titleSectionStyle ? titleSectionStyle : styles.titleSection}>
58
- <TouchableOpacity style={styles.wrapperIcon} onPress={onClose}>
60
+ <TouchableOpacity style={{...styles.wrapperIcon, ...styleContainerCloseButton}} onPress={onClose}>
59
61
  <OIcon
60
62
  src={theme.images.general.close}
61
63
  width={16}
@@ -91,7 +93,7 @@ const OModal = (props: Props): React.ReactElement => {
91
93
  animationType="slide"
92
94
  transparent={isTransparent}
93
95
  visible={open}
94
- onRequestClose={() => onClose()}
96
+ onRequestClose={() => onClose && onClose()}
95
97
  style={{ height: '100%', flex: 1, position: 'absolute', ...style, zIndex: 9999 }}
96
98
  >
97
99
  {isAvoidKeyBoardView ? (
@@ -19,7 +19,11 @@ export const Container = styled.View`
19
19
 
20
20
  export const FloatingBottomContainer = (props: any) => {
21
21
  return (
22
- <Container style={{ width: windowWidth }}>
22
+ <Container style={{
23
+ width: windowWidth,
24
+ borderTopWidth: props?.borderTopWidth ?? 1,
25
+ borderRadius: props?.borderRadius ?? 0
26
+ }}>
23
27
  {props.children}
24
28
  </Container>
25
29
  )
@@ -18,7 +18,13 @@ export interface LoginParams {
18
18
  handleCheckPhoneCode?: any;
19
19
  notificationState?: any;
20
20
  handleReCaptcha?: any;
21
- enableReCaptcha?: any;
21
+ enableReCaptcha?: any;
22
+ otpType?: string,
23
+ setOtpType: (type: string) => void,
24
+ generateOtpCode: (values?: any) => void,
25
+ useLoginOtpEmail?: boolean,
26
+ useLoginOtpCellphone?: boolean,
27
+ useLoginOtp?: boolean
22
28
  }
23
29
  export interface ProfileParams {
24
30
  navigation?: any;
@@ -59,6 +65,7 @@ export interface AddressListParams {
59
65
  isFromProductsList?: boolean;
60
66
  afterSignup?: boolean;
61
67
  isFromCheckout?: boolean
68
+ loadAddresses: () => void
62
69
  }
63
70
 
64
71
  export interface AddressFormParams {
@@ -103,9 +110,20 @@ export interface SignupParams {
103
110
  handleSendVerifyCode?: any;
104
111
  handleCheckPhoneCode?: any;
105
112
  notificationState?: any;
113
+ signUpTab?: string;
114
+ useSignUpFullDetails?: boolean;
115
+ useSignUpOtpEmail?: boolean;
116
+ useSignUpOtpCellphone?: boolean;
117
+ willVerifyOtpState?: boolean;
118
+ numOtpInputs?: number;
106
119
  handleChangePromotions: () => void;
120
+ handleChangeInput?: (in1: any, in2: any) => void;
107
121
  enableReCaptcha?: boolean;
108
- handleReCaptcha?: () => void;
122
+ generateOtpCode?: (in1?: any) => void;
123
+ handleReCaptcha?: (token?: any) => void;
124
+ setSignUpTab?: (in1: string) => void;
125
+ setWillVerifyOtpState?: (in1: boolean) => void;
126
+ setOtpState?: (in1: string) => void;
109
127
  }
110
128
 
111
129
  export interface PhoneInputParams {
@@ -146,13 +164,22 @@ export interface BusinessesListingParams {
146
164
  defaultBusinessType?: any;
147
165
  franchiseId?: any;
148
166
  businessId?: any;
167
+ isGuestUser?: any;
168
+ handleUpdateBusinessList?: any;
169
+ priceLevelSelected?: any;
170
+ handleChangePriceLevel?: any;
171
+ businessTypeSelected?: any;
172
+ logosLayout?: boolean;
149
173
  }
150
174
  export interface HighestRatedBusinessesParams {
151
175
  businessesList: { businesses: Array<any>, loading: boolean, error: null | string };
152
176
  onBusinessClick?: void;
153
177
  navigation?: any;
154
178
  isLoading?: boolean;
155
- getBusinesses: (newFetch: boolean) => void
179
+ getBusinesses: (newFetch: boolean) => void,
180
+ favoriteIds?: any,
181
+ setFavoriteIds?: any,
182
+ handleUpdateBusinessList?: any
156
183
  }
157
184
  export interface BusinessTypeFilterParams {
158
185
  businessTypes?: Array<any>;
@@ -161,10 +188,11 @@ export interface BusinessTypeFilterParams {
161
188
  defaultBusinessType?: string | null;
162
189
  images?: any
163
190
  typesState?: any
164
- setBusinessTypes?: any
191
+ setBusinessTypes?: any,
192
+ isAppoint?: boolean | undefined
165
193
  }
166
194
  export interface BusinessControllerParams {
167
- key?: number;
195
+ key?: string | number;
168
196
  business?: any;
169
197
  handleCustomClick?: any;
170
198
  orderType?: any;
@@ -181,7 +209,12 @@ export interface BusinessControllerParams {
181
209
  businessDeliveryPrice?: number,
182
210
  businessDeliveryTime?: string,
183
211
  businessPickupTime?: string,
184
- businessDistance?: number
212
+ businessDistance?: number,
213
+ favoriteIds?: number[],
214
+ handleFavoriteBusiness?: any,
215
+ setFavoriteIds?: any;
216
+ handleUpdateBusinessList?: any;
217
+ enableIntersection?: boolean;
185
218
  }
186
219
  export interface BusinessProductsListingParams {
187
220
  navigation?: any;
@@ -197,10 +230,16 @@ export interface BusinessProductsListingParams {
197
230
  header?: any;
198
231
  logo?: any;
199
232
  productModal?: any;
233
+ alertState?: { open: boolean, content: any[] };
234
+ setAlertState?: any;
235
+ multiRemoveProducts?: (in1: any, in2: any) => {};
200
236
  getNextProducts?: () => {};
201
237
  handleChangeCategory: (value: any) => {};
202
238
  setProductLogin?: () => {};
203
239
  updateProductModal?: (value: any) => {};
240
+ handleUpdateProducts?: any;
241
+ professionalSelected?: any;
242
+ handleChangeProfessionalSelected?: any;
204
243
  }
205
244
  export interface BusinessBasicInformationParams {
206
245
  navigation?: any;
@@ -245,17 +284,27 @@ export interface BusinessProductsListParams {
245
284
  setCategoriesLayout?: any,
246
285
  currentCart?: any,
247
286
  setSubcategoriesSelected?: any,
248
- subcategoriesSelected?: any,
249
- onClickCategory?: any,
250
- lazyLoadProductsRecommended?: boolean
287
+ subcategoriesSelected?: any,
288
+ onClickCategory?: any,
289
+ lazyLoadProductsRecommended?: boolean,
290
+ isFiltMode?: boolean,
291
+ handleUpdateProducts?: any,
292
+ navigation?: any;
293
+ previouslyProducts?: any;
251
294
  }
252
295
  export interface SingleProductCardParams {
253
- businessId: any,
296
+ businessId: any;
254
297
  product: any;
255
298
  isSoldOut: boolean;
256
299
  onProductClick: any;
257
300
  productAddedToCartLength: number;
258
- style?: ViewStyle
301
+ style?: ViewStyle;
302
+ categoryState?: any;
303
+ handleFavoriteProduct?: any;
304
+ handleUpdateProducts?: any;
305
+ enableIntersection?: boolean;
306
+ navigation?: any;
307
+ isPreviously?: any;
259
308
  }
260
309
  export interface BusinessInformationParams {
261
310
  navigation?: any,
@@ -289,6 +338,7 @@ export interface OrdersOptionParams {
289
338
  orderList?: any,
290
339
  franchiseId?: any,
291
340
  activeOrders?: boolean,
341
+ pastOrders?: boolean,
292
342
  pagination?: any,
293
343
  titleContent?: string,
294
344
  customArray?: Array<any>,
@@ -299,11 +349,23 @@ export interface OrdersOptionParams {
299
349
  loadOrders?: any,
300
350
  setOrderList?: any,
301
351
  preOrders?: boolean,
352
+ reorderState?: any,
353
+ handleReorder?: (orderId: number) => {},
302
354
  setOrdersLength?: ({ activeOrdersLength, previousOrdersLength }: { activeOrdersLength: number, previousOrdersLength: number }) => void,
303
355
  ordersLength: { activeOrdersLength: number, previousOrdersLength: number },
304
356
  setSelectedOrderId?: any,
305
357
  setOpenMessges?: any,
306
- loadMoreStatus?: boolean
358
+ loadMoreStatus?: boolean,
359
+ refreshOrders?: boolean,
360
+ setRefreshOrders?: (value: boolean) => void,
361
+ handleUpdateOrderList?: (orderId: number, changes: any) => {},
362
+ isBusiness?: boolean,
363
+ isProducts?: boolean,
364
+ businessOrderIds?: any,
365
+ products?: any,
366
+ businessesSearchList?: any,
367
+ hideOrders?: boolean,
368
+ BusinessControllerSkeletons?: any,
307
369
  }
308
370
  export interface ActiveOrdersParams {
309
371
  orders?: any,
@@ -316,7 +378,8 @@ export interface ActiveOrdersParams {
316
378
  loadMoreOrders?: () => {},
317
379
  onNavigationRedirect?: (route: string, params?: any) => {},
318
380
  isMessageView?: boolean,
319
- handleClickOrder?: any
381
+ handleClickOrder?: any,
382
+ handleUpdateOrderList?: (orderId: number, changes: any) => {}
320
383
  }
321
384
  export interface PreviousOrdersParams {
322
385
  orders?: any,
@@ -325,8 +388,9 @@ export interface PreviousOrdersParams {
325
388
  orderID?: number
326
389
  reorderLoading?: boolean,
327
390
  loadMoreOrders?: () => {},
328
- handleReorder: (order: any) => {},
391
+ handleReorder?: (orderId: number) => {},
329
392
  onNavigationRedirect?: (route: string, params?: any) => {}
393
+ handleUpdateOrderList?: (orderId: number, changes: any) => {}
330
394
  }
331
395
  export interface OrderDetailsParams {
332
396
  navigation?: any,
@@ -358,25 +422,26 @@ export interface ProductItemAccordionParams {
358
422
  isFromCheckout?: any
359
423
  }
360
424
  export interface ReviewOrderParams {
361
- order?: { id: number, businessId: number, logo: string, driver: any, products: Array<any>, review: any, user_review: any },
362
- stars?: any,
363
- handleChangeInput?: any,
364
- handleChangeRating?: any,
365
- handleSendReview?: any,
366
- formState?: any,
367
- navigation?: any,
368
- setIsReviewed?: (isReviewed: boolean) => {},
369
- handleReviewState?: any,
370
- setStars?: any,
371
- onNavigationRedirect?: any
425
+ order?: { id: number, business_id: number, logo: string, driver: any, products: Array<any>, review: any, user_review: any };
426
+ stars?: any;
427
+ defaultStar?: number;
428
+ handleChangeInput?: any;
429
+ handleChangeRating?: any;
430
+ handleSendReview?: any;
431
+ formState?: any;
432
+ navigation?: any;
433
+ setIsReviewed?: (isReviewed: boolean) => void;
434
+ handleReviewState?: any;
435
+ setStars?: any;
436
+ onNavigationRedirect?: any;
372
437
  }
373
438
  export interface ReviewProductParams {
374
439
  navigation?: any,
375
440
  onNavigationRedirect?: any,
376
- order?: { orderId: number, businessId: number, logo: string, driver: any, products: Array<any>, review: any, user_review: any },
441
+ order?: { orderId: number, business_id: number, logo: string, driver: any, products: Array<any>, review: any, user_review: any },
377
442
  formState?: any,
378
443
  handleChangeFormState?: any,
379
- handleSendProductReview?: any
444
+ handleSendProductReview?: any;
380
445
  }
381
446
  export interface SingleProductReviewParams {
382
447
  product: any,
@@ -386,12 +451,12 @@ export interface SingleProductReviewParams {
386
451
  export interface ReviewDriverParams {
387
452
  navigation?: any,
388
453
  onNavigationRedirect?: any,
389
- order?: { orderId: number, businessId: number, logo: string, driver: any, products: Array<any>, review: any, user_review: any },
454
+ order?: { orderId: number, business_id: number, logo: string, driver: any, products: Array<any>, review: any, user_review: any },
390
455
  formState?: any,
391
456
  setIsDriverReviewed?: (isReviewed: boolean) => {},
392
457
  dirverReviews?: any,
393
458
  setDriverReviews?: any,
394
- handleSendDriverReview?: any
459
+ handleSendDriverReview?: any;
395
460
  }
396
461
  export interface MessagesParams {
397
462
  type?: string,
@@ -489,6 +554,9 @@ export interface OrderTypeSelectParams {
489
554
  defaultValue?: number;
490
555
  configTypes?: Array<any>;
491
556
  orderTypes: Array<any>;
557
+ setOrderTypeValue?: (value: number) => any,
558
+ isChewLayout?: boolean;
559
+ chewOrderTypes?: any;
492
560
  }
493
561
  export interface UpsellingProductsParams {
494
562
  isCustomMode?: boolean;
@@ -562,7 +630,11 @@ export interface BusinessSearchParams {
562
630
  filters: any,
563
631
  businessTypes: Array<number>,
564
632
  setFilters: (filters: any) => void,
565
- lazySearch?: boolean
633
+ lazySearch?: boolean,
634
+ brandList?: any;
635
+ onNavigationRedirect?: any,
636
+ handleUpdateProducts: any,
637
+ handleUpdateBusinessList?: any;
566
638
  }
567
639
 
568
640
  export interface NoNetworkParams {
@@ -580,9 +652,105 @@ export interface PlaceSpotParams {
580
652
 
581
653
  export interface PromotionParams {
582
654
  navigation: any,
583
- offersState: any,
584
- handleSearchValue: any,
585
- searchValue: string,
586
- offerSelected: any,
587
- setOfferSelected: any,
655
+ offersState: any,
656
+ handleSearchValue: any,
657
+ searchValue: string,
658
+ offerSelected: any,
659
+ setOfferSelected: any,
660
+ loadOffers: any
661
+ }
662
+ export interface SessionsParams {
663
+ navigation: any,
664
+ sessionsList: any,
665
+ actionState: any,
666
+ handleDeleteSession: any,
667
+ handleDeleteAllSessions: any
668
+ }
669
+
670
+ export interface otpParams {
671
+ willVerifyOtpState: boolean,
672
+ setWillVerifyOtpState: (val: boolean) => void,
673
+ onSubmit: () => void,
674
+ handleLoginOtp: (code: string) => void,
675
+ setAlertState: any;
676
+ pinCount: number;
677
+ }
678
+
679
+ export interface FavoriteParams {
680
+ favoriteList: any,
681
+ handleUpdateFavoriteList: (id: number, changes: any) => {},
682
+ pagination: any,
683
+ getFavoriteList: (value: number) => {},
684
+ navigation?: any,
685
+ onNavigationRedirect?: (route: string, params?: any) => {},
686
+ reorderState?: any,
687
+ handleReorder?: (orderId: number) => {},
688
+ isOrder?: boolean,
689
+ isProduct?: boolean,
690
+ isBusiness?: boolean
691
+ }
692
+
693
+ export interface SingleOrderCardParams {
694
+ order: any,
695
+ reorderLoading: any,
696
+ handleReorder?: (value: any) => {},
697
+ getOrderStatus: any,
698
+ handleFavoriteOrder?: (value: boolean) => {},
699
+ onNavigationRedirect?: (route: string, params?: any) => {},
700
+ pastOrders: any,
701
+ isMessageView?: any,
702
+ handleClickOrder: (value: any) => {},
703
+ handleRemoveCart: () => {},
704
+ cartState: any
705
+ }
706
+
707
+ export interface PreviousBusinessOrderedParams {
708
+ navigation?: any,
709
+ businessesList?: any,
710
+ setBusinessLoading?: any,
711
+ businessId?: number,
712
+ onNavigationRedirect?: any,
713
+ isBusinessesSearchList?: any,
714
+ businessLoading?: boolean
715
+ }
716
+
717
+ export interface ServiceFormParams {
718
+ navigation?: any,
719
+ professionalSelected: any,
720
+ product: any,
721
+ handleSave: (value?: any) => {}
722
+ productCart?: any
723
+ isSoldOut: boolean,
724
+ maxProductQuantity: any,
725
+ businessSlug?: string,
726
+ onClose: any,
727
+ professionalList: any
728
+ }
729
+
730
+ export interface ProfessionalFilterParams {
731
+ professionals?: any,
732
+ professionalSelected?: any,
733
+ handleChangeProfessionalSelected: any
734
+ }
735
+
736
+ export interface ProfessionalProfileParams {
737
+ professional: any,
738
+ handleChangeProfessionalSelected: any,
739
+ onClose: any
740
+ }
741
+
742
+ export interface OrderItAgainParams {
743
+ onProductClick: any,
744
+ productList: any,
745
+ businessId: any,
746
+ categoryState: any,
747
+ currentCart: any,
748
+ handleUpdateProducts: any,
749
+ navigation: any
750
+ }
751
+
752
+ export interface PreviousProductsOrderedParams {
753
+ products?: any,
754
+ onProductClick?: any,
755
+ isBusinessesSearchList?: boolean
588
756
  }
@@ -40,6 +40,72 @@ export const getTraduction = (key: string) => {
40
40
  return keyList[key] ? t(key, keyList[key]) : t(key)
41
41
  }
42
42
 
43
+ /**
44
+ * Change local moment variables
45
+ */
46
+ export const setLocalMoment = (moment : any, t : any) => {
47
+ moment.locale('custom', {
48
+ months: [
49
+ t('MONTH1','January'),
50
+ t('MONTH2','February'),
51
+ t('MONTH3','March'),
52
+ t('MONTH4','April'),
53
+ t('MONTH5','May'),
54
+ t('MONTH6','June'),
55
+ t('MONTH7','July'),
56
+ t('MONTH8','August'),
57
+ t('MONTH9','September'),
58
+ t('MONTH10','October'),
59
+ t('MONTH11','November'),
60
+ t('MONTH12','December')
61
+ ],
62
+ monthsShort: [
63
+ t('MONTHSHORT1','Jan'),
64
+ t('MONTHSHORT2','Feb'),
65
+ t('MONTHSHORT3','Mar'),
66
+ t('MONTHSHORT4','Apr'),
67
+ t('MONTHSHORT5','May'),
68
+ t('MONTHSHORT6','Jun'),
69
+ t('MONTHSHORT7','Jul'),
70
+ t('MONTHSHORT8','Aug'),
71
+ t('MONTHSHORT9','Sep'),
72
+ t('MONTHSHORT10','Oct'),
73
+ t('MONTHSHORT11','Nov'),
74
+ t('MONTHSHORT12','Dec')
75
+ ],
76
+ weekdays: [
77
+ t('DAY7','Sunday'),
78
+ t('DAY1','Monday'),
79
+ t('DAY2','Tuesday'),
80
+ t('DAY3','Wednesday'),
81
+ t('DAY4','Thursday'),
82
+ t('DAY5','Friday'),
83
+ t('DAY6','Saturday')
84
+ ],
85
+ weekdaysShort: [
86
+ t('DAYSHORT7','Sun'),
87
+ t('DAYSHORT1','Mon'),
88
+ t('DAYSHORT2','Tue'),
89
+ t('DAYSHORT3','Wed'),
90
+ t('DAYSHORT4','Thu'),
91
+ t('DAYSHORT5','Fri'),
92
+ t('DAYSHORT6','Sat')
93
+ ],
94
+ weekdaysMin: [
95
+ t('DAYMIN7','Su'),
96
+ t('DAYMIN1','Mo'),
97
+ t('DAYMIN2','Tu'),
98
+ t('DAYMIN3','We'),
99
+ t('DAYMIN4','Th'),
100
+ t('DAYMIN5','Fr'),
101
+ t('DAYMIN6','Sa')
102
+ ],
103
+ meridiem : function (hours : any) {
104
+ return hours < 12 ? t('AM', 'AM') : t('PM','PM');
105
+ }
106
+ })
107
+ }
108
+
43
109
  /**
44
110
  * Function to convert delivery time in minutes
45
111
  * @param {string} time business delivery time
@@ -212,4 +278,31 @@ export const formatUrlVideo = (url : string) => {
212
278
  const match = url.match(regExp)
213
279
  const id = (match && match[7].length === 11) ? match[7] : false
214
280
  return `https://www.youtube-nocookie.com/embed/${id}`
215
- }
281
+ }
282
+
283
+ export const formatSeconds = (seconds : number) => {
284
+ // Hours, minutes and seconds
285
+ var hrs = ~~(seconds / 3600)
286
+ var mins = ~~((seconds % 3600) / 60)
287
+ var secs = ~~seconds % 60
288
+
289
+ // Output like '1:01' or '4:03:59' or '123:03:59'
290
+ var ret = ''
291
+ if (hrs > 0) {
292
+ ret += '' + hrs + ':' + (mins < 10 ? '0' : '')
293
+ }
294
+ ret += '' + mins + ':' + (secs < 10 ? '0' : '')
295
+ ret += '' + secs
296
+ return ret
297
+ }
298
+
299
+ /**
300
+ * List of price to filter businesses
301
+ */
302
+ export const priceList = [
303
+ { level: '1', content: '$' },
304
+ { level: '2', content: '$$' },
305
+ { level: '3', content: '$$$' },
306
+ { level: '4', content: '$$$$' },
307
+ { level: '5', content: '$$$$$' }
308
+ ]
@@ -58,7 +58,7 @@ const OrderTypeSelectorUI = (props: OrderTypeSelectParams) => {
58
58
  btnStyle={{ paddingLeft: 0 }}
59
59
  paddingTop={0}
60
60
  style={{ paddingBottom: 0 }}
61
- title={t('HOW_WILL_YOUR_ORDER_TYPE', 'How will your order type?')}
61
+ title={t('HOW_WILL_YOU_DELIVERY_TYPE', 'How will your order type?')}
62
62
  titleAlign={'center'}
63
63
  titleStyle={{ fontSize: 14 }}
64
64
  />
@@ -144,7 +144,7 @@ const BusinessesListingUI = (props: BusinessesListingParams) => {
144
144
  {isFarAway && (
145
145
  <FarAwayMessage style={styles.farAwayMsg}>
146
146
  <Ionicons name='md-warning-outline' style={styles.iconStyle} />
147
- <OText size={12} numberOfLines={1} ellipsizeMode={'tail'} color={theme.colors.textNormal}>{t('YOU_ARE_FAR_FROM_ADDRESS', 'You are far from this address')}</OText>
147
+ <OText size={12} numberOfLines={1} ellipsizeMode={'tail'} color={theme.colors.textNormal}>{t('YOU_ARE_FAR_FROM_ADDRESS', 'Your are far from this address')}</OText>
148
148
  </FarAwayMessage>
149
149
  )}
150
150
  <View style={styles.wrapperOrderOptions}>