ordering-ui-react-native 0.15.62 → 0.15.64-release
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +7 -3
- package/src/DeliveryApp.tsx +43 -1
- package/src/components/AddressForm/index.tsx +18 -2
- package/src/components/BusinessBasicInformation/index.tsx +11 -19
- package/src/components/BusinessController/index.tsx +16 -8
- package/src/components/BusinessInformation/index.tsx +14 -0
- package/src/components/BusinessTypeFilter/index.tsx +1 -2
- package/src/components/BusinessesListing/index.tsx +1 -1
- package/src/components/Checkout/index.tsx +23 -2
- package/src/components/DriverTips/index.tsx +11 -6
- package/src/components/LanguageSelector/index.tsx +6 -2
- package/src/components/LoginForm/index.tsx +120 -30
- package/src/components/LoginForm/styles.tsx +6 -0
- package/src/components/OrderDetails/index.tsx +7 -21
- package/src/components/PaymentOptions/index.tsx +67 -50
- package/src/components/PaymentOptionsWebView/index.tsx +120 -121
- package/src/components/ReviewDriver/index.tsx +1 -1
- package/src/components/ReviewOrder/index.tsx +2 -1
- package/src/components/ReviewProducts/index.tsx +11 -0
- package/src/components/SignupForm/index.tsx +145 -61
- package/src/components/SingleProductCard/index.tsx +16 -4
- package/src/components/SingleProductReview/index.tsx +1 -1
- package/src/components/StripeMethodForm/index.tsx +22 -24
- package/src/components/UpsellingProducts/index.tsx +1 -1
- package/src/components/UserProfileForm/index.tsx +63 -6
- package/src/components/UserProfileForm/styles.tsx +8 -0
- package/src/components/VerifyPhone/styles.tsx +1 -2
- package/src/components/shared/OModal.tsx +1 -1
- package/src/hooks/useCountdownTimer.tsx +26 -0
- package/src/navigators/CheckoutNavigator.tsx +6 -0
- package/src/navigators/HomeNavigator.tsx +12 -0
- package/src/pages/BusinessesListing.tsx +7 -6
- package/src/pages/MultiCheckout.tsx +31 -0
- package/src/pages/MultiOrdersDetails.tsx +27 -0
- package/src/pages/OrderDetails.tsx +1 -1
- package/src/pages/ReviewDriver.tsx +2 -2
- package/src/pages/ReviewOrder.tsx +2 -2
- package/src/pages/Sessions.tsx +22 -0
- package/src/theme.json +0 -1
- package/src/types/index.tsx +18 -11
- package/src/utils/index.tsx +68 -1
- package/themes/business/src/components/AcceptOrRejectOrder/index.tsx +103 -15
- package/themes/business/src/components/AcceptOrRejectOrder/styles.tsx +6 -0
- package/themes/business/src/components/Chat/index.tsx +42 -90
- package/themes/business/src/components/DriverMap/index.tsx +6 -5
- package/themes/business/src/components/LoginForm/index.tsx +89 -2
- package/themes/business/src/components/LoginForm/styles.tsx +6 -0
- package/themes/business/src/components/LogoutButton/index.tsx +1 -1
- package/themes/business/src/components/NewOrderNotification/index.tsx +26 -13
- package/themes/business/src/components/OrderDetails/Business.tsx +2 -2
- package/themes/business/src/components/OrderDetails/Delivery.tsx +28 -11
- package/themes/business/src/components/OrderDetails/OrderContentComponent.tsx +14 -7
- package/themes/business/src/components/OrderDetails/OrderHeaderComponent.tsx +6 -0
- package/themes/business/src/components/OrdersListManager/index.tsx +1 -1
- package/themes/business/src/components/OrdersOption/index.tsx +8 -4
- package/themes/business/src/components/PreviousOrders/index.tsx +7 -7
- package/themes/business/src/components/ProductItemAccordion/index.tsx +2 -2
- package/themes/business/src/components/UserFormDetails/index.tsx +5 -2
- package/themes/business/src/components/UserProfileForm/index.tsx +2 -0
- package/themes/business/src/components/shared/OModal.tsx +1 -1
- package/themes/business/src/types/index.tsx +8 -2
- package/themes/doordash/src/components/BusinessesListing/index.tsx +1 -1
- package/themes/doordash/src/components/LoginForm/index.tsx +1 -2
- package/themes/instacart/src/components/BusinessesListing/index.tsx +1 -1
- package/themes/kiosk/src/components/BusinessMenu/index.tsx +39 -28
- package/themes/kiosk/src/components/BusinessesListing/index.tsx +2 -3
- package/themes/kiosk/src/components/Cart/index.tsx +11 -12
- package/themes/kiosk/src/components/CartBottomSheet/index.tsx +9 -2
- package/themes/kiosk/src/components/CartContent/index.tsx +0 -11
- package/themes/kiosk/src/components/CartItem/index.tsx +4 -3
- package/themes/kiosk/src/components/CategoriesMenu/index.tsx +107 -62
- package/themes/kiosk/src/components/Checkout/index.tsx +40 -22
- package/themes/kiosk/src/components/CustomerName/index.tsx +0 -6
- package/themes/kiosk/src/components/DrawerView/index.tsx +1 -0
- package/themes/kiosk/src/components/DrawerView/styles.tsx +2 -2
- package/themes/kiosk/src/components/NavBar/index.tsx +29 -20
- package/themes/kiosk/src/components/OptionCard/index.tsx +1 -1
- package/themes/kiosk/src/components/OrderDetails/index.tsx +32 -27
- package/themes/kiosk/src/components/OrderTypeCardSelector/index.tsx +9 -11
- package/themes/kiosk/src/components/PaymentOptions/index.tsx +56 -54
- package/themes/kiosk/src/components/ProductForm/index.tsx +7 -8
- package/themes/kiosk/src/components/ProductItemAccordion/index.tsx +2 -2
- package/themes/kiosk/src/components/ProductOption/index.tsx +1 -1
- package/themes/kiosk/src/components/ProductOptionSubOption/index.tsx +3 -1
- package/themes/kiosk/src/components/UpsellingProducts/index.tsx +16 -5
- package/themes/kiosk/src/components/shared/OButton.tsx +5 -18
- package/themes/kiosk/src/types/index.d.ts +1 -0
- package/themes/original/index.tsx +30 -8
- package/themes/original/src/components/ActiveOrders/index.tsx +15 -132
- package/themes/original/src/components/ActiveOrders/styles.tsx +0 -54
- package/themes/original/src/components/AddressForm/index.tsx +7 -6
- package/themes/original/src/components/AddressList/index.tsx +30 -18
- package/themes/original/src/components/AppleLogin/index.tsx +7 -12
- package/themes/original/src/components/BusinessBasicInformation/index.tsx +305 -159
- package/themes/original/src/components/BusinessBasicInformation/styles.tsx +6 -2
- package/themes/original/src/components/BusinessController/index.tsx +168 -96
- package/themes/original/src/components/BusinessController/styles.tsx +5 -0
- package/themes/original/src/components/BusinessItemAccordion/index.tsx +8 -5
- package/themes/original/src/components/BusinessItemAccordion/styles.tsx +3 -1
- package/themes/original/src/components/BusinessListingSearch/index.tsx +231 -63
- package/themes/original/src/components/BusinessListingSearch/styles.tsx +22 -2
- package/themes/original/src/components/BusinessPreorder/index.tsx +1 -1
- package/themes/original/src/components/BusinessProductsCategories/index.tsx +2 -2
- package/themes/original/src/components/BusinessProductsList/CategoryDescription/index.tsx +44 -0
- package/themes/original/src/components/BusinessProductsList/index.tsx +51 -52
- package/themes/original/src/components/BusinessProductsList/styles.tsx +0 -3
- package/themes/original/src/components/BusinessProductsListing/index.tsx +317 -155
- package/themes/original/src/components/BusinessProductsListing/styles.tsx +32 -0
- package/themes/original/src/components/BusinessReviews/index.tsx +6 -1
- package/themes/original/src/components/BusinessTypeFilter/index.tsx +106 -39
- package/themes/original/src/components/BusinessTypeFilter/styles.tsx +2 -0
- package/themes/original/src/components/BusinessesListing/Layout/Appointment/index.tsx +560 -0
- package/themes/original/src/components/BusinessesListing/{styles.tsx → Layout/Appointment/styles.tsx} +24 -2
- package/themes/original/src/components/BusinessesListing/Layout/Original/index.tsx +679 -0
- package/themes/original/src/components/BusinessesListing/Layout/Original/styles.tsx +137 -0
- package/themes/original/src/components/BusinessesListing/index.tsx +99 -458
- package/themes/original/src/components/Cart/index.tsx +62 -43
- package/themes/original/src/components/Checkout/index.tsx +90 -39
- package/themes/original/src/components/DriverTips/index.tsx +17 -12
- package/themes/original/src/components/Favorite/index.tsx +92 -0
- package/themes/original/src/components/Favorite/styles.tsx +22 -0
- package/themes/original/src/components/FavoriteList/index.tsx +298 -0
- package/themes/original/src/components/FavoriteList/styles.tsx +5 -0
- package/themes/original/src/components/ForgotPasswordForm/index.tsx +84 -4
- package/themes/original/src/components/GPSButton/index.tsx +15 -8
- package/themes/original/src/components/GoogleMap/index.tsx +11 -11
- package/themes/original/src/components/Help/index.tsx +21 -4
- package/themes/original/src/components/HighestRatedBusinesses/index.tsx +18 -1
- package/themes/original/src/components/LastOrders/index.tsx +12 -1
- package/themes/original/src/components/LoginForm/Otp/index.tsx +91 -0
- package/themes/original/src/components/LoginForm/Otp/styles.tsx +7 -0
- package/themes/original/src/components/LoginForm/index.tsx +332 -164
- package/themes/original/src/components/LoginForm/styles.tsx +1 -3
- package/themes/original/src/components/MessageListing/index.tsx +10 -1
- package/themes/original/src/components/Messages/index.tsx +1 -1
- package/themes/original/src/components/MomentOption/index.tsx +10 -1
- package/themes/original/src/components/MomentOption/styles.tsx +1 -1
- package/themes/original/src/components/MomentSelector/index.tsx +197 -0
- package/themes/original/src/components/MomentSelector/styles.tsx +6 -0
- package/themes/original/src/components/MultiCartsPaymethodsAndWallets/index.tsx +243 -0
- package/themes/original/src/components/MultiCartsPaymethodsAndWallets/styles.tsx +46 -0
- package/themes/original/src/components/MultiCheckout/index.tsx +298 -0
- package/themes/original/src/components/MultiCheckout/styles.tsx +59 -0
- package/themes/original/src/components/MultiOrdersDetails/SingleOrderCard.tsx +372 -0
- package/themes/original/src/components/MultiOrdersDetails/index.tsx +258 -0
- package/themes/original/src/components/MultiOrdersDetails/styles.tsx +50 -0
- package/themes/original/src/components/MyOrders/index.tsx +120 -32
- package/themes/original/src/components/MyOrders/styles.tsx +8 -1
- package/themes/original/src/components/NavBar/index.tsx +4 -4
- package/themes/original/src/components/OrderDetails/OrderHistory.tsx +167 -0
- package/themes/original/src/components/OrderDetails/index.tsx +151 -65
- package/themes/original/src/components/OrderDetails/styles.tsx +1 -2
- package/themes/original/src/components/OrderSummary/index.tsx +6 -6
- package/themes/original/src/components/OrderTypeSelector/index.tsx +79 -35
- package/themes/original/src/components/OrderTypeSelector/styles.tsx +19 -1
- package/themes/original/src/components/OrdersOption/PreviousBusinessOrdered/index.tsx +153 -0
- package/themes/original/src/components/OrdersOption/PreviousBusinessOrdered/styles.tsx +6 -0
- package/themes/original/src/components/OrdersOption/PreviousProductsOrdered/index.tsx +53 -0
- package/themes/original/src/components/OrdersOption/PreviousProductsOrdered/styles.tsx +6 -0
- package/themes/original/src/components/OrdersOption/index.tsx +137 -38
- package/themes/original/src/components/OrdersOption/styles.tsx +4 -1
- package/themes/original/src/components/PaymentOptionCash/index.tsx +2 -2
- package/themes/original/src/components/PaymentOptionWallet/index.tsx +17 -23
- package/themes/original/src/components/PaymentOptionWallet/styles.tsx +1 -1
- package/themes/original/src/components/PaymentOptions/index.tsx +58 -37
- package/themes/original/src/components/PhoneInputNumber/index.tsx +5 -11
- package/themes/original/src/components/PreviousOrders/index.tsx +18 -147
- package/themes/original/src/components/ProductForm/index.tsx +718 -679
- package/themes/original/src/components/ProductForm/styles.tsx +6 -2
- package/themes/original/src/components/ProductItemAccordion/index.tsx +2 -2
- package/themes/original/src/components/ProductOption/index.tsx +1 -1
- package/themes/original/src/components/ProductOptionSubOption/index.tsx +18 -12
- package/themes/original/src/components/ProfessionalFilter/index.tsx +128 -0
- package/themes/original/src/components/ProfessionalFilter/styles.tsx +0 -0
- package/themes/original/src/components/ProfessionalProfile/index.tsx +298 -0
- package/themes/original/src/components/ProfessionalProfile/styles.tsx +46 -0
- package/themes/original/src/components/Promotions/index.tsx +151 -133
- package/themes/original/src/components/Promotions/styles.tsx +3 -23
- package/themes/original/src/components/ReviewDriver/index.tsx +6 -6
- package/themes/original/src/components/ReviewOrder/index.tsx +1 -1
- package/themes/original/src/components/ReviewTrigger/index.tsx +118 -0
- package/themes/original/src/components/ReviewTrigger/styles.tsx +34 -0
- package/themes/original/src/components/SearchBar/index.tsx +13 -5
- package/themes/original/src/components/ServiceForm/index.tsx +579 -0
- package/themes/original/src/components/ServiceForm/styles.tsx +50 -0
- package/themes/original/src/components/Sessions/index.tsx +160 -0
- package/themes/original/src/components/Sessions/styles.tsx +15 -0
- package/themes/original/src/components/SignupForm/index.tsx +237 -126
- package/themes/original/src/components/SingleOrderCard/index.tsx +275 -0
- package/themes/original/src/components/SingleOrderCard/styles.tsx +54 -0
- package/themes/original/src/components/SingleProductCard/index.tsx +161 -88
- package/themes/original/src/components/SingleProductCard/styles.tsx +2 -2
- package/themes/original/src/components/StripeElementsForm/index.tsx +16 -8
- package/themes/original/src/components/StripeElementsForm/naked.tsx +2 -2
- package/themes/original/src/components/UpsellingProducts/index.tsx +86 -74
- package/themes/original/src/components/UserDetails/index.tsx +15 -81
- package/themes/original/src/components/UserFormDetails/index.tsx +98 -66
- package/themes/original/src/components/UserProfile/index.tsx +11 -2
- package/themes/original/src/components/UserProfileForm/index.tsx +33 -22
- package/themes/original/src/components/UserVerification/index.tsx +178 -192
- package/themes/original/src/components/VerifyPhone/index.tsx +10 -7
- package/themes/original/src/components/VerifyPhone/styles.tsx +2 -1
- package/themes/original/src/components/Wallets/index.tsx +76 -9
- package/themes/original/src/components/Wallets/styles.tsx +21 -0
- package/themes/original/src/components/shared/OBottomPopup.tsx +44 -13
- package/themes/original/src/components/shared/OButton.tsx +2 -0
- package/themes/original/src/components/shared/OInput.tsx +3 -2
- package/themes/original/src/components/shared/OModal.tsx +4 -2
- package/themes/original/src/layouts/FloatingBottomContainer.tsx +5 -1
- package/themes/original/src/types/index.tsx +187 -35
- package/themes/original/src/utils/index.tsx +96 -2
- package/themes/single-business/src/components/OrderTypeSelector/index.tsx +1 -1
- package/themes/uber-eats/src/components/BusinessesListing/index.tsx +1 -1
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React, { useState, useEffect } from 'react'
|
|
2
|
-
import { Pressable, View } from 'react-native';
|
|
2
|
+
import { Pressable, StyleSheet, View } from 'react-native';
|
|
3
3
|
import { useTheme } from 'styled-components/native'
|
|
4
4
|
import { Fade, Placeholder, PlaceholderLine } from 'rn-placeholder';
|
|
5
|
+
import FastImage from 'react-native-fast-image'
|
|
5
6
|
import {
|
|
6
7
|
WalletList,
|
|
7
8
|
useLanguage,
|
|
@@ -15,7 +16,10 @@ import {
|
|
|
15
16
|
TransactionsWrapper,
|
|
16
17
|
OTabs,
|
|
17
18
|
OTab,
|
|
18
|
-
SectionContent
|
|
19
|
+
SectionContent,
|
|
20
|
+
LoyaltyContent,
|
|
21
|
+
LoyaltyWrapp,
|
|
22
|
+
LoyaltyImg
|
|
19
23
|
} from './styles'
|
|
20
24
|
|
|
21
25
|
import NavBar from '../NavBar'
|
|
@@ -27,10 +31,14 @@ const WalletsUI = (props: any) => {
|
|
|
27
31
|
const {
|
|
28
32
|
navigation,
|
|
29
33
|
walletList,
|
|
34
|
+
userLoyaltyLevel,
|
|
30
35
|
transactionsList,
|
|
31
36
|
setWalletSelected,
|
|
32
37
|
isWalletCashEnabled,
|
|
33
|
-
isWalletPointsEnabled
|
|
38
|
+
isWalletPointsEnabled,
|
|
39
|
+
getWallets,
|
|
40
|
+
refreshWallets,
|
|
41
|
+
setRefreshWallets
|
|
34
42
|
} = props
|
|
35
43
|
|
|
36
44
|
const [, t] = useLanguage()
|
|
@@ -38,12 +46,27 @@ const WalletsUI = (props: any) => {
|
|
|
38
46
|
const [{ parsePrice }] = useUtils()
|
|
39
47
|
const [{ configs }] = useConfig()
|
|
40
48
|
|
|
49
|
+
const styles = StyleSheet.create({
|
|
50
|
+
logoStyle: {
|
|
51
|
+
width: 120,
|
|
52
|
+
height: 120,
|
|
53
|
+
borderRadius: 8,
|
|
54
|
+
borderWidth: 1,
|
|
55
|
+
borderColor: theme.colors.border,
|
|
56
|
+
flexDirection: 'column',
|
|
57
|
+
justifyContent: 'center',
|
|
58
|
+
alignItems: 'center',
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
|
|
41
62
|
const [tabSelected, setTabSelected] = useState(isWalletCashEnabled ? 'cash' : 'credit_point')
|
|
42
63
|
|
|
43
|
-
const isWalletEnabled = configs?.wallet_enabled?.value === '1' && (isWalletCashEnabled || isWalletPointsEnabled)
|
|
64
|
+
const isWalletEnabled = configs?.cash_wallet?.value && configs?.wallet_enabled?.value === '1' && (isWalletCashEnabled || isWalletPointsEnabled)
|
|
44
65
|
|
|
45
66
|
const currentWalletSelected = (walletList.wallets?.length > 0 && walletList.wallets?.find((w: any) => w.type === tabSelected)) ?? null
|
|
46
67
|
|
|
68
|
+
const loyaltyLevel = Object.keys(userLoyaltyLevel.loyaltyLevel ?? {}).length > 0 && userLoyaltyLevel.loyaltyLevel
|
|
69
|
+
|
|
47
70
|
const walletName: any = {
|
|
48
71
|
cash: {
|
|
49
72
|
name: t('CASH_WALLET', 'Cash Wallet'),
|
|
@@ -74,6 +97,13 @@ const WalletsUI = (props: any) => {
|
|
|
74
97
|
}
|
|
75
98
|
}, [configs])
|
|
76
99
|
|
|
100
|
+
useEffect(() => {
|
|
101
|
+
if(refreshWallets){
|
|
102
|
+
getWallets()
|
|
103
|
+
setRefreshWallets && setRefreshWallets(false)
|
|
104
|
+
}
|
|
105
|
+
}, [refreshWallets])
|
|
106
|
+
|
|
77
107
|
return (
|
|
78
108
|
<Container>
|
|
79
109
|
<NavBar
|
|
@@ -86,18 +116,22 @@ const WalletsUI = (props: any) => {
|
|
|
86
116
|
/>
|
|
87
117
|
|
|
88
118
|
{!walletList.loading &&
|
|
119
|
+
!userLoyaltyLevel.loading &&
|
|
89
120
|
!walletList.error &&
|
|
90
121
|
walletList.wallets?.length > 0 &&
|
|
91
122
|
(
|
|
92
123
|
<>
|
|
93
|
-
<OTabs
|
|
124
|
+
<OTabs
|
|
125
|
+
horizontal
|
|
126
|
+
showsHorizontalScrollIndicator={false}
|
|
127
|
+
>
|
|
94
128
|
{walletList.wallets?.map((wallet: any) => walletName[wallet.type]?.isActive && (
|
|
95
129
|
<Pressable
|
|
96
130
|
key={wallet.id}
|
|
97
131
|
onPress={() => handleChangeTab(wallet)}
|
|
98
132
|
>
|
|
99
|
-
<OTab>
|
|
100
|
-
<OText size={18}
|
|
133
|
+
<OTab isSelected={tabSelected === wallet.type}>
|
|
134
|
+
<OText size={18}>
|
|
101
135
|
{walletName[wallet.type]?.name}
|
|
102
136
|
</OText>
|
|
103
137
|
</OTab>
|
|
@@ -106,6 +140,39 @@ const WalletsUI = (props: any) => {
|
|
|
106
140
|
</OTabs>
|
|
107
141
|
|
|
108
142
|
<SectionContent>
|
|
143
|
+
{!!loyaltyLevel && tabSelected === 'credit_point' && (
|
|
144
|
+
<LoyaltyContent>
|
|
145
|
+
<LoyaltyWrapp>
|
|
146
|
+
<OText size={20}>
|
|
147
|
+
{`${t('LOYALTY_LEVEL_TITLE', 'Your level is')}:`}
|
|
148
|
+
</OText>
|
|
149
|
+
{loyaltyLevel.image ? (
|
|
150
|
+
<FastImage
|
|
151
|
+
style={styles.logoStyle}
|
|
152
|
+
source={{
|
|
153
|
+
uri: loyaltyLevel.image,
|
|
154
|
+
priority: FastImage.priority.high,
|
|
155
|
+
cache:FastImage.cacheControl.web
|
|
156
|
+
}}
|
|
157
|
+
resizeMode={FastImage.resizeMode.contain}
|
|
158
|
+
/>
|
|
159
|
+
) : (
|
|
160
|
+
<LoyaltyImg
|
|
161
|
+
source={theme.images.dummies.loyaltyLevel}
|
|
162
|
+
resizeMode='contain'
|
|
163
|
+
/>
|
|
164
|
+
)}
|
|
165
|
+
<OText
|
|
166
|
+
size={22}
|
|
167
|
+
weight='bold'
|
|
168
|
+
style={{ textTransform: 'uppercase' }}
|
|
169
|
+
color={theme.colors.primary}
|
|
170
|
+
>
|
|
171
|
+
{loyaltyLevel.name}
|
|
172
|
+
</OText>
|
|
173
|
+
</LoyaltyWrapp>
|
|
174
|
+
</LoyaltyContent>
|
|
175
|
+
)}
|
|
109
176
|
<BalanceElement>
|
|
110
177
|
<OText size={20} style={{fontWeight: '600'}}>
|
|
111
178
|
{currentWalletSelected?.type === 'cash'
|
|
@@ -172,7 +239,7 @@ const WalletsUI = (props: any) => {
|
|
|
172
239
|
</>
|
|
173
240
|
)}
|
|
174
241
|
|
|
175
|
-
{walletList?.loading && (
|
|
242
|
+
{(walletList?.loading || userLoyaltyLevel.loading) && (
|
|
176
243
|
<>
|
|
177
244
|
<View>
|
|
178
245
|
<Placeholder Animation={Fade}>
|
|
@@ -196,7 +263,7 @@ const WalletsUI = (props: any) => {
|
|
|
196
263
|
</>
|
|
197
264
|
)}
|
|
198
265
|
|
|
199
|
-
{!walletList?.loading && (walletList?.error || !walletList?.wallets?.length) && (
|
|
266
|
+
{!walletList?.loading && !userLoyaltyLevel.loading && (walletList?.error || !walletList?.wallets?.length) && (
|
|
200
267
|
<NotFoundSource
|
|
201
268
|
content={walletList?.error
|
|
202
269
|
? t('ERROR_NOT_FOUND_WALLETS', 'Sorry, an error has occurred')
|
|
@@ -41,3 +41,24 @@ export const OTabs = styled.View`
|
|
|
41
41
|
export const OTab = styled.View`
|
|
42
42
|
padding-horizontal: 10px;
|
|
43
43
|
`;
|
|
44
|
+
|
|
45
|
+
export const LoyaltyContent = styled.View`
|
|
46
|
+
width: 100%;
|
|
47
|
+
margin-bottom: 20px;
|
|
48
|
+
`
|
|
49
|
+
|
|
50
|
+
export const LoyaltyWrapp = styled.View`
|
|
51
|
+
flex-direction: column;
|
|
52
|
+
justify-content: center;
|
|
53
|
+
align-items: center;
|
|
54
|
+
`
|
|
55
|
+
|
|
56
|
+
export const LoyaltyImg = styled.ImageBackground`
|
|
57
|
+
position: relative;
|
|
58
|
+
height: 150px;
|
|
59
|
+
width: 100%;
|
|
60
|
+
display: flex;
|
|
61
|
+
flex-direction: column;
|
|
62
|
+
justify-content: center;
|
|
63
|
+
align-items: center;
|
|
64
|
+
`
|
|
@@ -1,33 +1,43 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
-
import { Modal, TouchableWithoutFeedback, Dimensions, StyleSheet, View, Text, Platform, StatusBar } from 'react-native'
|
|
2
|
+
import { Modal, TouchableWithoutFeedback, TouchableOpacity, Dimensions, StyleSheet, View, Text, Platform, StatusBar } from 'react-native'
|
|
3
3
|
import { useSafeAreaInsets } from 'react-native-safe-area-context'
|
|
4
|
+
import { OIcon } from '.';
|
|
4
5
|
const deviceHeight = Dimensions.get('window').height
|
|
5
6
|
|
|
6
7
|
interface Props {
|
|
7
8
|
open: boolean;
|
|
9
|
+
transparent?: boolean;
|
|
8
10
|
title?: string;
|
|
9
11
|
children?: any;
|
|
10
12
|
onClose?: any;
|
|
11
13
|
isStatusBar?: boolean;
|
|
14
|
+
bottomContainerStyle?: any;
|
|
15
|
+
titleStyle?: any;
|
|
16
|
+
closeIcon?: any;
|
|
12
17
|
}
|
|
13
18
|
const OBottomPopup = (props: Props) => {
|
|
14
19
|
const {
|
|
15
20
|
open,
|
|
21
|
+
transparent,
|
|
16
22
|
title,
|
|
17
23
|
onClose,
|
|
18
24
|
children,
|
|
19
|
-
isStatusBar
|
|
25
|
+
isStatusBar,
|
|
26
|
+
titleStyle,
|
|
27
|
+
bottomContainerStyle,
|
|
28
|
+
closeIcon
|
|
20
29
|
} = props
|
|
21
30
|
const { top, bottom } = useSafeAreaInsets();
|
|
31
|
+
|
|
22
32
|
return (
|
|
23
33
|
<Modal
|
|
24
34
|
animationType='slide'
|
|
25
|
-
transparent={
|
|
35
|
+
transparent={transparent}
|
|
26
36
|
visible={open}
|
|
27
37
|
onRequestClose={() => onClose()}
|
|
28
38
|
presentationStyle={'fullScreen'}
|
|
29
39
|
>
|
|
30
|
-
|
|
40
|
+
{isStatusBar && <StatusBar translucent={false} />}
|
|
31
41
|
<View style={styles.container}>
|
|
32
42
|
<TouchableWithoutFeedback
|
|
33
43
|
style={styles.touchableOutsideStyle}
|
|
@@ -35,13 +45,24 @@ const OBottomPopup = (props: Props) => {
|
|
|
35
45
|
>
|
|
36
46
|
<View style={styles.touchableOutsideStyle} />
|
|
37
47
|
</TouchableWithoutFeedback>
|
|
38
|
-
<View style={styles.bottomContainer}>
|
|
48
|
+
<View style={{ ...styles.bottomContainer, ...bottomContainerStyle }}>
|
|
39
49
|
<View style={{ paddingTop: top, paddingBottom: bottom }}>
|
|
40
|
-
{
|
|
41
|
-
|
|
42
|
-
{
|
|
43
|
-
|
|
44
|
-
|
|
50
|
+
<View style={styles.modalTitleStyle}>
|
|
51
|
+
{closeIcon && (
|
|
52
|
+
<TouchableOpacity onPress={() => onClose()} style={styles.closeIconStyle}>
|
|
53
|
+
<OIcon
|
|
54
|
+
src={closeIcon}
|
|
55
|
+
width={20}
|
|
56
|
+
height={20}
|
|
57
|
+
/>
|
|
58
|
+
</TouchableOpacity>
|
|
59
|
+
)}
|
|
60
|
+
{!!title && (
|
|
61
|
+
<Text style={{ ...styles.titleStyle, ...titleStyle }}>
|
|
62
|
+
{title}
|
|
63
|
+
</Text>
|
|
64
|
+
)}
|
|
65
|
+
</View>
|
|
45
66
|
{children}
|
|
46
67
|
</View>
|
|
47
68
|
</View>
|
|
@@ -54,7 +75,7 @@ const styles = StyleSheet.create({
|
|
|
54
75
|
container: {
|
|
55
76
|
flex: 1,
|
|
56
77
|
backgroundColor: '#000000AA',
|
|
57
|
-
justifyContent: 'flex-end'
|
|
78
|
+
justifyContent: 'flex-end'
|
|
58
79
|
},
|
|
59
80
|
touchableOutsideStyle: {
|
|
60
81
|
flex: 1,
|
|
@@ -68,8 +89,18 @@ const styles = StyleSheet.create({
|
|
|
68
89
|
},
|
|
69
90
|
titleStyle: {
|
|
70
91
|
fontSize: 20,
|
|
71
|
-
fontWeight: 'bold'
|
|
72
|
-
|
|
92
|
+
fontWeight: 'bold'
|
|
93
|
+
},
|
|
94
|
+
closeIconStyle: {
|
|
95
|
+
position: 'absolute',
|
|
96
|
+
left: 25,
|
|
97
|
+
top: 25,
|
|
98
|
+
zIndex: 100
|
|
99
|
+
},
|
|
100
|
+
modalTitleStyle: {
|
|
101
|
+
position: 'relative',
|
|
102
|
+
paddingHorizontal: 10,
|
|
103
|
+
paddingVertical: 20
|
|
73
104
|
}
|
|
74
105
|
})
|
|
75
106
|
|
|
@@ -78,6 +78,7 @@ interface Props {
|
|
|
78
78
|
borderColor?: string;
|
|
79
79
|
loadingStyle?: ViewStyle;
|
|
80
80
|
showNextIcon?: boolean;
|
|
81
|
+
isDisabledWithSameStyles?: boolean;
|
|
81
82
|
}
|
|
82
83
|
|
|
83
84
|
const OButton = (props: Props): React.ReactElement => {
|
|
@@ -110,6 +111,7 @@ const OButton = (props: Props): React.ReactElement => {
|
|
|
110
111
|
activeOpacity={props.activeOpacity}
|
|
111
112
|
onPress={props.onClick}
|
|
112
113
|
style={{ width: props.isCircle ? 52 : props.style?.width, ...props.parentStyle }}
|
|
114
|
+
disabled={props.isDisabledWithSameStyles}
|
|
113
115
|
>
|
|
114
116
|
<StyledButton style={props.bgColor ? { ...props.style, backgroundColor: props.bgColor, borderColor: props.borderColor } : props.style}>
|
|
115
117
|
{props.imgLeftSrc ? (
|
|
@@ -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}
|
|
@@ -21,6 +21,7 @@ interface Props {
|
|
|
21
21
|
isNotDecoration?: boolean;
|
|
22
22
|
styleCloseButton?: any,
|
|
23
23
|
isAvoidKeyBoardView?: boolean;
|
|
24
|
+
styleContainerCloseButton?: any;
|
|
24
25
|
}
|
|
25
26
|
const KeyboardView = styled.KeyboardAvoidingView`
|
|
26
27
|
flex-grow: 1;
|
|
@@ -45,6 +46,7 @@ const OModal = (props: Props): React.ReactElement => {
|
|
|
45
46
|
isNotDecoration,
|
|
46
47
|
style,
|
|
47
48
|
styleCloseButton,
|
|
49
|
+
styleContainerCloseButton,
|
|
48
50
|
isAvoidKeyBoardView
|
|
49
51
|
} = props
|
|
50
52
|
|
|
@@ -55,7 +57,7 @@ const OModal = (props: Props): React.ReactElement => {
|
|
|
55
57
|
{!entireModal ? (
|
|
56
58
|
<View style={styles.centeredView}>
|
|
57
59
|
<View style={titleSectionStyle ? titleSectionStyle : styles.titleSection}>
|
|
58
|
-
<TouchableOpacity style={styles.wrapperIcon} onPress={onClose}>
|
|
60
|
+
<TouchableOpacity style={{...styles.wrapperIcon, ...styleContainerCloseButton}} onPress={onClose}>
|
|
59
61
|
<OIcon
|
|
60
62
|
src={theme.images.general.close}
|
|
61
63
|
width={16}
|
|
@@ -91,7 +93,7 @@ const OModal = (props: Props): React.ReactElement => {
|
|
|
91
93
|
animationType="slide"
|
|
92
94
|
transparent={isTransparent}
|
|
93
95
|
visible={open}
|
|
94
|
-
onRequestClose={() => onClose()}
|
|
96
|
+
onRequestClose={() => onClose && onClose()}
|
|
95
97
|
style={{ height: '100%', flex: 1, position: 'absolute', ...style, zIndex: 9999 }}
|
|
96
98
|
>
|
|
97
99
|
{isAvoidKeyBoardView ? (
|
|
@@ -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
|
)
|