@idmission/websdk-ui 0.1.0-rc.1
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/README.md +189 -0
- package/dist/DocumentCaptureView.d.ts +111 -0
- package/dist/DocumentCaptureView.d.ts.map +1 -0
- package/dist/DocumentCaptureView.js +225 -0
- package/dist/FaceLivenessView.d.ts +88 -0
- package/dist/FaceLivenessView.d.ts.map +1 -0
- package/dist/FaceLivenessView.js +298 -0
- package/dist/IdCaptureView.d.ts +271 -0
- package/dist/IdCaptureView.d.ts.map +1 -0
- package/dist/IdCaptureView.js +454 -0
- package/dist/SelfieCaptureView.d.ts +119 -0
- package/dist/SelfieCaptureView.d.ts.map +1 -0
- package/dist/SelfieCaptureView.js +168 -0
- package/dist/SignatureCaptureView.d.ts +136 -0
- package/dist/SignatureCaptureView.d.ts.map +1 -0
- package/dist/SignatureCaptureView.js +521 -0
- package/dist/VideoIdCaptureView.d.ts +104 -0
- package/dist/VideoIdCaptureView.d.ts.map +1 -0
- package/dist/VideoIdCaptureView.js +253 -0
- package/dist/bindings/useDocumentCapture.d.ts +3 -0
- package/dist/bindings/useDocumentCapture.d.ts.map +1 -0
- package/dist/bindings/useDocumentCapture.js +6 -0
- package/dist/bindings/useIdCapture.d.ts +5 -0
- package/dist/bindings/useIdCapture.d.ts.map +1 -0
- package/dist/bindings/useIdCapture.js +53 -0
- package/dist/bindings/useSelfieCapture.d.ts +5 -0
- package/dist/bindings/useSelfieCapture.d.ts.map +1 -0
- package/dist/bindings/useSelfieCapture.js +53 -0
- package/dist/bindings/useSignatureCapture.d.ts +3 -0
- package/dist/bindings/useSignatureCapture.d.ts.map +1 -0
- package/dist/bindings/useSignatureCapture.js +6 -0
- package/dist/bindings/useVideoIdCapture.d.ts +3 -0
- package/dist/bindings/useVideoIdCapture.d.ts.map +1 -0
- package/dist/bindings/useVideoIdCapture.js +6 -0
- package/dist/components/CameraFeed.d.ts +36 -0
- package/dist/components/CameraFeed.d.ts.map +1 -0
- package/dist/components/CameraFeed.js +74 -0
- package/dist/components/ExitCaptureButton.d.ts +6 -0
- package/dist/components/ExitCaptureButton.d.ts.map +1 -0
- package/dist/components/ExitCaptureButton.js +32 -0
- package/dist/components/GuidanceMessage.d.ts +25 -0
- package/dist/components/GuidanceMessage.d.ts.map +1 -0
- package/dist/components/GuidanceMessage.js +39 -0
- package/dist/components/OverrideWrongDocumentTypeDialog.d.ts +20 -0
- package/dist/components/OverrideWrongDocumentTypeDialog.d.ts.map +1 -0
- package/dist/components/OverrideWrongDocumentTypeDialog.js +55 -0
- package/dist/components/additional_documents/AdditionalDocumentCapture.d.ts +41 -0
- package/dist/components/additional_documents/AdditionalDocumentCapture.d.ts.map +1 -0
- package/dist/components/additional_documents/AdditionalDocumentCapture.js +118 -0
- package/dist/components/additional_documents/AdditionalDocumentCaptureWizard.d.ts +18 -0
- package/dist/components/additional_documents/AdditionalDocumentCaptureWizard.d.ts.map +1 -0
- package/dist/components/additional_documents/AdditionalDocumentCaptureWizard.js +93 -0
- package/dist/components/additional_documents/sequence.d.ts +10 -0
- package/dist/components/additional_documents/sequence.d.ts.map +1 -0
- package/dist/components/additional_documents/sequence.js +11 -0
- package/dist/components/additional_documents/types.d.ts +15 -0
- package/dist/components/additional_documents/types.d.ts.map +1 -0
- package/dist/components/additional_documents/types.js +1 -0
- package/dist/components/barcode/BarcodeGuideOverlay.d.ts +23 -0
- package/dist/components/barcode/BarcodeGuideOverlay.d.ts.map +1 -0
- package/dist/components/barcode/BarcodeGuideOverlay.js +157 -0
- package/dist/components/barcode/BarcodeSuccessOverlay.d.ts +7 -0
- package/dist/components/barcode/BarcodeSuccessOverlay.d.ts.map +1 -0
- package/dist/components/barcode/BarcodeSuccessOverlay.js +58 -0
- package/dist/components/common/ButtonsRow.d.ts +2 -0
- package/dist/components/common/ButtonsRow.d.ts.map +1 -0
- package/dist/components/common/ButtonsRow.js +7 -0
- package/dist/components/common/CapturedDocumentImg.d.ts +7 -0
- package/dist/components/common/CapturedDocumentImg.d.ts.map +1 -0
- package/dist/components/common/CapturedDocumentImg.js +31 -0
- package/dist/components/common/Card.d.ts +9 -0
- package/dist/components/common/Card.d.ts.map +1 -0
- package/dist/components/common/Card.js +16 -0
- package/dist/components/common/LoaderButton.d.ts +31 -0
- package/dist/components/common/LoaderButton.d.ts.map +1 -0
- package/dist/components/common/LoaderButton.js +444 -0
- package/dist/components/common/LoadingListItemIndicator.d.ts +5 -0
- package/dist/components/common/LoadingListItemIndicator.d.ts.map +1 -0
- package/dist/components/common/LoadingListItemIndicator.js +8 -0
- package/dist/components/common/animation.d.ts +5 -0
- package/dist/components/common/animation.d.ts.map +1 -0
- package/dist/components/common/animation.js +35 -0
- package/dist/components/common/downloadingLabel.d.ts +10 -0
- package/dist/components/common/downloadingLabel.d.ts.map +1 -0
- package/dist/components/common/downloadingLabel.js +15 -0
- package/dist/components/common/overlay.d.ts +142 -0
- package/dist/components/common/overlay.d.ts.map +1 -0
- package/dist/components/common/overlay.js +183 -0
- package/dist/components/customer_match/CustomerMatchFailure.d.ts +37 -0
- package/dist/components/customer_match/CustomerMatchFailure.d.ts.map +1 -0
- package/dist/components/customer_match/CustomerMatchFailure.js +38 -0
- package/dist/components/customer_match/CustomerMatchSuccess.d.ts +35 -0
- package/dist/components/customer_match/CustomerMatchSuccess.d.ts.map +1 -0
- package/dist/components/customer_match/CustomerMatchSuccess.js +44 -0
- package/dist/components/debug/debug.d.ts +91 -0
- package/dist/components/debug/debug.d.ts.map +1 -0
- package/dist/components/debug/debug.js +270 -0
- package/dist/components/document/DocumentCaptureGuideOverlay.d.ts +15 -0
- package/dist/components/document/DocumentCaptureGuideOverlay.d.ts.map +1 -0
- package/dist/components/document/DocumentCaptureGuideOverlay.js +148 -0
- package/dist/components/document/guideRect.d.ts +11 -0
- package/dist/components/document/guideRect.d.ts.map +1 -0
- package/dist/components/document/guideRect.js +25 -0
- package/dist/components/document/types.d.ts +25 -0
- package/dist/components/document/types.d.ts.map +1 -0
- package/dist/components/document/types.js +1 -0
- package/dist/components/error/CameraAccessDeniedOverlay.d.ts +31 -0
- package/dist/components/error/CameraAccessDeniedOverlay.d.ts.map +1 -0
- package/dist/components/error/CameraAccessDeniedOverlay.js +45 -0
- package/dist/components/error/ErrorScreen.d.ts +60 -0
- package/dist/components/error/ErrorScreen.d.ts.map +1 -0
- package/dist/components/error/ErrorScreen.js +150 -0
- package/dist/components/face_liveness/FaceLivenessFailure.d.ts +35 -0
- package/dist/components/face_liveness/FaceLivenessFailure.d.ts.map +1 -0
- package/dist/components/face_liveness/FaceLivenessFailure.js +30 -0
- package/dist/components/face_liveness/FaceLivenessSuccess.d.ts +31 -0
- package/dist/components/face_liveness/FaceLivenessSuccess.d.ts.map +1 -0
- package/dist/components/face_liveness/FaceLivenessSuccess.js +56 -0
- package/dist/components/fallback/IdCaptureFallback.d.ts +58 -0
- package/dist/components/fallback/IdCaptureFallback.d.ts.map +1 -0
- package/dist/components/fallback/IdCaptureFallback.js +128 -0
- package/dist/components/fallback/IdCaptureOrUploadScreen.d.ts +75 -0
- package/dist/components/fallback/IdCaptureOrUploadScreen.d.ts.map +1 -0
- package/dist/components/fallback/IdCaptureOrUploadScreen.js +205 -0
- package/dist/components/fallback/SelfieCaptureFallback.d.ts +54 -0
- package/dist/components/fallback/SelfieCaptureFallback.d.ts.map +1 -0
- package/dist/components/fallback/SelfieCaptureFallback.js +106 -0
- package/dist/components/fallback/fallbackInstructionStep.d.ts +5 -0
- package/dist/components/fallback/fallbackInstructionStep.d.ts.map +1 -0
- package/dist/components/fallback/fallbackInstructionStep.js +18 -0
- package/dist/components/fallback/readFile.d.ts +2 -0
- package/dist/components/fallback/readFile.d.ts.map +1 -0
- package/dist/components/fallback/readFile.js +14 -0
- package/dist/components/guide_images/backToFront.d.ts +3 -0
- package/dist/components/guide_images/backToFront.d.ts.map +1 -0
- package/dist/components/guide_images/backToFront.js +17 -0
- package/dist/components/guide_images/byUrl.d.ts +3 -0
- package/dist/components/guide_images/byUrl.d.ts.map +1 -0
- package/dist/components/guide_images/byUrl.js +6 -0
- package/dist/components/guide_images/defaults.d.ts +37 -0
- package/dist/components/guide_images/defaults.d.ts.map +1 -0
- package/dist/components/guide_images/defaults.js +37 -0
- package/dist/components/guide_images/index.d.ts +7 -0
- package/dist/components/guide_images/index.d.ts.map +1 -0
- package/dist/components/guide_images/index.js +5 -0
- package/dist/components/guide_images/orientation.d.ts +2 -0
- package/dist/components/guide_images/orientation.d.ts.map +1 -0
- package/dist/components/guide_images/orientation.js +5 -0
- package/dist/components/guide_images/types.d.ts +15 -0
- package/dist/components/guide_images/types.d.ts.map +1 -0
- package/dist/components/guide_images/types.js +1 -0
- package/dist/components/guide_images/useGuideImages.d.ts +3 -0
- package/dist/components/guide_images/useGuideImages.d.ts.map +1 -0
- package/dist/components/guide_images/useGuideImages.js +19 -0
- package/dist/components/guides/FlipIdPrompt.d.ts +28 -0
- package/dist/components/guides/FlipIdPrompt.d.ts.map +1 -0
- package/dist/components/guides/FlipIdPrompt.js +54 -0
- package/dist/components/guides/IdCaptureFitGuide.d.ts +51 -0
- package/dist/components/guides/IdCaptureFitGuide.d.ts.map +1 -0
- package/dist/components/guides/IdCaptureFitGuide.js +199 -0
- package/dist/components/guides/IdCaptureGuideOverlay.d.ts +100 -0
- package/dist/components/guides/IdCaptureGuideOverlay.d.ts.map +1 -0
- package/dist/components/guides/IdCaptureGuideOverlay.js +137 -0
- package/dist/components/guides/IdCaptureGuides.d.ts +47 -0
- package/dist/components/guides/IdCaptureGuides.d.ts.map +1 -0
- package/dist/components/guides/IdCaptureGuides.js +136 -0
- package/dist/components/guides/IdCaptureGuidesCommon.d.ts +136 -0
- package/dist/components/guides/IdCaptureGuidesCommon.d.ts.map +1 -0
- package/dist/components/guides/IdCaptureGuidesCommon.js +123 -0
- package/dist/components/loading/IdCaptureLoadingGraphic.d.ts +9 -0
- package/dist/components/loading/IdCaptureLoadingGraphic.d.ts.map +1 -0
- package/dist/components/loading/IdCaptureLoadingGraphic.js +76 -0
- package/dist/components/loading/IdCaptureLoadingOverlay.d.ts +134 -0
- package/dist/components/loading/IdCaptureLoadingOverlay.d.ts.map +1 -0
- package/dist/components/loading/IdCaptureLoadingOverlay.js +13 -0
- package/dist/components/loading/IdCaptureLoadingOverlayDefault.d.ts +3 -0
- package/dist/components/loading/IdCaptureLoadingOverlayDefault.d.ts.map +1 -0
- package/dist/components/loading/IdCaptureLoadingOverlayDefault.js +196 -0
- package/dist/components/loading/IdCaptureLoadingOverlayLegacy.d.ts +4 -0
- package/dist/components/loading/IdCaptureLoadingOverlayLegacy.d.ts.map +1 -0
- package/dist/components/loading/IdCaptureLoadingOverlayLegacy.js +69 -0
- package/dist/components/loading/IdCaptureLoadingOverlayRing.d.ts +3 -0
- package/dist/components/loading/IdCaptureLoadingOverlayRing.d.ts.map +1 -0
- package/dist/components/loading/IdCaptureLoadingOverlayRing.js +260 -0
- package/dist/components/loading/RingIntroScreen.d.ts +39 -0
- package/dist/components/loading/RingIntroScreen.d.ts.map +1 -0
- package/dist/components/loading/RingIntroScreen.js +216 -0
- package/dist/components/loading/RingProgress.d.ts +9 -0
- package/dist/components/loading/RingProgress.d.ts.map +1 -0
- package/dist/components/loading/RingProgress.js +24 -0
- package/dist/components/loading/RingStageTransition.d.ts +27 -0
- package/dist/components/loading/RingStageTransition.d.ts.map +1 -0
- package/dist/components/loading/RingStageTransition.js +145 -0
- package/dist/components/loading/customerSpinner.d.ts +58 -0
- package/dist/components/loading/customerSpinner.d.ts.map +1 -0
- package/dist/components/loading/customerSpinner.js +69 -0
- package/dist/components/loading/ringIntro.d.ts +15 -0
- package/dist/components/loading/ringIntro.d.ts.map +1 -0
- package/dist/components/loading/ringIntro.js +5 -0
- package/dist/components/loading/ringStatus.d.ts +8 -0
- package/dist/components/loading/ringStatus.d.ts.map +1 -0
- package/dist/components/loading/ringStatus.js +13 -0
- package/dist/components/loading/useAutoContinueWhenReady.d.ts +8 -0
- package/dist/components/loading/useAutoContinueWhenReady.d.ts.map +1 -0
- package/dist/components/loading/useAutoContinueWhenReady.js +25 -0
- package/dist/components/review/ReviewDiagnosticsPanel.d.ts +27 -0
- package/dist/components/review/ReviewDiagnosticsPanel.d.ts.map +1 -0
- package/dist/components/review/ReviewDiagnosticsPanel.js +475 -0
- package/dist/components/review/ReviewScreen.d.ts +34 -0
- package/dist/components/review/ReviewScreen.d.ts.map +1 -0
- package/dist/components/review/ReviewScreen.js +91 -0
- package/dist/components/ring/RingFailureScreen.d.ts +41 -0
- package/dist/components/ring/RingFailureScreen.d.ts.map +1 -0
- package/dist/components/ring/RingFailureScreen.js +384 -0
- package/dist/components/ring/RingFinishingScreen.d.ts +27 -0
- package/dist/components/ring/RingFinishingScreen.d.ts.map +1 -0
- package/dist/components/ring/RingFinishingScreen.js +184 -0
- package/dist/components/ring/RingSuccessScreen.d.ts +33 -0
- package/dist/components/ring/RingSuccessScreen.d.ts.map +1 -0
- package/dist/components/ring/RingSuccessScreen.js +185 -0
- package/dist/components/selfie/FaceCaptureGuideOverlay.d.ts +17 -0
- package/dist/components/selfie/FaceCaptureGuideOverlay.d.ts.map +1 -0
- package/dist/components/selfie/FaceCaptureGuideOverlay.js +39 -0
- package/dist/components/selfie/SelfieCameraFeed.d.ts +8 -0
- package/dist/components/selfie/SelfieCameraFeed.d.ts.map +1 -0
- package/dist/components/selfie/SelfieCameraFeed.js +16 -0
- package/dist/components/selfie/SelfieCaptureAnimatedMask.d.ts +15 -0
- package/dist/components/selfie/SelfieCaptureAnimatedMask.d.ts.map +1 -0
- package/dist/components/selfie/SelfieCaptureAnimatedMask.js +111 -0
- package/dist/components/selfie/SelfieCaptureLoadingGraphic.d.ts +4 -0
- package/dist/components/selfie/SelfieCaptureLoadingGraphic.d.ts.map +1 -0
- package/dist/components/selfie/SelfieCaptureLoadingGraphic.js +28 -0
- package/dist/components/selfie/SelfieCaptureSurface.d.ts +126 -0
- package/dist/components/selfie/SelfieCaptureSurface.d.ts.map +1 -0
- package/dist/components/selfie/SelfieCaptureSurface.js +248 -0
- package/dist/components/selfie_loading/SelfieCaptureLoadingOverlay.d.ts +136 -0
- package/dist/components/selfie_loading/SelfieCaptureLoadingOverlay.d.ts.map +1 -0
- package/dist/components/selfie_loading/SelfieCaptureLoadingOverlay.js +13 -0
- package/dist/components/selfie_loading/SelfieCaptureLoadingOverlayDefault.d.ts +3 -0
- package/dist/components/selfie_loading/SelfieCaptureLoadingOverlayDefault.d.ts.map +1 -0
- package/dist/components/selfie_loading/SelfieCaptureLoadingOverlayDefault.js +181 -0
- package/dist/components/selfie_loading/SelfieCaptureLoadingOverlayLegacy.d.ts +3 -0
- package/dist/components/selfie_loading/SelfieCaptureLoadingOverlayLegacy.d.ts.map +1 -0
- package/dist/components/selfie_loading/SelfieCaptureLoadingOverlayLegacy.js +67 -0
- package/dist/components/selfie_loading/SelfieCaptureLoadingOverlayRing.d.ts +3 -0
- package/dist/components/selfie_loading/SelfieCaptureLoadingOverlayRing.d.ts.map +1 -0
- package/dist/components/selfie_loading/SelfieCaptureLoadingOverlayRing.js +265 -0
- package/dist/components/videoId/VideoIdCaptureGuides.d.ts +42 -0
- package/dist/components/videoId/VideoIdCaptureGuides.d.ts.map +1 -0
- package/dist/components/videoId/VideoIdCaptureGuides.js +173 -0
- package/dist/flows/AuthStateContext.d.ts +33 -0
- package/dist/flows/AuthStateContext.d.ts.map +1 -0
- package/dist/flows/AuthStateContext.js +47 -0
- package/dist/flows/CompositeWizard.d.ts +76 -0
- package/dist/flows/CompositeWizard.d.ts.map +1 -0
- package/dist/flows/CompositeWizard.js +200 -0
- package/dist/flows/CustomerBiometricsEnrollmentFlow.d.ts +28 -0
- package/dist/flows/CustomerBiometricsEnrollmentFlow.d.ts.map +1 -0
- package/dist/flows/CustomerBiometricsEnrollmentFlow.js +138 -0
- package/dist/flows/CustomerIdAndBiometricsEnrollmentFlow.d.ts +47 -0
- package/dist/flows/CustomerIdAndBiometricsEnrollmentFlow.d.ts.map +1 -0
- package/dist/flows/CustomerIdAndBiometricsEnrollmentFlow.js +231 -0
- package/dist/flows/CustomerIdentificationFlow.d.ts +4 -0
- package/dist/flows/CustomerIdentificationFlow.d.ts.map +1 -0
- package/dist/flows/CustomerIdentificationFlow.js +11 -0
- package/dist/flows/CustomerVerificationFlow.d.ts +9 -0
- package/dist/flows/CustomerVerificationFlow.d.ts.map +1 -0
- package/dist/flows/CustomerVerificationFlow.js +17 -0
- package/dist/flows/DocumentCaptureFlow.d.ts +23 -0
- package/dist/flows/DocumentCaptureFlow.d.ts.map +1 -0
- package/dist/flows/DocumentCaptureFlow.js +116 -0
- package/dist/flows/FaceValidationFlow.d.ts +12 -0
- package/dist/flows/FaceValidationFlow.d.ts.map +1 -0
- package/dist/flows/FaceValidationFlow.js +53 -0
- package/dist/flows/FlowChassis.d.ts +39 -0
- package/dist/flows/FlowChassis.d.ts.map +1 -0
- package/dist/flows/FlowChassis.js +69 -0
- package/dist/flows/IdAndFaceValidationFlow.d.ts +36 -0
- package/dist/flows/IdAndFaceValidationFlow.d.ts.map +1 -0
- package/dist/flows/IdAndFaceValidationFlow.js +168 -0
- package/dist/flows/IdValidationFlow.d.ts +29 -0
- package/dist/flows/IdValidationFlow.d.ts.map +1 -0
- package/dist/flows/IdValidationFlow.js +106 -0
- package/dist/flows/OrbStatusScreen.d.ts +14 -0
- package/dist/flows/OrbStatusScreen.d.ts.map +1 -0
- package/dist/flows/OrbStatusScreen.js +60 -0
- package/dist/flows/RemoteDiagnosticsMount.d.ts +6 -0
- package/dist/flows/RemoteDiagnosticsMount.d.ts.map +1 -0
- package/dist/flows/RemoteDiagnosticsMount.js +57 -0
- package/dist/flows/SignatureKYCFlow.d.ts +33 -0
- package/dist/flows/SignatureKYCFlow.d.ts.map +1 -0
- package/dist/flows/SignatureKYCFlow.js +228 -0
- package/dist/flows/SubmissionProvider.d.ts +40 -0
- package/dist/flows/SubmissionProvider.d.ts.map +1 -0
- package/dist/flows/SubmissionProvider.js +136 -0
- package/dist/flows/SubmissionSuccess.d.ts +48 -0
- package/dist/flows/SubmissionSuccess.d.ts.map +1 -0
- package/dist/flows/SubmissionSuccess.js +488 -0
- package/dist/flows/VideoIdValidationFlow.d.ts +61 -0
- package/dist/flows/VideoIdValidationFlow.d.ts.map +1 -0
- package/dist/flows/VideoIdValidationFlow.js +171 -0
- package/dist/flows/additionalDocuments.d.ts +5 -0
- package/dist/flows/additionalDocuments.d.ts.map +1 -0
- package/dist/flows/additionalDocuments.js +26 -0
- package/dist/flows/artifacts.d.ts +8 -0
- package/dist/flows/artifacts.d.ts.map +1 -0
- package/dist/flows/artifacts.js +80 -0
- package/dist/flows/customerMatch/CustomerMatchCapture.d.ts +53 -0
- package/dist/flows/customerMatch/CustomerMatchCapture.d.ts.map +1 -0
- package/dist/flows/customerMatch/CustomerMatchCapture.js +211 -0
- package/dist/flows/customerMatch/CustomerMatchFlow.d.ts +94 -0
- package/dist/flows/customerMatch/CustomerMatchFlow.d.ts.map +1 -0
- package/dist/flows/customerMatch/CustomerMatchFlow.js +209 -0
- package/dist/flows/customerMatch/adapters.d.ts +34 -0
- package/dist/flows/customerMatch/adapters.d.ts.map +1 -0
- package/dist/flows/customerMatch/adapters.js +63 -0
- package/dist/flows/customerMatch/identificationReducer.d.ts +34 -0
- package/dist/flows/customerMatch/identificationReducer.d.ts.map +1 -0
- package/dist/flows/customerMatch/identificationReducer.js +75 -0
- package/dist/flows/customerMatch/verificationReducer.d.ts +34 -0
- package/dist/flows/customerMatch/verificationReducer.d.ts.map +1 -0
- package/dist/flows/customerMatch/verificationReducer.js +77 -0
- package/dist/flows/documentCapture.d.ts +5 -0
- package/dist/flows/documentCapture.d.ts.map +1 -0
- package/dist/flows/documentCapture.js +8 -0
- package/dist/flows/jsonHighlight.d.ts +19 -0
- package/dist/flows/jsonHighlight.d.ts.map +1 -0
- package/dist/flows/jsonHighlight.js +90 -0
- package/dist/flows/overlays.d.ts +91 -0
- package/dist/flows/overlays.d.ts.map +1 -0
- package/dist/flows/overlays.js +150 -0
- package/dist/flows/ringIntroImplications.d.ts +30 -0
- package/dist/flows/ringIntroImplications.d.ts.map +1 -0
- package/dist/flows/ringIntroImplications.js +58 -0
- package/dist/flows/ringScreens.d.ts +27 -0
- package/dist/flows/ringScreens.d.ts.map +1 -0
- package/dist/flows/ringScreens.js +18 -0
- package/dist/flows/sequencer.d.ts +12 -0
- package/dist/flows/sequencer.d.ts.map +1 -0
- package/dist/flows/sequencer.js +18 -0
- package/dist/flows/sharedCamera.d.ts +23 -0
- package/dist/flows/sharedCamera.d.ts.map +1 -0
- package/dist/flows/sharedCamera.js +64 -0
- package/dist/flows/signatureStep.d.ts +25 -0
- package/dist/flows/signatureStep.d.ts.map +1 -0
- package/dist/flows/signatureStep.js +99 -0
- package/dist/flows/types.d.ts +106 -0
- package/dist/flows/types.d.ts.map +1 -0
- package/dist/flows/types.js +1 -0
- package/dist/flows/useGeolocation.d.ts +24 -0
- package/dist/flows/useGeolocation.d.ts.map +1 -0
- package/dist/flows/useGeolocation.js +82 -0
- package/dist/flows/useShowSuccessScreen.d.ts +3 -0
- package/dist/flows/useShowSuccessScreen.d.ts.map +1 -0
- package/dist/flows/useShowSuccessScreen.js +51 -0
- package/dist/flows/useTimeout.d.ts +7 -0
- package/dist/flows/useTimeout.d.ts.map +1 -0
- package/dist/flows/useTimeout.js +68 -0
- package/dist/flows/videoIdSteps.d.ts +33 -0
- package/dist/flows/videoIdSteps.d.ts.map +1 -0
- package/dist/flows/videoIdSteps.js +54 -0
- package/dist/guidance/selfieStrings.d.ts +18 -0
- package/dist/guidance/selfieStrings.d.ts.map +1 -0
- package/dist/guidance/selfieStrings.js +97 -0
- package/dist/guidance/strings.d.ts +4 -0
- package/dist/guidance/strings.d.ts.map +1 -0
- package/dist/guidance/strings.js +43 -0
- package/dist/guidance/videoIdStrings.d.ts +23 -0
- package/dist/guidance/videoIdStrings.d.ts.map +1 -0
- package/dist/guidance/videoIdStrings.js +23 -0
- package/dist/i18n/index.d.ts +1221 -0
- package/dist/i18n/index.d.ts.map +1 -0
- package/dist/i18n/index.js +92 -0
- package/dist/i18n/locales/de.d.ts +149 -0
- package/dist/i18n/locales/de.d.ts.map +1 -0
- package/dist/i18n/locales/de.js +147 -0
- package/dist/i18n/locales/en.d.ts +3 -0
- package/dist/i18n/locales/en.d.ts.map +1 -0
- package/dist/i18n/locales/en.js +1 -0
- package/dist/i18n/locales/es.d.ts +149 -0
- package/dist/i18n/locales/es.d.ts.map +1 -0
- package/dist/i18n/locales/es.js +147 -0
- package/dist/i18n/locales/fr.d.ts +149 -0
- package/dist/i18n/locales/fr.d.ts.map +1 -0
- package/dist/i18n/locales/fr.js +147 -0
- package/dist/i18n/locales/it.d.ts +149 -0
- package/dist/i18n/locales/it.d.ts.map +1 -0
- package/dist/i18n/locales/it.js +147 -0
- package/dist/i18n/locales/ja.d.ts +149 -0
- package/dist/i18n/locales/ja.d.ts.map +1 -0
- package/dist/i18n/locales/ja.js +147 -0
- package/dist/i18n/locales/pt.d.ts +149 -0
- package/dist/i18n/locales/pt.d.ts.map +1 -0
- package/dist/i18n/locales/pt.js +147 -0
- package/dist/i18n/locales/ru.d.ts +149 -0
- package/dist/i18n/locales/ru.d.ts.map +1 -0
- package/dist/i18n/locales/ru.js +147 -0
- package/dist/i18n/locales/zh.d.ts +149 -0
- package/dist/i18n/locales/zh.d.ts.map +1 -0
- package/dist/i18n/locales/zh.js +147 -0
- package/dist/i18n/render.d.ts +3 -0
- package/dist/i18n/render.d.ts.map +1 -0
- package/dist/i18n/render.js +7 -0
- package/dist/index.d.ts +157 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +191 -0
- package/dist/layout/GuideLayoutContext.d.ts +24 -0
- package/dist/layout/GuideLayoutContext.d.ts.map +1 -0
- package/dist/layout/GuideLayoutContext.js +19 -0
- package/dist/layout/GuideOrientationContext.d.ts +16 -0
- package/dist/layout/GuideOrientationContext.d.ts.map +1 -0
- package/dist/layout/GuideOrientationContext.js +40 -0
- package/dist/layout/useResizeObserver.d.ts +11 -0
- package/dist/layout/useResizeObserver.d.ts.map +1 -0
- package/dist/layout/useResizeObserver.js +114 -0
- package/dist/testing/alignGlobals.d.ts +2 -0
- package/dist/testing/alignGlobals.d.ts.map +1 -0
- package/dist/testing/alignGlobals.js +25 -0
- package/dist/testing/buildDocumentState.d.ts +4 -0
- package/dist/testing/buildDocumentState.d.ts.map +1 -0
- package/dist/testing/buildDocumentState.js +19 -0
- package/dist/testing/buildSelfieState.d.ts +8 -0
- package/dist/testing/buildSelfieState.d.ts.map +1 -0
- package/dist/testing/buildSelfieState.js +84 -0
- package/dist/testing/buildSignatureState.d.ts +3 -0
- package/dist/testing/buildSignatureState.d.ts.map +1 -0
- package/dist/testing/buildSignatureState.js +12 -0
- package/dist/testing/buildState.d.ts +3 -0
- package/dist/testing/buildState.d.ts.map +1 -0
- package/dist/testing/buildState.js +34 -0
- package/dist/testing/buildVideoIdState.d.ts +3 -0
- package/dist/testing/buildVideoIdState.d.ts.map +1 -0
- package/dist/testing/buildVideoIdState.js +11 -0
- package/dist/testing/classNamesLeaves.d.ts +14 -0
- package/dist/testing/classNamesLeaves.d.ts.map +1 -0
- package/dist/testing/classNamesLeaves.js +144 -0
- package/dist/testing/fakeClient.d.ts +61 -0
- package/dist/testing/fakeClient.d.ts.map +1 -0
- package/dist/testing/fakeClient.js +142 -0
- package/dist/testing/fakeController.d.ts +18 -0
- package/dist/testing/fakeController.d.ts.map +1 -0
- package/dist/testing/fakeController.js +165 -0
- package/dist/testing/fakeDocumentController.d.ts +37 -0
- package/dist/testing/fakeDocumentController.d.ts.map +1 -0
- package/dist/testing/fakeDocumentController.js +104 -0
- package/dist/testing/fakeSelfieController.d.ts +15 -0
- package/dist/testing/fakeSelfieController.d.ts.map +1 -0
- package/dist/testing/fakeSelfieController.js +154 -0
- package/dist/testing/fakeSignatureController.d.ts +12 -0
- package/dist/testing/fakeSignatureController.d.ts.map +1 -0
- package/dist/testing/fakeSignatureController.js +58 -0
- package/dist/testing/fakeVideoIdController.d.ts +12 -0
- package/dist/testing/fakeVideoIdController.d.ts.map +1 -0
- package/dist/testing/fakeVideoIdController.js +50 -0
- package/dist/testing/index.d.ts +15 -0
- package/dist/testing/index.d.ts.map +1 -0
- package/dist/testing/index.js +18 -0
- package/dist/testing/stubSignatureCanvas.d.ts +2 -0
- package/dist/testing/stubSignatureCanvas.d.ts.map +1 -0
- package/dist/testing/stubSignatureCanvas.js +26 -0
- package/dist/testing/stubVideoCaptureDom.d.ts +2 -0
- package/dist/testing/stubVideoCaptureDom.d.ts.map +1 -0
- package/dist/testing/stubVideoCaptureDom.js +36 -0
- package/dist/theme/color.d.ts +14 -0
- package/dist/theme/color.d.ts.map +1 -0
- package/dist/theme/color.js +1 -0
- package/dist/theme/index.d.ts +405 -0
- package/dist/theme/index.d.ts.map +1 -0
- package/dist/theme/index.js +230 -0
- package/dist/utils/canvas.d.ts +3 -0
- package/dist/utils/canvas.d.ts.map +1 -0
- package/dist/utils/canvas.js +16 -0
- package/dist/utils/cdn.d.ts +2 -0
- package/dist/utils/cdn.d.ts.map +1 -0
- package/dist/utils/cdn.js +3 -0
- package/dist/utils/cropping.d.ts +4 -0
- package/dist/utils/cropping.d.ts.map +1 -0
- package/dist/utils/cropping.js +11 -0
- package/dist/utils/flowClock.d.ts +6 -0
- package/dist/utils/flowClock.d.ts.map +1 -0
- package/dist/utils/flowClock.js +22 -0
- package/dist/utils/isMobile.d.ts +3 -0
- package/dist/utils/isMobile.d.ts.map +1 -0
- package/dist/utils/isMobile.js +35 -0
- package/dist/utils/loadProgressHooks.d.ts +25 -0
- package/dist/utils/loadProgressHooks.d.ts.map +1 -0
- package/dist/utils/loadProgressHooks.js +79 -0
- package/dist/utils/logger.d.ts +18 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +38 -0
- package/dist/utils/merge.d.ts +3 -0
- package/dist/utils/merge.d.ts.map +1 -0
- package/dist/utils/merge.js +23 -0
- package/dist/utils/signaturePadStrokeGuard.d.ts +16 -0
- package/dist/utils/signaturePadStrokeGuard.d.ts.map +1 -0
- package/dist/utils/signaturePadStrokeGuard.js +70 -0
- package/dist/version.d.ts +2 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +3 -0
- package/package.json +71 -0
|
@@ -0,0 +1,521 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback, useEffect, useRef, useState, } from "react";
|
|
3
|
+
import SignatureCanvasImport from "react-signature-canvas";
|
|
4
|
+
import { styled } from "styled-components";
|
|
5
|
+
import { SignatureCaptureGuidanceCode, } from "@idmission/websdk-core/signatureCapture";
|
|
6
|
+
import { useSignatureCapture } from "./bindings/useSignatureCapture";
|
|
7
|
+
import { CameraVideoTag } from "./components/CameraFeed";
|
|
8
|
+
import { ButtonsRow } from "./components/common/ButtonsRow";
|
|
9
|
+
import { LoaderButton } from "./components/common/LoaderButton";
|
|
10
|
+
import { ExitCaptureButton } from "./components/ExitCaptureButton";
|
|
11
|
+
import { FaceCaptureGuideOverlay, } from "./components/selfie/FaceCaptureGuideOverlay";
|
|
12
|
+
import { SelfieCaptureAnimatedMaskWithStatus } from "./components/selfie/SelfieCaptureAnimatedMask";
|
|
13
|
+
import { useLanguage, useTranslations, } from "./i18n";
|
|
14
|
+
import useResizeObserver from "./layout/useResizeObserver";
|
|
15
|
+
import { guardSignaturePadStrokes } from "./utils/signaturePadStrokeGuard";
|
|
16
|
+
import { useShowSuccessScreen, } from "./flows/useShowSuccessScreen";
|
|
17
|
+
import { MicrophoneAccessDeniedOverlay, } from "./flows/overlays";
|
|
18
|
+
const FALLBACKS = {
|
|
19
|
+
headingText: "Please sign the box below",
|
|
20
|
+
signHereText: "Sign here",
|
|
21
|
+
keepSigningText: "Sign here",
|
|
22
|
+
readyText: "Please sign the box below",
|
|
23
|
+
processingText: "Processing...",
|
|
24
|
+
acceptBtnText: "Accept",
|
|
25
|
+
clearBtnText: "Clear",
|
|
26
|
+
retryBtnText: "Retry",
|
|
27
|
+
doneBtnText: "Done",
|
|
28
|
+
successHeadingText: "Video signature has been successfully captured!",
|
|
29
|
+
capturedSignatureAltText: "Captured signature",
|
|
30
|
+
errorHeadingText: "We're sorry an unexpected error has occurred.",
|
|
31
|
+
recordingInterruptedHeadingText: "We had to stop the recording",
|
|
32
|
+
recordingInterruptedText: "Something interrupted your signature recording.",
|
|
33
|
+
recordingInterruptedHintText: "We’ll take a quick selfie first.",
|
|
34
|
+
startOverBtnText: "Start over",
|
|
35
|
+
signaturePadEmptyText: "",
|
|
36
|
+
headTrackingUnsatisfiedText: "",
|
|
37
|
+
};
|
|
38
|
+
const SignatureCanvas = SignatureCanvasImport.default ?? SignatureCanvasImport;
|
|
39
|
+
function updateVideoRef(ref, node) {
|
|
40
|
+
ref.current = node;
|
|
41
|
+
}
|
|
42
|
+
export function SignatureCaptureView({ controller, sessionReady = true, lang = "auto", autoStart = true, skipSuccessScreen = false, onExit, onCompleted, verbiage, classNames = {}, assets = {}, videoRef: providedVideoRef, onVideoElementChange, forceCameraFeed = false, headTrackingSatisfied = true, showFaceGuideThenSignaturePad = false, legacyVideoLayout = false, faceGuideStatus = "ready", onRestartRequested, recordingInterruptedComponent: RecordingInterruptedScreen, }) {
|
|
43
|
+
useLanguage(lang);
|
|
44
|
+
const text = useTranslations(verbiage, FALLBACKS);
|
|
45
|
+
const state = useSignatureCapture(controller);
|
|
46
|
+
const micDenied = state.error?.code === "MICROPHONE_PERMISSION_DENIED";
|
|
47
|
+
const recordingInterrupted = state.error?.code === "RECORDING_INTERRUPTED";
|
|
48
|
+
/**
|
|
49
|
+
* Dismisses the interrupted screen the moment the user acts on it.
|
|
50
|
+
*
|
|
51
|
+
* A restart that goes back through the face stage leaves the controller
|
|
52
|
+
* parked on its error for the whole selfie — clearing it at the bounce would
|
|
53
|
+
* start a recording that runs through that stage and is thrown away on
|
|
54
|
+
* arrival. But this panel is `z-index: 3` over the flow's face stage, so
|
|
55
|
+
* without this the user taps Start over, liveness runs underneath, and they
|
|
56
|
+
* stare at an unchanged error screen.
|
|
57
|
+
*/
|
|
58
|
+
const [restarting, setRestarting] = useState(false);
|
|
59
|
+
const internalVideoRef = useRef(null);
|
|
60
|
+
const videoRef = providedVideoRef ?? internalVideoRef;
|
|
61
|
+
const [videoNode, setVideoNode] = useState(null);
|
|
62
|
+
const setVideoRef = useCallback((node) => {
|
|
63
|
+
updateVideoRef(videoRef, node);
|
|
64
|
+
setVideoNode(node);
|
|
65
|
+
onVideoElementChange?.(node);
|
|
66
|
+
}, [onVideoElementChange, videoRef]);
|
|
67
|
+
const signatureRef = useRef(null);
|
|
68
|
+
const setSignatureRef = useCallback((canvas) => {
|
|
69
|
+
signatureRef.current = canvas;
|
|
70
|
+
guardSignaturePadStrokes(canvas);
|
|
71
|
+
}, []);
|
|
72
|
+
const { ref: signaturePanelRef, width: signaturePanelWidth, height: signaturePanelHeight, } = useResizeObserver();
|
|
73
|
+
const [canvasDimensions, setCanvasDimensions] = useState(null);
|
|
74
|
+
const lastCompletedAt = useRef(null);
|
|
75
|
+
const [previewUrl, setPreviewUrl] = useState(null);
|
|
76
|
+
const [emptyContentDismissed, setEmptyContentDismissed] = useState(false);
|
|
77
|
+
useEffect(() => {
|
|
78
|
+
if (state.pointCount === 0)
|
|
79
|
+
setEmptyContentDismissed(false);
|
|
80
|
+
}, [state.pointCount]);
|
|
81
|
+
// The controller leaving `error` means the restart landed — either the flow
|
|
82
|
+
// handed back from the face stage, or the in-place retry completed. A later
|
|
83
|
+
// interruption is then free to raise the panel again.
|
|
84
|
+
useEffect(() => {
|
|
85
|
+
if (state.phase !== "error")
|
|
86
|
+
setRestarting(false);
|
|
87
|
+
}, [state.phase]);
|
|
88
|
+
useEffect(() => {
|
|
89
|
+
if (!signaturePanelWidth ||
|
|
90
|
+
signaturePanelWidth < 10 ||
|
|
91
|
+
!signaturePanelHeight ||
|
|
92
|
+
signaturePanelHeight < 10) {
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
95
|
+
// signature_pad records pointer coordinates in CSS pixels. Its canvas
|
|
96
|
+
// backing dimensions must therefore match the rendered pad instead of
|
|
97
|
+
// being stretched from a fixed size, or the ink drifts from the cursor.
|
|
98
|
+
// Lock the first usable size so a later resize cannot clear an in-progress
|
|
99
|
+
// signature by changing the canvas width/height attributes.
|
|
100
|
+
setCanvasDimensions((current) => current ?? {
|
|
101
|
+
width: signaturePanelWidth,
|
|
102
|
+
height: signaturePanelHeight,
|
|
103
|
+
});
|
|
104
|
+
}, [signaturePanelHeight, signaturePanelWidth]);
|
|
105
|
+
useEffect(() => {
|
|
106
|
+
const canvas = signatureRef.current?.getCanvas();
|
|
107
|
+
if (!videoNode || !canvas)
|
|
108
|
+
return;
|
|
109
|
+
void controller.attach(videoNode, canvas).catch(() => {
|
|
110
|
+
// The controller publishes its typed error for the view below.
|
|
111
|
+
});
|
|
112
|
+
return () => controller.detach();
|
|
113
|
+
}, [controller, videoNode]);
|
|
114
|
+
useEffect(() => {
|
|
115
|
+
if (!sessionReady ||
|
|
116
|
+
!autoStart ||
|
|
117
|
+
(state.phase !== "ready" &&
|
|
118
|
+
!(state.phase === "loading" && state.pipeline.ready))) {
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
121
|
+
void controller.actions.start().catch(() => {
|
|
122
|
+
// The controller publishes its typed error for the view below.
|
|
123
|
+
});
|
|
124
|
+
}, [autoStart, controller, sessionReady, state.phase, state.pipeline.ready]);
|
|
125
|
+
useEffect(() => {
|
|
126
|
+
if (state.phase !== "completed" || !state.artifact)
|
|
127
|
+
return;
|
|
128
|
+
const capturedAt = state.artifact.capturedAt.getTime();
|
|
129
|
+
if (lastCompletedAt.current === capturedAt)
|
|
130
|
+
return;
|
|
131
|
+
lastCompletedAt.current = capturedAt;
|
|
132
|
+
onCompleted?.(controller.collectArtifacts());
|
|
133
|
+
}, [controller, onCompleted, state.artifact, state.phase]);
|
|
134
|
+
useEffect(() => {
|
|
135
|
+
const blob = state.artifact?.videoBlob;
|
|
136
|
+
if (!blob) {
|
|
137
|
+
setPreviewUrl(null);
|
|
138
|
+
return;
|
|
139
|
+
}
|
|
140
|
+
const url = URL.createObjectURL(blob);
|
|
141
|
+
setPreviewUrl(url);
|
|
142
|
+
return () => {
|
|
143
|
+
URL.revokeObjectURL(url);
|
|
144
|
+
setPreviewUrl((current) => (current === url ? null : current));
|
|
145
|
+
};
|
|
146
|
+
}, [state.artifact?.videoBlob]);
|
|
147
|
+
/**
|
|
148
|
+
* The one restart path, shared by the default screen and any replacement, so
|
|
149
|
+
* a customer-supplied design cannot skip the pad wipe or the face-stage
|
|
150
|
+
* bounce by wiring its button to something else.
|
|
151
|
+
*/
|
|
152
|
+
const handleStartOver = useCallback(() => {
|
|
153
|
+
// The pad still shows ink that the recording never captured, so the
|
|
154
|
+
// restart has to wipe it — regardless of `restartVideoOnClear`, which
|
|
155
|
+
// governs the USER-initiated clear, not a forced one.
|
|
156
|
+
signatureRef.current?.clear();
|
|
157
|
+
setRestarting(true);
|
|
158
|
+
// A flow that owns a face stage takes the user back through it: the
|
|
159
|
+
// interruption is an unsupervised gap, so the selfie that vouches for who
|
|
160
|
+
// signed has to be captured AFTER it. Without one, restart in place.
|
|
161
|
+
if (onRestartRequested)
|
|
162
|
+
onRestartRequested();
|
|
163
|
+
else
|
|
164
|
+
void controller.actions.retry();
|
|
165
|
+
}, [controller, onRestartRequested]);
|
|
166
|
+
const guidance = state.guidance.code === SignatureCaptureGuidanceCode.KEEP_SIGNING
|
|
167
|
+
? text.keepSigningText
|
|
168
|
+
: state.guidance.code === SignatureCaptureGuidanceCode.READY_TO_ACCEPT
|
|
169
|
+
? text.readyText
|
|
170
|
+
: state.guidance.code === SignatureCaptureGuidanceCode.PROCESSING
|
|
171
|
+
? text.processingText
|
|
172
|
+
: text.signHereText;
|
|
173
|
+
const capturedSignatureAltText = typeof text.capturedSignatureAltText === "string"
|
|
174
|
+
? text.capturedSignatureAltText
|
|
175
|
+
: FALLBACKS.capturedSignatureAltText;
|
|
176
|
+
const signatureDisabled = legacyVideoLayout && (!sessionReady || state.phase !== "capturing");
|
|
177
|
+
const displayEmptyState = !signatureDisabled &&
|
|
178
|
+
state.pointCount === 0 &&
|
|
179
|
+
!emptyContentDismissed &&
|
|
180
|
+
Boolean(text.signaturePadEmptyText);
|
|
181
|
+
const showLegacyFaceGuide = legacyVideoLayout && (!showFaceGuideThenSignaturePad || !sessionReady);
|
|
182
|
+
const showLegacySignaturePad = !legacyVideoLayout || !showFaceGuideThenSignaturePad || sessionReady;
|
|
183
|
+
const handleDone = useCallback(() => {
|
|
184
|
+
controller.actions.done();
|
|
185
|
+
}, [controller]);
|
|
186
|
+
const showSuccessScreen = useShowSuccessScreen(skipSuccessScreen, state.phase === "reviewing", handleDone);
|
|
187
|
+
function syncStrokes() {
|
|
188
|
+
const strokes = signatureRef.current?.toData() ?? [];
|
|
189
|
+
controller.actions.setStrokes(strokes);
|
|
190
|
+
}
|
|
191
|
+
function pointerSignal(type, event) {
|
|
192
|
+
const rect = event.currentTarget.getBoundingClientRect();
|
|
193
|
+
controller.actions.recordPointerSignal({
|
|
194
|
+
type,
|
|
195
|
+
pointerType: event.pointerType,
|
|
196
|
+
pressure: event.pressure,
|
|
197
|
+
x: event.clientX - rect.left,
|
|
198
|
+
y: event.clientY - rect.top,
|
|
199
|
+
at: event.timeStamp,
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
const signaturePanel = (_jsxs(SignaturePanel, { ref: signaturePanelRef, className: classNames.signaturePanel, "$empty": displayEmptyState, "$headTrackingSatisfied": headTrackingSatisfied, "$legacyVideoLayout": legacyVideoLayout, onPointerDown: (event) => pointerSignal("down", event), onPointerMove: (event) => pointerSignal("move", event), onPointerUp: (event) => pointerSignal("up", event), onPointerCancel: (event) => pointerSignal("cancel", event), children: [_jsx(SignatureCanvas, { ref: setSignatureRef, clearOnResize: false, canvasProps: {
|
|
203
|
+
width: canvasDimensions?.width,
|
|
204
|
+
height: canvasDimensions?.height,
|
|
205
|
+
className: classNames.canvas,
|
|
206
|
+
"aria-label": "Signature pad",
|
|
207
|
+
"aria-hidden": !showLegacySignaturePad
|
|
208
|
+
? true
|
|
209
|
+
: !legacyVideoLayout &&
|
|
210
|
+
showFaceGuideThenSignaturePad &&
|
|
211
|
+
!headTrackingSatisfied
|
|
212
|
+
? true
|
|
213
|
+
: undefined,
|
|
214
|
+
}, onBegin: syncStrokes, onEnd: syncStrokes }), !headTrackingSatisfied && text.headTrackingUnsatisfiedText ? (_jsx(SignaturePanelContent, { className: classNames.headTrackingUnsatisfiedContentContainer, "$legacyVideoLayout": legacyVideoLayout, children: _jsx(SignaturePanelContentInner, { className: classNames.headTrackingUnsatisfiedContentInner, children: text.headTrackingUnsatisfiedText }) })) : displayEmptyState ? (_jsx(SignaturePanelContent, { className: classNames.emptyContentContainer, "$legacyVideoLayout": legacyVideoLayout, onClick: () => setEmptyContentDismissed(true), children: _jsx(SignaturePanelContentInner, { className: classNames.emptyContentInner, children: text.signaturePadEmptyText }) })) : null, legacyVideoLayout &&
|
|
215
|
+
!signatureDisabled &&
|
|
216
|
+
((!text.signaturePadEmptyText && headTrackingSatisfied) ||
|
|
217
|
+
emptyContentDismissed) ? (_jsx(SignHereText, { children: text.signHereText })) : null] }));
|
|
218
|
+
const signatureButtons = (_jsxs(SignatureButtonsRow, { className: classNames.buttonsRow, "$legacyVideoLayout": legacyVideoLayout, children: [_jsx(LoaderButton, { variant: "secondary", finished: true, className: classNames.clearBtn, disabled: signatureDisabled ||
|
|
219
|
+
!headTrackingSatisfied ||
|
|
220
|
+
state.pointCount === 0 ||
|
|
221
|
+
state.phase !== "capturing", onClick: () => {
|
|
222
|
+
signatureRef.current?.clear();
|
|
223
|
+
void controller.actions.clear();
|
|
224
|
+
}, children: text.clearBtnText }), _jsx(AcceptButton, { variant: "positive", finished: state.phase !== "processing", className: classNames.acceptBtn, "$legacyVideoLayout": legacyVideoLayout, disabled: signatureDisabled ||
|
|
225
|
+
!headTrackingSatisfied ||
|
|
226
|
+
!state.guidance.satisfied ||
|
|
227
|
+
state.phase !== "capturing", onClick: () => void controller.actions.accept(), children: text.acceptBtnText })] }));
|
|
228
|
+
return (_jsxs(Root, { className: classNames.container, children: [onExit && state.phase !== "reviewing" && state.phase !== "completed" ? (_jsx(ExitCaptureButton, { onClick: onExit, className: classNames.exitBtn })) : null, _jsx(CameraLayer, { "$visible": forceCameraFeed || state.captureMode === "video", children: _jsx(CameraVideoTag, { ref: setVideoRef, isRearFacing: state.camera.isRearFacing, className: classNames.cameraFeed }) }), _jsxs(CaptureContent, { "$visible": (legacyVideoLayout && !sessionReady) ||
|
|
229
|
+
state.phase === "capturing" ||
|
|
230
|
+
state.phase === "processing", "$legacyVideoLayout": legacyVideoLayout, children: [!legacyVideoLayout &&
|
|
231
|
+
showFaceGuideThenSignaturePad &&
|
|
232
|
+
!headTrackingSatisfied ? (_jsx(FaceCaptureGuideOverlay, { status: faceGuideStatus })) : null, _jsxs(SignatureControls, { "$visible": legacyVideoLayout ||
|
|
233
|
+
!showFaceGuideThenSignaturePad ||
|
|
234
|
+
headTrackingSatisfied, "$legacyVideoLayout": legacyVideoLayout, className: classNames.guidesContainer, children: [text.headingText ? (_jsx(SignatureHeading, { className: classNames.heading, "$legacyVideoLayout": legacyVideoLayout, children: text.headingText })) : null, !legacyVideoLayout ? (_jsx(Guidance, { role: "status", "aria-live": "polite", className: classNames.guidance, children: guidance })) : null, legacyVideoLayout ? (_jsxs(LegacyGuidesInner, { className: classNames.guidesInner, children: [_jsx(LegacyFaceGuideContainer, { className: classNames.faceGuideContainer, "$visible": showLegacyFaceGuide, children: _jsx(LegacyFaceGuide, { className: classNames.faceGuide, status: sessionReady ? "success" : faceGuideStatus, verticalAlign: "bottom" }) }), _jsx(LegacySignaturePadContainer, { className: classNames.signaturePadContainer, "$visible": showLegacySignaturePad, children: _jsxs(LegacySignatureCanvasContainer, { className: `${classNames.signatureCanvasContainer ?? ""}${signatureDisabled &&
|
|
235
|
+
classNames.signatureCanvasContainerDisabled
|
|
236
|
+
? ` ${classNames.signatureCanvasContainerDisabled}`
|
|
237
|
+
: ""}`, "$disabled": signatureDisabled, "$headTrackingSatisfied": headTrackingSatisfied, children: [signaturePanel, signatureButtons] }) })] })) : (_jsxs(_Fragment, { children: [signaturePanel, signatureButtons] }))] })] }), (state.phase === "reviewing" || state.phase === "completed") &&
|
|
238
|
+
showSuccessScreen ? (_jsxs(Review, { className: classNames.review, children: [assets.successIcon ? _jsx("img", { src: assets.successIcon, alt: "" }) : null, _jsx("h1", { className: classNames.successHeading, children: text.successHeadingText }), previewUrl ? (_jsx("video", { src: previewUrl, className: classNames.reviewMedia, controls: true, playsInline: true })) : null, !previewUrl && state.artifact ? (_jsx("img", { src: state.artifact.imageDataUrl, alt: capturedSignatureAltText, className: classNames.reviewMedia })) : null, state.phase === "reviewing" ? (_jsxs(ButtonsRow, { className: classNames.buttonsRow, children: [_jsx(LoaderButton, { variant: "warning", finished: true, className: classNames.retryBtn, onClick: () => {
|
|
239
|
+
signatureRef.current?.clear();
|
|
240
|
+
void controller.actions.retry();
|
|
241
|
+
}, children: text.retryBtnText }), _jsx(LoaderButton, { variant: "positive", finished: true, className: classNames.doneBtn, onClick: handleDone, children: text.doneBtnText })] })) : null] })) : null, micDenied ? (_jsx(MicrophoneAccessDeniedOverlay, { onRetry: () => void controller.actions.retry(), classNames: classNames.microphoneAccessDenied, verbiage: verbiage?.microphoneAccessDenied })) : null, state.phase === "error" &&
|
|
242
|
+
!micDenied &&
|
|
243
|
+
recordingInterrupted &&
|
|
244
|
+
!restarting ? (_jsx(ErrorPanel, { role: "alert", className: classNames.error, children: RecordingInterruptedScreen ? (_jsx(RecordingInterruptedScreen, { onStartOver: handleStartOver, willCaptureSelfie: Boolean(onRestartRequested) })) : (_jsxs(_Fragment, { children: [_jsx(InterruptedIcon, { "aria-hidden": "true", className: classNames.recordingInterruptedIcon, children: _jsxs("svg", { width: "34", height: "34", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.7", strokeLinecap: "round", strokeLinejoin: "round", children: [_jsx("path", { d: "M15 10.5V7a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h9a2 2 0 0 0 2-2v-3.5l6 4.5V6z" }), _jsx("line", { x1: "2", y1: "22", x2: "22", y2: "2" })] }) }), _jsx(InterruptedHeading, { className: classNames.recordingInterruptedHeading, children: text.recordingInterruptedHeadingText }), _jsx(InterruptedBody, { className: classNames.recordingInterruptedText, children: text.recordingInterruptedText }), _jsx(InterruptedButton, { finished: true, className: classNames.startOverBtn, onClick: handleStartOver, children: text.startOverBtnText }), onRestartRequested ? (_jsx(InterruptedHint, { className: classNames.recordingInterruptedHint, children: text.recordingInterruptedHintText })) : null] })) })) : null, state.phase === "error" && !micDenied && !recordingInterrupted ? (_jsxs(ErrorPanel, { role: "alert", className: classNames.error, children: [_jsx("h1", { children: text.errorHeadingText }), _jsx("p", { children: state.error?.message }), state.error?.recoverable ? (_jsx(LoaderButton, { finished: true, onClick: () => void controller.actions.retry(), children: text.retryBtnText })) : null] })) : null] }));
|
|
245
|
+
}
|
|
246
|
+
const Root = styled.div `
|
|
247
|
+
position: relative;
|
|
248
|
+
width: 100%;
|
|
249
|
+
height: 100%;
|
|
250
|
+
min-height: 420px;
|
|
251
|
+
overflow: hidden;
|
|
252
|
+
background: ${(props) => props.theme.background ?? "#fff"};
|
|
253
|
+
color: ${(props) => props.theme.textColor ?? "#26332e"};
|
|
254
|
+
`;
|
|
255
|
+
const CameraLayer = styled.div `
|
|
256
|
+
position: absolute;
|
|
257
|
+
inset: 0;
|
|
258
|
+
display: ${(props) => (props.$visible ? "flex" : "none")};
|
|
259
|
+
isolation: isolate;
|
|
260
|
+
overflow: hidden;
|
|
261
|
+
`;
|
|
262
|
+
const CaptureContent = styled.div `
|
|
263
|
+
position: absolute;
|
|
264
|
+
inset: 0;
|
|
265
|
+
z-index: 1;
|
|
266
|
+
display: ${(props) => (props.$visible ? "flex" : "none")};
|
|
267
|
+
flex-direction: column;
|
|
268
|
+
align-items: center;
|
|
269
|
+
justify-content: center;
|
|
270
|
+
gap: ${(props) => (props.$legacyVideoLayout ? "0" : "16px")};
|
|
271
|
+
padding: ${(props) => (props.$legacyVideoLayout ? "40px" : "32px")};
|
|
272
|
+
background: ${(props) => props.$legacyVideoLayout ? "transparent" : "rgba(0, 0, 0, 0.2)"};
|
|
273
|
+
box-sizing: border-box;
|
|
274
|
+
|
|
275
|
+
h1 {
|
|
276
|
+
margin: 0;
|
|
277
|
+
padding: 8px 16px;
|
|
278
|
+
border-radius: 8px;
|
|
279
|
+
background: rgba(255, 255, 255, 0.92);
|
|
280
|
+
font-size: 1.25rem;
|
|
281
|
+
}
|
|
282
|
+
`;
|
|
283
|
+
const Guidance = styled.div `
|
|
284
|
+
padding: 8px 16px;
|
|
285
|
+
border-radius: 999px;
|
|
286
|
+
background: rgba(255, 255, 255, 0.92);
|
|
287
|
+
font-weight: 600;
|
|
288
|
+
`;
|
|
289
|
+
const SignatureHeading = styled.h1 `
|
|
290
|
+
${(props) => props.$legacyVideoLayout
|
|
291
|
+
? `
|
|
292
|
+
position: absolute;
|
|
293
|
+
z-index: 1001;
|
|
294
|
+
top: 12px;
|
|
295
|
+
left: 50%;
|
|
296
|
+
transform: translateX(-50%);
|
|
297
|
+
`
|
|
298
|
+
: ""}
|
|
299
|
+
`;
|
|
300
|
+
const SignatureControls = styled.div `
|
|
301
|
+
display: flex;
|
|
302
|
+
width: 100%;
|
|
303
|
+
height: ${(props) => (props.$legacyVideoLayout ? "100%" : "auto")};
|
|
304
|
+
max-height: ${(props) => (props.$legacyVideoLayout ? "1280px" : "none")};
|
|
305
|
+
margin: ${(props) => (props.$legacyVideoLayout ? "auto" : "0")};
|
|
306
|
+
flex-direction: column;
|
|
307
|
+
align-items: center;
|
|
308
|
+
gap: ${(props) => (props.$legacyVideoLayout ? "0" : "16px")};
|
|
309
|
+
visibility: ${(props) => (props.$visible ? "visible" : "hidden")};
|
|
310
|
+
pointer-events: ${(props) => (props.$visible ? "auto" : "none")};
|
|
311
|
+
`;
|
|
312
|
+
const LegacyGuidesInner = styled.div `
|
|
313
|
+
width: 100%;
|
|
314
|
+
height: 100%;
|
|
315
|
+
max-height: 1280px;
|
|
316
|
+
display: flex;
|
|
317
|
+
margin: auto;
|
|
318
|
+
align-items: center;
|
|
319
|
+
flex-direction: column;
|
|
320
|
+
`;
|
|
321
|
+
const LegacyFaceGuideContainer = styled.div `
|
|
322
|
+
position: relative;
|
|
323
|
+
height: 50%;
|
|
324
|
+
opacity: ${(props) => (props.$visible ? 1 : 0)};
|
|
325
|
+
transition: opacity 500ms ease-in-out;
|
|
326
|
+
transition-delay: 500ms;
|
|
327
|
+
pointer-events: none;
|
|
328
|
+
`;
|
|
329
|
+
const LegacyFaceGuide = styled(SelfieCaptureAnimatedMaskWithStatus) `
|
|
330
|
+
max-width: 100%;
|
|
331
|
+
height: 100%;
|
|
332
|
+
`;
|
|
333
|
+
const LegacySignaturePadContainer = styled.div `
|
|
334
|
+
position: relative;
|
|
335
|
+
max-width: 100%;
|
|
336
|
+
height: 50%;
|
|
337
|
+
aspect-ratio: 2;
|
|
338
|
+
opacity: ${(props) => (props.$visible ? 1 : 0)};
|
|
339
|
+
transition: opacity 500ms ease-in-out;
|
|
340
|
+
transition-delay: 500ms;
|
|
341
|
+
pointer-events: ${(props) => (props.$visible ? "auto" : "none")};
|
|
342
|
+
`;
|
|
343
|
+
const LegacySignatureCanvasContainer = styled.div `
|
|
344
|
+
position: absolute;
|
|
345
|
+
top: 0;
|
|
346
|
+
left: 0;
|
|
347
|
+
width: 100%;
|
|
348
|
+
height: calc(100% - 67px);
|
|
349
|
+
opacity: ${(props) => (props.$disabled ? 0.5 : 1)};
|
|
350
|
+
pointer-events: ${(props) => props.$disabled || !props.$headTrackingSatisfied ? "none" : "auto"};
|
|
351
|
+
`;
|
|
352
|
+
const SignaturePanel = styled.div `
|
|
353
|
+
position: relative;
|
|
354
|
+
display: flex;
|
|
355
|
+
width: ${(props) => (props.$legacyVideoLayout ? "100%" : "min(720px, 90vw)")};
|
|
356
|
+
height: ${(props) => (props.$legacyVideoLayout ? "100%" : "auto")};
|
|
357
|
+
align-items: center;
|
|
358
|
+
justify-content: center;
|
|
359
|
+
aspect-ratio: ${(props) => (props.$legacyVideoLayout ? "auto" : "2")};
|
|
360
|
+
overflow: hidden;
|
|
361
|
+
border: ${(props) => !props.$headTrackingSatisfied
|
|
362
|
+
? (props.theme.signatureCapture?.canvas?.headTrackingUnsatisfiedBorder ??
|
|
363
|
+
(props.$legacyVideoLayout
|
|
364
|
+
? "1px solid #dedede"
|
|
365
|
+
: "2px solid rgba(24, 41, 34, 0.72)"))
|
|
366
|
+
: props.$empty
|
|
367
|
+
? (props.theme.signatureCapture?.canvas?.emptyBorder ??
|
|
368
|
+
(props.$legacyVideoLayout
|
|
369
|
+
? "1px solid #dedede"
|
|
370
|
+
: "2px solid rgba(24, 41, 34, 0.72)"))
|
|
371
|
+
: (props.theme.signatureCapture?.canvas?.border ??
|
|
372
|
+
(props.$legacyVideoLayout
|
|
373
|
+
? "1px solid #dedede"
|
|
374
|
+
: "2px solid rgba(24, 41, 34, 0.72)"))};
|
|
375
|
+
border-radius: ${(props) => props.theme.signatureCapture?.canvas?.borderRadius ??
|
|
376
|
+
(props.$legacyVideoLayout ? "16px" : "12px")};
|
|
377
|
+
background: ${(props) => !props.$headTrackingSatisfied
|
|
378
|
+
? (props.theme.signatureCapture?.canvas
|
|
379
|
+
?.headTrackingUnsatisfiedBackground ??
|
|
380
|
+
(props.$legacyVideoLayout
|
|
381
|
+
? "rgba(255, 255, 255, 0.5)"
|
|
382
|
+
: "rgba(255, 255, 255, 0.86)"))
|
|
383
|
+
: props.$empty
|
|
384
|
+
? (props.theme.signatureCapture?.canvas?.emptyBackground ??
|
|
385
|
+
(props.$legacyVideoLayout
|
|
386
|
+
? "rgba(255, 255, 255, 0.5)"
|
|
387
|
+
: "rgba(255, 255, 255, 0.86)"))
|
|
388
|
+
: (props.theme.signatureCapture?.canvas?.background ??
|
|
389
|
+
(props.$legacyVideoLayout
|
|
390
|
+
? "rgba(255, 255, 255, 0.5)"
|
|
391
|
+
: "rgba(255, 255, 255, 0.86)"))};
|
|
392
|
+
color: ${(props) => !props.$headTrackingSatisfied
|
|
393
|
+
? (props.theme.signatureCapture?.canvas
|
|
394
|
+
?.headTrackingUnsatisfiedTextColor ?? "black")
|
|
395
|
+
: props.$empty
|
|
396
|
+
? (props.theme.signatureCapture?.canvas?.emptyTextColor ?? "black")
|
|
397
|
+
: "inherit"};
|
|
398
|
+
touch-action: none;
|
|
399
|
+
pointer-events: ${(props) => props.$headTrackingSatisfied ? "auto" : "none"};
|
|
400
|
+
|
|
401
|
+
canvas {
|
|
402
|
+
width: 100%;
|
|
403
|
+
height: 100%;
|
|
404
|
+
}
|
|
405
|
+
`;
|
|
406
|
+
const SignaturePanelContent = styled.div `
|
|
407
|
+
position: absolute;
|
|
408
|
+
inset: 0;
|
|
409
|
+
display: grid;
|
|
410
|
+
place-items: center;
|
|
411
|
+
padding: ${(props) => (props.$legacyVideoLayout ? "0" : "24px")};
|
|
412
|
+
background: ${(props) => props.$legacyVideoLayout ? "transparent" : "rgba(255, 255, 255, 0.92)"};
|
|
413
|
+
text-align: center;
|
|
414
|
+
pointer-events: auto;
|
|
415
|
+
`;
|
|
416
|
+
const SignaturePanelContentInner = styled.div `
|
|
417
|
+
display: grid;
|
|
418
|
+
place-items: center;
|
|
419
|
+
width: 100%;
|
|
420
|
+
height: 100%;
|
|
421
|
+
pointer-events: none;
|
|
422
|
+
`;
|
|
423
|
+
const SignHereText = styled.div `
|
|
424
|
+
position: absolute;
|
|
425
|
+
right: 0;
|
|
426
|
+
bottom: 18px;
|
|
427
|
+
left: 0;
|
|
428
|
+
display: flex;
|
|
429
|
+
width: 90%;
|
|
430
|
+
justify-content: center;
|
|
431
|
+
margin: 0 auto;
|
|
432
|
+
padding-top: 18px;
|
|
433
|
+
border-top: 2px solid black;
|
|
434
|
+
color: black;
|
|
435
|
+
font-size: 18px;
|
|
436
|
+
font-weight: bold;
|
|
437
|
+
pointer-events: none;
|
|
438
|
+
`;
|
|
439
|
+
const SignatureButtonsRow = styled(ButtonsRow) `
|
|
440
|
+
${(props) => props.$legacyVideoLayout
|
|
441
|
+
? `
|
|
442
|
+
position: relative;
|
|
443
|
+
z-index: 1000;
|
|
444
|
+
display: flex;
|
|
445
|
+
flex-grow: 0;
|
|
446
|
+
width: 100%;
|
|
447
|
+
padding-top: 12px;
|
|
448
|
+
`
|
|
449
|
+
: ""}
|
|
450
|
+
`;
|
|
451
|
+
const AcceptButton = styled(LoaderButton) `
|
|
452
|
+
margin-left: ${(props) => (props.$legacyVideoLayout ? "auto" : "0")};
|
|
453
|
+
`;
|
|
454
|
+
const Review = styled.div `
|
|
455
|
+
position: absolute;
|
|
456
|
+
inset: 0;
|
|
457
|
+
z-index: 2;
|
|
458
|
+
display: flex;
|
|
459
|
+
flex-direction: column;
|
|
460
|
+
align-items: center;
|
|
461
|
+
justify-content: center;
|
|
462
|
+
gap: 20px;
|
|
463
|
+
padding: 32px;
|
|
464
|
+
background: ${(props) => props.theme.background ?? "#fff"};
|
|
465
|
+
|
|
466
|
+
video,
|
|
467
|
+
img {
|
|
468
|
+
width: min(720px, 90vw);
|
|
469
|
+
max-height: 55vh;
|
|
470
|
+
object-fit: contain;
|
|
471
|
+
}
|
|
472
|
+
`;
|
|
473
|
+
/* The interrupted screen's own vocabulary. Every colour is a themeable
|
|
474
|
+
`--idm-color-*` custom property with the default palette's value as the
|
|
475
|
+
fallback, so a customer theme reaches this screen like any other. */
|
|
476
|
+
const InterruptedIcon = styled.div `
|
|
477
|
+
width: 72px;
|
|
478
|
+
height: 72px;
|
|
479
|
+
border-radius: 50%;
|
|
480
|
+
display: grid;
|
|
481
|
+
place-items: center;
|
|
482
|
+
margin-bottom: 22px;
|
|
483
|
+
color: var(--idm-color-warning-400, #ea8557);
|
|
484
|
+
background: var(--idm-color-warning-50, #fdf5ef);
|
|
485
|
+
border: 1px solid var(--idm-color-warning-200, #f6cdb2);
|
|
486
|
+
`;
|
|
487
|
+
/* Deliberately smaller than the generic error panel's h1: the icon carries the
|
|
488
|
+
weight, and a 30px shout reads as a crash rather than a recoverable pause. */
|
|
489
|
+
const InterruptedHeading = styled.h1 `
|
|
490
|
+
font-size: 21px;
|
|
491
|
+
font-weight: 650;
|
|
492
|
+
line-height: 1.3;
|
|
493
|
+
margin: 0 0 10px;
|
|
494
|
+
`;
|
|
495
|
+
const InterruptedBody = styled.p `
|
|
496
|
+
font-size: 15px;
|
|
497
|
+
line-height: 1.5;
|
|
498
|
+
margin: 0 0 28px;
|
|
499
|
+
max-width: 30ch;
|
|
500
|
+
color: var(--idm-color-secondary-500, #666666);
|
|
501
|
+
`;
|
|
502
|
+
const InterruptedButton = styled(LoaderButton) `
|
|
503
|
+
width: 100%;
|
|
504
|
+
max-width: 300px;
|
|
505
|
+
`;
|
|
506
|
+
const InterruptedHint = styled.div `
|
|
507
|
+
margin-top: 18px;
|
|
508
|
+
font-size: 13px;
|
|
509
|
+
color: var(--idm-color-secondary-400, #888888);
|
|
510
|
+
`;
|
|
511
|
+
const ErrorPanel = styled.div `
|
|
512
|
+
position: absolute;
|
|
513
|
+
inset: 0;
|
|
514
|
+
z-index: 3;
|
|
515
|
+
display: grid;
|
|
516
|
+
place-content: center;
|
|
517
|
+
justify-items: center;
|
|
518
|
+
padding: 32px;
|
|
519
|
+
text-align: center;
|
|
520
|
+
background: ${(props) => props.theme.background ?? "#fff"};
|
|
521
|
+
`;
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { type RefObject } from 'react';
|
|
2
|
+
import { type VideoIdCaptureController } from '@idmission/websdk-core/videoIdCapture';
|
|
3
|
+
import type { SubmissionArtifacts } from '@idmission/websdk-core/client';
|
|
4
|
+
import { type FlowOverlayClassNames, type FlowOverlayVerbiage } from './flows/overlays';
|
|
5
|
+
import { type IdCaptureLoadingOverlayAssets, type IdCaptureLoadingOverlayClassNames, type IdCaptureLoadingOverlayMode, type IdCaptureLoadingOverlayVerbiage } from './components/loading/IdCaptureLoadingOverlay';
|
|
6
|
+
import { type IdCaptureGuideImages } from './components/guide_images';
|
|
7
|
+
import type { FlipIdPromptClassNames } from './components/guides/FlipIdPrompt';
|
|
8
|
+
import { type CustomerSuppliedVerbiage, type LangOption } from './i18n';
|
|
9
|
+
export type VideoIdCaptureViewVerbiage = {
|
|
10
|
+
idFrontInstructionText?: CustomerSuppliedVerbiage;
|
|
11
|
+
idBackInstructionText?: CustomerSuppliedVerbiage;
|
|
12
|
+
passportInstructionText?: CustomerSuppliedVerbiage;
|
|
13
|
+
flipIdInstructionText?: CustomerSuppliedVerbiage;
|
|
14
|
+
searchingForIdCardText?: CustomerSuppliedVerbiage;
|
|
15
|
+
captureBtnText?: CustomerSuppliedVerbiage;
|
|
16
|
+
headingText?: CustomerSuppliedVerbiage;
|
|
17
|
+
retryBtnText?: CustomerSuppliedVerbiage;
|
|
18
|
+
doneBtnText?: CustomerSuppliedVerbiage;
|
|
19
|
+
errorHeadingText?: CustomerSuppliedVerbiage;
|
|
20
|
+
frontImageAlt?: CustomerSuppliedVerbiage;
|
|
21
|
+
backImageAlt?: CustomerSuppliedVerbiage;
|
|
22
|
+
loadingOverlay?: IdCaptureLoadingOverlayVerbiage;
|
|
23
|
+
/**
|
|
24
|
+
* The read-aloud stage, keyed exactly as sdk2's `ReadTextPrompt` keys it
|
|
25
|
+
* (components/read_text_prompt/ReadTextPrompt.tsx:32-36) so its shipped
|
|
26
|
+
* translations apply.
|
|
27
|
+
*/
|
|
28
|
+
readTextHeadingText?: CustomerSuppliedVerbiage;
|
|
29
|
+
readTextDoneBtnText?: CustomerSuppliedVerbiage;
|
|
30
|
+
/** sdk2 parity: the microphone-denied screen this stage can hit. */
|
|
31
|
+
microphoneAccessDenied?: FlowOverlayVerbiage;
|
|
32
|
+
};
|
|
33
|
+
export type VideoIdCaptureViewClassNames = {
|
|
34
|
+
container?: string;
|
|
35
|
+
cameraFeed?: string;
|
|
36
|
+
guides?: string;
|
|
37
|
+
guidance?: string;
|
|
38
|
+
/** The box around the guidance line, sdk2's `guidanceMessageContainer`. */
|
|
39
|
+
guidanceContainer?: string;
|
|
40
|
+
faceGuideContainer?: string;
|
|
41
|
+
faceGuide?: string;
|
|
42
|
+
idCardGuideContainer?: string;
|
|
43
|
+
idCardGuideInner?: string;
|
|
44
|
+
idCardGuideImageContainer?: string;
|
|
45
|
+
idCardGuideImage?: string;
|
|
46
|
+
flipIdPrompt?: FlipIdPromptClassNames;
|
|
47
|
+
countdown?: string;
|
|
48
|
+
captureBtn?: string;
|
|
49
|
+
exitBtn?: string;
|
|
50
|
+
review?: string;
|
|
51
|
+
reviewHeading?: string;
|
|
52
|
+
video?: string;
|
|
53
|
+
frontImage?: string;
|
|
54
|
+
backImage?: string;
|
|
55
|
+
buttonsRow?: string;
|
|
56
|
+
retryBtn?: string;
|
|
57
|
+
doneBtn?: string;
|
|
58
|
+
error?: string;
|
|
59
|
+
readTextPrompt?: string;
|
|
60
|
+
readTextHeading?: string;
|
|
61
|
+
readTextSentence?: string;
|
|
62
|
+
readTextDoneBtn?: string;
|
|
63
|
+
loadingOverlay?: IdCaptureLoadingOverlayClassNames;
|
|
64
|
+
microphoneAccessDenied?: FlowOverlayClassNames;
|
|
65
|
+
};
|
|
66
|
+
export type VideoIdCaptureViewProps = {
|
|
67
|
+
controller: VideoIdCaptureController;
|
|
68
|
+
sessionReady?: boolean;
|
|
69
|
+
autoStart?: boolean;
|
|
70
|
+
loadingOverlayMode?: IdCaptureLoadingOverlayMode;
|
|
71
|
+
autoContinueAfterLoading?: boolean;
|
|
72
|
+
showIntroScreen?: boolean;
|
|
73
|
+
transitionFromFaceCapture?: boolean;
|
|
74
|
+
lang?: LangOption;
|
|
75
|
+
onExit?: () => void;
|
|
76
|
+
onCompleted?: (artifacts: SubmissionArtifacts) => void;
|
|
77
|
+
verbiage?: VideoIdCaptureViewVerbiage;
|
|
78
|
+
classNames?: VideoIdCaptureViewClassNames;
|
|
79
|
+
guideImages?: IdCaptureGuideImages;
|
|
80
|
+
loadingOverlayAssets?: IdCaptureLoadingOverlayAssets;
|
|
81
|
+
videoRef?: RefObject<HTMLVideoElement | null>;
|
|
82
|
+
/** Shows live detector scores and controller gates during capture. */
|
|
83
|
+
debugMode?: boolean;
|
|
84
|
+
/**
|
|
85
|
+
* The sentence the user is asked to read aloud once the ID is captured —
|
|
86
|
+
* sdk2's `readTextPrompt`. Its PRESENCE is what turns the stage on at the
|
|
87
|
+
* view level; the controller needs `readText: true` to record the audio.
|
|
88
|
+
*/
|
|
89
|
+
readTextPrompt?: CustomerSuppliedVerbiage;
|
|
90
|
+
/**
|
|
91
|
+
* Fires when the user says they are done reading. Defaults to the
|
|
92
|
+
* controller's own `finishReading`, which the Done button calls; a host
|
|
93
|
+
* only needs this to observe it.
|
|
94
|
+
*/
|
|
95
|
+
onReadingFinished?: () => void;
|
|
96
|
+
/**
|
|
97
|
+
* Fires once when the controller reports `MICROPHONE_PERMISSION_DENIED` —
|
|
98
|
+
* sdk2's `onMicrophoneAccessDenied`. A notification: the capture continues
|
|
99
|
+
* without audio rather than stopping.
|
|
100
|
+
*/
|
|
101
|
+
onMicrophoneAccessDenied?: () => void;
|
|
102
|
+
};
|
|
103
|
+
export declare function VideoIdCaptureView({ controller, sessionReady: sessionReadyProp, autoStart, loadingOverlayMode, autoContinueAfterLoading, showIntroScreen, transitionFromFaceCapture, lang, onExit, onCompleted, readTextPrompt, onReadingFinished, onMicrophoneAccessDenied, verbiage, classNames, guideImages, loadingOverlayAssets, videoRef: providedVideoRef, debugMode, }: VideoIdCaptureViewProps): import("react/jsx-runtime").JSX.Element;
|
|
104
|
+
//# sourceMappingURL=VideoIdCaptureView.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VideoIdCaptureView.d.ts","sourceRoot":"","sources":["../src/VideoIdCaptureView.tsx"],"names":[],"mappings":"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"}
|