ordering-ui-react-native 0.15.24 → 0.15.27
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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ordering-ui-react-native",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.27",
|
|
4
4
|
"description": "Reusable components made in react native",
|
|
5
5
|
"main": "src/index.tsx",
|
|
6
6
|
"author": "ordering.inc",
|
|
@@ -71,10 +71,11 @@
|
|
|
71
71
|
"react-native-background-timer": "^2.4.1",
|
|
72
72
|
"react-native-bootsplash": "^3.2.3",
|
|
73
73
|
"react-native-calendar-picker": "^7.1.2",
|
|
74
|
-
|
|
74
|
+
"react-native-calendar-strip": "^2.2.1",
|
|
75
75
|
"react-native-color-matrix-image-filters": "^5.2.10",
|
|
76
76
|
"react-native-country-picker-modal": "^2.0.0",
|
|
77
77
|
"react-native-credit-card-input": "^0.4.1",
|
|
78
|
+
"react-native-device-info": "^8.7.1",
|
|
78
79
|
"react-native-document-picker": "^5.2.0",
|
|
79
80
|
"react-native-elements": "^3.0.0-alpha.1",
|
|
80
81
|
"react-native-fast-image": "^8.3.3",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useState } from 'react'
|
|
2
|
-
import { StyleSheet, View, ScrollView, TouchableOpacity, Dimensions } from 'react-native'
|
|
2
|
+
import { StyleSheet, View, ScrollView, TouchableOpacity, Dimensions, Platform, PlatformIOSStatic } from 'react-native'
|
|
3
3
|
import { Fade, Placeholder, PlaceholderLine } from 'rn-placeholder'
|
|
4
4
|
import { BusinessTypeFilter as BusinessTypeFilterController, useLanguage } from 'ordering-components/native'
|
|
5
5
|
|
|
@@ -8,6 +8,7 @@ import { OIcon, OText, OModal } from '../shared'
|
|
|
8
8
|
import { BusinessTypeFilterParams } from '../../types'
|
|
9
9
|
import { useTheme } from 'styled-components/native'
|
|
10
10
|
import MaterialIcon from 'react-native-vector-icons/MaterialCommunityIcons';
|
|
11
|
+
import DeviceInfo from 'react-native-device-info';
|
|
11
12
|
|
|
12
13
|
const windowWidth = Dimensions.get('window').width;
|
|
13
14
|
|
|
@@ -18,6 +19,10 @@ export const BusinessTypeFilterUI = (props: BusinessTypeFilterParams) => {
|
|
|
18
19
|
handleChangeBusinessType,
|
|
19
20
|
} = props;
|
|
20
21
|
|
|
22
|
+
const platformIOS = Platform as PlatformIOSStatic
|
|
23
|
+
const isIpad = platformIOS.isPad
|
|
24
|
+
const isTablet = DeviceInfo.isTablet();
|
|
25
|
+
|
|
21
26
|
const theme = useTheme();
|
|
22
27
|
const [, t] = useLanguage();
|
|
23
28
|
const [isOpenAllCategories, setIsOpenAllCategories] = useState(false)
|
|
@@ -122,7 +127,9 @@ export const BusinessTypeFilterUI = (props: BusinessTypeFilterParams) => {
|
|
|
122
127
|
{t('BUSINESS_CATEGORIES', 'Business Categories')}
|
|
123
128
|
</OText>
|
|
124
129
|
</BusinessCategoriesTitle>
|
|
125
|
-
<BusinessCategories
|
|
130
|
+
<BusinessCategories
|
|
131
|
+
mt={(isIpad || isTablet) ? 65 : null}
|
|
132
|
+
>
|
|
126
133
|
{typesState?.types.slice(0, 3).map((type: any) => (
|
|
127
134
|
<RenderTypes
|
|
128
135
|
key={type.id}
|
|
@@ -18,7 +18,7 @@ export const BusinessCategories = styled.View`
|
|
|
18
18
|
display: flex;
|
|
19
19
|
flex-direction: row;
|
|
20
20
|
justify-content: space-between;
|
|
21
|
-
margin:
|
|
21
|
+
margin: ${(props: any) => props.mt ?? 10}px 0px 10px;
|
|
22
22
|
width: 100%;
|
|
23
23
|
`
|
|
24
24
|
export const Category = styled.View`
|
|
@@ -86,6 +86,10 @@ export const PreviousOrders = (props: PreviousOrdersParams) => {
|
|
|
86
86
|
id: order?.id,
|
|
87
87
|
business_id: order?.business_id,
|
|
88
88
|
logo: order.business?.logo,
|
|
89
|
+
driver: order?.driver,
|
|
90
|
+
products: order?.products,
|
|
91
|
+
review: order?.review,
|
|
92
|
+
user_review: order?.user_review
|
|
89
93
|
},
|
|
90
94
|
});
|
|
91
95
|
};
|
|
@@ -157,6 +157,12 @@ const UpsellingProductsUI = (props: UpsellingProductsParams) => {
|
|
|
157
157
|
</TopActions>
|
|
158
158
|
</TopBar>
|
|
159
159
|
<ScrollView style={{ marginBottom: props.isPage ? 40 : bottom + (Platform.OS == 'ios' ? 96 : 130) }} showsVerticalScrollIndicator={false}>
|
|
160
|
+
{productsList.length > 0 &&
|
|
161
|
+
<View style={{ paddingHorizontal: 40, overflow: 'visible' }}>
|
|
162
|
+
<OText size={16} lineHeight={24} weight={'500'}>{t('WANT_SOMETHING_ELSE', 'Do you want something else?')}</OText>
|
|
163
|
+
<UpsellingLayout />
|
|
164
|
+
</View>
|
|
165
|
+
}
|
|
160
166
|
<View style={{ paddingHorizontal: 40 }}>
|
|
161
167
|
<OText size={20} lineHeight={30} weight={600} style={{ marginTop: 10, marginBottom: 17 }}>{t('YOUR_CART', 'Your cart')}</OText>
|
|
162
168
|
<OrderSummary
|
|
@@ -165,12 +171,6 @@ const UpsellingProductsUI = (props: UpsellingProductsParams) => {
|
|
|
165
171
|
onNavigationRedirect={onNavigationRedirect}
|
|
166
172
|
/>
|
|
167
173
|
</View>
|
|
168
|
-
{productsList.length > 0 &&
|
|
169
|
-
<View style={{ paddingHorizontal: 40, overflow: 'visible' }}>
|
|
170
|
-
<OText size={16} lineHeight={24} weight={'500'}>{t('WANT_SOMETHING_ELSE', 'Do you want something else?')}</OText>
|
|
171
|
-
<UpsellingLayout />
|
|
172
|
-
</View>
|
|
173
|
-
}
|
|
174
174
|
</ScrollView>
|
|
175
175
|
<View
|
|
176
176
|
style={{
|