ordering-ui-react-native 0.12.35 → 0.12.39
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 +1 -1
- package/src/components/AddressForm/index.tsx +5 -5
- package/src/components/FacebookLogin/index.tsx +2 -2
- package/src/components/LoginForm/index.tsx +1 -1
- package/src/components/PaymentOptions/index.tsx +5 -5
- package/src/components/SignupForm/index.tsx +2 -2
- package/themes/business/src/components/AcceptOrRejectOrder/index.tsx +9 -8
- package/themes/business/src/components/LoginForm/index.tsx +1 -1
- package/themes/business/src/components/OrderDetails/Business.tsx +2 -4
- package/themes/business/src/components/OrderDetails/Delivery.tsx +111 -108
- package/themes/business/src/components/SearchBar/index.tsx +1 -1
- package/themes/business/src/components/SignupForm/index.tsx +2 -2
- package/themes/business/src/types/index.tsx +3 -3
- package/themes/doordash/src/components/AddressForm/index.tsx +5 -5
- package/themes/doordash/src/components/FacebookLogin/index.tsx +2 -2
- package/themes/doordash/src/components/LoginForm/index.tsx +1 -1
- package/themes/doordash/src/components/PaymentOptions/index.tsx +5 -5
- package/themes/doordash/src/components/SignupForm/index.tsx +2 -2
- package/themes/franchises/src/components/AddressForm/index.tsx +5 -5
- package/themes/franchises/src/components/FacebookLogin/index.tsx +2 -2
- package/themes/franchises/src/components/LoginForm/index.tsx +1 -1
- package/themes/franchises/src/components/PaymentOptions/index.tsx +3 -3
- package/themes/franchises/src/components/SignupForm/index.tsx +2 -2
- package/themes/instacart/src/components/AddressForm/index.tsx +5 -5
- package/themes/instacart/src/components/FacebookLogin/index.tsx +2 -2
- package/themes/instacart/src/components/LoginForm/index.tsx +1 -1
- package/themes/instacart/src/components/PaymentOptions/index.tsx +4 -4
- package/themes/instacart/src/components/SignupForm/index.tsx +2 -2
- package/themes/original/src/components/AddressForm/index.tsx +5 -5
- package/themes/original/src/components/FacebookLogin/index.tsx +2 -2
- package/themes/original/src/components/LoginForm/index.tsx +1 -1
- package/themes/original/src/components/PaymentOptions/index.tsx +5 -5
- package/themes/original/src/components/SignupForm/index.tsx +2 -2
- package/themes/single-business/src/components/AddressForm/index.tsx +5 -5
- package/themes/single-business/src/components/AppleLogin/index.tsx +2 -2
- package/themes/single-business/src/components/FacebookLogin/index.tsx +2 -2
- package/themes/single-business/src/components/GoogleLogin/index.tsx +2 -2
- package/themes/single-business/src/components/LanguageSelector/index.tsx +87 -70
- package/themes/single-business/src/components/LoginForm/index.tsx +1 -1
- package/themes/single-business/src/components/OrderDetails/index.tsx +14 -14
- package/themes/single-business/src/components/PaymentOptions/index.tsx +4 -4
- package/themes/single-business/src/components/ProductForm/index.tsx +682 -656
- package/themes/single-business/src/components/ProductForm/styles.tsx +1 -1
- package/themes/single-business/src/components/SignupForm/index.tsx +2 -2
- package/themes/single-business/src/components/UserProfile/index.tsx +2 -2
- package/themes/single-business/src/components/shared/OInput.tsx +1 -0
- package/themes/single-business/src/components/shared/OLink.tsx +80 -0
- package/themes/single-business/src/components/shared/index.tsx +2 -0
- package/themes/single-business/src/types/index.tsx +1 -0
- package/themes/uber-eats/src/components/AddressForm/index.tsx +5 -5
- package/themes/uber-eats/src/components/FacebookLogin/index.tsx +2 -2
- package/themes/uber-eats/src/components/LoginForm/index.tsx +1 -1
- package/themes/uber-eats/src/components/PaymentOptions/index.tsx +5 -5
- package/themes/uber-eats/src/components/SignupForm/index.tsx +2 -2
|
@@ -172,7 +172,7 @@ const PaymentOptionsUI = (props: any) => {
|
|
|
172
172
|
// data={paymethodsList.paymethods.sort((a: any, b: any) => a.id - b.id)}
|
|
173
173
|
data={paymethodsList.paymethods.sort((a: any, b: any) => a.id - b.id).filter((p: any) => !excludeIds.includes(p.id))}
|
|
174
174
|
renderItem={renderPaymethods}
|
|
175
|
-
keyExtractor={(paymethod: any) => paymethod
|
|
175
|
+
keyExtractor={(paymethod: any) => paymethod?.id?.toString?.()}
|
|
176
176
|
/>
|
|
177
177
|
)}
|
|
178
178
|
{(paymethodsList.loading || isLoading) && (
|
|
@@ -245,7 +245,7 @@ const PaymentOptionsUI = (props: any) => {
|
|
|
245
245
|
)}
|
|
246
246
|
|
|
247
247
|
{/* Stripe */}
|
|
248
|
-
{isOpenMethod?.paymethod?.gateway === 'stripe' && !paymethodData
|
|
248
|
+
{isOpenMethod?.paymethod?.gateway === 'stripe' && !paymethodData?.id && (
|
|
249
249
|
<View>
|
|
250
250
|
<OButton
|
|
251
251
|
text={t('ADD_PAYMENT_CARD', 'Add New Payment Card')}
|
|
@@ -295,7 +295,7 @@ const PaymentOptionsUI = (props: any) => {
|
|
|
295
295
|
<OModal
|
|
296
296
|
entireModal
|
|
297
297
|
title={t('ADD_CREDIT_OR_DEBIT_CARD', 'Add credit or debit card')}
|
|
298
|
-
open={isOpenMethod?.paymethod?.gateway === 'stripe_direct' && !paymethodData
|
|
298
|
+
open={isOpenMethod?.paymethod?.gateway === 'stripe_direct' && !paymethodData?.id}
|
|
299
299
|
onClose={() => handlePaymethodClick(null)}
|
|
300
300
|
overScreen
|
|
301
301
|
>
|
|
@@ -314,7 +314,7 @@ const PaymentOptionsUI = (props: any) => {
|
|
|
314
314
|
</OModal>
|
|
315
315
|
|
|
316
316
|
{/* Stripe Connect */}
|
|
317
|
-
{isOpenMethod?.paymethod?.gateway === 'stripe_connect' && !paymethodData
|
|
317
|
+
{isOpenMethod?.paymethod?.gateway === 'stripe_connect' && !paymethodData?.id && (
|
|
318
318
|
<View>
|
|
319
319
|
<OButton
|
|
320
320
|
text={t('ADD_PAYMENT_CARD', 'Add New Payment Card')}
|
|
@@ -381,7 +381,7 @@ const PaymentOptionsUI = (props: any) => {
|
|
|
381
381
|
{/* Paypal */}
|
|
382
382
|
{/* <Modal
|
|
383
383
|
className='modal-info'
|
|
384
|
-
open={paymethodSelected?.gateway === 'paypal' && !paymethodData
|
|
384
|
+
open={paymethodSelected?.gateway === 'paypal' && !paymethodData?.id}
|
|
385
385
|
onClose={() => handlePaymethodClick(null)}
|
|
386
386
|
title={t('PAY_WITH_PAYPAL', 'Pay with PayPal')}
|
|
387
387
|
>
|
|
@@ -426,7 +426,7 @@ const SignupFormUI = (props: SignupParams) => {
|
|
|
426
426
|
returnKeyType='next'
|
|
427
427
|
blurOnSubmit={false}
|
|
428
428
|
forwardRef={(ref: any) => handleRefs(ref, field.code)}
|
|
429
|
-
onSubmitEditing={() => field.code === 'email' ? phoneRef
|
|
429
|
+
onSubmitEditing={() => field.code === 'email' ? phoneRef?.current?.focus?.() : handleFocusRef(getNextFieldCode(i))}
|
|
430
430
|
inputStyle={{ color: theme.colors.textPrimary, fontSize: 12 }}
|
|
431
431
|
/>
|
|
432
432
|
)}
|
|
@@ -451,7 +451,7 @@ const SignupFormUI = (props: SignupParams) => {
|
|
|
451
451
|
forwardRef={phoneRef}
|
|
452
452
|
textInputProps={{
|
|
453
453
|
returnKeyType: 'next',
|
|
454
|
-
onSubmitEditing: () => passwordRef
|
|
454
|
+
onSubmitEditing: () => passwordRef?.current?.focus?.(),
|
|
455
455
|
style: { borderWidth: 0, fontSize: 12 }
|
|
456
456
|
}}
|
|
457
457
|
textWrapStyle={{ borderColor: theme.colors.clear, borderWidth: 0, height: 40, paddingStart: 0 }}
|
|
@@ -554,7 +554,7 @@ const AddressFormUI = (props: AddressFormParams) => {
|
|
|
554
554
|
setAddressEditing(text.length == 0);
|
|
555
555
|
},
|
|
556
556
|
onSubmitEditing: () =>
|
|
557
|
-
internalNumberRef
|
|
557
|
+
internalNumberRef?.current?.focus?.(),
|
|
558
558
|
autoCorrect: false,
|
|
559
559
|
blurOnSubmit: false,
|
|
560
560
|
returnKeyType: 'next',
|
|
@@ -658,7 +658,7 @@ const AddressFormUI = (props: AddressFormParams) => {
|
|
|
658
658
|
defaultValue={
|
|
659
659
|
address?.internal_number ||
|
|
660
660
|
formState.changes?.internal_number ||
|
|
661
|
-
addressState
|
|
661
|
+
addressState?.address?.internal_number ||
|
|
662
662
|
''
|
|
663
663
|
}
|
|
664
664
|
render={() => (
|
|
@@ -672,13 +672,13 @@ const AddressFormUI = (props: AddressFormParams) => {
|
|
|
672
672
|
value={
|
|
673
673
|
address?.internal_number ||
|
|
674
674
|
formState.changes?.internal_number ||
|
|
675
|
-
addressState
|
|
675
|
+
addressState?.address?.internal_number ||
|
|
676
676
|
''
|
|
677
677
|
}
|
|
678
678
|
style={{ ...styles.inputsStyle, marginRight: 24 }}
|
|
679
679
|
forwardRef={internalNumberRef}
|
|
680
680
|
returnKeyType="next"
|
|
681
|
-
onSubmitEditing={() => zipCodeRef
|
|
681
|
+
onSubmitEditing={() => zipCodeRef?.current?.focus?.()}
|
|
682
682
|
blurOnSubmit={false}
|
|
683
683
|
/>
|
|
684
684
|
)}
|
|
@@ -719,7 +719,7 @@ const AddressFormUI = (props: AddressFormParams) => {
|
|
|
719
719
|
style={styles.inputsStyle}
|
|
720
720
|
forwardRef={zipCodeRef}
|
|
721
721
|
returnKeyType="next"
|
|
722
|
-
onSubmitEditing={() => addressNotesRef
|
|
722
|
+
onSubmitEditing={() => addressNotesRef?.current?.focus?.()}
|
|
723
723
|
blurOnSubmit={false}
|
|
724
724
|
/>
|
|
725
725
|
)}
|
|
@@ -25,7 +25,7 @@ export const FacebookLogin = (props: any) => {
|
|
|
25
25
|
: t('CONTINUE_WITH_FACEBOOK', 'Continue with Facebook');
|
|
26
26
|
|
|
27
27
|
const logoutWithFacebook = () => {
|
|
28
|
-
LoginManager.logOut();
|
|
28
|
+
LoginManager && LoginManager.logOut();
|
|
29
29
|
};
|
|
30
30
|
|
|
31
31
|
const handleLoginClick = async (accessToken: string) => {
|
|
@@ -48,7 +48,7 @@ export const FacebookLogin = (props: any) => {
|
|
|
48
48
|
|
|
49
49
|
const loginWithFacebook = () => {
|
|
50
50
|
handleLoading && handleLoading(true)
|
|
51
|
-
LoginManager.logInWithPermissions(['public_profile']).then(
|
|
51
|
+
LoginManager && LoginManager.logInWithPermissions(['public_profile']).then(
|
|
52
52
|
(login: any) => {
|
|
53
53
|
if (login.isCancelled) {
|
|
54
54
|
const err = t('LOGIN_WITH_FACEBOOK_CANCELLED', 'Login cancelled')
|
|
@@ -320,7 +320,7 @@ const LoginFormUI = (props: LoginParams) => {
|
|
|
320
320
|
handleData={(val: any) => setPhoneInputData(val)}
|
|
321
321
|
textInputProps={{
|
|
322
322
|
returnKeyType: 'next',
|
|
323
|
-
onSubmitEditing: () => inputRef
|
|
323
|
+
onSubmitEditing: () => inputRef?.current?.focus?.(),
|
|
324
324
|
}}
|
|
325
325
|
/>
|
|
326
326
|
</View>
|
|
@@ -286,7 +286,7 @@ const PaymentOptionsUI = (props: any) => {
|
|
|
286
286
|
<OModal
|
|
287
287
|
entireModal
|
|
288
288
|
title={t('ADD_CREDIT_OR_DEBIT_CARD', 'Add credit or debit card')}
|
|
289
|
-
open={isOpenMethod?.paymethod?.gateway === 'stripe_direct' && !paymethodData
|
|
289
|
+
open={isOpenMethod?.paymethod?.gateway === 'stripe_direct' && !paymethodData?.id}
|
|
290
290
|
onClose={() => handlePaymethodClick(null)}
|
|
291
291
|
>
|
|
292
292
|
<KeyboardAvoidingView
|
|
@@ -304,7 +304,7 @@ const PaymentOptionsUI = (props: any) => {
|
|
|
304
304
|
</OModal>
|
|
305
305
|
|
|
306
306
|
{/* Stripe Connect */}
|
|
307
|
-
{isOpenMethod?.paymethod?.gateway === 'stripe_connect' && !paymethodData
|
|
307
|
+
{isOpenMethod?.paymethod?.gateway === 'stripe_connect' && !paymethodData?.id && (
|
|
308
308
|
<View>
|
|
309
309
|
<StripeCardsList
|
|
310
310
|
paymethod={isOpenMethod?.paymethod}
|
|
@@ -370,7 +370,7 @@ const PaymentOptionsUI = (props: any) => {
|
|
|
370
370
|
{/* Paypal */}
|
|
371
371
|
{/* <Modal
|
|
372
372
|
className='modal-info'
|
|
373
|
-
open={paymethodSelected?.gateway === 'paypal' && !paymethodData
|
|
373
|
+
open={paymethodSelected?.gateway === 'paypal' && !paymethodData?.id}
|
|
374
374
|
onClose={() => handlePaymethodClick(null)}
|
|
375
375
|
title={t('PAY_WITH_PAYPAL', 'Pay with PayPal')}
|
|
376
376
|
>
|
|
@@ -426,7 +426,7 @@ const SignupFormUI = (props: SignupParams) => {
|
|
|
426
426
|
forwardRef={(ref: any) => handleRefs(ref, field.code)}
|
|
427
427
|
onSubmitEditing={() =>
|
|
428
428
|
field.code === 'email'
|
|
429
|
-
? phoneRef
|
|
429
|
+
? phoneRef?.current?.focus?.()
|
|
430
430
|
: handleFocusRef(getNextFieldCode(i))
|
|
431
431
|
}
|
|
432
432
|
/>
|
|
@@ -446,7 +446,7 @@ const SignupFormUI = (props: SignupParams) => {
|
|
|
446
446
|
forwardRef={phoneRef}
|
|
447
447
|
textInputProps={{
|
|
448
448
|
returnKeyType: 'next',
|
|
449
|
-
onSubmitEditing: () => passwordRef
|
|
449
|
+
onSubmitEditing: () => passwordRef?.current?.focus?.(),
|
|
450
450
|
}}
|
|
451
451
|
/>
|
|
452
452
|
</View>
|
|
@@ -437,7 +437,7 @@ const AddressFormUI = (props: AddressFormParams) => {
|
|
|
437
437
|
}
|
|
438
438
|
setIsFirstTime(false)
|
|
439
439
|
},
|
|
440
|
-
onSubmitEditing: () => internalNumberRef
|
|
440
|
+
onSubmitEditing: () => internalNumberRef?.current?.focus?.(),
|
|
441
441
|
autoCorrect: false,
|
|
442
442
|
blurOnSubmit: false,
|
|
443
443
|
returnKeyType: 'next',
|
|
@@ -519,7 +519,7 @@ const AddressFormUI = (props: AddressFormParams) => {
|
|
|
519
519
|
control={control}
|
|
520
520
|
name='internal_number'
|
|
521
521
|
rules={{ required: isRequiredField && isRequiredField('internal_number') ? t(`VALIDATION_ERROR_INTERNAL_NUMBER_REQUIRED`, `The field internal number is required`) : null }}
|
|
522
|
-
defaultValue={address?.internal_number || formState.changes?.internal_number || addressState
|
|
522
|
+
defaultValue={address?.internal_number || formState.changes?.internal_number || addressState?.address?.internal_number || ''}
|
|
523
523
|
render={() => (
|
|
524
524
|
<OInput
|
|
525
525
|
name='internal_number'
|
|
@@ -528,11 +528,11 @@ const AddressFormUI = (props: AddressFormParams) => {
|
|
|
528
528
|
handleChangeInput(text)
|
|
529
529
|
setValue('internal_number', text)
|
|
530
530
|
}}
|
|
531
|
-
value={address?.internal_number || formState.changes?.internal_number || addressState
|
|
531
|
+
value={address?.internal_number || formState.changes?.internal_number || addressState?.address?.internal_number || ''}
|
|
532
532
|
style={styles.inputsStyle}
|
|
533
533
|
forwardRef={internalNumberRef}
|
|
534
534
|
returnKeyType='next'
|
|
535
|
-
onSubmitEditing={() => zipCodeRef
|
|
535
|
+
onSubmitEditing={() => zipCodeRef?.current?.focus?.()}
|
|
536
536
|
blurOnSubmit={false}
|
|
537
537
|
/>
|
|
538
538
|
)}
|
|
@@ -556,7 +556,7 @@ const AddressFormUI = (props: AddressFormParams) => {
|
|
|
556
556
|
style={styles.inputsStyle}
|
|
557
557
|
forwardRef={zipCodeRef}
|
|
558
558
|
returnKeyType='next'
|
|
559
|
-
onSubmitEditing={() => addressNotesRef
|
|
559
|
+
onSubmitEditing={() => addressNotesRef?.current?.focus?.()}
|
|
560
560
|
blurOnSubmit={false}
|
|
561
561
|
/>
|
|
562
562
|
)}
|
|
@@ -27,7 +27,7 @@ export const FacebookLogin = (props: any) => {
|
|
|
27
27
|
: t('Continue_WITH_FACEBOOK', 'Continue with Facebook');
|
|
28
28
|
|
|
29
29
|
const logoutWithFacebook = () => {
|
|
30
|
-
LoginManager.logOut();
|
|
30
|
+
LoginManager && LoginManager.logOut();
|
|
31
31
|
};
|
|
32
32
|
|
|
33
33
|
const handleLoginClick = async (accessToken: string) => {
|
|
@@ -57,7 +57,7 @@ export const FacebookLogin = (props: any) => {
|
|
|
57
57
|
|
|
58
58
|
const loginWithFacebook = () => {
|
|
59
59
|
handleLoading && handleLoading(true)
|
|
60
|
-
LoginManager.logInWithPermissions(['public_profile']).then(
|
|
60
|
+
LoginManager && LoginManager.logInWithPermissions(['public_profile']).then(
|
|
61
61
|
(login: any) => {
|
|
62
62
|
if (login.isCancelled) {
|
|
63
63
|
const err = t('LOGIN_WITH_FACEBOOK_CANCELLED', 'Login cancelled')
|
|
@@ -296,7 +296,7 @@ const LoginFormUI = (props: LoginParams) => {
|
|
|
296
296
|
handleData={(val: any) => setPhoneInputData(val)}
|
|
297
297
|
textInputProps={{
|
|
298
298
|
returnKeyType: 'next',
|
|
299
|
-
onSubmitEditing: () => inputRef
|
|
299
|
+
onSubmitEditing: () => inputRef?.current?.focus?.(),
|
|
300
300
|
}}
|
|
301
301
|
/>
|
|
302
302
|
</View>
|
|
@@ -187,7 +187,7 @@ const PaymentOptionsUI = (props: any) => {
|
|
|
187
187
|
showsVerticalScrollIndicator={false}
|
|
188
188
|
data={paymethodsList.paymethods.sort((a: any, b: any) => a.id - b.id).filter((p: any) => !excludeIds.includes(p.id))}
|
|
189
189
|
renderItem={renderPaymethods}
|
|
190
|
-
keyExtractor={(paymethod: any) => paymethod
|
|
190
|
+
keyExtractor={(paymethod: any) => paymethod?.id?.toString?.()}
|
|
191
191
|
ListFooterComponent={renderFooter}
|
|
192
192
|
/>
|
|
193
193
|
)}
|
|
@@ -220,7 +220,7 @@ const PaymentOptionsUI = (props: any) => {
|
|
|
220
220
|
/>
|
|
221
221
|
}
|
|
222
222
|
|
|
223
|
-
{isOpenMethod?.paymethod?.gateway === 'stripe' && !paymethodData
|
|
223
|
+
{isOpenMethod?.paymethod?.gateway === 'stripe' && !paymethodData?.id && (
|
|
224
224
|
<View>
|
|
225
225
|
<OButton
|
|
226
226
|
text={t('ADD_PAYMENT_CARD', 'Add New Payment Card')}
|
|
@@ -325,7 +325,7 @@ const PaymentOptionsUI = (props: any) => {
|
|
|
325
325
|
<OModal
|
|
326
326
|
entireModal
|
|
327
327
|
title={t('ADD_CREDIT_OR_DEBIT_CARD', 'Add credit or debit card')}
|
|
328
|
-
open={isOpenMethod?.paymethod?.gateway === 'stripe_direct' && !paymethodData
|
|
328
|
+
open={isOpenMethod?.paymethod?.gateway === 'stripe_direct' && !paymethodData?.id}
|
|
329
329
|
onClose={() => handlePaymethodClick(null)}
|
|
330
330
|
>
|
|
331
331
|
<KeyboardAvoidingView
|
|
@@ -343,7 +343,7 @@ const PaymentOptionsUI = (props: any) => {
|
|
|
343
343
|
</OModal>
|
|
344
344
|
|
|
345
345
|
{/* Stripe Connect */}
|
|
346
|
-
{isOpenMethod?.paymethod?.gateway === 'stripe_connect' && !paymethodData
|
|
346
|
+
{isOpenMethod?.paymethod?.gateway === 'stripe_connect' && !paymethodData?.id && (
|
|
347
347
|
<View>
|
|
348
348
|
<OButton
|
|
349
349
|
text={t('ADD_PAYMENT_CARD', 'Add New Payment Card')}
|
|
@@ -383,7 +383,7 @@ const SignupFormUI = (props: SignupParams) => {
|
|
|
383
383
|
returnKeyType='next'
|
|
384
384
|
blurOnSubmit={false}
|
|
385
385
|
forwardRef={(ref: any) => handleRefs(ref, field.code)}
|
|
386
|
-
onSubmitEditing={() => field.code === 'email' ? phoneRef
|
|
386
|
+
onSubmitEditing={() => field.code === 'email' ? phoneRef?.current?.focus?.() : handleFocusRef(getNextFieldCode(i))}
|
|
387
387
|
/>
|
|
388
388
|
)}
|
|
389
389
|
name={field.code}
|
|
@@ -403,7 +403,7 @@ const SignupFormUI = (props: SignupParams) => {
|
|
|
403
403
|
forwardRef={phoneRef}
|
|
404
404
|
textInputProps={{
|
|
405
405
|
returnKeyType: 'next',
|
|
406
|
-
onSubmitEditing: () => passwordRef
|
|
406
|
+
onSubmitEditing: () => passwordRef?.current?.focus?.()
|
|
407
407
|
}}
|
|
408
408
|
/>
|
|
409
409
|
</View>
|
|
@@ -554,7 +554,7 @@ const AddressFormUI = (props: AddressFormParams) => {
|
|
|
554
554
|
setAddressEditing(text.length == 0);
|
|
555
555
|
},
|
|
556
556
|
onSubmitEditing: () =>
|
|
557
|
-
internalNumberRef
|
|
557
|
+
internalNumberRef?.current?.focus?.(),
|
|
558
558
|
autoCorrect: false,
|
|
559
559
|
blurOnSubmit: false,
|
|
560
560
|
returnKeyType: 'next',
|
|
@@ -658,7 +658,7 @@ const AddressFormUI = (props: AddressFormParams) => {
|
|
|
658
658
|
defaultValue={
|
|
659
659
|
address?.internal_number ||
|
|
660
660
|
formState.changes?.internal_number ||
|
|
661
|
-
addressState
|
|
661
|
+
addressState?.address?.internal_number ||
|
|
662
662
|
''
|
|
663
663
|
}
|
|
664
664
|
render={() => (
|
|
@@ -672,13 +672,13 @@ const AddressFormUI = (props: AddressFormParams) => {
|
|
|
672
672
|
value={
|
|
673
673
|
address?.internal_number ||
|
|
674
674
|
formState.changes?.internal_number ||
|
|
675
|
-
addressState
|
|
675
|
+
addressState?.address?.internal_number ||
|
|
676
676
|
''
|
|
677
677
|
}
|
|
678
678
|
style={{ ...styles.inputsStyle, marginRight: 24 }}
|
|
679
679
|
forwardRef={internalNumberRef}
|
|
680
680
|
returnKeyType="next"
|
|
681
|
-
onSubmitEditing={() => zipCodeRef
|
|
681
|
+
onSubmitEditing={() => zipCodeRef?.current?.focus?.()}
|
|
682
682
|
blurOnSubmit={false}
|
|
683
683
|
/>
|
|
684
684
|
)}
|
|
@@ -719,7 +719,7 @@ const AddressFormUI = (props: AddressFormParams) => {
|
|
|
719
719
|
style={styles.inputsStyle}
|
|
720
720
|
forwardRef={zipCodeRef}
|
|
721
721
|
returnKeyType="next"
|
|
722
|
-
onSubmitEditing={() => addressNotesRef
|
|
722
|
+
onSubmitEditing={() => addressNotesRef?.current?.focus?.()}
|
|
723
723
|
blurOnSubmit={false}
|
|
724
724
|
/>
|
|
725
725
|
)}
|
|
@@ -25,7 +25,7 @@ export const FacebookLogin = (props: any) => {
|
|
|
25
25
|
: t('CONTINUE_WITH_FACEBOOK', 'Continue with Facebook');
|
|
26
26
|
|
|
27
27
|
const logoutWithFacebook = () => {
|
|
28
|
-
LoginManager.logOut();
|
|
28
|
+
LoginManager && LoginManager.logOut();
|
|
29
29
|
};
|
|
30
30
|
|
|
31
31
|
const handleLoginClick = async (accessToken: string) => {
|
|
@@ -48,7 +48,7 @@ export const FacebookLogin = (props: any) => {
|
|
|
48
48
|
|
|
49
49
|
const loginWithFacebook = () => {
|
|
50
50
|
handleLoading && handleLoading(true)
|
|
51
|
-
LoginManager.logInWithPermissions(['public_profile']).then(
|
|
51
|
+
LoginManager && LoginManager.logInWithPermissions(['public_profile']).then(
|
|
52
52
|
(login: any) => {
|
|
53
53
|
if (login.isCancelled) {
|
|
54
54
|
const err = t('LOGIN_WITH_FACEBOOK_CANCELLED', 'Login cancelled')
|
|
@@ -325,7 +325,7 @@ const LoginFormUI = (props: LoginParams) => {
|
|
|
325
325
|
handleData={(val: any) => setPhoneInputData(val)}
|
|
326
326
|
textInputProps={{
|
|
327
327
|
returnKeyType: 'next',
|
|
328
|
-
onSubmitEditing: () => inputRef
|
|
328
|
+
onSubmitEditing: () => inputRef?.current?.focus?.(),
|
|
329
329
|
}}
|
|
330
330
|
/>
|
|
331
331
|
</View>
|
|
@@ -150,7 +150,7 @@ const PaymentOptionsUI = (props: any) => {
|
|
|
150
150
|
// data={paymethodsList.paymethods.sort((a: any, b: any) => a.id - b.id)}
|
|
151
151
|
data={paymethodsList.paymethods.sort((a: any, b: any) => a.id - b.id).filter((p: any) => !excludeIds.includes(p.id))}
|
|
152
152
|
renderItem={renderPaymethods}
|
|
153
|
-
keyExtractor={(paymethod: any) => paymethod
|
|
153
|
+
keyExtractor={(paymethod: any) => paymethod?.id?.toString?.()}
|
|
154
154
|
/>
|
|
155
155
|
)}
|
|
156
156
|
|
|
@@ -226,7 +226,7 @@ const PaymentOptionsUI = (props: any) => {
|
|
|
226
226
|
)}
|
|
227
227
|
|
|
228
228
|
{/* Stripe */}
|
|
229
|
-
{isOpenMethod?.paymethod?.gateway === 'stripe' && !paymethodData
|
|
229
|
+
{isOpenMethod?.paymethod?.gateway === 'stripe' && !paymethodData?.id && (
|
|
230
230
|
<View>
|
|
231
231
|
<OButton
|
|
232
232
|
text={t('ADD_PAYMENT_CARD', 'Add New Payment Card')}
|
|
@@ -276,7 +276,7 @@ const PaymentOptionsUI = (props: any) => {
|
|
|
276
276
|
<OModal
|
|
277
277
|
entireModal
|
|
278
278
|
title={t('ADD_CREDIT_OR_DEBIT_CARD', 'Add credit or debit card')}
|
|
279
|
-
open={isOpenMethod?.paymethod?.gateway === 'stripe_direct' && !paymethodData
|
|
279
|
+
open={isOpenMethod?.paymethod?.gateway === 'stripe_direct' && !paymethodData?.id}
|
|
280
280
|
onClose={() => handlePaymethodClick(null)}
|
|
281
281
|
>
|
|
282
282
|
<KeyboardAvoidingView
|
|
@@ -294,7 +294,7 @@ const PaymentOptionsUI = (props: any) => {
|
|
|
294
294
|
</OModal>
|
|
295
295
|
|
|
296
296
|
{/* Stripe Connect */}
|
|
297
|
-
{isOpenMethod?.paymethod?.gateway === 'stripe_connect' && !paymethodData
|
|
297
|
+
{isOpenMethod?.paymethod?.gateway === 'stripe_connect' && !paymethodData?.id && (
|
|
298
298
|
<View>
|
|
299
299
|
<OButton
|
|
300
300
|
text={t('ADD_PAYMENT_CARD', 'Add New Payment Card')}
|
|
@@ -360,7 +360,7 @@ const PaymentOptionsUI = (props: any) => {
|
|
|
360
360
|
{/* Paypal */}
|
|
361
361
|
{/* <Modal
|
|
362
362
|
className='modal-info'
|
|
363
|
-
open={paymethodSelected?.gateway === 'paypal' && !paymethodData
|
|
363
|
+
open={paymethodSelected?.gateway === 'paypal' && !paymethodData?.id}
|
|
364
364
|
onClose={() => handlePaymethodClick(null)}
|
|
365
365
|
title={t('PAY_WITH_PAYPAL', 'Pay with PayPal')}
|
|
366
366
|
>
|
|
@@ -443,7 +443,7 @@ const SignupFormUI = (props: SignupParams) => {
|
|
|
443
443
|
forwardRef={(ref: any) => handleRefs(ref, field.code)}
|
|
444
444
|
onSubmitEditing={() =>
|
|
445
445
|
field.code === 'email'
|
|
446
|
-
? phoneRef
|
|
446
|
+
? phoneRef?.current?.focus?.()
|
|
447
447
|
: handleFocusRef(getNextFieldCode(i))
|
|
448
448
|
}
|
|
449
449
|
/>
|
|
@@ -463,7 +463,7 @@ const SignupFormUI = (props: SignupParams) => {
|
|
|
463
463
|
forwardRef={phoneRef}
|
|
464
464
|
textInputProps={{
|
|
465
465
|
returnKeyType: 'next',
|
|
466
|
-
onSubmitEditing: () => passwordRef
|
|
466
|
+
onSubmitEditing: () => passwordRef?.current?.focus?.(),
|
|
467
467
|
}}
|
|
468
468
|
/>
|
|
469
469
|
</View>
|
|
@@ -559,7 +559,7 @@ const AddressFormUI = (props: AddressFormParams) => {
|
|
|
559
559
|
setAddressEditing(text.length == 0);
|
|
560
560
|
},
|
|
561
561
|
onSubmitEditing: () =>
|
|
562
|
-
internalNumberRef
|
|
562
|
+
internalNumberRef?.current?.focus?.(),
|
|
563
563
|
autoCorrect: false,
|
|
564
564
|
blurOnSubmit: false,
|
|
565
565
|
returnKeyType: 'next',
|
|
@@ -652,7 +652,7 @@ const AddressFormUI = (props: AddressFormParams) => {
|
|
|
652
652
|
defaultValue={
|
|
653
653
|
address?.internal_number ||
|
|
654
654
|
formState.changes?.internal_number ||
|
|
655
|
-
addressState
|
|
655
|
+
addressState?.address?.internal_number ||
|
|
656
656
|
''
|
|
657
657
|
}
|
|
658
658
|
render={() => (
|
|
@@ -666,13 +666,13 @@ const AddressFormUI = (props: AddressFormParams) => {
|
|
|
666
666
|
value={
|
|
667
667
|
address?.internal_number ||
|
|
668
668
|
formState.changes?.internal_number ||
|
|
669
|
-
addressState
|
|
669
|
+
addressState?.address?.internal_number ||
|
|
670
670
|
''
|
|
671
671
|
}
|
|
672
672
|
style={{ ...styles.inputsStyle, marginRight: 24 }}
|
|
673
673
|
forwardRef={internalNumberRef}
|
|
674
674
|
returnKeyType="next"
|
|
675
|
-
onSubmitEditing={() => zipCodeRef
|
|
675
|
+
onSubmitEditing={() => zipCodeRef?.current?.focus?.()}
|
|
676
676
|
blurOnSubmit={false}
|
|
677
677
|
/>
|
|
678
678
|
)}
|
|
@@ -713,7 +713,7 @@ const AddressFormUI = (props: AddressFormParams) => {
|
|
|
713
713
|
style={styles.inputsStyle}
|
|
714
714
|
forwardRef={zipCodeRef}
|
|
715
715
|
returnKeyType="next"
|
|
716
|
-
onSubmitEditing={() => addressNotesRef
|
|
716
|
+
onSubmitEditing={() => addressNotesRef?.current?.focus?.()}
|
|
717
717
|
blurOnSubmit={false}
|
|
718
718
|
/>
|
|
719
719
|
)}
|
|
@@ -26,7 +26,7 @@ export const AppleLogin = (props: any) => {
|
|
|
26
26
|
: t('CONTINUE_WITH_FACEBOOK', 'Continue with Apple');
|
|
27
27
|
|
|
28
28
|
const logoutWithFacebook = () => {
|
|
29
|
-
LoginManager.logOut();
|
|
29
|
+
LoginManager && LoginManager.logOut();
|
|
30
30
|
};
|
|
31
31
|
|
|
32
32
|
const handleLoginClick = async (accessToken: string) => {
|
|
@@ -49,7 +49,7 @@ export const AppleLogin = (props: any) => {
|
|
|
49
49
|
|
|
50
50
|
const loginWithFacebook = () => {
|
|
51
51
|
handleLoading && handleLoading(true)
|
|
52
|
-
LoginManager.logInWithPermissions(['public_profile']).then(
|
|
52
|
+
LoginManager && LoginManager.logInWithPermissions(['public_profile']).then(
|
|
53
53
|
(login: any) => {
|
|
54
54
|
if (login.isCancelled) {
|
|
55
55
|
const err = t('LOGIN_WITH_FACEBOOK_CANCELLED', 'Login cancelled')
|
|
@@ -25,7 +25,7 @@ export const FacebookLogin = (props: any) => {
|
|
|
25
25
|
: t('CONTINUE_WITH_FACEBOOK', 'Continue with Facebook');
|
|
26
26
|
|
|
27
27
|
const logoutWithFacebook = () => {
|
|
28
|
-
LoginManager.logOut();
|
|
28
|
+
LoginManager && LoginManager.logOut();
|
|
29
29
|
};
|
|
30
30
|
|
|
31
31
|
const handleLoginClick = async (accessToken: string) => {
|
|
@@ -48,7 +48,7 @@ export const FacebookLogin = (props: any) => {
|
|
|
48
48
|
|
|
49
49
|
const loginWithFacebook = () => {
|
|
50
50
|
handleLoading && handleLoading(true)
|
|
51
|
-
LoginManager.logInWithPermissions(['public_profile']).then(
|
|
51
|
+
LoginManager && LoginManager.logInWithPermissions(['public_profile']).then(
|
|
52
52
|
(login: any) => {
|
|
53
53
|
if (login.isCancelled) {
|
|
54
54
|
const err = t('LOGIN_WITH_FACEBOOK_CANCELLED', 'Login cancelled')
|
|
@@ -26,7 +26,7 @@ export const GoogleLogin = (props: any) => {
|
|
|
26
26
|
: t('CONTINUE_WITH_GOOGLE', 'Continue with Google');
|
|
27
27
|
|
|
28
28
|
const logoutWithFacebook = () => {
|
|
29
|
-
LoginManager.logOut();
|
|
29
|
+
LoginManager && LoginManager.logOut();
|
|
30
30
|
};
|
|
31
31
|
|
|
32
32
|
const handleLoginClick = async (accessToken: string) => {
|
|
@@ -49,7 +49,7 @@ export const GoogleLogin = (props: any) => {
|
|
|
49
49
|
|
|
50
50
|
const loginWithFacebook = () => {
|
|
51
51
|
handleLoading && handleLoading(true)
|
|
52
|
-
LoginManager.logInWithPermissions(['public_profile']).then(
|
|
52
|
+
LoginManager && LoginManager.logInWithPermissions(['public_profile']).then(
|
|
53
53
|
(login: any) => {
|
|
54
54
|
if (login.isCancelled) {
|
|
55
55
|
const err = t('LOGIN_WITH_FACEBOOK_CANCELLED', 'Login cancelled')
|