ordering-ui-react-native 0.17.36 → 0.17.38

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.17.36",
3
+ "version": "0.17.38",
4
4
  "description": "Reusable components made in react native",
5
5
  "main": "src/index.tsx",
6
6
  "author": "ordering.inc",
@@ -589,10 +589,11 @@ const AddressFormUI = (props: AddressFormParams) => {
589
589
  borderColor: theme.colors.border,
590
590
  flexGrow: 1,
591
591
  fontSize: 15,
592
- paddingHorizontal: 16,
592
+ paddingLeft: 16,
593
+ paddingRight: 32,
593
594
  minHeight: 50,
594
595
  fontFamily: 'Poppins-Regular',
595
- marginBottom: 24,
596
+ marginBottom: 24
596
597
  },
597
598
  }}
598
599
  />
@@ -600,9 +601,9 @@ const AddressFormUI = (props: AddressFormParams) => {
600
601
  />
601
602
 
602
603
  {(
603
- ((!isEditing && !isGuestUser && !formState.changes?.address) ||
604
- (isEditing && !isGuestUser && !formState.changes?.address && formState.changes?.address !== undefined)) ||
605
- (isGuestUser && !formState.changes?.address)) &&
604
+ ((!isEditing && !isGuestUser) ||
605
+ (isEditing && !isGuestUser)) ||
606
+ (isGuestUser)) &&
606
607
  (
607
608
  <View style={styles.pinIcon}>
608
609
  <GPSButton
@@ -5,6 +5,7 @@ import { useTheme } from 'styled-components/native';
5
5
  import MaterialCommunityIcon from 'react-native-vector-icons/MaterialCommunityIcons'
6
6
  import RNPickerSelect from 'react-native-picker-select'
7
7
  import { ServiceForm } from '../ServiceForm';
8
+ import FastImage from 'react-native-fast-image'
8
9
 
9
10
  import {
10
11
  Accordion,
@@ -157,12 +158,40 @@ export const ProductItemAccordion = (props: ProductItemAccordionParams) => {
157
158
  {(product?.images || theme?.images?.dummies?.product) && (
158
159
  <ProductImage>
159
160
  {isFromCheckout ? (
160
- <OIcon url={optimizeImage(product?.images || theme?.images?.dummies?.product, 'h_100,c_limit')} style={{ ...styles.productImage, ...{ width: 82, height: 82 } }} />
161
+ product?.images ? (
162
+ <FastImage
163
+ style={{ ...styles.productImage, ...{ width: 82, height: 82 } }}
164
+ source={{
165
+ uri: optimizeImage(product?.images, 'h_100,c_limit'),
166
+ priority: FastImage.priority.normal,
167
+ }}
168
+ resizeMode={FastImage.resizeMode.cover}
169
+ />
170
+ ) : (
171
+ <OIcon
172
+ src={theme?.images?.dummies?.product}
173
+ style={{ ...styles.productImage, ...{ width: 82, height: 82 } }}
174
+ />
175
+ )
161
176
  ) : (
162
- <OIcon url={optimizeImage(product?.images || theme?.images?.dummies?.product, 'h_100,c_limit')} style={styles.productImage} />
177
+ product?.images ? (
178
+ <FastImage
179
+ style={styles.productImage}
180
+ source={{
181
+ uri: optimizeImage(product?.images, 'h_100,c_limit'),
182
+ priority: FastImage.priority.normal,
183
+ }}
184
+ resizeMode={FastImage.resizeMode.cover}
185
+ />
186
+ ) : (
187
+ <OIcon
188
+ src={theme?.images?.dummies?.product}
189
+ style={styles.productImage}
190
+ />
191
+ )
163
192
  )}
164
193
  </ProductImage>
165
- )}
194
+ )}
166
195
  {!!product?.calendar_event ? (
167
196
  <View style={{ flex: 1, marginLeft: 10, flexDirection: 'column' }}>
168
197
  <View>
@@ -26,7 +26,14 @@ const OImage = (props: Props): React.ReactElement => {
26
26
  return (
27
27
  <Wrapper style={{ borderRadius: props.style?.borderRadius, overflow: 'hidden', marginHorizontal: props.style?.marginHorizontal }}>
28
28
  <SImage
29
- source={props.src ? props.src : props.url ? { uri: props.url } : props.dummy}
29
+ source={
30
+ props.src
31
+ ? props.src
32
+ : props.url
33
+ ? typeof props.url === 'number'
34
+ ? props.url
35
+ : { uri: props.url }
36
+ : props.dummy}
30
37
  style={{
31
38
  tintColor: props.color,
32
39
  flex: props.isWrap ? 1 : 0,