@proteoapp/react-native-onboarding 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +16 -0
- package/README.md +294 -0
- package/assets/svgs/arrow-right.tsx +13 -0
- package/assets/svgs/back-document-circle.tsx +14 -0
- package/assets/svgs/camera-error-circle.tsx +47 -0
- package/assets/svgs/camera-plus.tsx +13 -0
- package/assets/svgs/checklist-circle.tsx +93 -0
- package/assets/svgs/clock-circle.tsx +40 -0
- package/assets/svgs/document-2.tsx +31 -0
- package/assets/svgs/document-avatar.tsx +148 -0
- package/assets/svgs/document-camera-overlay.tsx +52 -0
- package/assets/svgs/document-circle.tsx +14 -0
- package/assets/svgs/document.tsx +13 -0
- package/assets/svgs/face-auth-avatar.tsx +135 -0
- package/assets/svgs/face-auth-camera-overlay.tsx +51 -0
- package/assets/svgs/face-id-circle.tsx +16 -0
- package/assets/svgs/face-id-error.tsx +40 -0
- package/assets/svgs/face-id.tsx +13 -0
- package/assets/svgs/index.ts +24 -0
- package/assets/svgs/location-error-circle.tsx +61 -0
- package/assets/svgs/process-finished.tsx +40 -0
- package/assets/svgs/refresh.tsx +13 -0
- package/assets/svgs/shield-check-circle.tsx +13 -0
- package/assets/svgs/thumb-up.tsx +37 -0
- package/assets/svgs/upload.tsx +13 -0
- package/assets/svgs/x-error-circle.tsx +40 -0
- package/assets/svgs/x.tsx +13 -0
- package/lib/module/app.js +12 -0
- package/lib/module/app.js.map +1 -0
- package/lib/module/components/button.js +43 -0
- package/lib/module/components/button.js.map +1 -0
- package/lib/module/components/centered-loading.js +17 -0
- package/lib/module/components/centered-loading.js.map +1 -0
- package/lib/module/components/default-error-fallback.js +28 -0
- package/lib/module/components/default-error-fallback.js.map +1 -0
- package/lib/module/components/default-loading.js +32 -0
- package/lib/module/components/default-loading.js.map +1 -0
- package/lib/module/components/description-loading.js +42 -0
- package/lib/module/components/description-loading.js.map +1 -0
- package/lib/module/components/error-fallback.js +57 -0
- package/lib/module/components/error-fallback.js.map +1 -0
- package/lib/module/components/identification-error.js +41 -0
- package/lib/module/components/identification-error.js.map +1 -0
- package/lib/module/components/index.js +13 -0
- package/lib/module/components/index.js.map +1 -0
- package/lib/module/components/loading.js +43 -0
- package/lib/module/components/loading.js.map +1 -0
- package/lib/module/components/progress-indicator.js +45 -0
- package/lib/module/components/progress-indicator.js.map +1 -0
- package/lib/module/components/recommended-validations.js +82 -0
- package/lib/module/components/recommended-validations.js.map +1 -0
- package/lib/module/constants/camera-error-messages.js +11 -0
- package/lib/module/constants/camera-error-messages.js.map +1 -0
- package/lib/module/constants/environments.js +35 -0
- package/lib/module/constants/environments.js.map +1 -0
- package/lib/module/constants/error-header-fields.js +31 -0
- package/lib/module/constants/error-header-fields.js.map +1 -0
- package/lib/module/constants/image-type-references.js +10 -0
- package/lib/module/constants/image-type-references.js.map +1 -0
- package/lib/module/constants/index.js +11 -0
- package/lib/module/constants/index.js.map +1 -0
- package/lib/module/constants/progress-steps.js +11 -0
- package/lib/module/constants/progress-steps.js.map +1 -0
- package/lib/module/constants/route-step-index-descriptions.js +15 -0
- package/lib/module/constants/route-step-index-descriptions.js.map +1 -0
- package/lib/module/constants/route-step-indexes.js +13 -0
- package/lib/module/constants/route-step-indexes.js.map +1 -0
- package/lib/module/constants/routes-need-alter-status.js +8 -0
- package/lib/module/constants/routes-need-alter-status.js.map +1 -0
- package/lib/module/enums/document-type.js +9 -0
- package/lib/module/enums/document-type.js.map +1 -0
- package/lib/module/enums/image-type.js +10 -0
- package/lib/module/enums/image-type.js.map +1 -0
- package/lib/module/enums/index.js +10 -0
- package/lib/module/enums/index.js.map +1 -0
- package/lib/module/enums/objective.js +8 -0
- package/lib/module/enums/objective.js.map +1 -0
- package/lib/module/enums/process-status.js +10 -0
- package/lib/module/enums/process-status.js.map +1 -0
- package/lib/module/enums/request-status.js +12 -0
- package/lib/module/enums/request-status.js.map +1 -0
- package/lib/module/enums/timeline-status.js +10 -0
- package/lib/module/enums/timeline-status.js.map +1 -0
- package/lib/module/enums/validation-status.js +9 -0
- package/lib/module/enums/validation-status.js.map +1 -0
- package/lib/module/errors/camera-permission-denied.js +9 -0
- package/lib/module/errors/camera-permission-denied.js.map +1 -0
- package/lib/module/errors/camera-problem.js +9 -0
- package/lib/module/errors/camera-problem.js.map +1 -0
- package/lib/module/errors/contact-support.js +10 -0
- package/lib/module/errors/contact-support.js.map +1 -0
- package/lib/module/errors/geolocation-permission-denied.js +9 -0
- package/lib/module/errors/geolocation-permission-denied.js.map +1 -0
- package/lib/module/errors/index.js +9 -0
- package/lib/module/errors/index.js.map +1 -0
- package/lib/module/errors/non-standard-hours.js +10 -0
- package/lib/module/errors/non-standard-hours.js.map +1 -0
- package/lib/module/errors/process-already-completed.js +10 -0
- package/lib/module/errors/process-already-completed.js.map +1 -0
- package/lib/module/hooks/index.js +16 -0
- package/lib/module/hooks/index.js.map +1 -0
- package/lib/module/hooks/use-button.js +18 -0
- package/lib/module/hooks/use-button.js.map +1 -0
- package/lib/module/hooks/use-camera.js +97 -0
- package/lib/module/hooks/use-camera.js.map +1 -0
- package/lib/module/hooks/use-description-loading.js +19 -0
- package/lib/module/hooks/use-description-loading.js.map +1 -0
- package/lib/module/hooks/use-error-fallback.js +37 -0
- package/lib/module/hooks/use-error-fallback.js.map +1 -0
- package/lib/module/hooks/use-identification-error.js +15 -0
- package/lib/module/hooks/use-identification-error.js.map +1 -0
- package/lib/module/hooks/use-loading.js +39 -0
- package/lib/module/hooks/use-loading.js.map +1 -0
- package/lib/module/hooks/use-onboarding-channel.js +78 -0
- package/lib/module/hooks/use-onboarding-channel.js.map +1 -0
- package/lib/module/hooks/use-process-status.js +69 -0
- package/lib/module/hooks/use-process-status.js.map +1 -0
- package/lib/module/hooks/use-process-timeline.js +103 -0
- package/lib/module/hooks/use-process-timeline.js.map +1 -0
- package/lib/module/hooks/use-progress-indicator.js +47 -0
- package/lib/module/hooks/use-progress-indicator.js.map +1 -0
- package/lib/module/hooks/use-recommended-validations.js +37 -0
- package/lib/module/hooks/use-recommended-validations.js.map +1 -0
- package/lib/module/hooks/use-rekognition.js +35 -0
- package/lib/module/hooks/use-rekognition.js.map +1 -0
- package/lib/module/hooks/use-s3.js +94 -0
- package/lib/module/hooks/use-s3.js.map +1 -0
- package/lib/module/index.js +25 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/layouts/index.js +4 -0
- package/lib/module/layouts/index.js.map +1 -0
- package/lib/module/layouts/root/index.js +15 -0
- package/lib/module/layouts/root/index.js.map +1 -0
- package/lib/module/layouts/root/view-model.js +14 -0
- package/lib/module/layouts/root/view-model.js.map +1 -0
- package/lib/module/layouts/root/view.js +30 -0
- package/lib/module/layouts/root/view.js.map +1 -0
- package/lib/module/navigation/index.js +50 -0
- package/lib/module/navigation/index.js.map +1 -0
- package/lib/module/package.json +1 -0
- package/lib/module/screens/document/analysis/index.js +12 -0
- package/lib/module/screens/document/analysis/index.js.map +1 -0
- package/lib/module/screens/document/analysis/view-model.js +81 -0
- package/lib/module/screens/document/analysis/view-model.js.map +1 -0
- package/lib/module/screens/document/analysis/view.js +18 -0
- package/lib/module/screens/document/analysis/view.js.map +1 -0
- package/lib/module/screens/document/camera/index.js +12 -0
- package/lib/module/screens/document/camera/index.js.map +1 -0
- package/lib/module/screens/document/camera/view-model.js +377 -0
- package/lib/module/screens/document/camera/view-model.js.map +1 -0
- package/lib/module/screens/document/camera/view.js +191 -0
- package/lib/module/screens/document/camera/view.js.map +1 -0
- package/lib/module/screens/document/index.js +12 -0
- package/lib/module/screens/document/index.js.map +1 -0
- package/lib/module/screens/document/review/index.js +12 -0
- package/lib/module/screens/document/review/index.js.map +1 -0
- package/lib/module/screens/document/review/view-model.js +68 -0
- package/lib/module/screens/document/review/view-model.js.map +1 -0
- package/lib/module/screens/document/review/view.js +69 -0
- package/lib/module/screens/document/review/view.js.map +1 -0
- package/lib/module/screens/document/view-model.js +27 -0
- package/lib/module/screens/document/view-model.js.map +1 -0
- package/lib/module/screens/document/view.js +69 -0
- package/lib/module/screens/document/view.js.map +1 -0
- package/lib/module/screens/face-auth/analysis/index.js +12 -0
- package/lib/module/screens/face-auth/analysis/index.js.map +1 -0
- package/lib/module/screens/face-auth/analysis/view-model.js +147 -0
- package/lib/module/screens/face-auth/analysis/view-model.js.map +1 -0
- package/lib/module/screens/face-auth/analysis/view.js +25 -0
- package/lib/module/screens/face-auth/analysis/view.js.map +1 -0
- package/lib/module/screens/face-auth/camera/index.js +12 -0
- package/lib/module/screens/face-auth/camera/index.js.map +1 -0
- package/lib/module/screens/face-auth/camera/overlay.js +26 -0
- package/lib/module/screens/face-auth/camera/overlay.js.map +1 -0
- package/lib/module/screens/face-auth/camera/view-model.js +324 -0
- package/lib/module/screens/face-auth/camera/view-model.js.map +1 -0
- package/lib/module/screens/face-auth/camera/view.js +119 -0
- package/lib/module/screens/face-auth/camera/view.js.map +1 -0
- package/lib/module/screens/face-auth/index.js +12 -0
- package/lib/module/screens/face-auth/index.js.map +1 -0
- package/lib/module/screens/face-auth/view-model.js +23 -0
- package/lib/module/screens/face-auth/view-model.js.map +1 -0
- package/lib/module/screens/face-auth/view.js +50 -0
- package/lib/module/screens/face-auth/view.js.map +1 -0
- package/lib/module/screens/index.js +11 -0
- package/lib/module/screens/index.js.map +1 -0
- package/lib/module/screens/process-finished/index.js +12 -0
- package/lib/module/screens/process-finished/index.js.map +1 -0
- package/lib/module/screens/process-finished/view-model.js +18 -0
- package/lib/module/screens/process-finished/view-model.js.map +1 -0
- package/lib/module/screens/process-finished/view.js +32 -0
- package/lib/module/screens/process-finished/view.js.map +1 -0
- package/lib/module/services/api.js +31 -0
- package/lib/module/services/api.js.map +1 -0
- package/lib/module/services/credentials/generate.js +25 -0
- package/lib/module/services/credentials/generate.js.map +1 -0
- package/lib/module/services/credentials/index.js +4 -0
- package/lib/module/services/credentials/index.js.map +1 -0
- package/lib/module/services/documents/index.js +5 -0
- package/lib/module/services/documents/index.js.map +1 -0
- package/lib/module/services/documents/validate-pdf.js +33 -0
- package/lib/module/services/documents/validate-pdf.js.map +1 -0
- package/lib/module/services/documents/validate-picture.js +31 -0
- package/lib/module/services/documents/validate-picture.js.map +1 -0
- package/lib/module/services/index.js +8 -0
- package/lib/module/services/index.js.map +1 -0
- package/lib/module/services/location/get-from-user-ip.js +19 -0
- package/lib/module/services/location/get-from-user-ip.js.map +1 -0
- package/lib/module/services/location/index.js +4 -0
- package/lib/module/services/location/index.js.map +1 -0
- package/lib/module/services/onboarding/create-channel.js +24 -0
- package/lib/module/services/onboarding/create-channel.js.map +1 -0
- package/lib/module/services/onboarding/index.js +4 -0
- package/lib/module/services/onboarding/index.js.map +1 -0
- package/lib/module/services/process/alter-status.js +30 -0
- package/lib/module/services/process/alter-status.js.map +1 -0
- package/lib/module/services/process/create-error-log.js +21 -0
- package/lib/module/services/process/create-error-log.js.map +1 -0
- package/lib/module/services/process/create-timeline.js +41 -0
- package/lib/module/services/process/create-timeline.js.map +1 -0
- package/lib/module/services/process/done.js +54 -0
- package/lib/module/services/process/done.js.map +1 -0
- package/lib/module/services/process/generate-data.js +25 -0
- package/lib/module/services/process/generate-data.js.map +1 -0
- package/lib/module/services/process/index.js +9 -0
- package/lib/module/services/process/index.js.map +1 -0
- package/lib/module/services/process/start.js +40 -0
- package/lib/module/services/process/start.js.map +1 -0
- package/lib/module/store/env-variables.js +20 -0
- package/lib/module/store/env-variables.js.map +1 -0
- package/lib/module/store/flow.js +35 -0
- package/lib/module/store/flow.js.map +1 -0
- package/lib/module/store/index.js +7 -0
- package/lib/module/store/index.js.map +1 -0
- package/lib/module/store/process-timeline-queue.js +14 -0
- package/lib/module/store/process-timeline-queue.js.map +1 -0
- package/lib/module/store/process.js +31 -0
- package/lib/module/store/process.js.map +1 -0
- package/lib/module/theme/border-radius.js +9 -0
- package/lib/module/theme/border-radius.js.map +1 -0
- package/lib/module/theme/button-variants.js +19 -0
- package/lib/module/theme/button-variants.js.map +1 -0
- package/lib/module/theme/common-colors.js +15 -0
- package/lib/module/theme/common-colors.js.map +1 -0
- package/lib/module/theme/default-colors.js +7 -0
- package/lib/module/theme/default-colors.js.map +1 -0
- package/lib/module/theme/index.js +21 -0
- package/lib/module/theme/index.js.map +1 -0
- package/lib/module/theme/spacing.js +14 -0
- package/lib/module/theme/spacing.js.map +1 -0
- package/lib/module/theme/text-variants.js +17 -0
- package/lib/module/theme/text-variants.js.map +1 -0
- package/lib/module/utils/get-error-metadata.js +26 -0
- package/lib/module/utils/get-error-metadata.js.map +1 -0
- package/lib/module/utils/get-route-step.js +12 -0
- package/lib/module/utils/get-route-step.js.map +1 -0
- package/lib/module/utils/index.js +5 -0
- package/lib/module/utils/index.js.map +1 -0
- package/lib/module/view-model.js +167 -0
- package/lib/module/view-model.js.map +1 -0
- package/lib/module/view.js +45 -0
- package/lib/module/view.js.map +1 -0
- package/lib/typescript/assets/svgs/arrow-right.d.ts +3 -0
- package/lib/typescript/assets/svgs/arrow-right.d.ts.map +1 -0
- package/lib/typescript/assets/svgs/back-document-circle.d.ts +3 -0
- package/lib/typescript/assets/svgs/back-document-circle.d.ts.map +1 -0
- package/lib/typescript/assets/svgs/camera-error-circle.d.ts +7 -0
- package/lib/typescript/assets/svgs/camera-error-circle.d.ts.map +1 -0
- package/lib/typescript/assets/svgs/camera-plus.d.ts +3 -0
- package/lib/typescript/assets/svgs/camera-plus.d.ts.map +1 -0
- package/lib/typescript/assets/svgs/checklist-circle.d.ts +3 -0
- package/lib/typescript/assets/svgs/checklist-circle.d.ts.map +1 -0
- package/lib/typescript/assets/svgs/clock-circle.d.ts +7 -0
- package/lib/typescript/assets/svgs/clock-circle.d.ts.map +1 -0
- package/lib/typescript/assets/svgs/document-2.d.ts +3 -0
- package/lib/typescript/assets/svgs/document-2.d.ts.map +1 -0
- package/lib/typescript/assets/svgs/document-avatar.d.ts +3 -0
- package/lib/typescript/assets/svgs/document-avatar.d.ts.map +1 -0
- package/lib/typescript/assets/svgs/document-camera-overlay.d.ts +11 -0
- package/lib/typescript/assets/svgs/document-camera-overlay.d.ts.map +1 -0
- package/lib/typescript/assets/svgs/document-circle.d.ts +3 -0
- package/lib/typescript/assets/svgs/document-circle.d.ts.map +1 -0
- package/lib/typescript/assets/svgs/document.d.ts +3 -0
- package/lib/typescript/assets/svgs/document.d.ts.map +1 -0
- package/lib/typescript/assets/svgs/face-auth-avatar.d.ts +3 -0
- package/lib/typescript/assets/svgs/face-auth-avatar.d.ts.map +1 -0
- package/lib/typescript/assets/svgs/face-auth-camera-overlay.d.ts +11 -0
- package/lib/typescript/assets/svgs/face-auth-camera-overlay.d.ts.map +1 -0
- package/lib/typescript/assets/svgs/face-id-circle.d.ts +3 -0
- package/lib/typescript/assets/svgs/face-id-circle.d.ts.map +1 -0
- package/lib/typescript/assets/svgs/face-id-error.d.ts +7 -0
- package/lib/typescript/assets/svgs/face-id-error.d.ts.map +1 -0
- package/lib/typescript/assets/svgs/face-id.d.ts +3 -0
- package/lib/typescript/assets/svgs/face-id.d.ts.map +1 -0
- package/lib/typescript/assets/svgs/index.d.ts +25 -0
- package/lib/typescript/assets/svgs/index.d.ts.map +1 -0
- package/lib/typescript/assets/svgs/location-error-circle.d.ts +7 -0
- package/lib/typescript/assets/svgs/location-error-circle.d.ts.map +1 -0
- package/lib/typescript/assets/svgs/process-finished.d.ts +7 -0
- package/lib/typescript/assets/svgs/process-finished.d.ts.map +1 -0
- package/lib/typescript/assets/svgs/refresh.d.ts +3 -0
- package/lib/typescript/assets/svgs/refresh.d.ts.map +1 -0
- package/lib/typescript/assets/svgs/shield-check-circle.d.ts +3 -0
- package/lib/typescript/assets/svgs/shield-check-circle.d.ts.map +1 -0
- package/lib/typescript/assets/svgs/thumb-up.d.ts +7 -0
- package/lib/typescript/assets/svgs/thumb-up.d.ts.map +1 -0
- package/lib/typescript/assets/svgs/upload.d.ts +3 -0
- package/lib/typescript/assets/svgs/upload.d.ts.map +1 -0
- package/lib/typescript/assets/svgs/x-error-circle.d.ts +7 -0
- package/lib/typescript/assets/svgs/x-error-circle.d.ts.map +1 -0
- package/lib/typescript/assets/svgs/x.d.ts +3 -0
- package/lib/typescript/assets/svgs/x.d.ts.map +1 -0
- package/lib/typescript/eslint.config.d.mts +3 -0
- package/lib/typescript/eslint.config.d.mts.map +1 -0
- package/lib/typescript/package.json +1 -0
- package/lib/typescript/src/app.d.ts +3 -0
- package/lib/typescript/src/app.d.ts.map +1 -0
- package/lib/typescript/src/components/button.d.ts +15 -0
- package/lib/typescript/src/components/button.d.ts.map +1 -0
- package/lib/typescript/src/components/centered-loading.d.ts +3 -0
- package/lib/typescript/src/components/centered-loading.d.ts.map +1 -0
- package/lib/typescript/src/components/default-error-fallback.d.ts +6 -0
- package/lib/typescript/src/components/default-error-fallback.d.ts.map +1 -0
- package/lib/typescript/src/components/default-loading.d.ts +7 -0
- package/lib/typescript/src/components/default-loading.d.ts.map +1 -0
- package/lib/typescript/src/components/description-loading.d.ts +10 -0
- package/lib/typescript/src/components/description-loading.d.ts.map +1 -0
- package/lib/typescript/src/components/error-fallback.d.ts +5 -0
- package/lib/typescript/src/components/error-fallback.d.ts.map +1 -0
- package/lib/typescript/src/components/identification-error.d.ts +11 -0
- package/lib/typescript/src/components/identification-error.d.ts.map +1 -0
- package/lib/typescript/src/components/index.d.ts +11 -0
- package/lib/typescript/src/components/index.d.ts.map +1 -0
- package/lib/typescript/src/components/loading.d.ts +7 -0
- package/lib/typescript/src/components/loading.d.ts.map +1 -0
- package/lib/typescript/src/components/progress-indicator.d.ts +8 -0
- package/lib/typescript/src/components/progress-indicator.d.ts.map +1 -0
- package/lib/typescript/src/components/recommended-validations.d.ts +18 -0
- package/lib/typescript/src/components/recommended-validations.d.ts.map +1 -0
- package/lib/typescript/src/constants/camera-error-messages.d.ts +4 -0
- package/lib/typescript/src/constants/camera-error-messages.d.ts.map +1 -0
- package/lib/typescript/src/constants/environments.d.ts +33 -0
- package/lib/typescript/src/constants/environments.d.ts.map +1 -0
- package/lib/typescript/src/constants/error-header-fields.d.ts +40 -0
- package/lib/typescript/src/constants/error-header-fields.d.ts.map +1 -0
- package/lib/typescript/src/constants/image-type-references.d.ts +3 -0
- package/lib/typescript/src/constants/image-type-references.d.ts.map +1 -0
- package/lib/typescript/src/constants/index.d.ts +9 -0
- package/lib/typescript/src/constants/index.d.ts.map +1 -0
- package/lib/typescript/src/constants/progress-steps.d.ts +8 -0
- package/lib/typescript/src/constants/progress-steps.d.ts.map +1 -0
- package/lib/typescript/src/constants/route-step-index-descriptions.d.ts +3 -0
- package/lib/typescript/src/constants/route-step-index-descriptions.d.ts.map +1 -0
- package/lib/typescript/src/constants/route-step-indexes.d.ts +8 -0
- package/lib/typescript/src/constants/route-step-indexes.d.ts.map +1 -0
- package/lib/typescript/src/constants/routes-need-alter-status.d.ts +4 -0
- package/lib/typescript/src/constants/routes-need-alter-status.d.ts.map +1 -0
- package/lib/typescript/src/enums/document-type.d.ts +6 -0
- package/lib/typescript/src/enums/document-type.d.ts.map +1 -0
- package/lib/typescript/src/enums/image-type.d.ts +7 -0
- package/lib/typescript/src/enums/image-type.d.ts.map +1 -0
- package/lib/typescript/src/enums/index.d.ts +8 -0
- package/lib/typescript/src/enums/index.d.ts.map +1 -0
- package/lib/typescript/src/enums/objective.d.ts +5 -0
- package/lib/typescript/src/enums/objective.d.ts.map +1 -0
- package/lib/typescript/src/enums/process-status.d.ts +7 -0
- package/lib/typescript/src/enums/process-status.d.ts.map +1 -0
- package/lib/typescript/src/enums/request-status.d.ts +9 -0
- package/lib/typescript/src/enums/request-status.d.ts.map +1 -0
- package/lib/typescript/src/enums/timeline-status.d.ts +7 -0
- package/lib/typescript/src/enums/timeline-status.d.ts.map +1 -0
- package/lib/typescript/src/enums/validation-status.d.ts +6 -0
- package/lib/typescript/src/enums/validation-status.d.ts.map +1 -0
- package/lib/typescript/src/errors/camera-permission-denied.d.ts +4 -0
- package/lib/typescript/src/errors/camera-permission-denied.d.ts.map +1 -0
- package/lib/typescript/src/errors/camera-problem.d.ts +4 -0
- package/lib/typescript/src/errors/camera-problem.d.ts.map +1 -0
- package/lib/typescript/src/errors/contact-support.d.ts +5 -0
- package/lib/typescript/src/errors/contact-support.d.ts.map +1 -0
- package/lib/typescript/src/errors/geolocation-permission-denied.d.ts +4 -0
- package/lib/typescript/src/errors/geolocation-permission-denied.d.ts.map +1 -0
- package/lib/typescript/src/errors/index.d.ts +7 -0
- package/lib/typescript/src/errors/index.d.ts.map +1 -0
- package/lib/typescript/src/errors/non-standard-hours.d.ts +5 -0
- package/lib/typescript/src/errors/non-standard-hours.d.ts.map +1 -0
- package/lib/typescript/src/errors/process-already-completed.d.ts +5 -0
- package/lib/typescript/src/errors/process-already-completed.d.ts.map +1 -0
- package/lib/typescript/src/hooks/index.d.ts +14 -0
- package/lib/typescript/src/hooks/index.d.ts.map +1 -0
- package/lib/typescript/src/hooks/use-button.d.ts +12 -0
- package/lib/typescript/src/hooks/use-button.d.ts.map +1 -0
- package/lib/typescript/src/hooks/use-camera.d.ts +13 -0
- package/lib/typescript/src/hooks/use-camera.d.ts.map +1 -0
- package/lib/typescript/src/hooks/use-description-loading.d.ts +17 -0
- package/lib/typescript/src/hooks/use-description-loading.d.ts.map +1 -0
- package/lib/typescript/src/hooks/use-error-fallback.d.ts +35 -0
- package/lib/typescript/src/hooks/use-error-fallback.d.ts.map +1 -0
- package/lib/typescript/src/hooks/use-identification-error.d.ts +9 -0
- package/lib/typescript/src/hooks/use-identification-error.d.ts.map +1 -0
- package/lib/typescript/src/hooks/use-loading.d.ts +14 -0
- package/lib/typescript/src/hooks/use-loading.d.ts.map +1 -0
- package/lib/typescript/src/hooks/use-onboarding-channel.d.ts +9 -0
- package/lib/typescript/src/hooks/use-onboarding-channel.d.ts.map +1 -0
- package/lib/typescript/src/hooks/use-process-status.d.ts +7 -0
- package/lib/typescript/src/hooks/use-process-status.d.ts.map +1 -0
- package/lib/typescript/src/hooks/use-process-timeline.d.ts +14 -0
- package/lib/typescript/src/hooks/use-process-timeline.d.ts.map +1 -0
- package/lib/typescript/src/hooks/use-progress-indicator.d.ts +12 -0
- package/lib/typescript/src/hooks/use-progress-indicator.d.ts.map +1 -0
- package/lib/typescript/src/hooks/use-recommended-validations.d.ts +9 -0
- package/lib/typescript/src/hooks/use-recommended-validations.d.ts.map +1 -0
- package/lib/typescript/src/hooks/use-rekognition.d.ts +4 -0
- package/lib/typescript/src/hooks/use-rekognition.d.ts.map +1 -0
- package/lib/typescript/src/hooks/use-s3.d.ts +6 -0
- package/lib/typescript/src/hooks/use-s3.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +12 -0
- package/lib/typescript/src/index.d.ts.map +1 -0
- package/lib/typescript/src/layouts/index.d.ts +2 -0
- package/lib/typescript/src/layouts/index.d.ts.map +1 -0
- package/lib/typescript/src/layouts/root/index.d.ts +6 -0
- package/lib/typescript/src/layouts/root/index.d.ts.map +1 -0
- package/lib/typescript/src/layouts/root/view-model.d.ts +16 -0
- package/lib/typescript/src/layouts/root/view-model.d.ts.map +1 -0
- package/lib/typescript/src/layouts/root/view.d.ts +7 -0
- package/lib/typescript/src/layouts/root/view.d.ts.map +1 -0
- package/lib/typescript/src/navigation/index.d.ts +29 -0
- package/lib/typescript/src/navigation/index.d.ts.map +1 -0
- package/lib/typescript/src/screens/document/analysis/index.d.ts +2 -0
- package/lib/typescript/src/screens/document/analysis/index.d.ts.map +1 -0
- package/lib/typescript/src/screens/document/analysis/view-model.d.ts +16 -0
- package/lib/typescript/src/screens/document/analysis/view-model.d.ts.map +1 -0
- package/lib/typescript/src/screens/document/analysis/view.d.ts +5 -0
- package/lib/typescript/src/screens/document/analysis/view.d.ts.map +1 -0
- package/lib/typescript/src/screens/document/camera/index.d.ts +2 -0
- package/lib/typescript/src/screens/document/camera/index.d.ts.map +1 -0
- package/lib/typescript/src/screens/document/camera/view-model.d.ts +63 -0
- package/lib/typescript/src/screens/document/camera/view-model.d.ts.map +1 -0
- package/lib/typescript/src/screens/document/camera/view.d.ts +5 -0
- package/lib/typescript/src/screens/document/camera/view.d.ts.map +1 -0
- package/lib/typescript/src/screens/document/index.d.ts +2 -0
- package/lib/typescript/src/screens/document/index.d.ts.map +1 -0
- package/lib/typescript/src/screens/document/review/index.d.ts +2 -0
- package/lib/typescript/src/screens/document/review/index.d.ts.map +1 -0
- package/lib/typescript/src/screens/document/review/view-model.d.ts +31 -0
- package/lib/typescript/src/screens/document/review/view-model.d.ts.map +1 -0
- package/lib/typescript/src/screens/document/review/view.d.ts +5 -0
- package/lib/typescript/src/screens/document/review/view.d.ts.map +1 -0
- package/lib/typescript/src/screens/document/view-model.d.ts +12 -0
- package/lib/typescript/src/screens/document/view-model.d.ts.map +1 -0
- package/lib/typescript/src/screens/document/view.d.ts +5 -0
- package/lib/typescript/src/screens/document/view.d.ts.map +1 -0
- package/lib/typescript/src/screens/face-auth/analysis/index.d.ts +2 -0
- package/lib/typescript/src/screens/face-auth/analysis/index.d.ts.map +1 -0
- package/lib/typescript/src/screens/face-auth/analysis/view-model.d.ts +26 -0
- package/lib/typescript/src/screens/face-auth/analysis/view-model.d.ts.map +1 -0
- package/lib/typescript/src/screens/face-auth/analysis/view.d.ts +5 -0
- package/lib/typescript/src/screens/face-auth/analysis/view.d.ts.map +1 -0
- package/lib/typescript/src/screens/face-auth/camera/index.d.ts +2 -0
- package/lib/typescript/src/screens/face-auth/camera/index.d.ts.map +1 -0
- package/lib/typescript/src/screens/face-auth/camera/overlay.d.ts +11 -0
- package/lib/typescript/src/screens/face-auth/camera/overlay.d.ts.map +1 -0
- package/lib/typescript/src/screens/face-auth/camera/view-model.d.ts +56 -0
- package/lib/typescript/src/screens/face-auth/camera/view-model.d.ts.map +1 -0
- package/lib/typescript/src/screens/face-auth/camera/view.d.ts +5 -0
- package/lib/typescript/src/screens/face-auth/camera/view.d.ts.map +1 -0
- package/lib/typescript/src/screens/face-auth/index.d.ts +2 -0
- package/lib/typescript/src/screens/face-auth/index.d.ts.map +1 -0
- package/lib/typescript/src/screens/face-auth/view-model.d.ts +17 -0
- package/lib/typescript/src/screens/face-auth/view-model.d.ts.map +1 -0
- package/lib/typescript/src/screens/face-auth/view.d.ts +5 -0
- package/lib/typescript/src/screens/face-auth/view.d.ts.map +1 -0
- package/lib/typescript/src/screens/index.d.ts +9 -0
- package/lib/typescript/src/screens/index.d.ts.map +1 -0
- package/lib/typescript/src/screens/process-finished/index.d.ts +2 -0
- package/lib/typescript/src/screens/process-finished/index.d.ts.map +1 -0
- package/lib/typescript/src/screens/process-finished/view-model.d.ts +4 -0
- package/lib/typescript/src/screens/process-finished/view-model.d.ts.map +1 -0
- package/lib/typescript/src/screens/process-finished/view.d.ts +5 -0
- package/lib/typescript/src/screens/process-finished/view.d.ts.map +1 -0
- package/lib/typescript/src/services/api.d.ts +5 -0
- package/lib/typescript/src/services/api.d.ts.map +1 -0
- package/lib/typescript/src/services/credentials/generate.d.ts +16 -0
- package/lib/typescript/src/services/credentials/generate.d.ts.map +1 -0
- package/lib/typescript/src/services/credentials/index.d.ts +2 -0
- package/lib/typescript/src/services/credentials/index.d.ts.map +1 -0
- package/lib/typescript/src/services/documents/index.d.ts +3 -0
- package/lib/typescript/src/services/documents/index.d.ts.map +1 -0
- package/lib/typescript/src/services/documents/validate-pdf.d.ts +10 -0
- package/lib/typescript/src/services/documents/validate-pdf.d.ts.map +1 -0
- package/lib/typescript/src/services/documents/validate-picture.d.ts +13 -0
- package/lib/typescript/src/services/documents/validate-picture.d.ts.map +1 -0
- package/lib/typescript/src/services/index.d.ts +6 -0
- package/lib/typescript/src/services/index.d.ts.map +1 -0
- package/lib/typescript/src/services/location/get-from-user-ip.d.ts +14 -0
- package/lib/typescript/src/services/location/get-from-user-ip.d.ts.map +1 -0
- package/lib/typescript/src/services/location/index.d.ts +2 -0
- package/lib/typescript/src/services/location/index.d.ts.map +1 -0
- package/lib/typescript/src/services/onboarding/create-channel.d.ts +16 -0
- package/lib/typescript/src/services/onboarding/create-channel.d.ts.map +1 -0
- package/lib/typescript/src/services/onboarding/index.d.ts +2 -0
- package/lib/typescript/src/services/onboarding/index.d.ts.map +1 -0
- package/lib/typescript/src/services/process/alter-status.d.ts +11 -0
- package/lib/typescript/src/services/process/alter-status.d.ts.map +1 -0
- package/lib/typescript/src/services/process/create-error-log.d.ts +7 -0
- package/lib/typescript/src/services/process/create-error-log.d.ts.map +1 -0
- package/lib/typescript/src/services/process/create-timeline.d.ts +23 -0
- package/lib/typescript/src/services/process/create-timeline.d.ts.map +1 -0
- package/lib/typescript/src/services/process/done.d.ts +35 -0
- package/lib/typescript/src/services/process/done.d.ts.map +1 -0
- package/lib/typescript/src/services/process/generate-data.d.ts +27 -0
- package/lib/typescript/src/services/process/generate-data.d.ts.map +1 -0
- package/lib/typescript/src/services/process/index.d.ts +7 -0
- package/lib/typescript/src/services/process/index.d.ts.map +1 -0
- package/lib/typescript/src/services/process/start.d.ts +33 -0
- package/lib/typescript/src/services/process/start.d.ts.map +1 -0
- package/lib/typescript/src/store/env-variables.d.ts +15 -0
- package/lib/typescript/src/store/env-variables.d.ts.map +1 -0
- package/lib/typescript/src/store/flow.d.ts +25 -0
- package/lib/typescript/src/store/flow.d.ts.map +1 -0
- package/lib/typescript/src/store/index.d.ts +5 -0
- package/lib/typescript/src/store/index.d.ts.map +1 -0
- package/lib/typescript/src/store/process-timeline-queue.d.ts +10 -0
- package/lib/typescript/src/store/process-timeline-queue.d.ts.map +1 -0
- package/lib/typescript/src/store/process.d.ts +26 -0
- package/lib/typescript/src/store/process.d.ts.map +1 -0
- package/lib/typescript/src/theme/border-radius.d.ts +7 -0
- package/lib/typescript/src/theme/border-radius.d.ts.map +1 -0
- package/lib/typescript/src/theme/button-variants.d.ts +17 -0
- package/lib/typescript/src/theme/button-variants.d.ts.map +1 -0
- package/lib/typescript/src/theme/common-colors.d.ts +13 -0
- package/lib/typescript/src/theme/common-colors.d.ts.map +1 -0
- package/lib/typescript/src/theme/default-colors.d.ts +5 -0
- package/lib/typescript/src/theme/default-colors.d.ts.map +1 -0
- package/lib/typescript/src/theme/index.d.ts +77 -0
- package/lib/typescript/src/theme/index.d.ts.map +1 -0
- package/lib/typescript/src/theme/spacing.d.ts +12 -0
- package/lib/typescript/src/theme/spacing.d.ts.map +1 -0
- package/lib/typescript/src/theme/text-variants.d.ts +15 -0
- package/lib/typescript/src/theme/text-variants.d.ts.map +1 -0
- package/lib/typescript/src/utils/get-error-metadata.d.ts +18 -0
- package/lib/typescript/src/utils/get-error-metadata.d.ts.map +1 -0
- package/lib/typescript/src/utils/get-route-step.d.ts +9 -0
- package/lib/typescript/src/utils/get-route-step.d.ts.map +1 -0
- package/lib/typescript/src/utils/index.d.ts +3 -0
- package/lib/typescript/src/utils/index.d.ts.map +1 -0
- package/lib/typescript/src/view-model.d.ts +84 -0
- package/lib/typescript/src/view-model.d.ts.map +1 -0
- package/lib/typescript/src/view.d.ts +5 -0
- package/lib/typescript/src/view.d.ts.map +1 -0
- package/package.json +200 -0
- package/src/app.tsx +9 -0
- package/src/components/button.tsx +70 -0
- package/src/components/centered-loading.tsx +11 -0
- package/src/components/default-error-fallback.tsx +26 -0
- package/src/components/default-loading.tsx +29 -0
- package/src/components/description-loading.tsx +32 -0
- package/src/components/error-fallback.tsx +55 -0
- package/src/components/identification-error.tsx +37 -0
- package/src/components/index.ts +10 -0
- package/src/components/loading.tsx +50 -0
- package/src/components/progress-indicator.tsx +46 -0
- package/src/components/recommended-validations.tsx +98 -0
- package/src/constants/camera-error-messages.ts +24 -0
- package/src/constants/environments.ts +35 -0
- package/src/constants/error-header-fields.ts +41 -0
- package/src/constants/image-type-references.ts +8 -0
- package/src/constants/index.ts +8 -0
- package/src/constants/progress-steps.ts +23 -0
- package/src/constants/route-step-index-descriptions.ts +14 -0
- package/src/constants/route-step-indexes.ts +20 -0
- package/src/constants/routes-need-alter-status.ts +8 -0
- package/src/enums/document-type.ts +5 -0
- package/src/enums/image-type.ts +6 -0
- package/src/enums/index.ts +7 -0
- package/src/enums/objective.ts +4 -0
- package/src/enums/process-status.ts +6 -0
- package/src/enums/request-status.ts +8 -0
- package/src/enums/timeline-status.ts +6 -0
- package/src/enums/validation-status.ts +5 -0
- package/src/errors/camera-permission-denied.ts +9 -0
- package/src/errors/camera-problem.ts +7 -0
- package/src/errors/contact-support.ts +10 -0
- package/src/errors/geolocation-permission-denied.ts +9 -0
- package/src/errors/index.ts +6 -0
- package/src/errors/non-standard-hours.ts +11 -0
- package/src/errors/process-already-completed.ts +10 -0
- package/src/hooks/index.ts +13 -0
- package/src/hooks/use-button.ts +22 -0
- package/src/hooks/use-camera.ts +131 -0
- package/src/hooks/use-description-loading.ts +19 -0
- package/src/hooks/use-error-fallback.ts +33 -0
- package/src/hooks/use-identification-error.ts +13 -0
- package/src/hooks/use-loading.ts +52 -0
- package/src/hooks/use-onboarding-channel.ts +115 -0
- package/src/hooks/use-process-status.ts +82 -0
- package/src/hooks/use-process-timeline.ts +155 -0
- package/src/hooks/use-progress-indicator.ts +51 -0
- package/src/hooks/use-recommended-validations.ts +52 -0
- package/src/hooks/use-rekognition.ts +41 -0
- package/src/hooks/use-s3.ts +113 -0
- package/src/index.tsx +31 -0
- package/src/layouts/index.ts +1 -0
- package/src/layouts/root/index.tsx +12 -0
- package/src/layouts/root/view-model.ts +13 -0
- package/src/layouts/root/view.tsx +24 -0
- package/src/navigation/index.tsx +92 -0
- package/src/screens/document/analysis/index.tsx +8 -0
- package/src/screens/document/analysis/view-model.ts +95 -0
- package/src/screens/document/analysis/view.tsx +20 -0
- package/src/screens/document/camera/index.tsx +8 -0
- package/src/screens/document/camera/view-model.ts +570 -0
- package/src/screens/document/camera/view.tsx +196 -0
- package/src/screens/document/index.tsx +8 -0
- package/src/screens/document/review/index.tsx +8 -0
- package/src/screens/document/review/view-model.ts +77 -0
- package/src/screens/document/review/view.tsx +69 -0
- package/src/screens/document/view-model.ts +29 -0
- package/src/screens/document/view.tsx +80 -0
- package/src/screens/face-auth/analysis/index.tsx +8 -0
- package/src/screens/face-auth/analysis/view-model.ts +200 -0
- package/src/screens/face-auth/analysis/view.tsx +31 -0
- package/src/screens/face-auth/camera/index.tsx +8 -0
- package/src/screens/face-auth/camera/overlay.tsx +31 -0
- package/src/screens/face-auth/camera/view-model.ts +462 -0
- package/src/screens/face-auth/camera/view.tsx +128 -0
- package/src/screens/face-auth/index.tsx +8 -0
- package/src/screens/face-auth/view-model.ts +25 -0
- package/src/screens/face-auth/view.tsx +51 -0
- package/src/screens/index.ts +8 -0
- package/src/screens/process-finished/index.tsx +8 -0
- package/src/screens/process-finished/view-model.ts +15 -0
- package/src/screens/process-finished/view.tsx +24 -0
- package/src/services/api.ts +39 -0
- package/src/services/credentials/generate.ts +37 -0
- package/src/services/credentials/index.ts +1 -0
- package/src/services/documents/index.ts +2 -0
- package/src/services/documents/validate-pdf.ts +46 -0
- package/src/services/documents/validate-picture.ts +50 -0
- package/src/services/index.ts +5 -0
- package/src/services/location/get-from-user-ip.ts +31 -0
- package/src/services/location/index.ts +1 -0
- package/src/services/onboarding/create-channel.ts +45 -0
- package/src/services/onboarding/index.ts +1 -0
- package/src/services/process/alter-status.ts +38 -0
- package/src/services/process/create-error-log.ts +28 -0
- package/src/services/process/create-timeline.ts +75 -0
- package/src/services/process/done.ts +114 -0
- package/src/services/process/generate-data.ts +54 -0
- package/src/services/process/index.ts +6 -0
- package/src/services/process/start.ts +86 -0
- package/src/store/env-variables.ts +37 -0
- package/src/store/flow.ts +54 -0
- package/src/store/index.ts +4 -0
- package/src/store/process-timeline-queue.ts +25 -0
- package/src/store/process.ts +64 -0
- package/src/theme/border-radius.ts +6 -0
- package/src/theme/button-variants.ts +16 -0
- package/src/theme/common-colors.ts +12 -0
- package/src/theme/default-colors.ts +4 -0
- package/src/theme/index.ts +31 -0
- package/src/theme/spacing.ts +11 -0
- package/src/theme/text-variants.ts +14 -0
- package/src/utils/get-error-metadata.ts +46 -0
- package/src/utils/get-route-step.ts +24 -0
- package/src/utils/index.ts +2 -0
- package/src/view-model.ts +222 -0
- package/src/view.tsx +52 -0
|
@@ -0,0 +1,324 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
4
|
+
import { Platform } from 'react-native';
|
|
5
|
+
import { useNavigation, useRoute } from '@react-navigation/native';
|
|
6
|
+
import { useMutation, useQuery } from '@tanstack/react-query';
|
|
7
|
+
import { useTheme } from '@shopify/restyle';
|
|
8
|
+
import Geolocation from '@react-native-community/geolocation';
|
|
9
|
+
import { useDebounce } from 'use-debounce';
|
|
10
|
+
import { useFlowStore, useProcessStore } from "../../../store/index.js";
|
|
11
|
+
import { generateTemporaryCredentials, getLocationFromUserIp, startProcess } from "../../../services/index.js";
|
|
12
|
+
import { useCamera, useProcessTimeline, useDescriptionLoading, useLoading, useRecommendedValidations } from "../../../hooks/index.js";
|
|
13
|
+
import { Objective, TimelineStatus } from "../../../enums/index.js";
|
|
14
|
+
import { GeolocationPermissionDeniedError } from "../../../errors/index.js";
|
|
15
|
+
export const useFaceAuthCameraViewModel = () => {
|
|
16
|
+
const route = useRoute();
|
|
17
|
+
const navigation = useNavigation();
|
|
18
|
+
const [overlayAreaLayout, setOverlayAreaLayout] = useState({
|
|
19
|
+
width: 0,
|
|
20
|
+
height: 0,
|
|
21
|
+
x: 0,
|
|
22
|
+
y: 0
|
|
23
|
+
});
|
|
24
|
+
const [recommendedValidationsLayout, setRecommendedValidationsLayout] = useState({
|
|
25
|
+
width: 0,
|
|
26
|
+
height: 0,
|
|
27
|
+
x: 0,
|
|
28
|
+
y: 0
|
|
29
|
+
});
|
|
30
|
+
const [coordinates, setCoordinates] = useState(null);
|
|
31
|
+
const [isLoading, setIsLoading] = useState(!route.params?.retry);
|
|
32
|
+
const [descriptionLoadingMessage, setDescriptionLoadingMessage] = useState();
|
|
33
|
+
const [isGeolocationPermissionDenied, setIsGeolocationPermissionDenied] = useState(false);
|
|
34
|
+
const [faceIsAligned, setFaceIsAligned] = useState(false);
|
|
35
|
+
const [shouldCapture, setShouldCapture] = useState(false);
|
|
36
|
+
const {
|
|
37
|
+
colors
|
|
38
|
+
} = useTheme();
|
|
39
|
+
const [faceIsAlignedVisualDebounced] = useDebounce(faceIsAligned, 300);
|
|
40
|
+
const [faceIsAlignedDebounced] = useDebounce(faceIsAlignedVisualDebounced, 800);
|
|
41
|
+
const overlayAreaRef = useRef(null);
|
|
42
|
+
const prevFaceIsAlignedDebouncedRef = useRef(false);
|
|
43
|
+
const faceDetectionOptions = useMemo(() => ({
|
|
44
|
+
windowWidth: overlayAreaLayout.width,
|
|
45
|
+
windowHeight: overlayAreaLayout.height,
|
|
46
|
+
performanceMode: 'accurate',
|
|
47
|
+
landmarkMode: 'all',
|
|
48
|
+
contourMode: 'none',
|
|
49
|
+
classificationMode: 'all',
|
|
50
|
+
trackingEnabled: true,
|
|
51
|
+
autoMode: true
|
|
52
|
+
}), [overlayAreaLayout]);
|
|
53
|
+
const {
|
|
54
|
+
authToken,
|
|
55
|
+
tenant,
|
|
56
|
+
backgroundCheckId,
|
|
57
|
+
document,
|
|
58
|
+
objective,
|
|
59
|
+
isSimplifiedMode
|
|
60
|
+
} = useProcessStore(state => ({
|
|
61
|
+
authToken: state.authToken,
|
|
62
|
+
tenant: state.tenant,
|
|
63
|
+
backgroundCheckId: state.backgroundCheckId,
|
|
64
|
+
document: state.document,
|
|
65
|
+
objective: state.objective,
|
|
66
|
+
isSimplifiedMode: state.isSimplifiedMode
|
|
67
|
+
}));
|
|
68
|
+
const {
|
|
69
|
+
setTemporaryCredentials,
|
|
70
|
+
setBackgroundCheckExecutionId
|
|
71
|
+
} = useFlowStore(state => ({
|
|
72
|
+
setTemporaryCredentials: state.setTemporaryCredentials,
|
|
73
|
+
setBackgroundCheckExecutionId: state.setBackgroundCheckExecutionId
|
|
74
|
+
}));
|
|
75
|
+
const {
|
|
76
|
+
ref,
|
|
77
|
+
device,
|
|
78
|
+
hasPermission,
|
|
79
|
+
isReady,
|
|
80
|
+
enablePhoto,
|
|
81
|
+
onInitialized,
|
|
82
|
+
onError,
|
|
83
|
+
takePicture
|
|
84
|
+
} = useCamera('front');
|
|
85
|
+
const {
|
|
86
|
+
create: createProcessTimeline
|
|
87
|
+
} = useProcessTimeline();
|
|
88
|
+
const {
|
|
89
|
+
data: location,
|
|
90
|
+
error: locationError,
|
|
91
|
+
isSuccess: isLocationGetted,
|
|
92
|
+
isError: isLocationError
|
|
93
|
+
} = useQuery({
|
|
94
|
+
queryKey: ['location', coordinates, route.params?.retry],
|
|
95
|
+
queryFn: getLocationFromUserIp,
|
|
96
|
+
enabled: !!coordinates && !route.params?.retry
|
|
97
|
+
});
|
|
98
|
+
const {
|
|
99
|
+
data: temporaryCredentials,
|
|
100
|
+
error: temporaryCredentialsError,
|
|
101
|
+
isSuccess: isTemporaryCredentialsGenerated,
|
|
102
|
+
isError: isTemporaryCredentialsError
|
|
103
|
+
} = useQuery({
|
|
104
|
+
queryKey: ['temporaryCredentials', authToken, tenant, backgroundCheckId, route.params?.retry],
|
|
105
|
+
queryFn: () => {
|
|
106
|
+
setDescriptionLoadingMessage('Gerando as credenciais');
|
|
107
|
+
return generateTemporaryCredentials({
|
|
108
|
+
authToken,
|
|
109
|
+
tenant,
|
|
110
|
+
backgroundCheckId
|
|
111
|
+
});
|
|
112
|
+
},
|
|
113
|
+
enabled: !route.params?.retry
|
|
114
|
+
});
|
|
115
|
+
const {
|
|
116
|
+
mutate: startProcessMutate,
|
|
117
|
+
error: startProcessError,
|
|
118
|
+
isError: isStartProcessError
|
|
119
|
+
} = useMutation({
|
|
120
|
+
mutationFn: startProcess,
|
|
121
|
+
onSuccess: ({
|
|
122
|
+
data
|
|
123
|
+
}) => {
|
|
124
|
+
setBackgroundCheckExecutionId(data.background_check_execution_id);
|
|
125
|
+
setIsLoading(false);
|
|
126
|
+
},
|
|
127
|
+
onError: () => {
|
|
128
|
+
setIsLoading(false);
|
|
129
|
+
}
|
|
130
|
+
});
|
|
131
|
+
const ellipseBorderColor = !isReady ? colors.gray : faceIsAlignedVisualDebounced ? colors.green : colors.red;
|
|
132
|
+
const ovalWidth = isSimplifiedMode ? overlayAreaLayout.width * 0.7 : overlayAreaLayout.width * 0.8;
|
|
133
|
+
const ovalHeight = isSimplifiedMode ? overlayAreaLayout.height * 0.75 : overlayAreaLayout.height * 0.65;
|
|
134
|
+
const ovalRadiusX = ovalWidth / 2;
|
|
135
|
+
const ovalRadiusY = ovalHeight / 2;
|
|
136
|
+
const ovalCenterX = overlayAreaLayout.width / 2;
|
|
137
|
+
const ovalCenterY = overlayAreaLayout.height / 2;
|
|
138
|
+
const ovalTop = ovalCenterY - ovalRadiusY;
|
|
139
|
+
const ovalBottom = ovalCenterY + ovalRadiusY;
|
|
140
|
+
const ovalLeft = ovalCenterX - ovalRadiusX;
|
|
141
|
+
const ovalRight = ovalCenterX + ovalRadiusX;
|
|
142
|
+
const ovalToleranceX = ovalRadiusX * 0.05;
|
|
143
|
+
const ovalToleranceY = ovalRadiusY * 0.05;
|
|
144
|
+
const overlayWithRecommendedValidationsHeight = overlayAreaLayout.height + recommendedValidationsLayout.height;
|
|
145
|
+
const overlayCompressionRatio = overlayAreaLayout.height / overlayWithRecommendedValidationsHeight;
|
|
146
|
+
const androidMinDistanceFactor = isSimplifiedMode ? 0.31 : 0.36;
|
|
147
|
+
const androidMaxDistanceFactor = androidMinDistanceFactor * 1.05;
|
|
148
|
+
const iosMinDistanceFactor = isSimplifiedMode ? 0.15 : 0.17;
|
|
149
|
+
const iosMaxDistanceFactor = iosMinDistanceFactor * 1.05;
|
|
150
|
+
const minDistanceFactor = Platform.OS === 'android' ? androidMinDistanceFactor : iosMinDistanceFactor;
|
|
151
|
+
const maxDistanceFactor = Platform.OS === 'android' ? androidMaxDistanceFactor : iosMaxDistanceFactor;
|
|
152
|
+
const isLoadingOverlayLayout = !ovalWidth || !ovalHeight;
|
|
153
|
+
const descriptionLoadingProps = useDescriptionLoading({
|
|
154
|
+
isActive: isLoading
|
|
155
|
+
});
|
|
156
|
+
const recommendedValidationsProps = useRecommendedValidations();
|
|
157
|
+
const loadingOverlayLayoutProps = useLoading({
|
|
158
|
+
isActive: isLoadingOverlayLayout
|
|
159
|
+
});
|
|
160
|
+
const onOverlayAreaLayout = useCallback(() => {
|
|
161
|
+
overlayAreaRef.current?.measureInWindow((x, y, width, height) => {
|
|
162
|
+
setOverlayAreaLayout({
|
|
163
|
+
x,
|
|
164
|
+
y,
|
|
165
|
+
width,
|
|
166
|
+
height
|
|
167
|
+
});
|
|
168
|
+
});
|
|
169
|
+
}, []);
|
|
170
|
+
const onRecommendedValidationsLayout = useCallback(event => {
|
|
171
|
+
setRecommendedValidationsLayout(event.nativeEvent.layout);
|
|
172
|
+
}, []);
|
|
173
|
+
const transformLandmark = useCallback((landmark, frame) => {
|
|
174
|
+
if (Platform.OS === 'android') {
|
|
175
|
+
const offsetY = isSimplifiedMode ? overlayAreaLayout.y * overlayCompressionRatio : overlayAreaLayout.y;
|
|
176
|
+
return {
|
|
177
|
+
x: landmark.x,
|
|
178
|
+
y: landmark.y - offsetY
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
const scaleX = overlayAreaLayout.width / frame.height;
|
|
182
|
+
const scaleY = overlayAreaLayout.height / frame.width;
|
|
183
|
+
const scaledX = landmark.y * scaleX;
|
|
184
|
+
const scaledY = landmark.x * scaleY;
|
|
185
|
+
const offsetX = overlayAreaLayout.x * scaleX;
|
|
186
|
+
const offsetY = overlayAreaLayout.y * scaleY;
|
|
187
|
+
return {
|
|
188
|
+
x: scaledX - offsetX,
|
|
189
|
+
y: scaledY - offsetY
|
|
190
|
+
};
|
|
191
|
+
}, [isSimplifiedMode, overlayAreaLayout, overlayCompressionRatio]);
|
|
192
|
+
const handleFacesDetection = useCallback(async (faces, frame) => {
|
|
193
|
+
const face = faces?.[0];
|
|
194
|
+
if (!face || !frame || !face.landmarks?.LEFT_EYE || !face.landmarks?.RIGHT_EYE || !face.landmarks?.NOSE_BASE || !face.landmarks?.MOUTH_BOTTOM || overlayAreaLayout.width === 0 || overlayAreaLayout.height === 0) {
|
|
195
|
+
setFaceIsAligned(false);
|
|
196
|
+
prevFaceIsAlignedDebouncedRef.current = false;
|
|
197
|
+
return;
|
|
198
|
+
}
|
|
199
|
+
const rawLeftEye = face.landmarks.LEFT_EYE;
|
|
200
|
+
const rawRightEye = face.landmarks.RIGHT_EYE;
|
|
201
|
+
const rawNose = face.landmarks.NOSE_BASE;
|
|
202
|
+
const rawMouth = face.landmarks.MOUTH_BOTTOM;
|
|
203
|
+
const rawFaceTop = Math.min(rawLeftEye.y, rawRightEye.y, rawNose.y);
|
|
204
|
+
const rawFaceBottom = rawMouth.y;
|
|
205
|
+
const rawFaceHeight = rawFaceBottom - rawFaceTop;
|
|
206
|
+
const isDistanceGood = rawFaceHeight >= frame.height * minDistanceFactor && rawFaceHeight <= frame.height * maxDistanceFactor;
|
|
207
|
+
if (!isDistanceGood) {
|
|
208
|
+
setFaceIsAligned(false);
|
|
209
|
+
prevFaceIsAlignedDebouncedRef.current = false;
|
|
210
|
+
return;
|
|
211
|
+
}
|
|
212
|
+
const leftEye = transformLandmark(face.landmarks.LEFT_EYE, frame);
|
|
213
|
+
const rightEye = transformLandmark(face.landmarks.RIGHT_EYE, frame);
|
|
214
|
+
const nose = transformLandmark(face.landmarks.NOSE_BASE, frame);
|
|
215
|
+
const mouth = transformLandmark(face.landmarks.MOUTH_BOTTOM, frame);
|
|
216
|
+
const faceLeft = Math.min(leftEye.x, rightEye.x, nose.x, mouth.x);
|
|
217
|
+
const faceRight = Math.max(leftEye.x, rightEye.x, nose.x, mouth.x);
|
|
218
|
+
const faceTop = Math.min(leftEye.y, rightEye.y, nose.y, mouth.y);
|
|
219
|
+
const faceBottom = Math.max(leftEye.y, rightEye.y, nose.y, mouth.y);
|
|
220
|
+
const faceCenterX = (faceLeft + faceRight) / 2;
|
|
221
|
+
const faceCenterY = (faceTop + faceBottom) / 2;
|
|
222
|
+
const allPointsInside = faceLeft >= ovalLeft + ovalToleranceX && faceRight <= ovalRight - ovalToleranceX && faceTop >= ovalTop + ovalToleranceY && faceBottom <= ovalBottom - ovalToleranceY;
|
|
223
|
+
const isAngleGood = Math.abs(face.rollAngle) < 8 && Math.abs(face.yawAngle) < 8;
|
|
224
|
+
const isCentered = Math.abs((faceCenterX - ovalCenterX) / ovalRadiusX) <= 0.05 && Math.abs((faceCenterY - ovalCenterY) / ovalRadiusY) <= 0.05;
|
|
225
|
+
const isAligned = allPointsInside && isAngleGood && isCentered;
|
|
226
|
+
setFaceIsAligned(isAligned);
|
|
227
|
+
if (faceIsAlignedDebounced && !prevFaceIsAlignedDebouncedRef.current) {
|
|
228
|
+
setShouldCapture(true);
|
|
229
|
+
}
|
|
230
|
+
prevFaceIsAlignedDebouncedRef.current = faceIsAlignedDebounced;
|
|
231
|
+
}, [faceIsAlignedDebounced, maxDistanceFactor, minDistanceFactor, ovalBottom, ovalCenterX, ovalCenterY, ovalLeft, ovalRadiusX, ovalRadiusY, ovalRight, ovalToleranceX, ovalToleranceY, ovalTop, overlayAreaLayout, transformLandmark]);
|
|
232
|
+
const capture = useCallback(async () => {
|
|
233
|
+
const picture = await takePicture();
|
|
234
|
+
if (!picture) return;
|
|
235
|
+
createProcessTimeline({
|
|
236
|
+
status: TimelineStatus.SUCCESS,
|
|
237
|
+
message: 'Usuário posicionou o rosto e a captura foi realizada'
|
|
238
|
+
});
|
|
239
|
+
navigation.replace('FaceAuthAnalysis', {
|
|
240
|
+
pictureUri: `file://${picture.path}`
|
|
241
|
+
});
|
|
242
|
+
}, [createProcessTimeline, navigation, takePicture]);
|
|
243
|
+
useEffect(() => {
|
|
244
|
+
if (!coordinates) {
|
|
245
|
+
Geolocation.getCurrentPosition(position => {
|
|
246
|
+
createProcessTimeline({
|
|
247
|
+
status: TimelineStatus.SUCCESS,
|
|
248
|
+
message: 'Acesso à localização permitido pelo usuário'
|
|
249
|
+
});
|
|
250
|
+
setCoordinates({
|
|
251
|
+
latitude: position.coords.latitude,
|
|
252
|
+
longitude: position.coords.longitude
|
|
253
|
+
});
|
|
254
|
+
}, error => {
|
|
255
|
+
if (error.PERMISSION_DENIED) {
|
|
256
|
+
setIsGeolocationPermissionDenied(true);
|
|
257
|
+
}
|
|
258
|
+
}, {
|
|
259
|
+
timeout: 15000
|
|
260
|
+
});
|
|
261
|
+
}
|
|
262
|
+
}, [coordinates, createProcessTimeline]);
|
|
263
|
+
useEffect(() => {
|
|
264
|
+
if (isTemporaryCredentialsGenerated) {
|
|
265
|
+
setTemporaryCredentials({
|
|
266
|
+
accessKeyId: temporaryCredentials.data.access_key_id,
|
|
267
|
+
secretAccessKey: temporaryCredentials.data.secret_access_key,
|
|
268
|
+
sessionToken: temporaryCredentials.data.session_token,
|
|
269
|
+
expiration: temporaryCredentials.data.expiration
|
|
270
|
+
});
|
|
271
|
+
}
|
|
272
|
+
}, [isTemporaryCredentialsGenerated, setTemporaryCredentials, temporaryCredentials]);
|
|
273
|
+
useEffect(() => {
|
|
274
|
+
if (isLocationGetted && !!coordinates && !!temporaryCredentials && !route.params?.retry) {
|
|
275
|
+
setDescriptionLoadingMessage(objective === Objective.ONBOARDING ? 'Iniciando onboarding' : 'Iniciando autenticação facial');
|
|
276
|
+
startProcessMutate({
|
|
277
|
+
authToken,
|
|
278
|
+
tenant,
|
|
279
|
+
backgroundCheckId,
|
|
280
|
+
document,
|
|
281
|
+
objective,
|
|
282
|
+
location,
|
|
283
|
+
geolocation: coordinates
|
|
284
|
+
});
|
|
285
|
+
}
|
|
286
|
+
}, [authToken, backgroundCheckId, coordinates, document, isLocationGetted, location, objective, route.params?.retry, startProcessMutate, temporaryCredentials, tenant]);
|
|
287
|
+
useEffect(() => {
|
|
288
|
+
if (shouldCapture) {
|
|
289
|
+
capture();
|
|
290
|
+
}
|
|
291
|
+
}, [shouldCapture, capture]);
|
|
292
|
+
if (isGeolocationPermissionDenied) throw new GeolocationPermissionDeniedError();
|
|
293
|
+
if (isLocationError) throw locationError;
|
|
294
|
+
if (isTemporaryCredentialsError) throw temporaryCredentialsError;
|
|
295
|
+
if (isStartProcessError) throw startProcessError;
|
|
296
|
+
return {
|
|
297
|
+
descriptionLoadingProps,
|
|
298
|
+
descriptionLoadingMessage,
|
|
299
|
+
loadingOverlayLayoutProps,
|
|
300
|
+
recommendedValidationsProps,
|
|
301
|
+
device,
|
|
302
|
+
ref,
|
|
303
|
+
overlayAreaRef,
|
|
304
|
+
overlayColor: colors.secondary,
|
|
305
|
+
ellipseBorderColor,
|
|
306
|
+
ovalCenterX,
|
|
307
|
+
ovalCenterY,
|
|
308
|
+
ovalRadiusX,
|
|
309
|
+
ovalRadiusY,
|
|
310
|
+
faceDetectionOptions,
|
|
311
|
+
isLoading,
|
|
312
|
+
isLoadingOverlayLayout,
|
|
313
|
+
hasPermission,
|
|
314
|
+
isReady,
|
|
315
|
+
enablePhoto,
|
|
316
|
+
isSimplifiedMode,
|
|
317
|
+
onOverlayAreaLayout,
|
|
318
|
+
onRecommendedValidationsLayout,
|
|
319
|
+
onInitialized,
|
|
320
|
+
onError,
|
|
321
|
+
handleFacesDetection
|
|
322
|
+
};
|
|
323
|
+
};
|
|
324
|
+
//# sourceMappingURL=view-model.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useCallback","useEffect","useMemo","useRef","useState","Platform","useNavigation","useRoute","useMutation","useQuery","useTheme","Geolocation","useDebounce","useFlowStore","useProcessStore","generateTemporaryCredentials","getLocationFromUserIp","startProcess","useCamera","useProcessTimeline","useDescriptionLoading","useLoading","useRecommendedValidations","Objective","TimelineStatus","GeolocationPermissionDeniedError","useFaceAuthCameraViewModel","route","navigation","overlayAreaLayout","setOverlayAreaLayout","width","height","x","y","recommendedValidationsLayout","setRecommendedValidationsLayout","coordinates","setCoordinates","isLoading","setIsLoading","params","retry","descriptionLoadingMessage","setDescriptionLoadingMessage","isGeolocationPermissionDenied","setIsGeolocationPermissionDenied","faceIsAligned","setFaceIsAligned","shouldCapture","setShouldCapture","colors","faceIsAlignedVisualDebounced","faceIsAlignedDebounced","overlayAreaRef","prevFaceIsAlignedDebouncedRef","faceDetectionOptions","windowWidth","windowHeight","performanceMode","landmarkMode","contourMode","classificationMode","trackingEnabled","autoMode","authToken","tenant","backgroundCheckId","document","objective","isSimplifiedMode","state","setTemporaryCredentials","setBackgroundCheckExecutionId","ref","device","hasPermission","isReady","enablePhoto","onInitialized","onError","takePicture","create","createProcessTimeline","data","location","error","locationError","isSuccess","isLocationGetted","isError","isLocationError","queryKey","queryFn","enabled","temporaryCredentials","temporaryCredentialsError","isTemporaryCredentialsGenerated","isTemporaryCredentialsError","mutate","startProcessMutate","startProcessError","isStartProcessError","mutationFn","onSuccess","background_check_execution_id","ellipseBorderColor","gray","green","red","ovalWidth","ovalHeight","ovalRadiusX","ovalRadiusY","ovalCenterX","ovalCenterY","ovalTop","ovalBottom","ovalLeft","ovalRight","ovalToleranceX","ovalToleranceY","overlayWithRecommendedValidationsHeight","overlayCompressionRatio","androidMinDistanceFactor","androidMaxDistanceFactor","iosMinDistanceFactor","iosMaxDistanceFactor","minDistanceFactor","OS","maxDistanceFactor","isLoadingOverlayLayout","descriptionLoadingProps","isActive","recommendedValidationsProps","loadingOverlayLayoutProps","onOverlayAreaLayout","current","measureInWindow","onRecommendedValidationsLayout","event","nativeEvent","layout","transformLandmark","landmark","frame","offsetY","scaleX","scaleY","scaledX","scaledY","offsetX","handleFacesDetection","faces","face","landmarks","LEFT_EYE","RIGHT_EYE","NOSE_BASE","MOUTH_BOTTOM","rawLeftEye","rawRightEye","rawNose","rawMouth","rawFaceTop","Math","min","rawFaceBottom","rawFaceHeight","isDistanceGood","leftEye","rightEye","nose","mouth","faceLeft","faceRight","max","faceTop","faceBottom","faceCenterX","faceCenterY","allPointsInside","isAngleGood","abs","rollAngle","yawAngle","isCentered","isAligned","capture","picture","status","SUCCESS","message","replace","pictureUri","path","getCurrentPosition","position","latitude","coords","longitude","PERMISSION_DENIED","timeout","accessKeyId","access_key_id","secretAccessKey","secret_access_key","sessionToken","session_token","expiration","ONBOARDING","geolocation","overlayColor","secondary"],"sourceRoot":"../../../../../src","sources":["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AS;IACT4F,sBAAsB;IACtBvD,aAAa;IACbC,OAAO;IACPC,WAAW;IACXR,gBAAgB;IAChBkE,mBAAmB;IACnBG,8BAA8B;IAC9B5D,aAAa;IACbC,OAAO;IACPwE;EACF,CAAC;AACH,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { Fragment } from 'react';
|
|
4
|
+
import { StyleSheet } from 'react-native';
|
|
5
|
+
import { createBox, createText } from '@shopify/restyle';
|
|
6
|
+
import { Camera } from 'react-native-vision-camera-face-detector';
|
|
7
|
+
import { ChecklistCircleSvg } from "../../../../assets/svgs/index.js";
|
|
8
|
+
import { RootLayout } from "../../../layouts/index.js";
|
|
9
|
+
import { CenteredLoading, DescriptionLoading, RecommendedValidations } from "../../../components/index.js";
|
|
10
|
+
import { FaceAuthCameraOverlay } from "./overlay.js";
|
|
11
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
|
+
const Box = createBox();
|
|
13
|
+
const Text = createText();
|
|
14
|
+
export const FaceAuthCameraView = ({
|
|
15
|
+
descriptionLoadingProps,
|
|
16
|
+
descriptionLoadingMessage,
|
|
17
|
+
loadingOverlayLayoutProps,
|
|
18
|
+
recommendedValidationsProps,
|
|
19
|
+
device,
|
|
20
|
+
ref,
|
|
21
|
+
overlayAreaRef,
|
|
22
|
+
overlayColor,
|
|
23
|
+
ellipseBorderColor,
|
|
24
|
+
ovalCenterX,
|
|
25
|
+
ovalCenterY,
|
|
26
|
+
ovalRadiusX,
|
|
27
|
+
ovalRadiusY,
|
|
28
|
+
faceDetectionOptions,
|
|
29
|
+
isLoading,
|
|
30
|
+
isLoadingOverlayLayout,
|
|
31
|
+
hasPermission,
|
|
32
|
+
isReady,
|
|
33
|
+
enablePhoto,
|
|
34
|
+
isSimplifiedMode,
|
|
35
|
+
onOverlayAreaLayout,
|
|
36
|
+
onRecommendedValidationsLayout,
|
|
37
|
+
onInitialized,
|
|
38
|
+
onError,
|
|
39
|
+
handleFacesDetection
|
|
40
|
+
}) => /*#__PURE__*/_jsx(RootLayout, {
|
|
41
|
+
children: isLoading ? /*#__PURE__*/_jsx(DescriptionLoading, {
|
|
42
|
+
...descriptionLoadingProps,
|
|
43
|
+
title: "Estamos preparando tudo",
|
|
44
|
+
message: descriptionLoadingMessage,
|
|
45
|
+
icon: ChecklistCircleSvg
|
|
46
|
+
}) : /*#__PURE__*/_jsxs(Box, {
|
|
47
|
+
flex: 1,
|
|
48
|
+
children: [/*#__PURE__*/_jsx(Box, {
|
|
49
|
+
ref: overlayAreaRef,
|
|
50
|
+
flex: 1,
|
|
51
|
+
onLayout: onOverlayAreaLayout,
|
|
52
|
+
children: isLoadingOverlayLayout ? /*#__PURE__*/_jsx(CenteredLoading, {
|
|
53
|
+
...loadingOverlayLayoutProps
|
|
54
|
+
}) : /*#__PURE__*/_jsxs(Fragment, {
|
|
55
|
+
children: [!!device && hasPermission && /*#__PURE__*/_jsx(Box, {
|
|
56
|
+
bg: "black",
|
|
57
|
+
style: StyleSheet.absoluteFillObject,
|
|
58
|
+
children: /*#__PURE__*/_jsx(Camera, {
|
|
59
|
+
ref: ref,
|
|
60
|
+
isActive: isReady,
|
|
61
|
+
photo: enablePhoto,
|
|
62
|
+
device: device,
|
|
63
|
+
faceDetectionOptions: faceDetectionOptions,
|
|
64
|
+
faceDetectionCallback: handleFacesDetection,
|
|
65
|
+
photoQualityBalance: "balanced",
|
|
66
|
+
style: StyleSheet.absoluteFillObject,
|
|
67
|
+
onInitialized: onInitialized,
|
|
68
|
+
onError: onError
|
|
69
|
+
})
|
|
70
|
+
}), /*#__PURE__*/_jsx(Box, {
|
|
71
|
+
position: "absolute",
|
|
72
|
+
top: ovalCenterY - ovalRadiusY,
|
|
73
|
+
left: "50%",
|
|
74
|
+
pb: "m",
|
|
75
|
+
zIndex: 10,
|
|
76
|
+
style: {
|
|
77
|
+
transform: [{
|
|
78
|
+
translateX: '-50%'
|
|
79
|
+
}, {
|
|
80
|
+
translateY: '-100%'
|
|
81
|
+
}]
|
|
82
|
+
},
|
|
83
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
84
|
+
variant: "subtitle",
|
|
85
|
+
children: "Mantenha a posi\xE7\xE3o"
|
|
86
|
+
})
|
|
87
|
+
}), /*#__PURE__*/_jsx(FaceAuthCameraOverlay, {
|
|
88
|
+
ovalCenterX: ovalCenterX,
|
|
89
|
+
ovalCenterY: ovalCenterY,
|
|
90
|
+
ovalRadiusX: ovalRadiusX,
|
|
91
|
+
ovalRadiusY: ovalRadiusY,
|
|
92
|
+
backgroundColor: overlayColor,
|
|
93
|
+
ellipseBorderColor: ellipseBorderColor
|
|
94
|
+
}), /*#__PURE__*/_jsx(Box, {
|
|
95
|
+
position: "absolute",
|
|
96
|
+
top: ovalCenterY + ovalRadiusY,
|
|
97
|
+
left: "50%",
|
|
98
|
+
pt: "m",
|
|
99
|
+
zIndex: 10,
|
|
100
|
+
style: {
|
|
101
|
+
transform: [{
|
|
102
|
+
translateX: '-50%'
|
|
103
|
+
}]
|
|
104
|
+
},
|
|
105
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
106
|
+
children: "Coloque o seu rosto dentro do c\xEDrculo."
|
|
107
|
+
})
|
|
108
|
+
})]
|
|
109
|
+
})
|
|
110
|
+
}), isSimplifiedMode && /*#__PURE__*/_jsx(RecommendedValidations, {
|
|
111
|
+
...recommendedValidationsProps,
|
|
112
|
+
mode: "tip",
|
|
113
|
+
title: "Antes de come\xE7ar, siga estas dicas:",
|
|
114
|
+
recommendations: ['Encontre um ambiente bem iluminado;', 'Remova acessórios como óculos, bonés ou máscaras;', 'Evite fundo muito escuro ou com muitas distrações.'],
|
|
115
|
+
onLayout: onRecommendedValidationsLayout
|
|
116
|
+
})]
|
|
117
|
+
})
|
|
118
|
+
});
|
|
119
|
+
//# sourceMappingURL=view.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Fragment","StyleSheet","createBox","createText","Camera","ChecklistCircleSvg","RootLayout","CenteredLoading","DescriptionLoading","RecommendedValidations","FaceAuthCameraOverlay","jsx","_jsx","jsxs","_jsxs","Box","Text","FaceAuthCameraView","descriptionLoadingProps","descriptionLoadingMessage","loadingOverlayLayoutProps","recommendedValidationsProps","device","ref","overlayAreaRef","overlayColor","ellipseBorderColor","ovalCenterX","ovalCenterY","ovalRadiusX","ovalRadiusY","faceDetectionOptions","isLoading","isLoadingOverlayLayout","hasPermission","isReady","enablePhoto","isSimplifiedMode","onOverlayAreaLayout","onRecommendedValidationsLayout","onInitialized","onError","handleFacesDetection","children","title","message","icon","flex","onLayout","bg","style","absoluteFillObject","isActive","photo","faceDetectionCallback","photoQualityBalance","position","top","left","pb","zIndex","transform","translateX","translateY","variant","backgroundColor","pt","mode","recommendations"],"sourceRoot":"../../../../../src","sources":["screens/face-auth/camera/view.tsx"],"mappings":";;AAAA,SAASA,QAAQ,QAAQ,OAAO;AAChC,SAASC,UAAU,QAAQ,cAAc;AACzC,SAASC,SAAS,EAAEC,UAAU,QAAQ,kBAAkB;AACxD,SAASC,MAAM,QAAQ,0CAA0C;AACjE,SAASC,kBAAkB,QAAQ,kCAAyB;AAC5D,SAASC,UAAU,QAAQ,2BAAkB;AAE7C,SACEC,eAAe,EACfC,kBAAkB,EAClBC,sBAAsB,QACjB,8BAAqB;AAE5B,SAASC,qBAAqB,QAAQ,cAAW;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAEjD,MAAMC,GAAG,GAAGb,SAAS,CAAmB,CAAC;AACzC,MAAMc,IAAI,GAAGb,UAAU,CAAmB,CAAC;AAI3C,OAAO,MAAMc,kBAAkB,GAAGA,CAAC;EACjCC,uBAAuB;EACvBC,yBAAyB;EACzBC,yBAAyB;EACzBC,2BAA2B;EAC3BC,MAAM;EACNC,GAAG;EACHC,cAAc;EACdC,YAAY;EACZC,kBAAkB;EAClBC,WAAW;EACXC,WAAW;EACX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|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { FaceAuthView } from "./view.js";
|
|
4
|
+
import { useFaceAuthViewModel } from "./view-model.js";
|
|
5
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
|
+
export const FaceAuthScreen = () => {
|
|
7
|
+
const props = useFaceAuthViewModel();
|
|
8
|
+
return /*#__PURE__*/_jsx(FaceAuthView, {
|
|
9
|
+
...props
|
|
10
|
+
});
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["FaceAuthView","useFaceAuthViewModel","jsx","_jsx","FaceAuthScreen","props"],"sourceRoot":"../../../../src","sources":["screens/face-auth/index.tsx"],"mappings":";;AAAA,SAASA,YAAY,QAAQ,WAAQ;AACrC,SAASC,oBAAoB,QAAQ,iBAAc;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAEnD,OAAO,MAAMC,cAAc,GAAGA,CAAA,KAAM;EAClC,MAAMC,KAAK,GAAGJ,oBAAoB,CAAC,CAAC;EAEpC,oBAAOE,IAAA,CAACH,YAAY;IAAA,GAAKK;EAAK,CAAG,CAAC;AACpC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { useNavigation } from '@react-navigation/native';
|
|
4
|
+
import { useTheme } from '@shopify/restyle';
|
|
5
|
+
import { useButton, useRecommendedValidations } from "../../hooks/index.js";
|
|
6
|
+
export const useFaceAuthViewModel = () => {
|
|
7
|
+
const navigation = useNavigation();
|
|
8
|
+
const {
|
|
9
|
+
colors
|
|
10
|
+
} = useTheme();
|
|
11
|
+
const startButtonProps = useButton();
|
|
12
|
+
const recommendedValidationsProps = useRecommendedValidations();
|
|
13
|
+
const onStartPress = () => {
|
|
14
|
+
navigation.replace('FaceAuthCamera');
|
|
15
|
+
};
|
|
16
|
+
return {
|
|
17
|
+
mainImageColor: colors.primary,
|
|
18
|
+
startButtonProps,
|
|
19
|
+
recommendedValidationsProps,
|
|
20
|
+
onStartPress
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=view-model.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useNavigation","useTheme","useButton","useRecommendedValidations","useFaceAuthViewModel","navigation","colors","startButtonProps","recommendedValidationsProps","onStartPress","replace","mainImageColor","primary"],"sourceRoot":"../../../../src","sources":["screens/face-auth/view-model.ts"],"mappings":";;AAAA,SAASA,aAAa,QAAQ,0BAA0B;AAExD,SAASC,QAAQ,QAAQ,kBAAkB;AAE3C,SAASC,SAAS,EAAEC,yBAAyB,QAAQ,sBAAa;AAGlE,OAAO,MAAMC,oBAAoB,GAAGA,CAAA,KAAM;EACxC,MAAMC,UAAU,GACdL,aAAa,CAAgD,CAAC;EAChE,MAAM;IAAEM;EAAO,CAAC,GAAGL,QAAQ,CAAmB,CAAC;EAC/C,MAAMM,gBAAgB,GAAGL,SAAS,CAAC,CAAC;EACpC,MAAMM,2BAA2B,GAAGL,yBAAyB,CAAC,CAAC;EAE/D,MAAMM,YAAY,GAAGA,CAAA,KAAM;IACzBJ,UAAU,CAACK,OAAO,CAAC,gBAAgB,CAAC;EACtC,CAAC;EAED,OAAO;IACLC,cAAc,EAAEL,MAAM,CAACM,OAAO;IAC9BL,gBAAgB;IAChBC,2BAA2B;IAC3BC;EACF,CAAC;AACH,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { createBox, createText } from '@shopify/restyle';
|
|
4
|
+
import { FaceAuthAvatarSvg, ArrowRightSvg } from "../../../assets/svgs/index.js";
|
|
5
|
+
import { RootLayout } from "../../layouts/index.js";
|
|
6
|
+
import { Button, RecommendedValidations } from "../../components/index.js";
|
|
7
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
|
+
const Box = createBox();
|
|
9
|
+
const Text = createText();
|
|
10
|
+
export const FaceAuthView = ({
|
|
11
|
+
mainImageColor,
|
|
12
|
+
startButtonProps,
|
|
13
|
+
recommendedValidationsProps,
|
|
14
|
+
onStartPress
|
|
15
|
+
}) => /*#__PURE__*/_jsxs(RootLayout, {
|
|
16
|
+
children: [/*#__PURE__*/_jsxs(Box, {
|
|
17
|
+
flex: 1,
|
|
18
|
+
alignItems: "center",
|
|
19
|
+
children: [/*#__PURE__*/_jsx(Box, {
|
|
20
|
+
flex: 1,
|
|
21
|
+
justifyContent: "center",
|
|
22
|
+
children: /*#__PURE__*/_jsx(FaceAuthAvatarSvg, {
|
|
23
|
+
color: mainImageColor
|
|
24
|
+
})
|
|
25
|
+
}), /*#__PURE__*/_jsxs(Box, {
|
|
26
|
+
width: "80%",
|
|
27
|
+
rowGap: "s",
|
|
28
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
29
|
+
variant: "subtitle",
|
|
30
|
+
textAlign: "center",
|
|
31
|
+
children: "Reconhecimento facial"
|
|
32
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
33
|
+
textAlign: "center",
|
|
34
|
+
children: "Posicione o rosto e siga as instru\xE7\xF5es para validar sua identidade."
|
|
35
|
+
})]
|
|
36
|
+
})]
|
|
37
|
+
}), /*#__PURE__*/_jsx(Button, {
|
|
38
|
+
...startButtonProps,
|
|
39
|
+
title: "Come\xE7ar",
|
|
40
|
+
marginVertical: "m",
|
|
41
|
+
iconRight: ArrowRightSvg,
|
|
42
|
+
onPress: onStartPress
|
|
43
|
+
}), /*#__PURE__*/_jsx(RecommendedValidations, {
|
|
44
|
+
...recommendedValidationsProps,
|
|
45
|
+
mode: "tip",
|
|
46
|
+
title: "Antes de come\xE7ar, siga estas dicas:",
|
|
47
|
+
recommendations: ['Encontre um ambiente bem iluminado;', 'Remova acessórios como óculos, bonés ou máscaras;', 'Evite fundo muito escuro ou com muitas distrações.']
|
|
48
|
+
})]
|
|
49
|
+
});
|
|
50
|
+
//# sourceMappingURL=view.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["createBox","createText","FaceAuthAvatarSvg","ArrowRightSvg","RootLayout","Button","RecommendedValidations","jsx","_jsx","jsxs","_jsxs","Box","Text","FaceAuthView","mainImageColor","startButtonProps","recommendedValidationsProps","onStartPress","children","flex","alignItems","justifyContent","color","width","rowGap","variant","textAlign","title","marginVertical","iconRight","onPress","mode","recommendations"],"sourceRoot":"../../../../src","sources":["screens/face-auth/view.tsx"],"mappings":";;AAAA,SAASA,SAAS,EAAEC,UAAU,QAAQ,kBAAkB;AACxD,SAASC,iBAAiB,EAAEC,aAAa,QAAQ,+BAAsB;AACvE,SAASC,UAAU,QAAQ,wBAAe;AAE1C,SAASC,MAAM,EAAEC,sBAAsB,QAAQ,2BAAkB;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAGjE,MAAMC,GAAG,GAAGX,SAAS,CAAmB,CAAC;AACzC,MAAMY,IAAI,GAAGX,UAAU,CAAmB,CAAC;AAI3C,OAAO,MAAMY,YAAY,GAAGA,CAAC;EAC3BC,cAAc;EACdC,gBAAgB;EAChBC,2BAA2B;EAC3BC;AACiB,CAAC,kBAClBP,KAAA,CAACN,UAAU;EAAAc,QAAA,gBACTR,KAAA,CAACC,GAAG;IAACQ,IAAI,EAAE,CAAE;IAACC,UAAU,EAAC,QAAQ;IAAAF,QAAA,gBAC/BV,IAAA,CAACG,GAAG;MAACQ,IAAI,EAAE,CAAE;MAACE,cAAc,EAAC,QAAQ;MAAAH,QAAA,eACnCV,IAAA,CAACN,iBAAiB;QAACoB,KAAK,EAAER;MAAe,CAAE;IAAC,CACzC,CAAC,eACNJ,KAAA,CAACC,GAAG;MAACY,KAAK,EAAC,KAAK;MAACC,MAAM,EAAC,GAAG;MAAAN,QAAA,gBACzBV,IAAA,CAACI,IAAI;QAACa,OAAO,EAAC,UAAU;QAACC,SAAS,EAAC,QAAQ;QAAAR,QAAA,EAAC;MAE5C,CAAM,CAAC,eACPV,IAAA,CAACI,IAAI;QAACc,SAAS,EAAC,QAAQ;QAAAR,QAAA,EAAC;MAEzB,CAAM,CAAC;IAAA,CACJ,CAAC;EAAA,CACH,CAAC,eACNV,IAAA,CAACH,MAAM;IAAA,GACDU,gBAAgB;IACpBY,KAAK,EAAC,YAAS;IACfC,cAAc,EAAC,GAAG;IAClBC,SAAS,EAAE1B,aAAc;IACzB2B,OAAO,EAAEb;EAAa,CACvB,CAAC,eACFT,IAAA,CAACF,sBAAsB;IAAA,GACjBU,2BAA2B;IAC/Be,IAAI,EAAC,KAAK;IACVJ,KAAK,EAAC,wCAAqC;IAC3CK,eAAe,EAAE,CACf,qCAAqC,EACrC,mDAAmD,EACnD,oDAAoD;EACpD,CACH,CAAC;AAAA,CACQ,CACb","ignoreList":[]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
export * from "./face-auth/index.js";
|
|
4
|
+
export * from "./face-auth/camera/index.js";
|
|
5
|
+
export * from "./face-auth/analysis/index.js";
|
|
6
|
+
export * from "./document/index.js";
|
|
7
|
+
export * from "./document/camera/index.js";
|
|
8
|
+
export * from "./document/review/index.js";
|
|
9
|
+
export * from "./document/analysis/index.js";
|
|
10
|
+
export * from "./process-finished/index.js";
|
|
11
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["screens/index.ts"],"mappings":";;AAAA,cAAc,sBAAa;AAC3B,cAAc,6BAAoB;AAClC,cAAc,+BAAsB;AACpC,cAAc,qBAAY;AAC1B,cAAc,4BAAmB;AACjC,cAAc,4BAAmB;AACjC,cAAc,8BAAqB;AACnC,cAAc,6BAAoB","ignoreList":[]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { ProcessFinishedView } from "./view.js";
|
|
4
|
+
import { useProcessFinishedViewModel } from "./view-model.js";
|
|
5
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
|
+
export const ProcessFinishedScreen = () => {
|
|
7
|
+
const props = useProcessFinishedViewModel();
|
|
8
|
+
return /*#__PURE__*/_jsx(ProcessFinishedView, {
|
|
9
|
+
...props
|
|
10
|
+
});
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["ProcessFinishedView","useProcessFinishedViewModel","jsx","_jsx","ProcessFinishedScreen","props"],"sourceRoot":"../../../../src","sources":["screens/process-finished/index.tsx"],"mappings":";;AAAA,SAASA,mBAAmB,QAAQ,WAAQ;AAC5C,SAASC,2BAA2B,QAAQ,iBAAc;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAE1D,OAAO,MAAMC,qBAAqB,GAAGA,CAAA,KAAM;EACzC,MAAMC,KAAK,GAAGJ,2BAA2B,CAAC,CAAC;EAE3C,oBAAOE,IAAA,CAACH,mBAAmB;IAAA,GAAKK;EAAK,CAAG,CAAC;AAC3C,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { useEffect } from 'react';
|
|
4
|
+
import { useTheme } from '@shopify/restyle';
|
|
5
|
+
import { useProcessStore } from "../../store/index.js";
|
|
6
|
+
export const useProcessFinishedViewModel = () => {
|
|
7
|
+
const {
|
|
8
|
+
colors
|
|
9
|
+
} = useTheme();
|
|
10
|
+
const onFinish = useProcessStore(state => state.onFinish);
|
|
11
|
+
useEffect(() => {
|
|
12
|
+
setTimeout(() => onFinish(), 3000);
|
|
13
|
+
}, [onFinish]);
|
|
14
|
+
return {
|
|
15
|
+
svgMiniIconColor: colors.secondary
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=view-model.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useEffect","useTheme","useProcessStore","useProcessFinishedViewModel","colors","onFinish","state","setTimeout","svgMiniIconColor","secondary"],"sourceRoot":"../../../../src","sources":["screens/process-finished/view-model.ts"],"mappings":";;AAAA,SAASA,SAAS,QAAQ,OAAO;AACjC,SAASC,QAAQ,QAAQ,kBAAkB;AAC3C,SAASC,eAAe,QAAQ,sBAAa;AAG7C,OAAO,MAAMC,2BAA2B,GAAGA,CAAA,KAAM;EAC/C,MAAM;IAAEC;EAAO,CAAC,GAAGH,QAAQ,CAAmB,CAAC;EAC/C,MAAMI,QAAQ,GAAGH,eAAe,CAAEI,KAAK,IAAKA,KAAK,CAACD,QAAQ,CAAC;EAE3DL,SAAS,CAAC,MAAM;IACdO,UAAU,CAAC,MAAMF,QAAQ,CAAC,CAAC,EAAE,IAAI,CAAC;EACpC,CAAC,EAAE,CAACA,QAAQ,CAAC,CAAC;EAEd,OAAO;IAAEG,gBAAgB,EAAEJ,MAAM,CAACK;EAAU,CAAC;AAC/C,CAAC","ignoreList":[]}
|