ordering-ui-react-native 0.17.5 → 0.17.6-release
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +5 -5
- package/src/DeliveryApp.tsx +43 -1
- package/src/components/BusinessInformation/index.tsx +11 -4
- package/src/components/BusinessInformation/styles.tsx +2 -2
- package/src/components/BusinessesListing/index.tsx +1 -1
- package/src/components/OrderCreating/index.tsx +1 -21
- package/src/components/PaymentOptionsWebView/index.tsx +119 -120
- package/src/components/SingleProductReview/index.tsx +7 -4
- package/src/components/StripeMethodForm/index.tsx +6 -14
- package/src/components/VerifyPhone/styles.tsx +1 -2
- package/src/components/shared/OToast.tsx +4 -4
- package/src/utils/index.tsx +7 -1
- package/themes/business/index.tsx +2 -0
- package/themes/business/src/components/AcceptOrRejectOrder/index.tsx +265 -240
- package/themes/business/src/components/AcceptOrRejectOrder/styles.tsx +6 -4
- package/themes/business/src/components/BusinessController/index.tsx +0 -1
- package/themes/business/src/components/Chat/index.tsx +118 -107
- package/themes/business/src/components/DriverMap/index.tsx +22 -9
- package/themes/business/src/components/GoogleMap/index.tsx +58 -57
- package/themes/business/src/components/LoginForm/Otp/index.tsx +120 -0
- package/themes/business/src/components/LoginForm/Otp/styles.tsx +7 -0
- package/themes/business/src/components/LoginForm/index.tsx +238 -80
- package/themes/business/src/components/LoginForm/styles.tsx +10 -0
- package/themes/business/src/components/MapView/index.tsx +18 -7
- package/themes/business/src/components/NewOrderNotification/index.tsx +43 -50
- package/themes/business/src/components/OrderDetails/Delivery.tsx +4 -3
- package/themes/business/src/components/OrderDetails/OrderContentComponent.tsx +96 -50
- package/themes/business/src/components/OrderDetails/OrderHeaderComponent.tsx +59 -62
- package/themes/business/src/components/OrderDetailsLogistic/index.tsx +195 -0
- package/themes/business/src/components/OrderDetailsLogistic/styles.tsx +5 -0
- package/themes/business/src/components/OrderMessage/index.tsx +18 -17
- package/themes/business/src/components/OrderSummary/index.tsx +113 -121
- package/themes/business/src/components/OrdersOption/index.tsx +32 -75
- package/themes/business/src/components/PreviousOrders/OrderItem.tsx +250 -0
- package/themes/business/src/components/PreviousOrders/OrdersGroupedItem.tsx +115 -0
- package/themes/business/src/components/PreviousOrders/index.tsx +445 -243
- package/themes/business/src/components/PreviousOrders/styles.tsx +31 -3
- package/themes/business/src/components/ProductItemAccordion/index.tsx +27 -3
- package/themes/business/src/components/ReviewCustomer/index.tsx +41 -24
- package/themes/business/src/components/StoresList/index.tsx +2 -2
- package/themes/business/src/components/shared/OLink.tsx +33 -13
- package/themes/business/src/components/shared/OModal.tsx +16 -9
- package/themes/business/src/components/shared/OText.tsx +8 -2
- package/themes/business/src/types/index.tsx +33 -2
- package/themes/business/src/utils/index.tsx +51 -0
- package/themes/doordash/src/components/BusinessesListing/index.tsx +1 -1
- package/themes/doordash/src/components/LoginForm/index.tsx +1 -2
- package/themes/instacart/src/components/BusinessesListing/index.tsx +1 -1
- package/themes/kiosk/src/components/BusinessesListing/index.tsx +2 -1
- package/themes/kiosk/src/components/Checkout/index.tsx +6 -0
- package/themes/kiosk/src/components/LoginForm/Otp/index.tsx +92 -0
- package/themes/kiosk/src/components/LoginForm/Otp/styles.tsx +7 -0
- package/themes/kiosk/src/components/LoginForm/index.tsx +473 -151
- package/themes/kiosk/src/components/LoginForm/styles.tsx +14 -1
- 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/PhoneInputNumber/index.tsx +3 -2
- package/themes/kiosk/src/components/PhoneInputNumber/styles.tsx +1 -3
- package/themes/kiosk/src/components/ProductForm/index.tsx +1 -14
- package/themes/kiosk/src/components/shared/OButton.tsx +5 -18
- package/themes/kiosk/src/components/shared/OModal.tsx +14 -11
- package/themes/kiosk/src/layouts/Container.tsx +7 -1
- package/themes/kiosk/src/types/index.d.ts +13 -0
- package/themes/kiosk/src/utils/index.tsx +15 -0
- package/themes/original/index.tsx +8 -0
- package/themes/original/src/components/AddressDetails/index.tsx +29 -11
- package/themes/original/src/components/AddressForm/index.tsx +41 -16
- package/themes/original/src/components/AddressList/index.tsx +26 -21
- package/themes/original/src/components/AddressList/styles.tsx +4 -2
- package/themes/original/src/components/AnalyticsSegment/index.tsx +189 -9
- package/themes/original/src/components/AppleLogin/index.tsx +4 -4
- package/themes/original/src/components/BusinessBasicInformation/index.tsx +125 -82
- package/themes/original/src/components/BusinessBasicInformation/styles.tsx +9 -4
- package/themes/original/src/components/BusinessController/index.tsx +145 -68
- package/themes/original/src/components/BusinessController/styles.tsx +22 -9
- package/themes/original/src/components/BusinessFeaturedController/index.tsx +21 -54
- package/themes/original/src/components/BusinessFeaturedController/styles.tsx +8 -0
- package/themes/original/src/components/BusinessInformation/index.tsx +10 -31
- package/themes/original/src/components/BusinessItemAccordion/index.tsx +24 -23
- package/themes/original/src/components/BusinessListingSearch/index.tsx +52 -24
- package/themes/original/src/components/BusinessPreorder/index.tsx +97 -16
- package/themes/original/src/components/BusinessProductsList/index.tsx +20 -11
- package/themes/original/src/components/BusinessProductsList/styles.tsx +8 -3
- package/themes/original/src/components/BusinessProductsListing/index.tsx +617 -490
- package/themes/original/src/components/BusinessProductsListing/styles.tsx +7 -13
- package/themes/original/src/components/BusinessReviews/index.tsx +3 -1
- package/themes/original/src/components/BusinessTypeFilter/index.tsx +3 -3
- package/themes/original/src/components/BusinessesListing/Layout/Appointment/index.tsx +1 -1
- package/themes/original/src/components/BusinessesListing/Layout/Original/index.tsx +98 -78
- package/themes/original/src/components/BusinessesListing/Layout/Original/styles.tsx +1 -9
- package/themes/original/src/components/BusinessesListing/index.tsx +5 -3
- package/themes/original/src/components/Cart/index.tsx +88 -43
- package/themes/original/src/components/CartContent/index.tsx +102 -3
- package/themes/original/src/components/CartContent/styles.tsx +15 -1
- package/themes/original/src/components/Checkout/index.tsx +311 -178
- package/themes/original/src/components/Checkout/styles.tsx +4 -2
- package/themes/original/src/components/CitiesControl/index.tsx +89 -0
- package/themes/original/src/components/CitiesControl/styles.tsx +17 -0
- package/themes/original/src/components/CouponControl/index.tsx +10 -3
- package/themes/original/src/components/DriverTips/index.tsx +52 -37
- package/themes/original/src/components/DriverTips/styles.tsx +2 -1
- package/themes/original/src/components/Favorite/index.tsx +7 -4
- package/themes/original/src/components/Favorite/styles.tsx +1 -1
- package/themes/original/src/components/FavoriteList/index.tsx +70 -80
- package/themes/original/src/components/FloatingButton/index.tsx +1 -2
- package/themes/original/src/components/FloatingButton/styles.tsx +1 -1
- package/themes/original/src/components/GPSButton/styles.ts +3 -3
- package/themes/original/src/components/GiftCard/GiftCardUI/index.tsx +96 -0
- package/themes/original/src/components/GiftCard/GiftCardUI/styles.tsx +5 -0
- package/themes/original/src/components/GiftCard/PurchaseGiftCard/index.tsx +100 -0
- package/themes/original/src/components/GiftCard/PurchaseGiftCard/styles.tsx +8 -0
- package/themes/original/src/components/GiftCard/RedeemGiftCard/index.tsx +178 -0
- package/themes/original/src/components/GiftCard/RedeemGiftCard/styles.tsx +8 -0
- package/themes/original/src/components/GiftCard/SendGiftCard/index.tsx +165 -0
- package/themes/original/src/components/GiftCard/SendGiftCard/styles.tsx +9 -0
- package/themes/original/src/components/Help/index.tsx +8 -8
- package/themes/original/src/components/HelpAccountAndPayment/index.tsx +11 -22
- package/themes/original/src/components/HelpAccountAndPayment/styles.tsx +6 -0
- package/themes/original/src/components/HelpGuide/index.tsx +12 -16
- package/themes/original/src/components/HelpGuide/styles.tsx +6 -0
- package/themes/original/src/components/HelpOrder/index.tsx +12 -25
- package/themes/original/src/components/HelpOrder/styles.tsx +8 -1
- package/themes/original/src/components/Home/index.tsx +13 -4
- package/themes/original/src/components/LanguageSelector/index.tsx +19 -14
- package/themes/original/src/components/LastOrder/index.tsx +1 -34
- package/themes/original/src/components/LoginForm/Otp/index.tsx +89 -73
- package/themes/original/src/components/LoginForm/Otp/styles.tsx +0 -1
- package/themes/original/src/components/LoginForm/index.tsx +43 -19
- package/themes/original/src/components/LottieAnimation/index.tsx +78 -0
- package/themes/original/src/components/MessageListing/index.tsx +16 -42
- package/themes/original/src/components/Messages/index.tsx +32 -10
- package/themes/original/src/components/MomentOption/index.tsx +195 -88
- package/themes/original/src/components/MultiCart/index.tsx +50 -0
- package/themes/original/src/components/MultiCartsPaymethodsAndWallets/index.tsx +117 -96
- package/themes/original/src/components/MultiCheckout/index.tsx +248 -83
- package/themes/original/src/components/MultiOrdersDetails/SingleOrderCard.tsx +37 -224
- package/themes/original/src/components/MultiOrdersDetails/index.tsx +67 -20
- package/themes/original/src/components/MultiOrdersDetails/styles.tsx +1 -1
- package/themes/original/src/components/MyOrders/index.tsx +66 -17
- package/themes/original/src/components/NavBar/index.tsx +6 -11
- package/themes/original/src/components/Notifications/index.tsx +144 -0
- package/themes/original/src/components/Notifications/styles.tsx +20 -0
- package/themes/original/src/components/OrderDetails/OrderEta.tsx +61 -0
- package/themes/original/src/components/OrderDetails/index.tsx +262 -347
- package/themes/original/src/components/OrderDetails/styles.tsx +10 -1
- package/themes/original/src/components/OrderItAgain/index.tsx +47 -43
- package/themes/original/src/components/OrderProgress/index.tsx +74 -112
- package/themes/original/src/components/OrderProgress/styles.tsx +5 -0
- package/themes/original/src/components/OrderSummary/index.tsx +68 -29
- package/themes/original/src/components/OrderTypeSelector/index.tsx +4 -3
- package/themes/original/src/components/OrdersOption/PreviousBusinessOrdered/index.tsx +28 -19
- package/themes/original/src/components/OrdersOption/PreviousProductsOrdered/index.tsx +3 -0
- package/themes/original/src/components/OrdersOption/index.tsx +101 -89
- package/themes/original/src/components/PageBanner/index.tsx +171 -0
- package/themes/original/src/components/PageBanner/styles.tsx +11 -0
- package/themes/original/src/components/PaymentOptionStripe/styles.tsx +1 -1
- package/themes/original/src/components/PaymentOptionWallet/index.tsx +56 -56
- package/themes/original/src/components/PaymentOptions/index.tsx +3 -3
- package/themes/original/src/components/PhoneInputNumber/index.tsx +3 -3
- package/themes/original/src/components/PlaceSpot/index.tsx +12 -6
- package/themes/original/src/components/PreviousOrders/index.tsx +3 -2
- package/themes/original/src/components/ProductForm/index.tsx +240 -261
- package/themes/original/src/components/ProductForm/styles.tsx +4 -7
- package/themes/original/src/components/ProductItemAccordion/index.tsx +197 -138
- package/themes/original/src/components/ProductOptionSubOption/index.tsx +18 -10
- package/themes/original/src/components/ProductOptionSubOption/styles.tsx +1 -2
- package/themes/original/src/components/ProfessionalFilter/SingleProfessionalCard/index.tsx +108 -0
- package/themes/original/src/components/ProfessionalFilter/index.tsx +20 -49
- package/themes/original/src/components/ProfessionalProfile/index.tsx +54 -14
- package/themes/original/src/components/Promotions/index.tsx +234 -220
- package/themes/original/src/components/Promotions/styles.tsx +10 -3
- package/themes/original/src/components/ReviewDriver/index.tsx +3 -3
- package/themes/original/src/components/ReviewOrder/index.tsx +26 -9
- package/themes/original/src/components/ReviewOrder/styles.tsx +7 -0
- package/themes/original/src/components/ReviewProducts/index.tsx +7 -4
- package/themes/original/src/components/ReviewTrigger/index.tsx +27 -9
- package/themes/original/src/components/ReviewTrigger/styles.tsx +8 -1
- package/themes/original/src/components/ScheduleAccordion/index.tsx +68 -0
- package/themes/original/src/components/ScheduleAccordion/styles.tsx +14 -0
- package/themes/original/src/components/ServiceForm/index.tsx +377 -270
- package/themes/original/src/components/Sessions/index.tsx +11 -8
- package/themes/original/src/components/Sessions/styles.tsx +5 -0
- package/themes/original/src/components/SignupForm/index.tsx +79 -66
- package/themes/original/src/components/SingleOrderCard/index.tsx +148 -62
- package/themes/original/src/components/SingleOrderCard/styles.tsx +11 -9
- package/themes/original/src/components/SingleProductCard/index.tsx +111 -56
- package/themes/original/src/components/SingleProductCard/styles.tsx +27 -13
- 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/StripeCardsList/index.tsx +1 -1
- package/themes/original/src/components/StripeElementsForm/index.tsx +4 -1
- package/themes/original/src/components/UpsellingProducts/index.tsx +238 -218
- package/themes/original/src/components/UpsellingProducts/styles.tsx +12 -1
- package/themes/original/src/components/UserDetails/index.tsx +8 -4
- package/themes/original/src/components/UserFormDetails/index.tsx +53 -54
- package/themes/original/src/components/UserProfile/index.tsx +58 -35
- package/themes/original/src/components/UserProfile/styles.ts +17 -0
- package/themes/original/src/components/UserProfileForm/index.tsx +21 -28
- package/themes/original/src/components/UserProfileForm/styles.tsx +7 -0
- package/themes/original/src/components/Wallets/index.tsx +31 -17
- package/themes/original/src/components/Wallets/styles.tsx +2 -0
- package/themes/original/src/components/shared/CardAnimation.tsx +47 -0
- package/themes/original/src/components/shared/HeaderTitle.tsx +8 -3
- package/themes/original/src/components/shared/OBottomPopup.tsx +1 -1
- package/themes/original/src/components/shared/OButton.tsx +6 -2
- package/themes/original/src/components/shared/OIcon.tsx +8 -1
- package/themes/original/src/components/shared/OInput.tsx +10 -1
- package/themes/original/src/components/shared/OModal.tsx +3 -3
- package/themes/original/src/layouts/Container.tsx +13 -9
- package/themes/original/src/types/index.tsx +47 -9
- package/themes/original/src/utils/index.tsx +375 -58
- package/themes/uber-eats/src/components/BusinessesListing/index.tsx +1 -1
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import React, { useState } from 'react'
|
|
2
|
+
import { StyleSheet, ViewStyle } from 'react-native'
|
|
3
|
+
import styled from 'styled-components/native'
|
|
4
|
+
|
|
5
|
+
const CardContainerTouchable = styled.TouchableOpacity``
|
|
6
|
+
|
|
7
|
+
interface Props {
|
|
8
|
+
children: React.ReactChildren | Element,
|
|
9
|
+
style?: Array<ViewStyle> | any,
|
|
10
|
+
onClick: any
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export const CardAnimation = (props: Props) => {
|
|
14
|
+
const {
|
|
15
|
+
children,
|
|
16
|
+
onClick,
|
|
17
|
+
style
|
|
18
|
+
} = props
|
|
19
|
+
const [isPressed, setIsPressed] = useState(false)
|
|
20
|
+
const styles = StyleSheet.create({
|
|
21
|
+
cardAnimation: {
|
|
22
|
+
elevation: isPressed ? 2 : 0,
|
|
23
|
+
shadowColor: '#888',
|
|
24
|
+
shadowOffset: { width: 0, height: 0 },
|
|
25
|
+
shadowRadius: 0,
|
|
26
|
+
shadowOpacity: isPressed ? 0.8 : 0,
|
|
27
|
+
borderRadius: 12,
|
|
28
|
+
}
|
|
29
|
+
})
|
|
30
|
+
|
|
31
|
+
const styleProvided = style || []
|
|
32
|
+
return (
|
|
33
|
+
<CardContainerTouchable
|
|
34
|
+
onPress={onClick}
|
|
35
|
+
activeOpacity={0.8}
|
|
36
|
+
delayPressIn={20}
|
|
37
|
+
onPressIn={() => setIsPressed(true)}
|
|
38
|
+
onPressOut={() => setIsPressed(false)}
|
|
39
|
+
style={[
|
|
40
|
+
...styleProvided,
|
|
41
|
+
styles.cardAnimation
|
|
42
|
+
]}
|
|
43
|
+
>
|
|
44
|
+
{children}
|
|
45
|
+
</CardContainerTouchable>
|
|
46
|
+
)
|
|
47
|
+
}
|
|
@@ -1,16 +1,21 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Platform } from 'react-native';
|
|
3
3
|
import OText from './OText';
|
|
4
|
+
import { useTheme } from 'styled-components/native'
|
|
4
5
|
|
|
5
6
|
const HeaderTitle = (props: any) => {
|
|
6
7
|
const { text, style } = props
|
|
8
|
+
const theme = useTheme();
|
|
9
|
+
|
|
7
10
|
return (
|
|
8
11
|
<OText
|
|
9
|
-
size={
|
|
12
|
+
size={20}
|
|
13
|
+
weight={Platform.OS === 'ios' ? '600' : 'bold'}
|
|
10
14
|
style={style ?? {
|
|
11
15
|
marginTop: Platform.OS === 'android' ? 50 : 30,
|
|
12
|
-
paddingHorizontal: 40,
|
|
13
|
-
textTransform: 'capitalize'
|
|
16
|
+
paddingHorizontal: props.ph ?? 40,
|
|
17
|
+
textTransform: 'capitalize',
|
|
18
|
+
color: props.titleColor || theme.colors.textNormal,
|
|
14
19
|
}}
|
|
15
20
|
>
|
|
16
21
|
{text}
|
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
import * as React from 'react';
|
|
13
13
|
import styled, { useTheme } from 'styled-components/native';
|
|
14
14
|
import { OIcon } from './';
|
|
15
|
+
import { css } from 'styled-components';
|
|
15
16
|
|
|
16
17
|
const StyledButton = styled.View<Props>`
|
|
17
18
|
background-color: ${(props: any) => props.theme.colors.primary};
|
|
@@ -26,6 +27,9 @@ const StyledButton = styled.View<Props>`
|
|
|
26
27
|
padding-left: 20px;
|
|
27
28
|
padding-right: 20px;
|
|
28
29
|
position: relative;
|
|
30
|
+
${(props: any) => props?.theme?.general?.components?.buttons?.borderRadius && css`
|
|
31
|
+
border-radius: ${props?.theme?.general?.components?.buttons?.borderRadius}px;
|
|
32
|
+
`}
|
|
29
33
|
`
|
|
30
34
|
const StyledButtonDisabled = styled(StyledButton)`
|
|
31
35
|
background-color: ${(props: any) => props.theme.colors.disabled};
|
|
@@ -115,12 +119,12 @@ const OButton = (props: Props): React.ReactElement => {
|
|
|
115
119
|
style={{ width: props.isCircle ? 52 : props.style?.width, ...props.parentStyle }}
|
|
116
120
|
disabled={props.isDisabledWithSameStyles}
|
|
117
121
|
>
|
|
118
|
-
<StyledButton style={props.bgColor ? { ...props.style, backgroundColor: props.bgColor, borderColor: props.borderColor } : props.style}>
|
|
122
|
+
<StyledButton style={props.bgColor ? { ...props.style, backgroundColor: props.bgColor, borderColor: props.borderColor, borderRadius: parseInt(theme?.general?.components?.buttons?.borderRadius) || props.style?.borderRadius } : { ...props.style, borderRadius: parseInt(theme?.general?.components?.buttons?.borderRadius) || props.style?.borderRadius }}>
|
|
119
123
|
{props.icon ? (
|
|
120
124
|
<props.icon {...props.iconProps} />
|
|
121
125
|
) : null}
|
|
122
126
|
{props.imgLeftSrc ? (
|
|
123
|
-
<OIcon style={props.imgLeftStyle} src={props.imgLeftSrc} />
|
|
127
|
+
<OIcon style={props.imgLeftStyle} src={props.imgLeftSrc} color={theme.colors.textNormal} />
|
|
124
128
|
) : null}
|
|
125
129
|
{props.text ? (
|
|
126
130
|
<StyledText style={props.textStyle}>{props.text}</StyledText>
|
|
@@ -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,
|
|
@@ -3,6 +3,7 @@ import { ImageSourcePropType, ImageStyle, ViewStyle, TextInputProps, TextStyle }
|
|
|
3
3
|
import styled from 'styled-components/native';
|
|
4
4
|
import OIcon from './OIcon';
|
|
5
5
|
import MaterialIcon from 'react-native-vector-icons/MaterialIcons'
|
|
6
|
+
import { useTheme } from 'styled-components/native';
|
|
6
7
|
|
|
7
8
|
const Input = styled.TextInput`
|
|
8
9
|
flex-grow: 1;
|
|
@@ -39,6 +40,7 @@ interface Props extends TextInputProps {
|
|
|
39
40
|
inputStyle?: TextStyle;
|
|
40
41
|
wrapperRef?: any;
|
|
41
42
|
onPress?: any;
|
|
43
|
+
isFocusHighlight?: boolean
|
|
42
44
|
}
|
|
43
45
|
|
|
44
46
|
const Wrapper = styled.Pressable`
|
|
@@ -54,12 +56,16 @@ const Wrapper = styled.Pressable`
|
|
|
54
56
|
`;
|
|
55
57
|
|
|
56
58
|
const OInput = (props: Props): React.ReactElement => {
|
|
59
|
+
const theme = useTheme();
|
|
60
|
+
const [inputFocused, setInputFocused] = React.useState(false)
|
|
57
61
|
return (
|
|
58
62
|
<Wrapper
|
|
59
63
|
onPress={() => { props.forwardRef?.current?.focus?.(); props.onPress && props.onPress() }}
|
|
60
64
|
style={{
|
|
61
65
|
backgroundColor: props.bgColor,
|
|
62
|
-
borderColor: props.
|
|
66
|
+
borderColor: !props.isFocusHighlight
|
|
67
|
+
? props.borderColor
|
|
68
|
+
: inputFocused ? theme.colors.primary : theme.colors.border,
|
|
63
69
|
...props.style,
|
|
64
70
|
}}>
|
|
65
71
|
{props.icon ? (
|
|
@@ -95,6 +101,8 @@ const OInput = (props: Props): React.ReactElement => {
|
|
|
95
101
|
props.forwardRef && (props.forwardRef.current = e)
|
|
96
102
|
}}
|
|
97
103
|
style={props?.inputStyle}
|
|
104
|
+
onFocus={() => setInputFocused(true)}
|
|
105
|
+
onBlur={() => setInputFocused(false)}
|
|
98
106
|
/>
|
|
99
107
|
{props.iconRight && (
|
|
100
108
|
<OIcon
|
|
@@ -114,6 +122,7 @@ OInput.defaultProps = {
|
|
|
114
122
|
iconColor: '#959595',
|
|
115
123
|
bgColor: 'white',
|
|
116
124
|
borderColor: 'white',
|
|
125
|
+
isFocusHighlight: false
|
|
117
126
|
};
|
|
118
127
|
|
|
119
128
|
export default OInput;
|
|
@@ -52,7 +52,7 @@ const OModal = (props: Props): React.ReactElement => {
|
|
|
52
52
|
|
|
53
53
|
const theme = useTheme();
|
|
54
54
|
|
|
55
|
-
const
|
|
55
|
+
const renderSafeAreaView = () => (
|
|
56
56
|
<SafeAreaView style={styles.container}>
|
|
57
57
|
{!entireModal ? (
|
|
58
58
|
<View style={styles.centeredView}>
|
|
@@ -101,10 +101,10 @@ const OModal = (props: Props): React.ReactElement => {
|
|
|
101
101
|
enabled
|
|
102
102
|
behavior={Platform.OS === 'ios' ? 'padding' : 'height'}
|
|
103
103
|
>
|
|
104
|
-
|
|
104
|
+
{renderSafeAreaView()}
|
|
105
105
|
</KeyboardView>
|
|
106
106
|
) : (
|
|
107
|
-
|
|
107
|
+
renderSafeAreaView()
|
|
108
108
|
)}
|
|
109
109
|
</Modal>
|
|
110
110
|
);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
2
|
+
import { useSafeAreaInsets } from 'react-native-safe-area-context'
|
|
3
|
+
import styled, { css, useTheme } from 'styled-components/native';
|
|
4
|
+
import { Platform, View } from 'react-native';
|
|
4
5
|
|
|
5
6
|
const ContainerStyled = styled.ScrollView`
|
|
6
7
|
flex: 1;
|
|
@@ -10,17 +11,20 @@ const ContainerStyled = styled.ScrollView`
|
|
|
10
11
|
background-color: ${(props: any) => props.theme.colors.backgroundPage};
|
|
11
12
|
`;
|
|
12
13
|
|
|
13
|
-
const SafeAreaStyled = styled.SafeAreaView`
|
|
14
|
-
flex: 1;
|
|
15
|
-
background-color: ${(props: any) => props.theme.colors.backgroundPage};
|
|
16
|
-
`;
|
|
17
|
-
|
|
18
14
|
export const Container = (props: any) => {
|
|
15
|
+
const theme = useTheme()
|
|
16
|
+
const insets = useSafeAreaInsets()
|
|
19
17
|
return (
|
|
20
|
-
<
|
|
18
|
+
<View
|
|
19
|
+
style={{
|
|
20
|
+
flex: 1,
|
|
21
|
+
paddingTop: props.pt ?? insets.top,
|
|
22
|
+
backgroundColor: theme.colors.backgroundPage
|
|
23
|
+
}}
|
|
24
|
+
>
|
|
21
25
|
<ContainerStyled {...props} ref={props?.forwardRef} keyboardShouldPersistTaps='handled' style={{...props.style}}>
|
|
22
26
|
{props.children}
|
|
23
27
|
</ContainerStyled>
|
|
24
|
-
</
|
|
28
|
+
</View>
|
|
25
29
|
)
|
|
26
30
|
}
|
|
@@ -19,6 +19,7 @@ export interface LoginParams {
|
|
|
19
19
|
notificationState?: any;
|
|
20
20
|
handleReCaptcha?: any;
|
|
21
21
|
enableReCaptcha?: any;
|
|
22
|
+
isGuest?: any;
|
|
22
23
|
otpType?: string,
|
|
23
24
|
setOtpType: (type: string) => void,
|
|
24
25
|
generateOtpCode: (values?: any) => void,
|
|
@@ -47,6 +48,8 @@ export interface ProfileParams {
|
|
|
47
48
|
isVerifiedPhone?: any;
|
|
48
49
|
handleRemoveAccount?: any;
|
|
49
50
|
removeAccountState?: any;
|
|
51
|
+
handleChangePromotions?: any;
|
|
52
|
+
notificationsGroup?: any;
|
|
50
53
|
}
|
|
51
54
|
|
|
52
55
|
export interface AddressListParams {
|
|
@@ -89,7 +92,8 @@ export interface AddressFormParams {
|
|
|
89
92
|
hasAddressDefault?: any,
|
|
90
93
|
isFromCheckout?: boolean
|
|
91
94
|
afterSignup?: boolean
|
|
92
|
-
isGuestFromStore?: boolean
|
|
95
|
+
isGuestFromStore?: boolean,
|
|
96
|
+
businessSlug?: number | string
|
|
93
97
|
}
|
|
94
98
|
export interface SignupParams {
|
|
95
99
|
navigation?: any;
|
|
@@ -116,6 +120,7 @@ export interface SignupParams {
|
|
|
116
120
|
useSignUpOtpEmail?: boolean;
|
|
117
121
|
useSignUpOtpCellphone?: boolean;
|
|
118
122
|
willVerifyOtpState?: boolean;
|
|
123
|
+
isGuest?: any;
|
|
119
124
|
numOtpInputs?: number;
|
|
120
125
|
handleChangePromotions: () => void;
|
|
121
126
|
handleChangeInput?: (in1: any, in2: any) => void;
|
|
@@ -171,6 +176,9 @@ export interface BusinessesListingParams {
|
|
|
171
176
|
handleChangePriceLevel?: any;
|
|
172
177
|
businessTypeSelected?: any;
|
|
173
178
|
logosLayout?: boolean;
|
|
179
|
+
isCustomLayout?: boolean;
|
|
180
|
+
citiesState?: any;
|
|
181
|
+
actualSlug?: any;
|
|
174
182
|
}
|
|
175
183
|
export interface HighestRatedBusinessesParams {
|
|
176
184
|
businessesList: { businesses: Array<any>, loading: boolean, error: null | string };
|
|
@@ -216,6 +224,9 @@ export interface BusinessControllerParams {
|
|
|
216
224
|
setFavoriteIds?: any;
|
|
217
225
|
handleUpdateBusinessList?: any;
|
|
218
226
|
enableIntersection?: boolean;
|
|
227
|
+
isCustomLayout?: boolean;
|
|
228
|
+
getBusinessOffer?: any;
|
|
229
|
+
handleCustomUpdate?: (businessId: number, changes: any) => {};
|
|
219
230
|
}
|
|
220
231
|
export interface BusinessProductsListingParams {
|
|
221
232
|
navigation?: any;
|
|
@@ -241,6 +252,10 @@ export interface BusinessProductsListingParams {
|
|
|
241
252
|
handleUpdateProducts?: any;
|
|
242
253
|
professionalSelected?: any;
|
|
243
254
|
handleChangeProfessionalSelected?: any;
|
|
255
|
+
handleUpdateProfessionals?: any;
|
|
256
|
+
onBusinessClick?: any;
|
|
257
|
+
onNavigationRedirect?: any;
|
|
258
|
+
businessSingleId?: number | string
|
|
244
259
|
}
|
|
245
260
|
export interface BusinessBasicInformationParams {
|
|
246
261
|
navigation?: any;
|
|
@@ -292,6 +307,7 @@ export interface BusinessProductsListParams {
|
|
|
292
307
|
handleUpdateProducts?: any,
|
|
293
308
|
navigation?: any;
|
|
294
309
|
previouslyProducts?: any;
|
|
310
|
+
businessSingleId?: number | string
|
|
295
311
|
}
|
|
296
312
|
export interface SingleProductCardParams {
|
|
297
313
|
businessId: any;
|
|
@@ -306,6 +322,9 @@ export interface SingleProductCardParams {
|
|
|
306
322
|
enableIntersection?: boolean;
|
|
307
323
|
navigation?: any;
|
|
308
324
|
isPreviously?: any;
|
|
325
|
+
isProductId?: any;
|
|
326
|
+
viewString?: string;
|
|
327
|
+
businessSingleId?: number
|
|
309
328
|
}
|
|
310
329
|
export interface BusinessInformationParams {
|
|
311
330
|
navigation?: any,
|
|
@@ -360,6 +379,8 @@ export interface OrdersOptionParams {
|
|
|
360
379
|
refreshOrders?: boolean,
|
|
361
380
|
setRefreshOrders?: (value: boolean) => void,
|
|
362
381
|
handleUpdateOrderList?: (orderId: number, changes: any) => {},
|
|
382
|
+
handleUpdateProducts?: (productId: number, changes: any) => {},
|
|
383
|
+
handleUpdateBusinesses?: (businessId: number, changes: any) => {},
|
|
363
384
|
isBusiness?: boolean,
|
|
364
385
|
isProducts?: boolean,
|
|
365
386
|
businessOrderIds?: any,
|
|
@@ -390,6 +411,7 @@ export interface PreviousOrdersParams {
|
|
|
390
411
|
getOrderStatus?: any,
|
|
391
412
|
orderID?: number
|
|
392
413
|
reorderLoading?: boolean,
|
|
414
|
+
loading?: boolean,
|
|
393
415
|
loadMoreOrders?: () => {},
|
|
394
416
|
handleReorder?: (orderId: number) => {},
|
|
395
417
|
onNavigationRedirect?: (route: string, params?: any) => {}
|
|
@@ -422,7 +444,8 @@ export interface ProductItemAccordionParams {
|
|
|
422
444
|
onDeleteProduct?: (product: any) => void,
|
|
423
445
|
onEditProduct?: (product: any) => void,
|
|
424
446
|
offsetDisabled?: any,
|
|
425
|
-
isFromCheckout?: any
|
|
447
|
+
isFromCheckout?: any,
|
|
448
|
+
isDisabledEdit?: any
|
|
426
449
|
}
|
|
427
450
|
export interface ReviewOrderParams {
|
|
428
451
|
order?: { id: number, business_id: number, logo: string, driver: any, products: Array<any>, review: any, user_review: any };
|
|
@@ -521,6 +544,7 @@ export interface FloatingButtonParams {
|
|
|
521
544
|
}
|
|
522
545
|
export interface MomentOptionParams {
|
|
523
546
|
navigation: any;
|
|
547
|
+
isCart?: any;
|
|
524
548
|
nopadding?: boolean;
|
|
525
549
|
datesList: Array<any>;
|
|
526
550
|
hoursList: Array<any>;
|
|
@@ -567,7 +591,7 @@ export interface UpsellingProductsParams {
|
|
|
567
591
|
business?: any;
|
|
568
592
|
businessId?: number;
|
|
569
593
|
cartProducts?: Array<any>;
|
|
570
|
-
handleUpsellingPage: () => void;
|
|
594
|
+
handleUpsellingPage: (cart ?: any) => void;
|
|
571
595
|
openUpselling: boolean;
|
|
572
596
|
canOpenUpselling?: boolean;
|
|
573
597
|
setCanOpenUpselling?: (value: any) => void;
|
|
@@ -578,6 +602,8 @@ export interface UpsellingProductsParams {
|
|
|
578
602
|
products?: any;
|
|
579
603
|
onNavigationRedirect?: any;
|
|
580
604
|
onGoBack?: any;
|
|
605
|
+
singleBusiness?: any;
|
|
606
|
+
isFranchiseApp?: any;
|
|
581
607
|
}
|
|
582
608
|
|
|
583
609
|
export interface GoogleMapsParams {
|
|
@@ -638,6 +664,7 @@ export interface BusinessSearchParams {
|
|
|
638
664
|
onNavigationRedirect?: any,
|
|
639
665
|
handleUpdateProducts: any,
|
|
640
666
|
handleUpdateBusinessList?: any;
|
|
667
|
+
brandId?: number
|
|
641
668
|
}
|
|
642
669
|
|
|
643
670
|
export interface NoNetworkParams {
|
|
@@ -651,14 +678,15 @@ export interface PlaceSpotParams {
|
|
|
651
678
|
spotNumberDefault?: any,
|
|
652
679
|
vehicleDefault?: any,
|
|
653
680
|
spotNumber?: any,
|
|
654
|
-
|
|
681
|
+
setSpotNumber?: any,
|
|
655
682
|
orderTypes?: any,
|
|
656
683
|
placesState?: any,
|
|
657
|
-
handleChangePlace
|
|
684
|
+
handleChangePlace?: any,
|
|
658
685
|
spotState?: any,
|
|
659
686
|
vehicle?: any,
|
|
660
687
|
setVehicle?: any,
|
|
661
688
|
handleChangeSpot?: any
|
|
689
|
+
setPlaceSpotNumber?: any
|
|
662
690
|
}
|
|
663
691
|
|
|
664
692
|
export interface PromotionParams {
|
|
@@ -711,7 +739,7 @@ export interface SingleOrderCardParams {
|
|
|
711
739
|
pastOrders: any,
|
|
712
740
|
isMessageView?: any,
|
|
713
741
|
handleClickOrder: (value: any) => {},
|
|
714
|
-
handleRemoveCart: () => {},
|
|
742
|
+
handleRemoveCart: (value: any) => {},
|
|
715
743
|
cartState: any
|
|
716
744
|
}
|
|
717
745
|
|
|
@@ -724,6 +752,7 @@ export interface PreviousBusinessOrderedParams {
|
|
|
724
752
|
isBusinessesSearchList?: any,
|
|
725
753
|
businessLoading?: boolean,
|
|
726
754
|
businesses?: any
|
|
755
|
+
handleUpdateBusinesses?: (businessId: number, changes: any) => {},
|
|
727
756
|
}
|
|
728
757
|
|
|
729
758
|
export interface ServiceFormParams {
|
|
@@ -736,13 +765,19 @@ export interface ServiceFormParams {
|
|
|
736
765
|
maxProductQuantity: any,
|
|
737
766
|
businessSlug?: string,
|
|
738
767
|
onClose: any,
|
|
739
|
-
professionalList: any
|
|
768
|
+
professionalList: any,
|
|
769
|
+
productObject?: any,
|
|
770
|
+
professionalListState?: any,
|
|
771
|
+
isCartProduct?: any,
|
|
772
|
+
actionStatus?: any,
|
|
773
|
+
handleCreateGuestUser?: any
|
|
740
774
|
}
|
|
741
775
|
|
|
742
776
|
export interface ProfessionalFilterParams {
|
|
743
777
|
professionals?: any,
|
|
744
778
|
professionalSelected?: any,
|
|
745
|
-
handleChangeProfessionalSelected: any
|
|
779
|
+
handleChangeProfessionalSelected: any,
|
|
780
|
+
handleUpdateProfessionals?: any
|
|
746
781
|
}
|
|
747
782
|
|
|
748
783
|
export interface ProfessionalProfileParams {
|
|
@@ -759,11 +794,14 @@ export interface OrderItAgainParams {
|
|
|
759
794
|
currentCart: any,
|
|
760
795
|
handleUpdateProducts: any,
|
|
761
796
|
navigation: any,
|
|
762
|
-
searchValue?: string
|
|
797
|
+
searchValue?: string,
|
|
798
|
+
businessSingleId?: number | string
|
|
763
799
|
}
|
|
764
800
|
|
|
765
801
|
export interface PreviousProductsOrderedParams {
|
|
766
802
|
products?: any,
|
|
803
|
+
isProductId?: boolean
|
|
767
804
|
onProductClick?: any,
|
|
768
805
|
isBusinessesSearchList?: boolean
|
|
806
|
+
handleUpdateProducts?: any
|
|
769
807
|
}
|