ordering-ui-react-native 0.15.81 → 0.15.82-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/ActiveOrders/index.tsx +61 -63
- package/src/components/ActiveOrders/styles.tsx +1 -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 +25 -3
- package/src/components/DriverTips/index.tsx +11 -6
- package/src/components/LanguageSelector/index.tsx +24 -15
- package/src/components/LoginForm/index.tsx +120 -30
- package/src/components/LoginForm/styles.tsx +6 -0
- package/src/components/NotificationSetting/index.tsx +85 -0
- package/src/components/OrderDetails/index.tsx +7 -21
- package/src/components/PaymentOptions/index.tsx +335 -365
- 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/StripeElementsForm/index.tsx +25 -16
- 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/OBottomPopup.tsx +6 -2
- package/src/components/shared/OModal.tsx +1 -1
- package/src/hooks/useCountdownTimer.tsx +26 -0
- package/src/index.tsx +2 -0
- package/src/navigators/CheckoutNavigator.tsx +6 -0
- package/src/navigators/HomeNavigator.tsx +6 -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/theme.json +0 -1
- package/src/types/index.tsx +18 -11
- package/src/utils/index.tsx +28 -29
- package/themes/business/index.tsx +4 -0
- package/themes/business/src/components/AcceptOrRejectOrder/index.tsx +100 -60
- package/themes/business/src/components/AcceptOrRejectOrder/styles.tsx +1 -0
- package/themes/business/src/components/Chat/index.tsx +51 -91
- package/themes/business/src/components/DriverMap/index.tsx +6 -5
- package/themes/business/src/components/DriverSchedule/index.tsx +71 -0
- package/themes/business/src/components/DriverSchedule/styles.tsx +6 -0
- 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 +1 -1
- package/themes/business/src/components/OrderDetails/Delivery.tsx +28 -11
- package/themes/business/src/components/OrderDetails/OrderContentComponent.tsx +26 -18
- package/themes/business/src/components/OrdersListManager/index.tsx +11 -4
- package/themes/business/src/components/OrdersOption/index.tsx +16 -4
- package/themes/business/src/components/PreviousOrders/index.tsx +7 -7
- package/themes/business/src/components/ProductItemAccordion/index.tsx +5 -4
- package/themes/business/src/components/ScheduleBlocked/index.tsx +53 -0
- package/themes/business/src/components/UserFormDetails/index.tsx +5 -2
- package/themes/business/src/components/UserProfileForm/index.tsx +28 -4
- package/themes/business/src/components/shared/OModal.tsx +41 -38
- package/themes/business/src/types/index.tsx +15 -7
- 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 +25 -26
- package/themes/kiosk/src/components/BusinessesListing/index.tsx +2 -3
- package/themes/kiosk/src/components/Cart/index.tsx +10 -11
- 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 +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/OrderTypeCardSelector/index.tsx +9 -11
- package/themes/kiosk/src/components/PaymentOptions/index.tsx +55 -53
- package/themes/kiosk/src/components/ProductForm/index.tsx +6 -7
- 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 +22 -0
- 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 +1 -1
- package/themes/original/src/components/AppleLogin/index.tsx +6 -8
- package/themes/original/src/components/BusinessBasicInformation/index.tsx +291 -150
- package/themes/original/src/components/BusinessBasicInformation/styles.tsx +6 -2
- package/themes/original/src/components/BusinessController/index.tsx +179 -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 +234 -64
- 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/SubcategoriesComponent/index.tsx +87 -0
- package/themes/original/src/components/BusinessProductsList/SubcategoriesComponent/styles.tsx +12 -0
- package/themes/original/src/components/BusinessProductsList/index.tsx +65 -73
- package/themes/original/src/components/BusinessProductsList/styles.tsx +0 -3
- package/themes/original/src/components/BusinessProductsListing/index.tsx +315 -176
- package/themes/original/src/components/BusinessProductsListing/styles.tsx +11 -0
- package/themes/original/src/components/BusinessReviews/index.tsx +6 -1
- package/themes/original/src/components/BusinessTypeFilter/index.tsx +106 -38
- 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/{styles.tsx → Layout/Appointment/styles.tsx} +24 -2
- package/themes/original/src/components/BusinessesListing/Layout/Original/index.tsx +661 -0
- package/themes/original/src/components/BusinessesListing/Layout/Original/styles.tsx +137 -0
- package/themes/original/src/components/BusinessesListing/index.tsx +104 -462
- package/themes/original/src/components/Cart/index.tsx +84 -39
- package/themes/original/src/components/Cart/styles.tsx +4 -0
- package/themes/original/src/components/Checkout/index.tsx +117 -58
- package/themes/original/src/components/Checkout/styles.tsx +0 -1
- 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/Messages/index.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 +304 -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 +132 -27
- 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 +164 -64
- package/themes/original/src/components/OrderDetails/styles.tsx +5 -2
- package/themes/original/src/components/OrderItAgain/index.tsx +72 -0
- package/themes/original/src/components/OrderItAgain/styles.tsx +10 -0
- package/themes/original/src/components/OrderSummary/index.tsx +2 -35
- package/themes/original/src/components/OrderTypeSelector/index.tsx +77 -35
- package/themes/original/src/components/OrderTypeSelector/styles.tsx +19 -1
- 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 +139 -46
- 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 +15 -22
- package/themes/original/src/components/PaymentOptions/index.tsx +57 -37
- package/themes/original/src/components/PhoneInputNumber/index.tsx +5 -11
- package/themes/original/src/components/PlaceSpot/index.tsx +243 -47
- package/themes/original/src/components/PlaceSpot/styles.tsx +0 -2
- package/themes/original/src/components/PreviousOrders/index.tsx +18 -147
- package/themes/original/src/components/ProductForm/index.tsx +712 -673
- package/themes/original/src/components/ProductForm/styles.tsx +9 -7
- 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 +13 -9
- 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 +23 -6
- package/themes/original/src/components/Promotions/styles.tsx +2 -0
- 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/SignupForm/index.tsx +237 -126
- package/themes/original/src/components/SingleOrderCard/index.tsx +316 -0
- package/themes/original/src/components/SingleOrderCard/styles.tsx +54 -0
- package/themes/original/src/components/SingleProductCard/index.tsx +196 -94
- package/themes/original/src/components/SingleProductCard/styles.tsx +2 -2
- package/themes/original/src/components/StripeElementsForm/index.tsx +25 -9
- package/themes/original/src/components/StripeElementsForm/naked.tsx +2 -2
- package/themes/original/src/components/UpsellingProducts/index.tsx +0 -4
- package/themes/original/src/components/UserDetails/index.tsx +32 -18
- package/themes/original/src/components/UserFormDetails/index.tsx +108 -74
- package/themes/original/src/components/UserProfile/index.tsx +5 -1
- package/themes/original/src/components/UserProfileForm/index.tsx +15 -10
- package/themes/original/src/components/UserVerification/index.tsx +178 -192
- package/themes/original/src/components/Wallets/index.tsx +2 -2
- package/themes/original/src/components/shared/OBottomPopup.tsx +47 -14
- package/themes/original/src/components/shared/OButton.tsx +2 -0
- 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 +208 -44
- package/themes/original/src/utils/index.tsx +94 -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;
|
|
@@ -104,9 +110,20 @@ export interface SignupParams {
|
|
|
104
110
|
handleSendVerifyCode?: any;
|
|
105
111
|
handleCheckPhoneCode?: any;
|
|
106
112
|
notificationState?: any;
|
|
113
|
+
signUpTab?: string;
|
|
114
|
+
useSignUpFullDetails?: boolean;
|
|
115
|
+
useSignUpOtpEmail?: boolean;
|
|
116
|
+
useSignUpOtpCellphone?: boolean;
|
|
117
|
+
willVerifyOtpState?: boolean;
|
|
118
|
+
numOtpInputs?: number;
|
|
107
119
|
handleChangePromotions: () => void;
|
|
120
|
+
handleChangeInput?: (in1: any, in2: any) => void;
|
|
108
121
|
enableReCaptcha?: boolean;
|
|
109
|
-
|
|
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;
|
|
110
127
|
}
|
|
111
128
|
|
|
112
129
|
export interface PhoneInputParams {
|
|
@@ -147,13 +164,22 @@ export interface BusinessesListingParams {
|
|
|
147
164
|
defaultBusinessType?: any;
|
|
148
165
|
franchiseId?: any;
|
|
149
166
|
businessId?: any;
|
|
167
|
+
isGuestUser?: any;
|
|
168
|
+
handleUpdateBusinessList?: any;
|
|
169
|
+
priceLevelSelected?: any;
|
|
170
|
+
handleChangePriceLevel?: any;
|
|
171
|
+
businessTypeSelected?: any;
|
|
172
|
+
logosLayout?: boolean;
|
|
150
173
|
}
|
|
151
174
|
export interface HighestRatedBusinessesParams {
|
|
152
175
|
businessesList: { businesses: Array<any>, loading: boolean, error: null | string };
|
|
153
176
|
onBusinessClick?: void;
|
|
154
177
|
navigation?: any;
|
|
155
178
|
isLoading?: boolean;
|
|
156
|
-
getBusinesses: (newFetch: boolean) => void
|
|
179
|
+
getBusinesses: (newFetch: boolean) => void,
|
|
180
|
+
favoriteIds?: any,
|
|
181
|
+
setFavoriteIds?: any,
|
|
182
|
+
handleUpdateBusinessList?: any
|
|
157
183
|
}
|
|
158
184
|
export interface BusinessTypeFilterParams {
|
|
159
185
|
businessTypes?: Array<any>;
|
|
@@ -162,7 +188,8 @@ export interface BusinessTypeFilterParams {
|
|
|
162
188
|
defaultBusinessType?: string | null;
|
|
163
189
|
images?: any
|
|
164
190
|
typesState?: any
|
|
165
|
-
setBusinessTypes?: any
|
|
191
|
+
setBusinessTypes?: any,
|
|
192
|
+
isAppoint?: boolean | undefined
|
|
166
193
|
}
|
|
167
194
|
export interface BusinessControllerParams {
|
|
168
195
|
key?: string | number;
|
|
@@ -182,7 +209,12 @@ export interface BusinessControllerParams {
|
|
|
182
209
|
businessDeliveryPrice?: number,
|
|
183
210
|
businessDeliveryTime?: string,
|
|
184
211
|
businessPickupTime?: string,
|
|
185
|
-
businessDistance?: number
|
|
212
|
+
businessDistance?: number,
|
|
213
|
+
favoriteIds?: number[],
|
|
214
|
+
handleFavoriteBusiness?: any,
|
|
215
|
+
setFavoriteIds?: any;
|
|
216
|
+
handleUpdateBusinessList?: any;
|
|
217
|
+
enableIntersection?: boolean;
|
|
186
218
|
}
|
|
187
219
|
export interface BusinessProductsListingParams {
|
|
188
220
|
navigation?: any;
|
|
@@ -198,10 +230,16 @@ export interface BusinessProductsListingParams {
|
|
|
198
230
|
header?: any;
|
|
199
231
|
logo?: any;
|
|
200
232
|
productModal?: any;
|
|
233
|
+
alertState?: { open: boolean, content: any[] };
|
|
234
|
+
setAlertState?: any;
|
|
235
|
+
multiRemoveProducts?: (in1: any, in2: any) => {};
|
|
201
236
|
getNextProducts?: () => {};
|
|
202
237
|
handleChangeCategory: (value: any) => {};
|
|
203
238
|
setProductLogin?: () => {};
|
|
204
239
|
updateProductModal?: (value: any) => {};
|
|
240
|
+
handleUpdateProducts?: any;
|
|
241
|
+
professionalSelected?: any;
|
|
242
|
+
handleChangeProfessionalSelected?: any;
|
|
205
243
|
}
|
|
206
244
|
export interface BusinessBasicInformationParams {
|
|
207
245
|
navigation?: any;
|
|
@@ -246,18 +284,27 @@ export interface BusinessProductsListParams {
|
|
|
246
284
|
setCategoriesLayout?: any,
|
|
247
285
|
currentCart?: any,
|
|
248
286
|
setSubcategoriesSelected?: any,
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
isFiltMode?: boolean
|
|
287
|
+
subcategoriesSelected?: any,
|
|
288
|
+
onClickCategory?: any,
|
|
289
|
+
lazyLoadProductsRecommended?: boolean,
|
|
290
|
+
isFiltMode?: boolean,
|
|
291
|
+
handleUpdateProducts?: any,
|
|
292
|
+
navigation?: any;
|
|
293
|
+
previouslyProducts?: any;
|
|
253
294
|
}
|
|
254
295
|
export interface SingleProductCardParams {
|
|
255
|
-
businessId: any
|
|
296
|
+
businessId: any;
|
|
256
297
|
product: any;
|
|
257
298
|
isSoldOut: boolean;
|
|
258
299
|
onProductClick: any;
|
|
259
300
|
productAddedToCartLength: number;
|
|
260
|
-
style?: ViewStyle
|
|
301
|
+
style?: ViewStyle;
|
|
302
|
+
categoryState?: any;
|
|
303
|
+
handleFavoriteProduct?: any;
|
|
304
|
+
handleUpdateProducts?: any;
|
|
305
|
+
enableIntersection?: boolean;
|
|
306
|
+
navigation?: any;
|
|
307
|
+
isPreviously?: any;
|
|
261
308
|
}
|
|
262
309
|
export interface BusinessInformationParams {
|
|
263
310
|
navigation?: any,
|
|
@@ -291,6 +338,7 @@ export interface OrdersOptionParams {
|
|
|
291
338
|
orderList?: any,
|
|
292
339
|
franchiseId?: any,
|
|
293
340
|
activeOrders?: boolean,
|
|
341
|
+
pastOrders?: boolean,
|
|
294
342
|
pagination?: any,
|
|
295
343
|
titleContent?: string,
|
|
296
344
|
customArray?: Array<any>,
|
|
@@ -301,13 +349,23 @@ export interface OrdersOptionParams {
|
|
|
301
349
|
loadOrders?: any,
|
|
302
350
|
setOrderList?: any,
|
|
303
351
|
preOrders?: boolean,
|
|
352
|
+
reorderState?: any,
|
|
353
|
+
handleReorder?: (orderId: number) => {},
|
|
304
354
|
setOrdersLength?: ({ activeOrdersLength, previousOrdersLength }: { activeOrdersLength: number, previousOrdersLength: number }) => void,
|
|
305
355
|
ordersLength: { activeOrdersLength: number, previousOrdersLength: number },
|
|
306
356
|
setSelectedOrderId?: any,
|
|
307
357
|
setOpenMessges?: any,
|
|
308
358
|
loadMoreStatus?: boolean,
|
|
309
359
|
refreshOrders?: boolean,
|
|
310
|
-
setRefreshOrders?: (value
|
|
360
|
+
setRefreshOrders?: (value: boolean) => void,
|
|
361
|
+
handleUpdateOrderList?: (orderId: number, changes: any) => {},
|
|
362
|
+
isBusiness?: boolean,
|
|
363
|
+
isProducts?: boolean,
|
|
364
|
+
businessOrderIds?: any,
|
|
365
|
+
products?: any,
|
|
366
|
+
businessesSearchList?: any,
|
|
367
|
+
hideOrders?: boolean,
|
|
368
|
+
BusinessControllerSkeletons?: any,
|
|
311
369
|
}
|
|
312
370
|
export interface ActiveOrdersParams {
|
|
313
371
|
orders?: any,
|
|
@@ -320,7 +378,8 @@ export interface ActiveOrdersParams {
|
|
|
320
378
|
loadMoreOrders?: () => {},
|
|
321
379
|
onNavigationRedirect?: (route: string, params?: any) => {},
|
|
322
380
|
isMessageView?: boolean,
|
|
323
|
-
handleClickOrder?: any
|
|
381
|
+
handleClickOrder?: any,
|
|
382
|
+
handleUpdateOrderList?: (orderId: number, changes: any) => {}
|
|
324
383
|
}
|
|
325
384
|
export interface PreviousOrdersParams {
|
|
326
385
|
orders?: any,
|
|
@@ -329,8 +388,9 @@ export interface PreviousOrdersParams {
|
|
|
329
388
|
orderID?: number
|
|
330
389
|
reorderLoading?: boolean,
|
|
331
390
|
loadMoreOrders?: () => {},
|
|
332
|
-
handleReorder
|
|
391
|
+
handleReorder?: (orderId: number) => {},
|
|
333
392
|
onNavigationRedirect?: (route: string, params?: any) => {}
|
|
393
|
+
handleUpdateOrderList?: (orderId: number, changes: any) => {}
|
|
334
394
|
}
|
|
335
395
|
export interface OrderDetailsParams {
|
|
336
396
|
navigation?: any,
|
|
@@ -362,25 +422,26 @@ export interface ProductItemAccordionParams {
|
|
|
362
422
|
isFromCheckout?: any
|
|
363
423
|
}
|
|
364
424
|
export interface ReviewOrderParams {
|
|
365
|
-
order?: { id: number,
|
|
366
|
-
stars?: any
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
425
|
+
order?: { id: number, business_id: number, logo: string, driver: any, products: Array<any>, review: any, user_review: any };
|
|
426
|
+
stars?: any;
|
|
427
|
+
defaultStar?: number;
|
|
428
|
+
handleChangeInput?: any;
|
|
429
|
+
handleChangeRating?: any;
|
|
430
|
+
handleSendReview?: any;
|
|
431
|
+
formState?: any;
|
|
432
|
+
navigation?: any;
|
|
433
|
+
setIsReviewed?: (isReviewed: boolean) => void;
|
|
434
|
+
handleReviewState?: any;
|
|
435
|
+
setStars?: any;
|
|
436
|
+
onNavigationRedirect?: any;
|
|
376
437
|
}
|
|
377
438
|
export interface ReviewProductParams {
|
|
378
439
|
navigation?: any,
|
|
379
440
|
onNavigationRedirect?: any,
|
|
380
|
-
order?: { orderId: number,
|
|
441
|
+
order?: { orderId: number, business_id: number, logo: string, driver: any, products: Array<any>, review: any, user_review: any },
|
|
381
442
|
formState?: any,
|
|
382
443
|
handleChangeFormState?: any,
|
|
383
|
-
handleSendProductReview?: any
|
|
444
|
+
handleSendProductReview?: any;
|
|
384
445
|
}
|
|
385
446
|
export interface SingleProductReviewParams {
|
|
386
447
|
product: any,
|
|
@@ -390,12 +451,12 @@ export interface SingleProductReviewParams {
|
|
|
390
451
|
export interface ReviewDriverParams {
|
|
391
452
|
navigation?: any,
|
|
392
453
|
onNavigationRedirect?: any,
|
|
393
|
-
order?: { orderId: number,
|
|
454
|
+
order?: { orderId: number, business_id: number, logo: string, driver: any, products: Array<any>, review: any, user_review: any },
|
|
394
455
|
formState?: any,
|
|
395
456
|
setIsDriverReviewed?: (isReviewed: boolean) => {},
|
|
396
457
|
dirverReviews?: any,
|
|
397
458
|
setDriverReviews?: any,
|
|
398
|
-
handleSendDriverReview?: any
|
|
459
|
+
handleSendDriverReview?: any;
|
|
399
460
|
}
|
|
400
461
|
export interface MessagesParams {
|
|
401
462
|
type?: string,
|
|
@@ -493,7 +554,9 @@ export interface OrderTypeSelectParams {
|
|
|
493
554
|
defaultValue?: number;
|
|
494
555
|
configTypes?: Array<any>;
|
|
495
556
|
orderTypes: Array<any>;
|
|
496
|
-
setOrderTypeValue?: (value
|
|
557
|
+
setOrderTypeValue?: (value: number) => any,
|
|
558
|
+
isChewLayout?: boolean;
|
|
559
|
+
chewOrderTypes?: any;
|
|
497
560
|
}
|
|
498
561
|
export interface UpsellingProductsParams {
|
|
499
562
|
isCustomMode?: boolean;
|
|
@@ -567,7 +630,11 @@ export interface BusinessSearchParams {
|
|
|
567
630
|
filters: any,
|
|
568
631
|
businessTypes: Array<number>,
|
|
569
632
|
setFilters: (filters: any) => void,
|
|
570
|
-
lazySearch?: boolean
|
|
633
|
+
lazySearch?: boolean,
|
|
634
|
+
brandList?: any;
|
|
635
|
+
onNavigationRedirect?: any,
|
|
636
|
+
handleUpdateProducts: any,
|
|
637
|
+
handleUpdateBusinessList?: any;
|
|
571
638
|
}
|
|
572
639
|
|
|
573
640
|
export interface NoNetworkParams {
|
|
@@ -575,26 +642,123 @@ export interface NoNetworkParams {
|
|
|
575
642
|
}
|
|
576
643
|
|
|
577
644
|
export interface PlaceSpotParams {
|
|
578
|
-
|
|
645
|
+
isCheckout?: any,
|
|
646
|
+
isInputMode?: any,
|
|
579
647
|
cart?: any,
|
|
648
|
+
spotNumberDefault?: any,
|
|
649
|
+
vehicleDefault?: any,
|
|
650
|
+
spotNumber?: any,
|
|
651
|
+
setSpotNumber?: any,
|
|
652
|
+
orderTypes?: any,
|
|
580
653
|
placesState?: any,
|
|
581
|
-
handleChangePlace
|
|
582
|
-
|
|
583
|
-
|
|
654
|
+
handleChangePlace? : any,
|
|
655
|
+
spotState?: any,
|
|
656
|
+
vehicle?: any,
|
|
657
|
+
setVehicle?: any,
|
|
658
|
+
handleChangeSpot?: any
|
|
584
659
|
}
|
|
585
660
|
|
|
586
661
|
export interface PromotionParams {
|
|
587
662
|
navigation: any,
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
663
|
+
offersState: any,
|
|
664
|
+
handleSearchValue: any,
|
|
665
|
+
searchValue: string,
|
|
666
|
+
offerSelected: any,
|
|
667
|
+
setOfferSelected: any,
|
|
668
|
+
loadOffers: any
|
|
593
669
|
}
|
|
594
670
|
export interface SessionsParams {
|
|
595
671
|
navigation: any,
|
|
596
672
|
sessionsList: any,
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
}
|
|
673
|
+
actionState: any,
|
|
674
|
+
handleDeleteSession: any,
|
|
675
|
+
handleDeleteAllSessions: any
|
|
676
|
+
}
|
|
677
|
+
|
|
678
|
+
export interface otpParams {
|
|
679
|
+
willVerifyOtpState: boolean,
|
|
680
|
+
setWillVerifyOtpState: (val: boolean) => void,
|
|
681
|
+
onSubmit: () => void,
|
|
682
|
+
handleLoginOtp: (code: string) => void,
|
|
683
|
+
setAlertState: any;
|
|
684
|
+
pinCount: number;
|
|
685
|
+
}
|
|
686
|
+
|
|
687
|
+
export interface FavoriteParams {
|
|
688
|
+
favoriteList: any,
|
|
689
|
+
handleUpdateFavoriteList: (id: number, changes: any) => {},
|
|
690
|
+
pagination: any,
|
|
691
|
+
getFavoriteList: (value: number) => {},
|
|
692
|
+
navigation?: any,
|
|
693
|
+
onNavigationRedirect?: (route: string, params?: any) => {},
|
|
694
|
+
reorderState?: any,
|
|
695
|
+
handleReorder?: (orderId: number) => {},
|
|
696
|
+
isOrder?: boolean,
|
|
697
|
+
isProduct?: boolean,
|
|
698
|
+
isBusiness?: boolean
|
|
699
|
+
}
|
|
700
|
+
|
|
701
|
+
export interface SingleOrderCardParams {
|
|
702
|
+
order: any,
|
|
703
|
+
reorderLoading: any,
|
|
704
|
+
handleReorder?: (value: any) => {},
|
|
705
|
+
getOrderStatus: any,
|
|
706
|
+
handleFavoriteOrder?: (value: boolean) => {},
|
|
707
|
+
onNavigationRedirect?: (route: string, params?: any) => {},
|
|
708
|
+
pastOrders: any,
|
|
709
|
+
isMessageView?: any,
|
|
710
|
+
handleClickOrder: (value: any) => {},
|
|
711
|
+
handleRemoveCart: () => {},
|
|
712
|
+
cartState: any
|
|
713
|
+
}
|
|
714
|
+
|
|
715
|
+
export interface PreviousBusinessOrderedParams {
|
|
716
|
+
navigation?: any,
|
|
717
|
+
businessesList?: any,
|
|
718
|
+
setBusinessLoading?: any,
|
|
719
|
+
businessId?: number,
|
|
720
|
+
onNavigationRedirect?: any,
|
|
721
|
+
isBusinessesSearchList?: any,
|
|
722
|
+
businessLoading?: boolean
|
|
723
|
+
}
|
|
724
|
+
|
|
725
|
+
export interface ServiceFormParams {
|
|
726
|
+
navigation?: any,
|
|
727
|
+
professionalSelected: any,
|
|
728
|
+
product: any,
|
|
729
|
+
handleSave: (value?: any) => {}
|
|
730
|
+
productCart?: any
|
|
731
|
+
isSoldOut: boolean,
|
|
732
|
+
maxProductQuantity: any,
|
|
733
|
+
businessSlug?: string,
|
|
734
|
+
onClose: any,
|
|
735
|
+
professionalList: any
|
|
736
|
+
}
|
|
737
|
+
|
|
738
|
+
export interface ProfessionalFilterParams {
|
|
739
|
+
professionals?: any,
|
|
740
|
+
professionalSelected?: any,
|
|
741
|
+
handleChangeProfessionalSelected: any
|
|
742
|
+
}
|
|
743
|
+
|
|
744
|
+
export interface ProfessionalProfileParams {
|
|
745
|
+
professional: any,
|
|
746
|
+
handleChangeProfessionalSelected: any,
|
|
747
|
+
onClose: any
|
|
748
|
+
}
|
|
749
|
+
|
|
750
|
+
export interface OrderItAgainParams {
|
|
751
|
+
onProductClick: any,
|
|
752
|
+
productList: any,
|
|
753
|
+
businessId: any,
|
|
754
|
+
categoryState: any,
|
|
755
|
+
currentCart: any,
|
|
756
|
+
handleUpdateProducts: any,
|
|
757
|
+
navigation: any
|
|
758
|
+
}
|
|
759
|
+
|
|
760
|
+
export interface PreviousProductsOrderedParams {
|
|
761
|
+
products?: any,
|
|
762
|
+
onProductClick?: any,
|
|
763
|
+
isBusinessesSearchList?: boolean
|
|
764
|
+
}
|
|
@@ -40,6 +40,72 @@ export const getTraduction = (key: string) => {
|
|
|
40
40
|
return keyList[key] ? t(key, keyList[key]) : t(key)
|
|
41
41
|
}
|
|
42
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
|
+
|
|
43
109
|
/**
|
|
44
110
|
* Function to convert delivery time in minutes
|
|
45
111
|
* @param {string} time business delivery time
|
|
@@ -212,4 +278,31 @@ export const formatUrlVideo = (url : string) => {
|
|
|
212
278
|
const match = url.match(regExp)
|
|
213
279
|
const id = (match && match[7].length === 11) ? match[7] : false
|
|
214
280
|
return `https://www.youtube-nocookie.com/embed/${id}`
|
|
215
|
-
}
|
|
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
|
+
]
|
|
@@ -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}>
|