ordering-ui-react-native 0.18.59 → 0.18.61

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.18.59",
3
+ "version": "0.18.61",
4
4
  "description": "Reusable components made in react native",
5
5
  "main": "src/index.tsx",
6
6
  "author": "ordering.inc",
@@ -49,6 +49,8 @@
49
49
  "@react-navigation/material-bottom-tabs": "^5.3.14",
50
50
  "@react-navigation/native": "^5.7.6",
51
51
  "@react-navigation/stack": "^5.9.3",
52
+ "@segment/analytics-react-native": "2.1.11",
53
+ "@segment/sovran-react-native": "0.2.6",
52
54
  "@sentry/react-native": "^2.6.0",
53
55
  "@stripe/stripe-react-native": "^0.2.0",
54
56
  "@types/react-native-loading-spinner-overlay": "^0.5.2",
@@ -81,6 +83,7 @@
81
83
  "react-native-fbsdk-next": "^7.0.1",
82
84
  "react-native-geocoding": "^0.5.0",
83
85
  "react-native-gesture-handler": "^1.8.0",
86
+ "react-native-get-random-values": "1.8.0",
84
87
  "react-native-gifted-chat": "^0.16.3",
85
88
  "react-native-google-places-autocomplete": "^2.1.3",
86
89
  "react-native-html-to-pdf": "^0.10.0",
@@ -1,6 +1,6 @@
1
1
  import { AddressForm } from './src/components/AddressForm';
2
2
  import { AddressDetails } from './src/components/AddressDetails';
3
- // import { AnalyticsSegment } from './src/components/AnalyticsSegment';
3
+ import { AnalyticsSegment } from './src/components/AnalyticsSegment';
4
4
  import { Home } from './src/components/Home';
5
5
  import { LoginForm } from './src/components/LoginForm';
6
6
  import { SignupForm } from './src/components/SignupForm';
@@ -167,7 +167,7 @@ import {
167
167
  export {
168
168
  AddressForm,
169
169
  AddressDetails,
170
- // AnalyticsSegment,
170
+ AnalyticsSegment,
171
171
  Home as HomeView,
172
172
  SignupForm,
173
173
  LoginForm,
@@ -1,7 +1,7 @@
1
1
  import React, { useEffect, useState } from 'react';
2
2
  import {
3
3
  createClient,
4
- // AnalyticsProvider
4
+ AnalyticsProvider
5
5
  } from '@segment/analytics-react-native';
6
6
  import { useEvent, useConfig, useLanguage } from 'ordering-components/native';
7
7
 
@@ -302,9 +302,9 @@ export const AnalyticsSegment = (props: any) => {
302
302
 
303
303
  return (
304
304
  <>
305
- {/* <AnalyticsProvider client={segmentClient}>
305
+ <AnalyticsProvider client={segmentClient}>
306
306
  {children}
307
- </AnalyticsProvider> */}
307
+ </AnalyticsProvider>
308
308
  </>
309
309
  )
310
310
  }
@@ -345,7 +345,7 @@ const CartUI = (props: any) => {
345
345
  <TouchableOpacity style={{ marginLeft: 3 }} onPress={() => setOpenTaxModal({ open: true, data: offer, type: 'offer_target_3' })}>
346
346
  <AntIcon name='infocirlceo' size={16} color={theme.colors.primary} />
347
347
  </TouchableOpacity>
348
- {!offer?.type && !!offer?.id && (
348
+ {!!offer?.id && (
349
349
  <OfferAlert offerId={offer?.id} />
350
350
  )}
351
351
  </OSRow>
@@ -23,6 +23,7 @@ const DriverTipsUI = (props: any) => {
23
23
  driverTip,
24
24
  driverTipsOptions,
25
25
  isMulti,
26
+ isLoading,
26
27
  cart,
27
28
  carts,
28
29
  isDriverTipUseCustom,
@@ -79,8 +80,10 @@ const DriverTipsUI = (props: any) => {
79
80
  <TouchableOpacity
80
81
  key={i}
81
82
  onPress={() => {
82
- handlerChangeOption(option)
83
- setCustomTip(false)
83
+ if (!isLoading) {
84
+ handlerChangeOption(option)
85
+ setCustomTip(false)
86
+ }
84
87
  }}
85
88
  >
86
89
  <DTCard
@@ -95,7 +98,7 @@ const DriverTipsUI = (props: any) => {
95
98
  ))}
96
99
  {isDriverTipUseCustom && (
97
100
  <TouchableOpacity
98
- onPress={() => setCustomTip(true)}
101
+ onPress={() => { !isLoading && setCustomTip(true) }}
99
102
  >
100
103
  <DTCard
101
104
  style={style.semicircle}
@@ -325,6 +325,7 @@ const MultiCheckoutUI = (props: any) => {
325
325
  </OText>
326
326
  <DriverTips
327
327
  isMulti
328
+ isLoading={loading}
328
329
  carts={openCarts}
329
330
  businessIds={openCarts.map((cart: any) => cart.business_id)}
330
331
  driverTipsOptions={driverTipsOptions}
@@ -1011,11 +1011,11 @@ export const OrderDetailsUI = (props: OrderDetailsParams) => {
1011
1011
  ? walletName[event?.wallet_event?.wallet?.type]?.name
1012
1012
  : t(event?.paymethod?.name.toUpperCase()?.replace(/ /g, '_'), event?.paymethod?.name)}
1013
1013
  </OText>
1014
- {event?.data?.charge_id && (
1014
+ {/* {event?.data?.charge_id && (
1015
1015
  <OText>
1016
1016
  {`${t('CODE', 'Code')}: ${event?.data?.charge_id}`}
1017
1017
  </OText>
1018
- )}
1018
+ )} */}
1019
1019
  </View>
1020
1020
  <OText>
1021
1021
  -{parsePrice(event.amount, { isTruncable: true })}