ordering-ui-react-native 0.15.51 → 0.15.53-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 +5 -3
- package/src/DeliveryApp.tsx +43 -1
- package/src/components/AddressForm/index.tsx +18 -2
- package/src/components/BusinessController/index.tsx +16 -8
- package/src/components/BusinessTypeFilter/index.tsx +3 -1
- package/src/components/BusinessesListing/index.tsx +1 -1
- package/src/components/Checkout/index.tsx +23 -2
- package/src/components/DriverTips/index.tsx +11 -6
- package/src/components/LanguageSelector/index.tsx +7 -2
- package/src/components/LoginForm/index.tsx +120 -30
- package/src/components/LoginForm/styles.tsx +6 -0
- package/src/components/OrderDetails/index.tsx +9 -23
- package/src/components/PaymentOptions/index.tsx +67 -50
- package/src/components/PaymentOptionsWebView/index.tsx +123 -124
- package/src/components/SignupForm/index.tsx +145 -61
- package/src/components/SingleProductCard/index.tsx +16 -4
- package/src/components/StripeMethodForm/index.tsx +1 -2
- package/src/components/UpsellingProducts/index.tsx +1 -1
- package/src/components/UserProfileForm/index.tsx +63 -6
- package/src/components/UserProfileForm/styles.tsx +8 -0
- package/src/components/VerifyPhone/styles.tsx +1 -2
- package/src/components/shared/OModal.tsx +1 -1
- package/src/hooks/useCountdownTimer.tsx +26 -0
- package/src/navigators/CheckoutNavigator.tsx +6 -0
- package/src/navigators/HomeNavigator.tsx +12 -0
- package/src/pages/BusinessesListing.tsx +1 -1
- package/src/pages/MultiCheckout.tsx +31 -0
- package/src/pages/MultiOrdersDetails.tsx +27 -0
- package/src/pages/Sessions.tsx +22 -0
- package/src/theme.json +0 -1
- package/src/types/index.tsx +18 -11
- package/src/utils/index.tsx +68 -1
- package/themes/business/src/components/AcceptOrRejectOrder/index.tsx +103 -15
- package/themes/business/src/components/AcceptOrRejectOrder/styles.tsx +6 -0
- package/themes/business/src/components/Chat/index.tsx +42 -90
- package/themes/business/src/components/DriverMap/index.tsx +6 -5
- package/themes/business/src/components/Home/index.tsx +128 -55
- package/themes/business/src/components/Home/styles.tsx +8 -1
- package/themes/business/src/components/LoginForm/index.tsx +89 -2
- package/themes/business/src/components/LoginForm/styles.tsx +6 -0
- package/themes/business/src/components/LogoutButton/index.tsx +1 -1
- package/themes/business/src/components/NewOrderNotification/index.tsx +79 -105
- package/themes/business/src/components/OrderDetails/Business.tsx +2 -2
- package/themes/business/src/components/OrderDetails/Delivery.tsx +35 -18
- package/themes/business/src/components/OrderDetails/OrderContentComponent.tsx +159 -91
- package/themes/business/src/components/OrderDetails/OrderHeaderComponent.tsx +6 -0
- package/themes/business/src/components/OrderDetails/styles.tsx +7 -0
- package/themes/business/src/components/OrdersListManager/index.tsx +1 -1
- package/themes/business/src/components/OrdersOption/index.tsx +5 -2
- package/themes/business/src/components/ProductItemAccordion/index.tsx +2 -2
- package/themes/business/src/components/shared/OModal.tsx +1 -1
- package/themes/business/src/types/index.tsx +5 -1
- 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/BusinessMenu/index.tsx +39 -28
- package/themes/kiosk/src/components/BusinessesListing/index.tsx +2 -3
- package/themes/kiosk/src/components/Cart/index.tsx +99 -26
- package/themes/kiosk/src/components/Cart/styles.tsx +6 -0
- package/themes/kiosk/src/components/CartBottomSheet/index.tsx +9 -2
- package/themes/kiosk/src/components/CartContent/index.tsx +0 -11
- package/themes/kiosk/src/components/CartItem/index.tsx +4 -3
- package/themes/kiosk/src/components/CategoriesMenu/index.tsx +107 -62
- package/themes/kiosk/src/components/Checkout/index.tsx +40 -22
- package/themes/kiosk/src/components/CustomerName/index.tsx +0 -6
- package/themes/kiosk/src/components/DrawerView/index.tsx +1 -0
- package/themes/kiosk/src/components/DrawerView/styles.tsx +2 -2
- package/themes/kiosk/src/components/NavBar/index.tsx +29 -20
- package/themes/kiosk/src/components/OptionCard/index.tsx +1 -1
- package/themes/kiosk/src/components/OrderDetails/index.tsx +165 -65
- package/themes/kiosk/src/components/OrderDetails/styles.tsx +5 -0
- package/themes/kiosk/src/components/OrderTypeCardSelector/index.tsx +9 -11
- package/themes/kiosk/src/components/PaymentOptions/index.tsx +56 -54
- package/themes/kiosk/src/components/ProductForm/index.tsx +7 -8
- package/themes/kiosk/src/components/ProductItemAccordion/index.tsx +2 -2
- package/themes/kiosk/src/components/ProductOption/index.tsx +1 -1
- package/themes/kiosk/src/components/ProductOptionSubOption/index.tsx +3 -1
- package/themes/kiosk/src/components/UpsellingProducts/index.tsx +16 -5
- package/themes/kiosk/src/components/shared/OButton.tsx +5 -18
- package/themes/kiosk/src/types/index.d.ts +3 -0
- package/themes/original/index.tsx +169 -4
- package/themes/original/src/components/ActiveOrders/index.tsx +15 -132
- package/themes/original/src/components/ActiveOrders/styles.tsx +0 -54
- package/themes/original/src/components/AddressForm/index.tsx +1 -1
- package/themes/original/src/components/AddressList/index.tsx +30 -18
- package/themes/original/src/components/AppleLogin/index.tsx +54 -21
- package/themes/original/src/components/BusinessBasicInformation/index.tsx +136 -45
- package/themes/original/src/components/BusinessBasicInformation/styles.tsx +4 -0
- package/themes/original/src/components/BusinessController/index.tsx +48 -11
- package/themes/original/src/components/BusinessController/styles.tsx +27 -0
- package/themes/original/src/components/BusinessFeaturedController/index.tsx +20 -1
- package/themes/original/src/components/BusinessFeaturedController/styles.tsx +23 -0
- package/themes/original/src/components/BusinessItemAccordion/index.tsx +8 -5
- package/themes/original/src/components/BusinessItemAccordion/styles.tsx +3 -1
- package/themes/original/src/components/BusinessListingSearch/index.tsx +196 -58
- package/themes/original/src/components/BusinessListingSearch/styles.tsx +22 -2
- package/themes/original/src/components/BusinessPreorder/index.tsx +1 -1
- package/themes/original/src/components/BusinessProductsCategories/index.tsx +2 -2
- package/themes/original/src/components/BusinessProductsList/CategoryDescription/index.tsx +44 -0
- package/themes/original/src/components/BusinessProductsList/index.tsx +119 -35
- package/themes/original/src/components/BusinessProductsList/styles.tsx +12 -4
- package/themes/original/src/components/BusinessProductsListing/index.tsx +109 -21
- package/themes/original/src/components/BusinessProductsListing/styles.tsx +22 -0
- package/themes/original/src/components/BusinessReviews/index.tsx +10 -26
- package/themes/original/src/components/BusinessTypeFilter/index.tsx +1 -2
- package/themes/original/src/components/BusinessesListing/index.tsx +127 -66
- package/themes/original/src/components/BusinessesListing/styles.tsx +11 -3
- package/themes/original/src/components/Cart/index.tsx +60 -41
- package/themes/original/src/components/Checkout/index.tsx +48 -32
- package/themes/original/src/components/DriverTips/index.tsx +17 -12
- package/themes/original/src/components/Favorite/index.tsx +92 -0
- package/themes/original/src/components/Favorite/styles.tsx +22 -0
- package/themes/original/src/components/FavoriteList/index.tsx +298 -0
- package/themes/original/src/components/FavoriteList/styles.tsx +5 -0
- package/themes/original/src/components/ForgotPasswordForm/index.tsx +84 -4
- package/themes/original/src/components/GPSButton/index.tsx +15 -8
- package/themes/original/src/components/GoogleMap/index.tsx +1 -0
- package/themes/original/src/components/Help/index.tsx +21 -4
- package/themes/original/src/components/HighestRatedBusinesses/index.tsx +18 -1
- package/themes/original/src/components/Home/index.tsx +1 -1
- package/themes/original/src/components/LastOrders/index.tsx +12 -1
- package/themes/original/src/components/LoginForm/Otp/index.tsx +91 -0
- package/themes/original/src/components/LoginForm/Otp/styles.tsx +7 -0
- package/themes/original/src/components/LoginForm/index.tsx +332 -164
- package/themes/original/src/components/LoginForm/styles.tsx +1 -3
- package/themes/original/src/components/LogoutButton/index.tsx +7 -1
- package/themes/original/src/components/MessageListing/index.tsx +10 -1
- package/themes/original/src/components/Messages/index.tsx +1 -1
- package/themes/original/src/components/MomentOption/index.tsx +10 -1
- package/themes/original/src/components/MomentOption/styles.tsx +1 -1
- package/themes/original/src/components/MultiCartsPaymethodsAndWallets/index.tsx +243 -0
- package/themes/original/src/components/MultiCartsPaymethodsAndWallets/styles.tsx +46 -0
- package/themes/original/src/components/MultiCheckout/index.tsx +298 -0
- package/themes/original/src/components/MultiCheckout/styles.tsx +59 -0
- package/themes/original/src/components/MultiOrdersDetails/SingleOrderCard.tsx +372 -0
- package/themes/original/src/components/MultiOrdersDetails/index.tsx +258 -0
- package/themes/original/src/components/MultiOrdersDetails/styles.tsx +50 -0
- package/themes/original/src/components/MyOrders/index.tsx +120 -32
- package/themes/original/src/components/MyOrders/styles.tsx +8 -1
- package/themes/original/src/components/OrderDetails/OrderHistory.tsx +167 -0
- package/themes/original/src/components/OrderDetails/index.tsx +117 -46
- package/themes/original/src/components/OrderDetails/styles.tsx +1 -2
- package/themes/original/src/components/OrderSummary/index.tsx +3 -3
- package/themes/original/src/components/OrderTypeSelector/index.tsx +4 -2
- package/themes/original/src/components/OrdersOption/PreviousBusinessOrdered/index.tsx +153 -0
- package/themes/original/src/components/OrdersOption/PreviousBusinessOrdered/styles.tsx +6 -0
- package/themes/original/src/components/OrdersOption/PreviousProductsOrdered/index.tsx +53 -0
- package/themes/original/src/components/OrdersOption/PreviousProductsOrdered/styles.tsx +6 -0
- package/themes/original/src/components/OrdersOption/index.tsx +130 -38
- package/themes/original/src/components/OrdersOption/styles.tsx +4 -1
- package/themes/original/src/components/PaymentOptionCash/index.tsx +2 -2
- package/themes/original/src/components/PaymentOptionWallet/index.tsx +17 -23
- package/themes/original/src/components/PaymentOptionWallet/styles.tsx +1 -1
- package/themes/original/src/components/PaymentOptions/index.tsx +57 -36
- package/themes/original/src/components/PhoneInputNumber/index.tsx +1 -1
- package/themes/original/src/components/PreviousOrders/index.tsx +18 -147
- package/themes/original/src/components/ProductForm/index.tsx +70 -62
- package/themes/original/src/components/ProductForm/styles.tsx +0 -1
- package/themes/original/src/components/ProductItemAccordion/index.tsx +2 -2
- package/themes/original/src/components/ProductOptionSubOption/index.tsx +18 -12
- package/themes/original/src/components/Promotions/index.tsx +151 -133
- package/themes/original/src/components/Promotions/styles.tsx +3 -23
- package/themes/original/src/components/SearchBar/index.tsx +10 -4
- package/themes/original/src/components/Sessions/index.tsx +160 -0
- package/themes/original/src/components/Sessions/styles.tsx +15 -0
- package/themes/original/src/components/SignupForm/index.tsx +333 -128
- package/themes/original/src/components/SingleOrderCard/index.tsx +282 -0
- package/themes/original/src/components/SingleOrderCard/styles.tsx +54 -0
- package/themes/original/src/components/SingleProductCard/index.tsx +59 -17
- package/themes/original/src/components/StripeElementsForm/index.tsx +16 -8
- package/themes/original/src/components/StripeElementsForm/naked.tsx +2 -2
- package/themes/original/src/components/UpsellingProducts/index.tsx +86 -74
- package/themes/original/src/components/UserDetails/index.tsx +5 -96
- package/themes/original/src/components/UserFormDetails/index.tsx +34 -24
- package/themes/original/src/components/UserProfile/index.tsx +53 -6
- package/themes/original/src/components/UserProfileForm/index.tsx +20 -18
- package/themes/original/src/components/UserVerification/index.tsx +178 -192
- 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/Wallets/index.tsx +76 -9
- package/themes/original/src/components/Wallets/styles.tsx +21 -0
- package/themes/original/src/components/shared/OModal.tsx +4 -2
- package/themes/original/src/config/constants.tsx +6 -6
- package/themes/original/src/types/index.tsx +139 -15
- package/themes/original/src/utils/index.tsx +85 -2
- package/themes/single-business/src/components/AddressList/index.tsx +1 -1
- package/themes/single-business/src/components/OrderTypeSelector/index.tsx +1 -1
- package/themes/single-business/src/components/UserProfile/index.tsx +1 -1
- package/themes/uber-eats/src/components/BusinessesListing/index.tsx +1 -1
|
@@ -41,3 +41,24 @@ export const OTabs = styled.View`
|
|
|
41
41
|
export const OTab = styled.View`
|
|
42
42
|
padding-horizontal: 10px;
|
|
43
43
|
`;
|
|
44
|
+
|
|
45
|
+
export const LoyaltyContent = styled.View`
|
|
46
|
+
width: 100%;
|
|
47
|
+
margin-bottom: 20px;
|
|
48
|
+
`
|
|
49
|
+
|
|
50
|
+
export const LoyaltyWrapp = styled.View`
|
|
51
|
+
flex-direction: column;
|
|
52
|
+
justify-content: center;
|
|
53
|
+
align-items: center;
|
|
54
|
+
`
|
|
55
|
+
|
|
56
|
+
export const LoyaltyImg = styled.ImageBackground`
|
|
57
|
+
position: relative;
|
|
58
|
+
height: 150px;
|
|
59
|
+
width: 100%;
|
|
60
|
+
display: flex;
|
|
61
|
+
flex-direction: column;
|
|
62
|
+
justify-content: center;
|
|
63
|
+
align-items: center;
|
|
64
|
+
`
|
|
@@ -21,6 +21,7 @@ interface Props {
|
|
|
21
21
|
isNotDecoration?: boolean;
|
|
22
22
|
styleCloseButton?: any,
|
|
23
23
|
isAvoidKeyBoardView?: boolean;
|
|
24
|
+
styleContainerCloseButton?: any;
|
|
24
25
|
}
|
|
25
26
|
const KeyboardView = styled.KeyboardAvoidingView`
|
|
26
27
|
flex-grow: 1;
|
|
@@ -45,6 +46,7 @@ const OModal = (props: Props): React.ReactElement => {
|
|
|
45
46
|
isNotDecoration,
|
|
46
47
|
style,
|
|
47
48
|
styleCloseButton,
|
|
49
|
+
styleContainerCloseButton,
|
|
48
50
|
isAvoidKeyBoardView
|
|
49
51
|
} = props
|
|
50
52
|
|
|
@@ -55,7 +57,7 @@ const OModal = (props: Props): React.ReactElement => {
|
|
|
55
57
|
{!entireModal ? (
|
|
56
58
|
<View style={styles.centeredView}>
|
|
57
59
|
<View style={titleSectionStyle ? titleSectionStyle : styles.titleSection}>
|
|
58
|
-
<TouchableOpacity style={styles.wrapperIcon} onPress={onClose}>
|
|
60
|
+
<TouchableOpacity style={{...styles.wrapperIcon, ...styleContainerCloseButton}} onPress={onClose}>
|
|
59
61
|
<OIcon
|
|
60
62
|
src={theme.images.general.close}
|
|
61
63
|
width={16}
|
|
@@ -91,7 +93,7 @@ const OModal = (props: Props): React.ReactElement => {
|
|
|
91
93
|
animationType="slide"
|
|
92
94
|
transparent={isTransparent}
|
|
93
95
|
visible={open}
|
|
94
|
-
onRequestClose={() => onClose()}
|
|
96
|
+
onRequestClose={() => onClose && onClose()}
|
|
95
97
|
style={{ height: '100%', flex: 1, position: 'absolute', ...style, zIndex: 9999 }}
|
|
96
98
|
>
|
|
97
99
|
{isAvoidKeyBoardView ? (
|
|
@@ -8,26 +8,26 @@ export const ORDER_TYPES = [
|
|
|
8
8
|
{
|
|
9
9
|
value: 1,
|
|
10
10
|
content: 'DELIVERY',
|
|
11
|
-
description: '
|
|
11
|
+
description: 'ORDERTYPE_DESCRIPTION_DELIVERY'
|
|
12
12
|
},
|
|
13
13
|
{
|
|
14
14
|
value: 2,
|
|
15
15
|
content: 'PICKUP',
|
|
16
|
-
description: '
|
|
16
|
+
description: 'ORDERTYPE_DESCRIPTION_PICKUP',
|
|
17
17
|
},
|
|
18
18
|
{
|
|
19
19
|
value: 3,
|
|
20
20
|
content: 'EAT_IN',
|
|
21
|
-
description: '
|
|
21
|
+
description: 'ORDERTYPE_DESCRIPTION_EATIN',
|
|
22
22
|
},
|
|
23
23
|
{
|
|
24
24
|
value: 4,
|
|
25
25
|
content: 'CURBSIDE',
|
|
26
|
-
description: '
|
|
26
|
+
description: 'ORDERTYPE_DESCRIPTION_CURBSIDE',
|
|
27
27
|
},
|
|
28
28
|
{
|
|
29
29
|
value: 5,
|
|
30
30
|
content: 'DRIVE_THRU',
|
|
31
|
-
description: '
|
|
31
|
+
description: 'ORDERTYPE_DESCRIPTION_DRIVETHRU',
|
|
32
32
|
}
|
|
33
|
-
]
|
|
33
|
+
]
|
|
@@ -18,7 +18,13 @@ export interface LoginParams {
|
|
|
18
18
|
handleCheckPhoneCode?: any;
|
|
19
19
|
notificationState?: any;
|
|
20
20
|
handleReCaptcha?: any;
|
|
21
|
-
|
|
21
|
+
enableReCaptcha?: any;
|
|
22
|
+
otpType?: string,
|
|
23
|
+
setOtpType: (type: string) => void,
|
|
24
|
+
generateOtpCode: (values?: any) => void,
|
|
25
|
+
useLoginOtpEmail?: boolean,
|
|
26
|
+
useLoginOtpCellphone?: boolean,
|
|
27
|
+
useLoginOtp?: boolean
|
|
22
28
|
}
|
|
23
29
|
export interface ProfileParams {
|
|
24
30
|
navigation?: any;
|
|
@@ -39,6 +45,8 @@ export interface ProfileParams {
|
|
|
39
45
|
verifyPhoneState?: any;
|
|
40
46
|
setCheckPhoneCodeState?: any;
|
|
41
47
|
isVerifiedPhone?: any;
|
|
48
|
+
handleRemoveAccount?: any;
|
|
49
|
+
removeAccountState?: any;
|
|
42
50
|
}
|
|
43
51
|
|
|
44
52
|
export interface AddressListParams {
|
|
@@ -57,6 +65,7 @@ export interface AddressListParams {
|
|
|
57
65
|
isFromProductsList?: boolean;
|
|
58
66
|
afterSignup?: boolean;
|
|
59
67
|
isFromCheckout?: boolean
|
|
68
|
+
loadAddresses: () => void
|
|
60
69
|
}
|
|
61
70
|
|
|
62
71
|
export interface AddressFormParams {
|
|
@@ -101,7 +110,20 @@ export interface SignupParams {
|
|
|
101
110
|
handleSendVerifyCode?: any;
|
|
102
111
|
handleCheckPhoneCode?: any;
|
|
103
112
|
notificationState?: any;
|
|
113
|
+
signUpTab?: string;
|
|
114
|
+
useSignUpFullDetails?: boolean;
|
|
115
|
+
useSignUpOtpEmail?: boolean;
|
|
116
|
+
useSignUpOtpCellphone?: boolean;
|
|
117
|
+
willVerifyOtpState?: boolean;
|
|
118
|
+
numOtpInputs?: number;
|
|
104
119
|
handleChangePromotions: () => void;
|
|
120
|
+
handleChangeInput?: (in1: any, in2: any) => void;
|
|
121
|
+
enableReCaptcha?: boolean;
|
|
122
|
+
generateOtpCode?: (in1?: any) => void;
|
|
123
|
+
handleReCaptcha?: (token?: any) => void;
|
|
124
|
+
setSignUpTab?: (in1: string) => void;
|
|
125
|
+
setWillVerifyOtpState?: (in1: boolean) => void;
|
|
126
|
+
setOtpState?: (in1: string) => void;
|
|
105
127
|
}
|
|
106
128
|
|
|
107
129
|
export interface PhoneInputParams {
|
|
@@ -118,6 +140,7 @@ export interface PhoneInputParams {
|
|
|
118
140
|
flagStyle?: any;
|
|
119
141
|
isDisabled?: any;
|
|
120
142
|
isStartValidation?: any;
|
|
143
|
+
changeCountry?: any;
|
|
121
144
|
}
|
|
122
145
|
|
|
123
146
|
export interface LanguageSelectorParams {
|
|
@@ -141,13 +164,18 @@ export interface BusinessesListingParams {
|
|
|
141
164
|
defaultBusinessType?: any;
|
|
142
165
|
franchiseId?: any;
|
|
143
166
|
businessId?: any;
|
|
167
|
+
isGuestUser?: any;
|
|
168
|
+
handleUpdateBusinessList?: any;
|
|
144
169
|
}
|
|
145
170
|
export interface HighestRatedBusinessesParams {
|
|
146
171
|
businessesList: { businesses: Array<any>, loading: boolean, error: null | string };
|
|
147
172
|
onBusinessClick?: void;
|
|
148
173
|
navigation?: any;
|
|
149
174
|
isLoading?: boolean;
|
|
150
|
-
getBusinesses: (newFetch: boolean) => void
|
|
175
|
+
getBusinesses: (newFetch: boolean) => void,
|
|
176
|
+
favoriteIds?: any,
|
|
177
|
+
setFavoriteIds?: any,
|
|
178
|
+
handleUpdateBusinessList?: any
|
|
151
179
|
}
|
|
152
180
|
export interface BusinessTypeFilterParams {
|
|
153
181
|
businessTypes?: Array<any>;
|
|
@@ -159,7 +187,7 @@ export interface BusinessTypeFilterParams {
|
|
|
159
187
|
setBusinessTypes?: any
|
|
160
188
|
}
|
|
161
189
|
export interface BusinessControllerParams {
|
|
162
|
-
key?: number;
|
|
190
|
+
key?: string | number;
|
|
163
191
|
business?: any;
|
|
164
192
|
handleCustomClick?: any;
|
|
165
193
|
orderType?: any;
|
|
@@ -176,7 +204,11 @@ export interface BusinessControllerParams {
|
|
|
176
204
|
businessDeliveryPrice?: number,
|
|
177
205
|
businessDeliveryTime?: string,
|
|
178
206
|
businessPickupTime?: string,
|
|
179
|
-
businessDistance?: number
|
|
207
|
+
businessDistance?: number,
|
|
208
|
+
favoriteIds?: number[],
|
|
209
|
+
handleFavoriteBusiness?: any,
|
|
210
|
+
setFavoriteIds?: any;
|
|
211
|
+
handleUpdateBusinessList?: any;
|
|
180
212
|
}
|
|
181
213
|
export interface BusinessProductsListingParams {
|
|
182
214
|
navigation?: any;
|
|
@@ -192,10 +224,14 @@ export interface BusinessProductsListingParams {
|
|
|
192
224
|
header?: any;
|
|
193
225
|
logo?: any;
|
|
194
226
|
productModal?: any;
|
|
227
|
+
alertState?: { open: boolean, content: any[] };
|
|
228
|
+
setAlertState?: any;
|
|
229
|
+
multiRemoveProducts?: (in1: any, in2: any) => {};
|
|
195
230
|
getNextProducts?: () => {};
|
|
196
231
|
handleChangeCategory: (value: any) => {};
|
|
197
232
|
setProductLogin?: () => {};
|
|
198
233
|
updateProductModal?: (value: any) => {};
|
|
234
|
+
handleUpdateProducts?: any;
|
|
199
235
|
}
|
|
200
236
|
export interface BusinessBasicInformationParams {
|
|
201
237
|
navigation?: any;
|
|
@@ -238,7 +274,13 @@ export interface BusinessProductsListParams {
|
|
|
238
274
|
handleCancelSearch?: () => void,
|
|
239
275
|
categoriesLayout?: any,
|
|
240
276
|
setCategoriesLayout?: any,
|
|
241
|
-
currentCart?: any
|
|
277
|
+
currentCart?: any,
|
|
278
|
+
setSubcategoriesSelected?: any,
|
|
279
|
+
subcategoriesSelected?: any,
|
|
280
|
+
onClickCategory?: any,
|
|
281
|
+
lazyLoadProductsRecommended?: boolean,
|
|
282
|
+
isFiltMode?: boolean,
|
|
283
|
+
handleUpdateProducts?: any
|
|
242
284
|
}
|
|
243
285
|
export interface SingleProductCardParams {
|
|
244
286
|
businessId: any,
|
|
@@ -246,7 +288,10 @@ export interface SingleProductCardParams {
|
|
|
246
288
|
isSoldOut: boolean;
|
|
247
289
|
onProductClick: any;
|
|
248
290
|
productAddedToCartLength: number;
|
|
249
|
-
style?: ViewStyle
|
|
291
|
+
style?: ViewStyle,
|
|
292
|
+
categoryState?: any,
|
|
293
|
+
handleFavoriteProduct?: any,
|
|
294
|
+
handleUpdateProducts?: any
|
|
250
295
|
}
|
|
251
296
|
export interface BusinessInformationParams {
|
|
252
297
|
navigation?: any,
|
|
@@ -280,6 +325,7 @@ export interface OrdersOptionParams {
|
|
|
280
325
|
orderList?: any,
|
|
281
326
|
franchiseId?: any,
|
|
282
327
|
activeOrders?: boolean,
|
|
328
|
+
pastOrders?: boolean,
|
|
283
329
|
pagination?: any,
|
|
284
330
|
titleContent?: string,
|
|
285
331
|
customArray?: Array<any>,
|
|
@@ -290,11 +336,23 @@ export interface OrdersOptionParams {
|
|
|
290
336
|
loadOrders?: any,
|
|
291
337
|
setOrderList?: any,
|
|
292
338
|
preOrders?: boolean,
|
|
339
|
+
reorderState?: any,
|
|
340
|
+
handleReorder?: (orderId: number) => {},
|
|
293
341
|
setOrdersLength?: ({ activeOrdersLength, previousOrdersLength }: { activeOrdersLength: number, previousOrdersLength: number }) => void,
|
|
294
342
|
ordersLength: { activeOrdersLength: number, previousOrdersLength: number },
|
|
295
343
|
setSelectedOrderId?: any,
|
|
296
344
|
setOpenMessges?: any,
|
|
297
|
-
loadMoreStatus?: boolean
|
|
345
|
+
loadMoreStatus?: boolean,
|
|
346
|
+
refreshOrders?: boolean,
|
|
347
|
+
setRefreshOrders?: (value: boolean) => void,
|
|
348
|
+
handleUpdateOrderList?: (orderId: number, changes: any) => {},
|
|
349
|
+
isBusiness?: boolean,
|
|
350
|
+
isProducts?: boolean,
|
|
351
|
+
businessOrderIds?: any,
|
|
352
|
+
products?: any,
|
|
353
|
+
businessesSearchList?: any,
|
|
354
|
+
hideOrders?: boolean,
|
|
355
|
+
BusinessControllerSkeletons?: any,
|
|
298
356
|
}
|
|
299
357
|
export interface ActiveOrdersParams {
|
|
300
358
|
orders?: any,
|
|
@@ -307,7 +365,8 @@ export interface ActiveOrdersParams {
|
|
|
307
365
|
loadMoreOrders?: () => {},
|
|
308
366
|
onNavigationRedirect?: (route: string, params?: any) => {},
|
|
309
367
|
isMessageView?: boolean,
|
|
310
|
-
handleClickOrder?: any
|
|
368
|
+
handleClickOrder?: any,
|
|
369
|
+
handleUpdateOrderList?: (orderId: number, changes: any) => {}
|
|
311
370
|
}
|
|
312
371
|
export interface PreviousOrdersParams {
|
|
313
372
|
orders?: any,
|
|
@@ -316,8 +375,9 @@ export interface PreviousOrdersParams {
|
|
|
316
375
|
orderID?: number
|
|
317
376
|
reorderLoading?: boolean,
|
|
318
377
|
loadMoreOrders?: () => {},
|
|
319
|
-
handleReorder
|
|
378
|
+
handleReorder?: (orderId: number) => {},
|
|
320
379
|
onNavigationRedirect?: (route: string, params?: any) => {}
|
|
380
|
+
handleUpdateOrderList?: (orderId: number, changes: any) => {}
|
|
321
381
|
}
|
|
322
382
|
export interface OrderDetailsParams {
|
|
323
383
|
navigation?: any,
|
|
@@ -480,6 +540,7 @@ export interface OrderTypeSelectParams {
|
|
|
480
540
|
defaultValue?: number;
|
|
481
541
|
configTypes?: Array<any>;
|
|
482
542
|
orderTypes: Array<any>;
|
|
543
|
+
setOrderTypeValue?: (value: number) => any
|
|
483
544
|
}
|
|
484
545
|
export interface UpsellingProductsParams {
|
|
485
546
|
isCustomMode?: boolean;
|
|
@@ -553,7 +614,11 @@ export interface BusinessSearchParams {
|
|
|
553
614
|
filters: any,
|
|
554
615
|
businessTypes: Array<number>,
|
|
555
616
|
setFilters: (filters: any) => void,
|
|
556
|
-
lazySearch?: boolean
|
|
617
|
+
lazySearch?: boolean,
|
|
618
|
+
brandList?: any;
|
|
619
|
+
onNavigationRedirect?: any,
|
|
620
|
+
handleUpdateProducts: any,
|
|
621
|
+
handleUpdateBusinessList?: any;
|
|
557
622
|
}
|
|
558
623
|
|
|
559
624
|
export interface NoNetworkParams {
|
|
@@ -571,9 +636,68 @@ export interface PlaceSpotParams {
|
|
|
571
636
|
|
|
572
637
|
export interface PromotionParams {
|
|
573
638
|
navigation: any,
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
639
|
+
offersState: any,
|
|
640
|
+
handleSearchValue: any,
|
|
641
|
+
searchValue: string,
|
|
642
|
+
offerSelected: any,
|
|
643
|
+
setOfferSelected: any,
|
|
644
|
+
loadOffers: any
|
|
645
|
+
}
|
|
646
|
+
export interface SessionsParams {
|
|
647
|
+
navigation: any,
|
|
648
|
+
sessionsList: any,
|
|
649
|
+
actionState: any,
|
|
650
|
+
handleDeleteSession: any,
|
|
651
|
+
handleDeleteAllSessions: any
|
|
652
|
+
}
|
|
653
|
+
|
|
654
|
+
export interface otpParams {
|
|
655
|
+
willVerifyOtpState: boolean,
|
|
656
|
+
setWillVerifyOtpState: (val: boolean) => void,
|
|
657
|
+
onSubmit: () => void,
|
|
658
|
+
handleLoginOtp: (code: string) => void,
|
|
659
|
+
setAlertState: any;
|
|
660
|
+
pinCount: number;
|
|
661
|
+
}
|
|
662
|
+
|
|
663
|
+
export interface FavoriteParams {
|
|
664
|
+
favoriteList: any,
|
|
665
|
+
handleUpdateFavoriteList: (id: number, changes: any) => {},
|
|
666
|
+
pagination: any,
|
|
667
|
+
getFavoriteList: (value: number) => {},
|
|
668
|
+
navigation?: any,
|
|
669
|
+
onNavigationRedirect?: (route: string, params?: any) => {},
|
|
670
|
+
reorderState?: any,
|
|
671
|
+
handleReorder?: (orderId: number) => {},
|
|
672
|
+
isOrder?: boolean,
|
|
673
|
+
isProduct?: boolean,
|
|
674
|
+
isBusiness?: boolean
|
|
675
|
+
}
|
|
676
|
+
|
|
677
|
+
export interface SingleOrderCardParams {
|
|
678
|
+
order: any,
|
|
679
|
+
reorderLoading: any,
|
|
680
|
+
handleReorder?: (value: any) => {},
|
|
681
|
+
getOrderStatus: any,
|
|
682
|
+
handleFavoriteOrder?: (value: boolean) => {},
|
|
683
|
+
onNavigationRedirect?: (route: string, params?: any) => {},
|
|
684
|
+
pastOrders: any,
|
|
685
|
+
isMessageView?: any,
|
|
686
|
+
handleClickOrder: (value: any) => {}
|
|
687
|
+
}
|
|
688
|
+
|
|
689
|
+
export interface PreviousBusinessOrderedParams {
|
|
690
|
+
navigation?: any,
|
|
691
|
+
businessesList?: any,
|
|
692
|
+
setBusinessLoading?: any,
|
|
693
|
+
businessId?: number,
|
|
694
|
+
onNavigationRedirect?: any,
|
|
695
|
+
isBusinessesSearchList?: any,
|
|
696
|
+
businessLoading?: boolean
|
|
697
|
+
}
|
|
698
|
+
|
|
699
|
+
export interface PreviousProductsOrderedParams {
|
|
700
|
+
products?: any,
|
|
701
|
+
onProductClick?: any,
|
|
702
|
+
isBusinessesSearchList?: boolean
|
|
579
703
|
}
|
|
@@ -33,12 +33,79 @@ export const getTraduction = (key: string) => {
|
|
|
33
33
|
ERROR_PLACE_PAY_WITH_CARD1: 'An error occurred while trying to pay by card',
|
|
34
34
|
ERROR_PLACE_PAY_WITH_PAYPAL_CAPTURE: 'An error occurred while trying to pay by PayPal',
|
|
35
35
|
ERROR_ADD_PRODUCT_VERY_FAR_FOR_DELIVERY: 'Error adding product, very far for delivery',
|
|
36
|
-
ERROR_PRODUCT_NOT_FOUND: 'Error with the product'
|
|
36
|
+
ERROR_PRODUCT_NOT_FOUND: 'Error with the product',
|
|
37
|
+
ERROR_INVALID_OFFER: 'The offer doesn\'t exist'
|
|
37
38
|
}
|
|
38
39
|
|
|
39
40
|
return keyList[key] ? t(key, keyList[key]) : t(key)
|
|
40
41
|
}
|
|
41
42
|
|
|
43
|
+
/**
|
|
44
|
+
* Change local moment variables
|
|
45
|
+
*/
|
|
46
|
+
export const setLocalMoment = (moment : any, t : any) => {
|
|
47
|
+
moment.locale('custom', {
|
|
48
|
+
months: [
|
|
49
|
+
t('MONTH1','January'),
|
|
50
|
+
t('MONTH2','February'),
|
|
51
|
+
t('MONTH3','March'),
|
|
52
|
+
t('MONTH4','April'),
|
|
53
|
+
t('MONTH5','May'),
|
|
54
|
+
t('MONTH6','June'),
|
|
55
|
+
t('MONTH7','July'),
|
|
56
|
+
t('MONTH8','August'),
|
|
57
|
+
t('MONTH9','September'),
|
|
58
|
+
t('MONTH10','October'),
|
|
59
|
+
t('MONTH11','November'),
|
|
60
|
+
t('MONTH12','December')
|
|
61
|
+
],
|
|
62
|
+
monthsShort: [
|
|
63
|
+
t('MONTHSHORT1','Jan'),
|
|
64
|
+
t('MONTHSHORT2','Feb'),
|
|
65
|
+
t('MONTHSHORT3','Mar'),
|
|
66
|
+
t('MONTHSHORT4','Apr'),
|
|
67
|
+
t('MONTHSHORT5','May'),
|
|
68
|
+
t('MONTHSHORT6','Jun'),
|
|
69
|
+
t('MONTHSHORT7','Jul'),
|
|
70
|
+
t('MONTHSHORT8','Aug'),
|
|
71
|
+
t('MONTHSHORT9','Sep'),
|
|
72
|
+
t('MONTHSHORT10','Oct'),
|
|
73
|
+
t('MONTHSHORT11','Nov'),
|
|
74
|
+
t('MONTHSHORT12','Dec')
|
|
75
|
+
],
|
|
76
|
+
weekdays: [
|
|
77
|
+
t('DAY7','Sunday'),
|
|
78
|
+
t('DAY1','Monday'),
|
|
79
|
+
t('DAY2','Tuesday'),
|
|
80
|
+
t('DAY3','Wednesday'),
|
|
81
|
+
t('DAY4','Thursday'),
|
|
82
|
+
t('DAY5','Friday'),
|
|
83
|
+
t('DAY6','Saturday')
|
|
84
|
+
],
|
|
85
|
+
weekdaysShort: [
|
|
86
|
+
t('DAYSHORT7','Sun'),
|
|
87
|
+
t('DAYSHORT1','Mon'),
|
|
88
|
+
t('DAYSHORT2','Tue'),
|
|
89
|
+
t('DAYSHORT3','Wed'),
|
|
90
|
+
t('DAYSHORT4','Thu'),
|
|
91
|
+
t('DAYSHORT5','Fri'),
|
|
92
|
+
t('DAYSHORT6','Sat')
|
|
93
|
+
],
|
|
94
|
+
weekdaysMin: [
|
|
95
|
+
t('DAYMIN7','Su'),
|
|
96
|
+
t('DAYMIN1','Mo'),
|
|
97
|
+
t('DAYMIN2','Tu'),
|
|
98
|
+
t('DAYMIN3','We'),
|
|
99
|
+
t('DAYMIN4','Th'),
|
|
100
|
+
t('DAYMIN5','Fr'),
|
|
101
|
+
t('DAYMIN6','Sa')
|
|
102
|
+
],
|
|
103
|
+
meridiem : function (hours : any) {
|
|
104
|
+
return hours < 12 ? t('AM', 'AM') : t('PM','PM');
|
|
105
|
+
}
|
|
106
|
+
})
|
|
107
|
+
}
|
|
108
|
+
|
|
42
109
|
/**
|
|
43
110
|
* Function to convert delivery time in minutes
|
|
44
111
|
* @param {string} time business delivery time
|
|
@@ -211,4 +278,20 @@ export const formatUrlVideo = (url : string) => {
|
|
|
211
278
|
const match = url.match(regExp)
|
|
212
279
|
const id = (match && match[7].length === 11) ? match[7] : false
|
|
213
280
|
return `https://www.youtube-nocookie.com/embed/${id}`
|
|
214
|
-
}
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
export const formatSeconds = (seconds : number) => {
|
|
284
|
+
// Hours, minutes and seconds
|
|
285
|
+
var hrs = ~~(seconds / 3600)
|
|
286
|
+
var mins = ~~((seconds % 3600) / 60)
|
|
287
|
+
var secs = ~~seconds % 60
|
|
288
|
+
|
|
289
|
+
// Output like '1:01' or '4:03:59' or '123:03:59'
|
|
290
|
+
var ret = ''
|
|
291
|
+
if (hrs > 0) {
|
|
292
|
+
ret += '' + hrs + ':' + (mins < 10 ? '0' : '')
|
|
293
|
+
}
|
|
294
|
+
ret += '' + mins + ':' + (secs < 10 ? '0' : '')
|
|
295
|
+
ret += '' + secs
|
|
296
|
+
return ret
|
|
297
|
+
}
|
|
@@ -140,7 +140,7 @@ const AddressListUI = (props: AddressListParams) => {
|
|
|
140
140
|
<AddressListContainer>
|
|
141
141
|
{isProfile && (
|
|
142
142
|
<NavBar
|
|
143
|
-
title={t('
|
|
143
|
+
title={t('SAVED_PLACES', 'My saved places')}
|
|
144
144
|
titleAlign={'center'}
|
|
145
145
|
onActionLeft={() => goToBack()}
|
|
146
146
|
showCall={false}
|
|
@@ -58,7 +58,7 @@ const OrderTypeSelectorUI = (props: OrderTypeSelectParams) => {
|
|
|
58
58
|
btnStyle={{ paddingLeft: 0 }}
|
|
59
59
|
paddingTop={0}
|
|
60
60
|
style={{ paddingBottom: 0 }}
|
|
61
|
-
title={t('
|
|
61
|
+
title={t('HOW_WILL_YOU_DELIVERY_TYPE', 'How will your order type?')}
|
|
62
62
|
titleAlign={'center'}
|
|
63
63
|
titleStyle={{ fontSize: 14 }}
|
|
64
64
|
/>
|
|
@@ -154,7 +154,7 @@ const ProfileListUI = (props: ProfileParams) => {
|
|
|
154
154
|
<Actions>
|
|
155
155
|
<ListItem onPress={() => onRedirect('AddressList', { isFromProfile: true, isGoBack: true })} activeOpacity={0.7}>
|
|
156
156
|
<OIcon src={theme.images.general.pin} width={16} color={theme.colors.textNormal} style={{ marginEnd: 14 }} />
|
|
157
|
-
<OText size={14} lineHeight={24} weight={'400'} color={theme.colors.textNormal}>{t('
|
|
157
|
+
<OText size={14} lineHeight={24} weight={'400'} color={theme.colors.textNormal}>{t('SAVED_PLACES', 'My saved places')}</OText>
|
|
158
158
|
</ListItem>
|
|
159
159
|
<ListItem onPress={() => navigation.navigate('Help', {})} activeOpacity={0.7}>
|
|
160
160
|
<OIcon src={theme.images.general.help} width={16} color={theme.colors.textNormal} style={{ marginEnd: 14 }} />
|
|
@@ -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', '
|
|
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}>
|