react-native-unit-components 1.8.1 → 1.10.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 (460) hide show
  1. package/android/src/main/java/com/unitreactnativecomponents/UnitReactNativeComponentsPackage.kt +9 -12
  2. package/android/src/main/java/com/unitreactnativecomponents/appInfo/UNAppInfoModule.kt +59 -0
  3. package/android/src/main/java/com/unitreactnativecomponents/extensions/ContextExtensions.kt +35 -0
  4. package/ios/Extensions/Bundle+Extensions.swift +23 -0
  5. package/ios/UNAppInfo/IOSAppInfo.swift +47 -0
  6. package/ios/UNAppInfo/UNAppInfoExportModule.m +5 -2
  7. package/ios/UnitReactNativeComponents.xcodeproj/project.pbxproj +34 -0
  8. package/lib/commonjs/components/UNACHCreditComponent/UNACHCreditComponent.js +6 -4
  9. package/lib/commonjs/components/UNACHCreditComponent/UNACHCreditComponent.js.map +1 -1
  10. package/lib/commonjs/components/UNACHCreditComponent/UNACHCreditComponent.utils.js +1 -0
  11. package/lib/commonjs/components/UNACHCreditComponent/UNACHCreditComponent.utils.js.map +1 -1
  12. package/lib/commonjs/components/UNACHCreditComponent/index.js +21 -0
  13. package/lib/commonjs/components/UNACHCreditComponent/index.js.map +1 -0
  14. package/lib/commonjs/components/UNACHDebitComponent/UNACHDebitComponent.js +6 -4
  15. package/lib/commonjs/components/UNACHDebitComponent/UNACHDebitComponent.js.map +1 -1
  16. package/lib/commonjs/components/UNACHDebitComponent/UNACHDebitComponent.utils.js +1 -0
  17. package/lib/commonjs/components/UNACHDebitComponent/UNACHDebitComponent.utils.js.map +1 -1
  18. package/lib/commonjs/components/UNACHDebitComponent/index.js +21 -0
  19. package/lib/commonjs/components/UNACHDebitComponent/index.js.map +1 -0
  20. package/lib/commonjs/components/UNAccountComponent/UNAccountComponent.js +21 -15
  21. package/lib/commonjs/components/UNAccountComponent/UNAccountComponent.js.map +1 -1
  22. package/lib/commonjs/components/UNAccountComponent/UNAccountComponent.utils.js +1 -1
  23. package/lib/commonjs/components/UNAccountComponent/UNAccountComponent.utils.js.map +1 -1
  24. package/lib/commonjs/components/UNAccountComponent/index.js +27 -0
  25. package/lib/commonjs/components/UNAccountComponent/index.js.map +1 -0
  26. package/lib/commonjs/components/UNActivityComponent/UNActivityComponent.js +17 -11
  27. package/lib/commonjs/components/UNActivityComponent/UNActivityComponent.js.map +1 -1
  28. package/lib/commonjs/components/UNActivityComponent/UNActivityComponent.utils.js +4 -0
  29. package/lib/commonjs/components/UNActivityComponent/UNActivityComponent.utils.js.map +1 -1
  30. package/lib/commonjs/components/UNActivityComponent/index.js +21 -0
  31. package/lib/commonjs/components/UNActivityComponent/index.js.map +1 -0
  32. package/lib/commonjs/components/UNBookPaymentComponent/UNBookPaymentComponent.js +4 -2
  33. package/lib/commonjs/components/UNBookPaymentComponent/UNBookPaymentComponent.js.map +1 -1
  34. package/lib/commonjs/components/UNBookPaymentComponent/index.js +21 -0
  35. package/lib/commonjs/components/UNBookPaymentComponent/index.js.map +1 -0
  36. package/lib/commonjs/components/UNBottomSheetComponent/UNBottomSheetComponent.js +29 -13
  37. package/lib/commonjs/components/UNBottomSheetComponent/UNBottomSheetComponent.js.map +1 -1
  38. package/lib/commonjs/components/UNBottomSheetComponent/components/{UNAddToWalletBottomSheetItem.js → UNAddToWalletBottomSheetItem/UNAddToWalletBottomSheetItem.js} +16 -11
  39. package/lib/commonjs/components/UNBottomSheetComponent/components/UNAddToWalletBottomSheetItem/UNAddToWalletBottomSheetItem.js.map +1 -0
  40. package/lib/commonjs/components/UNBottomSheetComponent/components/UNAddToWalletBottomSheetItem/index.js +17 -0
  41. package/lib/commonjs/components/UNBottomSheetComponent/components/UNAddToWalletBottomSheetItem/index.js.map +1 -0
  42. package/lib/commonjs/components/UNBottomSheetComponent/components/index.js +17 -0
  43. package/lib/commonjs/components/UNBottomSheetComponent/components/index.js.map +1 -0
  44. package/lib/commonjs/components/UNBottomSheetComponent/index.js +14 -0
  45. package/lib/commonjs/components/UNBottomSheetComponent/index.js.map +1 -0
  46. package/lib/commonjs/components/UNCardComponent/UNCardComponent.js +34 -10
  47. package/lib/commonjs/components/UNCardComponent/UNCardComponent.js.map +1 -1
  48. package/lib/commonjs/components/UNCardComponent/UNCardComponent.utils.js +9 -1
  49. package/lib/commonjs/components/UNCardComponent/UNCardComponent.utils.js.map +1 -1
  50. package/lib/commonjs/components/UNCardComponent/index.js +27 -0
  51. package/lib/commonjs/components/UNCardComponent/index.js.map +1 -0
  52. package/lib/commonjs/components/UNCheckDepositComponent/UNCheckDepositComponent.js +4 -2
  53. package/lib/commonjs/components/UNCheckDepositComponent/UNCheckDepositComponent.js.map +1 -1
  54. package/lib/commonjs/components/UNCheckDepositComponent/index.js +21 -0
  55. package/lib/commonjs/components/UNCheckDepositComponent/index.js.map +1 -0
  56. package/lib/commonjs/components/UNMultipleCardsComponent/UNMultipleCardsComponent.js +86 -0
  57. package/lib/commonjs/components/UNMultipleCardsComponent/UNMultipleCardsComponent.js.map +1 -0
  58. package/lib/commonjs/components/UNMultipleCardsComponent/UNMultipleCardsComponent.utils.js +41 -0
  59. package/lib/commonjs/components/UNMultipleCardsComponent/UNMultipleCardsComponent.utils.js.map +1 -0
  60. package/lib/commonjs/components/UNMultipleCardsComponent/index.js +21 -0
  61. package/lib/commonjs/components/UNMultipleCardsComponent/index.js.map +1 -0
  62. package/lib/commonjs/components/index.js +19 -8
  63. package/lib/commonjs/components/index.js.map +1 -1
  64. package/lib/commonjs/flows/card/UNCardFlows.js +8 -4
  65. package/lib/commonjs/flows/card/UNCardFlows.js.map +1 -1
  66. package/lib/commonjs/helpers/pushProvisioningService/helpers.js +34 -0
  67. package/lib/commonjs/helpers/pushProvisioningService/helpers.js.map +1 -0
  68. package/lib/commonjs/helpers/pushProvisioningService/hooks/useCardWallet.js +49 -3
  69. package/lib/commonjs/helpers/pushProvisioningService/hooks/useCardWallet.js.map +1 -1
  70. package/lib/commonjs/helpers/pushProvisioningService/hooks/useLaunchInitialize.js +33 -0
  71. package/lib/commonjs/helpers/pushProvisioningService/hooks/useLaunchInitialize.js.map +1 -0
  72. package/lib/commonjs/helpers/pushProvisioningService/types.js +41 -0
  73. package/lib/commonjs/helpers/pushProvisioningService/types.js.map +1 -0
  74. package/lib/commonjs/helpers/store/helpers.js +29 -0
  75. package/lib/commonjs/helpers/store/helpers.js.map +1 -0
  76. package/lib/commonjs/hooks/useListenerToEvent.js +26 -0
  77. package/lib/commonjs/hooks/useListenerToEvent.js.map +1 -0
  78. package/lib/commonjs/messages/webMessages/index.js.map +1 -1
  79. package/lib/commonjs/messages/webMessages/multipleCardsMessage.js +12 -0
  80. package/lib/commonjs/messages/webMessages/multipleCardsMessage.js.map +1 -0
  81. package/lib/commonjs/messages/webMessages/onLoadMessage.js +2 -1
  82. package/lib/commonjs/messages/webMessages/onLoadMessage.js.map +1 -1
  83. package/lib/commonjs/networking/requests/UNWalletPayloadRequest.js +30 -6
  84. package/lib/commonjs/networking/requests/UNWalletPayloadRequest.js.map +1 -1
  85. package/lib/commonjs/scripts/html/bodyScript.js +13 -1
  86. package/lib/commonjs/scripts/html/bodyScript.js.map +1 -1
  87. package/lib/commonjs/slices/ConfigurationSlice.js +36 -0
  88. package/lib/commonjs/slices/ConfigurationSlice.js.map +1 -0
  89. package/lib/commonjs/slices/SharedEventsSlice.js +28 -0
  90. package/lib/commonjs/slices/SharedEventsSlice.js.map +1 -0
  91. package/lib/commonjs/slices/pushProvisioningSlice.js +28 -0
  92. package/lib/commonjs/slices/pushProvisioningSlice.js.map +1 -0
  93. package/lib/commonjs/store/index.js +17 -0
  94. package/lib/commonjs/store/index.js.map +1 -0
  95. package/lib/commonjs/store/store.js +20 -0
  96. package/lib/commonjs/store/store.js.map +1 -0
  97. package/lib/commonjs/types/internal/errorHelpers.js +20 -0
  98. package/lib/commonjs/types/internal/errorHelpers.js.map +1 -0
  99. package/lib/commonjs/types/internal/webComponent.types.js +1 -0
  100. package/lib/commonjs/types/internal/webComponent.types.js.map +1 -1
  101. package/lib/commonjs/types/shared/activity.types.js +7 -0
  102. package/lib/commonjs/types/shared/activity.types.js.map +1 -1
  103. package/lib/commonjs/types/shared/error.types.js +29 -0
  104. package/lib/commonjs/types/shared/error.types.js.map +1 -0
  105. package/lib/commonjs/types/shared/index.js +33 -0
  106. package/lib/commonjs/types/shared/index.js.map +1 -1
  107. package/lib/commonjs/types/shared/multipleCards.types.js +13 -0
  108. package/lib/commonjs/types/shared/multipleCards.types.js.map +1 -0
  109. package/lib/commonjs/types/shared/onLoadResponse.types.js +4 -0
  110. package/lib/commonjs/types/shared/onLoadResponse.types.js.map +1 -1
  111. package/lib/commonjs/types/shared/versioning.types.js +14 -0
  112. package/lib/commonjs/types/shared/versioning.types.js.map +1 -0
  113. package/lib/commonjs/unitSdkManager/UnitSdk.api.js +9 -14
  114. package/lib/commonjs/unitSdkManager/UnitSdk.api.js.map +1 -1
  115. package/lib/commonjs/unitSdkManager/UnitSdk.constants.js +17 -0
  116. package/lib/commonjs/unitSdkManager/UnitSdk.constants.js.map +1 -0
  117. package/lib/commonjs/unitSdkManager/UnitSdkManager.js +21 -22
  118. package/lib/commonjs/unitSdkManager/UnitSdkManager.js.map +1 -1
  119. package/lib/commonjs/unitSdkManager/UnitSdkManager.utils.internal.js +19 -0
  120. package/lib/commonjs/unitSdkManager/UnitSdkManager.utils.internal.js.map +1 -0
  121. package/lib/commonjs/utils/AppInfo.js +49 -0
  122. package/lib/commonjs/utils/AppInfo.js.map +1 -0
  123. package/lib/commonjs/utils/SDKInfo.js +13 -0
  124. package/lib/commonjs/utils/SDKInfo.js.map +1 -0
  125. package/lib/commonjs/utils/webVersioningStrategy.utils.js +58 -0
  126. package/lib/commonjs/utils/webVersioningStrategy.utils.js.map +1 -0
  127. package/lib/commonjs/webComponent/WebComponent.js +30 -32
  128. package/lib/commonjs/webComponent/WebComponent.js.map +1 -1
  129. package/lib/commonjs/webComponent/WebComponent.utils.js +19 -1
  130. package/lib/commonjs/webComponent/WebComponent.utils.js.map +1 -1
  131. package/lib/commonjs/webComponent/html.js +4 -0
  132. package/lib/commonjs/webComponent/html.js.map +1 -1
  133. package/lib/module/components/UNACHCreditComponent/UNACHCreditComponent.js +5 -3
  134. package/lib/module/components/UNACHCreditComponent/UNACHCreditComponent.js.map +1 -1
  135. package/lib/module/components/UNACHCreditComponent/UNACHCreditComponent.utils.js +1 -0
  136. package/lib/module/components/UNACHCreditComponent/UNACHCreditComponent.utils.js.map +1 -1
  137. package/lib/module/components/UNACHCreditComponent/index.js +2 -0
  138. package/lib/module/components/UNACHCreditComponent/index.js.map +1 -0
  139. package/lib/module/components/UNACHDebitComponent/UNACHDebitComponent.js +5 -3
  140. package/lib/module/components/UNACHDebitComponent/UNACHDebitComponent.js.map +1 -1
  141. package/lib/module/components/UNACHDebitComponent/UNACHDebitComponent.utils.js +1 -0
  142. package/lib/module/components/UNACHDebitComponent/UNACHDebitComponent.utils.js.map +1 -1
  143. package/lib/module/components/UNACHDebitComponent/index.js +2 -0
  144. package/lib/module/components/UNACHDebitComponent/index.js.map +1 -0
  145. package/lib/module/components/UNAccountComponent/UNAccountComponent.js +19 -12
  146. package/lib/module/components/UNAccountComponent/UNAccountComponent.js.map +1 -1
  147. package/lib/module/components/UNAccountComponent/UNAccountComponent.utils.js +2 -2
  148. package/lib/module/components/UNAccountComponent/UNAccountComponent.utils.js.map +1 -1
  149. package/lib/module/components/UNAccountComponent/index.js +2 -0
  150. package/lib/module/components/UNAccountComponent/index.js.map +1 -0
  151. package/lib/module/components/UNActivityComponent/UNActivityComponent.js +16 -9
  152. package/lib/module/components/UNActivityComponent/UNActivityComponent.js.map +1 -1
  153. package/lib/module/components/UNActivityComponent/UNActivityComponent.utils.js +4 -0
  154. package/lib/module/components/UNActivityComponent/UNActivityComponent.utils.js.map +1 -1
  155. package/lib/module/components/UNActivityComponent/index.js +2 -0
  156. package/lib/module/components/UNActivityComponent/index.js.map +1 -0
  157. package/lib/module/components/UNBookPaymentComponent/UNBookPaymentComponent.js +3 -1
  158. package/lib/module/components/UNBookPaymentComponent/UNBookPaymentComponent.js.map +1 -1
  159. package/lib/module/components/UNBookPaymentComponent/index.js +2 -0
  160. package/lib/module/components/UNBookPaymentComponent/index.js.map +1 -0
  161. package/lib/module/components/UNBottomSheetComponent/UNBottomSheetComponent.js +29 -13
  162. package/lib/module/components/UNBottomSheetComponent/UNBottomSheetComponent.js.map +1 -1
  163. package/lib/module/components/UNBottomSheetComponent/components/{UNAddToWalletBottomSheetItem.js → UNAddToWalletBottomSheetItem/UNAddToWalletBottomSheetItem.js} +16 -11
  164. package/lib/module/components/UNBottomSheetComponent/components/UNAddToWalletBottomSheetItem/UNAddToWalletBottomSheetItem.js.map +1 -0
  165. package/lib/module/components/UNBottomSheetComponent/components/UNAddToWalletBottomSheetItem/index.js +2 -0
  166. package/lib/module/components/UNBottomSheetComponent/components/UNAddToWalletBottomSheetItem/index.js.map +1 -0
  167. package/lib/module/components/UNBottomSheetComponent/components/index.js +2 -0
  168. package/lib/module/components/UNBottomSheetComponent/components/index.js.map +1 -0
  169. package/lib/module/components/UNBottomSheetComponent/index.js +2 -0
  170. package/lib/module/components/UNBottomSheetComponent/index.js.map +1 -0
  171. package/lib/module/components/UNCardComponent/UNCardComponent.js +34 -9
  172. package/lib/module/components/UNCardComponent/UNCardComponent.js.map +1 -1
  173. package/lib/module/components/UNCardComponent/UNCardComponent.utils.js +6 -0
  174. package/lib/module/components/UNCardComponent/UNCardComponent.utils.js.map +1 -1
  175. package/lib/module/components/UNCardComponent/index.js +2 -0
  176. package/lib/module/components/UNCardComponent/index.js.map +1 -0
  177. package/lib/module/components/UNCheckDepositComponent/UNCheckDepositComponent.js +3 -1
  178. package/lib/module/components/UNCheckDepositComponent/UNCheckDepositComponent.js.map +1 -1
  179. package/lib/module/components/UNCheckDepositComponent/index.js +2 -0
  180. package/lib/module/components/UNCheckDepositComponent/index.js.map +1 -0
  181. package/lib/module/components/UNMultipleCardsComponent/UNMultipleCardsComponent.js +77 -0
  182. package/lib/module/components/UNMultipleCardsComponent/UNMultipleCardsComponent.js.map +1 -0
  183. package/lib/module/components/UNMultipleCardsComponent/UNMultipleCardsComponent.utils.js +33 -0
  184. package/lib/module/components/UNMultipleCardsComponent/UNMultipleCardsComponent.utils.js.map +1 -0
  185. package/lib/module/components/UNMultipleCardsComponent/index.js +2 -0
  186. package/lib/module/components/UNMultipleCardsComponent/index.js.map +1 -0
  187. package/lib/module/components/index.js +9 -8
  188. package/lib/module/components/index.js.map +1 -1
  189. package/lib/module/flows/card/UNCardFlows.js +8 -3
  190. package/lib/module/flows/card/UNCardFlows.js.map +1 -1
  191. package/lib/module/helpers/pushProvisioningService/helpers.js +24 -0
  192. package/lib/module/helpers/pushProvisioningService/helpers.js.map +1 -0
  193. package/lib/module/helpers/pushProvisioningService/hooks/useCardWallet.js +50 -4
  194. package/lib/module/helpers/pushProvisioningService/hooks/useCardWallet.js.map +1 -1
  195. package/lib/module/helpers/pushProvisioningService/hooks/useLaunchInitialize.js +26 -0
  196. package/lib/module/helpers/pushProvisioningService/hooks/useLaunchInitialize.js.map +1 -0
  197. package/lib/module/helpers/pushProvisioningService/types.js +34 -0
  198. package/lib/module/helpers/pushProvisioningService/types.js.map +1 -0
  199. package/lib/module/helpers/store/helpers.js +20 -0
  200. package/lib/module/helpers/store/helpers.js.map +1 -0
  201. package/lib/module/hooks/useListenerToEvent.js +19 -0
  202. package/lib/module/hooks/useListenerToEvent.js.map +1 -0
  203. package/lib/module/messages/webMessages/index.js.map +1 -1
  204. package/lib/module/messages/webMessages/multipleCardsMessage.js +5 -0
  205. package/lib/module/messages/webMessages/multipleCardsMessage.js.map +1 -0
  206. package/lib/module/messages/webMessages/onLoadMessage.js +2 -1
  207. package/lib/module/messages/webMessages/onLoadMessage.js.map +1 -1
  208. package/lib/module/networking/requests/UNWalletPayloadRequest.js +29 -6
  209. package/lib/module/networking/requests/UNWalletPayloadRequest.js.map +1 -1
  210. package/lib/module/scripts/html/bodyScript.js +10 -0
  211. package/lib/module/scripts/html/bodyScript.js.map +1 -1
  212. package/lib/module/slices/ConfigurationSlice.js +25 -0
  213. package/lib/module/slices/ConfigurationSlice.js.map +1 -0
  214. package/lib/module/slices/SharedEventsSlice.js +19 -0
  215. package/lib/module/slices/SharedEventsSlice.js.map +1 -0
  216. package/lib/module/slices/pushProvisioningSlice.js +19 -0
  217. package/lib/module/slices/pushProvisioningSlice.js.map +1 -0
  218. package/lib/module/store/index.js +2 -0
  219. package/lib/module/store/index.js.map +1 -0
  220. package/lib/module/store/store.js +12 -0
  221. package/lib/module/store/store.js.map +1 -0
  222. package/lib/module/types/internal/errorHelpers.js +12 -0
  223. package/lib/module/types/internal/errorHelpers.js.map +1 -0
  224. package/lib/module/types/internal/webComponent.types.js +1 -0
  225. package/lib/module/types/internal/webComponent.types.js.map +1 -1
  226. package/lib/module/types/shared/activity.types.js +5 -1
  227. package/lib/module/types/shared/activity.types.js.map +1 -1
  228. package/lib/module/types/shared/error.types.js +22 -0
  229. package/lib/module/types/shared/error.types.js.map +1 -0
  230. package/lib/module/types/shared/index.js +3 -0
  231. package/lib/module/types/shared/index.js.map +1 -1
  232. package/lib/module/types/shared/multipleCards.types.js +6 -0
  233. package/lib/module/types/shared/multipleCards.types.js.map +1 -0
  234. package/lib/module/types/shared/onLoadResponse.types.js +1 -1
  235. package/lib/module/types/shared/onLoadResponse.types.js.map +1 -1
  236. package/lib/module/types/shared/versioning.types.js +7 -0
  237. package/lib/module/types/shared/versioning.types.js.map +1 -0
  238. package/lib/module/unitSdkManager/UnitSdk.api.js +9 -12
  239. package/lib/module/unitSdkManager/UnitSdk.api.js.map +1 -1
  240. package/lib/module/unitSdkManager/UnitSdk.constants.js +10 -0
  241. package/lib/module/unitSdkManager/UnitSdk.constants.js.map +1 -0
  242. package/lib/module/unitSdkManager/UnitSdkManager.js +20 -19
  243. package/lib/module/unitSdkManager/UnitSdkManager.js.map +1 -1
  244. package/lib/module/unitSdkManager/UnitSdkManager.utils.internal.js +12 -0
  245. package/lib/module/unitSdkManager/UnitSdkManager.utils.internal.js.map +1 -0
  246. package/lib/module/utils/AppInfo.js +39 -0
  247. package/lib/module/utils/AppInfo.js.map +1 -0
  248. package/lib/module/utils/SDKInfo.js +5 -0
  249. package/lib/module/utils/SDKInfo.js.map +1 -0
  250. package/lib/module/utils/webVersioningStrategy.utils.js +48 -0
  251. package/lib/module/utils/webVersioningStrategy.utils.js.map +1 -0
  252. package/lib/module/webComponent/WebComponent.js +33 -34
  253. package/lib/module/webComponent/WebComponent.js.map +1 -1
  254. package/lib/module/webComponent/WebComponent.utils.js +15 -0
  255. package/lib/module/webComponent/WebComponent.utils.js.map +1 -1
  256. package/lib/module/webComponent/html.js +5 -1
  257. package/lib/module/webComponent/html.js.map +1 -1
  258. package/lib/typescript/{components → src/components}/UNACHCreditComponent/UNACHCreditComponent.d.ts +3 -1
  259. package/lib/typescript/src/components/UNACHCreditComponent/index.d.ts +1 -0
  260. package/lib/typescript/{components → src/components}/UNACHDebitComponent/UNACHDebitComponent.d.ts +3 -1
  261. package/lib/typescript/src/components/UNACHDebitComponent/index.d.ts +1 -0
  262. package/lib/typescript/{components → src/components}/UNAccountComponent/UNAccountComponent.d.ts +3 -2
  263. package/lib/typescript/{components → src/components}/UNAccountComponent/UNAccountComponent.utils.d.ts +2 -2
  264. package/lib/typescript/src/components/UNAccountComponent/index.d.ts +1 -0
  265. package/lib/typescript/{components → src/components}/UNActivityComponent/UNActivityComponent.d.ts +5 -1
  266. package/lib/typescript/src/components/UNActivityComponent/index.d.ts +1 -0
  267. package/lib/typescript/{components → src/components}/UNBookPaymentComponent/UNBookPaymentComponent.d.ts +2 -1
  268. package/lib/typescript/src/components/UNBookPaymentComponent/index.d.ts +1 -0
  269. package/lib/typescript/{components → src/components}/UNBottomSheetComponent/UNBottomSheetComponent.d.ts +2 -1
  270. package/lib/typescript/{components/UNBottomSheetComponent/components → src/components/UNBottomSheetComponent/components/UNAddToWalletBottomSheetItem}/UNAddToWalletBottomSheetItem.d.ts +2 -2
  271. package/lib/typescript/src/components/UNBottomSheetComponent/components/UNAddToWalletBottomSheetItem/index.d.ts +1 -0
  272. package/lib/typescript/src/components/UNBottomSheetComponent/components/index.d.ts +1 -0
  273. package/lib/typescript/src/components/UNBottomSheetComponent/index.d.ts +1 -0
  274. package/lib/typescript/{components → src/components}/UNCardComponent/UNCardComponent.d.ts +4 -1
  275. package/lib/typescript/{components → src/components}/UNCardComponent/UNCardComponent.utils.d.ts +2 -0
  276. package/lib/typescript/src/components/UNCardComponent/index.d.ts +1 -0
  277. package/lib/typescript/{components → src/components}/UNCheckDepositComponent/UNCheckDepositComponent.d.ts +2 -1
  278. package/lib/typescript/src/components/UNCheckDepositComponent/index.d.ts +1 -0
  279. package/lib/typescript/src/components/UNMultipleCardsComponent/UNMultipleCardsComponent.d.ts +15 -0
  280. package/lib/typescript/src/components/UNMultipleCardsComponent/UNMultipleCardsComponent.utils.d.ts +3 -0
  281. package/lib/typescript/src/components/UNMultipleCardsComponent/index.d.ts +1 -0
  282. package/lib/typescript/src/components/index.d.ts +9 -0
  283. package/lib/typescript/src/helpers/pushProvisioningService/helpers.d.ts +4 -0
  284. package/lib/typescript/src/helpers/pushProvisioningService/hooks/useLaunchInitialize.d.ts +3 -0
  285. package/lib/typescript/src/helpers/pushProvisioningService/types.d.ts +49 -0
  286. package/lib/typescript/src/helpers/store/helpers.d.ts +3 -0
  287. package/lib/typescript/src/hooks/useListenerToEvent.d.ts +9 -0
  288. package/lib/typescript/{messages → src/messages}/webMessages/index.d.ts +3 -2
  289. package/lib/typescript/src/messages/webMessages/multipleCardsMessage.d.ts +6 -0
  290. package/lib/typescript/{messages → src/messages}/webMessages/onLoadMessage.d.ts +7 -3
  291. package/lib/typescript/src/networking/requests/UNWalletPayloadRequest.d.ts +2 -0
  292. package/lib/typescript/{scripts → src/scripts}/html/bodyScript.d.ts +2 -0
  293. package/lib/typescript/src/slices/ConfigurationSlice.d.ts +10 -0
  294. package/lib/typescript/src/slices/SharedEventsSlice.d.ts +56 -0
  295. package/lib/typescript/src/slices/pushProvisioningSlice.d.ts +8 -0
  296. package/lib/typescript/src/store/index.d.ts +1 -0
  297. package/lib/typescript/src/store/store.d.ts +76 -0
  298. package/lib/typescript/src/types/internal/errorHelpers.d.ts +4 -0
  299. package/lib/typescript/{types → src/types}/internal/webComponent.types.d.ts +1 -0
  300. package/lib/typescript/{types → src/types}/shared/activity.types.d.ts +5 -1
  301. package/lib/typescript/src/types/shared/error.types.d.ts +36 -0
  302. package/lib/typescript/{types → src/types}/shared/index.d.ts +3 -0
  303. package/lib/typescript/src/types/shared/multipleCards.types.d.ts +6 -0
  304. package/lib/typescript/src/types/shared/onLoadResponse.types.d.ts +5 -0
  305. package/lib/typescript/src/types/shared/versioning.types.d.ts +22 -0
  306. package/lib/typescript/src/unitSdkManager/UnitSdk.api.d.ts +1 -0
  307. package/lib/typescript/src/unitSdkManager/UnitSdk.constants.d.ts +8 -0
  308. package/lib/typescript/{unitSdkManager → src/unitSdkManager}/UnitSdkManager.d.ts +11 -10
  309. package/lib/typescript/src/unitSdkManager/UnitSdkManager.utils.internal.d.ts +3 -0
  310. package/lib/typescript/src/utils/AppInfo.d.ts +4 -0
  311. package/lib/typescript/src/utils/SDKInfo.d.ts +1 -0
  312. package/lib/typescript/src/utils/webVersioningStrategy.utils.d.ts +5 -0
  313. package/lib/typescript/{webComponent → src/webComponent}/WebComponent.utils.d.ts +3 -0
  314. package/package.json +8 -6
  315. package/src/components/UNACHCreditComponent/UNACHCreditComponent.tsx +7 -3
  316. package/src/components/UNACHCreditComponent/UNACHCreditComponent.utils.ts +1 -0
  317. package/src/components/UNACHCreditComponent/index.ts +1 -0
  318. package/src/components/UNACHDebitComponent/UNACHDebitComponent.tsx +7 -3
  319. package/src/components/UNACHDebitComponent/UNACHDebitComponent.utils.ts +1 -0
  320. package/src/components/UNACHDebitComponent/index.ts +1 -0
  321. package/src/components/UNAccountComponent/UNAccountComponent.tsx +30 -14
  322. package/src/components/UNAccountComponent/UNAccountComponent.utils.ts +2 -2
  323. package/src/components/UNAccountComponent/index.ts +1 -0
  324. package/src/components/UNActivityComponent/UNActivityComponent.tsx +37 -17
  325. package/src/components/UNActivityComponent/UNActivityComponent.utils.ts +4 -1
  326. package/src/components/UNActivityComponent/index.ts +1 -0
  327. package/src/components/UNBookPaymentComponent/UNBookPaymentComponent.tsx +4 -1
  328. package/src/components/UNBookPaymentComponent/index.ts +1 -0
  329. package/src/components/UNBottomSheetComponent/UNBottomSheetComponent.tsx +59 -32
  330. package/src/components/UNBottomSheetComponent/components/{UNAddToWalletBottomSheetItem.tsx → UNAddToWalletBottomSheetItem/UNAddToWalletBottomSheetItem.tsx} +18 -13
  331. package/src/components/UNBottomSheetComponent/components/UNAddToWalletBottomSheetItem/index.ts +1 -0
  332. package/src/components/UNBottomSheetComponent/components/index.ts +1 -0
  333. package/src/components/UNBottomSheetComponent/index.ts +1 -0
  334. package/src/components/UNCardComponent/UNCardComponent.tsx +51 -14
  335. package/src/components/UNCardComponent/UNCardComponent.utils.ts +7 -0
  336. package/src/components/UNCardComponent/index.ts +1 -0
  337. package/src/components/UNCheckDepositComponent/UNCheckDepositComponent.tsx +4 -1
  338. package/src/components/UNCheckDepositComponent/index.ts +1 -0
  339. package/src/components/UNMultipleCardsComponent/UNMultipleCardsComponent.tsx +119 -0
  340. package/src/components/UNMultipleCardsComponent/UNMultipleCardsComponent.utils.ts +36 -0
  341. package/src/components/UNMultipleCardsComponent/index.ts +3 -0
  342. package/src/components/index.ts +9 -8
  343. package/src/flows/card/UNCardFlows.ts +10 -4
  344. package/src/helpers/pushProvisioningService/helpers.ts +31 -0
  345. package/src/helpers/pushProvisioningService/hooks/useCardWallet.ts +46 -7
  346. package/src/helpers/pushProvisioningService/hooks/useLaunchInitialize.ts +29 -0
  347. package/src/helpers/pushProvisioningService/types.ts +52 -0
  348. package/src/helpers/store/helpers.tsx +22 -0
  349. package/src/hooks/useListenerToEvent.ts +32 -0
  350. package/src/messages/webMessages/index.ts +3 -0
  351. package/src/messages/webMessages/multipleCardsMessage.ts +9 -0
  352. package/src/messages/webMessages/onLoadMessage.ts +14 -3
  353. package/src/networking/requests/UNWalletPayloadRequest.ts +30 -7
  354. package/src/scripts/html/bodyScript.ts +13 -1
  355. package/src/slices/ConfigurationSlice.ts +31 -0
  356. package/src/slices/SharedEventsSlice.ts +93 -0
  357. package/src/slices/pushProvisioningSlice.ts +24 -0
  358. package/src/store/index.ts +1 -0
  359. package/src/store/store.ts +14 -0
  360. package/src/types/internal/errorHelpers.ts +22 -0
  361. package/src/types/internal/webComponent.types.ts +1 -1
  362. package/src/types/shared/activity.types.ts +6 -1
  363. package/src/types/shared/error.types.ts +38 -0
  364. package/src/types/shared/index.ts +3 -0
  365. package/src/types/shared/multipleCards.types.ts +8 -0
  366. package/src/types/shared/onLoadResponse.types.ts +2 -12
  367. package/src/types/shared/versioning.types.ts +28 -0
  368. package/src/unitSdkManager/UnitSdk.api.ts +10 -10
  369. package/src/unitSdkManager/UnitSdk.constants.ts +11 -0
  370. package/src/unitSdkManager/UnitSdkManager.ts +21 -24
  371. package/src/unitSdkManager/UnitSdkManager.utils.internal.ts +13 -0
  372. package/src/utils/AppInfo.ts +40 -0
  373. package/src/utils/SDKInfo.ts +5 -0
  374. package/src/utils/webVersioningStrategy.utils.ts +52 -0
  375. package/src/webComponent/WebComponent.tsx +37 -34
  376. package/src/webComponent/WebComponent.utils.ts +17 -0
  377. package/src/webComponent/html.ts +16 -2
  378. package/android/src/main/java/com/unitreactnativecomponents/getapplicationid/UNAppInfoModule.kt +0 -35
  379. package/ios/UNAppInfo/UNAppInfo.swift +0 -23
  380. package/lib/commonjs/components/UNBottomSheetComponent/components/UNAddToWalletBottomSheetItem.js.map +0 -1
  381. package/lib/commonjs/components/utils/nativeModulesInfo.js +0 -20
  382. package/lib/commonjs/components/utils/nativeModulesInfo.js.map +0 -1
  383. package/lib/commonjs/helpers/EventBus.js +0 -58
  384. package/lib/commonjs/helpers/EventBus.js.map +0 -1
  385. package/lib/commonjs/hooks/listenerToBus.js +0 -34
  386. package/lib/commonjs/hooks/listenerToBus.js.map +0 -1
  387. package/lib/module/components/UNBottomSheetComponent/components/UNAddToWalletBottomSheetItem.js.map +0 -1
  388. package/lib/module/components/utils/nativeModulesInfo.js +0 -13
  389. package/lib/module/components/utils/nativeModulesInfo.js.map +0 -1
  390. package/lib/module/helpers/EventBus.js +0 -51
  391. package/lib/module/helpers/EventBus.js.map +0 -1
  392. package/lib/module/hooks/listenerToBus.js +0 -25
  393. package/lib/module/hooks/listenerToBus.js.map +0 -1
  394. package/lib/typescript/components/index.d.ts +0 -8
  395. package/lib/typescript/components/utils/nativeModulesInfo.d.ts +0 -1
  396. package/lib/typescript/helpers/EventBus.d.ts +0 -13
  397. package/lib/typescript/hooks/listenerToBus.d.ts +0 -7
  398. package/lib/typescript/networking/requests/UNWalletPayloadRequest.d.ts +0 -2
  399. package/lib/typescript/types/shared/onLoadResponse.types.d.ts +0 -14
  400. package/lib/typescript/unitSdkManager/UnitSdk.api.d.ts +0 -3
  401. package/src/components/utils/nativeModulesInfo.ts +0 -11
  402. package/src/helpers/EventBus.ts +0 -58
  403. package/src/hooks/listenerToBus.ts +0 -31
  404. /package/lib/commonjs/components/UNBottomSheetComponent/components/{UNAddToWalletBottomSheetItem.styles.js → UNAddToWalletBottomSheetItem/UNAddToWalletBottomSheetItem.styles.js} +0 -0
  405. /package/lib/commonjs/components/UNBottomSheetComponent/components/{UNAddToWalletBottomSheetItem.styles.js.map → UNAddToWalletBottomSheetItem/UNAddToWalletBottomSheetItem.styles.js.map} +0 -0
  406. /package/lib/module/components/UNBottomSheetComponent/components/{UNAddToWalletBottomSheetItem.styles.js → UNAddToWalletBottomSheetItem/UNAddToWalletBottomSheetItem.styles.js} +0 -0
  407. /package/lib/module/components/UNBottomSheetComponent/components/{UNAddToWalletBottomSheetItem.styles.js.map → UNAddToWalletBottomSheetItem/UNAddToWalletBottomSheetItem.styles.js.map} +0 -0
  408. /package/lib/typescript/{assets → src/assets}/images/index.d.ts +0 -0
  409. /package/lib/typescript/{components → src/components}/UNACHCreditComponent/UNACHCreditComponent.utils.d.ts +0 -0
  410. /package/lib/typescript/{components → src/components}/UNACHDebitComponent/UNACHDebitComponent.utils.d.ts +0 -0
  411. /package/lib/typescript/{components → src/components}/UNActivityComponent/UNActivityComponent.utils.d.ts +0 -0
  412. /package/lib/typescript/{components → src/components}/UNBookPaymentComponent/UNBookPaymentComponent.utils.d.ts +0 -0
  413. /package/lib/typescript/{components → src/components}/UNBottomSheetComponent/UNBottomSheetComponent.constants.d.ts +0 -0
  414. /package/lib/typescript/{components → src/components}/UNBottomSheetComponent/UNBottomSheetComponent.styles.d.ts +0 -0
  415. /package/lib/typescript/{components → src/components}/UNBottomSheetComponent/UNBottomSheetComponent.utils.d.ts +0 -0
  416. /package/lib/typescript/{components/UNBottomSheetComponent/components → src/components/UNBottomSheetComponent/components/UNAddToWalletBottomSheetItem}/UNAddToWalletBottomSheetItem.styles.d.ts +0 -0
  417. /package/lib/typescript/{components → src/components}/UNCheckDepositComponent/UNCheckDepositComponent.utils.d.ts +0 -0
  418. /package/lib/typescript/{flows → src/flows}/UNFlows.d.ts +0 -0
  419. /package/lib/typescript/{flows → src/flows}/card/UNCardFlows.d.ts +0 -0
  420. /package/lib/typescript/{helpers → src/helpers}/BottomSheet/BottomSheet.d.ts +0 -0
  421. /package/lib/typescript/{helpers → src/helpers}/BottomSheet/BottomSheet.styles.d.ts +0 -0
  422. /package/lib/typescript/{helpers → src/helpers}/pushProvisioningService/hooks/useCardWallet.d.ts +0 -0
  423. /package/lib/typescript/{helpers → src/helpers}/pushProvisioningService/startProvisioning.d.ts +0 -0
  424. /package/lib/typescript/{hooks → src/hooks}/useAppStateListener.d.ts +0 -0
  425. /package/lib/typescript/{index.d.ts → src/index.d.ts} +0 -0
  426. /package/lib/typescript/{messages → src/messages}/nativeMessages/bottomSheetMessage.d.ts +0 -0
  427. /package/lib/typescript/{messages → src/messages}/nativeMessages/cardMessage.d.ts +0 -0
  428. /package/lib/typescript/{messages → src/messages}/nativeMessages/index.d.ts +0 -0
  429. /package/lib/typescript/{messages → src/messages}/nativeMessages/sdkMessage.d.ts +0 -0
  430. /package/lib/typescript/{messages → src/messages}/webMessages/accountMessage.d.ts +0 -0
  431. /package/lib/typescript/{messages → src/messages}/webMessages/achCreditMessage.d.ts +0 -0
  432. /package/lib/typescript/{messages → src/messages}/webMessages/activityMessage.d.ts +0 -0
  433. /package/lib/typescript/{messages → src/messages}/webMessages/bookPaymentMessage.d.ts +0 -0
  434. /package/lib/typescript/{messages → src/messages}/webMessages/cardMessage.d.ts +0 -0
  435. /package/lib/typescript/{messages → src/messages}/webMessages/checkMessage.d.ts +0 -0
  436. /package/lib/typescript/{messages → src/messages}/webMessages/pageMessage.d.ts +0 -0
  437. /package/lib/typescript/{messages → src/messages}/webMessages/paymentsMessage.d.ts +0 -0
  438. /package/lib/typescript/{messages → src/messages}/webMessages/unitMessages.d.ts +0 -0
  439. /package/lib/typescript/{nativeComponent → src/nativeComponent}/UnitAddToWalletButton.d.ts +0 -0
  440. /package/lib/typescript/{networking → src/networking}/common/UNNetworkConstants.d.ts +0 -0
  441. /package/lib/typescript/{scripts → src/scripts}/html/bodyHtml.d.ts +0 -0
  442. /package/lib/typescript/{scripts → src/scripts}/html/fontFaces.d.ts +0 -0
  443. /package/lib/typescript/{styles → src/styles}/fonts.d.ts +0 -0
  444. /package/lib/typescript/{styles → src/styles}/variables.d.ts +0 -0
  445. /package/lib/typescript/{types → src/types}/internal/bottomSheet.types.d.ts +0 -0
  446. /package/lib/typescript/{types → src/types}/shared/account.types.d.ts +0 -0
  447. /package/lib/typescript/{types → src/types}/shared/achCredit.types.d.ts +0 -0
  448. /package/lib/typescript/{types → src/types}/shared/authorization.types.d.ts +0 -0
  449. /package/lib/typescript/{types → src/types}/shared/bookPayment.types.d.ts +0 -0
  450. /package/lib/typescript/{types → src/types}/shared/card.types.d.ts +0 -0
  451. /package/lib/typescript/{types → src/types}/shared/checkDeposit.types.d.ts +0 -0
  452. /package/lib/typescript/{types → src/types}/shared/fonts.types.d.ts +0 -0
  453. /package/lib/typescript/{types → src/types}/shared/payments.types.d.ts +0 -0
  454. /package/lib/typescript/{types → src/types}/shared/transactions.types.d.ts +0 -0
  455. /package/lib/typescript/{types → src/types}/shared/types.d.ts +0 -0
  456. /package/lib/typescript/{types → src/types}/shared/wallet.types.d.ts +0 -0
  457. /package/lib/typescript/{unitSdkManager → src/unitSdkManager}/unitUiManager/unitUiManager.d.ts +0 -0
  458. /package/lib/typescript/{webComponent → src/webComponent}/WebComponent.d.ts +0 -0
  459. /package/lib/typescript/{webComponent → src/webComponent}/html.d.ts +0 -0
  460. /package/src/components/UNBottomSheetComponent/components/{UNAddToWalletBottomSheetItem.styles.ts → UNAddToWalletBottomSheetItem/UNAddToWalletBottomSheetItem.styles.ts} +0 -0
@@ -3,19 +3,31 @@ import { View } from 'react-native';
3
3
  import type WebView from 'react-native-webview';
4
4
  import { HeightEvent, PageMessage } from '../..//messages/webMessages/pageMessage';
5
5
  import { RequestRefreshEvent, RequestRenderingEvent, UnitMessage } from '../../messages/webMessages/unitMessages';
6
- import EventBus from '../../helpers/EventBus';
7
6
  import { WebComponent } from '../../webComponent/WebComponent';
8
7
  import type { WebViewMessage } from '../../messages/webMessages';
9
- import { getAccountParams, getAccountScript, injectOpenActionsMenuScript, injectRefreshEventIfNeeded, injectRequestAccountActionScript } from './UNAccountComponent.utils';
8
+ import {
9
+ getAccountParams,
10
+ getAccountScript,
11
+ injectOpenActionsMenuScript,
12
+ injectRefreshEventIfNeeded,
13
+ injectRequestAccountActionScript,
14
+ } from './UNAccountComponent.utils';
10
15
  import type { UNError, UNOnLoadResponse, UNOnLoadResponseData } from '../../types/shared';
11
- import { useListenerToBus } from '../../hooks/listenerToBus';
12
16
  import type { UNAccountData } from '../../types/shared/account.types';
13
17
  import { AccountMessage } from '../../messages/webMessages/accountMessage';
14
18
  import { RESPONSE_KEYS, UnitOnLoadResponseEvent } from '../../messages/webMessages/onLoadMessage';
15
19
  import type { UNAccountMenuAction } from '../../types/shared';
16
- import { BottomSheetRenderingType, SlotRendering, type BottomSheetSlotData } from '../../types/internal/bottomSheet.types';
20
+ import {
21
+ BottomSheetRenderingType,
22
+ SlotRendering,
23
+ type BottomSheetSlotData,
24
+ } from '../../types/internal/bottomSheet.types';
17
25
  import { PresentationMode, WebComponentType } from '../../types/internal/webComponent.types';
18
26
  import { BottomSheetNativeMessage } from '../../messages/nativeMessages/bottomSheetMessage';
27
+ import { withReduxStoreAndRefForwarding } from '../../helpers/store/helpers';
28
+ import { useDispatch } from 'react-redux';
29
+ import { setEvent } from '../../slices/SharedEventsSlice';
30
+ import { useListenerToEvent } from '../../hooks/useListenerToEvent';
19
31
 
20
32
  export interface UNAccountComponentProps {
21
33
  // inputs
@@ -38,12 +50,14 @@ export interface UNAccountRef {
38
50
  openAction: (action: UNAccountMenuAction) => void;
39
51
  }
40
52
 
41
- export enum AccountAction {
53
+ export enum UNAccountAction {
42
54
  List = 'account-list',
43
55
  Menu = 'account-menu'
44
56
  }
45
57
 
46
- export const UNAccountComponent = React.forwardRef<UNAccountRef, UNAccountComponentProps>(function UNAccountComponent(props, accountRef) {
58
+ const UNAccountComponent = React.forwardRef<UNAccountRef, UNAccountComponentProps>(function UNAccountComponent(props, accountRef) {
59
+
60
+ const dispatch = useDispatch();
47
61
  const [height, setHeight] = useState(0);
48
62
 
49
63
  const [requestRefreshEvent, setRequestRefreshEvent] = useState<RequestRefreshEvent | null>(null);
@@ -77,9 +91,8 @@ export const UNAccountComponent = React.forwardRef<UNAccountRef, UNAccountCompon
77
91
  console.error('On Load Error: unexpected response type.');
78
92
  return;
79
93
  };
80
-
81
- useListenerToBus({ busEventKey: UnitMessage.UNIT_REQUEST_REFRESH, action: requestRefresh });
82
- useListenerToBus({ busEventKey: AccountMessage.UNIT_ACCOUNT_CHANGED, action: handleAccountChanged });
94
+ useListenerToEvent({ busEventKey: UnitMessage.UNIT_REQUEST_REFRESH, action: requestRefresh });
95
+ useListenerToEvent({ busEventKey: AccountMessage.UNIT_ACCOUNT_CHANGED, action: handleAccountChanged });
83
96
 
84
97
  useEffect(() => {
85
98
  injectRefreshEventIfNeeded(webRef.current, requestRefreshEvent);
@@ -91,7 +104,7 @@ export const UNAccountComponent = React.forwardRef<UNAccountRef, UNAccountCompon
91
104
  },
92
105
  openAction(action: UNAccountMenuAction) {
93
106
  injectRequestAccountActionScript(webRef.current, action);
94
- }
107
+ },
95
108
  }));
96
109
 
97
110
  const handleMessage = (message: WebViewMessage) => {
@@ -103,15 +116,16 @@ export const UNAccountComponent = React.forwardRef<UNAccountRef, UNAccountCompon
103
116
  const slotData: BottomSheetSlotData = {
104
117
  componentName: WebComponentType.account,
105
118
  componentResourceId: props.accountId,
106
- requestRenderingEvent: message.details as RequestRenderingEvent
119
+ requestRenderingEvent: message.details as RequestRenderingEvent,
107
120
  };
108
121
 
109
- const event = {
122
+ const data = {
110
123
  type: BottomSheetRenderingType.Slot,
111
- data: slotData
124
+ data: slotData,
112
125
  } as SlotRendering;
113
126
 
114
- EventBus.Instance.event(BottomSheetNativeMessage.START_FLOW, event);
127
+ dispatch(setEvent({ key: BottomSheetNativeMessage.START_FLOW, data }));
128
+
115
129
  break;
116
130
  }
117
131
  case PageMessage.PAGE_HEIGHT:
@@ -136,3 +150,5 @@ export const UNAccountComponent = React.forwardRef<UNAccountRef, UNAccountCompon
136
150
  </View>
137
151
  );
138
152
  });
153
+
154
+ export default withReduxStoreAndRefForwarding<UNAccountComponentProps, UNAccountRef>(UNAccountComponent);
@@ -1,4 +1,4 @@
1
- import { AccountAction, UNAccountComponentProps } from './UNAccountComponent';
1
+ import { UNAccountAction, UNAccountComponentProps } from './UNAccountComponent';
2
2
  import { RequestRefreshEvent, RequestRenderingEvent, UnitMessage } from '../../messages/webMessages/unitMessages';
3
3
  import type WebView from 'react-native-webview';
4
4
  import type { UNAccountMenuAction } from 'src/types/shared';
@@ -38,5 +38,5 @@ export const injectRefreshEventIfNeeded = (currentWeb: WebView | null, requestRe
38
38
  };
39
39
 
40
40
  export const getAccountActionType = (requestRendering: RequestRenderingEvent) => {
41
- return requestRendering.data.nativeComponent.includes(AccountAction.List) ? AccountAction.List : AccountAction.Menu;
41
+ return requestRendering.data.nativeComponent.includes(UNAccountAction.List) ? UNAccountAction.List : UNAccountAction.Menu;
42
42
  };
@@ -0,0 +1 @@
1
+ export { default as UNAccountComponent, UNAccountComponentProps, UNAccountRef } from './UNAccountComponent';
@@ -1,38 +1,53 @@
1
1
  import React, { useRef, useState } from 'react';
2
2
  import { Dimensions, View } from 'react-native';
3
3
  import { RequestRefreshEvent, RequestRenderingEvent, UnitMessage } from '../../messages/webMessages/unitMessages';
4
- import { useListenerToBus } from '../../hooks/listenerToBus';
5
4
  import type { WebViewMessage } from '../../messages/webMessages';
6
5
  import { HeightEvent, PageMessage } from '../../messages/webMessages/pageMessage';
7
6
  import type { UNError, UNOnLoadResponse, UNOnLoadResponseData } from '../../types/shared';
8
7
  import { WebComponent } from '../../webComponent/WebComponent';
9
- import { getActivityParams, getActivityScript, injectFiltersChanged, injectRefreshEventIfNeeded } from './UNActivityComponent.utils';
8
+ import {
9
+ getActivityParams,
10
+ getActivityScript,
11
+ injectFiltersChanged,
12
+ injectRefreshEventIfNeeded,
13
+ } from './UNActivityComponent.utils';
10
14
  import type WebView from 'react-native-webview';
11
- import EventBus from '../../helpers/EventBus';
12
15
  import type { UNActivityOnLoadData } from '../../types/shared/activity.types';
13
16
  import { RESPONSE_KEYS, UnitOnLoadResponseEvent } from '../../messages/webMessages/onLoadMessage';
14
17
  import { ActivityMessage } from '../../messages/webMessages/activityMessage';
15
- import { BottomSheetRenderingType, type BottomSheetSlotData, type SlotRendering } from '../../types/internal/bottomSheet.types';
18
+ import {
19
+ BottomSheetRenderingType,
20
+ type BottomSheetSlotData,
21
+ type SlotRendering,
22
+ } from '../../types/internal/bottomSheet.types';
16
23
  import { PresentationMode, WebComponentType } from '../../types/internal/webComponent.types';
17
24
  import { BottomSheetNativeMessage } from '../../messages/nativeMessages/bottomSheetMessage';
25
+ import { withReduxStore } from '../../helpers/store/helpers';
26
+ import { setEvent } from '../../slices/SharedEventsSlice';
27
+ import { useDispatch } from 'react-redux';
28
+ import { useListenerToEvent } from '../../hooks/useListenerToEvent';
29
+ import type { UNActivityComponentPaginationType } from '../../types/shared';
18
30
 
19
31
  const DEFAULT_HEIGHT = Dimensions.get('window').height * 0.5;
32
+
20
33
  export interface UNActivityComponentProps {
21
34
  // inputs
22
35
  customerToken: string;
23
36
  accountId?: string;
24
- queryFilter?: string
37
+ queryFilter?: string;
25
38
 
26
39
  // ui
27
40
  theme?: string;
28
41
  language?: string;
29
42
  hideFilterButton?: boolean;
30
-
43
+ paginationType?: UNActivityComponentPaginationType;
44
+ transactionsPerPage?: number;
31
45
  // event
32
46
  onLoad?: (response: UNOnLoadResponse<UNActivityOnLoadData>) => void;
33
47
  }
34
48
 
35
- export const UNActivityComponent = (props: UNActivityComponentProps) => {
49
+ const UNActivityComponent = (props: UNActivityComponentProps) => {
50
+ const dispatch = useDispatch();
36
51
  const webRef = useRef<WebView>(null);
37
52
  const [defaultHeight, setDefaultHeight] = useState<number>();
38
53
 
@@ -44,8 +59,11 @@ export const UNActivityComponent = (props: UNActivityComponentProps) => {
44
59
  injectFiltersChanged(webRef.current, query);
45
60
  };
46
61
 
47
- useListenerToBus({ busEventKey: UnitMessage.UNIT_REQUEST_REFRESH, action: requestRefresh });
48
- useListenerToBus({ busEventKey: ActivityMessage.UNIT_ACTIVITY_FILTERS_CHANGED, action: dispatchActivityFiltersChanged });
62
+ useListenerToEvent({ busEventKey: UnitMessage.UNIT_REQUEST_REFRESH, action: requestRefresh });
63
+ useListenerToEvent({
64
+ busEventKey: ActivityMessage.UNIT_ACTIVITY_FILTERS_CHANGED,
65
+ action: dispatchActivityFiltersChanged,
66
+ });
49
67
 
50
68
  const handleUnitOnLoad = (response: UnitOnLoadResponseEvent) => {
51
69
  if (!props.onLoad) {
@@ -57,13 +75,13 @@ export const UNActivityComponent = (props: UNActivityComponentProps) => {
57
75
  return;
58
76
  }
59
77
 
60
- if (RESPONSE_KEYS.authorization in response && RESPONSE_KEYS.transactions in response) {
78
+ if (RESPONSE_KEYS.authorizations in response && RESPONSE_KEYS.transactions in response) {
61
79
  // ActivityOnLoadResponse;
62
80
  const activityOnLoad: UNOnLoadResponseData<UNActivityOnLoadData> = {
63
81
  data: {
64
- [RESPONSE_KEYS.authorization]: response[RESPONSE_KEYS.authorization].data,
65
- [RESPONSE_KEYS.transactions]: response[RESPONSE_KEYS.transactions].data
66
- }
82
+ [RESPONSE_KEYS.authorizations]: response[RESPONSE_KEYS.authorizations].data,
83
+ [RESPONSE_KEYS.transactions]: response[RESPONSE_KEYS.transactions].data,
84
+ },
67
85
  };
68
86
  props.onLoad(activityOnLoad);
69
87
  return;
@@ -79,15 +97,15 @@ export const UNActivityComponent = (props: UNActivityComponentProps) => {
79
97
  const slotData: BottomSheetSlotData = {
80
98
  componentName: WebComponentType.activity,
81
99
  componentResourceId: props.accountId,
82
- requestRenderingEvent: message.details as RequestRenderingEvent
100
+ requestRenderingEvent: message.details as RequestRenderingEvent,
83
101
  };
84
102
 
85
- const event = {
103
+ const data = {
86
104
  type: BottomSheetRenderingType.Slot,
87
- data: slotData
105
+ data: slotData,
88
106
  } as SlotRendering;
89
107
 
90
- EventBus.Instance.event(BottomSheetNativeMessage.START_FLOW, event);
108
+ dispatch(setEvent({ key: BottomSheetNativeMessage.START_FLOW, data }));
91
109
  break;
92
110
  }
93
111
  case UnitMessage.UNIT_ON_LOAD:
@@ -127,3 +145,5 @@ export const UNActivityComponent = (props: UNActivityComponentProps) => {
127
145
  </View>
128
146
  );
129
147
  };
148
+
149
+ export default withReduxStore<UNActivityComponentProps>(UNActivityComponent);
@@ -7,12 +7,15 @@ import { WebComponentType } from '../../types/internal/webComponent.types';
7
7
  export const getActivityParams = (props: UNActivityComponentProps) => {
8
8
  const accountIdParam = props.accountId ? `account-id="${props.accountId}"` : '';
9
9
  const queryFilterParam = props.queryFilter ? `query-filter="${props.queryFilter}"` : '';
10
-
10
+ const paginationTypeParam = props.paginationType ? `pagination-type="${props.paginationType}"` : '';
11
+ const transactionsPerPageParam = props.transactionsPerPage ? `transactions-per-page="${props.transactionsPerPage}"` : '';
11
12
  return `
12
13
  customer-token="${props.customerToken}"
13
14
  ${accountIdParam}
14
15
  hide-filter-button="${props.hideFilterButton || false}"
15
16
  ${queryFilterParam}
17
+ ${paginationTypeParam}
18
+ ${transactionsPerPageParam}
16
19
  style="height: 100%"
17
20
  `;
18
21
  };
@@ -0,0 +1 @@
1
+ export { default as UNActivityComponent, UNActivityComponentProps } from './UNActivityComponent';
@@ -10,6 +10,7 @@ import { PaymentMessage } from '../../messages/webMessages/paymentsMessage';
10
10
  import type { BookPaymentEvent } from '../../messages/webMessages/bookPaymentMessage';
11
11
  import { RESPONSE_KEYS, UnitOnLoadResponseEvent } from '../../messages/webMessages/onLoadMessage';
12
12
  import { PresentationMode, WebComponentType } from '../../types/internal/webComponent.types';
13
+ import { withReduxStore } from '../../helpers/store/helpers';
13
14
 
14
15
  export interface UNBookPaymentComponentProps {
15
16
  //inputs
@@ -29,7 +30,7 @@ export interface UNBookPaymentComponentProps {
29
30
  onLoad?: (response: UNOnLoadResponse<UNAccountData>) => void;
30
31
  }
31
32
 
32
- export const UNBookPaymentComponent = (props: UNBookPaymentComponentProps) => {
33
+ const UNBookPaymentComponent = (props: UNBookPaymentComponentProps) => {
33
34
  const [height, setHeight] = useState<number>(0);
34
35
  const [presentationMode, setPresentationMode] = useState<PresentationMode>(PresentationMode.Inherit);
35
36
 
@@ -99,3 +100,5 @@ export const UNBookPaymentComponent = (props: UNBookPaymentComponentProps) => {
99
100
  </View>
100
101
  );
101
102
  };
103
+
104
+ export default withReduxStore<UNBookPaymentComponentProps>(UNBookPaymentComponent);
@@ -0,0 +1 @@
1
+ export { default as UNBookPaymentComponent, UNBookPaymentComponentProps } from './UNBookPaymentComponent';
@@ -4,11 +4,9 @@ import type WebView from 'react-native-webview';
4
4
  import { WebComponent } from '../../webComponent/WebComponent';
5
5
  import { Dimensions, Linking, View } from 'react-native';
6
6
  import BottomSheet from '../../helpers/BottomSheet/BottomSheet';
7
- import EventBus from '../../helpers/EventBus';
8
7
  import { HeightEvent, PageMessage } from '../../messages/webMessages/pageMessage';
9
8
  import { RequestOpenLinkEvent, RequestRenderingEvent, UnitMessage } from '../../messages/webMessages/unitMessages';
10
9
  import { CardMessage, CardActivatedEvent, CardStatusChangedEvent } from '../../messages/webMessages/cardMessage';
11
- import { useListenerToBus } from '../../hooks/listenerToBus';
12
10
  import type { WebViewMessage } from '../../messages/webMessages';
13
11
  import {
14
12
  extractCardIdFromComponentParams,
@@ -23,14 +21,26 @@ import { getStylesObject } from './UNBottomSheetComponent.styles';
23
21
  import { useAppStateListener } from '../../hooks/useAppStateListener';
24
22
  import { UNAddToWalletBottomSheetItem } from './components/UNAddToWalletBottomSheetItem';
25
23
  import { getAccountActionType } from '../UNAccountComponent/UNAccountComponent.utils';
26
- import { AccountAction } from '../UNAccountComponent/UNAccountComponent';
24
+ import { UNAccountAction } from '../UNAccountComponent/UNAccountComponent';
27
25
  import type { AccountChangedEvent } from '../../messages/webMessages/accountMessage';
28
26
  import { AccountMessage } from '../../messages/webMessages/accountMessage';
29
27
  import { ActivityFiltersChangedEvent, ActivityMessage } from '../../messages/webMessages/activityMessage';
30
28
  import { BOTTOM_SHEET_MAX_PERCENTAGE_SIZE } from './UNBottomSheetComponent.constants';
31
- import { BottomSheetRenderingType, BottomSheetSlotData, NativeComponentData, WebComponentData } from '../../types/internal/bottomSheet.types';
29
+ import {
30
+ BottomSheetRenderingType,
31
+ BottomSheetSlotData,
32
+ NativeComponentData,
33
+ WebComponentData,
34
+ } from '../../types/internal/bottomSheet.types';
32
35
  import { PresentationMode, WebComponentType } from '../../types/internal/webComponent.types';
33
- import { BottomSheetNativeMessage, type StartBottomSheetFlowMessage } from '../../messages/nativeMessages/bottomSheetMessage';
36
+ import {
37
+ BottomSheetNativeMessage,
38
+ type StartBottomSheetFlowMessage,
39
+ } from '../../messages/nativeMessages/bottomSheetMessage';
40
+ import { withReduxStore } from '../../helpers/store/helpers';
41
+ import { useListenerToEvent } from '../../hooks/useListenerToEvent';
42
+ import { setEvent } from '../../slices/SharedEventsSlice';
43
+ import { useDispatch } from 'react-redux';
34
44
 
35
45
  export enum ScrollState {
36
46
  /*
@@ -55,7 +65,8 @@ export enum ScrollState {
55
65
  onlyBottomSheet = 'onlyBottomSheet',
56
66
  }
57
67
 
58
- export const UNBottomSheetComponent = () => {
68
+ const UNBottomSheetComponent = () => {
69
+ const dispatch = useDispatch();
59
70
  const [isBottomSheetActive, setIsBottomSheetActive] = useState(false);
60
71
  const [height, setHeight] = useState(0);
61
72
 
@@ -142,8 +153,8 @@ export const UNBottomSheetComponent = () => {
142
153
  }
143
154
  }, [shouldShowComponent, newHeightMessage, isAddToWallet]);
144
155
 
145
- useListenerToBus({ busEventKey: BottomSheetNativeMessage.START_FLOW, action: startFlow });
146
- useListenerToBus({ busEventKey: UnitMessage.UNIT_REQUEST_CLOSE_FLOW, action: handleCloseFlow });
156
+ useListenerToEvent({ busEventKey: BottomSheetNativeMessage.START_FLOW, action: startFlow });
157
+ useListenerToEvent({ busEventKey: UnitMessage.UNIT_REQUEST_CLOSE_FLOW, action: handleCloseFlow });
147
158
 
148
159
  const defineScrollState = () => {
149
160
  const scrollStateForSlot = () => {
@@ -152,7 +163,7 @@ export const UNBottomSheetComponent = () => {
152
163
  case WebComponentType.account: {
153
164
  const accountActionType = getAccountActionType(bottomSheetSlotData.requestRenderingEvent);
154
165
  setScrollState(
155
- accountActionType === AccountAction.List ? ScrollState.onTop : ScrollState.unScrollable
166
+ accountActionType === UNAccountAction.List ? ScrollState.onTop : ScrollState.unScrollable,
156
167
  );
157
168
  break;
158
169
  }
@@ -232,7 +243,7 @@ export const UNBottomSheetComponent = () => {
232
243
  setBottomSheetSlotData({
233
244
  componentResourceId: bottomSheetSlotData?.componentResourceId,
234
245
  componentName: bottomSheetSlotData?.componentName,
235
- requestRenderingEvent: requestRendering
246
+ requestRenderingEvent: requestRendering,
236
247
  });
237
248
 
238
249
  // Open the bottom sheet
@@ -241,16 +252,28 @@ export const UNBottomSheetComponent = () => {
241
252
  break;
242
253
  }
243
254
  case CardMessage.CARD_ACTIVATED:
244
- EventBus.Instance.event(CardMessage.CARD_ACTIVATED, (message.details as CardActivatedEvent).card);
255
+ dispatch(setEvent({
256
+ key: CardMessage.CARD_ACTIVATED,
257
+ data: (message.details as CardActivatedEvent).card,
258
+ }));
245
259
  break;
246
260
  case CardMessage.CARD_STATUS_CHANGED:
247
- EventBus.Instance.event(CardMessage.CARD_STATUS_CHANGED, (message.details as CardStatusChangedEvent).card);
261
+ dispatch(setEvent({
262
+ key: CardMessage.CARD_STATUS_CHANGED,
263
+ data: (message.details as CardStatusChangedEvent).card,
264
+ }));
248
265
  break;
249
266
  case AccountMessage.UNIT_ACCOUNT_CHANGED:
250
- EventBus.Instance.event(AccountMessage.UNIT_ACCOUNT_CHANGED, (message.details as AccountChangedEvent).account);
267
+ dispatch(setEvent({
268
+ key: AccountMessage.UNIT_ACCOUNT_CHANGED,
269
+ data: (message.details as AccountChangedEvent).account,
270
+ }));
251
271
  break;
252
272
  case ActivityMessage.UNIT_ACTIVITY_FILTERS_CHANGED:
253
- EventBus.Instance.event(ActivityMessage.UNIT_ACTIVITY_FILTERS_CHANGED, (message.details as ActivityFiltersChangedEvent));
273
+ dispatch(setEvent({
274
+ key: ActivityMessage.UNIT_ACTIVITY_FILTERS_CHANGED,
275
+ data: (message.details as ActivityFiltersChangedEvent),
276
+ }));
254
277
  break;
255
278
  case UnitMessage.UNIT_REQUEST_CLOSE_FLOW:
256
279
  handleCloseFlow();
@@ -286,7 +309,10 @@ export const UNBottomSheetComponent = () => {
286
309
  switch (renderingType) {
287
310
  case BottomSheetRenderingType.Slot:
288
311
  if (bottomSheetSlotData?.requestRenderingEvent.data.nativeComponent?.includes('action=AddToWallet') && bottomSheetSlotData?.componentResourceId) {
289
- return <UNAddToWalletBottomSheetItem renderingType={renderingType} renderingRequest={bottomSheetSlotData.requestRenderingEvent} cardId={bottomSheetSlotData?.componentResourceId} fullScreenHeight={fullScreenHeight}/>;
312
+ return <UNAddToWalletBottomSheetItem renderingType={renderingType}
313
+ renderingRequest={bottomSheetSlotData.requestRenderingEvent}
314
+ cardId={bottomSheetSlotData?.componentResourceId}
315
+ fullScreenHeight={fullScreenHeight} />;
290
316
  }
291
317
 
292
318
  return (
@@ -304,7 +330,8 @@ export const UNBottomSheetComponent = () => {
304
330
  if (webComponentData?.params?.includes('action=AddToWallet')) {
305
331
  const cardId = extractCardIdFromComponentParams(webComponentData);
306
332
  if (!cardId) return null;
307
- return <UNAddToWalletBottomSheetItem renderingType={renderingType} webComponentData={webComponentData} cardId={cardId} fullScreenHeight={fullScreenHeight}/>;
333
+ return <UNAddToWalletBottomSheetItem renderingType={renderingType} webComponentData={webComponentData}
334
+ cardId={cardId} fullScreenHeight={fullScreenHeight} />;
308
335
  }
309
336
  return null;
310
337
  case BottomSheetRenderingType.NativeComponent:
@@ -313,22 +340,22 @@ export const UNBottomSheetComponent = () => {
313
340
  };
314
341
 
315
342
  return (
316
- <>
317
- <View
318
- pointerEvents={isBottomSheetActive ? undefined : 'none'}
319
- style={styles.container}
343
+ <View
344
+ pointerEvents={isBottomSheetActive ? undefined : 'none'}
345
+ style={styles.container}
346
+ >
347
+ <BottomSheet
348
+ isOpen={isBottomSheetActive}
349
+ height={height}
350
+ onClose={() => setIsBottomSheetActive(false)}
351
+ onOpen={() => setIsBottomSheetActive(true)}
352
+ handleWebViewScroll={() => handleWebViewScroll()}
353
+ shouldEnableBottomSheetScroll={scrollState !== ScrollState.onlyWebView}
320
354
  >
321
- <BottomSheet
322
- isOpen={isBottomSheetActive}
323
- height={height}
324
- onClose={() => setIsBottomSheetActive(false)}
325
- onOpen={() => setIsBottomSheetActive(true)}
326
- handleWebViewScroll={() => handleWebViewScroll()}
327
- shouldEnableBottomSheetScroll={scrollState !== ScrollState.onlyWebView}
328
- >
329
- {isAppActive && renderBottomSheetItem()}
330
- </BottomSheet >
331
- </View >
332
- </>
355
+ {isAppActive && renderBottomSheetItem()}
356
+ </BottomSheet>
357
+ </View>
333
358
  );
334
359
  };
360
+
361
+ export default withReduxStore(UNBottomSheetComponent);
@@ -1,18 +1,19 @@
1
1
  import React, { useEffect, useRef } from 'react';
2
2
  import type WebView from 'react-native-webview';
3
- import { WebComponent } from '../../../webComponent/WebComponent';
4
- import { injectHtmlFullScreenHeight, renderingBottomSheetRequest } from '../UNBottomSheetComponent.utils';
3
+ import { WebComponent } from '../../../../webComponent/WebComponent';
4
+ import { injectHtmlFullScreenHeight, renderingBottomSheetRequest } from '../../UNBottomSheetComponent.utils';
5
5
  import { getStylesObject } from './UNAddToWalletBottomSheetItem.styles';
6
6
  import { ActivityIndicator } from 'react-native';
7
- import { UnitMessage, type RequestRenderingEvent } from '../../../messages/webMessages/unitMessages';
8
- import UnitAddToWalletButtonView from '../../../nativeComponent/UnitAddToWalletButton';
9
- import { UNCardAddToWalletStatus } from '../../../types/shared/wallet.types';
10
- import { BottomSheetRenderingType, WebComponentData } from '../../../types/internal/bottomSheet.types';
11
- import { PresentationMode, WebComponentType } from '../../../types/internal/webComponent.types';
12
- import { useCardWallet } from '../../../helpers/pushProvisioningService/hooks/useCardWallet';
13
- import { launchStartCardProvisioning } from '../../../helpers/pushProvisioningService/startProvisioning';
14
- import type { WebViewMessage } from '../../../messages/webMessages';
15
- import EventBus from '../../../helpers/EventBus';
7
+ import { UnitMessage, type RequestRenderingEvent } from '../../../../messages/webMessages/unitMessages';
8
+ import UnitAddToWalletButtonView from '../../../../nativeComponent/UnitAddToWalletButton';
9
+ import { UNCardAddToWalletStatus } from '../../../../types/shared/wallet.types';
10
+ import { BottomSheetRenderingType, WebComponentData } from '../../../../types/internal/bottomSheet.types';
11
+ import { PresentationMode, WebComponentType } from '../../../../types/internal/webComponent.types';
12
+ import { useCardWallet } from '../../../../helpers/pushProvisioningService/hooks/useCardWallet';
13
+ import { launchStartCardProvisioning } from '../../../../helpers/pushProvisioningService/startProvisioning';
14
+ import type { WebViewMessage } from '../../../../messages/webMessages';
15
+ import { useDispatch } from 'react-redux';
16
+ import { setEvent } from '../../../../slices/SharedEventsSlice';
16
17
 
17
18
  export interface UNAddToWalletBottomSheetItemProps {
18
19
  renderingType: BottomSheetRenderingType
@@ -23,6 +24,7 @@ export interface UNAddToWalletBottomSheetItemProps {
23
24
  }
24
25
 
25
26
  export const UNAddToWalletBottomSheetItem = (props: UNAddToWalletBottomSheetItemProps) => {
27
+ const dispatch = useDispatch();
26
28
  const styles = getStylesObject();
27
29
 
28
30
  const webRef = useRef<WebView>(null);
@@ -48,14 +50,17 @@ export const UNAddToWalletBottomSheetItem = (props: UNAddToWalletBottomSheetItem
48
50
  launchStartCardProvisioning(currentUNWallet);
49
51
  };
50
52
 
51
- const handleWebComponentMessage = (message: WebViewMessage) => {
53
+ const handleWebComponentMessage = (message: WebViewMessage) => {
52
54
  if (!message || !message.type) return;
53
55
  switch (message.type) {
54
56
  case UnitMessage.UNIT_ON_LOAD:
55
57
  injectHtmlFullScreenHeight(webRef.current, props.fullScreenHeight);
56
58
  break;
57
59
  case UnitMessage.UNIT_REQUEST_CLOSE_FLOW:
58
- EventBus.Instance.event(UnitMessage.UNIT_REQUEST_CLOSE_FLOW, {});
60
+ dispatch(setEvent({
61
+ key: UnitMessage.UNIT_REQUEST_CLOSE_FLOW,
62
+ data: {},
63
+ }));
59
64
  break;
60
65
  default:
61
66
  break;
@@ -0,0 +1 @@
1
+ export * from './UNAddToWalletBottomSheetItem';
@@ -0,0 +1 @@
1
+ export * from './UNAddToWalletBottomSheetItem';
@@ -0,0 +1 @@
1
+ export { default as UNBottomSheetComponent } from './UNBottomSheetComponent';