ordering-ui-react-native 0.17.42 → 0.17.44

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.42",
3
+ "version": "0.17.44",
4
4
  "description": "Reusable components made in react native",
5
5
  "main": "src/index.tsx",
6
6
  "author": "ordering.inc",
@@ -151,6 +151,8 @@ const ReviewCustomerUI = (props: ReviewCustomerParams) => {
151
151
  }
152
152
  }, [scrollref?.current])
153
153
 
154
+ const customerName = `${order?.customer?.name ?? ''} ${order?.customer?.middle_name ?? ''} ${order?.customer?.lastname ?? ''} ${order?.customer?.second_lastname ?? ''}`?.replace(' ', ' ')?.trim() ?? ''
155
+
154
156
  return (
155
157
  <KeyboardAvoidingView
156
158
  enabled
@@ -206,20 +208,20 @@ const ReviewCustomerUI = (props: ReviewCustomerParams) => {
206
208
  style={{ borderRadius: 7.6 }}
207
209
  />
208
210
  </View>
209
- <OText
211
+ {!!customerName && <OText
210
212
  size={14}
211
213
  weight="500"
212
214
  style={{
213
215
  marginTop: 16
214
216
  }}
215
217
  >
216
- {order?.customer?.name ?? ''} {order?.customer?.middle_name ?? ''} {order?.customer?.lastname ?? ''} {order?.customer?.second_lastname ?? ''}
217
- </OText>
218
+ {customerName}
219
+ </OText>}
218
220
  </CustomerInfoContainer>
219
221
  <OText
220
222
  size={12}
221
223
  >
222
- {t('HOW_WAS_YOUR_CUSTOMER', 'How was your experience with _name_?').replace('_name_', `${order?.customer?.name ?? ''} ${order?.customer?.middle_name ?? ''} ${order?.customer?.lastname ?? ''} ${order?.customer?.second_lastname ?? ''}`)}
224
+ {customerName ? t('HOW_WAS_YOUR_CUSTOMER', 'How was your experience with _name_?').replace('_name_', customerName) : t('HOW_WAS_YOUR_NO_CUSTOMER', 'How was your experience?')}
223
225
  </OText>
224
226
  <RatingBarContainer>
225
227
  <LinearGradient
@@ -28,7 +28,7 @@ const AddressDetailsUI = (props: any) => {
28
28
  size={16}
29
29
  lineHeight={24}
30
30
  color={theme.colors.textNormal}
31
- weight={'500'}>
31
+ >
32
32
  {t('DELIVERY_ADDRESS', 'Delivery address')}
33
33
  </OText>
34
34
  </ADHeader>
@@ -389,10 +389,10 @@ const CartUI = (props: any) => {
389
389
 
390
390
  <OSTotal>
391
391
  <OSTable style={{ marginTop: 15 }}>
392
- <OText size={14} lineHeight={21} weight={'600'}>
392
+ <OText size={14} lineHeight={21} weight={'bold'} color={theme.colors.textNormal}>
393
393
  {t('TOTAL', 'Total')}
394
394
  </OText>
395
- <OText size={14} lineHeight={21} weight={'600'}>
395
+ <OText size={14} lineHeight={21} weight={'bold'} color={theme.colors.textNormal}>
396
396
  {parsePrice(cart?.balance >= 0 ? cart?.balance : 0)}
397
397
  </OText>
398
398
  </OSTable>
@@ -341,7 +341,7 @@ const CheckoutUI = (props: any) => {
341
341
  Object.values(businessDetails?.business).length > 0 &&
342
342
  (
343
343
  <>
344
- <OText size={16} lineHeight={24} weight={'500'} mBottom={10}>
344
+ <OText size={16} lineHeight={24} weight={'500'} mBottom={10} color={theme.colors.textNormal}>
345
345
  {t('BUSINESS_DETAILS', 'Business Details')}
346
346
  </OText>
347
347
  <View>
@@ -362,7 +362,7 @@ const CheckoutUI = (props: any) => {
362
362
  )}
363
363
  {businessDetails?.error && businessDetails?.error?.length > 0 && (
364
364
  <View>
365
- <OText size={16} lineHeight={24} weight={'500'}>
365
+ <OText size={16} lineHeight={24} weight={'500'} color={theme.colors.textNormal}>
366
366
  {t('BUSINESS_DETAILS', 'Business Details')}
367
367
  </OText>
368
368
  <NotFoundSource
@@ -411,7 +411,7 @@ const CheckoutUI = (props: any) => {
411
411
  </View>
412
412
  ) : (
413
413
  <>
414
- <OText size={16}>{t('DELIVERY_OPTIONS', 'Delivery options')}</OText>
414
+ <OText size={16} color={theme.colors.textNormal} mBottom={10}>{t('DELIVERY_OPTIONS', 'Delivery options')}</OText>
415
415
  <View
416
416
  style={{
417
417
  backgroundColor: theme.colors.inputDisabled,
@@ -626,7 +626,6 @@ const CheckoutUI = (props: any) => {
626
626
  size={16}
627
627
  lineHeight={24}
628
628
  color={theme.colors.textNormal}
629
- style={{ fontWeight: '500' }}
630
629
  >
631
630
  {t('MOBILE_FRONT_YOUR_ORDER', 'Your order')}
632
631
  </OText>
@@ -1,4 +1,5 @@
1
1
  import React from 'react'
2
+ import { Platform } from 'react-native'
2
3
  import { useLanguage } from 'ordering-components/native'
3
4
  import { HelpAccountAndPaymentParams } from '../../types'
4
5
  import { OText, OButton, OIcon } from '../shared'
@@ -7,7 +8,8 @@ import { StyleSheet, TouchableOpacity } from 'react-native'
7
8
  import AntDesignIcon from 'react-native-vector-icons/AntDesign'
8
9
 
9
10
  import {
10
- Content
11
+ Content,
12
+ HeaderWrapper
11
13
  } from './styles'
12
14
 
13
15
  export const HelpAccountAndPayment = (props: HelpAccountAndPaymentParams) => {
@@ -38,17 +40,25 @@ export const HelpAccountAndPayment = (props: HelpAccountAndPaymentParams) => {
38
40
 
39
41
  return (
40
42
  <>
41
- <OButton
42
- imgRightSrc={null}
43
- style={styles.btnBackArrow}
44
- onClick={() => goToBack()}
45
- icon={AntDesignIcon}
46
- iconProps={{
47
- name: 'arrowleft',
48
- size: 26
49
- }}
50
- />
51
- <OText size={22} weight={600}>{t('ACCOUNT_PAYMENT_OPTIONS', 'Account and Payment Options')}</OText>
43
+ <HeaderWrapper>
44
+ <OButton
45
+ imgRightSrc={null}
46
+ style={styles.btnBackArrow}
47
+ onClick={() => goToBack()}
48
+ icon={AntDesignIcon}
49
+ iconProps={{
50
+ name: 'arrowleft',
51
+ size: 26
52
+ }}
53
+ />
54
+ <OText
55
+ size={24}
56
+ weight={Platform.OS === 'ios' ? '600' : 'bold'}
57
+ color={theme.colors.textNormal}
58
+ >
59
+ {t('ACCOUNT_PAYMENT_OPTIONS', 'Account and Payment Options')}
60
+ </OText>
61
+ </HeaderWrapper>
52
62
  <Content>
53
63
  <OText mBottom={20}>
54
64
  -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vel in congue nisl, nisi. Mauris, condimentum auctor sed cras cursus arcu pellentesque.
@@ -4,3 +4,7 @@ export const Content = styled.View`
4
4
  padding-vertical: 20px;
5
5
  margin-bottom: 20px;
6
6
  `
7
+ export const HeaderWrapper = styled.View`
8
+ padding: 10px 20px 20px 0;
9
+ flex-direction: row;
10
+ `
@@ -4,6 +4,7 @@ import { HelpGuideParams } from '../../types'
4
4
  import { OText, OButton, OIcon } from '../shared'
5
5
  import { useTheme } from 'styled-components/native'
6
6
  import { StyleSheet, TouchableOpacity } from 'react-native'
7
+ import NavBar from '../NavBar'
7
8
  import {
8
9
  Content
9
10
  } from './styles'
@@ -37,17 +38,12 @@ export const HelpGuide = (props: HelpGuideParams) => {
37
38
 
38
39
  return (
39
40
  <>
40
- <OButton
41
- imgRightSrc={null}
42
- style={styles.btnBackArrow}
43
- onClick={() => goToBack()}
44
- icon={AntDesignIcon}
45
- iconProps={{
46
- name: 'arrowleft',
47
- size: 26
48
- }}
41
+ <NavBar
42
+ title={t('GUIDE_TO_ORDERING', 'Guide to Ordering')}
43
+ onActionLeft={goToBack}
44
+ btnStyle={{ paddingLeft: 0 }}
45
+ showCall={false}
49
46
  />
50
- <OText size={22} weight={600}>{t('GUIDE_TO_ORDERING', 'Guide to Ordering')}</OText>
51
47
  <Content>
52
48
  <OText mBottom={15}>
53
49
  Lorem ipsum dolor sit amet, consectetur adipiscing elit. Blandit mauris varius faucibus varius condimentum morbi pretium mus. Aliquam bibendum erat venenatis feugiat sed.
@@ -6,6 +6,7 @@ import { useTheme } from 'styled-components/native'
6
6
  import { StyleSheet, TouchableOpacity } from 'react-native'
7
7
  import { WebView } from 'react-native-webview'
8
8
  import AntDesignIcon from 'react-native-vector-icons/AntDesign'
9
+ import NavBar from '../NavBar'
9
10
 
10
11
  import {
11
12
  Content
@@ -42,17 +43,12 @@ export const HelpOrder = (props: HelpOrderParams) => {
42
43
 
43
44
  return (
44
45
  <>
45
- <OButton
46
- imgRightSrc={null}
47
- style={styles.btnBackArrow}
48
- onClick={() => goToBack()}
49
- icon={AntDesignIcon}
50
- iconProps={{
51
- name: 'arrowleft',
52
- size: 26
53
- }}
46
+ <NavBar
47
+ title={t('HELP_WITH_ORDER', 'Help with an order')}
48
+ onActionLeft={goToBack}
49
+ btnStyle={{ paddingLeft: 0 }}
50
+ showCall={false}
54
51
  />
55
- <OText size={22} weight={600}>{t('HELP_WITH_ORDER', 'Help with an order')}</OText>
56
52
  <Content>
57
53
  <OText mBottom={20}>
58
54
  Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vel in congue nisl, nisi. Mauris, condimentum auctor sed cras cursus arcu pellentesque. Sed tempus et, cursus ultricies nisl nisl, in eros.
@@ -680,7 +680,7 @@ const LoginFormUI = (props: LoginParams) => {
680
680
  {t('NEW_ON_PLATFORM', 'New on Ordering?')}
681
681
  </OText>
682
682
  <TouchableOpacity onPress={() => onNavigationRedirect('Signup')}>
683
- <OText size={14} mLeft={5} color={theme.colors.skyBlue}>
683
+ <OText size={14} mLeft={5} color={theme.colors.primary}>
684
684
  {t('CREATE_ACCOUNT', 'Create account')}
685
685
  </OText>
686
686
  </TouchableOpacity>
@@ -258,7 +258,7 @@ const MomentOptionUI = (props: MomentOptionParams) => {
258
258
  onActionLeft={() => goToBack()}
259
259
  btnStyle={{ paddingLeft: 0 }}
260
260
  paddingTop={0}
261
- style={{ paddingBottom: 0, flexDirection: 'column', alignItems: 'flex-start' }}
261
+ style={{ paddingBottom: 0 }}
262
262
  title={t('QUESTION_WHEN_ORDER', 'When do you want your order?')}
263
263
  titleAlign={'center'}
264
264
  titleStyle={{ fontSize: 14, marginRight: 0, marginLeft: 0 }}
@@ -292,10 +292,10 @@ const OrderSummaryUI = (props: any) => {
292
292
  {cart?.total >= 1 && (
293
293
  <View style={{ marginTop: 15, borderTopWidth: 1, borderTopColor: '#d9d9d9' }}>
294
294
  <OSTable style={{ marginTop: 15 }}>
295
- <OText size={14} style={{ fontWeight: 'bold' }}>
295
+ <OText size={14} style={{ fontWeight: 'bold' }} color={theme.colors.textNormal}>
296
296
  {t('TOTAL', 'Total')}
297
297
  </OText>
298
- <OText size={14} style={{ fontWeight: 'bold' }} >
298
+ <OText size={14} style={{ fontWeight: 'bold' }} color={theme.colors.textNormal}>
299
299
  {parsePrice(cart?.balance >= 0 ? cart?.balance : 0)}
300
300
  </OText>
301
301
  </OSTable>