@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,377 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { useCallback, useRef, useState } from 'react';
|
|
4
|
+
import { Image, Platform } from 'react-native';
|
|
5
|
+
import { Worklets } from 'react-native-worklets-core';
|
|
6
|
+
import { useNavigation, useRoute } from '@react-navigation/native';
|
|
7
|
+
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
8
|
+
import { useTheme } from '@shopify/restyle';
|
|
9
|
+
import { runAtTargetFps, useFrameProcessor } from 'react-native-vision-camera';
|
|
10
|
+
import { useResizePlugin } from 'vision-camera-resize-plugin';
|
|
11
|
+
import { ColorConversionCodes, ContourApproximationModes, MorphShapes, MorphTypes, ObjectType, OpenCV, RetrievalModes } from 'react-native-fast-opencv';
|
|
12
|
+
import ImageEditor from '@react-native-community/image-editor';
|
|
13
|
+
import { useDebounce } from 'use-debounce';
|
|
14
|
+
import { BackDocumentCircleSvg, DocumentCircleSvg } from "../../../../assets/svgs/index.js";
|
|
15
|
+
import { useFlowStore, useProcessStore } from "../../../store/index.js";
|
|
16
|
+
import { validateDocumentPicture } from "../../../services/index.js";
|
|
17
|
+
import { useButton, useCamera, useLoading, useProcessTimeline, useS3 } from "../../../hooks/index.js";
|
|
18
|
+
import { ImageType, TimelineStatus, ValidationStatus } from "../../../enums/index.js";
|
|
19
|
+
import { ContactSupportError } from "../../../errors/index.js";
|
|
20
|
+
export const useDocumentCameraViewModel = () => {
|
|
21
|
+
const route = useRoute();
|
|
22
|
+
const navigation = useNavigation();
|
|
23
|
+
const insets = useSafeAreaInsets();
|
|
24
|
+
const containerRef = useRef(null);
|
|
25
|
+
const [containerLayout, setContainerLayout] = useState({
|
|
26
|
+
x: 0,
|
|
27
|
+
y: 0,
|
|
28
|
+
width: 0,
|
|
29
|
+
height: 0
|
|
30
|
+
});
|
|
31
|
+
const [originalPictureUri, setOriginalPictureUri] = useState(null);
|
|
32
|
+
const [pictureValidation, setPictureValidation] = useState(null);
|
|
33
|
+
const [pictureValidationError, setPictureValidationError] = useState(null);
|
|
34
|
+
const [documentIsAligned, setDocumentIsAligned] = useState(false);
|
|
35
|
+
const [documentIsAlignedDebounced] = useDebounce(documentIsAligned, 300);
|
|
36
|
+
const {
|
|
37
|
+
colors,
|
|
38
|
+
spacing
|
|
39
|
+
} = useTheme();
|
|
40
|
+
const {
|
|
41
|
+
tenant,
|
|
42
|
+
isSimplifiedMode,
|
|
43
|
+
hasDigitalFile
|
|
44
|
+
} = useProcessStore(state => ({
|
|
45
|
+
tenant: state.tenant,
|
|
46
|
+
isSimplifiedMode: state.isSimplifiedMode,
|
|
47
|
+
hasDigitalFile: state.hasDigitalFile
|
|
48
|
+
}));
|
|
49
|
+
const {
|
|
50
|
+
backgroundCheckExecutionId,
|
|
51
|
+
setFrontDocumentPictureUrl,
|
|
52
|
+
setBackDocumentPictureUrl
|
|
53
|
+
} = useFlowStore(state => ({
|
|
54
|
+
backgroundCheckExecutionId: state.backgroundCheckExecutionId,
|
|
55
|
+
facePictureUrl: state.facePictureUrl,
|
|
56
|
+
faceConfidence: state.faceConfidence,
|
|
57
|
+
frontDocumentPictureUrl: state.frontDocumentPictureUrl,
|
|
58
|
+
setFrontDocumentPictureUrl: state.setFrontDocumentPictureUrl,
|
|
59
|
+
setBackDocumentPictureUrl: state.setBackDocumentPictureUrl
|
|
60
|
+
}));
|
|
61
|
+
const {
|
|
62
|
+
ref,
|
|
63
|
+
device,
|
|
64
|
+
hasPermission,
|
|
65
|
+
isReady,
|
|
66
|
+
isTakingPicture,
|
|
67
|
+
enablePhoto,
|
|
68
|
+
onInitialized,
|
|
69
|
+
onError,
|
|
70
|
+
takePicture
|
|
71
|
+
} = useCamera('back');
|
|
72
|
+
const s3 = useS3(route.params.side === 'front' ? ImageType.FRONT_DOCUMENT : ImageType.BACK_DOCUMENT);
|
|
73
|
+
const {
|
|
74
|
+
resize
|
|
75
|
+
} = useResizePlugin();
|
|
76
|
+
const {
|
|
77
|
+
create: createProcessTimeline
|
|
78
|
+
} = useProcessTimeline();
|
|
79
|
+
const mainImage = route.params.side === 'front' ? DocumentCircleSvg : BackDocumentCircleSvg;
|
|
80
|
+
const title = route.params.side === 'front' ? 'Foque na frente do documento' : 'Foque no verso do documento';
|
|
81
|
+
const bottomSafeArea = insets.bottom + spacing.xs;
|
|
82
|
+
const pictureTaken = Boolean(originalPictureUri);
|
|
83
|
+
const pictureValidationColor = pictureValidation?.status === ValidationStatus.VALIDATING ? colors.loading : pictureValidation?.status === ValidationStatus.VALID ? colors.success : colors.failure;
|
|
84
|
+
const isActive = isReady && !pictureTaken;
|
|
85
|
+
const rectBorderColor = !isActive && !pictureValidation ? colors.gray : pictureValidation ? pictureValidationColor : documentIsAlignedDebounced ? colors.green : colors.red;
|
|
86
|
+
const rectWidth = containerLayout.width * 0.9;
|
|
87
|
+
const rectHeight = containerLayout.height * 0.28;
|
|
88
|
+
const rectX = (containerLayout.width - rectWidth) / 2;
|
|
89
|
+
const rectY = (containerLayout.height - rectHeight) / 2;
|
|
90
|
+
const rectToleranceX = rectWidth * 0.05;
|
|
91
|
+
const rectToleranceY = rectHeight * 0.05;
|
|
92
|
+
const rectCenterX = rectX + rectWidth / 2;
|
|
93
|
+
const rectCenterY = rectY + rectHeight / 2;
|
|
94
|
+
const isLoadingLayout = !rectWidth || !rectHeight;
|
|
95
|
+
const captureButtonProps = useButton();
|
|
96
|
+
const sendButtonProps = useButton({
|
|
97
|
+
variant: 'outline',
|
|
98
|
+
mainColor: 'white'
|
|
99
|
+
});
|
|
100
|
+
const tryAgainButtonProps = useButton();
|
|
101
|
+
const loadingLayoutProps = useLoading({
|
|
102
|
+
isActive: isLoadingLayout
|
|
103
|
+
});
|
|
104
|
+
if (!backgroundCheckExecutionId) throw new ContactSupportError('0416');
|
|
105
|
+
const onContainerLayout = useCallback(() => {
|
|
106
|
+
containerRef.current?.measureInWindow((x, y, width, height) => {
|
|
107
|
+
setContainerLayout({
|
|
108
|
+
x,
|
|
109
|
+
y,
|
|
110
|
+
width,
|
|
111
|
+
height
|
|
112
|
+
});
|
|
113
|
+
});
|
|
114
|
+
}, []);
|
|
115
|
+
const onStopped = useCallback(() => {
|
|
116
|
+
setDocumentIsAligned(false);
|
|
117
|
+
}, []);
|
|
118
|
+
const handlePictureValidation = useCallback(async pictureUri => {
|
|
119
|
+
try {
|
|
120
|
+
const pictureBytes = await s3.prepare(pictureUri);
|
|
121
|
+
setPictureValidation({
|
|
122
|
+
status: ValidationStatus.VALIDATING,
|
|
123
|
+
statusMessage: 'Foto processada',
|
|
124
|
+
actionMessage: 'Enviando para validação'
|
|
125
|
+
});
|
|
126
|
+
const pictureUrl = await s3.upload(pictureBytes);
|
|
127
|
+
setPictureValidation({
|
|
128
|
+
status: ValidationStatus.VALIDATING,
|
|
129
|
+
statusMessage: 'Estamos validando o seu documento',
|
|
130
|
+
actionMessage: 'Aguarde um momento'
|
|
131
|
+
});
|
|
132
|
+
const data = await validateDocumentPicture({
|
|
133
|
+
tenant,
|
|
134
|
+
backgroundCheckExecutionId,
|
|
135
|
+
url: pictureUrl
|
|
136
|
+
});
|
|
137
|
+
const isFailed = data.ValidationFeedback.length > 0;
|
|
138
|
+
const isError = data.status === 'error';
|
|
139
|
+
const isDifferentSide = data.class.toLowerCase() !== route.params.side;
|
|
140
|
+
const isSuccess = !isFailed && !isError && !isDifferentSide;
|
|
141
|
+
const validationStatus = isSuccess ? ValidationStatus.VALID : ValidationStatus.INVALID;
|
|
142
|
+
const validationStatusMessage = isSuccess ? 'Foto validada com sucesso' : isFailed ? data.ValidationFeedback[0].replace(/\.$/, '') : isDifferentSide ? `A foto enviada não corresponde ${route.params.side === 'front' ? 'a frente' : 'ao verso'} do documento` : 'Foto fora do padrão';
|
|
143
|
+
const validationActionMessage = isSuccess ? 'Você será redirecionado em instantes' : isDifferentSide ? 'Tire a foto novamente' : 'Por favor, tente novamente';
|
|
144
|
+
const timelineStatus = isSuccess ? TimelineStatus.SUCCESS : TimelineStatus.FAILURE;
|
|
145
|
+
const timelineMessage = isSuccess ? validationStatusMessage : `${validationStatusMessage}. Usuário direcionado para tentar novamente`;
|
|
146
|
+
setPictureValidation({
|
|
147
|
+
status: validationStatus,
|
|
148
|
+
statusMessage: validationStatusMessage,
|
|
149
|
+
actionMessage: validationActionMessage
|
|
150
|
+
});
|
|
151
|
+
createProcessTimeline({
|
|
152
|
+
status: timelineStatus,
|
|
153
|
+
message: timelineMessage,
|
|
154
|
+
image: {
|
|
155
|
+
type: route.params.side === 'front' ? ImageType.FRONT_DOCUMENT : ImageType.BACK_DOCUMENT,
|
|
156
|
+
url: pictureUrl
|
|
157
|
+
}
|
|
158
|
+
});
|
|
159
|
+
if (isSuccess) {
|
|
160
|
+
route.params.side === 'front' ? setFrontDocumentPictureUrl(pictureUrl) : setBackDocumentPictureUrl(pictureUrl);
|
|
161
|
+
setTimeout(async () => {
|
|
162
|
+
if (isSimplifiedMode) {
|
|
163
|
+
if (route.params.side === 'front') {
|
|
164
|
+
return navigation.replace('DocumentCamera', {
|
|
165
|
+
side: 'back'
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
return navigation.replace('DocumentAnalysis');
|
|
169
|
+
}
|
|
170
|
+
return navigation.replace('DocumentReview', {
|
|
171
|
+
pictureUri,
|
|
172
|
+
side: route.params.side
|
|
173
|
+
});
|
|
174
|
+
}, 1500);
|
|
175
|
+
}
|
|
176
|
+
} catch (err) {
|
|
177
|
+
if (err instanceof Error) {
|
|
178
|
+
setPictureValidationError(err);
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}, [backgroundCheckExecutionId, createProcessTimeline, isSimplifiedMode, navigation, route.params.side, s3, setBackDocumentPictureUrl, setFrontDocumentPictureUrl, tenant]);
|
|
182
|
+
const onCapturePress = useCallback(async () => {
|
|
183
|
+
const picture = await takePicture();
|
|
184
|
+
if (!picture) return;
|
|
185
|
+
const originalUri = `file://${picture.path}`;
|
|
186
|
+
setOriginalPictureUri(originalUri);
|
|
187
|
+
setPictureValidation({
|
|
188
|
+
status: ValidationStatus.VALIDATING,
|
|
189
|
+
statusMessage: 'A foto está sendo enviada',
|
|
190
|
+
actionMessage: 'Aguarde um momento'
|
|
191
|
+
});
|
|
192
|
+
createProcessTimeline({
|
|
193
|
+
status: TimelineStatus.SUCCESS,
|
|
194
|
+
message: 'Usuário posicionou o documento e realizou a captura'
|
|
195
|
+
});
|
|
196
|
+
const {
|
|
197
|
+
width,
|
|
198
|
+
height
|
|
199
|
+
} = await new Promise((resolve, reject) => {
|
|
200
|
+
if (Platform.OS === 'android') {
|
|
201
|
+
return resolve({
|
|
202
|
+
width: picture.width,
|
|
203
|
+
height: picture.height
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
Image.getSize(originalUri, (w, h) => resolve({
|
|
207
|
+
width: w,
|
|
208
|
+
height: h
|
|
209
|
+
}), reject);
|
|
210
|
+
});
|
|
211
|
+
const scaleX = width / containerLayout.width;
|
|
212
|
+
const scaleY = height / containerLayout.height;
|
|
213
|
+
const centerXImage = rectCenterX * scaleX;
|
|
214
|
+
const centerYImage = rectCenterY * scaleY;
|
|
215
|
+
const rectHeightImage = rectHeight * scaleY;
|
|
216
|
+
const squareSize = rectHeightImage * 1.5;
|
|
217
|
+
const halfSquare = squareSize / 2;
|
|
218
|
+
const rawCropX = centerXImage - halfSquare;
|
|
219
|
+
const rawCropY = centerYImage - halfSquare;
|
|
220
|
+
const cropX = Math.max(0, Math.min(rawCropX, width - squareSize));
|
|
221
|
+
const cropY = Math.max(0, Math.min(rawCropY, height - squareSize));
|
|
222
|
+
const croppedPicture = await ImageEditor.cropImage(originalUri, {
|
|
223
|
+
offset: {
|
|
224
|
+
x: Math.round(cropX),
|
|
225
|
+
y: Math.round(cropY)
|
|
226
|
+
},
|
|
227
|
+
size: {
|
|
228
|
+
width: Math.round(squareSize),
|
|
229
|
+
height: Math.round(squareSize)
|
|
230
|
+
}
|
|
231
|
+
});
|
|
232
|
+
await handlePictureValidation(croppedPicture.uri);
|
|
233
|
+
}, [containerLayout, createProcessTimeline, handlePictureValidation, rectCenterX, rectCenterY, rectHeight, takePicture]);
|
|
234
|
+
const onTryAgainPress = () => {
|
|
235
|
+
setOriginalPictureUri(null);
|
|
236
|
+
createProcessTimeline({
|
|
237
|
+
status: TimelineStatus.INFO,
|
|
238
|
+
message: 'Usuário optou por tentar tirar a foto novamente'
|
|
239
|
+
});
|
|
240
|
+
setTimeout(() => {
|
|
241
|
+
setPictureValidation(null);
|
|
242
|
+
route.params.side === 'front' ? setFrontDocumentPictureUrl(null) : setBackDocumentPictureUrl(null);
|
|
243
|
+
}, 500);
|
|
244
|
+
};
|
|
245
|
+
const onAlignmentChange = Worklets.createRunOnJS(value => {
|
|
246
|
+
setDocumentIsAligned(value);
|
|
247
|
+
});
|
|
248
|
+
const frameProcessor = useFrameProcessor(frame => {
|
|
249
|
+
'worklet';
|
|
250
|
+
|
|
251
|
+
runAtTargetFps(5, () => {
|
|
252
|
+
if (!frame || containerLayout.width === 0 || containerLayout.height === 0) {
|
|
253
|
+
onAlignmentChange(false);
|
|
254
|
+
OpenCV.clearBuffers();
|
|
255
|
+
return;
|
|
256
|
+
}
|
|
257
|
+
const ratio = 500 / frame.width;
|
|
258
|
+
const resizedWidth = frame.width * ratio;
|
|
259
|
+
const resizedHeight = frame.height * ratio;
|
|
260
|
+
const resized = resize(frame, {
|
|
261
|
+
dataType: 'uint8',
|
|
262
|
+
pixelFormat: 'bgr',
|
|
263
|
+
scale: {
|
|
264
|
+
width: resizedWidth,
|
|
265
|
+
height: resizedHeight
|
|
266
|
+
}
|
|
267
|
+
});
|
|
268
|
+
const source = OpenCV.bufferToMat('uint8', resizedHeight, resizedWidth, 3, resized);
|
|
269
|
+
const kernel = OpenCV.createObject(ObjectType.Size, 4, 4);
|
|
270
|
+
const blurKernel = OpenCV.createObject(ObjectType.Size, 7, 7);
|
|
271
|
+
const structuringElement = OpenCV.invoke('getStructuringElement', MorphShapes.MORPH_RECT, kernel);
|
|
272
|
+
const contours = OpenCV.createObject(ObjectType.PointVectorOfVectors);
|
|
273
|
+
OpenCV.invoke('cvtColor', source, source, ColorConversionCodes.COLOR_BGR2GRAY);
|
|
274
|
+
OpenCV.invoke('GaussianBlur', source, source, blurKernel, 0);
|
|
275
|
+
OpenCV.invoke('morphologyEx', source, source, MorphTypes.MORPH_OPEN, structuringElement);
|
|
276
|
+
OpenCV.invoke('morphologyEx', source, source, MorphTypes.MORPH_CLOSE, structuringElement);
|
|
277
|
+
OpenCV.invoke('threshold', source, source, 0, 255, 8);
|
|
278
|
+
OpenCV.invoke('findContours', source, contours, RetrievalModes.RETR_EXTERNAL, ContourApproximationModes.CHAIN_APPROX_SIMPLE);
|
|
279
|
+
const totalArea = resizedWidth * resizedHeight;
|
|
280
|
+
const minArea = Platform.OS === 'android' ? totalArea * 0.12 : totalArea * 0.14;
|
|
281
|
+
const maxArea = Platform.OS === 'android' ? totalArea * 0.18 : totalArea * 0.2;
|
|
282
|
+
const contoursMats = OpenCV.toJSValue(contours);
|
|
283
|
+
const contoursWithArea = contoursMats.array.map((_, index) => {
|
|
284
|
+
const contour = OpenCV.copyObjectFromVector(contours, index);
|
|
285
|
+
const peri = OpenCV.invoke('arcLength', contour, true);
|
|
286
|
+
const approx = OpenCV.createObject(ObjectType.PointVector);
|
|
287
|
+
OpenCV.invoke('approxPolyDP', contour, approx, peri.value * 0.1, true);
|
|
288
|
+
const points = OpenCV.toJSValue(approx);
|
|
289
|
+
if (points.array.length < 4 || points.array.length > 6) return;
|
|
290
|
+
const contourArea = OpenCV.invoke('contourArea', contour);
|
|
291
|
+
if (contourArea.value < minArea || contourArea.value > maxArea) return;
|
|
292
|
+
const boundingRect = OpenCV.invoke('boundingRect', contour);
|
|
293
|
+
const rect = OpenCV.toJSValue(boundingRect);
|
|
294
|
+
const aspectRatio = rect.width > rect.height ? rect.width / rect.height : rect.height / rect.width;
|
|
295
|
+
if (aspectRatio < 1.3 || aspectRatio > 1.7) return;
|
|
296
|
+
return {
|
|
297
|
+
points: points.array,
|
|
298
|
+
area: contourArea.value
|
|
299
|
+
};
|
|
300
|
+
}).filter(item => !!item);
|
|
301
|
+
if (contoursWithArea.length === 0) {
|
|
302
|
+
onAlignmentChange(false);
|
|
303
|
+
OpenCV.clearBuffers();
|
|
304
|
+
return;
|
|
305
|
+
}
|
|
306
|
+
const largestContour = contoursWithArea.reduce((prev, current) => current.area > prev.area ? current : prev);
|
|
307
|
+
const transformedPoints = largestContour.points.map(point => ({
|
|
308
|
+
x: (resizedHeight - point.y) * (containerLayout.width / resizedHeight),
|
|
309
|
+
y: (resizedWidth - point.x) * (containerLayout.height / resizedWidth)
|
|
310
|
+
}));
|
|
311
|
+
const allPointsInside = transformedPoints.every(point => {
|
|
312
|
+
const normalizedX = (point.x - rectX) / rectWidth;
|
|
313
|
+
const normalizedY = (point.y - rectY) / rectHeight;
|
|
314
|
+
return normalizedX >= 0 && normalizedX <= 1 && normalizedY >= 0 && normalizedY <= 1;
|
|
315
|
+
});
|
|
316
|
+
const centroid = transformedPoints.reduce((acc, point, index, array) => {
|
|
317
|
+
const isLast = index === array.length - 1;
|
|
318
|
+
const sumX = acc.x + point.x;
|
|
319
|
+
const sumY = acc.y + point.y;
|
|
320
|
+
if (isLast) {
|
|
321
|
+
return {
|
|
322
|
+
x: sumX / array.length,
|
|
323
|
+
y: sumY / array.length
|
|
324
|
+
};
|
|
325
|
+
}
|
|
326
|
+
return {
|
|
327
|
+
x: sumX,
|
|
328
|
+
y: sumY
|
|
329
|
+
};
|
|
330
|
+
}, {
|
|
331
|
+
x: 0,
|
|
332
|
+
y: 0
|
|
333
|
+
});
|
|
334
|
+
const isCentered = Math.abs(centroid.x - rectCenterX) <= rectToleranceX && Math.abs(centroid.y - rectCenterY) <= rectToleranceY;
|
|
335
|
+
const isAligned = allPointsInside && isCentered;
|
|
336
|
+
onAlignmentChange(isAligned);
|
|
337
|
+
OpenCV.clearBuffers();
|
|
338
|
+
});
|
|
339
|
+
}, [containerLayout, onAlignmentChange]);
|
|
340
|
+
if (pictureValidationError) throw pictureValidationError;
|
|
341
|
+
return {
|
|
342
|
+
containerRef,
|
|
343
|
+
ref,
|
|
344
|
+
device,
|
|
345
|
+
bottomSafeArea,
|
|
346
|
+
loadingLayoutProps,
|
|
347
|
+
mainImage,
|
|
348
|
+
mainImageColor: colors.white,
|
|
349
|
+
title,
|
|
350
|
+
rectBorderColor,
|
|
351
|
+
pictureValidationColor,
|
|
352
|
+
rectWidth,
|
|
353
|
+
rectHeight,
|
|
354
|
+
rectX,
|
|
355
|
+
rectY,
|
|
356
|
+
originalPictureUri,
|
|
357
|
+
pictureValidation,
|
|
358
|
+
captureButtonProps,
|
|
359
|
+
sendButtonProps,
|
|
360
|
+
tryAgainButtonProps,
|
|
361
|
+
isLoadingLayout,
|
|
362
|
+
isActive,
|
|
363
|
+
hasPermission,
|
|
364
|
+
enablePhoto,
|
|
365
|
+
showFooterButtonContainer: !pictureTaken || pictureTaken && pictureValidation?.status === ValidationStatus.INVALID,
|
|
366
|
+
captureButtonDisabled: !documentIsAlignedDebounced || isTakingPicture,
|
|
367
|
+
hasDigitalFile,
|
|
368
|
+
onContainerLayout,
|
|
369
|
+
onInitialized,
|
|
370
|
+
onStopped,
|
|
371
|
+
onError,
|
|
372
|
+
onCapturePress,
|
|
373
|
+
onTryAgainPress,
|
|
374
|
+
frameProcessor
|
|
375
|
+
};
|
|
376
|
+
};
|
|
377
|
+
//# sourceMappingURL=view-model.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useCallback","useRef","useState","Image","Platform","Worklets","useNavigation","useRoute","useSafeAreaInsets","useTheme","runAtTargetFps","useFrameProcessor","useResizePlugin","ColorConversionCodes","ContourApproximationModes","MorphShapes","MorphTypes","ObjectType","OpenCV","RetrievalModes","ImageEditor","useDebounce","BackDocumentCircleSvg","DocumentCircleSvg","useFlowStore","useProcessStore","validateDocumentPicture","useButton","useCamera","useLoading","useProcessTimeline","useS3","ImageType","TimelineStatus","ValidationStatus","ContactSupportError","useDocumentCameraViewModel","route","navigation","insets","containerRef","containerLayout","setContainerLayout","x","y","width","height","originalPictureUri","setOriginalPictureUri","pictureValidation","setPictureValidation","pictureValidationError","setPictureValidationError","documentIsAligned","setDocumentIsAligned","documentIsAlignedDebounced","colors","spacing","tenant","isSimplifiedMode","hasDigitalFile","state","backgroundCheckExecutionId","setFrontDocumentPictureUrl","setBackDocumentPictureUrl","facePictureUrl","faceConfidence","frontDocumentPictureUrl","ref","device","hasPermission","isReady","isTakingPicture","enablePhoto","onInitialized","onError","takePicture","s3","params","side","FRONT_DOCUMENT","BACK_DOCUMENT","resize","create","createProcessTimeline","mainImage","title","bottomSafeArea","bottom","xs","pictureTaken","Boolean","pictureValidationColor","status","VALIDATING","loading","VALID","success","failure","isActive","rectBorderColor","gray","green","red","rectWidth","rectHeight","rectX","rectY","rectToleranceX","rectToleranceY","rectCenterX","rectCenterY","isLoadingLayout","captureButtonProps","sendButtonProps","variant","mainColor","tryAgainButtonProps","loadingLayoutProps","onContainerLayout","current","measureInWindow","onStopped","handlePictureValidation","pictureUri","pictureBytes","prepare","statusMessage","actionMessage","pictureUrl","upload","data","url","isFailed","ValidationFeedback","length","isError","isDifferentSide","class","toLowerCase","isSuccess","validationStatus","INVALID","validationStatusMessage","replace","validationActionMessage","timelineStatus","SUCCESS","FAILURE","timelineMessage","message","image","type","setTimeout","err","Error","onCapturePress","picture","originalUri","path","Promise","resolve","reject","OS","getSize","w","h","scaleX","scaleY","centerXImage","centerYImage","rectHeightImage","squareSize","halfSquare","rawCropX","rawCropY","cropX","Math","max","min","cropY","croppedPicture","cropImage","offset","round","size","uri","onTryAgainPress","INFO","onAlignmentChange","createRunOnJS","value","frameProcessor","frame","clearBuffers","ratio","resizedWidth","resizedHeight","resized","dataType","pixelFormat","scale","source","bufferToMat","kernel","createObject","Size","blurKernel","structuringElement","invoke","MORPH_RECT","contours","PointVectorOfVectors","COLOR_BGR2GRAY","MORPH_OPEN","MORPH_CLOSE","RETR_EXTERNAL","CHAIN_APPROX_SIMPLE","totalArea","minArea","maxArea","contoursMats","toJSValue","contoursWithArea","array","map","_","index","contour","copyObjectFromVector","peri","approx","PointVector","points","contourArea","boundingRect","rect","aspectRatio","area","filter","item","largestContour","reduce","prev","transformedPoints","point","allPointsInside","every","normalizedX","normalizedY","centroid","acc","isLast","sumX","sumY","isCentered","abs","isAligned","mainImageColor","white","showFooterButtonContainer","captureButtonDisabled"],"sourceRoot":"../../../../../src","sources":["screens/document/camera/view-model.ts"],"mappings":";;AAAA,SAASA,WAAW,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AAErD,SAASC,KAAK,EAAEC,QAAQ,QAA8B,cAAc;AACpE,SAASC,QAAQ,QAAQ,4BAA4B;AACrD,SACEC,aAAa,EACbC,QAAQ,QAEH,0BAA0B;AAEjC,SAASC,iBAAiB,QAAQ,gCAAgC;AAClE,SAASC,QAAQ,QAAQ,kBAAkB;AAC3C,SAASC,cAAc,EAAEC,iBAAiB,QAAQ,4BAA4B;AAC9E,SAASC,eAAe,QAAQ,6BAA6B;AAC7D,SACEC,oBAAoB,EACpBC,yBAAyB,EACzBC,WAAW,EACXC,UAAU,EACVC,UAAU,EACVC,MAAM,EACNC,cAAc,QACT,0BAA0B;AACjC,OAAOC,WAAW,MAAM,sCAAsC;AAC9D,SAASC,WAAW,QAAQ,cAAc;AAC1C,SACEC,qBAAqB,EACrBC,iBAAiB,QACZ,kCAAyB;AAEhC,SAASC,YAAY,EAAEC,eAAe,QAAQ,yBAAgB;AAC9D,SAASC,uBAAuB,QAAQ,4BAAmB;AAC3D,SACEC,SAAS,EACTC,SAAS,EACTC,UAAU,EACVC,kBAAkB,EAClBC,KAAK,QACA,yBAAgB;AACvB,SAASC,SAAS,EAAEC,cAAc,EAAEC,gBAAgB,QAAQ,yBAAgB;AAE5E,SAASC,mBAAmB,QAAQ,0BAAiB;AAQrD,OAAO,MAAMC,0BAA0B,GAAGA,CAAA,KAAM;EAC9C,MAAMC,KAAK,GAAG9B,QAAQ,CAAkD,CAAC;EACzE,MAAM+B,UAAU,GACdhC,aAA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import { Image, StyleSheet } from 'react-native';
|
|
5
|
+
import { Camera } from 'react-native-vision-camera';
|
|
6
|
+
import { createBox, createText } from '@shopify/restyle';
|
|
7
|
+
import { CameraPlusSvg, Document2Svg, DocumentCameraOverlaySvg, RefreshSvg, UploadSvg } from "../../../../assets/svgs/index.js";
|
|
8
|
+
import { ValidationStatus } from "../../../enums/index.js";
|
|
9
|
+
import { Button, CenteredLoading } from "../../../components/index.js";
|
|
10
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
11
|
+
const Box = createBox();
|
|
12
|
+
const Text = createText();
|
|
13
|
+
export const DocumentCameraView = ({
|
|
14
|
+
containerRef,
|
|
15
|
+
ref,
|
|
16
|
+
device,
|
|
17
|
+
bottomSafeArea,
|
|
18
|
+
loadingLayoutProps,
|
|
19
|
+
mainImage: MainImage,
|
|
20
|
+
mainImageColor,
|
|
21
|
+
title,
|
|
22
|
+
rectBorderColor,
|
|
23
|
+
pictureValidationColor,
|
|
24
|
+
rectWidth,
|
|
25
|
+
rectHeight,
|
|
26
|
+
rectX,
|
|
27
|
+
rectY,
|
|
28
|
+
originalPictureUri,
|
|
29
|
+
pictureValidation,
|
|
30
|
+
captureButtonProps,
|
|
31
|
+
sendButtonProps,
|
|
32
|
+
tryAgainButtonProps,
|
|
33
|
+
isLoadingLayout,
|
|
34
|
+
isActive,
|
|
35
|
+
hasPermission,
|
|
36
|
+
enablePhoto,
|
|
37
|
+
showFooterButtonContainer,
|
|
38
|
+
captureButtonDisabled,
|
|
39
|
+
hasDigitalFile,
|
|
40
|
+
onContainerLayout,
|
|
41
|
+
onInitialized,
|
|
42
|
+
onStopped,
|
|
43
|
+
onError,
|
|
44
|
+
onCapturePress,
|
|
45
|
+
onTryAgainPress,
|
|
46
|
+
frameProcessor
|
|
47
|
+
}) => /*#__PURE__*/_jsx(Box, {
|
|
48
|
+
ref: containerRef,
|
|
49
|
+
flex: 1,
|
|
50
|
+
onLayout: onContainerLayout,
|
|
51
|
+
children: isLoadingLayout ? /*#__PURE__*/_jsx(CenteredLoading, {
|
|
52
|
+
...loadingLayoutProps
|
|
53
|
+
}) : /*#__PURE__*/_jsxs(Fragment, {
|
|
54
|
+
children: [!!device && hasPermission && /*#__PURE__*/_jsx(Box, {
|
|
55
|
+
bg: "black",
|
|
56
|
+
style: StyleSheet.absoluteFillObject,
|
|
57
|
+
children: /*#__PURE__*/_jsx(Camera, {
|
|
58
|
+
ref: ref,
|
|
59
|
+
isActive: isActive,
|
|
60
|
+
photo: enablePhoto,
|
|
61
|
+
device: device,
|
|
62
|
+
frameProcessor: frameProcessor,
|
|
63
|
+
photoQualityBalance: "balanced",
|
|
64
|
+
style: StyleSheet.absoluteFillObject,
|
|
65
|
+
onInitialized: onInitialized,
|
|
66
|
+
onStopped: onStopped,
|
|
67
|
+
onError: onError
|
|
68
|
+
})
|
|
69
|
+
}), !isActive && originalPictureUri && /*#__PURE__*/_jsx(Image, {
|
|
70
|
+
source: {
|
|
71
|
+
uri: originalPictureUri
|
|
72
|
+
},
|
|
73
|
+
style: StyleSheet.absoluteFill
|
|
74
|
+
}), /*#__PURE__*/_jsxs(Box, {
|
|
75
|
+
position: "absolute",
|
|
76
|
+
top: rectY,
|
|
77
|
+
left: "50%",
|
|
78
|
+
alignItems: "center",
|
|
79
|
+
rowGap: "s",
|
|
80
|
+
pb: "s",
|
|
81
|
+
zIndex: 10,
|
|
82
|
+
style: {
|
|
83
|
+
transform: [{
|
|
84
|
+
translateX: '-50%'
|
|
85
|
+
}, {
|
|
86
|
+
translateY: '-100%'
|
|
87
|
+
}]
|
|
88
|
+
},
|
|
89
|
+
children: [/*#__PURE__*/_jsx(MainImage, {
|
|
90
|
+
width: 50,
|
|
91
|
+
height: 50,
|
|
92
|
+
color: mainImageColor
|
|
93
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
94
|
+
color: "white",
|
|
95
|
+
mt: "s",
|
|
96
|
+
children: title
|
|
97
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
98
|
+
color: "white",
|
|
99
|
+
children: "Garanta que o texto e a imagem estejam vis\xEDveis"
|
|
100
|
+
})]
|
|
101
|
+
}), /*#__PURE__*/_jsx(DocumentCameraOverlaySvg, {
|
|
102
|
+
rectWidth: rectWidth,
|
|
103
|
+
rectHeight: rectHeight,
|
|
104
|
+
rectX: rectX,
|
|
105
|
+
rectY: rectY,
|
|
106
|
+
rectBorderColor: rectBorderColor
|
|
107
|
+
}), !isActive && /*#__PURE__*/_jsx(Box, {
|
|
108
|
+
position: "absolute",
|
|
109
|
+
top: rectY + rectHeight / 2,
|
|
110
|
+
left: "50%",
|
|
111
|
+
width: "70%",
|
|
112
|
+
alignItems: "center",
|
|
113
|
+
justifyContent: "center",
|
|
114
|
+
zIndex: 10,
|
|
115
|
+
style: {
|
|
116
|
+
transform: [{
|
|
117
|
+
translateX: '-50%'
|
|
118
|
+
}, {
|
|
119
|
+
translateY: '-50%'
|
|
120
|
+
}]
|
|
121
|
+
},
|
|
122
|
+
children: pictureValidation ? /*#__PURE__*/_jsxs(Box, {
|
|
123
|
+
bg: "dark",
|
|
124
|
+
py: "xs",
|
|
125
|
+
px: "s",
|
|
126
|
+
borderRadius: "md",
|
|
127
|
+
children: [/*#__PURE__*/_jsxs(Text, {
|
|
128
|
+
textAlign: "center",
|
|
129
|
+
style: {
|
|
130
|
+
color: pictureValidationColor
|
|
131
|
+
},
|
|
132
|
+
children: [pictureValidation.statusMessage, "."]
|
|
133
|
+
}), /*#__PURE__*/_jsxs(Text, {
|
|
134
|
+
textAlign: "center",
|
|
135
|
+
style: {
|
|
136
|
+
color: pictureValidationColor
|
|
137
|
+
},
|
|
138
|
+
children: [pictureValidation.actionMessage, "..."]
|
|
139
|
+
})]
|
|
140
|
+
}) : /*#__PURE__*/_jsx(Document2Svg, {})
|
|
141
|
+
}), /*#__PURE__*/_jsx(Box, {
|
|
142
|
+
position: "absolute",
|
|
143
|
+
top: rectY + rectHeight,
|
|
144
|
+
left: "50%",
|
|
145
|
+
pt: "s",
|
|
146
|
+
zIndex: 10,
|
|
147
|
+
style: {
|
|
148
|
+
transform: [{
|
|
149
|
+
translateX: '-50%'
|
|
150
|
+
}]
|
|
151
|
+
},
|
|
152
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
153
|
+
color: "white",
|
|
154
|
+
children: "Documentos aceitos: RG, CNH ou CIN"
|
|
155
|
+
})
|
|
156
|
+
}), showFooterButtonContainer && /*#__PURE__*/_jsx(Box, {
|
|
157
|
+
position: "absolute",
|
|
158
|
+
left: "50%",
|
|
159
|
+
bottom: bottomSafeArea,
|
|
160
|
+
width: "100%",
|
|
161
|
+
px: "m",
|
|
162
|
+
rowGap: "xl",
|
|
163
|
+
zIndex: 10,
|
|
164
|
+
style: {
|
|
165
|
+
transform: [{
|
|
166
|
+
translateX: '-50%'
|
|
167
|
+
}]
|
|
168
|
+
},
|
|
169
|
+
children: pictureValidation?.status === ValidationStatus.INVALID ? /*#__PURE__*/_jsx(Button, {
|
|
170
|
+
...tryAgainButtonProps,
|
|
171
|
+
title: "Tentar Novamente",
|
|
172
|
+
iconLeft: RefreshSvg,
|
|
173
|
+
onPress: onTryAgainPress
|
|
174
|
+
}) : /*#__PURE__*/_jsxs(Fragment, {
|
|
175
|
+
children: [/*#__PURE__*/_jsx(Button, {
|
|
176
|
+
...captureButtonProps,
|
|
177
|
+
title: "Capturar",
|
|
178
|
+
disabled: captureButtonDisabled,
|
|
179
|
+
iconLeft: CameraPlusSvg,
|
|
180
|
+
onPress: onCapturePress
|
|
181
|
+
}), hasDigitalFile && /*#__PURE__*/_jsx(Button, {
|
|
182
|
+
...sendButtonProps,
|
|
183
|
+
title: "Enviar Documento",
|
|
184
|
+
iconLeft: UploadSvg,
|
|
185
|
+
onPress: () => ({})
|
|
186
|
+
})]
|
|
187
|
+
})
|
|
188
|
+
})]
|
|
189
|
+
})
|
|
190
|
+
});
|
|
191
|
+
//# sourceMappingURL=view.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Fragment","Image","StyleSheet","Camera","createBox","createText","CameraPlusSvg","Document2Svg","DocumentCameraOverlaySvg","RefreshSvg","UploadSvg","ValidationStatus","Button","CenteredLoading","jsx","_jsx","jsxs","_jsxs","Box","Text","DocumentCameraView","containerRef","ref","device","bottomSafeArea","loadingLayoutProps","mainImage","MainImage","mainImageColor","title","rectBorderColor","pictureValidationColor","rectWidth","rectHeight","rectX","rectY","originalPictureUri","pictureValidation","captureButtonProps","sendButtonProps","tryAgainButtonProps","isLoadingLayout","isActive","hasPermission","enablePhoto","showFooterButtonContainer","captureButtonDisabled","hasDigitalFile","onContainerLayout","onInitialized","onStopped","onError","onCapturePress","onTryAgainPress","frameProcessor","flex","onLayout","children","bg","style","absoluteFillObject","photo","photoQualityBalance","source","uri","absoluteFill","position","top","left","alignItems","rowGap","pb","zIndex","transform","translateX","translateY","width","height","color","mt","justifyContent","py","px","borderRadius","textAlign","statusMessage","actionMessage","pt","bottom","status","INVALID","iconLeft","onPress","disabled"],"sourceRoot":"../../../../../src","sources":["screens/document/camera/view.tsx"],"mappings":";;AAAA,SAASA,QAAQ,QAAQ,OAAO;AAChC,SAASC,KAAK,EAAEC,UAAU,QAAQ,cAAc;AAChD,SAASC,MAAM,QAAQ,4BAA4B;AACnD,SAASC,SAAS,EAAEC,UAAU,QAAQ,kBAAkB;AACxD,SACEC,aAAa,EACbC,YAAY,EACZC,wBAAwB,EACxBC,UAAU,EACVC,SAAS,QACJ,kCAAyB;AAChC,SAASC,gBAAgB,QAAQ,yBAAgB;AAEjD,SAASC,MAAM,EAAEC,eAAe,QAAQ,8BAAqB;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAG7D,MAAMC,GAAG,GAAGd,SAAS,CAAmB,CAAC;AACzC,MAAMe,IAAI,GAAGd,UAAU,CAAmB,CAAC;AAI3C,OAAO,MAAMe,kBAAkB,GAAGA,CAAC;EACjCC,YAAY;EACZC,GAAG;EACHC,MAAM;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GAAG;MACNZ,MAAM,EAAC,IAAI;MACXE,MAAM,EAAE,EAAG;MACXb,KAAK,EAAE;QAAEc,SAAS,EAAE,CAAC;UAAEC,UAAU,EAAE;QAAO,CAAC;MAAE,CAAE;MAAAjB,QAAA,EAE9CpB,iBAAiB,EAAEoD,MAAM,KAAK9E,gBAAgB,CAAC+E,OAAO,gBACrD3E,IAAA,CAACH,MAAM;QAAA,GACD4B,mBAAmB;QACvBX,KAAK,EAAC,kBAAkB;QACxB8D,QAAQ,EAAElF,UAAW;QACrBmF,OAAO,EAAEvC;MAAgB,CAC1B,CAAC,gBAEFpC,KAAA,CAACjB,QAAQ;QAAAyD,QAAA,gBACP1C,IAAA,CAACH,MAAM;UAAA,GACD0B,kBAAkB;UACtBT,KAAK,EAAC,UAAU;UAChBgE,QAAQ,EAAE/C,qBAAsB;UAChC6C,QAAQ,EAAErF,aAAc;UACxBsF,OAAO,EAAExC;QAAe,CACzB,CAAC,EACDL,cAAc,iBACbhC,IAAA,CAACH,MAAM;UAAA,GACD2B,eAAe;UACnBV,KAAK,EAAC,kBAAkB;UACxB8D,QAAQ,EAAEjF,SAAU;UACpBkF,OAAO,EAAEA,CAAA,MAAO,CAAC,CAAC;QAAE,CACrB,CACF;MAAA,CACO;IACX,CACE,CACN;EAAA,CACO;AACX,CACE,CACN","ignoreList":[]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { DocumentView } from "./view.js";
|
|
4
|
+
import { useDocumentViewModel } from "./view-model.js";
|
|
5
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
|
+
export const DocumentScreen = () => {
|
|
7
|
+
const props = useDocumentViewModel();
|
|
8
|
+
return /*#__PURE__*/_jsx(DocumentView, {
|
|
9
|
+
...props
|
|
10
|
+
});
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["DocumentView","useDocumentViewModel","jsx","_jsx","DocumentScreen","props"],"sourceRoot":"../../../../src","sources":["screens/document/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,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { DocumentReviewView } from "./view.js";
|
|
4
|
+
import { useDocumentReviewViewModel } from "./view-model.js";
|
|
5
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
|
+
export const DocumentReviewScreen = () => {
|
|
7
|
+
const props = useDocumentReviewViewModel();
|
|
8
|
+
return /*#__PURE__*/_jsx(DocumentReviewView, {
|
|
9
|
+
...props
|
|
10
|
+
});
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["DocumentReviewView","useDocumentReviewViewModel","jsx","_jsx","DocumentReviewScreen","props"],"sourceRoot":"../../../../../src","sources":["screens/document/review/index.tsx"],"mappings":";;AAAA,SAASA,kBAAkB,QAAQ,WAAQ;AAC3C,SAASC,0BAA0B,QAAQ,iBAAc;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAEzD,OAAO,MAAMC,oBAAoB,GAAGA,CAAA,KAAM;EACxC,MAAMC,KAAK,GAAGJ,0BAA0B,CAAC,CAAC;EAE1C,oBAAOE,IAAA,CAACH,kBAAkB;IAAA,GAAKK;EAAK,CAAG,CAAC;AAC1C,CAAC","ignoreList":[]}
|