ordering-ui-react-native 0.15.12 → 0.15.13-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 (147) hide show
  1. package/package.json +5 -3
  2. package/src/DeliveryApp.tsx +43 -1
  3. package/src/components/BusinessTypeFilter/index.tsx +12 -2
  4. package/src/components/BusinessTypeFilter/styles.tsx +1 -1
  5. package/src/components/BusinessesListing/index.tsx +1 -1
  6. package/src/components/Checkout/index.tsx +0 -1
  7. package/src/components/LanguageSelector/index.tsx +1 -0
  8. package/src/components/OrderDetails/index.tsx +26 -5
  9. package/src/components/PaymentOptions/index.tsx +9 -16
  10. package/src/components/PaymentOptionsWebView/index.tsx +123 -124
  11. package/src/components/ProductForm/index.tsx +1 -1
  12. package/src/components/ProductForm/styles.tsx +1 -0
  13. package/src/components/StripeElementsForm/index.tsx +27 -48
  14. package/src/components/VerifyPhone/styles.tsx +1 -2
  15. package/src/config.json +0 -2
  16. package/src/navigators/HomeNavigator.tsx +6 -0
  17. package/src/pages/BusinessProductsList.tsx +1 -0
  18. package/src/pages/BusinessesListing.tsx +1 -1
  19. package/src/pages/Checkout.tsx +1 -1
  20. package/src/pages/Sessions.tsx +22 -0
  21. package/src/types/index.tsx +1 -9
  22. package/themes/business/index.tsx +2 -0
  23. package/themes/business/src/components/Chat/index.tsx +3 -2
  24. package/themes/business/src/components/Home/index.tsx +128 -55
  25. package/themes/business/src/components/Home/styles.tsx +8 -1
  26. package/themes/business/src/components/NewOrderNotification/index.tsx +59 -98
  27. package/themes/business/src/components/OrderDetails/Business.tsx +2 -1
  28. package/themes/business/src/components/OrderDetails/Delivery.tsx +9 -9
  29. package/themes/business/src/components/OrderDetails/OrderContentComponent.tsx +150 -89
  30. package/themes/business/src/components/OrderDetails/OrderHeaderComponent.tsx +91 -17
  31. package/themes/business/src/components/OrderDetails/styles.tsx +7 -0
  32. package/themes/business/src/components/OrdersListManager/index.tsx +874 -0
  33. package/themes/business/src/components/OrdersListManager/styles.tsx +123 -0
  34. package/themes/business/src/components/OrdersListManager/utils.tsx +216 -0
  35. package/themes/business/src/components/OrdersOption/index.tsx +70 -116
  36. package/themes/business/src/components/OrdersOption/styles.tsx +2 -5
  37. package/themes/business/src/components/PreviousOrders/index.tsx +82 -23
  38. package/themes/doordash/src/components/BusinessesListing/index.tsx +1 -1
  39. package/themes/doordash/src/components/LoginForm/index.tsx +1 -2
  40. package/themes/instacart/src/components/BusinessesListing/index.tsx +1 -1
  41. package/themes/kiosk/src/components/BusinessController/index.tsx +27 -6
  42. package/themes/kiosk/src/components/BusinessController/styles.tsx +1 -1
  43. package/themes/kiosk/src/components/BusinessProductsListing/index.tsx +48 -21
  44. package/themes/kiosk/src/components/Cart/index.tsx +98 -24
  45. package/themes/kiosk/src/components/Cart/styles.tsx +6 -0
  46. package/themes/kiosk/src/components/CartBottomSheet/index.tsx +1 -1
  47. package/themes/kiosk/src/components/CartBottomSheet/styles.tsx +1 -1
  48. package/themes/kiosk/src/components/CartContent/index.tsx +13 -3
  49. package/themes/kiosk/src/components/CartItem/index.tsx +20 -8
  50. package/themes/kiosk/src/components/CategoriesMenu/index.tsx +6 -5
  51. package/themes/kiosk/src/components/CustomerName/index.tsx +89 -88
  52. package/themes/kiosk/src/components/Intro/index.tsx +13 -13
  53. package/themes/kiosk/src/components/LanguageSelector/index.tsx +12 -8
  54. package/themes/kiosk/src/components/NavBar/index.tsx +14 -14
  55. package/themes/kiosk/src/components/OptionCard/index.tsx +1 -1
  56. package/themes/kiosk/src/components/OrderDetails/index.tsx +136 -41
  57. package/themes/kiosk/src/components/OrderDetails/styles.tsx +5 -0
  58. package/themes/kiosk/src/components/OrderSummary/index.tsx +1 -1
  59. package/themes/kiosk/src/components/OrderTypeCardSelector/index.tsx +10 -12
  60. package/themes/kiosk/src/components/ProductForm/index.tsx +174 -125
  61. package/themes/kiosk/src/components/ProductForm/styles.tsx +1 -1
  62. package/themes/kiosk/src/components/ProductOption/index.tsx +1 -0
  63. package/themes/kiosk/src/components/ProductOption/styles.tsx +1 -0
  64. package/themes/kiosk/src/components/UpsellingProducts/index.tsx +48 -34
  65. package/themes/kiosk/src/components/shared/OButton.tsx +5 -18
  66. package/themes/kiosk/src/components/shared/OCard.tsx +112 -78
  67. package/themes/kiosk/src/types/index.d.ts +2 -0
  68. package/themes/original/index.tsx +179 -0
  69. package/themes/original/src/components/AddressForm/index.tsx +15 -10
  70. package/themes/original/src/components/AddressList/index.tsx +28 -2
  71. package/themes/original/src/components/AppleLogin/index.tsx +119 -78
  72. package/themes/original/src/components/BusinessBasicInformation/index.tsx +96 -45
  73. package/themes/original/src/components/BusinessBasicInformation/styles.tsx +28 -1
  74. package/themes/original/src/components/BusinessController/index.tsx +52 -22
  75. package/themes/original/src/components/BusinessController/styles.tsx +22 -0
  76. package/themes/original/src/components/BusinessFeaturedController/index.tsx +20 -1
  77. package/themes/original/src/components/BusinessFeaturedController/styles.tsx +23 -0
  78. package/themes/original/src/components/BusinessListingSearch/index.tsx +4 -0
  79. package/themes/original/src/components/BusinessMenuList/index.tsx +11 -4
  80. package/themes/original/src/components/BusinessPreorder/index.tsx +141 -121
  81. package/themes/original/src/components/BusinessProductsCategories/index.tsx +7 -5
  82. package/themes/original/src/components/BusinessProductsList/index.tsx +129 -22
  83. package/themes/original/src/components/BusinessProductsList/styles.tsx +29 -2
  84. package/themes/original/src/components/BusinessProductsListing/index.tsx +92 -37
  85. package/themes/original/src/components/BusinessProductsListing/styles.tsx +22 -0
  86. package/themes/original/src/components/BusinessReviews/index.tsx +4 -25
  87. package/themes/original/src/components/BusinessesListing/index.tsx +40 -53
  88. package/themes/original/src/components/Cart/index.tsx +41 -10
  89. package/themes/original/src/components/CartContent/index.tsx +2 -2
  90. package/themes/original/src/components/Checkout/index.tsx +23 -27
  91. package/themes/original/src/components/CouponControl/index.tsx +1 -0
  92. package/themes/original/src/components/DriverTips/index.tsx +1 -1
  93. package/themes/original/src/components/ForgotPasswordForm/index.tsx +8 -12
  94. package/themes/original/src/components/HighestRatedBusinesses/index.tsx +97 -89
  95. package/themes/original/src/components/Home/index.tsx +1 -1
  96. package/themes/original/src/components/LoginForm/index.tsx +156 -70
  97. package/themes/original/src/components/LoginForm/styles.tsx +6 -1
  98. package/themes/original/src/components/Messages/index.tsx +50 -45
  99. package/themes/original/src/components/Messages/styles.tsx +1 -3
  100. package/themes/original/src/components/MomentOption/index.tsx +10 -1
  101. package/themes/original/src/components/MomentOption/styles.tsx +1 -1
  102. package/themes/original/src/components/OrderDetails/index.tsx +105 -127
  103. package/themes/original/src/components/OrderDetails/styles.tsx +3 -1
  104. package/themes/original/src/components/OrderProgress/index.tsx +4 -4
  105. package/themes/original/src/components/OrderProgress/styles.tsx +1 -0
  106. package/themes/original/src/components/OrderSummary/index.tsx +35 -2
  107. package/themes/original/src/components/OrderTypeSelector/index.tsx +1 -1
  108. package/themes/original/src/components/OrdersOption/index.tsx +15 -46
  109. package/themes/original/src/components/OrdersOption/styles.tsx +0 -6
  110. package/themes/original/src/components/PaymentOptionWallet/index.tsx +6 -2
  111. package/themes/original/src/components/PaymentOptions/index.tsx +9 -19
  112. package/themes/original/src/components/PhoneInputNumber/index.tsx +15 -8
  113. package/themes/original/src/components/PlaceSpot/index.tsx +114 -0
  114. package/themes/original/src/components/PlaceSpot/styles.tsx +11 -0
  115. package/themes/original/src/components/PreviousOrders/index.tsx +19 -13
  116. package/themes/original/src/components/ProductForm/index.tsx +47 -36
  117. package/themes/original/src/components/ProductForm/styles.tsx +2 -2
  118. package/themes/original/src/components/Promotions/index.tsx +233 -0
  119. package/themes/original/src/components/Promotions/styles.tsx +58 -0
  120. package/themes/original/src/components/ReviewOrder/index.tsx +10 -9
  121. package/themes/original/src/components/ReviewProducts/index.tsx +1 -1
  122. package/themes/original/src/components/Sessions/index.tsx +160 -0
  123. package/themes/original/src/components/Sessions/styles.tsx +15 -0
  124. package/themes/original/src/components/SignupForm/index.tsx +173 -154
  125. package/themes/original/src/components/SingleProductCard/index.tsx +39 -18
  126. package/themes/original/src/components/SingleProductCard/styles.tsx +28 -1
  127. package/themes/original/src/components/StripeElementsForm/index.tsx +55 -72
  128. package/themes/original/src/components/TaxInformation/index.tsx +17 -7
  129. package/themes/original/src/components/UpsellingProducts/index.tsx +6 -6
  130. package/themes/original/src/components/UserDetails/index.tsx +4 -95
  131. package/themes/original/src/components/UserFormDetails/index.tsx +2 -14
  132. package/themes/original/src/components/UserProfile/index.tsx +29 -17
  133. package/themes/original/src/components/UserProfileForm/index.tsx +8 -6
  134. package/themes/original/src/components/VerifyPhone/index.tsx +10 -7
  135. package/themes/original/src/components/VerifyPhone/styles.tsx +2 -1
  136. package/themes/original/src/components/Wallets/index.tsx +58 -4
  137. package/themes/original/src/components/Wallets/styles.tsx +21 -0
  138. package/themes/original/src/components/shared/HeaderTitle.tsx +21 -0
  139. package/themes/original/src/components/shared/index.tsx +2 -0
  140. package/themes/original/src/config/constants.tsx +6 -6
  141. package/themes/original/src/types/index.tsx +70 -23
  142. package/themes/original/src/utils/index.tsx +12 -2
  143. package/themes/single-business/src/components/AddressList/index.tsx +1 -1
  144. package/themes/single-business/src/components/OrderTypeSelector/index.tsx +6 -6
  145. package/themes/single-business/src/components/UserProfile/index.tsx +1 -1
  146. package/themes/uber-eats/src/components/BusinessesListing/index.tsx +1 -1
  147. package/src/components/StripeMethodForm/index.tsx +0 -168
@@ -30,6 +30,7 @@ interface OrderHeader {
30
30
  logisticOrderStatus?: Array<number>,
31
31
  handleViewSummaryOrder?: any;
32
32
  handleCopyClipboard?: any
33
+ isCustomView?: any
33
34
  }
34
35
 
35
36
  export const OrderHeaderComponent = (props: OrderHeader) => {
@@ -105,17 +106,17 @@ export const OrderHeaderComponent = (props: OrderHeader) => {
105
106
 
106
107
  return (
107
108
  <>
108
- <Header>
109
- <OIconButton
110
- icon={theme.images.general.arrow_left}
111
- iconStyle={{ width: 20, height: 20 }}
112
- borderColor={theme.colors.clear}
113
- style={{ ...styles.icons, justifyContent: 'flex-end' }}
114
- onClick={() => handleArrowBack()}
115
- />
116
-
117
- {
118
- (!order?.isLogistic || (!logisticOrderStatus?.includes(order?.status) && !order?.order_group)) && (
109
+ {!props.isCustomView && (
110
+ <Header>
111
+ <OIconButton
112
+ icon={theme.images.general.arrow_left}
113
+ iconStyle={{ width: 20, height: 20 }}
114
+ borderColor={theme.colors.clear}
115
+ style={{ ...styles.icons, justifyContent: 'flex-end' }}
116
+ onClick={() => handleArrowBack()}
117
+ />
118
+
119
+ {(!order?.isLogistic || (!logisticOrderStatus?.includes(order?.status) && !order?.order_group)) && (
119
120
  <Actions>
120
121
  {getOrderStatus(order?.status, t)?.value !==
121
122
  t('PENDING', 'Pending') && (
@@ -170,13 +171,80 @@ export const OrderHeaderComponent = (props: OrderHeader) => {
170
171
  />
171
172
  </Actions>
172
173
  )}
173
- </Header>
174
+ </Header>
175
+ )}
174
176
  <OrderHeader>
175
- <OText size={13} style={{ marginBottom: 5 }}>
176
- {order?.delivery_datetime_utc
177
- ? parseDate(order?.delivery_datetime_utc)
178
- : parseDate(order?.delivery_datetime, { utc: false })}
179
- </OText>
177
+ {!props.isCustomView ? (
178
+ <OText size={13} style={{ marginBottom: 5 }}>
179
+ {order?.delivery_datetime_utc
180
+ ? parseDate(order?.delivery_datetime_utc)
181
+ : parseDate(order?.delivery_datetime, { utc: false })}
182
+ </OText>
183
+ ) : (
184
+ <Header style={{ alignItems: 'center' }}>
185
+ <OText size={13} style={{ marginBottom: 5 }}>
186
+ {order?.delivery_datetime_utc
187
+ ? parseDate(order?.delivery_datetime_utc)
188
+ : parseDate(order?.delivery_datetime, { utc: false })}
189
+ </OText>
190
+
191
+ {(!order?.isLogistic || (!logisticOrderStatus?.includes(order?.status) && !order?.order_group)) && (
192
+ <Actions>
193
+ {getOrderStatus(order?.status, t)?.value !==
194
+ t('PENDING', 'Pending') && (
195
+ <>
196
+ <OIconButton
197
+ icon={theme.images.general.copy}
198
+ iconStyle={{
199
+ width: 20,
200
+ height: 25,
201
+ top: 2,
202
+ tintColor: theme.colors.backArrow,
203
+ }}
204
+ borderColor={theme.colors.clear}
205
+ style={styles.icons}
206
+ onClick={() => handleCopyClipboard?.()}
207
+ />
208
+ <OIconButton
209
+ icon={theme.images.general.print}
210
+ iconStyle={{
211
+ width: 25,
212
+ height: 22,
213
+ tintColor: theme.colors.backArrow,
214
+ }}
215
+ borderColor={theme.colors.clear}
216
+ style={styles.icons}
217
+ onClick={() => handleViewSummaryOrder?.()}
218
+ />
219
+ </>
220
+ )}
221
+ <OIconButton
222
+ icon={theme.images.general.map}
223
+ iconStyle={{
224
+ width: 20,
225
+ height: 20,
226
+ tintColor: theme.colors.backArrow,
227
+ }}
228
+ borderColor={theme.colors.clear}
229
+ style={styles.icons}
230
+ onClick={() => handleOpenMapView()}
231
+ />
232
+
233
+ <OIconButton
234
+ icon={theme.images.general.messages}
235
+ iconStyle={{
236
+ width: 20,
237
+ height: 20,
238
+ tintColor: theme.colors.backArrow,
239
+ }}
240
+ borderColor={theme.colors.clear}
241
+ style={styles.icons}
242
+ onClick={() => handleOpenMessagesForBusiness()}
243
+ />
244
+ </Actions>
245
+ )}
246
+ </Header>
247
+ )}
180
248
 
181
249
  <OText numberOfLines={2} size={20} weight="600">
182
250
  <>
@@ -200,6 +268,12 @@ export const OrderHeaderComponent = (props: OrderHeader) => {
200
268
  <OText size={13} weight='bold'>{`${t('ORDER_TYPE', 'Order Type')}: `}</OText>
201
269
  {orderTypes(order.delivery_type)}
202
270
  </OText>
271
+ {order?.delivery_option && (
272
+ <OText size={13}>
273
+ <OText size={13} weight='bold'>{`${t('DELIVERY_PREFERENCE', 'Delivery Preference')}: `}</OText>
274
+ {order?.delivery_option?.name}
275
+ </OText>
276
+ )}
203
277
  {order?.payment_events?.length > 0 && (
204
278
  <View>
205
279
  <OText size={13}>
@@ -91,3 +91,10 @@ export const AssignDriver = styled.View`
91
91
  padding-vertical: 10px;
92
92
  margin-bottom: 10px;
93
93
  `;
94
+
95
+ export const OSRow = styled.View`
96
+ flex-direction: row;
97
+ overflow: hidden;
98
+ width: 70%;
99
+ flex-wrap: wrap;
100
+ `