ordering-ui-react-native 0.21.55 → 0.21.56-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 (165) hide show
  1. package/package.json +8 -9
  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 +6 -4
  6. package/src/components/VerifyPhone/styles.tsx +1 -2
  7. package/src/types/index.tsx +3 -1
  8. package/themes/business/index.tsx +4 -0
  9. package/themes/business/src/components/AcceptOrRejectOrder/index.tsx +4 -3
  10. package/themes/business/src/components/BusinessProductList/ProductList.tsx +2 -1
  11. package/themes/business/src/components/BusinessProductList/index.tsx +2 -1
  12. package/themes/business/src/components/DriverMap/index.tsx +36 -23
  13. package/themes/business/src/components/GoogleMap/index.tsx +15 -8
  14. package/themes/business/src/components/Home/index.tsx +5 -1
  15. package/themes/business/src/components/LanguageSelector/index.tsx +1 -2
  16. package/themes/business/src/components/LanguageSelector/lang_country.json +515 -70
  17. package/themes/business/src/components/LogoutButton/index.tsx +1 -1
  18. package/themes/business/src/components/MapView/index.tsx +30 -15
  19. package/themes/business/src/components/NewOrderNotification/index.tsx +66 -26
  20. package/themes/business/src/components/OrderDetails/Business.tsx +52 -2
  21. package/themes/business/src/components/OrderDetails/Delivery.tsx +43 -24
  22. package/themes/business/src/components/OrderDetails/OrderContentComponent.tsx +68 -61
  23. package/themes/business/src/components/OrderDetails/OrderHeaderComponent.tsx +35 -21
  24. package/themes/business/src/components/OrderDetails/usePrinterCommands.tsx +220 -0
  25. package/themes/business/src/components/OrderSummary/index.tsx +240 -76
  26. package/themes/business/src/components/OrdersOption/index.tsx +229 -112
  27. package/themes/business/src/components/PhoneInputNumber/index.tsx +8 -5
  28. package/themes/business/src/components/PreviousOrders/OrderItem.tsx +29 -19
  29. package/themes/business/src/components/PreviousOrders/index.tsx +5 -3
  30. package/themes/business/src/components/PrinterEdition/index.tsx +363 -0
  31. package/themes/business/src/components/PrinterEdition/styles.tsx +61 -0
  32. package/themes/business/src/components/PrinterSettings/index.tsx +267 -0
  33. package/themes/business/src/components/PrinterSettings/styles.tsx +30 -0
  34. package/themes/business/src/components/ProductItemAccordion/index.tsx +2 -2
  35. package/themes/business/src/components/ReviewCustomer/index.tsx +2 -0
  36. package/themes/business/src/components/SearchBar/index.tsx +2 -1
  37. package/themes/business/src/components/Sessions/index.tsx +187 -0
  38. package/themes/business/src/components/Sessions/styles.tsx +20 -0
  39. package/themes/business/src/components/StoresList/index.tsx +4 -3
  40. package/themes/business/src/components/UserFormDetails/index.tsx +111 -107
  41. package/themes/business/src/components/UserProfileForm/index.tsx +106 -54
  42. package/themes/business/src/components/WebsocketStatus/index.tsx +2 -2
  43. package/themes/business/src/components/shared/OInput.tsx +2 -0
  44. package/themes/business/src/components/shared/OTextarea.tsx +8 -9
  45. package/themes/business/src/hooks/useLocation.tsx +5 -4
  46. package/themes/business/src/types/index.tsx +22 -5
  47. package/themes/business/src/utils/index.tsx +5 -0
  48. package/themes/doordash/src/components/BusinessesListing/index.tsx +1 -1
  49. package/themes/doordash/src/components/LoginForm/index.tsx +1 -2
  50. package/themes/instacart/src/components/BusinessesListing/index.tsx +1 -1
  51. package/themes/kiosk/src/components/Checkout/index.tsx +6 -0
  52. package/themes/kiosk/src/components/NavBar/index.tsx +14 -14
  53. package/themes/kiosk/src/components/OptionCard/index.tsx +1 -1
  54. package/themes/kiosk/src/components/OrderTypeCardSelector/index.tsx +8 -10
  55. package/themes/kiosk/src/components/shared/OButton.tsx +5 -18
  56. package/themes/original/index.tsx +6 -2
  57. package/themes/original/src/components/AddressDetails/index.tsx +20 -10
  58. package/themes/original/src/components/AddressForm/index.tsx +32 -17
  59. package/themes/original/src/components/AddressList/index.tsx +8 -7
  60. package/themes/original/src/components/AnalyticsSegment/index.tsx +6 -6
  61. package/themes/original/src/components/AppleLogin/index.tsx +4 -4
  62. package/themes/original/src/components/BusinessBasicInformation/index.tsx +6 -9
  63. package/themes/original/src/components/BusinessController/index.tsx +18 -10
  64. package/themes/original/src/components/BusinessController/styles.tsx +8 -7
  65. package/themes/original/src/components/BusinessItemAccordion/index.tsx +15 -7
  66. package/themes/original/src/components/BusinessListingSearch/BusinessSearchFooter.tsx +316 -0
  67. package/themes/original/src/components/BusinessListingSearch/BusinessSearchHeader.tsx +94 -0
  68. package/themes/original/src/components/BusinessListingSearch/index.tsx +48 -359
  69. package/themes/original/src/components/BusinessPreorder/index.tsx +20 -16
  70. package/themes/original/src/components/BusinessProductsList/SubcategoriesComponent/index.tsx +5 -5
  71. package/themes/original/src/components/BusinessProductsList/index.tsx +3 -3
  72. package/themes/original/src/components/BusinessProductsList/styles.tsx +0 -3
  73. package/themes/original/src/components/BusinessProductsListing/index.tsx +29 -14
  74. package/themes/original/src/components/BusinessTypeFilter/index.tsx +9 -8
  75. package/themes/original/src/components/BusinessesListing/Layout/Appointment/index.tsx +2 -1
  76. package/themes/original/src/components/BusinessesListing/Layout/Original/index.tsx +1 -1
  77. package/themes/original/src/components/BusinessesListing/index.tsx +0 -1
  78. package/themes/original/src/components/Cart/index.tsx +26 -9
  79. package/themes/original/src/components/CartContent/index.tsx +60 -45
  80. package/themes/original/src/components/Checkout/index.tsx +106 -64
  81. package/themes/original/src/components/CitiesControl/index.tsx +0 -3
  82. package/themes/original/src/components/CouponControl/index.tsx +1 -3
  83. package/themes/original/src/components/DatePicker/index.tsx +18 -2
  84. package/themes/original/src/components/DriverTips/index.tsx +1 -3
  85. package/themes/original/src/components/Favorite/index.tsx +1 -5
  86. package/themes/original/src/components/FavoriteList/index.tsx +0 -1
  87. package/themes/original/src/components/ForgotPasswordForm/index.tsx +5 -7
  88. package/themes/original/src/components/GiftCard/GiftCardOrdersList/index.tsx +64 -0
  89. package/themes/original/src/components/GiftCard/GiftCardOrdersList/styles.tsx +8 -0
  90. package/themes/original/src/components/GiftCard/GiftCardUI/index.tsx +15 -17
  91. package/themes/original/src/components/GiftCard/PurchaseGiftCard/index.tsx +3 -7
  92. package/themes/original/src/components/GiftCard/RedeemGiftCard/index.tsx +24 -32
  93. package/themes/original/src/components/GiftCard/SendGiftCard/index.tsx +9 -11
  94. package/themes/original/src/components/GiftCard/SingleGiftCard/index.tsx +101 -0
  95. package/themes/original/src/components/GiftCard/SingleGiftCard/styles.tsx +4 -0
  96. package/themes/original/src/components/GiftCard/VerticalGiftCardOrdersLayout/index.tsx +82 -0
  97. package/themes/original/src/components/GiftCard/VerticalGiftCardOrdersLayout/styles.tsx +9 -0
  98. package/themes/original/src/components/GoogleMap/index.tsx +39 -18
  99. package/themes/original/src/components/Help/index.tsx +2 -0
  100. package/themes/original/src/components/HighestRatedBusinesses/index.tsx +2 -2
  101. package/themes/original/src/components/Home/index.tsx +2 -10
  102. package/themes/original/src/components/LoginForm/Otp/index.tsx +4 -19
  103. package/themes/original/src/components/LoginForm/index.tsx +4 -7
  104. package/themes/original/src/components/MessageListing/index.tsx +1 -0
  105. package/themes/original/src/components/Messages/index.tsx +8 -7
  106. package/themes/original/src/components/MomentOption/index.tsx +13 -2
  107. package/themes/original/src/components/MultiCartsPaymethodsAndWallets/index.tsx +7 -3
  108. package/themes/original/src/components/MultiCheckout/index.tsx +124 -63
  109. package/themes/original/src/components/MultiCheckout/styles.tsx +17 -0
  110. package/themes/original/src/components/MultiOrdersDetails/index.tsx +20 -14
  111. package/themes/original/src/components/MyOrders/index.tsx +21 -26
  112. package/themes/original/src/components/NavBar/index.tsx +4 -2
  113. package/themes/original/src/components/NetworkError/index.tsx +2 -8
  114. package/themes/original/src/components/NotFoundSource/index.tsx +0 -3
  115. package/themes/original/src/components/Notifications/index.tsx +2 -4
  116. package/themes/original/src/components/OrderDetails/OrderHistory.tsx +5 -7
  117. package/themes/original/src/components/OrderDetails/index.tsx +5 -7
  118. package/themes/original/src/components/OrderDetails/styles.tsx +0 -1
  119. package/themes/original/src/components/OrderProgress/index.tsx +22 -3
  120. package/themes/original/src/components/OrderTypeSelector/index.tsx +7 -6
  121. package/themes/original/src/components/OrdersOption/index.tsx +2 -4
  122. package/themes/original/src/components/PaymentOptionCard/index.tsx +4 -2
  123. package/themes/original/src/components/PaymentOptionStripe/index.tsx +0 -5
  124. package/themes/original/src/components/PaymentOptionWallet/index.tsx +56 -56
  125. package/themes/original/src/components/PaymentOptions/index.tsx +47 -6
  126. package/themes/original/src/components/PlaceSpot/index.tsx +1 -3
  127. package/themes/original/src/components/PreviousOrders/index.tsx +1 -2
  128. package/themes/original/src/components/ProductForm/ActionButton.tsx +16 -19
  129. package/themes/original/src/components/ProductForm/index.tsx +123 -112
  130. package/themes/original/src/components/ProductItemAccordion/index.tsx +55 -49
  131. package/themes/original/src/components/ProductItemAccordion/styles.tsx +3 -4
  132. package/themes/original/src/components/ProductOptionSubOption/index.tsx +112 -91
  133. package/themes/original/src/components/ProfessionalProfile/index.tsx +4 -5
  134. package/themes/original/src/components/Promotions/index.tsx +6 -9
  135. package/themes/original/src/components/ReviewDriver/index.tsx +1 -1
  136. package/themes/original/src/components/ReviewOrder/index.tsx +2 -2
  137. package/themes/original/src/components/ReviewProducts/index.tsx +1 -1
  138. package/themes/original/src/components/ReviewTrigger/index.tsx +2 -2
  139. package/themes/original/src/components/ServiceForm/index.tsx +52 -54
  140. package/themes/original/src/components/Sessions/index.tsx +3 -3
  141. package/themes/original/src/components/SignupForm/index.tsx +65 -67
  142. package/themes/original/src/components/SingleOrderCard/index.tsx +1 -2
  143. package/themes/original/src/components/SingleProductCard/index.tsx +5 -6
  144. package/themes/original/src/components/SingleProductCard/styles.tsx +0 -3
  145. package/themes/original/src/components/StripeCardForm/index.tsx +0 -3
  146. package/themes/original/src/components/StripeCardsList/index.tsx +12 -36
  147. package/themes/original/src/components/StripeElementsForm/index.tsx +78 -59
  148. package/themes/original/src/components/StripeElementsForm/naked.tsx +48 -1
  149. package/themes/original/src/components/StripeRedirectForm/index.tsx +0 -3
  150. package/themes/original/src/components/UpsellingProducts/UpsellingContent.tsx +10 -7
  151. package/themes/original/src/components/UpsellingProducts/UpsellingLayout.tsx +8 -3
  152. package/themes/original/src/components/UserFormDetails/index.tsx +88 -91
  153. package/themes/original/src/components/UserFormDetails/styles.tsx +7 -0
  154. package/themes/original/src/components/UserProfile/index.tsx +11 -2
  155. package/themes/original/src/components/Wallets/index.tsx +7 -4
  156. package/themes/original/src/components/Wallets/styles.tsx +1 -1
  157. package/themes/original/src/components/WebsocketStatus/index.tsx +169 -0
  158. package/themes/original/src/components/WebsocketStatus/styles.tsx +28 -0
  159. package/themes/original/src/components/shared/OAlert.tsx +2 -1
  160. package/themes/original/src/components/shared/OButton.tsx +8 -7
  161. package/themes/original/src/components/shared/OInput.tsx +1 -4
  162. package/themes/original/src/layouts/Container.tsx +4 -2
  163. package/themes/original/src/types/index.tsx +5 -1
  164. package/themes/original/src/utils/index.tsx +12 -1
  165. package/themes/uber-eats/src/components/BusinessesListing/index.tsx +1 -1
@@ -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 => {
@@ -4,7 +4,9 @@ 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
11
  padding: ${Platform.OS === 'ios' ? '0px 20px' : '20px 20px'};
10
12
  `}
@@ -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
  }}
@@ -50,6 +50,7 @@ export interface ProfileParams {
50
50
  removeAccountState?: any;
51
51
  handleChangePromotions?: any;
52
52
  notificationsGroup?: any;
53
+ appVersion?: string
53
54
  }
54
55
 
55
56
  export interface AddressListParams {
@@ -607,7 +608,7 @@ export interface UpsellingProductsParams {
607
608
  business?: any;
608
609
  businessId?: number;
609
610
  cartProducts?: Array<any>;
610
- handleUpsellingPage: (cart ?: any) => void;
611
+ handleUpsellingPage: (cart?: any) => void;
611
612
  openUpselling: boolean;
612
613
  canOpenUpselling?: boolean;
613
614
  setCanOpenUpselling?: (value: any) => void;
@@ -637,6 +638,9 @@ export interface GoogleMapsParams {
637
638
  isIntGeoCoder: boolean,
638
639
  businessZones?: any
639
640
  delta?: number
641
+ setAutoCompleteAddress?: (val: boolean) => void,
642
+ autoCompleteAddress?: boolean,
643
+ manualZoom?: boolean
640
644
  }
641
645
 
642
646
  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
  })
@@ -725,3 +726,13 @@ export const lightenDarkenColor = (color: any) => {
725
726
  return false
726
727
  }
727
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}>