ordering-ui-react-native 0.18.38 → 0.18.40
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/business/src/components/DriverMap/index.tsx +1 -1
- package/themes/original/src/components/AddressForm/index.tsx +7 -4
- package/themes/original/src/components/AddressList/index.tsx +1 -1
- package/themes/original/src/components/BusinessBasicInformation/index.tsx +18 -3
- package/themes/original/src/components/BusinessBasicInformation/styles.tsx +0 -3
- package/themes/original/src/components/BusinessController/index.tsx +3 -3
- package/themes/original/src/components/BusinessListingSearch/index.tsx +331 -276
- package/themes/original/src/components/BusinessProductsList/index.tsx +3 -3
- package/themes/original/src/components/BusinessProductsListing/UpsellingRedirect.tsx +1 -1
- package/themes/original/src/components/BusinessProductsListing/index.tsx +49 -8
- package/themes/original/src/components/CartContent/index.tsx +56 -14
- package/themes/original/src/components/CartContent/styles.tsx +4 -0
- package/themes/original/src/components/Checkout/index.tsx +6 -5
- package/themes/original/src/components/GoogleMap/index.tsx +11 -2
- package/themes/original/src/components/LoginForm/index.tsx +15 -14
- package/themes/original/src/components/MultiCheckout/index.tsx +6 -5
- package/themes/original/src/components/MyOrders/index.tsx +14 -1
- package/themes/original/src/components/NavBar/index.tsx +9 -4
- package/themes/original/src/components/OrderSummary/index.tsx +4 -2
- package/themes/original/src/components/OrdersOption/index.tsx +3 -1
- package/themes/original/src/components/ProductForm/index.tsx +23 -11
- package/themes/original/src/components/ProductOptionSubOption/index.tsx +7 -5
- package/themes/original/src/components/ProductOptionSubOption/styles.tsx +2 -2
- package/themes/original/src/components/SignupForm/index.tsx +14 -14
- package/themes/original/src/components/SingleOrderCard/index.tsx +7 -1
- package/themes/original/src/components/StripeElementsForm/index.tsx +17 -16
- package/themes/original/src/components/UserFormDetails/index.tsx +34 -5
- package/themes/original/src/components/UserProfile/index.tsx +2 -20
- package/themes/original/src/components/UserProfileForm/index.tsx +7 -2
- package/themes/original/src/components/WalletTransactions/index.tsx +3 -3
- package/themes/original/src/components/Wallets/index.tsx +4 -4
- package/themes/original/src/types/index.tsx +2 -2
- package/themes/original/src/utils/index.tsx +11 -0
package/package.json
CHANGED
|
@@ -453,7 +453,7 @@ export const DriverMap = (props: GoogleMapsParams) => {
|
|
|
453
453
|
{order?.delivery_datetime_utc
|
|
454
454
|
? parseDate(order?.delivery_datetime_utc)
|
|
455
455
|
: parseDate(order?.delivery_datetime, { utc: false })}
|
|
456
|
-
{` - ${order?.paymethod?.name}`}
|
|
456
|
+
{` - ${t(order?.paymethod?.name?.replace(/\s+/g, '_')?.toUpperCase(), order?.paymethod?.name)}`}
|
|
457
457
|
</OText>
|
|
458
458
|
<OText weight="bold">
|
|
459
459
|
{t('INVOICE_ORDER_NO', 'Order No.')} {order?.id}
|
|
@@ -122,8 +122,8 @@ const AddressFormUI = (props: AddressFormParams) => {
|
|
|
122
122
|
width: 16
|
|
123
123
|
},
|
|
124
124
|
wrapperNavbar: Platform.OS === 'ios'
|
|
125
|
-
? { paddingVertical: 0,
|
|
126
|
-
: { paddingVertical: 20,
|
|
125
|
+
? { paddingVertical: 0, paddingLeft: 40, paddingRight: 20 }
|
|
126
|
+
: { paddingVertical: 20, paddingLeft: 40, paddingRight: 20 }
|
|
127
127
|
});
|
|
128
128
|
|
|
129
129
|
const [, t] = useLanguage();
|
|
@@ -352,6 +352,9 @@ const AddressFormUI = (props: AddressFormParams) => {
|
|
|
352
352
|
map_data: { library: 'google', place_id: data.place_id },
|
|
353
353
|
zip_code: data?.zip_code || null,
|
|
354
354
|
};
|
|
355
|
+
if (googleInput?.current) {
|
|
356
|
+
googleInput?.current?.setAddressText(addressSelected.address);
|
|
357
|
+
}
|
|
355
358
|
updateChanges(addressSelected);
|
|
356
359
|
};
|
|
357
360
|
|
|
@@ -526,8 +529,8 @@ const AddressFormUI = (props: AddressFormParams) => {
|
|
|
526
529
|
onActionLeft={goToBack}
|
|
527
530
|
showCall={false}
|
|
528
531
|
btnStyle={{ paddingLeft: 0 }}
|
|
529
|
-
style={{ marginTop: Platform.OS === 'ios' ? 0 :
|
|
530
|
-
titleWrapStyle={{ paddingHorizontal: 0 }}
|
|
532
|
+
style={{ marginTop: Platform.OS === 'ios' ? 0 : 10 }}
|
|
533
|
+
titleWrapStyle={{ paddingHorizontal: 0, width: '100%' }}
|
|
531
534
|
titleStyle={{ marginRight: 0, marginLeft: 0 }}
|
|
532
535
|
/>
|
|
533
536
|
</View>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useState, useEffect } from 'react';
|
|
2
|
-
import { StyleSheet, View, TouchableOpacity, Linking, Pressable } from 'react-native';
|
|
2
|
+
import { StyleSheet, View, TouchableOpacity, Linking, Pressable, Image } from 'react-native';
|
|
3
3
|
import FastImage from 'react-native-fast-image'
|
|
4
4
|
import { useUtils, useOrder, useLanguage } from 'ordering-components/native';
|
|
5
5
|
import { useTheme } from 'styled-components/native';
|
|
@@ -45,6 +45,7 @@ export const BusinessBasicInformation = (
|
|
|
45
45
|
const [openBusinessReviews, setOpenBusinessReviews] = useState(false);
|
|
46
46
|
const [businessInformationObtained, setBusinessInformationObtained] = useState(false)
|
|
47
47
|
const [businessReviewsObtained, setBusinessReviewsObtainedbtained] = useState(false)
|
|
48
|
+
const [imageRealSize, setImageRealSize] = useState({ width: 16, height: 9, loading: true })
|
|
48
49
|
const isChewLayout = theme?.header?.components?.layout?.type?.toLowerCase() === 'chew'
|
|
49
50
|
const hideLogo = theme?.business_view?.components?.header?.components?.business?.components?.logo?.hidden
|
|
50
51
|
const hideDeliveryFee = theme?.business_view?.components?.header?.components?.business?.components?.fee?.hidden
|
|
@@ -61,7 +62,7 @@ export const BusinessBasicInformation = (
|
|
|
61
62
|
height: 150,
|
|
62
63
|
},
|
|
63
64
|
headerStyle: {
|
|
64
|
-
|
|
65
|
+
aspectRatio: imageRealSize?.width / imageRealSize?.height
|
|
65
66
|
},
|
|
66
67
|
logoStyle: {
|
|
67
68
|
width: 72,
|
|
@@ -195,6 +196,20 @@ export const BusinessBasicInformation = (
|
|
|
195
196
|
}
|
|
196
197
|
}, [businessState?.business])
|
|
197
198
|
|
|
199
|
+
useEffect(() => {
|
|
200
|
+
const bannerImage = header || businessState?.business?.header
|
|
201
|
+
if (!bannerImage) {
|
|
202
|
+
setImageRealSize({ width: 16, height: 9, loading: false })
|
|
203
|
+
return
|
|
204
|
+
}
|
|
205
|
+
Image.getSize(bannerImage, (width: number, height: number) => {
|
|
206
|
+
setImageRealSize({ width: width, height: height, loading: false });
|
|
207
|
+
}, (error: any) => {
|
|
208
|
+
setImageRealSize({ ...imageRealSize, loading: false });
|
|
209
|
+
console.log(error);
|
|
210
|
+
});
|
|
211
|
+
}, [header, businessState?.business?.header])
|
|
212
|
+
|
|
198
213
|
const SocialIcons = () => {
|
|
199
214
|
return (
|
|
200
215
|
<>
|
|
@@ -283,7 +298,7 @@ export const BusinessBasicInformation = (
|
|
|
283
298
|
? styles.businesInfoheaderStyle
|
|
284
299
|
: { ...styles.headerStyle, backgroundColor: theme.colors.backgroundGray }
|
|
285
300
|
}
|
|
286
|
-
{...(!loading && {
|
|
301
|
+
{...(!loading && !imageRealSize?.loading && {
|
|
287
302
|
source: (header || businessState?.business?.header || typeof theme?.images?.dummies?.businessHeader === 'string') ? {
|
|
288
303
|
uri: optimizeImage(businessState?.business?.header, 'h_250,c_limit') || header || theme?.images?.dummies?.businessHeader
|
|
289
304
|
} : theme?.images?.dummies?.businessHeader
|
|
@@ -8,9 +8,6 @@ export const BusinessContainer = styled.View`
|
|
|
8
8
|
export const BusinessHeader = styled.ImageBackground`
|
|
9
9
|
width: 100%;
|
|
10
10
|
position: relative;
|
|
11
|
-
max-height: 258px;
|
|
12
|
-
height: 258px;
|
|
13
|
-
resize-mode: cover;
|
|
14
11
|
`;
|
|
15
12
|
export const BusinessLogo = styled.View`
|
|
16
13
|
position: absolute;
|
|
@@ -11,10 +11,10 @@ import {
|
|
|
11
11
|
ToastType
|
|
12
12
|
} from 'ordering-components/native';
|
|
13
13
|
import { OIcon, OText } from '../shared';
|
|
14
|
-
import { Dimensions, StyleSheet,
|
|
14
|
+
import { Dimensions, StyleSheet, View } from 'react-native';
|
|
15
15
|
import { InView } from 'react-native-intersection-observer'
|
|
16
16
|
import { BusinessControllerParams } from '../../types';
|
|
17
|
-
import { convertHoursToMinutes, lightenDarkenColor, shape } from '../../utils';
|
|
17
|
+
import { convertHoursToMinutes, lightenDarkenColor, shape, vibrateApp } from '../../utils';
|
|
18
18
|
|
|
19
19
|
import {
|
|
20
20
|
BusinessHero,
|
|
@@ -152,7 +152,7 @@ export const BusinessControllerUI = (props: BusinessControllerParams) => {
|
|
|
152
152
|
};
|
|
153
153
|
|
|
154
154
|
const handleBusinessClick = (selectedBusiness: any) => {
|
|
155
|
-
|
|
155
|
+
vibrateApp()
|
|
156
156
|
if (business?.open) handleClick && handleClick(selectedBusiness)
|
|
157
157
|
else {
|
|
158
158
|
if (configState?.configs?.preorder_status_enabled?.value === '1') {
|