@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,475 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, useMemo, useState } from 'react';
|
|
3
|
+
import { getDecoderStatus, parseAAMVABarcode, } from '@idmission/websdk-core/barcode';
|
|
4
|
+
import { styled } from 'styled-components';
|
|
5
|
+
export function ReviewDocumentDiagnostics({ document, diagnostics, }) {
|
|
6
|
+
if (document.documentType === 'idBarcodeImage') {
|
|
7
|
+
return (_jsxs(DebugInfoContainer, { children: [_jsxs(DebugSection, { children: [_jsx(DebugLabel, { children: "Document Type:" }), _jsx(DebugValue, { children: document.documentType })] }), _jsxs(DebugSection, { children: [_jsx(DebugLabel, { children: "Readability Score:" }), _jsx(ScoreBadge, { "$score": document.barcodeReadabilityScore ?? 0, "$type": "readability", children: (document.barcodeReadabilityScore ?? 0).toFixed(3) })] }), diagnostics.initialBarcodeScore !== undefined ? (diagnostics.recaptureBarcodeScore !== null ? (_jsxs(BarcodeComparisonCard, { children: [_jsx(ComparisonHeader, { children: "\uD83D\uDCCA Barcode Recapture Analysis" }), _jsxs(ComparisonRow, { children: [_jsx(ComparisonLabel, { children: "Initial Capture:" }), _jsx(ComparisonScoreBadge, { children: diagnostics.initialBarcodeScore.toFixed(3) })] }), _jsxs(ComparisonRow, { children: [_jsx(ComparisonLabel, { children: "After Recapture:" }), _jsx(ComparisonScoreBadge, { children: diagnostics.recaptureBarcodeScore.toFixed(3) })] }), _jsx(ComparisonDivider, {}), _jsxs(ComparisonRow, { children: [_jsx(ComparisonLabel, { children: "Improvement:" }), _jsxs(ImprovementBadge, { "$improved": diagnostics.recaptureBarcodeScore > diagnostics.initialBarcodeScore, children: [diagnostics.recaptureBarcodeScore > diagnostics.initialBarcodeScore ? '↑' : '→', ' ', Math.abs(diagnostics.recaptureBarcodeScore - diagnostics.initialBarcodeScore).toFixed(3), ' ', "(", diagnostics.recaptureBarcodeScore > diagnostics.initialBarcodeScore
|
|
8
|
+
? 'Better'
|
|
9
|
+
: 'Same/Worse', ")"] })] }), diagnostics.initialCaptureBarcodeImage || diagnostics.recaptureBarcodeImage ? (_jsxs(_Fragment, { children: [_jsx(ComparisonDivider, {}), _jsx(ComparisonHeader, { style: { marginTop: '0.25rem' }, children: "\uD83D\uDD0D Visual Comparison" }), _jsxs(BarcodeComparisonImagesContainer, { children: [diagnostics.initialCaptureBarcodeImage ? (_jsxs(BarcodeComparisonImageWrapper, { children: [_jsx(BarcodeComparisonImageLabel, { children: "Initial Capture" }), _jsx(BarcodeComparisonImage, { src: diagnostics.initialCaptureBarcodeImage, alt: "Initial capture barcode", onDoubleClick: () => downloadImage(diagnostics.initialCaptureBarcodeImage, `barcode-initial-${diagnostics.initialBarcodeScore?.toFixed(3)}.jpg`), title: "Double-click to download" }), _jsx(BarcodeComparisonScoreLabel, { "$isHigher": diagnostics.initialBarcodeScore >= diagnostics.recaptureBarcodeScore, children: diagnostics.initialBarcodeScore.toFixed(3) })] })) : null, diagnostics.recaptureBarcodeImage ? (_jsxs(BarcodeComparisonImageWrapper, { children: [_jsx(BarcodeComparisonImageLabel, { children: "Recapture" }), _jsx(BarcodeComparisonImage, { src: diagnostics.recaptureBarcodeImage, alt: "Recapture barcode", onDoubleClick: () => downloadImage(diagnostics.recaptureBarcodeImage, `barcode-recapture-${diagnostics.recaptureBarcodeScore?.toFixed(3)}.jpg`), title: "Double-click to download" }), _jsx(BarcodeComparisonScoreLabel, { "$isHigher": diagnostics.recaptureBarcodeScore > diagnostics.initialBarcodeScore, children: diagnostics.recaptureBarcodeScore.toFixed(3) })] })) : null] })] })) : null] })) : (_jsxs(BarcodeComparisonCard, { children: [_jsx(ComparisonHeader, { children: "\u26A0\uFE0F Recapture Attempted" }), _jsxs(ComparisonRow, { children: [_jsx(ComparisonLabel, { children: "Initial Score:" }), _jsx(ComparisonScoreBadge, { children: diagnostics.initialBarcodeScore.toFixed(3) })] }), _jsxs(ComparisonRow, { children: [_jsx(ComparisonLabel, { children: "Recapture Result:" }), _jsx(ComparisonValue, { children: "No barcode found" })] }), diagnostics.initialCaptureBarcodeImage ? (_jsxs(_Fragment, { children: [_jsx(ComparisonDivider, {}), _jsx(ComparisonHeader, { style: { marginTop: '0.25rem' }, children: "\uD83D\uDD0D Barcode Image (kept)" }), _jsx(BarcodeComparisonImagesContainer, { style: { gridTemplateColumns: '1fr' }, children: _jsxs(BarcodeComparisonImageWrapper, { children: [_jsx(BarcodeComparisonImageLabel, { children: "Initial Capture" }), _jsx(BarcodeComparisonImage, { src: diagnostics.initialCaptureBarcodeImage, alt: "Initial capture barcode", onDoubleClick: () => downloadImage(diagnostics.initialCaptureBarcodeImage, `barcode-initial-${diagnostics.initialBarcodeScore?.toFixed(3)}.jpg`), title: "Double-click to download" }), _jsx(BarcodeComparisonScoreLabel, { "$isHigher": true, children: diagnostics.initialBarcodeScore.toFixed(3) })] }) })] })) : null] }))) : null] }));
|
|
10
|
+
}
|
|
11
|
+
return (_jsxs(DebugInfoContainer, { children: [_jsxs(DebugSection, { children: [_jsx(DebugLabel, { children: "Document Type:" }), _jsx(DebugValue, { children: document.documentType })] }), _jsxs(DebugSection, { children: [_jsx(DebugLabel, { children: "Detection Score:" }), _jsx(ScoreBadge, { "$score": document.detectionScore ?? 0, "$type": "detection", children: (document.detectionScore ?? 0).toFixed(3) })] }), _jsxs(DebugSection, { children: [_jsx(DebugLabel, { children: "Focus Score:" }), _jsx(ScoreBadge, { "$score": document.focusScore ?? 0, "$type": "focus", children: (document.focusScore ?? 0).toFixed(3) })] }), document.maxGlareScore !== undefined ? (_jsxs(DebugSection, { children: [_jsx(DebugLabel, { children: "Max Glare Score:" }), _jsx(DebugValue, { children: document.maxGlareScore.toFixed(3) })] })) : null, document.maxHologramScore !== undefined ? (_jsxs(DebugSection, { children: [_jsx(DebugLabel, { children: "Max Hologram Score:" }), _jsx(DebugValue, { children: document.maxHologramScore.toFixed(3) })] })) : null, _jsxs(DebugSection, { children: [_jsx(DebugLabel, { children: "Bounding Box:" }), _jsx(DebugValue, { children: JSON.stringify(document.boundingBox, null, 2) })] })] }));
|
|
12
|
+
}
|
|
13
|
+
function downloadImage(dataUrl, filename) {
|
|
14
|
+
const link = document.createElement('a');
|
|
15
|
+
link.href = dataUrl;
|
|
16
|
+
link.download = filename;
|
|
17
|
+
document.body.appendChild(link);
|
|
18
|
+
link.click();
|
|
19
|
+
document.body.removeChild(link);
|
|
20
|
+
}
|
|
21
|
+
export function ReviewDiagnosticsPanel({ capturedDocuments, diagnostics, }) {
|
|
22
|
+
const parsedNativeBarcodeData = useMemo(() => {
|
|
23
|
+
if (!diagnostics.nativeBarcodeDecodeResult?.text)
|
|
24
|
+
return null;
|
|
25
|
+
try {
|
|
26
|
+
return parseAAMVABarcode(diagnostics.nativeBarcodeDecodeResult.text);
|
|
27
|
+
}
|
|
28
|
+
catch {
|
|
29
|
+
return null;
|
|
30
|
+
}
|
|
31
|
+
}, [diagnostics.nativeBarcodeDecodeResult]);
|
|
32
|
+
const [decoderStatus, setDecoderStatus] = useState(null);
|
|
33
|
+
useEffect(() => {
|
|
34
|
+
if (diagnostics.nativeBarcodeDecodeDetails)
|
|
35
|
+
return;
|
|
36
|
+
let active = true;
|
|
37
|
+
void getDecoderStatus().then((status) => {
|
|
38
|
+
if (active)
|
|
39
|
+
setDecoderStatus(status);
|
|
40
|
+
}, () => { });
|
|
41
|
+
return () => {
|
|
42
|
+
active = false;
|
|
43
|
+
};
|
|
44
|
+
}, [diagnostics.nativeBarcodeDecodeDetails]);
|
|
45
|
+
const shouldShow = diagnostics.nativeBarcodeDecodeResult !== null ||
|
|
46
|
+
diagnostics.nativeBarcodeDecodeAttempted ||
|
|
47
|
+
capturedDocuments.idBarcodeImage === undefined ||
|
|
48
|
+
capturedDocuments.idCardBack !== undefined;
|
|
49
|
+
if (!shouldShow)
|
|
50
|
+
return null;
|
|
51
|
+
const decodeResult = diagnostics.nativeBarcodeDecodeResult;
|
|
52
|
+
const decodeDetails = diagnostics.nativeBarcodeDecodeDetails;
|
|
53
|
+
return (_jsxs(BarcodeResultsSection, { children: [capturedDocuments.idBarcodeImage ? null : (_jsx(NoPDF417Warning, { children: "\u26A0\uFE0F No PDF417 barcode detected during capture" })), decodeResult?.text.trim() ? (_jsxs(NativeBarcodeResultCard, { children: [_jsxs(NativeBarcodeHeader, { children: ["\uD83D\uDD0D Native Decode (", decodeResult.method === 'native' ? 'BarcodeDetector API' : 'zxing-js', ")"] }), parsedNativeBarcodeData && parsedNativeBarcodeData.fields.length > 0 ? (_jsx(NativeBarcodeFieldsTable, { children: _jsx("tbody", { children: parsedNativeBarcodeData.fields.map((field) => (_jsxs(NativeBarcodeFieldTableRow, { children: [_jsx(NativeBarcodeFieldLabelCell, { children: field.label }), _jsx(NativeBarcodeFieldValueCell, { children: field.value })] }, field.code))) }) })) : (_jsxs(NativeBarcodeRow, { children: [_jsx(NativeBarcodeLabel, { children: "Raw Data:" }), _jsx(NativeBarcodeData, { children: decodeResult.text })] }))] })) : diagnostics.nativeBarcodeDecodeAttempted ? (_jsxs(NativeBarcodeFailedCard, { children: [_jsx(NativeBarcodeFailedHeader, { children: "\u274C Native Decode Failed" }), _jsx(NativeBarcodeFailedText, { children: "Barcode image was captured but could not be decoded by native parser (BarcodeDetector API / zxing-js)" }), _jsxs(BarcodeAttemptStats, { children: [_jsxs(StatRow, { children: [_jsx(StatLabel, { children: "PDF417 Above Threshold:" }), _jsx(StatValue, { children: diagnostics.pdf417DetectionCount })] }), _jsxs(StatRow, { children: [_jsx(StatLabel, { children: "PDF417 Below Threshold:" }), _jsx(StatValue, { children: diagnostics.pdf417LowScoreCount })] }), _jsxs(StatRow, { children: [_jsx(StatLabel, { children: "ZXing Parse Attempts:" }), _jsx(StatValue, { children: diagnostics.zxingParseAttemptCount })] })] })] })) : capturedDocuments.idBarcodeImage ? (_jsxs(NativeBarcodeNotAttemptedCard, { children: [_jsx(NativeBarcodeNotAttemptedHeader, { children: "\u23F3 Native Decode Pending" }), _jsx(NativeBarcodeNotAttemptedText, { children: "Barcode image captured, waiting for decode..." })] })) : capturedDocuments.idCardBack ? (_jsxs(NativeBarcodeNotAttemptedCard, { children: [_jsx(NativeBarcodeNotAttemptedHeader, { children: "\u26A0\uFE0F Native Decode Not Attempted" }), _jsx(NativeBarcodeNotAttemptedText, { children: "No barcode image was captured, so native decode was not attempted" })] })) : null, decodeDetails ? (_jsxs(DecoderDiagnosticsCard, { children: [_jsx(DecoderDiagnosticsHeader, { children: "\uD83D\uDD27 Decoder Diagnostics (Detailed)" }), _jsx(DecoderDiagnosticsTable, { children: _jsxs("tbody", { children: [_jsxs(DecoderDiagnosticsRow, { children: [_jsx(DecoderDiagnosticsLabel, { children: "BarcodeDetector API:" }), _jsx(DecoderDiagnosticsValue, { children: _jsx(DiagnosticsBadge, { "$ok": decodeDetails.nativeApi.available, children: decodeDetails.nativeApi.available ? 'Available' : 'Not Available' }) })] }), _jsxs(DecoderDiagnosticsRow, { children: [_jsx(DecoderDiagnosticsLabel, { children: "Native PDF417 Support:" }), _jsx(DecoderDiagnosticsValue, { children: _jsx(DiagnosticsBadge, { "$ok": decodeDetails.nativeApi.supportsPDF417, children: decodeDetails.nativeApi.supportsPDF417 ? 'Yes' : 'No' }) })] }), _jsxs(DecoderDiagnosticsRow, { children: [_jsx(DecoderDiagnosticsLabel, { children: "Native Attempted:" }), _jsx(DecoderDiagnosticsValue, { children: _jsx(DiagnosticsBadge, { "$ok": decodeDetails.nativeApi.attempted, children: decodeDetails.nativeApi.attempted ? 'Yes' : 'No' }) })] }), decodeDetails.nativeApi.attempted ? (_jsxs(DecoderDiagnosticsRow, { children: [_jsx(DecoderDiagnosticsLabel, { children: "Native Result:" }), _jsx(DecoderDiagnosticsValue, { children: _jsx(DiagnosticsBadge, { "$ok": decodeDetails.nativeApi.result === 'success', "$highlight": decodeDetails.nativeApi.result === 'success', children: decodeDetails.nativeApi.result || 'N/A' }) })] })) : null, _jsxs(DecoderDiagnosticsRow, { children: [_jsx(DecoderDiagnosticsLabel, { children: "ZXing Attempted:" }), _jsx(DecoderDiagnosticsValue, { children: _jsx(DiagnosticsBadge, { "$ok": decodeDetails.zxing.attempted, children: decodeDetails.zxing.attempted ? 'Yes' : 'No' }) })] }), decodeDetails.zxing.attempted ? (_jsxs(DecoderDiagnosticsRow, { children: [_jsx(DecoderDiagnosticsLabel, { children: "ZXing Result:" }), _jsx(DecoderDiagnosticsValue, { children: _jsx(DiagnosticsBadge, { "$ok": decodeDetails.zxing.result === 'success', "$highlight": decodeDetails.zxing.result === 'success', children: decodeDetails.zxing.result || 'N/A' }) })] })) : null, decodeDetails.imageUsed ? (_jsxs(DecoderDiagnosticsRow, { children: [_jsx(DecoderDiagnosticsLabel, { children: "Image Used:" }), _jsx(DecoderDiagnosticsValue, { children: _jsx(DiagnosticsBadge, { "$ok": true, "$highlight": decodeDetails.imageUsed === 'fallback', children: decodeDetails.imageUsed === 'primary' ? 'Primary' : 'Fallback' }) })] })) : null, decodeDetails.rotationApplied !== null ? (_jsxs(DecoderDiagnosticsRow, { children: [_jsx(DecoderDiagnosticsLabel, { children: "Rotation Applied:" }), _jsx(DecoderDiagnosticsValue, { children: _jsx(DiagnosticsBadge, { "$ok": true, "$highlight": decodeDetails.rotationApplied !== 0, children: decodeDetails.rotationApplied === 0
|
|
54
|
+
? 'None'
|
|
55
|
+
: `${decodeDetails.rotationApplied}°` }) })] })) : null, _jsxs(DecoderDiagnosticsRow, { children: [_jsx(DecoderDiagnosticsLabel, { children: "Decode Time:" }), _jsx(DecoderDiagnosticsValue, { children: _jsxs(DiagnosticsBadge, { "$ok": true, children: [decodeDetails.durationMs, "ms"] }) })] }), decodeDetails.rotationsAttempted.rotated90 ||
|
|
56
|
+
decodeDetails.rotationsAttempted.rotated270 ? (_jsxs(_Fragment, { children: [_jsx(DecoderDiagnosticsRow, { children: _jsx(DecoderDiagnosticsLabel, { colSpan: 2, style: { fontWeight: 700, paddingTop: '0.5rem' }, children: "Rotation Attempts:" }) }), _jsx(RotationAttemptRow, { label: "Original (0\u00B0):", attempt: decodeDetails.rotationsAttempted.original }), decodeDetails.rotationsAttempted.rotated90 ? (_jsx(RotationAttemptRow, { label: "Rotated 90\u00B0:", attempt: decodeDetails.rotationsAttempted.rotated90 })) : null, decodeDetails.rotationsAttempted.rotated270 ? (_jsx(RotationAttemptRow, { label: "Rotated 270\u00B0:", attempt: decodeDetails.rotationsAttempted.rotated270 })) : null] })) : null, decodeDetails.nativeApi.errorMessage ? (_jsxs(DecoderDiagnosticsRow, { children: [_jsx(DecoderDiagnosticsLabel, { children: "Native Error:" }), _jsx(DecoderDiagnosticsValue, { children: _jsx(DiagnosticsBadge, { "$ok": false, children: decodeDetails.nativeApi.errorMessage }) })] })) : null, decodeDetails.zxing.errorMessage ? (_jsxs(DecoderDiagnosticsRow, { children: [_jsx(DecoderDiagnosticsLabel, { children: "ZXing Error:" }), _jsx(DecoderDiagnosticsValue, { children: _jsx(DiagnosticsBadge, { "$ok": false, children: decodeDetails.zxing.errorMessage }) })] })) : null] }) })] })) : decoderStatus ? (_jsxs(DecoderDiagnosticsCard, { children: [_jsx(DecoderDiagnosticsHeader, { children: "\uD83D\uDD27 Decoder Diagnostics" }), _jsx(DecoderDiagnosticsTable, { children: _jsxs("tbody", { children: [_jsxs(DecoderDiagnosticsRow, { children: [_jsx(DecoderDiagnosticsLabel, { children: "BarcodeDetector API:" }), _jsx(DecoderDiagnosticsValue, { children: _jsx(DiagnosticsBadge, { "$ok": decoderStatus.nativeSupported, children: decoderStatus.nativeSupported ? 'Available' : 'Not Available' }) })] }), _jsxs(DecoderDiagnosticsRow, { children: [_jsx(DecoderDiagnosticsLabel, { children: "Native PDF417 Support:" }), _jsx(DecoderDiagnosticsValue, { children: _jsx(DiagnosticsBadge, { "$ok": decoderStatus.nativePDF417Supported, children: decoderStatus.nativePDF417Supported ? 'Yes' : 'No' }) })] }), _jsxs(DecoderDiagnosticsRow, { children: [_jsx(DecoderDiagnosticsLabel, { children: "ZXing Fallback:" }), _jsx(DecoderDiagnosticsValue, { children: _jsx(DiagnosticsBadge, { "$ok": decoderStatus.zxingLoaded, children: decoderStatus.zxingLoading
|
|
57
|
+
? 'Loading...'
|
|
58
|
+
: decoderStatus.zxingLoaded
|
|
59
|
+
? 'Loaded'
|
|
60
|
+
: 'Not Loaded' }) })] })] }) })] })) : null] }));
|
|
61
|
+
}
|
|
62
|
+
function RotationAttemptRow({ label, attempt }) {
|
|
63
|
+
const succeeded = attempt.nativeResult === 'success' || attempt.zxingResult === 'success';
|
|
64
|
+
return (_jsxs(DecoderDiagnosticsRow, { children: [_jsx(DecoderDiagnosticsLabel, { children: label }), _jsx(DecoderDiagnosticsValue, { children: _jsxs(DiagnosticsBadge, { "$ok": succeeded, children: ["N: ", attempt.nativeResult || '-', " | Z: ", attempt.zxingResult || '-'] }) })] }));
|
|
65
|
+
}
|
|
66
|
+
const DebugInfoContainer = styled.div `
|
|
67
|
+
display: flex;
|
|
68
|
+
flex-direction: column;
|
|
69
|
+
gap: 0.375rem;
|
|
70
|
+
margin-top: 0.5rem;
|
|
71
|
+
margin-bottom: 1rem;
|
|
72
|
+
padding: 0.625rem;
|
|
73
|
+
background: #f8f9fa;
|
|
74
|
+
border-radius: 6px;
|
|
75
|
+
border: 1px solid #e9ecef;
|
|
76
|
+
font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
|
|
77
|
+
font-size: 0.8125rem;
|
|
78
|
+
line-height: 1.35;
|
|
79
|
+
text-align: left;
|
|
80
|
+
`;
|
|
81
|
+
const DebugSection = styled.div `
|
|
82
|
+
display: flex;
|
|
83
|
+
align-items: center;
|
|
84
|
+
gap: 0.5rem;
|
|
85
|
+
margin: 0;
|
|
86
|
+
`;
|
|
87
|
+
const DebugLabel = styled.span `
|
|
88
|
+
width: 110px;
|
|
89
|
+
flex-shrink: 0;
|
|
90
|
+
color: #495057;
|
|
91
|
+
font-size: 0.8125rem;
|
|
92
|
+
font-weight: 600;
|
|
93
|
+
`;
|
|
94
|
+
const DebugValue = styled.span `
|
|
95
|
+
color: #212529;
|
|
96
|
+
font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
|
|
97
|
+
font-size: 0.8125rem;
|
|
98
|
+
`;
|
|
99
|
+
const ScoreBadge = styled.span `
|
|
100
|
+
display: inline-flex;
|
|
101
|
+
align-items: center;
|
|
102
|
+
padding: 0.1875rem 0.5rem;
|
|
103
|
+
border: 1px solid
|
|
104
|
+
${({ $score, $type }) => {
|
|
105
|
+
const thresholds = $type === 'readability' ? { good: 0.5, medium: 0.2 } : { good: 0.7, medium: 0.4 };
|
|
106
|
+
if ($score >= thresholds.good)
|
|
107
|
+
return '#c3e6cb';
|
|
108
|
+
if ($score >= thresholds.medium)
|
|
109
|
+
return '#ffeaa7';
|
|
110
|
+
return '#f5c6cb';
|
|
111
|
+
}};
|
|
112
|
+
border-radius: 4px;
|
|
113
|
+
background: ${({ $score, $type }) => {
|
|
114
|
+
const thresholds = $type === 'readability' ? { good: 0.5, medium: 0.2 } : { good: 0.7, medium: 0.4 };
|
|
115
|
+
if ($score >= thresholds.good)
|
|
116
|
+
return '#d4edda';
|
|
117
|
+
if ($score >= thresholds.medium)
|
|
118
|
+
return '#fff3cd';
|
|
119
|
+
return '#f8d7da';
|
|
120
|
+
}};
|
|
121
|
+
color: ${({ $score, $type }) => {
|
|
122
|
+
const thresholds = $type === 'readability' ? { good: 0.5, medium: 0.2 } : { good: 0.7, medium: 0.4 };
|
|
123
|
+
if ($score >= thresholds.good)
|
|
124
|
+
return '#155724';
|
|
125
|
+
if ($score >= thresholds.medium)
|
|
126
|
+
return '#856404';
|
|
127
|
+
return '#721c24';
|
|
128
|
+
}};
|
|
129
|
+
font-size: 0.75rem;
|
|
130
|
+
font-weight: 600;
|
|
131
|
+
`;
|
|
132
|
+
const BarcodeComparisonCard = styled.div `
|
|
133
|
+
margin-top: 0.375rem;
|
|
134
|
+
padding: 0.625rem;
|
|
135
|
+
background: #e7f3ff;
|
|
136
|
+
border: 1px solid #b3d9ff;
|
|
137
|
+
border-radius: 6px;
|
|
138
|
+
`;
|
|
139
|
+
const ComparisonHeader = styled.div `
|
|
140
|
+
display: flex;
|
|
141
|
+
align-items: center;
|
|
142
|
+
gap: 0.375rem;
|
|
143
|
+
margin-bottom: 0.375rem;
|
|
144
|
+
color: #004085;
|
|
145
|
+
font-size: 0.8125rem;
|
|
146
|
+
font-weight: 700;
|
|
147
|
+
`;
|
|
148
|
+
const ComparisonRow = styled.div `
|
|
149
|
+
display: flex;
|
|
150
|
+
align-items: center;
|
|
151
|
+
justify-content: space-between;
|
|
152
|
+
gap: 0.75rem;
|
|
153
|
+
margin-bottom: 0.25rem;
|
|
154
|
+
font-size: 0.8125rem;
|
|
155
|
+
|
|
156
|
+
&:last-child {
|
|
157
|
+
margin-bottom: 0;
|
|
158
|
+
}
|
|
159
|
+
`;
|
|
160
|
+
const ComparisonLabel = styled.span `
|
|
161
|
+
color: #495057;
|
|
162
|
+
font-weight: 500;
|
|
163
|
+
`;
|
|
164
|
+
const ComparisonValue = styled.span `
|
|
165
|
+
color: #212529;
|
|
166
|
+
font-weight: 600;
|
|
167
|
+
`;
|
|
168
|
+
const ComparisonDivider = styled.hr `
|
|
169
|
+
margin: 0.375rem 0;
|
|
170
|
+
border: none;
|
|
171
|
+
border-top: 1px solid #b3d9ff;
|
|
172
|
+
`;
|
|
173
|
+
const ComparisonScoreBadge = styled.span `
|
|
174
|
+
display: inline-flex;
|
|
175
|
+
align-items: center;
|
|
176
|
+
padding: 0.1875rem 0.5rem;
|
|
177
|
+
border: 1px solid #dee2e6;
|
|
178
|
+
border-radius: 4px;
|
|
179
|
+
background: white;
|
|
180
|
+
color: #212529;
|
|
181
|
+
font-size: 0.75rem;
|
|
182
|
+
font-weight: 600;
|
|
183
|
+
`;
|
|
184
|
+
const ImprovementBadge = styled.span `
|
|
185
|
+
display: inline-flex;
|
|
186
|
+
align-items: center;
|
|
187
|
+
padding: 0.1875rem 0.5rem;
|
|
188
|
+
border: 1px solid ${({ $improved }) => ($improved ? '#c3e6cb' : '#d6d8db')};
|
|
189
|
+
border-radius: 4px;
|
|
190
|
+
background: ${({ $improved }) => ($improved ? '#d4edda' : '#e2e3e5')};
|
|
191
|
+
color: ${({ $improved }) => ($improved ? '#155724' : '#383d41')};
|
|
192
|
+
font-size: 0.75rem;
|
|
193
|
+
font-weight: 600;
|
|
194
|
+
`;
|
|
195
|
+
const BarcodeComparisonImagesContainer = styled.div `
|
|
196
|
+
display: grid;
|
|
197
|
+
grid-template-columns: 1fr 1fr;
|
|
198
|
+
gap: 1rem;
|
|
199
|
+
margin-top: 0.75rem;
|
|
200
|
+
padding: 0.5rem;
|
|
201
|
+
border-radius: 6px;
|
|
202
|
+
background: rgba(255, 255, 255, 0.5);
|
|
203
|
+
`;
|
|
204
|
+
const BarcodeComparisonImageWrapper = styled.div `
|
|
205
|
+
display: flex;
|
|
206
|
+
flex-direction: column;
|
|
207
|
+
align-items: center;
|
|
208
|
+
gap: 0.375rem;
|
|
209
|
+
`;
|
|
210
|
+
const BarcodeComparisonImageLabel = styled.span `
|
|
211
|
+
padding: 0.25rem 0.5rem;
|
|
212
|
+
border: 1px solid #b3d9ff;
|
|
213
|
+
border-radius: 4px;
|
|
214
|
+
background: white;
|
|
215
|
+
color: #004085;
|
|
216
|
+
font-size: 0.75rem;
|
|
217
|
+
font-weight: 700;
|
|
218
|
+
letter-spacing: 0.05em;
|
|
219
|
+
text-transform: uppercase;
|
|
220
|
+
`;
|
|
221
|
+
const BarcodeComparisonImage = styled.img `
|
|
222
|
+
width: 100%;
|
|
223
|
+
height: auto;
|
|
224
|
+
border: 2px solid #dee2e6;
|
|
225
|
+
border-radius: 6px;
|
|
226
|
+
background: white;
|
|
227
|
+
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
|
228
|
+
cursor: pointer;
|
|
229
|
+
transition:
|
|
230
|
+
transform 0.15s ease,
|
|
231
|
+
box-shadow 0.15s ease;
|
|
232
|
+
|
|
233
|
+
&:hover {
|
|
234
|
+
transform: scale(1.02);
|
|
235
|
+
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
&:active {
|
|
239
|
+
transform: scale(0.98);
|
|
240
|
+
}
|
|
241
|
+
`;
|
|
242
|
+
const BarcodeComparisonScoreLabel = styled.span `
|
|
243
|
+
padding: 0.25rem 0.5rem;
|
|
244
|
+
border: 1px solid ${({ $isHigher }) => ($isHigher ? '#c3e6cb' : '#dee2e6')};
|
|
245
|
+
border-radius: 4px;
|
|
246
|
+
background: ${({ $isHigher }) => ($isHigher ? '#d4edda' : 'white')};
|
|
247
|
+
color: ${({ $isHigher }) => ($isHigher ? '#155724' : '#495057')};
|
|
248
|
+
font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
|
|
249
|
+
font-size: 0.8125rem;
|
|
250
|
+
font-weight: 700;
|
|
251
|
+
`;
|
|
252
|
+
const BarcodeResultsSection = styled.div `
|
|
253
|
+
width: 450px;
|
|
254
|
+
max-width: 100%;
|
|
255
|
+
flex-shrink: 0;
|
|
256
|
+
margin-top: 1rem;
|
|
257
|
+
`;
|
|
258
|
+
const NoPDF417Warning = styled.div `
|
|
259
|
+
display: flex;
|
|
260
|
+
align-items: center;
|
|
261
|
+
justify-content: center;
|
|
262
|
+
gap: 0.5rem;
|
|
263
|
+
margin-bottom: 0.75rem;
|
|
264
|
+
padding: 0.75rem 1rem;
|
|
265
|
+
border: 1px solid #ffc107;
|
|
266
|
+
border-radius: 8px;
|
|
267
|
+
background: #fff3cd;
|
|
268
|
+
color: #856404;
|
|
269
|
+
font-size: 0.875rem;
|
|
270
|
+
font-weight: 600;
|
|
271
|
+
`;
|
|
272
|
+
const NativeBarcodeResultCard = styled.div `
|
|
273
|
+
margin-top: 0.75rem;
|
|
274
|
+
margin-bottom: 1rem;
|
|
275
|
+
padding: 0.75rem;
|
|
276
|
+
border: 1px solid #b8daff;
|
|
277
|
+
border-radius: 8px;
|
|
278
|
+
background: #cce5ff;
|
|
279
|
+
text-align: left;
|
|
280
|
+
`;
|
|
281
|
+
const NativeBarcodeHeader = styled.div `
|
|
282
|
+
margin-bottom: 0.5rem;
|
|
283
|
+
color: #004085;
|
|
284
|
+
font-size: 0.875rem;
|
|
285
|
+
font-weight: 700;
|
|
286
|
+
`;
|
|
287
|
+
const NativeBarcodeRow = styled.div `
|
|
288
|
+
display: flex;
|
|
289
|
+
flex-direction: column;
|
|
290
|
+
margin-bottom: 0.375rem;
|
|
291
|
+
|
|
292
|
+
&:last-child {
|
|
293
|
+
margin-bottom: 0;
|
|
294
|
+
}
|
|
295
|
+
`;
|
|
296
|
+
const NativeBarcodeLabel = styled.span `
|
|
297
|
+
margin-bottom: 0.125rem;
|
|
298
|
+
color: #004085;
|
|
299
|
+
font-size: 0.75rem;
|
|
300
|
+
font-weight: 600;
|
|
301
|
+
`;
|
|
302
|
+
const NativeBarcodeData = styled.pre `
|
|
303
|
+
max-height: 150px;
|
|
304
|
+
overflow-y: auto;
|
|
305
|
+
margin: 0;
|
|
306
|
+
padding: 0.5rem;
|
|
307
|
+
border-radius: 4px;
|
|
308
|
+
background: rgba(255, 255, 255, 0.5);
|
|
309
|
+
color: #004085;
|
|
310
|
+
font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
|
|
311
|
+
font-size: 0.6875rem;
|
|
312
|
+
white-space: pre-wrap;
|
|
313
|
+
word-break: break-all;
|
|
314
|
+
`;
|
|
315
|
+
const NativeBarcodeFieldsTable = styled.table `
|
|
316
|
+
display: block;
|
|
317
|
+
width: 100%;
|
|
318
|
+
max-height: 300px;
|
|
319
|
+
overflow-y: auto;
|
|
320
|
+
padding: 0.5rem;
|
|
321
|
+
border-radius: 4px;
|
|
322
|
+
border-collapse: collapse;
|
|
323
|
+
background: rgba(255, 255, 255, 0.5);
|
|
324
|
+
|
|
325
|
+
tbody {
|
|
326
|
+
display: table;
|
|
327
|
+
width: 100%;
|
|
328
|
+
}
|
|
329
|
+
`;
|
|
330
|
+
const NativeBarcodeFieldTableRow = styled.tr `
|
|
331
|
+
border-bottom: 1px solid rgba(0, 64, 133, 0.1);
|
|
332
|
+
|
|
333
|
+
&:last-child {
|
|
334
|
+
border-bottom: none;
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
@media (max-width: 480px) {
|
|
338
|
+
display: flex;
|
|
339
|
+
flex-direction: column;
|
|
340
|
+
padding: 0.375rem 0;
|
|
341
|
+
}
|
|
342
|
+
`;
|
|
343
|
+
const NativeBarcodeFieldLabelCell = styled.td `
|
|
344
|
+
padding: 0.375rem 0.75rem 0.375rem 0;
|
|
345
|
+
color: #004085;
|
|
346
|
+
font-size: 0.75rem;
|
|
347
|
+
font-weight: 600;
|
|
348
|
+
white-space: nowrap;
|
|
349
|
+
vertical-align: top;
|
|
350
|
+
|
|
351
|
+
@media (max-width: 480px) {
|
|
352
|
+
padding: 0 0 0.125rem;
|
|
353
|
+
white-space: normal;
|
|
354
|
+
}
|
|
355
|
+
`;
|
|
356
|
+
const NativeBarcodeFieldValueCell = styled.td `
|
|
357
|
+
padding: 0.375rem 0;
|
|
358
|
+
color: #004085;
|
|
359
|
+
font-size: 0.75rem;
|
|
360
|
+
word-break: break-word;
|
|
361
|
+
|
|
362
|
+
@media (max-width: 480px) {
|
|
363
|
+
padding: 0;
|
|
364
|
+
}
|
|
365
|
+
`;
|
|
366
|
+
const NativeBarcodeFailedCard = styled.div `
|
|
367
|
+
margin-top: 0.75rem;
|
|
368
|
+
margin-bottom: 1rem;
|
|
369
|
+
padding: 0.75rem;
|
|
370
|
+
border: 1px solid #f5c6cb;
|
|
371
|
+
border-radius: 8px;
|
|
372
|
+
background: #f8d7da;
|
|
373
|
+
text-align: left;
|
|
374
|
+
`;
|
|
375
|
+
const NativeBarcodeFailedHeader = styled.div `
|
|
376
|
+
margin-bottom: 0.375rem;
|
|
377
|
+
color: #721c24;
|
|
378
|
+
font-size: 0.875rem;
|
|
379
|
+
font-weight: 700;
|
|
380
|
+
`;
|
|
381
|
+
const NativeBarcodeFailedText = styled.div `
|
|
382
|
+
color: #721c24;
|
|
383
|
+
font-size: 0.75rem;
|
|
384
|
+
`;
|
|
385
|
+
const BarcodeAttemptStats = styled.div `
|
|
386
|
+
margin-top: 0.5rem;
|
|
387
|
+
padding-top: 0.5rem;
|
|
388
|
+
border-top: 1px solid #f5c6cb;
|
|
389
|
+
`;
|
|
390
|
+
const StatRow = styled.div `
|
|
391
|
+
display: flex;
|
|
392
|
+
align-items: center;
|
|
393
|
+
justify-content: space-between;
|
|
394
|
+
margin-bottom: 0.25rem;
|
|
395
|
+
font-size: 0.75rem;
|
|
396
|
+
|
|
397
|
+
&:last-child {
|
|
398
|
+
margin-bottom: 0;
|
|
399
|
+
}
|
|
400
|
+
`;
|
|
401
|
+
const StatLabel = styled.span `
|
|
402
|
+
color: #721c24;
|
|
403
|
+
`;
|
|
404
|
+
const StatValue = styled.span `
|
|
405
|
+
color: #721c24;
|
|
406
|
+
font-weight: 600;
|
|
407
|
+
`;
|
|
408
|
+
const NativeBarcodeNotAttemptedCard = styled.div `
|
|
409
|
+
margin-top: 0.75rem;
|
|
410
|
+
margin-bottom: 1rem;
|
|
411
|
+
padding: 0.75rem;
|
|
412
|
+
border: 1px solid #d6d8db;
|
|
413
|
+
border-radius: 8px;
|
|
414
|
+
background: #e2e3e5;
|
|
415
|
+
text-align: left;
|
|
416
|
+
`;
|
|
417
|
+
const NativeBarcodeNotAttemptedHeader = styled.div `
|
|
418
|
+
margin-bottom: 0.375rem;
|
|
419
|
+
color: #383d41;
|
|
420
|
+
font-size: 0.875rem;
|
|
421
|
+
font-weight: 700;
|
|
422
|
+
`;
|
|
423
|
+
const NativeBarcodeNotAttemptedText = styled.div `
|
|
424
|
+
color: #383d41;
|
|
425
|
+
font-size: 0.75rem;
|
|
426
|
+
`;
|
|
427
|
+
const DecoderDiagnosticsCard = styled.div `
|
|
428
|
+
margin-top: 0.75rem;
|
|
429
|
+
margin-bottom: 1rem;
|
|
430
|
+
padding: 0.75rem;
|
|
431
|
+
border: 1px solid #dee2e6;
|
|
432
|
+
border-radius: 8px;
|
|
433
|
+
background: #f8f9fa;
|
|
434
|
+
text-align: left;
|
|
435
|
+
`;
|
|
436
|
+
const DecoderDiagnosticsHeader = styled.div `
|
|
437
|
+
margin-bottom: 0.5rem;
|
|
438
|
+
color: #495057;
|
|
439
|
+
font-size: 0.8125rem;
|
|
440
|
+
font-weight: 700;
|
|
441
|
+
`;
|
|
442
|
+
const DecoderDiagnosticsTable = styled.table `
|
|
443
|
+
width: 100%;
|
|
444
|
+
border-collapse: collapse;
|
|
445
|
+
font-size: 0.75rem;
|
|
446
|
+
`;
|
|
447
|
+
const DecoderDiagnosticsRow = styled.tr `
|
|
448
|
+
&:not(:last-child) {
|
|
449
|
+
border-bottom: 1px solid #e9ecef;
|
|
450
|
+
}
|
|
451
|
+
`;
|
|
452
|
+
const DecoderDiagnosticsLabel = styled.td `
|
|
453
|
+
padding: 0.375rem 0.5rem 0.375rem 0;
|
|
454
|
+
color: #6c757d;
|
|
455
|
+
font-weight: 600;
|
|
456
|
+
white-space: nowrap;
|
|
457
|
+
vertical-align: middle;
|
|
458
|
+
`;
|
|
459
|
+
const DecoderDiagnosticsValue = styled.td `
|
|
460
|
+
padding: 0.375rem 0;
|
|
461
|
+
text-align: right;
|
|
462
|
+
vertical-align: middle;
|
|
463
|
+
`;
|
|
464
|
+
const DiagnosticsBadge = styled.span `
|
|
465
|
+
display: inline-flex;
|
|
466
|
+
align-items: center;
|
|
467
|
+
padding: 0.1875rem 0.5rem;
|
|
468
|
+
border: 1px solid
|
|
469
|
+
${({ $ok, $highlight }) => ($highlight ? '#b8daff' : $ok ? '#c3e6cb' : '#f5c6cb')};
|
|
470
|
+
border-radius: 4px;
|
|
471
|
+
background: ${({ $ok, $highlight }) => ($highlight ? '#e7f3ff' : $ok ? '#d4edda' : '#f8d7da')};
|
|
472
|
+
color: ${({ $ok, $highlight }) => ($highlight ? '#004085' : $ok ? '#155724' : '#721c24')};
|
|
473
|
+
font-size: 0.6875rem;
|
|
474
|
+
font-weight: 600;
|
|
475
|
+
`;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { CapturedDocuments, SubmissionPhase } from '@idmission/websdk-core/idCapture';
|
|
2
|
+
import { type CustomerSuppliedVerbiage } from '../../i18n';
|
|
3
|
+
import { type ReviewDiagnosticsModel } from './ReviewDiagnosticsPanel';
|
|
4
|
+
export type ReviewScreenClassNames = {
|
|
5
|
+
container?: string;
|
|
6
|
+
inner?: string;
|
|
7
|
+
card?: string;
|
|
8
|
+
heading?: string;
|
|
9
|
+
imageContainer?: string;
|
|
10
|
+
imageRow?: string;
|
|
11
|
+
imageCol?: string;
|
|
12
|
+
image?: string;
|
|
13
|
+
buttonsRow?: string;
|
|
14
|
+
retryBtn?: string;
|
|
15
|
+
submitBtn?: string;
|
|
16
|
+
};
|
|
17
|
+
export type ReviewScreenVerbiage = {
|
|
18
|
+
headingText?: CustomerSuppliedVerbiage;
|
|
19
|
+
submitText?: CustomerSuppliedVerbiage;
|
|
20
|
+
submittingText?: CustomerSuppliedVerbiage;
|
|
21
|
+
retryText?: CustomerSuppliedVerbiage;
|
|
22
|
+
};
|
|
23
|
+
export type ReviewScreenProps = {
|
|
24
|
+
capturedDocuments: CapturedDocuments;
|
|
25
|
+
submission: SubmissionPhase;
|
|
26
|
+
sessionReady?: boolean;
|
|
27
|
+
onSubmit: () => void;
|
|
28
|
+
onRetry: () => void;
|
|
29
|
+
diagnostics?: ReviewDiagnosticsModel;
|
|
30
|
+
verbiage?: ReviewScreenVerbiage;
|
|
31
|
+
classNames?: ReviewScreenClassNames;
|
|
32
|
+
};
|
|
33
|
+
export declare const ReviewScreen: ({ capturedDocuments, submission, sessionReady, onSubmit, onRetry, diagnostics, verbiage: rawVerbiage, classNames, }: ReviewScreenProps) => import("react/jsx-runtime").JSX.Element;
|
|
34
|
+
//# sourceMappingURL=ReviewScreen.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReviewScreen.d.ts","sourceRoot":"","sources":["../../../src/components/review/ReviewScreen.tsx"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EACV,iBAAiB,EAEjB,eAAe,EAChB,MAAM,kCAAkC,CAAA;AAazC,OAAO,EAAE,KAAK,wBAAwB,EAAmB,MAAM,YAAY,CAAA;AAC3E,OAAO,EAGL,KAAK,sBAAsB,EAC5B,MAAM,0BAA0B,CAAA;AAcjC,MAAM,MAAM,sBAAsB,GAAG;IACnC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AAED,MAAM,MAAM,oBAAoB,GAAG;IACjC,WAAW,CAAC,EAAE,wBAAwB,CAAA;IACtC,UAAU,CAAC,EAAE,wBAAwB,CAAA;IACrC,cAAc,CAAC,EAAE,wBAAwB,CAAA;IACzC,SAAS,CAAC,EAAE,wBAAwB,CAAA;CACrC,CAAA;AAED,MAAM,MAAM,iBAAiB,GAAG;IAC9B,iBAAiB,EAAE,iBAAiB,CAAA;IACpC,UAAU,EAAE,eAAe,CAAA;IAC3B,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,QAAQ,EAAE,MAAM,IAAI,CAAA;IACpB,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,WAAW,CAAC,EAAE,sBAAsB,CAAA;IACpC,QAAQ,CAAC,EAAE,oBAAoB,CAAA;IAC/B,UAAU,CAAC,EAAE,sBAAsB,CAAA;CACpC,CAAA;AAED,eAAO,MAAM,YAAY,GAAI,qHAS1B,iBAAiB,4CAqFnB,CAAA"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
// Ported from sdk2's id_capture/IdCaptureSuccess.tsx. The production review
|
|
3
|
+
// tree stays here; the legacy debugMode-only output is isolated in
|
|
4
|
+
// ReviewDiagnosticsPanel so decoder work and diagnostic chrome do not affect
|
|
5
|
+
// ordinary customer reviews.
|
|
6
|
+
//
|
|
7
|
+
// Sanctioned rewiring (not a divergence, an explicit part of the produced
|
|
8
|
+
// interface):
|
|
9
|
+
// - `useContext(SubmissionContext).submissionStatus` /
|
|
10
|
+
// `useAuthContext()`-derived `sessionReady` -> `submission` (core's
|
|
11
|
+
// `SubmissionPhase`) and `sessionReady` props (default `true`).
|
|
12
|
+
// - `onSubmitClick` / `onRetryClick` -> `onSubmit` / `onRetry`.
|
|
13
|
+
// - No `colors` prop (source's `IdCaptureSuccessColors` /
|
|
14
|
+
// `doneBtn`/`retryBtn` `LoaderButtonColors`) — not part of the brief's
|
|
15
|
+
// produced interface; buttons use `WideButton`/`WideBorderButton`
|
|
16
|
+
// defaults.
|
|
17
|
+
// `classNames` keeps only the fields the surviving (non-debug) render tree
|
|
18
|
+
// actually reads: `container`, `inner`, `card`, `heading`, `imageContainer`,
|
|
19
|
+
// `imageRow`, `imageCol`, `image`, `buttonsRow`, `submitBtn`, `retryBtn`.
|
|
20
|
+
// Source also declared `imageHeading`, `imageWrapper`, `instruction`, and
|
|
21
|
+
// `doneBtn` (a colors field, not a classNames field) — none of those are
|
|
22
|
+
// read anywhere in the non-debug render, so they are dropped.
|
|
23
|
+
import { useEffect, useRef } from 'react';
|
|
24
|
+
import { styled } from 'styled-components';
|
|
25
|
+
import { ButtonsColumn, GrayOverlayContainer, OverlayImageContainer, OverlayImageRow, OverlayInner, WideBorderButton, WideButton, } from '../common/overlay';
|
|
26
|
+
import { CapturedDocumentImg } from '../common/CapturedDocumentImg';
|
|
27
|
+
import { FlexCard } from '../common/Card';
|
|
28
|
+
import { useTranslations } from '../../i18n';
|
|
29
|
+
import { ReviewDiagnosticsPanel, ReviewDocumentDiagnostics, } from './ReviewDiagnosticsPanel';
|
|
30
|
+
const imageDisplayOrder = [
|
|
31
|
+
'idCardFront',
|
|
32
|
+
'idCardBack',
|
|
33
|
+
'idBarcodeImage',
|
|
34
|
+
'passport',
|
|
35
|
+
'singlePage',
|
|
36
|
+
'idFrontIrImage',
|
|
37
|
+
'idBackIrImage',
|
|
38
|
+
'idFrontUvImage',
|
|
39
|
+
'idBackUvImage',
|
|
40
|
+
];
|
|
41
|
+
export const ReviewScreen = ({ capturedDocuments, submission, sessionReady = true, onSubmit, onRetry, diagnostics, verbiage: rawVerbiage = {}, classNames = {}, }) => {
|
|
42
|
+
const submitButtonRef = useRef(null);
|
|
43
|
+
// Auto-focus submit button when session becomes ready.
|
|
44
|
+
useEffect(() => {
|
|
45
|
+
if (sessionReady && submission !== 'submitting') {
|
|
46
|
+
submitButtonRef.current?.focus();
|
|
47
|
+
}
|
|
48
|
+
}, [sessionReady, submission]);
|
|
49
|
+
const verbiage = useTranslations(rawVerbiage, {
|
|
50
|
+
headingText: 'ID Capture Successful',
|
|
51
|
+
retryText: 'Retry',
|
|
52
|
+
submittingText: 'Submitting...',
|
|
53
|
+
submitText: 'Done',
|
|
54
|
+
});
|
|
55
|
+
return (_jsx(GrayOverlayContainer, { className: classNames.container, children: _jsx(OverlayInner, { className: classNames.inner, children: _jsxs(FlexCard, { className: classNames.card, children: [_jsx(Heading, { className: classNames.heading, children: verbiage.headingText }), _jsx(ImagesContainer, { className: classNames.imageContainer, children: _jsxs(ImageRow, { className: classNames.imageRow, children: [imageDisplayOrder.map((name) => {
|
|
56
|
+
const doc = capturedDocuments[name];
|
|
57
|
+
if (!doc)
|
|
58
|
+
return null;
|
|
59
|
+
return (_jsxs(ImageCol, { className: classNames.imageCol, children: [_jsx(StyledImage, { image: doc, className: classNames.image, alt: doc.documentType }), diagnostics ? (_jsx(ReviewDocumentDiagnostics, { document: doc, diagnostics: diagnostics })) : null] }, doc.imageData));
|
|
60
|
+
}), diagnostics ? (_jsx(ReviewDiagnosticsPanel, { capturedDocuments: capturedDocuments, diagnostics: diagnostics })) : null] }) }), _jsxs(ButtonsColumn, { className: classNames.buttonsRow, children: [_jsx(WideButton, { ref: submitButtonRef, className: classNames.submitBtn, variant: "positive", onClick: onSubmit, disabled: submission === 'submitting' || !sessionReady, finished: true, children: submission === 'submitting'
|
|
61
|
+
? verbiage.submittingText
|
|
62
|
+
: !sessionReady
|
|
63
|
+
? 'Initializing...'
|
|
64
|
+
: verbiage.submitText }), _jsx(WideBorderButton, { className: classNames.retryBtn, variant: "warning", onClick: onRetry, finished: true, children: verbiage.retryText })] })] }) }) }));
|
|
65
|
+
};
|
|
66
|
+
const Heading = styled.h1 `
|
|
67
|
+
font-size: 1.5rem;
|
|
68
|
+
margin-top: 0;
|
|
69
|
+
margin-bottom: 1.5rem;
|
|
70
|
+
`;
|
|
71
|
+
const ImagesContainer = styled(OverlayImageContainer) `
|
|
72
|
+
flex-grow: 1;
|
|
73
|
+
overflow-y: auto;
|
|
74
|
+
padding-bottom: 0;
|
|
75
|
+
max-width: 100%;
|
|
76
|
+
`;
|
|
77
|
+
const ImageRow = styled(OverlayImageRow) `
|
|
78
|
+
max-width: 100%;
|
|
79
|
+
flex-direction: column;
|
|
80
|
+
position: relative;
|
|
81
|
+
width: 100%;
|
|
82
|
+
`;
|
|
83
|
+
const ImageCol = styled.div `
|
|
84
|
+
width: 450px;
|
|
85
|
+
max-width: 100%;
|
|
86
|
+
max-height: none !important;
|
|
87
|
+
`;
|
|
88
|
+
const StyledImage = styled(CapturedDocumentImg) `
|
|
89
|
+
width: 100%;
|
|
90
|
+
border-radius: 12px;
|
|
91
|
+
`;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { type CustomerSuppliedVerbiage } from '../../i18n';
|
|
2
|
+
import { type LoaderButtonColors } from '../common/LoaderButton';
|
|
3
|
+
export type RingFailureReason = 'notMatched' | 'captureFailed';
|
|
4
|
+
export type RingFailureScreenVerbiage = {
|
|
5
|
+
failureTitleText?: CustomerSuppliedVerbiage;
|
|
6
|
+
failureSubtitleText?: CustomerSuppliedVerbiage;
|
|
7
|
+
failureHintText?: CustomerSuppliedVerbiage;
|
|
8
|
+
failureLightingTipText?: CustomerSuppliedVerbiage;
|
|
9
|
+
failureCenteredTipText?: CustomerSuppliedVerbiage;
|
|
10
|
+
failureUncoveredTipText?: CustomerSuppliedVerbiage;
|
|
11
|
+
failureRetryBtnText?: CustomerSuppliedVerbiage;
|
|
12
|
+
failureExitBtnText?: CustomerSuppliedVerbiage;
|
|
13
|
+
};
|
|
14
|
+
export type RingFailureScreenClassNames = {
|
|
15
|
+
failureScreen?: string;
|
|
16
|
+
failureVisual?: string;
|
|
17
|
+
failureTitle?: string;
|
|
18
|
+
failureSubtitle?: string;
|
|
19
|
+
failureTips?: string;
|
|
20
|
+
failureTip?: string;
|
|
21
|
+
failureActions?: string;
|
|
22
|
+
failureRetryBtn?: string;
|
|
23
|
+
failureExitBtn?: string;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* A calm, actionable result screen for ring-mode verification failures. It
|
|
27
|
+
* keeps the ring journey's soft gradient, compact capture preview, and pill
|
|
28
|
+
* actions while replacing the legacy full-screen placeholder illustration.
|
|
29
|
+
*/
|
|
30
|
+
export declare const RingFailureScreen: ({ reason, selfieImage, canRetry, onRetry, onExit, verbiage: rawVerbiage, classNames, retryButtonColors, exitButtonColors, }: {
|
|
31
|
+
reason: RingFailureReason;
|
|
32
|
+
selfieImage?: string | null;
|
|
33
|
+
canRetry?: boolean;
|
|
34
|
+
onRetry?: () => void;
|
|
35
|
+
onExit?: () => void;
|
|
36
|
+
verbiage?: RingFailureScreenVerbiage;
|
|
37
|
+
classNames?: RingFailureScreenClassNames;
|
|
38
|
+
retryButtonColors?: LoaderButtonColors;
|
|
39
|
+
exitButtonColors?: LoaderButtonColors;
|
|
40
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
41
|
+
//# sourceMappingURL=RingFailureScreen.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RingFailureScreen.d.ts","sourceRoot":"","sources":["../../../src/components/ring/RingFailureScreen.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAE,KAAK,wBAAwB,EAAmB,MAAM,YAAY,CAAA;AAC3E,OAAO,EAAgB,KAAK,kBAAkB,EAAE,MAAM,wBAAwB,CAAA;AAG9E,MAAM,MAAM,iBAAiB,GAAG,YAAY,GAAG,eAAe,CAAA;AAE9D,MAAM,MAAM,yBAAyB,GAAG;IACtC,gBAAgB,CAAC,EAAE,wBAAwB,CAAA;IAC3C,mBAAmB,CAAC,EAAE,wBAAwB,CAAA;IAC9C,eAAe,CAAC,EAAE,wBAAwB,CAAA;IAC1C,sBAAsB,CAAC,EAAE,wBAAwB,CAAA;IACjD,sBAAsB,CAAC,EAAE,wBAAwB,CAAA;IACjD,uBAAuB,CAAC,EAAE,wBAAwB,CAAA;IAClD,mBAAmB,CAAC,EAAE,wBAAwB,CAAA;IAC9C,kBAAkB,CAAC,EAAE,wBAAwB,CAAA;CAC9C,CAAA;AAED,MAAM,MAAM,2BAA2B,GAAG;IACxC,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,cAAc,CAAC,EAAE,MAAM,CAAA;CACxB,CAAA;AAKD;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,GAAI,6HAU/B;IACD,MAAM,EAAE,iBAAiB,CAAA;IACzB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAA;IACnB,QAAQ,CAAC,EAAE,yBAAyB,CAAA;IACpC,UAAU,CAAC,EAAE,2BAA2B,CAAA;IACxC,iBAAiB,CAAC,EAAE,kBAAkB,CAAA;IACtC,gBAAgB,CAAC,EAAE,kBAAkB,CAAA;CACtC,4CAmJA,CAAA"}
|