ordering-ui-react-native 0.17.81-release → 0.17.82-release

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.81-release",
3
+ "version": "0.17.82-release",
4
4
  "description": "Reusable components made in react native",
5
5
  "main": "src/index.tsx",
6
6
  "author": "ordering.inc",
@@ -1,6 +1,7 @@
1
1
  import React, { useState, useEffect, useCallback } from 'react';
2
2
  import { View, StyleSheet, TouchableOpacity, Platform, I18nManager, ScrollView } from 'react-native';
3
3
  import { initStripe, useConfirmPayment } from '@stripe/stripe-react-native';
4
+ import NativeStripeSdk from '@stripe/stripe-react-native/src/NativeStripeSdk'
4
5
  import Picker from 'react-native-country-picker-modal';
5
6
  import MaterialIcons from 'react-native-vector-icons/MaterialIcons'
6
7
  import ReactNativeHapticFeedback from "react-native-haptic-feedback";
@@ -48,7 +49,6 @@ import {
48
49
  CartHeader
49
50
  } from './styles';
50
51
  import { Fade, Placeholder, PlaceholderLine } from 'rn-placeholder';
51
-
52
52
  import { FloatingButton } from '../FloatingButton';
53
53
  import { Container } from '../../layouts/Container';
54
54
  import NavBar from '../NavBar';
@@ -165,7 +165,7 @@ const CheckoutUI = (props: any) => {
165
165
  const [paymethodClicked, setPaymethodClicked] = useState<any>(null)
166
166
  const [cardList, setCardList] = useState<any>({ cards: [], loading: false, error: null })
167
167
  const cardsMethods = ['credomatic']
168
- const stripePaymethods: any = ['stripe', 'stripe_direct', 'stripe_connect', 'stripe_redirect']
168
+ const stripePaymethods: any = ['stripe', 'stripe_direct', 'stripe_connect', 'stripe_redirect']
169
169
  const placeSpotTypes = [3, 4, 5]
170
170
  const placeSpotsEnabled = placeSpotTypes.includes(options?.type)
171
171
  const isGiftCardCart = !cart?.business_id
@@ -246,7 +246,7 @@ const CheckoutUI = (props: any) => {
246
246
  token: user?.session?.access_token
247
247
  })
248
248
  openModal?.isGuest && handlePlaceOrderAsGuest()
249
- setOpenModal({ ...openModal, signup: false, isGuest: false })
249
+ setOpenModal({ ...openModal, signup: false, isGuest: false })
250
250
  }
251
251
 
252
252
  const handleSuccessLogin = (user: any) => {
@@ -261,7 +261,7 @@ const CheckoutUI = (props: any) => {
261
261
 
262
262
  if (!userErrors.length && (!requiredFields?.length || allowedGuest) || forcePlace) {
263
263
  vibrateApp()
264
- handlerClickPlaceOrder && handlerClickPlaceOrder(null, { isNative: true }, confirmPayment)
264
+ handlerClickPlaceOrder && handlerClickPlaceOrder(null, { isNative: true }, confirmPayment, NativeStripeSdk?.dismissPlatformPay)
265
265
  return
266
266
  }
267
267
  if (requiredFields?.length) {
@@ -20,7 +20,8 @@ export const GoogleMap = (props: GoogleMapsParams) => {
20
20
  handleToggleMap,
21
21
  locations,
22
22
  isIntGeoCoder,
23
- businessZones
23
+ businessZones,
24
+ delta
24
25
  } = props
25
26
 
26
27
  const [, t] = useLanguage()
@@ -31,8 +32,8 @@ export const GoogleMap = (props: GoogleMapsParams) => {
31
32
  const [region, setRegion] = useState({
32
33
  latitude: location.lat,
33
34
  longitude: location.lng,
34
- latitudeDelta: 0.0010,
35
- longitudeDelta: 0.0010 * ASPECT_RATIO
35
+ latitudeDelta: delta ?? 0.0010,
36
+ longitudeDelta: (delta ?? 0.0010) * ASPECT_RATIO
36
37
  })
37
38
  const [MARKERS, SETMARKERS] = useState(locations)
38
39
  let mapRef = useRef<any>(null)
@@ -265,7 +266,7 @@ export const GoogleMap = (props: GoogleMapsParams) => {
265
266
  )}
266
267
  {(businessZone.type === 5 && businessZone?.data?.distance) && (
267
268
  <Circle
268
- center={{ latitude: businessZone?.data?.center.lat, longitude: businessZone?.data?.center.lng}}
269
+ center={{ latitude: center.lat, longitude: center.lng}}
269
270
  radius={businessZone?.data.distance * units[businessZone?.data?.unit]}
270
271
  fillColor={fillStyles.fillColor}
271
272
  strokeColor={fillStyles.strokeColor}
@@ -629,6 +629,7 @@ export interface GoogleMapsParams {
629
629
  handleToggleMap?: () => void,
630
630
  isIntGeoCoder: boolean,
631
631
  businessZones?: any
632
+ delta?: number
632
633
  }
633
634
 
634
635
  export interface HelpParams {