ordering-ui-react-native 0.16.90 → 0.16.91-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/ActiveOrders/styles.tsx +8 -14
- package/src/components/BusinessInformation/index.tsx +19 -4
- package/src/components/BusinessInformation/styles.tsx +2 -2
- package/src/components/BusinessProductsList/index.tsx +1 -1
- package/src/components/BusinessesListing/index.tsx +1 -1
- package/src/components/OrderCreating/index.tsx +1 -21
- package/src/components/OrdersOption/index.tsx +54 -56
- package/src/components/PaymentOptionsWebView/index.tsx +119 -120
- package/src/components/SingleProductReview/index.tsx +7 -4
- package/src/components/VerifyPhone/styles.tsx +1 -2
- package/src/components/shared/OToast.tsx +4 -4
- package/src/utils/index.tsx +2 -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 +2 -2
- package/themes/business/src/components/Chat/index.tsx +31 -31
- 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 +239 -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/MessagesOption/index.tsx +11 -1
- package/themes/business/src/components/NewOrderNotification/index.tsx +31 -41
- 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/OrdersOption/index.tsx +79 -87
- 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/OrderItem.tsx +250 -0
- package/themes/business/src/components/PreviousOrders/OrdersGroupedItem.tsx +115 -0
- package/themes/business/src/components/PreviousOrders/index.tsx +447 -247
- 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 +54 -27
- 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/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 +35 -3
- package/themes/business/src/utils/index.tsx +53 -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 +1 -0
- 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 +10 -8
- package/themes/original/src/components/AddressForm/index.tsx +155 -139
- package/themes/original/src/components/AddressList/index.tsx +27 -22
- package/themes/original/src/components/AddressList/styles.tsx +4 -2
- package/themes/original/src/components/AppleLogin/index.tsx +4 -4
- package/themes/original/src/components/BusinessBasicInformation/index.tsx +118 -76
- package/themes/original/src/components/BusinessBasicInformation/styles.tsx +1 -4
- package/themes/original/src/components/BusinessController/index.tsx +100 -47
- package/themes/original/src/components/BusinessController/styles.tsx +14 -9
- package/themes/original/src/components/BusinessInformation/index.tsx +10 -31
- package/themes/original/src/components/BusinessItemAccordion/index.tsx +9 -3
- package/themes/original/src/components/BusinessListingSearch/index.tsx +86 -33
- package/themes/original/src/components/BusinessListingSearch/styles.tsx +6 -0
- package/themes/original/src/components/BusinessPreorder/index.tsx +96 -15
- package/themes/original/src/components/BusinessProductsList/index.tsx +10 -8
- package/themes/original/src/components/BusinessProductsList/styles.tsx +0 -3
- package/themes/original/src/components/BusinessProductsListing/index.tsx +566 -490
- package/themes/original/src/components/BusinessProductsListing/styles.tsx +6 -12
- package/themes/original/src/components/BusinessTypeFilter/index.tsx +3 -2
- package/themes/original/src/components/BusinessesListing/Layout/Appointment/index.tsx +1 -1
- package/themes/original/src/components/BusinessesListing/Layout/Original/index.tsx +115 -82
- package/themes/original/src/components/BusinessesListing/Layout/Original/styles.tsx +1 -9
- package/themes/original/src/components/BusinessesListing/index.tsx +6 -6
- package/themes/original/src/components/Cart/index.tsx +87 -42
- package/themes/original/src/components/CartContent/index.tsx +77 -15
- package/themes/original/src/components/CartContent/styles.tsx +11 -1
- package/themes/original/src/components/Checkout/index.tsx +281 -174
- 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/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/index.tsx +20 -19
- package/themes/original/src/components/GPSButton/styles.ts +3 -3
- package/themes/original/src/components/GoogleMap/index.tsx +10 -1
- 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/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 +31 -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 +92 -93
- package/themes/original/src/components/MultiCheckout/index.tsx +204 -79
- 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/NetworkError/index.tsx +5 -3
- package/themes/original/src/components/NotFoundSource/index.tsx +2 -1
- 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 +59 -0
- package/themes/original/src/components/OrderDetails/index.tsx +110 -221
- package/themes/original/src/components/OrderDetails/styles.tsx +10 -1
- package/themes/original/src/components/OrderItAgain/index.tsx +44 -42
- 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 +52 -17
- package/themes/original/src/components/OrderTypeSelector/index.tsx +9 -3
- package/themes/original/src/components/OrdersOption/PreviousBusinessOrdered/index.tsx +29 -20
- package/themes/original/src/components/OrdersOption/PreviousProductsOrdered/index.tsx +3 -0
- package/themes/original/src/components/OrdersOption/index.tsx +76 -83
- package/themes/original/src/components/PageBanner/index.tsx +146 -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 +2 -2
- package/themes/original/src/components/PhoneInputNumber/index.tsx +1 -1
- 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 -256
- package/themes/original/src/components/ProductForm/styles.tsx +5 -8
- package/themes/original/src/components/ProductItemAccordion/index.tsx +199 -128
- 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 +7 -2
- package/themes/original/src/components/ReviewDriver/index.tsx +3 -3
- package/themes/original/src/components/ReviewOrder/index.tsx +43 -11
- package/themes/original/src/components/ReviewOrder/styles.tsx +7 -0
- package/themes/original/src/components/ReviewProducts/index.tsx +8 -5
- 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 +126 -57
- package/themes/original/src/components/SingleOrderCard/styles.tsx +10 -8
- package/themes/original/src/components/SingleProductCard/index.tsx +104 -45
- package/themes/original/src/components/SingleProductCard/styles.tsx +14 -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 +237 -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 +20 -21
- 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 +37 -5
- package/themes/original/src/utils/index.tsx +321 -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 {
|
|
@@ -80,6 +83,7 @@ export interface AddressFormParams {
|
|
|
80
83
|
saveAddress?: any,
|
|
81
84
|
userCustomerSetup?: boolean,
|
|
82
85
|
isRequiredField?: (field: string) => {},
|
|
86
|
+
showField?: (field: string) => {},
|
|
83
87
|
isGuestUser?: boolean,
|
|
84
88
|
useValidationFileds?: boolean,
|
|
85
89
|
isSelectedAfterAdd?: boolean,
|
|
@@ -115,6 +119,7 @@ export interface SignupParams {
|
|
|
115
119
|
useSignUpOtpEmail?: boolean;
|
|
116
120
|
useSignUpOtpCellphone?: boolean;
|
|
117
121
|
willVerifyOtpState?: boolean;
|
|
122
|
+
isGuest?: any;
|
|
118
123
|
numOtpInputs?: number;
|
|
119
124
|
handleChangePromotions: () => void;
|
|
120
125
|
handleChangeInput?: (in1: any, in2: any) => void;
|
|
@@ -170,6 +175,9 @@ export interface BusinessesListingParams {
|
|
|
170
175
|
handleChangePriceLevel?: any;
|
|
171
176
|
businessTypeSelected?: any;
|
|
172
177
|
logosLayout?: boolean;
|
|
178
|
+
isCustomLayout?: boolean;
|
|
179
|
+
citiesState?: any;
|
|
180
|
+
actualSlug?: any;
|
|
173
181
|
}
|
|
174
182
|
export interface HighestRatedBusinessesParams {
|
|
175
183
|
businessesList: { businesses: Array<any>, loading: boolean, error: null | string };
|
|
@@ -215,6 +223,9 @@ export interface BusinessControllerParams {
|
|
|
215
223
|
setFavoriteIds?: any;
|
|
216
224
|
handleUpdateBusinessList?: any;
|
|
217
225
|
enableIntersection?: boolean;
|
|
226
|
+
isCustomLayout?: boolean;
|
|
227
|
+
getBusinessOffer?: any;
|
|
228
|
+
handleCustomUpdate?: (businessId: number, changes: any) => {};
|
|
218
229
|
}
|
|
219
230
|
export interface BusinessProductsListingParams {
|
|
220
231
|
navigation?: any;
|
|
@@ -240,6 +251,9 @@ export interface BusinessProductsListingParams {
|
|
|
240
251
|
handleUpdateProducts?: any;
|
|
241
252
|
professionalSelected?: any;
|
|
242
253
|
handleChangeProfessionalSelected?: any;
|
|
254
|
+
handleUpdateProfessionals?: any;
|
|
255
|
+
onBusinessClick?: any;
|
|
256
|
+
onNavigationRedirect?: any;
|
|
243
257
|
}
|
|
244
258
|
export interface BusinessBasicInformationParams {
|
|
245
259
|
navigation?: any;
|
|
@@ -305,6 +319,7 @@ export interface SingleProductCardParams {
|
|
|
305
319
|
enableIntersection?: boolean;
|
|
306
320
|
navigation?: any;
|
|
307
321
|
isPreviously?: any;
|
|
322
|
+
isProductId?: any;
|
|
308
323
|
}
|
|
309
324
|
export interface BusinessInformationParams {
|
|
310
325
|
navigation?: any,
|
|
@@ -359,6 +374,8 @@ export interface OrdersOptionParams {
|
|
|
359
374
|
refreshOrders?: boolean,
|
|
360
375
|
setRefreshOrders?: (value: boolean) => void,
|
|
361
376
|
handleUpdateOrderList?: (orderId: number, changes: any) => {},
|
|
377
|
+
handleUpdateProducts?: (productId: number, changes: any) => {},
|
|
378
|
+
handleUpdateBusinesses?: (businessId: number, changes: any) => {},
|
|
362
379
|
isBusiness?: boolean,
|
|
363
380
|
isProducts?: boolean,
|
|
364
381
|
businessOrderIds?: any,
|
|
@@ -389,6 +406,7 @@ export interface PreviousOrdersParams {
|
|
|
389
406
|
getOrderStatus?: any,
|
|
390
407
|
orderID?: number
|
|
391
408
|
reorderLoading?: boolean,
|
|
409
|
+
loading?: boolean,
|
|
392
410
|
loadMoreOrders?: () => {},
|
|
393
411
|
handleReorder?: (orderId: number) => {},
|
|
394
412
|
onNavigationRedirect?: (route: string, params?: any) => {}
|
|
@@ -520,6 +538,7 @@ export interface FloatingButtonParams {
|
|
|
520
538
|
}
|
|
521
539
|
export interface MomentOptionParams {
|
|
522
540
|
navigation: any;
|
|
541
|
+
isCart?: any;
|
|
523
542
|
nopadding?: boolean;
|
|
524
543
|
datesList: Array<any>;
|
|
525
544
|
hoursList: Array<any>;
|
|
@@ -566,7 +585,7 @@ export interface UpsellingProductsParams {
|
|
|
566
585
|
business?: any;
|
|
567
586
|
businessId?: number;
|
|
568
587
|
cartProducts?: Array<any>;
|
|
569
|
-
handleUpsellingPage: () => void;
|
|
588
|
+
handleUpsellingPage: (cart ?: any) => void;
|
|
570
589
|
openUpselling: boolean;
|
|
571
590
|
canOpenUpselling?: boolean;
|
|
572
591
|
setCanOpenUpselling?: (value: any) => void;
|
|
@@ -577,6 +596,8 @@ export interface UpsellingProductsParams {
|
|
|
577
596
|
products?: any;
|
|
578
597
|
onNavigationRedirect?: any;
|
|
579
598
|
onGoBack?: any;
|
|
599
|
+
singleBusiness?: any;
|
|
600
|
+
isFranchiseApp?: any;
|
|
580
601
|
}
|
|
581
602
|
|
|
582
603
|
export interface GoogleMapsParams {
|
|
@@ -637,6 +658,7 @@ export interface BusinessSearchParams {
|
|
|
637
658
|
onNavigationRedirect?: any,
|
|
638
659
|
handleUpdateProducts: any,
|
|
639
660
|
handleUpdateBusinessList?: any;
|
|
661
|
+
brandId?: number
|
|
640
662
|
}
|
|
641
663
|
|
|
642
664
|
export interface NoNetworkParams {
|
|
@@ -650,14 +672,15 @@ export interface PlaceSpotParams {
|
|
|
650
672
|
spotNumberDefault?: any,
|
|
651
673
|
vehicleDefault?: any,
|
|
652
674
|
spotNumber?: any,
|
|
653
|
-
|
|
675
|
+
setSpotNumber?: any,
|
|
654
676
|
orderTypes?: any,
|
|
655
677
|
placesState?: any,
|
|
656
|
-
handleChangePlace
|
|
678
|
+
handleChangePlace?: any,
|
|
657
679
|
spotState?: any,
|
|
658
680
|
vehicle?: any,
|
|
659
681
|
setVehicle?: any,
|
|
660
682
|
handleChangeSpot?: any
|
|
683
|
+
setPlaceSpotNumber?: any
|
|
661
684
|
}
|
|
662
685
|
|
|
663
686
|
export interface PromotionParams {
|
|
@@ -723,6 +746,7 @@ export interface PreviousBusinessOrderedParams {
|
|
|
723
746
|
isBusinessesSearchList?: any,
|
|
724
747
|
businessLoading?: boolean,
|
|
725
748
|
businesses?: any
|
|
749
|
+
handleUpdateBusinesses?: (businessId: number, changes: any) => {},
|
|
726
750
|
}
|
|
727
751
|
|
|
728
752
|
export interface ServiceFormParams {
|
|
@@ -735,13 +759,19 @@ export interface ServiceFormParams {
|
|
|
735
759
|
maxProductQuantity: any,
|
|
736
760
|
businessSlug?: string,
|
|
737
761
|
onClose: any,
|
|
738
|
-
professionalList: any
|
|
762
|
+
professionalList: any,
|
|
763
|
+
productObject?: any,
|
|
764
|
+
professionalListState?: any,
|
|
765
|
+
isCartProduct?: any,
|
|
766
|
+
actionStatus?: any,
|
|
767
|
+
handleCreateGuestUser?: any
|
|
739
768
|
}
|
|
740
769
|
|
|
741
770
|
export interface ProfessionalFilterParams {
|
|
742
771
|
professionals?: any,
|
|
743
772
|
professionalSelected?: any,
|
|
744
|
-
handleChangeProfessionalSelected: any
|
|
773
|
+
handleChangeProfessionalSelected: any,
|
|
774
|
+
handleUpdateProfessionals?: any
|
|
745
775
|
}
|
|
746
776
|
|
|
747
777
|
export interface ProfessionalProfileParams {
|
|
@@ -763,6 +793,8 @@ export interface OrderItAgainParams {
|
|
|
763
793
|
|
|
764
794
|
export interface PreviousProductsOrderedParams {
|
|
765
795
|
products?: any,
|
|
796
|
+
isProductId?: boolean
|
|
766
797
|
onProductClick?: any,
|
|
767
798
|
isBusinessesSearchList?: boolean
|
|
799
|
+
handleUpdateProducts?: any
|
|
768
800
|
}
|