ordering-ui-react-native 0.16.89 → 0.16.90

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.16.89",
3
+ "version": "0.16.90",
4
4
  "description": "Reusable components made in react native",
5
5
  "main": "src/index.tsx",
6
6
  "author": "ordering.inc",
@@ -21,6 +21,8 @@ import { BusinessProductsCategories } from '../BusinessProductsCategories'
21
21
  import { BusinessProductsList } from '../BusinessProductsList'
22
22
  import { BusinessProductsListingParams } from '../../types'
23
23
  import { _retrieveStoreData, _removeStoreData } from '../../providers/StoreUtil';
24
+ import IconAntDesign from 'react-native-vector-icons/AntDesign';
25
+
24
26
  import {
25
27
  TopHeader,
26
28
  WrapSearchBar,
@@ -29,7 +31,8 @@ import {
29
31
  ContainerSafeAreaView,
30
32
  BackgroundGray,
31
33
  ProfessionalFilterWrapper,
32
- NearBusiness
34
+ NearBusiness,
35
+ TopActions
33
36
  } from './styles'
34
37
  import { FloatingButton } from '../FloatingButton'
35
38
  import { UpsellingRedirect } from './UpsellingRedirect'
@@ -248,16 +251,9 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
248
251
  <TopHeader isIos={Platform.OS === 'ios'}>
249
252
  {!isOpenSearchBar && (
250
253
  <>
251
- <View style={{ ...styles.headerItem, width: 175 }}>
252
- <OButton
253
- imgLeftSrc={theme.images.general.arrow_left}
254
- imgRightSrc={null}
255
- style={styles.btnBackArrow}
256
- onClick={() => handleBackNavigation()}
257
- imgLeftStyle={{ tintColor: theme.colors.textNormal, width: 30 }}
258
- />
259
-
260
- </View>
254
+ <TopActions onPress={() => handleBackNavigation()}>
255
+ <IconAntDesign name='arrowleft' size={26} />
256
+ </TopActions>
261
257
  {!errorQuantityProducts && (
262
258
  <View style={{ ...styles.headerItem }}>
263
259
  <TouchableOpacity
@@ -66,3 +66,10 @@ export const NearBusiness = styled.View`
66
66
  padding-left: 20px;
67
67
  max-height: 80px;
68
68
  `
69
+
70
+ export const TopActions = styled.TouchableOpacity`
71
+ height: 60px;
72
+ justify-content: center;
73
+ padding-horizontal: 30px;
74
+ width: 100px;
75
+ `;
@@ -22,6 +22,7 @@ import {
22
22
  } from 'ordering-components/native';
23
23
  import { useTheme } from 'styled-components/native';
24
24
  import Ionicons from 'react-native-vector-icons/Ionicons'
25
+ import IconAntDesign from 'react-native-vector-icons/AntDesign';
25
26
 
26
27
  import {
27
28
  Search,
@@ -283,7 +284,7 @@ const BusinessesListingUI = (props: BusinessesListingParams) => {
283
284
  style={{ paddingTop: top + 20 }}>
284
285
  {!auth && (
285
286
  <TouchableOpacity onPress={() => navigation?.canGoBack() && navigation.goBack()} style={{ position: 'absolute', marginStart: 40, paddingVertical: 20 }}>
286
- <OIcon src={theme.images.general.arrow_left} width={20} style={{ tintColor: theme.colors.white }} />
287
+ <IconAntDesign name='arrowleft' size={26} />
287
288
  </TouchableOpacity>
288
289
  )}
289
290
  <Search>
@@ -53,6 +53,7 @@ import { getTypesText, convertToRadian } from '../../../../utils';
53
53
  import { OrderProgress } from '../../../OrderProgress';
54
54
  import { useFocusEffect, useIsFocused } from '@react-navigation/native';
55
55
  import FastImage from 'react-native-fast-image';
56
+ import IconAntDesign from 'react-native-vector-icons/AntDesign';
56
57
 
57
58
  const PIXELS_TO_SCROLL = 2000;
58
59
 
@@ -450,8 +451,9 @@ const BusinessesListingUI = (props: BusinessesListingParams) => {
450
451
  resizeMode='cover'
451
452
  >
452
453
  {!auth && (
454
+
453
455
  <TouchableOpacity onPress={() => navigation?.canGoBack() && navigation.goBack()} style={{ position: 'absolute', marginStart: 40, paddingVertical: 20 }}>
454
- <OIcon src={theme.images.general.arrow_left} width={20} style={{ tintColor: theme.colors.white }} />
456
+ <IconAntDesign name='arrowleft' size={26} />
455
457
  </TouchableOpacity>
456
458
  )}
457
459
  </HeaderWrapper>
@@ -635,7 +635,6 @@ const SignupFormUI = (props: SignupParams) => {
635
635
  }
636
636
  })}
637
637
  forwardRef={phoneRef}
638
- defaultCode={formState?.country_code ?? formState?.country_phone_code ?? null}
639
638
  changeCountry={(val: any) => setPhoneInputData({
640
639
  ...phoneInputData,
641
640
  phone: {
@@ -9,6 +9,7 @@ import {
9
9
  useUtils,
10
10
  useConfig
11
11
  } from 'ordering-components/native'
12
+ import AntDesignIcon from 'react-native-vector-icons/AntDesign'
12
13
 
13
14
  import {
14
15
  Container,
@@ -64,7 +65,7 @@ const WalletsUI = (props: any) => {
64
65
 
65
66
  const [tabSelected, setTabSelected] = useState(isWalletCashEnabled ? 'cash' : 'credit_point')
66
67
  const [openHistory, setOpenHistory] = useState(false)
67
- const isChewLayout = theme?.wallets_view?.components?.layout?.type === 'original'
68
+ const isChewLayout = theme?.wallets_view?.components?.layout?.type === 'original'
68
69
 
69
70
  const isWalletEnabled = configs?.cash_wallet?.value && configs?.wallet_enabled?.value === '1' && (isWalletCashEnabled || isWalletPointsEnabled)
70
71
 
@@ -103,7 +104,7 @@ const WalletsUI = (props: any) => {
103
104
  }, [configs])
104
105
 
105
106
  useEffect(() => {
106
- if(refreshWallets){
107
+ if (refreshWallets) {
107
108
  getWallets()
108
109
  setRefreshWallets && setRefreshWallets(false)
109
110
  }
@@ -139,83 +140,83 @@ const WalletsUI = (props: any) => {
139
140
  !userLoyaltyLevel.loading &&
140
141
  !walletList.error &&
141
142
  walletList.wallets?.length > 0 &&
142
- (
143
- <>
144
- <OTabs
145
- horizontal
146
- showsHorizontalScrollIndicator={false}
147
- >
148
- {walletList.wallets?.map((wallet: any) => walletName[wallet.type]?.isActive && (
149
- <Pressable
150
- key={wallet.id}
151
- onPress={() => handleChangeTab(wallet)}
152
- >
153
- <OTab isSelected={tabSelected === wallet.type}>
154
- <OText size={18}>
155
- {walletName[wallet.type]?.name}
156
- </OText>
157
- </OTab>
158
- </Pressable>
159
- ))}
160
- </OTabs>
143
+ (
144
+ <>
145
+ <OTabs
146
+ horizontal
147
+ showsHorizontalScrollIndicator={false}
148
+ >
149
+ {walletList.wallets?.map((wallet: any) => walletName[wallet.type]?.isActive && (
150
+ <Pressable
151
+ key={wallet.id}
152
+ onPress={() => handleChangeTab(wallet)}
153
+ >
154
+ <OTab isSelected={tabSelected === wallet.type}>
155
+ <OText size={18}>
156
+ {walletName[wallet.type]?.name}
157
+ </OText>
158
+ </OTab>
159
+ </Pressable>
160
+ ))}
161
+ </OTabs>
161
162
 
162
- <SectionContent>
163
- {!!loyaltyLevel && tabSelected === 'credit_point' && (
164
- <LoyaltyContent>
165
- <LoyaltyWrapp>
166
- <OText size={20}>
167
- {`${t('LOYALTY_LEVEL_TITLE', 'Your level is')}:`}
168
- </OText>
169
- {loyaltyLevel.image ? (
170
- <FastImage
171
- style={styles.logoStyle}
172
- source={{
173
- uri: loyaltyLevel.image,
174
- priority: FastImage.priority.high,
175
- cache:FastImage.cacheControl.web
176
- }}
177
- resizeMode={FastImage.resizeMode.contain}
178
- />
179
- ) : (
180
- <LoyaltyImg
181
- source={theme.images.dummies.loyaltyLevel}
182
- resizeMode='contain'
183
- />
184
- )}
185
- <OText
186
- size={22}
187
- weight='bold'
188
- style={{ textTransform: 'uppercase' }}
189
- color={theme.colors.primary}
190
- >
191
- {loyaltyLevel.name}
192
- </OText>
193
- </LoyaltyWrapp>
194
- </LoyaltyContent>
195
- )}
196
- <BalanceElement>
197
- <OText size={20} style={{fontWeight: '600'}}>
198
- {currentWalletSelected?.type === 'cash'
199
- ? parsePrice(currentWalletSelected?.balance)
200
- : currentWalletSelected?.balance
201
- }
202
- </OText>
203
- <OText style={{ paddingLeft: 5 }}>
204
- {currentWalletSelected?.type === 'cash'
205
- ? configs?.stripe_currency?.value
206
- : t('POINTS', 'Points')}
207
- </OText>
208
- </BalanceElement>
163
+ <SectionContent>
164
+ {!!loyaltyLevel && tabSelected === 'credit_point' && (
165
+ <LoyaltyContent>
166
+ <LoyaltyWrapp>
167
+ <OText size={20}>
168
+ {`${t('LOYALTY_LEVEL_TITLE', 'Your level is')}:`}
169
+ </OText>
170
+ {loyaltyLevel.image ? (
171
+ <FastImage
172
+ style={styles.logoStyle}
173
+ source={{
174
+ uri: loyaltyLevel.image,
175
+ priority: FastImage.priority.high,
176
+ cache: FastImage.cacheControl.web
177
+ }}
178
+ resizeMode={FastImage.resizeMode.contain}
179
+ />
180
+ ) : (
181
+ <LoyaltyImg
182
+ source={theme.images.dummies.loyaltyLevel}
183
+ resizeMode='contain'
184
+ />
185
+ )}
186
+ <OText
187
+ size={22}
188
+ weight='bold'
189
+ style={{ textTransform: 'uppercase' }}
190
+ color={theme.colors.primary}
191
+ >
192
+ {loyaltyLevel.name}
193
+ </OText>
194
+ </LoyaltyWrapp>
195
+ </LoyaltyContent>
196
+ )}
197
+ <BalanceElement>
198
+ <OText size={20} style={{ fontWeight: '600' }}>
199
+ {currentWalletSelected?.type === 'cash'
200
+ ? parsePrice(currentWalletSelected?.balance)
201
+ : currentWalletSelected?.balance
202
+ }
203
+ </OText>
204
+ <OText style={{ paddingLeft: 5 }}>
205
+ {currentWalletSelected?.type === 'cash'
206
+ ? configs?.stripe_currency?.value
207
+ : t('POINTS', 'Points')}
208
+ </OText>
209
+ </BalanceElement>
209
210
 
210
- {!isChewLayout && (
211
- <WalletTransactions
212
- transactionsList={transactionsList}
213
- currentWalletSelected={currentWalletSelected}
214
- />
215
- )}
216
- </SectionContent>
217
- </>
218
- )}
211
+ {!isChewLayout && (
212
+ <WalletTransactions
213
+ transactionsList={transactionsList}
214
+ currentWalletSelected={currentWalletSelected}
215
+ />
216
+ )}
217
+ </SectionContent>
218
+ </>
219
+ )}
219
220
 
220
221
  {(walletList?.loading || userLoyaltyLevel.loading) && (
221
222
  <>
@@ -260,8 +261,6 @@ const WalletsUI = (props: any) => {
260
261
  <ScrollView>
261
262
  <WalletTransactionsWrapper>
262
263
  <OButton
263
- imgLeftSrc={theme.images.general.arrow_left}
264
- imgLeftStyle={{ width: 18 }}
265
264
  imgRightSrc={null}
266
265
  style={{
267
266
  borderWidth: 0,
@@ -273,6 +272,11 @@ const WalletsUI = (props: any) => {
273
272
  paddingRight: 0
274
273
  }}
275
274
  onClick={() => setOpenHistory(false)}
275
+ icon={AntDesignIcon}
276
+ iconProps={{
277
+ name: 'arrowleft',
278
+ size: 26
279
+ }}
276
280
  />
277
281
  <WalletTransactions
278
282
  transactionsList={transactionsList}