react-native-unit-components 1.12.0 → 1.14.0

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 (348) hide show
  1. package/android/src/main/java/com/unitreactnativecomponents/UnitAddToWalletButtonViewManager.kt +1 -0
  2. package/android/src/main/java/com/unitreactnativecomponents/UnitReactNativeComponentsPackage.kt +9 -1
  3. package/android/src/main/java/com/unitreactnativecomponents/extensions/ContextExtensions.kt +2 -0
  4. package/android/src/main/java/com/unitreactnativecomponents/secureView/UNSecureViewManager.kt +19 -0
  5. package/android/src/main/java/com/unitreactnativecomponents/security/UNSecurityHelper.kt +37 -0
  6. package/android/src/main/java/com/unitreactnativecomponents/unSnapshotProtectionManager/UNSnapshotProtectionManager.kt +42 -0
  7. package/ios/UNSecurity/UNSecurityHelper.swift +90 -0
  8. package/ios/UNSecurity/UNSecurityHelperExportModule.m +7 -0
  9. package/ios/UNSharedServicesProvider/UNAppStateService.swift +38 -0
  10. package/ios/UNSharedServicesProvider/UNGlobalSnapshotProtectionService.swift +93 -0
  11. package/ios/UNSharedServicesProvider/UNPresentationService.swift +37 -0
  12. package/ios/UNSharedServicesProvider/UNSharedServicesProviderManager.swift +45 -0
  13. package/ios/UNSnapshotProtectionManager/UNSnapshotProtectionManager.swift +20 -0
  14. package/ios/UNSnapshotProtectionManager/UNSnapshotProtectionManagerExportModule.m +5 -0
  15. package/ios/UnitReactNativeComponents.xcodeproj/project.pbxproj +16 -0
  16. package/lib/commonjs/components/UNACHCreditComponent/UNACHCreditComponent.js +22 -21
  17. package/lib/commonjs/components/UNACHCreditComponent/UNACHCreditComponent.js.map +1 -1
  18. package/lib/commonjs/components/UNACHDebitComponent/UNACHDebitComponent.js +22 -21
  19. package/lib/commonjs/components/UNACHDebitComponent/UNACHDebitComponent.js.map +1 -1
  20. package/lib/commonjs/components/UNAccountComponent/UNAccountComponent.js +8 -4
  21. package/lib/commonjs/components/UNAccountComponent/UNAccountComponent.js.map +1 -1
  22. package/lib/commonjs/components/UNActivityComponent/UNActivityComponent.js +19 -20
  23. package/lib/commonjs/components/UNActivityComponent/UNActivityComponent.js.map +1 -1
  24. package/lib/commonjs/components/UNBookPaymentComponent/UNBookPaymentComponent.js +24 -21
  25. package/lib/commonjs/components/UNBookPaymentComponent/UNBookPaymentComponent.js.map +1 -1
  26. package/lib/commonjs/components/UNBottomSheetComponent/UNBottomSheetComponent.js.map +1 -1
  27. package/lib/commonjs/components/UNCardComponent/UNCardComponent.js +4 -3
  28. package/lib/commonjs/components/UNCardComponent/UNCardComponent.js.map +1 -1
  29. package/lib/commonjs/components/UNCheckDepositComponent/UNCheckDepositComponent.js +18 -19
  30. package/lib/commonjs/components/UNCheckDepositComponent/UNCheckDepositComponent.js.map +1 -1
  31. package/lib/commonjs/components/UNFundAccountPaymentComponent/UNFundAccountPaymentComponent.js +88 -0
  32. package/lib/commonjs/components/UNFundAccountPaymentComponent/UNFundAccountPaymentComponent.js.map +1 -0
  33. package/lib/commonjs/components/UNFundAccountPaymentComponent/UNFundAccountPaymentComponent.utils.js +30 -0
  34. package/lib/commonjs/components/UNFundAccountPaymentComponent/UNFundAccountPaymentComponent.utils.js.map +1 -0
  35. package/lib/commonjs/components/UNFundAccountPaymentComponent/index.js +21 -0
  36. package/lib/commonjs/components/UNFundAccountPaymentComponent/index.js.map +1 -0
  37. package/lib/commonjs/components/UNMultipleCardsComponent/UNMultipleCardsComponent.js +19 -20
  38. package/lib/commonjs/components/UNMultipleCardsComponent/UNMultipleCardsComponent.js.map +1 -1
  39. package/lib/commonjs/components/UNNextRepaymentComponent/UNNextRepaymentComponent.js +4 -3
  40. package/lib/commonjs/components/UNNextRepaymentComponent/UNNextRepaymentComponent.js.map +1 -1
  41. package/lib/commonjs/components/UNPayeeManagementComponent/UNPayeeManagementComponent.js +7 -2
  42. package/lib/commonjs/components/UNPayeeManagementComponent/UNPayeeManagementComponent.js.map +1 -1
  43. package/lib/commonjs/components/UNProgramDetailsComponent/UNProgramDetailsComponent.js +4 -3
  44. package/lib/commonjs/components/UNProgramDetailsComponent/UNProgramDetailsComponent.js.map +1 -1
  45. package/lib/commonjs/components/UNWhiteLabelAppComponent/UNWhiteLabelAppComponent.js +8 -3
  46. package/lib/commonjs/components/UNWhiteLabelAppComponent/UNWhiteLabelAppComponent.js.map +1 -1
  47. package/lib/commonjs/components/UNWirePaymentComponent/UNWirePaymentComponent.js +91 -0
  48. package/lib/commonjs/components/UNWirePaymentComponent/UNWirePaymentComponent.js.map +1 -0
  49. package/lib/commonjs/components/UNWirePaymentComponent/UNWirePaymentComponent.utils.js +29 -0
  50. package/lib/commonjs/components/UNWirePaymentComponent/UNWirePaymentComponent.utils.js.map +1 -0
  51. package/lib/commonjs/components/UNWirePaymentComponent/index.js +21 -0
  52. package/lib/commonjs/components/UNWirePaymentComponent/index.js.map +1 -0
  53. package/lib/commonjs/components/index.js +22 -0
  54. package/lib/commonjs/components/index.js.map +1 -1
  55. package/lib/commonjs/helpers/BottomSheet/BottomSheet.js +2 -1
  56. package/lib/commonjs/helpers/BottomSheet/BottomSheet.js.map +1 -1
  57. package/lib/commonjs/hooks/useIsJailbrokeDevice.js +22 -0
  58. package/lib/commonjs/hooks/useIsJailbrokeDevice.js.map +1 -0
  59. package/lib/commonjs/hooks/useSnapshotProtection.js +31 -0
  60. package/lib/commonjs/hooks/useSnapshotProtection.js.map +1 -0
  61. package/lib/commonjs/messages/webMessages/fundAccountPaymentMessage.js +6 -0
  62. package/lib/commonjs/messages/webMessages/fundAccountPaymentMessage.js.map +1 -0
  63. package/lib/commonjs/messages/webMessages/onLoadMessage.js +2 -0
  64. package/lib/commonjs/messages/webMessages/onLoadMessage.js.map +1 -1
  65. package/lib/commonjs/nativeComponents/UNAddToWallet/UNAddToWalletComponent/UNAddToWalletComponent.js +6 -1
  66. package/lib/commonjs/nativeComponents/UNAddToWallet/UNAddToWalletComponent/UNAddToWalletComponent.js.map +1 -1
  67. package/lib/commonjs/nativeComponents/UNBaseView/UNBaseView.js +39 -0
  68. package/lib/commonjs/nativeComponents/UNBaseView/UNBaseView.js.map +1 -0
  69. package/lib/commonjs/nativeComponents/UNBaseView/index.js +14 -0
  70. package/lib/commonjs/nativeComponents/UNBaseView/index.js.map +1 -0
  71. package/lib/commonjs/nativeModulesHelpers/UNSanpshotProtectionHelper/UNSnapshotProtectionHelper.js +26 -0
  72. package/lib/commonjs/nativeModulesHelpers/UNSanpshotProtectionHelper/UNSnapshotProtectionHelper.js.map +1 -0
  73. package/lib/commonjs/nativeModulesHelpers/UNSecurityHelper.js +39 -0
  74. package/lib/commonjs/nativeModulesHelpers/UNSecurityHelper.js.map +1 -0
  75. package/lib/commonjs/networking/common/UNNetworkConstants.js +2 -1
  76. package/lib/commonjs/networking/common/UNNetworkConstants.js.map +1 -1
  77. package/lib/commonjs/types/internal/webComponent.types.js +2 -0
  78. package/lib/commonjs/types/internal/webComponent.types.js.map +1 -1
  79. package/lib/commonjs/types/shared/checkDeposit.types.js.map +1 -1
  80. package/lib/commonjs/types/shared/env.types.js +1 -0
  81. package/lib/commonjs/types/shared/env.types.js.map +1 -1
  82. package/lib/commonjs/types/shared/fundAccountPayment.types.js +6 -0
  83. package/lib/commonjs/types/shared/fundAccountPayment.types.js.map +1 -0
  84. package/lib/commonjs/types/shared/index.js +22 -0
  85. package/lib/commonjs/types/shared/index.js.map +1 -1
  86. package/lib/commonjs/types/shared/payments.types.js +18 -1
  87. package/lib/commonjs/types/shared/payments.types.js.map +1 -1
  88. package/lib/commonjs/types/shared/securitySettings.js +12 -0
  89. package/lib/commonjs/types/shared/securitySettings.js.map +1 -0
  90. package/lib/commonjs/types/shared/types.js +10 -0
  91. package/lib/commonjs/types/shared/types.js.map +1 -1
  92. package/lib/commonjs/types/shared/wirePayment.types.js +6 -0
  93. package/lib/commonjs/types/shared/wirePayment.types.js.map +1 -0
  94. package/lib/commonjs/unitSdkManager/UnitSdk.constants.js +6 -1
  95. package/lib/commonjs/unitSdkManager/UnitSdk.constants.js.map +1 -1
  96. package/lib/commonjs/unitSdkManager/UnitSdkManager.js +25 -4
  97. package/lib/commonjs/unitSdkManager/UnitSdkManager.js.map +1 -1
  98. package/lib/commonjs/unitSdkManager/UnitSdkManager.utils.internal.js +2 -0
  99. package/lib/commonjs/unitSdkManager/UnitSdkManager.utils.internal.js.map +1 -1
  100. package/lib/commonjs/unitSdkManager/unitHelpersManager/UnitHelpersManager.js +18 -0
  101. package/lib/commonjs/unitSdkManager/unitHelpersManager/UnitHelpersManager.js.map +1 -1
  102. package/lib/commonjs/utils/onLoadMessages.utils.js +10 -0
  103. package/lib/commonjs/utils/onLoadMessages.utils.js.map +1 -0
  104. package/lib/commonjs/webComponent/WebComponent.js +4 -3
  105. package/lib/commonjs/webComponent/WebComponent.js.map +1 -1
  106. package/lib/commonjs/webComponent/WebComponent.utils.js +2 -2
  107. package/lib/commonjs/webComponent/WebComponent.utils.js.map +1 -1
  108. package/lib/commonjs/webComponent/html.js +1 -0
  109. package/lib/commonjs/webComponent/html.js.map +1 -1
  110. package/lib/module/components/UNACHCreditComponent/UNACHCreditComponent.js +23 -22
  111. package/lib/module/components/UNACHCreditComponent/UNACHCreditComponent.js.map +1 -1
  112. package/lib/module/components/UNACHDebitComponent/UNACHDebitComponent.js +23 -22
  113. package/lib/module/components/UNACHDebitComponent/UNACHDebitComponent.js.map +1 -1
  114. package/lib/module/components/UNAccountComponent/UNAccountComponent.js +9 -5
  115. package/lib/module/components/UNAccountComponent/UNAccountComponent.js.map +1 -1
  116. package/lib/module/components/UNActivityComponent/UNActivityComponent.js +20 -21
  117. package/lib/module/components/UNActivityComponent/UNActivityComponent.js.map +1 -1
  118. package/lib/module/components/UNBookPaymentComponent/UNBookPaymentComponent.js +24 -21
  119. package/lib/module/components/UNBookPaymentComponent/UNBookPaymentComponent.js.map +1 -1
  120. package/lib/module/components/UNBottomSheetComponent/UNBottomSheetComponent.js.map +1 -1
  121. package/lib/module/components/UNCardComponent/UNCardComponent.js +4 -3
  122. package/lib/module/components/UNCardComponent/UNCardComponent.js.map +1 -1
  123. package/lib/module/components/UNCheckDepositComponent/UNCheckDepositComponent.js +19 -20
  124. package/lib/module/components/UNCheckDepositComponent/UNCheckDepositComponent.js.map +1 -1
  125. package/lib/module/components/UNFundAccountPaymentComponent/UNFundAccountPaymentComponent.js +79 -0
  126. package/lib/module/components/UNFundAccountPaymentComponent/UNFundAccountPaymentComponent.js.map +1 -0
  127. package/lib/module/components/UNFundAccountPaymentComponent/UNFundAccountPaymentComponent.utils.js +22 -0
  128. package/lib/module/components/UNFundAccountPaymentComponent/UNFundAccountPaymentComponent.utils.js.map +1 -0
  129. package/lib/module/components/UNFundAccountPaymentComponent/index.js +2 -0
  130. package/lib/module/components/UNFundAccountPaymentComponent/index.js.map +1 -0
  131. package/lib/module/components/UNMultipleCardsComponent/UNMultipleCardsComponent.js +20 -21
  132. package/lib/module/components/UNMultipleCardsComponent/UNMultipleCardsComponent.js.map +1 -1
  133. package/lib/module/components/UNNextRepaymentComponent/UNNextRepaymentComponent.js +4 -3
  134. package/lib/module/components/UNNextRepaymentComponent/UNNextRepaymentComponent.js.map +1 -1
  135. package/lib/module/components/UNPayeeManagementComponent/UNPayeeManagementComponent.js +7 -2
  136. package/lib/module/components/UNPayeeManagementComponent/UNPayeeManagementComponent.js.map +1 -1
  137. package/lib/module/components/UNProgramDetailsComponent/UNProgramDetailsComponent.js +4 -3
  138. package/lib/module/components/UNProgramDetailsComponent/UNProgramDetailsComponent.js.map +1 -1
  139. package/lib/module/components/UNWhiteLabelAppComponent/UNWhiteLabelAppComponent.js +8 -3
  140. package/lib/module/components/UNWhiteLabelAppComponent/UNWhiteLabelAppComponent.js.map +1 -1
  141. package/lib/module/components/UNWirePaymentComponent/UNWirePaymentComponent.js +83 -0
  142. package/lib/module/components/UNWirePaymentComponent/UNWirePaymentComponent.js.map +1 -0
  143. package/lib/module/components/UNWirePaymentComponent/UNWirePaymentComponent.utils.js +21 -0
  144. package/lib/module/components/UNWirePaymentComponent/UNWirePaymentComponent.utils.js.map +1 -0
  145. package/lib/module/components/UNWirePaymentComponent/index.js +2 -0
  146. package/lib/module/components/UNWirePaymentComponent/index.js.map +1 -0
  147. package/lib/module/components/index.js +2 -0
  148. package/lib/module/components/index.js.map +1 -1
  149. package/lib/module/helpers/BottomSheet/BottomSheet.js +2 -1
  150. package/lib/module/helpers/BottomSheet/BottomSheet.js.map +1 -1
  151. package/lib/module/hooks/useIsJailbrokeDevice.js +14 -0
  152. package/lib/module/hooks/useIsJailbrokeDevice.js.map +1 -0
  153. package/lib/module/hooks/useSnapshotProtection.js +23 -0
  154. package/lib/module/hooks/useSnapshotProtection.js.map +1 -0
  155. package/lib/module/messages/webMessages/fundAccountPaymentMessage.js +2 -0
  156. package/lib/module/messages/webMessages/fundAccountPaymentMessage.js.map +1 -0
  157. package/lib/module/messages/webMessages/onLoadMessage.js +2 -0
  158. package/lib/module/messages/webMessages/onLoadMessage.js.map +1 -1
  159. package/lib/module/nativeComponents/UNAddToWallet/UNAddToWalletComponent/UNAddToWalletComponent.js +6 -1
  160. package/lib/module/nativeComponents/UNAddToWallet/UNAddToWalletComponent/UNAddToWalletComponent.js.map +1 -1
  161. package/lib/module/nativeComponents/UNBaseView/UNBaseView.js +31 -0
  162. package/lib/module/nativeComponents/UNBaseView/UNBaseView.js.map +1 -0
  163. package/lib/module/nativeComponents/UNBaseView/index.js +2 -0
  164. package/lib/module/nativeComponents/UNBaseView/index.js.map +1 -0
  165. package/lib/module/nativeModulesHelpers/UNSanpshotProtectionHelper/UNSnapshotProtectionHelper.js +20 -0
  166. package/lib/module/nativeModulesHelpers/UNSanpshotProtectionHelper/UNSnapshotProtectionHelper.js.map +1 -0
  167. package/lib/module/nativeModulesHelpers/UNSecurityHelper.js +33 -0
  168. package/lib/module/nativeModulesHelpers/UNSecurityHelper.js.map +1 -0
  169. package/lib/module/networking/common/UNNetworkConstants.js +2 -1
  170. package/lib/module/networking/common/UNNetworkConstants.js.map +1 -1
  171. package/lib/module/types/internal/webComponent.types.js +2 -0
  172. package/lib/module/types/internal/webComponent.types.js.map +1 -1
  173. package/lib/module/types/shared/checkDeposit.types.js.map +1 -1
  174. package/lib/module/types/shared/env.types.js +1 -0
  175. package/lib/module/types/shared/env.types.js.map +1 -1
  176. package/lib/module/types/shared/fundAccountPayment.types.js +2 -0
  177. package/lib/module/types/shared/fundAccountPayment.types.js.map +1 -0
  178. package/lib/module/types/shared/index.js +2 -0
  179. package/lib/module/types/shared/index.js.map +1 -1
  180. package/lib/module/types/shared/payments.types.js +17 -0
  181. package/lib/module/types/shared/payments.types.js.map +1 -1
  182. package/lib/module/types/shared/securitySettings.js +6 -0
  183. package/lib/module/types/shared/securitySettings.js.map +1 -0
  184. package/lib/module/types/shared/types.js +6 -0
  185. package/lib/module/types/shared/types.js.map +1 -1
  186. package/lib/module/types/shared/wirePayment.types.js +2 -0
  187. package/lib/module/types/shared/wirePayment.types.js.map +1 -0
  188. package/lib/module/unitSdkManager/UnitSdk.constants.js +6 -1
  189. package/lib/module/unitSdkManager/UnitSdk.constants.js.map +1 -1
  190. package/lib/module/unitSdkManager/UnitSdkManager.js +25 -4
  191. package/lib/module/unitSdkManager/UnitSdkManager.js.map +1 -1
  192. package/lib/module/unitSdkManager/UnitSdkManager.utils.internal.js +2 -0
  193. package/lib/module/unitSdkManager/UnitSdkManager.utils.internal.js.map +1 -1
  194. package/lib/module/unitSdkManager/unitHelpersManager/UnitHelpersManager.js +18 -0
  195. package/lib/module/unitSdkManager/unitHelpersManager/UnitHelpersManager.js.map +1 -1
  196. package/lib/module/utils/onLoadMessages.utils.js +4 -0
  197. package/lib/module/utils/onLoadMessages.utils.js.map +1 -0
  198. package/lib/module/webComponent/WebComponent.js +4 -3
  199. package/lib/module/webComponent/WebComponent.js.map +1 -1
  200. package/lib/module/webComponent/WebComponent.utils.js +2 -2
  201. package/lib/module/webComponent/WebComponent.utils.js.map +1 -1
  202. package/lib/module/webComponent/html.js +1 -0
  203. package/lib/module/webComponent/html.js.map +1 -1
  204. package/lib/typescript/src/components/UNACHCreditComponent/UNACHCreditComponent.d.ts.map +1 -1
  205. package/lib/typescript/src/components/UNACHDebitComponent/UNACHDebitComponent.d.ts.map +1 -1
  206. package/lib/typescript/src/components/UNAccountComponent/UNAccountComponent.d.ts.map +1 -1
  207. package/lib/typescript/src/components/UNActivityComponent/UNActivityComponent.d.ts.map +1 -1
  208. package/lib/typescript/src/components/UNBookPaymentComponent/UNBookPaymentComponent.d.ts +1 -1
  209. package/lib/typescript/src/components/UNBookPaymentComponent/UNBookPaymentComponent.d.ts.map +1 -1
  210. package/lib/typescript/src/components/UNBottomSheetComponent/UNBottomSheetComponent.d.ts.map +1 -1
  211. package/lib/typescript/src/components/UNCardComponent/UNCardComponent.d.ts.map +1 -1
  212. package/lib/typescript/src/components/UNCheckDepositComponent/UNCheckDepositComponent.d.ts.map +1 -1
  213. package/lib/typescript/src/components/UNFundAccountPaymentComponent/UNFundAccountPaymentComponent.d.ts +19 -0
  214. package/lib/typescript/src/components/UNFundAccountPaymentComponent/UNFundAccountPaymentComponent.d.ts.map +1 -0
  215. package/lib/typescript/src/components/UNFundAccountPaymentComponent/UNFundAccountPaymentComponent.utils.d.ts +4 -0
  216. package/lib/typescript/src/components/UNFundAccountPaymentComponent/UNFundAccountPaymentComponent.utils.d.ts.map +1 -0
  217. package/lib/typescript/src/components/UNFundAccountPaymentComponent/index.d.ts +2 -0
  218. package/lib/typescript/src/components/UNFundAccountPaymentComponent/index.d.ts.map +1 -0
  219. package/lib/typescript/src/components/UNMultipleCardsComponent/UNMultipleCardsComponent.d.ts.map +1 -1
  220. package/lib/typescript/src/components/UNNextRepaymentComponent/UNNextRepaymentComponent.d.ts.map +1 -1
  221. package/lib/typescript/src/components/UNPayeeManagementComponent/UNPayeeManagementComponent.d.ts.map +1 -1
  222. package/lib/typescript/src/components/UNProgramDetailsComponent/UNProgramDetailsComponent.d.ts.map +1 -1
  223. package/lib/typescript/src/components/UNWhiteLabelAppComponent/UNWhiteLabelAppComponent.d.ts.map +1 -1
  224. package/lib/typescript/src/components/UNWirePaymentComponent/UNWirePaymentComponent.d.ts +20 -0
  225. package/lib/typescript/src/components/UNWirePaymentComponent/UNWirePaymentComponent.d.ts.map +1 -0
  226. package/lib/typescript/src/components/UNWirePaymentComponent/UNWirePaymentComponent.utils.d.ts +4 -0
  227. package/lib/typescript/src/components/UNWirePaymentComponent/UNWirePaymentComponent.utils.d.ts.map +1 -0
  228. package/lib/typescript/src/components/UNWirePaymentComponent/index.d.ts +2 -0
  229. package/lib/typescript/src/components/UNWirePaymentComponent/index.d.ts.map +1 -0
  230. package/lib/typescript/src/components/index.d.ts +2 -0
  231. package/lib/typescript/src/components/index.d.ts.map +1 -1
  232. package/lib/typescript/src/helpers/BottomSheet/BottomSheet.d.ts.map +1 -1
  233. package/lib/typescript/src/hooks/useIsJailbrokeDevice.d.ts +2 -0
  234. package/lib/typescript/src/hooks/useIsJailbrokeDevice.d.ts.map +1 -0
  235. package/lib/typescript/src/hooks/useSnapshotProtection.d.ts +2 -0
  236. package/lib/typescript/src/hooks/useSnapshotProtection.d.ts.map +1 -0
  237. package/lib/typescript/src/messages/webMessages/fundAccountPaymentMessage.d.ts +6 -0
  238. package/lib/typescript/src/messages/webMessages/fundAccountPaymentMessage.d.ts.map +1 -0
  239. package/lib/typescript/src/messages/webMessages/index.d.ts +2 -1
  240. package/lib/typescript/src/messages/webMessages/index.d.ts.map +1 -1
  241. package/lib/typescript/src/messages/webMessages/onLoadMessage.d.ts +10 -3
  242. package/lib/typescript/src/messages/webMessages/onLoadMessage.d.ts.map +1 -1
  243. package/lib/typescript/src/nativeComponents/UNAddToWallet/UNAddToWalletComponent/UNAddToWalletComponent.d.ts.map +1 -1
  244. package/lib/typescript/src/nativeComponents/UNBaseView/UNBaseView.d.ts +11 -0
  245. package/lib/typescript/src/nativeComponents/UNBaseView/UNBaseView.d.ts.map +1 -0
  246. package/lib/typescript/src/nativeComponents/UNBaseView/index.d.ts +2 -0
  247. package/lib/typescript/src/nativeComponents/UNBaseView/index.d.ts.map +1 -0
  248. package/lib/typescript/src/nativeModulesHelpers/UNSanpshotProtectionHelper/UNSnapshotProtectionHelper.d.ts +6 -0
  249. package/lib/typescript/src/nativeModulesHelpers/UNSanpshotProtectionHelper/UNSnapshotProtectionHelper.d.ts.map +1 -0
  250. package/lib/typescript/src/nativeModulesHelpers/UNSecurityHelper.d.ts +12 -0
  251. package/lib/typescript/src/nativeModulesHelpers/UNSecurityHelper.d.ts.map +1 -0
  252. package/lib/typescript/src/networking/common/UNNetworkConstants.d.ts +1 -0
  253. package/lib/typescript/src/networking/common/UNNetworkConstants.d.ts.map +1 -1
  254. package/lib/typescript/src/types/internal/webComponent.types.d.ts +2 -0
  255. package/lib/typescript/src/types/internal/webComponent.types.d.ts.map +1 -1
  256. package/lib/typescript/src/types/shared/achCredit.types.d.ts +3 -3
  257. package/lib/typescript/src/types/shared/achCredit.types.d.ts.map +1 -1
  258. package/lib/typescript/src/types/shared/bookPayment.types.d.ts +2 -2
  259. package/lib/typescript/src/types/shared/bookPayment.types.d.ts.map +1 -1
  260. package/lib/typescript/src/types/shared/checkDeposit.types.d.ts +1 -1
  261. package/lib/typescript/src/types/shared/checkDeposit.types.d.ts.map +1 -1
  262. package/lib/typescript/src/types/shared/env.types.d.ts +2 -1
  263. package/lib/typescript/src/types/shared/env.types.d.ts.map +1 -1
  264. package/lib/typescript/src/types/shared/fundAccountPayment.types.d.ts +38 -0
  265. package/lib/typescript/src/types/shared/fundAccountPayment.types.d.ts.map +1 -0
  266. package/lib/typescript/src/types/shared/index.d.ts +2 -0
  267. package/lib/typescript/src/types/shared/index.d.ts.map +1 -1
  268. package/lib/typescript/src/types/shared/payments.types.d.ts +29 -1
  269. package/lib/typescript/src/types/shared/payments.types.d.ts.map +1 -1
  270. package/lib/typescript/src/types/shared/securitySettings.d.ts +8 -0
  271. package/lib/typescript/src/types/shared/securitySettings.d.ts.map +1 -0
  272. package/lib/typescript/src/types/shared/types.d.ts +7 -4
  273. package/lib/typescript/src/types/shared/types.d.ts.map +1 -1
  274. package/lib/typescript/src/types/shared/wirePayment.types.d.ts +42 -0
  275. package/lib/typescript/src/types/shared/wirePayment.types.d.ts.map +1 -0
  276. package/lib/typescript/src/unitSdkManager/UnitSdk.constants.d.ts +2 -0
  277. package/lib/typescript/src/unitSdkManager/UnitSdk.constants.d.ts.map +1 -1
  278. package/lib/typescript/src/unitSdkManager/UnitSdkManager.d.ts +7 -1
  279. package/lib/typescript/src/unitSdkManager/UnitSdkManager.d.ts.map +1 -1
  280. package/lib/typescript/src/unitSdkManager/UnitSdkManager.utils.internal.d.ts.map +1 -1
  281. package/lib/typescript/src/unitSdkManager/unitHelpersManager/UnitHelpersManager.d.ts +2 -0
  282. package/lib/typescript/src/unitSdkManager/unitHelpersManager/UnitHelpersManager.d.ts.map +1 -1
  283. package/lib/typescript/src/utils/onLoadMessages.utils.d.ts +2 -0
  284. package/lib/typescript/src/utils/onLoadMessages.utils.d.ts.map +1 -0
  285. package/lib/typescript/src/webComponent/WebComponent.d.ts.map +1 -1
  286. package/lib/typescript/src/webComponent/WebComponent.utils.d.ts.map +1 -1
  287. package/lib/typescript/src/webComponent/html.d.ts.map +1 -1
  288. package/package.json +1 -1
  289. package/react-native-unit-components.podspec +1 -1
  290. package/src/components/UNACHCreditComponent/UNACHCreditComponent.tsx +11 -16
  291. package/src/components/UNACHDebitComponent/UNACHDebitComponent.tsx +11 -17
  292. package/src/components/UNAccountComponent/UNAccountComponent.tsx +9 -5
  293. package/src/components/UNActivityComponent/UNActivityComponent.tsx +7 -14
  294. package/src/components/UNBookPaymentComponent/UNBookPaymentComponent.tsx +14 -17
  295. package/src/components/UNBottomSheetComponent/UNBottomSheetComponent.tsx +0 -1
  296. package/src/components/UNCardComponent/UNCardComponent.tsx +3 -3
  297. package/src/components/UNCheckDepositComponent/UNCheckDepositComponent.tsx +7 -14
  298. package/src/components/UNFundAccountPaymentComponent/UNFundAccountPaymentComponent.tsx +111 -0
  299. package/src/components/UNFundAccountPaymentComponent/UNFundAccountPaymentComponent.utils.ts +24 -0
  300. package/src/components/UNFundAccountPaymentComponent/index.ts +1 -0
  301. package/src/components/UNMultipleCardsComponent/UNMultipleCardsComponent.tsx +6 -14
  302. package/src/components/UNNextRepaymentComponent/UNNextRepaymentComponent.tsx +3 -3
  303. package/src/components/UNPayeeManagementComponent/UNPayeeManagementComponent.tsx +14 -11
  304. package/src/components/UNProgramDetailsComponent/UNProgramDetailsComponent.tsx +3 -3
  305. package/src/components/UNWhiteLabelAppComponent/UNWhiteLabelAppComponent.tsx +15 -12
  306. package/src/components/UNWirePaymentComponent/UNWirePaymentComponent.tsx +109 -0
  307. package/src/components/UNWirePaymentComponent/UNWirePaymentComponent.utils.ts +23 -0
  308. package/src/components/UNWirePaymentComponent/index.ts +1 -0
  309. package/src/components/index.ts +2 -0
  310. package/src/helpers/BottomSheet/BottomSheet.tsx +3 -4
  311. package/src/hooks/useIsJailbrokeDevice.ts +17 -0
  312. package/src/hooks/useSnapshotProtection.ts +25 -0
  313. package/src/messages/webMessages/fundAccountPaymentMessage.ts +8 -0
  314. package/src/messages/webMessages/index.ts +2 -0
  315. package/src/messages/webMessages/onLoadMessage.ts +13 -2
  316. package/src/messages/webMessages/unitMessages.ts +1 -1
  317. package/src/nativeComponents/UNAddToWallet/UNAddToWalletComponent/UNAddToWalletComponent.tsx +12 -11
  318. package/src/nativeComponents/UNBaseView/UNBaseView.tsx +50 -0
  319. package/src/nativeComponents/UNBaseView/index.ts +1 -0
  320. package/src/nativeModulesHelpers/UNSanpshotProtectionHelper/UNSnapshotProtectionHelper.ts +21 -0
  321. package/src/nativeModulesHelpers/UNSecurityHelper.ts +35 -0
  322. package/src/networking/common/UNNetworkConstants.ts +2 -1
  323. package/src/types/internal/webComponent.types.ts +2 -0
  324. package/src/types/shared/achCredit.types.ts +3 -3
  325. package/src/types/shared/bookPayment.types.ts +2 -2
  326. package/src/types/shared/checkDeposit.types.ts +1 -2
  327. package/src/types/shared/env.types.ts +2 -1
  328. package/src/types/shared/fundAccountPayment.types.ts +38 -0
  329. package/src/types/shared/index.ts +2 -0
  330. package/src/types/shared/payments.types.ts +33 -1
  331. package/src/types/shared/securitySettings.ts +8 -0
  332. package/src/types/shared/types.ts +9 -4
  333. package/src/types/shared/wirePayment.types.ts +43 -0
  334. package/src/unitSdkManager/UnitSdk.constants.ts +6 -0
  335. package/src/unitSdkManager/UnitSdkManager.ts +37 -4
  336. package/src/unitSdkManager/UnitSdkManager.utils.internal.ts +3 -0
  337. package/src/unitSdkManager/unitHelpersManager/UnitHelpersManager.ts +20 -0
  338. package/src/utils/onLoadMessages.utils.ts +3 -0
  339. package/src/webComponent/WebComponent.tsx +4 -3
  340. package/src/webComponent/WebComponent.utils.ts +2 -2
  341. package/src/webComponent/html.ts +1 -0
  342. package/lib/commonjs/utils/SDKInfo.js +0 -13
  343. package/lib/commonjs/utils/SDKInfo.js.map +0 -1
  344. package/lib/module/utils/SDKInfo.js +0 -5
  345. package/lib/module/utils/SDKInfo.js.map +0 -1
  346. package/lib/typescript/src/utils/SDKInfo.d.ts +0 -2
  347. package/lib/typescript/src/utils/SDKInfo.d.ts.map +0 -1
  348. package/src/utils/SDKInfo.ts +0 -5
@@ -1,5 +1,4 @@
1
- import React, { useImperativeHandle, useRef, useState } from 'react';
2
- import { View } from 'react-native';
1
+ import React, { useEffect, useImperativeHandle, useRef, useState } from 'react';
3
2
  import type WebView from 'react-native-webview';
4
3
  import { HeightEvent, PageMessage } from '../..//messages/webMessages/pageMessage';
5
4
  import {
@@ -34,6 +33,7 @@ import { useDispatch } from 'react-redux';
34
33
  import { setEvent } from '../../slices/SharedEventsSlice';
35
34
  import { useListenerToEvent } from '../../hooks/useListenerToEvent';
36
35
  import { UNAccountMenuItem, UNCreditAccount } from '../../types/shared';
36
+ import { UNBaseView } from '../../nativeComponents/UNBaseView';
37
37
 
38
38
  export interface UNAccountComponentProps {
39
39
  // inputs
@@ -71,7 +71,11 @@ const UNAccountComponent = React.forwardRef<UNAccountRef, UNAccountComponentProp
71
71
  const [height, setHeight] = useState(0);
72
72
  const webRef = useRef<WebView>(null);
73
73
  // currentAccountId is used to store the current account id for the "imperative" refresh event.
74
- const accountIdRef = useRef<string | undefined>(props.accountId);
74
+ const accountIdRef = useRef<string | undefined>(undefined);
75
+
76
+ useEffect(() => {
77
+ accountIdRef.current = props.accountId;
78
+ }, [props.accountId]);
75
79
 
76
80
  const handleAccountChanged = (account: UNAccountData) => {
77
81
  accountIdRef.current = account.id;
@@ -161,7 +165,7 @@ const UNAccountComponent = React.forwardRef<UNAccountRef, UNAccountComponentProp
161
165
  };
162
166
 
163
167
  return (
164
- <View style={{ height, width: '100%' }}>
168
+ <UNBaseView style={{ height, width: '100%' }} onLoadError={ handleUnitOnLoad }>
165
169
  <WebComponent
166
170
  ref={webRef}
167
171
  type={WebComponentType.account}
@@ -173,7 +177,7 @@ const UNAccountComponent = React.forwardRef<UNAccountRef, UNAccountComponentProp
173
177
  onMessage={message => handleMessage(message)}
174
178
  isScrollable={false}
175
179
  />
176
- </View>
180
+ </UNBaseView>
177
181
  );
178
182
  });
179
183
 
@@ -1,5 +1,5 @@
1
1
  import React, { useImperativeHandle, useRef, useState } from 'react';
2
- import { Dimensions, View } from 'react-native';
2
+ import { Dimensions } from 'react-native';
3
3
  import {
4
4
  RequestRefreshEvent,
5
5
  RequestRenderingEvent,
@@ -31,6 +31,7 @@ import { setEvent } from '../../slices/SharedEventsSlice';
31
31
  import { useDispatch } from 'react-redux';
32
32
  import { useListenerToEvent } from '../../hooks/useListenerToEvent';
33
33
  import type { UNActivityComponentPaginationType } from '../../types/shared';
34
+ import { UNBaseView } from '../../nativeComponents/UNBaseView';
34
35
 
35
36
  const DEFAULT_HEIGHT = Dimensions.get('window').height * 0.5;
36
37
 
@@ -140,8 +141,10 @@ const UNActivityComponent = React.forwardRef<UNActivityRef, UNActivityComponentP
140
141
  }
141
142
  };
142
143
 
143
- const renderActivityWebView = () => {
144
- return (
144
+ const style = defaultHeight ? { height: defaultHeight } : { flex: 1 };
145
+
146
+ return (
147
+ <UNBaseView style={style} onLoadError={ handleUnitOnLoad }>
145
148
  <WebComponent
146
149
  ref={webRef}
147
150
  type={WebComponentType.activity}
@@ -153,17 +156,7 @@ const UNActivityComponent = React.forwardRef<UNActivityRef, UNActivityComponentP
153
156
  language={props.language}
154
157
  script={getActivityScript()}
155
158
  />
156
- );
157
- };
158
-
159
- if (!defaultHeight) {
160
- return renderActivityWebView();
161
- }
162
-
163
- return (
164
- <View style={{ height: defaultHeight }}>
165
- {renderActivityWebView()}
166
- </View>
159
+ </UNBaseView>
167
160
  );
168
161
  });
169
162
 
@@ -10,13 +10,14 @@ import type {
10
10
  UNOnLoadResponseData,
11
11
  } from '../../types/shared';
12
12
  import { HeightEvent, PageMessage } from '../../messages/webMessages/pageMessage';
13
- import { View } from 'react-native';
14
13
  import { UnitMessage } from '../../messages/webMessages/unitMessages';
15
14
  import { PaymentMessage } from '../../messages/webMessages/paymentsMessage';
16
15
  import type { BookPaymentEvent } from '../../messages/webMessages/bookPaymentMessage';
17
16
  import { RESPONSE_KEYS, UnitOnLoadResponseEvent } from '../../messages/webMessages/onLoadMessage';
18
17
  import { PresentationMode, WebComponentType } from '../../types/internal/webComponent.types';
19
18
  import { withReduxStore } from '../../helpers/store/helpers';
19
+ import { UNBaseView } from '../../nativeComponents/UNBaseView';
20
+ import { ensureArray } from '../../utils/onLoadMessages.utils';
20
21
 
21
22
  export interface UNBookPaymentComponentProps {
22
23
  //inputs
@@ -35,7 +36,7 @@ export interface UNBookPaymentComponentProps {
35
36
 
36
37
  // events
37
38
  onPaymentCreated?: (data: UNBookPaymentData) => void;
38
- onLoad?: (response: UNOnLoadResponse<UNAccountData>) => void;
39
+ onLoad?: (response: UNOnLoadResponse<[UNAccountData]>) => void;
39
40
  onInitialStageBackButtonClicked?: () => void;
40
41
  onFinalStageDoneButtonClicked?: () => void;
41
42
  }
@@ -55,8 +56,12 @@ const UNBookPaymentComponent = (props: UNBookPaymentComponentProps) => {
55
56
  }
56
57
 
57
58
  if (RESPONSE_KEYS.account in response) {
59
+ const account = response[RESPONSE_KEYS.account].data;
58
60
  // AccountOnLoadResponse;
59
- props.onLoad(response[RESPONSE_KEYS.account] as UNOnLoadResponseData<UNAccountData>);
61
+ const paymentOnload: UNOnLoadResponseData<[UNAccountData]> = {
62
+ data: ensureArray(account),
63
+ };
64
+ props.onLoad(paymentOnload);
60
65
  return;
61
66
  }
62
67
 
@@ -93,29 +98,21 @@ const UNBookPaymentComponent = (props: UNBookPaymentComponentProps) => {
93
98
  }
94
99
  };
95
100
 
96
- const renderBookPaymentWebView = () => {
97
- return (
101
+ const style = presentationMode === PresentationMode.Inherit ? { flex: 1 } : { height: height };
102
+
103
+ return (
104
+ <UNBaseView style={style} onLoadError={ handleUnitOnLoad }>
98
105
  <WebComponent
99
106
  type={WebComponentType.bookPayment}
100
107
  presentationMode={presentationMode}
101
108
  params={getBookPaymentParams(props)}
102
109
  script={getBookPaymentScript()}
103
110
  onMessage={(message: WebViewMessage) => handleWebViewMessage(message)}
104
- isScrollable={false}
111
+ isScrollable={true}
105
112
  theme={props.theme}
106
113
  language={props.language}
107
114
  />
108
- );
109
- };
110
-
111
- if (presentationMode === PresentationMode.Inherit) {
112
- return renderBookPaymentWebView();
113
- }
114
-
115
- return (
116
- <View style={{ height: height }}>
117
- {renderBookPaymentWebView()}
118
- </View>
115
+ </UNBaseView>
119
116
  );
120
117
  };
121
118
 
@@ -39,7 +39,6 @@ import { WebComponentType } from '../../types/internal/webComponent.types';
39
39
  import { getNativeComponentDataFromEvent } from './UNBottomSheetComponent.utils';
40
40
 
41
41
  const UNBottomSheetComponent = () => {
42
-
43
42
  const dispatch = useDispatch();
44
43
 
45
44
  const isBottomSheetActive = useSelector((state: RootState) => state.bottomSheet.isBottomSheetActive);
@@ -1,5 +1,4 @@
1
1
  import React, { useImperativeHandle, useRef, useState, useEffect } from 'react';
2
- import { View } from 'react-native';
3
2
  import type WebView from 'react-native-webview';
4
3
  import { HeightEvent, PageMessage } from '../../messages/webMessages/pageMessage';
5
4
  import { RequestRefreshEvent, RequestRenderingEvent, UnitMessage } from '../../messages/webMessages/unitMessages';
@@ -32,6 +31,7 @@ import { withReduxStoreAndRefForwarding } from '../../helpers/store/helpers';
32
31
  import { useListenerToEvent } from '../../hooks/useListenerToEvent';
33
32
  import { setEvent } from '../../slices/SharedEventsSlice';
34
33
  import { UNCardMenuItem } from '../../types/shared';
34
+ import { UNBaseView } from '../../nativeComponents/UNBaseView';
35
35
 
36
36
  export interface UNCardComponentProps {
37
37
  // inputs
@@ -169,7 +169,7 @@ const UNCardComponent = React.forwardRef<CardRef, UNCardComponentProps>(function
169
169
  }, []);
170
170
 
171
171
  return (
172
- <View style={{ height, width: '100%', minWidth: 235 }}>
172
+ <UNBaseView style={{ height, width: '100%', minWidth: 235 }} onLoadError={ handleUnitOnLoad }>
173
173
  <WebComponent
174
174
  ref={webRef}
175
175
  type={WebComponentType.card}
@@ -181,7 +181,7 @@ const UNCardComponent = React.forwardRef<CardRef, UNCardComponentProps>(function
181
181
  onMessage={message => handleMessage(message)}
182
182
  isScrollable={false}
183
183
  />
184
- </View>
184
+ </UNBaseView>
185
185
  );
186
186
 
187
187
  });
@@ -1,5 +1,5 @@
1
1
  import React, { useEffect, useState } from 'react';
2
- import { View, NativeModules, Platform } from 'react-native';
2
+ import { NativeModules, Platform } from 'react-native';
3
3
  import { WebComponent } from '../../webComponent/WebComponent';
4
4
  import type { WebViewMessage } from '../../messages/webMessages';
5
5
  import { HeightEvent, PageMessage } from '../../messages/webMessages/pageMessage';
@@ -12,6 +12,7 @@ import { RESPONSE_KEYS, UnitOnLoadResponseEvent } from '../../messages/webMessag
12
12
  import { PresentationMode, WebComponentType } from '../../types/internal/webComponent.types';
13
13
  import { withReduxStore } from '../../helpers/store/helpers';
14
14
  import { PaymentMessage } from '../../messages/webMessages/paymentsMessage';
15
+ import { UNBaseView } from '../../nativeComponents/UNBaseView';
15
16
 
16
17
  const { Camera } = NativeModules;
17
18
 
@@ -101,8 +102,10 @@ const UNCheckDepositComponent = (props: UNCheckDepositComponentProps) => {
101
102
  }
102
103
  };
103
104
 
104
- const renderBookPaymentWebView = () => {
105
- return (
105
+ const style = presentationMode === PresentationMode.Inherit ? { flex: 1 } : { height: height };
106
+
107
+ return (
108
+ <UNBaseView style={style} onLoadError={ handleUnitOnLoad }>
106
109
  <WebComponent
107
110
  type={WebComponentType.checkDeposit}
108
111
  presentationMode={presentationMode}
@@ -113,17 +116,7 @@ const UNCheckDepositComponent = (props: UNCheckDepositComponentProps) => {
113
116
  language={props.language}
114
117
  isScrollable={true}
115
118
  />
116
- );
117
- };
118
-
119
- if (presentationMode === PresentationMode.Inherit) {
120
- return renderBookPaymentWebView();
121
- }
122
-
123
- return (
124
- <View style={{ height: height }}>
125
- {renderBookPaymentWebView()}
126
- </View>
119
+ </UNBaseView>
127
120
  );
128
121
  };
129
122
 
@@ -0,0 +1,111 @@
1
+ /* eslint-disable no-case-declarations */
2
+ import React, { useRef } from 'react';
3
+ import type WebView from 'react-native-webview';
4
+ import {
5
+ UnitMessage,
6
+ } from '../../messages/webMessages/unitMessages';
7
+ import { WebComponent } from '../../webComponent/WebComponent';
8
+ import type { WebViewMessage } from '../../messages/webMessages';
9
+ import {
10
+ getFundAccountPaymentParams,
11
+ getFundAccountPaymentScript,
12
+ } from './UNFundAccountPaymentComponent.utils';
13
+ import type { UNFundAccountPaymentData, UNFundAccountPaymentOnLoadData, UNAstraExternalCardData, UNCardData, UNError, UNOnLoadResponse } from '../../types/shared';
14
+ import { PresentationMode, WebComponentType } from '../../types/internal/webComponent.types';
15
+ import { withReduxStore } from '../../helpers/store/helpers';
16
+ import { SafeAreaView } from 'react-native';
17
+ import { RESPONSE_KEYS, UnitOnLoadResponseEvent } from '../../messages/webMessages/onLoadMessage';
18
+ import { PaymentMessage } from '../../messages/webMessages/paymentsMessage';
19
+ import { FundAccountPaymentEvent } from '../../messages/webMessages/fundAccountPaymentMessage';
20
+ import { UNBaseView } from '../../nativeComponents/UNBaseView';
21
+
22
+ export interface UNFundAccountPaymentComponentProps {
23
+ // inputs
24
+ accountId?: string;
25
+ customerToken: string;
26
+ fee?: number;
27
+ isAutoFocus?: boolean;
28
+
29
+ // ui
30
+ theme?: string;
31
+ language?: string;
32
+
33
+ initialStageBackButton?: boolean;
34
+ finalStageDoneButton?: boolean;
35
+
36
+ // events
37
+ onLoad?: (response: UNOnLoadResponse<UNFundAccountPaymentOnLoadData>) => void;
38
+ onPaymentCreated?: (data: UNFundAccountPaymentData) => void;
39
+ onInitialStageBackButtonClicked?: () => void;
40
+ onFinalStageDoneButtonClicked?: () => void;
41
+ }
42
+
43
+ const UNFundAccountPaymentComponent = (props: UNFundAccountPaymentComponentProps) => {
44
+ const webRef = useRef<WebView>(null);
45
+
46
+ const handleUnitOnLoad = (response: UnitOnLoadResponseEvent) => {
47
+ if (!props.onLoad) {
48
+ return;
49
+ }
50
+
51
+ if (RESPONSE_KEYS.errors in response) {
52
+ props.onLoad(response as UNError);
53
+ return;
54
+ }
55
+
56
+ if (RESPONSE_KEYS.astraExternalCard in response) {
57
+ // AstraOnLoadResponse
58
+ props.onLoad(response[RESPONSE_KEYS.astraExternalCard] as UNOnLoadResponse<[UNAstraExternalCardData]>);
59
+ return;
60
+ }
61
+
62
+ if (RESPONSE_KEYS.accountCards in response) {
63
+ props.onLoad(response[RESPONSE_KEYS.accountCards] as UNOnLoadResponse<[UNCardData]>);
64
+ return;
65
+ }
66
+
67
+ console.error('On Load Error: unexpected response type');
68
+ return;
69
+ };
70
+
71
+ const handleMessage = (message: WebViewMessage) => {
72
+ switch (message.type) {
73
+ case UnitMessage.UNIT_ON_LOAD:
74
+ handleUnitOnLoad(message.details as UnitOnLoadResponseEvent);
75
+ break;
76
+ case PaymentMessage.PAYMENT_CREATED:
77
+ const fundAccountPayment = message.details as FundAccountPaymentEvent;
78
+ props.onPaymentCreated && props.onPaymentCreated(fundAccountPayment.data as UNFundAccountPaymentData);
79
+ break;
80
+ case PaymentMessage.INITIAL_STAGE_BACK_BUTTON_CLICKED: {
81
+ props.onInitialStageBackButtonClicked && props.onInitialStageBackButtonClicked();
82
+ break;
83
+ }
84
+ case PaymentMessage.FINAL_STAGE_DONE_BUTTON_CLICKED: {
85
+ props.onFinalStageDoneButtonClicked && props.onFinalStageDoneButtonClicked();
86
+ break;
87
+ }
88
+ }
89
+ };
90
+
91
+ return (
92
+ <SafeAreaView style={{flex: 1, minHeight: 400}}>
93
+ <UNBaseView style={{flex: 1}} onLoadError={ handleUnitOnLoad }>
94
+ <WebComponent
95
+ ref={webRef}
96
+ type={WebComponentType.fundAccountPayment}
97
+ presentationMode={PresentationMode.Inherit}
98
+ params={getFundAccountPaymentParams(props)}
99
+ script={getFundAccountPaymentScript()}
100
+ theme={props.theme}
101
+ language={props.language}
102
+ onMessage={message => handleMessage(message)}
103
+ isScrollable={true}
104
+ nestedScrollEnabled={true}
105
+ />
106
+ </UNBaseView>
107
+ </SafeAreaView>
108
+ );
109
+ };
110
+
111
+ export default withReduxStore<UNFundAccountPaymentComponentProps>(UNFundAccountPaymentComponent);
@@ -0,0 +1,24 @@
1
+ import { UNFundAccountPaymentComponentProps } from './UNFundAccountPaymentComponent';
2
+ import { LISTENERS } from '../../scripts/html/bodyScript';
3
+
4
+ export const getFundAccountPaymentParams = (props: UNFundAccountPaymentComponentProps) => {
5
+ const accountIdParam = props.accountId ? `account-id="${props.accountId}"` : '';
6
+ const feeParam = props.fee ? `fee="${props.fee}"` : '';
7
+ return `
8
+ customer-token="${props.customerToken}"
9
+ ${accountIdParam}
10
+ ${feeParam}
11
+ is-auto-focus="${props.isAutoFocus ?? false}"
12
+ initial-stage-back-button="${props.initialStageBackButton ?? false}"
13
+ final-stage-done-button="${props.finalStageDoneButton ?? false}"
14
+ style="height: 100%"
15
+ `;
16
+ };
17
+
18
+ export const getFundAccountPaymentScript = () => {
19
+ return `
20
+ ${LISTENERS.unitPaymentCreated}
21
+ ${LISTENERS.unitPaymentInitialStageBackButtonClicked}
22
+ ${LISTENERS.unitPaymentFinalStageDoneButtonClicked}
23
+ `;
24
+ };
@@ -0,0 +1 @@
1
+ export { default as UNFundAccountPaymentComponent, UNFundAccountPaymentComponentProps } from './UNFundAccountPaymentComponent';
@@ -1,5 +1,5 @@
1
1
  import React, { useRef, useState } from 'react';
2
- import { Dimensions, View } from 'react-native';
2
+ import { Dimensions } from 'react-native';
3
3
  import type { WebViewMessage } from '../../messages/webMessages';
4
4
  import { HeightEvent, PageMessage } from '../../messages/webMessages/pageMessage';
5
5
  import { WebComponent } from '../../webComponent/WebComponent';
@@ -21,6 +21,7 @@ import type {
21
21
  UNOnLoadResponseData,
22
22
  } from '../../types/shared';
23
23
  import { MultipleCardsCardClickedEvent, MultipleCardsMessage } from '../../messages/webMessages/multipleCardsMessage';
24
+ import { UNBaseView } from '../../nativeComponents/UNBaseView';
24
25
 
25
26
  const DEFAULT_HEIGHT = Dimensions.get('window').height * 0.5;
26
27
 
@@ -90,8 +91,9 @@ const UNMultipleCardsComponent = (props: UNMultipleCardsComponentProps) => {
90
91
  }
91
92
  };
92
93
 
93
- const renderMultipleCardsWebView = () => {
94
- return (
94
+ const style = defaultHeight ? { height: defaultHeight } : { flex: 1};
95
+ return (
96
+ <UNBaseView style={style} onLoadError={ handleUnitOnLoad }>
95
97
  <WebComponent
96
98
  ref={webRef}
97
99
  type={WebComponentType.multipleCards}
@@ -103,17 +105,7 @@ const UNMultipleCardsComponent = (props: UNMultipleCardsComponentProps) => {
103
105
  theme={props.theme}
104
106
  language={props.language}
105
107
  />
106
- );
107
- };
108
-
109
- if (!defaultHeight) {
110
- return renderMultipleCardsWebView();
111
- }
112
-
113
- return (
114
- <View style={{ height: defaultHeight }}>
115
- {renderMultipleCardsWebView()}
116
- </View>
108
+ </UNBaseView>
117
109
  );
118
110
  };
119
111
 
@@ -1,5 +1,4 @@
1
1
  import React, { useState } from 'react';
2
- import { View } from 'react-native';
3
2
  import { HeightEvent, PageMessage } from '../../messages/webMessages/pageMessage';
4
3
  import { UnitMessage } from '../../messages/webMessages/unitMessages';
5
4
  import { WebComponent } from '../../webComponent/WebComponent';
@@ -12,6 +11,7 @@ import { RESPONSE_KEYS, UnitOnLoadResponseEvent } from '../../messages/webMessag
12
11
  import { PresentationMode, WebComponentType } from '../../types/internal/webComponent.types';
13
12
  import { withReduxStore } from '../../helpers/store/helpers';
14
13
  import { UNRepaymentData } from '../../types/shared/repayment.types';
14
+ import { UNBaseView } from '../../nativeComponents/UNBaseView';
15
15
 
16
16
  export interface UNNextRepaymentComponentProps {
17
17
  // inputs
@@ -63,7 +63,7 @@ const UNNextRepaymentComponent = (props: UNNextRepaymentComponentProps) => {
63
63
  };
64
64
 
65
65
  return (
66
- <View style={{ height, width: '100%' }}>
66
+ <UNBaseView style={{ height, width: '100%' }} onLoadError={ handleUnitOnLoad }>
67
67
  <WebComponent
68
68
  type={WebComponentType.nextRepayment}
69
69
  presentationMode={PresentationMode.Default}
@@ -73,7 +73,7 @@ const UNNextRepaymentComponent = (props: UNNextRepaymentComponentProps) => {
73
73
  onMessage={message => handleMessage(message)}
74
74
  isScrollable={false}
75
75
  />
76
- </View>
76
+ </UNBaseView>
77
77
  );
78
78
  };
79
79
 
@@ -19,6 +19,7 @@ import { useListenerToEvent } from '../../hooks/useListenerToEvent';
19
19
  import { LinkSuccess, openLink } from 'react-native-plaid-link-sdk';
20
20
  import { OpenPlaidEvent, PlaidMessage } from '../../messages/webMessages/plaidMessages';
21
21
  import { PayeeConnectedAccountEvent, PayeeCounterpartyEvent, PayeeManagementMessage, PayeeMicroDepositeConnectionEvent } from '../../messages/webMessages/payeeManagementMessage';
22
+ import { UNBaseView } from '../../nativeComponents/UNBaseView';
22
23
 
23
24
  export interface UNPayeeManagementComponentProps {
24
25
  // inputs
@@ -136,17 +137,19 @@ const UNPayeeManagementComponent = (props: UNPayeeManagementComponentProps) => {
136
137
  };
137
138
 
138
139
  return (
139
- <WebComponent
140
- ref={webRef}
141
- type={WebComponentType.payeeManagement}
142
- presentationMode={PresentationMode.Inherit}
143
- params={getPayeeParams(props)}
144
- script={getPayeeManagementScript()}
145
- theme={props.theme}
146
- nestedScrollEnabled={true}
147
- language={props.language}
148
- onMessage={message => handleMessage(message)}
149
- />
140
+ <UNBaseView style={{ height: '100%' }}>
141
+ <WebComponent
142
+ ref={webRef}
143
+ type={WebComponentType.payeeManagement}
144
+ presentationMode={PresentationMode.Inherit}
145
+ params={getPayeeParams(props)}
146
+ script={getPayeeManagementScript()}
147
+ theme={props.theme}
148
+ nestedScrollEnabled={true}
149
+ language={props.language}
150
+ onMessage={message => handleMessage(message)}
151
+ />
152
+ </UNBaseView>
150
153
  );
151
154
  };
152
155
 
@@ -1,5 +1,4 @@
1
1
  import React, { useState } from 'react';
2
- import { View } from 'react-native';
3
2
  import { WebComponent } from '../../webComponent/WebComponent';
4
3
  import { UNAccountData, UNError, UNOnLoadResponse, UNOnLoadResponseData } from '../../types/shared';
5
4
  import { PresentationMode, WebComponentType } from '../../types/internal/webComponent.types';
@@ -9,6 +8,7 @@ import { withReduxStore } from '../../helpers/store/helpers';
9
8
  import { RESPONSE_KEYS, UnitOnLoadResponseEvent } from '../../messages/webMessages/onLoadMessage';
10
9
  import { UnitMessage } from '../../messages/webMessages/unitMessages';
11
10
  import { HeightEvent, PageMessage } from '../../messages/webMessages/pageMessage';
11
+ import { UNBaseView } from '../../nativeComponents/UNBaseView';
12
12
 
13
13
  export interface UNProgramDetailsComponentProps {
14
14
  // inputs
@@ -61,7 +61,7 @@ const UNProgramDetailsComponent = (props: UNProgramDetailsComponentProps) => {
61
61
  };
62
62
 
63
63
  return (
64
- <View style={{ height, width: '100%' }}>
64
+ <UNBaseView style={{ height, width: '100%' }} onLoadError={ handleUnitOnLoad }>
65
65
  <WebComponent
66
66
  type={WebComponentType.programDetails}
67
67
  presentationMode={PresentationMode.Default}
@@ -70,7 +70,7 @@ const UNProgramDetailsComponent = (props: UNProgramDetailsComponentProps) => {
70
70
  language={props.language}
71
71
  onMessage={handleMessage}
72
72
  />
73
- </View>
73
+ </UNBaseView>
74
74
  );
75
75
  };
76
76
 
@@ -24,6 +24,7 @@ import { PageMessage } from '../../messages/webMessages/pageMessage';
24
24
  import UNStoreManagerHelper from '../../nativeModulesHelpers/UNStoreManagerHelper/UNStoreManagerHelper';
25
25
  import { ActivityMessage } from '../../messages/webMessages/activityMessage';
26
26
  import { setItemInWindowUnitStore } from '../../utils/windowUnitStore';
27
+ import { UNBaseView } from '../../nativeComponents/UNBaseView';
27
28
 
28
29
  export interface UNWhiteLabelAppComponentProps {
29
30
  // inputs
@@ -79,7 +80,7 @@ const UNWhiteLabelAppComponent = (props: UNWhiteLabelAppComponentProps) => {
79
80
  try {
80
81
  const token = await UNStoreManagerHelper.getValue(UserDataKeys.unitCustomerToken);
81
82
  if (token) {
82
- setItemInWindowUnitStore(webRef.current, UserDataKeys.unitCustomerToken, token + ' s');
83
+ setItemInWindowUnitStore(webRef.current, UserDataKeys.unitCustomerToken, token);
83
84
  }
84
85
  } catch (e) {
85
86
  console.log(e);
@@ -102,17 +103,19 @@ const UNWhiteLabelAppComponent = (props: UNWhiteLabelAppComponentProps) => {
102
103
 
103
104
  const renderWebView = () => {
104
105
  return (
105
- <WebComponent
106
- ref={webRef}
107
- type={WebComponentType.whiteLabelApp}
108
- presentationMode={PresentationMode.Inherit}
109
- params={getWhiteLabelAppParams(props)}
110
- onMessage={handleWebViewMessage}
111
- isScrollable={true}
112
- theme={props.theme}
113
- language={props.language}
114
- script={getWhiteLabelAppScript()}
115
- />
106
+ <UNBaseView style={{ flex: 1 }}>
107
+ <WebComponent
108
+ ref={webRef}
109
+ type={WebComponentType.whiteLabelApp}
110
+ presentationMode={PresentationMode.Inherit}
111
+ params={getWhiteLabelAppParams(props)}
112
+ onMessage={handleWebViewMessage}
113
+ isScrollable={true}
114
+ theme={props.theme}
115
+ language={props.language}
116
+ script={getWhiteLabelAppScript()}
117
+ />
118
+ </UNBaseView>
116
119
  );
117
120
  };
118
121