react-native-unit-components 1.9.1 → 1.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (327) hide show
  1. package/android/src/main/java/com/unitreactnativecomponents/UnitReactNativeComponentsPackage.kt +9 -12
  2. package/android/src/main/java/com/unitreactnativecomponents/appInfo/UNAppInfoModule.kt +59 -0
  3. package/android/src/main/java/com/unitreactnativecomponents/extensions/ContextExtensions.kt +35 -0
  4. package/ios/Extensions/Bundle+Extensions.swift +23 -0
  5. package/ios/UNAppInfo/IOSAppInfo.swift +47 -0
  6. package/ios/UNAppInfo/UNAppInfoExportModule.m +5 -2
  7. package/ios/UnitReactNativeComponents.xcodeproj/project.pbxproj +34 -0
  8. package/lib/commonjs/components/UNACHCreditComponent/UNACHCreditComponent.js +2 -2
  9. package/lib/commonjs/components/UNACHCreditComponent/UNACHCreditComponent.js.map +1 -1
  10. package/lib/commonjs/components/UNACHDebitComponent/UNACHDebitComponent.js +2 -2
  11. package/lib/commonjs/components/UNACHDebitComponent/UNACHDebitComponent.js.map +1 -1
  12. package/lib/commonjs/components/UNAccountComponent/UNAccountComponent.js +11 -7
  13. package/lib/commonjs/components/UNAccountComponent/UNAccountComponent.js.map +1 -1
  14. package/lib/commonjs/components/UNActivityComponent/UNActivityComponent.js +13 -9
  15. package/lib/commonjs/components/UNActivityComponent/UNActivityComponent.js.map +1 -1
  16. package/lib/commonjs/components/UNActivityComponent/UNActivityComponent.utils.js +4 -0
  17. package/lib/commonjs/components/UNActivityComponent/UNActivityComponent.utils.js.map +1 -1
  18. package/lib/commonjs/components/UNBottomSheetComponent/UNBottomSheetComponent.js +22 -8
  19. package/lib/commonjs/components/UNBottomSheetComponent/UNBottomSheetComponent.js.map +1 -1
  20. package/lib/commonjs/components/UNBottomSheetComponent/components/UNAddToWalletBottomSheetItem/UNAddToWalletBottomSheetItem.js +7 -2
  21. package/lib/commonjs/components/UNBottomSheetComponent/components/UNAddToWalletBottomSheetItem/UNAddToWalletBottomSheetItem.js.map +1 -1
  22. package/lib/commonjs/components/UNCardComponent/UNCardComponent.js +11 -8
  23. package/lib/commonjs/components/UNCardComponent/UNCardComponent.js.map +1 -1
  24. package/lib/commonjs/components/UNMultipleCardsComponent/UNMultipleCardsComponent.js +86 -0
  25. package/lib/commonjs/components/UNMultipleCardsComponent/UNMultipleCardsComponent.js.map +1 -0
  26. package/lib/commonjs/components/UNMultipleCardsComponent/UNMultipleCardsComponent.utils.js +41 -0
  27. package/lib/commonjs/components/UNMultipleCardsComponent/UNMultipleCardsComponent.utils.js.map +1 -0
  28. package/lib/commonjs/components/UNMultipleCardsComponent/index.js +21 -0
  29. package/lib/commonjs/components/UNMultipleCardsComponent/index.js.map +1 -0
  30. package/lib/commonjs/components/index.js +11 -0
  31. package/lib/commonjs/components/index.js.map +1 -1
  32. package/lib/commonjs/flows/card/UNCardFlows.js +8 -4
  33. package/lib/commonjs/flows/card/UNCardFlows.js.map +1 -1
  34. package/lib/commonjs/helpers/pushProvisioningService/helpers.js +34 -0
  35. package/lib/commonjs/helpers/pushProvisioningService/helpers.js.map +1 -0
  36. package/lib/commonjs/helpers/pushProvisioningService/hooks/useCardWallet.js +32 -2
  37. package/lib/commonjs/helpers/pushProvisioningService/hooks/useCardWallet.js.map +1 -1
  38. package/lib/commonjs/helpers/pushProvisioningService/types.js +41 -0
  39. package/lib/commonjs/helpers/pushProvisioningService/types.js.map +1 -0
  40. package/lib/commonjs/hooks/useListenerToEvent.js +26 -0
  41. package/lib/commonjs/hooks/useListenerToEvent.js.map +1 -0
  42. package/lib/commonjs/messages/webMessages/index.js.map +1 -1
  43. package/lib/commonjs/messages/webMessages/multipleCardsMessage.js +12 -0
  44. package/lib/commonjs/messages/webMessages/multipleCardsMessage.js.map +1 -0
  45. package/lib/commonjs/messages/webMessages/onLoadMessage.js +2 -1
  46. package/lib/commonjs/messages/webMessages/onLoadMessage.js.map +1 -1
  47. package/lib/commonjs/networking/requests/UNWalletPayloadRequest.js +27 -3
  48. package/lib/commonjs/networking/requests/UNWalletPayloadRequest.js.map +1 -1
  49. package/lib/commonjs/slices/ConfigurationSlice.js +36 -0
  50. package/lib/commonjs/slices/ConfigurationSlice.js.map +1 -0
  51. package/lib/commonjs/slices/SharedEventsSlice.js +28 -0
  52. package/lib/commonjs/slices/SharedEventsSlice.js.map +1 -0
  53. package/lib/commonjs/store/store.js +5 -1
  54. package/lib/commonjs/store/store.js.map +1 -1
  55. package/lib/commonjs/types/internal/errorHelpers.js +20 -0
  56. package/lib/commonjs/types/internal/errorHelpers.js.map +1 -0
  57. package/lib/commonjs/types/internal/webComponent.types.js +1 -0
  58. package/lib/commonjs/types/internal/webComponent.types.js.map +1 -1
  59. package/lib/commonjs/types/shared/activity.types.js +7 -0
  60. package/lib/commonjs/types/shared/activity.types.js.map +1 -1
  61. package/lib/commonjs/types/shared/error.types.js +29 -0
  62. package/lib/commonjs/types/shared/error.types.js.map +1 -0
  63. package/lib/commonjs/types/shared/index.js +22 -0
  64. package/lib/commonjs/types/shared/index.js.map +1 -1
  65. package/lib/commonjs/types/shared/multipleCards.types.js +13 -0
  66. package/lib/commonjs/types/shared/multipleCards.types.js.map +1 -0
  67. package/lib/commonjs/types/shared/onLoadResponse.types.js +4 -0
  68. package/lib/commonjs/types/shared/onLoadResponse.types.js.map +1 -1
  69. package/lib/commonjs/unitSdkManager/UnitSdk.api.js +6 -13
  70. package/lib/commonjs/unitSdkManager/UnitSdk.api.js.map +1 -1
  71. package/lib/commonjs/unitSdkManager/UnitSdk.constants.js +1 -1
  72. package/lib/commonjs/unitSdkManager/UnitSdk.constants.js.map +1 -1
  73. package/lib/commonjs/unitSdkManager/UnitSdkManager.js +8 -18
  74. package/lib/commonjs/unitSdkManager/UnitSdkManager.js.map +1 -1
  75. package/lib/commonjs/utils/AppInfo.js +49 -0
  76. package/lib/commonjs/utils/AppInfo.js.map +1 -0
  77. package/lib/commonjs/utils/SDKInfo.js +13 -0
  78. package/lib/commonjs/utils/SDKInfo.js.map +1 -0
  79. package/lib/commonjs/webComponent/WebComponent.js +30 -32
  80. package/lib/commonjs/webComponent/WebComponent.js.map +1 -1
  81. package/lib/commonjs/webComponent/WebComponent.utils.js +19 -1
  82. package/lib/commonjs/webComponent/WebComponent.utils.js.map +1 -1
  83. package/lib/module/components/UNACHCreditComponent/UNACHCreditComponent.js +2 -2
  84. package/lib/module/components/UNACHCreditComponent/UNACHCreditComponent.js.map +1 -1
  85. package/lib/module/components/UNACHDebitComponent/UNACHDebitComponent.js +2 -2
  86. package/lib/module/components/UNACHDebitComponent/UNACHDebitComponent.js.map +1 -1
  87. package/lib/module/components/UNAccountComponent/UNAccountComponent.js +11 -6
  88. package/lib/module/components/UNAccountComponent/UNAccountComponent.js.map +1 -1
  89. package/lib/module/components/UNActivityComponent/UNActivityComponent.js +13 -8
  90. package/lib/module/components/UNActivityComponent/UNActivityComponent.js.map +1 -1
  91. package/lib/module/components/UNActivityComponent/UNActivityComponent.utils.js +4 -0
  92. package/lib/module/components/UNActivityComponent/UNActivityComponent.utils.js.map +1 -1
  93. package/lib/module/components/UNBottomSheetComponent/UNBottomSheetComponent.js +22 -8
  94. package/lib/module/components/UNBottomSheetComponent/UNBottomSheetComponent.js.map +1 -1
  95. package/lib/module/components/UNBottomSheetComponent/components/UNAddToWalletBottomSheetItem/UNAddToWalletBottomSheetItem.js +7 -2
  96. package/lib/module/components/UNBottomSheetComponent/components/UNAddToWalletBottomSheetItem/UNAddToWalletBottomSheetItem.js.map +1 -1
  97. package/lib/module/components/UNCardComponent/UNCardComponent.js +12 -8
  98. package/lib/module/components/UNCardComponent/UNCardComponent.js.map +1 -1
  99. package/lib/module/components/UNMultipleCardsComponent/UNMultipleCardsComponent.js +77 -0
  100. package/lib/module/components/UNMultipleCardsComponent/UNMultipleCardsComponent.js.map +1 -0
  101. package/lib/module/components/UNMultipleCardsComponent/UNMultipleCardsComponent.utils.js +33 -0
  102. package/lib/module/components/UNMultipleCardsComponent/UNMultipleCardsComponent.utils.js.map +1 -0
  103. package/lib/module/components/UNMultipleCardsComponent/index.js +2 -0
  104. package/lib/module/components/UNMultipleCardsComponent/index.js.map +1 -0
  105. package/lib/module/components/index.js +1 -0
  106. package/lib/module/components/index.js.map +1 -1
  107. package/lib/module/flows/card/UNCardFlows.js +8 -3
  108. package/lib/module/flows/card/UNCardFlows.js.map +1 -1
  109. package/lib/module/helpers/pushProvisioningService/helpers.js +24 -0
  110. package/lib/module/helpers/pushProvisioningService/helpers.js.map +1 -0
  111. package/lib/module/helpers/pushProvisioningService/hooks/useCardWallet.js +35 -5
  112. package/lib/module/helpers/pushProvisioningService/hooks/useCardWallet.js.map +1 -1
  113. package/lib/module/helpers/pushProvisioningService/types.js +34 -0
  114. package/lib/module/helpers/pushProvisioningService/types.js.map +1 -0
  115. package/lib/module/hooks/useListenerToEvent.js +19 -0
  116. package/lib/module/hooks/useListenerToEvent.js.map +1 -0
  117. package/lib/module/messages/webMessages/index.js.map +1 -1
  118. package/lib/module/messages/webMessages/multipleCardsMessage.js +5 -0
  119. package/lib/module/messages/webMessages/multipleCardsMessage.js.map +1 -0
  120. package/lib/module/messages/webMessages/onLoadMessage.js +2 -1
  121. package/lib/module/messages/webMessages/onLoadMessage.js.map +1 -1
  122. package/lib/module/networking/requests/UNWalletPayloadRequest.js +27 -3
  123. package/lib/module/networking/requests/UNWalletPayloadRequest.js.map +1 -1
  124. package/lib/module/slices/ConfigurationSlice.js +25 -0
  125. package/lib/module/slices/ConfigurationSlice.js.map +1 -0
  126. package/lib/module/slices/SharedEventsSlice.js +19 -0
  127. package/lib/module/slices/SharedEventsSlice.js.map +1 -0
  128. package/lib/module/store/store.js +5 -1
  129. package/lib/module/store/store.js.map +1 -1
  130. package/lib/module/types/internal/errorHelpers.js +12 -0
  131. package/lib/module/types/internal/errorHelpers.js.map +1 -0
  132. package/lib/module/types/internal/webComponent.types.js +1 -0
  133. package/lib/module/types/internal/webComponent.types.js.map +1 -1
  134. package/lib/module/types/shared/activity.types.js +5 -1
  135. package/lib/module/types/shared/activity.types.js.map +1 -1
  136. package/lib/module/types/shared/error.types.js +22 -0
  137. package/lib/module/types/shared/error.types.js.map +1 -0
  138. package/lib/module/types/shared/index.js +2 -0
  139. package/lib/module/types/shared/index.js.map +1 -1
  140. package/lib/module/types/shared/multipleCards.types.js +6 -0
  141. package/lib/module/types/shared/multipleCards.types.js.map +1 -0
  142. package/lib/module/types/shared/onLoadResponse.types.js +1 -1
  143. package/lib/module/types/shared/onLoadResponse.types.js.map +1 -1
  144. package/lib/module/unitSdkManager/UnitSdk.api.js +5 -10
  145. package/lib/module/unitSdkManager/UnitSdk.api.js.map +1 -1
  146. package/lib/module/unitSdkManager/UnitSdk.constants.js +1 -1
  147. package/lib/module/unitSdkManager/UnitSdk.constants.js.map +1 -1
  148. package/lib/module/unitSdkManager/UnitSdkManager.js +8 -17
  149. package/lib/module/unitSdkManager/UnitSdkManager.js.map +1 -1
  150. package/lib/module/utils/AppInfo.js +39 -0
  151. package/lib/module/utils/AppInfo.js.map +1 -0
  152. package/lib/module/utils/SDKInfo.js +5 -0
  153. package/lib/module/utils/SDKInfo.js.map +1 -0
  154. package/lib/module/webComponent/WebComponent.js +33 -34
  155. package/lib/module/webComponent/WebComponent.js.map +1 -1
  156. package/lib/module/webComponent/WebComponent.utils.js +15 -0
  157. package/lib/module/webComponent/WebComponent.utils.js.map +1 -1
  158. package/lib/typescript/{components → src/components}/UNActivityComponent/UNActivityComponent.d.ts +3 -0
  159. package/lib/typescript/src/components/UNMultipleCardsComponent/UNMultipleCardsComponent.d.ts +15 -0
  160. package/lib/typescript/src/components/UNMultipleCardsComponent/UNMultipleCardsComponent.utils.d.ts +3 -0
  161. package/lib/typescript/src/components/UNMultipleCardsComponent/index.d.ts +1 -0
  162. package/lib/typescript/{components → src/components}/index.d.ts +1 -0
  163. package/lib/typescript/src/helpers/pushProvisioningService/helpers.d.ts +4 -0
  164. package/lib/typescript/src/helpers/pushProvisioningService/types.d.ts +49 -0
  165. package/lib/typescript/src/hooks/useListenerToEvent.d.ts +9 -0
  166. package/lib/typescript/{messages → src/messages}/webMessages/index.d.ts +3 -2
  167. package/lib/typescript/src/messages/webMessages/multipleCardsMessage.d.ts +6 -0
  168. package/lib/typescript/{messages → src/messages}/webMessages/onLoadMessage.d.ts +7 -3
  169. package/lib/typescript/{networking → src/networking}/requests/UNWalletPayloadRequest.d.ts +1 -1
  170. package/lib/typescript/src/slices/ConfigurationSlice.d.ts +10 -0
  171. package/lib/typescript/src/slices/SharedEventsSlice.d.ts +56 -0
  172. package/lib/typescript/src/store/store.d.ts +76 -0
  173. package/lib/typescript/src/types/internal/errorHelpers.d.ts +4 -0
  174. package/lib/typescript/{types → src/types}/internal/webComponent.types.d.ts +1 -0
  175. package/lib/typescript/{types → src/types}/shared/activity.types.d.ts +5 -1
  176. package/lib/typescript/src/types/shared/error.types.d.ts +36 -0
  177. package/lib/typescript/{types → src/types}/shared/index.d.ts +2 -0
  178. package/lib/typescript/src/types/shared/multipleCards.types.d.ts +6 -0
  179. package/lib/typescript/src/types/shared/onLoadResponse.types.d.ts +5 -0
  180. package/lib/typescript/src/unitSdkManager/UnitSdk.api.d.ts +1 -0
  181. package/lib/typescript/{unitSdkManager → src/unitSdkManager}/UnitSdkManager.d.ts +4 -8
  182. package/lib/typescript/src/utils/AppInfo.d.ts +4 -0
  183. package/lib/typescript/src/utils/SDKInfo.d.ts +1 -0
  184. package/lib/typescript/{webComponent → src/webComponent}/WebComponent.utils.d.ts +3 -0
  185. package/package.json +3 -3
  186. package/src/components/UNACHCreditComponent/UNACHCreditComponent.tsx +2 -2
  187. package/src/components/UNACHDebitComponent/UNACHDebitComponent.tsx +2 -2
  188. package/src/components/UNAccountComponent/UNAccountComponent.tsx +25 -12
  189. package/src/components/UNActivityComponent/UNActivityComponent.tsx +33 -16
  190. package/src/components/UNActivityComponent/UNActivityComponent.utils.ts +4 -1
  191. package/src/components/UNBottomSheetComponent/UNBottomSheetComponent.tsx +42 -16
  192. package/src/components/UNBottomSheetComponent/components/UNAddToWalletBottomSheetItem/UNAddToWalletBottomSheetItem.tsx +7 -2
  193. package/src/components/UNCardComponent/UNCardComponent.tsx +11 -10
  194. package/src/components/UNMultipleCardsComponent/UNMultipleCardsComponent.tsx +119 -0
  195. package/src/components/UNMultipleCardsComponent/UNMultipleCardsComponent.utils.ts +36 -0
  196. package/src/components/UNMultipleCardsComponent/index.ts +3 -0
  197. package/src/components/index.ts +1 -0
  198. package/src/flows/card/UNCardFlows.ts +10 -4
  199. package/src/helpers/pushProvisioningService/helpers.ts +31 -0
  200. package/src/helpers/pushProvisioningService/hooks/useCardWallet.ts +35 -6
  201. package/src/helpers/pushProvisioningService/types.ts +52 -0
  202. package/src/hooks/useListenerToEvent.ts +32 -0
  203. package/src/messages/webMessages/index.ts +3 -0
  204. package/src/messages/webMessages/multipleCardsMessage.ts +9 -0
  205. package/src/messages/webMessages/onLoadMessage.ts +14 -3
  206. package/src/networking/requests/UNWalletPayloadRequest.ts +25 -4
  207. package/src/slices/ConfigurationSlice.ts +31 -0
  208. package/src/slices/SharedEventsSlice.ts +93 -0
  209. package/src/store/store.ts +6 -2
  210. package/src/types/internal/errorHelpers.ts +22 -0
  211. package/src/types/internal/webComponent.types.ts +1 -1
  212. package/src/types/shared/activity.types.ts +6 -1
  213. package/src/types/shared/error.types.ts +38 -0
  214. package/src/types/shared/index.ts +2 -0
  215. package/src/types/shared/multipleCards.types.ts +8 -0
  216. package/src/types/shared/onLoadResponse.types.ts +2 -12
  217. package/src/unitSdkManager/UnitSdk.api.ts +5 -8
  218. package/src/unitSdkManager/UnitSdk.constants.ts +1 -1
  219. package/src/unitSdkManager/UnitSdkManager.ts +8 -20
  220. package/src/utils/AppInfo.ts +40 -0
  221. package/src/utils/SDKInfo.ts +5 -0
  222. package/src/webComponent/WebComponent.tsx +37 -34
  223. package/src/webComponent/WebComponent.utils.ts +17 -0
  224. package/android/src/main/java/com/unitreactnativecomponents/getapplicationid/UNAppInfoModule.kt +0 -35
  225. package/ios/UNAppInfo/UNAppInfo.swift +0 -23
  226. package/lib/commonjs/components/utils/nativeModulesInfo.js +0 -20
  227. package/lib/commonjs/components/utils/nativeModulesInfo.js.map +0 -1
  228. package/lib/commonjs/helpers/EventBus.js +0 -58
  229. package/lib/commonjs/helpers/EventBus.js.map +0 -1
  230. package/lib/commonjs/hooks/listenerToBus.js +0 -34
  231. package/lib/commonjs/hooks/listenerToBus.js.map +0 -1
  232. package/lib/module/components/utils/nativeModulesInfo.js +0 -13
  233. package/lib/module/components/utils/nativeModulesInfo.js.map +0 -1
  234. package/lib/module/helpers/EventBus.js +0 -51
  235. package/lib/module/helpers/EventBus.js.map +0 -1
  236. package/lib/module/hooks/listenerToBus.js +0 -25
  237. package/lib/module/hooks/listenerToBus.js.map +0 -1
  238. package/lib/typescript/components/utils/nativeModulesInfo.d.ts +0 -1
  239. package/lib/typescript/helpers/EventBus.d.ts +0 -13
  240. package/lib/typescript/hooks/listenerToBus.d.ts +0 -7
  241. package/lib/typescript/store/store.d.ts +0 -6
  242. package/lib/typescript/types/shared/onLoadResponse.types.d.ts +0 -14
  243. package/lib/typescript/unitSdkManager/UnitSdk.api.d.ts +0 -3
  244. package/src/components/utils/nativeModulesInfo.ts +0 -11
  245. package/src/helpers/EventBus.ts +0 -58
  246. package/src/hooks/listenerToBus.ts +0 -31
  247. /package/lib/typescript/{assets → src/assets}/images/index.d.ts +0 -0
  248. /package/lib/typescript/{components → src/components}/UNACHCreditComponent/UNACHCreditComponent.d.ts +0 -0
  249. /package/lib/typescript/{components → src/components}/UNACHCreditComponent/UNACHCreditComponent.utils.d.ts +0 -0
  250. /package/lib/typescript/{components → src/components}/UNACHCreditComponent/index.d.ts +0 -0
  251. /package/lib/typescript/{components → src/components}/UNACHDebitComponent/UNACHDebitComponent.d.ts +0 -0
  252. /package/lib/typescript/{components → src/components}/UNACHDebitComponent/UNACHDebitComponent.utils.d.ts +0 -0
  253. /package/lib/typescript/{components → src/components}/UNACHDebitComponent/index.d.ts +0 -0
  254. /package/lib/typescript/{components → src/components}/UNAccountComponent/UNAccountComponent.d.ts +0 -0
  255. /package/lib/typescript/{components → src/components}/UNAccountComponent/UNAccountComponent.utils.d.ts +0 -0
  256. /package/lib/typescript/{components → src/components}/UNAccountComponent/index.d.ts +0 -0
  257. /package/lib/typescript/{components → src/components}/UNActivityComponent/UNActivityComponent.utils.d.ts +0 -0
  258. /package/lib/typescript/{components → src/components}/UNActivityComponent/index.d.ts +0 -0
  259. /package/lib/typescript/{components → src/components}/UNBookPaymentComponent/UNBookPaymentComponent.d.ts +0 -0
  260. /package/lib/typescript/{components → src/components}/UNBookPaymentComponent/UNBookPaymentComponent.utils.d.ts +0 -0
  261. /package/lib/typescript/{components → src/components}/UNBookPaymentComponent/index.d.ts +0 -0
  262. /package/lib/typescript/{components → src/components}/UNBottomSheetComponent/UNBottomSheetComponent.constants.d.ts +0 -0
  263. /package/lib/typescript/{components → src/components}/UNBottomSheetComponent/UNBottomSheetComponent.d.ts +0 -0
  264. /package/lib/typescript/{components → src/components}/UNBottomSheetComponent/UNBottomSheetComponent.styles.d.ts +0 -0
  265. /package/lib/typescript/{components → src/components}/UNBottomSheetComponent/UNBottomSheetComponent.utils.d.ts +0 -0
  266. /package/lib/typescript/{components → src/components}/UNBottomSheetComponent/components/UNAddToWalletBottomSheetItem/UNAddToWalletBottomSheetItem.d.ts +0 -0
  267. /package/lib/typescript/{components → src/components}/UNBottomSheetComponent/components/UNAddToWalletBottomSheetItem/UNAddToWalletBottomSheetItem.styles.d.ts +0 -0
  268. /package/lib/typescript/{components → src/components}/UNBottomSheetComponent/components/UNAddToWalletBottomSheetItem/index.d.ts +0 -0
  269. /package/lib/typescript/{components → src/components}/UNBottomSheetComponent/components/index.d.ts +0 -0
  270. /package/lib/typescript/{components → src/components}/UNBottomSheetComponent/index.d.ts +0 -0
  271. /package/lib/typescript/{components → src/components}/UNCardComponent/UNCardComponent.d.ts +0 -0
  272. /package/lib/typescript/{components → src/components}/UNCardComponent/UNCardComponent.utils.d.ts +0 -0
  273. /package/lib/typescript/{components → src/components}/UNCardComponent/index.d.ts +0 -0
  274. /package/lib/typescript/{components → src/components}/UNCheckDepositComponent/UNCheckDepositComponent.d.ts +0 -0
  275. /package/lib/typescript/{components → src/components}/UNCheckDepositComponent/UNCheckDepositComponent.utils.d.ts +0 -0
  276. /package/lib/typescript/{components → src/components}/UNCheckDepositComponent/index.d.ts +0 -0
  277. /package/lib/typescript/{flows → src/flows}/UNFlows.d.ts +0 -0
  278. /package/lib/typescript/{flows → src/flows}/card/UNCardFlows.d.ts +0 -0
  279. /package/lib/typescript/{helpers → src/helpers}/BottomSheet/BottomSheet.d.ts +0 -0
  280. /package/lib/typescript/{helpers → src/helpers}/BottomSheet/BottomSheet.styles.d.ts +0 -0
  281. /package/lib/typescript/{helpers → src/helpers}/pushProvisioningService/hooks/useCardWallet.d.ts +0 -0
  282. /package/lib/typescript/{helpers → src/helpers}/pushProvisioningService/hooks/useLaunchInitialize.d.ts +0 -0
  283. /package/lib/typescript/{helpers → src/helpers}/pushProvisioningService/startProvisioning.d.ts +0 -0
  284. /package/lib/typescript/{helpers → src/helpers}/store/helpers.d.ts +0 -0
  285. /package/lib/typescript/{hooks → src/hooks}/useAppStateListener.d.ts +0 -0
  286. /package/lib/typescript/{index.d.ts → src/index.d.ts} +0 -0
  287. /package/lib/typescript/{messages → src/messages}/nativeMessages/bottomSheetMessage.d.ts +0 -0
  288. /package/lib/typescript/{messages → src/messages}/nativeMessages/cardMessage.d.ts +0 -0
  289. /package/lib/typescript/{messages → src/messages}/nativeMessages/index.d.ts +0 -0
  290. /package/lib/typescript/{messages → src/messages}/nativeMessages/sdkMessage.d.ts +0 -0
  291. /package/lib/typescript/{messages → src/messages}/webMessages/accountMessage.d.ts +0 -0
  292. /package/lib/typescript/{messages → src/messages}/webMessages/achCreditMessage.d.ts +0 -0
  293. /package/lib/typescript/{messages → src/messages}/webMessages/activityMessage.d.ts +0 -0
  294. /package/lib/typescript/{messages → src/messages}/webMessages/bookPaymentMessage.d.ts +0 -0
  295. /package/lib/typescript/{messages → src/messages}/webMessages/cardMessage.d.ts +0 -0
  296. /package/lib/typescript/{messages → src/messages}/webMessages/checkMessage.d.ts +0 -0
  297. /package/lib/typescript/{messages → src/messages}/webMessages/pageMessage.d.ts +0 -0
  298. /package/lib/typescript/{messages → src/messages}/webMessages/paymentsMessage.d.ts +0 -0
  299. /package/lib/typescript/{messages → src/messages}/webMessages/unitMessages.d.ts +0 -0
  300. /package/lib/typescript/{nativeComponent → src/nativeComponent}/UnitAddToWalletButton.d.ts +0 -0
  301. /package/lib/typescript/{networking → src/networking}/common/UNNetworkConstants.d.ts +0 -0
  302. /package/lib/typescript/{scripts → src/scripts}/html/bodyHtml.d.ts +0 -0
  303. /package/lib/typescript/{scripts → src/scripts}/html/bodyScript.d.ts +0 -0
  304. /package/lib/typescript/{scripts → src/scripts}/html/fontFaces.d.ts +0 -0
  305. /package/lib/typescript/{slices → src/slices}/pushProvisioningSlice.d.ts +0 -0
  306. /package/lib/typescript/{store → src/store}/index.d.ts +0 -0
  307. /package/lib/typescript/{styles → src/styles}/fonts.d.ts +0 -0
  308. /package/lib/typescript/{styles → src/styles}/variables.d.ts +0 -0
  309. /package/lib/typescript/{types → src/types}/internal/bottomSheet.types.d.ts +0 -0
  310. /package/lib/typescript/{types → src/types}/shared/account.types.d.ts +0 -0
  311. /package/lib/typescript/{types → src/types}/shared/achCredit.types.d.ts +0 -0
  312. /package/lib/typescript/{types → src/types}/shared/authorization.types.d.ts +0 -0
  313. /package/lib/typescript/{types → src/types}/shared/bookPayment.types.d.ts +0 -0
  314. /package/lib/typescript/{types → src/types}/shared/card.types.d.ts +0 -0
  315. /package/lib/typescript/{types → src/types}/shared/checkDeposit.types.d.ts +0 -0
  316. /package/lib/typescript/{types → src/types}/shared/fonts.types.d.ts +0 -0
  317. /package/lib/typescript/{types → src/types}/shared/payments.types.d.ts +0 -0
  318. /package/lib/typescript/{types → src/types}/shared/transactions.types.d.ts +0 -0
  319. /package/lib/typescript/{types → src/types}/shared/types.d.ts +0 -0
  320. /package/lib/typescript/{types → src/types}/shared/versioning.types.d.ts +0 -0
  321. /package/lib/typescript/{types → src/types}/shared/wallet.types.d.ts +0 -0
  322. /package/lib/typescript/{unitSdkManager → src/unitSdkManager}/UnitSdk.constants.d.ts +0 -0
  323. /package/lib/typescript/{unitSdkManager → src/unitSdkManager}/UnitSdkManager.utils.internal.d.ts +0 -0
  324. /package/lib/typescript/{unitSdkManager → src/unitSdkManager}/unitUiManager/unitUiManager.d.ts +0 -0
  325. /package/lib/typescript/{utils → src/utils}/webVersioningStrategy.utils.d.ts +0 -0
  326. /package/lib/typescript/{webComponent → src/webComponent}/WebComponent.d.ts +0 -0
  327. /package/lib/typescript/{webComponent → src/webComponent}/html.d.ts +0 -0
@@ -1,5 +1,6 @@
1
1
  import type { UNOnLoadResponse } from '../../types/shared';
2
2
  import type { UNActivityOnLoadData } from '../../types/shared/activity.types';
3
+ import type { UNActivityComponentPaginationType } from '../../types/shared';
3
4
  export interface UNActivityComponentProps {
4
5
  customerToken: string;
5
6
  accountId?: string;
@@ -7,6 +8,8 @@ export interface UNActivityComponentProps {
7
8
  theme?: string;
8
9
  language?: string;
9
10
  hideFilterButton?: boolean;
11
+ paginationType?: UNActivityComponentPaginationType;
12
+ transactionsPerPage?: number;
10
13
  onLoad?: (response: UNOnLoadResponse<UNActivityOnLoadData>) => void;
11
14
  }
12
15
  declare const _default: (props: UNActivityComponentProps) => JSX.Element;
@@ -0,0 +1,15 @@
1
+ import type { UNCardData, UNMultipleCardsComponentPaginationType, UNMultipleCardsOnLoadData, UNOnLoadResponse } from '../../types/shared';
2
+ export interface UNMultipleCardsComponentProps {
3
+ customerToken: string;
4
+ paginationType?: UNMultipleCardsComponentPaginationType;
5
+ cardsPerPage?: number;
6
+ disableCardClick?: boolean;
7
+ theme?: string;
8
+ language?: string;
9
+ queryFilter?: string;
10
+ hideTitle?: boolean;
11
+ onLoad?: (response: UNOnLoadResponse<UNMultipleCardsOnLoadData>) => void;
12
+ onCardClicked?: (card: UNCardData) => void;
13
+ }
14
+ declare const _default: (props: UNMultipleCardsComponentProps) => JSX.Element;
15
+ export default _default;
@@ -0,0 +1,3 @@
1
+ import type { UNMultipleCardsComponentProps } from './UNMultipleCardsComponent';
2
+ export declare const getMultipleCardsParams: (props: UNMultipleCardsComponentProps) => string;
3
+ export declare const getMultipleCardsScript: () => string;
@@ -0,0 +1 @@
1
+ export { default as UNMultipleCardsComponent, UNMultipleCardsComponentProps, } from './UNMultipleCardsComponent';
@@ -1,4 +1,5 @@
1
1
  export * from './UNCardComponent';
2
+ export * from './UNMultipleCardsComponent';
2
3
  export * from './UNBottomSheetComponent';
3
4
  export * from './UNBookPaymentComponent';
4
5
  export * from './UNActivityComponent';
@@ -0,0 +1,4 @@
1
+ import { UNNativePromiseReject, UNVPError, UNVPErrorType } from './types';
2
+ export declare const isUNVPError: (error: any) => error is UNVPError;
3
+ export declare const isUNNativePromiseReject: (error: any) => error is UNNativePromiseReject;
4
+ export declare const promiseRejectToUNVPErrorType: (error: any) => UNVPErrorType | null;
@@ -0,0 +1,49 @@
1
+ export declare enum UNVPErrorType {
2
+ EmptyAppId = "EmptyAppId",
3
+ DeviceAuthenticationFailed = "DeviceAuthenticationFailed",
4
+ DeviceRootDetection = "DeviceRootDetection",
5
+ HookDetection = "HookDetection",
6
+ PlayIntegrityCheckFailed = "PlayIntegrityCheckFailed",
7
+ EmptyEncryptedPayload = "EmptyEncryptedPayload",
8
+ NoWallets = "NoWallets",
9
+ InvalidCardId = "InvalidCardId",
10
+ ProvisioningNotAllowed = "ProvisioningNotAllowed",
11
+ CancelledByUser = "CancelledByUser",
12
+ GoogleWalletCreationFailed = "GoogleWalletCreationFailed",
13
+ UnknownErrorOccurred = "UnknownErrorOccurred",
14
+ WalletProvisioningInconclusive = "WalletProvisioningInconclusive",
15
+ WalletProvisioningError = "WalletProvisioningError",
16
+ NetworkFailure = "NetworkFailure",
17
+ SessionExpired = "SessionExpired",
18
+ InvalidInfo = "InvalidInfo",
19
+ PayloadDecryptionFailed = "PayloadDecryptionFailed",
20
+ ApiError = "ApiError",
21
+ InvalidNonce = "InvalidNonce",
22
+ SDKLockout = "SDKLockout",
23
+ NoBrowserFound = "NoBrowserFound",
24
+ TLCMFeatureNotSupported = "TLCMFeatureNotSupported",
25
+ TLCMUnsupportedWallet = "TLCMUnsupportedWallet",
26
+ TLCMDetailsNotFoundInPaySdk = "TLCMDetailsNotFoundInPaySdk",
27
+ TLCMTokenStatusExists = "TLCMTokenStatusExists",
28
+ TLCMInvalidOperationInput = "TLCMInvalidOperationInput",
29
+ TLCMInvalidRequest = "TLCMInvalidRequest",
30
+ TLCMUpdateStatusNotAllowed = "TLCMUpdateStatusNotAllowed",
31
+ TLCMTokenNotFound = "TLCMTokenNotFound"
32
+ }
33
+ export interface UNVPError {
34
+ code: string;
35
+ description: string;
36
+ type: UNVPErrorType;
37
+ correlationId: string;
38
+ }
39
+ export type UNNativePromiseReject = {
40
+ code: string;
41
+ message: string;
42
+ };
43
+ export interface UNMobileWalletPayload {
44
+ data: {
45
+ attributes: {
46
+ payload: string;
47
+ };
48
+ };
49
+ }
@@ -0,0 +1,9 @@
1
+ import type { NativeMessageType } from '../messages/nativeMessages';
2
+ import type { WebViewMessageType } from '../messages/webMessages';
3
+ export type BusEventKey = NativeMessageType | WebViewMessageType;
4
+ type EventListener = {
5
+ busEventKey: BusEventKey;
6
+ action: (data: any) => void;
7
+ };
8
+ export declare const useListenerToEvent: (listener: EventListener) => void;
9
+ export {};
@@ -7,8 +7,9 @@ import type { UnitEvent, UnitMessage } from './unitMessages';
7
7
  import type { AccountEvent, AccountMessage } from './accountMessage';
8
8
  import type { CheckEvent, CheckMessage } from './checkMessage';
9
9
  import type { ActivityEvent, ActivityMessage } from './activityMessage';
10
- export type WebViewMessageType = PageMessage | CardMessage | UnitMessage | PaymentMessage | AccountMessage | CheckMessage | ActivityMessage;
11
- type WebViewEvent = PageEvent | UnitEvent | CardEvent | BookPaymentEvent | PaymentMessage | ACHEvent | AccountEvent | CheckEvent | ActivityEvent;
10
+ import type { MultipleCardsEvent, MultipleCardsMessage } from './multipleCardsMessage';
11
+ export type WebViewMessageType = PageMessage | CardMessage | MultipleCardsMessage | UnitMessage | PaymentMessage | AccountMessage | CheckMessage | ActivityMessage;
12
+ type WebViewEvent = PageEvent | UnitEvent | CardEvent | MultipleCardsEvent | BookPaymentEvent | PaymentMessage | ACHEvent | AccountEvent | CheckEvent | ActivityEvent;
12
13
  export interface WebViewMessage {
13
14
  type: WebViewMessageType;
14
15
  details?: WebViewEvent;
@@ -0,0 +1,6 @@
1
+ import type { UNCardData } from '../../types/shared';
2
+ export declare enum MultipleCardsMessage {
3
+ UNIT_MULTIPLE_CARDS_CARD_CLICKED = "unitMultipleCardsCardClicked"
4
+ }
5
+ export type MultipleCardsCardClickedEvent = UNCardData;
6
+ export type MultipleCardsEvent = MultipleCardsCardClickedEvent;
@@ -4,11 +4,15 @@ import type { UNTransactionData } from '../../types/shared/transactions.types';
4
4
  export declare enum RESPONSE_KEYS {
5
5
  errors = "errors",
6
6
  card = "cardResult",
7
+ cards = "cardsResult",
7
8
  account = "accountResult",
8
9
  counterpartyAccount = "counterpartyResult",
9
10
  transactions = "transactionsResult",
10
- authorization = "authorizationResult"
11
+ authorizations = "authorizationsResult"
11
12
  }
13
+ export type CardsOnLoadResponse = {
14
+ [RESPONSE_KEYS.cards]: UNOnLoadResponseData<[UNCardData]>;
15
+ };
12
16
  export type CardOnLoadResponse = {
13
17
  [RESPONSE_KEYS.card]: UNOnLoadResponseData<UNCardData>;
14
18
  };
@@ -23,8 +27,8 @@ export type ACHOnLoadResponse = {
23
27
  [RESPONSE_KEYS.counterpartyAccount]: UNOnLoadResponseData<[UNCounterpartyAccountData]>;
24
28
  };
25
29
  export type ActivityOnLoadResponse = {
26
- [RESPONSE_KEYS.authorization]: UNOnLoadResponseData<UNAuthorizationData>;
30
+ [RESPONSE_KEYS.authorizations]: UNOnLoadResponseData<UNAuthorizationData>;
27
31
  [RESPONSE_KEYS.transactions]: UNOnLoadResponseData<UNTransactionData>;
28
32
  };
29
- export type UnitOnLoadResponseSuccessData = CardOnLoadResponse | ACHOnLoadResponse | AccountsOnLoadResponse | AccountOnLoadResponse | ActivityOnLoadResponse;
33
+ export type UnitOnLoadResponseSuccessData = CardOnLoadResponse | CardsOnLoadResponse | ACHOnLoadResponse | AccountsOnLoadResponse | AccountOnLoadResponse | ActivityOnLoadResponse;
30
34
  export type UnitOnLoadResponseEvent = UNError | UnitOnLoadResponseSuccessData;
@@ -1,2 +1,2 @@
1
1
  import type { UNEnvironment } from '../../unitSdkManager/UnitSdkManager';
2
- export declare const getMobileWalletPayload: (customerToken: string, cardId: string, env: UNEnvironment, signedNonce: string) => Promise<any>;
2
+ export declare const getMobileWalletPayload: (customerToken: string, cardId: string, env: UNEnvironment, signedNonce: string) => Promise<string | undefined>;
@@ -0,0 +1,10 @@
1
+ import type { RootState } from '../store';
2
+ export interface ConfigurationState {
3
+ unitScript?: string;
4
+ theme?: string;
5
+ language?: string;
6
+ }
7
+ export declare const setUnitScript: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<string | undefined, "Configuration/setUnitScript">, setLanguage: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<string | undefined, "Configuration/setLanguage">, setTheme: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<string | undefined, "Configuration/setTheme">;
8
+ export declare const selectConfiguration: (state: RootState) => ConfigurationState;
9
+ declare const _default: import("redux").Reducer<ConfigurationState, import("redux").AnyAction>;
10
+ export default _default;
@@ -0,0 +1,56 @@
1
+ import type { RootState } from '../store';
2
+ import type { SlotRendering, WebComponentRendering } from '../types/internal/bottomSheet.types';
3
+ import type { UNAccountData, UNCardData } from '../types/shared';
4
+ import type { ActivityFiltersChangedEvent } from '../messages/webMessages/activityMessage';
5
+ import type { RequestRefreshEvent } from '../messages/webMessages/unitMessages';
6
+ import type { BottomSheetNativeMessage } from '../messages/nativeMessages/bottomSheetMessage';
7
+ import type { CardMessage } from '../messages/webMessages/cardMessage';
8
+ import type { AccountMessage } from '../messages/webMessages/accountMessage';
9
+ import type { ActivityMessage } from '../messages/webMessages/activityMessage';
10
+ import type { UnitMessage } from '../messages/webMessages/unitMessages';
11
+ import type { MultipleCardsMessage } from '../messages/webMessages/multipleCardsMessage';
12
+ type EmptyObj = Record<PropertyKey, never>;
13
+ type SlotRenderingEventState = {
14
+ key: BottomSheetNativeMessage.START_FLOW;
15
+ data: SlotRendering;
16
+ };
17
+ type MultipleCardsCardClickedEventState = {
18
+ key: MultipleCardsMessage.UNIT_MULTIPLE_CARDS_CARD_CLICKED;
19
+ data: UNCardData;
20
+ };
21
+ type CardStatusChangedEventState = {
22
+ key: CardMessage.CARD_STATUS_CHANGED;
23
+ data: UNCardData;
24
+ };
25
+ type CardActivatedEventState = {
26
+ key: CardMessage.CARD_ACTIVATED;
27
+ data: UNCardData;
28
+ };
29
+ type AccountChangedEventState = {
30
+ key: AccountMessage.UNIT_ACCOUNT_CHANGED;
31
+ data: UNAccountData;
32
+ };
33
+ type ActivityFiltersChangedEventState = {
34
+ key: ActivityMessage.UNIT_ACTIVITY_FILTERS_CHANGED;
35
+ data: ActivityFiltersChangedEvent;
36
+ };
37
+ type RequestCloseFlowEventState = {
38
+ key: UnitMessage.UNIT_REQUEST_CLOSE_FLOW;
39
+ data: EmptyObj;
40
+ };
41
+ type WebComponentRenderingEventState = {
42
+ key: BottomSheetNativeMessage.START_FLOW;
43
+ data: WebComponentRendering;
44
+ };
45
+ type RequestRefreshEventState = {
46
+ key: UnitMessage.UNIT_REQUEST_REFRESH;
47
+ data: RequestRefreshEvent;
48
+ };
49
+ type SharedEvent = SlotRenderingEventState | CardStatusChangedEventState | CardActivatedEventState | MultipleCardsCardClickedEventState | AccountChangedEventState | ActivityFiltersChangedEventState | RequestCloseFlowEventState | WebComponentRenderingEventState | RequestRefreshEventState;
50
+ type SharedEventsState = {
51
+ event?: SharedEvent;
52
+ };
53
+ export declare const setEvent: import("@reduxjs/toolkit").ActionCreatorWithPayload<SharedEvent, "SharedEvents/setEvent">;
54
+ export declare const selectSharedEvents: (state: RootState) => SharedEventsState;
55
+ declare const _default: import("redux").Reducer<SharedEventsState, import("redux").AnyAction>;
56
+ export default _default;
@@ -0,0 +1,76 @@
1
+ export declare const store: import("@reduxjs/toolkit/dist/configureStore").ToolkitStore<{
2
+ wallet: import("../slices/pushProvisioningSlice").PushProvisioningState;
3
+ configuration: import("../slices/ConfigurationSlice").ConfigurationState;
4
+ sharedEvents: {
5
+ event?: ({
6
+ key: import("../messages/nativeMessages/bottomSheetMessage").BottomSheetNativeMessage;
7
+ data: import("../types/internal/bottomSheet.types").SlotRendering;
8
+ } | {
9
+ key: import("../messages/webMessages/cardMessage").CardMessage.CARD_STATUS_CHANGED;
10
+ data: import("..").UNCardData;
11
+ } | {
12
+ key: import("../messages/webMessages/cardMessage").CardMessage.CARD_ACTIVATED;
13
+ data: import("..").UNCardData;
14
+ } | {
15
+ key: import("../messages/webMessages/multipleCardsMessage").MultipleCardsMessage;
16
+ data: import("..").UNCardData;
17
+ } | {
18
+ key: import("../messages/webMessages/accountMessage").AccountMessage;
19
+ data: import("..").UNAccountData;
20
+ } | {
21
+ key: import("../messages/webMessages/activityMessage").ActivityMessage;
22
+ data: string;
23
+ } | {
24
+ key: import("../messages/webMessages/unitMessages").UnitMessage.UNIT_REQUEST_CLOSE_FLOW;
25
+ data: {
26
+ [x: string]: never;
27
+ [x: number]: never;
28
+ [x: symbol]: never;
29
+ };
30
+ } | {
31
+ key: import("../messages/nativeMessages/bottomSheetMessage").BottomSheetNativeMessage;
32
+ data: import("../types/internal/bottomSheet.types").WebComponentRendering;
33
+ } | {
34
+ key: import("../messages/webMessages/unitMessages").UnitMessage.UNIT_REQUEST_REFRESH;
35
+ data: import("../messages/webMessages/unitMessages").RequestRefreshEvent;
36
+ }) | undefined;
37
+ };
38
+ }, import("redux").AnyAction, [import("@reduxjs/toolkit").ThunkMiddleware<{
39
+ wallet: import("../slices/pushProvisioningSlice").PushProvisioningState;
40
+ configuration: import("../slices/ConfigurationSlice").ConfigurationState;
41
+ sharedEvents: {
42
+ event?: ({
43
+ key: import("../messages/nativeMessages/bottomSheetMessage").BottomSheetNativeMessage;
44
+ data: import("../types/internal/bottomSheet.types").SlotRendering;
45
+ } | {
46
+ key: import("../messages/webMessages/cardMessage").CardMessage.CARD_STATUS_CHANGED;
47
+ data: import("..").UNCardData;
48
+ } | {
49
+ key: import("../messages/webMessages/cardMessage").CardMessage.CARD_ACTIVATED;
50
+ data: import("..").UNCardData;
51
+ } | {
52
+ key: import("../messages/webMessages/multipleCardsMessage").MultipleCardsMessage;
53
+ data: import("..").UNCardData;
54
+ } | {
55
+ key: import("../messages/webMessages/accountMessage").AccountMessage;
56
+ data: import("..").UNAccountData;
57
+ } | {
58
+ key: import("../messages/webMessages/activityMessage").ActivityMessage;
59
+ data: string;
60
+ } | {
61
+ key: import("../messages/webMessages/unitMessages").UnitMessage.UNIT_REQUEST_CLOSE_FLOW;
62
+ data: {
63
+ [x: string]: never;
64
+ [x: number]: never;
65
+ [x: symbol]: never;
66
+ };
67
+ } | {
68
+ key: import("../messages/nativeMessages/bottomSheetMessage").BottomSheetNativeMessage;
69
+ data: import("../types/internal/bottomSheet.types").WebComponentRendering;
70
+ } | {
71
+ key: import("../messages/webMessages/unitMessages").UnitMessage.UNIT_REQUEST_REFRESH;
72
+ data: import("../messages/webMessages/unitMessages").RequestRefreshEvent;
73
+ }) | undefined;
74
+ };
75
+ }, import("redux").AnyAction, undefined>]>;
76
+ export type RootState = ReturnType<typeof store.getState>;
@@ -0,0 +1,4 @@
1
+ import type { UNErrorData } from '../shared/error.types';
2
+ import type { UNError } from '../shared';
3
+ export declare const isUNErrorDataArray: (arr: any) => arr is UNErrorData[];
4
+ export declare const isUNError: (error: any) => error is UNError;
@@ -1,5 +1,6 @@
1
1
  export declare enum WebComponentType {
2
2
  card = "unit-elements-card",
3
+ multipleCards = "unit-elements-multiple-cards",
3
4
  bookPayment = "unit-elements-book-payment",
4
5
  activity = "unit-elements-activity",
5
6
  slot = "unit-elements-sdk-slot",
@@ -1,7 +1,11 @@
1
1
  import type { RESPONSE_KEYS } from '../../messages/webMessages/onLoadMessage';
2
2
  import type { UNAuthorizationData } from './authorization.types';
3
3
  import type { UNTransactionData } from './transactions.types';
4
+ export declare const enum UNActivityComponentPaginationType {
5
+ infiniteScroll = "infiniteScroll",
6
+ pagination = "pagination"
7
+ }
4
8
  export type UNActivityOnLoadData = {
5
- [RESPONSE_KEYS.authorization]: UNAuthorizationData;
9
+ [RESPONSE_KEYS.authorizations]: UNAuthorizationData;
6
10
  [RESPONSE_KEYS.transactions]: UNTransactionData;
7
11
  };
@@ -0,0 +1,36 @@
1
+ export type UNError = {
2
+ errors: UNErrorData[];
3
+ };
4
+ export type UNErrorData = {
5
+ status?: string;
6
+ title: string;
7
+ detail?: string;
8
+ details?: string;
9
+ meta?: UNErrorMeta;
10
+ code?: UNErrorCodes;
11
+ error?: Error;
12
+ };
13
+ interface UNErrorMeta {
14
+ meta: Record<string, string>;
15
+ }
16
+ export declare enum UNErrorCodes {
17
+ FEATURE_DISABLED = "feature_disabled",
18
+ INVALID_VALUE = "invalid_value",
19
+ LIMITS_EXCEEDED = "limits_exceeded",
20
+ NOT_FOUND = "not_found",
21
+ ACCOUNT_CUSTOMER_MISMATCH = "account_customer_mismatch",
22
+ NOT_SUPPORTED_FOR_ACCOUNT_STATUS = "not_supported_for_account_status",
23
+ NOT_SUPPORTED_FOR_ACCOUNT_TYPE = "not_supported_for_account_type",
24
+ NOT_SUPPORTED_FOR_CARD = "not_supported_for_card",
25
+ NOT_SUPPORTED_FOR_CARD_STATUS = "not_supported_for_card_status",
26
+ NOT_SUPPORTED_FOR_CARD_TYPE = "not_supported_for_card_type",
27
+ INVALID_NONCE = "invalid_nonce",
28
+ NOT_SUPPORTED_FOR_PAYMENT_TYPE = "not_supported_for_payment_type",
29
+ PAYMENT_INVALID = "payment_invalid",
30
+ UNAUTHORIZED = "unauthorized",
31
+ FORBIDDEN = "forbidden",
32
+ ALREADY_EXISTS = "already_exists",
33
+ CUSTOMER_NAME_UNDELIVERABLE = "customer_name_undeliverable",
34
+ CUSTOMER_ADDRESS_UNDELIVERABLE = "customer_address_undeliverable"
35
+ }
36
+ export {};
@@ -7,4 +7,6 @@ export * from './account.types';
7
7
  export * from './checkDeposit.types';
8
8
  export * from './activity.types';
9
9
  export * from './fonts.types';
10
+ export * from './error.types';
10
11
  export * from './versioning.types';
12
+ export * from './multipleCards.types';
@@ -0,0 +1,6 @@
1
+ import type { UNCardData } from './card.types';
2
+ export declare const enum UNMultipleCardsComponentPaginationType {
3
+ infiniteScroll = "infiniteScroll",
4
+ pagination = "pagination"
5
+ }
6
+ export type UNMultipleCardsOnLoadData = UNCardData[];
@@ -0,0 +1,5 @@
1
+ import type { UNError } from './error.types';
2
+ export type UNOnLoadResponseData<T> = {
3
+ data: T;
4
+ };
5
+ export type UNOnLoadResponse<T> = UNOnLoadResponseData<T> | UNError;
@@ -0,0 +1 @@
1
+ export declare const fetchUnitScript: () => Promise<null>;
@@ -11,8 +11,6 @@ export declare class UnitSDK {
11
11
  protected static env?: UNEnvironment;
12
12
  protected static webVersioningStrategy: UNWebVersioningStrategy;
13
13
  protected static customerToken?: string;
14
- protected static theme?: string;
15
- protected static language?: string;
16
14
  protected static fonts?: UNFonts;
17
15
  protected static signedNonce?: string;
18
16
  protected static pushProvisionModule?: typeof NativeModules;
@@ -20,17 +18,15 @@ export declare class UnitSDK {
20
18
  static setPushProvisioningModule: (pushProvisionModule: typeof NativeModules) => void;
21
19
  static getPushProvisionModule: () => import("react-native").NativeModulesStatic | undefined;
22
20
  /**
23
- * @deprecated - Unit SDK is managing the signedNonce, no need to provide it
24
- */
21
+ * @deprecated - Unit SDK is managing the signedNonce, no need to provide it
22
+ */
25
23
  static setSignedNonce: (signedNonce: string) => void;
26
24
  static getEnv: () => UNEnvironment | undefined;
27
25
  static getWebVersioningStrategy: () => UNWebVersioningStrategy;
28
- static getTheme: () => string | undefined;
29
- static getLanguage: () => string | undefined;
30
26
  static getFonts: () => UNFonts | undefined;
31
27
  /**
32
- * @deprecated - Unit SDK is managing the signedNonce, no need to provide it
33
- */
28
+ * @deprecated - Unit SDK is managing the signedNonce, no need to provide it
29
+ */
34
30
  static getSignedNonce: () => string | undefined;
35
31
  static setCustomerToken: (customerToken: string) => void;
36
32
  static getCustomerToken: () => string | undefined;
@@ -0,0 +1,4 @@
1
+ export declare const getAppName: () => Promise<any>;
2
+ export declare const getVersion: () => Promise<any>;
3
+ export declare const getBuildNumber: () => Promise<any>;
4
+ export declare const getAppIdentifier: () => Promise<any>;
@@ -0,0 +1 @@
1
+ export declare const getSDKVersion: () => string;
@@ -1,2 +1,5 @@
1
1
  import type { RequestDownloadEvent } from '../messages/webMessages/unitMessages';
2
+ export declare const getInfoParams: () => Promise<{
3
+ [key: string]: string;
4
+ }>;
2
5
  export declare const handleRequestDownload: (details: RequestDownloadEvent, onReadyToShare: () => void) => Promise<void>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-unit-components",
3
- "version": "1.9.1",
3
+ "version": "1.10.0",
4
4
  "description": "Unit React Native components",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",
@@ -63,7 +63,7 @@
63
63
  "react": "17.0.2",
64
64
  "react-native": "0.68.2",
65
65
  "react-native-builder-bob": "^0.18.3",
66
- "react-native-webview": "11.23.1",
66
+ "react-native-webview": "^13.6.2",
67
67
  "typescript": "^4.5.2"
68
68
  },
69
69
  "resolutions": {
@@ -79,7 +79,7 @@
79
79
  "@reduxjs/toolkit": "^1.9.5",
80
80
  "axios": "^1.3.3",
81
81
  "react-native-plaid-link-sdk": "^9.0.1",
82
- "react-native-webview": "11.23.1",
82
+ "react-native-webview": "^13.6.2",
83
83
  "react-redux": "^8.1.2"
84
84
  },
85
85
  "jest": {
@@ -11,7 +11,7 @@ import { RESPONSE_KEYS, UnitOnLoadResponseEvent } from '../../messages/webMessag
11
11
  import { PlaidLinkTokenData, PlaidTokenCreatedEvent, RequestExternalSdkEvent, UnitMessage } from '../../messages/webMessages/unitMessages';
12
12
  import { LinkSuccess, openLink } from 'react-native-plaid-link-sdk';
13
13
  import type WebView from 'react-native-webview';
14
- import { getAndroidPackageName } from '../utils/nativeModulesInfo';
14
+ import * as AppInfo from '../../utils/AppInfo';
15
15
  import { PresentationMode, WebComponentType } from '../../types/internal/webComponent.types';
16
16
  import { withReduxStore } from '../../helpers/store/helpers';
17
17
 
@@ -38,7 +38,7 @@ const UNACHCreditComponent = (props: UNACHCreditComponentProps) => {
38
38
  useEffect(() => {
39
39
  const setPackageNameForAndroid = async () => {
40
40
  if (Platform.OS === 'android') {
41
- const packageName = await getAndroidPackageName();
41
+ const packageName = await AppInfo.getAppIdentifier();
42
42
  setAppPackageName(packageName);
43
43
  }
44
44
  };
@@ -12,7 +12,7 @@ import type WebView from 'react-native-webview';
12
12
  import { PaymentMessage } from '../../messages/webMessages/paymentsMessage';
13
13
  import type { ACHEvent } from '../../messages/webMessages/achCreditMessage';
14
14
  import { RESPONSE_KEYS, UnitOnLoadResponseEvent } from '../../messages/webMessages/onLoadMessage';
15
- import { getAndroidPackageName } from '../utils/nativeModulesInfo';
15
+ import * as AppInfo from '../../utils/AppInfo';
16
16
  import { PresentationMode, WebComponentType } from '../../types/internal/webComponent.types';
17
17
  import { withReduxStore } from '../../helpers/store/helpers';
18
18
 
@@ -38,7 +38,7 @@ const UNACHDebitComponent = (props: UNACHDebitComponentProps) => {
38
38
  useEffect(() => {
39
39
  const setPackageNameForAndroid = async () => {
40
40
  if (Platform.OS === 'android') {
41
- const packageName = await getAndroidPackageName();
41
+ const packageName = await AppInfo.getAppIdentifier();
42
42
  setAppPackageName(packageName);
43
43
  }
44
44
  };
@@ -3,20 +3,31 @@ import { View } from 'react-native';
3
3
  import type WebView from 'react-native-webview';
4
4
  import { HeightEvent, PageMessage } from '../..//messages/webMessages/pageMessage';
5
5
  import { RequestRefreshEvent, RequestRenderingEvent, UnitMessage } from '../../messages/webMessages/unitMessages';
6
- import EventBus from '../../helpers/EventBus';
7
6
  import { WebComponent } from '../../webComponent/WebComponent';
8
7
  import type { WebViewMessage } from '../../messages/webMessages';
9
- import { getAccountParams, getAccountScript, injectOpenActionsMenuScript, injectRefreshEventIfNeeded, injectRequestAccountActionScript } from './UNAccountComponent.utils';
8
+ import {
9
+ getAccountParams,
10
+ getAccountScript,
11
+ injectOpenActionsMenuScript,
12
+ injectRefreshEventIfNeeded,
13
+ injectRequestAccountActionScript,
14
+ } from './UNAccountComponent.utils';
10
15
  import type { UNError, UNOnLoadResponse, UNOnLoadResponseData } from '../../types/shared';
11
- import { useListenerToBus } from '../../hooks/listenerToBus';
12
16
  import type { UNAccountData } from '../../types/shared/account.types';
13
17
  import { AccountMessage } from '../../messages/webMessages/accountMessage';
14
18
  import { RESPONSE_KEYS, UnitOnLoadResponseEvent } from '../../messages/webMessages/onLoadMessage';
15
19
  import type { UNAccountMenuAction } from '../../types/shared';
16
- import { BottomSheetRenderingType, SlotRendering, type BottomSheetSlotData } from '../../types/internal/bottomSheet.types';
20
+ import {
21
+ BottomSheetRenderingType,
22
+ SlotRendering,
23
+ type BottomSheetSlotData,
24
+ } from '../../types/internal/bottomSheet.types';
17
25
  import { PresentationMode, WebComponentType } from '../../types/internal/webComponent.types';
18
26
  import { BottomSheetNativeMessage } from '../../messages/nativeMessages/bottomSheetMessage';
19
27
  import { withReduxStoreAndRefForwarding } from '../../helpers/store/helpers';
28
+ import { useDispatch } from 'react-redux';
29
+ import { setEvent } from '../../slices/SharedEventsSlice';
30
+ import { useListenerToEvent } from '../../hooks/useListenerToEvent';
20
31
 
21
32
  export interface UNAccountComponentProps {
22
33
  // inputs
@@ -45,6 +56,8 @@ export enum UNAccountAction {
45
56
  }
46
57
 
47
58
  const UNAccountComponent = React.forwardRef<UNAccountRef, UNAccountComponentProps>(function UNAccountComponent(props, accountRef) {
59
+
60
+ const dispatch = useDispatch();
48
61
  const [height, setHeight] = useState(0);
49
62
 
50
63
  const [requestRefreshEvent, setRequestRefreshEvent] = useState<RequestRefreshEvent | null>(null);
@@ -78,9 +91,8 @@ const UNAccountComponent = React.forwardRef<UNAccountRef, UNAccountComponentProp
78
91
  console.error('On Load Error: unexpected response type.');
79
92
  return;
80
93
  };
81
-
82
- useListenerToBus({ busEventKey: UnitMessage.UNIT_REQUEST_REFRESH, action: requestRefresh });
83
- useListenerToBus({ busEventKey: AccountMessage.UNIT_ACCOUNT_CHANGED, action: handleAccountChanged });
94
+ useListenerToEvent({ busEventKey: UnitMessage.UNIT_REQUEST_REFRESH, action: requestRefresh });
95
+ useListenerToEvent({ busEventKey: AccountMessage.UNIT_ACCOUNT_CHANGED, action: handleAccountChanged });
84
96
 
85
97
  useEffect(() => {
86
98
  injectRefreshEventIfNeeded(webRef.current, requestRefreshEvent);
@@ -92,7 +104,7 @@ const UNAccountComponent = React.forwardRef<UNAccountRef, UNAccountComponentProp
92
104
  },
93
105
  openAction(action: UNAccountMenuAction) {
94
106
  injectRequestAccountActionScript(webRef.current, action);
95
- }
107
+ },
96
108
  }));
97
109
 
98
110
  const handleMessage = (message: WebViewMessage) => {
@@ -104,15 +116,16 @@ const UNAccountComponent = React.forwardRef<UNAccountRef, UNAccountComponentProp
104
116
  const slotData: BottomSheetSlotData = {
105
117
  componentName: WebComponentType.account,
106
118
  componentResourceId: props.accountId,
107
- requestRenderingEvent: message.details as RequestRenderingEvent
119
+ requestRenderingEvent: message.details as RequestRenderingEvent,
108
120
  };
109
121
 
110
- const event = {
122
+ const data = {
111
123
  type: BottomSheetRenderingType.Slot,
112
- data: slotData
124
+ data: slotData,
113
125
  } as SlotRendering;
114
126
 
115
- EventBus.Instance.event(BottomSheetNativeMessage.START_FLOW, event);
127
+ dispatch(setEvent({ key: BottomSheetNativeMessage.START_FLOW, data }));
128
+
116
129
  break;
117
130
  }
118
131
  case PageMessage.PAGE_HEIGHT: