react-native-unit-components 2.2.0 → 3.0.1

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 (279) hide show
  1. package/android/src/main/java/com/unitreactnativecomponents/nativeModules/sharefile/UNShareFile.kt +1 -1
  2. package/lib/commonjs/components/UNACHCreditComponent/UNACHCreditComponent.js +22 -18
  3. package/lib/commonjs/components/UNACHCreditComponent/UNACHCreditComponent.js.map +1 -1
  4. package/lib/commonjs/components/UNACHDebitComponent/UNACHDebitComponent.js +22 -18
  5. package/lib/commonjs/components/UNACHDebitComponent/UNACHDebitComponent.js.map +1 -1
  6. package/lib/commonjs/components/UNAccountComponent/UNAccountComponent.js +5 -10
  7. package/lib/commonjs/components/UNAccountComponent/UNAccountComponent.js.map +1 -1
  8. package/lib/commonjs/components/UNActivityComponent/UNActivityComponent.js +7 -12
  9. package/lib/commonjs/components/UNActivityComponent/UNActivityComponent.js.map +1 -1
  10. package/lib/commonjs/components/UNActivityComponent/UNActivityComponent.utils.js +1 -0
  11. package/lib/commonjs/components/UNActivityComponent/UNActivityComponent.utils.js.map +1 -1
  12. package/lib/commonjs/components/UNBottomSheetComponent/UNBottomSheetComponent.constants.js +27 -10
  13. package/lib/commonjs/components/UNBottomSheetComponent/UNBottomSheetComponent.constants.js.map +1 -1
  14. package/lib/commonjs/components/UNBottomSheetComponent/UNBottomSheetComponent.js +9 -6
  15. package/lib/commonjs/components/UNBottomSheetComponent/UNBottomSheetComponent.js.map +1 -1
  16. package/lib/commonjs/components/UNBottomSheetComponent/UNBottomSheetComponent.utils.js +20 -0
  17. package/lib/commonjs/components/UNBottomSheetComponent/UNBottomSheetComponent.utils.js.map +1 -1
  18. package/lib/commonjs/components/UNBottomSheetComponent/components/UNBottomSheetNativeComponent/UNBottomSheetNativeComponent.js +14 -6
  19. package/lib/commonjs/components/UNBottomSheetComponent/components/UNBottomSheetNativeComponent/UNBottomSheetNativeComponent.js.map +1 -1
  20. package/lib/commonjs/components/UNBottomSheetComponent/components/UNBottomSheetSlotComponent/UNBottomSheetSlotComponent.js +31 -55
  21. package/lib/commonjs/components/UNBottomSheetComponent/components/UNBottomSheetSlotComponent/UNBottomSheetSlotComponent.js.map +1 -1
  22. package/lib/commonjs/components/UNCardComponent/UNCardComponent.js +6 -10
  23. package/lib/commonjs/components/UNCardComponent/UNCardComponent.js.map +1 -1
  24. package/lib/commonjs/components/UNCheckPaymentComponent/UNCheckPaymentComponent.js +96 -0
  25. package/lib/commonjs/components/UNCheckPaymentComponent/UNCheckPaymentComponent.js.map +1 -0
  26. package/lib/commonjs/components/UNCheckPaymentComponent/UNCheckPaymentComponent.utils.js +36 -0
  27. package/lib/commonjs/components/UNCheckPaymentComponent/UNCheckPaymentComponent.utils.js.map +1 -0
  28. package/lib/commonjs/components/UNCheckPaymentComponent/index.js +21 -0
  29. package/lib/commonjs/components/UNCheckPaymentComponent/index.js.map +1 -0
  30. package/lib/commonjs/components/UNCreateCardComponent/UNCreateCardComponent.js +6 -7
  31. package/lib/commonjs/components/UNCreateCardComponent/UNCreateCardComponent.js.map +1 -1
  32. package/lib/commonjs/components/UNMultipleCardsComponent/UNMultipleCardsComponent.js +6 -11
  33. package/lib/commonjs/components/UNMultipleCardsComponent/UNMultipleCardsComponent.js.map +1 -1
  34. package/lib/commonjs/components/UNMultipleCardsComponent/UNMultipleCardsComponent.utils.js +1 -1
  35. package/lib/commonjs/components/UNMultipleCardsComponent/UNMultipleCardsComponent.utils.js.map +1 -1
  36. package/lib/commonjs/components/UNPayeeManagementComponent/UNPayeeManagementComponent.js +10 -18
  37. package/lib/commonjs/components/UNPayeeManagementComponent/UNPayeeManagementComponent.js.map +1 -1
  38. package/lib/commonjs/components/UNWhiteLabelAppComponent/UNWhiteLabelAppComponent.js +5 -10
  39. package/lib/commonjs/components/UNWhiteLabelAppComponent/UNWhiteLabelAppComponent.js.map +1 -1
  40. package/lib/commonjs/components/index.js +11 -0
  41. package/lib/commonjs/components/index.js.map +1 -1
  42. package/lib/commonjs/flows/card/UNCardFlows.js +2 -6
  43. package/lib/commonjs/flows/card/UNCardFlows.js.map +1 -1
  44. package/lib/commonjs/helpers/BottomSheet/BottomSheet.js +13 -3
  45. package/lib/commonjs/helpers/BottomSheet/BottomSheet.js.map +1 -1
  46. package/lib/commonjs/helpers/UNKeyboardAvoidingView/UNKeyboardAvoidingView.js +4 -2
  47. package/lib/commonjs/helpers/UNKeyboardAvoidingView/UNKeyboardAvoidingView.js.map +1 -1
  48. package/lib/commonjs/helpers/pushProvisioningService/hooks/useCardWallet.js.map +1 -1
  49. package/lib/commonjs/hooks/useEventListener.js +31 -0
  50. package/lib/commonjs/hooks/useEventListener.js.map +1 -0
  51. package/lib/commonjs/hooks/useSafeAreaDimensions.js +53 -0
  52. package/lib/commonjs/hooks/useSafeAreaDimensions.js.map +1 -0
  53. package/lib/commonjs/messages/webMessages/checkPaymentMessage.js +6 -0
  54. package/lib/commonjs/messages/webMessages/checkPaymentMessage.js.map +1 -0
  55. package/lib/commonjs/nativeComponents/UNAddToWallet/UNAddToWalletComponent/UNAddToWalletComponent.js +2 -7
  56. package/lib/commonjs/nativeComponents/UNAddToWallet/UNAddToWalletComponent/UNAddToWalletComponent.js.map +1 -1
  57. package/lib/commonjs/store/store.js +0 -2
  58. package/lib/commonjs/store/store.js.map +1 -1
  59. package/lib/commonjs/types/internal/bottomSheet.types.js +1 -0
  60. package/lib/commonjs/types/internal/bottomSheet.types.js.map +1 -1
  61. package/lib/commonjs/types/internal/webComponent.types.js +1 -0
  62. package/lib/commonjs/types/internal/webComponent.types.js.map +1 -1
  63. package/lib/commonjs/types/shared/payment/checkPayment.types.js +6 -0
  64. package/lib/commonjs/types/shared/payment/checkPayment.types.js.map +1 -0
  65. package/lib/commonjs/types/shared/payment/index.js +11 -0
  66. package/lib/commonjs/types/shared/payment/index.js.map +1 -1
  67. package/lib/commonjs/types/shared/payment/payments.types.js +1 -0
  68. package/lib/commonjs/types/shared/payment/payments.types.js.map +1 -1
  69. package/lib/commonjs/unitComponentsSdkManager/UnitComponentsSdk.constants.js +2 -2
  70. package/lib/commonjs/unitComponentsSdkManager/UnitComponentsSdkManager.js +1 -1
  71. package/lib/commonjs/utils/eventBus/EventBus.js +107 -0
  72. package/lib/commonjs/utils/eventBus/EventBus.js.map +1 -0
  73. package/lib/commonjs/utils/eventBus/EventBus.types.js +6 -0
  74. package/lib/commonjs/utils/eventBus/EventBus.types.js.map +1 -0
  75. package/lib/commonjs/utils/eventBus/index.js +13 -0
  76. package/lib/commonjs/utils/eventBus/index.js.map +1 -0
  77. package/lib/commonjs/webComponent/WebComponent.js +22 -17
  78. package/lib/commonjs/webComponent/WebComponent.js.map +1 -1
  79. package/lib/module/components/UNACHCreditComponent/UNACHCreditComponent.js +23 -19
  80. package/lib/module/components/UNACHCreditComponent/UNACHCreditComponent.js.map +1 -1
  81. package/lib/module/components/UNACHDebitComponent/UNACHDebitComponent.js +23 -19
  82. package/lib/module/components/UNACHDebitComponent/UNACHDebitComponent.js.map +1 -1
  83. package/lib/module/components/UNAccountComponent/UNAccountComponent.js +5 -10
  84. package/lib/module/components/UNAccountComponent/UNAccountComponent.js.map +1 -1
  85. package/lib/module/components/UNActivityComponent/UNActivityComponent.js +7 -12
  86. package/lib/module/components/UNActivityComponent/UNActivityComponent.js.map +1 -1
  87. package/lib/module/components/UNActivityComponent/UNActivityComponent.utils.js +1 -0
  88. package/lib/module/components/UNActivityComponent/UNActivityComponent.utils.js.map +1 -1
  89. package/lib/module/components/UNBottomSheetComponent/UNBottomSheetComponent.constants.js +27 -10
  90. package/lib/module/components/UNBottomSheetComponent/UNBottomSheetComponent.constants.js.map +1 -1
  91. package/lib/module/components/UNBottomSheetComponent/UNBottomSheetComponent.js +8 -5
  92. package/lib/module/components/UNBottomSheetComponent/UNBottomSheetComponent.js.map +1 -1
  93. package/lib/module/components/UNBottomSheetComponent/UNBottomSheetComponent.utils.js +20 -0
  94. package/lib/module/components/UNBottomSheetComponent/UNBottomSheetComponent.utils.js.map +1 -1
  95. package/lib/module/components/UNBottomSheetComponent/components/UNBottomSheetNativeComponent/UNBottomSheetNativeComponent.js +15 -7
  96. package/lib/module/components/UNBottomSheetComponent/components/UNBottomSheetNativeComponent/UNBottomSheetNativeComponent.js.map +1 -1
  97. package/lib/module/components/UNBottomSheetComponent/components/UNBottomSheetSlotComponent/UNBottomSheetSlotComponent.js +31 -55
  98. package/lib/module/components/UNBottomSheetComponent/components/UNBottomSheetSlotComponent/UNBottomSheetSlotComponent.js.map +1 -1
  99. package/lib/module/components/UNCardComponent/UNCardComponent.js +7 -11
  100. package/lib/module/components/UNCardComponent/UNCardComponent.js.map +1 -1
  101. package/lib/module/components/UNCheckPaymentComponent/UNCheckPaymentComponent.js +88 -0
  102. package/lib/module/components/UNCheckPaymentComponent/UNCheckPaymentComponent.js.map +1 -0
  103. package/lib/module/components/UNCheckPaymentComponent/UNCheckPaymentComponent.utils.js +28 -0
  104. package/lib/module/components/UNCheckPaymentComponent/UNCheckPaymentComponent.utils.js.map +1 -0
  105. package/lib/module/components/UNCheckPaymentComponent/index.js +2 -0
  106. package/lib/module/components/UNCheckPaymentComponent/index.js.map +1 -0
  107. package/lib/module/components/UNCreateCardComponent/UNCreateCardComponent.js +6 -7
  108. package/lib/module/components/UNCreateCardComponent/UNCreateCardComponent.js.map +1 -1
  109. package/lib/module/components/UNMultipleCardsComponent/UNMultipleCardsComponent.js +6 -11
  110. package/lib/module/components/UNMultipleCardsComponent/UNMultipleCardsComponent.js.map +1 -1
  111. package/lib/module/components/UNMultipleCardsComponent/UNMultipleCardsComponent.utils.js +1 -1
  112. package/lib/module/components/UNMultipleCardsComponent/UNMultipleCardsComponent.utils.js.map +1 -1
  113. package/lib/module/components/UNPayeeManagementComponent/UNPayeeManagementComponent.js +11 -19
  114. package/lib/module/components/UNPayeeManagementComponent/UNPayeeManagementComponent.js.map +1 -1
  115. package/lib/module/components/UNWhiteLabelAppComponent/UNWhiteLabelAppComponent.js +5 -10
  116. package/lib/module/components/UNWhiteLabelAppComponent/UNWhiteLabelAppComponent.js.map +1 -1
  117. package/lib/module/components/index.js +1 -0
  118. package/lib/module/components/index.js.map +1 -1
  119. package/lib/module/flows/card/UNCardFlows.js +2 -6
  120. package/lib/module/flows/card/UNCardFlows.js.map +1 -1
  121. package/lib/module/helpers/BottomSheet/BottomSheet.js +13 -3
  122. package/lib/module/helpers/BottomSheet/BottomSheet.js.map +1 -1
  123. package/lib/module/helpers/UNKeyboardAvoidingView/UNKeyboardAvoidingView.js +5 -3
  124. package/lib/module/helpers/UNKeyboardAvoidingView/UNKeyboardAvoidingView.js.map +1 -1
  125. package/lib/module/helpers/pushProvisioningService/hooks/useCardWallet.js.map +1 -1
  126. package/lib/module/hooks/useEventListener.js +24 -0
  127. package/lib/module/hooks/useEventListener.js.map +1 -0
  128. package/lib/module/hooks/useSafeAreaDimensions.js +46 -0
  129. package/lib/module/hooks/useSafeAreaDimensions.js.map +1 -0
  130. package/lib/module/messages/webMessages/checkPaymentMessage.js +2 -0
  131. package/lib/module/messages/webMessages/checkPaymentMessage.js.map +1 -0
  132. package/lib/module/nativeComponents/UNAddToWallet/UNAddToWalletComponent/UNAddToWalletComponent.js +2 -7
  133. package/lib/module/nativeComponents/UNAddToWallet/UNAddToWalletComponent/UNAddToWalletComponent.js.map +1 -1
  134. package/lib/module/store/store.js +0 -2
  135. package/lib/module/store/store.js.map +1 -1
  136. package/lib/module/types/internal/bottomSheet.types.js +1 -0
  137. package/lib/module/types/internal/bottomSheet.types.js.map +1 -1
  138. package/lib/module/types/internal/webComponent.types.js +1 -0
  139. package/lib/module/types/internal/webComponent.types.js.map +1 -1
  140. package/lib/module/types/shared/payment/checkPayment.types.js +2 -0
  141. package/lib/module/types/shared/payment/checkPayment.types.js.map +1 -0
  142. package/lib/module/types/shared/payment/index.js +1 -0
  143. package/lib/module/types/shared/payment/index.js.map +1 -1
  144. package/lib/module/types/shared/payment/payments.types.js +1 -0
  145. package/lib/module/types/shared/payment/payments.types.js.map +1 -1
  146. package/lib/module/unitComponentsSdkManager/UnitComponentsSdk.constants.js +2 -2
  147. package/lib/module/unitComponentsSdkManager/UnitComponentsSdkManager.js +1 -1
  148. package/lib/module/utils/eventBus/EventBus.js +101 -0
  149. package/lib/module/utils/eventBus/EventBus.js.map +1 -0
  150. package/lib/module/utils/eventBus/EventBus.types.js +8 -0
  151. package/lib/module/utils/eventBus/EventBus.types.js.map +1 -0
  152. package/lib/module/utils/eventBus/index.js +2 -0
  153. package/lib/module/utils/eventBus/index.js.map +1 -0
  154. package/lib/module/webComponent/WebComponent.js +25 -20
  155. package/lib/module/webComponent/WebComponent.js.map +1 -1
  156. package/lib/typescript/src/components/UNACHCreditComponent/UNACHCreditComponent.d.ts.map +1 -1
  157. package/lib/typescript/src/components/UNACHDebitComponent/UNACHDebitComponent.d.ts.map +1 -1
  158. package/lib/typescript/src/components/UNAccountComponent/UNAccountComponent.d.ts.map +1 -1
  159. package/lib/typescript/src/components/UNActivityComponent/UNActivityComponent.d.ts +1 -0
  160. package/lib/typescript/src/components/UNActivityComponent/UNActivityComponent.d.ts.map +1 -1
  161. package/lib/typescript/src/components/UNActivityComponent/UNActivityComponent.utils.d.ts.map +1 -1
  162. package/lib/typescript/src/components/UNBottomSheetComponent/UNBottomSheetComponent.constants.d.ts +0 -5
  163. package/lib/typescript/src/components/UNBottomSheetComponent/UNBottomSheetComponent.constants.d.ts.map +1 -1
  164. package/lib/typescript/src/components/UNBottomSheetComponent/UNBottomSheetComponent.utils.d.ts +2 -2
  165. package/lib/typescript/src/components/UNBottomSheetComponent/UNBottomSheetComponent.utils.d.ts.map +1 -1
  166. package/lib/typescript/src/components/UNBottomSheetComponent/components/UNBottomSheetNativeComponent/UNBottomSheetNativeComponent.d.ts.map +1 -1
  167. package/lib/typescript/src/components/UNBottomSheetComponent/components/UNBottomSheetSlotComponent/UNBottomSheetSlotComponent.d.ts.map +1 -1
  168. package/lib/typescript/src/components/UNCardComponent/UNCardComponent.d.ts.map +1 -1
  169. package/lib/typescript/src/components/UNCheckPaymentComponent/UNCheckPaymentComponent.d.ts +17 -0
  170. package/lib/typescript/src/components/UNCheckPaymentComponent/UNCheckPaymentComponent.d.ts.map +1 -0
  171. package/lib/typescript/src/components/UNCheckPaymentComponent/UNCheckPaymentComponent.utils.d.ts +4 -0
  172. package/lib/typescript/src/components/UNCheckPaymentComponent/UNCheckPaymentComponent.utils.d.ts.map +1 -0
  173. package/lib/typescript/src/components/UNCheckPaymentComponent/index.d.ts +2 -0
  174. package/lib/typescript/src/components/UNCheckPaymentComponent/index.d.ts.map +1 -0
  175. package/lib/typescript/src/components/UNCreateCardComponent/UNCreateCardComponent.d.ts.map +1 -1
  176. package/lib/typescript/src/components/UNCreateCardComponent/UNCreateCardComponent.utils.d.ts +1 -1
  177. package/lib/typescript/src/components/UNMultipleCardsComponent/UNMultipleCardsComponent.d.ts.map +1 -1
  178. package/lib/typescript/src/components/UNMultipleCardsComponent/UNMultipleCardsComponent.utils.d.ts +1 -1
  179. package/lib/typescript/src/components/UNPayeeManagementComponent/UNPayeeManagementComponent.d.ts.map +1 -1
  180. package/lib/typescript/src/components/UNWhiteLabelAppComponent/UNWhiteLabelAppComponent.d.ts.map +1 -1
  181. package/lib/typescript/src/components/index.d.ts +1 -0
  182. package/lib/typescript/src/components/index.d.ts.map +1 -1
  183. package/lib/typescript/src/flows/card/UNCardFlows.d.ts.map +1 -1
  184. package/lib/typescript/src/helpers/BottomSheet/BottomSheet.d.ts.map +1 -1
  185. package/lib/typescript/src/helpers/UNKeyboardAvoidingView/UNKeyboardAvoidingView.d.ts.map +1 -1
  186. package/lib/typescript/src/helpers/pushProvisioningService/hooks/useCardWallet.d.ts.map +1 -1
  187. package/lib/typescript/src/hooks/useEventListener.d.ts +12 -0
  188. package/lib/typescript/src/hooks/useEventListener.d.ts.map +1 -0
  189. package/lib/typescript/src/hooks/useSafeAreaDimensions.d.ts +9 -0
  190. package/lib/typescript/src/hooks/useSafeAreaDimensions.d.ts.map +1 -0
  191. package/lib/typescript/src/messages/webMessages/checkPaymentMessage.d.ts +6 -0
  192. package/lib/typescript/src/messages/webMessages/checkPaymentMessage.d.ts.map +1 -0
  193. package/lib/typescript/src/messages/webMessages/index.d.ts +2 -1
  194. package/lib/typescript/src/messages/webMessages/index.d.ts.map +1 -1
  195. package/lib/typescript/src/messages/webMessages/onLoadMessage.d.ts +1 -1
  196. package/lib/typescript/src/messages/webMessages/onLoadMessage.d.ts.map +1 -1
  197. package/lib/typescript/src/nativeComponents/UNAddToWallet/UNAddToWalletComponent/UNAddToWalletComponent.d.ts.map +1 -1
  198. package/lib/typescript/src/store/store.d.ts +0 -98
  199. package/lib/typescript/src/store/store.d.ts.map +1 -1
  200. package/lib/typescript/src/types/internal/bottomSheet.types.d.ts +7 -1
  201. package/lib/typescript/src/types/internal/bottomSheet.types.d.ts.map +1 -1
  202. package/lib/typescript/src/types/internal/webComponent.types.d.ts +2 -1
  203. package/lib/typescript/src/types/internal/webComponent.types.d.ts.map +1 -1
  204. package/lib/typescript/src/types/shared/activity.types.d.ts +1 -1
  205. package/lib/typescript/src/types/shared/activity.types.d.ts.map +1 -1
  206. package/lib/typescript/src/types/shared/payment/checkPayment.types.d.ts +38 -0
  207. package/lib/typescript/src/types/shared/payment/checkPayment.types.d.ts.map +1 -0
  208. package/lib/typescript/src/types/shared/payment/index.d.ts +1 -0
  209. package/lib/typescript/src/types/shared/payment/index.d.ts.map +1 -1
  210. package/lib/typescript/src/types/shared/payment/payments.types.d.ts +3 -1
  211. package/lib/typescript/src/types/shared/payment/payments.types.d.ts.map +1 -1
  212. package/lib/typescript/src/types/shared/transaction/UNNegativeBalanceCoverageTransaction.d.ts.map +1 -1
  213. package/lib/typescript/src/utils/eventBus/EventBus.d.ts +37 -0
  214. package/lib/typescript/src/utils/eventBus/EventBus.d.ts.map +1 -0
  215. package/lib/typescript/src/utils/eventBus/EventBus.types.d.ts +37 -0
  216. package/lib/typescript/src/utils/eventBus/EventBus.types.d.ts.map +1 -0
  217. package/lib/typescript/src/utils/eventBus/index.d.ts +4 -0
  218. package/lib/typescript/src/utils/eventBus/index.d.ts.map +1 -0
  219. package/lib/typescript/src/webComponent/WebComponent.d.ts.map +1 -1
  220. package/package.json +5 -3
  221. package/src/components/UNACHCreditComponent/UNACHCreditComponent.tsx +26 -16
  222. package/src/components/UNACHDebitComponent/UNACHDebitComponent.tsx +27 -17
  223. package/src/components/UNAccountComponent/UNAccountComponent.tsx +5 -7
  224. package/src/components/UNActivityComponent/UNActivityComponent.tsx +8 -9
  225. package/src/components/UNActivityComponent/UNActivityComponent.utils.ts +1 -0
  226. package/src/components/UNBottomSheetComponent/UNBottomSheetComponent.constants.ts +26 -14
  227. package/src/components/UNBottomSheetComponent/UNBottomSheetComponent.tsx +6 -6
  228. package/src/components/UNBottomSheetComponent/UNBottomSheetComponent.utils.ts +24 -0
  229. package/src/components/UNBottomSheetComponent/components/UNBottomSheetNativeComponent/UNBottomSheetNativeComponent.tsx +17 -8
  230. package/src/components/UNBottomSheetComponent/components/UNBottomSheetSlotComponent/UNBottomSheetSlotComponent.tsx +54 -59
  231. package/src/components/UNCardComponent/UNCardComponent.tsx +7 -8
  232. package/src/components/UNCheckPaymentComponent/UNCheckPaymentComponent.tsx +110 -0
  233. package/src/components/UNCheckPaymentComponent/UNCheckPaymentComponent.utils.tsx +31 -0
  234. package/src/components/UNCheckPaymentComponent/index.ts +1 -0
  235. package/src/components/UNCreateCardComponent/UNCreateCardComponent.tsx +9 -7
  236. package/src/components/UNCreateCardComponent/UNCreateCardComponent.utils.ts +1 -1
  237. package/src/components/UNMultipleCardsComponent/UNMultipleCardsComponent.tsx +7 -9
  238. package/src/components/UNMultipleCardsComponent/UNMultipleCardsComponent.utils.ts +2 -2
  239. package/src/components/UNPayeeManagementComponent/UNPayeeManagementComponent.tsx +11 -15
  240. package/src/components/UNWhiteLabelAppComponent/UNWhiteLabelAppComponent.tsx +5 -8
  241. package/src/components/index.ts +1 -0
  242. package/src/flows/card/UNCardFlows.ts +2 -3
  243. package/src/helpers/BottomSheet/BottomSheet.tsx +8 -7
  244. package/src/helpers/UNKeyboardAvoidingView/UNKeyboardAvoidingView.tsx +7 -4
  245. package/src/helpers/pushProvisioningService/hooks/useCardWallet.ts +0 -1
  246. package/src/hooks/useEventListener.ts +30 -0
  247. package/src/hooks/useSafeAreaDimensions.ts +48 -0
  248. package/src/messages/webMessages/checkPaymentMessage.ts +8 -0
  249. package/src/messages/webMessages/index.ts +2 -0
  250. package/src/messages/webMessages/onLoadMessage.ts +1 -1
  251. package/src/nativeComponents/UNAddToWallet/UNAddToWalletComponent/UNAddToWalletComponent.tsx +5 -7
  252. package/src/store/store.ts +0 -2
  253. package/src/types/internal/bottomSheet.types.ts +8 -0
  254. package/src/types/internal/webComponent.types.ts +2 -1
  255. package/src/types/shared/activity.types.ts +1 -1
  256. package/src/types/shared/payment/checkPayment.types.ts +39 -0
  257. package/src/types/shared/payment/index.ts +1 -0
  258. package/src/types/shared/payment/payments.types.ts +3 -1
  259. package/src/types/shared/transaction/UNNegativeBalanceCoverageTransaction.ts +1 -1
  260. package/src/unitComponentsSdkManager/UnitComponentsSdk.constants.ts +2 -2
  261. package/src/unitComponentsSdkManager/UnitComponentsSdkManager.ts +1 -1
  262. package/src/utils/eventBus/EventBus.ts +106 -0
  263. package/src/utils/eventBus/EventBus.types.ts +37 -0
  264. package/src/utils/eventBus/index.ts +3 -0
  265. package/src/webComponent/WebComponent.tsx +30 -16
  266. package/lib/commonjs/hooks/useListenerToEvent.js +0 -26
  267. package/lib/commonjs/hooks/useListenerToEvent.js.map +0 -1
  268. package/lib/commonjs/slices/SharedEventsSlice.js +0 -29
  269. package/lib/commonjs/slices/SharedEventsSlice.js.map +0 -1
  270. package/lib/module/hooks/useListenerToEvent.js +0 -19
  271. package/lib/module/hooks/useListenerToEvent.js.map +0 -1
  272. package/lib/module/slices/SharedEventsSlice.js +0 -22
  273. package/lib/module/slices/SharedEventsSlice.js.map +0 -1
  274. package/lib/typescript/src/hooks/useListenerToEvent.d.ts +0 -10
  275. package/lib/typescript/src/hooks/useListenerToEvent.d.ts.map +0 -1
  276. package/lib/typescript/src/slices/SharedEventsSlice.d.ts +0 -81
  277. package/lib/typescript/src/slices/SharedEventsSlice.d.ts.map +0 -1
  278. package/src/hooks/useListenerToEvent.ts +0 -32
  279. package/src/slices/SharedEventsSlice.ts +0 -128
@@ -8,14 +8,15 @@ import type {
8
8
  UNComponentsError,
9
9
  UNPlaidAccountFilter,
10
10
  UNACHPayment,
11
- UNCounterparty
11
+ UNCounterparty,
12
+ UNAccount
12
13
  } from '../../types/shared';
13
14
  import { HeightEvent, PageMessage } from '../../messages/webMessages/pageMessage';
14
15
  import { Platform } from 'react-native';
15
16
  import { getACHCreditParams, getACHCreditScript, injectRequestCounterpartyDeletedScript, injectUnitPlaidResponse } from './UNACHCreditComponent.utils';
16
17
  import { PaymentMessage } from '../../messages/webMessages/paymentsMessage';
17
18
  import type { ACHEvent } from '../../messages/webMessages/achCreditMessage';
18
- import { RESPONSE_KEYS, UnitOnLoadResponseEvent } from '../../messages/webMessages/onLoadMessage';
19
+ import { ACHOnLoadResponse, RESPONSE_KEYS, UnitOnLoadResponseEvent } from '../../messages/webMessages/onLoadMessage';
19
20
  import {
20
21
  PlaidLinkTokenData,
21
22
  PlaidTokenCreatedEvent,
@@ -23,7 +24,7 @@ import {
23
24
  RequestRenderingEvent,
24
25
  UnitComponentsMessage,
25
26
  } from '../../messages/webMessages/unitComponentsMessages';
26
- import { LinkSuccess, openLink } from 'react-native-plaid-link-sdk';
27
+ import { LinkExit, LinkSuccess, open as openPlaidLink, create as createPlaidLink } from 'react-native-plaid-link-sdk';
27
28
  import type WebView from 'react-native-webview';
28
29
  import AppInfo from '../../utils/AppInfo';
29
30
  import { PresentationMode, WebComponentType } from '../../types/internal/webComponent.types';
@@ -33,9 +34,8 @@ import { UNBaseView } from '../../nativeComponents/UNBaseView';
33
34
  import { ensureArray } from '../../utils/onLoadMessages.utils';
34
35
  import { BottomSheetRenderingType, BottomSheetSlotData, SlotRendering } from '../../types/internal/bottomSheet.types';
35
36
  import { BottomSheetNativeMessage } from '../../messages/nativeMessages/bottomSheetMessage';
36
- import { useDispatch } from 'react-redux';
37
- import { setEvent } from '../../slices/SharedEventsSlice';
38
- import { useListenerToEvent } from '../../hooks/useListenerToEvent';
37
+ import { eventBus } from '../../utils/eventBus';
38
+ import { useEventListener } from '../../hooks/useEventListener';
39
39
  import { PayeeManagementMessage } from '../../messages/webMessages/payeeManagementMessage';
40
40
 
41
41
  export interface UNACHCreditComponentProps {
@@ -59,10 +59,8 @@ export interface UNACHCreditComponentProps {
59
59
  }
60
60
 
61
61
  const UNACHCreditComponent = (props: UNACHCreditComponentProps) => {
62
- const dispatch = useDispatch();
63
62
  const [height, setHeight] = useState<number>(0);
64
63
  const [presentationMode, setPresentationMode] = useState<PresentationMode>(PresentationMode.Inherit);
65
- const [linkToken, setLinkToken] = useState<string>();
66
64
  const [appPackageName, setAppPackageName] = useState<string>();
67
65
  const webRef = useRef<WebView>(null);
68
66
 
@@ -80,7 +78,7 @@ const UNACHCreditComponent = (props: UNACHCreditComponentProps) => {
80
78
  injectRequestCounterpartyDeletedScript(webRef.current, data);
81
79
  };
82
80
 
83
- useListenerToEvent({ busEventKey: PayeeManagementMessage.UNIT_COUNTERPARTY_DELETED, action: handleCounterpartyDeleted });
81
+ useEventListener({ busEventKey: PayeeManagementMessage.UNIT_COUNTERPARTY_DELETED, action: handleCounterpartyDeleted });
84
82
 
85
83
  const handleUnitOnLoad = (response: UnitOnLoadResponseEvent) => {
86
84
  if (!props.onLoad) {
@@ -105,6 +103,20 @@ const UNACHCreditComponent = (props: UNACHCreditComponentProps) => {
105
103
  return;
106
104
  }
107
105
 
106
+ if (RESPONSE_KEYS.counterpartiesResult in response) {
107
+ const counterparties = response[RESPONSE_KEYS.counterpartiesResult].data;
108
+ const accountResponse = response as Partial<ACHOnLoadResponse>;
109
+ const accountData = accountResponse[RESPONSE_KEYS.account]?.data;
110
+ const achOnload: UNComponentsOnLoadResponseData<UNACHOnLoadData> = {
111
+ data: {
112
+ [RESPONSE_KEYS.account]: (accountData ? ensureArray(accountData) : []) as [UNAccount],
113
+ [RESPONSE_KEYS.counterpartyAccount]: counterparties,
114
+ },
115
+ };
116
+ props.onLoad(achOnload);
117
+ return;
118
+ }
119
+
108
120
  console.error('On Load Error: unexpected response type');
109
121
  return;
110
122
  };
@@ -140,7 +152,7 @@ const UNACHCreditComponent = (props: UNACHCreditComponentProps) => {
140
152
  type: BottomSheetRenderingType.Slot,
141
153
  data: slotData,
142
154
  } as SlotRendering;
143
- dispatch(setEvent({ key: BottomSheetNativeMessage.REQUEST_RENDERING, data }));
155
+ eventBus.emit(BottomSheetNativeMessage.REQUEST_RENDERING, data);
144
156
 
145
157
  break;
146
158
  }
@@ -155,23 +167,21 @@ const UNACHCreditComponent = (props: UNACHCreditComponentProps) => {
155
167
  case PlaidMessage.UNIT_PLAID_TOKEN_CREATED: {
156
168
  const linkTokenEvent = message.details as PlaidTokenCreatedEvent;
157
169
  const linkTokenData = linkTokenEvent.linkToken as PlaidLinkTokenData;
158
- setLinkToken(linkTokenData.attributes.linkToken);
170
+ const link: string = linkTokenData.attributes.linkToken;
171
+ createPlaidLink({ token: link });
159
172
  break;
160
173
  }
161
174
 
162
175
  case UnitComponentsMessage.UNIT_REQUEST_EXTERNAL_SDK: {
163
176
  const externalSdkType = (message.details as RequestExternalSdkEvent).type;
164
177
  if (externalSdkType !== 'plaid') return;
165
- linkToken && openLink({
166
- tokenConfig: { noLoadingState: false, token: linkToken },
178
+ openPlaidLink({
167
179
  onSuccess: (success: LinkSuccess) => {
168
180
  injectUnitPlaidResponse(webRef.current, success);
169
181
  },
170
- onExit: exit => {
182
+ onExit: (exit: LinkExit) => {
171
183
  console.log(exit);
172
184
  },
173
- }).catch(e => {
174
- console.error(e);
175
185
  });
176
186
  break;
177
187
  }
@@ -8,7 +8,8 @@ import type {
8
8
  UNACHOnLoadData,
9
9
  UNACHPayment,
10
10
  UNPlaidAccountFilter,
11
- UNCounterparty
11
+ UNCounterparty,
12
+ UNAccount
12
13
  } from '../../types/shared';
13
14
  import { HeightEvent, PageMessage } from '../../messages/webMessages/pageMessage';
14
15
  import { Platform } from 'react-native';
@@ -20,11 +21,11 @@ import {
20
21
  UnitComponentsMessage,
21
22
  } from '../../messages/webMessages/unitComponentsMessages';
22
23
  import { getACHDebitParams, getACHDebitScript, injectRequestCounterpartyDeletedScript, injectUnitPlaidResponse } from './UNACHDebitComponent.utils';
23
- import { LinkSuccess, openLink } from 'react-native-plaid-link-sdk';
24
+ import { LinkExit, LinkSuccess, open as openPlaidLink, create as createPlaidLink } from 'react-native-plaid-link-sdk';
24
25
  import type WebView from 'react-native-webview';
25
26
  import { PaymentMessage } from '../../messages/webMessages/paymentsMessage';
26
27
  import type { ACHEvent } from '../../messages/webMessages/achCreditMessage';
27
- import { RESPONSE_KEYS, UnitOnLoadResponseEvent } from '../../messages/webMessages/onLoadMessage';
28
+ import { ACHOnLoadResponse, RESPONSE_KEYS, UnitOnLoadResponseEvent } from '../../messages/webMessages/onLoadMessage';
28
29
  import AppInfo from '../../utils/AppInfo';
29
30
  import { PresentationMode, WebComponentType } from '../../types/internal/webComponent.types';
30
31
  import { withReduxStore } from '../../helpers/store/helpers';
@@ -33,9 +34,8 @@ import { UNBaseView } from '../../nativeComponents/UNBaseView';
33
34
  import { ensureArray } from '../../utils/onLoadMessages.utils';
34
35
  import { BottomSheetRenderingType, BottomSheetSlotData, SlotRendering } from '../../types/internal/bottomSheet.types';
35
36
  import { BottomSheetNativeMessage } from '../../messages/nativeMessages/bottomSheetMessage';
36
- import { useDispatch } from 'react-redux';
37
- import { setEvent } from '../../slices/SharedEventsSlice';
38
- import { useListenerToEvent } from '../../hooks/useListenerToEvent';
37
+ import { eventBus } from '../../utils/eventBus';
38
+ import { useEventListener } from '../../hooks/useEventListener';
39
39
  import { PayeeManagementMessage } from '../../messages/webMessages/payeeManagementMessage';
40
40
 
41
41
  export interface UNACHDebitComponentProps {
@@ -57,10 +57,8 @@ export interface UNACHDebitComponentProps {
57
57
  }
58
58
 
59
59
  const UNACHDebitComponent = (props: UNACHDebitComponentProps) => {
60
- const dispatch = useDispatch();
61
60
  const [height, setHeight] = useState<number>(0);
62
61
  const [appPackageName, setAppPackageName] = useState<string>('');
63
- const [linkToken, setLinkToken] = useState<string>('');
64
62
  const webRef = useRef<WebView>(null);
65
63
  const [presentationMode, setPresentationMode] = useState<PresentationMode>(PresentationMode.Inherit);
66
64
 
@@ -78,7 +76,7 @@ const UNACHDebitComponent = (props: UNACHDebitComponentProps) => {
78
76
  injectRequestCounterpartyDeletedScript(webRef.current, data);
79
77
  };
80
78
 
81
- useListenerToEvent({ busEventKey: PayeeManagementMessage.UNIT_COUNTERPARTY_DELETED, action: handleCounterpartyDeleted });
79
+ useEventListener({ busEventKey: PayeeManagementMessage.UNIT_COUNTERPARTY_DELETED, action: handleCounterpartyDeleted });
82
80
 
83
81
  const handleUnitOnLoad = (response: UnitOnLoadResponseEvent) => {
84
82
  if (!props.onLoad) {
@@ -103,6 +101,20 @@ const UNACHDebitComponent = (props: UNACHDebitComponentProps) => {
103
101
  return;
104
102
  }
105
103
 
104
+ if (RESPONSE_KEYS.counterpartiesResult in response) {
105
+ const counterparties = response[RESPONSE_KEYS.counterpartiesResult].data;
106
+ const accountResponse = response as Partial<ACHOnLoadResponse>;
107
+ const accountData = accountResponse[RESPONSE_KEYS.account]?.data;
108
+ const achOnload: UNComponentsOnLoadResponseData<UNACHOnLoadData> = {
109
+ data: {
110
+ [RESPONSE_KEYS.account]: (accountData ? ensureArray(accountData) : []) as [UNAccount],
111
+ [RESPONSE_KEYS.counterpartyAccount]: counterparties,
112
+ },
113
+ };
114
+ props.onLoad(achOnload);
115
+ return;
116
+ }
117
+
106
118
  console.error('On Load Error: unexpected response type');
107
119
  return;
108
120
  };
@@ -138,7 +150,7 @@ const UNACHDebitComponent = (props: UNACHDebitComponentProps) => {
138
150
  type: BottomSheetRenderingType.Slot,
139
151
  data: slotData,
140
152
  } as SlotRendering;
141
- dispatch(setEvent({ key: BottomSheetNativeMessage.REQUEST_RENDERING, data }));
153
+ eventBus.emit(BottomSheetNativeMessage.REQUEST_RENDERING, data);
142
154
 
143
155
  break;
144
156
  }
@@ -153,23 +165,21 @@ const UNACHDebitComponent = (props: UNACHDebitComponentProps) => {
153
165
  case PlaidMessage.UNIT_PLAID_TOKEN_CREATED: {
154
166
  const linkTokenEvent = message.details as PlaidTokenCreatedEvent;
155
167
  const linkTokenData = linkTokenEvent.linkToken as PlaidLinkTokenData;
156
- setLinkToken(linkTokenData.attributes.linkToken);
168
+ const link: string = linkTokenData.attributes.linkToken;
169
+ createPlaidLink({ token: link });
157
170
  break;
158
171
  }
159
172
 
160
173
  case UnitComponentsMessage.UNIT_REQUEST_EXTERNAL_SDK: {
161
174
  const externalSdkType = (message.details as RequestExternalSdkEvent).type;
162
175
  if (externalSdkType !== 'plaid') return;
163
- linkToken && openLink({
164
- tokenConfig: { noLoadingState: false, token: linkToken },
176
+ openPlaidLink({
165
177
  onSuccess: (success: LinkSuccess) => {
166
178
  injectUnitPlaidResponse(webRef.current, success);
167
179
  },
168
- onExit: exit => {
180
+ onExit: (exit: LinkExit) => {
169
181
  console.log(exit);
170
- },
171
- }).catch(e => {
172
- console.error(e);
182
+ }
173
183
  });
174
184
  break;
175
185
  }
@@ -36,9 +36,8 @@ import type { BottomSheetSlotData } from '../../types/internal/bottomSheet.types
36
36
  import { PresentationMode, WebComponentType } from '../../types/internal/webComponent.types';
37
37
  import { BottomSheetNativeMessage } from '../../messages/nativeMessages/bottomSheetMessage';
38
38
  import { withReduxStoreAndRefForwarding } from '../../helpers/store/helpers';
39
- import { useDispatch } from 'react-redux';
40
- import { setEvent } from '../../slices/SharedEventsSlice';
41
- import { useListenerToEvent } from '../../hooks/useListenerToEvent';
39
+ import { eventBus } from '../../utils/eventBus';
40
+ import { useEventListener } from '../../hooks/useEventListener';
42
41
  import { UNBaseView } from '../../nativeComponents/UNBaseView';
43
42
 
44
43
  export interface UNAccountComponentProps {
@@ -79,7 +78,6 @@ export enum UNAccountAction {
79
78
 
80
79
  const UNAccountComponent = React.forwardRef<UNAccountRef, UNAccountComponentProps>(function UNAccountComponent(props, accountRef) {
81
80
 
82
- const dispatch = useDispatch();
83
81
  const [height, setHeight] = useState(0);
84
82
  const webRef = useRef<WebView>(null);
85
83
  // currentAccountId is used to store the current account id for the "imperative" refresh event.
@@ -126,8 +124,8 @@ const UNAccountComponent = React.forwardRef<UNAccountRef, UNAccountComponentProp
126
124
  console.error('On Load Error: unexpected response type.');
127
125
  return;
128
126
  };
129
- useListenerToEvent({ busEventKey: UnitComponentsMessage.UNIT_REQUEST_REFRESH, action: requestRefresh });
130
- useListenerToEvent({ busEventKey: AccountMessage.UNIT_ACCOUNT_CHANGED, action: handleAccountChanged });
127
+ useEventListener({ busEventKey: UnitComponentsMessage.UNIT_REQUEST_REFRESH, action: requestRefresh });
128
+ useEventListener({ busEventKey: AccountMessage.UNIT_ACCOUNT_CHANGED, action: handleAccountChanged });
131
129
 
132
130
  useImperativeHandle(accountRef, () => ({
133
131
  openActionsMenu() {
@@ -162,7 +160,7 @@ const UNAccountComponent = React.forwardRef<UNAccountRef, UNAccountComponentProp
162
160
  type: BottomSheetRenderingType.Slot,
163
161
  data: slotData,
164
162
  } as SlotRendering;
165
- dispatch(setEvent({ key: BottomSheetNativeMessage.REQUEST_RENDERING, data }));
163
+ eventBus.emit(BottomSheetNativeMessage.REQUEST_RENDERING, data);
166
164
 
167
165
  break;
168
166
  }
@@ -32,9 +32,8 @@ import type { BottomSheetSlotData, SlotRendering } from '../../types/internal/bo
32
32
  import { PresentationMode, WebComponentType } from '../../types/internal/webComponent.types';
33
33
  import { BottomSheetNativeMessage } from '../../messages/nativeMessages/bottomSheetMessage';
34
34
  import { withReduxStoreAndRefForwarding } from '../../helpers/store/helpers';
35
- import { setEvent } from '../../slices/SharedEventsSlice';
36
- import { useDispatch } from 'react-redux';
37
- import { useListenerToEvent } from '../../hooks/useListenerToEvent';
35
+ import { eventBus } from '../../utils/eventBus';
36
+ import { useEventListener } from '../../hooks/useEventListener';
38
37
  import { UNBaseView } from '../../nativeComponents/UNBaseView';
39
38
 
40
39
  const DEFAULT_HEIGHT = Dimensions.get('window').height * 0.5;
@@ -52,6 +51,7 @@ export interface UNActivityComponentProps {
52
51
  hideBackToTop?: boolean;
53
52
  paginationType?: UNActivityComponentPaginationType;
54
53
  transactionsPerPage?: number;
54
+ showDeclinedActivity?: boolean;
55
55
  // event
56
56
  onLoad?: (response: UNComponentsOnLoadResponse<UNActivityOnLoadData>) => void;
57
57
  }
@@ -61,7 +61,6 @@ export interface UNActivityRef {
61
61
  }
62
62
 
63
63
  const UNActivityComponent = React.forwardRef<UNActivityRef, UNActivityComponentProps>(function UNActivityComponent(props, activityRef) {
64
- const dispatch = useDispatch();
65
64
  const webRef = useRef<WebView>(null);
66
65
  const [defaultHeight, setDefaultHeight] = useState<number>();
67
66
 
@@ -84,8 +83,8 @@ const UNActivityComponent = React.forwardRef<UNActivityRef, UNActivityComponentP
84
83
  injectActivityFiltersChanged(webRef.current, query);
85
84
  };
86
85
 
87
- useListenerToEvent({ busEventKey: UnitComponentsMessage.UNIT_REQUEST_REFRESH, action: requestRefresh });
88
- useListenerToEvent({
86
+ useEventListener({ busEventKey: UnitComponentsMessage.UNIT_REQUEST_REFRESH, action: requestRefresh });
87
+ useEventListener({
89
88
  busEventKey: ActivityMessage.UNIT_ACTIVITY_FILTERS_CHANGED,
90
89
  action: dispatchActivityFiltersChanged,
91
90
  });
@@ -100,12 +99,12 @@ const UNActivityComponent = React.forwardRef<UNActivityRef, UNActivityComponentP
100
99
  return;
101
100
  }
102
101
 
103
- if (RESPONSE_KEYS.authorizations in response && RESPONSE_KEYS.transactions in response) {
102
+ if (RESPONSE_KEYS.authorizations in response) {
104
103
  // ActivityOnLoadResponse;
105
104
  const activityOnLoad: UNComponentsOnLoadResponseData<UNActivityOnLoadData> = {
106
105
  data: {
107
106
  [RESPONSE_KEYS.authorizations]: response[RESPONSE_KEYS.authorizations].data,
108
- [RESPONSE_KEYS.transactions]: response[RESPONSE_KEYS.transactions].data,
107
+ [RESPONSE_KEYS.transactions]: response[RESPONSE_KEYS.transactions]?.data,
109
108
  },
110
109
  };
111
110
  props.onLoad(activityOnLoad);
@@ -130,7 +129,7 @@ const UNActivityComponent = React.forwardRef<UNActivityRef, UNActivityComponentP
130
129
  data: slotData,
131
130
  } as SlotRendering;
132
131
 
133
- dispatch(setEvent({ key: BottomSheetNativeMessage.REQUEST_RENDERING, data }));
132
+ eventBus.emit(BottomSheetNativeMessage.REQUEST_RENDERING, data);
134
133
  break;
135
134
  }
136
135
  case UnitComponentsMessage.UNIT_ON_LOAD:
@@ -14,6 +14,7 @@ export const getActivityParams = (props: UNActivityComponentProps) => {
14
14
  hide-filter-button="${props.hideFilterButton || false}"
15
15
  hide-back-to-top="${props.hideBackToTop || false}"
16
16
  hide-title="${props.hideTitle || false}"
17
+ show-declined-activity="${props.showDeclinedActivity || false}"
17
18
  ${queryFilterParam}
18
19
  ${paginationTypeParam}
19
20
  ${transactionsPerPageParam}
@@ -1,23 +1,35 @@
1
- import { Dimensions, Platform, StatusBar } from 'react-native';
1
+ import { Dimensions, Platform } from 'react-native';
2
+ import { initialWindowMetrics } from 'react-native-safe-area-context';
2
3
 
3
4
  export const BOTTOM_SHEET_OVER_FULLSCREEN_PERCENTAGE_SIZE = 0.9;
4
5
 
5
- export const androidStatusBarHeight = StatusBar.currentHeight || 0;
6
+ const windowHeight = Dimensions.get('window').height;
7
+ const screenHeight = Dimensions.get('screen').height;
8
+ const statusBarHeight = initialWindowMetrics?.insets.top ?? 0;
9
+ const isAndroid = Platform.OS === 'android';
10
+ const isAndroid15AndAbove = isAndroid && Platform.Version >= 35;
6
11
 
7
- // For iOS - we are currently using hard coded height
8
- export const iosStatusBarHeight = Dimensions.get('window').height * 0.05;
12
+ // Android 15+ edge-to-edge detection
13
+ const isEdgeToEdgeActive = isAndroid15AndAbove && Math.abs(screenHeight - windowHeight) < 10;
9
14
 
10
- export const statusBarHeight = Platform.OS === 'android' ? androidStatusBarHeight : iosStatusBarHeight;
11
- // Android 10 and above - need to add status bar height to the window height to get the full screen height because Dimensions.get('window').height returns the height without the status bar
12
- // reference: https://github.com/facebook/react-native/issues/23693#issuecomment-1403560728
13
- export const isAndroid10AndAbove = Platform.OS === 'android' && Platform.Version >= 29;
15
+ // Calculate overFullScreenHeight based on platform
16
+ const calculateOverFullScreenHeight = (): number => {
17
+ if (!isAndroid) {
18
+ // iOS: simple percentage of window height
19
+ return windowHeight * BOTTOM_SHEET_OVER_FULLSCREEN_PERCENTAGE_SIZE;
20
+ }
21
+
22
+ // Android: adjust for edge-to-edge status
23
+ const topMargin = screenHeight * (1 - BOTTOM_SHEET_OVER_FULLSCREEN_PERCENTAGE_SIZE);
24
+ if (isEdgeToEdgeActive) {
25
+ return screenHeight - topMargin;
26
+ } else {
27
+ // Edge-to-edge opted out: status bar is outside window, adjust margin
28
+ return windowHeight - (topMargin - statusBarHeight);
29
+ }
30
+ };
14
31
 
15
- export const fullScreenHeight =
16
- isAndroid10AndAbove ?
17
- Dimensions.get('window').height + statusBarHeight
18
- : Dimensions.get('window').height;
19
-
20
- export const overFullScreenHeight = Dimensions.get('window').height * BOTTOM_SHEET_OVER_FULLSCREEN_PERCENTAGE_SIZE;
32
+ export const overFullScreenHeight = calculateOverFullScreenHeight();
21
33
 
22
34
  export const TOP_PADDING = 48;
23
35
  export const BOTTOM_PADDING = 24;
@@ -17,11 +17,10 @@ import {
17
17
  BottomSheetRenderingMessage,
18
18
  } from '../../messages/nativeMessages/bottomSheetMessage';
19
19
  import { withReduxStore } from '../../helpers/store/helpers';
20
- import { useListenerToEvent } from '../../hooks/useListenerToEvent';
20
+ import { useEventListener } from '../../hooks/useEventListener';
21
21
  import { useDispatch, useSelector } from 'react-redux';
22
- import { fullScreenHeight, overFullScreenHeight } from './UNBottomSheetComponent.constants';
22
+ import { overFullScreenHeight } from './UNBottomSheetComponent.constants';
23
23
  import { RootState } from '../../store';
24
-
25
24
  import {
26
25
  resetBottomSheetSlice,
27
26
  setIsBottomSheetActive,
@@ -35,9 +34,11 @@ import UNBottomSheetSlotComponent from './components/UNBottomSheetSlotComponent/
35
34
  import UNBottomSheetNativeComponent from './components/UNBottomSheetNativeComponent/UNBottomSheetNativeComponent';
36
35
  import { WebComponentType } from '../../types/internal/webComponent.types';
37
36
  import { getNativeComponentDataFromEvent } from './UNBottomSheetComponent.utils';
37
+ import { useSafeAreaDimensions } from '../../hooks/useSafeAreaDimensions';
38
38
 
39
39
  const UNBottomSheetComponent = () => {
40
40
  const dispatch = useDispatch();
41
+ const { fullScreenHeight } = useSafeAreaDimensions();
41
42
 
42
43
  const isBottomSheetActive = useSelector((state: RootState) => state.bottomSheet.isBottomSheetActive);
43
44
  const isComponentLoading = useSelector((state: RootState) => state.bottomSheet.isComponentLoading);
@@ -66,7 +67,6 @@ const UNBottomSheetComponent = () => {
66
67
  case BottomSheetNativePlaceType.overFullScreen:
67
68
  setHeight(overFullScreenHeight);
68
69
  break;
69
- // For modal native place type, set the height to the fullScreenHeight.
70
70
  case BottomSheetNativePlaceType.modal:
71
71
  setHeight(fullScreenHeight);
72
72
  break;
@@ -134,8 +134,8 @@ const UNBottomSheetComponent = () => {
134
134
  dispatch(setIsBottomSheetActive(false));
135
135
  };
136
136
 
137
- useListenerToEvent({ busEventKey: BottomSheetNativeMessage.REQUEST_RENDERING, action: requestRendering });
138
- useListenerToEvent({ busEventKey: UnitComponentsMessage.UNIT_REQUEST_CLOSE_FLOW, action: handleCloseFlow });
137
+ useEventListener({ busEventKey: BottomSheetNativeMessage.REQUEST_RENDERING, action: requestRendering });
138
+ useEventListener({ busEventKey: UnitComponentsMessage.UNIT_REQUEST_CLOSE_FLOW, action: handleCloseFlow });
139
139
 
140
140
  const handleRequestRendering = (rendering: BottomSheetRenderingMessage) => {
141
141
  if (rendering === currentBottomSheetRenderingMessage) {
@@ -8,6 +8,7 @@ import {
8
8
  BottomSheetNativeAddToWalletComponentType,
9
9
  BottomSheetNativeBookPaymentComponentType,
10
10
  BottomSheetNativeCheckDepositComponentType,
11
+ BottomSheetNativeCheckPaymentComponentType,
11
12
  BottomSheetNativeComponentType,
12
13
  BottomSheetNativeCreateCardComponentType,
13
14
  BottomSheetNativePlaceType,
@@ -171,6 +172,25 @@ const getCheckDepositComponentDataFromEvent = (event: BottomSheetSlotData): Bott
171
172
  };
172
173
  };
173
174
 
175
+ const getCheckPaymentComponentDataFromEvent = (event: BottomSheetSlotData): BottomSheetNativeCheckPaymentComponentType | null => {
176
+ const accountId = extractValueFromRequestRenderingEvent(event.requestRenderingEvent, 'account-id');
177
+ const theme = extractValueFromRequestRenderingEvent(event.requestRenderingEvent, 'theme');
178
+ const language = extractValueFromRequestRenderingEvent(event.requestRenderingEvent, 'language');
179
+ const initialStageBackButton = extractValueFromRequestRenderingEvent(event.requestRenderingEvent, 'initial-stage-back-button');
180
+ const finalStageDoneButton = extractValueFromRequestRenderingEvent(event.requestRenderingEvent, 'final-stage-done-button');
181
+
182
+ return {
183
+ type: BottomSheetNativeComponentType.CheckPaymentComponent,
184
+ props: {
185
+ accountId: accountId,
186
+ theme: theme,
187
+ language: language,
188
+ initialStageBackButton: initialStageBackButton ? initialStageBackButton === 'true' : undefined,
189
+ finalStageDoneButton: finalStageDoneButton ? finalStageDoneButton === 'true' : undefined,
190
+ },
191
+ };
192
+ };
193
+
174
194
  const getBookPaymentComponentDataFromEvent = (event: BottomSheetSlotData): BottomSheetNativeBookPaymentComponentType | null => {
175
195
  const accountId = extractValueFromRequestRenderingEvent(event.requestRenderingEvent, 'account-id');
176
196
  const counterPartyAccountId = extractValueFromRequestRenderingEvent(event.requestRenderingEvent, 'counterparty-account-id');
@@ -275,6 +295,10 @@ export const getNativeComponentDataFromEvent = (event: BottomSheetSlotData) => {
275
295
  componentData = getCheckDepositComponentDataFromEvent(event);
276
296
  break;
277
297
 
298
+ case WebComponentType.checkPayment:
299
+ componentData = getCheckPaymentComponentDataFromEvent(event);
300
+ break;
301
+
278
302
  case WebComponentType.bookPayment:
279
303
  componentData = getBookPaymentComponentDataFromEvent(event);
280
304
  break;
@@ -7,15 +7,17 @@ import {
7
7
  import { useDispatch } from 'react-redux';
8
8
  import { setComponentHeight, setScrollState, setShouldEnableBottomSheetScroll } from '../../../../slices/BottomSheetSlice';
9
9
  import { UNAddToWalletComponent } from '../../../../nativeComponents/UNAddToWallet/UNAddToWalletComponent';
10
- import { fullScreenHeight, overFullScreenHeight, statusBarHeight } from '../../UNBottomSheetComponent.constants';
10
+ import { overFullScreenHeight } from '../../UNBottomSheetComponent.constants';
11
+ import { useSafeAreaDimensions } from '../../../../hooks/useSafeAreaDimensions';
11
12
  import UNACHCreditComponent from '../../../UNACHCreditComponent/UNACHCreditComponent';
12
13
  import UNCheckDepositComponent from '../../../UNCheckDepositComponent/UNCheckDepositComponent';
14
+ import UNCheckPaymentComponent from '../../../UNCheckPaymentComponent/UNCheckPaymentComponent';
13
15
  import UNACHDebitComponent from '../../../UNACHDebitComponent/UNACHDebitComponent';
14
16
  import UNBookPaymentComponent from '../../../UNBookPaymentComponent/UNBookPaymentComponent';
15
17
  import UNWirePaymentComponent from '../../../UNWirePaymentComponent/UNWirePaymentComponent';
16
18
  import UNCreateCardComponent from '../../../UNCreateCardComponent/UNCreateCardComponent';
17
19
  import { PageMessage } from '../../../../messages/webMessages/pageMessage';
18
- import { useListenerToEvent } from '../../../../hooks/useListenerToEvent';
20
+ import { useEventListener } from '../../../../hooks/useEventListener';
19
21
  import UNKeyboardAvoidingView from '../../../../helpers/UNKeyboardAvoidingView/UNKeyboardAvoidingView';
20
22
 
21
23
  export interface UNBottomSheetNativeComponentProps {
@@ -24,6 +26,7 @@ export interface UNBottomSheetNativeComponentProps {
24
26
 
25
27
  const UNBottomSheetNativeComponent = (props: UNBottomSheetNativeComponentProps) => {
26
28
  const dispatch = useDispatch();
29
+ const { contentHeight, effectiveBottomInset } = useSafeAreaDimensions();
27
30
  const [height, setHeight] = useState<number>(0);
28
31
  const [paddingTop, setPaddingTop] = useState<number>(0);
29
32
  const [paddingBottom, setPaddingBottom] = useState<number>(0);
@@ -35,7 +38,7 @@ const UNBottomSheetNativeComponent = (props: UNBottomSheetNativeComponentProps)
35
38
  dispatch(setComponentHeight(height));
36
39
  };
37
40
 
38
- useListenerToEvent({ busEventKey: PageMessage.PAGE_HEIGHT, action: updateComponetHeight });
41
+ useEventListener({ busEventKey: PageMessage.PAGE_HEIGHT, action: updateComponetHeight });
39
42
 
40
43
  useEffect(() => {
41
44
  const setPaddingForNativeComponent = () => {
@@ -44,7 +47,7 @@ const UNBottomSheetNativeComponent = (props: UNBottomSheetNativeComponentProps)
44
47
  setPadding(20);
45
48
  setPaddingTop(30);
46
49
  }
47
- setPaddingBottom(20);
50
+ setPaddingBottom(20 + effectiveBottomInset);
48
51
  };
49
52
  const setScrollStateForNativeComponent = () => {
50
53
  const scrollState = props.nativeComponentData.scrollState ?? ScrollState.unScrollable;
@@ -54,7 +57,7 @@ const UNBottomSheetNativeComponent = (props: UNBottomSheetNativeComponentProps)
54
57
 
55
58
  setScrollStateForNativeComponent();
56
59
  setPaddingForNativeComponent();
57
- }, [dispatch, props.nativeComponentData]);
60
+ }, [dispatch, props.nativeComponentData, effectiveBottomInset]);
58
61
 
59
62
  useEffect(() => {
60
63
  const setBottomSheetNativeComponentViewHeight = () => {
@@ -63,8 +66,8 @@ const UNBottomSheetNativeComponent = (props: UNBottomSheetNativeComponentProps)
63
66
  case BottomSheetNativePlaceType.overFullScreen:
64
67
  adjustedHeight = overFullScreenHeight;
65
68
  break;
66
- case BottomSheetNativePlaceType.modal:
67
- adjustedHeight = fullScreenHeight - statusBarHeight;
69
+ case BottomSheetNativePlaceType.modal:
70
+ adjustedHeight = contentHeight;
68
71
  break;
69
72
  default:
70
73
  return;
@@ -76,7 +79,7 @@ const UNBottomSheetNativeComponent = (props: UNBottomSheetNativeComponentProps)
76
79
  };
77
80
 
78
81
  setBottomSheetNativeComponentViewHeight();
79
- }, [props.nativeComponentData.nativePlace]);
82
+ }, [props.nativeComponentData.nativePlace, contentHeight, dispatch]);
80
83
 
81
84
  const renderNativeComponent = () => {
82
85
  switch (props.nativeComponentData?.component.type) {
@@ -104,6 +107,12 @@ const UNBottomSheetNativeComponent = (props: UNBottomSheetNativeComponentProps)
104
107
  {...props.nativeComponentData.component.props}
105
108
  />
106
109
  );
110
+ case BottomSheetNativeComponentType.CheckPaymentComponent:
111
+ return (
112
+ <UNCheckPaymentComponent
113
+ {...props.nativeComponentData.component.props}
114
+ />
115
+ );
107
116
  case BottomSheetNativeComponentType.BookPaymentComponent:
108
117
  return (
109
118
  <UNBookPaymentComponent