ordering-ui-react-native 0.11.57 → 0.11.58

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.11.57",
3
+ "version": "0.11.58",
4
4
  "description": "Reusable components made in react native",
5
5
  "main": "src/index.tsx",
6
6
  "author": "ordering.inc",
@@ -67,13 +67,17 @@ export const OrderCreating = (props: any) => {
67
67
  let hour = 0
68
68
  let min = 0
69
69
  if (orderState?.options?.type === 1 && cart) {
70
- hour = (cart?.business?.delivery_time).split(':')[0]
71
- min = (cart?.business?.delivery_time).split(':')[1]
70
+ if (cart?.business?.delivery_time) {
71
+ hour = (cart?.business?.delivery_time).split(':')[0]
72
+ min = (cart?.business?.delivery_time).split(':')[1]
73
+ }
72
74
  }
73
75
 
74
76
  if (orderState?.options?.type === 2 && cart) {
75
- hour = (cart?.business?.pickup_time).split(':')[0]
76
- min = (cart?.business?.pickup_time).split(':')[1]
77
+ if (cart?.business?.pickup_time) {
78
+ hour = (cart?.business?.pickup_time).split(':')[0]
79
+ min = (cart?.business?.pickup_time).split(':')[1]
80
+ }
77
81
  }
78
82
  return getHourMin(hour, min)
79
83
  }
@@ -90,6 +90,7 @@ const AddressFormUI = (props: AddressFormParams) => {
90
90
  height: 50,
91
91
  maxHeight: 50,
92
92
  minHeight: 50,
93
+ flex: 1,
93
94
  },
94
95
  textAreaStyles: {
95
96
  borderColor: theme.colors.border,
@@ -495,7 +496,10 @@ const AddressFormUI = (props: AddressFormParams) => {
495
496
  }, [orderState.loading]);
496
497
 
497
498
  return (
498
- <ScrollView>
499
+ <ScrollView
500
+ keyboardShouldPersistTaps='always'
501
+ listViewDisplayed={false}
502
+ >
499
503
  <NavBar
500
504
  title={t('WHERE_DO_WE_DELIVERY', 'Where do we delivery?')}
501
505
  titleAlign={'center'}
@@ -504,7 +508,7 @@ const AddressFormUI = (props: AddressFormParams) => {
504
508
  paddingTop={20}
505
509
  btnStyle={{ paddingLeft: 40 }}
506
510
  titleStyle={{ fontSize: 14 }}
507
- titleWrapStyle={{ flexBasis: '75%' }}
511
+ titleWrapStyle={{ paddingHorizontal: 0 }}
508
512
  />
509
513
  <TouchableWithoutFeedback onPress={Keyboard.dismiss}>
510
514
  <AddressFormContainer style={{ height: 600, overflow: 'scroll' }}>
@@ -60,8 +60,9 @@ const FloatingButtonUI = (props: FloatingButtonParams) => {
60
60
 
61
61
  return (
62
62
  <Container
63
- isIos={Platform.OS === 'ios'}
64
- style={{ paddingBottom: bottom + 16 }}>
63
+ style={{
64
+ paddingBottom: Platform.OS === 'ios' ? 0 : bottom + 16
65
+ }}>
65
66
 
66
67
  <View style={styles.infoCont}>
67
68
  <OText color={theme.colors.textNormal} size={16} lineHeight={24} weight={'600'} mRight={20}>
@@ -1,4 +1,4 @@
1
- import styled, { css } from 'styled-components/native'
1
+ import styled from 'styled-components/native'
2
2
 
3
3
  export const Container = styled.View`
4
4
  position: absolute;
@@ -21,6 +21,6 @@ export const Button = styled.TouchableOpacity`
21
21
  align-items: center;
22
22
  border-radius: 7.6px;
23
23
  height: 44px;
24
- max-height; 44px;
24
+ max-height: 44px;
25
25
  padding-horizontal: 20px;
26
26
  `
@@ -25,7 +25,8 @@ const UserDetailsUI = (props: any) => {
25
25
  validationFields,
26
26
  isUserDetailsEdit,
27
27
  phoneUpdate,
28
- togglePhoneUpdate
28
+ togglePhoneUpdate,
29
+ isCheckout
29
30
  } = props
30
31
 
31
32
  const theme = useTheme();
@@ -116,7 +117,7 @@ const UserDetailsUI = (props: any) => {
116
117
  )}
117
118
  </UDInfo>
118
119
  ) : (
119
- <UserFormDetailsUI {...props} phoneUpdate={phoneUpdate} togglePhoneUpdate={togglePhoneUpdate} />
120
+ <UserFormDetailsUI {...props} phoneUpdate={phoneUpdate} togglePhoneUpdate={togglePhoneUpdate} isCheckout={isCheckout} />
120
121
  )}
121
122
  </UDContainer>
122
123
  )}
@@ -14,7 +14,6 @@ export const UDWrapper = styled.View`
14
14
  flex-direction: column;
15
15
  width: 100%;
16
16
  margin-top: 20px;
17
- padding-bottom: 50px;
18
17
  `
19
18
 
20
19
  export const UDLoader = styled.View`
@@ -4,7 +4,7 @@ import { Platform } from 'react-native';
4
4
 
5
5
  const ContainerStyled = styled.ScrollView`
6
6
  flex: 1;
7
- ${(props: any) => !props.nopadding && css`
7
+ ${(props: any) => !props.noPadding && css`
8
8
  padding: ${Platform.OS === 'ios' ? '0px 40px' : '20px 40px'};
9
9
  `}
10
10
  background-color: ${(props: any) => props.theme.colors.backgroundPage};