ordering-ui-react-native 0.16.40 → 0.16.41-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 +7 -5
- package/src/DeliveryApp.tsx +43 -1
- package/src/components/ActiveOrders/index.tsx +61 -63
- package/src/components/ActiveOrders/styles.tsx +8 -14
- package/src/components/BusinessBasicInformation/index.tsx +11 -19
- package/src/components/BusinessInformation/index.tsx +33 -4
- package/src/components/BusinessInformation/styles.tsx +2 -2
- package/src/components/BusinessProductsList/index.tsx +10 -10
- package/src/components/BusinessesListing/index.tsx +1 -1
- package/src/components/Checkout/index.tsx +2 -1
- package/src/components/LanguageSelector/index.tsx +21 -16
- package/src/components/LoginForm/index.tsx +15 -0
- package/src/components/Messages/index.tsx +2 -2
- package/src/components/NotificationSetting/index.tsx +85 -0
- package/src/components/OrdersOption/index.tsx +54 -56
- package/src/components/PaymentOptions/index.tsx +298 -345
- package/src/components/PaymentOptionsWebView/index.tsx +120 -121
- package/src/components/ReviewDriver/index.tsx +1 -1
- package/src/components/ReviewOrder/index.tsx +1 -1
- package/src/components/ReviewProducts/index.tsx +11 -0
- package/src/components/SignupForm/index.tsx +15 -0
- package/src/components/SingleProductReview/index.tsx +8 -5
- package/src/components/StripeElementsForm/index.tsx +25 -16
- package/src/components/VerifyPhone/styles.tsx +1 -2
- package/src/components/shared/OBottomPopup.tsx +6 -2
- package/src/index.tsx +2 -0
- package/src/pages/BusinessesListing.tsx +7 -6
- package/src/pages/OrderDetails.tsx +1 -1
- package/src/pages/ReviewDriver.tsx +2 -2
- package/src/pages/ReviewOrder.tsx +2 -2
- package/src/types/@fatnlazycat/react-native-recaptcha-v3/index.d.ts +1 -0
- package/src/utils/index.tsx +2 -1
- package/themes/business/src/components/BusinessController/index.tsx +2 -2
- package/themes/business/src/components/Chat/index.tsx +40 -32
- package/themes/business/src/components/DriverMap/index.tsx +7 -5
- package/themes/business/src/components/DriverSchedule/index.tsx +36 -19
- package/themes/business/src/components/LoginForm/index.tsx +111 -74
- package/themes/business/src/components/MapView/index.tsx +12 -1
- package/themes/business/src/components/MessagesOption/index.tsx +11 -1
- package/themes/business/src/components/NewOrderNotification/index.tsx +26 -41
- package/themes/business/src/components/OrderDetails/Business.tsx +1 -1
- package/themes/business/src/components/OrderDetails/OrderContentComponent.tsx +25 -19
- package/themes/business/src/components/OrdersListManager/index.tsx +10 -3
- package/themes/business/src/components/OrdersOption/index.tsx +65 -21
- package/themes/business/src/components/OrdersOption/styles.tsx +5 -1
- package/themes/business/src/components/OrdersOptionBusiness/index.tsx +15 -1
- package/themes/business/src/components/OrdersOptionCity/index.tsx +15 -1
- package/themes/business/src/components/OrdersOptionDate/index.tsx +19 -6
- package/themes/business/src/components/OrdersOptionDelivery/index.tsx +15 -1
- package/themes/business/src/components/OrdersOptionDriver/index.tsx +15 -1
- package/themes/business/src/components/OrdersOptionPaymethod/index.tsx +15 -1
- package/themes/business/src/components/OrdersOptionStatus/index.tsx +10 -1
- package/themes/business/src/components/PreviousMessages/index.tsx +17 -18
- package/themes/business/src/components/PreviousOrders/index.tsx +22 -24
- package/themes/business/src/components/ProductItemAccordion/index.tsx +3 -2
- package/themes/business/src/components/ReviewCustomer/index.tsx +27 -13
- package/themes/business/src/components/ScheduleBlocked/index.tsx +2 -2
- package/themes/business/src/components/UserFormDetails/index.tsx +5 -2
- package/themes/business/src/components/UserProfileForm/index.tsx +2 -0
- package/themes/business/src/components/shared/ODropDown.tsx +42 -8
- package/themes/business/src/components/shared/ODropDownCalendar.tsx +36 -7
- package/themes/business/src/types/index.tsx +15 -9
- package/themes/business/src/utils/index.tsx +10 -0
- 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/BusinessesListing/index.tsx +2 -1
- package/themes/kiosk/src/components/Checkout/index.tsx +6 -0
- package/themes/kiosk/src/components/LoginForm/index.tsx +121 -10
- package/themes/kiosk/src/components/LoginForm/styles.tsx +5 -0
- 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/OrderTypeCardSelector/index.tsx +8 -10
- package/themes/kiosk/src/components/ProductForm/index.tsx +1 -14
- package/themes/kiosk/src/components/shared/OButton.tsx +5 -18
- package/themes/kiosk/src/types/index.d.ts +2 -0
- package/themes/original/index.tsx +4 -0
- package/themes/original/src/components/AddressDetails/index.tsx +10 -8
- package/themes/original/src/components/AddressForm/index.tsx +157 -140
- package/themes/original/src/components/AddressList/index.tsx +1 -1
- package/themes/original/src/components/AppleLogin/index.tsx +4 -4
- package/themes/original/src/components/BusinessBasicInformation/index.tsx +260 -176
- package/themes/original/src/components/BusinessBasicInformation/styles.tsx +2 -2
- package/themes/original/src/components/BusinessController/index.tsx +216 -113
- package/themes/original/src/components/BusinessController/styles.tsx +1 -8
- package/themes/original/src/components/BusinessItemAccordion/index.tsx +12 -6
- package/themes/original/src/components/BusinessListingSearch/BusinessControllerSkeletons/index.tsx +57 -0
- package/themes/original/src/components/BusinessListingSearch/MaxSectionItem/index.tsx +59 -0
- package/themes/original/src/components/BusinessListingSearch/MaxSectionItem/styles.tsx +13 -0
- package/themes/original/src/components/BusinessListingSearch/index.tsx +109 -139
- package/themes/original/src/components/BusinessListingSearch/styles.tsx +10 -12
- package/themes/original/src/components/BusinessProductsList/SubcategoriesComponent/index.tsx +87 -0
- package/themes/original/src/components/BusinessProductsList/SubcategoriesComponent/styles.tsx +12 -0
- package/themes/original/src/components/BusinessProductsList/index.tsx +59 -60
- package/themes/original/src/components/BusinessProductsList/styles.tsx +0 -3
- package/themes/original/src/components/BusinessProductsListing/index.tsx +210 -115
- package/themes/original/src/components/BusinessProductsListing/styles.tsx +18 -11
- package/themes/original/src/components/BusinessReviews/index.tsx +6 -1
- package/themes/original/src/components/BusinessTypeFilter/index.tsx +3 -2
- package/themes/original/src/components/BusinessesListing/Layout/Appointment/index.tsx +37 -25
- package/themes/original/src/components/BusinessesListing/Layout/Appointment/styles.tsx +5 -4
- package/themes/original/src/components/BusinessesListing/Layout/Original/index.tsx +260 -109
- package/themes/original/src/components/BusinessesListing/Layout/Original/styles.tsx +47 -10
- package/themes/original/src/components/BusinessesListing/index.tsx +95 -7
- package/themes/original/src/components/Cart/index.tsx +53 -15
- package/themes/original/src/components/Cart/styles.tsx +4 -0
- package/themes/original/src/components/CartContent/index.tsx +22 -16
- package/themes/original/src/components/Checkout/index.tsx +114 -118
- package/themes/original/src/components/Checkout/styles.tsx +4 -3
- package/themes/original/src/components/CitiesControl/index.tsx +89 -0
- package/themes/original/src/components/CitiesControl/styles.tsx +17 -0
- package/themes/original/src/components/DriverTips/index.tsx +4 -4
- package/themes/original/src/components/DriverTips/styles.tsx +2 -1
- package/themes/original/src/components/FavoriteList/index.tsx +19 -0
- package/themes/original/src/components/FloatingButton/styles.tsx +1 -1
- package/themes/original/src/components/GPSButton/index.tsx +20 -19
- package/themes/original/src/components/GPSButton/styles.ts +3 -3
- package/themes/original/src/components/GoogleMap/index.tsx +20 -12
- package/themes/original/src/components/HelpAccountAndPayment/index.tsx +25 -10
- package/themes/original/src/components/HelpAccountAndPayment/styles.tsx +4 -0
- package/themes/original/src/components/HelpGuide/index.tsx +9 -8
- package/themes/original/src/components/HelpOrder/index.tsx +9 -8
- package/themes/original/src/components/LanguageSelector/index.tsx +19 -14
- package/themes/original/src/components/LoginForm/Otp/index.tsx +95 -73
- package/themes/original/src/components/LoginForm/index.tsx +98 -41
- package/themes/original/src/components/LottieAnimation/index.tsx +69 -0
- package/themes/original/src/components/Messages/index.tsx +20 -20
- package/themes/original/src/components/MomentOption/index.tsx +8 -6
- package/themes/original/src/components/MultiCartsPaymethodsAndWallets/index.tsx +92 -92
- package/themes/original/src/components/MultiCheckout/index.tsx +6 -0
- package/themes/original/src/components/MultiOrdersDetails/index.tsx +20 -16
- package/themes/original/src/components/MyOrders/index.tsx +88 -22
- package/themes/original/src/components/NavBar/index.tsx +15 -9
- package/themes/original/src/components/NetworkError/index.tsx +5 -3
- package/themes/original/src/components/NotFoundSource/index.tsx +2 -1
- package/themes/original/src/components/Notifications/index.tsx +148 -0
- package/themes/original/src/components/Notifications/styles.tsx +17 -0
- package/themes/original/src/components/OrderDetails/OrderHistory.tsx +167 -0
- package/themes/original/src/components/OrderDetails/index.tsx +200 -37
- package/themes/original/src/components/OrderDetails/styles.tsx +15 -2
- package/themes/original/src/components/OrderItAgain/index.tsx +75 -0
- package/themes/original/src/components/OrderItAgain/styles.tsx +10 -0
- package/themes/original/src/components/OrderProgress/index.tsx +77 -66
- package/themes/original/src/components/OrderProgress/styles.tsx +5 -0
- package/themes/original/src/components/OrderSummary/index.tsx +2 -35
- package/themes/original/src/components/OrderTypeSelector/index.tsx +85 -36
- package/themes/original/src/components/OrderTypeSelector/styles.tsx +19 -1
- package/themes/original/src/components/OrdersOption/PreviousBusinessOrdered/index.tsx +97 -106
- package/themes/original/src/components/OrdersOption/PreviousProductsOrdered/index.tsx +3 -0
- package/themes/original/src/components/OrdersOption/index.tsx +71 -55
- package/themes/original/src/components/PaymentOptionWallet/index.tsx +56 -56
- package/themes/original/src/components/PaymentOptions/index.tsx +1 -2
- package/themes/original/src/components/PhoneInputNumber/index.tsx +5 -11
- package/themes/original/src/components/PlaceSpot/index.tsx +249 -47
- package/themes/original/src/components/PlaceSpot/styles.tsx +0 -2
- package/themes/original/src/components/PreviousOrders/index.tsx +3 -2
- package/themes/original/src/components/ProductForm/index.tsx +639 -664
- package/themes/original/src/components/ProductForm/styles.tsx +10 -11
- package/themes/original/src/components/ProductItemAccordion/index.tsx +199 -128
- package/themes/original/src/components/ProductOption/index.tsx +1 -1
- package/themes/original/src/components/ProductOptionSubOption/index.tsx +16 -8
- package/themes/original/src/components/ProductOptionSubOption/styles.tsx +0 -1
- package/themes/original/src/components/ProfessionalFilter/index.tsx +2 -1
- package/themes/original/src/components/ProfessionalProfile/index.tsx +26 -14
- package/themes/original/src/components/Promotions/index.tsx +232 -219
- package/themes/original/src/components/Promotions/styles.tsx +7 -2
- package/themes/original/src/components/ReviewDriver/index.tsx +7 -7
- package/themes/original/src/components/ReviewOrder/index.tsx +18 -3
- package/themes/original/src/components/ReviewProducts/index.tsx +2 -2
- package/themes/original/src/components/ReviewTrigger/index.tsx +118 -0
- package/themes/original/src/components/ReviewTrigger/styles.tsx +34 -0
- package/themes/original/src/components/SearchBar/index.tsx +5 -3
- package/themes/original/src/components/ServiceForm/index.tsx +410 -258
- package/themes/original/src/components/SignupForm/index.tsx +184 -127
- package/themes/original/src/components/SingleOrderCard/index.tsx +229 -181
- package/themes/original/src/components/SingleOrderCard/styles.tsx +0 -7
- package/themes/original/src/components/SingleProductCard/index.tsx +198 -112
- package/themes/original/src/components/SingleProductCard/styles.tsx +3 -10
- package/themes/original/src/components/SingleProductReview/index.tsx +38 -5
- package/themes/original/src/components/SingleProductReview/styles.tsx +12 -0
- package/themes/original/src/components/StripeElementsForm/index.tsx +13 -2
- package/themes/original/src/components/UpsellingProducts/index.tsx +15 -5
- package/themes/original/src/components/UserDetails/index.tsx +5 -3
- package/themes/original/src/components/UserFormDetails/index.tsx +6 -48
- package/themes/original/src/components/UserProfile/index.tsx +56 -31
- package/themes/original/src/components/UserProfile/styles.ts +17 -0
- package/themes/original/src/components/UserProfileForm/index.tsx +10 -10
- package/themes/original/src/components/WalletTransactions/index.tsx +76 -0
- package/themes/original/src/components/WalletTransactions/styles.tsx +13 -0
- package/themes/original/src/components/Wallets/index.tsx +176 -164
- package/themes/original/src/components/Wallets/styles.tsx +12 -8
- package/themes/original/src/components/shared/CardAnimation.tsx +47 -0
- package/themes/original/src/components/shared/HeaderTitle.tsx +8 -3
- package/themes/original/src/components/shared/OBottomPopup.tsx +48 -15
- package/themes/original/src/components/shared/OButton.tsx +10 -3
- package/themes/original/src/components/shared/OIcon.tsx +8 -1
- package/themes/original/src/components/shared/OInput.tsx +13 -3
- package/themes/original/src/layouts/Container.tsx +13 -9
- package/themes/original/src/layouts/FloatingBottomContainer.tsx +5 -1
- package/themes/original/src/types/index.tsx +83 -29
- package/themes/original/src/utils/index.tsx +121 -10
- package/themes/uber-eats/src/components/BusinessesListing/index.tsx +1 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React, { useCallback, useEffect, useRef, useState } from 'react';
|
|
2
2
|
import { Fade, Placeholder, PlaceholderLine } from 'rn-placeholder';
|
|
3
|
+
import { IOScrollView } from 'react-native-intersection-observer'
|
|
3
4
|
import Geolocation from '@react-native-community/geolocation'
|
|
4
5
|
import { getTrackingStatus, requestTrackingPermission } from 'react-native-tracking-transparency'
|
|
5
6
|
import {
|
|
@@ -21,6 +22,7 @@ import {
|
|
|
21
22
|
} from 'ordering-components/native';
|
|
22
23
|
import { useTheme } from 'styled-components/native';
|
|
23
24
|
import Ionicons from 'react-native-vector-icons/Ionicons'
|
|
25
|
+
import IconAntDesign from 'react-native-vector-icons/AntDesign';
|
|
24
26
|
|
|
25
27
|
import {
|
|
26
28
|
Search,
|
|
@@ -32,7 +34,7 @@ import {
|
|
|
32
34
|
FeaturedWrapper,
|
|
33
35
|
OrderProgressWrapper,
|
|
34
36
|
FarAwayMessage,
|
|
35
|
-
|
|
37
|
+
SearchBarWrapper,
|
|
36
38
|
MomentWrapper,
|
|
37
39
|
FilterWrapper,
|
|
38
40
|
ServiceWrapper,
|
|
@@ -70,8 +72,8 @@ const BusinessesListingUI = (props: BusinessesListingParams) => {
|
|
|
70
72
|
isGuestUser,
|
|
71
73
|
handleUpdateBusinessList,
|
|
72
74
|
priceLevelSelected,
|
|
73
|
-
|
|
74
|
-
|
|
75
|
+
handleChangePriceLevel,
|
|
76
|
+
businessTypeSelected
|
|
75
77
|
} = props;
|
|
76
78
|
const theme = useTheme();
|
|
77
79
|
const isFocused = useIsFocused();
|
|
@@ -104,8 +106,8 @@ const BusinessesListingUI = (props: BusinessesListingParams) => {
|
|
|
104
106
|
},
|
|
105
107
|
searchInput: {
|
|
106
108
|
fontSize: 12,
|
|
107
|
-
|
|
108
|
-
|
|
109
|
+
paddingLeft: 0,
|
|
110
|
+
paddingRight: 17,
|
|
109
111
|
paddingTop: 7
|
|
110
112
|
},
|
|
111
113
|
iconStyle: {
|
|
@@ -269,7 +271,7 @@ const BusinessesListingUI = (props: BusinessesListingParams) => {
|
|
|
269
271
|
}, [businessesList?.businesses?.length])
|
|
270
272
|
|
|
271
273
|
return (
|
|
272
|
-
<
|
|
274
|
+
<IOScrollView style={styles.container} onScroll={(e) => handleScroll(e)} showsVerticalScrollIndicator={false}
|
|
273
275
|
refreshControl={
|
|
274
276
|
<RefreshControl
|
|
275
277
|
refreshing={refreshing}
|
|
@@ -282,7 +284,7 @@ const BusinessesListingUI = (props: BusinessesListingParams) => {
|
|
|
282
284
|
style={{ paddingTop: top + 20 }}>
|
|
283
285
|
{!auth && (
|
|
284
286
|
<TouchableOpacity onPress={() => navigation?.canGoBack() && navigation.goBack()} style={{ position: 'absolute', marginStart: 40, paddingVertical: 20 }}>
|
|
285
|
-
<
|
|
287
|
+
<IconAntDesign name='arrowleft' size={26} />
|
|
286
288
|
</TouchableOpacity>
|
|
287
289
|
)}
|
|
288
290
|
<Search>
|
|
@@ -319,7 +321,15 @@ const BusinessesListingUI = (props: BusinessesListingParams) => {
|
|
|
319
321
|
</MomentWrapper>
|
|
320
322
|
<View style={styles.wrapperOrderOptions}>
|
|
321
323
|
<WrapMomentOption onPress={() => navigation.navigate('OrderTypes', { configTypes: configTypes, setOrderTypeValue })}>
|
|
322
|
-
<OText
|
|
324
|
+
<OText
|
|
325
|
+
size={12}
|
|
326
|
+
numberOfLines={1}
|
|
327
|
+
ellipsizeMode={'tail'}
|
|
328
|
+
color={theme.colors.textSecondary}
|
|
329
|
+
style={{ textAlign: 'left' }}
|
|
330
|
+
>
|
|
331
|
+
{t(getTypesText(orderTypeValue || orderState?.options?.type || 1), 'Delivery')}
|
|
332
|
+
</OText>
|
|
323
333
|
<OIcon
|
|
324
334
|
src={theme.images.general.arrow_down}
|
|
325
335
|
width={10}
|
|
@@ -327,22 +337,23 @@ const BusinessesListingUI = (props: BusinessesListingParams) => {
|
|
|
327
337
|
/>
|
|
328
338
|
</WrapMomentOption>
|
|
329
339
|
{!businessId && (
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
340
|
+
<SearchBarWrapper>
|
|
341
|
+
<SearchBar
|
|
342
|
+
onSearch={handleChangeSearch}
|
|
343
|
+
searchValue={searchValue}
|
|
344
|
+
lazyLoad
|
|
345
|
+
isCancelXButtonShow={!!searchValue}
|
|
346
|
+
borderStyle={styles.borderStyle}
|
|
347
|
+
onCancel={() => handleChangeSearch('')}
|
|
348
|
+
placeholder={t('SEARCH', 'Search')}
|
|
349
|
+
height={80}
|
|
350
|
+
isAppointment
|
|
351
|
+
isDisabled={!businessTypes || configs?.advanced_business_search_enabled?.value === '1'}
|
|
352
|
+
inputStyle={{ ...styles.searchInput, ...Platform.OS === 'ios' ? {} : { paddingBottom: 4 } }}
|
|
353
|
+
onPress={() => { configs?.advanced_business_search_enabled?.value === '1' && navigation.navigate('BusinessSearch', { businessTypes }) }}
|
|
354
|
+
onSubmitEditing={() => { configs?.advanced_business_search_enabled?.value === '1' && navigation.navigate('BusinessSearch', { businessTypes, defaultTerm: searchValue }) }}
|
|
355
|
+
/>
|
|
356
|
+
</SearchBarWrapper>
|
|
346
357
|
)}
|
|
347
358
|
</View>
|
|
348
359
|
</OrderControlContainer>
|
|
@@ -463,6 +474,7 @@ const BusinessesListingUI = (props: BusinessesListingParams) => {
|
|
|
463
474
|
(business: any, i: number) => (
|
|
464
475
|
<BusinessController
|
|
465
476
|
key={`${business.id}_` + i}
|
|
477
|
+
enableIntersection
|
|
466
478
|
business={business}
|
|
467
479
|
isBusinessOpen={business.open}
|
|
468
480
|
handleCustomClick={handleBusinessClick}
|
|
@@ -534,7 +546,7 @@ const BusinessesListingUI = (props: BusinessesListingParams) => {
|
|
|
534
546
|
</>
|
|
535
547
|
)}
|
|
536
548
|
</ListWrapper>
|
|
537
|
-
</
|
|
549
|
+
</IOScrollView>
|
|
538
550
|
);
|
|
539
551
|
};
|
|
540
552
|
|
|
@@ -43,8 +43,9 @@ export const WrapMomentOption = styled.TouchableOpacity`
|
|
|
43
43
|
font-size: 12px;
|
|
44
44
|
max-width: 240px;
|
|
45
45
|
height: 26px;
|
|
46
|
+
width: 130px;
|
|
46
47
|
align-items: center;
|
|
47
|
-
justify-content:
|
|
48
|
+
justify-content: space-between;
|
|
48
49
|
padding-horizontal: 8px;
|
|
49
50
|
flex-direction: row;
|
|
50
51
|
margin-end: 12px;
|
|
@@ -84,7 +85,7 @@ export const FarAwayMessage = styled.View`
|
|
|
84
85
|
`
|
|
85
86
|
|
|
86
87
|
export const SearchBarWrapper = styled.View`
|
|
87
|
-
width:
|
|
88
|
+
width: 130px;
|
|
88
89
|
`
|
|
89
90
|
|
|
90
91
|
export const MomentWrapper = styled.View`
|
|
@@ -97,10 +98,10 @@ export const FilterWrapper = styled.View`
|
|
|
97
98
|
`
|
|
98
99
|
|
|
99
100
|
export const ServiceWrapper = styled.View`
|
|
100
|
-
padding-
|
|
101
|
+
padding-horizontal: 40px;
|
|
101
102
|
`
|
|
102
103
|
|
|
103
104
|
export const PriceWrapper = styled.View`
|
|
104
|
-
padding-
|
|
105
|
+
padding-horizontal: 40px;
|
|
105
106
|
margin-top: 30px;
|
|
106
107
|
`
|