@tonder.io/rn-sdk 0.1.7 → 0.1.8
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/README.md +152 -0
- package/lib/commonjs/core/3DSHandler.js +1 -2
- package/lib/commonjs/core/3DSHandler.js.map +1 -1
- package/lib/commonjs/core/BaseCheckout/index.js +5 -4
- package/lib/commonjs/core/BaseCheckout/index.js.map +1 -1
- package/lib/commonjs/core/BaseEnrollment/index.js +2 -2
- package/lib/commonjs/core/BaseEnrollment/index.js.map +1 -1
- package/lib/commonjs/core/BaseSDK/index.js +1 -3
- package/lib/commonjs/core/BaseSDK/index.js.map +1 -1
- package/lib/commonjs/core/EnrollmentContainer/index.js +24 -2
- package/lib/commonjs/core/EnrollmentContainer/index.js.map +1 -1
- package/lib/commonjs/core/PaymentInlineContainer/index.js +2 -2
- package/lib/commonjs/core/PaymentInlineContainer/index.js.map +1 -1
- package/lib/commonjs/core/PaymentLiteContainer/index.js +2 -2
- package/lib/commonjs/core/PaymentLiteContainer/index.js.map +1 -1
- package/lib/commonjs/infrastructure/HttpClient.js +1 -1
- package/lib/commonjs/infrastructure/HttpClient.js.map +1 -1
- package/lib/commonjs/services/SkyflowService.js +3 -3
- package/lib/commonjs/services/SkyflowService.js.map +1 -1
- package/lib/commonjs/shared/catalog/paymentMethodsCatalog.js +16 -0
- package/lib/commonjs/shared/catalog/paymentMethodsCatalog.js.map +1 -1
- package/lib/commonjs/shared/constants/environments.js +10 -1
- package/lib/commonjs/shared/constants/environments.js.map +1 -1
- package/lib/commonjs/shared/constants/paymentMethods.js +4 -1
- package/lib/commonjs/shared/constants/paymentMethods.js.map +1 -1
- package/lib/commonjs/shared/constants/skyflow.js +3 -3
- package/lib/commonjs/shared/constants/skyflow.js.map +1 -1
- package/lib/commonjs/ui/components/CardForm/index.js +2 -1
- package/lib/commonjs/ui/components/CardForm/index.js.map +1 -1
- package/lib/commonjs/ui/components/Input/CardCVVInput.js +9 -6
- package/lib/commonjs/ui/components/Input/CardCVVInput.js.map +1 -1
- package/lib/commonjs/ui/components/Input/CardExpirationDateInput.js +6 -1
- package/lib/commonjs/ui/components/Input/CardExpirationDateInput.js.map +1 -1
- package/lib/commonjs/ui/components/Input/CardExpirationMonthInput.js +6 -5
- package/lib/commonjs/ui/components/Input/CardExpirationMonthInput.js.map +1 -1
- package/lib/commonjs/ui/components/Input/CardExpirationYearInput.js +6 -5
- package/lib/commonjs/ui/components/Input/CardExpirationYearInput.js.map +1 -1
- package/lib/commonjs/ui/components/Input/CardHolderInput.js +6 -5
- package/lib/commonjs/ui/components/Input/CardHolderInput.js.map +1 -1
- package/lib/commonjs/ui/components/Input/CardNumberInput.js +9 -5
- package/lib/commonjs/ui/components/Input/CardNumberInput.js.map +1 -1
- package/lib/commonjs/ui/components/PaymentMethodsList/index.js +3 -1
- package/lib/commonjs/ui/components/PaymentMethodsList/index.js.map +1 -1
- package/lib/commonjs/ui/components/SavedCardsList/index.js +116 -29
- package/lib/commonjs/ui/components/SavedCardsList/index.js.map +1 -1
- package/lib/commonjs/ui/features/TonderEnrollment/index.js +53 -31
- package/lib/commonjs/ui/features/TonderEnrollment/index.js.map +1 -1
- package/lib/commonjs/ui/features/TonderPayment/index.js +55 -17
- package/lib/commonjs/ui/features/TonderPayment/index.js.map +1 -1
- package/lib/commonjs/ui/providers/SkyflowContainerWrapper/index.js +18 -18
- package/lib/commonjs/ui/providers/SkyflowContainerWrapper/index.js.map +1 -1
- package/lib/commonjs/ui/providers/TonderProvider/TonderProviderWrapper.js +32 -0
- package/lib/commonjs/ui/providers/TonderProvider/TonderProviderWrapper.js.map +1 -0
- package/lib/commonjs/ui/providers/TonderProvider/index.js +11 -23
- package/lib/commonjs/ui/providers/TonderProvider/index.js.map +1 -1
- package/lib/commonjs/ui/styles/payment.js +2 -1
- package/lib/commonjs/ui/styles/payment.js.map +1 -1
- package/lib/module/core/3DSHandler.js +1 -2
- package/lib/module/core/3DSHandler.js.map +1 -1
- package/lib/module/core/BaseCheckout/index.js +6 -5
- package/lib/module/core/BaseCheckout/index.js.map +1 -1
- package/lib/module/core/BaseEnrollment/index.js +2 -2
- package/lib/module/core/BaseEnrollment/index.js.map +1 -1
- package/lib/module/core/BaseSDK/index.js +1 -3
- package/lib/module/core/BaseSDK/index.js.map +1 -1
- package/lib/module/core/EnrollmentContainer/index.js +24 -2
- package/lib/module/core/EnrollmentContainer/index.js.map +1 -1
- package/lib/module/core/PaymentInlineContainer/index.js +2 -2
- package/lib/module/core/PaymentInlineContainer/index.js.map +1 -1
- package/lib/module/core/PaymentLiteContainer/index.js +2 -2
- package/lib/module/core/PaymentLiteContainer/index.js.map +1 -1
- package/lib/module/infrastructure/HttpClient.js +1 -1
- package/lib/module/infrastructure/HttpClient.js.map +1 -1
- package/lib/module/services/SkyflowService.js +1 -1
- package/lib/module/services/SkyflowService.js.map +1 -1
- package/lib/module/shared/catalog/paymentMethodsCatalog.js +16 -0
- package/lib/module/shared/catalog/paymentMethodsCatalog.js.map +1 -1
- package/lib/module/shared/constants/environments.js +9 -1
- package/lib/module/shared/constants/environments.js.map +1 -1
- package/lib/module/shared/constants/paymentMethods.js +4 -1
- package/lib/module/shared/constants/paymentMethods.js.map +1 -1
- package/lib/module/shared/constants/skyflow.js +1 -1
- package/lib/module/shared/constants/skyflow.js.map +1 -1
- package/lib/module/ui/components/CardForm/index.js +2 -1
- package/lib/module/ui/components/CardForm/index.js.map +1 -1
- package/lib/module/ui/components/Input/CardCVVInput.js +8 -5
- package/lib/module/ui/components/Input/CardCVVInput.js.map +1 -1
- package/lib/module/ui/components/Input/CardExpirationDateInput.js +6 -1
- package/lib/module/ui/components/Input/CardExpirationDateInput.js.map +1 -1
- package/lib/module/ui/components/Input/CardExpirationMonthInput.js +5 -4
- package/lib/module/ui/components/Input/CardExpirationMonthInput.js.map +1 -1
- package/lib/module/ui/components/Input/CardExpirationYearInput.js +5 -4
- package/lib/module/ui/components/Input/CardExpirationYearInput.js.map +1 -1
- package/lib/module/ui/components/Input/CardHolderInput.js +5 -4
- package/lib/module/ui/components/Input/CardHolderInput.js.map +1 -1
- package/lib/module/ui/components/Input/CardNumberInput.js +8 -4
- package/lib/module/ui/components/Input/CardNumberInput.js.map +1 -1
- package/lib/module/ui/components/PaymentMethodsList/index.js +4 -2
- package/lib/module/ui/components/PaymentMethodsList/index.js.map +1 -1
- package/lib/module/ui/components/SavedCardsList/index.js +116 -29
- package/lib/module/ui/components/SavedCardsList/index.js.map +1 -1
- package/lib/module/ui/features/TonderEnrollment/index.js +53 -32
- package/lib/module/ui/features/TonderEnrollment/index.js.map +1 -1
- package/lib/module/ui/features/TonderPayment/index.js +57 -19
- package/lib/module/ui/features/TonderPayment/index.js.map +1 -1
- package/lib/module/ui/providers/SkyflowContainerWrapper/index.js +17 -16
- package/lib/module/ui/providers/SkyflowContainerWrapper/index.js.map +1 -1
- package/lib/module/ui/providers/TonderProvider/TonderProviderWrapper.js +27 -0
- package/lib/module/ui/providers/TonderProvider/TonderProviderWrapper.js.map +1 -0
- package/lib/module/ui/providers/TonderProvider/index.js +9 -21
- package/lib/module/ui/providers/TonderProvider/index.js.map +1 -1
- package/lib/module/ui/styles/payment.js +2 -1
- package/lib/module/ui/styles/payment.js.map +1 -1
- package/lib/typescript/commonjs/src/core/3DSHandler.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/core/BaseCheckout/index.d.ts +1 -2
- package/lib/typescript/commonjs/src/core/BaseCheckout/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/core/BaseEnrollment/index.d.ts +1 -2
- package/lib/typescript/commonjs/src/core/BaseEnrollment/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/core/BaseSDK/index.d.ts +1 -3
- package/lib/typescript/commonjs/src/core/BaseSDK/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/core/EnrollmentContainer/index.d.ts +3 -3
- package/lib/typescript/commonjs/src/core/EnrollmentContainer/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/core/PaymentInlineContainer/index.d.ts +1 -2
- package/lib/typescript/commonjs/src/core/PaymentInlineContainer/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/core/PaymentLiteContainer/index.d.ts +1 -2
- package/lib/typescript/commonjs/src/core/PaymentLiteContainer/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/infrastructure/HttpClient.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/services/SkyflowService.d.ts +1 -1
- package/lib/typescript/commonjs/src/services/SkyflowService.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/shared/catalog/paymentMethodsCatalog.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/shared/constants/environments.d.ts +2 -1
- package/lib/typescript/commonjs/src/shared/constants/environments.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/shared/constants/paymentMethods.d.ts +3 -0
- package/lib/typescript/commonjs/src/shared/constants/paymentMethods.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/types/baseCheckout.d.ts +1 -1
- package/lib/typescript/commonjs/src/types/baseCheckout.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/types/baseEnrollment.d.ts +1 -1
- package/lib/typescript/commonjs/src/types/baseEnrollment.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/types/baseSDK.d.ts +1 -1
- package/lib/typescript/commonjs/src/types/baseSDK.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/types/enrollment.d.ts +8 -1
- package/lib/typescript/commonjs/src/types/enrollment.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/types/input.d.ts +1 -1
- package/lib/typescript/commonjs/src/types/input.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/types/transaction.d.ts +2 -0
- package/lib/typescript/commonjs/src/types/transaction.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/ui/components/CardForm/index.d.ts +1 -1
- package/lib/typescript/commonjs/src/ui/components/CardForm/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/ui/components/Input/CardCVVInput.d.ts +3 -1
- package/lib/typescript/commonjs/src/ui/components/Input/CardCVVInput.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/ui/components/Input/CardExpirationDateInput.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/ui/components/Input/CardExpirationMonthInput.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/ui/components/Input/CardExpirationYearInput.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/ui/components/Input/CardHolderInput.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/ui/components/Input/CardNumberInput.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/ui/components/PaymentMethodsList/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/ui/components/SavedCardsList/index.d.ts +2 -1
- package/lib/typescript/commonjs/src/ui/components/SavedCardsList/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/ui/features/TonderEnrollment/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/ui/features/TonderPayment/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/ui/providers/SkyflowContainerWrapper/index.d.ts +1 -8
- package/lib/typescript/commonjs/src/ui/providers/SkyflowContainerWrapper/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/ui/providers/TonderProvider/TonderProviderWrapper.d.ts +10 -0
- package/lib/typescript/commonjs/src/ui/providers/TonderProvider/TonderProviderWrapper.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/ui/providers/TonderProvider/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/ui/styles/payment.d.ts +1 -0
- package/lib/typescript/commonjs/src/ui/styles/payment.d.ts.map +1 -1
- package/lib/typescript/module/src/core/3DSHandler.d.ts.map +1 -1
- package/lib/typescript/module/src/core/BaseCheckout/index.d.ts +1 -2
- package/lib/typescript/module/src/core/BaseCheckout/index.d.ts.map +1 -1
- package/lib/typescript/module/src/core/BaseEnrollment/index.d.ts +1 -2
- package/lib/typescript/module/src/core/BaseEnrollment/index.d.ts.map +1 -1
- package/lib/typescript/module/src/core/BaseSDK/index.d.ts +1 -3
- package/lib/typescript/module/src/core/BaseSDK/index.d.ts.map +1 -1
- package/lib/typescript/module/src/core/EnrollmentContainer/index.d.ts +3 -3
- package/lib/typescript/module/src/core/EnrollmentContainer/index.d.ts.map +1 -1
- package/lib/typescript/module/src/core/PaymentInlineContainer/index.d.ts +1 -2
- package/lib/typescript/module/src/core/PaymentInlineContainer/index.d.ts.map +1 -1
- package/lib/typescript/module/src/core/PaymentLiteContainer/index.d.ts +1 -2
- package/lib/typescript/module/src/core/PaymentLiteContainer/index.d.ts.map +1 -1
- package/lib/typescript/module/src/infrastructure/HttpClient.d.ts.map +1 -1
- package/lib/typescript/module/src/services/SkyflowService.d.ts +1 -1
- package/lib/typescript/module/src/services/SkyflowService.d.ts.map +1 -1
- package/lib/typescript/module/src/shared/catalog/paymentMethodsCatalog.d.ts.map +1 -1
- package/lib/typescript/module/src/shared/constants/environments.d.ts +2 -1
- package/lib/typescript/module/src/shared/constants/environments.d.ts.map +1 -1
- package/lib/typescript/module/src/shared/constants/paymentMethods.d.ts +3 -0
- package/lib/typescript/module/src/shared/constants/paymentMethods.d.ts.map +1 -1
- package/lib/typescript/module/src/types/baseCheckout.d.ts +1 -1
- package/lib/typescript/module/src/types/baseCheckout.d.ts.map +1 -1
- package/lib/typescript/module/src/types/baseEnrollment.d.ts +1 -1
- package/lib/typescript/module/src/types/baseEnrollment.d.ts.map +1 -1
- package/lib/typescript/module/src/types/baseSDK.d.ts +1 -1
- package/lib/typescript/module/src/types/baseSDK.d.ts.map +1 -1
- package/lib/typescript/module/src/types/enrollment.d.ts +8 -1
- package/lib/typescript/module/src/types/enrollment.d.ts.map +1 -1
- package/lib/typescript/module/src/types/input.d.ts +1 -1
- package/lib/typescript/module/src/types/input.d.ts.map +1 -1
- package/lib/typescript/module/src/types/transaction.d.ts +2 -0
- package/lib/typescript/module/src/types/transaction.d.ts.map +1 -1
- package/lib/typescript/module/src/ui/components/CardForm/index.d.ts +1 -1
- package/lib/typescript/module/src/ui/components/CardForm/index.d.ts.map +1 -1
- package/lib/typescript/module/src/ui/components/Input/CardCVVInput.d.ts +3 -1
- package/lib/typescript/module/src/ui/components/Input/CardCVVInput.d.ts.map +1 -1
- package/lib/typescript/module/src/ui/components/Input/CardExpirationDateInput.d.ts.map +1 -1
- package/lib/typescript/module/src/ui/components/Input/CardExpirationMonthInput.d.ts.map +1 -1
- package/lib/typescript/module/src/ui/components/Input/CardExpirationYearInput.d.ts.map +1 -1
- package/lib/typescript/module/src/ui/components/Input/CardHolderInput.d.ts.map +1 -1
- package/lib/typescript/module/src/ui/components/Input/CardNumberInput.d.ts.map +1 -1
- package/lib/typescript/module/src/ui/components/PaymentMethodsList/index.d.ts.map +1 -1
- package/lib/typescript/module/src/ui/components/SavedCardsList/index.d.ts +2 -1
- package/lib/typescript/module/src/ui/components/SavedCardsList/index.d.ts.map +1 -1
- package/lib/typescript/module/src/ui/features/TonderEnrollment/index.d.ts.map +1 -1
- package/lib/typescript/module/src/ui/features/TonderPayment/index.d.ts.map +1 -1
- package/lib/typescript/module/src/ui/providers/SkyflowContainerWrapper/index.d.ts +1 -8
- package/lib/typescript/module/src/ui/providers/SkyflowContainerWrapper/index.d.ts.map +1 -1
- package/lib/typescript/module/src/ui/providers/TonderProvider/TonderProviderWrapper.d.ts +10 -0
- package/lib/typescript/module/src/ui/providers/TonderProvider/TonderProviderWrapper.d.ts.map +1 -0
- package/lib/typescript/module/src/ui/providers/TonderProvider/index.d.ts.map +1 -1
- package/lib/typescript/module/src/ui/styles/payment.d.ts +1 -0
- package/lib/typescript/module/src/ui/styles/payment.d.ts.map +1 -1
- package/package.json +12 -5
- package/src/core/3DSHandler.ts +6 -5
- package/src/core/BaseCheckout/index.ts +10 -7
- package/src/core/BaseEnrollment/index.ts +2 -4
- package/src/core/BaseSDK/index.ts +1 -7
- package/src/core/EnrollmentContainer/index.ts +31 -7
- package/src/core/PaymentInlineContainer/index.ts +2 -7
- package/src/core/PaymentLiteContainer/index.ts +2 -7
- package/src/infrastructure/HttpClient.ts +10 -5
- package/src/services/SkyflowService.ts +2 -2
- package/src/shared/catalog/paymentMethodsCatalog.ts +16 -0
- package/src/shared/constants/environments.ts +10 -1
- package/src/shared/constants/paymentMethods.ts +3 -0
- package/src/shared/constants/skyflow.ts +1 -1
- package/src/types/baseCheckout.ts +1 -1
- package/src/types/baseEnrollment.ts +1 -1
- package/src/types/baseSDK.ts +1 -1
- package/src/types/enrollment.ts +19 -2
- package/src/types/input.ts +1 -1
- package/src/types/transaction.ts +2 -0
- package/src/ui/components/CardForm/index.tsx +6 -5
- package/src/ui/components/Input/CardCVVInput.tsx +6 -2
- package/src/ui/components/Input/CardExpirationDateInput.tsx +14 -8
- package/src/ui/components/Input/CardExpirationMonthInput.tsx +3 -1
- package/src/ui/components/Input/CardExpirationYearInput.tsx +3 -1
- package/src/ui/components/Input/CardHolderInput.tsx +3 -1
- package/src/ui/components/Input/CardNumberInput.tsx +6 -1
- package/src/ui/components/PaymentMethodsList/index.tsx +15 -3
- package/src/ui/components/SavedCardsList/index.tsx +186 -65
- package/src/ui/features/TonderEnrollment/index.tsx +63 -35
- package/src/ui/features/TonderPayment/index.tsx +81 -27
- package/src/ui/providers/SkyflowContainerWrapper/index.tsx +19 -24
- package/src/ui/providers/TonderProvider/TonderProviderWrapper.tsx +32 -0
- package/src/ui/providers/TonderProvider/index.tsx +8 -31
- package/src/ui/styles/payment.ts +1 -0
- package/lib/commonjs/ui/providers/InnerProvider/index.js +0 -25
- package/lib/commonjs/ui/providers/InnerProvider/index.js.map +0 -1
- package/lib/module/ui/providers/InnerProvider/index.js +0 -19
- package/lib/module/ui/providers/InnerProvider/index.js.map +0 -1
- package/lib/typescript/commonjs/src/ui/providers/InnerProvider/index.d.ts +0 -10
- package/lib/typescript/commonjs/src/ui/providers/InnerProvider/index.d.ts.map +0 -1
- package/lib/typescript/module/src/ui/providers/InnerProvider/index.d.ts +0 -10
- package/lib/typescript/module/src/ui/providers/InnerProvider/index.d.ts.map +0 -1
- package/src/ui/providers/InnerProvider/index.tsx +0 -24
|
@@ -1,17 +1,39 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { StyleSheet, Text,
|
|
3
|
-
import { ProcessButton } from '../../components/Button/ProcessButton';
|
|
4
|
-
import { NewCardForm } from '../../components/CardForm';
|
|
1
|
+
import React, { useEffect, useRef } from 'react';
|
|
2
|
+
import { StyleSheet, View, Text, Animated } from 'react-native';
|
|
5
3
|
import CardFormSkeleton from '../../components/Skeleton/CardFormSkeleton';
|
|
6
|
-
import { DEFAULT_PAYMENT_CONTAINER } from '../../styles/payment';
|
|
7
|
-
import { buildBaseStyleText } from '../../../shared/utils/styleUtils';
|
|
8
4
|
import useTonderContext from '../../providers/TonderProvider/hook';
|
|
9
5
|
import { SDKType } from '../../../types';
|
|
6
|
+
import { NewCardForm } from '../../components/CardForm';
|
|
7
|
+
import { DEFAULT_PAYMENT_CONTAINER } from '../../styles/payment';
|
|
8
|
+
import { buildBaseStyleText } from '../../../shared/utils/styleUtils';
|
|
9
|
+
import { ProcessButton } from '../../components/Button/ProcessButton';
|
|
10
10
|
|
|
11
11
|
export interface ITonderEnrollmentProps {}
|
|
12
12
|
const TonderEnrollment: React.FC<ITonderEnrollmentProps> = () => {
|
|
13
13
|
const { sdk, state } = useTonderContext<SDKType.ENROLLMENT>();
|
|
14
14
|
|
|
15
|
+
// Animación para NewCardForm
|
|
16
|
+
const animationScale = useRef(new Animated.Value(0)).current;
|
|
17
|
+
const animationOpacity = useRef(new Animated.Value(0)).current;
|
|
18
|
+
|
|
19
|
+
const isCardFormVisible = state?.isCreated;
|
|
20
|
+
|
|
21
|
+
useEffect(() => {
|
|
22
|
+
Animated.parallel([
|
|
23
|
+
Animated.spring(animationScale, {
|
|
24
|
+
toValue: isCardFormVisible ? 1 : 0,
|
|
25
|
+
useNativeDriver: true,
|
|
26
|
+
friction: 8,
|
|
27
|
+
tension: 40,
|
|
28
|
+
}),
|
|
29
|
+
Animated.timing(animationOpacity, {
|
|
30
|
+
toValue: isCardFormVisible ? 1 : 0,
|
|
31
|
+
duration: 100,
|
|
32
|
+
useNativeDriver: true,
|
|
33
|
+
}),
|
|
34
|
+
]).start();
|
|
35
|
+
}, [isCardFormVisible, animationScale, animationOpacity]);
|
|
36
|
+
|
|
15
37
|
const onSave = async () => {
|
|
16
38
|
try {
|
|
17
39
|
await sdk.saveCustomerCard();
|
|
@@ -39,17 +61,33 @@ const TonderEnrollment: React.FC<ITonderEnrollmentProps> = () => {
|
|
|
39
61
|
...(state?.customization?.styles?.sdkCard?.base || {}),
|
|
40
62
|
}}
|
|
41
63
|
>
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
64
|
+
<Animated.View
|
|
65
|
+
style={[
|
|
66
|
+
styles.animatedFormContainer,
|
|
67
|
+
{
|
|
68
|
+
opacity: animationOpacity,
|
|
69
|
+
transform: [{ scaleY: animationScale }],
|
|
70
|
+
},
|
|
71
|
+
]}
|
|
72
|
+
>
|
|
73
|
+
{state?.isCreated && (
|
|
74
|
+
<NewCardForm
|
|
75
|
+
showSaveOption={false}
|
|
76
|
+
saveCard={false}
|
|
77
|
+
onSaveCardChange={() => {}}
|
|
78
|
+
style={{
|
|
79
|
+
...(state?.customization?.styles?.cardForm || {}),
|
|
80
|
+
base: {
|
|
81
|
+
...styles.containerForm,
|
|
82
|
+
...(state?.customization?.styles?.cardForm?.base || {}),
|
|
83
|
+
},
|
|
84
|
+
}}
|
|
85
|
+
labels={state?.customization?.labels}
|
|
86
|
+
placeholders={state?.customization?.placeholders}
|
|
87
|
+
events={state?.events}
|
|
88
|
+
/>
|
|
89
|
+
)}
|
|
90
|
+
</Animated.View>
|
|
53
91
|
{state?.customization?.showMessages &&
|
|
54
92
|
state?.message &&
|
|
55
93
|
state?.message !== '' &&
|
|
@@ -112,24 +150,7 @@ const TonderEnrollment: React.FC<ITonderEnrollmentProps> = () => {
|
|
|
112
150
|
const styles = StyleSheet.create({
|
|
113
151
|
container: {
|
|
114
152
|
position: 'relative',
|
|
115
|
-
|
|
116
|
-
newCardSection: {
|
|
117
|
-
flexDirection: 'row',
|
|
118
|
-
alignItems: 'center',
|
|
119
|
-
paddingVertical: 10,
|
|
120
|
-
paddingHorizontal: 20,
|
|
121
|
-
borderBottomWidth: 1,
|
|
122
|
-
borderBottomColor: '#e2e8f0',
|
|
123
|
-
},
|
|
124
|
-
cardImage: {
|
|
125
|
-
width: 32,
|
|
126
|
-
height: 20,
|
|
127
|
-
marginLeft: 15,
|
|
128
|
-
},
|
|
129
|
-
newCardText: {
|
|
130
|
-
fontSize: 12,
|
|
131
|
-
color: '#1D1D1D',
|
|
132
|
-
marginLeft: 15,
|
|
153
|
+
minHeight: 210,
|
|
133
154
|
},
|
|
134
155
|
messageContainer: {
|
|
135
156
|
paddingHorizontal: 20,
|
|
@@ -142,6 +163,13 @@ const styles = StyleSheet.create({
|
|
|
142
163
|
color: '#3bc635',
|
|
143
164
|
fontSize: 12,
|
|
144
165
|
},
|
|
166
|
+
containerForm: {
|
|
167
|
+
height: 'auto',
|
|
168
|
+
minHeight: 190,
|
|
169
|
+
},
|
|
170
|
+
animatedFormContainer: {
|
|
171
|
+
overflow: 'hidden',
|
|
172
|
+
},
|
|
145
173
|
});
|
|
146
174
|
|
|
147
175
|
export default TonderEnrollment;
|
|
@@ -1,23 +1,55 @@
|
|
|
1
|
-
import React, { useState } from 'react';
|
|
2
|
-
import
|
|
1
|
+
import React, { useEffect, useRef, useState } from 'react';
|
|
2
|
+
import useTonderContext from '../../providers/TonderProvider/hook';
|
|
3
|
+
import { SDKType } from '../../../types';
|
|
4
|
+
import CardFormSkeleton from '../../components/Skeleton/CardFormSkeleton';
|
|
5
|
+
import {
|
|
6
|
+
Animated,
|
|
7
|
+
Image,
|
|
8
|
+
StyleSheet,
|
|
9
|
+
View,
|
|
10
|
+
Text,
|
|
11
|
+
TouchableOpacity,
|
|
12
|
+
} from 'react-native';
|
|
13
|
+
import { DEFAULT_PAYMENT_CONTAINER } from '../../styles/payment';
|
|
14
|
+
import { buildBaseStyleText } from '../../../shared/utils/styleUtils';
|
|
3
15
|
import SavedCardsList from '../../components/SavedCardsList';
|
|
4
16
|
import { ProcessButton } from '../../components/Button/ProcessButton';
|
|
5
17
|
import PaymentMethodsList from '../../components/PaymentMethodsList';
|
|
6
18
|
import { NewCardForm } from '../../components/CardForm';
|
|
7
19
|
import { RadioButton } from '../../components/RadioButton';
|
|
8
20
|
import { getCardType } from '../../../shared/catalog/cardBrandCatalog';
|
|
9
|
-
import CardFormSkeleton from '../../components/Skeleton/CardFormSkeleton';
|
|
10
|
-
import { DEFAULT_PAYMENT_CONTAINER } from '../../styles/payment';
|
|
11
|
-
import { buildBaseStyleText } from '../../../shared/utils/styleUtils';
|
|
12
21
|
import { toCurrency } from '../../../shared/utils/numberUtils';
|
|
13
|
-
import useTonderContext from '../../providers/TonderProvider/hook';
|
|
14
|
-
import { SDKType } from '../../../types';
|
|
15
22
|
|
|
16
23
|
export interface ITonderPaymentProps {}
|
|
17
24
|
const TonderPayment: React.FC<ITonderPaymentProps> = () => {
|
|
18
25
|
const { uiWrapper, sdk, state } = useTonderContext<SDKType.INLINE>();
|
|
19
26
|
const [deletingCards, setDelitingCards] = useState<string[]>([]);
|
|
20
27
|
|
|
28
|
+
// Animación para NewCardForm
|
|
29
|
+
const animationScale = useRef(new Animated.Value(0)).current;
|
|
30
|
+
const animationOpacity = useRef(new Animated.Value(0)).current;
|
|
31
|
+
|
|
32
|
+
const isNewCardSelected =
|
|
33
|
+
state?.uiData?.selectedMethod === 'new' &&
|
|
34
|
+
state?.isCreated &&
|
|
35
|
+
state?.customization?.cardForm?.show;
|
|
36
|
+
|
|
37
|
+
useEffect(() => {
|
|
38
|
+
Animated.parallel([
|
|
39
|
+
Animated.spring(animationScale, {
|
|
40
|
+
toValue: isNewCardSelected ? 1 : 0,
|
|
41
|
+
useNativeDriver: true,
|
|
42
|
+
friction: 8,
|
|
43
|
+
tension: 40,
|
|
44
|
+
}),
|
|
45
|
+
Animated.timing(animationOpacity, {
|
|
46
|
+
toValue: isNewCardSelected ? 1 : 0,
|
|
47
|
+
duration: 100,
|
|
48
|
+
useNativeDriver: true,
|
|
49
|
+
}),
|
|
50
|
+
]).start();
|
|
51
|
+
}, [isNewCardSelected, animationScale, animationOpacity]);
|
|
52
|
+
|
|
21
53
|
const handleMethodSelect = (methodId: string, type: string) => {
|
|
22
54
|
uiWrapper.updateMethod(type, methodId);
|
|
23
55
|
};
|
|
@@ -37,7 +69,6 @@ const TonderPayment: React.FC<ITonderPaymentProps> = () => {
|
|
|
37
69
|
setDelitingCards((prev) => {
|
|
38
70
|
return prev.filter((it) => it !== cardId);
|
|
39
71
|
});
|
|
40
|
-
console.error('[TonderPayment | onDeleteCard | ERROR]', error);
|
|
41
72
|
}
|
|
42
73
|
};
|
|
43
74
|
|
|
@@ -52,7 +83,6 @@ const TonderPayment: React.FC<ITonderPaymentProps> = () => {
|
|
|
52
83
|
if (!state?.isCreating && !state?.isCreated) {
|
|
53
84
|
return null;
|
|
54
85
|
}
|
|
55
|
-
|
|
56
86
|
return (
|
|
57
87
|
<View style={styles.container}>
|
|
58
88
|
{state?.isCreating && (
|
|
@@ -68,7 +98,7 @@ const TonderPayment: React.FC<ITonderPaymentProps> = () => {
|
|
|
68
98
|
...(state?.customization?.styles?.sdkCard?.base || {}),
|
|
69
99
|
}}
|
|
70
100
|
>
|
|
71
|
-
{state?.customization?.saveCards?.showSaved && (
|
|
101
|
+
{state?.customization?.saveCards?.showSaved && state?.isCreated && (
|
|
72
102
|
<SavedCardsList
|
|
73
103
|
style={state?.customization?.styles?.savedCards}
|
|
74
104
|
expirationLabel={state?.customization?.labels?.expirationCard}
|
|
@@ -80,15 +110,25 @@ const TonderPayment: React.FC<ITonderPaymentProps> = () => {
|
|
|
80
110
|
onDeleteCard={onDeleteCard}
|
|
81
111
|
deletingCards={deletingCards}
|
|
82
112
|
showDeleteButton={state?.customization?.saveCards?.showDeleteOption}
|
|
113
|
+
cvvProps={{
|
|
114
|
+
style: state?.customization?.styles?.cardForm,
|
|
115
|
+
label: state?.customization?.labels?.cvv,
|
|
116
|
+
placeholder: state?.customization?.placeholders?.cvv,
|
|
117
|
+
onBlur: state?.events?.cvvEvents?.onBlur,
|
|
118
|
+
onFocus: state?.events?.cvvEvents?.onFocus,
|
|
119
|
+
onChange: state?.events?.cvvEvents?.onChange,
|
|
120
|
+
}}
|
|
83
121
|
/>
|
|
84
122
|
)}
|
|
85
123
|
|
|
86
124
|
{state?.customization?.cardForm?.show && (
|
|
87
|
-
<
|
|
125
|
+
<TouchableOpacity
|
|
88
126
|
style={{
|
|
89
127
|
...styles.newCardSection,
|
|
90
128
|
...state?.customization?.styles?.paymentRadio?.base,
|
|
91
129
|
}}
|
|
130
|
+
onPress={() => handleMethodSelect('new', '')}
|
|
131
|
+
activeOpacity={0.7}
|
|
92
132
|
>
|
|
93
133
|
<RadioButton
|
|
94
134
|
value="new"
|
|
@@ -118,24 +158,34 @@ const TonderPayment: React.FC<ITonderPaymentProps> = () => {
|
|
|
118
158
|
>
|
|
119
159
|
{state?.customization?.labels?.payWithCard || 'Pagar con tarjeta'}
|
|
120
160
|
</Text>
|
|
121
|
-
</
|
|
161
|
+
</TouchableOpacity>
|
|
122
162
|
)}
|
|
123
163
|
|
|
124
|
-
{state?.
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
164
|
+
{state?.customization?.cardForm?.show && (
|
|
165
|
+
<Animated.View
|
|
166
|
+
style={[
|
|
167
|
+
styles.animatedFormContainer,
|
|
168
|
+
{
|
|
169
|
+
opacity: animationOpacity,
|
|
170
|
+
transform: [{ scaleY: animationScale }],
|
|
171
|
+
},
|
|
172
|
+
]}
|
|
173
|
+
>
|
|
174
|
+
{state?.uiData?.selectedMethod === 'new' && state?.isCreated && (
|
|
175
|
+
<NewCardForm
|
|
176
|
+
showSaveOption={
|
|
177
|
+
state?.customization?.saveCards?.showSaveCardOption
|
|
178
|
+
}
|
|
179
|
+
saveCard={state?.uiData?.saveCard || false}
|
|
180
|
+
onSaveCardChange={handleSaveCardChange}
|
|
181
|
+
style={state?.customization?.styles?.cardForm}
|
|
182
|
+
labels={state?.customization?.labels}
|
|
183
|
+
placeholders={state?.customization?.placeholders}
|
|
184
|
+
events={state?.events}
|
|
185
|
+
/>
|
|
186
|
+
)}
|
|
187
|
+
</Animated.View>
|
|
188
|
+
)}
|
|
139
189
|
{state?.customization?.paymentMethods?.show && (
|
|
140
190
|
<PaymentMethodsList
|
|
141
191
|
methods={state?.uiData.paymentMethods}
|
|
@@ -209,6 +259,7 @@ const TonderPayment: React.FC<ITonderPaymentProps> = () => {
|
|
|
209
259
|
const styles = StyleSheet.create({
|
|
210
260
|
container: {
|
|
211
261
|
position: 'relative',
|
|
262
|
+
minHeight: 210,
|
|
212
263
|
},
|
|
213
264
|
newCardSection: {
|
|
214
265
|
flexDirection: 'row',
|
|
@@ -242,6 +293,9 @@ const styles = StyleSheet.create({
|
|
|
242
293
|
color: '#3bc635',
|
|
243
294
|
fontSize: 12,
|
|
244
295
|
},
|
|
296
|
+
animatedFormContainer: {
|
|
297
|
+
overflow: 'hidden',
|
|
298
|
+
},
|
|
245
299
|
});
|
|
246
300
|
|
|
247
301
|
export default TonderPayment;
|
|
@@ -1,35 +1,30 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { useCollectContainer } from '
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import { SDKType } from '../../../types';
|
|
1
|
+
import { useEffect } from 'react';
|
|
2
|
+
import { useCollectContainer } from 'skyflow-react-native';
|
|
3
|
+
import useTonderContext from '../TonderProvider/hook';
|
|
4
|
+
import { SDKType } from '@tonder.io/rn-sdk';
|
|
6
5
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
contextValue: ITonderContext<SDKType>;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
const SkyflowContainerWrapper = ({
|
|
13
|
-
children,
|
|
14
|
-
contextValue,
|
|
15
|
-
}: SkyflowContainerWrapperProps) => {
|
|
6
|
+
const SkyflowContainerWrapper = () => {
|
|
7
|
+
const { uiWrapper, sdk, state } = useTonderContext<SDKType.INLINE>();
|
|
16
8
|
const container = useCollectContainer();
|
|
9
|
+
const savedCardContainer = useCollectContainer();
|
|
17
10
|
|
|
18
11
|
useEffect(() => {
|
|
19
|
-
if (
|
|
20
|
-
|
|
12
|
+
if (state?.isCreated && container) {
|
|
13
|
+
uiWrapper.setSkyFlowContainer(undefined);
|
|
14
|
+
setTimeout(() => {
|
|
15
|
+
uiWrapper.setSkyFlowContainer(container);
|
|
16
|
+
}, 20);
|
|
21
17
|
}
|
|
22
18
|
}, [
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
19
|
+
state?.isCreated,
|
|
20
|
+
sdk,
|
|
21
|
+
uiWrapper,
|
|
22
|
+
state?.skyflowConfig,
|
|
23
|
+
container,
|
|
24
|
+
savedCardContainer,
|
|
26
25
|
]);
|
|
27
26
|
|
|
28
|
-
return
|
|
29
|
-
<InnerProvider container={container} contextValue={contextValue}>
|
|
30
|
-
{children}
|
|
31
|
-
</InnerProvider>
|
|
32
|
-
);
|
|
27
|
+
return null;
|
|
33
28
|
};
|
|
34
29
|
|
|
35
30
|
export default SkyflowContainerWrapper;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ThreeDSWebView } from '../../components/WebView/ThreeDSWebView';
|
|
3
|
+
import { SkyflowProvider } from 'skyflow-react-native';
|
|
4
|
+
import useTonderContext from './hook';
|
|
5
|
+
|
|
6
|
+
const TonderProviderWrapper: React.FC<
|
|
7
|
+
React.PropsWithChildren<{
|
|
8
|
+
threeDSConfig: {
|
|
9
|
+
url?: string;
|
|
10
|
+
onComplete?: () => void;
|
|
11
|
+
returnURL?: string;
|
|
12
|
+
};
|
|
13
|
+
}>
|
|
14
|
+
> = ({ threeDSConfig, children }) => {
|
|
15
|
+
const { state } = useTonderContext();
|
|
16
|
+
return (
|
|
17
|
+
<SkyflowProvider config={state?.skyflowConfig}>
|
|
18
|
+
{!!threeDSConfig.url && (
|
|
19
|
+
<ThreeDSWebView
|
|
20
|
+
url={threeDSConfig.url}
|
|
21
|
+
onComplete={() => {
|
|
22
|
+
threeDSConfig.onComplete?.();
|
|
23
|
+
}}
|
|
24
|
+
returnURL={threeDSConfig.returnURL!}
|
|
25
|
+
/>
|
|
26
|
+
)}
|
|
27
|
+
{children}
|
|
28
|
+
</SkyflowProvider>
|
|
29
|
+
);
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export default React.memo(TonderProviderWrapper);
|
|
@@ -3,14 +3,12 @@ import React, { useEffect, useMemo, useState } from 'react';
|
|
|
3
3
|
import Tonder from '../../../core/Tonder';
|
|
4
4
|
import type { ISDKBaseConfig, SDKInstance } from '../../../types';
|
|
5
5
|
import { SDKType } from '../../../types';
|
|
6
|
-
import { SkyflowProvider } from 'skf-rnad';
|
|
7
|
-
import SkyflowContainerWrapper from '../SkyflowContainerWrapper';
|
|
8
|
-
import { ThreeDSWebView } from '../../components/WebView/ThreeDSWebView';
|
|
9
6
|
import { EnrollmentContainer } from '../../../core/EnrollmentContainer';
|
|
10
7
|
import PaymentLiteContainer from '../../../core/PaymentLiteContainer';
|
|
11
8
|
import PaymentInlineContainer from '../../../core/PaymentInlineContainer';
|
|
12
9
|
import uiWrapper from './uiWrapper';
|
|
13
10
|
import { tonderContext } from './context';
|
|
11
|
+
import TonderProviderWrapper from './TonderProviderWrapper';
|
|
14
12
|
|
|
15
13
|
export interface ITonderProvider {
|
|
16
14
|
config: ISDKBaseConfig;
|
|
@@ -22,7 +20,6 @@ const TonderProvider: React.FC<React.PropsWithChildren<ITonderProvider>> = <
|
|
|
22
20
|
children,
|
|
23
21
|
config,
|
|
24
22
|
}) => {
|
|
25
|
-
const [skyflowConfig, setSkyflowConfig] = useState<any | null>(null);
|
|
26
23
|
const [state, setState] = useState<Readonly<any>>(() => {});
|
|
27
24
|
const [threeDSConfig, setThreeDSConfig] = useState<{
|
|
28
25
|
url?: string;
|
|
@@ -33,22 +30,13 @@ const TonderProvider: React.FC<React.PropsWithChildren<ITonderProvider>> = <
|
|
|
33
30
|
const tonder = useMemo(() => new Tonder(config), [config]);
|
|
34
31
|
const sdk: SDKInstance<T> = useMemo(() => {
|
|
35
32
|
if (config.type === SDKType.ENROLLMENT) {
|
|
36
|
-
return new EnrollmentContainer(
|
|
37
|
-
tonder,
|
|
38
|
-
setSkyflowConfig
|
|
39
|
-
) as SDKInstance<T>;
|
|
33
|
+
return new EnrollmentContainer(tonder) as SDKInstance<T>;
|
|
40
34
|
}
|
|
41
35
|
if (config.type === SDKType.LITE) {
|
|
42
|
-
return new PaymentLiteContainer(
|
|
43
|
-
tonder,
|
|
44
|
-
setSkyflowConfig
|
|
45
|
-
) as SDKInstance<T>;
|
|
36
|
+
return new PaymentLiteContainer(tonder) as SDKInstance<T>;
|
|
46
37
|
}
|
|
47
|
-
return new PaymentInlineContainer(
|
|
48
|
-
|
|
49
|
-
setSkyflowConfig
|
|
50
|
-
) as SDKInstance<T>;
|
|
51
|
-
}, [tonder, setSkyflowConfig]);
|
|
38
|
+
return new PaymentInlineContainer(tonder) as SDKInstance<T>;
|
|
39
|
+
}, [config.type, tonder]);
|
|
52
40
|
const uiSDKWrapper = useMemo(() => uiWrapper(tonder), [tonder]);
|
|
53
41
|
|
|
54
42
|
useEffect(() => {
|
|
@@ -91,20 +79,9 @@ const TonderProvider: React.FC<React.PropsWithChildren<ITonderProvider>> = <
|
|
|
91
79
|
|
|
92
80
|
return (
|
|
93
81
|
<tonderContext.Provider value={contextValue}>
|
|
94
|
-
<
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
<ThreeDSWebView
|
|
98
|
-
url={threeDSConfig.url}
|
|
99
|
-
onComplete={() => {
|
|
100
|
-
threeDSConfig.onComplete?.();
|
|
101
|
-
}}
|
|
102
|
-
returnURL={threeDSConfig.returnURL!}
|
|
103
|
-
/>
|
|
104
|
-
)}
|
|
105
|
-
{children}
|
|
106
|
-
</SkyflowContainerWrapper>
|
|
107
|
-
</SkyflowProvider>
|
|
82
|
+
<TonderProviderWrapper threeDSConfig={threeDSConfig}>
|
|
83
|
+
{children}
|
|
84
|
+
</TonderProviderWrapper>
|
|
108
85
|
</tonderContext.Provider>
|
|
109
86
|
);
|
|
110
87
|
};
|
package/src/ui/styles/payment.ts
CHANGED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _react = _interopRequireDefault(require("react"));
|
|
8
|
-
var _context = require("../TonderProvider/context.js");
|
|
9
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
|
-
// @ts-nocheck
|
|
12
|
-
|
|
13
|
-
const InnerProvider = ({
|
|
14
|
-
children,
|
|
15
|
-
contextValue
|
|
16
|
-
}) => {
|
|
17
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_context.tonderContext.Provider, {
|
|
18
|
-
value: {
|
|
19
|
-
...contextValue
|
|
20
|
-
},
|
|
21
|
-
children: children
|
|
22
|
-
});
|
|
23
|
-
};
|
|
24
|
-
var _default = exports.default = InnerProvider;
|
|
25
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireDefault","require","_context","_jsxRuntime","e","__esModule","default","InnerProvider","children","contextValue","jsx","tonderContext","Provider","value","_default","exports"],"sourceRoot":"../../../../../src","sources":["ui/providers/InnerProvider/index.tsx"],"mappings":";;;;;;AACA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,QAAA,GAAAD,OAAA;AAA0D,IAAAE,WAAA,GAAAF,OAAA;AAAA,SAAAD,uBAAAI,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAH1D;;AAWA,MAAMG,aAAa,GAAGA,CAAC;EAAEC,QAAQ;EAAEC;AAAiC,CAAC,KAAK;EACxE,oBACE,IAAAN,WAAA,CAAAO,GAAA,EAACR,QAAA,CAAAS,aAAa,CAACC,QAAQ;IACrBC,KAAK,EAAE;MACL,GAAGJ;IACL,CAAE;IAAAD,QAAA,EAEDA;EAAQ,CACa,CAAC;AAE7B,CAAC;AAAC,IAAAM,QAAA,GAAAC,OAAA,CAAAT,OAAA,GAEaC,aAAa","ignoreList":[]}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
// @ts-nocheck
|
|
4
|
-
import React from 'react';
|
|
5
|
-
import { tonderContext } from "../TonderProvider/context.js";
|
|
6
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
-
const InnerProvider = ({
|
|
8
|
-
children,
|
|
9
|
-
contextValue
|
|
10
|
-
}) => {
|
|
11
|
-
return /*#__PURE__*/_jsx(tonderContext.Provider, {
|
|
12
|
-
value: {
|
|
13
|
-
...contextValue
|
|
14
|
-
},
|
|
15
|
-
children: children
|
|
16
|
-
});
|
|
17
|
-
};
|
|
18
|
-
export default InnerProvider;
|
|
19
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["React","tonderContext","jsx","_jsx","InnerProvider","children","contextValue","Provider","value"],"sourceRoot":"../../../../../src","sources":["ui/providers/InnerProvider/index.tsx"],"mappings":";;AAAA;AACA,OAAOA,KAAK,MAAM,OAAO;AAEzB,SAASC,aAAa,QAAQ,8BAA2B;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAQ1D,MAAMC,aAAa,GAAGA,CAAC;EAAEC,QAAQ;EAAEC;AAAiC,CAAC,KAAK;EACxE,oBACEH,IAAA,CAACF,aAAa,CAACM,QAAQ;IACrBC,KAAK,EAAE;MACL,GAAGF;IACL,CAAE;IAAAD,QAAA,EAEDA;EAAQ,CACa,CAAC;AAE7B,CAAC;AAED,eAAeD,aAAa","ignoreList":[]}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ITonderContext, SDKType } from '../../../types';
|
|
3
|
-
interface InnerProviderProps {
|
|
4
|
-
children: React.ReactNode;
|
|
5
|
-
container: any;
|
|
6
|
-
contextValue: ITonderContext<SDKType>;
|
|
7
|
-
}
|
|
8
|
-
declare const InnerProvider: ({ children, contextValue }: InnerProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
export default InnerProvider;
|
|
10
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/ui/providers/InnerProvider/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAGzD,UAAU,kBAAkB;IAC1B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,SAAS,EAAE,GAAG,CAAC;IACf,YAAY,EAAE,cAAc,CAAC,OAAO,CAAC,CAAC;CACvC;AAED,QAAA,MAAM,aAAa,GAAI,4BAA4B,kBAAkB,4CAUpE,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ITonderContext, SDKType } from '../../../types';
|
|
3
|
-
interface InnerProviderProps {
|
|
4
|
-
children: React.ReactNode;
|
|
5
|
-
container: any;
|
|
6
|
-
contextValue: ITonderContext<SDKType>;
|
|
7
|
-
}
|
|
8
|
-
declare const InnerProvider: ({ children, contextValue }: InnerProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
export default InnerProvider;
|
|
10
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/ui/providers/InnerProvider/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAGzD,UAAU,kBAAkB;IAC1B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,SAAS,EAAE,GAAG,CAAC;IACf,YAAY,EAAE,cAAc,CAAC,OAAO,CAAC,CAAC;CACvC;AAED,QAAA,MAAM,aAAa,GAAI,4BAA4B,kBAAkB,4CAUpE,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { ITonderContext, SDKType } from '../../../types';
|
|
4
|
-
import { tonderContext } from '../TonderProvider/context';
|
|
5
|
-
|
|
6
|
-
interface InnerProviderProps {
|
|
7
|
-
children: React.ReactNode;
|
|
8
|
-
container: any;
|
|
9
|
-
contextValue: ITonderContext<SDKType>;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
const InnerProvider = ({ children, contextValue }: InnerProviderProps) => {
|
|
13
|
-
return (
|
|
14
|
-
<tonderContext.Provider
|
|
15
|
-
value={{
|
|
16
|
-
...contextValue,
|
|
17
|
-
}}
|
|
18
|
-
>
|
|
19
|
-
{children}
|
|
20
|
-
</tonderContext.Provider>
|
|
21
|
-
);
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
export default InnerProvider;
|