ordering-ui-react-native 0.16.21 → 0.16.22-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 -4
- package/src/DeliveryApp.tsx +43 -1
- package/src/components/ActiveOrders/index.tsx +61 -63
- package/src/components/ActiveOrders/styles.tsx +8 -14
- package/src/components/AddressForm/index.tsx +18 -2
- package/src/components/BusinessBasicInformation/index.tsx +11 -19
- package/src/components/BusinessController/index.tsx +10 -8
- package/src/components/BusinessInformation/index.tsx +33 -4
- package/src/components/BusinessInformation/styles.tsx +2 -2
- package/src/components/BusinessProductsList/index.tsx +10 -10
- package/src/components/BusinessesListing/index.tsx +1 -1
- package/src/components/Checkout/index.tsx +2 -1
- package/src/components/LanguageSelector/index.tsx +21 -16
- package/src/components/LoginForm/index.tsx +118 -30
- package/src/components/LoginForm/styles.tsx +6 -0
- package/src/components/Messages/index.tsx +2 -2
- package/src/components/NotificationSetting/index.tsx +85 -0
- package/src/components/OrderDetails/index.tsx +2 -20
- package/src/components/OrdersOption/index.tsx +54 -56
- 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 +143 -61
- package/src/components/SingleProductReview/index.tsx +8 -5
- package/src/components/StripeElementsForm/index.tsx +25 -16
- package/src/components/VerifyPhone/styles.tsx +1 -2
- package/src/components/shared/OBottomPopup.tsx +6 -2
- package/src/index.tsx +2 -0
- package/src/pages/BusinessesListing.tsx +7 -6
- package/src/pages/OrderDetails.tsx +1 -1
- package/src/pages/ReviewDriver.tsx +2 -2
- package/src/pages/ReviewOrder.tsx +2 -2
- package/src/theme.json +0 -1
- package/src/types/@fatnlazycat/react-native-recaptcha-v3/index.d.ts +1 -0
- package/src/types/index.tsx +13 -9
- package/src/utils/index.tsx +0 -1
- package/themes/business/index.tsx +4 -0
- package/themes/business/src/components/BusinessController/index.tsx +2 -2
- package/themes/business/src/components/Chat/index.tsx +42 -34
- package/themes/business/src/components/DriverMap/index.tsx +7 -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 +111 -74
- package/themes/business/src/components/MapView/index.tsx +12 -1
- package/themes/business/src/components/MessagesOption/index.tsx +11 -1
- package/themes/business/src/components/OrderDetails/Business.tsx +1 -1
- package/themes/business/src/components/OrderDetails/Delivery.tsx +3 -3
- package/themes/business/src/components/OrderDetails/OrderContentComponent.tsx +25 -19
- package/themes/business/src/components/OrdersListManager/index.tsx +10 -3
- package/themes/business/src/components/OrdersOption/index.tsx +65 -21
- package/themes/business/src/components/OrdersOption/styles.tsx +5 -1
- package/themes/business/src/components/OrdersOptionBusiness/index.tsx +15 -1
- package/themes/business/src/components/OrdersOptionCity/index.tsx +15 -1
- package/themes/business/src/components/OrdersOptionDate/index.tsx +19 -6
- package/themes/business/src/components/OrdersOptionDelivery/index.tsx +15 -1
- package/themes/business/src/components/OrdersOptionDriver/index.tsx +15 -1
- package/themes/business/src/components/OrdersOptionPaymethod/index.tsx +15 -1
- package/themes/business/src/components/OrdersOptionStatus/index.tsx +10 -1
- package/themes/business/src/components/PreviousMessages/index.tsx +17 -18
- package/themes/business/src/components/PreviousOrders/index.tsx +21 -23
- package/themes/business/src/components/ProductItemAccordion/index.tsx +5 -4
- package/themes/business/src/components/ReviewCustomer/index.tsx +1 -1
- 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/ODropDown.tsx +42 -8
- package/themes/business/src/components/shared/ODropDownCalendar.tsx +36 -7
- package/themes/business/src/components/shared/OModal.tsx +40 -37
- package/themes/business/src/types/index.tsx +15 -9
- package/themes/business/src/utils/index.tsx +10 -0
- package/themes/doordash/src/components/BusinessesListing/index.tsx +1 -1
- package/themes/doordash/src/components/LoginForm/index.tsx +1 -2
- package/themes/instacart/src/components/BusinessesListing/index.tsx +1 -1
- package/themes/kiosk/src/components/BusinessMenu/index.tsx +2 -1
- package/themes/kiosk/src/components/CartItem/index.tsx +4 -3
- package/themes/kiosk/src/components/CategoriesMenu/index.tsx +1 -0
- package/themes/kiosk/src/components/Checkout/index.tsx +6 -0
- 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/LoginForm/index.tsx +121 -10
- package/themes/kiosk/src/components/LoginForm/styles.tsx +5 -0
- package/themes/kiosk/src/components/NavBar/index.tsx +14 -14
- package/themes/kiosk/src/components/OptionCard/index.tsx +1 -1
- package/themes/kiosk/src/components/OrderTypeCardSelector/index.tsx +8 -10
- package/themes/kiosk/src/components/shared/OButton.tsx +5 -18
- package/themes/kiosk/src/types/index.d.ts +2 -0
- package/themes/original/index.tsx +12 -0
- package/themes/original/src/components/AddressForm/index.tsx +136 -133
- package/themes/original/src/components/AddressList/index.tsx +1 -1
- package/themes/original/src/components/AppleLogin/index.tsx +4 -4
- package/themes/original/src/components/BusinessBasicInformation/index.tsx +302 -160
- package/themes/original/src/components/BusinessBasicInformation/styles.tsx +6 -2
- package/themes/original/src/components/BusinessController/index.tsx +173 -108
- package/themes/original/src/components/BusinessItemAccordion/index.tsx +8 -6
- package/themes/original/src/components/BusinessListingSearch/BusinessControllerSkeletons/index.tsx +57 -0
- package/themes/original/src/components/BusinessListingSearch/MaxSectionItem/index.tsx +59 -0
- package/themes/original/src/components/BusinessListingSearch/MaxSectionItem/styles.tsx +13 -0
- package/themes/original/src/components/BusinessListingSearch/index.tsx +106 -126
- package/themes/original/src/components/BusinessListingSearch/styles.tsx +18 -13
- 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 +49 -52
- package/themes/original/src/components/BusinessProductsList/styles.tsx +0 -3
- package/themes/original/src/components/BusinessProductsListing/index.tsx +287 -175
- package/themes/original/src/components/BusinessProductsListing/styles.tsx +22 -8
- package/themes/original/src/components/BusinessReviews/index.tsx +6 -1
- package/themes/original/src/components/BusinessTypeFilter/index.tsx +109 -40
- package/themes/original/src/components/BusinessTypeFilter/styles.tsx +2 -0
- package/themes/original/src/components/BusinessesListing/Layout/Appointment/index.tsx +561 -0
- package/themes/original/src/components/BusinessesListing/{styles.tsx → Layout/Appointment/styles.tsx} +24 -10
- package/themes/original/src/components/BusinessesListing/Layout/Original/index.tsx +676 -0
- package/themes/original/src/components/BusinessesListing/Layout/Original/styles.tsx +137 -0
- package/themes/original/src/components/BusinessesListing/index.tsx +105 -519
- package/themes/original/src/components/Cart/index.tsx +42 -10
- package/themes/original/src/components/Cart/styles.tsx +4 -0
- package/themes/original/src/components/CartContent/index.tsx +22 -16
- package/themes/original/src/components/Checkout/index.tsx +106 -66
- package/themes/original/src/components/Checkout/styles.tsx +0 -1
- package/themes/original/src/components/DriverTips/index.tsx +4 -4
- package/themes/original/src/components/DriverTips/styles.tsx +2 -1
- package/themes/original/src/components/Favorite/index.tsx +1 -0
- package/themes/original/src/components/Favorite/styles.tsx +1 -0
- package/themes/original/src/components/FavoriteList/index.tsx +142 -93
- package/themes/original/src/components/FloatingButton/styles.tsx +1 -1
- package/themes/original/src/components/GPSButton/index.tsx +20 -19
- package/themes/original/src/components/GoogleMap/index.tsx +20 -12
- package/themes/original/src/components/HelpAccountAndPayment/index.tsx +8 -3
- package/themes/original/src/components/HelpGuide/index.tsx +8 -3
- package/themes/original/src/components/HelpOrder/index.tsx +8 -3
- package/themes/original/src/components/LanguageSelector/index.tsx +19 -14
- package/themes/original/src/components/LoginForm/Otp/index.tsx +3 -2
- package/themes/original/src/components/LoginForm/index.tsx +82 -44
- package/themes/original/src/components/Messages/index.tsx +17 -17
- 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/MultiCheckout/index.tsx +6 -0
- package/themes/original/src/components/MultiOrdersDetails/index.tsx +20 -16
- package/themes/original/src/components/MyOrders/index.tsx +68 -6
- package/themes/original/src/components/NavBar/index.tsx +15 -9
- package/themes/original/src/components/NetworkError/index.tsx +5 -3
- package/themes/original/src/components/NotFoundSource/index.tsx +2 -1
- package/themes/original/src/components/Notifications/index.tsx +148 -0
- package/themes/original/src/components/Notifications/styles.tsx +17 -0
- package/themes/original/src/components/OrderDetails/OrderHistory.tsx +167 -0
- package/themes/original/src/components/OrderDetails/index.tsx +200 -42
- package/themes/original/src/components/OrderDetails/styles.tsx +15 -2
- package/themes/original/src/components/OrderItAgain/index.tsx +75 -0
- package/themes/original/src/components/OrderItAgain/styles.tsx +10 -0
- package/themes/original/src/components/OrderProgress/index.tsx +8 -2
- package/themes/original/src/components/OrderSummary/index.tsx +1 -34
- package/themes/original/src/components/OrderTypeSelector/index.tsx +85 -36
- package/themes/original/src/components/OrderTypeSelector/styles.tsx +19 -1
- package/themes/original/src/components/OrdersOption/PreviousBusinessOrdered/index.tsx +100 -106
- package/themes/original/src/components/OrdersOption/PreviousProductsOrdered/index.tsx +17 -12
- package/themes/original/src/components/OrdersOption/index.tsx +71 -55
- package/themes/original/src/components/PaymentOptionWallet/index.tsx +56 -56
- package/themes/original/src/components/PaymentOptions/index.tsx +57 -37
- package/themes/original/src/components/PhoneInputNumber/index.tsx +4 -10
- 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 +3 -2
- package/themes/original/src/components/ProductForm/index.tsx +712 -655
- package/themes/original/src/components/ProductForm/styles.tsx +9 -7
- package/themes/original/src/components/ProductItemAccordion/index.tsx +198 -127
- package/themes/original/src/components/ProductOption/index.tsx +1 -1
- package/themes/original/src/components/ProfessionalFilter/index.tsx +129 -0
- package/themes/original/src/components/ProfessionalFilter/styles.tsx +0 -0
- package/themes/original/src/components/ProfessionalProfile/index.tsx +309 -0
- package/themes/original/src/components/ProfessionalProfile/styles.tsx +46 -0
- package/themes/original/src/components/ReviewDriver/index.tsx +6 -6
- package/themes/original/src/components/ReviewOrder/index.tsx +18 -3
- package/themes/original/src/components/ReviewProducts/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 +5 -3
- package/themes/original/src/components/ServiceForm/index.tsx +631 -0
- package/themes/original/src/components/ServiceForm/styles.tsx +50 -0
- package/themes/original/src/components/SignupForm/index.tsx +350 -206
- package/themes/original/src/components/SingleOrderCard/index.tsx +214 -179
- package/themes/original/src/components/SingleProductCard/index.tsx +194 -108
- package/themes/original/src/components/SingleProductCard/styles.tsx +2 -2
- package/themes/original/src/components/SingleProductReview/index.tsx +38 -5
- package/themes/original/src/components/SingleProductReview/styles.tsx +12 -0
- package/themes/original/src/components/StripeElementsForm/index.tsx +15 -7
- package/themes/original/src/components/UpsellingProducts/index.tsx +14 -4
- package/themes/original/src/components/UserDetails/index.tsx +31 -17
- package/themes/original/src/components/UserFormDetails/index.tsx +74 -81
- package/themes/original/src/components/UserProfile/index.tsx +57 -29
- package/themes/original/src/components/UserProfile/styles.ts +17 -0
- package/themes/original/src/components/UserProfileForm/index.tsx +15 -10
- package/themes/original/src/components/WalletTransactions/index.tsx +76 -0
- package/themes/original/src/components/WalletTransactions/styles.tsx +13 -0
- package/themes/original/src/components/Wallets/index.tsx +174 -162
- package/themes/original/src/components/Wallets/styles.tsx +10 -8
- package/themes/original/src/components/shared/OBottomPopup.tsx +47 -14
- package/themes/original/src/components/shared/OButton.tsx +10 -3
- package/themes/original/src/components/shared/OIcon.tsx +8 -1
- package/themes/original/src/components/shared/OInput.tsx +3 -2
- package/themes/original/src/layouts/FloatingBottomContainer.tsx +5 -1
- package/themes/original/src/types/index.tsx +124 -30
- package/themes/original/src/utils/index.tsx +77 -0
- package/themes/uber-eats/src/components/BusinessesListing/index.tsx +1 -1
|
@@ -26,7 +26,14 @@ const OImage = (props: Props): React.ReactElement => {
|
|
|
26
26
|
return (
|
|
27
27
|
<Wrapper style={{ borderRadius: props.style?.borderRadius, overflow: 'hidden', marginHorizontal: props.style?.marginHorizontal }}>
|
|
28
28
|
<SImage
|
|
29
|
-
source={
|
|
29
|
+
source={
|
|
30
|
+
props.src
|
|
31
|
+
? props.src
|
|
32
|
+
: props.url
|
|
33
|
+
? typeof props.url === 'number'
|
|
34
|
+
? props.url
|
|
35
|
+
: { uri: props.url }
|
|
36
|
+
: props.dummy}
|
|
30
37
|
style={{
|
|
31
38
|
tintColor: props.color,
|
|
32
39
|
flex: props.isWrap ? 1 : 0,
|
|
@@ -56,7 +56,7 @@ const Wrapper = styled.Pressable`
|
|
|
56
56
|
const OInput = (props: Props): React.ReactElement => {
|
|
57
57
|
return (
|
|
58
58
|
<Wrapper
|
|
59
|
-
onPress={() => {props.forwardRef?.current?.focus?.(); props.onPress && props.onPress()}}
|
|
59
|
+
onPress={() => { props.forwardRef?.current?.focus?.(); props.onPress && props.onPress() }}
|
|
60
60
|
style={{
|
|
61
61
|
backgroundColor: props.bgColor,
|
|
62
62
|
borderColor: props.borderColor,
|
|
@@ -75,6 +75,7 @@ const OInput = (props: Props): React.ReactElement => {
|
|
|
75
75
|
<MaterialIcon name={props?.vertorIcon} size={20} color={props?.vectorIconColor} style={{ marginHorizontal: 10 }} />
|
|
76
76
|
)}
|
|
77
77
|
<Input
|
|
78
|
+
autoFocus={props?.autoFocus}
|
|
78
79
|
name={props.name}
|
|
79
80
|
secureTextEntry={props.isSecured}
|
|
80
81
|
onChangeText={(txt: any) => props.name ? props.onChange({ target: { name: props.name, value: txt } }) : props.onChange(txt)}
|
|
@@ -90,7 +91,7 @@ const OInput = (props: Props): React.ReactElement => {
|
|
|
90
91
|
returnKeyType={props.returnKeyType}
|
|
91
92
|
onSubmitEditing={props.onSubmitEditing}
|
|
92
93
|
blurOnSubmit={props.blurOnSubmit}
|
|
93
|
-
ref={(e
|
|
94
|
+
ref={(e: any) => {
|
|
94
95
|
props.forwardRef && (props.forwardRef.current = e)
|
|
95
96
|
}}
|
|
96
97
|
style={props?.inputStyle}
|
|
@@ -19,7 +19,11 @@ export const Container = styled.View`
|
|
|
19
19
|
|
|
20
20
|
export const FloatingBottomContainer = (props: any) => {
|
|
21
21
|
return (
|
|
22
|
-
<Container style={{
|
|
22
|
+
<Container style={{
|
|
23
|
+
width: windowWidth,
|
|
24
|
+
borderTopWidth: props?.borderTopWidth ?? 1,
|
|
25
|
+
borderRadius: props?.borderRadius ?? 0
|
|
26
|
+
}}>
|
|
23
27
|
{props.children}
|
|
24
28
|
</Container>
|
|
25
29
|
)
|
|
@@ -47,6 +47,8 @@ export interface ProfileParams {
|
|
|
47
47
|
isVerifiedPhone?: any;
|
|
48
48
|
handleRemoveAccount?: any;
|
|
49
49
|
removeAccountState?: any;
|
|
50
|
+
handleChangePromotions?: any;
|
|
51
|
+
notificationsGroup?: any;
|
|
50
52
|
}
|
|
51
53
|
|
|
52
54
|
export interface AddressListParams {
|
|
@@ -80,6 +82,7 @@ export interface AddressFormParams {
|
|
|
80
82
|
saveAddress?: any,
|
|
81
83
|
userCustomerSetup?: boolean,
|
|
82
84
|
isRequiredField?: (field: string) => {},
|
|
85
|
+
showField?: (field: string) => {},
|
|
83
86
|
isGuestUser?: boolean,
|
|
84
87
|
useValidationFileds?: boolean,
|
|
85
88
|
isSelectedAfterAdd?: boolean,
|
|
@@ -110,9 +113,20 @@ export interface SignupParams {
|
|
|
110
113
|
handleSendVerifyCode?: any;
|
|
111
114
|
handleCheckPhoneCode?: any;
|
|
112
115
|
notificationState?: any;
|
|
116
|
+
signUpTab?: string;
|
|
117
|
+
useSignUpFullDetails?: boolean;
|
|
118
|
+
useSignUpOtpEmail?: boolean;
|
|
119
|
+
useSignUpOtpCellphone?: boolean;
|
|
120
|
+
willVerifyOtpState?: boolean;
|
|
121
|
+
numOtpInputs?: number;
|
|
113
122
|
handleChangePromotions: () => void;
|
|
123
|
+
handleChangeInput?: (in1: any, in2: any) => void;
|
|
114
124
|
enableReCaptcha?: boolean;
|
|
115
|
-
|
|
125
|
+
generateOtpCode?: (in1?: any) => void;
|
|
126
|
+
handleReCaptcha?: (token?: any) => void;
|
|
127
|
+
setSignUpTab?: (in1: string) => void;
|
|
128
|
+
setWillVerifyOtpState?: (in1: boolean) => void;
|
|
129
|
+
setOtpState?: (in1: string) => void;
|
|
116
130
|
}
|
|
117
131
|
|
|
118
132
|
export interface PhoneInputParams {
|
|
@@ -155,6 +169,10 @@ export interface BusinessesListingParams {
|
|
|
155
169
|
businessId?: any;
|
|
156
170
|
isGuestUser?: any;
|
|
157
171
|
handleUpdateBusinessList?: any;
|
|
172
|
+
priceLevelSelected?: any;
|
|
173
|
+
handleChangePriceLevel?: any;
|
|
174
|
+
businessTypeSelected?: any;
|
|
175
|
+
logosLayout?: boolean;
|
|
158
176
|
}
|
|
159
177
|
export interface HighestRatedBusinessesParams {
|
|
160
178
|
businessesList: { businesses: Array<any>, loading: boolean, error: null | string };
|
|
@@ -173,7 +191,8 @@ export interface BusinessTypeFilterParams {
|
|
|
173
191
|
defaultBusinessType?: string | null;
|
|
174
192
|
images?: any
|
|
175
193
|
typesState?: any
|
|
176
|
-
setBusinessTypes?: any
|
|
194
|
+
setBusinessTypes?: any,
|
|
195
|
+
isAppoint?: boolean | undefined
|
|
177
196
|
}
|
|
178
197
|
export interface BusinessControllerParams {
|
|
179
198
|
key?: string | number;
|
|
@@ -198,6 +217,8 @@ export interface BusinessControllerParams {
|
|
|
198
217
|
handleFavoriteBusiness?: any,
|
|
199
218
|
setFavoriteIds?: any;
|
|
200
219
|
handleUpdateBusinessList?: any;
|
|
220
|
+
enableIntersection?: boolean;
|
|
221
|
+
handleCustomUpdate?: (businessId: number, changes: any) => {};
|
|
201
222
|
}
|
|
202
223
|
export interface BusinessProductsListingParams {
|
|
203
224
|
navigation?: any;
|
|
@@ -221,6 +242,8 @@ export interface BusinessProductsListingParams {
|
|
|
221
242
|
setProductLogin?: () => {};
|
|
222
243
|
updateProductModal?: (value: any) => {};
|
|
223
244
|
handleUpdateProducts?: any;
|
|
245
|
+
professionalSelected?: any;
|
|
246
|
+
handleChangeProfessionalSelected?: any;
|
|
224
247
|
}
|
|
225
248
|
export interface BusinessBasicInformationParams {
|
|
226
249
|
navigation?: any;
|
|
@@ -269,18 +292,24 @@ export interface BusinessProductsListParams {
|
|
|
269
292
|
onClickCategory?: any,
|
|
270
293
|
lazyLoadProductsRecommended?: boolean,
|
|
271
294
|
isFiltMode?: boolean,
|
|
272
|
-
handleUpdateProducts?: any
|
|
295
|
+
handleUpdateProducts?: any,
|
|
296
|
+
navigation?: any;
|
|
297
|
+
previouslyProducts?: any;
|
|
273
298
|
}
|
|
274
299
|
export interface SingleProductCardParams {
|
|
275
|
-
businessId: any
|
|
300
|
+
businessId: any;
|
|
276
301
|
product: any;
|
|
277
302
|
isSoldOut: boolean;
|
|
278
303
|
onProductClick: any;
|
|
279
304
|
productAddedToCartLength: number;
|
|
280
|
-
style?: ViewStyle
|
|
281
|
-
categoryState?: any
|
|
282
|
-
handleFavoriteProduct?: any
|
|
283
|
-
handleUpdateProducts?: any
|
|
305
|
+
style?: ViewStyle;
|
|
306
|
+
categoryState?: any;
|
|
307
|
+
handleFavoriteProduct?: any;
|
|
308
|
+
handleUpdateProducts?: any;
|
|
309
|
+
enableIntersection?: boolean;
|
|
310
|
+
navigation?: any;
|
|
311
|
+
isPreviously?: any;
|
|
312
|
+
isProductId?: any;
|
|
284
313
|
}
|
|
285
314
|
export interface BusinessInformationParams {
|
|
286
315
|
navigation?: any,
|
|
@@ -335,6 +364,8 @@ export interface OrdersOptionParams {
|
|
|
335
364
|
refreshOrders?: boolean,
|
|
336
365
|
setRefreshOrders?: (value: boolean) => void,
|
|
337
366
|
handleUpdateOrderList?: (orderId: number, changes: any) => {},
|
|
367
|
+
handleUpdateProducts?: (productId: number, changes: any) => {},
|
|
368
|
+
handleUpdateBusinesses?: (businessId: number, changes: any) => {},
|
|
338
369
|
isBusiness?: boolean,
|
|
339
370
|
isProducts?: boolean,
|
|
340
371
|
businessOrderIds?: any,
|
|
@@ -342,6 +373,8 @@ export interface OrdersOptionParams {
|
|
|
342
373
|
businessesSearchList?: any,
|
|
343
374
|
hideOrders?: boolean,
|
|
344
375
|
BusinessControllerSkeletons?: any,
|
|
376
|
+
businessPaginationProps?: any,
|
|
377
|
+
businesses?: any
|
|
345
378
|
}
|
|
346
379
|
export interface ActiveOrdersParams {
|
|
347
380
|
orders?: any,
|
|
@@ -363,6 +396,7 @@ export interface PreviousOrdersParams {
|
|
|
363
396
|
getOrderStatus?: any,
|
|
364
397
|
orderID?: number
|
|
365
398
|
reorderLoading?: boolean,
|
|
399
|
+
loading?: boolean,
|
|
366
400
|
loadMoreOrders?: () => {},
|
|
367
401
|
handleReorder?: (orderId: number) => {},
|
|
368
402
|
onNavigationRedirect?: (route: string, params?: any) => {}
|
|
@@ -398,25 +432,26 @@ export interface ProductItemAccordionParams {
|
|
|
398
432
|
isFromCheckout?: any
|
|
399
433
|
}
|
|
400
434
|
export interface ReviewOrderParams {
|
|
401
|
-
order?: { id: number,
|
|
402
|
-
stars?: any
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
435
|
+
order?: { id: number, business_id: number, logo: string, driver: any, products: Array<any>, review: any, user_review: any };
|
|
436
|
+
stars?: any;
|
|
437
|
+
defaultStar?: number;
|
|
438
|
+
handleChangeInput?: any;
|
|
439
|
+
handleChangeRating?: any;
|
|
440
|
+
handleSendReview?: any;
|
|
441
|
+
formState?: any;
|
|
442
|
+
navigation?: any;
|
|
443
|
+
setIsReviewed?: (isReviewed: boolean) => void;
|
|
444
|
+
handleReviewState?: any;
|
|
445
|
+
setStars?: any;
|
|
446
|
+
onNavigationRedirect?: any;
|
|
412
447
|
}
|
|
413
448
|
export interface ReviewProductParams {
|
|
414
449
|
navigation?: any,
|
|
415
450
|
onNavigationRedirect?: any,
|
|
416
|
-
order?: { orderId: number,
|
|
451
|
+
order?: { orderId: number, business_id: number, logo: string, driver: any, products: Array<any>, review: any, user_review: any },
|
|
417
452
|
formState?: any,
|
|
418
453
|
handleChangeFormState?: any,
|
|
419
|
-
handleSendProductReview?: any
|
|
454
|
+
handleSendProductReview?: any;
|
|
420
455
|
}
|
|
421
456
|
export interface SingleProductReviewParams {
|
|
422
457
|
product: any,
|
|
@@ -426,12 +461,12 @@ export interface SingleProductReviewParams {
|
|
|
426
461
|
export interface ReviewDriverParams {
|
|
427
462
|
navigation?: any,
|
|
428
463
|
onNavigationRedirect?: any,
|
|
429
|
-
order?: { orderId: number,
|
|
464
|
+
order?: { orderId: number, business_id: number, logo: string, driver: any, products: Array<any>, review: any, user_review: any },
|
|
430
465
|
formState?: any,
|
|
431
466
|
setIsDriverReviewed?: (isReviewed: boolean) => {},
|
|
432
467
|
dirverReviews?: any,
|
|
433
468
|
setDriverReviews?: any,
|
|
434
|
-
handleSendDriverReview?: any
|
|
469
|
+
handleSendDriverReview?: any;
|
|
435
470
|
}
|
|
436
471
|
export interface MessagesParams {
|
|
437
472
|
type?: string,
|
|
@@ -529,7 +564,9 @@ export interface OrderTypeSelectParams {
|
|
|
529
564
|
defaultValue?: number;
|
|
530
565
|
configTypes?: Array<any>;
|
|
531
566
|
orderTypes: Array<any>;
|
|
532
|
-
setOrderTypeValue?: (value: number) => any
|
|
567
|
+
setOrderTypeValue?: (value: number) => any,
|
|
568
|
+
isChewLayout?: boolean;
|
|
569
|
+
chewOrderTypes?: any;
|
|
533
570
|
}
|
|
534
571
|
export interface UpsellingProductsParams {
|
|
535
572
|
isCustomMode?: boolean;
|
|
@@ -605,6 +642,9 @@ export interface BusinessSearchParams {
|
|
|
605
642
|
setFilters: (filters: any) => void,
|
|
606
643
|
lazySearch?: boolean,
|
|
607
644
|
brandList?: any;
|
|
645
|
+
onNavigationRedirect?: any,
|
|
646
|
+
handleUpdateProducts: any,
|
|
647
|
+
handleUpdateBusinessList?: any;
|
|
608
648
|
}
|
|
609
649
|
|
|
610
650
|
export interface NoNetworkParams {
|
|
@@ -612,12 +652,20 @@ export interface NoNetworkParams {
|
|
|
612
652
|
}
|
|
613
653
|
|
|
614
654
|
export interface PlaceSpotParams {
|
|
615
|
-
|
|
655
|
+
isCheckout?: any,
|
|
656
|
+
isInputMode?: any,
|
|
616
657
|
cart?: any,
|
|
658
|
+
spotNumberDefault?: any,
|
|
659
|
+
vehicleDefault?: any,
|
|
660
|
+
spotNumber?: any,
|
|
661
|
+
setSpotNumber?: any,
|
|
662
|
+
orderTypes?: any,
|
|
617
663
|
placesState?: any,
|
|
618
664
|
handleChangePlace?: any,
|
|
619
|
-
|
|
620
|
-
|
|
665
|
+
spotState?: any,
|
|
666
|
+
vehicle?: any,
|
|
667
|
+
setVehicle?: any,
|
|
668
|
+
handleChangeSpot?: any
|
|
621
669
|
}
|
|
622
670
|
|
|
623
671
|
export interface PromotionParams {
|
|
@@ -642,7 +690,8 @@ export interface otpParams {
|
|
|
642
690
|
setWillVerifyOtpState: (val: boolean) => void,
|
|
643
691
|
onSubmit: () => void,
|
|
644
692
|
handleLoginOtp: (code: string) => void,
|
|
645
|
-
setAlertState: any
|
|
693
|
+
setAlertState: any;
|
|
694
|
+
pinCount: number;
|
|
646
695
|
}
|
|
647
696
|
|
|
648
697
|
export interface FavoriteParams {
|
|
@@ -668,7 +717,9 @@ export interface SingleOrderCardParams {
|
|
|
668
717
|
onNavigationRedirect?: (route: string, params?: any) => {},
|
|
669
718
|
pastOrders: any,
|
|
670
719
|
isMessageView?: any,
|
|
671
|
-
handleClickOrder: (value: any) => {}
|
|
720
|
+
handleClickOrder: (value: any) => {},
|
|
721
|
+
handleRemoveCart: () => {},
|
|
722
|
+
cartState: any
|
|
672
723
|
}
|
|
673
724
|
|
|
674
725
|
export interface PreviousBusinessOrderedParams {
|
|
@@ -678,11 +729,54 @@ export interface PreviousBusinessOrderedParams {
|
|
|
678
729
|
businessId?: number,
|
|
679
730
|
onNavigationRedirect?: any,
|
|
680
731
|
isBusinessesSearchList?: any,
|
|
681
|
-
businessLoading?: boolean
|
|
732
|
+
businessLoading?: boolean,
|
|
733
|
+
businesses?: any
|
|
734
|
+
handleUpdateBusinesses?: (businessId: number, changes: any) => {},
|
|
735
|
+
}
|
|
736
|
+
|
|
737
|
+
export interface ServiceFormParams {
|
|
738
|
+
navigation?: any,
|
|
739
|
+
professionalSelected: any,
|
|
740
|
+
product: any,
|
|
741
|
+
handleSave: (value?: any) => {}
|
|
742
|
+
productCart?: any
|
|
743
|
+
isSoldOut: boolean,
|
|
744
|
+
maxProductQuantity: any,
|
|
745
|
+
businessSlug?: string,
|
|
746
|
+
onClose: any,
|
|
747
|
+
professionalList: any,
|
|
748
|
+
productObject?: any,
|
|
749
|
+
professionalListState?: any,
|
|
750
|
+
isCartProduct?: any
|
|
751
|
+
}
|
|
752
|
+
|
|
753
|
+
export interface ProfessionalFilterParams {
|
|
754
|
+
professionals?: any,
|
|
755
|
+
professionalSelected?: any,
|
|
756
|
+
handleChangeProfessionalSelected: any
|
|
757
|
+
}
|
|
758
|
+
|
|
759
|
+
export interface ProfessionalProfileParams {
|
|
760
|
+
professional: any,
|
|
761
|
+
handleChangeProfessionalSelected: any,
|
|
762
|
+
onClose: any
|
|
763
|
+
}
|
|
764
|
+
|
|
765
|
+
export interface OrderItAgainParams {
|
|
766
|
+
onProductClick: any,
|
|
767
|
+
productList: any,
|
|
768
|
+
businessId: any,
|
|
769
|
+
categoryState: any,
|
|
770
|
+
currentCart: any,
|
|
771
|
+
handleUpdateProducts: any,
|
|
772
|
+
navigation: any,
|
|
773
|
+
searchValue?: string
|
|
682
774
|
}
|
|
683
775
|
|
|
684
776
|
export interface PreviousProductsOrderedParams {
|
|
685
777
|
products?: any,
|
|
778
|
+
isProductId?: boolean
|
|
686
779
|
onProductClick?: any,
|
|
687
780
|
isBusinessesSearchList?: boolean
|
|
781
|
+
handleUpdateProducts?: any
|
|
688
782
|
}
|
|
@@ -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
|
|
@@ -229,3 +295,14 @@ export const formatSeconds = (seconds : number) => {
|
|
|
229
295
|
ret += '' + secs
|
|
230
296
|
return ret
|
|
231
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}>
|