ordering-ui-react-native 0.12.97 → 0.13.1

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.12.97",
3
+ "version": "0.13.01",
4
4
  "description": "Reusable components made in react native",
5
5
  "main": "src/index.tsx",
6
6
  "author": "ordering.inc",
@@ -67,7 +67,7 @@ const ReviewProductsUI = (props: ReviewProductParams) => {
67
67
  <NavBar
68
68
  title={t('REVIEW_PRODUCT', 'Review product')}
69
69
  titleAlign={'center'}
70
- onActionLeft={() => navigation?.canGoBack() && navigation.goBack()}
70
+ onActionLeft={() => onNavigationRedirect('MyOrders')}
71
71
  showCall={false}
72
72
  btnStyle={{ paddingLeft: 0 }}
73
73
  paddingTop={0}
@@ -2,6 +2,7 @@ import styled from 'styled-components/native';
2
2
 
3
3
  export const FiltersTab = styled.View`
4
4
  margin-bottom: 20px;
5
+ min-height: 30px;
5
6
  max-height: 35px;
6
7
  flex: 1;
7
8
  `;
@@ -60,7 +60,7 @@ export const PreviousOrders = (props: PreviousOrdersParams) => {
60
60
  }
61
61
 
62
62
  const handleClickOrderReview = (order: any) => {
63
- onNavigationRedirect && onNavigationRedirect('ReviewOrder', { order: { id: order?.id, business_id: order?.business_id, logo: order.business?.logo } })
63
+ onNavigationRedirect && onNavigationRedirect('ReviewOrder', { order: { id: order?.id, business_id: order?.business_id, logo: order.business?.logo, products: order?.products } })
64
64
  }
65
65
 
66
66
  const handleReorderClick = (id: number) => {
@@ -8,7 +8,7 @@ import {
8
8
  } from 'ordering-components/native'
9
9
  import { ProductIngredient } from '../ProductIngredient'
10
10
  import { ProductOption } from '../ProductOption'
11
- import { View, TouchableOpacity, StyleSheet, Dimensions, ScrollView, I18nManager, TextStyle, Platform } from 'react-native'
11
+ import { View, TouchableOpacity, StyleSheet, Dimensions, ScrollView, I18nManager, TextStyle, Platform, KeyboardAvoidingView } from 'react-native'
12
12
  import {
13
13
  ProductHeader,
14
14
  WrapHeader,
@@ -137,7 +137,11 @@ export const ProductOptionsUI = (props: any) => {
137
137
  const saveErrors = orderState.loading || maxProductQuantity === 0 || Object.keys(errors).length > 0
138
138
 
139
139
  return (
140
- <>
140
+ <KeyboardAvoidingView
141
+ style={{ flex: 1 }}
142
+ behavior={Platform.OS ? 'padding' : 'height'}
143
+ enabled={Platform.OS === 'ios'}
144
+ >
141
145
  <ScrollView style={styles.mainContainer}>
142
146
  {!error && (
143
147
  <View style={{ paddingBottom: 80 }}>
@@ -286,7 +290,7 @@ export const ProductOptionsUI = (props: any) => {
286
290
  />
287
291
  </ProductComment>
288
292
  {productCart && !isSoldOut && maxProductQuantity > 0 && (
289
- <View style={{ paddingVertical: 4 }}>
293
+ <View style={{ paddingVertical: 4, marginBottom: 10 }}>
290
294
  <SectionTitle>
291
295
  <OText style={theme.labels.middle as TextStyle}>{t('PREFERENCES', 'Preferences')}</OText>
292
296
  </SectionTitle>
@@ -335,6 +339,7 @@ export const ProductOptionsUI = (props: any) => {
335
339
  textSub={`${orderState.loading ? '' : productCart.total ? parsePrice(productCart?.total) : ''}`}
336
340
  textStyle={{ color: saveErrors ? theme.colors.textSecondary : theme.colors.white, fontSize: 14, fontWeight: Platform.OS === 'ios' ? '600' : 'bold' }}
337
341
  style={{
342
+ bottom: 5,
338
343
  backgroundColor: saveErrors ? theme.colors.backgroundGray300 : theme.colors.primary,
339
344
  borderWidth: 1, shadowOpacity: 0, height: 40,
340
345
  borderColor: saveErrors ? theme.colors.backgroundGray300 : theme.colors.primary,
@@ -361,13 +366,13 @@ export const ProductOptionsUI = (props: any) => {
361
366
  text={isSoldOut || maxProductQuantity <= 0 ? t('SOLD_OUT', 'Sold out') : t('LOGIN_SIGNUP', 'Login / Sign Up')}
362
367
  imgRightSrc=''
363
368
  textStyle={{ color: theme.colors.primary, ...theme.labels.middle }}
364
- style={{ height: 40, borderWidth: 1, borderColor: theme.colors.primary, backgroundColor: theme.colors.white }}
369
+ style={{ bottom: 5, marginTop: 2, height: 40, borderWidth: 1, borderColor: theme.colors.primary, backgroundColor: theme.colors.white }}
365
370
  />
366
371
  )}
367
372
  </View>
368
373
  </ProductActions>
369
374
  )}
370
- </>
375
+ </KeyboardAvoidingView>
371
376
  )
372
377
  }
373
378
 
@@ -81,7 +81,7 @@ const BusinessMenuListUI = (props: BusinessMenuListParams) => {
81
81
  dropdownStyle={{
82
82
  borderRadius: 8,
83
83
  borderColor: theme.colors.lightGray,
84
- marginTop: 5,
84
+ marginTop: -15,
85
85
  maxHeight: 160
86
86
  }}
87
87
  rowStyle={{
@@ -335,7 +335,7 @@ const BusinessPreorderUI = (props: BusinessPreorderParams) => {
335
335
  dropdownStyle={{
336
336
  borderRadius: 8,
337
337
  borderColor: theme.colors.lightGray,
338
- marginTop: 5
338
+ marginTop: -15
339
339
  }}
340
340
  rowStyle={{
341
341
  borderBottomColor: theme.colors.backgroundGray100,
@@ -7,7 +7,7 @@ import { USER_TYPE } from '../../config/constants'
7
7
  import MaterialCommunityIcon from 'react-native-vector-icons/MaterialCommunityIcons'
8
8
  import { OIcon, OIconButton, OText, OButton } from '../shared'
9
9
  import { TouchableOpacity, ActivityIndicator, StyleSheet, View, Platform, Keyboard } from 'react-native'
10
- import { Header, TitleHeader, Wrapper, QuickMessageContainer, ProfileMessageHeader } from './styles'
10
+ import { Header, TitleHeader, Wrapper, QuickMessageContainer, ProfileMessageHeader, MessageTypeItem } from './styles'
11
11
  import { MessagesParams } from '../../types'
12
12
  import { useWindowDimensions } from 'react-native'
13
13
  import { useSafeAreaInsets } from 'react-native-safe-area-context'