ordering-ui-react-native 0.15.62 → 0.15.63-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 -3
- package/src/DeliveryApp.tsx +43 -1
- package/src/components/AddressForm/index.tsx +18 -2
- package/src/components/BusinessBasicInformation/index.tsx +11 -19
- package/src/components/BusinessController/index.tsx +16 -8
- package/src/components/BusinessInformation/index.tsx +14 -0
- package/src/components/BusinessTypeFilter/index.tsx +1 -2
- 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 +6 -2
- package/src/components/LoginForm/index.tsx +120 -30
- package/src/components/LoginForm/styles.tsx +6 -0
- package/src/components/OrderDetails/index.tsx +7 -21
- package/src/components/PaymentOptions/index.tsx +67 -50
- package/src/components/PaymentOptionsWebView/index.tsx +120 -121
- package/src/components/ReviewDriver/index.tsx +1 -1
- package/src/components/ReviewOrder/index.tsx +2 -1
- package/src/components/ReviewProducts/index.tsx +11 -0
- package/src/components/SignupForm/index.tsx +145 -61
- package/src/components/SingleProductCard/index.tsx +16 -4
- package/src/components/SingleProductReview/index.tsx +1 -1
- package/src/components/StripeMethodForm/index.tsx +22 -24
- 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 +7 -6
- package/src/pages/MultiCheckout.tsx +31 -0
- package/src/pages/MultiOrdersDetails.tsx +27 -0
- package/src/pages/OrderDetails.tsx +1 -1
- package/src/pages/ReviewDriver.tsx +2 -2
- package/src/pages/ReviewOrder.tsx +2 -2
- 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/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 +26 -13
- package/themes/business/src/components/OrderDetails/Business.tsx +2 -2
- package/themes/business/src/components/OrderDetails/Delivery.tsx +28 -11
- package/themes/business/src/components/OrderDetails/OrderContentComponent.tsx +14 -7
- package/themes/business/src/components/OrderDetails/OrderHeaderComponent.tsx +6 -0
- package/themes/business/src/components/OrdersListManager/index.tsx +1 -1
- package/themes/business/src/components/OrdersOption/index.tsx +8 -4
- package/themes/business/src/components/PreviousOrders/index.tsx +7 -7
- package/themes/business/src/components/ProductItemAccordion/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/OModal.tsx +1 -1
- package/themes/business/src/types/index.tsx +8 -2
- 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 +11 -12
- 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 +32 -27
- 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 +1 -0
- package/themes/original/index.tsx +30 -8
- 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 +7 -6
- package/themes/original/src/components/AddressList/index.tsx +30 -18
- package/themes/original/src/components/AppleLogin/index.tsx +7 -12
- package/themes/original/src/components/BusinessBasicInformation/index.tsx +137 -46
- package/themes/original/src/components/BusinessBasicInformation/styles.tsx +4 -0
- package/themes/original/src/components/BusinessController/index.tsx +168 -96
- package/themes/original/src/components/BusinessController/styles.tsx +5 -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 +231 -63
- 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 +51 -52
- package/themes/original/src/components/BusinessProductsList/styles.tsx +0 -3
- package/themes/original/src/components/BusinessProductsListing/index.tsx +291 -155
- package/themes/original/src/components/BusinessProductsListing/styles.tsx +27 -0
- package/themes/original/src/components/BusinessReviews/index.tsx +6 -1
- package/themes/original/src/components/BusinessTypeFilter/index.tsx +106 -39
- package/themes/original/src/components/BusinessTypeFilter/styles.tsx +2 -0
- package/themes/original/src/components/BusinessesListing/Layout/Appointment/index.tsx +560 -0
- package/themes/original/src/components/BusinessesListing/Layout/Appointment/styles.tsx +107 -0
- package/themes/original/src/components/BusinessesListing/Layout/Original/index.tsx +559 -0
- package/themes/original/src/components/BusinessesListing/{styles.tsx → Layout/Original/styles.tsx} +11 -3
- package/themes/original/src/components/BusinessesListing/index.tsx +99 -458
- package/themes/original/src/components/Cart/index.tsx +62 -43
- package/themes/original/src/components/Checkout/index.tsx +90 -39
- 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 +11 -11
- 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/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/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/MomentSelector/index.tsx +197 -0
- package/themes/original/src/components/MomentSelector/styles.tsx +6 -0
- 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/NavBar/index.tsx +4 -4
- package/themes/original/src/components/OrderDetails/OrderHistory.tsx +167 -0
- package/themes/original/src/components/OrderDetails/index.tsx +151 -65
- package/themes/original/src/components/OrderDetails/styles.tsx +1 -2
- package/themes/original/src/components/OrderSummary/index.tsx +6 -6
- 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 +137 -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 +58 -37
- package/themes/original/src/components/PhoneInputNumber/index.tsx +5 -11
- package/themes/original/src/components/PreviousOrders/index.tsx +18 -147
- package/themes/original/src/components/ProductForm/index.tsx +718 -679
- package/themes/original/src/components/ProductForm/styles.tsx +6 -2
- package/themes/original/src/components/ProductItemAccordion/index.tsx +2 -2
- package/themes/original/src/components/ProductOption/index.tsx +1 -1
- package/themes/original/src/components/ProductOptionSubOption/index.tsx +18 -12
- package/themes/original/src/components/ProfessionalFilter/index.tsx +128 -0
- package/themes/original/src/components/ProfessionalFilter/styles.tsx +0 -0
- package/themes/original/src/components/ProfessionalProfile/index.tsx +298 -0
- package/themes/original/src/components/ProfessionalProfile/styles.tsx +46 -0
- 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/ReviewDriver/index.tsx +6 -6
- package/themes/original/src/components/ReviewOrder/index.tsx +1 -1
- 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 +13 -5
- package/themes/original/src/components/ServiceForm/index.tsx +579 -0
- package/themes/original/src/components/ServiceForm/styles.tsx +50 -0
- 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 +237 -126
- package/themes/original/src/components/SingleOrderCard/index.tsx +275 -0
- package/themes/original/src/components/SingleOrderCard/styles.tsx +54 -0
- package/themes/original/src/components/SingleProductCard/index.tsx +150 -84
- 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 +15 -81
- package/themes/original/src/components/UserFormDetails/index.tsx +98 -66
- package/themes/original/src/components/UserProfile/index.tsx +11 -2
- package/themes/original/src/components/UserProfileForm/index.tsx +33 -22
- 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/OBottomPopup.tsx +44 -13
- package/themes/original/src/components/shared/OInput.tsx +3 -2
- package/themes/original/src/components/shared/OModal.tsx +4 -2
- package/themes/original/src/layouts/FloatingBottomContainer.tsx +5 -1
- package/themes/original/src/types/index.tsx +184 -35
- package/themes/original/src/utils/index.tsx +96 -2
- package/themes/single-business/src/components/OrderTypeSelector/index.tsx +1 -1
- package/themes/uber-eats/src/components/BusinessesListing/index.tsx +1 -1
|
@@ -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;
|
|
@@ -59,6 +65,7 @@ export interface AddressListParams {
|
|
|
59
65
|
isFromProductsList?: boolean;
|
|
60
66
|
afterSignup?: boolean;
|
|
61
67
|
isFromCheckout?: boolean
|
|
68
|
+
loadAddresses: () => void
|
|
62
69
|
}
|
|
63
70
|
|
|
64
71
|
export interface AddressFormParams {
|
|
@@ -103,9 +110,20 @@ export interface SignupParams {
|
|
|
103
110
|
handleSendVerifyCode?: any;
|
|
104
111
|
handleCheckPhoneCode?: any;
|
|
105
112
|
notificationState?: any;
|
|
113
|
+
signUpTab?: string;
|
|
114
|
+
useSignUpFullDetails?: boolean;
|
|
115
|
+
useSignUpOtpEmail?: boolean;
|
|
116
|
+
useSignUpOtpCellphone?: boolean;
|
|
117
|
+
willVerifyOtpState?: boolean;
|
|
118
|
+
numOtpInputs?: number;
|
|
106
119
|
handleChangePromotions: () => void;
|
|
120
|
+
handleChangeInput?: (in1: any, in2: any) => void;
|
|
107
121
|
enableReCaptcha?: boolean;
|
|
108
|
-
|
|
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;
|
|
109
127
|
}
|
|
110
128
|
|
|
111
129
|
export interface PhoneInputParams {
|
|
@@ -146,13 +164,21 @@ export interface BusinessesListingParams {
|
|
|
146
164
|
defaultBusinessType?: any;
|
|
147
165
|
franchiseId?: any;
|
|
148
166
|
businessId?: any;
|
|
167
|
+
isGuestUser?: any;
|
|
168
|
+
handleUpdateBusinessList?: any;
|
|
169
|
+
priceLevelSelected?: any;
|
|
170
|
+
handleChangePriceLevel?: any;
|
|
171
|
+
businessTypeSelected?: any;
|
|
149
172
|
}
|
|
150
173
|
export interface HighestRatedBusinessesParams {
|
|
151
174
|
businessesList: { businesses: Array<any>, loading: boolean, error: null | string };
|
|
152
175
|
onBusinessClick?: void;
|
|
153
176
|
navigation?: any;
|
|
154
177
|
isLoading?: boolean;
|
|
155
|
-
getBusinesses: (newFetch: boolean) => void
|
|
178
|
+
getBusinesses: (newFetch: boolean) => void,
|
|
179
|
+
favoriteIds?: any,
|
|
180
|
+
setFavoriteIds?: any,
|
|
181
|
+
handleUpdateBusinessList?: any
|
|
156
182
|
}
|
|
157
183
|
export interface BusinessTypeFilterParams {
|
|
158
184
|
businessTypes?: Array<any>;
|
|
@@ -161,10 +187,11 @@ export interface BusinessTypeFilterParams {
|
|
|
161
187
|
defaultBusinessType?: string | null;
|
|
162
188
|
images?: any
|
|
163
189
|
typesState?: any
|
|
164
|
-
setBusinessTypes?: any
|
|
190
|
+
setBusinessTypes?: any,
|
|
191
|
+
isAppoint?: boolean | undefined
|
|
165
192
|
}
|
|
166
193
|
export interface BusinessControllerParams {
|
|
167
|
-
key?: number;
|
|
194
|
+
key?: string | number;
|
|
168
195
|
business?: any;
|
|
169
196
|
handleCustomClick?: any;
|
|
170
197
|
orderType?: any;
|
|
@@ -181,7 +208,12 @@ export interface BusinessControllerParams {
|
|
|
181
208
|
businessDeliveryPrice?: number,
|
|
182
209
|
businessDeliveryTime?: string,
|
|
183
210
|
businessPickupTime?: string,
|
|
184
|
-
businessDistance?: number
|
|
211
|
+
businessDistance?: number,
|
|
212
|
+
favoriteIds?: number[],
|
|
213
|
+
handleFavoriteBusiness?: any,
|
|
214
|
+
setFavoriteIds?: any;
|
|
215
|
+
handleUpdateBusinessList?: any;
|
|
216
|
+
enableIntersection?: boolean;
|
|
185
217
|
}
|
|
186
218
|
export interface BusinessProductsListingParams {
|
|
187
219
|
navigation?: any;
|
|
@@ -197,10 +229,16 @@ export interface BusinessProductsListingParams {
|
|
|
197
229
|
header?: any;
|
|
198
230
|
logo?: any;
|
|
199
231
|
productModal?: any;
|
|
232
|
+
alertState?: { open: boolean, content: any[] };
|
|
233
|
+
setAlertState?: any;
|
|
234
|
+
multiRemoveProducts?: (in1: any, in2: any) => {};
|
|
200
235
|
getNextProducts?: () => {};
|
|
201
236
|
handleChangeCategory: (value: any) => {};
|
|
202
237
|
setProductLogin?: () => {};
|
|
203
238
|
updateProductModal?: (value: any) => {};
|
|
239
|
+
handleUpdateProducts?: any;
|
|
240
|
+
professionalSelected?: any;
|
|
241
|
+
handleChangeProfessionalSelected?: any;
|
|
204
242
|
}
|
|
205
243
|
export interface BusinessBasicInformationParams {
|
|
206
244
|
navigation?: any;
|
|
@@ -245,17 +283,23 @@ export interface BusinessProductsListParams {
|
|
|
245
283
|
setCategoriesLayout?: any,
|
|
246
284
|
currentCart?: any,
|
|
247
285
|
setSubcategoriesSelected?: any,
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
286
|
+
subcategoriesSelected?: any,
|
|
287
|
+
onClickCategory?: any,
|
|
288
|
+
lazyLoadProductsRecommended?: boolean,
|
|
289
|
+
isFiltMode?: boolean,
|
|
290
|
+
handleUpdateProducts?: any
|
|
251
291
|
}
|
|
252
292
|
export interface SingleProductCardParams {
|
|
253
|
-
businessId: any
|
|
293
|
+
businessId: any;
|
|
254
294
|
product: any;
|
|
255
295
|
isSoldOut: boolean;
|
|
256
296
|
onProductClick: any;
|
|
257
297
|
productAddedToCartLength: number;
|
|
258
|
-
style?: ViewStyle
|
|
298
|
+
style?: ViewStyle;
|
|
299
|
+
categoryState?: any;
|
|
300
|
+
handleFavoriteProduct?: any;
|
|
301
|
+
handleUpdateProducts?: any;
|
|
302
|
+
enableIntersection?: boolean;
|
|
259
303
|
}
|
|
260
304
|
export interface BusinessInformationParams {
|
|
261
305
|
navigation?: any,
|
|
@@ -289,6 +333,7 @@ export interface OrdersOptionParams {
|
|
|
289
333
|
orderList?: any,
|
|
290
334
|
franchiseId?: any,
|
|
291
335
|
activeOrders?: boolean,
|
|
336
|
+
pastOrders?: boolean,
|
|
292
337
|
pagination?: any,
|
|
293
338
|
titleContent?: string,
|
|
294
339
|
customArray?: Array<any>,
|
|
@@ -299,11 +344,23 @@ export interface OrdersOptionParams {
|
|
|
299
344
|
loadOrders?: any,
|
|
300
345
|
setOrderList?: any,
|
|
301
346
|
preOrders?: boolean,
|
|
347
|
+
reorderState?: any,
|
|
348
|
+
handleReorder?: (orderId: number) => {},
|
|
302
349
|
setOrdersLength?: ({ activeOrdersLength, previousOrdersLength }: { activeOrdersLength: number, previousOrdersLength: number }) => void,
|
|
303
350
|
ordersLength: { activeOrdersLength: number, previousOrdersLength: number },
|
|
304
351
|
setSelectedOrderId?: any,
|
|
305
352
|
setOpenMessges?: any,
|
|
306
|
-
loadMoreStatus?: boolean
|
|
353
|
+
loadMoreStatus?: boolean,
|
|
354
|
+
refreshOrders?: boolean,
|
|
355
|
+
setRefreshOrders?: (value: boolean) => void,
|
|
356
|
+
handleUpdateOrderList?: (orderId: number, changes: any) => {},
|
|
357
|
+
isBusiness?: boolean,
|
|
358
|
+
isProducts?: boolean,
|
|
359
|
+
businessOrderIds?: any,
|
|
360
|
+
products?: any,
|
|
361
|
+
businessesSearchList?: any,
|
|
362
|
+
hideOrders?: boolean,
|
|
363
|
+
BusinessControllerSkeletons?: any,
|
|
307
364
|
}
|
|
308
365
|
export interface ActiveOrdersParams {
|
|
309
366
|
orders?: any,
|
|
@@ -316,7 +373,8 @@ export interface ActiveOrdersParams {
|
|
|
316
373
|
loadMoreOrders?: () => {},
|
|
317
374
|
onNavigationRedirect?: (route: string, params?: any) => {},
|
|
318
375
|
isMessageView?: boolean,
|
|
319
|
-
handleClickOrder?: any
|
|
376
|
+
handleClickOrder?: any,
|
|
377
|
+
handleUpdateOrderList?: (orderId: number, changes: any) => {}
|
|
320
378
|
}
|
|
321
379
|
export interface PreviousOrdersParams {
|
|
322
380
|
orders?: any,
|
|
@@ -325,8 +383,9 @@ export interface PreviousOrdersParams {
|
|
|
325
383
|
orderID?: number
|
|
326
384
|
reorderLoading?: boolean,
|
|
327
385
|
loadMoreOrders?: () => {},
|
|
328
|
-
handleReorder
|
|
386
|
+
handleReorder?: (orderId: number) => {},
|
|
329
387
|
onNavigationRedirect?: (route: string, params?: any) => {}
|
|
388
|
+
handleUpdateOrderList?: (orderId: number, changes: any) => {}
|
|
330
389
|
}
|
|
331
390
|
export interface OrderDetailsParams {
|
|
332
391
|
navigation?: any,
|
|
@@ -358,25 +417,26 @@ export interface ProductItemAccordionParams {
|
|
|
358
417
|
isFromCheckout?: any
|
|
359
418
|
}
|
|
360
419
|
export interface ReviewOrderParams {
|
|
361
|
-
order?: { id: number,
|
|
362
|
-
stars?: any
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
420
|
+
order?: { id: number, business_id: number, logo: string, driver: any, products: Array<any>, review: any, user_review: any };
|
|
421
|
+
stars?: any;
|
|
422
|
+
defaultStar?: number;
|
|
423
|
+
handleChangeInput?: any;
|
|
424
|
+
handleChangeRating?: any;
|
|
425
|
+
handleSendReview?: any;
|
|
426
|
+
formState?: any;
|
|
427
|
+
navigation?: any;
|
|
428
|
+
setIsReviewed?: (isReviewed: boolean) => void;
|
|
429
|
+
handleReviewState?: any;
|
|
430
|
+
setStars?: any;
|
|
431
|
+
onNavigationRedirect?: any;
|
|
372
432
|
}
|
|
373
433
|
export interface ReviewProductParams {
|
|
374
434
|
navigation?: any,
|
|
375
435
|
onNavigationRedirect?: any,
|
|
376
|
-
order?: { orderId: number,
|
|
436
|
+
order?: { orderId: number, business_id: number, logo: string, driver: any, products: Array<any>, review: any, user_review: any },
|
|
377
437
|
formState?: any,
|
|
378
438
|
handleChangeFormState?: any,
|
|
379
|
-
handleSendProductReview?: any
|
|
439
|
+
handleSendProductReview?: any;
|
|
380
440
|
}
|
|
381
441
|
export interface SingleProductReviewParams {
|
|
382
442
|
product: any,
|
|
@@ -386,12 +446,12 @@ export interface SingleProductReviewParams {
|
|
|
386
446
|
export interface ReviewDriverParams {
|
|
387
447
|
navigation?: any,
|
|
388
448
|
onNavigationRedirect?: any,
|
|
389
|
-
order?: { orderId: number,
|
|
449
|
+
order?: { orderId: number, business_id: number, logo: string, driver: any, products: Array<any>, review: any, user_review: any },
|
|
390
450
|
formState?: any,
|
|
391
451
|
setIsDriverReviewed?: (isReviewed: boolean) => {},
|
|
392
452
|
dirverReviews?: any,
|
|
393
453
|
setDriverReviews?: any,
|
|
394
|
-
handleSendDriverReview?: any
|
|
454
|
+
handleSendDriverReview?: any;
|
|
395
455
|
}
|
|
396
456
|
export interface MessagesParams {
|
|
397
457
|
type?: string,
|
|
@@ -489,6 +549,7 @@ export interface OrderTypeSelectParams {
|
|
|
489
549
|
defaultValue?: number;
|
|
490
550
|
configTypes?: Array<any>;
|
|
491
551
|
orderTypes: Array<any>;
|
|
552
|
+
setOrderTypeValue?: (value: number) => any
|
|
492
553
|
}
|
|
493
554
|
export interface UpsellingProductsParams {
|
|
494
555
|
isCustomMode?: boolean;
|
|
@@ -562,7 +623,11 @@ export interface BusinessSearchParams {
|
|
|
562
623
|
filters: any,
|
|
563
624
|
businessTypes: Array<number>,
|
|
564
625
|
setFilters: (filters: any) => void,
|
|
565
|
-
lazySearch?: boolean
|
|
626
|
+
lazySearch?: boolean,
|
|
627
|
+
brandList?: any;
|
|
628
|
+
onNavigationRedirect?: any,
|
|
629
|
+
handleUpdateProducts: any,
|
|
630
|
+
handleUpdateBusinessList?: any;
|
|
566
631
|
}
|
|
567
632
|
|
|
568
633
|
export interface NoNetworkParams {
|
|
@@ -580,9 +645,93 @@ export interface PlaceSpotParams {
|
|
|
580
645
|
|
|
581
646
|
export interface PromotionParams {
|
|
582
647
|
navigation: any,
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
648
|
+
offersState: any,
|
|
649
|
+
handleSearchValue: any,
|
|
650
|
+
searchValue: string,
|
|
651
|
+
offerSelected: any,
|
|
652
|
+
setOfferSelected: any,
|
|
653
|
+
loadOffers: any
|
|
654
|
+
}
|
|
655
|
+
export interface SessionsParams {
|
|
656
|
+
navigation: any,
|
|
657
|
+
sessionsList: any,
|
|
658
|
+
actionState: any,
|
|
659
|
+
handleDeleteSession: any,
|
|
660
|
+
handleDeleteAllSessions: any
|
|
661
|
+
}
|
|
662
|
+
|
|
663
|
+
export interface otpParams {
|
|
664
|
+
willVerifyOtpState: boolean,
|
|
665
|
+
setWillVerifyOtpState: (val: boolean) => void,
|
|
666
|
+
onSubmit: () => void,
|
|
667
|
+
handleLoginOtp: (code: string) => void,
|
|
668
|
+
setAlertState: any;
|
|
669
|
+
pinCount: number;
|
|
670
|
+
}
|
|
671
|
+
|
|
672
|
+
export interface FavoriteParams {
|
|
673
|
+
favoriteList: any,
|
|
674
|
+
handleUpdateFavoriteList: (id: number, changes: any) => {},
|
|
675
|
+
pagination: any,
|
|
676
|
+
getFavoriteList: (value: number) => {},
|
|
677
|
+
navigation?: any,
|
|
678
|
+
onNavigationRedirect?: (route: string, params?: any) => {},
|
|
679
|
+
reorderState?: any,
|
|
680
|
+
handleReorder?: (orderId: number) => {},
|
|
681
|
+
isOrder?: boolean,
|
|
682
|
+
isProduct?: boolean,
|
|
683
|
+
isBusiness?: boolean
|
|
684
|
+
}
|
|
685
|
+
|
|
686
|
+
export interface SingleOrderCardParams {
|
|
687
|
+
order: any,
|
|
688
|
+
reorderLoading: any,
|
|
689
|
+
handleReorder?: (value: any) => {},
|
|
690
|
+
getOrderStatus: any,
|
|
691
|
+
handleFavoriteOrder?: (value: boolean) => {},
|
|
692
|
+
onNavigationRedirect?: (route: string, params?: any) => {},
|
|
693
|
+
pastOrders: any,
|
|
694
|
+
isMessageView?: any,
|
|
695
|
+
handleClickOrder: (value: any) => {}
|
|
696
|
+
}
|
|
697
|
+
|
|
698
|
+
export interface PreviousBusinessOrderedParams {
|
|
699
|
+
navigation?: any,
|
|
700
|
+
businessesList?: any,
|
|
701
|
+
setBusinessLoading?: any,
|
|
702
|
+
businessId?: number,
|
|
703
|
+
onNavigationRedirect?: any,
|
|
704
|
+
isBusinessesSearchList?: any,
|
|
705
|
+
businessLoading?: boolean
|
|
706
|
+
}
|
|
707
|
+
|
|
708
|
+
export interface ServiceFormParams {
|
|
709
|
+
navigation?: any,
|
|
710
|
+
professionalSelected: any,
|
|
711
|
+
product: any,
|
|
712
|
+
handleSave: (value?: any) => {}
|
|
713
|
+
productCart?: any
|
|
714
|
+
isSoldOut: boolean,
|
|
715
|
+
maxProductQuantity: any,
|
|
716
|
+
businessSlug?: string,
|
|
717
|
+
onClose: any,
|
|
718
|
+
professionalList: any
|
|
719
|
+
}
|
|
720
|
+
|
|
721
|
+
export interface ProfessionalFilterParams {
|
|
722
|
+
professionals?: any,
|
|
723
|
+
professionalSelected?: any,
|
|
724
|
+
handleChangeProfessionalSelected: any
|
|
725
|
+
}
|
|
726
|
+
|
|
727
|
+
export interface ProfessionalProfileParams {
|
|
728
|
+
professional: any,
|
|
729
|
+
handleChangeProfessionalSelected: any,
|
|
730
|
+
onClose: any
|
|
731
|
+
}
|
|
732
|
+
|
|
733
|
+
export interface PreviousProductsOrderedParams {
|
|
734
|
+
products?: any,
|
|
735
|
+
onProductClick?: any,
|
|
736
|
+
isBusinessesSearchList?: boolean
|
|
588
737
|
}
|
|
@@ -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,31 @@ 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
|
+
}
|
|
298
|
+
|
|
299
|
+
/**
|
|
300
|
+
* List of price to filter businesses
|
|
301
|
+
*/
|
|
302
|
+
export const priceList = [
|
|
303
|
+
{ level: '1', content: '$' },
|
|
304
|
+
{ level: '2', content: '$$' },
|
|
305
|
+
{ level: '3', content: '$$$' },
|
|
306
|
+
{ level: '4', content: '$$$$' },
|
|
307
|
+
{ level: '5', content: '$$$$$' }
|
|
308
|
+
]
|
|
@@ -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
|
/>
|
|
@@ -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}>
|