@spare-technologies/spare-link 0.1.0-beta.1 → 1.0.1

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 (568) hide show
  1. package/README.md +119 -63
  2. package/lib/commonjs/core/models/payment-return-params.js +245 -20
  3. package/lib/commonjs/core/models/payment-return-params.js.map +1 -1
  4. package/lib/commonjs/core/models/pending-session-record.js +2 -0
  5. package/lib/commonjs/core/models/pending-session-record.js.map +1 -0
  6. package/lib/commonjs/core/services/hosted-flow-controller.js +333 -0
  7. package/lib/commonjs/core/services/hosted-flow-controller.js.map +1 -0
  8. package/lib/commonjs/core/services/hosted-flow-state.js +96 -0
  9. package/lib/commonjs/core/services/hosted-flow-state.js.map +1 -0
  10. package/lib/commonjs/index.js +42 -164
  11. package/lib/commonjs/index.js.map +1 -1
  12. package/lib/commonjs/internal/bank-redirect.js +20 -9
  13. package/lib/commonjs/internal/bank-redirect.js.map +1 -1
  14. package/lib/commonjs/internal/hosted/bridge-message.js +107 -0
  15. package/lib/commonjs/internal/hosted/bridge-message.js.map +1 -0
  16. package/lib/commonjs/internal/hosted/hosted-url.js +41 -0
  17. package/lib/commonjs/internal/hosted/hosted-url.js.map +1 -0
  18. package/lib/commonjs/internal/index.js +0 -7
  19. package/lib/commonjs/internal/index.js.map +1 -1
  20. package/lib/commonjs/internal/redact-uri.js +59 -15
  21. package/lib/commonjs/internal/redact-uri.js.map +1 -1
  22. package/lib/commonjs/internal/secure-store-pending-session-store.js +20 -25
  23. package/lib/commonjs/internal/secure-store-pending-session-store.js.map +1 -1
  24. package/lib/commonjs/internal/url-parts.js +145 -0
  25. package/lib/commonjs/internal/url-parts.js.map +1 -0
  26. package/lib/commonjs/public/index.js +0 -37
  27. package/lib/commonjs/public/index.js.map +1 -1
  28. package/lib/commonjs/public/payment-result.js +16 -4
  29. package/lib/commonjs/public/payment-result.js.map +1 -1
  30. package/lib/commonjs/public/recovery-result.js +7 -18
  31. package/lib/commonjs/public/recovery-result.js.map +1 -1
  32. package/lib/commonjs/public/spare-link-config.js +41 -16
  33. package/lib/commonjs/public/spare-link-config.js.map +1 -1
  34. package/lib/commonjs/public/spare-link-event.js +27 -33
  35. package/lib/commonjs/public/spare-link-event.js.map +1 -1
  36. package/lib/commonjs/public/spare-link-instance.js +67 -77
  37. package/lib/commonjs/public/spare-link-instance.js.map +1 -1
  38. package/lib/commonjs/public/spare-link-session.js +2 -9
  39. package/lib/commonjs/public/spare-link-session.js.map +1 -1
  40. package/lib/commonjs/public/spare-link.js +0 -12
  41. package/lib/commonjs/public/spare-link.js.map +1 -1
  42. package/lib/commonjs/ui/hooks/{use-payment-flow-state.js → use-hosted-flow-state.js} +4 -4
  43. package/lib/commonjs/ui/hooks/use-hosted-flow-state.js.map +1 -0
  44. package/lib/commonjs/ui/hosted/hosted-payment-page.js +177 -0
  45. package/lib/commonjs/ui/hosted/hosted-payment-page.js.map +1 -0
  46. package/lib/commonjs/ui/hosted/hosted-payment-webview.js +168 -0
  47. package/lib/commonjs/ui/hosted/hosted-payment-webview.js.map +1 -0
  48. package/lib/commonjs/ui/screens/index.js +3 -17
  49. package/lib/commonjs/ui/screens/index.js.map +1 -1
  50. package/lib/commonjs/ui/screens/page-unavailable-screen.js +101 -0
  51. package/lib/commonjs/ui/screens/page-unavailable-screen.js.map +1 -0
  52. package/lib/commonjs/ui/spare-link-host.js +220 -234
  53. package/lib/commonjs/ui/spare-link-host.js.map +1 -1
  54. package/lib/commonjs/ui/widgets/index.js +3 -10
  55. package/lib/commonjs/ui/widgets/index.js.map +1 -1
  56. package/lib/commonjs/version.js +1 -1
  57. package/lib/commonjs/version.js.map +1 -1
  58. package/lib/module/core/models/payment-return-params.js +235 -20
  59. package/lib/module/core/models/payment-return-params.js.map +1 -1
  60. package/lib/module/core/models/pending-session-record.js +2 -0
  61. package/lib/module/core/models/pending-session-record.js.map +1 -0
  62. package/lib/module/core/services/hosted-flow-controller.js +328 -0
  63. package/lib/module/core/services/hosted-flow-controller.js.map +1 -0
  64. package/lib/module/core/services/hosted-flow-state.js +91 -0
  65. package/lib/module/core/services/hosted-flow-state.js.map +1 -0
  66. package/lib/module/index.js +8 -22
  67. package/lib/module/index.js.map +1 -1
  68. package/lib/module/internal/bank-redirect.js +20 -9
  69. package/lib/module/internal/bank-redirect.js.map +1 -1
  70. package/lib/module/internal/hosted/bridge-message.js +104 -0
  71. package/lib/module/internal/hosted/bridge-message.js.map +1 -0
  72. package/lib/module/internal/hosted/hosted-url.js +36 -0
  73. package/lib/module/internal/hosted/hosted-url.js.map +1 -0
  74. package/lib/module/internal/index.js +0 -1
  75. package/lib/module/internal/index.js.map +1 -1
  76. package/lib/module/internal/redact-uri.js +59 -15
  77. package/lib/module/internal/redact-uri.js.map +1 -1
  78. package/lib/module/internal/secure-store-pending-session-store.js +20 -25
  79. package/lib/module/internal/secure-store-pending-session-store.js.map +1 -1
  80. package/lib/module/internal/url-parts.js +139 -0
  81. package/lib/module/internal/url-parts.js.map +1 -0
  82. package/lib/module/public/index.js +2 -3
  83. package/lib/module/public/index.js.map +1 -1
  84. package/lib/module/public/payment-result.js +16 -4
  85. package/lib/module/public/payment-result.js.map +1 -1
  86. package/lib/module/public/recovery-result.js +7 -17
  87. package/lib/module/public/recovery-result.js.map +1 -1
  88. package/lib/module/public/spare-link-config.js +42 -15
  89. package/lib/module/public/spare-link-config.js.map +1 -1
  90. package/lib/module/public/spare-link-event.js +27 -33
  91. package/lib/module/public/spare-link-event.js.map +1 -1
  92. package/lib/module/public/spare-link-instance.js +68 -72
  93. package/lib/module/public/spare-link-instance.js.map +1 -1
  94. package/lib/module/public/spare-link-session.js +2 -9
  95. package/lib/module/public/spare-link-session.js.map +1 -1
  96. package/lib/module/public/spare-link.js +1 -1
  97. package/lib/module/public/spare-link.js.map +1 -1
  98. package/lib/module/ui/hooks/{use-payment-flow-state.js → use-hosted-flow-state.js} +3 -3
  99. package/lib/module/ui/hooks/use-hosted-flow-state.js.map +1 -0
  100. package/lib/module/ui/hosted/hosted-payment-page.js +175 -0
  101. package/lib/module/ui/hosted/hosted-payment-page.js.map +1 -0
  102. package/lib/module/ui/hosted/hosted-payment-webview.js +163 -0
  103. package/lib/module/ui/hosted/hosted-payment-webview.js.map +1 -0
  104. package/lib/module/ui/screens/index.js +1 -3
  105. package/lib/module/ui/screens/index.js.map +1 -1
  106. package/lib/module/ui/screens/page-unavailable-screen.js +97 -0
  107. package/lib/module/ui/screens/page-unavailable-screen.js.map +1 -0
  108. package/lib/module/ui/spare-link-host.js +221 -236
  109. package/lib/module/ui/spare-link-host.js.map +1 -1
  110. package/lib/module/ui/widgets/index.js +1 -2
  111. package/lib/module/ui/widgets/index.js.map +1 -1
  112. package/lib/module/version.js +1 -1
  113. package/lib/module/version.js.map +1 -1
  114. package/lib/typescript/commonjs/core/models/index.d.ts +1 -123
  115. package/lib/typescript/commonjs/core/models/index.d.ts.map +1 -1
  116. package/lib/typescript/commonjs/core/models/payment-return-params.d.ts +91 -8
  117. package/lib/typescript/commonjs/core/models/payment-return-params.d.ts.map +1 -1
  118. package/lib/typescript/commonjs/core/models/pending-session-record.d.ts +11 -0
  119. package/lib/typescript/commonjs/core/models/pending-session-record.d.ts.map +1 -0
  120. package/lib/typescript/commonjs/core/services/hosted-flow-controller.d.ts +119 -0
  121. package/lib/typescript/commonjs/core/services/hosted-flow-controller.d.ts.map +1 -0
  122. package/lib/typescript/commonjs/core/services/hosted-flow-state.d.ts +75 -0
  123. package/lib/typescript/commonjs/core/services/hosted-flow-state.d.ts.map +1 -0
  124. package/lib/typescript/commonjs/index.d.ts +5 -14
  125. package/lib/typescript/commonjs/index.d.ts.map +1 -1
  126. package/lib/typescript/commonjs/internal/bank-redirect.d.ts.map +1 -1
  127. package/lib/typescript/commonjs/internal/hosted/bridge-message.d.ts +44 -0
  128. package/lib/typescript/commonjs/internal/hosted/bridge-message.d.ts.map +1 -0
  129. package/lib/typescript/commonjs/internal/hosted/hosted-url.d.ts +30 -0
  130. package/lib/typescript/commonjs/internal/hosted/hosted-url.d.ts.map +1 -0
  131. package/lib/typescript/commonjs/internal/index.d.ts +0 -1
  132. package/lib/typescript/commonjs/internal/index.d.ts.map +1 -1
  133. package/lib/typescript/commonjs/internal/redact-uri.d.ts +21 -1
  134. package/lib/typescript/commonjs/internal/redact-uri.d.ts.map +1 -1
  135. package/lib/typescript/commonjs/internal/secure-store-pending-session-store.d.ts +3 -2
  136. package/lib/typescript/commonjs/internal/secure-store-pending-session-store.d.ts.map +1 -1
  137. package/lib/typescript/commonjs/internal/url-parts.d.ts +46 -0
  138. package/lib/typescript/commonjs/internal/url-parts.d.ts.map +1 -0
  139. package/lib/typescript/commonjs/public/index.d.ts +4 -6
  140. package/lib/typescript/commonjs/public/index.d.ts.map +1 -1
  141. package/lib/typescript/commonjs/public/payment-result.d.ts +50 -12
  142. package/lib/typescript/commonjs/public/payment-result.d.ts.map +1 -1
  143. package/lib/typescript/commonjs/public/recovery-result.d.ts +11 -20
  144. package/lib/typescript/commonjs/public/recovery-result.d.ts.map +1 -1
  145. package/lib/typescript/commonjs/public/spare-link-config.d.ts +13 -31
  146. package/lib/typescript/commonjs/public/spare-link-config.d.ts.map +1 -1
  147. package/lib/typescript/commonjs/public/spare-link-event.d.ts +29 -31
  148. package/lib/typescript/commonjs/public/spare-link-event.d.ts.map +1 -1
  149. package/lib/typescript/commonjs/public/spare-link-host-api.d.ts +1 -12
  150. package/lib/typescript/commonjs/public/spare-link-host-api.d.ts.map +1 -1
  151. package/lib/typescript/commonjs/public/spare-link-instance.d.ts +26 -20
  152. package/lib/typescript/commonjs/public/spare-link-instance.d.ts.map +1 -1
  153. package/lib/typescript/commonjs/public/spare-link-session.d.ts +3 -8
  154. package/lib/typescript/commonjs/public/spare-link-session.d.ts.map +1 -1
  155. package/lib/typescript/commonjs/public/spare-link.d.ts +1 -1
  156. package/lib/typescript/commonjs/public/spare-link.d.ts.map +1 -1
  157. package/lib/typescript/commonjs/ui/hooks/use-hosted-flow-state.d.ts +9 -0
  158. package/lib/typescript/commonjs/ui/hooks/use-hosted-flow-state.d.ts.map +1 -0
  159. package/lib/typescript/commonjs/ui/hosted/hosted-payment-page.d.ts +17 -0
  160. package/lib/typescript/commonjs/ui/hosted/hosted-payment-page.d.ts.map +1 -0
  161. package/lib/typescript/commonjs/ui/hosted/hosted-payment-webview.d.ts +43 -0
  162. package/lib/typescript/commonjs/ui/hosted/hosted-payment-webview.d.ts.map +1 -0
  163. package/lib/typescript/commonjs/ui/screens/index.d.ts +1 -3
  164. package/lib/typescript/commonjs/ui/screens/index.d.ts.map +1 -1
  165. package/lib/typescript/commonjs/ui/screens/page-unavailable-screen.d.ts +18 -0
  166. package/lib/typescript/commonjs/ui/screens/page-unavailable-screen.d.ts.map +1 -0
  167. package/lib/typescript/commonjs/ui/spare-link-host.d.ts +4 -5
  168. package/lib/typescript/commonjs/ui/spare-link-host.d.ts.map +1 -1
  169. package/lib/typescript/commonjs/ui/widgets/index.d.ts +1 -2
  170. package/lib/typescript/commonjs/ui/widgets/index.d.ts.map +1 -1
  171. package/lib/typescript/commonjs/version.d.ts +1 -1
  172. package/lib/typescript/commonjs/version.d.ts.map +1 -1
  173. package/lib/typescript/module/core/models/index.d.ts +1 -123
  174. package/lib/typescript/module/core/models/index.d.ts.map +1 -1
  175. package/lib/typescript/module/core/models/payment-return-params.d.ts +91 -8
  176. package/lib/typescript/module/core/models/payment-return-params.d.ts.map +1 -1
  177. package/lib/typescript/module/core/models/pending-session-record.d.ts +11 -0
  178. package/lib/typescript/module/core/models/pending-session-record.d.ts.map +1 -0
  179. package/lib/typescript/module/core/services/hosted-flow-controller.d.ts +119 -0
  180. package/lib/typescript/module/core/services/hosted-flow-controller.d.ts.map +1 -0
  181. package/lib/typescript/module/core/services/hosted-flow-state.d.ts +75 -0
  182. package/lib/typescript/module/core/services/hosted-flow-state.d.ts.map +1 -0
  183. package/lib/typescript/module/index.d.ts +5 -14
  184. package/lib/typescript/module/index.d.ts.map +1 -1
  185. package/lib/typescript/module/internal/bank-redirect.d.ts.map +1 -1
  186. package/lib/typescript/module/internal/hosted/bridge-message.d.ts +44 -0
  187. package/lib/typescript/module/internal/hosted/bridge-message.d.ts.map +1 -0
  188. package/lib/typescript/module/internal/hosted/hosted-url.d.ts +30 -0
  189. package/lib/typescript/module/internal/hosted/hosted-url.d.ts.map +1 -0
  190. package/lib/typescript/module/internal/index.d.ts +0 -1
  191. package/lib/typescript/module/internal/index.d.ts.map +1 -1
  192. package/lib/typescript/module/internal/redact-uri.d.ts +21 -1
  193. package/lib/typescript/module/internal/redact-uri.d.ts.map +1 -1
  194. package/lib/typescript/module/internal/secure-store-pending-session-store.d.ts +3 -2
  195. package/lib/typescript/module/internal/secure-store-pending-session-store.d.ts.map +1 -1
  196. package/lib/typescript/module/internal/url-parts.d.ts +46 -0
  197. package/lib/typescript/module/internal/url-parts.d.ts.map +1 -0
  198. package/lib/typescript/module/public/index.d.ts +4 -6
  199. package/lib/typescript/module/public/index.d.ts.map +1 -1
  200. package/lib/typescript/module/public/payment-result.d.ts +50 -12
  201. package/lib/typescript/module/public/payment-result.d.ts.map +1 -1
  202. package/lib/typescript/module/public/recovery-result.d.ts +11 -20
  203. package/lib/typescript/module/public/recovery-result.d.ts.map +1 -1
  204. package/lib/typescript/module/public/spare-link-config.d.ts +13 -31
  205. package/lib/typescript/module/public/spare-link-config.d.ts.map +1 -1
  206. package/lib/typescript/module/public/spare-link-event.d.ts +29 -31
  207. package/lib/typescript/module/public/spare-link-event.d.ts.map +1 -1
  208. package/lib/typescript/module/public/spare-link-host-api.d.ts +1 -12
  209. package/lib/typescript/module/public/spare-link-host-api.d.ts.map +1 -1
  210. package/lib/typescript/module/public/spare-link-instance.d.ts +26 -20
  211. package/lib/typescript/module/public/spare-link-instance.d.ts.map +1 -1
  212. package/lib/typescript/module/public/spare-link-session.d.ts +3 -8
  213. package/lib/typescript/module/public/spare-link-session.d.ts.map +1 -1
  214. package/lib/typescript/module/public/spare-link.d.ts +1 -1
  215. package/lib/typescript/module/public/spare-link.d.ts.map +1 -1
  216. package/lib/typescript/module/ui/hooks/use-hosted-flow-state.d.ts +9 -0
  217. package/lib/typescript/module/ui/hooks/use-hosted-flow-state.d.ts.map +1 -0
  218. package/lib/typescript/module/ui/hosted/hosted-payment-page.d.ts +17 -0
  219. package/lib/typescript/module/ui/hosted/hosted-payment-page.d.ts.map +1 -0
  220. package/lib/typescript/module/ui/hosted/hosted-payment-webview.d.ts +43 -0
  221. package/lib/typescript/module/ui/hosted/hosted-payment-webview.d.ts.map +1 -0
  222. package/lib/typescript/module/ui/screens/index.d.ts +1 -3
  223. package/lib/typescript/module/ui/screens/index.d.ts.map +1 -1
  224. package/lib/typescript/module/ui/screens/page-unavailable-screen.d.ts +18 -0
  225. package/lib/typescript/module/ui/screens/page-unavailable-screen.d.ts.map +1 -0
  226. package/lib/typescript/module/ui/spare-link-host.d.ts +4 -5
  227. package/lib/typescript/module/ui/spare-link-host.d.ts.map +1 -1
  228. package/lib/typescript/module/ui/widgets/index.d.ts +1 -2
  229. package/lib/typescript/module/ui/widgets/index.d.ts.map +1 -1
  230. package/lib/typescript/module/version.d.ts +1 -1
  231. package/lib/typescript/module/version.d.ts.map +1 -1
  232. package/package.json +24 -22
  233. package/plugins/with-spare-link.js +6 -26
  234. package/src/core/models/index.ts +1 -139
  235. package/src/core/models/payment-return-params.ts +269 -21
  236. package/src/core/models/pending-session-record.ts +10 -0
  237. package/src/core/services/hosted-flow-controller.ts +374 -0
  238. package/src/core/services/hosted-flow-state.ts +123 -0
  239. package/src/index.ts +20 -89
  240. package/src/internal/bank-redirect.ts +23 -9
  241. package/src/internal/hosted/bridge-message.ts +106 -0
  242. package/src/internal/hosted/hosted-url.ts +33 -0
  243. package/src/internal/index.ts +0 -1
  244. package/src/internal/redact-uri.ts +69 -15
  245. package/src/internal/secure-store-pending-session-store.ts +28 -49
  246. package/src/internal/url-parts.ts +134 -0
  247. package/src/public/index.ts +2 -24
  248. package/src/public/payment-result.ts +50 -12
  249. package/src/public/recovery-result.ts +16 -25
  250. package/src/public/spare-link-config.ts +56 -43
  251. package/src/public/spare-link-event.ts +33 -42
  252. package/src/public/spare-link-host-api.ts +1 -14
  253. package/src/public/spare-link-instance.ts +57 -65
  254. package/src/public/spare-link-session.ts +4 -16
  255. package/src/public/spare-link.ts +1 -1
  256. package/src/ui/hooks/use-hosted-flow-state.ts +16 -0
  257. package/src/ui/hosted/hosted-payment-page.tsx +178 -0
  258. package/src/ui/hosted/hosted-payment-webview.tsx +164 -0
  259. package/src/ui/screens/index.ts +4 -6
  260. package/src/ui/screens/page-unavailable-screen.tsx +94 -0
  261. package/src/ui/spare-link-host.tsx +227 -247
  262. package/src/ui/widgets/index.ts +1 -2
  263. package/src/version.ts +1 -1
  264. package/CHANGELOG.md +0 -25
  265. package/lib/commonjs/core/client/link-api-client.js +0 -297
  266. package/lib/commonjs/core/client/link-api-client.js.map +0 -1
  267. package/lib/commonjs/core/errors/payment-api-error.js +0 -35
  268. package/lib/commonjs/core/errors/payment-api-error.js.map +0 -1
  269. package/lib/commonjs/core/models/link-session-status.js +0 -14
  270. package/lib/commonjs/core/models/link-session-status.js.map +0 -1
  271. package/lib/commonjs/core/models/payment-type.js +0 -45
  272. package/lib/commonjs/core/models/payment-type.js.map +0 -1
  273. package/lib/commonjs/core/models/wire-mappers.js +0 -277
  274. package/lib/commonjs/core/models/wire-mappers.js.map +0 -1
  275. package/lib/commonjs/core/services/consent-presenter.js +0 -150
  276. package/lib/commonjs/core/services/consent-presenter.js.map +0 -1
  277. package/lib/commonjs/core/services/execute-resume-if-needed.js +0 -216
  278. package/lib/commonjs/core/services/execute-resume-if-needed.js.map +0 -1
  279. package/lib/commonjs/core/services/multi-payment-rules-presenter.js +0 -151
  280. package/lib/commonjs/core/services/multi-payment-rules-presenter.js.map +0 -1
  281. package/lib/commonjs/core/services/payment-flow-controller.js +0 -547
  282. package/lib/commonjs/core/services/payment-flow-controller.js.map +0 -1
  283. package/lib/commonjs/core/services/payment-flow-state.js +0 -110
  284. package/lib/commonjs/core/services/payment-flow-state.js.map +0 -1
  285. package/lib/commonjs/core/services/payment-result-mapper.js +0 -49
  286. package/lib/commonjs/core/services/payment-result-mapper.js.map +0 -1
  287. package/lib/commonjs/core/services/presentation-utils.js +0 -11
  288. package/lib/commonjs/core/services/presentation-utils.js.map +0 -1
  289. package/lib/commonjs/core/services/redirect-buffer.js +0 -40
  290. package/lib/commonjs/core/services/redirect-buffer.js.map +0 -1
  291. package/lib/commonjs/core/services/user-friendly-messages.js +0 -46
  292. package/lib/commonjs/core/services/user-friendly-messages.js.map +0 -1
  293. package/lib/commonjs/internal/telemetry-collector.js +0 -80
  294. package/lib/commonjs/internal/telemetry-collector.js.map +0 -1
  295. package/lib/commonjs/public/constants.js +0 -21
  296. package/lib/commonjs/public/constants.js.map +0 -1
  297. package/lib/commonjs/public/spare-link-callbacks.js +0 -6
  298. package/lib/commonjs/public/spare-link-callbacks.js.map +0 -1
  299. package/lib/commonjs/ui/consent/charge-bearer-display.js +0 -99
  300. package/lib/commonjs/ui/consent/charge-bearer-display.js.map +0 -1
  301. package/lib/commonjs/ui/consent/consent-accordion.js +0 -94
  302. package/lib/commonjs/ui/consent/consent-accordion.js.map +0 -1
  303. package/lib/commonjs/ui/consent/consent-summary-section.js +0 -27
  304. package/lib/commonjs/ui/consent/consent-summary-section.js.map +0 -1
  305. package/lib/commonjs/ui/consent/cop-information.js +0 -168
  306. package/lib/commonjs/ui/consent/cop-information.js.map +0 -1
  307. package/lib/commonjs/ui/consent/international-payment-summary.js +0 -98
  308. package/lib/commonjs/ui/consent/international-payment-summary.js.map +0 -1
  309. package/lib/commonjs/ui/consent/label-value-rows.js +0 -59
  310. package/lib/commonjs/ui/consent/label-value-rows.js.map +0 -1
  311. package/lib/commonjs/ui/consent/multi-payment-rules-list.js +0 -130
  312. package/lib/commonjs/ui/consent/multi-payment-rules-list.js.map +0 -1
  313. package/lib/commonjs/ui/consent/multi-payment-summary.js +0 -99
  314. package/lib/commonjs/ui/consent/multi-payment-summary.js.map +0 -1
  315. package/lib/commonjs/ui/consent/single-payment-summary.js +0 -158
  316. package/lib/commonjs/ui/consent/single-payment-summary.js.map +0 -1
  317. package/lib/commonjs/ui/consent/terms-link.js +0 -35
  318. package/lib/commonjs/ui/consent/terms-link.js.map +0 -1
  319. package/lib/commonjs/ui/hooks/use-payment-flow-state.js.map +0 -1
  320. package/lib/commonjs/ui/payment-flow-page.js +0 -235
  321. package/lib/commonjs/ui/payment-flow-page.js.map +0 -1
  322. package/lib/commonjs/ui/screens/bank-selection-screen.js +0 -215
  323. package/lib/commonjs/ui/screens/bank-selection-screen.js.map +0 -1
  324. package/lib/commonjs/ui/screens/consent-details-screen.js +0 -124
  325. package/lib/commonjs/ui/screens/consent-details-screen.js.map +0 -1
  326. package/lib/commonjs/ui/screens/mandate-setup-success-screen.js +0 -79
  327. package/lib/commonjs/ui/screens/mandate-setup-success-screen.js.map +0 -1
  328. package/lib/commonjs/ui/widgets/layout-w-header.js +0 -106
  329. package/lib/commonjs/ui/widgets/layout-w-header.js.map +0 -1
  330. package/lib/commonjs/ui/widgets/stepper.js +0 -124
  331. package/lib/commonjs/ui/widgets/stepper.js.map +0 -1
  332. package/lib/module/core/client/link-api-client.js +0 -292
  333. package/lib/module/core/client/link-api-client.js.map +0 -1
  334. package/lib/module/core/errors/payment-api-error.js +0 -29
  335. package/lib/module/core/errors/payment-api-error.js.map +0 -1
  336. package/lib/module/core/models/link-session-status.js +0 -10
  337. package/lib/module/core/models/link-session-status.js.map +0 -1
  338. package/lib/module/core/models/payment-type.js +0 -36
  339. package/lib/module/core/models/payment-type.js.map +0 -1
  340. package/lib/module/core/models/wire-mappers.js +0 -263
  341. package/lib/module/core/models/wire-mappers.js.map +0 -1
  342. package/lib/module/core/services/consent-presenter.js +0 -140
  343. package/lib/module/core/services/consent-presenter.js.map +0 -1
  344. package/lib/module/core/services/execute-resume-if-needed.js +0 -211
  345. package/lib/module/core/services/execute-resume-if-needed.js.map +0 -1
  346. package/lib/module/core/services/multi-payment-rules-presenter.js +0 -146
  347. package/lib/module/core/services/multi-payment-rules-presenter.js.map +0 -1
  348. package/lib/module/core/services/payment-flow-controller.js +0 -544
  349. package/lib/module/core/services/payment-flow-controller.js.map +0 -1
  350. package/lib/module/core/services/payment-flow-state.js +0 -106
  351. package/lib/module/core/services/payment-flow-state.js.map +0 -1
  352. package/lib/module/core/services/payment-result-mapper.js +0 -45
  353. package/lib/module/core/services/payment-result-mapper.js.map +0 -1
  354. package/lib/module/core/services/presentation-utils.js +0 -7
  355. package/lib/module/core/services/presentation-utils.js.map +0 -1
  356. package/lib/module/core/services/redirect-buffer.js +0 -33
  357. package/lib/module/core/services/redirect-buffer.js.map +0 -1
  358. package/lib/module/core/services/user-friendly-messages.js +0 -42
  359. package/lib/module/core/services/user-friendly-messages.js.map +0 -1
  360. package/lib/module/internal/telemetry-collector.js +0 -75
  361. package/lib/module/internal/telemetry-collector.js.map +0 -1
  362. package/lib/module/public/constants.js +0 -17
  363. package/lib/module/public/constants.js.map +0 -1
  364. package/lib/module/public/spare-link-callbacks.js +0 -4
  365. package/lib/module/public/spare-link-callbacks.js.map +0 -1
  366. package/lib/module/ui/consent/charge-bearer-display.js +0 -95
  367. package/lib/module/ui/consent/charge-bearer-display.js.map +0 -1
  368. package/lib/module/ui/consent/consent-accordion.js +0 -90
  369. package/lib/module/ui/consent/consent-accordion.js.map +0 -1
  370. package/lib/module/ui/consent/consent-summary-section.js +0 -23
  371. package/lib/module/ui/consent/consent-summary-section.js.map +0 -1
  372. package/lib/module/ui/consent/cop-information.js +0 -165
  373. package/lib/module/ui/consent/cop-information.js.map +0 -1
  374. package/lib/module/ui/consent/international-payment-summary.js +0 -94
  375. package/lib/module/ui/consent/international-payment-summary.js.map +0 -1
  376. package/lib/module/ui/consent/label-value-rows.js +0 -55
  377. package/lib/module/ui/consent/label-value-rows.js.map +0 -1
  378. package/lib/module/ui/consent/multi-payment-rules-list.js +0 -125
  379. package/lib/module/ui/consent/multi-payment-rules-list.js.map +0 -1
  380. package/lib/module/ui/consent/multi-payment-summary.js +0 -95
  381. package/lib/module/ui/consent/multi-payment-summary.js.map +0 -1
  382. package/lib/module/ui/consent/single-payment-summary.js +0 -154
  383. package/lib/module/ui/consent/single-payment-summary.js.map +0 -1
  384. package/lib/module/ui/consent/terms-link.js +0 -31
  385. package/lib/module/ui/consent/terms-link.js.map +0 -1
  386. package/lib/module/ui/hooks/use-payment-flow-state.js.map +0 -1
  387. package/lib/module/ui/payment-flow-page.js +0 -232
  388. package/lib/module/ui/payment-flow-page.js.map +0 -1
  389. package/lib/module/ui/screens/bank-selection-screen.js +0 -211
  390. package/lib/module/ui/screens/bank-selection-screen.js.map +0 -1
  391. package/lib/module/ui/screens/consent-details-screen.js +0 -120
  392. package/lib/module/ui/screens/consent-details-screen.js.map +0 -1
  393. package/lib/module/ui/screens/mandate-setup-success-screen.js +0 -75
  394. package/lib/module/ui/screens/mandate-setup-success-screen.js.map +0 -1
  395. package/lib/module/ui/widgets/layout-w-header.js +0 -102
  396. package/lib/module/ui/widgets/layout-w-header.js.map +0 -1
  397. package/lib/module/ui/widgets/stepper.js +0 -120
  398. package/lib/module/ui/widgets/stepper.js.map +0 -1
  399. package/lib/typescript/commonjs/core/client/link-api-client.d.ts +0 -70
  400. package/lib/typescript/commonjs/core/client/link-api-client.d.ts.map +0 -1
  401. package/lib/typescript/commonjs/core/errors/payment-api-error.d.ts +0 -15
  402. package/lib/typescript/commonjs/core/errors/payment-api-error.d.ts.map +0 -1
  403. package/lib/typescript/commonjs/core/models/link-session-status.d.ts +0 -6
  404. package/lib/typescript/commonjs/core/models/link-session-status.d.ts.map +0 -1
  405. package/lib/typescript/commonjs/core/models/payment-type.d.ts +0 -18
  406. package/lib/typescript/commonjs/core/models/payment-type.d.ts.map +0 -1
  407. package/lib/typescript/commonjs/core/models/wire-mappers.d.ts +0 -19
  408. package/lib/typescript/commonjs/core/models/wire-mappers.d.ts.map +0 -1
  409. package/lib/typescript/commonjs/core/services/consent-presenter.d.ts +0 -67
  410. package/lib/typescript/commonjs/core/services/consent-presenter.d.ts.map +0 -1
  411. package/lib/typescript/commonjs/core/services/execute-resume-if-needed.d.ts +0 -32
  412. package/lib/typescript/commonjs/core/services/execute-resume-if-needed.d.ts.map +0 -1
  413. package/lib/typescript/commonjs/core/services/multi-payment-rules-presenter.d.ts +0 -9
  414. package/lib/typescript/commonjs/core/services/multi-payment-rules-presenter.d.ts.map +0 -1
  415. package/lib/typescript/commonjs/core/services/payment-flow-controller.d.ts +0 -146
  416. package/lib/typescript/commonjs/core/services/payment-flow-controller.d.ts.map +0 -1
  417. package/lib/typescript/commonjs/core/services/payment-flow-state.d.ts +0 -64
  418. package/lib/typescript/commonjs/core/services/payment-flow-state.d.ts.map +0 -1
  419. package/lib/typescript/commonjs/core/services/payment-result-mapper.d.ts +0 -5
  420. package/lib/typescript/commonjs/core/services/payment-result-mapper.d.ts.map +0 -1
  421. package/lib/typescript/commonjs/core/services/presentation-utils.d.ts +0 -5
  422. package/lib/typescript/commonjs/core/services/presentation-utils.d.ts.map +0 -1
  423. package/lib/typescript/commonjs/core/services/redirect-buffer.d.ts +0 -6
  424. package/lib/typescript/commonjs/core/services/redirect-buffer.d.ts.map +0 -1
  425. package/lib/typescript/commonjs/core/services/user-friendly-messages.d.ts +0 -6
  426. package/lib/typescript/commonjs/core/services/user-friendly-messages.d.ts.map +0 -1
  427. package/lib/typescript/commonjs/internal/telemetry-collector.d.ts +0 -2
  428. package/lib/typescript/commonjs/internal/telemetry-collector.d.ts.map +0 -1
  429. package/lib/typescript/commonjs/public/constants.d.ts +0 -12
  430. package/lib/typescript/commonjs/public/constants.d.ts.map +0 -1
  431. package/lib/typescript/commonjs/public/spare-link-callbacks.d.ts +0 -14
  432. package/lib/typescript/commonjs/public/spare-link-callbacks.d.ts.map +0 -1
  433. package/lib/typescript/commonjs/ui/consent/charge-bearer-display.d.ts +0 -5
  434. package/lib/typescript/commonjs/ui/consent/charge-bearer-display.d.ts.map +0 -1
  435. package/lib/typescript/commonjs/ui/consent/consent-accordion.d.ts +0 -10
  436. package/lib/typescript/commonjs/ui/consent/consent-accordion.d.ts.map +0 -1
  437. package/lib/typescript/commonjs/ui/consent/consent-summary-section.d.ts +0 -6
  438. package/lib/typescript/commonjs/ui/consent/consent-summary-section.d.ts.map +0 -1
  439. package/lib/typescript/commonjs/ui/consent/cop-information.d.ts +0 -6
  440. package/lib/typescript/commonjs/ui/consent/cop-information.d.ts.map +0 -1
  441. package/lib/typescript/commonjs/ui/consent/international-payment-summary.d.ts +0 -6
  442. package/lib/typescript/commonjs/ui/consent/international-payment-summary.d.ts.map +0 -1
  443. package/lib/typescript/commonjs/ui/consent/label-value-rows.d.ts +0 -10
  444. package/lib/typescript/commonjs/ui/consent/label-value-rows.d.ts.map +0 -1
  445. package/lib/typescript/commonjs/ui/consent/multi-payment-rules-list.d.ts +0 -15
  446. package/lib/typescript/commonjs/ui/consent/multi-payment-rules-list.d.ts.map +0 -1
  447. package/lib/typescript/commonjs/ui/consent/multi-payment-summary.d.ts +0 -6
  448. package/lib/typescript/commonjs/ui/consent/multi-payment-summary.d.ts.map +0 -1
  449. package/lib/typescript/commonjs/ui/consent/single-payment-summary.d.ts +0 -6
  450. package/lib/typescript/commonjs/ui/consent/single-payment-summary.d.ts.map +0 -1
  451. package/lib/typescript/commonjs/ui/consent/terms-link.d.ts +0 -2
  452. package/lib/typescript/commonjs/ui/consent/terms-link.d.ts.map +0 -1
  453. package/lib/typescript/commonjs/ui/hooks/use-payment-flow-state.d.ts +0 -9
  454. package/lib/typescript/commonjs/ui/hooks/use-payment-flow-state.d.ts.map +0 -1
  455. package/lib/typescript/commonjs/ui/payment-flow-page.d.ts +0 -20
  456. package/lib/typescript/commonjs/ui/payment-flow-page.d.ts.map +0 -1
  457. package/lib/typescript/commonjs/ui/screens/bank-selection-screen.d.ts +0 -15
  458. package/lib/typescript/commonjs/ui/screens/bank-selection-screen.d.ts.map +0 -1
  459. package/lib/typescript/commonjs/ui/screens/consent-details-screen.d.ts +0 -13
  460. package/lib/typescript/commonjs/ui/screens/consent-details-screen.d.ts.map +0 -1
  461. package/lib/typescript/commonjs/ui/screens/mandate-setup-success-screen.d.ts +0 -10
  462. package/lib/typescript/commonjs/ui/screens/mandate-setup-success-screen.d.ts.map +0 -1
  463. package/lib/typescript/commonjs/ui/widgets/layout-w-header.d.ts +0 -20
  464. package/lib/typescript/commonjs/ui/widgets/layout-w-header.d.ts.map +0 -1
  465. package/lib/typescript/commonjs/ui/widgets/stepper.d.ts +0 -15
  466. package/lib/typescript/commonjs/ui/widgets/stepper.d.ts.map +0 -1
  467. package/lib/typescript/module/core/client/link-api-client.d.ts +0 -70
  468. package/lib/typescript/module/core/client/link-api-client.d.ts.map +0 -1
  469. package/lib/typescript/module/core/errors/payment-api-error.d.ts +0 -15
  470. package/lib/typescript/module/core/errors/payment-api-error.d.ts.map +0 -1
  471. package/lib/typescript/module/core/models/link-session-status.d.ts +0 -6
  472. package/lib/typescript/module/core/models/link-session-status.d.ts.map +0 -1
  473. package/lib/typescript/module/core/models/payment-type.d.ts +0 -18
  474. package/lib/typescript/module/core/models/payment-type.d.ts.map +0 -1
  475. package/lib/typescript/module/core/models/wire-mappers.d.ts +0 -19
  476. package/lib/typescript/module/core/models/wire-mappers.d.ts.map +0 -1
  477. package/lib/typescript/module/core/services/consent-presenter.d.ts +0 -67
  478. package/lib/typescript/module/core/services/consent-presenter.d.ts.map +0 -1
  479. package/lib/typescript/module/core/services/execute-resume-if-needed.d.ts +0 -32
  480. package/lib/typescript/module/core/services/execute-resume-if-needed.d.ts.map +0 -1
  481. package/lib/typescript/module/core/services/multi-payment-rules-presenter.d.ts +0 -9
  482. package/lib/typescript/module/core/services/multi-payment-rules-presenter.d.ts.map +0 -1
  483. package/lib/typescript/module/core/services/payment-flow-controller.d.ts +0 -146
  484. package/lib/typescript/module/core/services/payment-flow-controller.d.ts.map +0 -1
  485. package/lib/typescript/module/core/services/payment-flow-state.d.ts +0 -64
  486. package/lib/typescript/module/core/services/payment-flow-state.d.ts.map +0 -1
  487. package/lib/typescript/module/core/services/payment-result-mapper.d.ts +0 -5
  488. package/lib/typescript/module/core/services/payment-result-mapper.d.ts.map +0 -1
  489. package/lib/typescript/module/core/services/presentation-utils.d.ts +0 -5
  490. package/lib/typescript/module/core/services/presentation-utils.d.ts.map +0 -1
  491. package/lib/typescript/module/core/services/redirect-buffer.d.ts +0 -6
  492. package/lib/typescript/module/core/services/redirect-buffer.d.ts.map +0 -1
  493. package/lib/typescript/module/core/services/user-friendly-messages.d.ts +0 -6
  494. package/lib/typescript/module/core/services/user-friendly-messages.d.ts.map +0 -1
  495. package/lib/typescript/module/internal/telemetry-collector.d.ts +0 -2
  496. package/lib/typescript/module/internal/telemetry-collector.d.ts.map +0 -1
  497. package/lib/typescript/module/public/constants.d.ts +0 -12
  498. package/lib/typescript/module/public/constants.d.ts.map +0 -1
  499. package/lib/typescript/module/public/spare-link-callbacks.d.ts +0 -14
  500. package/lib/typescript/module/public/spare-link-callbacks.d.ts.map +0 -1
  501. package/lib/typescript/module/ui/consent/charge-bearer-display.d.ts +0 -5
  502. package/lib/typescript/module/ui/consent/charge-bearer-display.d.ts.map +0 -1
  503. package/lib/typescript/module/ui/consent/consent-accordion.d.ts +0 -10
  504. package/lib/typescript/module/ui/consent/consent-accordion.d.ts.map +0 -1
  505. package/lib/typescript/module/ui/consent/consent-summary-section.d.ts +0 -6
  506. package/lib/typescript/module/ui/consent/consent-summary-section.d.ts.map +0 -1
  507. package/lib/typescript/module/ui/consent/cop-information.d.ts +0 -6
  508. package/lib/typescript/module/ui/consent/cop-information.d.ts.map +0 -1
  509. package/lib/typescript/module/ui/consent/international-payment-summary.d.ts +0 -6
  510. package/lib/typescript/module/ui/consent/international-payment-summary.d.ts.map +0 -1
  511. package/lib/typescript/module/ui/consent/label-value-rows.d.ts +0 -10
  512. package/lib/typescript/module/ui/consent/label-value-rows.d.ts.map +0 -1
  513. package/lib/typescript/module/ui/consent/multi-payment-rules-list.d.ts +0 -15
  514. package/lib/typescript/module/ui/consent/multi-payment-rules-list.d.ts.map +0 -1
  515. package/lib/typescript/module/ui/consent/multi-payment-summary.d.ts +0 -6
  516. package/lib/typescript/module/ui/consent/multi-payment-summary.d.ts.map +0 -1
  517. package/lib/typescript/module/ui/consent/single-payment-summary.d.ts +0 -6
  518. package/lib/typescript/module/ui/consent/single-payment-summary.d.ts.map +0 -1
  519. package/lib/typescript/module/ui/consent/terms-link.d.ts +0 -2
  520. package/lib/typescript/module/ui/consent/terms-link.d.ts.map +0 -1
  521. package/lib/typescript/module/ui/hooks/use-payment-flow-state.d.ts +0 -9
  522. package/lib/typescript/module/ui/hooks/use-payment-flow-state.d.ts.map +0 -1
  523. package/lib/typescript/module/ui/payment-flow-page.d.ts +0 -20
  524. package/lib/typescript/module/ui/payment-flow-page.d.ts.map +0 -1
  525. package/lib/typescript/module/ui/screens/bank-selection-screen.d.ts +0 -15
  526. package/lib/typescript/module/ui/screens/bank-selection-screen.d.ts.map +0 -1
  527. package/lib/typescript/module/ui/screens/consent-details-screen.d.ts +0 -13
  528. package/lib/typescript/module/ui/screens/consent-details-screen.d.ts.map +0 -1
  529. package/lib/typescript/module/ui/screens/mandate-setup-success-screen.d.ts +0 -10
  530. package/lib/typescript/module/ui/screens/mandate-setup-success-screen.d.ts.map +0 -1
  531. package/lib/typescript/module/ui/widgets/layout-w-header.d.ts +0 -20
  532. package/lib/typescript/module/ui/widgets/layout-w-header.d.ts.map +0 -1
  533. package/lib/typescript/module/ui/widgets/stepper.d.ts +0 -15
  534. package/lib/typescript/module/ui/widgets/stepper.d.ts.map +0 -1
  535. package/src/core/client/link-api-client.ts +0 -414
  536. package/src/core/errors/payment-api-error.ts +0 -35
  537. package/src/core/models/link-session-status.ts +0 -7
  538. package/src/core/models/payment-type.ts +0 -54
  539. package/src/core/models/wire-mappers.ts +0 -315
  540. package/src/core/services/consent-presenter.ts +0 -213
  541. package/src/core/services/execute-resume-if-needed.ts +0 -243
  542. package/src/core/services/multi-payment-rules-presenter.ts +0 -158
  543. package/src/core/services/payment-flow-controller.ts +0 -607
  544. package/src/core/services/payment-flow-state.ts +0 -124
  545. package/src/core/services/payment-result-mapper.ts +0 -41
  546. package/src/core/services/presentation-utils.ts +0 -4
  547. package/src/core/services/redirect-buffer.ts +0 -34
  548. package/src/core/services/user-friendly-messages.ts +0 -39
  549. package/src/internal/telemetry-collector.ts +0 -90
  550. package/src/public/constants.ts +0 -14
  551. package/src/public/spare-link-callbacks.ts +0 -20
  552. package/src/ui/consent/charge-bearer-display.tsx +0 -68
  553. package/src/ui/consent/consent-accordion.tsx +0 -89
  554. package/src/ui/consent/consent-summary-section.tsx +0 -19
  555. package/src/ui/consent/cop-information.tsx +0 -121
  556. package/src/ui/consent/international-payment-summary.tsx +0 -83
  557. package/src/ui/consent/label-value-rows.tsx +0 -50
  558. package/src/ui/consent/multi-payment-rules-list.tsx +0 -138
  559. package/src/ui/consent/multi-payment-summary.tsx +0 -82
  560. package/src/ui/consent/single-payment-summary.tsx +0 -123
  561. package/src/ui/consent/terms-link.tsx +0 -27
  562. package/src/ui/hooks/use-payment-flow-state.ts +0 -16
  563. package/src/ui/payment-flow-page.tsx +0 -254
  564. package/src/ui/screens/bank-selection-screen.tsx +0 -209
  565. package/src/ui/screens/consent-details-screen.tsx +0 -106
  566. package/src/ui/screens/mandate-setup-success-screen.tsx +0 -72
  567. package/src/ui/widgets/layout-w-header.tsx +0 -89
  568. package/src/ui/widgets/stepper.tsx +0 -126
@@ -1,22 +1,19 @@
1
1
  "use strict";
2
2
 
3
3
  import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
4
- import { ActivityIndicator, Modal, SafeAreaView, StyleSheet, View } from 'react-native';
4
+ import { ActivityIndicator, Modal, StyleSheet, View } from 'react-native';
5
+ // `react-native`'s own SafeAreaView applies nothing on Android, which left the
6
+ // hosted page's header under the status bar there. This one insets both platforms.
7
+ import { SafeAreaView } from 'react-native-safe-area-context';
5
8
  import { enableScreens } from 'react-native-screens';
6
- import { LinkApiClient } from "../core/client/link-api-client.js";
7
- import { isPaymentReturnCallbackUri } from "../core/models/payment-return-params.js";
8
- import { executeResumeIfNeeded } from "../core/services/execute-resume-if-needed.js";
9
- import { PaymentFlowController } from "../core/services/payment-flow-controller.js";
10
- import { setBufferedRedirect } from "../core/services/redirect-buffer.js";
11
- import { userFriendlyMessageFor } from "../core/services/user-friendly-messages.js";
12
- import { launchBankRedirect as defaultLaunchBankRedirect } from "../internal/bank-redirect.js";
9
+ import { isPaymentReturnCallbackUri, readPaymentReturn } from "../core/models/payment-return-params.js";
10
+ import { HostedFlowController } from "../core/services/hosted-flow-controller.js";
13
11
  import { createLogger } from "../internal/logger.js";
14
- import { collectTelemetry } from "../internal/telemetry-collector.js";
12
+ import { redactPaymentReturnUri } from "../internal/redact-uri.js";
15
13
  import { paymentAbandoned, paymentCancelled, paymentFailed, paymentSuccess } from "../public/payment-result.js";
16
- import { tenantCountryCode } from "../public/spare-link-config.js";
17
14
  import { SpareLinkEvents } from "../public/spare-link-event.js";
18
- import { mapHostRecovery, noRecovery } from "../public/spare-link-instance.js";
19
- import { PaymentFlowPage } from "./payment-flow-page.js";
15
+ import { noRecovery } from "../public/spare-link-instance.js";
16
+ import { HostedPaymentPage } from "./hosted/hosted-payment-page.js";
20
17
  import { Colors } from "./theme/index.js";
21
18
  import { useLinkFonts } from "./theme/fonts.js";
22
19
  import { ModalDismissButton } from "./widgets/modal-dismiss-button.js";
@@ -25,7 +22,7 @@ enableScreens();
25
22
  const log = createLogger('SpareLinkHost');
26
23
  /**
27
24
  * Host component that mounts the SDK modal and connects a {@link SpareLink}
28
- * instance — Flutter-aligned integration (one instance, one host).
25
+ * instance — one instance, one host.
29
26
  */
30
27
  export function SpareLinkHost(props) {
31
28
  const {
@@ -37,194 +34,200 @@ export function SpareLinkHost(props) {
37
34
  const fontsLoaded = useLinkFonts();
38
35
  const [active, setActive] = useState(null);
39
36
  const activeRef = useRef(null);
37
+
38
+ /** A return that arrived before there was a flow to give it to. */
39
+ const bufferedRedirect = useRef(null);
40
40
  useEffect(() => {
41
41
  activeRef.current = active;
42
42
  }, [active]);
43
- const emitMappedEvent = useCallback((linkToken, event, linkSessionId) => {
44
- switch (event) {
45
- case 'sessionLoaded':
46
- spareLink.emitEvent(SpareLinkEvents.sessionLoaded(linkToken, linkSessionId));
47
- break;
48
- case 'consentStarted':
49
- spareLink.emitEvent(SpareLinkEvents.consentStarted(linkToken));
50
- break;
51
- case 'redirectToBank':
52
- spareLink.emitEvent(SpareLinkEvents.redirectToBank(linkToken));
53
- break;
54
- case 'bankCallbackReceived':
55
- spareLink.emitEvent(SpareLinkEvents.bankCallbackReceived(linkToken));
56
- break;
57
- default:
58
- break;
59
- }
60
- }, [spareLink]);
61
- const close = useCallback((flow, result) => {
62
- void pendingSessionStore?.clear().catch(() => {
63
- log.warning('close: pendingSessionStore.clear() failed — continuing');
43
+
44
+ /**
45
+ * Serializes every write to the pending-session store.
46
+ *
47
+ * The store is pluggable, so it cannot be assumed to order its own writes: a
48
+ * `clear` overtaking a slow `save` would leave a record for a payment that has
49
+ * already resolved, and the next cold start would offer to recover it.
50
+ */
51
+ const persistQueue = useRef(Promise.resolve());
52
+ const enqueuePersist = useCallback(op => {
53
+ const next = persistQueue.current.then(op, op);
54
+ // Kept un-rejected so one failure does not poison the queue behind it.
55
+ persistQueue.current = next.catch(() => undefined);
56
+ return next;
57
+ }, []);
58
+ const clearPending = useCallback(() => {
59
+ if (!pendingSessionStore) return;
60
+ void enqueuePersist(() => pendingSessionStore.clear()).catch(() => {
61
+ log.warning('could not clear the pending payment — continuing');
64
62
  });
63
+ }, [pendingSessionStore, enqueuePersist]);
64
+ const close = useCallback((flow, result) => {
65
+ clearPending();
65
66
  flow.resolve(result);
66
67
  flow.controller.dispose();
67
68
  if (activeRef.current === flow) {
68
69
  activeRef.current = null;
69
70
  setActive(null);
70
71
  }
71
- }, [pendingSessionStore]);
72
+ }, [clearPending]);
73
+
74
+ /** Maps a resolved flow onto the result the caller awaits. */
75
+ const resultFor = useCallback(flow => {
76
+ const s = flow.controller.state;
77
+ const base = {
78
+ reference: s.reference,
79
+ ...reportedFields(s.report),
80
+ resolvedAtMs: Date.now()
81
+ };
82
+ switch (s.phase) {
83
+ case 'succeeded':
84
+ return paymentSuccess(base);
85
+ case 'cancelled':
86
+ return paymentCancelled(base);
87
+ case 'failed':
88
+ return paymentFailed({
89
+ ...base,
90
+ errorCode: s.errorCode ?? 'internal_error'
91
+ });
92
+ default:
93
+ // Anything else resolving is the payer leaving mid-flow, which may still
94
+ // complete at the bank — so it is reported as unresolved, not as a failure.
95
+ return paymentAbandoned(base);
96
+ }
97
+ }, []);
98
+ const onResolved = useCallback(() => {
99
+ const current = activeRef.current;
100
+ if (!current) return;
101
+ close(current, resultFor(current));
102
+ }, [close, resultFor]);
72
103
  const startFlow = useCallback(args => {
73
104
  if (activeRef.current) {
74
- log.warning('start: a payment flow is already in progress — rejecting concurrent call');
105
+ log.warning('start: a payment is already in progress — rejecting concurrent call');
75
106
  args.resolve(paymentFailed({
76
- linkToken: args.linkToken,
107
+ reference: args.reference,
77
108
  errorCode: 'concurrent_start',
78
- message: 'A payment flow is already in progress.',
109
+ message: 'A payment is already in progress.',
79
110
  resolvedAtMs: Date.now()
80
111
  }));
81
112
  return;
82
113
  }
83
114
  log.info(`start: tenant=${spareLink.tenant}, environment=${spareLink.environment}`);
84
- const controller = new PaymentFlowController({
85
- sessionToken: args.linkToken,
86
- environment: spareLink.environment,
87
- apiClient: new LinkApiClient({
88
- baseUrl: spareLink.resolvedBaseUrl,
89
- tenant: tenantCountryCode(spareLink.tenant),
90
- ...(spareLink.fetch ? {
91
- fetch: spareLink.fetch
92
- } : {}),
93
- ...(spareLink.requestTimeoutMs !== undefined ? {
94
- requestTimeoutMs: spareLink.requestTimeoutMs
95
- } : {})
96
- }),
97
- collectTelemetry,
98
- ...(pendingSessionStore ? {
99
- pendingSessionStore
100
- } : {}),
101
- onEvent: event => {
102
- emitMappedEvent(args.linkToken, event);
103
- if (event === 'sessionLoaded') {
104
- const linkSessionId = controller.state.linkSessionId;
105
- if (linkSessionId) {
106
- args.onSessionLoaded?.(linkSessionId);
107
- }
108
- }
109
- }
115
+ const controller = new HostedFlowController({
116
+ reference: args.reference,
117
+ ...(launchBankRedirect ? {
118
+ bankLauncher: launchBankRedirect
119
+ } : {})
110
120
  });
111
121
  const flow = {
112
122
  controller,
113
- linkToken: args.linkToken,
114
- resolve: args.resolve,
115
- ...(args.onSessionLoaded ? {
116
- onSessionLoaded: args.onSessionLoaded
117
- } : {})
123
+ reference: args.reference,
124
+ resolve: args.resolve
118
125
  };
119
- activeRef.current = flow;
120
- setActive(flow);
121
- void controller.hydrate().catch(err => {
122
- log.severe(`start: hydration failed — ${err instanceof Error ? err.message : String(err)}`);
123
- close(flow, paymentFailed({
124
- linkToken: args.linkToken,
125
- errorCode: 'hydration_error',
126
- message: 'Unable to load payment session. Please try again.',
127
- resolvedAtMs: Date.now()
128
- }));
126
+ controller.subscribe(() => {
127
+ const phase = controller.state.phase;
128
+ if (phase === 'hosted') {
129
+ spareLink.emitEvent(SpareLinkEvents.pageReady(args.reference));
130
+ } else if (phase === 'redirecting') {
131
+ spareLink.emitEvent(SpareLinkEvents.redirectToBank(args.reference));
132
+ }
129
133
  });
130
- }, [spareLink, pendingSessionStore, emitMappedEvent, close]);
134
+
135
+ // Claimed synchronously so a second `start` in the same tick is rejected by
136
+ // the guard above rather than racing this one.
137
+ activeRef.current = flow;
138
+
139
+ // Recorded *before* the page is presented, so the payer cannot reach their
140
+ // bank on a payment a cold start would not know about. A store that cannot
141
+ // write is not a reason to refuse the payment.
142
+ const present = () => {
143
+ if (activeRef.current !== flow) return;
144
+ setActive(flow);
145
+
146
+ // A return can beat the page onto the screen when the app was resumed
147
+ // rather than launched, so replay one that arrived before there was a flow.
148
+ const buffered = bufferedRedirect.current;
149
+ if (buffered) {
150
+ bufferedRedirect.current = null;
151
+ controller.handleReturn(buffered);
152
+ }
153
+ };
154
+ if (!pendingSessionStore) {
155
+ present();
156
+ return;
157
+ }
158
+ void enqueuePersist(() => pendingSessionStore.save({
159
+ reference: args.reference
160
+ })).catch(() => {
161
+ log.warning('could not record the pending payment — continuing');
162
+ }).finally(present);
163
+ }, [spareLink, pendingSessionStore, launchBankRedirect, enqueuePersist]);
131
164
  const handleRedirect = useCallback(async uri => {
132
- const current = activeRef.current;
133
165
  const asString = typeof uri === 'string' ? uri : uri.toString();
166
+ log.info(`handleRedirect: ${redactPaymentReturnUri(asString)}`);
167
+ if (!isPaymentReturnCallbackUri(asString)) return false;
168
+ const current = activeRef.current;
134
169
  if (!current) {
135
- if (!isPaymentReturnCallbackUri(asString)) {
136
- log.fine('handleRedirect: URI does not belong to payment flow — ignoring');
137
- return false;
138
- }
139
- setBufferedRedirect(asString);
140
- log.info('handleRedirect: no active controller — buffering URI for recovery');
170
+ log.info('handleRedirect: no active payment — holding for recovery');
171
+ bufferedRedirect.current = asString;
141
172
  return true;
142
173
  }
143
- if (!isPaymentReturnCallbackUri(asString)) {
144
- log.fine('handleRedirect: URI does not belong to payment flow — ignoring');
145
- return false;
146
- }
147
- log.info('handleRedirect: forwarding to controller');
148
- try {
149
- current.controller.handleCallback(uri);
150
- spareLink.emitEvent(SpareLinkEvents.bankCallbackReceived(current.linkToken));
151
- return true;
152
- } catch {
153
- return false;
154
- }
155
- }, [spareLink]);
156
- const openRecoveryFlow = useCallback(args => {
157
- if (activeRef.current) {
158
- args.controller.dispose();
159
- return;
160
- }
161
- const flow = {
162
- controller: args.controller,
163
- linkToken: args.linkToken,
164
- resolve: args.resolve ?? (() => {
165
- /* recovery UI only */
166
- })
167
- };
168
- activeRef.current = flow;
169
- setActive(flow);
170
- spareLink.emitEvent(SpareLinkEvents.initialized(args.linkToken));
174
+ spareLink.emitEvent(SpareLinkEvents.bankCallbackReceived(current.reference));
175
+ current.controller.handleReturn(asString);
176
+ return true;
171
177
  }, [spareLink]);
172
178
  const resumeIfNeeded = useCallback(async () => {
173
- if (!pendingSessionStore) {
179
+ if (activeRef.current) return noRecovery('flowAlreadyActive');
180
+ if (!pendingSessionStore) return noRecovery('persistenceUnavailable');
181
+ let record = null;
182
+ try {
183
+ record = await pendingSessionStore.load();
184
+ } catch {
185
+ log.warning('resumeIfNeeded: could not read the pending payment');
174
186
  return noRecovery('persistenceUnavailable');
175
187
  }
176
- if (activeRef.current) {
177
- return noRecovery('flowAlreadyActive');
178
- }
179
- let flowOpened = false;
180
- let openedLinkToken;
181
- const terminal = await executeResumeIfNeeded({
182
- config: {
183
- environment: spareLink.environment,
184
- tenant: spareLink.tenant,
185
- ...(spareLink.baseUrl ? {
186
- baseUrl: spareLink.baseUrl
187
- } : {}),
188
- ...(spareLink.fetch ? {
189
- fetch: spareLink.fetch
190
- } : {}),
191
- ...(spareLink.requestTimeoutMs !== undefined ? {
192
- requestTimeoutMs: spareLink.requestTimeoutMs
193
- } : {})
188
+ if (!record) return noRecovery('noPendingSession');
189
+ const buffered = bufferedRedirect.current;
190
+ if (buffered) {
191
+ const {
192
+ outcome,
193
+ report
194
+ } = readPaymentReturn(buffered);
195
+
196
+ // The buffered link is only this payment's if it says so. Pairing whatever
197
+ // arrived with whatever was persisted is how a callback for one payment
198
+ // resolves another.
199
+ if (report.reference !== undefined && report.reference !== record.reference) {
200
+ log.warning('resumeIfNeeded: the buffered return names a different payment — keeping it');
201
+ return noRecovery('outcomeUnknown', record.reference);
194
202
  }
195
- }, {
196
- pendingSessionStore,
197
- isFlowActive: () => activeRef.current != null,
198
- openRecoveryFlow: ({
199
- controller,
200
- config
201
- }) => {
202
- flowOpened = true;
203
- openedLinkToken = config.linkToken;
204
- openRecoveryFlow({
205
- controller,
206
- linkToken: config.linkToken,
207
- resolve: result => {
208
- spareLink.emitTerminal(result);
209
- }
210
- });
203
+ bufferedRedirect.current = null;
204
+ clearPending();
205
+ const base = {
206
+ reference: record.reference,
207
+ ...reportedFields(report),
208
+ resolvedAtMs: Date.now()
209
+ };
210
+
211
+ // A return that did not say what happened is not a failure — the backend
212
+ // holds the outcome, which is what `outcomeUnknown` tells the caller.
213
+ if (outcome === 'unknown') {
214
+ log.info('resumeIfNeeded: the buffered return did not say what happened');
215
+ return noRecovery('outcomeUnknown', record.reference);
211
216
  }
212
- });
213
- if (terminal) {
214
- spareLink.emitTerminal(terminal);
217
+ const result = outcome === 'processed' ? paymentSuccess(base) : paymentFailed({
218
+ ...base,
219
+ errorCode: report.errorCode ?? 'authorize_failed'
220
+ });
221
+ spareLink.emitTerminal(result);
215
222
  return {
216
223
  kind: 'recovered',
217
- result: terminal
224
+ result
218
225
  };
219
226
  }
220
- if (flowOpened && openedLinkToken) {
221
- return mapHostRecovery({
222
- kind: 'inProgress',
223
- linkToken: openedLinkToken
224
- });
225
- }
226
- return noRecovery('noPendingSession');
227
- }, [pendingSessionStore, spareLink, openRecoveryFlow]);
227
+ log.info('resumeIfNeeded: a payment was pending and no return arrived — the backend holds the outcome');
228
+ clearPending();
229
+ return noRecovery('outcomeUnknown', record.reference);
230
+ }, [pendingSessionStore, spareLink, clearPending]);
228
231
  useEffect(() => {
229
232
  const detach = spareLink._attachHost({
230
233
  startFlow,
@@ -234,72 +237,34 @@ export function SpareLinkHost(props) {
234
237
  });
235
238
  return detach;
236
239
  }, [spareLink, startFlow, handleRedirect, resumeIfNeeded]);
237
- const onResolved = useCallback(() => {
238
- const current = activeRef.current;
239
- if (!current) return;
240
- const s = current.controller.state;
241
- let result;
242
- switch (s.phase) {
243
- case 'succeeded':
244
- result = paymentSuccess({
245
- linkToken: current.linkToken,
246
- ...(s.exchangeCode ? {
247
- exchangeCode: s.exchangeCode
248
- } : {}),
249
- ...(s.linkSessionId ? {
250
- linkSessionId: s.linkSessionId
251
- } : {}),
252
- ...(s.merchantRef ? {
253
- merchantRef: s.merchantRef
254
- } : {}),
255
- ...(s.selectedProvider ? {
256
- bankId: s.selectedProvider.id
257
- } : {}),
258
- ...(s.session?.request?.type ? {
259
- paymentType: s.session.request.type
260
- } : {}),
261
- resolvedAtMs: Date.now()
262
- });
263
- break;
264
- case 'failed':
265
- {
266
- const errorCode = s.errorCode ?? 'unknown_error';
267
- result = paymentFailed({
268
- linkToken: current.linkToken,
269
- errorCode,
270
- message: userFriendlyMessageFor(errorCode),
271
- resolvedAtMs: Date.now()
272
- });
273
- break;
274
- }
275
- case 'cancelled':
276
- result = paymentCancelled({
277
- linkToken: current.linkToken,
278
- resolvedAtMs: Date.now()
279
- });
280
- break;
281
- default:
282
- result = paymentAbandoned({
283
- linkToken: current.linkToken,
284
- resolvedAtMs: Date.now()
285
- });
286
- break;
287
- }
288
- close(current, result);
289
- }, [close]);
240
+
241
+ /**
242
+ * A dismiss mid-flow means the payer left, which the caller must hear about — a
243
+ * silent close would strand whoever is awaiting the result.
244
+ */
290
245
  const onDismissPressed = useCallback(() => {
291
246
  const current = activeRef.current;
292
- if (!current) {
293
- onResolved();
294
- return;
247
+ if (!current) return;
248
+ current.controller.abandon();
249
+ close(current, resultFor(current));
250
+ }, [close, resultFor]);
251
+ const modalBody = useMemo(() => {
252
+ if (!active) return null;
253
+ if (!fontsLoaded) {
254
+ return /*#__PURE__*/_jsx(View, {
255
+ style: styles.fontLoading,
256
+ children: /*#__PURE__*/_jsx(ActivityIndicator, {
257
+ size: "large",
258
+ color: Colors.spareBlue
259
+ })
260
+ });
295
261
  }
296
- spareLink.emitEvent(SpareLinkEvents.abandoned(paymentAbandoned({
297
- linkToken: current.linkToken,
298
- resolvedAtMs: Date.now()
299
- })));
300
- void current.controller.cancel().finally(onResolved);
301
- }, [onResolved, spareLink]);
302
- const launcher = useMemo(() => launchBankRedirect ?? defaultLaunchBankRedirect, [launchBankRedirect]);
262
+ return /*#__PURE__*/_jsx(HostedPaymentPage, {
263
+ controller: active.controller,
264
+ baseUrl: spareLink.resolvedBaseUrl,
265
+ onResolved: onResolved
266
+ });
267
+ }, [active, fontsLoaded, spareLink, onResolved]);
303
268
  return /*#__PURE__*/_jsxs(_Fragment, {
304
269
  children: [props.children, /*#__PURE__*/_jsx(Modal, {
305
270
  animationType: "slide",
@@ -317,17 +282,7 @@ export function SpareLinkHost(props) {
317
282
  onPress: onDismissPressed
318
283
  }), active ? /*#__PURE__*/_jsx(View, {
319
284
  style: styles.flowWrap,
320
- children: fontsLoaded ? /*#__PURE__*/_jsx(PaymentFlowPage, {
321
- controller: active.controller,
322
- onResolved: onResolved,
323
- launchBankRedirect: launcher
324
- }) : /*#__PURE__*/_jsx(View, {
325
- style: styles.fontLoading,
326
- children: /*#__PURE__*/_jsx(ActivityIndicator, {
327
- size: "large",
328
- color: Colors.spareBlue
329
- })
330
- })
285
+ children: modalBody
331
286
  }) : null]
332
287
  })
333
288
  })]
@@ -347,4 +302,34 @@ const styles = StyleSheet.create({
347
302
  justifyContent: 'center'
348
303
  }
349
304
  });
305
+
306
+ /**
307
+ * Lifts what the return reported onto the result the caller awaits.
308
+ *
309
+ * `errorCode` is not among them: a failure's code has a fallback the report does
310
+ * not, so it is set where the failure is built.
311
+ */
312
+ function reportedFields(report) {
313
+ if (!report) return {};
314
+ return {
315
+ ...(report.merchantRef ? {
316
+ merchantRef: report.merchantRef
317
+ } : {}),
318
+ ...(report.paymentId ? {
319
+ paymentId: report.paymentId
320
+ } : {}),
321
+ ...(report.mandateId ? {
322
+ mandateId: report.mandateId
323
+ } : {}),
324
+ ...(report.signature ? {
325
+ signature: report.signature
326
+ } : {}),
327
+ ...(report.errorReason ? {
328
+ errorReason: report.errorReason
329
+ } : {}),
330
+ ...(report.errorDescription ? {
331
+ message: report.errorDescription
332
+ } : {})
333
+ };
334
+ }
350
335
  //# sourceMappingURL=spare-link-host.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["useCallback","useEffect","useMemo","useRef","useState","ActivityIndicator","Modal","SafeAreaView","StyleSheet","View","enableScreens","LinkApiClient","isPaymentReturnCallbackUri","executeResumeIfNeeded","PaymentFlowController","setBufferedRedirect","userFriendlyMessageFor","launchBankRedirect","defaultLaunchBankRedirect","createLogger","collectTelemetry","paymentAbandoned","paymentCancelled","paymentFailed","paymentSuccess","tenantCountryCode","SpareLinkEvents","mapHostRecovery","noRecovery","PaymentFlowPage","Colors","useLinkFonts","ModalDismissButton","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","log","SpareLinkHost","props","spareLink","showDismissButton","pendingSessionStore","fontsLoaded","active","setActive","activeRef","current","emitMappedEvent","linkToken","event","linkSessionId","emitEvent","sessionLoaded","consentStarted","redirectToBank","bankCallbackReceived","close","flow","result","clear","catch","warning","resolve","controller","dispose","startFlow","args","errorCode","message","resolvedAtMs","Date","now","info","tenant","environment","sessionToken","apiClient","baseUrl","resolvedBaseUrl","fetch","requestTimeoutMs","undefined","onEvent","state","onSessionLoaded","hydrate","err","severe","Error","String","handleRedirect","uri","asString","toString","fine","handleCallback","openRecoveryFlow","initialized","resumeIfNeeded","flowOpened","openedLinkToken","terminal","config","isFlowActive","emitTerminal","kind","detach","_attachHost","onResolved","s","phase","exchangeCode","merchantRef","selectedProvider","bankId","id","session","request","type","paymentType","onDismissPressed","abandoned","cancel","finally","launcher","children","animationType","visible","onRequestClose","presentationStyle","testID","accessibilityViewIsModal","accessibilityRole","style","styles","modalRoot","onPress","flowWrap","fontLoading","size","color","spareBlue","create","flex","backgroundColor","surfacePage","alignItems","justifyContent"],"sourceRoot":"../../../src","sources":["ui/spare-link-host.tsx"],"mappings":";;AAAA,SAASA,WAAW,EAAEC,SAAS,EAAEC,OAAO,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AACzE,SAASC,iBAAiB,EAAEC,KAAK,EAAEC,YAAY,EAAEC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AACvF,SAASC,aAAa,QAAQ,sBAAsB;AACpD,SAASC,aAAa,QAAQ,mCAAgC;AAC9D,SAASC,0BAA0B,QAAQ,yCAAsC;AACjF,SAASC,qBAAqB,QAAQ,8CAA2C;AACjF,SAASC,qBAAqB,QAAQ,6CAA0C;AAEhF,SAASC,mBAAmB,QAAQ,qCAAk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C,KAAK,EAAEjH,MAAM,CAACkH;YAAU,CAAE;UAAC,CACvD;QACP,CACG,CAAC,GACL,IAAI;MAAA,CACI;IAAC,CACV,CAAC;EAAA,CACR,CAAC;AAEP;AAEA,MAAMP,MAAM,GAAGjI,UAAU,CAACyI,MAAM,CAAC;EAC/BP,SAAS,EAAE;IAAEQ,IAAI,EAAE,CAAC;IAAEC,eAAe,EAAErH,MAAM,CAACsH;EAAY,CAAC;EAC3DR,QAAQ,EAAE;IAAEM,IAAI,EAAE;EAAE,CAAC;EACrBL,WAAW,EAAE;IAAEK,IAAI,EAAE,CAAC;IAAEG,UAAU,EAAE,QAAQ;IAAEC,cAAc,EAAE;EAAS;AACzE,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["useCallback","useEffect","useMemo","useRef","useState","ActivityIndicator","Modal","StyleSheet","View","SafeAreaView","enableScreens","isPaymentReturnCallbackUri","readPaymentReturn","HostedFlowController","createLogger","redactPaymentReturnUri","paymentAbandoned","paymentCancelled","paymentFailed","paymentSuccess","SpareLinkEvents","noRecovery","HostedPaymentPage","Colors","useLinkFonts","ModalDismissButton","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","log","SpareLinkHost","props","spareLink","showDismissButton","launchBankRedirect","pendingSessionStore","fontsLoaded","active","setActive","activeRef","bufferedRedirect","current","persistQueue","Promise","resolve","enqueuePersist","op","next","then","catch","undefined","clearPending","clear","warning","close","flow","result","controller","dispose","resultFor","s","state","base","reference","reportedFields","report","resolvedAtMs","Date","now","phase","errorCode","onResolved","startFlow","args","message","info","tenant","environment","bankLauncher","subscribe","emitEvent","pageReady","redirectToBank","present","buffered","handleReturn","save","finally","handleRedirect","uri","asString","toString","bankCallbackReceived","resumeIfNeeded","record","load","outcome","emitTerminal","kind","detach","_attachHost","isFlowActive","onDismissPressed","abandon","modalBody","style","styles","fontLoading","children","size","color","spareBlue","baseUrl","resolvedBaseUrl","animationType","visible","onRequestClose","presentationStyle","testID","accessibilityViewIsModal","accessibilityRole","modalRoot","onPress","flowWrap","create","flex","backgroundColor","surfacePage","alignItems","justifyContent","merchantRef","paymentId","mandateId","signature","errorReason","errorDescription"],"sourceRoot":"../../../src","sources":["ui/spare-link-host.tsx"],"mappings":";;AAAA,SAASA,WAAW,EAAEC,SAAS,EAAEC,OAAO,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AACzE,SAASC,iBAAiB,EAAEC,KAAK,EAAEC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AACzE;AACA;AACA,SAASC,YAAY,QAAQ,gCAAgC;AAC7D,SAASC,aAAa,QAAQ,sBAAsB;AACpD,SAEEC,0BAA0B,EAC1BC,iBAAiB,QACZ,yCAAsC;AAC7C,SAA4BC,oBAAoB,QAAQ,4CAAyC;AAEjG,SAASC,YAAY,QAAQ,uBAAoB;AACjD,SAASC,sBAAsB,QAAQ,2BAAwB;AAE/D,SACEC,gBAAgB,EAChBC,gBAAgB,EAChBC,aAAa,EACbC,cAAc,QACT,6BAA0B;AAEjC,SAASC,eAAe,QAAQ,+BAA4B;AAC5D,SAAyBC,UAAU,QAAQ,kCAA+B;AAC1E,SAASC,iBAAiB,QAAQ,iCAA8B;AAChE,SAASC,MAAM,QAAQ,kBAAS;AAChC,SAASC,YAAY,QAAQ,kBAAe;AAC5C,SAASC,kBAAkB,QAAQ,mCAAgC;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA,EAAAC,QAAA,IAAAC,SAAA;AAEpErB,aAAa,CAAC,CAAC;AAEf,MAAMsB,GAAG,GAAGlB,YAAY,CAAC,eAAe,CAAC;AAsBzC;AACA;AACA;AACA;AACA,OAAO,SAASmB,aAAaA,CAACC,KAAyB,EAAe;EACpE,MAAM;IAAEC,SAAS;IAAEC,iBAAiB,GAAG,IAAI;IAAEC;EAAmB,CAAC,GAAGH,KAAK;EACzE,MAAMI,mBAAmB,GAAGJ,KAAK,CAACI,mBAAmB,IAAIH,SAAS,CAACG,mBAAmB;EAC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AACH","ignoreList":[]}
@@ -1,8 +1,7 @@
1
1
  "use strict";
2
2
 
3
- export { CustomStepper } from "./stepper.js";
4
- export { LayoutWHeader } from "./layout-w-header.js";
5
3
  export { Footer } from "./footer.js";
6
4
  export { GradientSpinner } from "./gradient-spinner.js";
7
5
  export { HandoffScreenLayout } from "./handoff-screen-layout.js";
6
+ export { ModalDismissButton } from "./modal-dismiss-button.js";
8
7
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["CustomStepper","LayoutWHeader","Footer","GradientSpinner","HandoffScreenLayout"],"sourceRoot":"../../../../src","sources":["ui/widgets/index.ts"],"mappings":";;AAAA,SAASA,aAAa,QAAiC,cAAW;AAClE,SAASC,aAAa,QAAiC,sBAAmB;AAC1E,SAASC,MAAM,QAA0B,aAAU;AACnD,SAASC,eAAe,QAAmC,uBAAoB;AAC/E,SAASC,mBAAmB,QAAuC,4BAAyB","ignoreList":[]}
1
+ {"version":3,"names":["Footer","GradientSpinner","HandoffScreenLayout","ModalDismissButton"],"sourceRoot":"../../../../src","sources":["ui/widgets/index.ts"],"mappings":";;AAAA,SAASA,MAAM,QAA0B,aAAU;AACnD,SAASC,eAAe,QAAmC,uBAAoB;AAC/E,SAASC,mBAAmB,QAAuC,4BAAyB;AAC5F,SAASC,kBAAkB,QAAsC,2BAAwB","ignoreList":[]}
@@ -8,5 +8,5 @@
8
8
  * `changeset version`). The src/index.ts smoke test asserts this matches
9
9
  * package.json's version.
10
10
  */
11
- export const SDK_VERSION = '0.1.0-beta.1';
11
+ export const SDK_VERSION = '1.0.1';
12
12
  //# sourceMappingURL=version.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["SDK_VERSION"],"sourceRoot":"../../src","sources":["version.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMA,WAAW,GAAG,cAAuB","ignoreList":[]}
1
+ {"version":3,"names":["SDK_VERSION"],"sourceRoot":"../../src","sources":["version.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMA,WAAW,GAAG,OAAgB","ignoreList":[]}