@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.
- package/CHANGELOG.md +66 -0
- package/LICENSE +12 -0
- package/README.md +888 -0
- package/app.plugin.js +101 -0
- package/lib/commonjs/camera/AddressSearchBar.js +304 -0
- package/lib/commonjs/camera/AddressSearchBar.js.map +1 -0
- package/lib/commonjs/camera/DocumentCapture.js +513 -0
- package/lib/commonjs/camera/DocumentCapture.js.map +1 -0
- package/lib/commonjs/camera/LivenessCamera.js +628 -0
- package/lib/commonjs/camera/LivenessCamera.js.map +1 -0
- package/lib/commonjs/camera/MapAddressPicker.js +331 -0
- package/lib/commonjs/camera/MapAddressPicker.js.map +1 -0
- package/lib/commonjs/core/VelionOnboarding.js +1113 -0
- package/lib/commonjs/core/VelionOnboarding.js.map +1 -0
- package/lib/commonjs/core/retryStepCopy.js +43 -0
- package/lib/commonjs/core/retryStepCopy.js.map +1 -0
- package/lib/commonjs/core/routingCommands.js +62 -0
- package/lib/commonjs/core/routingCommands.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 +200 -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 +301 -0
- package/lib/commonjs/i18n/strings/en.js.map +1 -0
- package/lib/commonjs/i18n/strings/es.js +306 -0
- package/lib/commonjs/i18n/strings/es.js.map +1 -0
- package/lib/commonjs/index.js +225 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/package.json +1 -0
- package/lib/commonjs/steps/AddressInfoStep.js +662 -0
- package/lib/commonjs/steps/AddressInfoStep.js.map +1 -0
- package/lib/commonjs/steps/DocumentsOcrStep.js +405 -0
- package/lib/commonjs/steps/DocumentsOcrStep.js.map +1 -0
- package/lib/commonjs/steps/EconomicActivityStep.js +214 -0
- package/lib/commonjs/steps/EconomicActivityStep.js.map +1 -0
- package/lib/commonjs/steps/EmailContactStep.js +150 -0
- package/lib/commonjs/steps/EmailContactStep.js.map +1 -0
- package/lib/commonjs/steps/EmailOtpStep.js +225 -0
- package/lib/commonjs/steps/EmailOtpStep.js.map +1 -0
- package/lib/commonjs/steps/FaceMatchStep.js +169 -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 +251 -0
- package/lib/commonjs/steps/HumanBasicInfoStep.js.map +1 -0
- package/lib/commonjs/steps/HumanExtendedInfoStep.js +275 -0
- package/lib/commonjs/steps/HumanExtendedInfoStep.js.map +1 -0
- package/lib/commonjs/steps/LegalBasicInfoStep.js +195 -0
- package/lib/commonjs/steps/LegalBasicInfoStep.js.map +1 -0
- package/lib/commonjs/steps/LegalExtendedInfoStep.js +173 -0
- package/lib/commonjs/steps/LegalExtendedInfoStep.js.map +1 -0
- package/lib/commonjs/steps/LivenessMatchStep.js +1184 -0
- package/lib/commonjs/steps/LivenessMatchStep.js.map +1 -0
- package/lib/commonjs/steps/PhoneContactStep.js +151 -0
- package/lib/commonjs/steps/PhoneContactStep.js.map +1 -0
- package/lib/commonjs/steps/PhoneOtpStep.js +224 -0
- package/lib/commonjs/steps/PhoneOtpStep.js.map +1 -0
- package/lib/commonjs/steps/SwornDeclarationStep.js +206 -0
- package/lib/commonjs/steps/SwornDeclarationStep.js.map +1 -0
- package/lib/commonjs/steps/TaxInfoStep.js +251 -0
- package/lib/commonjs/steps/TaxInfoStep.js.map +1 -0
- package/lib/commonjs/steps/TermsAndConditionsStep.js +245 -0
- package/lib/commonjs/steps/TermsAndConditionsStep.js.map +1 -0
- package/lib/commonjs/steps/_shared.js +61 -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 +458 -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 +251 -0
- package/lib/commonjs/ui/StepShell.js.map +1 -0
- package/lib/commonjs/ui/VelionOnboardingScreen.js +276 -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 +101 -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/BackButton.js +75 -0
- package/lib/commonjs/ui/primitives/BackButton.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/SearchableSingleSelectList.js +162 -0
- package/lib/commonjs/ui/primitives/SearchableSingleSelectList.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 +89 -0
- package/lib/commonjs/ui/primitives/index.js.map +1 -0
- package/lib/commonjs/ui/primitives/searchableSingleSelectFilter.js +31 -0
- package/lib/commonjs/ui/primitives/searchableSingleSelectFilter.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 +88 -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/commonjs/utils/useSafeAreaInsets.js +41 -0
- package/lib/commonjs/utils/useSafeAreaInsets.js.map +1 -0
- package/lib/commonjs/utils/velionExtra.js +48 -0
- package/lib/commonjs/utils/velionExtra.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 +508 -0
- package/lib/module/camera/DocumentCapture.js.map +1 -0
- package/lib/module/camera/LivenessCamera.js +623 -0
- package/lib/module/camera/LivenessCamera.js.map +1 -0
- package/lib/module/camera/MapAddressPicker.js +326 -0
- package/lib/module/camera/MapAddressPicker.js.map +1 -0
- package/lib/module/core/VelionOnboarding.js +1109 -0
- package/lib/module/core/VelionOnboarding.js.map +1 -0
- package/lib/module/core/retryStepCopy.js +39 -0
- package/lib/module/core/retryStepCopy.js.map +1 -0
- package/lib/module/core/routingCommands.js +57 -0
- package/lib/module/core/routingCommands.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 +189 -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 +297 -0
- package/lib/module/i18n/strings/en.js.map +1 -0
- package/lib/module/i18n/strings/es.js +302 -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 +658 -0
- package/lib/module/steps/AddressInfoStep.js.map +1 -0
- package/lib/module/steps/DocumentsOcrStep.js +399 -0
- package/lib/module/steps/DocumentsOcrStep.js.map +1 -0
- package/lib/module/steps/EconomicActivityStep.js +209 -0
- package/lib/module/steps/EconomicActivityStep.js.map +1 -0
- package/lib/module/steps/EmailContactStep.js +145 -0
- package/lib/module/steps/EmailContactStep.js.map +1 -0
- package/lib/module/steps/EmailOtpStep.js +220 -0
- package/lib/module/steps/EmailOtpStep.js.map +1 -0
- package/lib/module/steps/FaceMatchStep.js +164 -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 +246 -0
- package/lib/module/steps/HumanBasicInfoStep.js.map +1 -0
- package/lib/module/steps/HumanExtendedInfoStep.js +270 -0
- package/lib/module/steps/HumanExtendedInfoStep.js.map +1 -0
- package/lib/module/steps/LegalBasicInfoStep.js +190 -0
- package/lib/module/steps/LegalBasicInfoStep.js.map +1 -0
- package/lib/module/steps/LegalExtendedInfoStep.js +168 -0
- package/lib/module/steps/LegalExtendedInfoStep.js.map +1 -0
- package/lib/module/steps/LivenessMatchStep.js +1177 -0
- package/lib/module/steps/LivenessMatchStep.js.map +1 -0
- package/lib/module/steps/PhoneContactStep.js +146 -0
- package/lib/module/steps/PhoneContactStep.js.map +1 -0
- package/lib/module/steps/PhoneOtpStep.js +219 -0
- package/lib/module/steps/PhoneOtpStep.js.map +1 -0
- package/lib/module/steps/SwornDeclarationStep.js +203 -0
- package/lib/module/steps/SwornDeclarationStep.js.map +1 -0
- package/lib/module/steps/TaxInfoStep.js +246 -0
- package/lib/module/steps/TaxInfoStep.js.map +1 -0
- package/lib/module/steps/TermsAndConditionsStep.js +240 -0
- package/lib/module/steps/TermsAndConditionsStep.js.map +1 -0
- package/lib/module/steps/_shared.js +52 -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 +532 -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 +246 -0
- package/lib/module/ui/StepShell.js.map +1 -0
- package/lib/module/ui/VelionOnboardingScreen.js +273 -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 +97 -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/BackButton.js +71 -0
- package/lib/module/ui/primitives/BackButton.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/SearchableSingleSelectList.js +153 -0
- package/lib/module/ui/primitives/SearchableSingleSelectList.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 +14 -0
- package/lib/module/ui/primitives/index.js.map +1 -0
- package/lib/module/ui/primitives/searchableSingleSelectFilter.js +27 -0
- package/lib/module/ui/primitives/searchableSingleSelectFilter.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 +84 -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/module/utils/useSafeAreaInsets.js +37 -0
- package/lib/module/utils/useSafeAreaInsets.js.map +1 -0
- package/lib/module/utils/velionExtra.js +44 -0
- package/lib/module/utils/velionExtra.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 +67 -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 +169 -0
- package/lib/typescript/core/VelionOnboarding.d.ts.map +1 -0
- package/lib/typescript/core/retryStepCopy.d.ts +27 -0
- package/lib/typescript/core/retryStepCopy.d.ts.map +1 -0
- package/lib/typescript/core/routingCommands.d.ts +39 -0
- package/lib/typescript/core/routingCommands.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 +52 -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 +297 -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/EconomicActivityStep.d.ts +29 -0
- package/lib/typescript/steps/EconomicActivityStep.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 +22 -0
- package/lib/typescript/steps/_shared.d.ts.map +1 -0
- package/lib/typescript/steps/types.d.ts +89 -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 +1219 -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 +29 -0
- package/lib/typescript/ui/StepShell.d.ts.map +1 -0
- package/lib/typescript/ui/VelionOnboardingScreen.d.ts +26 -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 +32 -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/BackButton.d.ts +20 -0
- package/lib/typescript/ui/primitives/BackButton.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/SearchableSingleSelectList.d.ts +33 -0
- package/lib/typescript/ui/primitives/SearchableSingleSelectList.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 +12 -0
- package/lib/typescript/ui/primitives/index.d.ts.map +1 -0
- package/lib/typescript/ui/primitives/searchableSingleSelectFilter.d.ts +25 -0
- package/lib/typescript/ui/primitives/searchableSingleSelectFilter.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 +52 -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/lib/typescript/utils/useSafeAreaInsets.d.ts +26 -0
- package/lib/typescript/utils/useSafeAreaInsets.d.ts.map +1 -0
- package/lib/typescript/utils/velionExtra.d.ts +24 -0
- package/lib/typescript/utils/velionExtra.d.ts.map +1 -0
- package/package.json +107 -0
- package/src/camera/AddressSearchBar.tsx +363 -0
- package/src/camera/DocumentCapture.tsx +514 -0
- package/src/camera/LivenessCamera.tsx +706 -0
- package/src/camera/MapAddressPicker.tsx +391 -0
- package/src/core/VelionOnboarding.ts +1291 -0
- package/src/core/retryStepCopy.ts +54 -0
- package/src/core/routingCommands.ts +63 -0
- package/src/core/sessionDeclinedCopy.ts +76 -0
- package/src/core/sessionStateMapper.ts +232 -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 +335 -0
- package/src/i18n/strings/es.ts +337 -0
- package/src/index.ts +146 -0
- package/src/steps/AddressInfoStep.tsx +744 -0
- package/src/steps/DocumentsOcrStep.tsx +481 -0
- package/src/steps/EconomicActivityStep.tsx +230 -0
- package/src/steps/EmailContactStep.tsx +165 -0
- package/src/steps/EmailOtpStep.tsx +256 -0
- package/src/steps/FaceMatchStep.tsx +176 -0
- package/src/steps/FingerprintStep.tsx +99 -0
- package/src/steps/HumanBasicInfoStep.tsx +286 -0
- package/src/steps/HumanExtendedInfoStep.tsx +362 -0
- package/src/steps/LegalBasicInfoStep.tsx +214 -0
- package/src/steps/LegalExtendedInfoStep.tsx +184 -0
- package/src/steps/LivenessMatchStep.tsx +1351 -0
- package/src/steps/PhoneContactStep.tsx +166 -0
- package/src/steps/PhoneOtpStep.tsx +255 -0
- package/src/steps/SwornDeclarationStep.tsx +237 -0
- package/src/steps/TaxInfoStep.tsx +288 -0
- package/src/steps/TermsAndConditionsStep.tsx +269 -0
- package/src/steps/_shared.ts +69 -0
- package/src/steps/types.ts +93 -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 +1421 -0
- package/src/ui/MapFallbackBoundary.tsx +46 -0
- package/src/ui/StepShell.tsx +273 -0
- package/src/ui/VelionOnboardingScreen.tsx +297 -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 +78 -0
- package/src/ui/overlays/AnalyzingOverlay.tsx +323 -0
- package/src/ui/overlays/LoadingOverlay.tsx +115 -0
- package/src/ui/overlays/ProgressBar.tsx +106 -0
- package/src/ui/overlays/RetryDialog.tsx +128 -0
- package/src/ui/overlays/index.ts +3 -0
- package/src/ui/primitives/BackButton.tsx +65 -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/SearchableSingleSelectList.tsx +195 -0
- package/src/ui/primitives/Select.tsx +259 -0
- package/src/ui/primitives/Spinner.tsx +17 -0
- package/src/ui/primitives/index.ts +16 -0
- package/src/ui/primitives/searchableSingleSelectFilter.ts +38 -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 +89 -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
- package/src/utils/useSafeAreaInsets.ts +37 -0
- package/src/utils/velionExtra.ts +46 -0
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Error boundary that catches render failures from `react-native-maps` and
|
|
3
|
+
* lets the parent fall back to the manual address form.
|
|
4
|
+
*
|
|
5
|
+
* Specifically the `AirGoogleMaps` runtime error (`AirGoogleMaps dir must be
|
|
6
|
+
* added to your xCode project to support GoogleMaps on iOS`) only surfaces
|
|
7
|
+
* when the MapView mounts. The preflight check cannot detect it because the
|
|
8
|
+
* native module exists — it's just missing its iOS sub-target.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import { Component, type ReactNode } from 'react';
|
|
12
|
+
import { log } from '../utils/log';
|
|
13
|
+
|
|
14
|
+
interface Props {
|
|
15
|
+
children: ReactNode;
|
|
16
|
+
/** Called once when the boundary catches an error from any descendant. */
|
|
17
|
+
onError: (error: Error) => void;
|
|
18
|
+
/** Rendered while the boundary is in the errored state, before the parent reacts. */
|
|
19
|
+
fallback?: ReactNode;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
interface State {
|
|
23
|
+
hasError: boolean;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export class MapFallbackBoundary extends Component<Props, State> {
|
|
27
|
+
state: State = { hasError: false };
|
|
28
|
+
|
|
29
|
+
static getDerivedStateFromError(): State {
|
|
30
|
+
return { hasError: true };
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
componentDidCatch(error: Error): void {
|
|
34
|
+
log.warn('[MapFallbackBoundary] map render failed, switching to manual', {
|
|
35
|
+
message: error.message,
|
|
36
|
+
});
|
|
37
|
+
this.props.onError(error);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
render() {
|
|
41
|
+
if (this.state.hasError) {
|
|
42
|
+
return this.props.fallback ?? null;
|
|
43
|
+
}
|
|
44
|
+
return this.props.children;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Step shell — header + scrollable body.
|
|
3
|
+
*
|
|
4
|
+
* Rounded header icon, title, subtitle, then a centered column with the
|
|
5
|
+
* step's form. Used by every form-style step (HUMAN_BASIC_INFO, TAX_INFO, …)
|
|
6
|
+
* so they read as a single visual family.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import type { ReactNode } from 'react';
|
|
10
|
+
import { useRef } from 'react';
|
|
11
|
+
import {
|
|
12
|
+
Animated,
|
|
13
|
+
KeyboardAvoidingView,
|
|
14
|
+
Platform,
|
|
15
|
+
StyleSheet,
|
|
16
|
+
Text,
|
|
17
|
+
View,
|
|
18
|
+
} from 'react-native';
|
|
19
|
+
import Svg, {
|
|
20
|
+
Defs,
|
|
21
|
+
LinearGradient as SvgLinearGradient,
|
|
22
|
+
Rect,
|
|
23
|
+
Stop,
|
|
24
|
+
} from 'react-native-svg';
|
|
25
|
+
import { useTheme, withAlpha } from './theme';
|
|
26
|
+
import { BackButton } from './primitives/BackButton';
|
|
27
|
+
import { PROGRESS_BAR_HEIGHT } from './overlays/ProgressBar';
|
|
28
|
+
import { useSafeAreaInsets } from '../utils/useSafeAreaInsets';
|
|
29
|
+
|
|
30
|
+
export interface StepShellProps {
|
|
31
|
+
title: string;
|
|
32
|
+
subtitle?: string | undefined;
|
|
33
|
+
/** Optional icon-bearing element (e.g. SVG). Falls back to a colored disc. */
|
|
34
|
+
iconNode?: ReactNode | undefined;
|
|
35
|
+
children: ReactNode;
|
|
36
|
+
/** When true, the body is wrapped in a `KeyboardAvoidingView` (form-friendly). */
|
|
37
|
+
avoidKeyboard?: boolean | undefined;
|
|
38
|
+
/**
|
|
39
|
+
* When provided, renders a top-left "back" (chevron) control. Only reversible
|
|
40
|
+
* steps wire this — the orchestrator decides based on the backend's
|
|
41
|
+
* `reversible` flag, so non-reversible steps simply omit it.
|
|
42
|
+
*/
|
|
43
|
+
onBack?: (() => void) | undefined;
|
|
44
|
+
/** Label for the back control (localized). Defaults are provided by callers. */
|
|
45
|
+
backLabel?: string | undefined;
|
|
46
|
+
/** Disables the back control (e.g. while a back request is already in flight). */
|
|
47
|
+
backDisabled?: boolean | undefined;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export function StepShell({
|
|
51
|
+
title,
|
|
52
|
+
subtitle,
|
|
53
|
+
iconNode,
|
|
54
|
+
children,
|
|
55
|
+
avoidKeyboard = true,
|
|
56
|
+
onBack,
|
|
57
|
+
backLabel = 'Atrás',
|
|
58
|
+
backDisabled = false,
|
|
59
|
+
}: StepShellProps) {
|
|
60
|
+
const theme = useTheme();
|
|
61
|
+
const insets = useSafeAreaInsets();
|
|
62
|
+
|
|
63
|
+
const showIconCircle = !theme.hideStepIcons && iconNode != null;
|
|
64
|
+
const showBack = onBack != null;
|
|
65
|
+
|
|
66
|
+
// Drive the top-fade opacity from the scroll offset so the gradient is fully
|
|
67
|
+
// invisible at rest (scrollY = 0) — the header/icon reads crisp — and only
|
|
68
|
+
// ramps in as the content scrolls up under the fixed back strip (OSDKR-12).
|
|
69
|
+
const scrollY = useRef(new Animated.Value(0)).current;
|
|
70
|
+
const fadeOpacity = scrollY.interpolate({
|
|
71
|
+
inputRange: [0, FADE_RAMP_DISTANCE],
|
|
72
|
+
outputRange: [0, 1],
|
|
73
|
+
extrapolate: 'clamp',
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
const scroll = (
|
|
77
|
+
<Animated.ScrollView
|
|
78
|
+
style={styles.scroll}
|
|
79
|
+
scrollEventThrottle={16}
|
|
80
|
+
onScroll={Animated.event(
|
|
81
|
+
[{ nativeEvent: { contentOffset: { y: scrollY } } }],
|
|
82
|
+
{ useNativeDriver: true },
|
|
83
|
+
)}
|
|
84
|
+
// When the fixed back strip is present it already clears the status bar +
|
|
85
|
+
// progress bar, so the scroll body only needs its base top padding.
|
|
86
|
+
// Without it, add the device safe-area insets so the header (icon + title)
|
|
87
|
+
// clears the top camera / notch. The bottom inset always clears the
|
|
88
|
+
// navigation bar / gesture area on edge-to-edge Android and on iOS devices
|
|
89
|
+
// with a home indicator.
|
|
90
|
+
contentContainerStyle={[
|
|
91
|
+
styles.scrollBody,
|
|
92
|
+
{
|
|
93
|
+
paddingTop: showBack ? BASE_PADDING_TOP : BASE_PADDING_TOP + insets.top,
|
|
94
|
+
paddingBottom: BASE_PADDING_BOTTOM + insets.bottom,
|
|
95
|
+
},
|
|
96
|
+
]}
|
|
97
|
+
keyboardShouldPersistTaps="handled"
|
|
98
|
+
>
|
|
99
|
+
<View style={styles.header}>
|
|
100
|
+
{showIconCircle ? (
|
|
101
|
+
<View
|
|
102
|
+
style={[
|
|
103
|
+
styles.iconCircle,
|
|
104
|
+
{
|
|
105
|
+
backgroundColor: theme.primaryColor,
|
|
106
|
+
shadowColor: withAlpha(theme.primaryColor, 0.5),
|
|
107
|
+
},
|
|
108
|
+
]}
|
|
109
|
+
accessibilityElementsHidden
|
|
110
|
+
importantForAccessibility="no"
|
|
111
|
+
>
|
|
112
|
+
{iconNode}
|
|
113
|
+
</View>
|
|
114
|
+
) : null}
|
|
115
|
+
<Text style={[styles.title, { color: theme.textColor }]}>{title}</Text>
|
|
116
|
+
{subtitle ? (
|
|
117
|
+
<Text
|
|
118
|
+
style={[styles.subtitle, { color: theme.textSecondaryColor }]}
|
|
119
|
+
>
|
|
120
|
+
{subtitle}
|
|
121
|
+
</Text>
|
|
122
|
+
) : null}
|
|
123
|
+
</View>
|
|
124
|
+
<View style={styles.column}>{children}</View>
|
|
125
|
+
</Animated.ScrollView>
|
|
126
|
+
);
|
|
127
|
+
|
|
128
|
+
// The back control lives in a fixed strip OUTSIDE the ScrollView so it stays
|
|
129
|
+
// pinned just below the (fixed) ProgressBar while the form scrolls behind it.
|
|
130
|
+
// `paddingTop` clears the status-bar / notch inset plus the progress bar's
|
|
131
|
+
// own height so "Atrás" never tucks under the bar (OSDKR-12).
|
|
132
|
+
const body = (
|
|
133
|
+
<View style={styles.flex}>
|
|
134
|
+
{showBack ? (
|
|
135
|
+
<View
|
|
136
|
+
style={[
|
|
137
|
+
styles.backStrip,
|
|
138
|
+
{ paddingTop: insets.top + PROGRESS_BAR_HEIGHT },
|
|
139
|
+
]}
|
|
140
|
+
>
|
|
141
|
+
<BackButton
|
|
142
|
+
label={backLabel}
|
|
143
|
+
onPress={onBack}
|
|
144
|
+
disabled={backDisabled}
|
|
145
|
+
/>
|
|
146
|
+
</View>
|
|
147
|
+
) : null}
|
|
148
|
+
<View style={styles.scrollWrap}>
|
|
149
|
+
{scroll}
|
|
150
|
+
{/* Soft top fade: the ScrollView hard-clips content at its top edge,
|
|
151
|
+
which reads as an abrupt cut as the header scrolls up under the
|
|
152
|
+
fixed back strip. A short background-to-transparent gradient lets
|
|
153
|
+
the content dissolve instead (OSDKR-12). Its opacity is tied to the
|
|
154
|
+
scroll offset so it stays invisible at rest and only appears once
|
|
155
|
+
the user scrolls. pointerEvents="none" so it never intercepts
|
|
156
|
+
touches / scroll. */}
|
|
157
|
+
<Animated.View
|
|
158
|
+
pointerEvents="none"
|
|
159
|
+
style={[styles.topFade, { height: TOP_FADE_HEIGHT, opacity: fadeOpacity }]}
|
|
160
|
+
>
|
|
161
|
+
<Svg width="100%" height="100%">
|
|
162
|
+
<Defs>
|
|
163
|
+
<SvgLinearGradient id="stepTopFade" x1="0" y1="0" x2="0" y2="1">
|
|
164
|
+
{/* Eased falloff (not linear): opaque near the top, then a long
|
|
165
|
+
gentle tail toward transparent, so the dissolve has no
|
|
166
|
+
perceptible edge. */}
|
|
167
|
+
<Stop offset="0" stopColor={theme.backgroundColor} stopOpacity={1} />
|
|
168
|
+
<Stop offset="0.35" stopColor={theme.backgroundColor} stopOpacity={0.85} />
|
|
169
|
+
<Stop offset="0.6" stopColor={theme.backgroundColor} stopOpacity={0.5} />
|
|
170
|
+
<Stop offset="0.82" stopColor={theme.backgroundColor} stopOpacity={0.18} />
|
|
171
|
+
<Stop offset="1" stopColor={theme.backgroundColor} stopOpacity={0} />
|
|
172
|
+
</SvgLinearGradient>
|
|
173
|
+
</Defs>
|
|
174
|
+
<Rect
|
|
175
|
+
x="0"
|
|
176
|
+
y="0"
|
|
177
|
+
width="100%"
|
|
178
|
+
height="100%"
|
|
179
|
+
fill="url(#stepTopFade)"
|
|
180
|
+
/>
|
|
181
|
+
</Svg>
|
|
182
|
+
</Animated.View>
|
|
183
|
+
</View>
|
|
184
|
+
</View>
|
|
185
|
+
);
|
|
186
|
+
|
|
187
|
+
if (avoidKeyboard) {
|
|
188
|
+
return (
|
|
189
|
+
<KeyboardAvoidingView
|
|
190
|
+
style={styles.flex}
|
|
191
|
+
behavior={Platform.OS === 'ios' ? 'padding' : undefined}
|
|
192
|
+
>
|
|
193
|
+
{body}
|
|
194
|
+
</KeyboardAvoidingView>
|
|
195
|
+
);
|
|
196
|
+
}
|
|
197
|
+
return body;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
// Base vertical padding for the scroll body. Safe-area insets are added on top
|
|
201
|
+
// of these at render time (see `contentContainerStyle` above).
|
|
202
|
+
const BASE_PADDING_TOP = 12;
|
|
203
|
+
const BASE_PADDING_BOTTOM = 28;
|
|
204
|
+
// Height of the background-to-transparent gradient masking the ScrollView's
|
|
205
|
+
// top clip edge. Tall on purpose: a long band makes the dissolve a gradual
|
|
206
|
+
// transition rather than a visible line.
|
|
207
|
+
const TOP_FADE_HEIGHT = 120;
|
|
208
|
+
// Scroll distance (px) over which the fade ramps from invisible (at rest) to
|
|
209
|
+
// fully active. Decoupled from TOP_FADE_HEIGHT so the long gradient still kicks
|
|
210
|
+
// in promptly as the user starts scrolling.
|
|
211
|
+
const FADE_RAMP_DISTANCE = 36;
|
|
212
|
+
|
|
213
|
+
const styles = StyleSheet.create({
|
|
214
|
+
flex: {
|
|
215
|
+
flex: 1,
|
|
216
|
+
},
|
|
217
|
+
scroll: {
|
|
218
|
+
flex: 1,
|
|
219
|
+
},
|
|
220
|
+
scrollWrap: {
|
|
221
|
+
flex: 1,
|
|
222
|
+
},
|
|
223
|
+
topFade: {
|
|
224
|
+
position: 'absolute',
|
|
225
|
+
top: 0,
|
|
226
|
+
left: 0,
|
|
227
|
+
right: 0,
|
|
228
|
+
},
|
|
229
|
+
backStrip: {
|
|
230
|
+
paddingHorizontal: 18,
|
|
231
|
+
},
|
|
232
|
+
scrollBody: {
|
|
233
|
+
paddingHorizontal: 18,
|
|
234
|
+
paddingTop: BASE_PADDING_TOP,
|
|
235
|
+
paddingBottom: BASE_PADDING_BOTTOM,
|
|
236
|
+
},
|
|
237
|
+
header: {
|
|
238
|
+
alignItems: 'center',
|
|
239
|
+
marginBottom: 14,
|
|
240
|
+
},
|
|
241
|
+
iconCircle: {
|
|
242
|
+
width: 56,
|
|
243
|
+
height: 56,
|
|
244
|
+
borderRadius: 28,
|
|
245
|
+
marginBottom: 10,
|
|
246
|
+
alignItems: 'center',
|
|
247
|
+
justifyContent: 'center',
|
|
248
|
+
shadowOpacity: 0.25,
|
|
249
|
+
shadowRadius: 8,
|
|
250
|
+
shadowOffset: { width: 0, height: 3 },
|
|
251
|
+
elevation: 3,
|
|
252
|
+
},
|
|
253
|
+
title: {
|
|
254
|
+
fontSize: 20,
|
|
255
|
+
fontWeight: '700',
|
|
256
|
+
letterSpacing: -0.3,
|
|
257
|
+
textAlign: 'center',
|
|
258
|
+
},
|
|
259
|
+
subtitle: {
|
|
260
|
+
marginTop: 6,
|
|
261
|
+
fontSize: 14,
|
|
262
|
+
fontWeight: '400',
|
|
263
|
+
textAlign: 'center',
|
|
264
|
+
lineHeight: 20,
|
|
265
|
+
maxWidth: 320,
|
|
266
|
+
},
|
|
267
|
+
column: {
|
|
268
|
+
width: '100%',
|
|
269
|
+
maxWidth: 360,
|
|
270
|
+
alignSelf: 'center',
|
|
271
|
+
gap: 10,
|
|
272
|
+
},
|
|
273
|
+
});
|
|
@@ -0,0 +1,297 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Top-level React component the host app mounts.
|
|
3
|
+
*
|
|
4
|
+
* Owns the `VelionOnboarding` instance lifecycle, mounts the `ThemeProvider`,
|
|
5
|
+
* and renders the orchestrator's view bridge: a sticky `ProgressBar`, the
|
|
6
|
+
* active step's React node, and (when a step is between transitions or the
|
|
7
|
+
* flow finishes) a themed `LoadingOverlay` / final-result message.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import React, {
|
|
11
|
+
useCallback,
|
|
12
|
+
useEffect,
|
|
13
|
+
useMemo,
|
|
14
|
+
useRef,
|
|
15
|
+
useState,
|
|
16
|
+
type ReactNode,
|
|
17
|
+
} from 'react';
|
|
18
|
+
import { StyleSheet, Text, View } from 'react-native';
|
|
19
|
+
import { VelionOnboarding, type VelionConfig } from '../core/VelionOnboarding';
|
|
20
|
+
import type {
|
|
21
|
+
OnboardingExit,
|
|
22
|
+
OnboardingResult,
|
|
23
|
+
OnboardingStep,
|
|
24
|
+
SdkError,
|
|
25
|
+
} from '../types';
|
|
26
|
+
import { ThemeProvider, useTheme } from './theme';
|
|
27
|
+
import { LoadingOverlay } from './overlays/LoadingOverlay';
|
|
28
|
+
import { PROGRESS_BAR, ProgressBar } from './overlays/ProgressBar';
|
|
29
|
+
import { getStrings } from '../i18n';
|
|
30
|
+
import {
|
|
31
|
+
activateScreenKeepAwake,
|
|
32
|
+
deactivateScreenKeepAwake,
|
|
33
|
+
} from '../utils/keepAwake';
|
|
34
|
+
import { useSafeAreaInsets } from '../utils/useSafeAreaInsets';
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Mounts `react-native-safe-area-context`'s `SafeAreaProvider` so descendant
|
|
38
|
+
* `useSafeAreaInsets()` calls resolve real device insets (notch / nav bar). The
|
|
39
|
+
* library is loaded dynamically with a fail-safe: hosts that strip it (or that
|
|
40
|
+
* already mount their own provider higher up) still render — a nested provider
|
|
41
|
+
* returns correct insets, and a missing module degrades to zero insets.
|
|
42
|
+
*/
|
|
43
|
+
function SafeAreaBoundary({ children }: { children: ReactNode }) {
|
|
44
|
+
try {
|
|
45
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires
|
|
46
|
+
const mod = require('react-native-safe-area-context');
|
|
47
|
+
const Provider = mod.SafeAreaProvider;
|
|
48
|
+
return (
|
|
49
|
+
<Provider initialMetrics={mod.initialWindowMetrics}>{children}</Provider>
|
|
50
|
+
);
|
|
51
|
+
} catch {
|
|
52
|
+
return <>{children}</>;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export interface VelionOnboardingScreenProps {
|
|
57
|
+
config: VelionConfig;
|
|
58
|
+
onComplete?: ((result: OnboardingResult) => void) | undefined;
|
|
59
|
+
onFail?: ((err: SdkError) => void) | undefined;
|
|
60
|
+
/**
|
|
61
|
+
* Fires when the user leaves the flow without a verdict — they tapped "back"
|
|
62
|
+
* on the first reversible step (`BACK_EXIT`). The SDK has cleared its UI; the
|
|
63
|
+
* host should dismiss/unmount this screen and return the user to the previous
|
|
64
|
+
* context. Mirrors `VelionConfig.onExit`.
|
|
65
|
+
*/
|
|
66
|
+
onExit?: ((exit: OnboardingExit) => void) | undefined;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
interface ViewState {
|
|
70
|
+
loading: string | null;
|
|
71
|
+
stepNode: ReactNode | null;
|
|
72
|
+
error: SdkError | null;
|
|
73
|
+
result: OnboardingResult | null;
|
|
74
|
+
/** Set once the user backed out of the first step; renders a blank surface. */
|
|
75
|
+
exited: boolean;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
const INITIAL_STATE: ViewState = {
|
|
79
|
+
loading: null,
|
|
80
|
+
stepNode: null,
|
|
81
|
+
error: null,
|
|
82
|
+
result: null,
|
|
83
|
+
exited: false,
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
export function VelionOnboardingScreen({
|
|
87
|
+
config,
|
|
88
|
+
onComplete,
|
|
89
|
+
onFail,
|
|
90
|
+
onExit,
|
|
91
|
+
}: VelionOnboardingScreenProps) {
|
|
92
|
+
return (
|
|
93
|
+
<SafeAreaBoundary>
|
|
94
|
+
<ThemeProvider
|
|
95
|
+
themeOverrides={config.theme}
|
|
96
|
+
colorMode={config.colorMode ?? 'auto'}
|
|
97
|
+
>
|
|
98
|
+
<VelionOnboardingInner
|
|
99
|
+
config={config}
|
|
100
|
+
onComplete={onComplete}
|
|
101
|
+
onFail={onFail}
|
|
102
|
+
onExit={onExit}
|
|
103
|
+
/>
|
|
104
|
+
</ThemeProvider>
|
|
105
|
+
</SafeAreaBoundary>
|
|
106
|
+
);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
function VelionOnboardingInner({
|
|
110
|
+
config,
|
|
111
|
+
onComplete,
|
|
112
|
+
onFail,
|
|
113
|
+
onExit,
|
|
114
|
+
}: VelionOnboardingScreenProps) {
|
|
115
|
+
const theme = useTheme();
|
|
116
|
+
const insets = useSafeAreaInsets();
|
|
117
|
+
const t = getStrings(config.locale);
|
|
118
|
+
const [state, setState] = useState<ViewState>(INITIAL_STATE);
|
|
119
|
+
const [progress, setProgress] = useState(0);
|
|
120
|
+
const [progressHidden, setProgressHidden] = useState(false);
|
|
121
|
+
|
|
122
|
+
const sdk = useMemo(
|
|
123
|
+
() => new VelionOnboarding(config),
|
|
124
|
+
// Recreate the SDK only when the session changes — host must keep
|
|
125
|
+
// callbacks stable (or wrap them in refs).
|
|
126
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
127
|
+
[config.sessionId, config.apiUrl],
|
|
128
|
+
);
|
|
129
|
+
const sdkRef = useRef(sdk);
|
|
130
|
+
sdkRef.current = sdk;
|
|
131
|
+
|
|
132
|
+
const onCompleteRef = useRef(onComplete);
|
|
133
|
+
const onFailRef = useRef(onFail);
|
|
134
|
+
const onExitRef = useRef(onExit);
|
|
135
|
+
onCompleteRef.current = onComplete;
|
|
136
|
+
onFailRef.current = onFail;
|
|
137
|
+
onExitRef.current = onExit;
|
|
138
|
+
|
|
139
|
+
useEffect(() => {
|
|
140
|
+
// Hold a wake lock for the full duration of the flow. Camera-heavy steps
|
|
141
|
+
// (LIVENESS_MATCH, DOCUMENTS_OCR) involve the user holding still, so the
|
|
142
|
+
// OS screen-timeout would otherwise dim and lock the device mid-session.
|
|
143
|
+
activateScreenKeepAwake();
|
|
144
|
+
|
|
145
|
+
sdk.attachView({
|
|
146
|
+
setLoading: (text) => setState((s) => ({ ...s, loading: text })),
|
|
147
|
+
setStepNode: (node) => setState((s) => ({ ...s, stepNode: node })),
|
|
148
|
+
setError: (err) => {
|
|
149
|
+
setState((s) => ({ ...s, error: err, loading: null, stepNode: null }));
|
|
150
|
+
setProgressHidden(true);
|
|
151
|
+
onFailRef.current?.(err);
|
|
152
|
+
},
|
|
153
|
+
setResult: (result) => {
|
|
154
|
+
setState((s) => ({ ...s, result, loading: null, stepNode: null }));
|
|
155
|
+
setProgress(PROGRESS_BAR.complete());
|
|
156
|
+
// Fade after a small delay so the "100%" jump is visible.
|
|
157
|
+
setTimeout(() => setProgressHidden(true), 400);
|
|
158
|
+
onCompleteRef.current?.(result);
|
|
159
|
+
},
|
|
160
|
+
setExit: (exit) => {
|
|
161
|
+
// User backed out of the first step: blank the surface (no overlay, no
|
|
162
|
+
// result) and let the host dismiss the screen via onExit.
|
|
163
|
+
setState((s) => ({
|
|
164
|
+
...s,
|
|
165
|
+
exited: true,
|
|
166
|
+
loading: null,
|
|
167
|
+
stepNode: null,
|
|
168
|
+
error: null,
|
|
169
|
+
result: null,
|
|
170
|
+
}));
|
|
171
|
+
setProgressHidden(true);
|
|
172
|
+
onExitRef.current?.(exit);
|
|
173
|
+
},
|
|
174
|
+
});
|
|
175
|
+
|
|
176
|
+
const unsubStepChange = sdk.on('step:change', () => {
|
|
177
|
+
setProgress((curr) => PROGRESS_BAR.tick(curr));
|
|
178
|
+
});
|
|
179
|
+
|
|
180
|
+
void sdk.start();
|
|
181
|
+
|
|
182
|
+
return () => {
|
|
183
|
+
unsubStepChange();
|
|
184
|
+
sdk.detachView();
|
|
185
|
+
sdk.destroy();
|
|
186
|
+
deactivateScreenKeepAwake();
|
|
187
|
+
};
|
|
188
|
+
}, [sdk]);
|
|
189
|
+
|
|
190
|
+
const renderBody = useCallback((): ReactNode => {
|
|
191
|
+
if (state.error) {
|
|
192
|
+
return (
|
|
193
|
+
<View style={styles.message}>
|
|
194
|
+
<Text style={[styles.title, { color: theme.errorColor }]}>
|
|
195
|
+
{state.error.declineTitle ?? t.result.declineHeadline}
|
|
196
|
+
</Text>
|
|
197
|
+
<Text style={[styles.body, { color: theme.textColor }]}>
|
|
198
|
+
{state.error.declineMessage ?? state.error.message}
|
|
199
|
+
</Text>
|
|
200
|
+
</View>
|
|
201
|
+
);
|
|
202
|
+
}
|
|
203
|
+
if (state.result) {
|
|
204
|
+
const status = state.result.status;
|
|
205
|
+
let title = t.result.approvedTitle;
|
|
206
|
+
let body = t.result.approvedBody;
|
|
207
|
+
if (status === 'MANUAL_REVIEW') {
|
|
208
|
+
title = t.result.manualReviewTitle;
|
|
209
|
+
body = t.result.manualReviewBody;
|
|
210
|
+
} else if (status === 'REJECTED' || status === 'DECLINED') {
|
|
211
|
+
title = t.result.rejectedTitle;
|
|
212
|
+
body = t.result.rejectedBody;
|
|
213
|
+
}
|
|
214
|
+
return (
|
|
215
|
+
<View style={styles.message}>
|
|
216
|
+
<Text style={[styles.title, { color: theme.textColor }]}>{title}</Text>
|
|
217
|
+
<Text style={[styles.body, { color: theme.textSecondaryColor }]}>
|
|
218
|
+
{body}
|
|
219
|
+
</Text>
|
|
220
|
+
</View>
|
|
221
|
+
);
|
|
222
|
+
}
|
|
223
|
+
if (state.stepNode) {
|
|
224
|
+
return state.stepNode;
|
|
225
|
+
}
|
|
226
|
+
return null;
|
|
227
|
+
}, [state, theme, t]);
|
|
228
|
+
|
|
229
|
+
const showLoadingOverlay =
|
|
230
|
+
!state.error && !state.result && !state.stepNode && !state.exited;
|
|
231
|
+
const loadingText = state.loading ?? t.common.loading;
|
|
232
|
+
// Progress bar is shown unless EITHER `config.showProgressBar === false`
|
|
233
|
+
// OR `theme.hideProgressBar === true`. Both paths exist for parity with
|
|
234
|
+
// `hideStepIcons` (theme-side) and for hosts that already wire the
|
|
235
|
+
// legacy `showProgressBar` flag (config-side).
|
|
236
|
+
const showProgress =
|
|
237
|
+
config.showProgressBar !== false && !theme.hideProgressBar;
|
|
238
|
+
|
|
239
|
+
return (
|
|
240
|
+
<View style={[styles.root, { backgroundColor: theme.backgroundColor }]}>
|
|
241
|
+
{/* Content fills the screen edge-to-edge so camera / map steps stay
|
|
242
|
+
full-bleed. The progress bar floats on top, pushed below the top
|
|
243
|
+
safe-area inset (status bar / notch / punch-hole). Form steps offset
|
|
244
|
+
their own header via StepShell, and camera steps offset their chrome
|
|
245
|
+
internally — so we never inset the content container here. */}
|
|
246
|
+
<View style={styles.content}>{renderBody()}</View>
|
|
247
|
+
{showProgress ? (
|
|
248
|
+
<View
|
|
249
|
+
pointerEvents="none"
|
|
250
|
+
style={[styles.progressOverlay, { paddingTop: insets.top }]}
|
|
251
|
+
>
|
|
252
|
+
<ProgressBar value={progress} hidden={progressHidden} />
|
|
253
|
+
</View>
|
|
254
|
+
) : null}
|
|
255
|
+
{showLoadingOverlay ? <LoadingOverlay message={loadingText} /> : null}
|
|
256
|
+
</View>
|
|
257
|
+
);
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
const styles = StyleSheet.create({
|
|
261
|
+
root: {
|
|
262
|
+
flex: 1,
|
|
263
|
+
},
|
|
264
|
+
content: {
|
|
265
|
+
flex: 1,
|
|
266
|
+
overflow: 'hidden',
|
|
267
|
+
},
|
|
268
|
+
progressOverlay: {
|
|
269
|
+
position: 'absolute',
|
|
270
|
+
top: 0,
|
|
271
|
+
left: 0,
|
|
272
|
+
right: 0,
|
|
273
|
+
},
|
|
274
|
+
message: {
|
|
275
|
+
flex: 1,
|
|
276
|
+
alignItems: 'center',
|
|
277
|
+
justifyContent: 'center',
|
|
278
|
+
paddingHorizontal: 24,
|
|
279
|
+
gap: 12,
|
|
280
|
+
},
|
|
281
|
+
title: {
|
|
282
|
+
fontSize: 20,
|
|
283
|
+
fontWeight: '600',
|
|
284
|
+
textAlign: 'center',
|
|
285
|
+
},
|
|
286
|
+
body: {
|
|
287
|
+
fontSize: 15,
|
|
288
|
+
lineHeight: 22,
|
|
289
|
+
textAlign: 'center',
|
|
290
|
+
maxWidth: 360,
|
|
291
|
+
},
|
|
292
|
+
});
|
|
293
|
+
|
|
294
|
+
// Type tag used so consumers can identify the step that triggered an event.
|
|
295
|
+
// Currently unused but kept here so future adapters (e.g. analytics wrappers)
|
|
296
|
+
// can hook into orchestrator events without re-exporting types.
|
|
297
|
+
export type { OnboardingStep };
|