@velion-la/onboarding-sdk-react-native 1.0.0-beta.10

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 (614) hide show
  1. package/CHANGELOG.md +66 -0
  2. package/LICENSE +12 -0
  3. package/README.md +888 -0
  4. package/app.plugin.js +101 -0
  5. package/lib/commonjs/camera/AddressSearchBar.js +304 -0
  6. package/lib/commonjs/camera/AddressSearchBar.js.map +1 -0
  7. package/lib/commonjs/camera/DocumentCapture.js +513 -0
  8. package/lib/commonjs/camera/DocumentCapture.js.map +1 -0
  9. package/lib/commonjs/camera/LivenessCamera.js +628 -0
  10. package/lib/commonjs/camera/LivenessCamera.js.map +1 -0
  11. package/lib/commonjs/camera/MapAddressPicker.js +331 -0
  12. package/lib/commonjs/camera/MapAddressPicker.js.map +1 -0
  13. package/lib/commonjs/core/VelionOnboarding.js +1113 -0
  14. package/lib/commonjs/core/VelionOnboarding.js.map +1 -0
  15. package/lib/commonjs/core/retryStepCopy.js +43 -0
  16. package/lib/commonjs/core/retryStepCopy.js.map +1 -0
  17. package/lib/commonjs/core/routingCommands.js +62 -0
  18. package/lib/commonjs/core/routingCommands.js.map +1 -0
  19. package/lib/commonjs/core/sessionDeclinedCopy.js +56 -0
  20. package/lib/commonjs/core/sessionDeclinedCopy.js.map +1 -0
  21. package/lib/commonjs/core/sessionStateMapper.js +200 -0
  22. package/lib/commonjs/core/sessionStateMapper.js.map +1 -0
  23. package/lib/commonjs/core/sseReasonMessages.js +450 -0
  24. package/lib/commonjs/core/sseReasonMessages.js.map +1 -0
  25. package/lib/commonjs/data/iso3166Alpha2Codes.json +1 -0
  26. package/lib/commonjs/data/iso3166CountryNames.json +251 -0
  27. package/lib/commonjs/i18n/index.js +30 -0
  28. package/lib/commonjs/i18n/index.js.map +1 -0
  29. package/lib/commonjs/i18n/strings/en.js +301 -0
  30. package/lib/commonjs/i18n/strings/en.js.map +1 -0
  31. package/lib/commonjs/i18n/strings/es.js +306 -0
  32. package/lib/commonjs/i18n/strings/es.js.map +1 -0
  33. package/lib/commonjs/index.js +225 -0
  34. package/lib/commonjs/index.js.map +1 -0
  35. package/lib/commonjs/package.json +1 -0
  36. package/lib/commonjs/steps/AddressInfoStep.js +662 -0
  37. package/lib/commonjs/steps/AddressInfoStep.js.map +1 -0
  38. package/lib/commonjs/steps/DocumentsOcrStep.js +405 -0
  39. package/lib/commonjs/steps/DocumentsOcrStep.js.map +1 -0
  40. package/lib/commonjs/steps/EconomicActivityStep.js +214 -0
  41. package/lib/commonjs/steps/EconomicActivityStep.js.map +1 -0
  42. package/lib/commonjs/steps/EmailContactStep.js +150 -0
  43. package/lib/commonjs/steps/EmailContactStep.js.map +1 -0
  44. package/lib/commonjs/steps/EmailOtpStep.js +225 -0
  45. package/lib/commonjs/steps/EmailOtpStep.js.map +1 -0
  46. package/lib/commonjs/steps/FaceMatchStep.js +169 -0
  47. package/lib/commonjs/steps/FaceMatchStep.js.map +1 -0
  48. package/lib/commonjs/steps/FingerprintStep.js +92 -0
  49. package/lib/commonjs/steps/FingerprintStep.js.map +1 -0
  50. package/lib/commonjs/steps/HumanBasicInfoStep.js +251 -0
  51. package/lib/commonjs/steps/HumanBasicInfoStep.js.map +1 -0
  52. package/lib/commonjs/steps/HumanExtendedInfoStep.js +275 -0
  53. package/lib/commonjs/steps/HumanExtendedInfoStep.js.map +1 -0
  54. package/lib/commonjs/steps/LegalBasicInfoStep.js +195 -0
  55. package/lib/commonjs/steps/LegalBasicInfoStep.js.map +1 -0
  56. package/lib/commonjs/steps/LegalExtendedInfoStep.js +173 -0
  57. package/lib/commonjs/steps/LegalExtendedInfoStep.js.map +1 -0
  58. package/lib/commonjs/steps/LivenessMatchStep.js +1184 -0
  59. package/lib/commonjs/steps/LivenessMatchStep.js.map +1 -0
  60. package/lib/commonjs/steps/PhoneContactStep.js +151 -0
  61. package/lib/commonjs/steps/PhoneContactStep.js.map +1 -0
  62. package/lib/commonjs/steps/PhoneOtpStep.js +224 -0
  63. package/lib/commonjs/steps/PhoneOtpStep.js.map +1 -0
  64. package/lib/commonjs/steps/SwornDeclarationStep.js +206 -0
  65. package/lib/commonjs/steps/SwornDeclarationStep.js.map +1 -0
  66. package/lib/commonjs/steps/TaxInfoStep.js +251 -0
  67. package/lib/commonjs/steps/TaxInfoStep.js.map +1 -0
  68. package/lib/commonjs/steps/TermsAndConditionsStep.js +245 -0
  69. package/lib/commonjs/steps/TermsAndConditionsStep.js.map +1 -0
  70. package/lib/commonjs/steps/_shared.js +61 -0
  71. package/lib/commonjs/steps/_shared.js.map +1 -0
  72. package/lib/commonjs/steps/types.js +6 -0
  73. package/lib/commonjs/steps/types.js.map +1 -0
  74. package/lib/commonjs/transport/api.js +176 -0
  75. package/lib/commonjs/transport/api.js.map +1 -0
  76. package/lib/commonjs/transport/irisWebSocket.js +121 -0
  77. package/lib/commonjs/transport/irisWebSocket.js.map +1 -0
  78. package/lib/commonjs/transport/secureUrl.js +50 -0
  79. package/lib/commonjs/transport/secureUrl.js.map +1 -0
  80. package/lib/commonjs/transport/sse.js +248 -0
  81. package/lib/commonjs/transport/sse.js.map +1 -0
  82. package/lib/commonjs/types/index.js +458 -0
  83. package/lib/commonjs/types/index.js.map +1 -0
  84. package/lib/commonjs/ui/MapFallbackBoundary.js +42 -0
  85. package/lib/commonjs/ui/MapFallbackBoundary.js.map +1 -0
  86. package/lib/commonjs/ui/StepShell.js +251 -0
  87. package/lib/commonjs/ui/StepShell.js.map +1 -0
  88. package/lib/commonjs/ui/VelionOnboardingScreen.js +276 -0
  89. package/lib/commonjs/ui/VelionOnboardingScreen.js.map +1 -0
  90. package/lib/commonjs/ui/forms/index.js +38 -0
  91. package/lib/commonjs/ui/forms/index.js.map +1 -0
  92. package/lib/commonjs/ui/forms/useInlineValidation.js +88 -0
  93. package/lib/commonjs/ui/forms/useInlineValidation.js.map +1 -0
  94. package/lib/commonjs/ui/forms/validators.js +34 -0
  95. package/lib/commonjs/ui/forms/validators.js.map +1 -0
  96. package/lib/commonjs/ui/icons/HomeHeartIcon.js +38 -0
  97. package/lib/commonjs/ui/icons/HomeHeartIcon.js.map +1 -0
  98. package/lib/commonjs/ui/icons/StepIcon.js +59 -0
  99. package/lib/commonjs/ui/icons/StepIcon.js.map +1 -0
  100. package/lib/commonjs/ui/overlays/AnalyzingOverlay.js +284 -0
  101. package/lib/commonjs/ui/overlays/AnalyzingOverlay.js.map +1 -0
  102. package/lib/commonjs/ui/overlays/LoadingOverlay.js +108 -0
  103. package/lib/commonjs/ui/overlays/LoadingOverlay.js.map +1 -0
  104. package/lib/commonjs/ui/overlays/ProgressBar.js +101 -0
  105. package/lib/commonjs/ui/overlays/ProgressBar.js.map +1 -0
  106. package/lib/commonjs/ui/overlays/RetryDialog.js +125 -0
  107. package/lib/commonjs/ui/overlays/RetryDialog.js.map +1 -0
  108. package/lib/commonjs/ui/overlays/index.js +33 -0
  109. package/lib/commonjs/ui/overlays/index.js.map +1 -0
  110. package/lib/commonjs/ui/primitives/BackButton.js +75 -0
  111. package/lib/commonjs/ui/primitives/BackButton.js.map +1 -0
  112. package/lib/commonjs/ui/primitives/Banner.js +81 -0
  113. package/lib/commonjs/ui/primitives/Banner.js.map +1 -0
  114. package/lib/commonjs/ui/primitives/Button.js +142 -0
  115. package/lib/commonjs/ui/primitives/Button.js.map +1 -0
  116. package/lib/commonjs/ui/primitives/Card.js +50 -0
  117. package/lib/commonjs/ui/primitives/Card.js.map +1 -0
  118. package/lib/commonjs/ui/primitives/Checkbox.js +139 -0
  119. package/lib/commonjs/ui/primitives/Checkbox.js.map +1 -0
  120. package/lib/commonjs/ui/primitives/CountrySelect.js +288 -0
  121. package/lib/commonjs/ui/primitives/CountrySelect.js.map +1 -0
  122. package/lib/commonjs/ui/primitives/DatePicker.js +245 -0
  123. package/lib/commonjs/ui/primitives/DatePicker.js.map +1 -0
  124. package/lib/commonjs/ui/primitives/Input.js +101 -0
  125. package/lib/commonjs/ui/primitives/Input.js.map +1 -0
  126. package/lib/commonjs/ui/primitives/SearchableSingleSelectList.js +162 -0
  127. package/lib/commonjs/ui/primitives/SearchableSingleSelectList.js.map +1 -0
  128. package/lib/commonjs/ui/primitives/Select.js +209 -0
  129. package/lib/commonjs/ui/primitives/Select.js.map +1 -0
  130. package/lib/commonjs/ui/primitives/Spinner.js +25 -0
  131. package/lib/commonjs/ui/primitives/Spinner.js.map +1 -0
  132. package/lib/commonjs/ui/primitives/index.js +89 -0
  133. package/lib/commonjs/ui/primitives/index.js.map +1 -0
  134. package/lib/commonjs/ui/primitives/searchableSingleSelectFilter.js +31 -0
  135. package/lib/commonjs/ui/primitives/searchableSingleSelectFilter.js.map +1 -0
  136. package/lib/commonjs/ui/theme/ThemeProvider.js +74 -0
  137. package/lib/commonjs/ui/theme/ThemeProvider.js.map +1 -0
  138. package/lib/commonjs/ui/theme/index.js +68 -0
  139. package/lib/commonjs/ui/theme/index.js.map +1 -0
  140. package/lib/commonjs/ui/theme/tokens.js +154 -0
  141. package/lib/commonjs/ui/theme/tokens.js.map +1 -0
  142. package/lib/commonjs/utils/EventEmitter.js +144 -0
  143. package/lib/commonjs/utils/EventEmitter.js.map +1 -0
  144. package/lib/commonjs/utils/base64.js +53 -0
  145. package/lib/commonjs/utils/base64.js.map +1 -0
  146. package/lib/commonjs/utils/deviceFingerprint.js +132 -0
  147. package/lib/commonjs/utils/deviceFingerprint.js.map +1 -0
  148. package/lib/commonjs/utils/documentTypeOptions.js +35 -0
  149. package/lib/commonjs/utils/documentTypeOptions.js.map +1 -0
  150. package/lib/commonjs/utils/googleMapsPreflight.js +88 -0
  151. package/lib/commonjs/utils/googleMapsPreflight.js.map +1 -0
  152. package/lib/commonjs/utils/hmac.js +58 -0
  153. package/lib/commonjs/utils/hmac.js.map +1 -0
  154. package/lib/commonjs/utils/iso3166Countries.js +98 -0
  155. package/lib/commonjs/utils/iso3166Countries.js.map +1 -0
  156. package/lib/commonjs/utils/jpegFromUri.js +44 -0
  157. package/lib/commonjs/utils/jpegFromUri.js.map +1 -0
  158. package/lib/commonjs/utils/keepAwake.js +58 -0
  159. package/lib/commonjs/utils/keepAwake.js.map +1 -0
  160. package/lib/commonjs/utils/log.js +42 -0
  161. package/lib/commonjs/utils/log.js.map +1 -0
  162. package/lib/commonjs/utils/osGeocoder.js +70 -0
  163. package/lib/commonjs/utils/osGeocoder.js.map +1 -0
  164. package/lib/commonjs/utils/parseGoogleAddressComponents.js +74 -0
  165. package/lib/commonjs/utils/parseGoogleAddressComponents.js.map +1 -0
  166. package/lib/commonjs/utils/personNameNormalize.js +24 -0
  167. package/lib/commonjs/utils/personNameNormalize.js.map +1 -0
  168. package/lib/commonjs/utils/sdkError.js +34 -0
  169. package/lib/commonjs/utils/sdkError.js.map +1 -0
  170. package/lib/commonjs/utils/sdkVersion.js +13 -0
  171. package/lib/commonjs/utils/sdkVersion.js.map +1 -0
  172. package/lib/commonjs/utils/stepConfig.js +65 -0
  173. package/lib/commonjs/utils/stepConfig.js.map +1 -0
  174. package/lib/commonjs/utils/taxInfoConfig.js +19 -0
  175. package/lib/commonjs/utils/taxInfoConfig.js.map +1 -0
  176. package/lib/commonjs/utils/useSafeAreaInsets.js +41 -0
  177. package/lib/commonjs/utils/useSafeAreaInsets.js.map +1 -0
  178. package/lib/commonjs/utils/velionExtra.js +48 -0
  179. package/lib/commonjs/utils/velionExtra.js.map +1 -0
  180. package/lib/module/camera/AddressSearchBar.js +299 -0
  181. package/lib/module/camera/AddressSearchBar.js.map +1 -0
  182. package/lib/module/camera/DocumentCapture.js +508 -0
  183. package/lib/module/camera/DocumentCapture.js.map +1 -0
  184. package/lib/module/camera/LivenessCamera.js +623 -0
  185. package/lib/module/camera/LivenessCamera.js.map +1 -0
  186. package/lib/module/camera/MapAddressPicker.js +326 -0
  187. package/lib/module/camera/MapAddressPicker.js.map +1 -0
  188. package/lib/module/core/VelionOnboarding.js +1109 -0
  189. package/lib/module/core/VelionOnboarding.js.map +1 -0
  190. package/lib/module/core/retryStepCopy.js +39 -0
  191. package/lib/module/core/retryStepCopy.js.map +1 -0
  192. package/lib/module/core/routingCommands.js +57 -0
  193. package/lib/module/core/routingCommands.js.map +1 -0
  194. package/lib/module/core/sessionDeclinedCopy.js +52 -0
  195. package/lib/module/core/sessionDeclinedCopy.js.map +1 -0
  196. package/lib/module/core/sessionStateMapper.js +189 -0
  197. package/lib/module/core/sessionStateMapper.js.map +1 -0
  198. package/lib/module/core/sseReasonMessages.js +446 -0
  199. package/lib/module/core/sseReasonMessages.js.map +1 -0
  200. package/lib/module/data/iso3166Alpha2Codes.json +1 -0
  201. package/lib/module/data/iso3166CountryNames.json +251 -0
  202. package/lib/module/i18n/index.js +25 -0
  203. package/lib/module/i18n/index.js.map +1 -0
  204. package/lib/module/i18n/strings/en.js +297 -0
  205. package/lib/module/i18n/strings/en.js.map +1 -0
  206. package/lib/module/i18n/strings/es.js +302 -0
  207. package/lib/module/i18n/strings/es.js.map +1 -0
  208. package/lib/module/index.js +36 -0
  209. package/lib/module/index.js.map +1 -0
  210. package/lib/module/steps/AddressInfoStep.js +658 -0
  211. package/lib/module/steps/AddressInfoStep.js.map +1 -0
  212. package/lib/module/steps/DocumentsOcrStep.js +399 -0
  213. package/lib/module/steps/DocumentsOcrStep.js.map +1 -0
  214. package/lib/module/steps/EconomicActivityStep.js +209 -0
  215. package/lib/module/steps/EconomicActivityStep.js.map +1 -0
  216. package/lib/module/steps/EmailContactStep.js +145 -0
  217. package/lib/module/steps/EmailContactStep.js.map +1 -0
  218. package/lib/module/steps/EmailOtpStep.js +220 -0
  219. package/lib/module/steps/EmailOtpStep.js.map +1 -0
  220. package/lib/module/steps/FaceMatchStep.js +164 -0
  221. package/lib/module/steps/FaceMatchStep.js.map +1 -0
  222. package/lib/module/steps/FingerprintStep.js +87 -0
  223. package/lib/module/steps/FingerprintStep.js.map +1 -0
  224. package/lib/module/steps/HumanBasicInfoStep.js +246 -0
  225. package/lib/module/steps/HumanBasicInfoStep.js.map +1 -0
  226. package/lib/module/steps/HumanExtendedInfoStep.js +270 -0
  227. package/lib/module/steps/HumanExtendedInfoStep.js.map +1 -0
  228. package/lib/module/steps/LegalBasicInfoStep.js +190 -0
  229. package/lib/module/steps/LegalBasicInfoStep.js.map +1 -0
  230. package/lib/module/steps/LegalExtendedInfoStep.js +168 -0
  231. package/lib/module/steps/LegalExtendedInfoStep.js.map +1 -0
  232. package/lib/module/steps/LivenessMatchStep.js +1177 -0
  233. package/lib/module/steps/LivenessMatchStep.js.map +1 -0
  234. package/lib/module/steps/PhoneContactStep.js +146 -0
  235. package/lib/module/steps/PhoneContactStep.js.map +1 -0
  236. package/lib/module/steps/PhoneOtpStep.js +219 -0
  237. package/lib/module/steps/PhoneOtpStep.js.map +1 -0
  238. package/lib/module/steps/SwornDeclarationStep.js +203 -0
  239. package/lib/module/steps/SwornDeclarationStep.js.map +1 -0
  240. package/lib/module/steps/TaxInfoStep.js +246 -0
  241. package/lib/module/steps/TaxInfoStep.js.map +1 -0
  242. package/lib/module/steps/TermsAndConditionsStep.js +240 -0
  243. package/lib/module/steps/TermsAndConditionsStep.js.map +1 -0
  244. package/lib/module/steps/_shared.js +52 -0
  245. package/lib/module/steps/_shared.js.map +1 -0
  246. package/lib/module/steps/types.js +4 -0
  247. package/lib/module/steps/types.js.map +1 -0
  248. package/lib/module/transport/api.js +173 -0
  249. package/lib/module/transport/api.js.map +1 -0
  250. package/lib/module/transport/irisWebSocket.js +115 -0
  251. package/lib/module/transport/irisWebSocket.js.map +1 -0
  252. package/lib/module/transport/secureUrl.js +45 -0
  253. package/lib/module/transport/secureUrl.js.map +1 -0
  254. package/lib/module/transport/sse.js +242 -0
  255. package/lib/module/transport/sse.js.map +1 -0
  256. package/lib/module/types/index.js +532 -0
  257. package/lib/module/types/index.js.map +1 -0
  258. package/lib/module/ui/MapFallbackBoundary.js +37 -0
  259. package/lib/module/ui/MapFallbackBoundary.js.map +1 -0
  260. package/lib/module/ui/StepShell.js +246 -0
  261. package/lib/module/ui/StepShell.js.map +1 -0
  262. package/lib/module/ui/VelionOnboardingScreen.js +273 -0
  263. package/lib/module/ui/VelionOnboardingScreen.js.map +1 -0
  264. package/lib/module/ui/forms/index.js +5 -0
  265. package/lib/module/ui/forms/index.js.map +1 -0
  266. package/lib/module/ui/forms/useInlineValidation.js +84 -0
  267. package/lib/module/ui/forms/useInlineValidation.js.map +1 -0
  268. package/lib/module/ui/forms/validators.js +27 -0
  269. package/lib/module/ui/forms/validators.js.map +1 -0
  270. package/lib/module/ui/icons/HomeHeartIcon.js +33 -0
  271. package/lib/module/ui/icons/HomeHeartIcon.js.map +1 -0
  272. package/lib/module/ui/icons/StepIcon.js +55 -0
  273. package/lib/module/ui/icons/StepIcon.js.map +1 -0
  274. package/lib/module/ui/overlays/AnalyzingOverlay.js +279 -0
  275. package/lib/module/ui/overlays/AnalyzingOverlay.js.map +1 -0
  276. package/lib/module/ui/overlays/LoadingOverlay.js +104 -0
  277. package/lib/module/ui/overlays/LoadingOverlay.js.map +1 -0
  278. package/lib/module/ui/overlays/ProgressBar.js +97 -0
  279. package/lib/module/ui/overlays/ProgressBar.js.map +1 -0
  280. package/lib/module/ui/overlays/RetryDialog.js +121 -0
  281. package/lib/module/ui/overlays/RetryDialog.js.map +1 -0
  282. package/lib/module/ui/overlays/index.js +6 -0
  283. package/lib/module/ui/overlays/index.js.map +1 -0
  284. package/lib/module/ui/primitives/BackButton.js +71 -0
  285. package/lib/module/ui/primitives/BackButton.js.map +1 -0
  286. package/lib/module/ui/primitives/Banner.js +77 -0
  287. package/lib/module/ui/primitives/Banner.js.map +1 -0
  288. package/lib/module/ui/primitives/Button.js +138 -0
  289. package/lib/module/ui/primitives/Button.js.map +1 -0
  290. package/lib/module/ui/primitives/Card.js +46 -0
  291. package/lib/module/ui/primitives/Card.js.map +1 -0
  292. package/lib/module/ui/primitives/Checkbox.js +136 -0
  293. package/lib/module/ui/primitives/Checkbox.js.map +1 -0
  294. package/lib/module/ui/primitives/CountrySelect.js +284 -0
  295. package/lib/module/ui/primitives/CountrySelect.js.map +1 -0
  296. package/lib/module/ui/primitives/DatePicker.js +241 -0
  297. package/lib/module/ui/primitives/DatePicker.js.map +1 -0
  298. package/lib/module/ui/primitives/Input.js +97 -0
  299. package/lib/module/ui/primitives/Input.js.map +1 -0
  300. package/lib/module/ui/primitives/SearchableSingleSelectList.js +153 -0
  301. package/lib/module/ui/primitives/SearchableSingleSelectList.js.map +1 -0
  302. package/lib/module/ui/primitives/Select.js +205 -0
  303. package/lib/module/ui/primitives/Select.js.map +1 -0
  304. package/lib/module/ui/primitives/Spinner.js +21 -0
  305. package/lib/module/ui/primitives/Spinner.js.map +1 -0
  306. package/lib/module/ui/primitives/index.js +14 -0
  307. package/lib/module/ui/primitives/index.js.map +1 -0
  308. package/lib/module/ui/primitives/searchableSingleSelectFilter.js +27 -0
  309. package/lib/module/ui/primitives/searchableSingleSelectFilter.js.map +1 -0
  310. package/lib/module/ui/theme/ThemeProvider.js +67 -0
  311. package/lib/module/ui/theme/ThemeProvider.js.map +1 -0
  312. package/lib/module/ui/theme/index.js +5 -0
  313. package/lib/module/ui/theme/index.js.map +1 -0
  314. package/lib/module/ui/theme/tokens.js +145 -0
  315. package/lib/module/ui/theme/tokens.js.map +1 -0
  316. package/lib/module/utils/EventEmitter.js +139 -0
  317. package/lib/module/utils/EventEmitter.js.map +1 -0
  318. package/lib/module/utils/base64.js +47 -0
  319. package/lib/module/utils/base64.js.map +1 -0
  320. package/lib/module/utils/deviceFingerprint.js +129 -0
  321. package/lib/module/utils/deviceFingerprint.js.map +1 -0
  322. package/lib/module/utils/documentTypeOptions.js +31 -0
  323. package/lib/module/utils/documentTypeOptions.js.map +1 -0
  324. package/lib/module/utils/googleMapsPreflight.js +84 -0
  325. package/lib/module/utils/googleMapsPreflight.js.map +1 -0
  326. package/lib/module/utils/hmac.js +53 -0
  327. package/lib/module/utils/hmac.js.map +1 -0
  328. package/lib/module/utils/iso3166Countries.js +92 -0
  329. package/lib/module/utils/iso3166Countries.js.map +1 -0
  330. package/lib/module/utils/jpegFromUri.js +40 -0
  331. package/lib/module/utils/jpegFromUri.js.map +1 -0
  332. package/lib/module/utils/keepAwake.js +53 -0
  333. package/lib/module/utils/keepAwake.js.map +1 -0
  334. package/lib/module/utils/log.js +37 -0
  335. package/lib/module/utils/log.js.map +1 -0
  336. package/lib/module/utils/osGeocoder.js +65 -0
  337. package/lib/module/utils/osGeocoder.js.map +1 -0
  338. package/lib/module/utils/parseGoogleAddressComponents.js +69 -0
  339. package/lib/module/utils/parseGoogleAddressComponents.js.map +1 -0
  340. package/lib/module/utils/personNameNormalize.js +20 -0
  341. package/lib/module/utils/personNameNormalize.js.map +1 -0
  342. package/lib/module/utils/sdkError.js +29 -0
  343. package/lib/module/utils/sdkError.js.map +1 -0
  344. package/lib/module/utils/sdkVersion.js +9 -0
  345. package/lib/module/utils/sdkVersion.js.map +1 -0
  346. package/lib/module/utils/stepConfig.js +59 -0
  347. package/lib/module/utils/stepConfig.js.map +1 -0
  348. package/lib/module/utils/taxInfoConfig.js +15 -0
  349. package/lib/module/utils/taxInfoConfig.js.map +1 -0
  350. package/lib/module/utils/useSafeAreaInsets.js +37 -0
  351. package/lib/module/utils/useSafeAreaInsets.js.map +1 -0
  352. package/lib/module/utils/velionExtra.js +44 -0
  353. package/lib/module/utils/velionExtra.js.map +1 -0
  354. package/lib/typescript/camera/AddressSearchBar.d.ts +37 -0
  355. package/lib/typescript/camera/AddressSearchBar.d.ts.map +1 -0
  356. package/lib/typescript/camera/DocumentCapture.d.ts +34 -0
  357. package/lib/typescript/camera/DocumentCapture.d.ts.map +1 -0
  358. package/lib/typescript/camera/LivenessCamera.d.ts +67 -0
  359. package/lib/typescript/camera/LivenessCamera.d.ts.map +1 -0
  360. package/lib/typescript/camera/MapAddressPicker.d.ts +57 -0
  361. package/lib/typescript/camera/MapAddressPicker.d.ts.map +1 -0
  362. package/lib/typescript/core/VelionOnboarding.d.ts +169 -0
  363. package/lib/typescript/core/VelionOnboarding.d.ts.map +1 -0
  364. package/lib/typescript/core/retryStepCopy.d.ts +27 -0
  365. package/lib/typescript/core/retryStepCopy.d.ts.map +1 -0
  366. package/lib/typescript/core/routingCommands.d.ts +39 -0
  367. package/lib/typescript/core/routingCommands.d.ts.map +1 -0
  368. package/lib/typescript/core/sessionDeclinedCopy.d.ts +16 -0
  369. package/lib/typescript/core/sessionDeclinedCopy.d.ts.map +1 -0
  370. package/lib/typescript/core/sessionStateMapper.d.ts +52 -0
  371. package/lib/typescript/core/sessionStateMapper.d.ts.map +1 -0
  372. package/lib/typescript/core/sseReasonMessages.d.ts +20 -0
  373. package/lib/typescript/core/sseReasonMessages.d.ts.map +1 -0
  374. package/lib/typescript/i18n/index.d.ts +13 -0
  375. package/lib/typescript/i18n/index.d.ts.map +1 -0
  376. package/lib/typescript/i18n/strings/en.d.ts +3 -0
  377. package/lib/typescript/i18n/strings/en.d.ts.map +1 -0
  378. package/lib/typescript/i18n/strings/es.d.ts +297 -0
  379. package/lib/typescript/i18n/strings/es.d.ts.map +1 -0
  380. package/lib/typescript/index.d.ts +26 -0
  381. package/lib/typescript/index.d.ts.map +1 -0
  382. package/lib/typescript/steps/AddressInfoStep.d.ts +26 -0
  383. package/lib/typescript/steps/AddressInfoStep.d.ts.map +1 -0
  384. package/lib/typescript/steps/DocumentsOcrStep.d.ts +26 -0
  385. package/lib/typescript/steps/DocumentsOcrStep.d.ts.map +1 -0
  386. package/lib/typescript/steps/EconomicActivityStep.d.ts +29 -0
  387. package/lib/typescript/steps/EconomicActivityStep.d.ts.map +1 -0
  388. package/lib/typescript/steps/EmailContactStep.d.ts +15 -0
  389. package/lib/typescript/steps/EmailContactStep.d.ts.map +1 -0
  390. package/lib/typescript/steps/EmailOtpStep.d.ts +21 -0
  391. package/lib/typescript/steps/EmailOtpStep.d.ts.map +1 -0
  392. package/lib/typescript/steps/FaceMatchStep.d.ts +27 -0
  393. package/lib/typescript/steps/FaceMatchStep.d.ts.map +1 -0
  394. package/lib/typescript/steps/FingerprintStep.d.ts +25 -0
  395. package/lib/typescript/steps/FingerprintStep.d.ts.map +1 -0
  396. package/lib/typescript/steps/HumanBasicInfoStep.d.ts +25 -0
  397. package/lib/typescript/steps/HumanBasicInfoStep.d.ts.map +1 -0
  398. package/lib/typescript/steps/HumanExtendedInfoStep.d.ts +23 -0
  399. package/lib/typescript/steps/HumanExtendedInfoStep.d.ts.map +1 -0
  400. package/lib/typescript/steps/LegalBasicInfoStep.d.ts +17 -0
  401. package/lib/typescript/steps/LegalBasicInfoStep.d.ts.map +1 -0
  402. package/lib/typescript/steps/LegalExtendedInfoStep.d.ts +17 -0
  403. package/lib/typescript/steps/LegalExtendedInfoStep.d.ts.map +1 -0
  404. package/lib/typescript/steps/LivenessMatchStep.d.ts +26 -0
  405. package/lib/typescript/steps/LivenessMatchStep.d.ts.map +1 -0
  406. package/lib/typescript/steps/PhoneContactStep.d.ts +15 -0
  407. package/lib/typescript/steps/PhoneContactStep.d.ts.map +1 -0
  408. package/lib/typescript/steps/PhoneOtpStep.d.ts +19 -0
  409. package/lib/typescript/steps/PhoneOtpStep.d.ts.map +1 -0
  410. package/lib/typescript/steps/SwornDeclarationStep.d.ts +20 -0
  411. package/lib/typescript/steps/SwornDeclarationStep.d.ts.map +1 -0
  412. package/lib/typescript/steps/TaxInfoStep.d.ts +19 -0
  413. package/lib/typescript/steps/TaxInfoStep.d.ts.map +1 -0
  414. package/lib/typescript/steps/TermsAndConditionsStep.d.ts +21 -0
  415. package/lib/typescript/steps/TermsAndConditionsStep.d.ts.map +1 -0
  416. package/lib/typescript/steps/_shared.d.ts +22 -0
  417. package/lib/typescript/steps/_shared.d.ts.map +1 -0
  418. package/lib/typescript/steps/types.d.ts +89 -0
  419. package/lib/typescript/steps/types.d.ts.map +1 -0
  420. package/lib/typescript/transport/api.d.ts +35 -0
  421. package/lib/typescript/transport/api.d.ts.map +1 -0
  422. package/lib/typescript/transport/irisWebSocket.d.ts +72 -0
  423. package/lib/typescript/transport/irisWebSocket.d.ts.map +1 -0
  424. package/lib/typescript/transport/secureUrl.d.ts +14 -0
  425. package/lib/typescript/transport/secureUrl.d.ts.map +1 -0
  426. package/lib/typescript/transport/sse.d.ts +54 -0
  427. package/lib/typescript/transport/sse.d.ts.map +1 -0
  428. package/lib/typescript/types/index.d.ts +1219 -0
  429. package/lib/typescript/types/index.d.ts.map +1 -0
  430. package/lib/typescript/ui/MapFallbackBoundary.d.ts +28 -0
  431. package/lib/typescript/ui/MapFallbackBoundary.d.ts.map +1 -0
  432. package/lib/typescript/ui/StepShell.d.ts +29 -0
  433. package/lib/typescript/ui/StepShell.d.ts.map +1 -0
  434. package/lib/typescript/ui/VelionOnboardingScreen.d.ts +26 -0
  435. package/lib/typescript/ui/VelionOnboardingScreen.d.ts.map +1 -0
  436. package/lib/typescript/ui/forms/index.d.ts +3 -0
  437. package/lib/typescript/ui/forms/index.d.ts.map +1 -0
  438. package/lib/typescript/ui/forms/useInlineValidation.d.ts +30 -0
  439. package/lib/typescript/ui/forms/useInlineValidation.d.ts.map +1 -0
  440. package/lib/typescript/ui/forms/validators.d.ts +11 -0
  441. package/lib/typescript/ui/forms/validators.d.ts.map +1 -0
  442. package/lib/typescript/ui/icons/HomeHeartIcon.d.ts +14 -0
  443. package/lib/typescript/ui/icons/HomeHeartIcon.d.ts.map +1 -0
  444. package/lib/typescript/ui/icons/StepIcon.d.ts +26 -0
  445. package/lib/typescript/ui/icons/StepIcon.d.ts.map +1 -0
  446. package/lib/typescript/ui/overlays/AnalyzingOverlay.d.ts +24 -0
  447. package/lib/typescript/ui/overlays/AnalyzingOverlay.d.ts.map +1 -0
  448. package/lib/typescript/ui/overlays/LoadingOverlay.d.ts +19 -0
  449. package/lib/typescript/ui/overlays/LoadingOverlay.d.ts.map +1 -0
  450. package/lib/typescript/ui/overlays/ProgressBar.d.ts +32 -0
  451. package/lib/typescript/ui/overlays/ProgressBar.d.ts.map +1 -0
  452. package/lib/typescript/ui/overlays/RetryDialog.d.ts +17 -0
  453. package/lib/typescript/ui/overlays/RetryDialog.d.ts.map +1 -0
  454. package/lib/typescript/ui/overlays/index.d.ts +4 -0
  455. package/lib/typescript/ui/overlays/index.d.ts.map +1 -0
  456. package/lib/typescript/ui/primitives/BackButton.d.ts +20 -0
  457. package/lib/typescript/ui/primitives/BackButton.d.ts.map +1 -0
  458. package/lib/typescript/ui/primitives/Banner.d.ts +11 -0
  459. package/lib/typescript/ui/primitives/Banner.d.ts.map +1 -0
  460. package/lib/typescript/ui/primitives/Button.d.ts +27 -0
  461. package/lib/typescript/ui/primitives/Button.d.ts.map +1 -0
  462. package/lib/typescript/ui/primitives/Card.d.ts +10 -0
  463. package/lib/typescript/ui/primitives/Card.d.ts.map +1 -0
  464. package/lib/typescript/ui/primitives/Checkbox.d.ts +25 -0
  465. package/lib/typescript/ui/primitives/Checkbox.d.ts.map +1 -0
  466. package/lib/typescript/ui/primitives/CountrySelect.d.ts +31 -0
  467. package/lib/typescript/ui/primitives/CountrySelect.d.ts.map +1 -0
  468. package/lib/typescript/ui/primitives/DatePicker.d.ts +42 -0
  469. package/lib/typescript/ui/primitives/DatePicker.d.ts.map +1 -0
  470. package/lib/typescript/ui/primitives/Input.d.ts +17 -0
  471. package/lib/typescript/ui/primitives/Input.d.ts.map +1 -0
  472. package/lib/typescript/ui/primitives/SearchableSingleSelectList.d.ts +33 -0
  473. package/lib/typescript/ui/primitives/SearchableSingleSelectList.d.ts.map +1 -0
  474. package/lib/typescript/ui/primitives/Select.d.ts +26 -0
  475. package/lib/typescript/ui/primitives/Select.d.ts.map +1 -0
  476. package/lib/typescript/ui/primitives/Spinner.d.ts +10 -0
  477. package/lib/typescript/ui/primitives/Spinner.d.ts.map +1 -0
  478. package/lib/typescript/ui/primitives/index.d.ts +12 -0
  479. package/lib/typescript/ui/primitives/index.d.ts.map +1 -0
  480. package/lib/typescript/ui/primitives/searchableSingleSelectFilter.d.ts +25 -0
  481. package/lib/typescript/ui/primitives/searchableSingleSelectFilter.d.ts.map +1 -0
  482. package/lib/typescript/ui/theme/ThemeProvider.d.ts +23 -0
  483. package/lib/typescript/ui/theme/ThemeProvider.d.ts.map +1 -0
  484. package/lib/typescript/ui/theme/index.d.ts +3 -0
  485. package/lib/typescript/ui/theme/index.d.ts.map +1 -0
  486. package/lib/typescript/ui/theme/tokens.d.ts +42 -0
  487. package/lib/typescript/ui/theme/tokens.d.ts.map +1 -0
  488. package/lib/typescript/utils/EventEmitter.d.ts +98 -0
  489. package/lib/typescript/utils/EventEmitter.d.ts.map +1 -0
  490. package/lib/typescript/utils/base64.d.ts +19 -0
  491. package/lib/typescript/utils/base64.d.ts.map +1 -0
  492. package/lib/typescript/utils/deviceFingerprint.d.ts +42 -0
  493. package/lib/typescript/utils/deviceFingerprint.d.ts.map +1 -0
  494. package/lib/typescript/utils/documentTypeOptions.d.ts +13 -0
  495. package/lib/typescript/utils/documentTypeOptions.d.ts.map +1 -0
  496. package/lib/typescript/utils/googleMapsPreflight.d.ts +52 -0
  497. package/lib/typescript/utils/googleMapsPreflight.d.ts.map +1 -0
  498. package/lib/typescript/utils/hmac.d.ts +39 -0
  499. package/lib/typescript/utils/hmac.d.ts.map +1 -0
  500. package/lib/typescript/utils/iso3166Countries.d.ts +27 -0
  501. package/lib/typescript/utils/iso3166Countries.d.ts.map +1 -0
  502. package/lib/typescript/utils/jpegFromUri.d.ts +29 -0
  503. package/lib/typescript/utils/jpegFromUri.d.ts.map +1 -0
  504. package/lib/typescript/utils/keepAwake.d.ts +16 -0
  505. package/lib/typescript/utils/keepAwake.d.ts.map +1 -0
  506. package/lib/typescript/utils/log.d.ts +18 -0
  507. package/lib/typescript/utils/log.d.ts.map +1 -0
  508. package/lib/typescript/utils/osGeocoder.d.ts +38 -0
  509. package/lib/typescript/utils/osGeocoder.d.ts.map +1 -0
  510. package/lib/typescript/utils/parseGoogleAddressComponents.d.ts +43 -0
  511. package/lib/typescript/utils/parseGoogleAddressComponents.d.ts.map +1 -0
  512. package/lib/typescript/utils/personNameNormalize.d.ts +10 -0
  513. package/lib/typescript/utils/personNameNormalize.d.ts.map +1 -0
  514. package/lib/typescript/utils/sdkError.d.ts +14 -0
  515. package/lib/typescript/utils/sdkError.d.ts.map +1 -0
  516. package/lib/typescript/utils/sdkVersion.d.ts +7 -0
  517. package/lib/typescript/utils/sdkVersion.d.ts.map +1 -0
  518. package/lib/typescript/utils/stepConfig.d.ts +8 -0
  519. package/lib/typescript/utils/stepConfig.d.ts.map +1 -0
  520. package/lib/typescript/utils/taxInfoConfig.d.ts +7 -0
  521. package/lib/typescript/utils/taxInfoConfig.d.ts.map +1 -0
  522. package/lib/typescript/utils/useSafeAreaInsets.d.ts +26 -0
  523. package/lib/typescript/utils/useSafeAreaInsets.d.ts.map +1 -0
  524. package/lib/typescript/utils/velionExtra.d.ts +24 -0
  525. package/lib/typescript/utils/velionExtra.d.ts.map +1 -0
  526. package/package.json +107 -0
  527. package/src/camera/AddressSearchBar.tsx +363 -0
  528. package/src/camera/DocumentCapture.tsx +514 -0
  529. package/src/camera/LivenessCamera.tsx +706 -0
  530. package/src/camera/MapAddressPicker.tsx +391 -0
  531. package/src/core/VelionOnboarding.ts +1291 -0
  532. package/src/core/retryStepCopy.ts +54 -0
  533. package/src/core/routingCommands.ts +63 -0
  534. package/src/core/sessionDeclinedCopy.ts +76 -0
  535. package/src/core/sessionStateMapper.ts +232 -0
  536. package/src/core/sseReasonMessages.ts +531 -0
  537. package/src/data/iso3166Alpha2Codes.json +1 -0
  538. package/src/data/iso3166CountryNames.json +251 -0
  539. package/src/i18n/index.ts +26 -0
  540. package/src/i18n/strings/en.ts +335 -0
  541. package/src/i18n/strings/es.ts +337 -0
  542. package/src/index.ts +146 -0
  543. package/src/steps/AddressInfoStep.tsx +744 -0
  544. package/src/steps/DocumentsOcrStep.tsx +481 -0
  545. package/src/steps/EconomicActivityStep.tsx +230 -0
  546. package/src/steps/EmailContactStep.tsx +165 -0
  547. package/src/steps/EmailOtpStep.tsx +256 -0
  548. package/src/steps/FaceMatchStep.tsx +176 -0
  549. package/src/steps/FingerprintStep.tsx +99 -0
  550. package/src/steps/HumanBasicInfoStep.tsx +286 -0
  551. package/src/steps/HumanExtendedInfoStep.tsx +362 -0
  552. package/src/steps/LegalBasicInfoStep.tsx +214 -0
  553. package/src/steps/LegalExtendedInfoStep.tsx +184 -0
  554. package/src/steps/LivenessMatchStep.tsx +1351 -0
  555. package/src/steps/PhoneContactStep.tsx +166 -0
  556. package/src/steps/PhoneOtpStep.tsx +255 -0
  557. package/src/steps/SwornDeclarationStep.tsx +237 -0
  558. package/src/steps/TaxInfoStep.tsx +288 -0
  559. package/src/steps/TermsAndConditionsStep.tsx +269 -0
  560. package/src/steps/_shared.ts +69 -0
  561. package/src/steps/types.ts +93 -0
  562. package/src/transport/api.ts +257 -0
  563. package/src/transport/irisWebSocket.ts +186 -0
  564. package/src/transport/secureUrl.ts +47 -0
  565. package/src/transport/sse.ts +310 -0
  566. package/src/types/index.ts +1421 -0
  567. package/src/ui/MapFallbackBoundary.tsx +46 -0
  568. package/src/ui/StepShell.tsx +273 -0
  569. package/src/ui/VelionOnboardingScreen.tsx +297 -0
  570. package/src/ui/forms/index.ts +12 -0
  571. package/src/ui/forms/useInlineValidation.ts +115 -0
  572. package/src/ui/forms/validators.ts +29 -0
  573. package/src/ui/icons/HomeHeartIcon.tsx +34 -0
  574. package/src/ui/icons/StepIcon.tsx +78 -0
  575. package/src/ui/overlays/AnalyzingOverlay.tsx +323 -0
  576. package/src/ui/overlays/LoadingOverlay.tsx +115 -0
  577. package/src/ui/overlays/ProgressBar.tsx +106 -0
  578. package/src/ui/overlays/RetryDialog.tsx +128 -0
  579. package/src/ui/overlays/index.ts +3 -0
  580. package/src/ui/primitives/BackButton.tsx +65 -0
  581. package/src/ui/primitives/Banner.tsx +81 -0
  582. package/src/ui/primitives/Button.tsx +164 -0
  583. package/src/ui/primitives/Card.tsx +55 -0
  584. package/src/ui/primitives/Checkbox.tsx +153 -0
  585. package/src/ui/primitives/CountrySelect.tsx +356 -0
  586. package/src/ui/primitives/DatePicker.tsx +266 -0
  587. package/src/ui/primitives/Input.tsx +110 -0
  588. package/src/ui/primitives/SearchableSingleSelectList.tsx +195 -0
  589. package/src/ui/primitives/Select.tsx +259 -0
  590. package/src/ui/primitives/Spinner.tsx +17 -0
  591. package/src/ui/primitives/index.ts +16 -0
  592. package/src/ui/primitives/searchableSingleSelectFilter.ts +38 -0
  593. package/src/ui/theme/ThemeProvider.tsx +102 -0
  594. package/src/ui/theme/index.ts +17 -0
  595. package/src/ui/theme/tokens.ts +159 -0
  596. package/src/utils/EventEmitter.ts +155 -0
  597. package/src/utils/base64.ts +44 -0
  598. package/src/utils/deviceFingerprint.ts +184 -0
  599. package/src/utils/documentTypeOptions.ts +31 -0
  600. package/src/utils/googleMapsPreflight.ts +89 -0
  601. package/src/utils/hmac.ts +61 -0
  602. package/src/utils/iso3166Countries.ts +111 -0
  603. package/src/utils/jpegFromUri.ts +42 -0
  604. package/src/utils/keepAwake.ts +62 -0
  605. package/src/utils/log.ts +37 -0
  606. package/src/utils/osGeocoder.ts +75 -0
  607. package/src/utils/parseGoogleAddressComponents.ts +123 -0
  608. package/src/utils/personNameNormalize.ts +17 -0
  609. package/src/utils/sdkError.ts +40 -0
  610. package/src/utils/sdkVersion.ts +6 -0
  611. package/src/utils/stepConfig.ts +75 -0
  612. package/src/utils/taxInfoConfig.ts +14 -0
  613. package/src/utils/useSafeAreaInsets.ts +37 -0
  614. package/src/utils/velionExtra.ts +46 -0
@@ -0,0 +1,662 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.AddressInfoStep = void 0;
7
+ var _react = require("react");
8
+ var _reactNative = require("react-native");
9
+ var _types = require("../types");
10
+ var _Banner = require("../ui/primitives/Banner");
11
+ var _Button = require("../ui/primitives/Button");
12
+ var _CountrySelect = require("../ui/primitives/CountrySelect");
13
+ var _Input = require("../ui/primitives/Input");
14
+ var _LoadingOverlay = require("../ui/overlays/LoadingOverlay");
15
+ var _RetryDialog = require("../ui/overlays/RetryDialog");
16
+ var _StepShell = require("../ui/StepShell");
17
+ var _HomeHeartIcon = require("../ui/icons/HomeHeartIcon");
18
+ var _MapFallbackBoundary = require("../ui/MapFallbackBoundary");
19
+ var _theme = require("../ui/theme");
20
+ var _i18n = require("../i18n");
21
+ var _MapAddressPicker = require("../camera/MapAddressPicker");
22
+ var _googleMapsPreflight = require("../utils/googleMapsPreflight");
23
+ var _log = require("../utils/log");
24
+ var _shared = require("./_shared");
25
+ var _jsxRuntime = require("react/jsx-runtime");
26
+ /**
27
+ * ADDRESS_INFO — POST /sessions/:id/address-info.
28
+ *
29
+ * Two flows:
30
+ *
31
+ * 1. **Assisted** (when `VelionConfig.googleMapsApiKey` is set, or on iOS
32
+ * where Apple Maps needs no key): intro → map picker → details (floor /
33
+ * apartment / references) → submit. Lat/Lng are included in the payload.
34
+ * 2. **Manual** (default fallback): the structured form — country, state,
35
+ * city, district, neighborhood, street, number, zip, plus the same
36
+ * details fields. No lat/lng.
37
+ *
38
+ * The orchestrator picks the flow by passing `googleMapsApiKey` through
39
+ * `StepDeps`; the step itself decides which view to mount.
40
+ */
41
+
42
+ const ADDRESS_TYPE_HOME = 'HOME';
43
+ class AddressInfoStep {
44
+ destroyed = false;
45
+ constructor(deps) {
46
+ this.deps = deps;
47
+ }
48
+ run() {
49
+ return new Promise((resolve, reject) => {
50
+ this.resolveStep = resolve;
51
+ this.rejectStep = reject;
52
+ this.deps.ui.setNode(/*#__PURE__*/(0, _jsxRuntime.jsx)(AddressInfoView, {
53
+ api: this.deps.api,
54
+ sessionId: this.deps.sessionId,
55
+ locale: this.deps.locale,
56
+ stepConfig: this.deps.stepConfig,
57
+ googleMapsApiKey: this.deps.googleMapsApiKey,
58
+ prefill: this.deps.stepResult,
59
+ onBack: this.deps.onBack,
60
+ onComplete: () => {
61
+ if (this.destroyed) return;
62
+ this.deps.ui.setNode(null);
63
+ this.resolveStep();
64
+ },
65
+ onCancel: err => {
66
+ if (this.destroyed) return;
67
+ this.deps.ui.setNode(null);
68
+ this.rejectStep(err);
69
+ }
70
+ }));
71
+ });
72
+ }
73
+ destroy() {
74
+ this.destroyed = true;
75
+ this.deps.ui.setNode(null);
76
+ }
77
+ }
78
+
79
+ /**
80
+ * Resolves which sub-flow to mount.
81
+ *
82
+ * - `assisted`: react-native-maps is linked AND the platform can render the
83
+ * map without extra config. iOS uses Apple Maps (no API key
84
+ * needed); Android uses Google Maps (requires the integrator
85
+ * to declare the key in AndroidManifest, which we approximate
86
+ * by requiring `googleMapsApiKey` in VelionConfig — without
87
+ * it the MapView would render blank).
88
+ * - `manual`: native module missing, OR Android without an API key, OR
89
+ * the map component threw at render time (caught by
90
+ * `MapFallbackBoundary` and bubbled here via `setMode`).
91
+ */
92
+ exports.AddressInfoStep = AddressInfoStep;
93
+ function AddressInfoView(props) {
94
+ const hasApiKey = typeof props.googleMapsApiKey === 'string' && props.googleMapsApiKey.trim().length > 0;
95
+ const [mode, setMode] = (0, _react.useState)(() => {
96
+ if (!(0, _googleMapsPreflight.isReactNativeMapsAvailable)()) {
97
+ _log.log.warn('[address] react-native-maps native module unavailable; falling back to manual form');
98
+ return 'manual';
99
+ }
100
+ // Android requires the Maps SDK API key in the manifest — without it the
101
+ // <MapView> renders blank. iOS uses Apple Maps and needs no key at all.
102
+ if (_reactNative.Platform.OS === 'android' && !hasApiKey) {
103
+ _log.log.info('[address] no googleMapsApiKey configured; Android cannot render the assisted map, using manual form');
104
+ return 'manual';
105
+ }
106
+ // Android meta-data probe. The JS-side `googleMapsApiKey` does NOT reach
107
+ // Google Maps SDK — the SDK reads the key from AndroidManifest.xml at
108
+ // mount time. If the host forgot to declare it there (e.g. set the key in
109
+ // VelionConfig but not in `app.config.js → android.config.googleMaps.apiKey`)
110
+ // mounting <MapView> throws a native IllegalStateException that no JS
111
+ // boundary can catch. Detect the mismatch and degrade gracefully.
112
+ if (_reactNative.Platform.OS === 'android' && hasApiKey) {
113
+ const inManifest = (0, _googleMapsPreflight.isAndroidGoogleMapsKeyInManifest)();
114
+ if (inManifest === false) {
115
+ _log.log.warn('[address] googleMapsApiKey is set in VelionConfig but the Android manifest does not declare ' + '`com.google.android.geo.API_KEY`. Add it via app.config.js → android.config.googleMaps.apiKey ' + 'and re-run `expo prebuild`. Falling back to the manual form to prevent a native crash.');
116
+ return 'manual';
117
+ }
118
+ }
119
+ return 'assisted';
120
+ });
121
+ if (mode === 'assisted') {
122
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(AssistedAddressFlow, {
123
+ ...props,
124
+ onMapRenderFailure: () => {
125
+ _log.log.warn('[address] map render threw at runtime; switching to manual form');
126
+ setMode('manual');
127
+ }
128
+ });
129
+ }
130
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(ManualAddressForm, {
131
+ ...props
132
+ });
133
+ }
134
+
135
+ // ─────────────────────────────────────────────────────────────────────────────
136
+ // ASSISTED FLOW — intro → map picker → details
137
+ // ─────────────────────────────────────────────────────────────────────────────
138
+
139
+ function AssistedAddressFlow({
140
+ api,
141
+ sessionId,
142
+ locale,
143
+ stepConfig,
144
+ prefill,
145
+ onBack,
146
+ onComplete,
147
+ onCancel,
148
+ onMapRenderFailure
149
+ }) {
150
+ const t = (0, _i18n.getStrings)(locale);
151
+ const theme = (0, _theme.useTheme)();
152
+ const [phase, setPhase] = (0, _react.useState)('intro');
153
+ const [parsed, setParsed] = (0, _react.useState)(null);
154
+ const requiredFields = (0, _react.useMemo)(() => {
155
+ const f = stepConfig?.fields;
156
+ return {
157
+ state: f?.state?.required !== false,
158
+ city: f?.city?.required !== false,
159
+ street: f?.street?.required !== false,
160
+ number: f?.number?.required !== false,
161
+ postal: f?.postal_code?.required !== false
162
+ };
163
+ }, [stepConfig?.fields]);
164
+ if (phase === 'intro') {
165
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
166
+ style: {
167
+ flex: 1
168
+ },
169
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_StepShell.StepShell, {
170
+ title: t.address_info.introTitle,
171
+ subtitle: t.address_info.introLine1,
172
+ iconNode: /*#__PURE__*/(0, _jsxRuntime.jsx)(_HomeHeartIcon.HomeHeartIcon, {}),
173
+ onBack: onBack,
174
+ backLabel: t.common.back,
175
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
176
+ style: [styles.introBody, {
177
+ color: theme.textSecondaryColor
178
+ }],
179
+ children: t.address_info.introLine2
180
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Button.Button, {
181
+ label: t.address_info.introNext,
182
+ onPress: () => setPhase('map')
183
+ })]
184
+ })
185
+ });
186
+ }
187
+ if (phase === 'map') {
188
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_MapFallbackBoundary.MapFallbackBoundary, {
189
+ onError: onMapRenderFailure,
190
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_MapAddressPicker.MapAddressPicker, {
191
+ locale: locale,
192
+ nextLabel: t.address_info.mapNext,
193
+ backLabel: t.address_info.mapBack,
194
+ searchPlaceholder: t.address_info.mapSearchPlaceholder,
195
+ searchingLabel: t.address_info.mapSearching,
196
+ noResultsLabel: t.address_info.mapNoResults,
197
+ geocodeError: t.address_info.geocodeError,
198
+ locationDenied: t.address_info.locationDenied,
199
+ requiredFields: requiredFields,
200
+ countryAllow: stepConfig?.country_allow,
201
+ onConfirm: p => {
202
+ setParsed(p);
203
+ setPhase('details');
204
+ },
205
+ onBack: () => setPhase('intro')
206
+ })
207
+ });
208
+ }
209
+ if (!parsed) {
210
+ setPhase('map');
211
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {});
212
+ }
213
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(AddressDetailsForm, {
214
+ api: api,
215
+ sessionId: sessionId,
216
+ locale: locale,
217
+ parsed: parsed,
218
+ addressType: stepConfig?.address_type?.id ?? ADDRESS_TYPE_HOME,
219
+ prefill: prefill,
220
+ onComplete: onComplete,
221
+ onCancel: onCancel,
222
+ onBack: () => setPhase('map')
223
+ });
224
+ }
225
+ function AddressDetailsForm({
226
+ api,
227
+ sessionId,
228
+ locale,
229
+ parsed,
230
+ addressType,
231
+ prefill,
232
+ onComplete,
233
+ onCancel,
234
+ onBack
235
+ }) {
236
+ const t = (0, _i18n.getStrings)(locale);
237
+ const theme = (0, _theme.useTheme)();
238
+ const [floor, setFloor] = (0, _react.useState)(() => (0, _shared.prefillString)(prefill, 'floor'));
239
+ const [apartment, setApartment] = (0, _react.useState)(() => (0, _shared.prefillString)(prefill, 'apartment'));
240
+ const [details, setDetails] = (0, _react.useState)(() => (0, _shared.prefillString)(prefill, 'details'));
241
+ const [bannerError, setBannerError] = (0, _react.useState)(null);
242
+ const [submitting, setSubmitting] = (0, _react.useState)(false);
243
+ const [retry, setRetry] = (0, _react.useState)(null);
244
+ const handleSubmit = (0, _react.useCallback)(async () => {
245
+ setBannerError(null);
246
+ const payload = {
247
+ type: addressType,
248
+ country: parsed.country,
249
+ state: parsed.state,
250
+ city: parsed.city,
251
+ street: parsed.street,
252
+ number: parsed.number,
253
+ zip_code: parsed.zip_code,
254
+ latitude: parsed.latitude,
255
+ longitude: parsed.longitude,
256
+ ...(parsed.district && {
257
+ district: parsed.district
258
+ }),
259
+ ...(parsed.neighborhood && {
260
+ neighborhood: parsed.neighborhood
261
+ }),
262
+ ...(floor.trim() && {
263
+ floor: floor.trim()
264
+ }),
265
+ ...(apartment.trim() && {
266
+ apartment: apartment.trim()
267
+ }),
268
+ ...(details.trim() && {
269
+ details: details.trim()
270
+ })
271
+ };
272
+ setSubmitting(true);
273
+ try {
274
+ await api.post(`/sessions/${sessionId}/address-info`, payload);
275
+ setSubmitting(false);
276
+ onComplete();
277
+ } catch (err) {
278
+ setSubmitting(false);
279
+ const sdkErr = (0, _shared.toSubmissionError)(err, t);
280
+ setBannerError(sdkErr.message);
281
+ setRetry({
282
+ message: sdkErr.message
283
+ });
284
+ }
285
+ }, [addressType, api, apartment, details, floor, onComplete, parsed, sessionId, t]);
286
+ if (retry) {
287
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_RetryDialog.RetryDialog, {
288
+ title: t.common.submissionTitle,
289
+ message: retry.message || t.common.submissionFallback,
290
+ retryLabel: t.common.retry,
291
+ cancelLabel: t.common.cancel,
292
+ onRetry: () => setRetry(null),
293
+ onCancel: () => {
294
+ setRetry(null);
295
+ onCancel({
296
+ code: _types.SdkErrorCode.API_ERROR,
297
+ message: retry.message
298
+ });
299
+ }
300
+ });
301
+ }
302
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
303
+ style: {
304
+ flex: 1
305
+ },
306
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_StepShell.StepShell, {
307
+ title: t.address_info.detailsTitle,
308
+ subtitle: parsed.street ? `${parsed.street} ${parsed.number}` : undefined,
309
+ iconNode: /*#__PURE__*/(0, _jsxRuntime.jsx)(_HomeHeartIcon.HomeHeartIcon, {}),
310
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Text, {
311
+ style: [styles.summary, {
312
+ color: theme.textSecondaryColor
313
+ }],
314
+ children: [parsed.city, parsed.state ? `, ${parsed.state}` : '', " (", parsed.country, ")"]
315
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
316
+ style: styles.row,
317
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
318
+ style: styles.col,
319
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Input.Input, {
320
+ label: t.address_info.floor,
321
+ autoCorrect: false,
322
+ value: floor,
323
+ onChangeText: setFloor
324
+ })
325
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
326
+ style: styles.col,
327
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Input.Input, {
328
+ label: t.address_info.apartment,
329
+ autoCorrect: false,
330
+ value: apartment,
331
+ onChangeText: setApartment
332
+ })
333
+ })]
334
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Input.Input, {
335
+ label: t.address_info.references,
336
+ autoCorrect: true,
337
+ multiline: true,
338
+ numberOfLines: 3,
339
+ value: details,
340
+ onChangeText: setDetails
341
+ }), bannerError ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_Banner.Banner, {
342
+ message: bannerError
343
+ }) : null, /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
344
+ style: styles.row,
345
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Button.Button, {
346
+ variant: "ghost",
347
+ label: t.address_info.mapBack,
348
+ onPress: onBack,
349
+ fullWidth: false,
350
+ style: styles.col
351
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Button.Button, {
352
+ label: t.common.continue,
353
+ onPress: handleSubmit,
354
+ loading: submitting,
355
+ disabled: submitting,
356
+ fullWidth: false,
357
+ style: styles.col
358
+ })]
359
+ })]
360
+ }), submitting ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_LoadingOverlay.LoadingOverlay, {
361
+ message: t.common.submitting
362
+ }) : null]
363
+ });
364
+ }
365
+
366
+ // ─────────────────────────────────────────────────────────────────────────────
367
+ // MANUAL FLOW — structured form, kept side-by-side with the assisted flow so
368
+ // consumers without a Maps key still get a full onboarding experience.
369
+ // ─────────────────────────────────────────────────────────────────────────────
370
+
371
+ function ManualAddressForm({
372
+ api,
373
+ sessionId,
374
+ locale,
375
+ stepConfig,
376
+ prefill,
377
+ onBack,
378
+ onComplete,
379
+ onCancel
380
+ }) {
381
+ const t = (0, _i18n.getStrings)(locale);
382
+ const f = stepConfig?.fields;
383
+ const allowedCodes = (0, _react.useMemo)(() => {
384
+ const allow = stepConfig?.country_allow;
385
+ if (!Array.isArray(allow) || allow.length === 0) return undefined;
386
+ return allow.map(c => c.toUpperCase());
387
+ }, [stepConfig?.country_allow]);
388
+ const requirements = (0, _react.useMemo)(() => ({
389
+ state: f?.state?.required !== false,
390
+ city: f?.city?.required !== false,
391
+ district: f?.district?.required === true,
392
+ neighborhood: f?.neighborhood?.required === true,
393
+ street: f?.street?.required !== false,
394
+ number: f?.number?.required !== false,
395
+ zip: f?.postal_code?.required !== false
396
+ }), [f]);
397
+ const [form, setForm] = (0, _react.useState)(() => {
398
+ // Seed from prefill first (reverse navigation re-opened this step), then
399
+ // fall back to a single allowed country. Prefill takes precedence.
400
+ const base = {
401
+ country: (0, _shared.prefillString)(prefill, 'country'),
402
+ state: (0, _shared.prefillString)(prefill, 'state'),
403
+ city: (0, _shared.prefillString)(prefill, 'city'),
404
+ district: (0, _shared.prefillString)(prefill, 'district'),
405
+ neighborhood: (0, _shared.prefillString)(prefill, 'neighborhood'),
406
+ street: (0, _shared.prefillString)(prefill, 'street'),
407
+ number: (0, _shared.prefillString)(prefill, 'number'),
408
+ zip_code: (0, _shared.prefillString)(prefill, 'zip_code'),
409
+ floor: (0, _shared.prefillString)(prefill, 'floor'),
410
+ apartment: (0, _shared.prefillString)(prefill, 'apartment'),
411
+ details: (0, _shared.prefillString)(prefill, 'details')
412
+ };
413
+ if (!base.country && allowedCodes && allowedCodes.length === 1) {
414
+ base.country = allowedCodes[0] ?? '';
415
+ }
416
+ return base;
417
+ });
418
+ (0, _react.useEffect)(() => {
419
+ if (allowedCodes && allowedCodes.length === 1 && !form.country) {
420
+ setForm(prev => ({
421
+ ...prev,
422
+ country: allowedCodes[0] ?? ''
423
+ }));
424
+ }
425
+ }, [allowedCodes, form.country]);
426
+ const [errors, setErrors] = (0, _react.useState)({});
427
+ const [bannerError, setBannerError] = (0, _react.useState)(null);
428
+ const [submitting, setSubmitting] = (0, _react.useState)(false);
429
+ const [retry, setRetry] = (0, _react.useState)(null);
430
+ const setField = (0, _react.useCallback)((key, value) => {
431
+ setForm(prev => ({
432
+ ...prev,
433
+ [key]: value
434
+ }));
435
+ setErrors(prev => {
436
+ if (!(key in prev)) return prev;
437
+ const next = {
438
+ ...prev
439
+ };
440
+ delete next[key];
441
+ return next;
442
+ });
443
+ }, []);
444
+ const validate = (0, _react.useCallback)(() => {
445
+ const next = {};
446
+ if (!form.country) next.country = t.address_info.requiredCountry;
447
+ if (requirements.state && !form.state.trim()) next.state = t.address_info.requiredState;
448
+ if (requirements.city && !form.city.trim()) next.city = t.address_info.requiredCity;
449
+ if (requirements.district && !form.district.trim()) next.district = t.address_info.requiredDistrict;
450
+ if (requirements.neighborhood && !form.neighborhood.trim()) next.neighborhood = t.address_info.requiredNeighborhood;
451
+ if (requirements.street && !form.street.trim()) next.street = t.address_info.requiredStreet;
452
+ if (requirements.number && !form.number.trim()) next.number = t.address_info.requiredNumber;
453
+ if (requirements.zip && !form.zip_code.trim()) next.zip_code = t.address_info.requiredZip;
454
+ setErrors(next);
455
+ return Object.keys(next).length === 0;
456
+ }, [form, requirements, t.address_info]);
457
+ const handleSubmit = (0, _react.useCallback)(async () => {
458
+ setBannerError(null);
459
+ if (!validate()) {
460
+ setBannerError(t.address_info.fillAllRequired);
461
+ return;
462
+ }
463
+ const payload = {
464
+ type: stepConfig?.address_type?.id ?? ADDRESS_TYPE_HOME,
465
+ country: form.country.toUpperCase(),
466
+ state: form.state.trim(),
467
+ city: form.city.trim(),
468
+ street: form.street.trim(),
469
+ number: form.number.trim(),
470
+ zip_code: form.zip_code.trim(),
471
+ ...(form.district.trim() && {
472
+ district: form.district.trim()
473
+ }),
474
+ ...(form.neighborhood.trim() && {
475
+ neighborhood: form.neighborhood.trim()
476
+ }),
477
+ ...(form.floor.trim() && {
478
+ floor: form.floor.trim()
479
+ }),
480
+ ...(form.apartment.trim() && {
481
+ apartment: form.apartment.trim()
482
+ }),
483
+ ...(form.details.trim() && {
484
+ details: form.details.trim()
485
+ })
486
+ };
487
+ setSubmitting(true);
488
+ try {
489
+ await api.post(`/sessions/${sessionId}/address-info`, payload);
490
+ setSubmitting(false);
491
+ onComplete();
492
+ } catch (err) {
493
+ setSubmitting(false);
494
+ const sdkErr = (0, _shared.toSubmissionError)(err, t);
495
+ setBannerError(sdkErr.message);
496
+ setRetry({
497
+ message: sdkErr.message
498
+ });
499
+ }
500
+ }, [api, form, onComplete, sessionId, stepConfig?.address_type?.id, t, validate]);
501
+ if (retry) {
502
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_RetryDialog.RetryDialog, {
503
+ title: t.common.submissionTitle,
504
+ message: retry.message || t.common.submissionFallback,
505
+ retryLabel: t.common.retry,
506
+ cancelLabel: t.common.cancel,
507
+ onRetry: () => setRetry(null),
508
+ onCancel: () => {
509
+ setRetry(null);
510
+ onCancel({
511
+ code: _types.SdkErrorCode.API_ERROR,
512
+ message: retry.message
513
+ });
514
+ }
515
+ });
516
+ }
517
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
518
+ style: {
519
+ flex: 1
520
+ },
521
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_StepShell.StepShell, {
522
+ title: t.address_info.title,
523
+ subtitle: t.address_info.subtitle,
524
+ iconNode: /*#__PURE__*/(0, _jsxRuntime.jsx)(_HomeHeartIcon.HomeHeartIcon, {}),
525
+ onBack: onBack,
526
+ backLabel: t.common.back,
527
+ backDisabled: submitting,
528
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_CountrySelect.CountrySelect, {
529
+ label: t.address_info.country,
530
+ required: true,
531
+ value: form.country || null,
532
+ onChange: v => setField('country', v),
533
+ locale: locale,
534
+ allowedCodes: allowedCodes,
535
+ placeholder: t.address_info.countryPlaceholder,
536
+ searchPlaceholder: t.address_info.countryPlaceholder,
537
+ errorMessage: errors.country ?? null
538
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Input.Input, {
539
+ label: t.address_info.state,
540
+ required: requirements.state,
541
+ autoCapitalize: "words",
542
+ autoCorrect: false,
543
+ value: form.state,
544
+ onChangeText: v => setField('state', v),
545
+ errorMessage: errors.state ?? null
546
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Input.Input, {
547
+ label: t.address_info.city,
548
+ required: requirements.city,
549
+ autoCapitalize: "words",
550
+ autoCorrect: false,
551
+ value: form.city,
552
+ onChangeText: v => setField('city', v),
553
+ errorMessage: errors.city ?? null
554
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Input.Input, {
555
+ label: t.address_info.district,
556
+ required: requirements.district,
557
+ autoCapitalize: "words",
558
+ autoCorrect: false,
559
+ value: form.district,
560
+ onChangeText: v => setField('district', v),
561
+ errorMessage: errors.district ?? null
562
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Input.Input, {
563
+ label: t.address_info.neighborhood,
564
+ required: requirements.neighborhood,
565
+ autoCapitalize: "words",
566
+ autoCorrect: false,
567
+ value: form.neighborhood,
568
+ onChangeText: v => setField('neighborhood', v),
569
+ errorMessage: errors.neighborhood ?? null
570
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Input.Input, {
571
+ label: t.address_info.street,
572
+ required: requirements.street,
573
+ autoCapitalize: "words",
574
+ autoCorrect: false,
575
+ value: form.street,
576
+ onChangeText: v => setField('street', v),
577
+ errorMessage: errors.street ?? null
578
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
579
+ style: styles.row,
580
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
581
+ style: styles.col,
582
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Input.Input, {
583
+ label: t.address_info.number,
584
+ required: requirements.number,
585
+ keyboardType: "number-pad",
586
+ autoCorrect: false,
587
+ value: form.number,
588
+ onChangeText: v => setField('number', v),
589
+ errorMessage: errors.number ?? null
590
+ })
591
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
592
+ style: styles.col,
593
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Input.Input, {
594
+ label: t.address_info.zipCode,
595
+ required: requirements.zip,
596
+ autoCapitalize: "characters",
597
+ autoCorrect: false,
598
+ value: form.zip_code,
599
+ onChangeText: v => setField('zip_code', v),
600
+ errorMessage: errors.zip_code ?? null
601
+ })
602
+ })]
603
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
604
+ style: styles.row,
605
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
606
+ style: styles.col,
607
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Input.Input, {
608
+ label: t.address_info.floor,
609
+ autoCorrect: false,
610
+ value: form.floor,
611
+ onChangeText: v => setField('floor', v)
612
+ })
613
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
614
+ style: styles.col,
615
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Input.Input, {
616
+ label: t.address_info.apartment,
617
+ autoCorrect: false,
618
+ value: form.apartment,
619
+ onChangeText: v => setField('apartment', v)
620
+ })
621
+ })]
622
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Input.Input, {
623
+ label: t.address_info.references,
624
+ autoCorrect: true,
625
+ multiline: true,
626
+ numberOfLines: 3,
627
+ value: form.details,
628
+ onChangeText: v => setField('details', v)
629
+ }), bannerError ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_Banner.Banner, {
630
+ message: bannerError
631
+ }) : null, /*#__PURE__*/(0, _jsxRuntime.jsx)(_Button.Button, {
632
+ label: t.common.continue,
633
+ onPress: handleSubmit,
634
+ loading: submitting,
635
+ disabled: submitting
636
+ })]
637
+ }), submitting ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_LoadingOverlay.LoadingOverlay, {
638
+ message: t.common.submitting
639
+ }) : null]
640
+ });
641
+ }
642
+ const styles = _reactNative.StyleSheet.create({
643
+ row: {
644
+ flexDirection: 'row',
645
+ gap: 8
646
+ },
647
+ col: {
648
+ flex: 1
649
+ },
650
+ introBody: {
651
+ fontSize: 14,
652
+ lineHeight: 20,
653
+ textAlign: 'center',
654
+ marginVertical: 12
655
+ },
656
+ summary: {
657
+ fontSize: 13,
658
+ textAlign: 'center',
659
+ marginBottom: 8
660
+ }
661
+ });
662
+ //# sourceMappingURL=AddressInfoStep.js.map