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