ordering-ui-react-native 0.16.93 → 0.16.95
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
|
@@ -48,6 +48,14 @@ const BusinessInformationUI = (props: BusinessInformationParams) => {
|
|
|
48
48
|
/>
|
|
49
49
|
<WrapMainContent>
|
|
50
50
|
<InnerContent>
|
|
51
|
+
{(!!businessState?.business?.description) && (
|
|
52
|
+
<>
|
|
53
|
+
<GrayBackground>
|
|
54
|
+
<OText size={16} weight='bold'>{t('BUSINESS_DESCRIPTION', 'Business description')}</OText>
|
|
55
|
+
</GrayBackground>
|
|
56
|
+
<OText size={14} mBottom={20} mLeft={15} mRight={15} style={{ marginTop: 10 }}>{businessState?.business?.description}</OText>
|
|
57
|
+
</>
|
|
58
|
+
)}
|
|
51
59
|
{(!!businessState?.business?.email || !!businessState?.business?.cellphone) && (
|
|
52
60
|
<>
|
|
53
61
|
<GrayBackground>
|
|
@@ -599,8 +599,9 @@ const AddressFormUI = (props: AddressFormParams) => {
|
|
|
599
599
|
/>
|
|
600
600
|
|
|
601
601
|
{(
|
|
602
|
-
(!isEditing && !formState.changes?.address) ||
|
|
603
|
-
(isEditing && !formState.changes?.address && formState.changes?.address !== undefined))
|
|
602
|
+
(!isEditing && !isGuestUser && !formState.changes?.address) ||
|
|
603
|
+
(isEditing && !isGuestUser && !formState.changes?.address && formState.changes?.address !== undefined)) ||
|
|
604
|
+
(isGuestUser && !formState.changes?.address && formState.changes?.address !== undefined) &&
|
|
604
605
|
(
|
|
605
606
|
<View style={styles.pinIcon}>
|
|
606
607
|
<GPSButton
|
|
@@ -1,4 +1,16 @@
|
|
|
1
|
-
import React, { useEffect, useRef, useCallback } from 'react';
|
|
1
|
+
import React, { useEffect, useRef, useState, useCallback } from 'react';
|
|
2
|
+
import {
|
|
3
|
+
View,
|
|
4
|
+
Keyboard,
|
|
5
|
+
TextInput,
|
|
6
|
+
TouchableOpacity,
|
|
7
|
+
StyleSheet,
|
|
8
|
+
Dimensions,
|
|
9
|
+
I18nManager,
|
|
10
|
+
SafeAreaView,
|
|
11
|
+
Platform,
|
|
12
|
+
Button
|
|
13
|
+
} from 'react-native';
|
|
2
14
|
import {
|
|
3
15
|
ProductForm as ProductOptions,
|
|
4
16
|
useSession,
|
|
@@ -15,17 +27,10 @@ import Swiper from 'react-native-swiper'
|
|
|
15
27
|
import FastImage from 'react-native-fast-image';
|
|
16
28
|
import IconAntDesign from 'react-native-vector-icons/AntDesign';
|
|
17
29
|
import YoutubePlayer from "react-native-youtube-iframe"
|
|
18
|
-
import { Keyboard, TextInput } from 'react-native'
|
|
19
|
-
import {
|
|
20
|
-
Grayscale
|
|
21
|
-
} from 'react-native-color-matrix-image-filters'
|
|
22
|
-
|
|
23
|
-
import { View, TouchableOpacity, StyleSheet, Dimensions, I18nManager, SafeAreaView, Platform, Button } from 'react-native';
|
|
24
30
|
|
|
25
31
|
import {
|
|
26
32
|
WrapHeader,
|
|
27
33
|
TopHeader,
|
|
28
|
-
WrapContent,
|
|
29
34
|
ProductTitle,
|
|
30
35
|
ProductDescription,
|
|
31
36
|
ProductEditions,
|
|
@@ -45,8 +50,6 @@ import { ScrollView } from 'react-native-gesture-handler';
|
|
|
45
50
|
import { ProductOptionSubOption } from '../ProductOptionSubOption';
|
|
46
51
|
import { NotFoundSource } from '../NotFoundSource';
|
|
47
52
|
import { Placeholder, PlaceholderLine, Fade } from 'rn-placeholder';
|
|
48
|
-
import { useState } from 'react';
|
|
49
|
-
const windowHeight = Dimensions.get('window').height;
|
|
50
53
|
const windowWidth = Dimensions.get('window').width;
|
|
51
54
|
|
|
52
55
|
export const ProductOptionsUI = (props: any) => {
|
|
@@ -183,7 +186,6 @@ export const ProductOptionsUI = (props: any) => {
|
|
|
183
186
|
const [headerRefHeight, setHeaderRefHeight] = useState(0)
|
|
184
187
|
const [summaryRefHeight, setSummaryRefHeight] = useState(0)
|
|
185
188
|
const [isScrollAvailable, setIsScrollAvailable] = useState(null)
|
|
186
|
-
const [isKeyboardShow, setIsKeyboardShow] = useState(false)
|
|
187
189
|
|
|
188
190
|
const isError = (id: number) => {
|
|
189
191
|
let bgColor = theme.colors.white;
|
|
@@ -457,14 +459,10 @@ export const ProductOptionsUI = (props: any) => {
|
|
|
457
459
|
|
|
458
460
|
useEffect(() => {
|
|
459
461
|
const keyboardDidShowListener = Keyboard.addListener('keyboardDidShow', () => {
|
|
460
|
-
|
|
461
|
-
})
|
|
462
|
-
const keyboardDidHideListener = Keyboard.addListener('keyboardDidHide', () => {
|
|
463
|
-
setIsKeyboardShow(false)
|
|
462
|
+
scrollViewRef.current.scrollToEnd({ animated: true })
|
|
464
463
|
})
|
|
465
464
|
return () => {
|
|
466
465
|
keyboardDidShowListener.remove()
|
|
467
|
-
keyboardDidHideListener.remove()
|
|
468
466
|
}
|
|
469
467
|
}, [])
|
|
470
468
|
|
|
@@ -481,7 +479,8 @@ export const ProductOptionsUI = (props: any) => {
|
|
|
481
479
|
ref={scrollViewRef}
|
|
482
480
|
contentContainerStyle={{ paddingBottom: 80 }}
|
|
483
481
|
stickyHeaderIndices={[2]}
|
|
484
|
-
onScroll={handleScroll}
|
|
482
|
+
onScroll={handleScroll}
|
|
483
|
+
>
|
|
485
484
|
<WrapHeader onLayout={(event: any) => setHeaderRefHeight(event.nativeEvent.layout?.height)}>
|
|
486
485
|
{loading && !product ? (
|
|
487
486
|
<View style={styles.productHeaderSkeleton}>
|
|
@@ -962,7 +961,7 @@ export const ProductOptionsUI = (props: any) => {
|
|
|
962
961
|
</>
|
|
963
962
|
)}
|
|
964
963
|
{!product?.hide_special_instructions && (
|
|
965
|
-
<ProductComment
|
|
964
|
+
<ProductComment>
|
|
966
965
|
<SectionTitle>
|
|
967
966
|
<OText size={16} weight={'600'} lineHeight={24}>
|
|
968
967
|
{t('SPECIAL_COMMENT', 'Special comment')}
|