ordering-ui-react-native 0.16.49-release → 0.16.50-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 +1 -1
- package/themes/original/src/components/BusinessBasicInformation/index.tsx +1 -1
- package/themes/original/src/components/BusinessListingSearch/index.tsx +4 -2
- package/themes/original/src/components/BusinessProductsListing/index.tsx +2 -1
- package/themes/original/src/components/BusinessProductsListing/styles.tsx +1 -1
- package/themes/original/src/components/BusinessesListing/Layout/Original/index.tsx +1 -1
- package/themes/original/src/components/BusinessesListing/Layout/Original/styles.tsx +1 -1
- package/themes/original/src/components/CartContent/index.tsx +5 -1
- package/themes/original/src/components/CartContent/styles.tsx +1 -1
- package/themes/original/src/components/Checkout/index.tsx +1 -1
- package/themes/original/src/components/MyOrders/index.tsx +6 -8
- package/themes/original/src/components/ProductForm/index.tsx +8 -2
- package/themes/original/src/components/ProductForm/styles.tsx +2 -2
- package/themes/original/src/components/ProductOptionSubOption/index.tsx +1 -1
- package/themes/original/src/components/UserProfile/index.tsx +3 -5
- package/themes/original/src/components/Wallets/index.tsx +1 -1
package/package.json
CHANGED
|
@@ -46,7 +46,7 @@ export const BusinessBasicInformation = (
|
|
|
46
46
|
const [openBusinessReviews, setOpenBusinessReviews] = useState(false);
|
|
47
47
|
const [businessInformationObtained, setBusinessInformationObtained] = useState(false)
|
|
48
48
|
const [businessReviewsObtained, setBusinessReviewsObtainedbtained] = useState(false)
|
|
49
|
-
const isChewLayout = theme?.
|
|
49
|
+
const isChewLayout = theme?.header?.components?.layout?.type === 'chew'
|
|
50
50
|
const showLogo = !theme?.business_view?.components?.header?.components?.business?.components?.logo?.hidden
|
|
51
51
|
|
|
52
52
|
const styles = StyleSheet.create({
|
|
@@ -76,7 +76,7 @@ export const BusinessListingSearchUI = (props: BusinessSearchParams) => {
|
|
|
76
76
|
{ text: t('PICKUP_TIME', 'Pickup time'), value: 'pickup_time' }
|
|
77
77
|
]
|
|
78
78
|
|
|
79
|
-
const isChewLayout = theme?.
|
|
79
|
+
const isChewLayout = theme?.header?.components?.layout?.type === 'chew'
|
|
80
80
|
|
|
81
81
|
const priceList = [
|
|
82
82
|
{ level: '1', content: '$' },
|
|
@@ -229,7 +229,9 @@ export const BusinessListingSearchUI = (props: BusinessSearchParams) => {
|
|
|
229
229
|
}, [isFocused])
|
|
230
230
|
|
|
231
231
|
return (
|
|
232
|
-
<BContainer
|
|
232
|
+
<BContainer
|
|
233
|
+
style={{ paddingHorizontal: isChewLayout ? 20 : 40 }}
|
|
234
|
+
>
|
|
233
235
|
<SearchWrapper>
|
|
234
236
|
<SearchBar
|
|
235
237
|
lazyLoad
|
|
@@ -82,7 +82,7 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
|
|
|
82
82
|
const isFocused = useIsFocused();
|
|
83
83
|
const isPreOrder = configs?.preorder_status_enabled?.value === '1'
|
|
84
84
|
|
|
85
|
-
const isChewLayout = theme?.
|
|
85
|
+
const isChewLayout = theme?.header?.components?.layout?.type === 'chew'
|
|
86
86
|
const showLogo = !theme?.business_view?.components?.header?.components?.business?.components?.logo?.hidden
|
|
87
87
|
const hideBusinessNearCity = theme?.business_view?.components?.near_business?.hidden ?? true
|
|
88
88
|
|
|
@@ -457,6 +457,7 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
|
|
|
457
457
|
<>
|
|
458
458
|
<WrapContent
|
|
459
459
|
onLayout={(event: any) => setProductListLayout(event.nativeEvent.layout)}
|
|
460
|
+
style={{ paddingHorizontal: isChewLayout ? 20 : 40 }}
|
|
460
461
|
>
|
|
461
462
|
<BusinessProductsList
|
|
462
463
|
categories={[
|
|
@@ -553,7 +553,7 @@ const BusinessesListingUI = (props: BusinessesListingParams) => {
|
|
|
553
553
|
</>
|
|
554
554
|
)}
|
|
555
555
|
<View style={{ height: 8, backgroundColor: theme.colors.backgroundGray100 }} />
|
|
556
|
-
<ListWrapper>
|
|
556
|
+
<ListWrapper ph={isChewLayout && 20}>
|
|
557
557
|
{!businessId && (
|
|
558
558
|
<BusinessTypeFilter
|
|
559
559
|
images={props.images}
|
|
@@ -67,7 +67,7 @@ export const HeaderWrapper = styled.ImageBackground`
|
|
|
67
67
|
|
|
68
68
|
export const ListWrapper = styled.View`
|
|
69
69
|
background-color: ${(props: any) => props.theme.colors.backgroundLight};
|
|
70
|
-
padding-horizontal:
|
|
70
|
+
padding-horizontal: ${(props: any) => props.ph ?? 40}px;
|
|
71
71
|
`;
|
|
72
72
|
|
|
73
73
|
export const FeaturedWrapper = styled.View`
|
|
@@ -19,8 +19,12 @@ export const CartContent = (props: any) => {
|
|
|
19
19
|
const [, t] = useLanguage()
|
|
20
20
|
const [isCartsLoading, setIsCartsLoading] = useState(false)
|
|
21
21
|
|
|
22
|
+
const isChewLayout = theme?.header?.components?.layout?.type === 'chew'
|
|
23
|
+
|
|
22
24
|
return (
|
|
23
|
-
<CCContainer
|
|
25
|
+
<CCContainer
|
|
26
|
+
style={{ paddingHorizontal: isChewLayout ? 20 : 40 }}
|
|
27
|
+
>
|
|
24
28
|
{isOrderStateCarts && carts?.length > 0 && (
|
|
25
29
|
<>
|
|
26
30
|
{carts.map((cart: any, i: number) => (
|
|
@@ -153,7 +153,7 @@ const CheckoutUI = (props: any) => {
|
|
|
153
153
|
const isWalletCreditPointsEnabled = businessConfigs.find((config: any) => config.key === 'wallet_credit_point_enabled')?.value === '1'
|
|
154
154
|
const isWalletEnabled = configs?.cash_wallet?.value && configs?.wallet_enabled?.value === '1' && (isWalletCashEnabled || isWalletCreditPointsEnabled)
|
|
155
155
|
const isBusinessChangeEnabled = configs?.cart_change_business_validation?.value === '1'
|
|
156
|
-
const isChewLayout = theme?.
|
|
156
|
+
const isChewLayout = theme?.header?.components?.layout?.type === 'chew'
|
|
157
157
|
|
|
158
158
|
const isPreOrder = configs?.preorder_status_enabled?.value === '1'
|
|
159
159
|
const subtotalWithTaxes = cart?.taxes?.reduce((acc: any, item: any) => {
|
|
@@ -35,7 +35,7 @@ export const MyOrders = (props: any) => {
|
|
|
35
35
|
{ key: 'business', value: t('BUSINESS', 'Business') },
|
|
36
36
|
{ key: 'products', value: t('PRODUCTS', 'Products') }
|
|
37
37
|
]
|
|
38
|
-
const isChewLayout = theme?.
|
|
38
|
+
const isChewLayout = theme?.header?.components?.layout?.type === 'chew'
|
|
39
39
|
const showNavbar = theme?.bar_menu?.components?.orders?.hidden
|
|
40
40
|
|
|
41
41
|
const goToBack = () => navigation?.canGoBack() && navigation.goBack()
|
|
@@ -68,7 +68,6 @@ export const MyOrders = (props: any) => {
|
|
|
68
68
|
|
|
69
69
|
return (
|
|
70
70
|
<Container
|
|
71
|
-
pt={0}
|
|
72
71
|
noPadding
|
|
73
72
|
refreshControl={
|
|
74
73
|
<RefreshControl
|
|
@@ -84,12 +83,11 @@ export const MyOrders = (props: any) => {
|
|
|
84
83
|
display: 'flex',
|
|
85
84
|
flexDirection: 'row',
|
|
86
85
|
alignItems: 'center',
|
|
87
|
-
paddingHorizontal: 40,
|
|
88
|
-
marginTop: Platform.OS === 'android' ? 50 : 30,
|
|
86
|
+
paddingHorizontal: isChewLayout ? 20 : 40,
|
|
89
87
|
},
|
|
90
88
|
...props.titleStyle
|
|
91
89
|
}}>
|
|
92
|
-
{!props.hideBackBtn && (
|
|
90
|
+
{!props.hideBackBtn && !isChewLayout && (
|
|
93
91
|
<OButton
|
|
94
92
|
imgLeftStyle={{ width: 18 }}
|
|
95
93
|
imgRightSrc={null}
|
|
@@ -121,7 +119,7 @@ export const MyOrders = (props: any) => {
|
|
|
121
119
|
<ScrollView
|
|
122
120
|
horizontal
|
|
123
121
|
style={{ ...styles.container, borderBottomWidth: 1 }}
|
|
124
|
-
contentContainerStyle={{ paddingHorizontal: !!businessesSearchList ? 0 : 40 }}
|
|
122
|
+
contentContainerStyle={{ paddingHorizontal: !!businessesSearchList ? 0 : isChewLayout ? 20 : 40 }}
|
|
125
123
|
showsHorizontalScrollIndicator={false}
|
|
126
124
|
scrollEventThrottle={16}
|
|
127
125
|
>
|
|
@@ -146,7 +144,7 @@ export const MyOrders = (props: any) => {
|
|
|
146
144
|
{selectedOption === 'orders' && (
|
|
147
145
|
<>
|
|
148
146
|
{ordersLength?.activeOrdersLength > 0 && (
|
|
149
|
-
<View style={{
|
|
147
|
+
<View style={{ paddingHorizontal: isChewLayout ? 20 : 40 }}>
|
|
150
148
|
<OrdersOption
|
|
151
149
|
{...props}
|
|
152
150
|
activeOrders
|
|
@@ -157,7 +155,7 @@ export const MyOrders = (props: any) => {
|
|
|
157
155
|
/>
|
|
158
156
|
</View>
|
|
159
157
|
)}
|
|
160
|
-
<View style={{
|
|
158
|
+
<View style={{ paddingHorizontal: isChewLayout ? 20 : 40 }}>
|
|
161
159
|
<OrdersOption
|
|
162
160
|
{...props}
|
|
163
161
|
ordersLength={ordersLength}
|
|
@@ -75,6 +75,8 @@ export const ProductOptionsUI = (props: any) => {
|
|
|
75
75
|
const theme = useTheme();
|
|
76
76
|
const [, { showToast }] = useToast()
|
|
77
77
|
|
|
78
|
+
const isChewLayout = theme?.header?.components?.layout?.type === 'chew'
|
|
79
|
+
|
|
78
80
|
const styles = StyleSheet.create({
|
|
79
81
|
mainContainer: {
|
|
80
82
|
|
|
@@ -618,7 +620,10 @@ export const ProductOptionsUI = (props: any) => {
|
|
|
618
620
|
</>
|
|
619
621
|
)}
|
|
620
622
|
</WrapHeader>
|
|
621
|
-
<ProductSummary
|
|
623
|
+
<ProductSummary
|
|
624
|
+
ph={isChewLayout ? 20 : 40}
|
|
625
|
+
onLayout={(event: any) => setSummaryRefHeight(event.nativeEvent.layout?.height)}
|
|
626
|
+
>
|
|
622
627
|
<ProductTitle>
|
|
623
628
|
{loading && !product ? (
|
|
624
629
|
<Placeholder Animation={Fade}>
|
|
@@ -718,7 +723,7 @@ export const ProductOptionsUI = (props: any) => {
|
|
|
718
723
|
marginBottom: 20,
|
|
719
724
|
borderBottomWidth: 1,
|
|
720
725
|
borderBottomColor: theme.colors.border,
|
|
721
|
-
marginHorizontal: 30,
|
|
726
|
+
marginHorizontal: isChewLayout ? 20 : 30,
|
|
722
727
|
backgroundColor: theme.colors.backgroundPage,
|
|
723
728
|
}}
|
|
724
729
|
>
|
|
@@ -792,6 +797,7 @@ export const ProductOptionsUI = (props: any) => {
|
|
|
792
797
|
</>
|
|
793
798
|
) : (
|
|
794
799
|
<ProductEditions
|
|
800
|
+
style={{ paddingHorizontal: isChewLayout ? 20 : 40 }}
|
|
795
801
|
onLayout={(event: any) => {
|
|
796
802
|
setEditionsLayoutY(event.nativeEvent.layout?.y)
|
|
797
803
|
}}
|
|
@@ -47,7 +47,7 @@ export const ProductTitle = styled.View`
|
|
|
47
47
|
export const ProductDescription = styled.View``
|
|
48
48
|
|
|
49
49
|
export const ProductEditions = styled.View`
|
|
50
|
-
padding: 0
|
|
50
|
+
padding-vertical: 0;
|
|
51
51
|
`
|
|
52
52
|
|
|
53
53
|
export const SectionTitle = styled.View`
|
|
@@ -94,7 +94,7 @@ export const WeightUnitItem = styled.View`
|
|
|
94
94
|
`}
|
|
95
95
|
`
|
|
96
96
|
export const ProductSummary = styled.View`
|
|
97
|
-
padding: 26px
|
|
97
|
+
padding: 26px ${(props: any) => props.ph}px 0;
|
|
98
98
|
position: relative;
|
|
99
99
|
background-color: white;
|
|
100
100
|
z-index: 100;
|
|
@@ -41,7 +41,7 @@ export const ProductOptionSubOptionUI = (props: any) => {
|
|
|
41
41
|
const [showMessage, setShowMessage] = useState(false)
|
|
42
42
|
const [isDirty, setIsDirty] = useState(false)
|
|
43
43
|
|
|
44
|
-
const isChewLayout = theme?.
|
|
44
|
+
const isChewLayout = theme?.header?.components?.layout?.type === 'chew'
|
|
45
45
|
const iconsSize = isChewLayout ? 20 : 16
|
|
46
46
|
|
|
47
47
|
const handleSuboptionClick = () => {
|
|
@@ -49,6 +49,8 @@ const ProfileListUI = (props: ProfileParams) => {
|
|
|
49
49
|
|
|
50
50
|
const theme = useTheme();
|
|
51
51
|
|
|
52
|
+
const isChewLayout = theme?.header?.components?.layout?.type === 'chew'
|
|
53
|
+
|
|
52
54
|
const langPickerStyle = StyleSheet.create({
|
|
53
55
|
inputAndroid: {
|
|
54
56
|
color: theme.colors.textNormal,
|
|
@@ -89,8 +91,7 @@ const ProfileListUI = (props: ProfileParams) => {
|
|
|
89
91
|
marginEnd: 14
|
|
90
92
|
},
|
|
91
93
|
pagePadding: {
|
|
92
|
-
|
|
93
|
-
paddingRight: 40
|
|
94
|
+
paddingHorizontal: isChewLayout ? 20 : 40
|
|
94
95
|
},
|
|
95
96
|
messageIconStyle: {
|
|
96
97
|
fontSize: 18,
|
|
@@ -164,9 +165,6 @@ const ProfileListUI = (props: ProfileParams) => {
|
|
|
164
165
|
|
|
165
166
|
return (
|
|
166
167
|
<View style={{ flex: 1, height: height - top - bottom, paddingTop: 20 }}>
|
|
167
|
-
{/* <OText size={24} style={{ marginTop: 15, paddingHorizontal: 40 }}>
|
|
168
|
-
{t('PROFILE', 'Profile')}
|
|
169
|
-
</OText> */}
|
|
170
168
|
<CenterView style={styles.pagePadding}>
|
|
171
169
|
{user?.photo && (
|
|
172
170
|
<View style={styles.photo}>
|
|
@@ -62,7 +62,7 @@ const WalletsUI = (props: any) => {
|
|
|
62
62
|
|
|
63
63
|
const [tabSelected, setTabSelected] = useState(isWalletCashEnabled ? 'cash' : 'credit_point')
|
|
64
64
|
const [openHistory, setOpenHistory] = useState(false)
|
|
65
|
-
const isChewLayout = theme?.
|
|
65
|
+
const isChewLayout = theme?.header?.components?.layout?.type === 'chew'
|
|
66
66
|
|
|
67
67
|
const isWalletEnabled = configs?.cash_wallet?.value && configs?.wallet_enabled?.value === '1' && (isWalletCashEnabled || isWalletPointsEnabled)
|
|
68
68
|
|