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
@@ -7,6 +7,10 @@ exports.getMobileWalletPayload = void 0;
7
7
  var _axios = _interopRequireDefault(require("axios"));
8
8
  var _UNNetworkConstants = require("../common/UNNetworkConstants");
9
9
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
10
+ const isUNMobileWalletPayload = object => {
11
+ return 'data' in object && 'attributes' in object.data && 'payload' in object.data.attributes;
12
+ };
13
+
10
14
  // TODO: use apiClient class for handling requests.
11
15
 
12
16
  const getMobileWalletPayload = async (customerToken, cardId, env, signedNonce) => {
@@ -27,10 +31,30 @@ const getMobileWalletPayload = async (customerToken, cardId, env, signedNonce) =
27
31
  const response = await _axios.default.post(baseURL, data, {
28
32
  headers: headers
29
33
  });
30
- const encryptedPayload = response.data.data.attributes.payload;
31
- return encryptedPayload;
34
+ if (!isUNMobileWalletPayload(response.data)) {
35
+ const error = {
36
+ title: `Couldn't get mobile wallet payload. Status:${response.status} Response data:${response.data}`
37
+ };
38
+ throw error;
39
+ } else {
40
+ const encryptedPayload = response.data.data.attributes.payload;
41
+ return encryptedPayload;
42
+ }
32
43
  } catch (error) {
33
- return Promise.reject(error);
44
+ // Converts the error into a UNError
45
+ if (_axios.default.isAxiosError(error) && error.response) {
46
+ const unErrors = error.response.data;
47
+ throw unErrors;
48
+ } else if (error instanceof Error) {
49
+ const unexpectedError = {
50
+ title: 'Unexpected error',
51
+ error: error
52
+ };
53
+ throw unexpectedError;
54
+ }
55
+ throw {
56
+ title: `Unexpected error: ${error}`
57
+ };
34
58
  }
35
59
  };
36
60
  exports.getMobileWalletPayload = getMobileWalletPayload;
@@ -1 +1 @@
1
- {"version":3,"names":["_axios","_interopRequireDefault","require","_UNNetworkConstants","obj","__esModule","default","getMobileWalletPayload","customerToken","cardId","env","signedNonce","headers","APIHeaders","CONTENT_TYPE","data","attributes","baseURL","UNIT_SECURE_URL","response","axios","post","encryptedPayload","payload","error","Promise","reject","exports"],"sources":["UNWalletPayloadRequest.ts"],"sourcesContent":["import axios from 'axios';\nimport { APIHeaders, UNIT_SECURE_URL } from '../common/UNNetworkConstants';\nimport type { UNEnvironment } from '../../unitSdkManager/UnitSdkManager';\n\n// TODO: use apiClient class for handling requests.\n\nexport const getMobileWalletPayload = async (customerToken: string, cardId: string, env: UNEnvironment, signedNonce: string) => {\n if (!signedNonce) return;\n\n const headers = {\n 'Content-Type': APIHeaders.CONTENT_TYPE,\n 'Authorization': `Bearer ${customerToken}`,\n };\n\n const data = {\n data: {\n attributes: {\n signedNonce: signedNonce,\n },\n },\n };\n\n const baseURL = `${UNIT_SECURE_URL[env as keyof typeof UNEnvironment]}/cards/${cardId}/mobile-wallet-payload`;\n try {\n const response = await axios.post(\n baseURL,\n data,\n {\n headers: headers,\n });\n const encryptedPayload = response.data.data.attributes.payload;\n return encryptedPayload;\n } catch (error) {\n return Promise.reject(error);\n }\n};\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,mBAAA,GAAAD,OAAA;AAA2E,SAAAD,uBAAAG,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAG3E;;AAEO,MAAMG,sBAAsB,GAAG,MAAAA,CAAOC,aAAqB,EAAEC,MAAc,EAAEC,GAAkB,EAAEC,WAAmB,KAAK;EAC9H,IAAI,CAACA,WAAW,EAAE;EAElB,MAAMC,OAAO,GAAG;IACd,cAAc,EAAEC,8BAAU,CAACC,YAAY;IACvC,eAAe,EAAG,UAASN,aAAc;EAC3C,CAAC;EAED,MAAMO,IAAI,GAAG;IACXA,IAAI,EAAE;MACJC,UAAU,EAAE;QACVL,WAAW,EAAEA;MACf;IACF;EACF,CAAC;EAED,MAAMM,OAAO,GAAI,GAAEC,mCAAe,CAACR,GAAG,CAAgC,UAASD,MAAO,wBAAuB;EAC7G,IAAI;IACF,MAAMU,QAAQ,GAAG,MAAMC,cAAK,CAACC,IAAI,CAC/BJ,OAAO,EACPF,IAAI,EACJ;MACEH,OAAO,EAAEA;IACX,CAAC,CAAC;IACJ,MAAMU,gBAAgB,GAAGH,QAAQ,CAACJ,IAAI,CAACA,IAAI,CAACC,UAAU,CAACO,OAAO;IAC9D,OAAOD,gBAAgB;EACzB,CAAC,CAAC,OAAOE,KAAK,EAAE;IACd,OAAOC,OAAO,CAACC,MAAM,CAACF,KAAK,CAAC;EAC9B;AACF,CAAC;AAACG,OAAA,CAAApB,sBAAA,GAAAA,sBAAA"}
1
+ {"version":3,"names":["_axios","_interopRequireDefault","require","_UNNetworkConstants","obj","__esModule","default","isUNMobileWalletPayload","object","data","attributes","getMobileWalletPayload","customerToken","cardId","env","signedNonce","headers","APIHeaders","CONTENT_TYPE","baseURL","UNIT_SECURE_URL","response","axios","post","error","title","status","encryptedPayload","payload","isAxiosError","unErrors","Error","unexpectedError","exports"],"sources":["UNWalletPayloadRequest.ts"],"sourcesContent":["import axios from 'axios';\nimport { APIHeaders, UNIT_SECURE_URL } from '../common/UNNetworkConstants';\nimport type { UNEnvironment } from '../../unitSdkManager/UnitSdkManager';\nimport type { UNMobileWalletPayload } from '../../helpers/pushProvisioningService/types';\nimport type { UNError, UNErrorData } from '../../types/shared/error.types';\n\nconst isUNMobileWalletPayload = (object: any): object is UNMobileWalletPayload => {\n return 'data' in object &&\n 'attributes' in object.data &&\n 'payload' in object.data.attributes;\n};\n\n// TODO: use apiClient class for handling requests.\n\nexport const getMobileWalletPayload = async (customerToken: string, cardId: string, env: UNEnvironment, signedNonce: string) => {\n if (!signedNonce) return;\n\n const headers = {\n 'Content-Type': APIHeaders.CONTENT_TYPE,\n 'Authorization': `Bearer ${customerToken}`,\n };\n\n const data = {\n data: {\n attributes: {\n signedNonce: signedNonce,\n },\n },\n };\n\n const baseURL = `${UNIT_SECURE_URL[env as keyof typeof UNEnvironment]}/cards/${cardId}/mobile-wallet-payload`;\n try {\n const response = await axios.post(\n baseURL,\n data,\n {\n headers: headers,\n });\n if (!isUNMobileWalletPayload(response.data)) {\n const error: UNErrorData = {title: `Couldn't get mobile wallet payload. Status:${response.status} Response data:${response.data}`};\n throw error;\n } else {\n const encryptedPayload = response.data.data.attributes.payload;\n return encryptedPayload;\n }\n } catch (error: unknown) {\n // Converts the error into a UNError\n if (axios.isAxiosError<UNError>(error) && error.response) {\n const unErrors = error.response.data;\n throw unErrors;\n } else if (error instanceof Error) {\n const unexpectedError: UNErrorData = {title: 'Unexpected error', error: error};\n throw unexpectedError;\n }\n throw {title: `Unexpected error: ${error}`};\n }\n};\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,mBAAA,GAAAD,OAAA;AAA2E,SAAAD,uBAAAG,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAK3E,MAAMG,uBAAuB,GAAIC,MAAW,IAAsC;EAChF,OAAO,MAAM,IAAIA,MAAM,IACrB,YAAY,IAAIA,MAAM,CAACC,IAAI,IAC3B,SAAS,IAAID,MAAM,CAACC,IAAI,CAACC,UAAU;AACvC,CAAC;;AAED;;AAEO,MAAMC,s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B;IACA,MAAM;MAACP,KAAK,EAAG,qBAAoBD,KAAM;IAAC,CAAC;EAC7C;AACF,CAAC;AAACS,OAAA,CAAAtB,sBAAA,GAAAA,sBAAA"}
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.setUnitScript = exports.setTheme = exports.setLanguage = exports.selectConfiguration = exports.default = void 0;
7
+ var _toolkit = require("@reduxjs/toolkit");
8
+ const initialState = {};
9
+ const ConfigurationSlice = (0, _toolkit.createSlice)({
10
+ name: 'Configuration',
11
+ initialState: initialState,
12
+ reducers: {
13
+ setUnitScript(state, action) {
14
+ state.unitScript = action.payload;
15
+ },
16
+ setTheme(state, action) {
17
+ state.theme = action.payload;
18
+ },
19
+ setLanguage(state, action) {
20
+ state.language = action.payload;
21
+ }
22
+ }
23
+ });
24
+ const {
25
+ setUnitScript,
26
+ setLanguage,
27
+ setTheme
28
+ } = ConfigurationSlice.actions;
29
+ exports.setTheme = setTheme;
30
+ exports.setLanguage = setLanguage;
31
+ exports.setUnitScript = setUnitScript;
32
+ const selectConfiguration = state => state.configuration;
33
+ exports.selectConfiguration = selectConfiguration;
34
+ var _default = ConfigurationSlice.reducer;
35
+ exports.default = _default;
36
+ //# sourceMappingURL=ConfigurationSlice.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_toolkit","require","initialState","ConfigurationSlice","createSlice","name","reducers","setUnitScript","state","action","unitScript","payload","setTheme","theme","setLanguage","language","actions","exports","selectConfiguration","configuration","_default","reducer","default"],"sources":["ConfigurationSlice.ts"],"sourcesContent":["import { createSlice, PayloadAction } from '@reduxjs/toolkit';\nimport type { RootState } from '../store';\n\nexport interface ConfigurationState {\n unitScript?: string;\n theme?: string;\n language?: string;\n}\n\nconst initialState: ConfigurationState = {};\n\nconst ConfigurationSlice = createSlice({\n name: 'Configuration',\n initialState: initialState,\n reducers: {\n setUnitScript(state, action: PayloadAction<string | undefined>) {\n state.unitScript = action.payload;\n },\n setTheme(state, action: PayloadAction<string | undefined>) {\n state.theme = action.payload;\n },\n setLanguage(state, action: PayloadAction<string | undefined>) {\n state.language = action.payload;\n },\n },\n\n});\n\nexport const { setUnitScript, setLanguage, setTheme } = ConfigurationSlice.actions;\nexport const selectConfiguration = (state: RootState) => state.configuration;\nexport default ConfigurationSlice.reducer;\n"],"mappings":";;;;;;AAAA,IAAAA,QAAA,GAAAC,OAAA;AASA,MAAMC,YAAgC,GAAG,CAAC,CAAC;AAE3C,MAAMC,kBAAkB,GAAG,IAAAC,oBAAW,EAAC;EACrCC,IAAI,EAAE,eAAe;EACrBH,YAAY,EAAEA,YAAY;EAC1BI,QAAQ,EAAE;IACRC,aAAaA,CAACC,KAAK,EAAEC,MAAyC,EAAE;MAC9DD,KAAK,CAACE,UAAU,GAAGD,MAAM,CAACE,OAAO;IACnC,CAAC;IACDC,QAAQA,CAACJ,KAAK,EAAEC,MAAyC,EAAE;MACzDD,KAAK,CAACK,KAAK,GAAGJ,MAAM,CAACE,OAAO;IAC9B,CAAC;IACDG,WAAWA,CAACN,KAAK,EAAEC,MAAyC,EAAE;MAC5DD,KAAK,CAACO,QAAQ,GAAGN,MAAM,CAACE,OAAO;IACjC;EACF;AAEF,CAAC,CAAC;AAEK,MAAM;EAAEJ,aAAa;EAAEO,WAAW;EAAEF;AAAS,CAAC,GAAGT,kBAAkB,CAACa,OAAO;AAACC,OAAA,CAAAL,QAAA,GAAAA,QAAA;AAAAK,OAAA,CAAAH,WAAA,GAAAA,WAAA;AAAAG,OAAA,CAAAV,aAAA,GAAAA,aAAA;AAC5E,MAAMW,mBAAmB,GAAIV,KAAgB,IAAKA,KAAK,CAACW,aAAa;AAACF,OAAA,CAAAC,mBAAA,GAAAA,mBAAA;AAAA,IAAAE,QAAA,GAC9DjB,kBAAkB,CAACkB,OAAO;AAAAJ,OAAA,CAAAK,OAAA,GAAAF,QAAA"}
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.setEvent = exports.selectSharedEvents = exports.default = void 0;
7
+ var _toolkit = require("@reduxjs/toolkit");
8
+ /* eslint-disable @typescript-eslint/no-explicit-any */
9
+
10
+ const initialState = {};
11
+ const SharedEventsSlice = (0, _toolkit.createSlice)({
12
+ name: 'SharedEvents',
13
+ initialState: initialState,
14
+ reducers: {
15
+ setEvent(state, action) {
16
+ state.event = action.payload;
17
+ }
18
+ }
19
+ });
20
+ const {
21
+ setEvent
22
+ } = SharedEventsSlice.actions;
23
+ exports.setEvent = setEvent;
24
+ const selectSharedEvents = state => state.sharedEvents;
25
+ exports.selectSharedEvents = selectSharedEvents;
26
+ var _default = SharedEventsSlice.reducer;
27
+ exports.default = _default;
28
+ //# sourceMappingURL=SharedEventsSlice.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_toolkit","require","initialState","SharedEventsSlice","createSlice","name","reducers","setEvent","state","action","event","payload","actions","exports","selectSharedEvents","sharedEvents","_default","reducer","default"],"sources":["SharedEventsSlice.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\n\nimport { createSlice, PayloadAction } from '@reduxjs/toolkit';\nimport type { RootState } from '../store';\nimport type { SlotRendering, WebComponentRendering } from '../types/internal/bottomSheet.types';\nimport type { UNAccountData, UNCardData } from '../types/shared';\nimport type { ActivityFiltersChangedEvent } from '../messages/webMessages/activityMessage';\nimport type { RequestRefreshEvent } from '../messages/webMessages/unitMessages';\nimport type { BottomSheetNativeMessage } from '../messages/nativeMessages/bottomSheetMessage';\nimport type { CardMessage } from '../messages/webMessages/cardMessage';\nimport type { AccountMessage } from '../messages/webMessages/accountMessage';\nimport type { ActivityMessage } from '../messages/webMessages/activityMessage';\nimport type { UnitMessage } from '../messages/webMessages/unitMessages';\nimport type { MultipleCardsMessage } from '../messages/webMessages/multipleCardsMessage';\n\ntype EmptyObj = Record<PropertyKey, never>;\n\ntype SlotRenderingEventState = {\n key: BottomSheetNativeMessage.START_FLOW,\n data: SlotRendering\n}\ntype MultipleCardsCardClickedEventState = {\n key: MultipleCardsMessage.UNIT_MULTIPLE_CARDS_CARD_CLICKED,\n data: UNCardData\n}\n\ntype CardStatusChangedEventState = {\n key: CardMessage.CARD_STATUS_CHANGED,\n data: UNCardData\n}\n\ntype CardActivatedEventState = {\n key: CardMessage.CARD_ACTIVATED,\n data: UNCardData\n}\n\ntype AccountChangedEventState = {\n key: AccountMessage.UNIT_ACCOUNT_CHANGED,\n data: UNAccountData\n}\n\ntype ActivityFiltersChangedEventState = {\n key: ActivityMessage.UNIT_ACTIVITY_FILTERS_CHANGED\n data: ActivityFiltersChangedEvent\n}\n\ntype RequestCloseFlowEventState = {\n key: UnitMessage.UNIT_REQUEST_CLOSE_FLOW,\n data: EmptyObj\n}\n\ntype WebComponentRenderingEventState = {\n key: BottomSheetNativeMessage.START_FLOW,\n data: WebComponentRendering\n}\n\ntype RequestRefreshEventState = {\n key: UnitMessage.UNIT_REQUEST_REFRESH,\n data: RequestRefreshEvent\n}\n\n//currently left state suffixes to avoid the duplication of the event names\ntype SharedEvent =\n SlotRenderingEventState\n | CardStatusChangedEventState\n | CardActivatedEventState\n | MultipleCardsCardClickedEventState\n | AccountChangedEventState\n | ActivityFiltersChangedEventState\n | RequestCloseFlowEventState\n | WebComponentRenderingEventState\n | RequestRefreshEventState\n\ntype SharedEventsState = {\n event?: SharedEvent\n}\n\nconst initialState: SharedEventsState = {};\n\nconst SharedEventsSlice = createSlice({\n name: 'SharedEvents',\n initialState: initialState,\n reducers: {\n setEvent(state, action: PayloadAction<SharedEvent>) {\n state.event = action.payload;\n },\n },\n\n});\n\nexport const { setEvent } = SharedEventsSlice.actions;\nexport const selectSharedEvents = (state: RootState) => state.sharedEvents;\nexport default SharedEventsSlice.reducer;\n"],"mappings":";;;;;;AAEA,IAAAA,QAAA,GAAAC,OAAA;AAFA;;AA6EA,MAAMC,YAA+B,GAAG,CAAC,CAAC;AAE1C,MAAMC,iBAAiB,GAAG,IAAAC,oBAAW,EAAC;EACpCC,IAAI,EAAE,cAAc;EACpBH,YAAY,EAAEA,YAAY;EAC1BI,QAAQ,EAAE;IACRC,QAAQA,CAACC,KAAK,EAAEC,MAAkC,EAAE;MAClDD,KAAK,CAACE,KAAK,GAAGD,MAAM,CAACE,OAAO;IAC9B;EACF;AAEF,CAAC,CAAC;AAEK,MAAM;EAAEJ;AAAS,CAAC,GAAGJ,iBAAiB,CAACS,OAAO;AAACC,OAAA,CAAAN,QAAA,GAAAA,QAAA;AAC/C,MAAMO,kBAAkB,GAAIN,KAAgB,IAAKA,KAAK,CAACO,YAAY;AAACF,OAAA,CAAAC,kBAAA,GAAAA,kBAAA;AAAA,IAAAE,QAAA,GAC5Db,iBAAiB,CAACc,OAAO;AAAAJ,OAAA,CAAAK,OAAA,GAAAF,QAAA"}
@@ -6,10 +6,14 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.store = void 0;
7
7
  var _toolkit = require("@reduxjs/toolkit");
8
8
  var _pushProvisioningSlice = _interopRequireDefault(require("../slices/pushProvisioningSlice"));
9
+ var _ConfigurationSlice = _interopRequireDefault(require("../slices/ConfigurationSlice"));
10
+ var _SharedEventsSlice = _interopRequireDefault(require("../slices/SharedEventsSlice"));
9
11
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
10
12
  const store = (0, _toolkit.configureStore)({
11
13
  reducer: {
12
- wallet: _pushProvisioningSlice.default
14
+ wallet: _pushProvisioningSlice.default,
15
+ configuration: _ConfigurationSlice.default,
16
+ sharedEvents: _SharedEventsSlice.default
13
17
  }
14
18
  });
15
19
  exports.store = store;
@@ -1 +1 @@
1
- {"version":3,"names":["_toolkit","require","_pushProvisioningSlice","_interopRequireDefault","obj","__esModule","default","store","configureStore","reducer","wallet","exports"],"sources":["store.ts"],"sourcesContent":["import { configureStore } from '@reduxjs/toolkit';\nimport wallet from '../slices/pushProvisioningSlice';\n\nexport const store = configureStore({\n reducer: {\n wallet\n }\n});\n\nexport type RootState = ReturnType<typeof store.getState>;\n"],"mappings":";;;;;;AAAA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,sBAAA,GAAAC,sBAAA,CAAAF,OAAA;AAAqD,SAAAE,uBAAAC,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAE9C,MAAMG,KAAK,GAAG,IAAAC,uBAAc,EAAC;EAClCC,OAAO,EAAE;IACPC,MAAM,EAANA;EACF;AACF,CAAC,CAAC;AAACC,OAAA,CAAAJ,KAAA,GAAAA,KAAA"}
1
+ {"version":3,"names":["_toolkit","require","_pushProvisioningSlice","_interopRequireDefault","_ConfigurationSlice","_SharedEventsSlice","obj","__esModule","default","store","configureStore","reducer","wallet","configuration","sharedEvents","exports"],"sources":["store.ts"],"sourcesContent":["import { configureStore } from '@reduxjs/toolkit';\nimport wallet from '../slices/pushProvisioningSlice';\nimport configuration from '../slices/ConfigurationSlice';\nimport sharedEvents from '../slices/SharedEventsSlice';\n\nexport const store = configureStore({\n reducer: {\n wallet,\n configuration,\n sharedEvents,\n },\n});\n\nexport type RootState = ReturnType<typeof store.getState>;\n"],"mappings":";;;;;;AAAA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,sBAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,mBAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,kBAAA,GAAAF,sBAAA,CAAAF,OAAA;AAAuD,SAAAE,uBAAAG,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAEhD,MAAMG,KAAK,GAAG,IAAAC,uBAAc,EAAC;EAClCC,OAAO,EAAE;IACPC,MAAM,EAANA,8BAAM;IACNC,aAAa,EAAbA,2BAAa;IACbC,YAAY,EAAZA;EACF;AACF,CAAC,CAAC;AAACC,OAAA,CAAAN,KAAA,GAAAA,KAAA"}
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.isUNErrorDataArray = exports.isUNError = void 0;
7
+ /* eslint-disable @typescript-eslint/no-explicit-any */
8
+
9
+ const isUNErrorData = obj => {
10
+ return typeof obj === 'object' && 'title' in obj;
11
+ };
12
+ const isUNErrorDataArray = arr => {
13
+ return Array.isArray(arr) && arr.every(item => isUNErrorData(item));
14
+ };
15
+ exports.isUNErrorDataArray = isUNErrorDataArray;
16
+ const isUNError = error => {
17
+ return 'errors' in error && isUNErrorDataArray(error.errors);
18
+ };
19
+ exports.isUNError = isUNError;
20
+ //# sourceMappingURL=errorHelpers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["isUNErrorData","obj","isUNErrorDataArray","arr","Array","isArray","every","item","exports","isUNError","error","errors"],"sources":["errorHelpers.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\n\nimport type { UNErrorData } from '../shared/error.types';\nimport type { UNError } from '../shared';\n\nconst isUNErrorData = (obj: any): obj is UNErrorData => {\n return (\n typeof obj === 'object' &&\n 'title' in obj\n );\n};\n\nexport const isUNErrorDataArray = (arr: any): arr is UNErrorData[] => {\n return (\n Array.isArray(arr) &&\n arr.every((item) => isUNErrorData(item))\n );\n};\n\nexport const isUNError = (error: any): error is UNError => {\n return 'errors' in error && isUNErrorDataArray(error.errors);\n};\n"],"mappings":";;;;;;AAAA;;AAKA,MAAMA,aAAa,GAAIC,GAAQ,IAAyB;EACtD,OACE,OAAOA,GAAG,KAAK,QAAQ,IACvB,OAAO,IAAIA,GAAG;AAElB,CAAC;AAEM,MAAMC,kBAAkB,GAAIC,GAAQ,IAA2B;EACpE,OACEC,KAAK,CAACC,OAAO,CAACF,GAAG,CAAC,IAClBA,GAAG,CAACG,KAAK,CAAEC,IAAI,IAAKP,aAAa,CAACO,IAAI,CAAC,CAAC;AAE5C,CAAC;AAACC,OAAA,CAAAN,kBAAA,GAAAA,kBAAA;AAEK,MAAMO,SAAS,GAAIC,KAAU,IAAuB;EACzD,OAAO,QAAQ,IAAIA,KAAK,IAAIR,kBAAkB,CAACQ,KAAK,CAACC,MAAM,CAAC;AAC9D,CAAC;AAACH,OAAA,CAAAC,SAAA,GAAAA,SAAA"}
@@ -8,6 +8,7 @@ let WebComponentType;
8
8
  exports.WebComponentType = WebComponentType;
9
9
  (function (WebComponentType) {
10
10
  WebComponentType["card"] = "unit-elements-card";
11
+ WebComponentType["multipleCards"] = "unit-elements-multiple-cards";
11
12
  WebComponentType["bookPayment"] = "unit-elements-book-payment";
12
13
  WebComponentType["activity"] = "unit-elements-activity";
13
14
  WebComponentType["slot"] = "unit-elements-sdk-slot";
@@ -1 +1 @@
1
- {"version":3,"names":["WebComponentType","exports","PresentationMode"],"sources":["webComponent.types.ts"],"sourcesContent":["export enum WebComponentType {\n card = 'unit-elements-card',\n bookPayment = 'unit-elements-book-payment',\n activity = 'unit-elements-activity',\n slot = 'unit-elements-sdk-slot',\n account = 'unit-elements-account',\n checkDeposit = 'unit-elements-check-deposit',\n achDebitPayment = 'unit-elements-ach-debit-payment',\n achCreditPayment = 'unit-elements-ach-credit-payment',\n\n cardAction = 'unit-elements-card-action',\n}\n\nexport enum PresentationMode {\n /*\n CoverInjectedHeight - give id (<webViewId> param) to enable style injection to the root. Then cover the injected height.\n\n Inherit - inherit the parent size by style of 100 view height\n\n Default - return the unit component script\n */\n\n CoverInjectedHeight = 'coverInjectedHeight',\n Inherit = 'inherit',\n Default = 'deafult'\n}\n"],"mappings":";;;;;;IAAYA,gBAAgB;AAAAC,OAAA,CAAAD,gBAAA,GAAAA,gBAAA;AAAA,WAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;AAAA,GAAhBA,gBAAgB,KAAAC,OAAA,CAAAD,gBAAA,GAAhBA,gBAAgB;AAAA,IAahBE,gBAAgB;AAAAD,OAAA,CAAAC,gBAAA,GAAAA,gBAAA;AAAA,WAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;AAAA,GAAhBA,gBAAgB,KAAAD,OAAA,CAAAC,gBAAA,GAAhBA,gBAAgB"}
1
+ {"version":3,"names":["WebComponentType","exports","PresentationMode"],"sources":["webComponent.types.ts"],"sourcesContent":["export enum WebComponentType {\n card = 'unit-elements-card',\n multipleCards = 'unit-elements-multiple-cards',\n bookPayment = 'unit-elements-book-payment',\n activity = 'unit-elements-activity',\n slot = 'unit-elements-sdk-slot',\n account = 'unit-elements-account',\n checkDeposit = 'unit-elements-check-deposit',\n achDebitPayment = 'unit-elements-ach-debit-payment',\n achCreditPayment = 'unit-elements-ach-credit-payment',\n cardAction = 'unit-elements-card-action',\n}\n\nexport enum PresentationMode {\n /*\n CoverInjectedHeight - give id (<webViewId> param) to enable style injection to the root. Then cover the injected height.\n\n Inherit - inherit the parent size by style of 100 view height\n\n Default - return the unit component script\n */\n\n CoverInjectedHeight = 'coverInjectedHeight',\n Inherit = 'inherit',\n Default = 'deafult'\n}\n"],"mappings":";;;;;;IAAYA,gBAAgB;AAAAC,OAAA,CAAAD,gBAAA,GAAAA,gBAAA;AAAA,WAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;AAAA,GAAhBA,gBAAgB,KAAAC,OAAA,CAAAD,gBAAA,GAAhBA,gBAAgB;AAAA,IAahBE,gBAAgB;AAAAD,OAAA,CAAAC,gBAAA,GAAAA,gBAAA;AAAA,WAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;AAAA,GAAhBA,gBAAgB,KAAAD,OAAA,CAAAC,gBAAA,GAAhBA,gBAAgB"}
@@ -3,4 +3,11 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
+ exports.UNActivityComponentPaginationType = void 0;
7
+ let UNActivityComponentPaginationType;
8
+ exports.UNActivityComponentPaginationType = UNActivityComponentPaginationType;
9
+ (function (UNActivityComponentPaginationType) {
10
+ UNActivityComponentPaginationType["infiniteScroll"] = "infiniteScroll";
11
+ UNActivityComponentPaginationType["pagination"] = "pagination";
12
+ })(UNActivityComponentPaginationType || (exports.UNActivityComponentPaginationType = UNActivityComponentPaginationType = {}));
6
13
  //# sourceMappingURL=activity.types.js.map
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["activity.types.ts"],"sourcesContent":["import type { RESPONSE_KEYS } from '../../messages/webMessages/onLoadMessage';\nimport type { UNAuthorizationData } from './authorization.types';\nimport type { UNTransactionData } from './transactions.types';\n\nexport type UNActivityOnLoadData = {\n [RESPONSE_KEYS.authorization]: UNAuthorizationData,\n [RESPONSE_KEYS.transactions]: UNTransactionData,\n}\n"],"mappings":""}
1
+ {"version":3,"names":["UNActivityComponentPaginationType","exports"],"sources":["activity.types.ts"],"sourcesContent":["import type { RESPONSE_KEYS } from '../../messages/webMessages/onLoadMessage';\nimport type { UNAuthorizationData } from './authorization.types';\nimport type { UNTransactionData } from './transactions.types';\n\nexport const enum UNActivityComponentPaginationType {\n infiniteScroll = 'infiniteScroll',\n pagination = 'pagination'\n}\n\nexport type UNActivityOnLoadData = {\n [RESPONSE_KEYS.authorizations]: UNAuthorizationData,\n [RESPONSE_KEYS.transactions]: UNTransactionData,\n}\n"],"mappings":";;;;;;IAIkBA,iCAAiC;AAAAC,OAAA,CAAAD,iCAAA,GAAAA,iCAAA;AAAA,WAAjCA,iCAAiC;EAAjCA,iCAAiC;EAAjCA,iCAAiC;AAAA,GAAjCA,iCAAiC,KAAAC,OAAA,CAAAD,iCAAA,GAAjCA,iCAAiC"}
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.UNErrorCodes = void 0;
7
+ let UNErrorCodes;
8
+ exports.UNErrorCodes = UNErrorCodes;
9
+ (function (UNErrorCodes) {
10
+ UNErrorCodes["FEATURE_DISABLED"] = "feature_disabled";
11
+ UNErrorCodes["INVALID_VALUE"] = "invalid_value";
12
+ UNErrorCodes["LIMITS_EXCEEDED"] = "limits_exceeded";
13
+ UNErrorCodes["NOT_FOUND"] = "not_found";
14
+ UNErrorCodes["ACCOUNT_CUSTOMER_MISMATCH"] = "account_customer_mismatch";
15
+ UNErrorCodes["NOT_SUPPORTED_FOR_ACCOUNT_STATUS"] = "not_supported_for_account_status";
16
+ UNErrorCodes["NOT_SUPPORTED_FOR_ACCOUNT_TYPE"] = "not_supported_for_account_type";
17
+ UNErrorCodes["NOT_SUPPORTED_FOR_CARD"] = "not_supported_for_card";
18
+ UNErrorCodes["NOT_SUPPORTED_FOR_CARD_STATUS"] = "not_supported_for_card_status";
19
+ UNErrorCodes["NOT_SUPPORTED_FOR_CARD_TYPE"] = "not_supported_for_card_type";
20
+ UNErrorCodes["INVALID_NONCE"] = "invalid_nonce";
21
+ UNErrorCodes["NOT_SUPPORTED_FOR_PAYMENT_TYPE"] = "not_supported_for_payment_type";
22
+ UNErrorCodes["PAYMENT_INVALID"] = "payment_invalid";
23
+ UNErrorCodes["UNAUTHORIZED"] = "unauthorized";
24
+ UNErrorCodes["FORBIDDEN"] = "forbidden";
25
+ UNErrorCodes["ALREADY_EXISTS"] = "already_exists";
26
+ UNErrorCodes["CUSTOMER_NAME_UNDELIVERABLE"] = "customer_name_undeliverable";
27
+ UNErrorCodes["CUSTOMER_ADDRESS_UNDELIVERABLE"] = "customer_address_undeliverable";
28
+ })(UNErrorCodes || (exports.UNErrorCodes = UNErrorCodes = {}));
29
+ //# sourceMappingURL=error.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["UNErrorCodes","exports"],"sources":["error.types.ts"],"sourcesContent":["export type UNError = {\n errors: UNErrorData[]\n}\n\nexport type UNErrorData = {\n status?: string,\n title: string,\n detail?: string,\n details?: string,\n meta?: UNErrorMeta\n code?: UNErrorCodes,\n error?: Error\n}\n\ninterface UNErrorMeta {\n meta: Record<string, string>,\n}\n\nexport enum UNErrorCodes {\n FEATURE_DISABLED = 'feature_disabled',\n INVALID_VALUE = 'invalid_value',\n LIMITS_EXCEEDED = 'limits_exceeded',\n NOT_FOUND = 'not_found',\n ACCOUNT_CUSTOMER_MISMATCH = 'account_customer_mismatch',\n NOT_SUPPORTED_FOR_ACCOUNT_STATUS = 'not_supported_for_account_status',\n NOT_SUPPORTED_FOR_ACCOUNT_TYPE = 'not_supported_for_account_type',\n NOT_SUPPORTED_FOR_CARD = 'not_supported_for_card',\n NOT_SUPPORTED_FOR_CARD_STATUS = 'not_supported_for_card_status',\n NOT_SUPPORTED_FOR_CARD_TYPE = 'not_supported_for_card_type',\n INVALID_NONCE = 'invalid_nonce',\n NOT_SUPPORTED_FOR_PAYMENT_TYPE = 'not_supported_for_payment_type',\n PAYMENT_INVALID = 'payment_invalid',\n UNAUTHORIZED = 'unauthorized',\n FORBIDDEN = 'forbidden',\n ALREADY_EXISTS = 'already_exists',\n CUSTOMER_NAME_UNDELIVERABLE = 'customer_name_undeliverable',\n CUSTOMER_ADDRESS_UNDELIVERABLE = 'customer_address_undeliverable',\n}\n"],"mappings":";;;;;;IAkBYA,YAAY;AAAAC,OAAA,CAAAD,YAAA,GAAAA,YAAA;AAAA,WAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;AAAA,GAAZA,YAAY,KAAAC,OAAA,CAAAD,YAAA,GAAZA,YAAY"}
@@ -102,6 +102,17 @@ Object.keys(_fonts).forEach(function (key) {
102
102
  }
103
103
  });
104
104
  });
105
+ var _error = require("./error.types");
106
+ Object.keys(_error).forEach(function (key) {
107
+ if (key === "default" || key === "__esModule") return;
108
+ if (key in exports && exports[key] === _error[key]) return;
109
+ Object.defineProperty(exports, key, {
110
+ enumerable: true,
111
+ get: function () {
112
+ return _error[key];
113
+ }
114
+ });
115
+ });
105
116
  var _versioning = require("./versioning.types");
106
117
  Object.keys(_versioning).forEach(function (key) {
107
118
  if (key === "default" || key === "__esModule") return;
@@ -113,4 +124,15 @@ Object.keys(_versioning).forEach(function (key) {
113
124
  }
114
125
  });
115
126
  });
127
+ var _multipleCards = require("./multipleCards.types");
128
+ Object.keys(_multipleCards).forEach(function (key) {
129
+ if (key === "default" || key === "__esModule") return;
130
+ if (key in exports && exports[key] === _multipleCards[key]) return;
131
+ Object.defineProperty(exports, key, {
132
+ enumerable: true,
133
+ get: function () {
134
+ return _multipleCards[key];
135
+ }
136
+ });
137
+ });
116
138
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_bookPayment","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_card","_onLoadResponse","_achCredit","_payments","_account","_checkDeposit","_activity","_fonts","_versioning"],"sources":["index.ts"],"sourcesContent":["export * from './bookPayment.types';\nexport * from './card.types';\nexport * from './onLoadResponse.types';\nexport * from './achCredit.types';\nexport * from './payments.types';\nexport * from './account.types';\nexport * from './checkDeposit.types';\nexport * from './activity.types';\nexport * from './fonts.types';\nexport * from './versioning.types';\n"],"mappings":";;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,YAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,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EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAW,SAAA,CAAAX,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAO,SAAA,CAAAX,GAAA;IAAA;EAAA;AAAA;AACA,IAAAY,MAAA,GAAAhB,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAc,MAAA,EAAAb,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAY,MAAA,CAAAZ,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAQ,MAAA,CAAAZ,GAAA;IAAA;EAAA;AAAA;AACA,IAAAa,WAAA,GAAAjB,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAe,WAAA,EAAAd,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAa,WAAA,CAAAb,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAS,WAAA,CAAAb,GAAA;IAAA;EAAA;AAAA"}
1
+ {"version":3,"names":["_bookPayment","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_card","_onLoadResponse","_achCredit","_payments","_account","_checkDeposit","_activity","_fonts","_error","_versioning","_multipleCards"],"sources":["index.ts"],"sourcesContent":["export * from './bookPayment.types';\nexport * from './card.types';\nexport * from './onLoadResponse.types';\nexport * from './achCredit.types';\nexport * from './payments.types';\nexport * from './account.types';\nexport * from './checkDeposit.types';\nexport * from './activity.types';\nexport * from './fonts.types';\nexport * from './error.types';\nexport * from './versioning.types';\nexport * from './multipleCards.types';\n"],"mappings":";;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,YAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,YAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,YAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAK,KAAA,GAAAT,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAO,KAAA,EAAAN,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAK,KAAA,CAAAL,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAC,KAAA,CAAAL,GAAA;IAAA;EAAA;AAAA;AACA,IAAAM,eAAA,GAAAV,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAQ,eAAA,EAAAP,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAM,eAAA,CAAAN,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAE,eAAA,CAAAN,GAAA;IAAA;EAAA;AAAA;AACA,IAAAO,UAAA,GAAAX,OAAA;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A,CAAAb,GAAA;IAAA;EAAA;AAAA;AACA,IAAAc,WAAA,GAAAlB,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAgB,WAAA,EAAAf,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAc,WAAA,CAAAd,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAU,WAAA,CAAAd,GAAA;IAAA;EAAA;AAAA;AACA,IAAAe,cAAA,GAAAnB,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAiB,cAAA,EAAAhB,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAe,cAAA,CAAAf,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAW,cAAA,CAAAf,GAAA;IAAA;EAAA;AAAA"}
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.UNMultipleCardsComponentPaginationType = void 0;
7
+ let UNMultipleCardsComponentPaginationType;
8
+ exports.UNMultipleCardsComponentPaginationType = UNMultipleCardsComponentPaginationType;
9
+ (function (UNMultipleCardsComponentPaginationType) {
10
+ UNMultipleCardsComponentPaginationType["infiniteScroll"] = "infiniteScroll";
11
+ UNMultipleCardsComponentPaginationType["pagination"] = "pagination";
12
+ })(UNMultipleCardsComponentPaginationType || (exports.UNMultipleCardsComponentPaginationType = UNMultipleCardsComponentPaginationType = {}));
13
+ //# sourceMappingURL=multipleCards.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["UNMultipleCardsComponentPaginationType","exports"],"sources":["multipleCards.types.ts"],"sourcesContent":["import type { UNCardData } from './card.types';\n\nexport const enum UNMultipleCardsComponentPaginationType {\n infiniteScroll = 'infiniteScroll',\n pagination = 'pagination'\n}\n\nexport type UNMultipleCardsOnLoadData = UNCardData[];\n"],"mappings":";;;;;;IAEkBA,sCAAsC;AAAAC,OAAA,CAAAD,sCAAA,GAAAA,sCAAA;AAAA,WAAtCA,sCAAsC;EAAtCA,sCAAsC;EAAtCA,sCAAsC;AAAA,GAAtCA,sCAAsC,KAAAC,OAAA,CAAAD,sCAAA,GAAtCA,sCAAsC"}
@@ -1,2 +1,6 @@
1
1
  "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
2
6
  //# sourceMappingURL=onLoadResponse.types.js.map
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["onLoadResponse.types.ts"],"sourcesContent":["export type UNOnLoadResponseData<T> = {\n data: T,\n}\n\nexport type UNError = {\n errors: UNErrorData[]\n}\n\nexport type UNErrorData = {\n status: string,\n title: string,\n detail?: string,\n details?: string,\n meta?: Record<string, string>\n}\n\nexport type UNOnLoadResponse<T> =\n | UNOnLoadResponseData<T>\n | UNError\n"],"mappings":""}
1
+ {"version":3,"names":[],"sources":["onLoadResponse.types.ts"],"sourcesContent":["import type { UNError } from './error.types';\n\nexport type UNOnLoadResponseData<T> = {\n data: T,\n}\n\nexport type UNOnLoadResponse<T> =\n | UNOnLoadResponseData<T>\n | UNError\n"],"mappings":""}
@@ -3,18 +3,15 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.globalUnitScript = exports.fetchUnitScript = void 0;
7
- var _EventBus = _interopRequireDefault(require("../helpers/EventBus"));
8
- var _sdkMessage = require("../messages/nativeMessages/sdkMessage");
6
+ exports.fetchUnitScript = void 0;
9
7
  var _UnitSdkManager = require("./UnitSdkManager");
10
8
  var _UnitSdkManagerUtils = require("./UnitSdkManager.utils.internal");
11
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
9
+ var _store = require("../store/store");
10
+ var _ConfigurationSlice = require("../slices/ConfigurationSlice");
12
11
  let isLoadingScript = false;
13
-
14
- /** globalUnitScript is exported ONLY to our project components **/
15
- let globalUnitScript = '';
16
- exports.globalUnitScript = globalUnitScript;
17
12
  const fetchUnitScript = async () => {
13
+ const configurationState = (0, _ConfigurationSlice.selectConfiguration)(_store.store.getState());
14
+ const globalUnitScript = configurationState.unitScript;
18
15
  const env = _UnitSdkManager.UnitSDK.getEnv();
19
16
  const webVersioningStrategy = _UnitSdkManager.UnitSDK.getWebVersioningStrategy();
20
17
  if (isLoadingScript || globalUnitScript || !env) {
@@ -26,11 +23,7 @@ const fetchUnitScript = async () => {
26
23
  const unitScriptRes = await fetch((0, _UnitSdkManagerUtils.getUnitScriptUrl)(env, webVersioningStrategy));
27
24
  const unitScript = await unitScriptRes.text();
28
25
  if (unitScript) {
29
- const scriptFetchData = {
30
- unitScript
31
- };
32
- _EventBus.default.Instance.event(_sdkMessage.SDKMessage.IS_SCRIPT_FETCHED, scriptFetchData);
33
- exports.globalUnitScript = globalUnitScript = unitScript;
26
+ _store.store.dispatch((0, _ConfigurationSlice.setUnitScript)(unitScript));
34
27
  }
35
28
  return null;
36
29
  } catch (e) {
@@ -1 +1 @@
1
- {"version":3,"names":["_EventBus","_interopRequireDefault","require","_sdkMessage","_UnitSdkManager","_UnitSdkManagerUtils","obj","__esModule","default","isLoadingScript","globalUnitScript","exports","fetchUnitScript","env","UnitSDK","getEnv","webVersioningStrategy","getWebVersioningStrategy","unitScriptRes","fetch","getUnitScriptUrl","unitScript","text","scriptFetchData","EventBus","Instance","event","SDKMessage","IS_SCRIPT_FETCHED","e","console","log"],"sources":["UnitSdk.api.ts"],"sourcesContent":["import EventBus from '../helpers/EventBus';\nimport { SDKMessage, SdkScriptFetched } from '../messages/nativeMessages/sdkMessage';\nimport { UnitSDK } from './UnitSdkManager';\n\nimport { getUnitScriptUrl } from './UnitSdkManager.utils.internal';\n\nlet isLoadingScript = false;\n\n/** globalUnitScript is exported ONLY to our project components **/\nexport let globalUnitScript = '';\n\nexport const fetchUnitScript = async () => {\n const env = UnitSDK.getEnv();\n const webVersioningStrategy = UnitSDK.getWebVersioningStrategy();\n if (isLoadingScript || globalUnitScript || !env) {\n // init function is called and success OR in progress\n return null;\n }\n isLoadingScript = true;\n try {\n const unitScriptRes = await fetch(getUnitScriptUrl(env, webVersioningStrategy));\n const unitScript = await unitScriptRes.text();\n if (unitScript) {\n const scriptFetchData: SdkScriptFetched = { unitScript };\n EventBus.Instance.event(SDKMessage.IS_SCRIPT_FETCHED, scriptFetchData);\n globalUnitScript = unitScript;\n }\n return null;\n } catch (e) {\n console.log(e);\n return null;\n } finally {\n isLoadingScript = false;\n }\n};\n"],"mappings":";;;;;;AAAA,IAAAA,SAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,eAAA,GAAAF,OAAA;AAEA,IAAAG,oBAAA,GAAAH,OAAA;AAAmE,SAAAD,uBAAAK,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAEnE,IAAIG,eAAe,GAAG,KAAK;;AAE3B;AACO,IAAIC,gBAAgB,GAAG,EAAE;AAACC,OAAA,CAAAD,gBAAA,GAAAA,gBAAA;AAE1B,MAAME,eAAe,GAAG,MAAAA,CAAA,KAAY;EACzC,MAAMC,GAAG,GAAGC,uBAAO,CAACC,MAAM,EAAE;EAC5B,MAAMC,qBAAqB,GAAGF,uBAAO,CAACG,wBAAwB,EAAE;EAChE,IAAIR,eAAe,IAAIC,gBAAgB,IAAI,CAACG,GAAG,EAAE;IAC/C;IACA,OAAO,IAAI;EACb;EACAJ,eAAe,GAAG,IAAI;EACtB,IAAI;IACF,MAAMS,aAAa,GAAG,MAAMC,KAAK,CAAC,IAAAC,qCAAgB,EAACP,GAAG,EAAEG,qBAAqB,CAAC,CAAC;IAC/E,MAAMK,UAAU,GAAG,MAAMH,aAAa,CAACI,IAAI,EAAE;IAC7C,IAAID,UAAU,EAAE;MACd,MAAME,eAAiC,GAAG;QAAEF;MAAW,CAAC;MACxDG,iBAAQ,CAACC,QAAQ,CAACC,KAAK,CAACC,sBAAU,CAACC,iBAAiB,EAAEL,eAAe,CAAC;MACtEZ,OAAA,CAAAD,gBAAA,GAAAA,gBAAgB,GAAGW,UAAU;IAC/B;IACA,OAAO,IAAI;EACb,CAAC,CAAC,OAAOQ,CAAC,EAAE;IACVC,OAAO,CAACC,GAAG,CAACF,CAAC,CAAC;IACd,OAAO,IAAI;EACb,CAAC,SAAS;IACRpB,eAAe,GAAG,KAAK;EACzB;AACF,CAAC;AAACE,OAAA,CAAAC,eAAA,GAAAA,eAAA"}
1
+ {"version":3,"names":["_UnitSdkManager","require","_UnitSdkManagerUtils","_store","_ConfigurationSlice","isLoadingScript","fetchUnitScript","configurationState","selectConfiguration","store","getState","globalUnitScript","unitScript","env","UnitSDK","getEnv","webVersioningStrategy","getWebVersioningStrategy","unitScriptRes","fetch","getUnitScriptUrl","text","dispatch","setUnitScript","e","console","log","exports"],"sources":["UnitSdk.api.ts"],"sourcesContent":["import { UnitSDK } from './UnitSdkManager';\n\nimport { getUnitScriptUrl } from './UnitSdkManager.utils.internal';\nimport { store } from '../store/store';\nimport { setUnitScript, selectConfiguration } from '../slices/ConfigurationSlice';\n\nlet isLoadingScript = false;\n\nexport const fetchUnitScript = async () => {\n const configurationState = selectConfiguration(store.getState());\n const globalUnitScript = configurationState.unitScript;\n const env = UnitSDK.getEnv();\n const webVersioningStrategy = UnitSDK.getWebVersioningStrategy();\n if (isLoadingScript || globalUnitScript || !env) {\n // init function is called and success OR in progress\n return null;\n }\n isLoadingScript = true;\n try {\n const unitScriptRes = await fetch(getUnitScriptUrl(env, webVersioningStrategy));\n const unitScript = await unitScriptRes.text();\n if (unitScript) {\n store.dispatch(setUnitScript(unitScript));\n }\n return null;\n } catch (e) {\n console.log(e);\n return null;\n } finally {\n isLoadingScript = false;\n }\n};\n"],"mappings":";;;;;;AAAA,IAAAA,eAAA,GAAAC,OAAA;AAEA,IAAAC,oBAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,mBAAA,GAAAH,OAAA;AAEA,IAAII,eAAe,GAAG,KAAK;AAEpB,MAAMC,eAAe,GAAG,MAAAA,CAAA,KAAY;EACzC,MAAMC,kBAAkB,GAAG,IAAAC,uCAAmB,EAACC,YAAK,CAACC,QAAQ,EAAE,CAAC;EAChE,MAAMC,gBAAgB,GAAGJ,kBAAkB,CAACK,UAAU;EACtD,MAAMC,GAAG,GAAGC,uBAAO,CAACC,MAAM,EAAE;EAC5B,MAAMC,qBAAqB,GAAGF,uBAAO,CAACG,wBAAwB,EAAE;EAChE,IAAIZ,eAAe,IAAIM,gBAAgB,IAAI,CAACE,GAAG,EAAE;IAC/C;IACA,OAAO,IAAI;EACb;EACAR,eAAe,GAAG,IAAI;EACtB,IAAI;IACF,MAAMa,aAAa,GAAG,MAAMC,KAAK,CAAC,IAAAC,qCAAgB,EAACP,GAAG,EAAEG,qBAAqB,CAAC,CAAC;IAC/E,MAAMJ,UAAU,GAAG,MAAMM,aAAa,CAACG,IAAI,EAAE;IAC7C,IAAIT,UAAU,EAAE;MACdH,YAAK,CAACa,QAAQ,CAAC,IAAAC,iCAAa,EAACX,UAAU,CAAC,CAAC;IAC3C;IACA,OAAO,IAAI;EACb,CAAC,CAAC,OAAOY,CAAC,EAAE;IACVC,OAAO,CAACC,GAAG,CAACF,CAAC,CAAC;IACd,OAAO,IAAI;EACb,CAAC,SAAS;IACRnB,eAAe,GAAG,KAAK;EACzB;AACF,CAAC;AAACsB,OAAA,CAAArB,eAAA,GAAAA,eAAA"}
@@ -8,7 +8,7 @@ var _shared = require("../types/shared");
8
8
  const WEB_SDK_RECOMMENDED_STRATEGY = {
9
9
  type: _shared.UNVersioningStrategyType.upToNextMinor,
10
10
  major: 1,
11
- minor: 2
11
+ minor: 3
12
12
  };
13
13
  const UNSDKConstants = {
14
14
  webSDKRecommendedStrategy: WEB_SDK_RECOMMENDED_STRATEGY
@@ -1 +1 @@
1
- {"version":3,"names":["_shared","require","WEB_SDK_RECOMMENDED_STRATEGY","type","UNVersioningStrategyType","upToNextMinor","major","minor","UNSDKConstants","webSDKRecommendedStrategy","exports"],"sources":["UnitSdk.constants.ts"],"sourcesContent":["import { UNVersioningStrategyType, UNWebVersioningStrategy } from '../types/shared';\n\nconst WEB_SDK_RECOMMENDED_STRATEGY: UNWebVersioningStrategy = {\n type: UNVersioningStrategyType.upToNextMinor,\n major: 1,\n minor: 2,\n};\n\nexport const UNSDKConstants = {\n webSDKRecommendedStrategy: WEB_SDK_RECOMMENDED_STRATEGY,\n};\n"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AAEA,MAAMC,4BAAqD,GAAG;EAC5DC,IAAI,EAAEC,gCAAwB,CAACC,aAAa;EAC5CC,KAAK,EAAE,CAAC;EACRC,KAAK,EAAE;AACT,CAAC;AAEM,MAAMC,cAAc,GAAG;EAC5BC,yBAAyB,EAAEP;AAC7B,CAAC;AAACQ,OAAA,CAAAF,cAAA,GAAAA,cAAA"}
1
+ {"version":3,"names":["_shared","require","WEB_SDK_RECOMMENDED_STRATEGY","type","UNVersioningStrategyType","upToNextMinor","major","minor","UNSDKConstants","webSDKRecommendedStrategy","exports"],"sources":["UnitSdk.constants.ts"],"sourcesContent":["import { UNVersioningStrategyType, UNWebVersioningStrategy } from '../types/shared';\n\nconst WEB_SDK_RECOMMENDED_STRATEGY: UNWebVersioningStrategy = {\n type: UNVersioningStrategyType.upToNextMinor,\n major: 1,\n minor: 3,\n};\n\nexport const UNSDKConstants = {\n webSDKRecommendedStrategy: WEB_SDK_RECOMMENDED_STRATEGY,\n};\n"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AAEA,MAAMC,4BAAqD,GAAG;EAC5DC,IAAI,EAAEC,gCAAwB,CAACC,aAAa;EAC5CC,KAAK,EAAE,CAAC;EACRC,KAAK,EAAE;AACT,CAAC;AAEM,MAAMC,cAAc,GAAG;EAC5BC,yBAAyB,EAAEP;AAC7B,CAAC;AAACQ,OAAA,CAAAF,cAAA,GAAAA,cAAA"}
@@ -4,13 +4,12 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.UnitSDK = exports.UNEnvironment = void 0;
7
- var _EventBus = _interopRequireDefault(require("../helpers/EventBus"));
8
- var _sdkMessage = require("../messages/nativeMessages/sdkMessage");
9
7
  var _UnitSdk = require("./UnitSdk.api");
10
8
  var _unitUiManager = require("./unitUiManager/unitUiManager");
11
9
  var _webVersioningStrategy = require("../utils/webVersioningStrategy.utils");
12
10
  var _UnitSdk2 = require("./UnitSdk.constants");
13
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
+ var _ConfigurationSlice = require("../slices/ConfigurationSlice");
12
+ var _store = require("../store/store");
14
13
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
15
14
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
16
15
  function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
@@ -26,8 +25,6 @@ _defineProperty(UnitSDK, "ui", void 0);
26
25
  _defineProperty(UnitSDK, "env", void 0);
27
26
  _defineProperty(UnitSDK, "webVersioningStrategy", void 0);
28
27
  _defineProperty(UnitSDK, "customerToken", void 0);
29
- _defineProperty(UnitSDK, "theme", void 0);
30
- _defineProperty(UnitSDK, "language", void 0);
31
28
  _defineProperty(UnitSDK, "fonts", void 0);
32
29
  _defineProperty(UnitSDK, "signedNonce", void 0);
33
30
  _defineProperty(UnitSDK, "pushProvisionModule", void 0);
@@ -36,13 +33,12 @@ _defineProperty(UnitSDK, "init", async function (env, theme, language, fonts) {
36
33
  try {
37
34
  UnitSDK.env = env;
38
35
  UnitSDK.webVersioningStrategy = webVersioningStrategy;
39
- UnitSDK.theme = theme;
40
- UnitSDK.language = language;
41
36
  UnitSDK.fonts = fonts;
37
+ _store.store.dispatch((0, _ConfigurationSlice.setTheme)(theme));
38
+ _store.store.dispatch((0, _ConfigurationSlice.setLanguage)(language));
42
39
  UnitSDK.ui = new _unitUiManager.UnitUiManager();
43
40
  (0, _webVersioningStrategy.warnClientIfNeeded)(UnitSDK.webVersioningStrategy);
44
41
  await (0, _UnitSdk.fetchUnitScript)();
45
- _EventBus.default.Instance.event(_sdkMessage.SDKMessage.IS_SDK_INITIALIZED, {});
46
42
  } catch (e) {
47
43
  console.log(e);
48
44
  }
@@ -54,8 +50,8 @@ _defineProperty(UnitSDK, "getPushProvisionModule", () => {
54
50
  return UnitSDK.pushProvisionModule;
55
51
  });
56
52
  /**
57
- * @deprecated - Unit SDK is managing the signedNonce, no need to provide it
58
- */
53
+ * @deprecated - Unit SDK is managing the signedNonce, no need to provide it
54
+ */
59
55
  _defineProperty(UnitSDK, "setSignedNonce", signedNonce => {
60
56
  UnitSDK.signedNonce = signedNonce;
61
57
  });
@@ -65,18 +61,12 @@ _defineProperty(UnitSDK, "getEnv", () => {
65
61
  _defineProperty(UnitSDK, "getWebVersioningStrategy", () => {
66
62
  return UnitSDK.webVersioningStrategy;
67
63
  });
68
- _defineProperty(UnitSDK, "getTheme", () => {
69
- return UnitSDK.theme;
70
- });
71
- _defineProperty(UnitSDK, "getLanguage", () => {
72
- return UnitSDK.language;
73
- });
74
64
  _defineProperty(UnitSDK, "getFonts", () => {
75
65
  return UnitSDK.fonts;
76
66
  });
77
67
  /**
78
- * @deprecated - Unit SDK is managing the signedNonce, no need to provide it
79
- */
68
+ * @deprecated - Unit SDK is managing the signedNonce, no need to provide it
69
+ */
80
70
  _defineProperty(UnitSDK, "getSignedNonce", () => {
81
71
  return UnitSDK.signedNonce;
82
72
  });
@@ -1 +1 @@
1
- {"version":3,"names":["_EventBus","_interopRequireDefault","require","_sdkMessage","_UnitSdk","_unitUiManager","_webVersioningStrategy","_UnitSdk2","obj","__esModule","default","_defineProperty","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","arg","_toPrimitive","String","input","hint","prim","Symbol","toPrimitive","undefined","res","call","TypeError","Number","UNEnvironment","exports","UnitSDK","env","theme","language","fonts","webVersioningStrategy","arguments","length","UNSDKConstants","webSDKRecommendedStrategy","ui","UnitUiManager","warnClientIfNeeded","fetchUnitScript","EventBus","Instance","event","SDKMessage","IS_SDK_INITIALIZED","e","console","log","pushProvisionModule","signedNonce","customerToken"],"sources":["UnitSdkManager.ts"],"sourcesContent":["import type { NativeModules } from 'react-native';\nimport EventBus from '../helpers/EventBus';\nimport { SDKMessage } from '../messages/nativeMessages/sdkMessage';\nimport { fetchUnitScript } from './UnitSdk.api';\nimport { UnitUiManager } from './unitUiManager/unitUiManager';\nimport type { UNFonts } from '../types/shared/fonts.types';\nimport { warnClientIfNeeded } from '../utils/webVersioningStrategy.utils';\nimport { UNSDKConstants } from './UnitSdk.constants';\nimport type { UNWebVersioningStrategy } from '../types/shared';\n\nexport enum UNEnvironment {\n sandbox = 'sandbox',\n production = 'production'\n}\n\nexport class UnitSDK {\n public static ui: UnitUiManager;\n protected static env?: UNEnvironment;\n protected static webVersioningStrategy: UNWebVersioningStrategy;\n protected static customerToken?: string;\n protected static theme?: string;\n protected static language?: string;\n protected static fonts?: UNFonts;\n protected static signedNonce?: string;\n protected static pushProvisionModule?: typeof NativeModules;\n\n public static init = async (env: UNEnvironment, theme?: string, language?: string, fonts?: UNFonts, webVersioningStrategy: UNWebVersioningStrategy = UNSDKConstants.webSDKRecommendedStrategy) => {\n try {\n this.env = env;\n this.webVersioningStrategy = webVersioningStrategy;\n this.theme = theme;\n this.language = language;\n this.fonts = fonts;\n\n this.ui = new UnitUiManager();\n warnClientIfNeeded(this.webVersioningStrategy);\n await fetchUnitScript();\n EventBus.Instance.event(SDKMessage.IS_SDK_INITIALIZED, {});\n } catch (e) {\n console.log(e);\n }\n };\n\n public static setPushProvisioningModule = (pushProvisionModule: typeof NativeModules) => {\n this.pushProvisionModule = pushProvisionModule;\n };\n\n public static getPushProvisionModule = () => {\n return this.pushProvisionModule;\n };\n\n /**\n * @deprecated - Unit SDK is managing the signedNonce, no need to provide it\n */\n public static setSignedNonce = (signedNonce: string) => {\n this.signedNonce = signedNonce;\n };\n\n public static getEnv = () => {\n return this.env;\n };\n\n public static getWebVersioningStrategy = () => {\n return this.webVersioningStrategy;\n };\n\n public static getTheme = () => {\n return this.theme;\n };\n\n public static getLanguage = () => {\n return this.language;\n };\n\n public static getFonts = () => {\n return this.fonts;\n };\n\n /**\n * @deprecated - Unit SDK is managing the signedNonce, no need to provide it\n */\n public static getSignedNonce = () => {\n return this.signedNonce;\n };\n\n public static setCustomerToken = (customerToken: string) => {\n this.customerToken = customerToken;\n };\n\n public static getCustomerToken = () => {\n return this.customerToken;\n };\n\n}\n"],"mappings":";;;;;;AACA,IAAAA,SAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,cAAA,GAAAH,OAAA;AAEA,IAAAI,sBAAA,GAAAJ,OAAA;AACA,IAAAK,SAAA,GAAAL,OAAA;AAAqD,SAAAD,uBAAAO,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAAA,SAAAG,gBAAAH,GAAA,EAAAI,GAAA,EAAAC,KAAA,IAAAD,GAAA,GAAAE,cAAA,CAAAF,GAAA,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AAA,CAjDUwB,OAAO,cAmDO,MAAM;EAC7B,OApDSA,OAAO,CAoDJE,KAAK;AACnB,CAAC;AAAA1B,eAAA,CArDUwB,OAAO,iBAuDU,MAAM;EAChC,OAxDSA,OAAO,CAwDJG,QAAQ;AACtB,CAAC;AAAA3B,eAAA,CAzDUwB,OAAO,cA2DO,MAAM;EAC7B,OA5DSA,OAAO,CA4DJI,KAAK;AACnB,CAAC;AAED;AACF;AACA;AAFE5B,eAAA,CA/DWwB,OAAO,oBAkEa,MAAM;EACnC,OAnESA,OAAO,CAmEJuB,WAAW;AACzB,CAAC;AAAA/C,eAAA,CApEUwB,OAAO,sBAsEgBwB,aAAqB,IAAK;EAtEjDxB,OAAO,CAuEXwB,aAAa,GAAGA,aAAa;AACpC,CAAC;AAAAhD,eAAA,CAxEUwB,OAAO,sBA0Ee,MAAM;EACrC,OA3ESA,OAAO,CA2EJwB,aAAa;AAC3B,CAAC"}
1
+ {"version":3,"names":["_UnitSdk","require","_unitUiManager","_webVersioningStrategy","_UnitSdk2","_ConfigurationSlice","_store","_defineProperty","obj","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","arg","_toPrimitive","String","input","hint","prim","Symbol","toPrimitive","undefined","res","call","TypeError","Number","UNEnvironment","exports","UnitSDK","env","theme","language","fonts","webVersioningStrategy","arguments","length","UNSDKConstants","webSDKRecommendedStrategy","store","dispatch","setTheme","setLanguage","ui","UnitUiManager","warnClientIfNeeded","fetchUnitScript","e","console","log","pushProvisionModule","signedNonce","customerToken"],"sources":["UnitSdkManager.ts"],"sourcesContent":["import type { NativeModules } from 'react-native';\nimport { fetchUnitScript } from './UnitSdk.api';\nimport { UnitUiManager } from './unitUiManager/unitUiManager';\nimport type { UNFonts } from '../types/shared/fonts.types';\nimport { warnClientIfNeeded } from '../utils/webVersioningStrategy.utils';\nimport { UNSDKConstants } from './UnitSdk.constants';\nimport type { UNWebVersioningStrategy } from '../types/shared';\nimport { setTheme, setLanguage } from '../slices/ConfigurationSlice';\nimport { store } from '../store/store';\n\nexport enum UNEnvironment {\n sandbox = 'sandbox',\n production = 'production'\n}\n\nexport class UnitSDK {\n public static ui: UnitUiManager;\n protected static env?: UNEnvironment;\n protected static webVersioningStrategy: UNWebVersioningStrategy;\n protected static customerToken?: string;\n protected static fonts?: UNFonts;\n protected static signedNonce?: string;\n protected static pushProvisionModule?: typeof NativeModules;\n\n public static init = async (env: UNEnvironment, theme?: string, language?: string, fonts?: UNFonts, webVersioningStrategy: UNWebVersioningStrategy = UNSDKConstants.webSDKRecommendedStrategy) => {\n try {\n this.env = env;\n this.webVersioningStrategy = webVersioningStrategy;\n this.fonts = fonts;\n store.dispatch(setTheme(theme));\n store.dispatch(setLanguage(language));\n this.ui = new UnitUiManager();\n warnClientIfNeeded(this.webVersioningStrategy);\n await fetchUnitScript();\n } catch (e) {\n console.log(e);\n }\n };\n\n public static setPushProvisioningModule = (pushProvisionModule: typeof NativeModules) => {\n this.pushProvisionModule = pushProvisionModule;\n };\n\n public static getPushProvisionModule = () => {\n return this.pushProvisionModule;\n };\n\n /**\n * @deprecated - Unit SDK is managing the signedNonce, no need to provide it\n */\n public static setSignedNonce = (signedNonce: string) => {\n this.signedNonce = signedNonce;\n };\n\n public static getEnv = () => {\n return this.env;\n };\n\n public static getWebVersioningStrategy = () => {\n return this.webVersioningStrategy;\n };\n\n public static getFonts = () => {\n return this.fonts;\n };\n\n /**\n * @deprecated - Unit SDK is managing the signedNonce, no need to provide it\n */\n public static getSignedNonce = () => {\n return this.signedNonce;\n };\n\n public static setCustomerToken = (customerToken: string) => {\n this.customerToken = customerToken;\n };\n\n public static getCustomerToken = () => {\n return this.customerToken;\n };\n\n}\n"],"mappings":";;;;;;AACA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,cAAA,GAAAD,OAAA;AAEA,IAAAE,sBAAA,GAAAF,OAAA;AACA,IAAAG,SAAA,GAAAH,OAAA;AAEA,IAAAI,mBAAA,GAAAJ,OAAA;AACA,IAAAK,MAA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CAAC;AAAA9B,eAAA,CA7CUyB,OAAO,cA+CO,MAAM;EAC7B,OAhDSA,OAAO,CAgDJI,KAAK;AACnB,CAAC;AAED;AACF;AACA;AAFE7B,eAAA,CAnDWyB,OAAO,oBAsDa,MAAM;EACnC,OAvDSA,OAAO,CAuDJsB,WAAW;AACzB,CAAC;AAAA/C,eAAA,CAxDUyB,OAAO,sBA0DgBuB,aAAqB,IAAK;EA1DjDvB,OAAO,CA2DXuB,aAAa,GAAGA,aAAa;AACpC,CAAC;AAAAhD,eAAA,CA5DUyB,OAAO,sBA8De,MAAM;EACrC,OA/DSA,OAAO,CA+DJuB,aAAa;AAC3B,CAAC"}
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.getVersion = exports.getBuildNumber = exports.getAppName = exports.getAppIdentifier = void 0;
7
+ var _reactNative = require("react-native");
8
+ const {
9
+ AndroidAppInfo,
10
+ IOSAppInfo
11
+ } = _reactNative.NativeModules;
12
+ const appInfoModule = _reactNative.Platform.OS === 'android' ? AndroidAppInfo : IOSAppInfo;
13
+ const getAppName = async () => {
14
+ try {
15
+ const response = await appInfoModule.getAppName();
16
+ return response;
17
+ } catch (error) {
18
+ console.error(error);
19
+ }
20
+ };
21
+ exports.getAppName = getAppName;
22
+ const getVersion = async () => {
23
+ try {
24
+ const response = await appInfoModule.getVersion();
25
+ return response;
26
+ } catch (error) {
27
+ console.error(error);
28
+ }
29
+ };
30
+ exports.getVersion = getVersion;
31
+ const getBuildNumber = async () => {
32
+ try {
33
+ const response = await appInfoModule.getBuildNumber();
34
+ return response;
35
+ } catch (error) {
36
+ console.error(error);
37
+ }
38
+ };
39
+ exports.getBuildNumber = getBuildNumber;
40
+ const getAppIdentifier = async () => {
41
+ try {
42
+ const response = await appInfoModule.getAppIdentifier();
43
+ return response;
44
+ } catch (error) {
45
+ console.error(error);
46
+ }
47
+ };
48
+ exports.getAppIdentifier = getAppIdentifier;
49
+ //# sourceMappingURL=AppInfo.js.map