react-native-unit-components 2.1.0 → 3.0.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 (325) hide show
  1. package/lib/commonjs/components/UNACHCreditComponent/UNACHCreditComponent.js +44 -9
  2. package/lib/commonjs/components/UNACHCreditComponent/UNACHCreditComponent.js.map +1 -1
  3. package/lib/commonjs/components/UNACHCreditComponent/UNACHCreditComponent.utils.js +8 -3
  4. package/lib/commonjs/components/UNACHCreditComponent/UNACHCreditComponent.utils.js.map +1 -1
  5. package/lib/commonjs/components/UNACHDebitComponent/UNACHDebitComponent.js +44 -9
  6. package/lib/commonjs/components/UNACHDebitComponent/UNACHDebitComponent.js.map +1 -1
  7. package/lib/commonjs/components/UNACHDebitComponent/UNACHDebitComponent.utils.js +7 -2
  8. package/lib/commonjs/components/UNACHDebitComponent/UNACHDebitComponent.utils.js.map +1 -1
  9. package/lib/commonjs/components/UNAccountComponent/UNAccountComponent.js +5 -10
  10. package/lib/commonjs/components/UNAccountComponent/UNAccountComponent.js.map +1 -1
  11. package/lib/commonjs/components/UNActivityComponent/UNActivityComponent.js +7 -12
  12. package/lib/commonjs/components/UNActivityComponent/UNActivityComponent.js.map +1 -1
  13. package/lib/commonjs/components/UNActivityComponent/UNActivityComponent.utils.js +1 -0
  14. package/lib/commonjs/components/UNActivityComponent/UNActivityComponent.utils.js.map +1 -1
  15. package/lib/commonjs/components/UNBottomSheetComponent/UNBottomSheetComponent.constants.js +32 -10
  16. package/lib/commonjs/components/UNBottomSheetComponent/UNBottomSheetComponent.constants.js.map +1 -1
  17. package/lib/commonjs/components/UNBottomSheetComponent/UNBottomSheetComponent.js +9 -6
  18. package/lib/commonjs/components/UNBottomSheetComponent/UNBottomSheetComponent.js.map +1 -1
  19. package/lib/commonjs/components/UNBottomSheetComponent/UNBottomSheetComponent.utils.js +20 -6
  20. package/lib/commonjs/components/UNBottomSheetComponent/UNBottomSheetComponent.utils.js.map +1 -1
  21. package/lib/commonjs/components/UNBottomSheetComponent/components/UNBottomSheetNativeComponent/UNBottomSheetNativeComponent.js +18 -7
  22. package/lib/commonjs/components/UNBottomSheetComponent/components/UNBottomSheetNativeComponent/UNBottomSheetNativeComponent.js.map +1 -1
  23. package/lib/commonjs/components/UNBottomSheetComponent/components/UNBottomSheetSlotComponent/UNBottomSheetSlotComponent.js +48 -49
  24. package/lib/commonjs/components/UNBottomSheetComponent/components/UNBottomSheetSlotComponent/UNBottomSheetSlotComponent.js.map +1 -1
  25. package/lib/commonjs/components/UNCardComponent/UNCardComponent.js +6 -10
  26. package/lib/commonjs/components/UNCardComponent/UNCardComponent.js.map +1 -1
  27. package/lib/commonjs/components/UNCheckPaymentComponent/UNCheckPaymentComponent.js +96 -0
  28. package/lib/commonjs/components/UNCheckPaymentComponent/UNCheckPaymentComponent.js.map +1 -0
  29. package/lib/commonjs/components/UNCheckPaymentComponent/UNCheckPaymentComponent.utils.js +36 -0
  30. package/lib/commonjs/components/UNCheckPaymentComponent/UNCheckPaymentComponent.utils.js.map +1 -0
  31. package/lib/commonjs/components/UNCheckPaymentComponent/index.js +21 -0
  32. package/lib/commonjs/components/UNCheckPaymentComponent/index.js.map +1 -0
  33. package/lib/commonjs/components/UNCreateCardComponent/UNCreateCardComponent.js +6 -7
  34. package/lib/commonjs/components/UNCreateCardComponent/UNCreateCardComponent.js.map +1 -1
  35. package/lib/commonjs/components/UNMultipleCardsComponent/UNMultipleCardsComponent.js +6 -11
  36. package/lib/commonjs/components/UNMultipleCardsComponent/UNMultipleCardsComponent.js.map +1 -1
  37. package/lib/commonjs/components/UNMultipleCardsComponent/UNMultipleCardsComponent.utils.js +2 -1
  38. package/lib/commonjs/components/UNMultipleCardsComponent/UNMultipleCardsComponent.utils.js.map +1 -1
  39. package/lib/commonjs/components/UNPayeeManagementComponent/UNPayeeManagementComponent.js +10 -18
  40. package/lib/commonjs/components/UNPayeeManagementComponent/UNPayeeManagementComponent.js.map +1 -1
  41. package/lib/commonjs/components/UNPayeeManagementComponent/UNPayeeManagementComponent.utils.js +2 -0
  42. package/lib/commonjs/components/UNPayeeManagementComponent/UNPayeeManagementComponent.utils.js.map +1 -1
  43. package/lib/commonjs/components/UNWhiteLabelAppComponent/UNWhiteLabelAppComponent.js +5 -10
  44. package/lib/commonjs/components/UNWhiteLabelAppComponent/UNWhiteLabelAppComponent.js.map +1 -1
  45. package/lib/commonjs/components/UNWirePaymentComponent/UNWirePaymentComponent.js.map +1 -1
  46. package/lib/commonjs/components/UNWirePaymentComponent/UNWirePaymentComponent.utils.js +0 -2
  47. package/lib/commonjs/components/UNWirePaymentComponent/UNWirePaymentComponent.utils.js.map +1 -1
  48. package/lib/commonjs/components/index.js +11 -0
  49. package/lib/commonjs/components/index.js.map +1 -1
  50. package/lib/commonjs/flows/card/UNCardFlows.js +2 -6
  51. package/lib/commonjs/flows/card/UNCardFlows.js.map +1 -1
  52. package/lib/commonjs/helpers/BottomSheet/BottomSheet.js +13 -3
  53. package/lib/commonjs/helpers/BottomSheet/BottomSheet.js.map +1 -1
  54. package/lib/commonjs/helpers/UNKeyboardAvoidingView/UNKeyboardAvoidingView.js +4 -2
  55. package/lib/commonjs/helpers/UNKeyboardAvoidingView/UNKeyboardAvoidingView.js.map +1 -1
  56. package/lib/commonjs/helpers/pushProvisioningService/hooks/useCardWallet.js.map +1 -1
  57. package/lib/commonjs/hooks/useEventListener.js +31 -0
  58. package/lib/commonjs/hooks/useEventListener.js.map +1 -0
  59. package/lib/commonjs/hooks/useSafeAreaDimensions.js +53 -0
  60. package/lib/commonjs/hooks/useSafeAreaDimensions.js.map +1 -0
  61. package/lib/commonjs/messages/webMessages/checkPaymentMessage.js +6 -0
  62. package/lib/commonjs/messages/webMessages/checkPaymentMessage.js.map +1 -0
  63. package/lib/commonjs/nativeComponents/UNAddToWallet/UNAddToWalletComponent/UNAddToWalletComponent.js +2 -7
  64. package/lib/commonjs/nativeComponents/UNAddToWallet/UNAddToWalletComponent/UNAddToWalletComponent.js.map +1 -1
  65. package/lib/commonjs/scripts/html/bodyScript.js +7 -1
  66. package/lib/commonjs/scripts/html/bodyScript.js.map +1 -1
  67. package/lib/commonjs/store/store.js +0 -2
  68. package/lib/commonjs/store/store.js.map +1 -1
  69. package/lib/commonjs/types/internal/bottomSheet.types.js +1 -0
  70. package/lib/commonjs/types/internal/bottomSheet.types.js.map +1 -1
  71. package/lib/commonjs/types/internal/webComponent.types.js +1 -0
  72. package/lib/commonjs/types/internal/webComponent.types.js.map +1 -1
  73. package/lib/commonjs/types/shared/payment/checkPayment.types.js +6 -0
  74. package/lib/commonjs/types/shared/payment/checkPayment.types.js.map +1 -0
  75. package/lib/commonjs/types/shared/payment/index.js +11 -0
  76. package/lib/commonjs/types/shared/payment/index.js.map +1 -1
  77. package/lib/commonjs/types/shared/payment/payments.types.js +1 -0
  78. package/lib/commonjs/types/shared/payment/payments.types.js.map +1 -1
  79. package/lib/commonjs/unitComponentsSdkManager/UnitComponentsSdk.constants.js +2 -2
  80. package/lib/commonjs/unitComponentsSdkManager/UnitComponentsSdkManager.js +1 -1
  81. package/lib/commonjs/utils/eventBus/EventBus.js +107 -0
  82. package/lib/commonjs/utils/eventBus/EventBus.js.map +1 -0
  83. package/lib/commonjs/utils/eventBus/EventBus.types.js +6 -0
  84. package/lib/commonjs/utils/eventBus/EventBus.types.js.map +1 -0
  85. package/lib/commonjs/utils/eventBus/index.js +13 -0
  86. package/lib/commonjs/utils/eventBus/index.js.map +1 -0
  87. package/lib/commonjs/webComponent/WebComponent.js +22 -17
  88. package/lib/commonjs/webComponent/WebComponent.js.map +1 -1
  89. package/lib/module/components/UNACHCreditComponent/UNACHCreditComponent.js +46 -11
  90. package/lib/module/components/UNACHCreditComponent/UNACHCreditComponent.js.map +1 -1
  91. package/lib/module/components/UNACHCreditComponent/UNACHCreditComponent.utils.js +7 -3
  92. package/lib/module/components/UNACHCreditComponent/UNACHCreditComponent.utils.js.map +1 -1
  93. package/lib/module/components/UNACHDebitComponent/UNACHDebitComponent.js +46 -11
  94. package/lib/module/components/UNACHDebitComponent/UNACHDebitComponent.js.map +1 -1
  95. package/lib/module/components/UNACHDebitComponent/UNACHDebitComponent.utils.js +6 -2
  96. package/lib/module/components/UNACHDebitComponent/UNACHDebitComponent.utils.js.map +1 -1
  97. package/lib/module/components/UNAccountComponent/UNAccountComponent.js +5 -10
  98. package/lib/module/components/UNAccountComponent/UNAccountComponent.js.map +1 -1
  99. package/lib/module/components/UNActivityComponent/UNActivityComponent.js +7 -12
  100. package/lib/module/components/UNActivityComponent/UNActivityComponent.js.map +1 -1
  101. package/lib/module/components/UNActivityComponent/UNActivityComponent.utils.js +1 -0
  102. package/lib/module/components/UNActivityComponent/UNActivityComponent.utils.js.map +1 -1
  103. package/lib/module/components/UNBottomSheetComponent/UNBottomSheetComponent.constants.js +32 -10
  104. package/lib/module/components/UNBottomSheetComponent/UNBottomSheetComponent.constants.js.map +1 -1
  105. package/lib/module/components/UNBottomSheetComponent/UNBottomSheetComponent.js +8 -5
  106. package/lib/module/components/UNBottomSheetComponent/UNBottomSheetComponent.js.map +1 -1
  107. package/lib/module/components/UNBottomSheetComponent/UNBottomSheetComponent.utils.js +20 -6
  108. package/lib/module/components/UNBottomSheetComponent/UNBottomSheetComponent.utils.js.map +1 -1
  109. package/lib/module/components/UNBottomSheetComponent/components/UNBottomSheetNativeComponent/UNBottomSheetNativeComponent.js +19 -8
  110. package/lib/module/components/UNBottomSheetComponent/components/UNBottomSheetNativeComponent/UNBottomSheetNativeComponent.js.map +1 -1
  111. package/lib/module/components/UNBottomSheetComponent/components/UNBottomSheetSlotComponent/UNBottomSheetSlotComponent.js +48 -49
  112. package/lib/module/components/UNBottomSheetComponent/components/UNBottomSheetSlotComponent/UNBottomSheetSlotComponent.js.map +1 -1
  113. package/lib/module/components/UNCardComponent/UNCardComponent.js +7 -11
  114. package/lib/module/components/UNCardComponent/UNCardComponent.js.map +1 -1
  115. package/lib/module/components/UNCheckPaymentComponent/UNCheckPaymentComponent.js +88 -0
  116. package/lib/module/components/UNCheckPaymentComponent/UNCheckPaymentComponent.js.map +1 -0
  117. package/lib/module/components/UNCheckPaymentComponent/UNCheckPaymentComponent.utils.js +28 -0
  118. package/lib/module/components/UNCheckPaymentComponent/UNCheckPaymentComponent.utils.js.map +1 -0
  119. package/lib/module/components/UNCheckPaymentComponent/index.js +2 -0
  120. package/lib/module/components/UNCheckPaymentComponent/index.js.map +1 -0
  121. package/lib/module/components/UNCreateCardComponent/UNCreateCardComponent.js +6 -7
  122. package/lib/module/components/UNCreateCardComponent/UNCreateCardComponent.js.map +1 -1
  123. package/lib/module/components/UNMultipleCardsComponent/UNMultipleCardsComponent.js +6 -11
  124. package/lib/module/components/UNMultipleCardsComponent/UNMultipleCardsComponent.js.map +1 -1
  125. package/lib/module/components/UNMultipleCardsComponent/UNMultipleCardsComponent.utils.js +2 -1
  126. package/lib/module/components/UNMultipleCardsComponent/UNMultipleCardsComponent.utils.js.map +1 -1
  127. package/lib/module/components/UNPayeeManagementComponent/UNPayeeManagementComponent.js +11 -19
  128. package/lib/module/components/UNPayeeManagementComponent/UNPayeeManagementComponent.js.map +1 -1
  129. package/lib/module/components/UNPayeeManagementComponent/UNPayeeManagementComponent.utils.js +3 -1
  130. package/lib/module/components/UNPayeeManagementComponent/UNPayeeManagementComponent.utils.js.map +1 -1
  131. package/lib/module/components/UNWhiteLabelAppComponent/UNWhiteLabelAppComponent.js +5 -10
  132. package/lib/module/components/UNWhiteLabelAppComponent/UNWhiteLabelAppComponent.js.map +1 -1
  133. package/lib/module/components/UNWirePaymentComponent/UNWirePaymentComponent.js.map +1 -1
  134. package/lib/module/components/UNWirePaymentComponent/UNWirePaymentComponent.utils.js +0 -2
  135. package/lib/module/components/UNWirePaymentComponent/UNWirePaymentComponent.utils.js.map +1 -1
  136. package/lib/module/components/index.js +1 -0
  137. package/lib/module/components/index.js.map +1 -1
  138. package/lib/module/flows/card/UNCardFlows.js +2 -6
  139. package/lib/module/flows/card/UNCardFlows.js.map +1 -1
  140. package/lib/module/helpers/BottomSheet/BottomSheet.js +13 -3
  141. package/lib/module/helpers/BottomSheet/BottomSheet.js.map +1 -1
  142. package/lib/module/helpers/UNKeyboardAvoidingView/UNKeyboardAvoidingView.js +5 -3
  143. package/lib/module/helpers/UNKeyboardAvoidingView/UNKeyboardAvoidingView.js.map +1 -1
  144. package/lib/module/helpers/pushProvisioningService/hooks/useCardWallet.js.map +1 -1
  145. package/lib/module/hooks/useEventListener.js +24 -0
  146. package/lib/module/hooks/useEventListener.js.map +1 -0
  147. package/lib/module/hooks/useSafeAreaDimensions.js +46 -0
  148. package/lib/module/hooks/useSafeAreaDimensions.js.map +1 -0
  149. package/lib/module/messages/webMessages/checkPaymentMessage.js +2 -0
  150. package/lib/module/messages/webMessages/checkPaymentMessage.js.map +1 -0
  151. package/lib/module/nativeComponents/UNAddToWallet/UNAddToWalletComponent/UNAddToWalletComponent.js +2 -7
  152. package/lib/module/nativeComponents/UNAddToWallet/UNAddToWalletComponent/UNAddToWalletComponent.js.map +1 -1
  153. package/lib/module/scripts/html/bodyScript.js +6 -0
  154. package/lib/module/scripts/html/bodyScript.js.map +1 -1
  155. package/lib/module/store/store.js +0 -2
  156. package/lib/module/store/store.js.map +1 -1
  157. package/lib/module/types/internal/bottomSheet.types.js +1 -0
  158. package/lib/module/types/internal/bottomSheet.types.js.map +1 -1
  159. package/lib/module/types/internal/webComponent.types.js +1 -0
  160. package/lib/module/types/internal/webComponent.types.js.map +1 -1
  161. package/lib/module/types/shared/payment/checkPayment.types.js +2 -0
  162. package/lib/module/types/shared/payment/checkPayment.types.js.map +1 -0
  163. package/lib/module/types/shared/payment/index.js +1 -0
  164. package/lib/module/types/shared/payment/index.js.map +1 -1
  165. package/lib/module/types/shared/payment/payments.types.js +1 -0
  166. package/lib/module/types/shared/payment/payments.types.js.map +1 -1
  167. package/lib/module/unitComponentsSdkManager/UnitComponentsSdk.constants.js +2 -2
  168. package/lib/module/unitComponentsSdkManager/UnitComponentsSdkManager.js +1 -1
  169. package/lib/module/utils/eventBus/EventBus.js +101 -0
  170. package/lib/module/utils/eventBus/EventBus.js.map +1 -0
  171. package/lib/module/utils/eventBus/EventBus.types.js +8 -0
  172. package/lib/module/utils/eventBus/EventBus.types.js.map +1 -0
  173. package/lib/module/utils/eventBus/index.js +2 -0
  174. package/lib/module/utils/eventBus/index.js.map +1 -0
  175. package/lib/module/webComponent/WebComponent.js +25 -20
  176. package/lib/module/webComponent/WebComponent.js.map +1 -1
  177. package/lib/typescript/src/components/UNACHCreditComponent/UNACHCreditComponent.d.ts +2 -1
  178. package/lib/typescript/src/components/UNACHCreditComponent/UNACHCreditComponent.d.ts.map +1 -1
  179. package/lib/typescript/src/components/UNACHCreditComponent/UNACHCreditComponent.utils.d.ts +2 -0
  180. package/lib/typescript/src/components/UNACHCreditComponent/UNACHCreditComponent.utils.d.ts.map +1 -1
  181. package/lib/typescript/src/components/UNACHDebitComponent/UNACHDebitComponent.d.ts +1 -1
  182. package/lib/typescript/src/components/UNACHDebitComponent/UNACHDebitComponent.d.ts.map +1 -1
  183. package/lib/typescript/src/components/UNACHDebitComponent/UNACHDebitComponent.utils.d.ts +2 -0
  184. package/lib/typescript/src/components/UNACHDebitComponent/UNACHDebitComponent.utils.d.ts.map +1 -1
  185. package/lib/typescript/src/components/UNAccountComponent/UNAccountComponent.d.ts.map +1 -1
  186. package/lib/typescript/src/components/UNActivityComponent/UNActivityComponent.d.ts +1 -0
  187. package/lib/typescript/src/components/UNActivityComponent/UNActivityComponent.d.ts.map +1 -1
  188. package/lib/typescript/src/components/UNActivityComponent/UNActivityComponent.utils.d.ts.map +1 -1
  189. package/lib/typescript/src/components/UNBottomSheetComponent/UNBottomSheetComponent.constants.d.ts +5 -5
  190. package/lib/typescript/src/components/UNBottomSheetComponent/UNBottomSheetComponent.constants.d.ts.map +1 -1
  191. package/lib/typescript/src/components/UNBottomSheetComponent/UNBottomSheetComponent.utils.d.ts +2 -2
  192. package/lib/typescript/src/components/UNBottomSheetComponent/UNBottomSheetComponent.utils.d.ts.map +1 -1
  193. package/lib/typescript/src/components/UNBottomSheetComponent/components/UNBottomSheetNativeComponent/UNBottomSheetNativeComponent.d.ts.map +1 -1
  194. package/lib/typescript/src/components/UNBottomSheetComponent/components/UNBottomSheetSlotComponent/UNBottomSheetSlotComponent.d.ts.map +1 -1
  195. package/lib/typescript/src/components/UNCardComponent/UNCardComponent.d.ts.map +1 -1
  196. package/lib/typescript/src/components/UNCheckPaymentComponent/UNCheckPaymentComponent.d.ts +17 -0
  197. package/lib/typescript/src/components/UNCheckPaymentComponent/UNCheckPaymentComponent.d.ts.map +1 -0
  198. package/lib/typescript/src/components/UNCheckPaymentComponent/UNCheckPaymentComponent.utils.d.ts +4 -0
  199. package/lib/typescript/src/components/UNCheckPaymentComponent/UNCheckPaymentComponent.utils.d.ts.map +1 -0
  200. package/lib/typescript/src/components/UNCheckPaymentComponent/index.d.ts +2 -0
  201. package/lib/typescript/src/components/UNCheckPaymentComponent/index.d.ts.map +1 -0
  202. package/lib/typescript/src/components/UNCreateCardComponent/UNCreateCardComponent.d.ts.map +1 -1
  203. package/lib/typescript/src/components/UNCreateCardComponent/UNCreateCardComponent.utils.d.ts +1 -1
  204. package/lib/typescript/src/components/UNMultipleCardsComponent/UNMultipleCardsComponent.d.ts +1 -0
  205. package/lib/typescript/src/components/UNMultipleCardsComponent/UNMultipleCardsComponent.d.ts.map +1 -1
  206. package/lib/typescript/src/components/UNMultipleCardsComponent/UNMultipleCardsComponent.utils.d.ts +1 -1
  207. package/lib/typescript/src/components/UNMultipleCardsComponent/UNMultipleCardsComponent.utils.d.ts.map +1 -1
  208. package/lib/typescript/src/components/UNPayeeManagementComponent/UNPayeeManagementComponent.d.ts +1 -0
  209. package/lib/typescript/src/components/UNPayeeManagementComponent/UNPayeeManagementComponent.d.ts.map +1 -1
  210. package/lib/typescript/src/components/UNPayeeManagementComponent/UNPayeeManagementComponent.utils.d.ts.map +1 -1
  211. package/lib/typescript/src/components/UNWhiteLabelAppComponent/UNWhiteLabelAppComponent.d.ts.map +1 -1
  212. package/lib/typescript/src/components/UNWirePaymentComponent/UNWirePaymentComponent.d.ts +0 -1
  213. package/lib/typescript/src/components/UNWirePaymentComponent/UNWirePaymentComponent.d.ts.map +1 -1
  214. package/lib/typescript/src/components/UNWirePaymentComponent/UNWirePaymentComponent.utils.d.ts.map +1 -1
  215. package/lib/typescript/src/components/index.d.ts +1 -0
  216. package/lib/typescript/src/components/index.d.ts.map +1 -1
  217. package/lib/typescript/src/flows/card/UNCardFlows.d.ts.map +1 -1
  218. package/lib/typescript/src/helpers/BottomSheet/BottomSheet.d.ts.map +1 -1
  219. package/lib/typescript/src/helpers/UNKeyboardAvoidingView/UNKeyboardAvoidingView.d.ts.map +1 -1
  220. package/lib/typescript/src/helpers/pushProvisioningService/hooks/useCardWallet.d.ts.map +1 -1
  221. package/lib/typescript/src/hooks/useEventListener.d.ts +12 -0
  222. package/lib/typescript/src/hooks/useEventListener.d.ts.map +1 -0
  223. package/lib/typescript/src/hooks/useSafeAreaDimensions.d.ts +9 -0
  224. package/lib/typescript/src/hooks/useSafeAreaDimensions.d.ts.map +1 -0
  225. package/lib/typescript/src/messages/webMessages/checkPaymentMessage.d.ts +6 -0
  226. package/lib/typescript/src/messages/webMessages/checkPaymentMessage.d.ts.map +1 -0
  227. package/lib/typescript/src/messages/webMessages/index.d.ts +2 -1
  228. package/lib/typescript/src/messages/webMessages/index.d.ts.map +1 -1
  229. package/lib/typescript/src/messages/webMessages/onLoadMessage.d.ts +1 -1
  230. package/lib/typescript/src/messages/webMessages/onLoadMessage.d.ts.map +1 -1
  231. package/lib/typescript/src/messages/webMessages/unitComponentsMessages.d.ts +1 -0
  232. package/lib/typescript/src/messages/webMessages/unitComponentsMessages.d.ts.map +1 -1
  233. package/lib/typescript/src/nativeComponents/UNAddToWallet/UNAddToWalletComponent/UNAddToWalletComponent.d.ts.map +1 -1
  234. package/lib/typescript/src/scripts/html/bodyScript.d.ts +1 -0
  235. package/lib/typescript/src/scripts/html/bodyScript.d.ts.map +1 -1
  236. package/lib/typescript/src/store/store.d.ts +0 -98
  237. package/lib/typescript/src/store/store.d.ts.map +1 -1
  238. package/lib/typescript/src/types/internal/bottomSheet.types.d.ts +7 -1
  239. package/lib/typescript/src/types/internal/bottomSheet.types.d.ts.map +1 -1
  240. package/lib/typescript/src/types/internal/webComponent.types.d.ts +2 -1
  241. package/lib/typescript/src/types/internal/webComponent.types.d.ts.map +1 -1
  242. package/lib/typescript/src/types/shared/activity.types.d.ts +1 -1
  243. package/lib/typescript/src/types/shared/activity.types.d.ts.map +1 -1
  244. package/lib/typescript/src/types/shared/payment/checkPayment.types.d.ts +38 -0
  245. package/lib/typescript/src/types/shared/payment/checkPayment.types.d.ts.map +1 -0
  246. package/lib/typescript/src/types/shared/payment/index.d.ts +1 -0
  247. package/lib/typescript/src/types/shared/payment/index.d.ts.map +1 -1
  248. package/lib/typescript/src/types/shared/payment/payments.types.d.ts +3 -1
  249. package/lib/typescript/src/types/shared/payment/payments.types.d.ts.map +1 -1
  250. package/lib/typescript/src/types/shared/transaction/UNNegativeBalanceCoverageTransaction.d.ts.map +1 -1
  251. package/lib/typescript/src/utils/eventBus/EventBus.d.ts +37 -0
  252. package/lib/typescript/src/utils/eventBus/EventBus.d.ts.map +1 -0
  253. package/lib/typescript/src/utils/eventBus/EventBus.types.d.ts +37 -0
  254. package/lib/typescript/src/utils/eventBus/EventBus.types.d.ts.map +1 -0
  255. package/lib/typescript/src/utils/eventBus/index.d.ts +4 -0
  256. package/lib/typescript/src/utils/eventBus/index.d.ts.map +1 -0
  257. package/lib/typescript/src/webComponent/WebComponent.d.ts.map +1 -1
  258. package/package.json +5 -3
  259. package/src/components/UNACHCreditComponent/UNACHCreditComponent.tsx +53 -12
  260. package/src/components/UNACHCreditComponent/UNACHCreditComponent.utils.ts +9 -3
  261. package/src/components/UNACHDebitComponent/UNACHDebitComponent.tsx +53 -13
  262. package/src/components/UNACHDebitComponent/UNACHDebitComponent.utils.ts +8 -2
  263. package/src/components/UNAccountComponent/UNAccountComponent.tsx +5 -7
  264. package/src/components/UNActivityComponent/UNActivityComponent.tsx +8 -9
  265. package/src/components/UNActivityComponent/UNActivityComponent.utils.ts +1 -0
  266. package/src/components/UNBottomSheetComponent/UNBottomSheetComponent.constants.ts +31 -13
  267. package/src/components/UNBottomSheetComponent/UNBottomSheetComponent.tsx +6 -6
  268. package/src/components/UNBottomSheetComponent/UNBottomSheetComponent.utils.ts +24 -6
  269. package/src/components/UNBottomSheetComponent/components/UNBottomSheetNativeComponent/UNBottomSheetNativeComponent.tsx +18 -9
  270. package/src/components/UNBottomSheetComponent/components/UNBottomSheetSlotComponent/UNBottomSheetSlotComponent.tsx +77 -53
  271. package/src/components/UNCardComponent/UNCardComponent.tsx +7 -8
  272. package/src/components/UNCheckPaymentComponent/UNCheckPaymentComponent.tsx +110 -0
  273. package/src/components/UNCheckPaymentComponent/UNCheckPaymentComponent.utils.tsx +31 -0
  274. package/src/components/UNCheckPaymentComponent/index.ts +1 -0
  275. package/src/components/UNCreateCardComponent/UNCreateCardComponent.tsx +9 -7
  276. package/src/components/UNCreateCardComponent/UNCreateCardComponent.utils.ts +1 -1
  277. package/src/components/UNMultipleCardsComponent/UNMultipleCardsComponent.tsx +8 -9
  278. package/src/components/UNMultipleCardsComponent/UNMultipleCardsComponent.utils.ts +3 -2
  279. package/src/components/UNPayeeManagementComponent/UNPayeeManagementComponent.tsx +12 -15
  280. package/src/components/UNPayeeManagementComponent/UNPayeeManagementComponent.utils.ts +3 -1
  281. package/src/components/UNWhiteLabelAppComponent/UNWhiteLabelAppComponent.tsx +5 -8
  282. package/src/components/UNWirePaymentComponent/UNWirePaymentComponent.tsx +0 -1
  283. package/src/components/UNWirePaymentComponent/UNWirePaymentComponent.utils.ts +0 -2
  284. package/src/components/index.ts +1 -0
  285. package/src/flows/card/UNCardFlows.ts +2 -3
  286. package/src/helpers/BottomSheet/BottomSheet.tsx +8 -7
  287. package/src/helpers/UNKeyboardAvoidingView/UNKeyboardAvoidingView.tsx +7 -4
  288. package/src/helpers/pushProvisioningService/hooks/useCardWallet.ts +0 -1
  289. package/src/hooks/useEventListener.ts +30 -0
  290. package/src/hooks/useSafeAreaDimensions.ts +48 -0
  291. package/src/messages/webMessages/checkPaymentMessage.ts +8 -0
  292. package/src/messages/webMessages/index.ts +2 -0
  293. package/src/messages/webMessages/onLoadMessage.ts +1 -1
  294. package/src/messages/webMessages/unitComponentsMessages.ts +1 -0
  295. package/src/nativeComponents/UNAddToWallet/UNAddToWalletComponent/UNAddToWalletComponent.tsx +5 -7
  296. package/src/scripts/html/bodyScript.ts +7 -0
  297. package/src/store/store.ts +0 -2
  298. package/src/types/internal/bottomSheet.types.ts +8 -0
  299. package/src/types/internal/webComponent.types.ts +2 -1
  300. package/src/types/shared/activity.types.ts +1 -1
  301. package/src/types/shared/payment/checkPayment.types.ts +39 -0
  302. package/src/types/shared/payment/index.ts +1 -0
  303. package/src/types/shared/payment/payments.types.ts +3 -1
  304. package/src/types/shared/transaction/UNNegativeBalanceCoverageTransaction.ts +1 -1
  305. package/src/unitComponentsSdkManager/UnitComponentsSdk.constants.ts +2 -2
  306. package/src/unitComponentsSdkManager/UnitComponentsSdkManager.ts +1 -1
  307. package/src/utils/eventBus/EventBus.ts +106 -0
  308. package/src/utils/eventBus/EventBus.types.ts +37 -0
  309. package/src/utils/eventBus/index.ts +3 -0
  310. package/src/webComponent/WebComponent.tsx +30 -16
  311. package/src/webComponent/html.ts +1 -1
  312. package/lib/commonjs/hooks/useListenerToEvent.js +0 -26
  313. package/lib/commonjs/hooks/useListenerToEvent.js.map +0 -1
  314. package/lib/commonjs/slices/SharedEventsSlice.js +0 -29
  315. package/lib/commonjs/slices/SharedEventsSlice.js.map +0 -1
  316. package/lib/module/hooks/useListenerToEvent.js +0 -19
  317. package/lib/module/hooks/useListenerToEvent.js.map +0 -1
  318. package/lib/module/slices/SharedEventsSlice.js +0 -22
  319. package/lib/module/slices/SharedEventsSlice.js.map +0 -1
  320. package/lib/typescript/src/hooks/useListenerToEvent.d.ts +0 -10
  321. package/lib/typescript/src/hooks/useListenerToEvent.d.ts.map +0 -1
  322. package/lib/typescript/src/slices/SharedEventsSlice.d.ts +0 -81
  323. package/lib/typescript/src/slices/SharedEventsSlice.d.ts.map +0 -1
  324. package/src/hooks/useListenerToEvent.ts +0 -32
  325. package/src/slices/SharedEventsSlice.ts +0 -128
@@ -7,7 +7,9 @@ import type {
7
7
  UNComponentsOnLoadResponseData,
8
8
  UNACHOnLoadData,
9
9
  UNACHPayment,
10
- UNPlaidAccountFilter
10
+ UNPlaidAccountFilter,
11
+ UNCounterparty,
12
+ UNAccount
11
13
  } from '../../types/shared';
12
14
  import { HeightEvent, PageMessage } from '../../messages/webMessages/pageMessage';
13
15
  import { Platform } from 'react-native';
@@ -15,27 +17,32 @@ import {
15
17
  PlaidLinkTokenData,
16
18
  PlaidTokenCreatedEvent,
17
19
  RequestExternalSdkEvent,
20
+ RequestRenderingEvent,
18
21
  UnitComponentsMessage,
19
22
  } from '../../messages/webMessages/unitComponentsMessages';
20
- import { getACHDebitParams, getACHDebitScript, injectUnitPlaidResponse } from './UNACHDebitComponent.utils';
21
- import { LinkSuccess, openLink } from 'react-native-plaid-link-sdk';
23
+ import { getACHDebitParams, getACHDebitScript, injectRequestCounterpartyDeletedScript, injectUnitPlaidResponse } from './UNACHDebitComponent.utils';
24
+ import { LinkExit, LinkSuccess, open as openPlaidLink, create as createPlaidLink } from 'react-native-plaid-link-sdk';
22
25
  import type WebView from 'react-native-webview';
23
26
  import { PaymentMessage } from '../../messages/webMessages/paymentsMessage';
24
27
  import type { ACHEvent } from '../../messages/webMessages/achCreditMessage';
25
- import { RESPONSE_KEYS, UnitOnLoadResponseEvent } from '../../messages/webMessages/onLoadMessage';
28
+ import { ACHOnLoadResponse, RESPONSE_KEYS, UnitOnLoadResponseEvent } from '../../messages/webMessages/onLoadMessage';
26
29
  import AppInfo from '../../utils/AppInfo';
27
30
  import { PresentationMode, WebComponentType } from '../../types/internal/webComponent.types';
28
31
  import { withReduxStore } from '../../helpers/store/helpers';
29
32
  import { PlaidMessage } from '../../messages/webMessages/plaidMessages';
30
33
  import { UNBaseView } from '../../nativeComponents/UNBaseView';
31
34
  import { ensureArray } from '../../utils/onLoadMessages.utils';
35
+ import { BottomSheetRenderingType, BottomSheetSlotData, SlotRendering } from '../../types/internal/bottomSheet.types';
36
+ import { BottomSheetNativeMessage } from '../../messages/nativeMessages/bottomSheetMessage';
37
+ import { eventBus } from '../../utils/eventBus';
38
+ import { useEventListener } from '../../hooks/useEventListener';
39
+ import { PayeeManagementMessage } from '../../messages/webMessages/payeeManagementMessage';
32
40
 
33
41
  export interface UNACHDebitComponentProps {
34
42
  accountId?: string;
35
43
  theme?: string;
36
44
  language?: string;
37
45
  isAutoFocus?: boolean;
38
- fee?: number;
39
46
  sameDay?: boolean;
40
47
  showSameDaySelection?: boolean;
41
48
  onPaymentCreated?: (data: UNACHPayment) => void;
@@ -46,12 +53,12 @@ export interface UNACHDebitComponentProps {
46
53
  plaidLinkCustomizationName?: string;
47
54
  initialStageBackButton?: boolean;
48
55
  finalStageDoneButton?: boolean;
56
+ allowCounterpartyDelete?: boolean;
49
57
  }
50
58
 
51
59
  const UNACHDebitComponent = (props: UNACHDebitComponentProps) => {
52
60
  const [height, setHeight] = useState<number>(0);
53
61
  const [appPackageName, setAppPackageName] = useState<string>('');
54
- const [linkToken, setLinkToken] = useState<string>('');
55
62
  const webRef = useRef<WebView>(null);
56
63
  const [presentationMode, setPresentationMode] = useState<PresentationMode>(PresentationMode.Inherit);
57
64
 
@@ -65,6 +72,12 @@ const UNACHDebitComponent = (props: UNACHDebitComponentProps) => {
65
72
  setPackageNameForAndroid();
66
73
  }, []);
67
74
 
75
+ const handleCounterpartyDeleted = (data: UNCounterparty) => {
76
+ injectRequestCounterpartyDeletedScript(webRef.current, data);
77
+ };
78
+
79
+ useEventListener({ busEventKey: PayeeManagementMessage.UNIT_COUNTERPARTY_DELETED, action: handleCounterpartyDeleted });
80
+
68
81
  const handleUnitOnLoad = (response: UnitOnLoadResponseEvent) => {
69
82
  if (!props.onLoad) {
70
83
  return;
@@ -88,6 +101,20 @@ const UNACHDebitComponent = (props: UNACHDebitComponentProps) => {
88
101
  return;
89
102
  }
90
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
+
91
118
  console.error('On Load Error: unexpected response type');
92
119
  return;
93
120
  };
@@ -112,6 +139,21 @@ const UNACHDebitComponent = (props: UNACHDebitComponentProps) => {
112
139
  case UnitComponentsMessage.UNIT_ON_LOAD:
113
140
  handleUnitOnLoad(message.details as UnitOnLoadResponseEvent);
114
141
  break;
142
+ case UnitComponentsMessage.UNIT_REQUEST_RENDERING: {
143
+ const slotData: BottomSheetSlotData = {
144
+ componentName: WebComponentType.achDebitPayment,
145
+ componentResourceId: props.accountId,
146
+ requestRenderingEvent: message.details as RequestRenderingEvent,
147
+ };
148
+
149
+ const data = {
150
+ type: BottomSheetRenderingType.Slot,
151
+ data: slotData,
152
+ } as SlotRendering;
153
+ eventBus.emit(BottomSheetNativeMessage.REQUEST_RENDERING, data);
154
+
155
+ break;
156
+ }
115
157
  case PageMessage.PAGE_HEIGHT: {
116
158
  const currentHeight = (message.details as HeightEvent).height;
117
159
  setHeight(currentHeight);
@@ -123,23 +165,21 @@ const UNACHDebitComponent = (props: UNACHDebitComponentProps) => {
123
165
  case PlaidMessage.UNIT_PLAID_TOKEN_CREATED: {
124
166
  const linkTokenEvent = message.details as PlaidTokenCreatedEvent;
125
167
  const linkTokenData = linkTokenEvent.linkToken as PlaidLinkTokenData;
126
- setLinkToken(linkTokenData.attributes.linkToken);
168
+ const link: string = linkTokenData.attributes.linkToken;
169
+ createPlaidLink({ token: link });
127
170
  break;
128
171
  }
129
172
 
130
173
  case UnitComponentsMessage.UNIT_REQUEST_EXTERNAL_SDK: {
131
174
  const externalSdkType = (message.details as RequestExternalSdkEvent).type;
132
175
  if (externalSdkType !== 'plaid') return;
133
- linkToken && openLink({
134
- tokenConfig: { noLoadingState: false, token: linkToken },
176
+ openPlaidLink({
135
177
  onSuccess: (success: LinkSuccess) => {
136
178
  injectUnitPlaidResponse(webRef.current, success);
137
179
  },
138
- onExit: exit => {
180
+ onExit: (exit: LinkExit) => {
139
181
  console.log(exit);
140
- },
141
- }).catch(e => {
142
- console.error(e);
182
+ }
143
183
  });
144
184
  break;
145
185
  }
@@ -1,8 +1,9 @@
1
- import { DISPATCH_PLAID_RESPONSE, LISTENERS } from './../../scripts/html/bodyScript';
1
+ import { DISPATCH_COUNTERPARTY_DELETED, DISPATCH_PLAID_RESPONSE, LISTENERS } from './../../scripts/html/bodyScript';
2
2
  import type { UNACHDebitComponentProps } from './UNACHDebitComponent';
3
3
 
4
4
  import type WebView from 'react-native-webview';
5
5
  import type { LinkSuccess } from 'react-native-plaid-link-sdk';
6
+ import { UNCounterparty } from '../../types/shared';
6
7
 
7
8
  export const getACHDebitParams = (props: UNACHDebitComponentProps) => {
8
9
  const plaidAccountFiltersParam = props.plaidAccountFilters ? `plaid-account-filters="${props.plaidAccountFilters.join()}"` : '';
@@ -11,7 +12,6 @@ export const getACHDebitParams = (props: UNACHDebitComponentProps) => {
11
12
  return `
12
13
  ${accountIdParam}
13
14
  is-auto-focus="${props.isAutoFocus ?? false}"
14
- ${props.fee ? `fee="${props.fee}"` : ''}
15
15
  style="height: 100%"
16
16
  same-day="${props.sameDay ?? false}"
17
17
  show-same-day-selection="${props.showSameDaySelection ?? false}"
@@ -19,6 +19,7 @@ export const getACHDebitParams = (props: UNACHDebitComponentProps) => {
19
19
  ${plaidLinkCustomizationNameParam}
20
20
  initial-stage-back-button="${props.initialStageBackButton ?? false}"
21
21
  final-stage-done-button="${props.finalStageDoneButton ?? false}"
22
+ allow-counterparty-delete="${props.allowCounterpartyDelete ?? false}"
22
23
  `;
23
24
  };
24
25
 
@@ -30,6 +31,7 @@ export const getACHDebitScript = (androidPackageName?: string) => {
30
31
  ${LISTENERS.unitPaymentInitialStageBackButtonClicked}
31
32
  ${LISTENERS.unitPaymentFinalStageDoneButtonClicked}
32
33
  ${DISPATCH_PLAID_RESPONSE}
34
+ ${DISPATCH_COUNTERPARTY_DELETED}
33
35
  ${LISTENERS.requestRefresh}
34
36
  `;
35
37
  };
@@ -38,3 +40,7 @@ export const injectUnitPlaidResponse = (currentWeb: WebView | null, success: Lin
38
40
  const successObj = { data: { publicToken: success.publicToken, metadata: success.metadata } };
39
41
  currentWeb?.injectJavaScript(`dispatchPlaidEvent(${JSON.stringify(successObj)})`);
40
42
  };
43
+
44
+ export const injectRequestCounterpartyDeletedScript = (currentWeb: WebView | null, counterparty: UNCounterparty) => {
45
+ currentWeb?.injectJavaScript(`dispatchCounterpartyDeletedEvent('${counterparty}')`);
46
+ };
@@ -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,20 +1,38 @@
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;
32
+ export const overFullScreenHeight = calculateOverFullScreenHeight();
19
33
 
20
- export const overFullScreenHeight = Dimensions.get('window').height * BOTTOM_SHEET_OVER_FULLSCREEN_PERCENTAGE_SIZE;
34
+ export const TOP_PADDING = 48;
35
+ export const BOTTOM_PADDING = 24;
36
+ export const LEFT_PADDING = 24;
37
+ export const RIGHT_PADDING = 24;
38
+ export const VERTICAL_PADDING = TOP_PADDING + BOTTOM_PADDING; // For adjusting injected height
@@ -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,
@@ -89,7 +90,6 @@ const getACHCreditComponentDataFromEvent = (event: BottomSheetSlotData): BottomS
89
90
  const accountId = extractValueFromRequestRenderingEvent(event.requestRenderingEvent, 'account-id');
90
91
  const theme = extractValueFromRequestRenderingEvent(event.requestRenderingEvent, 'theme');
91
92
  const language = extractValueFromRequestRenderingEvent(event.requestRenderingEvent, 'language');
92
- const fee = extractValueFromRequestRenderingEvent(event.requestRenderingEvent, 'fee');
93
93
  const initialStageBackButton = extractValueFromRequestRenderingEvent(event.requestRenderingEvent, 'initial-stage-back-button');
94
94
  const finalStageDoneButton = extractValueFromRequestRenderingEvent(event.requestRenderingEvent, 'final-stage-done-button');
95
95
  const withPlaid = extractValueFromRequestRenderingEvent(event.requestRenderingEvent, 'with-plaid');
@@ -106,7 +106,6 @@ const getACHCreditComponentDataFromEvent = (event: BottomSheetSlotData): BottomS
106
106
  accountId: accountId,
107
107
  theme: theme,
108
108
  language: language,
109
- fee: fee ? parseInt(fee) : undefined,
110
109
  initialStageBackButton: initialStageBackButton ? initialStageBackButton === 'true' : undefined,
111
110
  finalStageDoneButton: finalStageDoneButton ? finalStageDoneButton === 'true' : undefined,
112
111
  withPlaid: withPlaid ? withPlaid === 'true' : undefined,
@@ -123,7 +122,6 @@ const getACHDebitComponentDataFromEvent = (event: BottomSheetSlotData): BottomSh
123
122
  const accountId = extractValueFromRequestRenderingEvent(event.requestRenderingEvent, 'account-id');
124
123
  const theme = extractValueFromRequestRenderingEvent(event.requestRenderingEvent, 'theme');
125
124
  const language = extractValueFromRequestRenderingEvent(event.requestRenderingEvent, 'language');
126
- const fee = extractValueFromRequestRenderingEvent(event.requestRenderingEvent, 'fee');
127
125
  const initialStageBackButton = extractValueFromRequestRenderingEvent(event.requestRenderingEvent, 'initial-stage-back-button');
128
126
  const finalStageDoneButton = extractValueFromRequestRenderingEvent(event.requestRenderingEvent, 'final-stage-done-button');
129
127
  const plaidLinkCustomizationName = extractValueFromRequestRenderingEvent(event.requestRenderingEvent, 'plaid-link-customization-name');
@@ -139,7 +137,6 @@ const getACHDebitComponentDataFromEvent = (event: BottomSheetSlotData): BottomSh
139
137
  accountId: accountId,
140
138
  theme: theme,
141
139
  language: language,
142
- fee: fee ? parseInt(fee) : undefined,
143
140
  initialStageBackButton: initialStageBackButton ? initialStageBackButton === 'true' : undefined,
144
141
  finalStageDoneButton: finalStageDoneButton ? finalStageDoneButton === 'true' : undefined,
145
142
  plaidAccountFilters: plaidAccountFiltersArray,
@@ -175,6 +172,25 @@ const getCheckDepositComponentDataFromEvent = (event: BottomSheetSlotData): Bott
175
172
  };
176
173
  };
177
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
+
178
194
  const getBookPaymentComponentDataFromEvent = (event: BottomSheetSlotData): BottomSheetNativeBookPaymentComponentType | null => {
179
195
  const accountId = extractValueFromRequestRenderingEvent(event.requestRenderingEvent, 'account-id');
180
196
  const counterPartyAccountId = extractValueFromRequestRenderingEvent(event.requestRenderingEvent, 'counterparty-account-id');
@@ -206,7 +222,6 @@ const getWirePaymentComponentDataFromEvent = (event: BottomSheetSlotData): Botto
206
222
  const accountId = extractValueFromRequestRenderingEvent(event.requestRenderingEvent, 'account-id');
207
223
  const theme = extractValueFromRequestRenderingEvent(event.requestRenderingEvent, 'theme');
208
224
  const language = extractValueFromRequestRenderingEvent(event.requestRenderingEvent, 'language');
209
- const fee = extractValueFromRequestRenderingEvent(event.requestRenderingEvent, 'fee');
210
225
  const isAutoFocus = extractValueFromRequestRenderingEvent(event.requestRenderingEvent, 'is-auto-focus');
211
226
  const initialStageBackButton = extractValueFromRequestRenderingEvent(event.requestRenderingEvent, 'initial-stage-back-button');
212
227
  const finalStageDoneButton = extractValueFromRequestRenderingEvent(event.requestRenderingEvent, 'final-stage-done-button');
@@ -221,7 +236,6 @@ const getWirePaymentComponentDataFromEvent = (event: BottomSheetSlotData): Botto
221
236
  accountId: accountId,
222
237
  theme: theme,
223
238
  language: language,
224
- fee: fee ? parseInt(fee) : undefined,
225
239
  isAutoFocus: isAutoFocus ? isAutoFocus === 'true' : undefined,
226
240
  initialStageBackButton: initialStageBackButton ? initialStageBackButton === 'true' : undefined,
227
241
  finalStageDoneButton: finalStageDoneButton ? finalStageDoneButton === 'true' : undefined,
@@ -281,6 +295,10 @@ export const getNativeComponentDataFromEvent = (event: BottomSheetSlotData) => {
281
295
  componentData = getCheckDepositComponentDataFromEvent(event);
282
296
  break;
283
297
 
298
+ case WebComponentType.checkPayment:
299
+ componentData = getCheckPaymentComponentDataFromEvent(event);
300
+ break;
301
+
284
302
  case WebComponentType.bookPayment:
285
303
  componentData = getBookPaymentComponentDataFromEvent(event);
286
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
@@ -134,7 +143,7 @@ const UNBottomSheetNativeComponent = (props: UNBottomSheetNativeComponentProps)
134
143
  );
135
144
  case BottomSheetNativePlaceType.overFullScreen:
136
145
  return (
137
- <UNKeyboardAvoidingView style={{ height }}>
146
+ <UNKeyboardAvoidingView style={{ height, padding, paddingTop, paddingBottom }}>
138
147
  {renderNativeComponent()}
139
148
  </UNKeyboardAvoidingView>
140
149
  );