ordering-ui-react-native 0.17.70 → 0.17.71
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 +1 -1
- package/themes/original/src/components/AddressList/index.tsx +7 -3
- package/themes/original/src/components/BusinessProductsListing/index.tsx +2 -3
- package/themes/original/src/components/BusinessesListing/Layout/Appointment/index.tsx +1 -1
- package/themes/original/src/components/BusinessesListing/Layout/Original/index.tsx +2 -2
- 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/FloatingButton/index.tsx +1 -1
- package/themes/original/src/components/FloatingButton/styles.tsx +1 -1
- package/themes/original/src/components/Help/index.tsx +7 -7
- package/themes/original/src/components/LottieAnimation/index.tsx +16 -7
- package/themes/original/src/components/MomentOption/index.tsx +6 -4
- package/themes/original/src/components/Notifications/index.tsx +8 -2
- package/themes/original/src/components/ProductForm/index.tsx +2 -2
- package/themes/original/src/components/ProductOptionSubOption/index.tsx +1 -1
- package/themes/original/src/components/Promotions/index.tsx +3 -2
- package/themes/original/src/components/UserProfileForm/index.tsx +14 -12
- package/themes/original/src/types/index.tsx +1 -0
package/package.json
CHANGED
|
@@ -138,7 +138,8 @@ const AddressListUI = (props: AddressListParams) => {
|
|
|
138
138
|
}, [])
|
|
139
139
|
|
|
140
140
|
return (
|
|
141
|
-
<Container
|
|
141
|
+
<Container
|
|
142
|
+
pt={20}
|
|
142
143
|
noPadding
|
|
143
144
|
refreshControl={
|
|
144
145
|
<RefreshControl
|
|
@@ -153,7 +154,10 @@ const AddressListUI = (props: AddressListParams) => {
|
|
|
153
154
|
titleAlign={'center'}
|
|
154
155
|
onActionLeft={goToBack}
|
|
155
156
|
showCall={false}
|
|
156
|
-
style={{
|
|
157
|
+
style={{
|
|
158
|
+
paddingHorizontal: 40,
|
|
159
|
+
marginTop: Platform.OS === 'ios' ? 0 : 10
|
|
160
|
+
}}
|
|
157
161
|
/>
|
|
158
162
|
)}
|
|
159
163
|
{(!addressList.loading || (isFromProductsList || isFromBusinesses || isFromProfile || isProfile)) && (
|
|
@@ -174,7 +178,7 @@ const AddressListUI = (props: AddressListParams) => {
|
|
|
174
178
|
showCall={false}
|
|
175
179
|
btnStyle={{ paddingLeft: 0 }}
|
|
176
180
|
paddingTop={0}
|
|
177
|
-
style={{ marginTop:
|
|
181
|
+
style={{ marginTop: 0 }}
|
|
178
182
|
titleWrapStyle={{ paddingHorizontal: 0 }}
|
|
179
183
|
titleStyle={{ marginLeft: 0, marginRight: 0 }}
|
|
180
184
|
/>
|
|
@@ -30,7 +30,6 @@ import {
|
|
|
30
30
|
WrapSearchBar,
|
|
31
31
|
WrapContent,
|
|
32
32
|
FiltProductsContainer,
|
|
33
|
-
ContainerSafeAreaView,
|
|
34
33
|
BackgroundGray,
|
|
35
34
|
ProfessionalFilterWrapper,
|
|
36
35
|
NearBusiness,
|
|
@@ -353,7 +352,7 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
|
|
|
353
352
|
<FiltProductsContainer
|
|
354
353
|
style={{
|
|
355
354
|
height: Dimensions.get('window').height - filtProductsHeight,
|
|
356
|
-
top: Platform.OS === 'ios' ? searchBarHeight + insets.top : searchBarHeight
|
|
355
|
+
top: Platform.OS === 'ios' ? (searchBarHeight - 10) + insets.top : searchBarHeight
|
|
357
356
|
}}
|
|
358
357
|
contentContainerStyle={{ flexGrow: 1 }}
|
|
359
358
|
>
|
|
@@ -515,7 +514,7 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
|
|
|
515
514
|
)}
|
|
516
515
|
</IOScrollView>
|
|
517
516
|
{!loading && auth && currentCart?.products?.length > 0 && categoryState.products.length !== 0 && (
|
|
518
|
-
<View style={{ marginBottom:
|
|
517
|
+
<View style={{ marginBottom: 0, zIndex: 20000 }}>
|
|
519
518
|
<FloatingButton
|
|
520
519
|
btnText={
|
|
521
520
|
openUpselling
|
|
@@ -284,7 +284,7 @@ const BusinessesListingUI = (props: BusinessesListingParams) => {
|
|
|
284
284
|
style={{ paddingTop: top + 20 }}>
|
|
285
285
|
{!auth && (
|
|
286
286
|
<TouchableOpacity onPress={() => navigation?.canGoBack() && navigation.goBack()} style={{ position: 'absolute', marginStart: 40, paddingVertical: 20 }}>
|
|
287
|
-
<
|
|
287
|
+
<OIcon src={theme.images.general.arrow_left} color={theme.colors.textNormal} />
|
|
288
288
|
</TouchableOpacity>
|
|
289
289
|
)}
|
|
290
290
|
<Search>
|
|
@@ -80,7 +80,7 @@ const BusinessesListingUI = (props: BusinessesListingParams) => {
|
|
|
80
80
|
const isChewLayout = theme?.header?.components?.layout?.type === 'chew'
|
|
81
81
|
const hideCities = theme?.business_listing_view?.components?.cities?.hidden ?? true
|
|
82
82
|
const [refreshing] = useState(false);
|
|
83
|
-
const bgHeader =
|
|
83
|
+
const bgHeader = orderingTheme?.theme?.business_listing_view?.components?.business_hero?.components?.image
|
|
84
84
|
const styles = StyleSheet.create({
|
|
85
85
|
container: {
|
|
86
86
|
marginBottom: 0,
|
|
@@ -474,7 +474,7 @@ const BusinessesListingUI = (props: BusinessesListingParams) => {
|
|
|
474
474
|
{!auth && (
|
|
475
475
|
|
|
476
476
|
<TouchableOpacity onPress={() => navigation?.canGoBack() && navigation.goBack()} style={{ position: 'absolute', marginStart: 40, paddingVertical: 20 }}>
|
|
477
|
-
<
|
|
477
|
+
<OIcon src={theme.images.general.arrow_left} color={theme.colors.textNormal} />
|
|
478
478
|
</TouchableOpacity>
|
|
479
479
|
)}
|
|
480
480
|
</HeaderWrapper>
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React, { useState } from 'react'
|
|
2
2
|
import { useLanguage, useOrder } from 'ordering-components/native'
|
|
3
3
|
import { useTheme } from 'styled-components/native'
|
|
4
|
+
import { Platform } from 'react-native'
|
|
4
5
|
import { FavoriteList } from '../FavoriteList'
|
|
5
6
|
import NavBar from '../NavBar'
|
|
6
7
|
import { OText } from '../shared'
|
|
@@ -34,7 +35,9 @@ export const Favorite = (props: any) => {
|
|
|
34
35
|
}
|
|
35
36
|
|
|
36
37
|
return (
|
|
37
|
-
<Container
|
|
38
|
+
<Container
|
|
39
|
+
pdng={Platform.OS === 'ios' ? '20px' : '30px'}
|
|
40
|
+
>
|
|
38
41
|
<NavBar
|
|
39
42
|
title={t('FAVORITE', 'Favorite')}
|
|
40
43
|
titleAlign={'center'}
|
|
@@ -52,9 +55,9 @@ export const Favorite = (props: any) => {
|
|
|
52
55
|
>
|
|
53
56
|
<OText
|
|
54
57
|
color={menu.key === tabSelected ? theme.colors.textNormal : theme.colors.disabled}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
+
size={14}
|
|
59
|
+
weight={menu.key === tabSelected ? '500' : '400'}
|
|
60
|
+
style={{ marginBottom: 12 }}
|
|
58
61
|
>
|
|
59
62
|
{menu.name}
|
|
60
63
|
</OText>
|
|
@@ -63,7 +63,7 @@ const FloatingButtonUI = (props: FloatingButtonParams) => {
|
|
|
63
63
|
return (
|
|
64
64
|
<Container
|
|
65
65
|
style={{
|
|
66
|
-
paddingBottom: Platform.OS === 'ios' ?
|
|
66
|
+
paddingBottom: Platform.OS === 'ios' ? 20 : bottom + 16
|
|
67
67
|
}}>
|
|
68
68
|
|
|
69
69
|
<View style={styles.infoCont}>
|
|
@@ -31,20 +31,20 @@ export const Help = (props: HelpParams) => {
|
|
|
31
31
|
|
|
32
32
|
return (
|
|
33
33
|
<Container
|
|
34
|
+
pt={10}
|
|
34
35
|
noPadding
|
|
35
36
|
refreshControl={
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
37
|
+
<RefreshControl
|
|
38
|
+
refreshing={refreshing}
|
|
39
|
+
onRefresh={() => handleOnRefresh()}
|
|
40
|
+
/>
|
|
41
|
+
}
|
|
41
42
|
>
|
|
42
43
|
<NavBar
|
|
43
44
|
title={t('HELP', 'Help')}
|
|
44
45
|
titleAlign={'center'}
|
|
45
46
|
onActionLeft={goToBack}
|
|
46
47
|
showCall={false}
|
|
47
|
-
paddingTop={10}
|
|
48
48
|
btnStyle={{ paddingLeft: 0 }}
|
|
49
49
|
/>
|
|
50
50
|
<HelpSubItem
|
|
@@ -53,7 +53,7 @@ export const Help = (props: HelpParams) => {
|
|
|
53
53
|
<OText size={14}>{t('HELP_WITH_ORDER', 'Help with an order')}</OText>
|
|
54
54
|
</HelpSubItem>
|
|
55
55
|
<HelpSubItem
|
|
56
|
-
onPress={() => onRedirect('HelpAccountAndPayment')}
|
|
56
|
+
onPress={() => onRedirect('HelpAccountAndPayment')}
|
|
57
57
|
>
|
|
58
58
|
<OText size={14}>{t('ACCOUNT_PAYMENT_OPTIONS', 'Account and Payment Options')}</OText>
|
|
59
59
|
</HelpSubItem>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useRef } from 'react'
|
|
1
|
+
import React, { useRef, useState } from 'react'
|
|
2
2
|
import Lottie from 'lottie-react-native';
|
|
3
3
|
import { TouchableOpacity, Easing, ViewStyle, Animated } from 'react-native';
|
|
4
4
|
import IconAntDesign from 'react-native-vector-icons/AntDesign'
|
|
@@ -13,9 +13,9 @@ interface Props {
|
|
|
13
13
|
duration?: number,
|
|
14
14
|
type: 'favorite', // animation types
|
|
15
15
|
isActive: boolean,
|
|
16
|
-
animationType?: ((value
|
|
16
|
+
animationType?: ((value: number) => number);
|
|
17
17
|
useNativeDriver?: boolean,
|
|
18
|
-
iconProps?: {color?: string, size?: number, style?: ViewStyle}
|
|
18
|
+
iconProps?: { color?: string, size?: number, style?: ViewStyle }
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
export const LottieAnimation = (props: Props) => {
|
|
@@ -34,30 +34,39 @@ export const LottieAnimation = (props: Props) => {
|
|
|
34
34
|
} = props
|
|
35
35
|
const theme = useTheme()
|
|
36
36
|
const animationProgress = useRef(new Animated.Value(initialValue))
|
|
37
|
+
const [isHide, setIsHide] = useState(true)
|
|
37
38
|
const favoriteArray = ['heart', 'hearto']
|
|
38
39
|
const icon = type === 'favorite' ? favoriteArray : []
|
|
39
40
|
const animationGif = type === 'favorite' ? theme.images?.general?.heart : ''
|
|
40
41
|
const onPressLottie = () => {
|
|
41
42
|
if (!disableAnimation) {
|
|
43
|
+
setIsHide(false)
|
|
42
44
|
Animated.timing(animationProgress.current, {
|
|
43
45
|
toValue,
|
|
44
46
|
duration: duration || 5000,
|
|
45
47
|
easing: animationType || Easing.linear,
|
|
46
48
|
useNativeDriver: useNativeDriver ?? true
|
|
47
49
|
}).start();
|
|
50
|
+
hideLottie()
|
|
48
51
|
}
|
|
49
52
|
onClick()
|
|
50
53
|
}
|
|
51
54
|
|
|
55
|
+
const hideLottie = () => {
|
|
56
|
+
setTimeout(() => setIsHide(true), 4500)
|
|
57
|
+
}
|
|
58
|
+
|
|
52
59
|
return (
|
|
53
60
|
<TouchableOpacity
|
|
54
61
|
onPress={onPressLottie}
|
|
55
62
|
style={style}
|
|
56
63
|
>
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
64
|
+
{!isHide &&
|
|
65
|
+
<Lottie
|
|
66
|
+
progress={animationProgress.current}
|
|
67
|
+
source={animationGif}
|
|
68
|
+
/>
|
|
69
|
+
}
|
|
61
70
|
<IconAntDesign
|
|
62
71
|
name={isActive ? icon[0] : icon[1]}
|
|
63
72
|
color={iconProps?.color || theme.colors.danger5}
|
|
@@ -253,19 +253,21 @@ const MomentOptionUI = (props: MomentOptionParams) => {
|
|
|
253
253
|
|
|
254
254
|
return (
|
|
255
255
|
<>
|
|
256
|
-
<Container
|
|
257
|
-
|
|
256
|
+
<Container
|
|
257
|
+
style={{
|
|
258
|
+
paddingLeft: 40,
|
|
259
|
+
paddingRight: 40
|
|
260
|
+
}}>
|
|
261
|
+
<View style={{ paddingBottom: 90, paddingRight: 20 }}>
|
|
258
262
|
<NavBar
|
|
259
263
|
onActionLeft={() => goToBack()}
|
|
260
264
|
btnStyle={{ paddingLeft: 0 }}
|
|
261
|
-
paddingTop={0}
|
|
262
265
|
style={{ paddingBottom: 0 }}
|
|
263
266
|
title={t('QUESTION_WHEN_ORDER', 'When do you want your order?')}
|
|
264
267
|
titleAlign={'center'}
|
|
265
268
|
titleStyle={{ fontSize: 20, marginRight: 0, marginLeft: 0 }}
|
|
266
269
|
titleWrapStyle={{ paddingHorizontal: 0 }}
|
|
267
270
|
/>
|
|
268
|
-
|
|
269
271
|
<WrapSelectOption
|
|
270
272
|
onPress={() => _handleAsap()}
|
|
271
273
|
disabled={orderState.loading} style={{ alignItems: 'flex-start' }}>
|
|
@@ -70,13 +70,19 @@ const NotificationsUI = (props: any) => {
|
|
|
70
70
|
}, [notificationsList])
|
|
71
71
|
|
|
72
72
|
return (
|
|
73
|
-
<Container
|
|
73
|
+
<Container
|
|
74
|
+
noPadding
|
|
75
|
+
pt={10}
|
|
76
|
+
>
|
|
74
77
|
<NavBar
|
|
75
78
|
title={t('NOTIFICATIONS', 'Notifications')}
|
|
76
79
|
titleAlign={'center'}
|
|
77
80
|
onActionLeft={goToBack}
|
|
78
81
|
showCall={false}
|
|
79
|
-
style={{
|
|
82
|
+
style={{
|
|
83
|
+
paddingHorizontal: 40,
|
|
84
|
+
paddingVertical: 0,
|
|
85
|
+
}}
|
|
80
86
|
/>
|
|
81
87
|
{showCustomerPromotions && showNotifications && (
|
|
82
88
|
<>
|
|
@@ -297,7 +297,7 @@ export const ProductOptionsUI = (props: any) => {
|
|
|
297
297
|
maxProductQuantity === 0 ||
|
|
298
298
|
Object.keys(errors).length > 0;
|
|
299
299
|
|
|
300
|
-
|
|
300
|
+
|
|
301
301
|
const ExtraOptions = ({ eID, options }: any) => (
|
|
302
302
|
<>
|
|
303
303
|
{options.map(({ id, name, respect_to, suboptions }: any) => (
|
|
@@ -484,7 +484,7 @@ export const ProductOptionsUI = (props: any) => {
|
|
|
484
484
|
<SafeAreaView style={{ flex: 1 }}>
|
|
485
485
|
<TopHeader>
|
|
486
486
|
<TopActions onPress={() => handleGoBack()}>
|
|
487
|
-
<
|
|
487
|
+
<OIcon src={theme.images.general.arrow_left} color={theme.colors.textNormal} />
|
|
488
488
|
</TopActions>
|
|
489
489
|
</TopHeader>
|
|
490
490
|
{!error && (
|
|
@@ -68,7 +68,7 @@ export const ProductOptionSubOptionUI = (props: any) => {
|
|
|
68
68
|
|
|
69
69
|
return (
|
|
70
70
|
<View>
|
|
71
|
-
<Container
|
|
71
|
+
<Container>
|
|
72
72
|
<IconControl disabled={disabled} onPress={() => handleSuboptionClick()}>
|
|
73
73
|
{((option?.min === 0 && option?.max === 1) || option?.max > 1) ? (
|
|
74
74
|
state?.selected ? (
|
|
@@ -19,7 +19,7 @@ import { useTheme } from 'styled-components/native';
|
|
|
19
19
|
import { OButton, OIcon, OModal, OText } from '../shared'
|
|
20
20
|
import { Placeholder, PlaceholderLine } from 'rn-placeholder'
|
|
21
21
|
import { NotFoundSource } from '../NotFoundSource'
|
|
22
|
-
import { View, StyleSheet, ScrollView,
|
|
22
|
+
import { View, StyleSheet, ScrollView, RefreshControl } from 'react-native'
|
|
23
23
|
import { PromotionParams } from '../../types'
|
|
24
24
|
import { Container } from '../../layouts/Container'
|
|
25
25
|
|
|
@@ -99,6 +99,7 @@ const PromotionsUI = (props: PromotionParams) => {
|
|
|
99
99
|
return (
|
|
100
100
|
<Container
|
|
101
101
|
noPadding
|
|
102
|
+
pt={20}
|
|
102
103
|
refreshControl={
|
|
103
104
|
<RefreshControl
|
|
104
105
|
refreshing={refreshing}
|
|
@@ -111,7 +112,7 @@ const PromotionsUI = (props: PromotionParams) => {
|
|
|
111
112
|
titleAlign={'center'}
|
|
112
113
|
onActionLeft={() => navigation.goBack()}
|
|
113
114
|
showCall={false}
|
|
114
|
-
style={{ paddingVertical:
|
|
115
|
+
style={{ paddingVertical: 0, marginLeft: 20 }}
|
|
115
116
|
/>
|
|
116
117
|
<PromotionsContainer>
|
|
117
118
|
<SearchBarContainer>
|
|
@@ -284,16 +284,18 @@ const ProfileUI = (props: ProfileParams) => {
|
|
|
284
284
|
|
|
285
285
|
return (
|
|
286
286
|
<>
|
|
287
|
-
<
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
287
|
+
<Container
|
|
288
|
+
pt={15}
|
|
289
|
+
noPadding
|
|
290
|
+
>
|
|
291
|
+
<NavBar
|
|
292
|
+
title={t('ACCOUNT', 'Account')}
|
|
293
|
+
titleAlign={'center'}
|
|
294
|
+
onActionLeft={() => navigation.goBack()}
|
|
295
|
+
showCall={false}
|
|
296
|
+
style={{ paddingHorizontal: 40 }}
|
|
297
|
+
/>
|
|
298
|
+
<KeyboardAvoidingView behavior={Platform.OS == 'ios' ? 'padding' : 'height'} enabled style={{ flex: 1, flexDirection: 'column', justifyContent: 'center' }}>
|
|
297
299
|
<CenterView style={styles.pagePadding}>
|
|
298
300
|
<View style={styles.photo}>
|
|
299
301
|
{user?.photo ? (
|
|
@@ -326,8 +328,8 @@ const ProfileUI = (props: ProfileParams) => {
|
|
|
326
328
|
setWillVerifyOtpState={setWillVerifyOtpState}
|
|
327
329
|
/>
|
|
328
330
|
</View>
|
|
329
|
-
</
|
|
330
|
-
</
|
|
331
|
+
</KeyboardAvoidingView>
|
|
332
|
+
</Container>
|
|
331
333
|
<OModal
|
|
332
334
|
open={isModalVisible}
|
|
333
335
|
onClose={() => setIsModalVisible(false)}
|
|
@@ -249,6 +249,7 @@ export interface BusinessProductsListingParams {
|
|
|
249
249
|
handleUpdateProducts?: any;
|
|
250
250
|
professionalSelected?: any;
|
|
251
251
|
handleChangeProfessionalSelected?: any;
|
|
252
|
+
onBusinessClick?: any;
|
|
252
253
|
}
|
|
253
254
|
export interface BusinessBasicInformationParams {
|
|
254
255
|
navigation?: any;
|