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
@@ -9,10 +9,9 @@ import {
9
9
  SlotRendering,
10
10
  } from '../../types/internal/bottomSheet.types';
11
11
  import type { BottomSheetSlotData } from '../../types/internal/bottomSheet.types';
12
- import { setEvent } from '../../slices/SharedEventsSlice';
12
+ import { eventBus } from '../../utils/eventBus';
13
13
  import { BottomSheetNativeMessage } from '../../messages/nativeMessages/bottomSheetMessage';
14
- import { useDispatch } from 'react-redux';
15
- import { useListenerToEvent } from '../../hooks/useListenerToEvent';
14
+ import { useEventListener } from '../../hooks/useEventListener';
16
15
  import WebView from 'react-native-webview';
17
16
  import {
18
17
  getWhiteLabelAppParams,
@@ -40,8 +39,6 @@ export interface UNWhiteLabelAppComponentProps {
40
39
  const UNWhiteLabelAppComponent = (props: UNWhiteLabelAppComponentProps) => {
41
40
  const webRef = useRef<WebView>(null);
42
41
 
43
- const dispatch = useDispatch();
44
-
45
42
  const handleWebViewMessage = (message: WebViewMessage) => {
46
43
  switch (message.type) {
47
44
  case UnitComponentsMessage.UNIT_REQUEST_RENDERING: {
@@ -56,7 +53,7 @@ const UNWhiteLabelAppComponent = (props: UNWhiteLabelAppComponentProps) => {
56
53
  data: slotData,
57
54
  } as SlotRendering;
58
55
 
59
- dispatch(setEvent({ key: BottomSheetNativeMessage.REQUEST_RENDERING, data }));
56
+ eventBus.emit(BottomSheetNativeMessage.REQUEST_RENDERING, data);
60
57
  break;
61
58
  }
62
59
  case UnitComponentsMessage.UNIT_WHITE_LABEL_APP_ON_LOAD: {
@@ -97,8 +94,8 @@ const UNWhiteLabelAppComponent = (props: UNWhiteLabelAppComponentProps) => {
97
94
  webRef.current?.injectJavaScript(`dispatchActivityFilterChangedEvent('${query}')`);
98
95
  };
99
96
 
100
- useListenerToEvent({ busEventKey: UnitComponentsMessage.UNIT_REQUEST_REFRESH, action: requestRefresh });
101
- useListenerToEvent({
97
+ useEventListener({ busEventKey: UnitComponentsMessage.UNIT_REQUEST_REFRESH, action: requestRefresh });
98
+ useEventListener({
102
99
  busEventKey: ActivityMessage.UNIT_ACTIVITY_FILTERS_CHANGED,
103
100
  action: dispatchActivityFiltersChanged,
104
101
  });
@@ -16,7 +16,6 @@ import { WirePaymentCreatedEvent } from '../../messages/webMessages/wirePaymentM
16
16
  export interface UNWirePaymentComponentProps {
17
17
  // inputs
18
18
  accountId?: string;
19
- fee?: number;
20
19
 
21
20
  // ui
22
21
  theme?: string;
@@ -3,10 +3,8 @@ import { UNWirePaymentComponentProps } from './UNWirePaymentComponent';
3
3
 
4
4
  export const getWirePaymentParams = (props: UNWirePaymentComponentProps) => {
5
5
  const accountIdParam = props.accountId ? `account-id="${props.accountId}"` : '';
6
- const feeParam = props.fee ? `fee="${props.fee}"` : '';
7
6
  return `
8
7
  ${accountIdParam}
9
- ${feeParam}
10
8
  is-auto-focus="${props.isAutoFocus || false}"
11
9
  initial-stage-back-button="${props.initialStageBackButton ?? false}"
12
10
  final-stage-done-button="${props.finalStageDoneButton ?? false}"
@@ -5,6 +5,7 @@ export * from './UNBookPaymentComponent';
5
5
  export * from './UNActivityComponent';
6
6
  export * from './UNAccountComponent';
7
7
  export * from './UNCheckDepositComponent';
8
+ export * from './UNCheckPaymentComponent';
8
9
  export * from './UNACHDebitComponent';
9
10
  export * from './UNACHCreditComponent';
10
11
  export * from './UNProgramDetailsComponent';
@@ -3,8 +3,7 @@ import {
3
3
  BottomSheetRenderingType, NativeComponentRendering,
4
4
  } from '../../types/internal/bottomSheet.types';
5
5
  import { BottomSheetNativeMessage } from '../../messages/nativeMessages/bottomSheetMessage';
6
- import { setEvent } from '../../slices/SharedEventsSlice';
7
- import { store } from '../../store/store';
6
+ import { eventBus } from '../../utils/eventBus';
8
7
  import {
9
8
  UNAddToWalletComponentProps,
10
9
  } from '../../nativeComponents/UNAddToWallet/UNAddToWalletComponent/UNAddToWalletComponent';
@@ -22,7 +21,7 @@ export class UNCardFlows {
22
21
  },
23
22
  },
24
23
  };
25
- store.dispatch(setEvent({ key: BottomSheetNativeMessage.REQUEST_RENDERING, data }));
24
+ eventBus.emit(BottomSheetNativeMessage.REQUEST_RENDERING, data);
26
25
  } catch (error) {
27
26
  console.error(error);
28
27
  }
@@ -11,11 +11,7 @@ import {
11
11
  View,
12
12
  } from 'react-native';
13
13
  import { CloseIcon } from '../../assets/images';
14
- import {
15
- androidStatusBarHeight,
16
- fullScreenHeight, isAndroid10AndAbove,
17
- statusBarHeight,
18
- } from '../../components/UNBottomSheetComponent/UNBottomSheetComponent.constants';
14
+ import { useSafeAreaDimensions } from '../../hooks/useSafeAreaDimensions';
19
15
  import { getStylesObject } from './BottomSheet.styles';
20
16
  import { useIsBackFromLongBackground } from '../../hooks/useAppStateListener';
21
17
  import { BottomSheetNativePlaceType } from '../../types/internal/bottomSheet.types';
@@ -43,6 +39,9 @@ const BottomSheet = (props: BottomSheetProps) => {
43
39
  const styles = getStylesObject(fadeAnim);
44
40
  const [isPanelOpened, setIsPanelOpened] = useState(props.isOpen);
45
41
  const [contentHeight, setContentHeight] = useState<number | undefined>(undefined);
42
+ const { insets, fullScreenHeight, isAndroid10AndAbove, isEdgeToEdgeActive } = useSafeAreaDimensions();
43
+ // Android 15+ (API 35) enforces edge-to-edge, so marginTop calculation differs
44
+ const isAndroid15AndAbove = Platform.OS === 'android' && Platform.Version >= 35;
46
45
 
47
46
  const [currentHeight, setCurrentHeight] = useState<number>(props.sliderMaxHeight);
48
47
 
@@ -204,11 +203,13 @@ const BottomSheet = (props: BottomSheetProps) => {
204
203
  borderTopLeftRadius: isModal ? 0 : styles.container.borderTopLeftRadius,
205
204
  borderTopRightRadius: isModal ? 0 : styles.container.borderTopRightRadius,
206
205
  height: props.sliderMaxHeight,
207
- marginTop: fullScreenHeight - props.sliderMaxHeight - ((!isModal && isAndroid10AndAbove) ? androidStatusBarHeight : 0),
206
+ // Android 15+ (edge-to-edge): fullScreenHeight is already the full screen, no adjustment needed
207
+ // Android 10-14: fullScreenHeight includes status bar, but view starts below it, so subtract insets.top
208
+ marginTop: isModal ? 0 : fullScreenHeight - props.sliderMaxHeight - (isAndroid10AndAbove && !isAndroid15AndAbove ? insets.top : 0),
208
209
  transform: [
209
210
  { translateY: panelHeightValue },
210
211
  ],
211
- paddingTop: Platform.OS === 'ios' && isModal ? statusBarHeight : 0,
212
+ paddingTop: isModal && (Platform.OS === 'ios' || isEdgeToEdgeActive) ? insets.top : 0,
212
213
  }}
213
214
  >
214
215
  <View
@@ -1,6 +1,6 @@
1
- import { KeyboardAvoidingView, Platform, ViewStyle } from 'react-native';
1
+ import { KeyboardAvoidingView, Platform, StatusBar, ViewStyle } from 'react-native';
2
2
  import React from 'react';
3
- import { statusBarHeight } from '../../components/UNBottomSheetComponent/UNBottomSheetComponent.constants';
3
+ import { initialWindowMetrics } from 'react-native-safe-area-context';
4
4
 
5
5
  interface UNKeyboardAvoidingViewProps {
6
6
  children: React.ReactNode,
@@ -8,12 +8,15 @@ interface UNKeyboardAvoidingViewProps {
8
8
  keyboardVerticalOffset?: number,
9
9
  }
10
10
 
11
+ const topInset = initialWindowMetrics?.insets.top ?? 0;
12
+ const defaultOffset = topInset > 0 ? topInset : (StatusBar.currentHeight || 0);
13
+
11
14
  const UNKeyboardAvoidingView = ({ children, style, keyboardVerticalOffset }: UNKeyboardAvoidingViewProps) => {
12
15
  return (
13
16
  <KeyboardAvoidingView
14
17
  style={style ?? { height: '100%' }}
15
18
  behavior="padding"
16
- keyboardVerticalOffset={keyboardVerticalOffset ?? statusBarHeight}
19
+ keyboardVerticalOffset={keyboardVerticalOffset ?? defaultOffset}
17
20
  enabled={Platform.OS === 'android'}
18
21
  >
19
22
  {children}
@@ -21,4 +24,4 @@ const UNKeyboardAvoidingView = ({ children, style, keyboardVerticalOffset }: UNK
21
24
  );
22
25
  };
23
26
 
24
- export default UNKeyboardAvoidingView;
27
+ export default UNKeyboardAvoidingView;
@@ -24,7 +24,6 @@ export const useCardWallet = (cardId: string) => {
24
24
  const isRecoveringSignedNonceRef = useRef<boolean>(false);
25
25
  const customerToken = useSelector((state: RootState) => state.configuration.customerToken);
26
26
 
27
-
28
27
  const shouldRecoverVPSDKForError = (errorType: UNVPErrorType) => {
29
28
  const recoveringTypes = [UNVPErrorType.PayloadDecryptionFailed, UNVPErrorType.SessionExpired, UNVPErrorType.InvalidNonce];
30
29
  return recoveringTypes.includes(errorType);
@@ -0,0 +1,30 @@
1
+ import { useEffect, useRef } from 'react';
2
+ import { eventBus, type EventMap } from '../utils/eventBus';
3
+
4
+ type EventListener<K extends keyof EventMap> = {
5
+ busEventKey: K;
6
+ action: (data: EventMap[K]) => void;
7
+ };
8
+
9
+ /**
10
+ * Hook to listen to events from the EventBus
11
+ * Automatically subscribes on mount and unsubscribes on unmount
12
+ */
13
+ export const useEventListener = <K extends keyof EventMap>(listener: EventListener<K>) => {
14
+ const actionRef = useRef(listener.action);
15
+
16
+ // Keep action ref up to date
17
+ useEffect(() => {
18
+ actionRef.current = listener.action;
19
+ }, [listener.action]);
20
+
21
+ useEffect(() => {
22
+ // Subscribe to the event
23
+ const unsubscribe = eventBus.on(listener.busEventKey, (data) => {
24
+ actionRef.current(data);
25
+ });
26
+
27
+ // Cleanup: unsubscribe when component unmounts
28
+ return unsubscribe;
29
+ }, [listener.busEventKey]);
30
+ };
@@ -0,0 +1,48 @@
1
+ import { Dimensions, Platform } from 'react-native';
2
+ import { initialWindowMetrics } from 'react-native-safe-area-context';
3
+
4
+ const isAndroid = Platform.OS === 'android';
5
+ const isAndroid10To14 = isAndroid && Platform.Version >= 29 && Platform.Version < 35;
6
+ const isAndroid15AndAbove = isAndroid && Platform.Version >= 35;
7
+
8
+ const insets = initialWindowMetrics?.insets ?? { top: 0, bottom: 0, left: 0, right: 0 };
9
+ const windowHeight = Dimensions.get('window').height;
10
+ const screenHeight = Dimensions.get('screen').height;
11
+
12
+ // Detect edge-to-edge by comparing window to screen height
13
+ // Edge-to-edge ON: windowHeight ≈ screenHeight | OFF: windowHeight < screenHeight
14
+ const heightDifference = Math.abs(screenHeight - windowHeight);
15
+ const isEdgeToEdgeActive = isAndroid15AndAbove && heightDifference < 10;
16
+
17
+ const effectiveBottomInset = isEdgeToEdgeActive ? insets.bottom : 0;
18
+
19
+ const calculateFullScreenHeight = (): number => {
20
+ if (isAndroid15AndAbove) {
21
+ return isEdgeToEdgeActive ? screenHeight : windowHeight;
22
+ } else if (isAndroid10To14) {
23
+ return windowHeight + insets.top;
24
+ }
25
+ return windowHeight;
26
+ };
27
+
28
+ const fullScreenHeight = calculateFullScreenHeight();
29
+
30
+ const calculateContentHeight = (): number => {
31
+ if (isAndroid15AndAbove && !isEdgeToEdgeActive) {
32
+ return windowHeight;
33
+ }
34
+ return fullScreenHeight - insets.top;
35
+ };
36
+
37
+ const contentHeight = calculateContentHeight();
38
+
39
+ export const useSafeAreaDimensions = () => {
40
+ return {
41
+ insets,
42
+ fullScreenHeight,
43
+ contentHeight,
44
+ isAndroid10AndAbove: isAndroid && Platform.Version >= 29,
45
+ isEdgeToEdgeActive,
46
+ effectiveBottomInset,
47
+ };
48
+ };
@@ -0,0 +1,8 @@
1
+ import { UNPayment } from '../../types/shared';
2
+
3
+ export interface PaymentCreatedEvent {
4
+ data: UNPayment
5
+ }
6
+
7
+ export type CheckPaymentEvent =
8
+ | PaymentCreatedEvent
@@ -6,6 +6,7 @@ import type { PaymentMessage } from './paymentsMessage';
6
6
  import type { UnitEvent, UnitComponentsMessage, MultiFactorAuthenticationFinishedEvent } from './unitComponentsMessages';
7
7
  import type { AccountEvent, AccountMessage } from './accountMessage';
8
8
  import type { CheckEvent, CheckMessage } from './checkMessage';
9
+ import type { CheckPaymentEvent } from './checkPaymentMessage';
9
10
  import type { ActivityEvent, ActivityMessage } from './activityMessage';
10
11
  import type { MultipleCardsEvent, MultipleCardsMessage } from './multipleCardsMessage';
11
12
  import { PlaidEvent, PlaidMessage } from './plaidMessages';
@@ -36,6 +37,7 @@ type WebViewEvent =
36
37
  | ACHEvent
37
38
  | AccountEvent
38
39
  | CheckEvent
40
+ | CheckPaymentEvent
39
41
  | ActivityEvent
40
42
  | PlaidEvent
41
43
  | PayeeManagementEvent
@@ -45,7 +45,7 @@ export type ACHOnLoadResponse = {
45
45
 
46
46
  export type ActivityOnLoadResponse = {
47
47
  [RESPONSE_KEYS.authorizations]: UNComponentsOnLoadResponseData<[UNAuthorization]>,
48
- [RESPONSE_KEYS.transactions]: UNComponentsOnLoadResponseData<[UNTransaction]>
48
+ [RESPONSE_KEYS.transactions]?: UNComponentsOnLoadResponseData<[UNTransaction]>
49
49
  }
50
50
 
51
51
  export type PayeeManagementOnLoadResponse = {
@@ -30,6 +30,7 @@ export interface RequestRenderingEventData {
30
30
  nativeComponentName?: WebComponentType,
31
31
  nativePlace: BottomSheetNativePlaceType,
32
32
  nativeComponent: string,
33
+ isPaddingIncluded: boolean
33
34
  }
34
35
 
35
36
  export interface RequestRefreshEvent {
@@ -6,7 +6,6 @@ import { PresentationMode, WebComponentType } from '../../../types/internal/webC
6
6
  import { UNCardAddToWalletStatus } from '../../../types/shared/wallet.types';
7
7
  import UnitAddToWalletButtonView from '../UnitAddToWalletButtonNativeComponent';
8
8
  import WebView from 'react-native-webview';
9
- import { useDispatch } from 'react-redux';
10
9
  import {
11
10
  getStylesObject,
12
11
  } from './UNAddToWalletBottomSheetItem.styles';
@@ -15,7 +14,7 @@ import { getAddToWalletParams, getAddToWalletWindowParams } from './UNAddToWalle
15
14
  import { WebViewMessage } from '../../../messages/webMessages';
16
15
  import { UnitComponentsMessage } from '../../../messages/webMessages/unitComponentsMessages';
17
16
  import { injectHtmlFullScreenHeight } from '../../../components/UNBottomSheetComponent/UNBottomSheetComponent.utils';
18
- import { setEvent } from '../../../slices/SharedEventsSlice';
17
+ import { eventBus } from '../../../utils/eventBus';
19
18
  import {
20
19
  overFullScreenHeight,
21
20
  } from '../../../components/UNBottomSheetComponent/UNBottomSheetComponent.constants';
@@ -33,7 +32,6 @@ export interface UNAddToWalletComponentProps {
33
32
  }
34
33
 
35
34
  const UNAddToWalletComponent = (props: UNAddToWalletComponentProps) => {
36
- const dispatch = useDispatch();
37
35
  const webRef = useRef<WebView>(null);
38
36
  const { currentUNWallet } = useCardWallet(props.cardId);
39
37
  const styles = getStylesObject();
@@ -55,10 +53,10 @@ const UNAddToWalletComponent = (props: UNAddToWalletComponentProps) => {
55
53
  injectHtmlFullScreenHeight(webRef.current, overFullScreenHeight);
56
54
  break;
57
55
  case UnitComponentsMessage.UNIT_REQUEST_CLOSE_FLOW:
58
- dispatch(setEvent({
59
- key: UnitComponentsMessage.UNIT_REQUEST_CLOSE_FLOW,
60
- data: {},
61
- }));
56
+ eventBus.emit(
57
+ UnitComponentsMessage.UNIT_REQUEST_CLOSE_FLOW,
58
+ {}
59
+ );
62
60
  break;
63
61
  default:
64
62
  break;
@@ -375,3 +375,10 @@ export const DISPATCH_REQUEST_ACCOUNT_ACTION = `
375
375
  document.querySelector("unit-elements-account").dispatchEvent(new CustomEvent("unitRequestAccountAction", {detail: {action: action}}))
376
376
  }
377
377
  `;
378
+
379
+ export const DISPATCH_COUNTERPARTY_DELETED = `
380
+ const dispatchCounterpartyDeletedEvent = (details) => {
381
+ const event = new CustomEvent("unitCounterpartyDeleted",{ detail: { data: details } });
382
+ window.dispatchEvent(event);
383
+ }
384
+ `;
@@ -1,14 +1,12 @@
1
1
  import { configureStore } from '@reduxjs/toolkit';
2
2
  import wallet from '../slices/pushProvisioningSlice';
3
3
  import configuration from '../slices/ConfigurationSlice';
4
- import sharedEvents from '../slices/SharedEventsSlice';
5
4
  import bottomSheet from '../slices/BottomSheetSlice';
6
5
 
7
6
  export const store = configureStore({
8
7
  reducer: {
9
8
  wallet,
10
9
  configuration,
11
- sharedEvents,
12
10
  bottomSheet,
13
11
  },
14
12
  });
@@ -9,6 +9,7 @@ import { UNCheckDepositComponentProps } from '../../components/UNCheckDepositCom
9
9
  import { UNBookPaymentComponentProps } from '../../components/UNBookPaymentComponent';
10
10
  import { UNWirePaymentComponentProps } from '../../components/UNWirePaymentComponent';
11
11
  import { UNCreateCardComponentProps } from '../../components/UNCreateCardComponent';
12
+ import { UNCheckPaymentComponentProps } from '../../components/UNCheckPaymentComponent';
12
13
 
13
14
  export enum BottomSheetNativePlaceType {
14
15
  overFullScreen = 'overFullScreen',
@@ -50,6 +51,7 @@ export enum BottomSheetNativeComponentType {
50
51
  ACHCreditComponent = 'UNACHCreditComponent',
51
52
  ACHDebitComponent = 'UNACHDebitComponent',
52
53
  CheckDepositComponent = 'UNCheckDepositComponent',
54
+ CheckPaymentComponent = 'UNCheckPaymentComponent',
53
55
  BookPaymentComponent = 'UNBookPaymentComponent',
54
56
  WirePaymentComponent = 'UNWirePaymentComponent',
55
57
  CreateCardComponent = 'UNCreateCardComponent'
@@ -75,6 +77,11 @@ export type BottomSheetNativeCheckDepositComponentType = {
75
77
  props: UNCheckDepositComponentProps
76
78
  }
77
79
 
80
+ export type BottomSheetNativeCheckPaymentComponentType = {
81
+ type: BottomSheetNativeComponentType.CheckPaymentComponent,
82
+ props: UNCheckPaymentComponentProps
83
+ }
84
+
78
85
  export type BottomSheetNativeBookPaymentComponentType = {
79
86
  type: BottomSheetNativeComponentType.BookPaymentComponent,
80
87
  props: UNBookPaymentComponentProps
@@ -94,6 +101,7 @@ export type BottomSheetNativeComponent = BottomSheetNativeAddToWalletComponentTy
94
101
  | BottomSheetNativeACHCreditComponentType
95
102
  | BottomSheetNativeACHDebitComponentType
96
103
  | BottomSheetNativeCheckDepositComponentType
104
+ | BottomSheetNativeCheckPaymentComponentType
97
105
  | BottomSheetNativeBookPaymentComponentType
98
106
  | BottomSheetNativeWirePaymentComponentType
99
107
  | BottomSheetNativeCreateCardComponentType
@@ -16,7 +16,8 @@ export enum WebComponentType {
16
16
  whiteLabelApp = 'unit-elements-white-label-app',
17
17
  multiFactorAuthentication = 'unit-elements-multi-factor-authentication',
18
18
  createCard = 'unit-elements-create-card',
19
- cardMenu = 'unit-elements-card-menu'
19
+ cardMenu = 'unit-elements-card-menu',
20
+ checkPayment = 'unit-elements-check-payment'
20
21
  }
21
22
 
22
23
  export enum PresentationMode {
@@ -9,7 +9,7 @@ export enum UNActivityComponentPaginationType {
9
9
 
10
10
  export type UNActivityOnLoadData = {
11
11
  [RESPONSE_KEYS.authorizations]: [UNAuthorization],
12
- [RESPONSE_KEYS.transactions]: [UNTransaction],
12
+ [RESPONSE_KEYS.transactions]?: [UNTransaction],
13
13
  }
14
14
 
15
15
  export enum UNActivityType {
@@ -0,0 +1,39 @@
1
+ import { UNPaymentType } from './payments.types';
2
+
3
+ export interface UNCheckPayment {
4
+ type: UNPaymentType.CheckPayment
5
+ id: string
6
+ attributes: {
7
+ counterparty: UNCheckPaymentCounterparty
8
+ amount: number
9
+ idempotencyKey: string
10
+ description: string
11
+ memo: string
12
+ }
13
+ relationships: {
14
+ account: {
15
+ data: {
16
+ type: string
17
+ id: string
18
+ }
19
+ }
20
+ customer: {
21
+ data: {
22
+ type: string
23
+ id: string
24
+ }
25
+ }
26
+ }
27
+ }
28
+
29
+ export interface UNCheckPaymentCounterparty {
30
+ name: string
31
+ address: {
32
+ street: string
33
+ street2?: string
34
+ city: string
35
+ state: string
36
+ postalCode: string
37
+ country: string
38
+ }
39
+ }
@@ -1,5 +1,6 @@
1
1
  export * from './achPayment.types';
2
2
  export * from './billPayment.types';
3
3
  export * from './bookPayment.types';
4
+ export * from './checkPayment.types';
4
5
  export * from './wirePayment.types';
5
6
  export * from './payments.types';
@@ -3,14 +3,16 @@ import { UNACHPayment } from './achPayment.types';
3
3
  import { UNBillPayment } from './billPayment.types';
4
4
  import { UNBookPayment } from './bookPayment.types';
5
5
  import { UNWirePayment } from './wirePayment.types';
6
+ import { UNCheckPayment } from './checkPayment.types';
6
7
 
7
- export type UNPayment = UNACHPayment | UNBookPayment | UNWirePayment | UNBillPayment
8
+ export type UNPayment = UNACHPayment | UNBookPayment | UNWirePayment | UNBillPayment | UNCheckPayment
8
9
 
9
10
  export enum UNPaymentType {
10
11
  AchPayment = 'achPayment',
11
12
  BookPayment = 'bookPayment',
12
13
  WirePayment = 'wirePayment',
13
14
  BillPayment = 'billPayment',
15
+ CheckPayment = 'checkPayment',
14
16
  CardToCardPayment = 'cardToCardPayment',
15
17
  }
16
18
 
@@ -1,4 +1,4 @@
1
- import { UNCents } from '../payment/payments.types';
1
+ import { UNCents } from '../payment/payments.types';
2
2
  import { UNTransactionTypes } from './transactions.types';
3
3
  import { UNDirection } from '../types';
4
4
 
@@ -3,8 +3,8 @@ import { UNComponentsSecuritySettings, UNComponentsSnapshotProtectionStrategy }
3
3
 
4
4
  const WEB_SDK_RECOMMENDED_STRATEGY: UNComponentsWebVersioningStrategy = {
5
5
  type: UNVersioningStrategyType.upToNextMinor,
6
- major: 2,
7
- minor: 4,
6
+ major: 3,
7
+ minor: 3,
8
8
  };
9
9
 
10
10
  const DEFAULT_SECURITY_SETTINGS: UNComponentsSecuritySettings = {
@@ -25,7 +25,7 @@ export class UnitComponentsSDK {
25
25
  protected static fonts?: UNFonts;
26
26
  protected static signedNonce?: string;
27
27
  protected static pushProvisionModule?: typeof NativeModules;
28
- protected static sdkVersion = '2.1.0';
28
+ protected static sdkVersion = '3.0.0';
29
29
 
30
30
  public static init = async (
31
31
  env: UNComponentsEnvironment,
@@ -0,0 +1,106 @@
1
+ import type { EventMap, SharedEvent } from './EventBus.types';
2
+
3
+ // Type-safe callback that receives the correct data type for the event key
4
+ export type EventCallback<K extends keyof EventMap> = (data: EventMap[K]) => void;
5
+
6
+ class EventBus {
7
+ private debug = false;
8
+ private listeners = new Map<SharedEvent['key'], Set<(data: unknown) => void>>();
9
+ private eventQueue: SharedEvent[] = [];
10
+ private isProcessing = false;
11
+
12
+ /**
13
+ * Subscribe to an event
14
+ * @returns Unsubscribe function
15
+ */
16
+ on<K extends keyof EventMap>(eventKey: K, callback: EventCallback<K>): () => void {
17
+ if (!this.listeners.has(eventKey)) {
18
+ this.listeners.set(eventKey, new Set());
19
+ }
20
+
21
+ this.listeners.get(eventKey)!.add(callback as (data: unknown) => void);
22
+
23
+ if (this.debug) {
24
+ console.log(`[EventBus] Subscribed to: ${eventKey} (${this.listenerCount(eventKey)} listeners)`);
25
+ }
26
+
27
+ // Return unsubscribe function
28
+ return () => {
29
+ const callbacks = this.listeners.get(eventKey);
30
+ if (callbacks) {
31
+ callbacks.delete(callback as (data: unknown) => void);
32
+ if (callbacks.size === 0) {
33
+ this.listeners.delete(eventKey);
34
+ }
35
+ }
36
+ };
37
+ }
38
+
39
+ /**
40
+ * Emit an event - queues it for processing to ensure all events are delivered
41
+ */
42
+ emit<K extends keyof EventMap>(eventKey: K, data: EventMap[K]): void {
43
+ const event = { key: eventKey, data } as SharedEvent;
44
+
45
+ if (this.debug) {
46
+ console.log(`[EventBus] Emitting: ${eventKey} (${this.listenerCount(eventKey)} listeners)`);
47
+ }
48
+ this.eventQueue.push(event);
49
+ this.processQueue();
50
+ }
51
+
52
+ /**
53
+ * Process events from queue sequentially
54
+ * This ensures rapid successive events are all delivered
55
+ */
56
+ private processQueue(): void {
57
+ if (this.isProcessing || this.eventQueue.length === 0) {
58
+ return;
59
+ }
60
+
61
+ this.isProcessing = true;
62
+
63
+ // Process all queued events synchronously to ensure immediate delivery
64
+ while (this.eventQueue.length > 0) {
65
+ const event = this.eventQueue.shift()!;
66
+ const callbacks = this.listeners.get(event.key);
67
+
68
+ if (callbacks && callbacks.size > 0) {
69
+ // Process all listeners for this event
70
+ callbacks.forEach(callback => {
71
+ try {
72
+ callback(event.data);
73
+ } catch (error) {
74
+ console.error(`Error in event listener for ${event.key}:`, error);
75
+ }
76
+ });
77
+ }
78
+ }
79
+
80
+ this.isProcessing = false;
81
+ }
82
+
83
+ /**
84
+ * Remove all listeners for an event
85
+ */
86
+ off<K extends keyof EventMap>(eventKey: K): void {
87
+ this.listeners.delete(eventKey);
88
+ }
89
+
90
+ /**
91
+ * Get number of listeners for an event (useful for debugging)
92
+ */
93
+ listenerCount<K extends keyof EventMap>(eventKey: K): number {
94
+ return this.listeners.get(eventKey)?.size ?? 0;
95
+ }
96
+
97
+ /**
98
+ * Enable or disable debug logging
99
+ */
100
+ setDebug(enabled: boolean): void {
101
+ this.debug = enabled;
102
+ }
103
+ }
104
+
105
+ // Singleton instance
106
+ export const eventBus = new EventBus();