ordering-ui-react-native 0.21.21 → 0.21.22-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 (239) hide show
  1. package/package.json +7 -6
  2. package/src/DeliveryApp.tsx +43 -1
  3. package/src/components/BusinessesListing/index.tsx +1 -1
  4. package/src/components/PaymentOptionsWebView/index.tsx +1 -0
  5. package/src/components/StripeMethodForm/index.tsx +4 -4
  6. package/src/components/VerifyPhone/styles.tsx +1 -2
  7. package/src/types/index.tsx +2 -1
  8. package/src/utils/index.tsx +2 -2
  9. package/themes/business/index.tsx +4 -0
  10. package/themes/business/src/components/AcceptOrRejectOrder/index.tsx +9 -2
  11. package/themes/business/src/components/BusinessController/index.tsx +19 -17
  12. package/themes/business/src/components/BusinessProductList/AccordionDropdown.tsx +63 -0
  13. package/themes/business/src/components/BusinessProductList/IterateCategories.tsx +108 -0
  14. package/themes/business/src/components/BusinessProductList/ProductList.tsx +196 -0
  15. package/themes/business/src/components/BusinessProductList/index.tsx +196 -0
  16. package/themes/business/src/components/BusinessProductList/styles.tsx +10 -0
  17. package/themes/business/src/components/Chat/index.tsx +23 -14
  18. package/themes/business/src/components/DriverMap/index.tsx +4 -3
  19. package/themes/business/src/components/FloatingButton/index.tsx +34 -31
  20. package/themes/business/src/components/Home/index.tsx +5 -1
  21. package/themes/business/src/components/LanguageSelector/index.tsx +4 -2
  22. package/themes/business/src/components/LanguageSelector/lang_country.json +515 -70
  23. package/themes/business/src/components/MapView/index.tsx +11 -7
  24. package/themes/business/src/components/MessagesOption/index.tsx +2 -1
  25. package/themes/business/src/components/NewOrderNotification/index.tsx +163 -113
  26. package/themes/business/src/components/OrderDetails/Business.tsx +50 -2
  27. package/themes/business/src/components/OrderDetails/Delivery.tsx +23 -11
  28. package/themes/business/src/components/OrderDetails/OrderContentComponent.tsx +60 -53
  29. package/themes/business/src/components/OrderDetails/OrderHeaderComponent.tsx +54 -23
  30. package/themes/business/src/components/OrderDetails/usePrinterCommands.tsx +220 -0
  31. package/themes/business/src/components/OrderDetailsLogistic/index.tsx +6 -1
  32. package/themes/business/src/components/OrderSummary/index.tsx +240 -76
  33. package/themes/business/src/components/OrdersListManager/index.tsx +7 -2
  34. package/themes/business/src/components/OrdersListManager/utils.tsx +1 -1
  35. package/themes/business/src/components/OrdersOption/index.tsx +125 -48
  36. package/themes/business/src/components/PhoneInputNumber/index.tsx +8 -5
  37. package/themes/business/src/components/PreviousOrders/OrderItem.tsx +33 -36
  38. package/themes/business/src/components/PreviousOrders/OrderList.tsx +18 -13
  39. package/themes/business/src/components/PreviousOrders/index.tsx +80 -66
  40. package/themes/business/src/components/PreviousOrders/styles.tsx +10 -0
  41. package/themes/business/src/components/PrinterSettings/index.tsx +279 -0
  42. package/themes/business/src/components/PrinterSettings/styles.tsx +17 -0
  43. package/themes/business/src/components/ProductItemAccordion/index.tsx +2 -2
  44. package/themes/business/src/components/ReviewCustomer/index.tsx +2 -0
  45. package/themes/business/src/components/SearchBar/index.tsx +2 -1
  46. package/themes/business/src/components/Sessions/index.tsx +187 -0
  47. package/themes/business/src/components/Sessions/styles.tsx +20 -0
  48. package/themes/business/src/components/StoresList/index.tsx +5 -3
  49. package/themes/business/src/components/UserFormDetails/index.tsx +111 -107
  50. package/themes/business/src/components/UserProfileForm/index.tsx +98 -44
  51. package/themes/business/src/components/WebsocketStatus/index.tsx +171 -0
  52. package/themes/business/src/components/WebsocketStatus/styles.tsx +28 -0
  53. package/themes/business/src/components/shared/OInput.tsx +2 -0
  54. package/themes/business/src/hooks/useLocation.tsx +5 -4
  55. package/themes/business/src/types/index.tsx +15 -2
  56. package/themes/business/src/utils/index.tsx +5 -0
  57. package/themes/doordash/src/components/BusinessesListing/index.tsx +1 -1
  58. package/themes/doordash/src/components/LoginForm/index.tsx +1 -2
  59. package/themes/instacart/src/components/BusinessesListing/index.tsx +1 -1
  60. package/themes/kiosk/src/components/Checkout/index.tsx +6 -0
  61. package/themes/kiosk/src/components/LoginForm/index.tsx +7 -4
  62. package/themes/kiosk/src/components/NavBar/index.tsx +14 -14
  63. package/themes/kiosk/src/components/OptionCard/index.tsx +1 -1
  64. package/themes/kiosk/src/components/OrderTypeCardSelector/index.tsx +8 -10
  65. package/themes/kiosk/src/components/shared/OButton.tsx +5 -18
  66. package/themes/original/index.tsx +9 -4
  67. package/themes/original/src/components/AddressDetails/index.tsx +20 -10
  68. package/themes/original/src/components/AddressForm/index.tsx +10 -6
  69. package/themes/original/src/components/AddressForm/styles.tsx +1 -1
  70. package/themes/original/src/components/AddressList/index.tsx +4 -7
  71. package/themes/original/src/components/AddressList/styles.tsx +4 -4
  72. package/themes/original/src/components/AnalyticsSegment/index.tsx +6 -6
  73. package/themes/original/src/components/AppleLogin/index.tsx +4 -4
  74. package/themes/original/src/components/BusinessBasicInformation/index.tsx +4 -4
  75. package/themes/original/src/components/BusinessBasicInformation/styles.tsx +1 -1
  76. package/themes/original/src/components/BusinessController/index.tsx +20 -12
  77. package/themes/original/src/components/BusinessController/styles.tsx +8 -7
  78. package/themes/original/src/components/BusinessInformation/styles.tsx +2 -2
  79. package/themes/original/src/components/BusinessItemAccordion/index.tsx +11 -7
  80. package/themes/original/src/components/BusinessListingSearch/BusinessSearchFooter.tsx +317 -0
  81. package/themes/original/src/components/BusinessListingSearch/BusinessSearchHeader.tsx +96 -0
  82. package/themes/original/src/components/BusinessListingSearch/MaxSectionItem/index.tsx +1 -1
  83. package/themes/original/src/components/BusinessListingSearch/index.tsx +56 -361
  84. package/themes/original/src/components/BusinessListingSearch/styles.tsx +1 -1
  85. package/themes/original/src/components/BusinessPreorder/index.tsx +2 -3
  86. package/themes/original/src/components/BusinessProductsCategories/index.tsx +1 -1
  87. package/themes/original/src/components/BusinessProductsList/index.tsx +3 -3
  88. package/themes/original/src/components/BusinessProductsList/styles.tsx +0 -3
  89. package/themes/original/src/components/BusinessProductsListing/index.tsx +51 -20
  90. package/themes/original/src/components/BusinessProductsListing/styles.tsx +3 -4
  91. package/themes/original/src/components/BusinessReviews/index.tsx +1 -1
  92. package/themes/original/src/components/BusinessesListing/Layout/Appointment/index.tsx +1 -1
  93. package/themes/original/src/components/BusinessesListing/Layout/Appointment/styles.tsx +5 -5
  94. package/themes/original/src/components/BusinessesListing/Layout/Original/FlatListBusinessListFooter.tsx +69 -0
  95. package/themes/original/src/components/BusinessesListing/Layout/Original/FlatListBusinessListHeader.tsx +406 -0
  96. package/themes/original/src/components/BusinessesListing/Layout/Original/FlatListBusinessListing.tsx +76 -0
  97. package/themes/original/src/components/BusinessesListing/Layout/Original/index.tsx +24 -404
  98. package/themes/original/src/components/BusinessesListing/Layout/Original/styles.tsx +1 -1
  99. package/themes/original/src/components/BusinessesListing/index.tsx +0 -1
  100. package/themes/original/src/components/Cart/index.tsx +32 -9
  101. package/themes/original/src/components/CartContent/index.tsx +96 -58
  102. package/themes/original/src/components/CartStoresListing/styles.tsx +2 -2
  103. package/themes/original/src/components/Checkout/index.tsx +190 -66
  104. package/themes/original/src/components/Checkout/styles.tsx +17 -0
  105. package/themes/original/src/components/CitiesControl/styles.tsx +1 -1
  106. package/themes/original/src/components/DatePicker/index.tsx +33 -0
  107. package/themes/original/src/components/DatePicker/styles.tsx +20 -0
  108. package/themes/original/src/components/Favorite/index.tsx +4 -9
  109. package/themes/original/src/components/Favorite/styles.tsx +0 -2
  110. package/themes/original/src/components/FloatingButton/styles.tsx +1 -1
  111. package/themes/original/src/components/GPSButton/index.tsx +1 -1
  112. package/themes/original/src/components/GiftCard/GiftCardOrdersList/index.tsx +64 -0
  113. package/themes/original/src/components/GiftCard/GiftCardOrdersList/styles.tsx +8 -0
  114. package/themes/original/src/components/GiftCard/GiftCardUI/index.tsx +8 -3
  115. package/themes/original/src/components/GiftCard/PurchaseGiftCard/index.tsx +36 -3
  116. package/themes/original/src/components/GiftCard/PurchaseGiftCard/styles.tsx +1 -1
  117. package/themes/original/src/components/GiftCard/RedeemGiftCard/index.tsx +67 -4
  118. package/themes/original/src/components/GiftCard/RedeemGiftCard/styles.tsx +1 -1
  119. package/themes/original/src/components/GiftCard/SendGiftCard/index.tsx +2 -2
  120. package/themes/original/src/components/GiftCard/SendGiftCard/styles.tsx +1 -1
  121. package/themes/original/src/components/GiftCard/SingleGiftCard/index.tsx +101 -0
  122. package/themes/original/src/components/GiftCard/SingleGiftCard/styles.tsx +4 -0
  123. package/themes/original/src/components/GiftCard/VerticalGiftCardOrdersLayout/index.tsx +83 -0
  124. package/themes/original/src/components/GiftCard/VerticalGiftCardOrdersLayout/styles.tsx +9 -0
  125. package/themes/original/src/components/GoogleMap/index.tsx +6 -5
  126. package/themes/original/src/components/HighestRatedBusinesses/index.tsx +2 -2
  127. package/themes/original/src/components/HighestRatedBusinesses/styles.tsx +1 -1
  128. package/themes/original/src/components/Home/index.tsx +2 -1
  129. package/themes/original/src/components/LastOrder/index.tsx +2 -1
  130. package/themes/original/src/components/LastOrders/index.tsx +2 -1
  131. package/themes/original/src/components/LoginForm/Otp/index.tsx +4 -16
  132. package/themes/original/src/components/Messages/index.tsx +9 -4
  133. package/themes/original/src/components/Messages/styles.tsx +1 -1
  134. package/themes/original/src/components/MomentOption/index.tsx +4 -3
  135. package/themes/original/src/components/MultiCart/index.tsx +1 -1
  136. package/themes/original/src/components/MultiCheckout/index.tsx +208 -21
  137. package/themes/original/src/components/MultiCheckout/styles.tsx +17 -0
  138. package/themes/original/src/components/MultiOrdersDetails/index.tsx +20 -15
  139. package/themes/original/src/components/MyOrders/index.tsx +24 -29
  140. package/themes/original/src/components/NavBar/index.tsx +3 -1
  141. package/themes/original/src/components/NetworkError/index.tsx +2 -3
  142. package/themes/original/src/components/NetworkError/styles.tsx +2 -2
  143. package/themes/original/src/components/Notifications/index.tsx +4 -8
  144. package/themes/original/src/components/Notifications/styles.tsx +0 -1
  145. package/themes/original/src/components/OrderDetails/OrderHistory.tsx +1 -1
  146. package/themes/original/src/components/OrderDetails/index.tsx +716 -668
  147. package/themes/original/src/components/OrderDetails/styles.tsx +24 -8
  148. package/themes/original/src/components/OrderProgress/index.tsx +28 -6
  149. package/themes/original/src/components/OrderProgress/styles.tsx +1 -1
  150. package/themes/original/src/components/OrderSummary/index.tsx +3 -1
  151. package/themes/original/src/components/OrderTypeSelector/index.tsx +5 -6
  152. package/themes/original/src/components/OrdersOption/PreviousBusinessOrdered/styles.tsx +1 -1
  153. package/themes/original/src/components/OrdersOption/PreviousProductsOrdered/styles.tsx +1 -1
  154. package/themes/original/src/components/OrdersOption/index.tsx +3 -5
  155. package/themes/original/src/components/OrdersOption/styles.tsx +1 -1
  156. package/themes/original/src/components/PageBanner/index.tsx +3 -0
  157. package/themes/original/src/components/PaymentOptionCard/index.tsx +4 -2
  158. package/themes/original/src/components/PaymentOptionStripe/styles.tsx +3 -0
  159. package/themes/original/src/components/PaymentOptionWallet/index.tsx +56 -56
  160. package/themes/original/src/components/PaymentOptions/index.tsx +72 -6
  161. package/themes/original/src/components/ProductForm/ActionButton.tsx +120 -0
  162. package/themes/original/src/components/ProductForm/ExtraOptions.tsx +56 -0
  163. package/themes/original/src/components/ProductForm/index.tsx +74 -165
  164. package/themes/original/src/components/ProductItemAccordion/index.tsx +54 -44
  165. package/themes/original/src/components/ProductItemAccordion/styles.tsx +3 -4
  166. package/themes/original/src/components/ProductOptionSubOption/index.tsx +123 -82
  167. package/themes/original/src/components/ProductOptionSubOption/styles.tsx +6 -1
  168. package/themes/original/src/components/ProfessionalProfile/styles.tsx +3 -3
  169. package/themes/original/src/components/Promotions/index.tsx +4 -4
  170. package/themes/original/src/components/Promotions/styles.tsx +0 -2
  171. package/themes/original/src/components/ReviewDriver/styles.tsx +1 -1
  172. package/themes/original/src/components/ReviewOrder/styles.tsx +1 -1
  173. package/themes/original/src/components/ReviewProducts/styles.tsx +1 -1
  174. package/themes/original/src/components/ServiceForm/index.tsx +2 -2
  175. package/themes/original/src/components/ServiceForm/styles.tsx +4 -4
  176. package/themes/original/src/components/SignupForm/index.tsx +60 -58
  177. package/themes/original/src/components/SingleOrderCard/index.tsx +3 -2
  178. package/themes/original/src/components/SingleProductCard/index.tsx +2 -2
  179. package/themes/original/src/components/SingleProductCard/styles.tsx +0 -3
  180. package/themes/original/src/components/StripeCardsList/index.tsx +17 -36
  181. package/themes/original/src/components/StripeElementsForm/index.tsx +72 -59
  182. package/themes/original/src/components/StripeElementsForm/naked.tsx +47 -0
  183. package/themes/original/src/components/UpsellingProducts/UpsellingContent.tsx +170 -0
  184. package/themes/original/src/components/UpsellingProducts/UpsellingLayout.tsx +86 -0
  185. package/themes/original/src/components/UpsellingProducts/index.tsx +15 -199
  186. package/themes/original/src/components/UpsellingProducts/styles.tsx +19 -0
  187. package/themes/original/src/components/UserFormDetails/index.tsx +125 -77
  188. package/themes/original/src/components/UserFormDetails/styles.tsx +7 -0
  189. package/themes/original/src/components/UserProfile/index.tsx +3 -2
  190. package/themes/original/src/components/UserProfileForm/index.tsx +30 -36
  191. package/themes/original/src/components/WalletTransactions/styles.tsx +1 -0
  192. package/themes/original/src/components/Wallets/index.tsx +8 -9
  193. package/themes/original/src/components/Wallets/styles.tsx +1 -1
  194. package/themes/original/src/components/WebsocketStatus/index.tsx +172 -0
  195. package/themes/original/src/components/WebsocketStatus/styles.tsx +28 -0
  196. package/themes/original/src/components/shared/HeaderTitle.tsx +1 -1
  197. package/themes/original/src/components/shared/OButton.tsx +5 -5
  198. package/themes/original/src/components/shared/OInput.tsx +1 -4
  199. package/themes/original/src/components/shared/OModal.tsx +12 -14
  200. package/themes/original/src/layouts/Container.tsx +5 -3
  201. package/themes/original/src/types/index.tsx +1 -0
  202. package/themes/original/src/utils/index.tsx +125 -1
  203. package/themes/uber-eats/src/components/BusinessesListing/index.tsx +1 -1
  204. package/src/navigators/BottomNavigator.tsx +0 -117
  205. package/src/navigators/CheckoutNavigator.tsx +0 -66
  206. package/src/navigators/HomeNavigator.tsx +0 -202
  207. package/src/navigators/NavigationRef.tsx +0 -7
  208. package/src/navigators/RootNavigator.tsx +0 -269
  209. package/src/pages/Account.tsx +0 -34
  210. package/src/pages/AddressForm.tsx +0 -62
  211. package/src/pages/AddressList.tsx +0 -24
  212. package/src/pages/BusinessProductsList.tsx +0 -81
  213. package/src/pages/BusinessesListing.tsx +0 -43
  214. package/src/pages/CartList.tsx +0 -49
  215. package/src/pages/Checkout.tsx +0 -101
  216. package/src/pages/ForgotPassword.tsx +0 -24
  217. package/src/pages/Help.tsx +0 -23
  218. package/src/pages/HelpAccountAndPayment.tsx +0 -23
  219. package/src/pages/HelpGuide.tsx +0 -23
  220. package/src/pages/HelpOrder.tsx +0 -23
  221. package/src/pages/Home.tsx +0 -36
  222. package/src/pages/IntroductoryTutorial.tsx +0 -170
  223. package/src/pages/Login.tsx +0 -47
  224. package/src/pages/MomentOption.tsx +0 -30
  225. package/src/pages/MultiCheckout.tsx +0 -31
  226. package/src/pages/MultiOrdersDetails.tsx +0 -27
  227. package/src/pages/MyOrders.tsx +0 -40
  228. package/src/pages/NetworkError.tsx +0 -24
  229. package/src/pages/NotFound.tsx +0 -22
  230. package/src/pages/OrderDetails.tsx +0 -25
  231. package/src/pages/ProductDetails.tsx +0 -55
  232. package/src/pages/Profile.tsx +0 -36
  233. package/src/pages/ReviewDriver.tsx +0 -30
  234. package/src/pages/ReviewOrder.tsx +0 -32
  235. package/src/pages/ReviewProducts.tsx +0 -30
  236. package/src/pages/Sessions.tsx +0 -22
  237. package/src/pages/Signup.tsx +0 -53
  238. package/src/pages/SpinnerLoader.tsx +0 -10
  239. package/src/pages/Splash.tsx +0 -21
@@ -27,9 +27,9 @@ const StyledButton = styled.View<Props>`
27
27
  padding-left: 20px;
28
28
  padding-right: 20px;
29
29
  position: relative;
30
- ${(props: any) => props?.theme?.general?.components?.buttons?.borderRadius && css`
31
- border-radius: ${props?.theme?.general?.components?.buttons?.borderRadius}px;
32
- `}
30
+ ${(props: any) => props?.borderRadius && css`
31
+ border-radius: ${typeof props?.borderRadius === 'string' ? props?.borderRadius : `${props?.borderRadius}px`};
32
+ `}
33
33
  `
34
34
  const StyledButtonDisabled = styled(StyledButton)`
35
35
  background-color: ${(props: any) => props.theme.colors.disabled};
@@ -119,7 +119,7 @@ const OButton = (props: Props): React.ReactElement => {
119
119
  style={{ width: props.isCircle ? 52 : props.style?.width, ...props.parentStyle }}
120
120
  disabled={props.isDisabledWithSameStyles}
121
121
  >
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 }}>
122
+ <StyledButton style={{ ...props.style, backgroundColor: theme?.general?.components?.buttons?.color ?? props.bgColor, borderColor: theme?.general?.components?.buttons?.color ?? props.borderColor, borderRadius: parseInt(theme?.general?.components?.buttons?.borderRadius) || props.style?.borderRadius }}>
123
123
  {props.icon ? (
124
124
  <props.icon {...props.iconProps} />
125
125
  ) : null}
@@ -127,7 +127,7 @@ const OButton = (props: Props): React.ReactElement => {
127
127
  <OIcon style={props.imgLeftStyle} src={props.imgLeftSrc} color={theme.colors.textNormal} />
128
128
  ) : null}
129
129
  {props.text ? (
130
- <StyledText style={props.textStyle}>{props.text}</StyledText>
130
+ <StyledText style={{ ...props.textStyle, color: theme?.general?.components?.buttons?.buttonTextColor ?? props?.textStyle?.color }}>{props.text}</StyledText>
131
131
  ) : null}
132
132
  {props.imgRightSrc ? (
133
133
  <EndImage style={props.imgRightStyle} source={props.imgRightSrc} />
@@ -3,7 +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, css } from 'styled-components/native';
6
+ import { useTheme } from 'styled-components/native';
7
7
 
8
8
  const Input = styled.TextInput`
9
9
  flex-grow: 1;
@@ -53,9 +53,6 @@ const Wrapper = styled.Pressable`
53
53
  align-items: center;
54
54
  justify-content: center;
55
55
  width: 100%;
56
- ${(props: any) => props.theme?.general?.components?.inputs?.borderRadius && css`
57
- border-radius: ${props?.theme?.general?.components?.inputs?.borderRadius};
58
- `}
59
56
  `;
60
57
 
61
58
  const OInput = (props: Props): React.ReactElement => {
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { Modal, StyleSheet, Text, SafeAreaView, View, TouchableOpacity, Platform } from "react-native";
3
- import { OIcon } from '.';
4
- import styled, { useTheme } from 'styled-components/native';
3
+ import styled from 'styled-components/native';
4
+ import AntDesignIcon from 'react-native-vector-icons/AntDesign'
5
5
 
6
6
  interface Props {
7
7
  open?: boolean;
@@ -50,17 +50,15 @@ const OModal = (props: Props): React.ReactElement => {
50
50
  isAvoidKeyBoardView
51
51
  } = props
52
52
 
53
- const theme = useTheme();
54
-
55
53
  const renderSafeAreaView = () => (
56
54
  <SafeAreaView style={styles.container}>
57
55
  {!entireModal ? (
58
56
  <View style={styles.centeredView}>
59
57
  <View style={titleSectionStyle ? titleSectionStyle : styles.titleSection}>
60
- <TouchableOpacity style={{...styles.wrapperIcon, ...styleContainerCloseButton}} onPress={onClose}>
61
- <OIcon
62
- src={theme.images.general.close}
63
- width={16}
58
+ <TouchableOpacity style={{ ...styles.wrapperIcon, ...styleContainerCloseButton }} onPress={onClose}>
59
+ <AntDesignIcon
60
+ name='close'
61
+ size={26}
64
62
  style={isNotDecoration && (styleCloseButton || styles.cancelBtn)}
65
63
  />
66
64
  </TouchableOpacity>
@@ -73,9 +71,9 @@ const OModal = (props: Props): React.ReactElement => {
73
71
  {!customClose && (
74
72
  <View style={titleSectionStyle ? titleSectionStyle : styles.titleSection}>
75
73
  <TouchableOpacity style={styles.wrapperIcon} onPress={onClose}>
76
- <OIcon
77
- src={theme.images.general.close}
78
- width={16}
74
+ <AntDesignIcon
75
+ name='close'
76
+ size={26}
79
77
  style={styleCloseButton || styles.cancelBtn}
80
78
  />
81
79
  </TouchableOpacity>
@@ -93,7 +91,7 @@ const OModal = (props: Props): React.ReactElement => {
93
91
  animationType="slide"
94
92
  transparent={isTransparent}
95
93
  visible={open}
96
- onRequestClose={() => onClose && onClose()}
94
+ onRequestClose={() => onClose && onClose()}
97
95
  style={{ height: '100%', flex: 1, position: 'absolute', ...style, zIndex: 9999 }}
98
96
  >
99
97
  {isAvoidKeyBoardView ? (
@@ -125,8 +123,8 @@ const styles = StyleSheet.create({
125
123
  flex: 1,
126
124
  justifyContent: 'space-between',
127
125
  alignItems: 'flex-start',
128
- paddingLeft: 40,
129
- paddingRight: 40,
126
+ paddingLeft: 20,
127
+ paddingRight: 20,
130
128
  marginBottom: 40
131
129
  },
132
130
  cancelBtn: {
@@ -4,9 +4,11 @@ import styled, { css, useTheme } from 'styled-components/native';
4
4
  import { Platform, View } from 'react-native';
5
5
 
6
6
  const ContainerStyled = styled.ScrollView`
7
- flex: 1;
7
+ ${(props: any) => !props.disableFlex && css`
8
+ flex: 1
9
+ `}
8
10
  ${(props: any) => !props.noPadding && css`
9
- padding: ${Platform.OS === 'ios' ? '0px 40px' : '20px 40px'};
11
+ padding: ${Platform.OS === 'ios' ? '0px 20px' : '20px 20px'};
10
12
  `}
11
13
  background-color: ${(props: any) => props.theme.colors.backgroundPage};
12
14
  `;
@@ -17,7 +19,7 @@ export const Container = (props: any) => {
17
19
  return (
18
20
  <View
19
21
  style={{
20
- flex: 1,
22
+ flex: props.disableFlex ? undefined : 1,
21
23
  paddingTop: props.pt ?? insets.top,
22
24
  backgroundColor: theme.colors.backgroundPage
23
25
  }}
@@ -636,6 +636,7 @@ export interface GoogleMapsParams {
636
636
  handleToggleMap?: () => void,
637
637
  isIntGeoCoder: boolean,
638
638
  businessZones?: any
639
+ delta?: number
639
640
  }
640
641
 
641
642
  export interface HelpParams {
@@ -4,6 +4,7 @@ import FontAwesome from 'react-native-vector-icons/FontAwesome';
4
4
  import { CODES } from 'ordering-components/native'
5
5
  import { ORDER_TYPES } from '../config/constants';
6
6
  import { useTheme } from 'styled-components/native';
7
+ import ReactNativeHapticFeedback from "react-native-haptic-feedback";
7
8
 
8
9
  const [languageState, t] = useLanguage();
9
10
  const theme = useTheme()
@@ -258,7 +259,7 @@ export const sortInputFields = ({ fields, values }: any) => {
258
259
 
259
260
  fieldsBase.forEach((f: any) => {
260
261
  fieldsArray && fieldsArray.forEach((field: any) => {
261
- if (f === field.code) {
262
+ if (f === (field.validation_field?.code || field?.code)) {
262
263
  fieldsSorted.push(field)
263
264
  }
264
265
  })
@@ -575,6 +576,119 @@ export const getOrderStatus = (s: string) => {
575
576
  return objectStatus && objectStatus;
576
577
  }
577
578
 
579
+ export const getOrderStatuPickUp = (s: any) => {
580
+ const status = parseInt(s);
581
+ const orderStatus = [
582
+ {
583
+ key: 0,
584
+ value: t('PENDING', 'Pending'),
585
+ slug: 'PENDING',
586
+ percentage: 0.1,
587
+ image: theme.images.order.status0,
588
+ },
589
+ {
590
+ key: 1,
591
+ value: t('COMPLETED', 'Completed'),
592
+ slug: 'COMPLETED',
593
+ percentage: 1,
594
+ image: theme.images.order.status1,
595
+ },
596
+ {
597
+ key: 2,
598
+ value: t('REJECTED', 'Rejected'),
599
+ slug: 'REJECTED',
600
+ percentage: 0,
601
+ image: theme.images.order.status2,
602
+ },
603
+ {
604
+ key: 4,
605
+ value: t('PREPARATION_COMPLETED', 'Preparation Completed'),
606
+ slug: 'PREPARATION_COMPLETED',
607
+ percentage: 0.5,
608
+ image: theme.images.order.status4,
609
+ },
610
+ {
611
+ key: 5,
612
+ value: t('REJECTED_BY_BUSINESS', 'Rejected by business'),
613
+ slug: 'REJECTED_BY_BUSINESS',
614
+ percentage: 0,
615
+ image: theme.images.order.status5,
616
+ },
617
+ {
618
+ key: 7,
619
+ value: t('ACCEPTED_BY_BUSINESS', 'Accepted by business'),
620
+ slug: 'ACCEPTED_BY_BUSINESS',
621
+ percentage: 0.3,
622
+ image: theme.images.order.status7,
623
+ },
624
+ {
625
+ key: 13,
626
+ value: t('PREORDER', 'PreOrder'),
627
+ slug: 'PREORDER',
628
+ percentage: 0,
629
+ image: theme.images.order.status13,
630
+ },
631
+ {
632
+ key: 14,
633
+ value: t('ORDER_NOT_READY', 'Order not ready'),
634
+ slug: 'ORDER_NOT_READY',
635
+ percentage: 0.3,
636
+ image: theme.images.order.status13,
637
+ },
638
+ {
639
+ key: 15,
640
+ value: t(
641
+ 'ORDER_PICKEDUP_COMPLETED_BY_CUSTOMER',
642
+ 'Order picked up completed by customer',
643
+ ),
644
+ slug: 'ORDER_PICKEDUP_COMPLETED_BY_CUSTOMER',
645
+ percentage: 1,
646
+ image: theme.images.order.status1,
647
+ },
648
+ {
649
+ key: 16,
650
+ value: t('CANCELLED_BY_CUSTOMER', 'Cancelled by customer'),
651
+ slug: 'CANCELLED_BY_CUSTOMER',
652
+ percentage: 0,
653
+ image: theme.images.order.status2,
654
+ },
655
+ {
656
+ key: 17,
657
+ value: t(
658
+ 'ORDER_NOT_PICKEDUP_BY_CUSTOMER',
659
+ 'Order not picked up by customer',
660
+ ),
661
+ slug: 'ORDER_NOT_PICKEDUP_BY_CUSTOMER',
662
+ percentage: 0,
663
+ image: theme.images.order.status2,
664
+ },
665
+ {
666
+ key: 20,
667
+ value: t(
668
+ 'ORDER_CUSTOMER_ALMOST_ARRIVED_BUSINESS',
669
+ 'Customer almost arrived to business',
670
+ ),
671
+ slug: 'ORDER_CUSTOMER_ALMOST_ARRIVED_BUSINESS',
672
+ percentage: 0.7,
673
+ image: theme.images.order.status7,
674
+ },
675
+ {
676
+ key: 21,
677
+ value: t(
678
+ 'ORDER_CUSTOMER_ARRIVED_BUSINESS',
679
+ 'Customer arrived to business',
680
+ ),
681
+ slug: 'ORDER_CUSTOMER_ARRIVED_BUSINESS',
682
+ percentage: 0.9,
683
+ image: theme.images.order.status7,
684
+ }
685
+ ];
686
+
687
+ const objectStatus = orderStatus.find((o) => o.key === status);
688
+
689
+ return objectStatus && objectStatus;
690
+ }
691
+
578
692
  /**
579
693
  * Function to get brightness of color.
580
694
  */
@@ -612,3 +726,13 @@ export const lightenDarkenColor = (color: any) => {
612
726
  return false
613
727
  }
614
728
  }
729
+
730
+ export const vibrateApp = (impact ?: string) => {
731
+ const options = {
732
+ enableVibrateFallback: true,
733
+ ignoreAndroidSystemSettings: false
734
+ };
735
+
736
+ ReactNativeHapticFeedback.trigger(impact || "impactLight", options);
737
+
738
+ }
@@ -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}>
@@ -1,117 +0,0 @@
1
- import React from 'react'
2
- import { View, Platform, PlatformIOSStatic } from 'react-native'
3
- import { useOrder } from 'ordering-components/native'
4
- import { createMaterialBottomTabNavigator } from '@react-navigation/material-bottom-tabs'
5
- import MaterialCommunityIcon from 'react-native-vector-icons/MaterialCommunityIcons'
6
- import MaterialIcon from 'react-native-vector-icons/MaterialIcons'
7
- import styled from 'styled-components/native'
8
-
9
- import { OText } from '../components/shared'
10
- import BusinessList from '../pages/BusinessesListing'
11
- import MyOrders from '../pages/MyOrders'
12
- import CartList from '../pages/CartList'
13
- import Profile from '../pages/Profile'
14
- import { useTheme } from 'styled-components/native'
15
-
16
- const CartsLenght = styled.View`
17
- width: 25px;
18
- height: 25px;
19
- background-color: ${(props: any) => props.theme.colors.primary};
20
- display: flex;
21
- justify-content: center;
22
- align-items: center;
23
- position: absolute;
24
- right: 0;
25
- `
26
-
27
- const Tab = createMaterialBottomTabNavigator();
28
-
29
- const BottomNavigator = () => {
30
- const theme = useTheme()
31
- const [{ carts }] = useOrder()
32
- const cartsList = (carts && Object.values(carts).filter((cart: any) => cart.products.length > 0)) || []
33
- const isIos = Platform.OS === 'ios'
34
- const platformIOS = Platform as PlatformIOSStatic
35
- const androidStyles = isIos
36
- ? platformIOS.isPad
37
- ? { paddingBottom: 30 }
38
- : {}
39
- : {height: 40, position: 'relative', bottom: 15}
40
- return (
41
- <Tab.Navigator
42
- initialRouteName="BusinessList"
43
- activeColor={theme.colors.primary}
44
- barStyle={{ backgroundColor: theme.colors.white, ...androidStyles }}
45
- labeled={false}
46
- inactiveColor={theme.colors.disabled}
47
- >
48
- <Tab.Screen
49
- name="BusinessList"
50
- component={BusinessList}
51
- options={{
52
- tabBarIcon:
53
- ({ color }: any) => (
54
- <View style={{ width: 50, height: 50, justifyContent: !isIos ? 'flex-start' : 'space-evenly', position: 'relative', bottom: !isIos ? 10 : 0 }}>
55
- <MaterialCommunityIcon name='home' size={46} color={color} />
56
- </View>
57
- )
58
- }}
59
- />
60
- <Tab.Screen
61
- name="MyOrders"
62
- component={MyOrders}
63
- options={
64
- {
65
- tabBarIcon:
66
- ({ color }: any) => (
67
- <View style={{ width: 50, height: 50, justifyContent: !isIos ? 'flex-start' : 'space-evenly', position: 'relative', bottom: !isIos ? 10 : 0 }}>
68
- <MaterialIcon name='format-list-bulleted' size={46} color={color} />
69
- </View>
70
- ),
71
- }}
72
- />
73
- <Tab.Screen
74
- name="Cart"
75
- component={CartList}
76
- options={{
77
- tabBarIcon:
78
- ({ color }: any) => (
79
- <View style={{
80
- width: 50,
81
- height: 50,
82
- justifyContent: !isIos ? 'flex-start' : 'space-evenly',
83
- position: 'relative',
84
- bottom: !isIos ? 10 : 0
85
- }}
86
- >
87
- <MaterialIcon name='shopping-basket' size={46} color={color} />
88
- {cartsList.length > 0 && (
89
- <CartsLenght style={{ borderRadius: 100 / 2 }}>
90
- <OText
91
- color={theme.colors.white}
92
- >
93
- {cartsList.length}
94
- </OText>
95
- </CartsLenght>
96
- )}
97
- </View>
98
- )
99
- }}
100
- />
101
- <Tab.Screen
102
- name="Profile"
103
- component={Profile}
104
- options={{
105
- tabBarIcon:
106
- ({ color }: any) => (
107
- <View style={{ width: 50, height: 50, justifyContent: !isIos ? 'flex-start' : 'space-evenly', position: 'relative', bottom: !isIos ? 10 : 0 }}>
108
- <MaterialIcon name='person' size={46} color={color} />
109
- </View>
110
- )
111
- }}
112
- />
113
- </Tab.Navigator>
114
- );
115
- }
116
-
117
- export default BottomNavigator
@@ -1,66 +0,0 @@
1
- import React from 'react';
2
- import { createStackNavigator } from "@react-navigation/stack";
3
-
4
- import AddressList from '../pages/AddressList'
5
- import AddressForm from '../pages/AddressForm'
6
- import CartList from '../pages/CartList'
7
- import CheckoutPage from '../pages/Checkout';
8
- import BusinessProductsList from '../pages/BusinessProductsList';
9
- import MultiCheckout from '../pages/MultiCheckout';
10
-
11
- const Stack = createStackNavigator();
12
-
13
- const CheckoutNavigator = (props: any) => {
14
- const {
15
- navigation,
16
- route
17
- } = props;
18
-
19
- const cartUuid = route?.params?.cartUuid
20
-
21
- const checkoutProps = {
22
- navigation,
23
- route,
24
- cartUuid: route?.params?.cartUuid
25
- }
26
-
27
- return (
28
- <Stack.Navigator>
29
- {!cartUuid && (
30
- <Stack.Screen
31
- name="Cart"
32
- component={CartList}
33
- options={{ headerShown: false }}
34
- />
35
- )}
36
- <Stack.Screen
37
- name="CheckoutPage"
38
- children={() => <CheckoutPage {...checkoutProps} />}
39
- options={{ headerShown: false }}
40
- />
41
- <Stack.Screen
42
- name="Business"
43
- component={BusinessProductsList}
44
- options={{ headerShown: false }}
45
- />
46
- <Stack.Screen
47
- name="AddressList"
48
- component={AddressList}
49
- options={{ headerShown: false }}
50
- initialParams={{isFromCheckout: true}}
51
- />
52
- <Stack.Screen
53
- name="AddressForm"
54
- component={AddressForm}
55
- options={{ headerShown: false }}
56
- />
57
- <Stack.Screen
58
- name="MultiCheckout"
59
- children={() => <MultiCheckout {...checkoutProps} />}
60
- options={{ headerShown: false }}
61
- />
62
- </Stack.Navigator>
63
- );
64
- }
65
-
66
- export default CheckoutNavigator;