ordering-ui-react-native 0.14.94 → 0.14.96-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.
- package/package.json +6 -3
- package/src/DeliveryApp.tsx +32 -1
- package/src/components/BusinessTypeFilter/index.tsx +9 -2
- package/src/components/BusinessTypeFilter/styles.tsx +1 -1
- package/src/components/BusinessesListing/index.tsx +1 -1
- package/src/components/Cart/index.tsx +1 -1
- package/src/components/Checkout/index.tsx +0 -1
- package/src/components/Home/index.tsx +3 -5
- package/src/components/LanguageSelector/index.tsx +65 -97
- package/src/components/LanguageSelector/styles.tsx +4 -17
- package/src/components/Messages/index.tsx +38 -30
- package/src/components/MomentOption/index.tsx +3 -1
- package/src/components/OrderDetails/index.tsx +26 -5
- package/src/components/PaymentOptions/index.tsx +7 -16
- package/src/components/PaymentOptionsWebView/index.tsx +123 -124
- package/src/components/ProductForm/index.tsx +1 -1
- package/src/components/ProductForm/styles.tsx +1 -0
- package/src/components/StripeElementsForm/index.tsx +27 -48
- package/src/components/UserProfileForm/index.tsx +35 -1
- package/src/components/VerifyPhone/styles.tsx +1 -2
- package/src/config.json +0 -2
- package/src/pages/Checkout.tsx +1 -1
- package/src/types/index.tsx +2 -9
- package/src/utils/index.tsx +2 -1
- package/themes/business/index.tsx +2 -0
- package/themes/business/src/components/Chat/index.tsx +32 -31
- package/themes/business/src/components/OrderDetails/Business.tsx +1 -0
- package/themes/business/src/components/OrderDetails/OrderHeaderComponent.tsx +85 -17
- package/themes/business/src/components/OrdersListManager/index.tsx +871 -0
- package/themes/business/src/components/OrdersListManager/styles.tsx +123 -0
- package/themes/business/src/components/OrdersListManager/utils.tsx +216 -0
- package/themes/business/src/components/OrdersOption/index.tsx +18 -68
- package/themes/business/src/components/OrdersOption/styles.tsx +2 -5
- package/themes/business/src/components/PreviousOrders/index.tsx +80 -23
- package/themes/doordash/src/components/BusinessesListing/index.tsx +1 -1
- package/themes/doordash/src/components/LoginForm/index.tsx +1 -2
- package/themes/instacart/src/components/BusinessesListing/index.tsx +1 -1
- package/themes/kiosk/src/components/BusinessController/index.tsx +27 -6
- package/themes/kiosk/src/components/BusinessController/styles.tsx +1 -1
- package/themes/kiosk/src/components/BusinessProductsListing/index.tsx +51 -24
- package/themes/kiosk/src/components/Cart/index.tsx +1 -1
- package/themes/kiosk/src/components/CartBottomSheet/index.tsx +1 -1
- package/themes/kiosk/src/components/CartBottomSheet/styles.tsx +1 -1
- package/themes/kiosk/src/components/CartContent/index.tsx +13 -3
- package/themes/kiosk/src/components/CartItem/index.tsx +20 -8
- package/themes/kiosk/src/components/CategoriesMenu/index.tsx +7 -5
- package/themes/kiosk/src/components/CustomerName/index.tsx +89 -88
- package/themes/kiosk/src/components/Intro/index.tsx +13 -13
- package/themes/kiosk/src/components/LanguageSelector/index.tsx +12 -8
- package/themes/kiosk/src/components/NavBar/index.tsx +14 -14
- package/themes/kiosk/src/components/OptionCard/index.tsx +1 -1
- package/themes/kiosk/src/components/OrderDetails/index.tsx +2 -2
- package/themes/kiosk/src/components/OrderSummary/index.tsx +1 -1
- package/themes/kiosk/src/components/OrderTypeCardSelector/index.tsx +10 -12
- package/themes/kiosk/src/components/ProductForm/index.tsx +172 -124
- package/themes/kiosk/src/components/ProductForm/styles.tsx +1 -1
- package/themes/kiosk/src/components/ProductOption/index.tsx +1 -0
- package/themes/kiosk/src/components/ProductOption/styles.tsx +1 -0
- package/themes/kiosk/src/components/UpsellingProducts/index.tsx +48 -34
- package/themes/kiosk/src/components/shared/OButton.tsx +5 -18
- package/themes/kiosk/src/components/shared/OCard.tsx +112 -78
- package/themes/original/index.tsx +28 -2
- package/themes/original/src/components/AddressForm/index.tsx +15 -10
- package/themes/original/src/components/AddressList/index.tsx +27 -1
- package/themes/original/src/components/AnalyticsSegment/index.tsx +127 -0
- package/themes/original/src/components/BusinessBasicInformation/index.tsx +100 -45
- package/themes/original/src/components/BusinessBasicInformation/styles.tsx +28 -1
- package/themes/original/src/components/BusinessController/index.tsx +36 -22
- package/themes/original/src/components/BusinessMenuList/index.tsx +14 -5
- package/themes/original/src/components/BusinessPreorder/index.tsx +142 -121
- package/themes/original/src/components/BusinessProductsCategories/index.tsx +7 -5
- package/themes/original/src/components/BusinessProductsList/index.tsx +52 -8
- package/themes/original/src/components/BusinessProductsListing/index.tsx +21 -15
- package/themes/original/src/components/BusinessReviews/index.tsx +4 -3
- package/themes/original/src/components/BusinessTypeFilter/index.tsx +2 -13
- package/themes/original/src/components/BusinessesListing/index.tsx +41 -58
- package/themes/original/src/components/Cart/index.tsx +42 -9
- package/themes/original/src/components/CartContent/index.tsx +2 -2
- package/themes/original/src/components/Checkout/index.tsx +56 -32
- package/themes/original/src/components/Checkout/styles.tsx +7 -0
- package/themes/original/src/components/CouponControl/index.tsx +1 -0
- package/themes/original/src/components/DriverTips/index.tsx +1 -1
- package/themes/original/src/components/ForgotPasswordForm/index.tsx +8 -12
- package/themes/original/src/components/HighestRatedBusinesses/index.tsx +105 -90
- package/themes/original/src/components/LoginForm/index.tsx +83 -68
- package/themes/original/src/components/Messages/index.tsx +52 -45
- package/themes/original/src/components/Messages/styles.tsx +1 -3
- package/themes/original/src/components/MomentOption/index.tsx +127 -152
- package/themes/original/src/components/MomentOption/styles.tsx +42 -18
- package/themes/original/src/components/OrderDetails/index.tsx +103 -124
- package/themes/original/src/components/OrderDetails/styles.tsx +3 -1
- package/themes/original/src/components/OrderProgress/index.tsx +5 -6
- package/themes/original/src/components/OrderSummary/index.tsx +34 -1
- package/themes/original/src/components/OrdersOption/index.tsx +15 -46
- package/themes/original/src/components/OrdersOption/styles.tsx +0 -6
- package/themes/original/src/components/PaymentOptions/index.tsx +24 -25
- package/themes/original/src/components/PhoneInputNumber/index.tsx +15 -8
- package/themes/original/src/components/PlaceSpot/index.tsx +114 -0
- package/themes/original/src/components/PlaceSpot/styles.tsx +11 -0
- package/themes/original/src/components/PreviousOrders/index.tsx +19 -13
- package/themes/original/src/components/ProductForm/index.tsx +153 -104
- package/themes/original/src/components/ProductForm/styles.tsx +5 -3
- package/themes/original/src/components/ProductOptionSubOption/index.tsx +6 -1
- package/themes/original/src/components/ReviewOrder/index.tsx +10 -9
- package/themes/original/src/components/ReviewProducts/index.tsx +1 -1
- package/themes/original/src/components/SearchBar/index.tsx +4 -10
- package/themes/original/src/components/SignupForm/index.tsx +173 -154
- package/themes/original/src/components/SingleProductCard/index.tsx +7 -22
- package/themes/original/src/components/StripeElementsForm/index.tsx +55 -72
- package/themes/original/src/components/UpsellingProducts/index.tsx +6 -6
- package/themes/original/src/components/UserDetails/index.tsx +4 -95
- package/themes/original/src/components/UserFormDetails/index.tsx +2 -14
- package/themes/original/src/components/UserProfile/index.tsx +16 -11
- package/themes/original/src/components/UserProfileForm/index.tsx +16 -8
- package/themes/original/src/components/VerifyPhone/index.tsx +10 -7
- package/themes/original/src/components/VerifyPhone/styles.tsx +2 -1
- package/themes/original/src/components/shared/HeaderTitle.tsx +20 -0
- package/themes/original/src/components/shared/OInput.tsx +1 -2
- package/themes/original/src/components/shared/index.tsx +2 -0
- package/themes/original/src/types/index.tsx +25 -28
- package/themes/single-business/src/components/OrderTypeSelector/index.tsx +5 -5
- package/themes/uber-eats/src/components/BusinessesListing/index.tsx +1 -1
- package/src/components/StripeMethodForm/index.tsx +0 -163
- package/themes/original/src/components/BusinessListingSearch/index.tsx +0 -469
- package/themes/original/src/components/BusinessListingSearch/styles.tsx +0 -76
|
@@ -94,8 +94,8 @@ const ChatUI = (props: MessagesParams) => {
|
|
|
94
94
|
Dimensions.get('window').width < Dimensions.get('window').height
|
|
95
95
|
? parseInt(parseFloat(String(Dimensions.get('window').width)).toFixed(0))
|
|
96
96
|
: parseInt(
|
|
97
|
-
|
|
98
|
-
|
|
97
|
+
parseFloat(String(Dimensions.get('window').height)).toFixed(0),
|
|
98
|
+
);
|
|
99
99
|
|
|
100
100
|
const [orientation, setOrientation] = useState<string>(
|
|
101
101
|
Dimensions.get('window').width < Dimensions.get('window').height
|
|
@@ -218,7 +218,7 @@ const ChatUI = (props: MessagesParams) => {
|
|
|
218
218
|
paddingLeft: 12,
|
|
219
219
|
paddingRight: 5,
|
|
220
220
|
},
|
|
221
|
-
editButton
|
|
221
|
+
editButton: {
|
|
222
222
|
borderRadius: 50,
|
|
223
223
|
backgroundColor: '#E9ECEF',
|
|
224
224
|
marginRight: 10,
|
|
@@ -272,9 +272,10 @@ const ChatUI = (props: MessagesParams) => {
|
|
|
272
272
|
launchImageLibrary(
|
|
273
273
|
{
|
|
274
274
|
mediaType: 'photo',
|
|
275
|
-
maxHeight:
|
|
276
|
-
maxWidth:
|
|
275
|
+
maxHeight: 2048,
|
|
276
|
+
maxWidth: 2048,
|
|
277
277
|
includeBase64: true,
|
|
278
|
+
quality: 1
|
|
278
279
|
},
|
|
279
280
|
(response: any) => {
|
|
280
281
|
if (response.didCancel) {
|
|
@@ -366,15 +367,18 @@ const ChatUI = (props: MessagesParams) => {
|
|
|
366
367
|
return 'ORDER_CUSTOMER_ALMOST_ARRIVED_BUSINESS';
|
|
367
368
|
case 21:
|
|
368
369
|
return 'ORDER_CUSTOMER_ARRIVED_BUSINESS';
|
|
370
|
+
case 22:
|
|
371
|
+
return 'ORDER_LOOKING_FOR_DRIVER'
|
|
372
|
+
case 23:
|
|
373
|
+
return 'ORDER_DRIVER_ON_WAY'
|
|
369
374
|
default:
|
|
370
375
|
return ``;
|
|
371
376
|
}
|
|
372
377
|
}
|
|
373
378
|
|
|
374
379
|
if (attribute === 'prepared_in' || attribute === 'delivered_in') {
|
|
375
|
-
return `${hour < 10 ? '0' + hour : hour}:${min < 10 ? '0' + min : min} ${
|
|
376
|
-
|
|
377
|
-
}`;
|
|
380
|
+
return `${hour < 10 ? '0' + hour : hour}:${min < 10 ? '0' + min : min} ${status > 60 ? 'hours' : 'minutes'
|
|
381
|
+
}`;
|
|
378
382
|
}
|
|
379
383
|
};
|
|
380
384
|
|
|
@@ -400,30 +404,27 @@ const ChatUI = (props: MessagesParams) => {
|
|
|
400
404
|
style={{ ...styles.firstMessageText, textAlign: 'center' }}>
|
|
401
405
|
{message.change?.attribute !== 'driver_id'
|
|
402
406
|
? `${t('ORDER', 'Order')} ${t(
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
? t(
|
|
408
|
-
getStatus(
|
|
409
|
-
parseInt(message.change.old, 10),
|
|
410
|
-
message.change?.attribute,
|
|
411
|
-
),
|
|
412
|
-
)
|
|
413
|
-
: '0'
|
|
414
|
-
} ${t('TO', 'to')} ${t(
|
|
407
|
+
message.change.attribute.toUpperCase(),
|
|
408
|
+
message.change.attribute,
|
|
409
|
+
)} ${t('CHANGED_FROM', 'Changed from')} ${message.change.old !== null
|
|
410
|
+
? t(
|
|
415
411
|
getStatus(
|
|
416
|
-
parseInt(message.change.
|
|
412
|
+
parseInt(message.change.old, 10),
|
|
417
413
|
message.change?.attribute,
|
|
418
414
|
),
|
|
419
|
-
)
|
|
415
|
+
)
|
|
416
|
+
: '0'
|
|
417
|
+
} ${t('TO', 'to')} ${t(
|
|
418
|
+
getStatus(
|
|
419
|
+
parseInt(message.change.new, 10),
|
|
420
|
+
message.change?.attribute,
|
|
421
|
+
),
|
|
422
|
+
)}`
|
|
420
423
|
: message.change.new
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
} ${t('WAS_ASSIGNED_AS_DRIVER', 'Was assigned as driver')} ${
|
|
424
|
-
message.comment ? message.comment.length : ''
|
|
424
|
+
? `${message.driver?.name} ${message.driver?.lastname !== null ? message.driver.lastname : ''
|
|
425
|
+
} ${t('WAS_ASSIGNED_AS_DRIVER', 'Was assigned as driver')} ${message.comment ? message.comment.length : ''
|
|
425
426
|
}`
|
|
426
|
-
|
|
427
|
+
: `${t('DRIVER_UNASSIGNED', 'Driver unassigned')}`}
|
|
427
428
|
</OText>
|
|
428
429
|
<OText size={10} color={'#aaa'} style={{ alignSelf: 'flex-start' }}>
|
|
429
430
|
{parseTime(message?.created_at, { outputFormat: 'hh:mma' })}
|
|
@@ -928,8 +929,8 @@ const ChatUI = (props: MessagesParams) => {
|
|
|
928
929
|
borderWidth: 0,
|
|
929
930
|
opacity:
|
|
930
931
|
sendMessage?.loading ||
|
|
931
|
-
|
|
932
|
-
|
|
932
|
+
(message === '' && !image) ||
|
|
933
|
+
messages?.loading
|
|
933
934
|
? 0.6
|
|
934
935
|
: 1,
|
|
935
936
|
borderColor: theme.colors.transparent,
|
|
@@ -1034,7 +1035,7 @@ const ChatUI = (props: MessagesParams) => {
|
|
|
1034
1035
|
<OIcon
|
|
1035
1036
|
url={optimizeImage(
|
|
1036
1037
|
order?.customer?.photo ||
|
|
1037
|
-
|
|
1038
|
+
theme?.images?.dummies?.customerPhoto,
|
|
1038
1039
|
'h_300,c_limit',
|
|
1039
1040
|
)}
|
|
1040
1041
|
style={styles.avatarIcon}
|
|
@@ -1141,7 +1142,7 @@ const ChatUI = (props: MessagesParams) => {
|
|
|
1141
1142
|
backgroundColor={theme.colors.composerView}
|
|
1142
1143
|
onEnd={handleEnd}
|
|
1143
1144
|
/>
|
|
1144
|
-
|
|
1145
|
+
<TouchableOpacity
|
|
1145
1146
|
style={{
|
|
1146
1147
|
position: 'absolute',
|
|
1147
1148
|
right: 35,
|
|
@@ -431,6 +431,7 @@ export const OrderDetailsUI = (props: OrderDetailsParams) => {
|
|
|
431
431
|
handleViewSummaryOrder={handleViewSummaryOrder}
|
|
432
432
|
handleCopyClipboard={handleCopyClipboard}
|
|
433
433
|
handleArrowBack={handleArrowBack}
|
|
434
|
+
isCustomView={props.isCustomView}
|
|
434
435
|
/>
|
|
435
436
|
<OrderDetailsContainer
|
|
436
437
|
keyboardShouldPersistTaps="handled"
|
|
@@ -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
|
-
|
|
109
|
-
<
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
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
|
-
|
|
174
|
+
</Header>
|
|
175
|
+
)}
|
|
174
176
|
<OrderHeader>
|
|
175
|
-
|
|
176
|
-
{
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
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
|
<>
|