react-native-unit-components 1.9.1 → 1.11.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 (828) hide show
  1. package/android/build.gradle +36 -88
  2. package/android/gradle.properties +2 -2
  3. package/android/src/main/AndroidManifestNew.xml +14 -0
  4. package/android/src/main/java/com/unitreactnativecomponents/UnitAddToWalletButtonViewManager.kt +2 -2
  5. package/android/src/main/java/com/unitreactnativecomponents/UnitReactNativeComponentsEvent.kt +3 -3
  6. package/android/src/main/java/com/unitreactnativecomponents/UnitReactNativeComponentsPackage.kt +9 -12
  7. package/android/src/main/java/com/unitreactnativecomponents/appInfo/UNAppInfoModule.kt +59 -0
  8. package/android/src/main/java/com/unitreactnativecomponents/extensions/ContextExtensions.kt +35 -0
  9. package/android/src/main/java/com/unitreactnativecomponents/visapresentation/UNGooglePayView.kt +147 -152
  10. package/ios/Extensions/Bundle+Extensions.swift +23 -0
  11. package/ios/UNAppInfo/IOSAppInfo.swift +47 -0
  12. package/ios/UNAppInfo/UNAppInfoExportModule.m +5 -2
  13. package/ios/UnitReactNativeComponents.xcodeproj/project.pbxproj +34 -0
  14. package/lib/commonjs/assets/images/index.js.map +1 -1
  15. package/lib/commonjs/components/UNACHCreditComponent/UNACHCreditComponent.js +15 -6
  16. package/lib/commonjs/components/UNACHCreditComponent/UNACHCreditComponent.js.map +1 -1
  17. package/lib/commonjs/components/UNACHCreditComponent/UNACHCreditComponent.utils.js +13 -2
  18. package/lib/commonjs/components/UNACHCreditComponent/UNACHCreditComponent.utils.js.map +1 -1
  19. package/lib/commonjs/components/UNACHCreditComponent/index.js +2 -2
  20. package/lib/commonjs/components/UNACHCreditComponent/index.js.map +1 -1
  21. package/lib/commonjs/components/UNACHDebitComponent/UNACHDebitComponent.js +15 -6
  22. package/lib/commonjs/components/UNACHDebitComponent/UNACHDebitComponent.js.map +1 -1
  23. package/lib/commonjs/components/UNACHDebitComponent/UNACHDebitComponent.utils.js +12 -2
  24. package/lib/commonjs/components/UNACHDebitComponent/UNACHDebitComponent.utils.js.map +1 -1
  25. package/lib/commonjs/components/UNACHDebitComponent/index.js +2 -2
  26. package/lib/commonjs/components/UNACHDebitComponent/index.js.map +1 -1
  27. package/lib/commonjs/components/UNAccountComponent/UNAccountComponent.js +41 -21
  28. package/lib/commonjs/components/UNAccountComponent/UNAccountComponent.js.map +1 -1
  29. package/lib/commonjs/components/UNAccountComponent/UNAccountComponent.utils.js +9 -8
  30. package/lib/commonjs/components/UNAccountComponent/UNAccountComponent.utils.js.map +1 -1
  31. package/lib/commonjs/components/UNAccountComponent/index.js +2 -2
  32. package/lib/commonjs/components/UNAccountComponent/index.js.map +1 -1
  33. package/lib/commonjs/components/UNActivityComponent/UNActivityComponent.js +28 -15
  34. package/lib/commonjs/components/UNActivityComponent/UNActivityComponent.js.map +1 -1
  35. package/lib/commonjs/components/UNActivityComponent/UNActivityComponent.utils.js +8 -2
  36. package/lib/commonjs/components/UNActivityComponent/UNActivityComponent.utils.js.map +1 -1
  37. package/lib/commonjs/components/UNActivityComponent/index.js +8 -2
  38. package/lib/commonjs/components/UNActivityComponent/index.js.map +1 -1
  39. package/lib/commonjs/components/UNBookPaymentComponent/UNBookPaymentComponent.js +13 -4
  40. package/lib/commonjs/components/UNBookPaymentComponent/UNBookPaymentComponent.js.map +1 -1
  41. package/lib/commonjs/components/UNBookPaymentComponent/UNBookPaymentComponent.utils.js +11 -4
  42. package/lib/commonjs/components/UNBookPaymentComponent/UNBookPaymentComponent.utils.js.map +1 -1
  43. package/lib/commonjs/components/UNBookPaymentComponent/index.js +2 -2
  44. package/lib/commonjs/components/UNBookPaymentComponent/index.js.map +1 -1
  45. package/lib/commonjs/components/UNBottomSheetComponent/UNBottomSheetComponent.constants.js +13 -3
  46. package/lib/commonjs/components/UNBottomSheetComponent/UNBottomSheetComponent.constants.js.map +1 -1
  47. package/lib/commonjs/components/UNBottomSheetComponent/UNBottomSheetComponent.js +156 -246
  48. package/lib/commonjs/components/UNBottomSheetComponent/UNBottomSheetComponent.js.map +1 -1
  49. package/lib/commonjs/components/UNBottomSheetComponent/UNBottomSheetComponent.styles.js.map +1 -1
  50. package/lib/commonjs/components/UNBottomSheetComponent/UNBottomSheetComponent.utils.js +13 -16
  51. package/lib/commonjs/components/UNBottomSheetComponent/UNBottomSheetComponent.utils.js.map +1 -1
  52. package/lib/commonjs/components/UNBottomSheetComponent/components/UNBottomSheetNativeComponent/UNBottomSheetNativeComponent.js +50 -0
  53. package/lib/commonjs/components/UNBottomSheetComponent/components/UNBottomSheetNativeComponent/UNBottomSheetNativeComponent.js.map +1 -0
  54. package/lib/commonjs/components/UNBottomSheetComponent/components/UNBottomSheetNativeComponent/index.js +17 -0
  55. package/lib/commonjs/components/UNBottomSheetComponent/components/UNBottomSheetNativeComponent/index.js.map +1 -0
  56. package/lib/commonjs/components/UNBottomSheetComponent/components/UNBottomSheetSlotComponent/UNBottomSheetSlotComponent.js +166 -0
  57. package/lib/commonjs/components/UNBottomSheetComponent/components/UNBottomSheetSlotComponent/UNBottomSheetSlotComponent.js.map +1 -0
  58. package/lib/commonjs/components/UNBottomSheetComponent/components/UNBottomSheetSlotComponent/index.js +17 -0
  59. package/lib/commonjs/components/UNBottomSheetComponent/components/UNBottomSheetSlotComponent/index.js.map +1 -0
  60. package/lib/commonjs/components/UNBottomSheetComponent/components/index.js +15 -4
  61. package/lib/commonjs/components/UNBottomSheetComponent/components/index.js.map +1 -1
  62. package/lib/commonjs/components/UNBottomSheetComponent/index.js.map +1 -1
  63. package/lib/commonjs/components/UNCardComponent/UNCardComponent.js +14 -12
  64. package/lib/commonjs/components/UNCardComponent/UNCardComponent.js.map +1 -1
  65. package/lib/commonjs/components/UNCardComponent/UNCardComponent.utils.js +7 -5
  66. package/lib/commonjs/components/UNCardComponent/UNCardComponent.utils.js.map +1 -1
  67. package/lib/commonjs/components/UNCardComponent/index.js +2 -2
  68. package/lib/commonjs/components/UNCardComponent/index.js.map +1 -1
  69. package/lib/commonjs/components/UNCheckDepositComponent/UNCheckDepositComponent.js +14 -4
  70. package/lib/commonjs/components/UNCheckDepositComponent/UNCheckDepositComponent.js.map +1 -1
  71. package/lib/commonjs/components/UNCheckDepositComponent/UNCheckDepositComponent.utils.js +7 -1
  72. package/lib/commonjs/components/UNCheckDepositComponent/UNCheckDepositComponent.utils.js.map +1 -1
  73. package/lib/commonjs/components/UNCheckDepositComponent/index.js +2 -2
  74. package/lib/commonjs/components/UNCheckDepositComponent/index.js.map +1 -1
  75. package/lib/commonjs/components/UNMultipleCardsComponent/UNMultipleCardsComponent.js +85 -0
  76. package/lib/commonjs/components/UNMultipleCardsComponent/UNMultipleCardsComponent.js.map +1 -0
  77. package/lib/commonjs/components/UNMultipleCardsComponent/UNMultipleCardsComponent.utils.js +42 -0
  78. package/lib/commonjs/components/UNMultipleCardsComponent/UNMultipleCardsComponent.utils.js.map +1 -0
  79. package/lib/commonjs/components/UNMultipleCardsComponent/index.js +21 -0
  80. package/lib/commonjs/components/UNMultipleCardsComponent/index.js.map +1 -0
  81. package/lib/commonjs/components/UNNextRepaymentComponent/UNNextRepaymentComponent.js +61 -0
  82. package/lib/commonjs/components/UNNextRepaymentComponent/UNNextRepaymentComponent.js.map +1 -0
  83. package/lib/commonjs/components/UNNextRepaymentComponent/UNNextRepaymentComponent.utils.js +15 -0
  84. package/lib/commonjs/components/UNNextRepaymentComponent/UNNextRepaymentComponent.utils.js.map +1 -0
  85. package/lib/commonjs/components/UNNextRepaymentComponent/index.js +21 -0
  86. package/lib/commonjs/components/UNNextRepaymentComponent/index.js.map +1 -0
  87. package/lib/commonjs/components/UNProgramDetailsComponent/UNProgramDetailsComponent.js +61 -0
  88. package/lib/commonjs/components/UNProgramDetailsComponent/UNProgramDetailsComponent.js.map +1 -0
  89. package/lib/commonjs/components/UNProgramDetailsComponent/UNProgramDetailsComponent.utils.js +15 -0
  90. package/lib/commonjs/components/UNProgramDetailsComponent/UNProgramDetailsComponent.utils.js.map +1 -0
  91. package/lib/commonjs/components/UNProgramDetailsComponent/index.js +21 -0
  92. package/lib/commonjs/components/UNProgramDetailsComponent/index.js.map +1 -0
  93. package/lib/commonjs/components/index.js +33 -0
  94. package/lib/commonjs/components/index.js.map +1 -1
  95. package/lib/commonjs/custom.d.js.map +1 -1
  96. package/lib/commonjs/flows/UNFlows.js +1 -1
  97. package/lib/commonjs/flows/UNFlows.js.map +1 -1
  98. package/lib/commonjs/flows/card/UNCardFlows.js +27 -23
  99. package/lib/commonjs/flows/card/UNCardFlows.js.map +1 -1
  100. package/lib/commonjs/helpers/BottomSheet/BottomSheet.js +26 -29
  101. package/lib/commonjs/helpers/BottomSheet/BottomSheet.js.map +1 -1
  102. package/lib/commonjs/helpers/BottomSheet/BottomSheet.styles.js +0 -2
  103. package/lib/commonjs/helpers/BottomSheet/BottomSheet.styles.js.map +1 -1
  104. package/lib/commonjs/helpers/pushProvisioningService/helpers.js +34 -0
  105. package/lib/commonjs/helpers/pushProvisioningService/helpers.js.map +1 -0
  106. package/lib/commonjs/helpers/pushProvisioningService/hooks/useCardWallet.js +31 -2
  107. package/lib/commonjs/helpers/pushProvisioningService/hooks/useCardWallet.js.map +1 -1
  108. package/lib/commonjs/helpers/pushProvisioningService/hooks/useLaunchInitialize.js.map +1 -1
  109. package/lib/commonjs/helpers/pushProvisioningService/startProvisioning.js +3 -3
  110. package/lib/commonjs/helpers/pushProvisioningService/startProvisioning.js.map +1 -1
  111. package/lib/commonjs/helpers/pushProvisioningService/types.js +40 -0
  112. package/lib/commonjs/helpers/pushProvisioningService/types.js.map +1 -0
  113. package/lib/commonjs/helpers/store/helpers.js.map +1 -1
  114. package/lib/commonjs/hooks/useAppStateListener.js.map +1 -1
  115. package/lib/commonjs/hooks/useListenerToEvent.js +26 -0
  116. package/lib/commonjs/hooks/useListenerToEvent.js.map +1 -0
  117. package/lib/commonjs/index.js.map +1 -1
  118. package/lib/commonjs/messages/nativeMessages/bottomSheetMessage.js +7 -9
  119. package/lib/commonjs/messages/nativeMessages/bottomSheetMessage.js.map +1 -1
  120. package/lib/commonjs/messages/nativeMessages/cardMessage.js +3 -4
  121. package/lib/commonjs/messages/nativeMessages/cardMessage.js.map +1 -1
  122. package/lib/commonjs/messages/nativeMessages/index.js.map +1 -1
  123. package/lib/commonjs/messages/nativeMessages/sdkMessage.js +3 -4
  124. package/lib/commonjs/messages/nativeMessages/sdkMessage.js.map +1 -1
  125. package/lib/commonjs/messages/webMessages/accountMessage.js +3 -4
  126. package/lib/commonjs/messages/webMessages/accountMessage.js.map +1 -1
  127. package/lib/commonjs/messages/webMessages/achCreditMessage.js.map +1 -1
  128. package/lib/commonjs/messages/webMessages/activityMessage.js +3 -4
  129. package/lib/commonjs/messages/webMessages/activityMessage.js.map +1 -1
  130. package/lib/commonjs/messages/webMessages/bookPaymentMessage.js.map +1 -1
  131. package/lib/commonjs/messages/webMessages/cardMessage.js +3 -4
  132. package/lib/commonjs/messages/webMessages/cardMessage.js.map +1 -1
  133. package/lib/commonjs/messages/webMessages/checkMessage.js +3 -4
  134. package/lib/commonjs/messages/webMessages/checkMessage.js.map +1 -1
  135. package/lib/commonjs/messages/webMessages/index.js.map +1 -1
  136. package/lib/commonjs/messages/webMessages/multipleCardsMessage.js +11 -0
  137. package/lib/commonjs/messages/webMessages/multipleCardsMessage.js.map +1 -0
  138. package/lib/commonjs/messages/webMessages/onLoadMessage.js +6 -5
  139. package/lib/commonjs/messages/webMessages/onLoadMessage.js.map +1 -1
  140. package/lib/commonjs/messages/webMessages/pageMessage.js +3 -4
  141. package/lib/commonjs/messages/webMessages/pageMessage.js.map +1 -1
  142. package/lib/commonjs/messages/webMessages/paymentsMessage.js +5 -4
  143. package/lib/commonjs/messages/webMessages/paymentsMessage.js.map +1 -1
  144. package/lib/commonjs/messages/webMessages/unitMessages.js +9 -6
  145. package/lib/commonjs/messages/webMessages/unitMessages.js.map +1 -1
  146. package/lib/commonjs/nativeComponents/UNAddToWallet/UNAddToWalletComponent/UNAddToWalletBottomSheetItem.styles.js.map +1 -0
  147. package/lib/commonjs/nativeComponents/UNAddToWallet/UNAddToWalletComponent/UNAddToWalletComponent.js +79 -0
  148. package/lib/commonjs/nativeComponents/UNAddToWallet/UNAddToWalletComponent/UNAddToWalletComponent.js.map +1 -0
  149. package/lib/commonjs/nativeComponents/UNAddToWallet/UNAddToWalletComponent/UNAddToWalletComponent.utils.js +20 -0
  150. package/lib/commonjs/nativeComponents/UNAddToWallet/UNAddToWalletComponent/UNAddToWalletComponent.utils.js.map +1 -0
  151. package/lib/commonjs/nativeComponents/UNAddToWallet/UNAddToWalletComponent/index.js +14 -0
  152. package/lib/commonjs/nativeComponents/UNAddToWallet/UNAddToWalletComponent/index.js.map +1 -0
  153. package/lib/commonjs/{nativeComponent → nativeComponents/UNAddToWallet}/UnitAddToWalletButton.js +1 -2
  154. package/lib/commonjs/nativeComponents/UNAddToWallet/UnitAddToWalletButton.js.map +1 -0
  155. package/lib/commonjs/networking/common/UNNetworkConstants.js +2 -4
  156. package/lib/commonjs/networking/common/UNNetworkConstants.js.map +1 -1
  157. package/lib/commonjs/networking/requests/UNWalletPayloadRequest.js +27 -3
  158. package/lib/commonjs/networking/requests/UNWalletPayloadRequest.js.map +1 -1
  159. package/lib/commonjs/scripts/html/bodyHtml.js +1 -2
  160. package/lib/commonjs/scripts/html/bodyHtml.js.map +1 -1
  161. package/lib/commonjs/scripts/html/bodyScript.js +46 -32
  162. package/lib/commonjs/scripts/html/bodyScript.js.map +1 -1
  163. package/lib/commonjs/scripts/html/fontFaces.js +2 -3
  164. package/lib/commonjs/scripts/html/fontFaces.js.map +1 -1
  165. package/lib/commonjs/slices/BottomSheetSlice.js +74 -0
  166. package/lib/commonjs/slices/BottomSheetSlice.js.map +1 -0
  167. package/lib/commonjs/slices/ConfigurationSlice.js +35 -0
  168. package/lib/commonjs/slices/ConfigurationSlice.js.map +1 -0
  169. package/lib/commonjs/slices/SharedEventsSlice.js +29 -0
  170. package/lib/commonjs/slices/SharedEventsSlice.js.map +1 -0
  171. package/lib/commonjs/slices/pushProvisioningSlice.js +1 -2
  172. package/lib/commonjs/slices/pushProvisioningSlice.js.map +1 -1
  173. package/lib/commonjs/store/index.js.map +1 -1
  174. package/lib/commonjs/store/store.js +8 -3
  175. package/lib/commonjs/store/store.js.map +1 -1
  176. package/lib/commonjs/styles/fonts.js.map +1 -1
  177. package/lib/commonjs/styles/variables.js +5 -3
  178. package/lib/commonjs/styles/variables.js.map +1 -1
  179. package/lib/commonjs/types/internal/bottomSheet.types.js +22 -7
  180. package/lib/commonjs/types/internal/bottomSheet.types.js.map +1 -1
  181. package/lib/commonjs/types/internal/errorHelpers.js +20 -0
  182. package/lib/commonjs/types/internal/errorHelpers.js.map +1 -0
  183. package/lib/commonjs/types/internal/webComponent.types.js +9 -8
  184. package/lib/commonjs/types/internal/webComponent.types.js.map +1 -1
  185. package/lib/commonjs/types/shared/account.types.js +19 -16
  186. package/lib/commonjs/types/shared/account.types.js.map +1 -1
  187. package/lib/commonjs/types/shared/achCredit.types.js.map +1 -1
  188. package/lib/commonjs/types/shared/activity.types.js +6 -0
  189. package/lib/commonjs/types/shared/activity.types.js.map +1 -1
  190. package/lib/commonjs/types/shared/authorization.types.js.map +1 -1
  191. package/lib/commonjs/types/shared/bookPayment.types.js.map +1 -1
  192. package/lib/commonjs/types/shared/card.types.js +13 -5
  193. package/lib/commonjs/types/shared/card.types.js.map +1 -1
  194. package/lib/commonjs/types/shared/checkDeposit.types.js +3 -4
  195. package/lib/commonjs/types/shared/checkDeposit.types.js.map +1 -1
  196. package/lib/commonjs/types/shared/error.types.js +28 -0
  197. package/lib/commonjs/types/shared/error.types.js.map +1 -0
  198. package/lib/commonjs/types/shared/fonts.types.js +3 -4
  199. package/lib/commonjs/types/shared/fonts.types.js.map +1 -1
  200. package/lib/commonjs/types/shared/index.js +22 -0
  201. package/lib/commonjs/types/shared/index.js.map +1 -1
  202. package/lib/commonjs/types/shared/multipleCards.types.js +12 -0
  203. package/lib/commonjs/types/shared/multipleCards.types.js.map +1 -0
  204. package/lib/commonjs/types/shared/onLoadResponse.types.js +4 -0
  205. package/lib/commonjs/types/shared/onLoadResponse.types.js.map +1 -1
  206. package/lib/commonjs/types/shared/payments.types.js +9 -5
  207. package/lib/commonjs/types/shared/payments.types.js.map +1 -1
  208. package/lib/commonjs/types/shared/repayment.types.js +2 -0
  209. package/lib/commonjs/types/shared/repayment.types.js.map +1 -0
  210. package/lib/commonjs/types/shared/transactions.types.js +6 -8
  211. package/lib/commonjs/types/shared/transactions.types.js.map +1 -1
  212. package/lib/commonjs/types/shared/types.js.map +1 -1
  213. package/lib/commonjs/types/shared/versioning.types.js +4 -4
  214. package/lib/commonjs/types/shared/versioning.types.js.map +1 -1
  215. package/lib/commonjs/types/shared/wallet.types.js +9 -12
  216. package/lib/commonjs/types/shared/wallet.types.js.map +1 -1
  217. package/lib/commonjs/unitSdkManager/UnitSdk.api.js +6 -13
  218. package/lib/commonjs/unitSdkManager/UnitSdk.api.js.map +1 -1
  219. package/lib/commonjs/unitSdkManager/UnitSdk.constants.js +2 -3
  220. package/lib/commonjs/unitSdkManager/UnitSdk.constants.js.map +1 -1
  221. package/lib/commonjs/unitSdkManager/UnitSdkManager.js +56 -75
  222. package/lib/commonjs/unitSdkManager/UnitSdkManager.js.map +1 -1
  223. package/lib/commonjs/unitSdkManager/UnitSdkManager.utils.internal.js.map +1 -1
  224. package/lib/commonjs/unitSdkManager/unitUiManager/unitUiManager.js +4 -7
  225. package/lib/commonjs/unitSdkManager/unitUiManager/unitUiManager.js.map +1 -1
  226. package/lib/commonjs/utils/AppInfo.js +49 -0
  227. package/lib/commonjs/utils/AppInfo.js.map +1 -0
  228. package/lib/commonjs/utils/SDKInfo.js +13 -0
  229. package/lib/commonjs/utils/SDKInfo.js.map +1 -0
  230. package/lib/commonjs/utils/webVersioningStrategy.utils.js +7 -0
  231. package/lib/commonjs/utils/webVersioningStrategy.utils.js.map +1 -1
  232. package/lib/commonjs/webComponent/WebComponent.js +40 -36
  233. package/lib/commonjs/webComponent/WebComponent.js.map +1 -1
  234. package/lib/commonjs/webComponent/WebComponent.utils.js +19 -1
  235. package/lib/commonjs/webComponent/WebComponent.utils.js.map +1 -1
  236. package/lib/commonjs/webComponent/html.js +2 -4
  237. package/lib/commonjs/webComponent/html.js.map +1 -1
  238. package/lib/module/assets/images/index.js.map +1 -1
  239. package/lib/module/components/UNACHCreditComponent/UNACHCreditComponent.js +12 -2
  240. package/lib/module/components/UNACHCreditComponent/UNACHCreditComponent.js.map +1 -1
  241. package/lib/module/components/UNACHCreditComponent/UNACHCreditComponent.utils.js +13 -2
  242. package/lib/module/components/UNACHCreditComponent/UNACHCreditComponent.utils.js.map +1 -1
  243. package/lib/module/components/UNACHCreditComponent/index.js.map +1 -1
  244. package/lib/module/components/UNACHDebitComponent/UNACHDebitComponent.js +12 -2
  245. package/lib/module/components/UNACHDebitComponent/UNACHDebitComponent.js.map +1 -1
  246. package/lib/module/components/UNACHDebitComponent/UNACHDebitComponent.utils.js +12 -2
  247. package/lib/module/components/UNACHDebitComponent/UNACHDebitComponent.utils.js.map +1 -1
  248. package/lib/module/components/UNACHDebitComponent/index.js.map +1 -1
  249. package/lib/module/components/UNAccountComponent/UNAccountComponent.js +40 -17
  250. package/lib/module/components/UNAccountComponent/UNAccountComponent.js.map +1 -1
  251. package/lib/module/components/UNAccountComponent/UNAccountComponent.utils.js +10 -8
  252. package/lib/module/components/UNAccountComponent/UNAccountComponent.utils.js.map +1 -1
  253. package/lib/module/components/UNAccountComponent/index.js.map +1 -1
  254. package/lib/module/components/UNActivityComponent/UNActivityComponent.js +29 -14
  255. package/lib/module/components/UNActivityComponent/UNActivityComponent.js.map +1 -1
  256. package/lib/module/components/UNActivityComponent/UNActivityComponent.utils.js +8 -2
  257. package/lib/module/components/UNActivityComponent/UNActivityComponent.utils.js.map +1 -1
  258. package/lib/module/components/UNActivityComponent/index.js +1 -1
  259. package/lib/module/components/UNActivityComponent/index.js.map +1 -1
  260. package/lib/module/components/UNBookPaymentComponent/UNBookPaymentComponent.js +10 -0
  261. package/lib/module/components/UNBookPaymentComponent/UNBookPaymentComponent.js.map +1 -1
  262. package/lib/module/components/UNBookPaymentComponent/UNBookPaymentComponent.utils.js +11 -4
  263. package/lib/module/components/UNBookPaymentComponent/UNBookPaymentComponent.utils.js.map +1 -1
  264. package/lib/module/components/UNBookPaymentComponent/index.js.map +1 -1
  265. package/lib/module/components/UNBottomSheetComponent/UNBottomSheetComponent.constants.js +12 -1
  266. package/lib/module/components/UNBottomSheetComponent/UNBottomSheetComponent.constants.js.map +1 -1
  267. package/lib/module/components/UNBottomSheetComponent/UNBottomSheetComponent.js +151 -240
  268. package/lib/module/components/UNBottomSheetComponent/UNBottomSheetComponent.js.map +1 -1
  269. package/lib/module/components/UNBottomSheetComponent/UNBottomSheetComponent.styles.js.map +1 -1
  270. package/lib/module/components/UNBottomSheetComponent/UNBottomSheetComponent.utils.js +11 -14
  271. package/lib/module/components/UNBottomSheetComponent/UNBottomSheetComponent.utils.js.map +1 -1
  272. package/lib/module/components/UNBottomSheetComponent/components/UNBottomSheetNativeComponent/UNBottomSheetNativeComponent.js +42 -0
  273. package/lib/module/components/UNBottomSheetComponent/components/UNBottomSheetNativeComponent/UNBottomSheetNativeComponent.js.map +1 -0
  274. package/lib/module/components/UNBottomSheetComponent/components/UNBottomSheetNativeComponent/index.js +2 -0
  275. package/lib/module/components/UNBottomSheetComponent/components/UNBottomSheetNativeComponent/index.js.map +1 -0
  276. package/lib/module/components/UNBottomSheetComponent/components/UNBottomSheetSlotComponent/UNBottomSheetSlotComponent.js +158 -0
  277. package/lib/module/components/UNBottomSheetComponent/components/UNBottomSheetSlotComponent/UNBottomSheetSlotComponent.js.map +1 -0
  278. package/lib/module/components/UNBottomSheetComponent/components/UNBottomSheetSlotComponent/index.js +2 -0
  279. package/lib/module/components/UNBottomSheetComponent/components/UNBottomSheetSlotComponent/index.js.map +1 -0
  280. package/lib/module/components/UNBottomSheetComponent/components/index.js +2 -1
  281. package/lib/module/components/UNBottomSheetComponent/components/index.js.map +1 -1
  282. package/lib/module/components/UNBottomSheetComponent/index.js.map +1 -1
  283. package/lib/module/components/UNCardComponent/UNCardComponent.js +12 -8
  284. package/lib/module/components/UNCardComponent/UNCardComponent.js.map +1 -1
  285. package/lib/module/components/UNCardComponent/UNCardComponent.utils.js +7 -5
  286. package/lib/module/components/UNCardComponent/UNCardComponent.utils.js.map +1 -1
  287. package/lib/module/components/UNCardComponent/index.js.map +1 -1
  288. package/lib/module/components/UNCheckDepositComponent/UNCheckDepositComponent.js +11 -0
  289. package/lib/module/components/UNCheckDepositComponent/UNCheckDepositComponent.js.map +1 -1
  290. package/lib/module/components/UNCheckDepositComponent/UNCheckDepositComponent.utils.js +7 -1
  291. package/lib/module/components/UNCheckDepositComponent/UNCheckDepositComponent.utils.js.map +1 -1
  292. package/lib/module/components/UNCheckDepositComponent/index.js.map +1 -1
  293. package/lib/module/components/UNMultipleCardsComponent/UNMultipleCardsComponent.js +77 -0
  294. package/lib/module/components/UNMultipleCardsComponent/UNMultipleCardsComponent.js.map +1 -0
  295. package/lib/module/components/UNMultipleCardsComponent/UNMultipleCardsComponent.utils.js +34 -0
  296. package/lib/module/components/UNMultipleCardsComponent/UNMultipleCardsComponent.utils.js.map +1 -0
  297. package/lib/module/components/UNMultipleCardsComponent/index.js +2 -0
  298. package/lib/module/components/UNMultipleCardsComponent/index.js.map +1 -0
  299. package/lib/module/components/UNNextRepaymentComponent/UNNextRepaymentComponent.js +53 -0
  300. package/lib/module/components/UNNextRepaymentComponent/UNNextRepaymentComponent.js.map +1 -0
  301. package/lib/module/components/UNNextRepaymentComponent/UNNextRepaymentComponent.utils.js +8 -0
  302. package/lib/module/components/UNNextRepaymentComponent/UNNextRepaymentComponent.utils.js.map +1 -0
  303. package/lib/module/components/UNNextRepaymentComponent/index.js +2 -0
  304. package/lib/module/components/UNNextRepaymentComponent/index.js.map +1 -0
  305. package/lib/module/components/UNProgramDetailsComponent/UNProgramDetailsComponent.js +53 -0
  306. package/lib/module/components/UNProgramDetailsComponent/UNProgramDetailsComponent.js.map +1 -0
  307. package/lib/module/components/UNProgramDetailsComponent/UNProgramDetailsComponent.utils.js +8 -0
  308. package/lib/module/components/UNProgramDetailsComponent/UNProgramDetailsComponent.utils.js.map +1 -0
  309. package/lib/module/components/UNProgramDetailsComponent/index.js +2 -0
  310. package/lib/module/components/UNProgramDetailsComponent/index.js.map +1 -0
  311. package/lib/module/components/index.js +3 -0
  312. package/lib/module/components/index.js.map +1 -1
  313. package/lib/module/custom.d.js.map +1 -1
  314. package/lib/module/flows/UNFlows.js +1 -1
  315. package/lib/module/flows/UNFlows.js.map +1 -1
  316. package/lib/module/flows/card/UNCardFlows.js +28 -23
  317. package/lib/module/flows/card/UNCardFlows.js.map +1 -1
  318. package/lib/module/helpers/BottomSheet/BottomSheet.js +25 -27
  319. package/lib/module/helpers/BottomSheet/BottomSheet.js.map +1 -1
  320. package/lib/module/helpers/BottomSheet/BottomSheet.styles.js +1 -3
  321. package/lib/module/helpers/BottomSheet/BottomSheet.styles.js.map +1 -1
  322. package/lib/module/helpers/pushProvisioningService/helpers.js +24 -0
  323. package/lib/module/helpers/pushProvisioningService/helpers.js.map +1 -0
  324. package/lib/module/helpers/pushProvisioningService/hooks/useCardWallet.js +34 -5
  325. package/lib/module/helpers/pushProvisioningService/hooks/useCardWallet.js.map +1 -1
  326. package/lib/module/helpers/pushProvisioningService/hooks/useLaunchInitialize.js.map +1 -1
  327. package/lib/module/helpers/pushProvisioningService/startProvisioning.js +3 -3
  328. package/lib/module/helpers/pushProvisioningService/startProvisioning.js.map +1 -1
  329. package/lib/module/helpers/pushProvisioningService/types.js +34 -0
  330. package/lib/module/helpers/pushProvisioningService/types.js.map +1 -0
  331. package/lib/module/helpers/store/helpers.js.map +1 -1
  332. package/lib/module/hooks/useAppStateListener.js.map +1 -1
  333. package/lib/module/hooks/useListenerToEvent.js +19 -0
  334. package/lib/module/hooks/useListenerToEvent.js.map +1 -0
  335. package/lib/module/index.js.map +1 -1
  336. package/lib/module/messages/nativeMessages/bottomSheetMessage.js +7 -7
  337. package/lib/module/messages/nativeMessages/bottomSheetMessage.js.map +1 -1
  338. package/lib/module/messages/nativeMessages/cardMessage.js +3 -3
  339. package/lib/module/messages/nativeMessages/cardMessage.js.map +1 -1
  340. package/lib/module/messages/nativeMessages/index.js.map +1 -1
  341. package/lib/module/messages/nativeMessages/sdkMessage.js +3 -3
  342. package/lib/module/messages/nativeMessages/sdkMessage.js.map +1 -1
  343. package/lib/module/messages/webMessages/accountMessage.js +3 -3
  344. package/lib/module/messages/webMessages/accountMessage.js.map +1 -1
  345. package/lib/module/messages/webMessages/achCreditMessage.js.map +1 -1
  346. package/lib/module/messages/webMessages/activityMessage.js +3 -3
  347. package/lib/module/messages/webMessages/activityMessage.js.map +1 -1
  348. package/lib/module/messages/webMessages/bookPaymentMessage.js.map +1 -1
  349. package/lib/module/messages/webMessages/cardMessage.js +3 -3
  350. package/lib/module/messages/webMessages/cardMessage.js.map +1 -1
  351. package/lib/module/messages/webMessages/checkMessage.js +3 -3
  352. package/lib/module/messages/webMessages/checkMessage.js.map +1 -1
  353. package/lib/module/messages/webMessages/index.js.map +1 -1
  354. package/lib/module/messages/webMessages/multipleCardsMessage.js +5 -0
  355. package/lib/module/messages/webMessages/multipleCardsMessage.js.map +1 -0
  356. package/lib/module/messages/webMessages/onLoadMessage.js +6 -4
  357. package/lib/module/messages/webMessages/onLoadMessage.js.map +1 -1
  358. package/lib/module/messages/webMessages/pageMessage.js +3 -3
  359. package/lib/module/messages/webMessages/pageMessage.js.map +1 -1
  360. package/lib/module/messages/webMessages/paymentsMessage.js +5 -3
  361. package/lib/module/messages/webMessages/paymentsMessage.js.map +1 -1
  362. package/lib/module/messages/webMessages/unitMessages.js +8 -4
  363. package/lib/module/messages/webMessages/unitMessages.js.map +1 -1
  364. package/lib/module/nativeComponents/UNAddToWallet/UNAddToWalletComponent/UNAddToWalletBottomSheetItem.styles.js.map +1 -0
  365. package/lib/module/nativeComponents/UNAddToWallet/UNAddToWalletComponent/UNAddToWalletComponent.js +70 -0
  366. package/lib/module/nativeComponents/UNAddToWallet/UNAddToWalletComponent/UNAddToWalletComponent.js.map +1 -0
  367. package/lib/module/nativeComponents/UNAddToWallet/UNAddToWalletComponent/UNAddToWalletComponent.utils.js +12 -0
  368. package/lib/module/nativeComponents/UNAddToWallet/UNAddToWalletComponent/UNAddToWalletComponent.utils.js.map +1 -0
  369. package/lib/module/nativeComponents/UNAddToWallet/UNAddToWalletComponent/index.js +2 -0
  370. package/lib/module/nativeComponents/UNAddToWallet/UNAddToWalletComponent/index.js.map +1 -0
  371. package/lib/module/nativeComponents/UNAddToWallet/UnitAddToWalletButton.js.map +1 -0
  372. package/lib/module/networking/common/UNNetworkConstants.js.map +1 -1
  373. package/lib/module/networking/requests/UNWalletPayloadRequest.js +27 -3
  374. package/lib/module/networking/requests/UNWalletPayloadRequest.js.map +1 -1
  375. package/lib/module/scripts/html/bodyHtml.js.map +1 -1
  376. package/lib/module/scripts/html/bodyScript.js +34 -8
  377. package/lib/module/scripts/html/bodyScript.js.map +1 -1
  378. package/lib/module/scripts/html/fontFaces.js +2 -3
  379. package/lib/module/scripts/html/fontFaces.js.map +1 -1
  380. package/lib/module/slices/BottomSheetSlice.js +59 -0
  381. package/lib/module/slices/BottomSheetSlice.js.map +1 -0
  382. package/lib/module/slices/ConfigurationSlice.js +25 -0
  383. package/lib/module/slices/ConfigurationSlice.js.map +1 -0
  384. package/lib/module/slices/SharedEventsSlice.js +22 -0
  385. package/lib/module/slices/SharedEventsSlice.js.map +1 -0
  386. package/lib/module/slices/pushProvisioningSlice.js.map +1 -1
  387. package/lib/module/store/index.js.map +1 -1
  388. package/lib/module/store/store.js +7 -1
  389. package/lib/module/store/store.js.map +1 -1
  390. package/lib/module/styles/fonts.js.map +1 -1
  391. package/lib/module/styles/variables.js +4 -1
  392. package/lib/module/styles/variables.js.map +1 -1
  393. package/lib/module/types/internal/bottomSheet.types.js +21 -5
  394. package/lib/module/types/internal/bottomSheet.types.js.map +1 -1
  395. package/lib/module/types/internal/errorHelpers.js +12 -0
  396. package/lib/module/types/internal/errorHelpers.js.map +1 -0
  397. package/lib/module/types/internal/webComponent.types.js +9 -6
  398. package/lib/module/types/internal/webComponent.types.js.map +1 -1
  399. package/lib/module/types/shared/account.types.js +18 -12
  400. package/lib/module/types/shared/account.types.js.map +1 -1
  401. package/lib/module/types/shared/achCredit.types.js.map +1 -1
  402. package/lib/module/types/shared/activity.types.js +5 -1
  403. package/lib/module/types/shared/activity.types.js.map +1 -1
  404. package/lib/module/types/shared/authorization.types.js.map +1 -1
  405. package/lib/module/types/shared/bookPayment.types.js.map +1 -1
  406. package/lib/module/types/shared/card.types.js +12 -3
  407. package/lib/module/types/shared/card.types.js.map +1 -1
  408. package/lib/module/types/shared/checkDeposit.types.js +3 -3
  409. package/lib/module/types/shared/checkDeposit.types.js.map +1 -1
  410. package/lib/module/types/shared/error.types.js +22 -0
  411. package/lib/module/types/shared/error.types.js.map +1 -0
  412. package/lib/module/types/shared/fonts.types.js +3 -3
  413. package/lib/module/types/shared/fonts.types.js.map +1 -1
  414. package/lib/module/types/shared/index.js +2 -0
  415. package/lib/module/types/shared/index.js.map +1 -1
  416. package/lib/module/types/shared/multipleCards.types.js +6 -0
  417. package/lib/module/types/shared/multipleCards.types.js.map +1 -0
  418. package/lib/module/types/shared/onLoadResponse.types.js +1 -1
  419. package/lib/module/types/shared/onLoadResponse.types.js.map +1 -1
  420. package/lib/module/types/shared/payments.types.js +8 -3
  421. package/lib/module/types/shared/payments.types.js.map +1 -1
  422. package/lib/module/types/shared/repayment.types.js +2 -0
  423. package/lib/module/types/shared/repayment.types.js.map +1 -0
  424. package/lib/module/types/shared/transactions.types.js +6 -6
  425. package/lib/module/types/shared/transactions.types.js.map +1 -1
  426. package/lib/module/types/shared/types.js.map +1 -1
  427. package/lib/module/types/shared/versioning.types.js +4 -3
  428. package/lib/module/types/shared/versioning.types.js.map +1 -1
  429. package/lib/module/types/shared/wallet.types.js +9 -9
  430. package/lib/module/types/shared/wallet.types.js.map +1 -1
  431. package/lib/module/unitSdkManager/UnitSdk.api.js +5 -10
  432. package/lib/module/unitSdkManager/UnitSdk.api.js.map +1 -1
  433. package/lib/module/unitSdkManager/UnitSdk.constants.js +1 -1
  434. package/lib/module/unitSdkManager/UnitSdk.constants.js.map +1 -1
  435. package/lib/module/unitSdkManager/UnitSdkManager.js +56 -73
  436. package/lib/module/unitSdkManager/UnitSdkManager.js.map +1 -1
  437. package/lib/module/unitSdkManager/UnitSdkManager.utils.internal.js.map +1 -1
  438. package/lib/module/unitSdkManager/unitUiManager/unitUiManager.js +4 -7
  439. package/lib/module/unitSdkManager/unitUiManager/unitUiManager.js.map +1 -1
  440. package/lib/module/utils/AppInfo.js +39 -0
  441. package/lib/module/utils/AppInfo.js.map +1 -0
  442. package/lib/module/utils/SDKInfo.js +5 -0
  443. package/lib/module/utils/SDKInfo.js.map +1 -0
  444. package/lib/module/utils/webVersioningStrategy.utils.js +7 -0
  445. package/lib/module/utils/webVersioningStrategy.utils.js.map +1 -1
  446. package/lib/module/webComponent/WebComponent.js +40 -34
  447. package/lib/module/webComponent/WebComponent.js.map +1 -1
  448. package/lib/module/webComponent/WebComponent.utils.js +15 -0
  449. package/lib/module/webComponent/WebComponent.utils.js.map +1 -1
  450. package/lib/module/webComponent/html.js.map +1 -1
  451. package/lib/typescript/{assets → src/assets}/images/index.d.ts +1 -0
  452. package/lib/typescript/src/assets/images/index.d.ts.map +1 -0
  453. package/lib/typescript/{components → src/components}/UNACHCreditComponent/UNACHCreditComponent.d.ts +10 -1
  454. package/lib/typescript/src/components/UNACHCreditComponent/UNACHCreditComponent.d.ts.map +1 -0
  455. package/lib/typescript/{components → src/components}/UNACHCreditComponent/UNACHCreditComponent.utils.d.ts +1 -0
  456. package/lib/typescript/src/components/UNACHCreditComponent/UNACHCreditComponent.utils.d.ts.map +1 -0
  457. package/lib/typescript/{components → src/components}/UNACHCreditComponent/index.d.ts +1 -0
  458. package/lib/typescript/src/components/UNACHCreditComponent/index.d.ts.map +1 -0
  459. package/lib/typescript/{components → src/components}/UNACHDebitComponent/UNACHDebitComponent.d.ts +10 -1
  460. package/lib/typescript/src/components/UNACHDebitComponent/UNACHDebitComponent.d.ts.map +1 -0
  461. package/lib/typescript/{components → src/components}/UNACHDebitComponent/UNACHDebitComponent.utils.d.ts +1 -0
  462. package/lib/typescript/src/components/UNACHDebitComponent/UNACHDebitComponent.utils.d.ts.map +1 -0
  463. package/lib/typescript/{components → src/components}/UNACHDebitComponent/index.d.ts +1 -0
  464. package/lib/typescript/src/components/UNACHDebitComponent/index.d.ts.map +1 -0
  465. package/lib/typescript/{components → src/components}/UNAccountComponent/UNAccountComponent.d.ts +6 -0
  466. package/lib/typescript/src/components/UNAccountComponent/UNAccountComponent.d.ts.map +1 -0
  467. package/lib/typescript/{components → src/components}/UNAccountComponent/UNAccountComponent.utils.d.ts +2 -1
  468. package/lib/typescript/src/components/UNAccountComponent/UNAccountComponent.utils.d.ts.map +1 -0
  469. package/lib/typescript/{components → src/components}/UNAccountComponent/index.d.ts +1 -0
  470. package/lib/typescript/src/components/UNAccountComponent/index.d.ts.map +1 -0
  471. package/lib/typescript/src/components/UNActivityComponent/UNActivityComponent.d.ts +23 -0
  472. package/lib/typescript/src/components/UNActivityComponent/UNActivityComponent.d.ts.map +1 -0
  473. package/lib/typescript/{components → src/components}/UNActivityComponent/UNActivityComponent.utils.d.ts +1 -0
  474. package/lib/typescript/src/components/UNActivityComponent/UNActivityComponent.utils.d.ts.map +1 -0
  475. package/lib/typescript/src/components/UNActivityComponent/index.d.ts +2 -0
  476. package/lib/typescript/src/components/UNActivityComponent/index.d.ts.map +1 -0
  477. package/lib/typescript/{components → src/components}/UNBookPaymentComponent/UNBookPaymentComponent.d.ts +10 -4
  478. package/lib/typescript/src/components/UNBookPaymentComponent/UNBookPaymentComponent.d.ts.map +1 -0
  479. package/lib/typescript/{components → src/components}/UNBookPaymentComponent/UNBookPaymentComponent.utils.d.ts +1 -0
  480. package/lib/typescript/src/components/UNBookPaymentComponent/UNBookPaymentComponent.utils.d.ts.map +1 -0
  481. package/lib/typescript/{components → src/components}/UNBookPaymentComponent/index.d.ts +1 -0
  482. package/lib/typescript/src/components/UNBookPaymentComponent/index.d.ts.map +1 -0
  483. package/lib/typescript/src/components/UNBottomSheetComponent/UNBottomSheetComponent.constants.d.ts +8 -0
  484. package/lib/typescript/src/components/UNBottomSheetComponent/UNBottomSheetComponent.constants.d.ts.map +1 -0
  485. package/lib/typescript/src/components/UNBottomSheetComponent/UNBottomSheetComponent.d.ts +4 -0
  486. package/lib/typescript/src/components/UNBottomSheetComponent/UNBottomSheetComponent.d.ts.map +1 -0
  487. package/lib/typescript/{components → src/components}/UNBottomSheetComponent/UNBottomSheetComponent.styles.d.ts +1 -0
  488. package/lib/typescript/src/components/UNBottomSheetComponent/UNBottomSheetComponent.styles.d.ts.map +1 -0
  489. package/lib/typescript/{components → src/components}/UNBottomSheetComponent/UNBottomSheetComponent.utils.d.ts +2 -1
  490. package/lib/typescript/src/components/UNBottomSheetComponent/UNBottomSheetComponent.utils.d.ts.map +1 -0
  491. package/lib/typescript/src/components/UNBottomSheetComponent/components/UNBottomSheetNativeComponent/UNBottomSheetNativeComponent.d.ts +8 -0
  492. package/lib/typescript/src/components/UNBottomSheetComponent/components/UNBottomSheetNativeComponent/UNBottomSheetNativeComponent.d.ts.map +1 -0
  493. package/lib/typescript/src/components/UNBottomSheetComponent/components/UNBottomSheetNativeComponent/index.d.ts +2 -0
  494. package/lib/typescript/src/components/UNBottomSheetComponent/components/UNBottomSheetNativeComponent/index.d.ts.map +1 -0
  495. package/lib/typescript/src/components/UNBottomSheetComponent/components/UNBottomSheetSlotComponent/UNBottomSheetSlotComponent.d.ts +11 -0
  496. package/lib/typescript/src/components/UNBottomSheetComponent/components/UNBottomSheetSlotComponent/UNBottomSheetSlotComponent.d.ts.map +1 -0
  497. package/lib/typescript/src/components/UNBottomSheetComponent/components/UNBottomSheetSlotComponent/index.d.ts +2 -0
  498. package/lib/typescript/src/components/UNBottomSheetComponent/components/UNBottomSheetSlotComponent/index.d.ts.map +1 -0
  499. package/lib/typescript/src/components/UNBottomSheetComponent/components/index.d.ts +3 -0
  500. package/lib/typescript/src/components/UNBottomSheetComponent/components/index.d.ts.map +1 -0
  501. package/lib/typescript/{components → src/components}/UNBottomSheetComponent/index.d.ts +1 -0
  502. package/lib/typescript/src/components/UNBottomSheetComponent/index.d.ts.map +1 -0
  503. package/lib/typescript/{components → src/components}/UNCardComponent/UNCardComponent.d.ts +3 -0
  504. package/lib/typescript/src/components/UNCardComponent/UNCardComponent.d.ts.map +1 -0
  505. package/lib/typescript/{components → src/components}/UNCardComponent/UNCardComponent.utils.d.ts +1 -0
  506. package/lib/typescript/src/components/UNCardComponent/UNCardComponent.utils.d.ts.map +1 -0
  507. package/lib/typescript/{components → src/components}/UNCardComponent/index.d.ts +1 -0
  508. package/lib/typescript/src/components/UNCardComponent/index.d.ts.map +1 -0
  509. package/lib/typescript/{components → src/components}/UNCheckDepositComponent/UNCheckDepositComponent.d.ts +7 -1
  510. package/lib/typescript/src/components/UNCheckDepositComponent/UNCheckDepositComponent.d.ts.map +1 -0
  511. package/lib/typescript/{components → src/components}/UNCheckDepositComponent/UNCheckDepositComponent.utils.d.ts +1 -0
  512. package/lib/typescript/src/components/UNCheckDepositComponent/UNCheckDepositComponent.utils.d.ts.map +1 -0
  513. package/lib/typescript/{components → src/components}/UNCheckDepositComponent/index.d.ts +1 -0
  514. package/lib/typescript/src/components/UNCheckDepositComponent/index.d.ts.map +1 -0
  515. package/lib/typescript/src/components/UNMultipleCardsComponent/UNMultipleCardsComponent.d.ts +18 -0
  516. package/lib/typescript/src/components/UNMultipleCardsComponent/UNMultipleCardsComponent.d.ts.map +1 -0
  517. package/lib/typescript/src/components/UNMultipleCardsComponent/UNMultipleCardsComponent.utils.d.ts +4 -0
  518. package/lib/typescript/src/components/UNMultipleCardsComponent/UNMultipleCardsComponent.utils.d.ts.map +1 -0
  519. package/lib/typescript/src/components/UNMultipleCardsComponent/index.d.ts +2 -0
  520. package/lib/typescript/src/components/UNMultipleCardsComponent/index.d.ts.map +1 -0
  521. package/lib/typescript/src/components/UNNextRepaymentComponent/UNNextRepaymentComponent.d.ts +14 -0
  522. package/lib/typescript/src/components/UNNextRepaymentComponent/UNNextRepaymentComponent.d.ts.map +1 -0
  523. package/lib/typescript/src/components/UNNextRepaymentComponent/UNNextRepaymentComponent.utils.d.ts +3 -0
  524. package/lib/typescript/src/components/UNNextRepaymentComponent/UNNextRepaymentComponent.utils.d.ts.map +1 -0
  525. package/lib/typescript/src/components/UNNextRepaymentComponent/index.d.ts +2 -0
  526. package/lib/typescript/src/components/UNNextRepaymentComponent/index.d.ts.map +1 -0
  527. package/lib/typescript/src/components/UNProgramDetailsComponent/UNProgramDetailsComponent.d.ts +13 -0
  528. package/lib/typescript/src/components/UNProgramDetailsComponent/UNProgramDetailsComponent.d.ts.map +1 -0
  529. package/lib/typescript/src/components/UNProgramDetailsComponent/UNProgramDetailsComponent.utils.d.ts +3 -0
  530. package/lib/typescript/src/components/UNProgramDetailsComponent/UNProgramDetailsComponent.utils.d.ts.map +1 -0
  531. package/lib/typescript/src/components/UNProgramDetailsComponent/index.d.ts +2 -0
  532. package/lib/typescript/src/components/UNProgramDetailsComponent/index.d.ts.map +1 -0
  533. package/lib/typescript/{components → src/components}/index.d.ts +4 -0
  534. package/lib/typescript/src/components/index.d.ts.map +1 -0
  535. package/lib/typescript/{flows → src/flows}/UNFlows.d.ts +1 -0
  536. package/lib/typescript/src/flows/UNFlows.d.ts.map +1 -0
  537. package/lib/typescript/{flows → src/flows}/card/UNCardFlows.d.ts +1 -0
  538. package/lib/typescript/src/flows/card/UNCardFlows.d.ts.map +1 -0
  539. package/lib/typescript/{helpers → src/helpers}/BottomSheet/BottomSheet.d.ts +5 -3
  540. package/lib/typescript/src/helpers/BottomSheet/BottomSheet.d.ts.map +1 -0
  541. package/lib/typescript/{helpers → src/helpers}/BottomSheet/BottomSheet.styles.d.ts +1 -1
  542. package/lib/typescript/src/helpers/BottomSheet/BottomSheet.styles.d.ts.map +1 -0
  543. package/lib/typescript/src/helpers/pushProvisioningService/helpers.d.ts +5 -0
  544. package/lib/typescript/src/helpers/pushProvisioningService/helpers.d.ts.map +1 -0
  545. package/lib/typescript/{helpers → src/helpers}/pushProvisioningService/hooks/useCardWallet.d.ts +2 -1
  546. package/lib/typescript/src/helpers/pushProvisioningService/hooks/useCardWallet.d.ts.map +1 -0
  547. package/lib/typescript/{helpers → src/helpers}/pushProvisioningService/hooks/useLaunchInitialize.d.ts +1 -0
  548. package/lib/typescript/src/helpers/pushProvisioningService/hooks/useLaunchInitialize.d.ts.map +1 -0
  549. package/lib/typescript/{helpers → src/helpers}/pushProvisioningService/startProvisioning.d.ts +1 -0
  550. package/lib/typescript/src/helpers/pushProvisioningService/startProvisioning.d.ts.map +1 -0
  551. package/lib/typescript/src/helpers/pushProvisioningService/types.d.ts +50 -0
  552. package/lib/typescript/src/helpers/pushProvisioningService/types.d.ts.map +1 -0
  553. package/lib/typescript/{helpers → src/helpers}/store/helpers.d.ts +1 -0
  554. package/lib/typescript/src/helpers/store/helpers.d.ts.map +1 -0
  555. package/lib/typescript/{hooks → src/hooks}/useAppStateListener.d.ts +1 -0
  556. package/lib/typescript/src/hooks/useAppStateListener.d.ts.map +1 -0
  557. package/lib/typescript/src/hooks/useListenerToEvent.d.ts +10 -0
  558. package/lib/typescript/src/hooks/useListenerToEvent.d.ts.map +1 -0
  559. package/lib/typescript/{index.d.ts → src/index.d.ts} +1 -0
  560. package/lib/typescript/src/index.d.ts.map +1 -0
  561. package/lib/typescript/src/messages/nativeMessages/bottomSheetMessage.d.ts +10 -0
  562. package/lib/typescript/src/messages/nativeMessages/bottomSheetMessage.d.ts.map +1 -0
  563. package/lib/typescript/{messages → src/messages}/nativeMessages/cardMessage.d.ts +1 -0
  564. package/lib/typescript/src/messages/nativeMessages/cardMessage.d.ts.map +1 -0
  565. package/lib/typescript/{messages → src/messages}/nativeMessages/index.d.ts +1 -0
  566. package/lib/typescript/src/messages/nativeMessages/index.d.ts.map +1 -0
  567. package/lib/typescript/{messages → src/messages}/nativeMessages/sdkMessage.d.ts +1 -0
  568. package/lib/typescript/src/messages/nativeMessages/sdkMessage.d.ts.map +1 -0
  569. package/lib/typescript/{messages → src/messages}/webMessages/accountMessage.d.ts +1 -0
  570. package/lib/typescript/src/messages/webMessages/accountMessage.d.ts.map +1 -0
  571. package/lib/typescript/{messages → src/messages}/webMessages/achCreditMessage.d.ts +1 -0
  572. package/lib/typescript/src/messages/webMessages/achCreditMessage.d.ts.map +1 -0
  573. package/lib/typescript/{messages → src/messages}/webMessages/activityMessage.d.ts +1 -0
  574. package/lib/typescript/src/messages/webMessages/activityMessage.d.ts.map +1 -0
  575. package/lib/typescript/{messages → src/messages}/webMessages/bookPaymentMessage.d.ts +1 -0
  576. package/lib/typescript/src/messages/webMessages/bookPaymentMessage.d.ts.map +1 -0
  577. package/lib/typescript/{messages → src/messages}/webMessages/cardMessage.d.ts +1 -0
  578. package/lib/typescript/src/messages/webMessages/cardMessage.d.ts.map +1 -0
  579. package/lib/typescript/{messages → src/messages}/webMessages/checkMessage.d.ts +1 -0
  580. package/lib/typescript/src/messages/webMessages/checkMessage.d.ts.map +1 -0
  581. package/lib/typescript/{messages → src/messages}/webMessages/index.d.ts +4 -2
  582. package/lib/typescript/src/messages/webMessages/index.d.ts.map +1 -0
  583. package/lib/typescript/src/messages/webMessages/multipleCardsMessage.d.ts +7 -0
  584. package/lib/typescript/src/messages/webMessages/multipleCardsMessage.d.ts.map +1 -0
  585. package/lib/typescript/{messages → src/messages}/webMessages/onLoadMessage.d.ts +10 -4
  586. package/lib/typescript/src/messages/webMessages/onLoadMessage.d.ts.map +1 -0
  587. package/lib/typescript/{messages → src/messages}/webMessages/pageMessage.d.ts +1 -0
  588. package/lib/typescript/src/messages/webMessages/pageMessage.d.ts.map +1 -0
  589. package/lib/typescript/src/messages/webMessages/paymentsMessage.d.ts +6 -0
  590. package/lib/typescript/src/messages/webMessages/paymentsMessage.d.ts.map +1 -0
  591. package/lib/typescript/{messages → src/messages}/webMessages/unitMessages.d.ts +11 -5
  592. package/lib/typescript/src/messages/webMessages/unitMessages.d.ts.map +1 -0
  593. package/lib/typescript/{components/UNBottomSheetComponent/components/UNAddToWalletBottomSheetItem → src/nativeComponents/UNAddToWallet/UNAddToWalletComponent}/UNAddToWalletBottomSheetItem.styles.d.ts +1 -0
  594. package/lib/typescript/src/nativeComponents/UNAddToWallet/UNAddToWalletComponent/UNAddToWalletBottomSheetItem.styles.d.ts.map +1 -0
  595. package/lib/typescript/src/nativeComponents/UNAddToWallet/UNAddToWalletComponent/UNAddToWalletComponent.d.ts +8 -0
  596. package/lib/typescript/src/nativeComponents/UNAddToWallet/UNAddToWalletComponent/UNAddToWalletComponent.d.ts.map +1 -0
  597. package/lib/typescript/src/nativeComponents/UNAddToWallet/UNAddToWalletComponent/UNAddToWalletComponent.utils.d.ts +5 -0
  598. package/lib/typescript/src/nativeComponents/UNAddToWallet/UNAddToWalletComponent/UNAddToWalletComponent.utils.d.ts.map +1 -0
  599. package/lib/typescript/src/nativeComponents/UNAddToWallet/UNAddToWalletComponent/index.d.ts +2 -0
  600. package/lib/typescript/src/nativeComponents/UNAddToWallet/UNAddToWalletComponent/index.d.ts.map +1 -0
  601. package/lib/typescript/{nativeComponent → src/nativeComponents/UNAddToWallet}/UnitAddToWalletButton.d.ts +1 -0
  602. package/lib/typescript/src/nativeComponents/UNAddToWallet/UnitAddToWalletButton.d.ts.map +1 -0
  603. package/lib/typescript/{networking → src/networking}/common/UNNetworkConstants.d.ts +1 -0
  604. package/lib/typescript/src/networking/common/UNNetworkConstants.d.ts.map +1 -0
  605. package/lib/typescript/{networking → src/networking}/requests/UNWalletPayloadRequest.d.ts +2 -1
  606. package/lib/typescript/src/networking/requests/UNWalletPayloadRequest.d.ts.map +1 -0
  607. package/lib/typescript/{scripts → src/scripts}/html/bodyHtml.d.ts +1 -0
  608. package/lib/typescript/src/scripts/html/bodyHtml.d.ts.map +1 -0
  609. package/lib/typescript/{scripts → src/scripts}/html/bodyScript.d.ts +5 -1
  610. package/lib/typescript/src/scripts/html/bodyScript.d.ts.map +1 -0
  611. package/lib/typescript/{scripts → src/scripts}/html/fontFaces.d.ts +1 -0
  612. package/lib/typescript/src/scripts/html/fontFaces.d.ts.map +1 -0
  613. package/lib/typescript/src/slices/BottomSheetSlice.d.ts +16 -0
  614. package/lib/typescript/src/slices/BottomSheetSlice.d.ts.map +1 -0
  615. package/lib/typescript/src/slices/ConfigurationSlice.d.ts +11 -0
  616. package/lib/typescript/src/slices/ConfigurationSlice.d.ts.map +1 -0
  617. package/lib/typescript/src/slices/SharedEventsSlice.d.ts +53 -0
  618. package/lib/typescript/src/slices/SharedEventsSlice.d.ts.map +1 -0
  619. package/lib/typescript/{slices → src/slices}/pushProvisioningSlice.d.ts +1 -0
  620. package/lib/typescript/src/slices/pushProvisioningSlice.d.ts.map +1 -0
  621. package/lib/typescript/src/store/index.d.ts +2 -0
  622. package/lib/typescript/src/store/index.d.ts.map +1 -0
  623. package/lib/typescript/src/store/store.d.ts +73 -0
  624. package/lib/typescript/src/store/store.d.ts.map +1 -0
  625. package/lib/typescript/{styles → src/styles}/fonts.d.ts +1 -0
  626. package/lib/typescript/src/styles/fonts.d.ts.map +1 -0
  627. package/lib/typescript/{styles → src/styles}/variables.d.ts +4 -0
  628. package/lib/typescript/src/styles/variables.d.ts.map +1 -0
  629. package/lib/typescript/src/types/internal/bottomSheet.types.d.ts +57 -0
  630. package/lib/typescript/src/types/internal/bottomSheet.types.d.ts.map +1 -0
  631. package/lib/typescript/src/types/internal/errorHelpers.d.ts +5 -0
  632. package/lib/typescript/src/types/internal/errorHelpers.d.ts.map +1 -0
  633. package/lib/typescript/{types → src/types}/internal/webComponent.types.d.ts +5 -1
  634. package/lib/typescript/src/types/internal/webComponent.types.d.ts.map +1 -0
  635. package/lib/typescript/{types → src/types}/shared/account.types.d.ts +6 -0
  636. package/lib/typescript/src/types/shared/account.types.d.ts.map +1 -0
  637. package/lib/typescript/{types → src/types}/shared/achCredit.types.d.ts +1 -0
  638. package/lib/typescript/src/types/shared/achCredit.types.d.ts.map +1 -0
  639. package/lib/typescript/src/types/shared/activity.types.d.ts +12 -0
  640. package/lib/typescript/src/types/shared/activity.types.d.ts.map +1 -0
  641. package/lib/typescript/{types → src/types}/shared/authorization.types.d.ts +1 -0
  642. package/lib/typescript/src/types/shared/authorization.types.d.ts.map +1 -0
  643. package/lib/typescript/{types → src/types}/shared/bookPayment.types.d.ts +1 -0
  644. package/lib/typescript/src/types/shared/bookPayment.types.d.ts.map +1 -0
  645. package/lib/typescript/{types → src/types}/shared/card.types.d.ts +9 -0
  646. package/lib/typescript/src/types/shared/card.types.d.ts.map +1 -0
  647. package/lib/typescript/{types → src/types}/shared/checkDeposit.types.d.ts +1 -0
  648. package/lib/typescript/src/types/shared/checkDeposit.types.d.ts.map +1 -0
  649. package/lib/typescript/src/types/shared/error.types.d.ts +37 -0
  650. package/lib/typescript/src/types/shared/error.types.d.ts.map +1 -0
  651. package/lib/typescript/{types → src/types}/shared/fonts.types.d.ts +1 -0
  652. package/lib/typescript/src/types/shared/fonts.types.d.ts.map +1 -0
  653. package/lib/typescript/{types → src/types}/shared/index.d.ts +3 -0
  654. package/lib/typescript/src/types/shared/index.d.ts.map +1 -0
  655. package/lib/typescript/src/types/shared/multipleCards.types.d.ts +7 -0
  656. package/lib/typescript/src/types/shared/multipleCards.types.d.ts.map +1 -0
  657. package/lib/typescript/src/types/shared/onLoadResponse.types.d.ts +6 -0
  658. package/lib/typescript/src/types/shared/onLoadResponse.types.d.ts.map +1 -0
  659. package/lib/typescript/{types → src/types}/shared/payments.types.d.ts +5 -0
  660. package/lib/typescript/src/types/shared/payments.types.d.ts.map +1 -0
  661. package/lib/typescript/src/types/shared/repayment.types.d.ts +12 -0
  662. package/lib/typescript/src/types/shared/repayment.types.d.ts.map +1 -0
  663. package/lib/typescript/{types → src/types}/shared/transactions.types.d.ts +1 -0
  664. package/lib/typescript/src/types/shared/transactions.types.d.ts.map +1 -0
  665. package/lib/typescript/{types → src/types}/shared/types.d.ts +1 -0
  666. package/lib/typescript/src/types/shared/types.d.ts.map +1 -0
  667. package/lib/typescript/{types → src/types}/shared/versioning.types.d.ts +6 -1
  668. package/lib/typescript/src/types/shared/versioning.types.d.ts.map +1 -0
  669. package/lib/typescript/{types → src/types}/shared/wallet.types.d.ts +1 -0
  670. package/lib/typescript/src/types/shared/wallet.types.d.ts.map +1 -0
  671. package/lib/typescript/src/unitSdkManager/UnitSdk.api.d.ts +2 -0
  672. package/lib/typescript/src/unitSdkManager/UnitSdk.api.d.ts.map +1 -0
  673. package/lib/typescript/{unitSdkManager → src/unitSdkManager}/UnitSdk.constants.d.ts +1 -0
  674. package/lib/typescript/src/unitSdkManager/UnitSdk.constants.d.ts.map +1 -0
  675. package/lib/typescript/{unitSdkManager → src/unitSdkManager}/UnitSdkManager.d.ts +5 -8
  676. package/lib/typescript/src/unitSdkManager/UnitSdkManager.d.ts.map +1 -0
  677. package/lib/typescript/{unitSdkManager → src/unitSdkManager}/UnitSdkManager.utils.internal.d.ts +1 -0
  678. package/lib/typescript/src/unitSdkManager/UnitSdkManager.utils.internal.d.ts.map +1 -0
  679. package/lib/typescript/{unitSdkManager → src/unitSdkManager}/unitUiManager/unitUiManager.d.ts +1 -0
  680. package/lib/typescript/src/unitSdkManager/unitUiManager/unitUiManager.d.ts.map +1 -0
  681. package/lib/typescript/src/utils/AppInfo.d.ts +5 -0
  682. package/lib/typescript/src/utils/AppInfo.d.ts.map +1 -0
  683. package/lib/typescript/src/utils/SDKInfo.d.ts +2 -0
  684. package/lib/typescript/src/utils/SDKInfo.d.ts.map +1 -0
  685. package/lib/typescript/{utils → src/utils}/webVersioningStrategy.utils.d.ts +1 -0
  686. package/lib/typescript/src/utils/webVersioningStrategy.utils.d.ts.map +1 -0
  687. package/lib/typescript/{webComponent → src/webComponent}/WebComponent.d.ts +1 -0
  688. package/lib/typescript/src/webComponent/WebComponent.d.ts.map +1 -0
  689. package/lib/typescript/{webComponent → src/webComponent}/WebComponent.utils.d.ts +4 -0
  690. package/lib/typescript/src/webComponent/WebComponent.utils.d.ts.map +1 -0
  691. package/lib/typescript/{webComponent → src/webComponent}/html.d.ts +1 -0
  692. package/lib/typescript/src/webComponent/html.d.ts.map +1 -0
  693. package/package.json +26 -38
  694. package/react-native-unit-components.podspec +9 -2
  695. package/src/components/UNACHCreditComponent/UNACHCreditComponent.tsx +28 -6
  696. package/src/components/UNACHCreditComponent/UNACHCreditComponent.utils.ts +13 -2
  697. package/src/components/UNACHDebitComponent/UNACHDebitComponent.tsx +28 -6
  698. package/src/components/UNACHDebitComponent/UNACHDebitComponent.utils.ts +12 -2
  699. package/src/components/UNAccountComponent/UNAccountComponent.tsx +62 -23
  700. package/src/components/UNAccountComponent/UNAccountComponent.utils.ts +9 -6
  701. package/src/components/UNActivityComponent/UNActivityComponent.tsx +60 -22
  702. package/src/components/UNActivityComponent/UNActivityComponent.utils.ts +6 -1
  703. package/src/components/UNActivityComponent/index.ts +1 -1
  704. package/src/components/UNBookPaymentComponent/UNBookPaymentComponent.tsx +23 -5
  705. package/src/components/UNBookPaymentComponent/UNBookPaymentComponent.utils.ts +11 -4
  706. package/src/components/UNBottomSheetComponent/UNBottomSheetComponent.constants.ts +20 -1
  707. package/src/components/UNBottomSheetComponent/UNBottomSheetComponent.tsx +184 -265
  708. package/src/components/UNBottomSheetComponent/UNBottomSheetComponent.utils.ts +5 -6
  709. package/src/components/UNBottomSheetComponent/components/UNBottomSheetNativeComponent/UNBottomSheetNativeComponent.tsx +60 -0
  710. package/src/components/UNBottomSheetComponent/components/UNBottomSheetNativeComponent/index.ts +1 -0
  711. package/src/components/UNBottomSheetComponent/components/UNBottomSheetSlotComponent/UNBottomSheetSlotComponent.tsx +181 -0
  712. package/src/components/UNBottomSheetComponent/components/UNBottomSheetSlotComponent/index.ts +1 -0
  713. package/src/components/UNBottomSheetComponent/components/index.ts +2 -1
  714. package/src/components/UNCardComponent/UNCardComponent.tsx +14 -11
  715. package/src/components/UNCardComponent/UNCardComponent.utils.ts +2 -0
  716. package/src/components/UNCheckDepositComponent/UNCheckDepositComponent.tsx +16 -3
  717. package/src/components/UNCheckDepositComponent/UNCheckDepositComponent.utils.ts +8 -2
  718. package/src/components/UNMultipleCardsComponent/UNMultipleCardsComponent.tsx +120 -0
  719. package/src/components/UNMultipleCardsComponent/UNMultipleCardsComponent.utils.ts +37 -0
  720. package/src/components/UNMultipleCardsComponent/index.ts +3 -0
  721. package/src/components/UNNextRepaymentComponent/UNNextRepaymentComponent.tsx +80 -0
  722. package/src/components/UNNextRepaymentComponent/UNNextRepaymentComponent.utils.ts +10 -0
  723. package/src/components/UNNextRepaymentComponent/index.ts +3 -0
  724. package/src/components/UNProgramDetailsComponent/UNProgramDetailsComponent.tsx +77 -0
  725. package/src/components/UNProgramDetailsComponent/UNProgramDetailsComponent.utils.ts +9 -0
  726. package/src/components/UNProgramDetailsComponent/index.ts +3 -0
  727. package/src/components/index.ts +3 -0
  728. package/src/flows/UNFlows.ts +1 -1
  729. package/src/flows/card/UNCardFlows.ts +19 -14
  730. package/src/helpers/BottomSheet/BottomSheet.styles.ts +7 -8
  731. package/src/helpers/BottomSheet/BottomSheet.tsx +44 -39
  732. package/src/helpers/pushProvisioningService/helpers.ts +31 -0
  733. package/src/helpers/pushProvisioningService/hooks/useCardWallet.ts +38 -8
  734. package/src/helpers/pushProvisioningService/startProvisioning.ts +3 -5
  735. package/src/helpers/pushProvisioningService/types.ts +52 -0
  736. package/src/helpers/store/helpers.tsx +1 -1
  737. package/src/hooks/useListenerToEvent.ts +32 -0
  738. package/src/messages/nativeMessages/bottomSheetMessage.ts +7 -7
  739. package/src/messages/webMessages/index.ts +3 -0
  740. package/src/messages/webMessages/multipleCardsMessage.ts +9 -0
  741. package/src/messages/webMessages/onLoadMessage.ts +16 -4
  742. package/src/messages/webMessages/paymentsMessage.ts +3 -1
  743. package/src/messages/webMessages/unitMessages.ts +19 -13
  744. package/src/nativeComponents/UNAddToWallet/UNAddToWalletComponent/UNAddToWalletComponent.tsx +93 -0
  745. package/src/nativeComponents/UNAddToWallet/UNAddToWalletComponent/UNAddToWalletComponent.utils.ts +15 -0
  746. package/src/nativeComponents/UNAddToWallet/UNAddToWalletComponent/index.ts +1 -0
  747. package/src/networking/requests/UNWalletPayloadRequest.ts +25 -4
  748. package/src/scripts/html/bodyScript.ts +36 -8
  749. package/src/slices/BottomSheetSlice.ts +72 -0
  750. package/src/slices/ConfigurationSlice.ts +31 -0
  751. package/src/slices/SharedEventsSlice.ts +88 -0
  752. package/src/store/store.ts +8 -2
  753. package/src/styles/variables.ts +5 -2
  754. package/src/types/internal/bottomSheet.types.ts +51 -7
  755. package/src/types/internal/errorHelpers.ts +22 -0
  756. package/src/types/internal/webComponent.types.ts +3 -1
  757. package/src/types/shared/account.types.ts +6 -0
  758. package/src/types/shared/activity.types.ts +7 -2
  759. package/src/types/shared/card.types.ts +10 -1
  760. package/src/types/shared/error.types.ts +38 -0
  761. package/src/types/shared/index.ts +2 -0
  762. package/src/types/shared/multipleCards.types.ts +8 -0
  763. package/src/types/shared/onLoadResponse.types.ts +2 -12
  764. package/src/types/shared/payments.types.ts +10 -5
  765. package/src/types/shared/repayment.types.ts +12 -0
  766. package/src/types/shared/versioning.types.ts +7 -1
  767. package/src/unitSdkManager/UnitSdk.api.ts +5 -8
  768. package/src/unitSdkManager/UnitSdk.constants.ts +1 -1
  769. package/src/unitSdkManager/UnitSdkManager.ts +8 -20
  770. package/src/utils/AppInfo.ts +40 -0
  771. package/src/utils/SDKInfo.ts +5 -0
  772. package/src/utils/webVersioningStrategy.utils.ts +7 -0
  773. package/src/webComponent/WebComponent.tsx +52 -37
  774. package/src/webComponent/WebComponent.utils.ts +17 -0
  775. package/android/src/main/java/com/unitreactnativecomponents/getapplicationid/UNAppInfoModule.kt +0 -35
  776. package/ios/UNAppInfo/UNAppInfo.swift +0 -23
  777. package/lib/commonjs/components/UNBottomSheetComponent/components/UNAddToWalletBottomSheetItem/UNAddToWalletBottomSheetItem.js +0 -86
  778. package/lib/commonjs/components/UNBottomSheetComponent/components/UNAddToWalletBottomSheetItem/UNAddToWalletBottomSheetItem.js.map +0 -1
  779. package/lib/commonjs/components/UNBottomSheetComponent/components/UNAddToWalletBottomSheetItem/UNAddToWalletBottomSheetItem.styles.js.map +0 -1
  780. package/lib/commonjs/components/UNBottomSheetComponent/components/UNAddToWalletBottomSheetItem/index.js +0 -17
  781. package/lib/commonjs/components/UNBottomSheetComponent/components/UNAddToWalletBottomSheetItem/index.js.map +0 -1
  782. package/lib/commonjs/components/utils/nativeModulesInfo.js +0 -20
  783. package/lib/commonjs/components/utils/nativeModulesInfo.js.map +0 -1
  784. package/lib/commonjs/helpers/EventBus.js +0 -58
  785. package/lib/commonjs/helpers/EventBus.js.map +0 -1
  786. package/lib/commonjs/hooks/listenerToBus.js +0 -34
  787. package/lib/commonjs/hooks/listenerToBus.js.map +0 -1
  788. package/lib/commonjs/nativeComponent/UnitAddToWalletButton.js.map +0 -1
  789. package/lib/module/components/UNBottomSheetComponent/components/UNAddToWalletBottomSheetItem/UNAddToWalletBottomSheetItem.js +0 -76
  790. package/lib/module/components/UNBottomSheetComponent/components/UNAddToWalletBottomSheetItem/UNAddToWalletBottomSheetItem.js.map +0 -1
  791. package/lib/module/components/UNBottomSheetComponent/components/UNAddToWalletBottomSheetItem/UNAddToWalletBottomSheetItem.styles.js.map +0 -1
  792. package/lib/module/components/UNBottomSheetComponent/components/UNAddToWalletBottomSheetItem/index.js +0 -2
  793. package/lib/module/components/UNBottomSheetComponent/components/UNAddToWalletBottomSheetItem/index.js.map +0 -1
  794. package/lib/module/components/utils/nativeModulesInfo.js +0 -13
  795. package/lib/module/components/utils/nativeModulesInfo.js.map +0 -1
  796. package/lib/module/helpers/EventBus.js +0 -51
  797. package/lib/module/helpers/EventBus.js.map +0 -1
  798. package/lib/module/hooks/listenerToBus.js +0 -25
  799. package/lib/module/hooks/listenerToBus.js.map +0 -1
  800. package/lib/module/nativeComponent/UnitAddToWalletButton.js.map +0 -1
  801. package/lib/typescript/components/UNActivityComponent/UNActivityComponent.d.ts +0 -13
  802. package/lib/typescript/components/UNActivityComponent/index.d.ts +0 -1
  803. package/lib/typescript/components/UNBottomSheetComponent/UNBottomSheetComponent.constants.d.ts +0 -1
  804. package/lib/typescript/components/UNBottomSheetComponent/UNBottomSheetComponent.d.ts +0 -8
  805. package/lib/typescript/components/UNBottomSheetComponent/components/UNAddToWalletBottomSheetItem/UNAddToWalletBottomSheetItem.d.ts +0 -10
  806. package/lib/typescript/components/UNBottomSheetComponent/components/UNAddToWalletBottomSheetItem/index.d.ts +0 -1
  807. package/lib/typescript/components/UNBottomSheetComponent/components/index.d.ts +0 -1
  808. package/lib/typescript/components/utils/nativeModulesInfo.d.ts +0 -1
  809. package/lib/typescript/helpers/EventBus.d.ts +0 -13
  810. package/lib/typescript/hooks/listenerToBus.d.ts +0 -7
  811. package/lib/typescript/messages/nativeMessages/bottomSheetMessage.d.ts +0 -9
  812. package/lib/typescript/messages/webMessages/paymentsMessage.d.ts +0 -3
  813. package/lib/typescript/store/index.d.ts +0 -1
  814. package/lib/typescript/store/store.d.ts +0 -6
  815. package/lib/typescript/types/internal/bottomSheet.types.d.ts +0 -35
  816. package/lib/typescript/types/shared/activity.types.d.ts +0 -7
  817. package/lib/typescript/types/shared/onLoadResponse.types.d.ts +0 -14
  818. package/lib/typescript/unitSdkManager/UnitSdk.api.d.ts +0 -3
  819. package/src/components/UNBottomSheetComponent/components/UNAddToWalletBottomSheetItem/UNAddToWalletBottomSheetItem.tsx +0 -104
  820. package/src/components/UNBottomSheetComponent/components/UNAddToWalletBottomSheetItem/index.ts +0 -1
  821. package/src/components/utils/nativeModulesInfo.ts +0 -11
  822. package/src/helpers/EventBus.ts +0 -58
  823. package/src/hooks/listenerToBus.ts +0 -31
  824. /package/lib/commonjs/{components/UNBottomSheetComponent/components/UNAddToWalletBottomSheetItem → nativeComponents/UNAddToWallet/UNAddToWalletComponent}/UNAddToWalletBottomSheetItem.styles.js +0 -0
  825. /package/lib/module/{components/UNBottomSheetComponent/components/UNAddToWalletBottomSheetItem → nativeComponents/UNAddToWallet/UNAddToWalletComponent}/UNAddToWalletBottomSheetItem.styles.js +0 -0
  826. /package/lib/module/{nativeComponent → nativeComponents/UNAddToWallet}/UnitAddToWalletButton.js +0 -0
  827. /package/src/{components/UNBottomSheetComponent/components/UNAddToWalletBottomSheetItem → nativeComponents/UNAddToWallet/UNAddToWalletComponent}/UNAddToWalletBottomSheetItem.styles.ts +0 -0
  828. /package/src/{nativeComponent → nativeComponents/UNAddToWallet}/UnitAddToWalletButton.tsx +0 -0
@@ -1,31 +1,38 @@
1
- import React, { useEffect, useImperativeHandle, useRef, useState } from 'react';
1
+ import React, { useImperativeHandle, useRef, useState } from 'react';
2
2
  import { View } from 'react-native';
3
3
  import { PageMessage } from '../..//messages/webMessages/pageMessage';
4
- import { UnitMessage } from '../../messages/webMessages/unitMessages';
5
- import EventBus from '../../helpers/EventBus';
4
+ import { UnitMessage, UnitRequestRefreshEventTypes } from '../../messages/webMessages/unitMessages';
6
5
  import { WebComponent } from '../../webComponent/WebComponent';
7
6
  import { getAccountParams, getAccountScript, injectOpenActionsMenuScript, injectRefreshEventIfNeeded, injectRequestAccountActionScript } from './UNAccountComponent.utils';
8
- import { useListenerToBus } from '../../hooks/listenerToBus';
9
7
  import { AccountMessage } from '../../messages/webMessages/accountMessage';
10
8
  import { RESPONSE_KEYS } from '../../messages/webMessages/onLoadMessage';
11
9
  import { BottomSheetRenderingType } from '../../types/internal/bottomSheet.types';
12
10
  import { PresentationMode, WebComponentType } from '../../types/internal/webComponent.types';
13
11
  import { BottomSheetNativeMessage } from '../../messages/nativeMessages/bottomSheetMessage';
14
12
  import { withReduxStoreAndRefForwarding } from '../../helpers/store/helpers';
15
- export let UNAccountAction;
16
- (function (UNAccountAction) {
13
+ import { useDispatch } from 'react-redux';
14
+ import { setEvent } from '../../slices/SharedEventsSlice';
15
+ import { useListenerToEvent } from '../../hooks/useListenerToEvent';
16
+ export let UNAccountAction = /*#__PURE__*/function (UNAccountAction) {
17
17
  UNAccountAction["List"] = "account-list";
18
18
  UNAccountAction["Menu"] = "account-menu";
19
- })(UNAccountAction || (UNAccountAction = {}));
19
+ return UNAccountAction;
20
+ }({});
20
21
  const UNAccountComponent = /*#__PURE__*/React.forwardRef(function UNAccountComponent(props, accountRef) {
22
+ const dispatch = useDispatch();
21
23
  const [height, setHeight] = useState(0);
22
- const [requestRefreshEvent, setRequestRefreshEvent] = useState(null);
23
24
  const webRef = useRef(null);
25
+ // currentAccountId is used to store the current account id for the "imperative" refresh event.
26
+ const accountIdRef = useRef(props.accountId);
24
27
  const handleAccountChanged = account => {
28
+ accountIdRef.current = account.id;
25
29
  props.onAccountChanged && props.onAccountChanged(account);
26
30
  };
27
31
  const requestRefresh = data => {
28
- setRequestRefreshEvent(data);
32
+ injectRefreshEventIfNeeded(webRef.current, data);
33
+ };
34
+ const handleRequestLeftToSpendDetails = accountData => {
35
+ props.onRequestLeftToSpendDetails && props.onRequestLeftToSpendDetails(accountData);
29
36
  };
30
37
  const handleUnitOnLoad = response => {
31
38
  if (!props.onLoad) {
@@ -37,29 +44,39 @@ const UNAccountComponent = /*#__PURE__*/React.forwardRef(function UNAccountCompo
37
44
  }
38
45
  if (RESPONSE_KEYS.account in response) {
39
46
  // AccountsOnLoadResponse;
40
- props.onLoad(response[RESPONSE_KEYS.account]);
47
+ const accountResponse = response[RESPONSE_KEYS.account];
48
+ props.onLoad(accountResponse);
49
+ // if accountId is not provided, set the first account as current
50
+ if (!props.accountId && accountResponse.data && accountResponse.data.length > 0) {
51
+ accountIdRef.current = accountResponse.data[0].id;
52
+ }
41
53
  return;
42
54
  }
43
55
  console.error('On Load Error: unexpected response type.');
44
56
  return;
45
57
  };
46
- useListenerToBus({
58
+ useListenerToEvent({
47
59
  busEventKey: UnitMessage.UNIT_REQUEST_REFRESH,
48
60
  action: requestRefresh
49
61
  });
50
- useListenerToBus({
62
+ useListenerToEvent({
51
63
  busEventKey: AccountMessage.UNIT_ACCOUNT_CHANGED,
52
64
  action: handleAccountChanged
53
65
  });
54
- useEffect(() => {
55
- injectRefreshEventIfNeeded(webRef.current, requestRefreshEvent);
56
- }, [requestRefreshEvent]);
57
66
  useImperativeHandle(accountRef, () => ({
58
67
  openActionsMenu() {
59
68
  injectOpenActionsMenuScript(webRef.current);
60
69
  },
61
70
  openAction(action) {
62
71
  injectRequestAccountActionScript(webRef.current, action);
72
+ },
73
+ refresh() {
74
+ requestRefresh({
75
+ type: UnitRequestRefreshEventTypes.REQUEST_REFRESH_EVENT,
76
+ refEvent: undefined,
77
+ dependencies: [WebComponentType.account.valueOf()],
78
+ resourceId: accountIdRef.current
79
+ });
63
80
  }
64
81
  }));
65
82
  const handleMessage = message => {
@@ -74,16 +91,22 @@ const UNAccountComponent = /*#__PURE__*/React.forwardRef(function UNAccountCompo
74
91
  componentResourceId: props.accountId,
75
92
  requestRenderingEvent: message.details
76
93
  };
77
- const event = {
94
+ const data = {
78
95
  type: BottomSheetRenderingType.Slot,
79
96
  data: slotData
80
97
  };
81
- EventBus.Instance.event(BottomSheetNativeMessage.START_FLOW, event);
98
+ dispatch(setEvent({
99
+ key: BottomSheetNativeMessage.REQUEST_RENDERING,
100
+ data
101
+ }));
82
102
  break;
83
103
  }
84
104
  case PageMessage.PAGE_HEIGHT:
85
105
  setHeight(message.details.height);
86
106
  break;
107
+ case UnitMessage.UNIT_REQUEST_LEFT_TO_SPEND_DETAILS:
108
+ handleRequestLeftToSpendDetails(message.details);
109
+ break;
87
110
  }
88
111
  };
89
112
  return /*#__PURE__*/React.createElement(View, {
@@ -1 +1 @@
1
- {"version":3,"names":["React","useEffect","useImperativeHandle","useRef","useState","View","PageMessage","UnitMessage","EventBus","WebComponent","getAccountParams","getAccountScript","injectOpenActionsMenuScript","injectRefreshEventIfNeeded","injectRequestAccountActionScript","useListenerToBus","AccountMessage","RESPONSE_KEYS","BottomSheetRenderingType","PresentationMode","WebComponentType","BottomSheetNativeMessage","withReduxStoreAndRefForwarding","UNAccountAction","UNAccountComponent","forwardRef","props","accountRef","height","setHeight","requestRefreshEvent","setRequestRefreshEvent","webRef","handleAccountChanged","account","onAccountChanged","requestRefresh","data","handleUnitOnLoad","response","onLoad","errors","console","error","busEventKey","UNIT_REQUEST_REFRESH","action","UNIT_ACCOUNT_CHANGED","current","openActionsMenu","openAction","handleMessage","message","type","UNIT_ON_LOAD","details","UNIT_REQUEST_RENDERING","slotData","componentName","componentResourceId","accountId","requestRenderingEvent","event","Slot","Instance","START_FLOW","PAGE_HEIGHT","createElement","style","width","ref","presentationMode","Default","params","script","theme","language","onMessage","isScrollable"],"sources":["UNAccountComponent.tsx"],"sourcesContent":["import React, { useEffect, useImperativeHandle, useRef, useState } from 'react';\nimport { View } from 'react-native';\nimport type WebView from 'react-native-webview';\nimport { HeightEvent, PageMessage } from '../..//messages/webMessages/pageMessage';\nimport { RequestRefreshEvent, RequestRenderingEvent, UnitMessage } from '../../messages/webMessages/unitMessages';\nimport EventBus from '../../helpers/EventBus';\nimport { WebComponent } from '../../webComponent/WebComponent';\nimport type { WebViewMessage } from '../../messages/webMessages';\nimport { getAccountParams, getAccountScript, injectOpenActionsMenuScript, injectRefreshEventIfNeeded, injectRequestAccountActionScript } from './UNAccountComponent.utils';\nimport type { UNError, UNOnLoadResponse, UNOnLoadResponseData } from '../../types/shared';\nimport { useListenerToBus } from '../../hooks/listenerToBus';\nimport type { UNAccountData } from '../../types/shared/account.types';\nimport { AccountMessage } from '../../messages/webMessages/accountMessage';\nimport { RESPONSE_KEYS, UnitOnLoadResponseEvent } from '../../messages/webMessages/onLoadMessage';\nimport type { UNAccountMenuAction } from '../../types/shared';\nimport { BottomSheetRenderingType, SlotRendering, type BottomSheetSlotData } from '../../types/internal/bottomSheet.types';\nimport { PresentationMode, WebComponentType } from '../../types/internal/webComponent.types';\nimport { BottomSheetNativeMessage } from '../../messages/nativeMessages/bottomSheetMessage';\nimport { withReduxStoreAndRefForwarding } from '../../helpers/store/helpers';\n\nexport interface UNAccountComponentProps {\n // inputs\n accountId?: string;\n customerToken: string;\n\n // ui\n theme?: string;\n language?: string;\n hideActionsMenuButton?: boolean;\n hideSelectionMenuButton?: boolean;\n\n // events\n onLoad?: (response: UNOnLoadResponse<[UNAccountData]>) => void;\n onAccountChanged?: (account: UNAccountData) => void;\n}\n\nexport interface UNAccountRef {\n openActionsMenu: () => void;\n openAction: (action: UNAccountMenuAction) => void;\n}\n\nexport enum UNAccountAction {\n List = 'account-list',\n Menu = 'account-menu'\n}\n\nconst UNAccountComponent = React.forwardRef<UNAccountRef, UNAccountComponentProps>(function UNAccountComponent(props, accountRef) {\n const [height, setHeight] = useState(0);\n\n const [requestRefreshEvent, setRequestRefreshEvent] = useState<RequestRefreshEvent | null>(null);\n\n const webRef = useRef<WebView>(null);\n\n const handleAccountChanged = (account: UNAccountData) => {\n props.onAccountChanged && props.onAccountChanged(account);\n };\n\n const requestRefresh = (data: RequestRefreshEvent) => {\n setRequestRefreshEvent(data);\n };\n\n const handleUnitOnLoad = (response: UnitOnLoadResponseEvent) => {\n if (!props.onLoad) {\n return;\n }\n\n if (RESPONSE_KEYS.errors in response) {\n props.onLoad(response as UNError);\n return;\n }\n\n if (RESPONSE_KEYS.account in response) {\n // AccountsOnLoadResponse;\n props.onLoad(response[RESPONSE_KEYS.account] as UNOnLoadResponseData<[UNAccountData]>);\n return;\n }\n\n console.error('On Load Error: unexpected response type.');\n return;\n };\n\n useListenerToBus({ busEventKey: UnitMessage.UNIT_REQUEST_REFRESH, action: requestRefresh });\n useListenerToBus({ busEventKey: AccountMessage.UNIT_ACCOUNT_CHANGED, action: handleAccountChanged });\n\n useEffect(() => {\n injectRefreshEventIfNeeded(webRef.current, requestRefreshEvent);\n }, [requestRefreshEvent]);\n\n useImperativeHandle(accountRef, () => ({\n openActionsMenu() {\n injectOpenActionsMenuScript(webRef.current);\n },\n openAction(action: UNAccountMenuAction) {\n injectRequestAccountActionScript(webRef.current, action);\n }\n }));\n\n const handleMessage = (message: WebViewMessage) => {\n switch (message.type) {\n case UnitMessage.UNIT_ON_LOAD:\n handleUnitOnLoad(message.details as UnitOnLoadResponseEvent);\n break;\n case UnitMessage.UNIT_REQUEST_RENDERING: {\n const slotData: BottomSheetSlotData = {\n componentName: WebComponentType.account,\n componentResourceId: props.accountId,\n requestRenderingEvent: message.details as RequestRenderingEvent\n };\n\n const event = {\n type: BottomSheetRenderingType.Slot,\n data: slotData\n } as SlotRendering;\n\n EventBus.Instance.event(BottomSheetNativeMessage.START_FLOW, event);\n break;\n }\n case PageMessage.PAGE_HEIGHT:\n setHeight((message.details as HeightEvent).height);\n break;\n }\n };\n\n return (\n <View style={{ height, width: '100%' }}>\n <WebComponent\n ref={webRef}\n type={WebComponentType.account}\n presentationMode={PresentationMode.Default}\n params={getAccountParams(props)}\n script={getAccountScript()}\n theme={props.theme}\n language={props.language}\n onMessage={message => handleMessage(message)}\n isScrollable={false}\n />\n </View>\n );\n});\n\nexport default withReduxStoreAndRefForwarding<UNAccountComponentProps, UNAccountRef>(UNAccountComponent);\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,SAAS,EAAEC,mBAAmB,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AAC/E,SAASC,IAAI,QAAQ,cAAc;AAEnC,SAAsBC,WAAW,QAAQ,yCAAyC;AAClF,SAAqDC,WAAW,QAAQ,yCAAyC;AACjH,OAAOC,QAAQ,MAAM,wBAAwB;AAC7C,SAASC,YAAY,QAAQ,iCAAiC;AAE9D,SAASC,gBAAgB,EAAEC,gBAAgB,EAAEC,2BAA2B,EAAEC,0BAA0B,EAAEC,gCAAgC,QAAQ,4BAA4B;AAE1K,SAASC,gBAAgB,QAAQ,2BAA2B;AAE5D,SAASC,cAAc,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AC4D,WAAW;QAC1BrC,SAAS,CAAEuB,OAAO,CAACG,OAAO,CAAiB3B,MAAM,CAAC;QAClD;IAAM;EAEZ,CAAC;EAED,oBACE5B,KAAA,CAAAmE,aAAA,CAAC9D,IAAI;IAAC+D,KAAK,EAAE;MAAExC,MAAM;MAAEyC,KAAK,EAAE;IAAO;EAAE,gBACrCrE,KAAA,CAAAmE,aAAA,CAAC1D,YAAY;IACX6D,GAAG,EAAEtC,MAAO;IACZqB,IAAI,EAAEjC,gBAAgB,CAACc,OAAQ;IAC/BqC,gBAAgB,EAAEpD,gBAAgB,CAACqD,OAAQ;IAC3CC,MAAM,EAAE/D,gBAAgB,CAACgB,KAAK,CAAE;IAChCgD,MAAM,EAAE/D,gBAAgB,EAAG;IAC3BgE,KAAK,EAAEjD,KAAK,CAACiD,KAAM;IACnBC,QAAQ,EAAElD,KAAK,CAACkD,QAAS;IACzBC,SAAS,EAAEzB,OAAO,IAAID,aAAa,CAACC,OAAO,CAAE;IAC7C0B,YAAY,EAAE;EAAM,EACpB,CACG;AAEX,CAAC,CAAC;AAEF,eAAexD,8BAA8B,CAAwCE,kBAAkB,CAAC"}
1
+ {"version":3,"names":["React","useImperativeHandle","useRef","useState","View","PageMessage","UnitMessage","UnitRequestRefreshEventTypes","WebComponent","getAccountParams","getAccountScript","injectOpenActionsMenuScript","injectRefreshEventIfNeeded","injectRequestAccountActionScript","AccountMessage","RESPONSE_KEYS","BottomSheetRenderingType","PresentationMode","WebComponentType","BottomSheetNativeMessage","withReduxStoreAndRefForwarding","useDispatch","setEvent","useListenerToEvent","UNAccountAction","UNAccountComponent","forwardRef","props","accountRef","dispatch","height","setHeight","webRef","accountIdRef","accountId","handleAccountChanged","account","current","id","onAccountChanged","requestRefresh","data","handleRequestLeftToSpendDetails","accountData","onRequestLeftToSpendDetails","handleUnitOnLoad","response","onLoad","errors","accountResponse","length","console","error","busEventKey","UNIT_REQUEST_REFRESH","action","UNIT_ACCOUNT_CHANGED","openActionsMenu","openAction","refresh","type","REQUEST_REFRESH_EVENT","refEvent","undefined","dependencies","valueOf","resourceId","handleMessage","message","UNIT_ON_LOAD","details","UNIT_REQUEST_RENDERING","slotData","componentName","componentResourceId","requestRenderingEvent","Slot","key","REQUEST_RENDERING","PAGE_HEIGHT","UNIT_REQUEST_LEFT_TO_SPEND_DETAILS","createElement","style","width","ref","presentationMode","Default","params","script","theme","language","onMessage","isScrollable"],"sourceRoot":"../../../../src","sources":["components/UNAccountComponent/UNAccountComponent.tsx"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,mBAAmB,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AACpE,SAASC,IAAI,QAAQ,cAAc;AAEnC,SAAsBC,WAAW,QAAQ,yCAAyC;AAClF,SAGEC,WAAW,EACXC,4BAA4B,QACvB,yCAAyC;AAChD,SAASC,YAAY,QAAQ,iCAAiC;AAE9D,SACEC,gBAAgB,EAChBC,gBAAgB,EAChBC,2BAA2B,EAC3BC,0BAA0B,EAC1BC,gCAAgC,QAC3B,4BAA4B;AAGnC,SAASC,cAAc,QAAQ,2CAA2C;AAC1E,SAASC,aAAa,QAAiC,0CAA0C;AAEjG,SACEC,wBAAwB,QAEnB,wCAAwC;AAE/C,SAASC,gBAAgB,EAAEC,gBAAgB,QAAQ,yCAAyC;AAC5F,SAASC,wBAAwB,QAAQ,kDAAkD;AAC3F,SAASC,8BAA8B,QAAQ,6BAA6B;AAC5E,SAASC,WAAW,QAAQ,aAAa;AACzC,SAASC,QAAQ,QAAQ,gCAAgC;AACzD,SAASC,kBAAkB,QAAQ,gCAAgC;AA4BnE,WAAYC,eAAe,0BAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAA,OAAfA,eAAe;AAAA;AAK3B,MAAMC,kBAAkB,gBAAGzB,KAAK,CAAC0B,UAAU,CAAwC,SAASD,kBAAkBA,CAACE,KAAK,EAAEC,UAAU,EAAE;EAEhI,MAAMC,QAAQ,GAAGR,WAAW,CAAC,CAAC;EAC9B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nCnC,IAAI,EAAE+B;UACR,CAAkB;UAElB3C,QAAQ,CAACP,QAAQ,CAAC;YAAEuD,GAAG,EAAE1D,wBAAwB,CAAC2D,iBAAiB;YAAErC;UAAK,CAAC,CAAC,CAAC;UAE7E;QACF;MACA,KAAKpC,WAAW,CAAC0E,WAAW;QAC1BhD,SAAS,CAAEqC,OAAO,CAACE,OAAO,CAAiBxC,MAAM,CAAC;QAClD;MACF,KAAKxB,WAAW,CAAC0E,kCAAkC;QACjDtC,+BAA+B,CAAC0B,OAAO,CAACE,OAA0B,CAAC;QACnE;IACJ;EACF,CAAC;EAED,oBACEtE,KAAA,CAAAiF,aAAA,CAAC7E,IAAI;IAAC8E,KAAK,EAAE;MAAEpD,MAAM;MAAEqD,KAAK,EAAE;IAAO;EAAE,gBACrCnF,KAAA,CAAAiF,aAAA,CAACzE,YAAY;IACX4E,GAAG,EAAEpD,MAAO;IACZ4B,IAAI,EAAE1C,gBAAgB,CAACkB,OAAQ;IAC/BiD,gBAAgB,EAAEpE,gBAAgB,CAACqE,OAAQ;IAC3CC,MAAM,EAAE9E,gBAAgB,CAACkB,KAAK,CAAE;IAChC6D,MAAM,EAAE9E,gBAAgB,CAAC,CAAE;IAC3B+E,KAAK,EAAE9D,KAAK,CAAC8D,KAAM;IACnBC,QAAQ,EAAE/D,KAAK,CAAC+D,QAAS;IACzBC,SAAS,EAAEvB,OAAO,IAAID,aAAa,CAACC,OAAO,CAAE;IAC7CwB,YAAY,EAAE;EAAM,CACrB,CACG,CAAC;AAEX,CAAC,CAAC;AAEF,eAAexE,8BAA8B,CAAwCK,kBAAkB,CAAC"}
@@ -1,32 +1,34 @@
1
1
  import { UNAccountAction } from './UNAccountComponent';
2
- import { UnitMessage } from '../../messages/webMessages/unitMessages';
3
2
  import { WebComponentType } from '../../types/internal/webComponent.types';
3
+ import { LISTENERS } from '../../scripts/html/bodyScript';
4
+ import { DISPATCH_REQUEST_REFRESH } from '../../scripts/html/bodyScript';
4
5
  export const getAccountParams = props => {
5
6
  const accountIdParam = props.accountId ? `account-id="${props.accountId}"` : '';
7
+ const menuItemsParam = props.menuItems ? `menu-items="${props.menuItems.join()}"` : '';
6
8
  return `
7
9
  customer-token="${props.customerToken}"
8
10
  ${accountIdParam}
9
11
  hide-actions-menu-button="${props.hideActionsMenuButton || false}"
10
12
  hide-selection-menu-button="${props.hideSelectionMenuButton || false}"
13
+ show-left-to-spend="${props.showLeftToSpend || false}"
14
+ ${menuItemsParam}
11
15
  `;
12
16
  };
13
17
  export const getAccountScript = () => {
14
18
  return `
15
- const dispatchRefreshEvent = (details) => {
16
- const event = new CustomEvent("${UnitMessage.UNIT_REQUEST_REFRESH}",{ detail: JSON.parse(details) })
17
- window.dispatchEvent(event)
18
- }
19
+ ${DISPATCH_REQUEST_REFRESH}
20
+ ${LISTENERS.unitRequestLeftToSpendDetails}
19
21
  `;
20
22
  };
21
23
  export const injectOpenActionsMenuScript = currentWeb => {
22
- currentWeb === null || currentWeb === void 0 ? void 0 : currentWeb.injectJavaScript(`dispatchOpenActionsMenu('${WebComponentType.account}')`);
24
+ currentWeb?.injectJavaScript(`dispatchOpenActionsMenu('${WebComponentType.account}')`);
23
25
  };
24
26
  export const injectRequestAccountActionScript = (currentWeb, action) => {
25
- currentWeb === null || currentWeb === void 0 ? void 0 : currentWeb.injectJavaScript(`dispatchRequestAccountAction('${action}')`);
27
+ currentWeb?.injectJavaScript(`dispatchRequestAccountAction('${action}')`);
26
28
  };
27
29
  export const injectRefreshEventIfNeeded = (currentWeb, requestRefreshEvent) => {
28
30
  if (requestRefreshEvent && requestRefreshEvent.dependencies.includes(WebComponentType.account.valueOf())) {
29
- currentWeb === null || currentWeb === void 0 ? void 0 : currentWeb.injectJavaScript(`dispatchRefreshEvent('${JSON.stringify(requestRefreshEvent)}')`);
31
+ currentWeb?.injectJavaScript(`dispatchRefreshEvent('${JSON.stringify(requestRefreshEvent)}')`);
30
32
  }
31
33
  };
32
34
  export const getAccountActionType = requestRendering => {
@@ -1 +1 @@
1
- {"version":3,"names":["UNAccountAction","UnitMessage","WebComponentType","getAccountParams","props","accountIdParam","accountId","customerToken","hideActionsMenuButton","hideSelectionMenuButton","getAccountScript","UNIT_REQUEST_REFRESH","injectOpenActionsMenuScript","currentWeb","injectJavaScript","account","injectRequestAccountActionScript","action","injectRefreshEventIfNeeded","requestRefreshEvent","dependencies","includes","valueOf","JSON","stringify","getAccountActionType","requestRendering","data","nativeComponent","List","Menu"],"sources":["UNAccountComponent.utils.ts"],"sourcesContent":["import { UNAccountAction, UNAccountComponentProps } from './UNAccountComponent';\nimport { RequestRefreshEvent, RequestRenderingEvent, UnitMessage } from '../../messages/webMessages/unitMessages';\nimport type WebView from 'react-native-webview';\nimport type { UNAccountMenuAction } from 'src/types/shared';\nimport { WebComponentType } from '../../types/internal/webComponent.types';\n\nexport const getAccountParams = (props: UNAccountComponentProps) => {\n const accountIdParam = props.accountId ? `account-id=\"${props.accountId}\"` : '';\n return `\n customer-token=\"${props.customerToken}\"\n ${accountIdParam}\n hide-actions-menu-button=\"${props.hideActionsMenuButton || false}\"\n hide-selection-menu-button=\"${props.hideSelectionMenuButton || false}\"\n `;\n};\n\nexport const getAccountScript = () => {\n return `\n const dispatchRefreshEvent = (details) => {\n const event = new CustomEvent(\"${UnitMessage.UNIT_REQUEST_REFRESH}\",{ detail: JSON.parse(details) })\n window.dispatchEvent(event)\n }\n `;\n};\n\nexport const injectOpenActionsMenuScript = (currentWeb: WebView | null) => {\n currentWeb?.injectJavaScript(`dispatchOpenActionsMenu('${WebComponentType.account}')`);\n};\n\nexport const injectRequestAccountActionScript = (currentWeb: WebView | null, action: UNAccountMenuAction) => {\n currentWeb?.injectJavaScript(`dispatchRequestAccountAction('${action}')`);\n};\n\nexport const injectRefreshEventIfNeeded = (currentWeb: WebView | null, requestRefreshEvent: RequestRefreshEvent | null) => {\n if (requestRefreshEvent && requestRefreshEvent.dependencies.includes(WebComponentType.account.valueOf())) {\n currentWeb?.injectJavaScript(`dispatchRefreshEvent('${JSON.stringify(requestRefreshEvent)}')`);\n }\n};\n\nexport const getAccountActionType = (requestRendering: RequestRenderingEvent) => {\n return requestRendering.data.nativeComponent.includes(UNAccountAction.List) ? UNAccountAction.List : UNAccountAction.Menu;\n};\n"],"mappings":"AAAA,SAASA,eAAe,QAAiC,sBAAsB;AAC/E,SAAqDC,WAAW,QAAQ,yCAAyC;AAGjH,SAASC,gBAAgB,QAAQ,yCAAyC;AAE1E,OAAO,MAAMC,gBAAgB,GAAIC,KAA8B,IAAK;EAClE,MAAMC,cAAc,GAAGD,KAAK,CAACE,SAAS,GAAI,eAAcF,KAAK,CAACE,SAAU,GAAE,GAAG,EAAE;EAC/E,OAAQ;AACV,sBAAsBF,KAAK,CAACG,aAAc;AAC1C,MAAMF,cAAe;AACrB,gCAAgCD,KAAK,CAACI,qBAAqB,IAAI,KAAM;AACrE,kCAAkCJ,KAAK,CAACK,uBAAuB,IAAI,KAAM;AACzE,GAAG;AACH,CAAC;AAED,OAAO,MAAMC,gBAAgB,GAAGA,CAAA,KAAM;EACpC,OAAQ;AACV;AACA,qCAAqCT,WAAW,CAACU,oBAAqB;AACtE;AACA;AACA,GAAG;AACH,CAAC;AAED,OAAO,MAAMC,2BAA2B,GAAIC,UAA0B,IAAK;EACzEA,UAAU,aAAVA,UAAU,uBAAVA,UAAU,CAAEC,gBAAgB,CAAE,4BAA2BZ,gBAAgB,CAACa,OAAQ,IAAG,CAAC;AACxF,CAAC;AAED,OAAO,MAAMC,gCAAgC,GAAGA,CAACH,UAA0B,EAAEI,MAA2B,KAAK;EAC3GJ,UAAU,aAAVA,UAAU,uBAAVA,UAAU,CAAEC,gBAAgB,CAAE,iCAAgCG,MAAO,IAAG,CAAC;AAC3E,CAAC;AAED,OAAO,MAAMC,0BAA0B,GAAGA,CAACL,UAA0B,EAAEM,mBAA+C,KAAK;EACzH,IAAIA,mBAAmB,IAAIA,mBAAmB,CAACC,YAAY,CAACC,QAAQ,CAACnB,gBAAgB,CAACa,OAAO,CAACO,OAAO,EAAE,CAAC,EAAE;IACxGT,UAAU,aAAVA,UAAU,uBAAVA,UAAU,CAAEC,gBAAgB,CAAE,yBAAwBS,IAAI,CAACC,SAAS,CAACL,mBAAmB,CAAE,IAAG,CAAC;EAChG;AACF,CAAC;AAED,OAAO,MAAMM,oBAAoB,GAAIC,gBAAuC,IAAK;EAC/E,OAAOA,gBAAgB,CAACC,IAAI,CAACC,eAAe,CAACP,QAAQ,CAACrB,eAAe,CAAC6B,IAAI,CAAC,GAAG7B,eAAe,CAAC6B,IAAI,GAAG7B,eAAe,CAAC8B,IAAI;AAC3H,CAAC"}
1
+ {"version":3,"names":["UNAccountAction","WebComponentType","LISTENERS","DISPATCH_REQUEST_REFRESH","getAccountParams","props","accountIdParam","accountId","menuItemsParam","menuItems","join","customerToken","hideActionsMenuButton","hideSelectionMenuButton","showLeftToSpend","getAccountScript","unitRequestLeftToSpendDetails","injectOpenActionsMenuScript","currentWeb","injectJavaScript","account","injectRequestAccountActionScript","action","injectRefreshEventIfNeeded","requestRefreshEvent","dependencies","includes","valueOf","JSON","stringify","getAccountActionType","requestRendering","data","nativeComponent","List","Menu"],"sourceRoot":"../../../../src","sources":["components/UNAccountComponent/UNAccountComponent.utils.ts"],"mappings":"AAAA,SAASA,eAAe,QAAiC,sBAAsB;AAI/E,SAASC,gBAAgB,QAAQ,yCAAyC;AAC1E,SAASC,SAAS,QAAQ,+BAA+B;AACzD,SAASC,wBAAwB,QAAQ,+BAA+B;AAExE,OAAO,MAAMC,gBAAgB,GAAIC,KAA8B,IAAK;EAClE,MAAMC,cAAc,GAAGD,KAAK,CAACE,SAAS,GAAI,eAAcF,KAAK,CAACE,SAAU,GAAE,GAAG,EAAE;EAC/E,MAAMC,cAAc,GAAGH,KAAK,CAACI,SAAS,GAAI,eAAcJ,KAAK,CAACI,SAAS,CAACC,IAAI,CAAC,CAAE,GAAE,GAAG,EAAE;EACtF,OAAQ;AACV,sBAAsBL,KAAK,CAACM,aAAc;AAC1C,MAAML,cAAe;AACrB,gCAAgCD,KAAK,CAACO,qBAAqB,IAAI,KAAM;AACrE,kCAAkCP,KAAK,CAACQ,uBAAuB,IAAI,KAAM;AACzE,0BAA0BR,KAAK,CAACS,eAAe,IAAI,KAAM;AACzD,MAAMN,cAAe;AACrB,GAAG;AACH,CAAC;AAED,OAAO,MAAMO,gBAAgB,GAAGA,CAAA,KAAM;EACpC,OAAQ;AACV,MAAMZ,wBAAyB;AAC/B,MAAMD,SAAS,CAACc,6BAA8B;AAC9C,GAAG;AACH,CAAC;AAED,OAAO,MAAMC,2BAA2B,GAAIC,UAA0B,IAAK;EACzEA,UAAU,EAAEC,gBAAgB,CAAE,4BAA2BlB,gBAAgB,CAACmB,OAAQ,IAAG,CAAC;AACxF,CAAC;AAED,OAAO,MAAMC,gCAAgC,GAAGA,CAACH,UAA0B,EAAEI,MAA2B,KAAK;EAC3GJ,UAAU,EAAEC,gBAAgB,CAAE,iCAAgCG,MAAO,IAAG,CAAC;AAC3E,CAAC;AAED,OAAO,MAAMC,0BAA0B,GAAGA,CAACL,UAA0B,EAAEM,mBAA+C,KAAK;EACzH,IAAIA,mBAAmB,IAAIA,mBAAmB,CAACC,YAAY,CAACC,QAAQ,CAACzB,gBAAgB,CAACmB,OAAO,CAACO,OAAO,CAAC,CAAC,CAAC,EAAE;IACxGT,UAAU,EAAEC,gBAAgB,CAAE,yBAAwBS,IAAI,CAACC,SAAS,CAACL,mBAAmB,CAAE,IAAG,CAAC;EAChG;AACF,CAAC;AAED,OAAO,MAAMM,oBAAoB,GAAIC,gBAAuC,IAAK;EAC/E,OAAOA,gBAAgB,CAACC,IAAI,CAACC,eAAe,CAACP,QAAQ,CAAC1B,eAAe,CAACkC,IAAI,CAAC,GAAGlC,eAAe,CAACkC,IAAI,GAAGlC,eAAe,CAACmC,IAAI;AAC3H,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"names":["default","UNAccountComponent","UNAccountComponentProps","UNAccountRef"],"sources":["index.ts"],"sourcesContent":["export { default as UNAccountComponent, UNAccountComponentProps, UNAccountRef } from './UNAccountComponent';\n"],"mappings":"AAAA,SAASA,OAAO,IAAIC,kBAAkB,EAAEC,uBAAuB,EAAEC,YAAY,QAAQ,sBAAsB"}
1
+ {"version":3,"names":["default","UNAccountComponent","UNAccountComponentProps","UNAccountRef"],"sourceRoot":"../../../../src","sources":["components/UNAccountComponent/index.ts"],"mappings":"AAAA,SAASA,OAAO,IAAIC,kBAAkB,EAAEC,uBAAuB,EAAEC,YAAY,QAAQ,sBAAsB"}
@@ -1,32 +1,44 @@
1
- import React, { useRef, useState } from 'react';
1
+ import React, { useImperativeHandle, useRef, useState } from 'react';
2
2
  import { Dimensions, View } from 'react-native';
3
- import { UnitMessage } from '../../messages/webMessages/unitMessages';
4
- import { useListenerToBus } from '../../hooks/listenerToBus';
3
+ import { UnitMessage, UnitRequestRefreshEventTypes } from '../../messages/webMessages/unitMessages';
5
4
  import { PageMessage } from '../../messages/webMessages/pageMessage';
6
5
  import { WebComponent } from '../../webComponent/WebComponent';
7
6
  import { getActivityParams, getActivityScript, injectFiltersChanged, injectRefreshEventIfNeeded } from './UNActivityComponent.utils';
8
- import EventBus from '../../helpers/EventBus';
9
7
  import { RESPONSE_KEYS } from '../../messages/webMessages/onLoadMessage';
10
8
  import { ActivityMessage } from '../../messages/webMessages/activityMessage';
11
9
  import { BottomSheetRenderingType } from '../../types/internal/bottomSheet.types';
12
10
  import { PresentationMode, WebComponentType } from '../../types/internal/webComponent.types';
13
11
  import { BottomSheetNativeMessage } from '../../messages/nativeMessages/bottomSheetMessage';
14
- import { withReduxStore } from '../../helpers/store/helpers';
12
+ import { withReduxStoreAndRefForwarding } from '../../helpers/store/helpers';
13
+ import { setEvent } from '../../slices/SharedEventsSlice';
14
+ import { useDispatch } from 'react-redux';
15
+ import { useListenerToEvent } from '../../hooks/useListenerToEvent';
15
16
  const DEFAULT_HEIGHT = Dimensions.get('window').height * 0.5;
16
- const UNActivityComponent = props => {
17
+ const UNActivityComponent = /*#__PURE__*/React.forwardRef(function UNActivityComponent(props, activityRef) {
18
+ const dispatch = useDispatch();
17
19
  const webRef = useRef(null);
18
20
  const [defaultHeight, setDefaultHeight] = useState();
19
21
  const requestRefresh = data => {
20
22
  injectRefreshEventIfNeeded(webRef.current, data);
21
23
  };
24
+ useImperativeHandle(activityRef, () => ({
25
+ refresh() {
26
+ requestRefresh({
27
+ type: UnitRequestRefreshEventTypes.REQUEST_REFRESH_EVENT,
28
+ refEvent: undefined,
29
+ dependencies: [WebComponentType.activity.valueOf()],
30
+ resourceId: ''
31
+ });
32
+ }
33
+ }));
22
34
  const dispatchActivityFiltersChanged = query => {
23
35
  injectFiltersChanged(webRef.current, query);
24
36
  };
25
- useListenerToBus({
37
+ useListenerToEvent({
26
38
  busEventKey: UnitMessage.UNIT_REQUEST_REFRESH,
27
39
  action: requestRefresh
28
40
  });
29
- useListenerToBus({
41
+ useListenerToEvent({
30
42
  busEventKey: ActivityMessage.UNIT_ACTIVITY_FILTERS_CHANGED,
31
43
  action: dispatchActivityFiltersChanged
32
44
  });
@@ -38,11 +50,11 @@ const UNActivityComponent = props => {
38
50
  props.onLoad(response);
39
51
  return;
40
52
  }
41
- if (RESPONSE_KEYS.authorization in response && RESPONSE_KEYS.transactions in response) {
53
+ if (RESPONSE_KEYS.authorizations in response && RESPONSE_KEYS.transactions in response) {
42
54
  // ActivityOnLoadResponse;
43
55
  const activityOnLoad = {
44
56
  data: {
45
- [RESPONSE_KEYS.authorization]: response[RESPONSE_KEYS.authorization].data,
57
+ [RESPONSE_KEYS.authorizations]: response[RESPONSE_KEYS.authorizations].data,
46
58
  [RESPONSE_KEYS.transactions]: response[RESPONSE_KEYS.transactions].data
47
59
  }
48
60
  };
@@ -61,11 +73,14 @@ const UNActivityComponent = props => {
61
73
  componentResourceId: props.accountId,
62
74
  requestRenderingEvent: message.details
63
75
  };
64
- const event = {
76
+ const data = {
65
77
  type: BottomSheetRenderingType.Slot,
66
78
  data: slotData
67
79
  };
68
- EventBus.Instance.event(BottomSheetNativeMessage.START_FLOW, event);
80
+ dispatch(setEvent({
81
+ key: BottomSheetNativeMessage.REQUEST_RENDERING,
82
+ data
83
+ }));
69
84
  break;
70
85
  }
71
86
  case UnitMessage.UNIT_ON_LOAD:
@@ -100,6 +115,6 @@ const UNActivityComponent = props => {
100
115
  height: defaultHeight
101
116
  }
102
117
  }, renderActivityWebView());
103
- };
104
- export default withReduxStore(UNActivityComponent);
118
+ });
119
+ export default withReduxStoreAndRefForwarding(UNActivityComponent);
105
120
  //# sourceMappingURL=UNActivityComponent.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","useRef","useState","Dimensions","View","UnitMessage","useListenerToBus","PageMessage","WebComponent","getActivityParams","getActivityScript","injectFiltersChanged","injectRefreshEventIfNeeded","EventBus","RESPONSE_KEYS","ActivityMessage","BottomSheetRenderingType","PresentationMode","WebComponentType","BottomSheetNativeMessage","withReduxStore","DEFAULT_HEIGHT","get","height","UNActivityComponent","props","webRef","defaultHeight","setDefaultHeight","requestRefresh","data","current","dispatchActivityFiltersChanged","query","busEventKey","UNIT_REQUEST_REFRESH","action","UNIT_ACTIVITY_FILTERS_CHANGED","handleUnitOnLoad","response","onLoad","errors","authorization","transactions","activityOnLoad","console","error","handleWebViewMessage","message","type","UNIT_REQUEST_RENDERING","slotData","componentName","activity","componentResourceId","accountId","requestRenderingEvent","details","event","Slot","Instance","START_FLOW","UNIT_ON_LOAD","PAGE_HEIGHT","currentHeight","renderActivityWebView","createElement","ref","presentationMode","Inherit","params","onMessage","nestedScrollEnabled","theme","language","script","style"],"sources":["UNActivityComponent.tsx"],"sourcesContent":["import React, { useRef, useState } from 'react';\nimport { Dimensions, View } from 'react-native';\nimport { RequestRefreshEvent, RequestRenderingEvent, UnitMessage } from '../../messages/webMessages/unitMessages';\nimport { useListenerToBus } from '../../hooks/listenerToBus';\nimport type { WebViewMessage } from '../../messages/webMessages';\nimport { HeightEvent, PageMessage } from '../../messages/webMessages/pageMessage';\nimport type { UNError, UNOnLoadResponse, UNOnLoadResponseData } from '../../types/shared';\nimport { WebComponent } from '../../webComponent/WebComponent';\nimport { getActivityParams, getActivityScript, injectFiltersChanged, injectRefreshEventIfNeeded } from './UNActivityComponent.utils';\nimport type WebView from 'react-native-webview';\nimport EventBus from '../../helpers/EventBus';\nimport type { UNActivityOnLoadData } from '../../types/shared/activity.types';\nimport { RESPONSE_KEYS, UnitOnLoadResponseEvent } from '../../messages/webMessages/onLoadMessage';\nimport { ActivityMessage } from '../../messages/webMessages/activityMessage';\nimport { BottomSheetRenderingType, type BottomSheetSlotData, type SlotRendering } from '../../types/internal/bottomSheet.types';\nimport { PresentationMode, WebComponentType } from '../../types/internal/webComponent.types';\nimport { BottomSheetNativeMessage } from '../../messages/nativeMessages/bottomSheetMessage';\nimport { withReduxStore } from '../../helpers/store/helpers';\n\nconst DEFAULT_HEIGHT = Dimensions.get('window').height * 0.5;\nexport interface UNActivityComponentProps {\n // inputs\n customerToken: string;\n accountId?: string;\n queryFilter?: string\n\n // ui\n theme?: string;\n language?: string;\n hideFilterButton?: boolean;\n\n // event\n onLoad?: (response: UNOnLoadResponse<UNActivityOnLoadData>) => void;\n}\n\nconst UNActivityComponent = (props: UNActivityComponentProps) => {\n const webRef = useRef<WebView>(null);\n const [defaultHeight, setDefaultHeight] = useState<number>();\n\n const requestRefresh = (data: RequestRefreshEvent) => {\n injectRefreshEventIfNeeded(webRef.current, data);\n };\n\n const dispatchActivityFiltersChanged = (query: string) => {\n injectFiltersChanged(webRef.current, query);\n };\n\n useListenerToBus({ busEventKey: UnitMessage.UNIT_REQUEST_REFRESH, action: requestRefresh });\n useListenerToBus({ busEventKey: ActivityMessage.UNIT_ACTIVITY_FILTERS_CHANGED, action: dispatchActivityFiltersChanged });\n\n const handleUnitOnLoad = (response: UnitOnLoadResponseEvent) => {\n if (!props.onLoad) {\n return;\n }\n\n if (RESPONSE_KEYS.errors in response) {\n props.onLoad(response as UNError);\n return;\n }\n\n if (RESPONSE_KEYS.authorization in response && RESPONSE_KEYS.transactions in response) {\n // ActivityOnLoadResponse;\n const activityOnLoad: UNOnLoadResponseData<UNActivityOnLoadData> = {\n data: {\n [RESPONSE_KEYS.authorization]: response[RESPONSE_KEYS.authorization].data,\n [RESPONSE_KEYS.transactions]: response[RESPONSE_KEYS.transactions].data\n }\n };\n props.onLoad(activityOnLoad);\n return;\n }\n\n console.error('On Load Error: unexpected response type');\n return;\n };\n\n const handleWebViewMessage = (message: WebViewMessage) => {\n switch (message.type) {\n case UnitMessage.UNIT_REQUEST_RENDERING: {\n const slotData: BottomSheetSlotData = {\n componentName: WebComponentType.activity,\n componentResourceId: props.accountId,\n requestRenderingEvent: message.details as RequestRenderingEvent\n };\n\n const event = {\n type: BottomSheetRenderingType.Slot,\n data: slotData\n } as SlotRendering;\n\n EventBus.Instance.event(BottomSheetNativeMessage.START_FLOW, event);\n break;\n }\n case UnitMessage.UNIT_ON_LOAD:\n handleUnitOnLoad(message.details as UnitOnLoadResponseEvent);\n break;\n case PageMessage.PAGE_HEIGHT: {\n const currentHeight = (message.details as HeightEvent).height;\n currentHeight === 0 && setDefaultHeight(DEFAULT_HEIGHT);\n break;\n }\n }\n };\n\n const renderActivityWebView = () => {\n return (\n <WebComponent\n ref={webRef}\n type={WebComponentType.activity}\n presentationMode={PresentationMode.Inherit}\n params={getActivityParams(props)}\n onMessage={(message: WebViewMessage) => handleWebViewMessage(message)}\n nestedScrollEnabled={true}\n theme={props.theme}\n language={props.language}\n script={getActivityScript()}\n />\n );\n };\n\n if (!defaultHeight) {\n return renderActivityWebView();\n }\n\n return (\n <View style={{ height: defaultHeight }}>\n {renderActivityWebView()}\n </View>\n );\n};\n\nexport default withReduxStore<UNActivityComponentProps>(UNActivityComponent);\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AAC/C,SAASC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAC/C,SAAqDC,WAAW,QAAQ,yCAAyC;A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IhB,OAAO,CAACS,OAAO,CAAiBlC,MAAM;UAC7DyC,aAAa,KAAK,CAAC,IAAIpC,gBAAgB,CAACP,cAAc,CAAC;UACvD;QACF;IAAC;EAEL,CAAC;EAED,MAAM4C,qBAAqB,GAAGA,CAAA,KAAM;IAClC,oBACEjE,KAAA,CAAAkE,aAAA,CAAC1D,YAAY;MACX2D,GAAG,EAAEzC,MAAO;MACZuB,IAAI,EAAE/B,gBAAgB,CAACmC,QAAS;MAChCe,gBAAgB,EAAEnD,gBAAgB,CAACoD,OAAQ;MAC3CC,MAAM,EAAE7D,iBAAiB,CAACgB,KAAK,CAAE;MACjC8C,SAAS,EAAGvB,OAAuB,IAAKD,oBAAoB,CAACC,OAAO,CAAE;MACtEwB,mBAAmB,EAAE,IAAK;MAC1BC,KAAK,EAAEhD,KAAK,CAACgD,KAAM;MACnBC,QAAQ,EAAEjD,KAAK,CAACiD,QAAS;MACzBC,MAAM,EAAEjE,iBAAiB;IAAG,EAC5B;EAEN,CAAC;EAED,IAAI,CAACiB,aAAa,EAAE;IAClB,OAAOsC,qBAAqB,EAAE;EAChC;EAEA,oBACEjE,KAAA,CAAAkE,aAAA,CAAC9D,IAAI;IAACwE,KAAK,EAAE;MAAErD,MAAM,EAAEI;IAAc;EAAE,GACpCsC,qBAAqB,EAAE,CACnB;AAEX,CAAC;AAED,eAAe7C,cAAc,CAA2BI,mBAAmB,CAAC"}
1
+ {"version":3,"names":["React","useImperativeHandle","useRef","useState","Dimensions","View","UnitMessage","UnitRequestRefreshEventTypes","PageMessage","WebComponent","getActivityParams","getActivityScript","injectFiltersChanged","injectRefreshEventIfNeeded","RESPONSE_KEYS","ActivityMessage","BottomSheetRenderingType","PresentationMode","WebComponentType","BottomSheetNativeMessage","withReduxStoreAndRefForwarding","setEvent","useDispatch","useListenerToEvent","DEFAULT_HEIGHT","get","height","UNActivityComponent","forwardRef","props","activityRef","dispatch","webRef","defaultHeight","setDefaultHeight","requestRefresh","data","current","refresh","type","REQUEST_REFRESH_EVENT","refEvent","undefined","dependencies","activity","valueOf","resourceId","dispatchActivityFiltersChanged","query","busEventKey","UNIT_REQUEST_REFRESH","action","UNIT_ACTIVITY_FILTERS_CHANGED","handleUnitOnLoad","response","onLoad","errors","authorizations","transactions","activityOnLoad","console","error","handleWebViewMessage","message","UNIT_REQUEST_RENDERING","slotData","componentName","componentResourceId","accountId","requestRenderingEvent","details","Slot","key","REQUEST_RENDERING","UNIT_ON_LOAD","PAGE_HEIGHT","currentHeight","renderActivityWebView","createElement","ref","presentationMode","Inherit","params","onMessage","nestedScrollEnabled","theme","language","script","style"],"sourceRoot":"../../../../src","sources":["components/UNActivityComponent/UNActivityComponent.tsx"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,mBAAmB,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AACpE,SAASC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAC/C,SAGEC,WAAW,EACXC,4BAA4B,QACvB,yCAAyC;AAEhD,SAAsBC,WAAW,QAAQ,wCAAwC;AAEjF,SAASC,YAAY,QAAQ,iCAAiC;AAC9D,SACEC,iBAAiB,EACjBC,iBAAiB,EACjBC,oBAAoB,EACpBC,0BAA0B,QACrB,6BAA6B;AAGpC,SAASC,aAAa,QAAiC,0CAA0C;AACjG,SAASC,eAAe,QAAQ,4CAA4C;AAC5E,SACEC,wBAAwB,QACnB,wCAAwC;AAE/C,SAASC,gBAAgB,EAAEC,gBAAgB,QAAQ,yCAAyC;AAC5F,SAASC,wBAAwB,QAAQ,kDAAkD;AAC3F,SAASC,8BAA8B,QAAQ,6BAA6B;AAC5E,SAASC,QAAQ,QAAQ,gCAAgC;AACzD,SAASC,WAAW,QAAQ,aAAa;AACzC,SAASC,kBAAkB,QAAQ,gCAAgC;AAGnE,MAAMC,cAAc,GAAGpB,UAAU,CAACqB,GAAG,CAAC,QAAQ,CAAC,CAACC,MAAM,GAAG,GAAG;AAwB5D,MAAMC,mBAAmB,gBAAG3B,KAAK,CAAC4B,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MAAMqD,qBAAqB,GAAGA,CAAA,KAAM;IAClC,oBACE7E,KAAA,CAAA8E,aAAA,CAACrE,YAAY;MACXsE,GAAG,EAAE/C,MAAO;MACZO,IAAI,EAAErB,gBAAgB,CAAC0B,QAAS;MAChCoC,gBAAgB,EAAE/D,gBAAgB,CAACgE,OAAQ;MAC3CC,MAAM,EAAExE,iBAAiB,CAACmB,KAAK,CAAE;MACjCsD,SAAS,EAAGpB,OAAuB,IAAKD,oBAAoB,CAACC,OAAO,CAAE;MACtEqB,mBAAmB,EAAE,IAAK;MAC1BC,KAAK,EAAExD,KAAK,CAACwD,KAAM;MACnBC,QAAQ,EAAEzD,KAAK,CAACyD,QAAS;MACzBC,MAAM,EAAE5E,iBAAiB,CAAC;IAAE,CAC7B,CAAC;EAEN,CAAC;EAED,IAAI,CAACsB,aAAa,EAAE;IAClB,OAAO4C,qBAAqB,CAAC,CAAC;EAChC;EAEA,oBACE7E,KAAA,CAAA8E,aAAA,CAACzE,IAAI;IAACmF,KAAK,EAAE;MAAE9D,MAAM,EAAEO;IAAc;EAAE,GACpC4C,qBAAqB,CAAC,CACnB,CAAC;AAEX,CAAC,CAAC;AAEF,eAAezD,8BAA8B,CAA0CO,mBAAmB,CAAC"}
@@ -3,11 +3,17 @@ import { WebComponentType } from '../../types/internal/webComponent.types';
3
3
  export const getActivityParams = props => {
4
4
  const accountIdParam = props.accountId ? `account-id="${props.accountId}"` : '';
5
5
  const queryFilterParam = props.queryFilter ? `query-filter="${props.queryFilter}"` : '';
6
+ const paginationTypeParam = props.paginationType ? `pagination-type="${props.paginationType}"` : '';
7
+ const transactionsPerPageParam = props.transactionsPerPage ? `transactions-per-page="${props.transactionsPerPage}"` : '';
6
8
  return `
7
9
  customer-token="${props.customerToken}"
8
10
  ${accountIdParam}
9
11
  hide-filter-button="${props.hideFilterButton || false}"
12
+ hide-back-to-top="${props.hideBackToTop || false}"
13
+ hide-title="${props.hideTitle || false}"
10
14
  ${queryFilterParam}
15
+ ${paginationTypeParam}
16
+ ${transactionsPerPageParam}
11
17
  style="height: 100%"
12
18
  `;
13
19
  };
@@ -16,10 +22,10 @@ export const getActivityScript = () => {
16
22
  };
17
23
  export const injectRefreshEventIfNeeded = (currentWeb, requestRefreshEvent) => {
18
24
  if (requestRefreshEvent && requestRefreshEvent.dependencies.includes(WebComponentType.activity.valueOf())) {
19
- currentWeb === null || currentWeb === void 0 ? void 0 : currentWeb.injectJavaScript(`dispatchRefreshEvent('${JSON.stringify(requestRefreshEvent)}')`);
25
+ currentWeb?.injectJavaScript(`dispatchRefreshEvent('${JSON.stringify(requestRefreshEvent)}')`);
20
26
  }
21
27
  };
22
28
  export const injectFiltersChanged = (currentWeb, query) => {
23
- currentWeb === null || currentWeb === void 0 ? void 0 : currentWeb.injectJavaScript(`dispatchActivityFilterChangedEvent('${query}')`);
29
+ currentWeb?.injectJavaScript(`dispatchActivityFilterChangedEvent('${query}')`);
24
30
  };
25
31
  //# sourceMappingURL=UNActivityComponent.utils.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["DISPATCH_REQUEST_REFRESH","WebComponentType","getActivityParams","props","accountIdParam","accountId","queryFilterParam","queryFilter","customerToken","hideFilterButton","getActivityScript","injectRefreshEventIfNeeded","currentWeb","requestRefreshEvent","dependencies","includes","activity","valueOf","injectJavaScript","JSON","stringify","injectFiltersChanged","query"],"sources":["UNActivityComponent.utils.ts"],"sourcesContent":["import type { RequestRefreshEvent } from './../../messages/webMessages/unitMessages';\nimport type { WebView } from 'react-native-webview';\nimport { DISPATCH_REQUEST_REFRESH } from './../../scripts/html/bodyScript';\nimport type { UNActivityComponentProps } from './UNActivityComponent';\nimport { WebComponentType } from '../../types/internal/webComponent.types';\n\nexport const getActivityParams = (props: UNActivityComponentProps) => {\n const accountIdParam = props.accountId ? `account-id=\"${props.accountId}\"` : '';\n const queryFilterParam = props.queryFilter ? `query-filter=\"${props.queryFilter}\"` : '';\n\n return `\n customer-token=\"${props.customerToken}\"\n ${accountIdParam}\n hide-filter-button=\"${props.hideFilterButton || false}\"\n ${queryFilterParam}\n style=\"height: 100%\"\n `;\n};\n\nexport const getActivityScript = () => {\n return DISPATCH_REQUEST_REFRESH;\n};\n\nexport const injectRefreshEventIfNeeded = (currentWeb: WebView | null, requestRefreshEvent: RequestRefreshEvent | null) => {\n if (requestRefreshEvent && requestRefreshEvent.dependencies.includes(WebComponentType.activity.valueOf())) {\n currentWeb?.injectJavaScript(`dispatchRefreshEvent('${JSON.stringify(requestRefreshEvent)}')`);\n }\n};\n\nexport const injectFiltersChanged = (currentWeb: WebView | null, query: string) => {\n currentWeb?.injectJavaScript(`dispatchActivityFilterChangedEvent('${query}')`);\n};\n"],"mappings":"AAEA,SAASA,wBAAwB,QAAQ,iCAAiC;AAE1E,SAASC,gBAAgB,QAAQ,yCAAyC;AAE1E,OAAO,MAAMC,iBAAiB,GAAIC,KAA+B,IAAK;EACpE,MAAMC,cAAc,GAAGD,KAAK,CAACE,SAAS,GAAI,eAAcF,KAAK,CAACE,SAAU,GAAE,GAAG,EAAE;EAC/E,MAAMC,gBAAgB,GAAGH,KAAK,CAACI,WAAW,GAAI,iBAAgBJ,KAAK,CAACI,WAAY,GAAE,GAAG,EAAE;EAEvF,OAAQ;AACV,sBAAsBJ,KAAK,CAACK,aAAc;AAC1C,MAAMJ,cAAe;AACrB,0BAA0BD,KAAK,CAACM,gBAAgB,IAAI,KAAM;AAC1D,MAAMH,gBAAiB;AACvB;AACA,GAAG;AACH,CAAC;AAED,OAAO,MAAMI,iBAAiB,GAAGA,CAAA,KAAM;EACrC,OAAOV,wBAAwB;AACjC,CAAC;AAED,OAAO,MAAMW,0BAA0B,GAAGA,CAACC,UAA0B,EAAEC,mBAA+C,KAAK;EACzH,IAAIA,mBAAmB,IAAIA,mBAAmB,CAACC,YAAY,CAACC,QAAQ,CAACd,gBAAgB,CAACe,QAAQ,CAACC,OAAO,EAAE,CAAC,EAAE;IACzGL,UAAU,aAAVA,UAAU,uBAAVA,UAAU,CAAEM,gBAAgB,CAAE,yBAAwBC,IAAI,CAACC,SAAS,CAACP,mBAAmB,CAAE,IAAG,CAAC;EAChG;AACF,CAAC;AAED,OAAO,MAAMQ,oBAAoB,GAAGA,CAACT,UAA0B,EAAEU,KAAa,KAAK;EACjFV,UAAU,aAAVA,UAAU,uBAAVA,UAAU,CAAEM,gBAAgB,CAAE,uCAAsCI,KAAM,IAAG,CAAC;AAChF,CAAC"}
1
+ {"version":3,"names":["DISPATCH_REQUEST_REFRESH","WebComponentType","getActivityParams","props","accountIdParam","accountId","queryFilterParam","queryFilter","paginationTypeParam","paginationType","transactionsPerPageParam","transactionsPerPage","customerToken","hideFilterButton","hideBackToTop","hideTitle","getActivityScript","injectRefreshEventIfNeeded","currentWeb","requestRefreshEvent","dependencies","includes","activity","valueOf","injectJavaScript","JSON","stringify","injectFiltersChanged","query"],"sourceRoot":"../../../../src","sources":["components/UNActivityComponent/UNActivityComponent.utils.ts"],"mappings":"AAEA,SAASA,wBAAwB,QAAQ,iCAAiC;AAE1E,SAASC,gBAAgB,QAAQ,yCAAyC;AAE1E,OAAO,MAAMC,iBAAiB,GAAIC,KAA+B,IAAK;EACpE,MAAMC,cAAc,GAAGD,KAAK,CAACE,SAAS,GAAI,eAAcF,KAAK,CAACE,SAAU,GAAE,GAAG,EAAE;EAC/E,MAAMC,gBAAgB,GAAGH,KAAK,CAACI,WAAW,GAAI,iBAAgBJ,KAAK,CAACI,WAAY,GAAE,GAAG,EAAE;EACvF,MAAMC,mBAAmB,GAAGL,KAAK,CAACM,cAAc,GAAI,oBAAmBN,KAAK,CAACM,cAAe,GAAE,GAAG,EAAE;EACnG,MAAMC,wBAAwB,GAAGP,KAAK,CAACQ,mBAAmB,GAAI,0BAAyBR,KAAK,CAACQ,mBAAoB,GAAE,GAAG,EAAE;EACxH,OAAQ;AACV,sBAAsBR,KAAK,CAACS,aAAc;AAC1C,MAAMR,cAAe;AACrB,0BAA0BD,KAAK,CAACU,gBAAgB,IAAI,KAAM;AAC1D,wBAAwBV,KAAK,CAACW,aAAa,IAAI,KAAM;AACrD,kBAAkBX,KAAK,CAACY,SAAS,IAAI,KAAM;AAC3C,MAAMT,gBAAiB;AACvB,MAAME,mBAAoB;AAC1B,MAAME,wBAAyB;AAC/B;AACA,GAAG;AACH,CAAC;AAED,OAAO,MAAMM,iBAAiB,GAAGA,CAAA,KAAM;EACrC,OAAOhB,wBAAwB;AACjC,CAAC;AAED,OAAO,MAAMiB,0BAA0B,GAAGA,CAACC,UAA0B,EAAEC,mBAA+C,KAAK;EACzH,IAAIA,mBAAmB,IAAIA,mBAAmB,CAACC,YAAY,CAACC,QAAQ,CAACpB,gBAAgB,CAACqB,QAAQ,CAACC,OAAO,CAAC,CAAC,CAAC,EAAE;IACzGL,UAAU,EAAEM,gBAAgB,CAAE,yBAAwBC,IAAI,CAACC,SAAS,CAACP,mBAAmB,CAAE,IAAG,CAAC;EAChG;AACF,CAAC;AAED,OAAO,MAAMQ,oBAAoB,GAAGA,CAACT,UAA0B,EAAEU,KAAa,KAAK;EACjFV,UAAU,EAAEM,gBAAgB,CAAE,uCAAsCI,KAAM,IAAG,CAAC;AAChF,CAAC"}
@@ -1,2 +1,2 @@
1
- export { default as UNActivityComponent, UNActivityComponentProps } from './UNActivityComponent';
1
+ export { default as UNActivityComponent, UNActivityComponentProps, UNActivityRef } from './UNActivityComponent';
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["default","UNActivityComponent","UNActivityComponentProps"],"sources":["index.ts"],"sourcesContent":["export { default as UNActivityComponent, UNActivityComponentProps } from './UNActivityComponent';\n"],"mappings":"AAAA,SAASA,OAAO,IAAIC,mBAAmB,EAAEC,wBAAwB,QAAQ,uBAAuB"}
1
+ {"version":3,"names":["default","UNActivityComponent","UNActivityComponentProps","UNActivityRef"],"sourceRoot":"../../../../src","sources":["components/UNActivityComponent/index.ts"],"mappings":"AAAA,SAASA,OAAO,IAAIC,mBAAmB,EAAEC,wBAAwB,EAAEC,aAAa,QAAQ,uBAAuB"}
@@ -30,6 +30,16 @@ const UNBookPaymentComponent = props => {
30
30
  const handleWebViewMessage = message => {
31
31
  if (!message || !message.details) return;
32
32
  switch (message.type) {
33
+ case PaymentMessage.INITIAL_STAGE_BACK_BUTTON_CLICKED:
34
+ {
35
+ props.onInitialStageBackButtonClicked && props.onInitialStageBackButtonClicked();
36
+ break;
37
+ }
38
+ case PaymentMessage.FINAL_STAGE_DONE_BUTTON_CLICKED:
39
+ {
40
+ props.onFinalStageDoneButtonClicked && props.onFinalStageDoneButtonClicked();
41
+ break;
42
+ }
33
43
  case PaymentMessage.PAYMENT_CREATED:
34
44
  props.onPaymentCreated && props.onPaymentCreated(message.details.data);
35
45
  break;
@@ -1 +1 @@
1
- {"version":3,"names":["React","useState","WebComponent","getBookPaymentParams","getBookPaymentScript","PageMessage","View","UnitMessage","PaymentMessage","RESPONSE_KEYS","PresentationMode","WebComponentType","withReduxStore","UNBookPaymentComponent","props","height","setHeight","presentationMode","setPresentationMode","Inherit","handleUnitOnLoad","response","onLoad","errors","account","console","error","handleWebViewMessage","message","details","type","PAYMENT_CREATED","onPaymentCreated","data","UNIT_ON_LOAD","PAGE_HEIGHT","currentHeight","Default","renderBookPaymentWebView","createElement","bookPayment","params","script","onMessage","isScrollable","theme","language","style"],"sources":["UNBookPaymentComponent.tsx"],"sourcesContent":["import React, { useState } from 'react';\nimport { WebComponent } from '../../webComponent/WebComponent';\nimport { getBookPaymentParams, getBookPaymentScript } from './UNBookPaymentComponent.utils';\nimport type { WebViewMessage } from '../../messages/webMessages';\nimport type { UNOnLoadResponse, UNBookPaymentData, UNError, UNAccountData, UNOnLoadResponseData } from '../../types/shared';\nimport { HeightEvent, PageMessage } from '../../messages/webMessages/pageMessage';\nimport { View } from 'react-native';\nimport { UnitMessage } from '../../messages/webMessages/unitMessages';\nimport { PaymentMessage } from '../../messages/webMessages/paymentsMessage';\nimport type { BookPaymentEvent } from '../../messages/webMessages/bookPaymentMessage';\nimport { RESPONSE_KEYS, UnitOnLoadResponseEvent } from '../../messages/webMessages/onLoadMessage';\nimport { PresentationMode, WebComponentType } from '../../types/internal/webComponent.types';\nimport { withReduxStore } from '../../helpers/store/helpers';\n\nexport interface UNBookPaymentComponentProps {\n //inputs\n accountId: string;\n customerToken: string;\n isSameCustomer: boolean;\n counterPartyAccountId: string;\n counterPartyName: string;\n\n // ui\n theme?: string;\n language?: string;\n isAutoFocus?: boolean;\n\n // events\n onPaymentCreated?: (data: UNBookPaymentData) => void;\n onLoad?: (response: UNOnLoadResponse<UNAccountData>) => void;\n}\n\nconst UNBookPaymentComponent = (props: UNBookPaymentComponentProps) => {\n const [height, setHeight] = useState<number>(0);\n const [presentationMode, setPresentationMode] = useState<PresentationMode>(PresentationMode.Inherit);\n\n const handleUnitOnLoad = (response: UnitOnLoadResponseEvent) => {\n if (!props.onLoad) {\n return;\n }\n\n if (RESPONSE_KEYS.errors in response) {\n props.onLoad(response as UNError);\n return;\n }\n\n if (RESPONSE_KEYS.account in response) {\n // AccountOnLoadResponse;\n props.onLoad(response[RESPONSE_KEYS.account] as UNOnLoadResponseData<UNAccountData>);\n return;\n }\n\n console.error('On Load Error: unexpected response type');\n return;\n };\n\n const handleWebViewMessage = (message: WebViewMessage) => {\n if (!message || !message.details) return;\n\n switch (message.type) {\n case PaymentMessage.PAYMENT_CREATED:\n props.onPaymentCreated && props.onPaymentCreated((message.details as BookPaymentEvent).data);\n break;\n case UnitMessage.UNIT_ON_LOAD:\n handleUnitOnLoad(message.details as UnitOnLoadResponseEvent);\n break;\n case PageMessage.PAGE_HEIGHT: {\n const currentHeight = (message.details as HeightEvent).height;\n setHeight(currentHeight);\n if (presentationMode === PresentationMode.Inherit && currentHeight === 0) {\n setPresentationMode(PresentationMode.Default);\n }\n break;\n }\n }\n };\n\n const renderBookPaymentWebView = () => {\n return (\n <WebComponent\n type={WebComponentType.bookPayment}\n presentationMode={presentationMode}\n params={getBookPaymentParams(props)}\n script={getBookPaymentScript()}\n onMessage={(message: WebViewMessage) => handleWebViewMessage(message)}\n isScrollable={false}\n theme={props.theme}\n language={props.language}\n />\n );\n };\n\n if (presentationMode === PresentationMode.Inherit) {\n return renderBookPaymentWebView();\n }\n\n return (\n <View style={{ height: height }}>\n {renderBookPaymentWebView()}\n </View>\n );\n};\n\nexport default withReduxStore<UNBookPaymentComponentProps>(UNBookPaymentComponent);\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,QAAQ,QAAQ,OAAO;AACvC,SAASC,YAAY,QAAQ,iCAAiC;AAC9D,SAASC,oBAAoB,EAAEC,oBAAoB,QAAQ,gCAAgC;AAG3F,SAAsBC,WAAW,QAAQ,wCAAwC;AACjF,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,WAAW,QAAQ,yCAAyC;AACrE,SAASC,cAAc,QAAQ,4CAA4C;AAE3E,SAASC,aAAa,QAAiC,0CAA0C;AACjG,SAASC,gBAAgB,EAAEC,gBAAgB,QAAQ,yCAAyC;AAC5F,SAASC,cAAc,QAAQ,6BAA6B;AAoB5D,MAAMC,sBAAsB,GAAIC,KAAkC,IAAK;EACrE,MAAM,CAACC,MAAM,EAAEC,SAAS,CAAC,GAAGf,QAAQ,CAAS,CAAC,CAAC;EAC/C,MAAM,CAACgB,gBAAgB,EAAEC,mBAAmB,CAAC,GAAGjB,QAAQ,CAAmBS,gBAAgB,CAACS,OAAO,CAAC;EAEpG,MAAMC,gBAAgB,GAAIC,QAAiC,IAAK;IAC9D,IAAI,CAACP,KAAK,CAACQ,MAAM,EAAE;MACjB;IACF;IAEA,IAAIb,aAAa,CAACc,MAAM,IAAIF,QAAQ,EAAE;MACpCP,KAAK,CAACQ,MAAM,CAACD,QAAQ,CAAY;MACjC;IACF;IAEA,IAAIZ,aAAa,CAACe,OAAO,IAAIH,QAAQ,EAAE;MACrC;MACAP,KAAK,CAACQ,MAAM,CAACD,QAAQ,CAACZ,aAAa,CAACe,OAAO,CAAC,CAAwC;MACpF;IACF;IAEAC,OAAO,CAACC,KAAK,CAA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E;EACnC;EAEA,oBACEtC,KAAA,CAAAuC,aAAA,CAACjC,IAAI;IAACyC,KAAK,EAAE;MAAEhC,MAAM,EAAEA;IAAO;EAAE,GAC7BuB,wBAAwB,EAAE,CACtB;AAEX,CAAC;AAED,eAAe1B,cAAc,CAA8BC,sBAAsB,CAAC"}
1
+ {"version":3,"names":["React","useState","WebComponent","getBookPaymentParams","getBookPaymentScript","PageMessage","View","UnitMessage","PaymentMessage","RESPONSE_KEYS","PresentationMode","WebComponentType","withReduxStore","UNBookPaymentComponent","props","height","setHeight","presentationMode","setPresentationMode","Inherit","handleUnitOnLoad","response","onLoad","errors","account","console","error","handleWebViewMessage","message","details","type","INITIAL_STAGE_BACK_BUTTON_CLICKED","onInitialStageBackButtonClicked","FINAL_STAGE_DONE_BUTTON_CLICKED","onFinalStageDoneButtonClicked","PAYMENT_CREATED","onPaymentCreated","data","UNIT_ON_LOAD","PAGE_HEIGHT","currentHeight","Default","renderBookPaymentWebView","createElement","bookPayment","params","script","onMessage","isScrollable","theme","language","style"],"sourceRoot":"../../../../src","sources":["components/UNBookPaymentComponent/UNBookPaymentComponent.tsx"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,QAAQ,QAAQ,OAAO;AACvC,SAASC,YAAY,QAAQ,iCAAiC;AAC9D,SAASC,oBAAoB,EAAEC,oBAAoB,QAAQ,gCAAgC;AAS3F,SAAsBC,WAAW,QAAQ,wCAAwC;AACjF,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,WAAW,QAAQ,yCAAyC;AACrE,SAASC,cAAc,QAAQ,4CAA4C;AAE3E,SAASC,aAAa,QAAiC,0CAA0C;AACjG,SAASC,gBAAgB,EAAEC,gBAAgB,QAAQ,yCAAyC;AAC5F,SAASC,cAAc,QAAQ,6BAA6B;AAwB5D,MAAMC,sBAAsB,GAAIC,KAAkC,IAAK;EACrE,MAAM,CAACC,MAAM,EAAEC,SAAS,CAAC,GAAGf,QAAQ,CAAS,CAAC,CAAC;EAC/C,MAAM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,SAAS,CAACwB,aAAa,CAAC;UACxB,IAAIvB,gBAAgB,KAAKP,gBAAgB,CAACS,OAAO,IAAIqB,aAAa,KAAK,CAAC,EAAE;YACxEtB,mBAAmB,CAACR,gBAAgB,CAAC+B,OAAO,CAAC;UAC/C;UACA;QACF;IACF;EACF,CAAC;EAED,MAAMC,wBAAwB,GAAGA,CAAA,KAAM;IACrC,oBACE1C,KAAA,CAAA2C,aAAA,CAACzC,YAAY;MACX4B,IAAI,EAAEnB,gBAAgB,CAACiC,WAAY;MACnC3B,gBAAgB,EAAEA,gBAAiB;MACnC4B,MAAM,EAAE1C,oBAAoB,CAACW,KAAK,CAAE;MACpCgC,MAAM,EAAE1C,oBAAoB,CAAC,CAAE;MAC/B2C,SAAS,EAAGnB,OAAuB,IAAKD,oBAAoB,CAACC,OAAO,CAAE;MACtEoB,YAAY,EAAE,KAAM;MACpBC,KAAK,EAAEnC,KAAK,CAACmC,KAAM;MACnBC,QAAQ,EAAEpC,KAAK,CAACoC;IAAS,CAC1B,CAAC;EAEN,CAAC;EAED,IAAIjC,gBAAgB,KAAKP,gBAAgB,CAACS,OAAO,EAAE;IACjD,OAAOuB,wBAAwB,CAAC,CAAC;EACnC;EAEA,oBACE1C,KAAA,CAAA2C,aAAA,CAACrC,IAAI;IAAC6C,KAAK,EAAE;MAAEpC,MAAM,EAAEA;IAAO;EAAE,GAC7B2B,wBAAwB,CAAC,CACtB,CAAC;AAEX,CAAC;AAED,eAAe9B,cAAc,CAA8BC,sBAAsB,CAAC"}
@@ -1,13 +1,18 @@
1
1
  import { LISTENERS } from './../../scripts/html/bodyScript';
2
2
  import { PaymentMessage } from '../../messages/webMessages/paymentsMessage';
3
3
  export const getBookPaymentParams = props => {
4
+ const accountIdParam = props.accountId ? `account-id="${props.accountId}"` : '';
5
+ const counterpartyAccountIdParam = props.counterPartyAccountId ? `counterparty-account-id="${props.counterPartyAccountId}"` : '';
6
+ const counterpartyNameParam = props.counterPartyName ? `counterparty-name="${props.counterPartyName}"` : '';
4
7
  return `
5
- account-id="${props.accountId}"
8
+ ${accountIdParam}
6
9
  customer-token="${props.customerToken}"
7
- is-same-customer="${props.isSameCustomer}"
8
- counterparty-account-id="${props.counterPartyAccountId}"
9
- counterparty-name="${props.counterPartyName}"
10
+ is-same-customer="${props.isSameCustomer || false}"
11
+ ${counterpartyAccountIdParam}
12
+ ${counterpartyNameParam}
10
13
  is-auto-focus="${props.isAutoFocus || false}"
14
+ initial-stage-back-button="${props.initialStageBackButton ?? false}"
15
+ final-stage-done-button="${props.finalStageDoneButton ?? false}"
11
16
  style="height: 100%"
12
17
  `;
13
18
  };
@@ -23,6 +28,8 @@ export const getBookPaymentScript = () => {
23
28
  });
24
29
 
25
30
  ${LISTENERS.requestRefresh}
31
+ ${LISTENERS.unitPaymentInitialStageBackButtonClicked}
32
+ ${LISTENERS.unitPaymentFinalStageDoneButtonClicked}
26
33
  `;
27
34
  };
28
35
  //# sourceMappingURL=UNBookPaymentComponent.utils.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["LISTENERS","PaymentMessage","getBookPaymentParams","props","accountId","customerToken","isSameCustomer","counterPartyAccountId","counterPartyName","isAutoFocus","getBookPaymentScript","PAYMENT_CREATED","requestRefresh"],"sources":["UNBookPaymentComponent.utils.ts"],"sourcesContent":["import { LISTENERS } from './../../scripts/html/bodyScript';\nimport type { UNBookPaymentComponentProps } from './UNBookPaymentComponent';\n\nimport { PaymentMessage } from '../../messages/webMessages/paymentsMessage';\n\nexport const getBookPaymentParams = (props: UNBookPaymentComponentProps) => {\n return `\n account-id=\"${props.accountId}\"\n customer-token=\"${props.customerToken}\"\n is-same-customer=\"${props.isSameCustomer}\"\n counterparty-account-id=\"${props.counterPartyAccountId}\"\n counterparty-name=\"${props.counterPartyName}\"\n is-auto-focus=\"${props.isAutoFocus || false}\"\n style=\"height: 100%\"\n `;\n};\n\nexport const getBookPaymentScript = () => {\n return `\n window.addEventListener(\"${PaymentMessage.PAYMENT_CREATED}\", (e) => {\n const response = e.detail\n response.then((data) => {\n postMessageToSDK({ type: \"${PaymentMessage.PAYMENT_CREATED}\", details: { data: JSON.stringify(data.data) }})\n }).catch((e) => {\n console.log(e)\n })\n });\n\n ${LISTENERS.requestRefresh}\n `;\n};\n"],"mappings":"AAAA,SAASA,SAAS,QAAQ,iCAAiC;AAG3D,SAASC,cAAc,QAAQ,4CAA4C;AAE3E,OAAO,MAAMC,oBAAoB,GAAIC,KAAkC,IAAK;EAC1E,OAAQ;AACV,kBAAkBA,KAAK,CAACC,SAAU;AAClC,sBAAsBD,KAAK,CAACE,aAAc;AAC1C,wBAAwBF,KAAK,CAACG,cAAe;AAC7C,+BAA+BH,KAAK,CAACI,qBAAsB;AAC3D,yBAAyBJ,KAAK,CAACK,gBAAiB;AAChD,qBAAqBL,KAAK,CAACM,WAAW,IAAI,KAAM;AAChD;AACA,GAAG;AACH,CAAC;AAED,OAAO,MAAMC,oBAAoB,GAAGA,CAAA,KAAM;EACxC,OAAQ;AACV,+BAA+BT,cAAc,CAACU,eAAgB;AAC9D;AACA;AACA,sCAAsCV,cAAc,CAACU,eAAgB;AACrE;AACA;AACA;AACA;AACA;AACA,MAAMX,SAAS,CAACY,cAAe;AAC/B,GAAG;AACH,CAAC"}
1
+ {"version":3,"names":["LISTENERS","PaymentMessage","getBookPaymentParams","props","accountIdParam","accountId","counterpartyAccountIdParam","counterPartyAccountId","counterpartyNameParam","counterPartyName","customerToken","isSameCustomer","isAutoFocus","initialStageBackButton","finalStageDoneButton","getBookPaymentScript","PAYMENT_CREATED","requestRefresh","unitPaymentInitialStageBackButtonClicked","unitPaymentFinalStageDoneButtonClicked"],"sourceRoot":"../../../../src","sources":["components/UNBookPaymentComponent/UNBookPaymentComponent.utils.ts"],"mappings":"AAAA,SAASA,SAAS,QAAQ,iCAAiC;AAG3D,SAASC,cAAc,QAAQ,4CAA4C;AAE3E,OAAO,MAAMC,oBAAoB,GAAIC,KAAkC,IAAK;EAC1E,MAAMC,cAAc,GAAGD,KAAK,CAACE,SAAS,GAAI,eAAcF,KAAK,CAACE,SAAU,GAAE,GAAG,EAAE;EAC/E,MAAMC,0BAA0B,GAAGH,KAAK,CAACI,qBAAqB,GAAI,4BAA2BJ,KAAK,CAACI,qBAAsB,GAAE,GAAG,EAAE;EAChI,MAAMC,qBAAqB,GAAGL,KAAK,CAACM,gBAAgB,GAAI,sBAAqBN,KAAK,CAACM,gBAAiB,GAAE,GAAG,EAAE;EAC3G,OAAQ;AACV,MAAML,cAAe;AACrB,sBAAsBD,KAAK,CAACO,aAAc;AAC1C,wBAAwBP,KAAK,CAACQ,cAAc,IAAI,KAAM;AACtD,MAAML,0BAA2B;AACjC,MAAME,qBAAsB;AAC5B,qBAAqBL,KAAK,CAACS,WAAW,IAAI,KAAM;AAChD,iCAAiCT,KAAK,CAACU,sBAAsB,IAAI,KAAM;AACvE,+BAA+BV,KAAK,CAACW,oBAAoB,IAAI,KAAM;AACnE;AACA,GAAG;AACH,CAAC;AAED,OAAO,MAAMC,oBAAoB,GAAGA,CAAA,KAAM;EACxC,OAAQ;AACV,+BAA+Bd,cAAc,CAACe,eAAgB;AAC9D;AACA;AACA,sCAAsCf,cAAc,CAACe,eAAgB;AACrE;AACA;AACA;AACA;AACA;AACA,MAAMhB,SAAS,CAACiB,cAAe;AAC/B,MAAMjB,SAAS,CAACkB,wCAAyC;AACzD,MAAMlB,SAAS,CAACmB,sCAAuC;AACvD,GAAG;AACH,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"names":["default","UNBookPaymentComponent","UNBookPaymentComponentProps"],"sources":["index.ts"],"sourcesContent":["export { default as UNBookPaymentComponent, UNBookPaymentComponentProps } from './UNBookPaymentComponent';\n"],"mappings":"AAAA,SAASA,OAAO,IAAIC,sBAAsB,EAAEC,2BAA2B,QAAQ,0BAA0B"}
1
+ {"version":3,"names":["default","UNBookPaymentComponent","UNBookPaymentComponentProps"],"sourceRoot":"../../../../src","sources":["components/UNBookPaymentComponent/index.ts"],"mappings":"AAAA,SAASA,OAAO,IAAIC,sBAAsB,EAAEC,2BAA2B,QAAQ,0BAA0B"}
@@ -1,2 +1,13 @@
1
- export const BOTTOM_SHEET_MAX_PERCENTAGE_SIZE = 0.9;
1
+ import { Dimensions, Platform, StatusBar } from 'react-native';
2
+ export const BOTTOM_SHEET_OVER_FULLSCREEN_PERCENTAGE_SIZE = 0.9;
3
+ export const androidStatusBarHeight = StatusBar.currentHeight || 0;
4
+
5
+ // For iOS - we are currently using hard coded height
6
+ export const iosStatusBarHeight = Dimensions.get('window').height * 0.05;
7
+ export const statusBarHeight = Platform.OS === 'android' ? androidStatusBarHeight : iosStatusBarHeight;
8
+ // Android 10 and above - need to add status bar height to the window height to get the full screen height because Dimensions.get('window').height returns the height without the status bar
9
+ // reference: https://github.com/facebook/react-native/issues/23693#issuecomment-1403560728
10
+ export const isAndroid10AndAbove = Platform.OS === 'android' && Platform.Version >= 29;
11
+ export const fullScreenHeight = isAndroid10AndAbove ? Dimensions.get('window').height + statusBarHeight : Dimensions.get('window').height;
12
+ export const overFullScreenHeight = Dimensions.get('window').height * BOTTOM_SHEET_OVER_FULLSCREEN_PERCENTAGE_SIZE;
2
13
  //# sourceMappingURL=UNBottomSheetComponent.constants.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["BOTTOM_SHEET_MAX_PERCENTAGE_SIZE"],"sources":["UNBottomSheetComponent.constants.ts"],"sourcesContent":["export const BOTTOM_SHEET_MAX_PERCENTAGE_SIZE = 0.9;\n"],"mappings":"AAAA,OAAO,MAAMA,gCAAgC,GAAG,GAAG"}
1
+ {"version":3,"names":["Dimensions","Platform","StatusBar","BOTTOM_SHEET_OVER_FULLSCREEN_PERCENTAGE_SIZE","androidStatusBarHeight","currentHeight","iosStatusBarHeight","get","height","statusBarHeight","OS","isAndroid10AndAbove","Version","fullScreenHeight","overFullScreenHeight"],"sourceRoot":"../../../../src","sources":["components/UNBottomSheetComponent/UNBottomSheetComponent.constants.ts"],"mappings":"AAAA,SAASA,UAAU,EAAEC,QAAQ,EAAEC,SAAS,QAAQ,cAAc;AAE9D,OAAO,MAAMC,4CAA4C,GAAG,GAAG;AAE/D,OAAO,MAAMC,sBAAsB,GAAGF,SAAS,CAACG,aAAa,IAAI,CAAC;;AAElE;AACA,OAAO,MAAMC,kBAAkB,GAAGN,UAAU,CAACO,GAAG,CAAC,QAAQ,CAAC,CAACC,MAAM,GAAG,IAAI;AAExE,OAAO,MAAMC,eAAe,GAAGR,QAAQ,CAACS,EAAE,KAAK,SAAS,GAAGN,sBAAsB,GAAGE,kBAAkB;AACtG;AACA;AACA,OAAO,MAAMK,mBAAmB,GAAGV,QAAQ,CAACS,EAAE,KAAK,SAAS,IAAIT,QAAQ,CAACW,OAAO,IAAI,EAAE;AAEtF,OAAO,MAAMC,gBAAgB,GAC3BF,mBAAmB,GACjBX,UAAU,CAACO,GAAG,CAAC,QAAQ,CAAC,CAACC,MAAM,GAAGC,eAAe,GAC/CT,UAAU,CAACO,GAAG,CAAC,QAAQ,CAAC,CAACC,MAAM;AAErC,OAAO,MAAMM,oBAAoB,GAAGd,UAAU,CAACO,GAAG,CAAC,QAAQ,CAAC,CAACC,MAAM,GAAGL,4CAA4C"}