@idmission/websdk-ui 0.2.0-rc.2 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +168 -56
- package/dist/DocumentCaptureView.d.ts +44 -5
- package/dist/DocumentCaptureView.d.ts.map +1 -1
- package/dist/DocumentCaptureView.js +517 -30
- package/dist/FaceLivenessView.d.ts +3 -3
- package/dist/FaceLivenessView.d.ts.map +1 -1
- package/dist/FaceLivenessView.js +82 -40
- package/dist/IdCaptureView.d.ts +33 -20
- package/dist/IdCaptureView.d.ts.map +1 -1
- package/dist/IdCaptureView.js +196 -33
- package/dist/SelfieCaptureView.d.ts +19 -2
- package/dist/SelfieCaptureView.d.ts.map +1 -1
- package/dist/SelfieCaptureView.js +17 -5
- package/dist/SignatureCaptureView.d.ts +23 -2
- package/dist/SignatureCaptureView.d.ts.map +1 -1
- package/dist/SignatureCaptureView.js +138 -22
- package/dist/VideoIdCaptureView.d.ts +15 -3
- package/dist/VideoIdCaptureView.d.ts.map +1 -1
- package/dist/VideoIdCaptureView.js +35 -8
- package/dist/bindings/useDocumentCapture.d.ts.map +1 -1
- package/dist/bindings/useDocumentCapture.js +2 -1
- package/dist/bindings/useIdCapture.d.ts.map +1 -1
- package/dist/bindings/useIdCapture.js +2 -1
- package/dist/bindings/useSelfieCapture.d.ts.map +1 -1
- package/dist/bindings/useSelfieCapture.js +2 -1
- package/dist/bindings/useSignatureCapture.d.ts.map +1 -1
- package/dist/bindings/useSignatureCapture.js +2 -1
- package/dist/bindings/useVideoIdCapture.d.ts.map +1 -1
- package/dist/bindings/useVideoIdCapture.js +2 -1
- package/dist/components/CameraFeed.d.ts +11 -3
- package/dist/components/CameraFeed.d.ts.map +1 -1
- package/dist/components/CameraFeed.js +24 -4
- package/dist/components/barcode/BarcodeGuideOverlay.d.ts +7 -1
- package/dist/components/barcode/BarcodeGuideOverlay.d.ts.map +1 -1
- package/dist/components/barcode/BarcodeGuideOverlay.js +2 -2
- package/dist/components/common/BrowserEdgeTint.d.ts +63 -0
- package/dist/components/common/BrowserEdgeTint.d.ts.map +1 -0
- package/dist/components/common/BrowserEdgeTint.js +111 -0
- package/dist/components/common/LoaderButton.d.ts +9 -0
- package/dist/components/common/LoaderButton.d.ts.map +1 -1
- package/dist/components/common/LoaderButton.js +44 -321
- package/dist/components/common/ScreenReaderStatus.d.ts +8 -0
- package/dist/components/common/ScreenReaderStatus.d.ts.map +1 -0
- package/dist/components/common/ScreenReaderStatus.js +18 -0
- package/dist/components/common/overlay.d.ts +6 -0
- package/dist/components/common/overlay.d.ts.map +1 -1
- package/dist/components/common/overlay.js +7 -1
- package/dist/components/debug/debug.d.ts +10 -4
- package/dist/components/debug/debug.d.ts.map +1 -1
- package/dist/components/debug/debug.js +5 -1
- package/dist/components/document/DocumentCaptureAutoCaptureDebugLayer.d.ts +29 -0
- package/dist/components/document/DocumentCaptureAutoCaptureDebugLayer.d.ts.map +1 -0
- package/dist/components/document/DocumentCaptureAutoCaptureDebugLayer.js +273 -0
- package/dist/components/document/DocumentCaptureAutoCaptureGuidance.d.ts +56 -0
- package/dist/components/document/DocumentCaptureAutoCaptureGuidance.d.ts.map +1 -0
- package/dist/components/document/DocumentCaptureAutoCaptureGuidance.js +128 -0
- package/dist/components/document/DocumentCaptureGuideOverlay.d.ts +31 -1
- package/dist/components/document/DocumentCaptureGuideOverlay.d.ts.map +1 -1
- package/dist/components/document/DocumentCaptureGuideOverlay.js +121 -2
- package/dist/components/document/DocumentCaptureReviewScreen.d.ts +44 -0
- package/dist/components/document/DocumentCaptureReviewScreen.d.ts.map +1 -0
- package/dist/components/document/DocumentCaptureReviewScreen.js +40 -0
- package/dist/components/document/types.d.ts +25 -0
- package/dist/components/document/types.d.ts.map +1 -1
- package/dist/components/document/types.js +18 -1
- package/dist/components/error/CameraAccessDeniedOverlay.d.ts +8 -1
- package/dist/components/error/CameraAccessDeniedOverlay.d.ts.map +1 -1
- package/dist/components/error/useCameraAccessDeniedReport.d.ts +12 -0
- package/dist/components/error/useCameraAccessDeniedReport.d.ts.map +1 -0
- package/dist/components/error/useCameraAccessDeniedReport.js +31 -0
- package/dist/components/face_liveness/FaceLivenessFailure.d.ts +4 -1
- package/dist/components/face_liveness/FaceLivenessFailure.d.ts.map +1 -1
- package/dist/components/face_liveness/FaceLivenessFailure.js +4 -2
- package/dist/components/face_liveness/FaceLivenessSuccess.d.ts +4 -1
- package/dist/components/face_liveness/FaceLivenessSuccess.d.ts.map +1 -1
- package/dist/components/face_liveness/FaceLivenessSuccess.js +6 -2
- package/dist/components/guides/IdCaptureFitGuide.d.ts +2 -0
- package/dist/components/guides/IdCaptureFitGuide.d.ts.map +1 -1
- package/dist/components/guides/IdCaptureFitGuide.js +4 -1
- package/dist/components/guides/IdCaptureGuideOverlay.d.ts +2 -0
- package/dist/components/guides/IdCaptureGuideOverlay.d.ts.map +1 -1
- package/dist/components/guides/IdCaptureGuideOverlay.js +3 -1
- package/dist/components/guides/IdCaptureGuides.d.ts +14 -0
- package/dist/components/guides/IdCaptureGuides.d.ts.map +1 -1
- package/dist/components/guides/IdCaptureGuides.js +23 -9
- package/dist/components/guides/IdCaptureGuidesCommon.d.ts.map +1 -1
- package/dist/components/guides/IdCaptureGuidesCommon.js +12 -7
- package/dist/components/loading/IdCaptureLoadingOverlayDefault.d.ts +9 -0
- package/dist/components/loading/IdCaptureLoadingOverlayDefault.d.ts.map +1 -1
- package/dist/components/loading/IdCaptureLoadingOverlayDefault.js +26 -4
- package/dist/components/loading/RingIntroScreen.d.ts.map +1 -1
- package/dist/components/loading/RingIntroScreen.js +4 -34
- package/dist/components/review/ReviewScreen.d.ts +10 -1
- package/dist/components/review/ReviewScreen.d.ts.map +1 -1
- package/dist/components/review/ReviewScreen.js +8 -8
- package/dist/components/review/SignatureCaptureDiagnostics.d.ts +54 -0
- package/dist/components/review/SignatureCaptureDiagnostics.d.ts.map +1 -0
- package/dist/components/review/SignatureCaptureDiagnostics.js +144 -0
- package/dist/components/selfie/FaceCaptureGuideOverlay.d.ts +9 -2
- package/dist/components/selfie/FaceCaptureGuideOverlay.d.ts.map +1 -1
- package/dist/components/selfie/FaceCaptureGuideOverlay.js +10 -4
- package/dist/components/selfie/SelfieCaptureAnimatedMask.d.ts +8 -1
- package/dist/components/selfie/SelfieCaptureAnimatedMask.d.ts.map +1 -1
- package/dist/components/selfie/SelfieCaptureAnimatedMask.js +55 -21
- package/dist/components/selfie/SelfieCaptureSurface.d.ts +19 -3
- package/dist/components/selfie/SelfieCaptureSurface.d.ts.map +1 -1
- package/dist/components/selfie/SelfieCaptureSurface.js +78 -14
- package/dist/components/selfie_loading/SelfieCaptureLoadingOverlayDefault.d.ts +9 -0
- package/dist/components/selfie_loading/SelfieCaptureLoadingOverlayDefault.d.ts.map +1 -1
- package/dist/components/selfie_loading/SelfieCaptureLoadingOverlayDefault.js +26 -4
- package/dist/components/videoId/VideoIdCaptureGuides.d.ts +4 -1
- package/dist/components/videoId/VideoIdCaptureGuides.d.ts.map +1 -1
- package/dist/components/videoId/VideoIdCaptureGuides.js +2 -2
- package/dist/flows/AuthStateContext.d.ts.map +1 -1
- package/dist/flows/AuthStateContext.js +2 -1
- package/dist/flows/CaptureProgress.d.ts +14 -0
- package/dist/flows/CaptureProgress.d.ts.map +1 -0
- package/dist/flows/CaptureProgress.js +51 -0
- package/dist/flows/CompositeWizard.d.ts +5 -0
- package/dist/flows/CompositeWizard.d.ts.map +1 -1
- package/dist/flows/CompositeWizard.js +6 -1
- package/dist/flows/CustomerBiometricsEnrollmentFlow.d.ts +1 -1
- package/dist/flows/CustomerBiometricsEnrollmentFlow.d.ts.map +1 -1
- package/dist/flows/CustomerBiometricsEnrollmentFlow.js +6 -3
- package/dist/flows/CustomerIdAndBiometricsEnrollmentFlow.d.ts +1 -1
- package/dist/flows/CustomerIdAndBiometricsEnrollmentFlow.d.ts.map +1 -1
- package/dist/flows/CustomerIdAndBiometricsEnrollmentFlow.js +5 -2
- package/dist/flows/DocumentCaptureFlow.d.ts +2 -2
- package/dist/flows/DocumentCaptureFlow.d.ts.map +1 -1
- package/dist/flows/DocumentCaptureFlow.js +6 -6
- package/dist/flows/FaceValidationFlow.d.ts +2 -2
- package/dist/flows/FaceValidationFlow.d.ts.map +1 -1
- package/dist/flows/FaceValidationFlow.js +2 -2
- package/dist/flows/FlowChassis.d.ts +3 -1
- package/dist/flows/FlowChassis.d.ts.map +1 -1
- package/dist/flows/FlowChassis.js +23 -4
- package/dist/flows/IdAndFaceValidationFlow.d.ts +1 -1
- package/dist/flows/IdAndFaceValidationFlow.d.ts.map +1 -1
- package/dist/flows/IdAndFaceValidationFlow.js +5 -2
- package/dist/flows/IdValidationFlow.d.ts +1 -1
- package/dist/flows/IdValidationFlow.d.ts.map +1 -1
- package/dist/flows/IdValidationFlow.js +18 -4
- package/dist/flows/SignatureKYCFlow.d.ts +18 -3
- package/dist/flows/SignatureKYCFlow.d.ts.map +1 -1
- package/dist/flows/SignatureKYCFlow.js +94 -11
- package/dist/flows/SubmissionProvider.d.ts.map +1 -1
- package/dist/flows/SubmissionProvider.js +10 -5
- package/dist/flows/VideoIdValidationFlow.d.ts +1 -1
- package/dist/flows/VideoIdValidationFlow.d.ts.map +1 -1
- package/dist/flows/VideoIdValidationFlow.js +6 -3
- package/dist/flows/additionalDocuments.d.ts.map +1 -1
- package/dist/flows/additionalDocuments.js +3 -6
- package/dist/flows/approval.d.ts +2 -0
- package/dist/flows/approval.d.ts.map +1 -0
- package/dist/flows/approval.js +1 -0
- package/dist/flows/artifacts.d.ts +1 -1
- package/dist/flows/artifacts.d.ts.map +1 -1
- package/dist/flows/artifacts.js +29 -9
- package/dist/flows/autoCaptureMountGuard.d.ts +22 -0
- package/dist/flows/autoCaptureMountGuard.d.ts.map +1 -0
- package/dist/flows/autoCaptureMountGuard.js +61 -0
- package/dist/flows/customerMatch/CustomerMatchFlow.d.ts +1 -1
- package/dist/flows/customerMatch/CustomerMatchFlow.d.ts.map +1 -1
- package/dist/flows/customerMatch/CustomerMatchFlow.js +5 -6
- package/dist/flows/ringScreens.d.ts +1 -3
- package/dist/flows/ringScreens.d.ts.map +1 -1
- package/dist/flows/ringScreens.js +19 -5
- package/dist/flows/types.d.ts +17 -3
- package/dist/flows/types.d.ts.map +1 -1
- package/dist/guidance/selfieStrings.d.ts +9 -1
- package/dist/guidance/selfieStrings.d.ts.map +1 -1
- package/dist/guidance/selfieStrings.js +67 -24
- package/dist/guidance/strings.d.ts +34 -1
- package/dist/guidance/strings.d.ts.map +1 -1
- package/dist/guidance/strings.js +39 -0
- package/dist/i18n/index.d.ts +28 -1177
- package/dist/i18n/index.d.ts.map +1 -1
- package/dist/i18n/index.js +58 -22
- package/dist/i18n/locales/threeOh.d.ts +4 -0
- package/dist/i18n/locales/threeOh.d.ts.map +1 -0
- package/dist/i18n/locales/threeOh.js +159 -0
- package/dist/index.d.ts +12 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/testing/autoCaptureFrames.d.ts +23 -0
- package/dist/testing/autoCaptureFrames.d.ts.map +1 -0
- package/dist/testing/autoCaptureFrames.js +193 -0
- package/dist/testing/buildSelfieState.d.ts.map +1 -1
- package/dist/testing/buildSelfieState.js +5 -0
- package/dist/testing/classNamesLeaves.js +1 -1
- package/dist/testing/fakeDocumentController.d.ts +7 -1
- package/dist/testing/fakeDocumentController.d.ts.map +1 -1
- package/dist/testing/fakeDocumentController.js +10 -2
- package/dist/testing/fakeSelfieController.d.ts.map +1 -1
- package/dist/testing/fakeSelfieController.js +7 -0
- package/dist/testing/index.d.ts +1 -0
- package/dist/testing/index.d.ts.map +1 -1
- package/dist/testing/index.js +1 -0
- package/dist/theme/index.d.ts +10 -0
- package/dist/theme/index.d.ts.map +1 -1
- package/dist/useDocumentUpload.d.ts +63 -0
- package/dist/useDocumentUpload.d.ts.map +1 -0
- package/dist/useDocumentUpload.js +45 -0
- package/dist/useIdmissionClient.d.ts +29 -0
- package/dist/useIdmissionClient.d.ts.map +1 -0
- package/dist/useIdmissionClient.js +44 -0
- package/dist/utils/canvas.d.ts.map +1 -1
- package/dist/utils/canvas.js +41 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.d.ts.map +1 -1
- package/dist/version.js +1 -1
- package/package.json +9 -7
|
@@ -96,6 +96,6 @@ type CustomerMatchFlowInternalProps<S, A> = CustomerMatchFlowProps & {
|
|
|
96
96
|
adapter: MatchReducerAdapter<S, A>;
|
|
97
97
|
variant: CustomerMatchVariant;
|
|
98
98
|
};
|
|
99
|
-
export declare function CustomerMatchFlow<S, A>({ action, adapter, variant, client, submission, initialArtifacts, controller, capture, view, theme, className, geolocationEnabled, geolocationRequired, remoteDiagnostics, loadingSpinner, useFrontendLivenessToken, timeoutDurationMs, skipSuccessScreen, assets, classNames, colors, verbiage, onComplete, onCustomerMatched, onCustomerNotMatched, onRequestFailure, onCaptureGuidanceTimeout, onExitCapture, onExitAfterFailure, }: CustomerMatchFlowInternalProps<S, A>): import("react/jsx-runtime").JSX.Element;
|
|
99
|
+
export declare function CustomerMatchFlow<S, A>({ action, adapter, variant, client, submission, initialArtifacts, controller, capture, view, theme, className, geolocationEnabled, geolocationRequired, remoteDiagnostics, captureProgress, loadingSpinner, useFrontendLivenessToken, timeoutDurationMs, skipSuccessScreen, assets, classNames, colors, verbiage, onComplete, onCustomerMatched, onCustomerNotMatched, onRequestFailure, onCaptureGuidanceTimeout, onExitCapture, onExitAfterFailure, }: CustomerMatchFlowInternalProps<S, A>): import("react/jsx-runtime").JSX.Element;
|
|
100
100
|
export {};
|
|
101
101
|
//# sourceMappingURL=CustomerMatchFlow.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CustomerMatchFlow.d.ts","sourceRoot":"","sources":["../../../src/flows/customerMatch/CustomerMatchFlow.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CustomerMatchFlow.d.ts","sourceRoot":"","sources":["../../../src/flows/customerMatch/CustomerMatchFlow.tsx"],"names":[],"mappings":"AA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omerIdentificationFlow and CustomerVerificationFlow.
|
|
3
3
|
//
|
|
4
|
-
//
|
|
5
|
-
//
|
|
6
|
-
//
|
|
7
|
-
// Rather than copy the whole stage machine twice, the two public flows are thin
|
|
4
|
+
// Identification and verification share the capture and liveness sequence.
|
|
5
|
+
// docs/architecture/customer-match.md records the liveness and retry boundaries.
|
|
6
|
+
// The two public flows are thin
|
|
8
7
|
// wrappers that pick a `SubmissionAction`, a reducer adapter, and the default
|
|
9
8
|
// heading variant; everything else lives here.
|
|
10
9
|
//
|
|
@@ -71,7 +70,7 @@ const EMPTY_CAPTURE = {};
|
|
|
71
70
|
const EMPTY_VIEW = {};
|
|
72
71
|
const EMPTY_SUBMISSION = {};
|
|
73
72
|
const EMPTY_ARTIFACTS = {};
|
|
74
|
-
export function CustomerMatchFlow({ action, adapter, variant, client, submission = EMPTY_SUBMISSION, initialArtifacts = EMPTY_ARTIFACTS, controller, capture = EMPTY_CAPTURE, view = EMPTY_VIEW, theme, className, geolocationEnabled, geolocationRequired, remoteDiagnostics, loadingSpinner, useFrontendLivenessToken = false, timeoutDurationMs = DEFAULT_CAPTURE_GUIDANCE_TIMEOUT_MS, skipSuccessScreen = false, assets = {}, classNames = {}, colors = {}, verbiage = {}, onComplete, onCustomerMatched, onCustomerNotMatched, onRequestFailure, onCaptureGuidanceTimeout, onExitCapture, onExitAfterFailure, }) {
|
|
73
|
+
export function CustomerMatchFlow({ action, adapter, variant, client, submission = EMPTY_SUBMISSION, initialArtifacts = EMPTY_ARTIFACTS, controller, capture = EMPTY_CAPTURE, view = EMPTY_VIEW, theme, className, geolocationEnabled, geolocationRequired, remoteDiagnostics, captureProgress, loadingSpinner, useFrontendLivenessToken = false, timeoutDurationMs = DEFAULT_CAPTURE_GUIDANCE_TIMEOUT_MS, skipSuccessScreen = false, assets = {}, classNames = {}, colors = {}, verbiage = {}, onComplete, onCustomerMatched, onCustomerNotMatched, onRequestFailure, onCaptureGuidanceTimeout, onExitCapture, onExitAfterFailure, }) {
|
|
75
74
|
const { checkLivenessOptions, ...controllerCapture } = capture;
|
|
76
75
|
// Config callbacks follow the latest render; see useLatestCallbacks.
|
|
77
76
|
const latestCapture = useLatestCallbacks(controllerCapture);
|
|
@@ -183,7 +182,7 @@ export function CustomerMatchFlow({ action, adapter, variant, client, submission
|
|
|
183
182
|
}, [handleDone, outcome, ringMode]);
|
|
184
183
|
const showSuccessScreen = useShowSuccessScreen(skipSuccessScreen, !ringMode && outcome === 'matched', handleDone);
|
|
185
184
|
const canRetry = attempt < ALLOWED_RETRIES;
|
|
186
|
-
return (_jsxs(FlowChassis, { client: client, action: action, submission: submission, theme: theme, className: className, geolocationEnabled: geolocationEnabled, geolocationRequired: geolocationRequired, remoteDiagnostics: remoteDiagnostics, loadingSpinner: loadingSpinner, children: [outcome === 'capturing' ? (
|
|
185
|
+
return (_jsxs(FlowChassis, { client: client, action: action, submission: submission, theme: theme, className: className, geolocationEnabled: geolocationEnabled, geolocationRequired: geolocationRequired, remoteDiagnostics: remoteDiagnostics, captureProgress: captureProgress, loadingSpinner: loadingSpinner, children: [outcome === 'capturing' ? (
|
|
187
186
|
// Keyed by attempt: the ported reducers have no reset action, so sdk2
|
|
188
187
|
// resets a fresh attempt by remounting (`key={`capture${attempt}`}`).
|
|
189
188
|
_jsx(CustomerMatchCapture, { adapter: adapter, client: client, controller: resolvedController, view: resolvedView, initialArtifacts: initialArtifacts, useFrontendLivenessToken: useFrontendLivenessToken, checkLivenessOptions: checkLivenessOptions, captureGuidanceTimeoutDurationMs: timeoutDurationMs, onMatched: handleMatched, onNotMatched: handleNotMatched, onLivenessCheckFailed: handleLivenessCheckFailed, onRequestError: handleRequestError, onCaptureGuidanceTimeout: handleCaptureGuidanceTimeout, onExitCapture: onExitCapture, finishingScreen: {
|
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
import type { SubmissionResponse } from '@idmission/websdk-core/client';
|
|
2
1
|
import type { CompositeWizardFinishingScreenProps, CompositeWizardSuccessScreenProps } from './CompositeWizard';
|
|
3
2
|
import type { RingFinishingScreenClassNames, RingFinishingScreenVerbiage } from '../components/ring/RingFinishingScreen';
|
|
4
3
|
import type { RingSuccessScreenClassNames, RingSuccessScreenVerbiage } from '../components/ring/RingSuccessScreen';
|
|
5
|
-
/** sdk2's `isApprovedResponse` (IdValidation.tsx:89-90), shared by every flow. */
|
|
6
|
-
export declare const isApprovedResponse: (response: SubmissionResponse) => boolean;
|
|
7
4
|
export type RingScreenOptions = {
|
|
8
5
|
/** Usually `view.loadingOverlayMode === 'ring'` for the flow's FIRST stage. */
|
|
9
6
|
ringMode: boolean;
|
|
10
7
|
finishingVerbiage?: RingFinishingScreenVerbiage;
|
|
11
8
|
successVerbiage?: RingSuccessScreenVerbiage;
|
|
9
|
+
/** The customer's copy (the flow's `ringScreenVerbiage`), layered over the flow's defaults by `withOverrides`. */
|
|
12
10
|
finishingOverrides?: RingFinishingScreenVerbiage;
|
|
13
11
|
successOverrides?: RingSuccessScreenVerbiage;
|
|
14
12
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ringScreens.d.ts","sourceRoot":"","sources":["../../src/flows/ringScreens.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"ringScreens.d.ts","sourceRoot":"","sources":["../../src/flows/ringScreens.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EACV,mCAAmC,EACnC,iCAAiC,EAClC,MAAM,mBAAmB,CAAA;AAC1B,OAAO,KAAK,EACV,6BAA6B,EAC7B,2BAA2B,EAC5B,MAAM,wCAAwC,CAAA;AAC/C,OAAO,KAAK,EACV,2BAA2B,EAC3B,yBAAyB,EAC1B,MAAM,sCAAsC,CAAA;AAE7C,MAAM,MAAM,iBAAiB,GAAG;IAC9B,+EAA+E;IAC/E,QAAQ,EAAE,OAAO,CAAA;IACjB,iBAAiB,CAAC,EAAE,2BAA2B,CAAA;IAC/C,eAAe,CAAC,EAAE,yBAAyB,CAAA;IAC3C,kHAAkH;IAClH,kBAAkB,CAAC,EAAE,2BAA2B,CAAA;IAChD,gBAAgB,CAAC,EAAE,yBAAyB,CAAA;IAC5C;;;;;OAKG;IACH,mBAAmB,CAAC,EAAE,6BAA6B,CAAA;IACnD,iBAAiB,CAAC,EAAE,2BAA2B,CAAA;CAChD,CAAA;AAED,wBAAgB,oBAAoB,CAAC,EACnC,QAAQ,EACR,iBAAiB,EACjB,eAAe,EACf,kBAAkB,EAClB,gBAAgB,EAChB,mBAAmB,EACnB,iBAAiB,GAClB,EAAE,iBAAiB,GAAG;IACrB,eAAe,EAAE,mCAAmC,CAAA;IACpD,aAAa,EAAE,iCAAiC,CAAA;CACjD,CAgBA"}
|
|
@@ -1,18 +1,32 @@
|
|
|
1
|
-
/** sdk2's `isApprovedResponse` (IdValidation.tsx:89-90), shared by every flow. */
|
|
2
|
-
export const isApprovedResponse = (response) => response.resultData['verificationResult'] === 'Approved';
|
|
3
1
|
export function buildRingScreenProps({ ringMode, finishingVerbiage, successVerbiage, finishingOverrides, successOverrides, finishingClassNames, successClassNames, }) {
|
|
4
2
|
const mode = ringMode ? 'ring' : 'default';
|
|
5
3
|
return {
|
|
6
4
|
finishingScreen: {
|
|
7
5
|
mode,
|
|
8
|
-
verbiage:
|
|
6
|
+
verbiage: withOverrides(finishingVerbiage, finishingOverrides),
|
|
9
7
|
classNames: finishingClassNames,
|
|
10
8
|
},
|
|
9
|
+
// No `isApproved`: CompositeWizard classifies from the submission action
|
|
10
|
+
// (approval.ts), so enrollment's 'Customer Onboarded' counts as success.
|
|
11
11
|
successScreen: {
|
|
12
12
|
mode,
|
|
13
|
-
|
|
14
|
-
verbiage: { ...successVerbiage, ...successOverrides },
|
|
13
|
+
verbiage: withOverrides(successVerbiage, successOverrides),
|
|
15
14
|
classNames: successClassNames,
|
|
16
15
|
},
|
|
17
16
|
};
|
|
18
17
|
}
|
|
18
|
+
/**
|
|
19
|
+
* The customer's copy over the flow's defaults. Unlike a plain spread, a key
|
|
20
|
+
* explicitly set to `undefined` keeps the flow default rather than falling
|
|
21
|
+
* through to the screen's generic one; an empty string still hides the line.
|
|
22
|
+
*/
|
|
23
|
+
function withOverrides(defaults, overrides) {
|
|
24
|
+
const merged = { ...defaults };
|
|
25
|
+
if (!overrides)
|
|
26
|
+
return merged;
|
|
27
|
+
for (const key of Object.keys(overrides)) {
|
|
28
|
+
if (overrides[key] !== undefined)
|
|
29
|
+
merged[key] = overrides[key];
|
|
30
|
+
}
|
|
31
|
+
return merged;
|
|
32
|
+
}
|
package/dist/flows/types.d.ts
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
|
+
import type { CaptureProgressTask } from '@idmission/websdk-core/captureProgress';
|
|
1
2
|
import type { ReactNode } from 'react';
|
|
2
3
|
import type { IdmissionClient, LivenessOptions, SubmissionArtifacts, SubmissionCallbacks, SubmissionConfig, SubmissionResponse } from '@idmission/websdk-core/client';
|
|
3
4
|
import type { IdCaptureController, IdCaptureControllerConfig } from '@idmission/websdk-core/idCapture';
|
|
4
5
|
import type { SelfieCaptureController, SelfieCaptureControllerConfig, SelfieLivenessConfig } from '@idmission/websdk-core/selfieCapture';
|
|
5
6
|
import type { RemoteDiagnostics } from '@idmission/websdk-core/diagnostics';
|
|
6
|
-
import type { RingFinishingScreenClassNames } from '../components/ring/RingFinishingScreen';
|
|
7
|
-
import type { RingSuccessScreenClassNames } from '../components/ring/RingSuccessScreen';
|
|
7
|
+
import type { RingFinishingScreenClassNames, RingFinishingScreenVerbiage } from '../components/ring/RingFinishingScreen';
|
|
8
|
+
import type { RingSuccessScreenClassNames, RingSuccessScreenVerbiage } from '../components/ring/RingSuccessScreen';
|
|
8
9
|
import type { ThemeInput } from '../theme';
|
|
9
10
|
import type { IdCaptureViewProps } from '../IdCaptureView';
|
|
10
11
|
import type { FaceLivenessViewProps } from '../FaceLivenessView';
|
|
11
12
|
import type { SelfieCaptureViewProps } from '../SelfieCaptureView';
|
|
12
13
|
import type { DocumentCaptureViewProps } from '../DocumentCaptureView';
|
|
13
14
|
import type { AdditionalDocument } from '../components/additional_documents/types';
|
|
14
|
-
import type { AdditionalDocumentCaptureWizardClassNames } from '../components/additional_documents/AdditionalDocumentCaptureWizard';
|
|
15
|
+
import type { AdditionalDocumentCaptureWizardClassNames, AdditionalDocumentCaptureWizardVerbiage } from '../components/additional_documents/AdditionalDocumentCaptureWizard';
|
|
15
16
|
import type { LoadingSpinnerComponent } from './OrbStatusScreen';
|
|
16
17
|
/** @deprecated Use core-owned `SubmissionConfig`. */
|
|
17
18
|
export type FlowSubmissionConfig = SubmissionConfig;
|
|
@@ -41,6 +42,7 @@ export type FlowChassisPassthroughProps = {
|
|
|
41
42
|
* `enabled` is set.
|
|
42
43
|
*/
|
|
43
44
|
remoteDiagnostics?: RemoteDiagnostics;
|
|
45
|
+
captureProgress?: CaptureProgressTask;
|
|
44
46
|
/** Replaces the animated orb during session validation and submission.
|
|
45
47
|
* Status text and screen-reader announcements remain owned by the SDK. */
|
|
46
48
|
loadingSpinner?: LoadingSpinnerComponent;
|
|
@@ -66,6 +68,8 @@ export type CommonFlowProps = FlowResultCallbacks & FlowChassisPassthroughProps
|
|
|
66
68
|
* the document list is: the step belongs to the flow, not to a capture stage.
|
|
67
69
|
*/
|
|
68
70
|
additionalDocumentClassNames?: AdditionalDocumentCaptureWizardClassNames;
|
|
71
|
+
/** Customer copy for the same screen (sdk2 `verbiage.additionalDocumentCapture`). */
|
|
72
|
+
additionalDocumentVerbiage?: AdditionalDocumentCaptureWizardVerbiage;
|
|
69
73
|
/**
|
|
70
74
|
* Customer classes for the two ring-mode terminal screens (sdk2
|
|
71
75
|
* `classNames.finishingScreen` / `classNames.successScreen`). Every flow
|
|
@@ -73,12 +77,22 @@ export type CommonFlowProps = FlowResultCallbacks & FlowChassisPassthroughProps
|
|
|
73
77
|
* per-stage because the screens belong to the submission, not to a capture.
|
|
74
78
|
*/
|
|
75
79
|
ringScreenClassNames?: RingScreenClassNames;
|
|
80
|
+
/**
|
|
81
|
+
* Customer copy for the same two screens (sdk2 `verbiage.finishingScreen` /
|
|
82
|
+
* `verbiage.successScreen`). Each key replaces the flow's own default for
|
|
83
|
+
* that line; an empty string hides the line, as in sdk2.
|
|
84
|
+
*/
|
|
85
|
+
ringScreenVerbiage?: RingScreenVerbiage;
|
|
76
86
|
children?: ReactNode;
|
|
77
87
|
};
|
|
78
88
|
export type RingScreenClassNames = {
|
|
79
89
|
finishingScreen?: RingFinishingScreenClassNames;
|
|
80
90
|
successScreen?: RingSuccessScreenClassNames;
|
|
81
91
|
};
|
|
92
|
+
export type RingScreenVerbiage = {
|
|
93
|
+
finishingScreen?: RingFinishingScreenVerbiage;
|
|
94
|
+
successScreen?: RingSuccessScreenVerbiage;
|
|
95
|
+
};
|
|
82
96
|
export type IdCaptureFlowConfig = Omit<IdCaptureControllerConfig, 'client' | 'submission'>;
|
|
83
97
|
export type IdCaptureFlowViewProps = Omit<IdCaptureViewProps, 'controller' | 'sessionReady' | 'onCollected' | 'onSubmitted'>;
|
|
84
98
|
export type FaceLivenessFlowConfig = Omit<SelfieCaptureControllerConfig, 'liveness'> & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/flows/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACtC,OAAO,KAAK,EACV,eAAe,EACf,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,gBAAgB,EAChB,kBAAkB,EACnB,MAAM,+BAA+B,CAAA;AACtC,OAAO,KAAK,EACV,mBAAmB,EACnB,yBAAyB,EAC1B,MAAM,kCAAkC,CAAA;AACzC,OAAO,KAAK,EACV,uBAAuB,EACvB,6BAA6B,EAC7B,oBAAoB,EACrB,MAAM,sCAAsC,CAAA;AAC7C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAA;AAC3E,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceR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, SelfieGuidanceCode } from '@idmission/websdk-core/selfieCapture';
|
|
2
2
|
import type { ChallengeRunnerSnapshot, LivenessMachineState } from '@idmission/websdk-core/selfieCapture';
|
|
3
3
|
export declare function selfieGuidanceMessageKey(code: SelfieGuidanceCode): string;
|
|
4
|
+
export declare function faceMessageKey(code: FaceMessageCode): string;
|
|
4
5
|
/**
|
|
5
6
|
* sdk2's guidance-pill variant selection: `negative` (FAILED/ERROR/covering
|
|
6
7
|
* states, supplied by the liveness view) always wins; otherwise `satisfied`
|
|
@@ -10,9 +11,16 @@ export declare function selfieGuidanceVariant({ satisfied, negative, }: {
|
|
|
10
11
|
satisfied: boolean;
|
|
11
12
|
negative: boolean;
|
|
12
13
|
}): 'default' | 'positive' | 'negative';
|
|
14
|
+
export declare function challengePromptCode(snapshot: ChallengeRunnerSnapshot): {
|
|
15
|
+
code: FaceMessageCode;
|
|
16
|
+
blinkCount?: number;
|
|
17
|
+
} | null;
|
|
18
|
+
/** `challengePromptCode` resolved to its translation key. */
|
|
13
19
|
export declare function challengePromptKey(snapshot: ChallengeRunnerSnapshot): {
|
|
14
20
|
key: string;
|
|
15
21
|
blinkCount?: number;
|
|
16
22
|
} | null;
|
|
23
|
+
export declare function livenessStatusCode(state: LivenessMachineState): FaceMessageCode | null;
|
|
24
|
+
/** `livenessStatusCode` resolved to its translation key. */
|
|
17
25
|
export declare function livenessStatusKey(state: LivenessMachineState): string | null;
|
|
18
26
|
//# sourceMappingURL=selfieStrings.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"selfieStrings.d.ts","sourceRoot":"","sources":["../../src/guidance/selfieStrings.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"selfieStrings.d.ts","sourceRoot":"","sources":["../../src/guidance/selfieStrings.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,kBAAkB,EACnB,MAAM,sCAAsC,CAAA;AAC7C,OAAO,KAAK,EACV,uBAAuB,EACvB,oBAAoB,EACrB,MAAM,sCAAsC,CAAA;AAyB7C,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,kBAAkB,GAAG,MAAM,CAGzE;AA6BD,wBAAgB,cAAc,CAAC,IAAI,EAAE,eAAe,GAAG,MAAM,CAE5D;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,EACpC,SAAS,EACT,QAAQ,GACT,EAAE;IACD,SAAS,EAAE,OAAO,CAAA;IAClB,QAAQ,EAAE,OAAO,CAAA;CAClB,GAAG,SAAS,GAAG,UAAU,GAAG,UAAU,CAItC;AAkBD,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,uBAAuB,GAChC;IAAE,IAAI,EAAE,eAAe,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAevD;AAED,6DAA6D;AAC7D,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,uBAAuB,GAChC;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAM7C;AAWD,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,oBAAoB,GAC1B,eAAe,GAAG,IAAI,CAgBxB;AAED,4DAA4D;AAC5D,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,oBAAoB,GAAG,MAAM,GAAG,IAAI,CAG5E"}
|
|
@@ -1,12 +1,16 @@
|
|
|
1
|
-
import { SelfieGuidanceCode } from '@idmission/websdk-core/selfieCapture';
|
|
1
|
+
import { FaceMessageCode, SelfieGuidanceCode, } from '@idmission/websdk-core/selfieCapture';
|
|
2
2
|
// Byte-identical to sdk2's verbiage defaults
|
|
3
|
-
// (SelfieCapture.tsx:273-284, FaceLivenessCapture.tsx:845-912)
|
|
4
|
-
//
|
|
5
|
-
//
|
|
6
|
-
// keys
|
|
3
|
+
// (SelfieCapture.tsx:273-284, FaceLivenessCapture.tsx:845-912), except
|
|
4
|
+
// EYES_CLOSED and HAND_OVER_FACE: sdk2 had neither gate, so those strings are
|
|
5
|
+
// 3.0's own and are translated in i18n/locales/threeOh.ts. These strings are
|
|
6
|
+
// i18n translation keys — any drift silently un-translates 8 locales (see
|
|
7
|
+
// selfieStrings.test.ts's locale-parity block for the two keys sdk2 itself
|
|
8
|
+
// never manages to translate).
|
|
7
9
|
const selfieGuidanceKeys = {
|
|
8
10
|
HOLD_STILL: 'Hold still for a few seconds...',
|
|
11
|
+
HAND_OVER_FACE: 'Remove your hand from your face...',
|
|
9
12
|
LOOK_STRAIGHT: 'Look straight into the camera...',
|
|
13
|
+
EYES_CLOSED: 'Keep your eyes open...',
|
|
10
14
|
MOVE_BACK: 'Move back...',
|
|
11
15
|
MOVE_FORWARD: 'Move forward...',
|
|
12
16
|
MOVE_TO_CENTER: 'Move to the center...',
|
|
@@ -19,6 +23,33 @@ export function selfieGuidanceMessageKey(code) {
|
|
|
19
23
|
return '';
|
|
20
24
|
return selfieGuidanceKeys[code];
|
|
21
25
|
}
|
|
26
|
+
// The other half of the face pill's vocabulary: challenge prompts, the
|
|
27
|
+
// liveness status ladder, and the manual-capture prompt. Byte-identical to
|
|
28
|
+
// sdk2's verbiage defaults (FaceLivenessCapture.tsx:845-912), and — like every
|
|
29
|
+
// string in this file — these ARE the i18n translation keys, so any drift here
|
|
30
|
+
// silently un-translates 8 locales.
|
|
31
|
+
//
|
|
32
|
+
// Exhaustive by type: adding a `FaceMessageCode` without a string here is a
|
|
33
|
+
// compile error, which is the point. Strings may change freely; the codes they
|
|
34
|
+
// hang off may not (see FaceMessageCode's append-only note).
|
|
35
|
+
const faceMessageKeys = {
|
|
36
|
+
TURN_LEFT: 'Turn your head left',
|
|
37
|
+
TURN_RIGHT: 'Turn your head right',
|
|
38
|
+
RETURN_TO_CENTER: 'Return to center',
|
|
39
|
+
BLINK: 'Blink',
|
|
40
|
+
BLINK_TWICE: 'Blink twice',
|
|
41
|
+
REMOVE_EYE_COVERINGS: 'Please remove your eye coverings (sunglasses, eye patch, etc.)...',
|
|
42
|
+
REMOVE_HEAD_COVERINGS: 'Please remove your head coverings (hat, scarf, etc.)...',
|
|
43
|
+
REMOVE_MASK: 'Please remove your mask...',
|
|
44
|
+
CHALLENGE_TIMED_OUT: "Let's try that again — please follow the prompts.",
|
|
45
|
+
LIVENESS_CHECK_FAILED: 'Could not verify your face.',
|
|
46
|
+
LIVENESS_CHECK_ERROR: 'An error occurred while verifying your face.',
|
|
47
|
+
VALIDATING: 'Photo captured, verifying...',
|
|
48
|
+
MANUAL_CAPTURE: 'Position your face in the circle and click to capture.',
|
|
49
|
+
};
|
|
50
|
+
export function faceMessageKey(code) {
|
|
51
|
+
return faceMessageKeys[code];
|
|
52
|
+
}
|
|
22
53
|
/**
|
|
23
54
|
* sdk2's guidance-pill variant selection: `negative` (FAILED/ERROR/covering
|
|
24
55
|
* states, supplied by the liveness view) always wins; otherwise `satisfied`
|
|
@@ -46,24 +77,33 @@ export function selfieGuidanceVariant({ satisfied, negative, }) {
|
|
|
46
77
|
// The view is expected to render `` `${t(key)} ${blinkCount} times` `` to
|
|
47
78
|
// match that exactly — sdk2 parity, not an oversight.
|
|
48
79
|
const TURN_KINDS = new Set(['turn-left', 'turn-right']);
|
|
49
|
-
export function
|
|
80
|
+
export function challengePromptCode(snapshot) {
|
|
50
81
|
const { promptKind, promptCount, awaitingReturn } = snapshot;
|
|
51
82
|
if (promptKind !== null && TURN_KINDS.has(promptKind) && awaitingReturn) {
|
|
52
|
-
return {
|
|
83
|
+
return { code: FaceMessageCode.RETURN_TO_CENTER };
|
|
53
84
|
}
|
|
54
85
|
if (promptKind === 'turn-left')
|
|
55
|
-
return {
|
|
86
|
+
return { code: FaceMessageCode.TURN_LEFT };
|
|
56
87
|
if (promptKind === 'turn-right')
|
|
57
|
-
return {
|
|
88
|
+
return { code: FaceMessageCode.TURN_RIGHT };
|
|
58
89
|
if (promptKind === 'blink') {
|
|
59
90
|
if (promptCount === 2)
|
|
60
|
-
return {
|
|
91
|
+
return { code: FaceMessageCode.BLINK_TWICE };
|
|
61
92
|
if (promptCount > 2)
|
|
62
|
-
return {
|
|
63
|
-
return {
|
|
93
|
+
return { code: FaceMessageCode.BLINK, blinkCount: promptCount };
|
|
94
|
+
return { code: FaceMessageCode.BLINK };
|
|
64
95
|
}
|
|
65
96
|
return null;
|
|
66
97
|
}
|
|
98
|
+
/** `challengePromptCode` resolved to its translation key. */
|
|
99
|
+
export function challengePromptKey(snapshot) {
|
|
100
|
+
const prompt = challengePromptCode(snapshot);
|
|
101
|
+
if (!prompt)
|
|
102
|
+
return null;
|
|
103
|
+
return prompt.blinkCount === undefined
|
|
104
|
+
? { key: faceMessageKey(prompt.code) }
|
|
105
|
+
: { key: faceMessageKey(prompt.code), blinkCount: prompt.blinkCount };
|
|
106
|
+
}
|
|
67
107
|
// Liveness-status ladder (FaceLivenessCapture.tsx:896-912's `guidanceMessage`
|
|
68
108
|
// derivation, minus its leading `challengeMessage ? ... :` branch).
|
|
69
109
|
// LivenessMachineState carries no promptKind/challenge fields — that's
|
|
@@ -73,25 +113,28 @@ export function challengePromptKey(snapshot) {
|
|
|
73
113
|
// eye covering > head covering > mask > FAILED (challengeTimedOut ? "let's
|
|
74
114
|
// try again" : "could not verify") > ERROR > CAPTURED|IN_PROGRESS
|
|
75
115
|
// ("verifying...") > null (nothing to show).
|
|
76
|
-
export function
|
|
77
|
-
if (state.eyeCoveringDetected)
|
|
78
|
-
return
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
return 'Please remove your head coverings (hat, scarf, etc.)...';
|
|
82
|
-
}
|
|
116
|
+
export function livenessStatusCode(state) {
|
|
117
|
+
if (state.eyeCoveringDetected)
|
|
118
|
+
return FaceMessageCode.REMOVE_EYE_COVERINGS;
|
|
119
|
+
if (state.headCoveringDetected)
|
|
120
|
+
return FaceMessageCode.REMOVE_HEAD_COVERINGS;
|
|
83
121
|
if (state.maskDetected)
|
|
84
|
-
return
|
|
122
|
+
return FaceMessageCode.REMOVE_MASK;
|
|
85
123
|
if (state.requestState === 'FAILED') {
|
|
86
124
|
return state.challengeTimedOut
|
|
87
|
-
?
|
|
88
|
-
:
|
|
125
|
+
? FaceMessageCode.CHALLENGE_TIMED_OUT
|
|
126
|
+
: FaceMessageCode.LIVENESS_CHECK_FAILED;
|
|
89
127
|
}
|
|
90
128
|
if (state.requestState === 'ERROR') {
|
|
91
|
-
return
|
|
129
|
+
return FaceMessageCode.LIVENESS_CHECK_ERROR;
|
|
92
130
|
}
|
|
93
131
|
if (state.requestState === 'CAPTURED' || state.requestState === 'IN_PROGRESS') {
|
|
94
|
-
return
|
|
132
|
+
return FaceMessageCode.VALIDATING;
|
|
95
133
|
}
|
|
96
134
|
return null;
|
|
97
135
|
}
|
|
136
|
+
/** `livenessStatusCode` resolved to its translation key. */
|
|
137
|
+
export function livenessStatusKey(state) {
|
|
138
|
+
const code = livenessStatusCode(state);
|
|
139
|
+
return code === null ? null : faceMessageKey(code);
|
|
140
|
+
}
|
|
@@ -1,4 +1,37 @@
|
|
|
1
|
-
import { type InstructionCode, type GuidanceEvent } from '@idmission/websdk-core/idCapture';
|
|
1
|
+
import { GuidanceCode, type InstructionCode, type GuidanceEvent } from '@idmission/websdk-core/idCapture';
|
|
2
|
+
import type { CustomerSuppliedVerbiage } from '../i18n';
|
|
2
3
|
export declare function guidanceMessageKey(event: GuidanceEvent): string;
|
|
3
4
|
export declare function instructionKey(code: InstructionCode): string;
|
|
5
|
+
/**
|
|
6
|
+
* sdk2's per-document capture copy (IdCapture.tsx:62-80): the `idCardFront`,
|
|
7
|
+
* `idCardBack` and `passport` bags of a 2.x `verbiage`. The view picks one bag
|
|
8
|
+
* by requested document type, exactly as sdk2's wizard did
|
|
9
|
+
* (IdCaptureWizard.tsx:1165-1190), and reads the guide instruction and the
|
|
10
|
+
* guidance pill out of it. A key left unset falls back to the translated
|
|
11
|
+
* default above, so a customer can override one message and keep the rest.
|
|
12
|
+
*/
|
|
13
|
+
export type IdCaptureDocumentVerbiage = {
|
|
14
|
+
instructionText?: CustomerSuppliedVerbiage;
|
|
15
|
+
capturingText?: CustomerSuppliedVerbiage;
|
|
16
|
+
captureFailedText?: CustomerSuppliedVerbiage;
|
|
17
|
+
guidanceSatisfiedText?: CustomerSuppliedVerbiage;
|
|
18
|
+
guidanceNotDetectedText?: CustomerSuppliedVerbiage;
|
|
19
|
+
guidanceBackDetectedFirstText?: CustomerSuppliedVerbiage;
|
|
20
|
+
guidancePleaseFlipText?: CustomerSuppliedVerbiage;
|
|
21
|
+
guidanceIdCardNotAllowedText?: CustomerSuppliedVerbiage;
|
|
22
|
+
guidancePassportNotAllowedText?: CustomerSuppliedVerbiage;
|
|
23
|
+
guidanceBookletCornersCutOffText?: CustomerSuppliedVerbiage;
|
|
24
|
+
guidanceBookletTooFarText?: CustomerSuppliedVerbiage;
|
|
25
|
+
guidanceNotCenteredText?: CustomerSuppliedVerbiage;
|
|
26
|
+
guidanceTooCloseText?: CustomerSuppliedVerbiage;
|
|
27
|
+
guidanceFingersOccludingText?: CustomerSuppliedVerbiage;
|
|
28
|
+
guidanceGlareOnDocumentText?: CustomerSuppliedVerbiage;
|
|
29
|
+
guidanceHologramOnDocumentText?: CustomerSuppliedVerbiage;
|
|
30
|
+
guidanceNotStableText?: CustomerSuppliedVerbiage;
|
|
31
|
+
guidanceTooBlurryText?: CustomerSuppliedVerbiage;
|
|
32
|
+
};
|
|
33
|
+
/** The customer's copy for a guidance code, or undefined to use the default. */
|
|
34
|
+
export declare function guidanceVerbiage(bag: IdCaptureDocumentVerbiage | undefined, code: GuidanceCode): CustomerSuppliedVerbiage;
|
|
35
|
+
/** The customer's copy for an instruction code, or undefined to use the default. */
|
|
36
|
+
export declare function instructionVerbiage(bag: Pick<IdCaptureDocumentVerbiage, 'instructionText' | 'capturingText' | 'captureFailedText'> | undefined, code: InstructionCode): CustomerSuppliedVerbiage;
|
|
4
37
|
//# sourceMappingURL=strings.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"strings.d.ts","sourceRoot":"","sources":["../../src/guidance/strings.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"strings.d.ts","sourceRoot":"","sources":["../../src/guidance/strings.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,KAAK,eAAe,EACpB,KAAK,aAAa,EACnB,MAAM,kCAAkC,CAAA;AAEzC,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAA;AA0BvD,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,aAAa,GAAG,MAAM,CAK/D;AAaD,wBAAgB,cAAc,CAAC,IAAI,EAAE,eAAe,GAAG,MAAM,CAE5D;AAED;;;;;;;GAOG;AACH,MAAM,MAAM,yBAAyB,GAAG;IACtC,eAAe,CAAC,EAAE,wBAAwB,CAAA;IAC1C,aAAa,CAAC,EAAE,wBAAwB,CAAA;IACxC,iBAAiB,CAAC,EAAE,wBAAwB,CAAA;IAC5C,qBAAqB,CAAC,EAAE,wBAAwB,CAAA;IAChD,uBAAuB,CAAC,EAAE,wBAAwB,CAAA;IAClD,6BAA6B,CAAC,EAAE,wBAAwB,CAAA;IACxD,sBAAsB,CAAC,EAAE,wBAAwB,CAAA;IACjD,4BAA4B,CAAC,EAAE,wBAAwB,CAAA;IACvD,8BAA8B,CAAC,EAAE,wBAAwB,CAAA;IACzD,gCAAgC,CAAC,EAAE,wBAAwB,CAAA;IAC3D,yBAAyB,CAAC,EAAE,wBAAwB,CAAA;IACpD,uBAAuB,CAAC,EAAE,wBAAwB,CAAA;IAClD,oBAAoB,CAAC,EAAE,wBAAwB,CAAA;IAC/C,4BAA4B,CAAC,EAAE,wBAAwB,CAAA;IACvD,2BAA2B,CAAC,EAAE,wBAAwB,CAAA;IACtD,8BAA8B,CAAC,EAAE,wBAAwB,CAAA;IACzD,qBAAqB,CAAC,EAAE,wBAAwB,CAAA;IAChD,qBAAqB,CAAC,EAAE,wBAAwB,CAAA;CACjD,CAAA;AA0BD,gFAAgF;AAChF,wBAAgB,gBAAgB,CAC9B,GAAG,EAAE,yBAAyB,GAAG,SAAS,EAC1C,IAAI,EAAE,YAAY,GACjB,wBAAwB,CAG1B;AAeD,oFAAoF;AACpF,wBAAgB,mBAAmB,CACjC,GAAG,EACC,IAAI,CAAC,yBAAyB,EAAE,iBAAiB,GAAG,eAAe,GAAG,mBAAmB,CAAC,GAC1F,SAAS,EACb,IAAI,EAAE,eAAe,GACpB,wBAAwB,CAE1B"}
|
package/dist/guidance/strings.js
CHANGED
|
@@ -41,3 +41,42 @@ const instructionKeys = {
|
|
|
41
41
|
export function instructionKey(code) {
|
|
42
42
|
return instructionKeys[code];
|
|
43
43
|
}
|
|
44
|
+
// sdk2 guidanceCode.ts `guidanceVerbiageKeys`, onto core's code names. The
|
|
45
|
+
// BARCODE_* codes have no per-document key: sdk2 read their copy off the
|
|
46
|
+
// wizard's own bag (`guidanceBarcodeRecapture*Text`), see `IdCaptureGuides`.
|
|
47
|
+
const guidanceVerbiageKeys = {
|
|
48
|
+
HOLD_STILL: 'guidanceSatisfiedText',
|
|
49
|
+
NO_DOCUMENT: 'guidanceNotDetectedText',
|
|
50
|
+
BACK_DETECTED_FLIP: 'guidanceBackDetectedFirstText',
|
|
51
|
+
FRONT_DETECTED_FLIP: 'guidancePleaseFlipText',
|
|
52
|
+
ID_CARD_NOT_ALLOWED: 'guidanceIdCardNotAllowedText',
|
|
53
|
+
PASSPORT_NOT_ALLOWED: 'guidancePassportNotAllowedText',
|
|
54
|
+
BOOKLET_CORNERS_CUT_OFF: 'guidanceBookletCornersCutOffText',
|
|
55
|
+
BOOKLET_TOO_FAR: 'guidanceBookletTooFarText',
|
|
56
|
+
NOT_CENTERED: 'guidanceNotCenteredText',
|
|
57
|
+
TOO_CLOSE: 'guidanceTooCloseText',
|
|
58
|
+
FINGER_OCCLUSION: 'guidanceFingersOccludingText',
|
|
59
|
+
GLARE: 'guidanceGlareOnDocumentText',
|
|
60
|
+
HOLOGRAM_REFLECTION: 'guidanceHologramOnDocumentText',
|
|
61
|
+
NOT_STABLE: 'guidanceNotStableText',
|
|
62
|
+
OUT_OF_FOCUS: 'guidanceTooBlurryText',
|
|
63
|
+
};
|
|
64
|
+
/** The customer's copy for a guidance code, or undefined to use the default. */
|
|
65
|
+
export function guidanceVerbiage(bag, code) {
|
|
66
|
+
if (!bag || !(code in guidanceVerbiageKeys))
|
|
67
|
+
return undefined;
|
|
68
|
+
return bag[guidanceVerbiageKeys[code]];
|
|
69
|
+
}
|
|
70
|
+
// sdk2 IdCaptureGuides.tsx:100-136: the per-document `instructionText` covers
|
|
71
|
+
// all three scan instructions, since the bag is already per document.
|
|
72
|
+
const instructionVerbiageKeys = {
|
|
73
|
+
SCAN_FRONT: 'instructionText',
|
|
74
|
+
SCAN_BACK: 'instructionText',
|
|
75
|
+
SCAN_PASSPORT: 'instructionText',
|
|
76
|
+
CAPTURING: 'capturingText',
|
|
77
|
+
CAPTURE_FAILED: 'captureFailedText',
|
|
78
|
+
};
|
|
79
|
+
/** The customer's copy for an instruction code, or undefined to use the default. */
|
|
80
|
+
export function instructionVerbiage(bag, code) {
|
|
81
|
+
return bag?.[instructionVerbiageKeys[code]];
|
|
82
|
+
}
|