@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.
Files changed (265) hide show
  1. package/README.md +152 -0
  2. package/lib/commonjs/core/3DSHandler.js +1 -2
  3. package/lib/commonjs/core/3DSHandler.js.map +1 -1
  4. package/lib/commonjs/core/BaseCheckout/index.js +5 -4
  5. package/lib/commonjs/core/BaseCheckout/index.js.map +1 -1
  6. package/lib/commonjs/core/BaseEnrollment/index.js +2 -2
  7. package/lib/commonjs/core/BaseEnrollment/index.js.map +1 -1
  8. package/lib/commonjs/core/BaseSDK/index.js +1 -3
  9. package/lib/commonjs/core/BaseSDK/index.js.map +1 -1
  10. package/lib/commonjs/core/EnrollmentContainer/index.js +24 -2
  11. package/lib/commonjs/core/EnrollmentContainer/index.js.map +1 -1
  12. package/lib/commonjs/core/PaymentInlineContainer/index.js +2 -2
  13. package/lib/commonjs/core/PaymentInlineContainer/index.js.map +1 -1
  14. package/lib/commonjs/core/PaymentLiteContainer/index.js +2 -2
  15. package/lib/commonjs/core/PaymentLiteContainer/index.js.map +1 -1
  16. package/lib/commonjs/infrastructure/HttpClient.js +1 -1
  17. package/lib/commonjs/infrastructure/HttpClient.js.map +1 -1
  18. package/lib/commonjs/services/SkyflowService.js +3 -3
  19. package/lib/commonjs/services/SkyflowService.js.map +1 -1
  20. package/lib/commonjs/shared/catalog/paymentMethodsCatalog.js +16 -0
  21. package/lib/commonjs/shared/catalog/paymentMethodsCatalog.js.map +1 -1
  22. package/lib/commonjs/shared/constants/environments.js +10 -1
  23. package/lib/commonjs/shared/constants/environments.js.map +1 -1
  24. package/lib/commonjs/shared/constants/paymentMethods.js +4 -1
  25. package/lib/commonjs/shared/constants/paymentMethods.js.map +1 -1
  26. package/lib/commonjs/shared/constants/skyflow.js +3 -3
  27. package/lib/commonjs/shared/constants/skyflow.js.map +1 -1
  28. package/lib/commonjs/ui/components/CardForm/index.js +2 -1
  29. package/lib/commonjs/ui/components/CardForm/index.js.map +1 -1
  30. package/lib/commonjs/ui/components/Input/CardCVVInput.js +9 -6
  31. package/lib/commonjs/ui/components/Input/CardCVVInput.js.map +1 -1
  32. package/lib/commonjs/ui/components/Input/CardExpirationDateInput.js +6 -1
  33. package/lib/commonjs/ui/components/Input/CardExpirationDateInput.js.map +1 -1
  34. package/lib/commonjs/ui/components/Input/CardExpirationMonthInput.js +6 -5
  35. package/lib/commonjs/ui/components/Input/CardExpirationMonthInput.js.map +1 -1
  36. package/lib/commonjs/ui/components/Input/CardExpirationYearInput.js +6 -5
  37. package/lib/commonjs/ui/components/Input/CardExpirationYearInput.js.map +1 -1
  38. package/lib/commonjs/ui/components/Input/CardHolderInput.js +6 -5
  39. package/lib/commonjs/ui/components/Input/CardHolderInput.js.map +1 -1
  40. package/lib/commonjs/ui/components/Input/CardNumberInput.js +9 -5
  41. package/lib/commonjs/ui/components/Input/CardNumberInput.js.map +1 -1
  42. package/lib/commonjs/ui/components/PaymentMethodsList/index.js +3 -1
  43. package/lib/commonjs/ui/components/PaymentMethodsList/index.js.map +1 -1
  44. package/lib/commonjs/ui/components/SavedCardsList/index.js +116 -29
  45. package/lib/commonjs/ui/components/SavedCardsList/index.js.map +1 -1
  46. package/lib/commonjs/ui/features/TonderEnrollment/index.js +53 -31
  47. package/lib/commonjs/ui/features/TonderEnrollment/index.js.map +1 -1
  48. package/lib/commonjs/ui/features/TonderPayment/index.js +55 -17
  49. package/lib/commonjs/ui/features/TonderPayment/index.js.map +1 -1
  50. package/lib/commonjs/ui/providers/SkyflowContainerWrapper/index.js +18 -18
  51. package/lib/commonjs/ui/providers/SkyflowContainerWrapper/index.js.map +1 -1
  52. package/lib/commonjs/ui/providers/TonderProvider/TonderProviderWrapper.js +32 -0
  53. package/lib/commonjs/ui/providers/TonderProvider/TonderProviderWrapper.js.map +1 -0
  54. package/lib/commonjs/ui/providers/TonderProvider/index.js +11 -23
  55. package/lib/commonjs/ui/providers/TonderProvider/index.js.map +1 -1
  56. package/lib/commonjs/ui/styles/payment.js +2 -1
  57. package/lib/commonjs/ui/styles/payment.js.map +1 -1
  58. package/lib/module/core/3DSHandler.js +1 -2
  59. package/lib/module/core/3DSHandler.js.map +1 -1
  60. package/lib/module/core/BaseCheckout/index.js +6 -5
  61. package/lib/module/core/BaseCheckout/index.js.map +1 -1
  62. package/lib/module/core/BaseEnrollment/index.js +2 -2
  63. package/lib/module/core/BaseEnrollment/index.js.map +1 -1
  64. package/lib/module/core/BaseSDK/index.js +1 -3
  65. package/lib/module/core/BaseSDK/index.js.map +1 -1
  66. package/lib/module/core/EnrollmentContainer/index.js +24 -2
  67. package/lib/module/core/EnrollmentContainer/index.js.map +1 -1
  68. package/lib/module/core/PaymentInlineContainer/index.js +2 -2
  69. package/lib/module/core/PaymentInlineContainer/index.js.map +1 -1
  70. package/lib/module/core/PaymentLiteContainer/index.js +2 -2
  71. package/lib/module/core/PaymentLiteContainer/index.js.map +1 -1
  72. package/lib/module/infrastructure/HttpClient.js +1 -1
  73. package/lib/module/infrastructure/HttpClient.js.map +1 -1
  74. package/lib/module/services/SkyflowService.js +1 -1
  75. package/lib/module/services/SkyflowService.js.map +1 -1
  76. package/lib/module/shared/catalog/paymentMethodsCatalog.js +16 -0
  77. package/lib/module/shared/catalog/paymentMethodsCatalog.js.map +1 -1
  78. package/lib/module/shared/constants/environments.js +9 -1
  79. package/lib/module/shared/constants/environments.js.map +1 -1
  80. package/lib/module/shared/constants/paymentMethods.js +4 -1
  81. package/lib/module/shared/constants/paymentMethods.js.map +1 -1
  82. package/lib/module/shared/constants/skyflow.js +1 -1
  83. package/lib/module/shared/constants/skyflow.js.map +1 -1
  84. package/lib/module/ui/components/CardForm/index.js +2 -1
  85. package/lib/module/ui/components/CardForm/index.js.map +1 -1
  86. package/lib/module/ui/components/Input/CardCVVInput.js +8 -5
  87. package/lib/module/ui/components/Input/CardCVVInput.js.map +1 -1
  88. package/lib/module/ui/components/Input/CardExpirationDateInput.js +6 -1
  89. package/lib/module/ui/components/Input/CardExpirationDateInput.js.map +1 -1
  90. package/lib/module/ui/components/Input/CardExpirationMonthInput.js +5 -4
  91. package/lib/module/ui/components/Input/CardExpirationMonthInput.js.map +1 -1
  92. package/lib/module/ui/components/Input/CardExpirationYearInput.js +5 -4
  93. package/lib/module/ui/components/Input/CardExpirationYearInput.js.map +1 -1
  94. package/lib/module/ui/components/Input/CardHolderInput.js +5 -4
  95. package/lib/module/ui/components/Input/CardHolderInput.js.map +1 -1
  96. package/lib/module/ui/components/Input/CardNumberInput.js +8 -4
  97. package/lib/module/ui/components/Input/CardNumberInput.js.map +1 -1
  98. package/lib/module/ui/components/PaymentMethodsList/index.js +4 -2
  99. package/lib/module/ui/components/PaymentMethodsList/index.js.map +1 -1
  100. package/lib/module/ui/components/SavedCardsList/index.js +116 -29
  101. package/lib/module/ui/components/SavedCardsList/index.js.map +1 -1
  102. package/lib/module/ui/features/TonderEnrollment/index.js +53 -32
  103. package/lib/module/ui/features/TonderEnrollment/index.js.map +1 -1
  104. package/lib/module/ui/features/TonderPayment/index.js +57 -19
  105. package/lib/module/ui/features/TonderPayment/index.js.map +1 -1
  106. package/lib/module/ui/providers/SkyflowContainerWrapper/index.js +17 -16
  107. package/lib/module/ui/providers/SkyflowContainerWrapper/index.js.map +1 -1
  108. package/lib/module/ui/providers/TonderProvider/TonderProviderWrapper.js +27 -0
  109. package/lib/module/ui/providers/TonderProvider/TonderProviderWrapper.js.map +1 -0
  110. package/lib/module/ui/providers/TonderProvider/index.js +9 -21
  111. package/lib/module/ui/providers/TonderProvider/index.js.map +1 -1
  112. package/lib/module/ui/styles/payment.js +2 -1
  113. package/lib/module/ui/styles/payment.js.map +1 -1
  114. package/lib/typescript/commonjs/src/core/3DSHandler.d.ts.map +1 -1
  115. package/lib/typescript/commonjs/src/core/BaseCheckout/index.d.ts +1 -2
  116. package/lib/typescript/commonjs/src/core/BaseCheckout/index.d.ts.map +1 -1
  117. package/lib/typescript/commonjs/src/core/BaseEnrollment/index.d.ts +1 -2
  118. package/lib/typescript/commonjs/src/core/BaseEnrollment/index.d.ts.map +1 -1
  119. package/lib/typescript/commonjs/src/core/BaseSDK/index.d.ts +1 -3
  120. package/lib/typescript/commonjs/src/core/BaseSDK/index.d.ts.map +1 -1
  121. package/lib/typescript/commonjs/src/core/EnrollmentContainer/index.d.ts +3 -3
  122. package/lib/typescript/commonjs/src/core/EnrollmentContainer/index.d.ts.map +1 -1
  123. package/lib/typescript/commonjs/src/core/PaymentInlineContainer/index.d.ts +1 -2
  124. package/lib/typescript/commonjs/src/core/PaymentInlineContainer/index.d.ts.map +1 -1
  125. package/lib/typescript/commonjs/src/core/PaymentLiteContainer/index.d.ts +1 -2
  126. package/lib/typescript/commonjs/src/core/PaymentLiteContainer/index.d.ts.map +1 -1
  127. package/lib/typescript/commonjs/src/infrastructure/HttpClient.d.ts.map +1 -1
  128. package/lib/typescript/commonjs/src/services/SkyflowService.d.ts +1 -1
  129. package/lib/typescript/commonjs/src/services/SkyflowService.d.ts.map +1 -1
  130. package/lib/typescript/commonjs/src/shared/catalog/paymentMethodsCatalog.d.ts.map +1 -1
  131. package/lib/typescript/commonjs/src/shared/constants/environments.d.ts +2 -1
  132. package/lib/typescript/commonjs/src/shared/constants/environments.d.ts.map +1 -1
  133. package/lib/typescript/commonjs/src/shared/constants/paymentMethods.d.ts +3 -0
  134. package/lib/typescript/commonjs/src/shared/constants/paymentMethods.d.ts.map +1 -1
  135. package/lib/typescript/commonjs/src/types/baseCheckout.d.ts +1 -1
  136. package/lib/typescript/commonjs/src/types/baseCheckout.d.ts.map +1 -1
  137. package/lib/typescript/commonjs/src/types/baseEnrollment.d.ts +1 -1
  138. package/lib/typescript/commonjs/src/types/baseEnrollment.d.ts.map +1 -1
  139. package/lib/typescript/commonjs/src/types/baseSDK.d.ts +1 -1
  140. package/lib/typescript/commonjs/src/types/baseSDK.d.ts.map +1 -1
  141. package/lib/typescript/commonjs/src/types/enrollment.d.ts +8 -1
  142. package/lib/typescript/commonjs/src/types/enrollment.d.ts.map +1 -1
  143. package/lib/typescript/commonjs/src/types/input.d.ts +1 -1
  144. package/lib/typescript/commonjs/src/types/input.d.ts.map +1 -1
  145. package/lib/typescript/commonjs/src/types/transaction.d.ts +2 -0
  146. package/lib/typescript/commonjs/src/types/transaction.d.ts.map +1 -1
  147. package/lib/typescript/commonjs/src/ui/components/CardForm/index.d.ts +1 -1
  148. package/lib/typescript/commonjs/src/ui/components/CardForm/index.d.ts.map +1 -1
  149. package/lib/typescript/commonjs/src/ui/components/Input/CardCVVInput.d.ts +3 -1
  150. package/lib/typescript/commonjs/src/ui/components/Input/CardCVVInput.d.ts.map +1 -1
  151. package/lib/typescript/commonjs/src/ui/components/Input/CardExpirationDateInput.d.ts.map +1 -1
  152. package/lib/typescript/commonjs/src/ui/components/Input/CardExpirationMonthInput.d.ts.map +1 -1
  153. package/lib/typescript/commonjs/src/ui/components/Input/CardExpirationYearInput.d.ts.map +1 -1
  154. package/lib/typescript/commonjs/src/ui/components/Input/CardHolderInput.d.ts.map +1 -1
  155. package/lib/typescript/commonjs/src/ui/components/Input/CardNumberInput.d.ts.map +1 -1
  156. package/lib/typescript/commonjs/src/ui/components/PaymentMethodsList/index.d.ts.map +1 -1
  157. package/lib/typescript/commonjs/src/ui/components/SavedCardsList/index.d.ts +2 -1
  158. package/lib/typescript/commonjs/src/ui/components/SavedCardsList/index.d.ts.map +1 -1
  159. package/lib/typescript/commonjs/src/ui/features/TonderEnrollment/index.d.ts.map +1 -1
  160. package/lib/typescript/commonjs/src/ui/features/TonderPayment/index.d.ts.map +1 -1
  161. package/lib/typescript/commonjs/src/ui/providers/SkyflowContainerWrapper/index.d.ts +1 -8
  162. package/lib/typescript/commonjs/src/ui/providers/SkyflowContainerWrapper/index.d.ts.map +1 -1
  163. package/lib/typescript/commonjs/src/ui/providers/TonderProvider/TonderProviderWrapper.d.ts +10 -0
  164. package/lib/typescript/commonjs/src/ui/providers/TonderProvider/TonderProviderWrapper.d.ts.map +1 -0
  165. package/lib/typescript/commonjs/src/ui/providers/TonderProvider/index.d.ts.map +1 -1
  166. package/lib/typescript/commonjs/src/ui/styles/payment.d.ts +1 -0
  167. package/lib/typescript/commonjs/src/ui/styles/payment.d.ts.map +1 -1
  168. package/lib/typescript/module/src/core/3DSHandler.d.ts.map +1 -1
  169. package/lib/typescript/module/src/core/BaseCheckout/index.d.ts +1 -2
  170. package/lib/typescript/module/src/core/BaseCheckout/index.d.ts.map +1 -1
  171. package/lib/typescript/module/src/core/BaseEnrollment/index.d.ts +1 -2
  172. package/lib/typescript/module/src/core/BaseEnrollment/index.d.ts.map +1 -1
  173. package/lib/typescript/module/src/core/BaseSDK/index.d.ts +1 -3
  174. package/lib/typescript/module/src/core/BaseSDK/index.d.ts.map +1 -1
  175. package/lib/typescript/module/src/core/EnrollmentContainer/index.d.ts +3 -3
  176. package/lib/typescript/module/src/core/EnrollmentContainer/index.d.ts.map +1 -1
  177. package/lib/typescript/module/src/core/PaymentInlineContainer/index.d.ts +1 -2
  178. package/lib/typescript/module/src/core/PaymentInlineContainer/index.d.ts.map +1 -1
  179. package/lib/typescript/module/src/core/PaymentLiteContainer/index.d.ts +1 -2
  180. package/lib/typescript/module/src/core/PaymentLiteContainer/index.d.ts.map +1 -1
  181. package/lib/typescript/module/src/infrastructure/HttpClient.d.ts.map +1 -1
  182. package/lib/typescript/module/src/services/SkyflowService.d.ts +1 -1
  183. package/lib/typescript/module/src/services/SkyflowService.d.ts.map +1 -1
  184. package/lib/typescript/module/src/shared/catalog/paymentMethodsCatalog.d.ts.map +1 -1
  185. package/lib/typescript/module/src/shared/constants/environments.d.ts +2 -1
  186. package/lib/typescript/module/src/shared/constants/environments.d.ts.map +1 -1
  187. package/lib/typescript/module/src/shared/constants/paymentMethods.d.ts +3 -0
  188. package/lib/typescript/module/src/shared/constants/paymentMethods.d.ts.map +1 -1
  189. package/lib/typescript/module/src/types/baseCheckout.d.ts +1 -1
  190. package/lib/typescript/module/src/types/baseCheckout.d.ts.map +1 -1
  191. package/lib/typescript/module/src/types/baseEnrollment.d.ts +1 -1
  192. package/lib/typescript/module/src/types/baseEnrollment.d.ts.map +1 -1
  193. package/lib/typescript/module/src/types/baseSDK.d.ts +1 -1
  194. package/lib/typescript/module/src/types/baseSDK.d.ts.map +1 -1
  195. package/lib/typescript/module/src/types/enrollment.d.ts +8 -1
  196. package/lib/typescript/module/src/types/enrollment.d.ts.map +1 -1
  197. package/lib/typescript/module/src/types/input.d.ts +1 -1
  198. package/lib/typescript/module/src/types/input.d.ts.map +1 -1
  199. package/lib/typescript/module/src/types/transaction.d.ts +2 -0
  200. package/lib/typescript/module/src/types/transaction.d.ts.map +1 -1
  201. package/lib/typescript/module/src/ui/components/CardForm/index.d.ts +1 -1
  202. package/lib/typescript/module/src/ui/components/CardForm/index.d.ts.map +1 -1
  203. package/lib/typescript/module/src/ui/components/Input/CardCVVInput.d.ts +3 -1
  204. package/lib/typescript/module/src/ui/components/Input/CardCVVInput.d.ts.map +1 -1
  205. package/lib/typescript/module/src/ui/components/Input/CardExpirationDateInput.d.ts.map +1 -1
  206. package/lib/typescript/module/src/ui/components/Input/CardExpirationMonthInput.d.ts.map +1 -1
  207. package/lib/typescript/module/src/ui/components/Input/CardExpirationYearInput.d.ts.map +1 -1
  208. package/lib/typescript/module/src/ui/components/Input/CardHolderInput.d.ts.map +1 -1
  209. package/lib/typescript/module/src/ui/components/Input/CardNumberInput.d.ts.map +1 -1
  210. package/lib/typescript/module/src/ui/components/PaymentMethodsList/index.d.ts.map +1 -1
  211. package/lib/typescript/module/src/ui/components/SavedCardsList/index.d.ts +2 -1
  212. package/lib/typescript/module/src/ui/components/SavedCardsList/index.d.ts.map +1 -1
  213. package/lib/typescript/module/src/ui/features/TonderEnrollment/index.d.ts.map +1 -1
  214. package/lib/typescript/module/src/ui/features/TonderPayment/index.d.ts.map +1 -1
  215. package/lib/typescript/module/src/ui/providers/SkyflowContainerWrapper/index.d.ts +1 -8
  216. package/lib/typescript/module/src/ui/providers/SkyflowContainerWrapper/index.d.ts.map +1 -1
  217. package/lib/typescript/module/src/ui/providers/TonderProvider/TonderProviderWrapper.d.ts +10 -0
  218. package/lib/typescript/module/src/ui/providers/TonderProvider/TonderProviderWrapper.d.ts.map +1 -0
  219. package/lib/typescript/module/src/ui/providers/TonderProvider/index.d.ts.map +1 -1
  220. package/lib/typescript/module/src/ui/styles/payment.d.ts +1 -0
  221. package/lib/typescript/module/src/ui/styles/payment.d.ts.map +1 -1
  222. package/package.json +12 -5
  223. package/src/core/3DSHandler.ts +6 -5
  224. package/src/core/BaseCheckout/index.ts +10 -7
  225. package/src/core/BaseEnrollment/index.ts +2 -4
  226. package/src/core/BaseSDK/index.ts +1 -7
  227. package/src/core/EnrollmentContainer/index.ts +31 -7
  228. package/src/core/PaymentInlineContainer/index.ts +2 -7
  229. package/src/core/PaymentLiteContainer/index.ts +2 -7
  230. package/src/infrastructure/HttpClient.ts +10 -5
  231. package/src/services/SkyflowService.ts +2 -2
  232. package/src/shared/catalog/paymentMethodsCatalog.ts +16 -0
  233. package/src/shared/constants/environments.ts +10 -1
  234. package/src/shared/constants/paymentMethods.ts +3 -0
  235. package/src/shared/constants/skyflow.ts +1 -1
  236. package/src/types/baseCheckout.ts +1 -1
  237. package/src/types/baseEnrollment.ts +1 -1
  238. package/src/types/baseSDK.ts +1 -1
  239. package/src/types/enrollment.ts +19 -2
  240. package/src/types/input.ts +1 -1
  241. package/src/types/transaction.ts +2 -0
  242. package/src/ui/components/CardForm/index.tsx +6 -5
  243. package/src/ui/components/Input/CardCVVInput.tsx +6 -2
  244. package/src/ui/components/Input/CardExpirationDateInput.tsx +14 -8
  245. package/src/ui/components/Input/CardExpirationMonthInput.tsx +3 -1
  246. package/src/ui/components/Input/CardExpirationYearInput.tsx +3 -1
  247. package/src/ui/components/Input/CardHolderInput.tsx +3 -1
  248. package/src/ui/components/Input/CardNumberInput.tsx +6 -1
  249. package/src/ui/components/PaymentMethodsList/index.tsx +15 -3
  250. package/src/ui/components/SavedCardsList/index.tsx +186 -65
  251. package/src/ui/features/TonderEnrollment/index.tsx +63 -35
  252. package/src/ui/features/TonderPayment/index.tsx +81 -27
  253. package/src/ui/providers/SkyflowContainerWrapper/index.tsx +19 -24
  254. package/src/ui/providers/TonderProvider/TonderProviderWrapper.tsx +32 -0
  255. package/src/ui/providers/TonderProvider/index.tsx +8 -31
  256. package/src/ui/styles/payment.ts +1 -0
  257. package/lib/commonjs/ui/providers/InnerProvider/index.js +0 -25
  258. package/lib/commonjs/ui/providers/InnerProvider/index.js.map +0 -1
  259. package/lib/module/ui/providers/InnerProvider/index.js +0 -19
  260. package/lib/module/ui/providers/InnerProvider/index.js.map +0 -1
  261. package/lib/typescript/commonjs/src/ui/providers/InnerProvider/index.d.ts +0 -10
  262. package/lib/typescript/commonjs/src/ui/providers/InnerProvider/index.d.ts.map +0 -1
  263. package/lib/typescript/module/src/ui/providers/InnerProvider/index.d.ts +0 -10
  264. package/lib/typescript/module/src/ui/providers/InnerProvider/index.d.ts.map +0 -1
  265. package/src/ui/providers/InnerProvider/index.tsx +0 -24
@@ -1,17 +1,39 @@
1
- import React from 'react';
2
- import { StyleSheet, Text, View } from 'react-native';
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
- {state?.isCreated && (
43
- <NewCardForm
44
- showSaveOption={false}
45
- saveCard={false}
46
- onSaveCardChange={() => {}}
47
- style={state?.customization?.styles?.cardForm}
48
- labels={state?.customization?.labels}
49
- placeholders={state?.customization?.placeholders}
50
- events={state?.events}
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 { Image, StyleSheet, Text, View } from 'react-native';
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
- <View
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
- </View>
161
+ </TouchableOpacity>
122
162
  )}
123
163
 
124
- {state?.uiData?.selectedMethod === 'new' &&
125
- state?.isCreated &&
126
- state?.customization?.cardForm?.show && (
127
- <NewCardForm
128
- showSaveOption={
129
- state?.customization?.saveCards?.showSaveCardOption
130
- }
131
- saveCard={state?.uiData?.saveCard || false}
132
- onSaveCardChange={handleSaveCardChange}
133
- style={state?.customization?.styles?.cardForm}
134
- labels={state?.customization?.labels}
135
- placeholders={state?.customization?.placeholders}
136
- events={state?.events}
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 React, { useEffect } from 'react';
2
- import { useCollectContainer } from 'skf-rnad';
3
- import InnerProvider from '../InnerProvider';
4
- import type { ITonderContext } from '../../../types';
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
- interface SkyflowContainerWrapperProps {
8
- children: React.ReactNode;
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 (contextValue?.state?.isCreated && container) {
20
- contextValue.uiWrapper.setSkyFlowContainer(container);
12
+ if (state?.isCreated && container) {
13
+ uiWrapper.setSkyFlowContainer(undefined);
14
+ setTimeout(() => {
15
+ uiWrapper.setSkyFlowContainer(container);
16
+ }, 20);
21
17
  }
22
18
  }, [
23
- contextValue?.state?.isCreated,
24
- contextValue.sdk,
25
- contextValue.uiWrapper,
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
- tonder,
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
- <SkyflowProvider config={skyflowConfig}>
95
- <SkyflowContainerWrapper contextValue={contextValue}>
96
- {!!threeDSConfig.url && (
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
  };
@@ -18,6 +18,7 @@ const DEFAULT_PAYMENT_CONTAINER = StyleSheet.create({
18
18
  borderColor: '#e3e3e3',
19
19
  width: '100%',
20
20
  marginBottom: 10,
21
+ minHeight: 210,
21
22
  },
22
23
  });
23
24
  export { DEFAULT_INPUT_CONTAINER_STYLES, DEFAULT_PAYMENT_CONTAINER };
@@ -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;