@idmission/websdk-ui 0.2.0 → 0.6.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 +75 -4
- package/dist/DocumentCaptureView.d.ts +7 -5
- package/dist/DocumentCaptureView.d.ts.map +1 -1
- package/dist/DocumentCaptureView.js +30 -26
- package/dist/FaceLivenessView.d.ts +2 -2
- package/dist/FaceLivenessView.d.ts.map +1 -1
- package/dist/FaceLivenessView.js +47 -13
- package/dist/IdCaptureView.d.ts +27 -15
- package/dist/IdCaptureView.d.ts.map +1 -1
- package/dist/IdCaptureView.js +149 -26
- package/dist/SelfieCaptureView.d.ts +18 -1
- package/dist/SelfieCaptureView.d.ts.map +1 -1
- package/dist/SelfieCaptureView.js +13 -4
- package/dist/SignatureCaptureView.d.ts +18 -5
- package/dist/SignatureCaptureView.d.ts.map +1 -1
- package/dist/SignatureCaptureView.js +90 -15
- package/dist/VideoIdCaptureView.d.ts +14 -2
- package/dist/VideoIdCaptureView.d.ts.map +1 -1
- package/dist/VideoIdCaptureView.js +13 -6
- 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/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 +6 -0
- 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.map +1 -1
- package/dist/components/document/DocumentCaptureAutoCaptureDebugLayer.js +4 -5
- package/dist/components/document/DocumentCaptureAutoCaptureGuidance.d.ts.map +1 -1
- package/dist/components/document/DocumentCaptureAutoCaptureGuidance.js +40 -13
- 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 +22 -7
- 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 +5 -1
- package/dist/components/review/SignatureCaptureDiagnostics.d.ts.map +1 -1
- package/dist/components/review/SignatureCaptureDiagnostics.js +4 -2
- 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 +9 -2
- package/dist/components/selfie/SelfieCaptureSurface.d.ts.map +1 -1
- package/dist/components/selfie/SelfieCaptureSurface.js +77 -16
- 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/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 +7 -1
- package/dist/flows/CompositeWizard.d.ts.map +1 -1
- package/dist/flows/CompositeWizard.js +6 -2
- package/dist/flows/CustomerBiometricsEnrollmentFlow.d.ts +3 -3
- package/dist/flows/CustomerBiometricsEnrollmentFlow.d.ts.map +1 -1
- package/dist/flows/CustomerBiometricsEnrollmentFlow.js +26 -4
- package/dist/flows/CustomerIdAndBiometricsEnrollmentFlow.d.ts +3 -3
- package/dist/flows/CustomerIdAndBiometricsEnrollmentFlow.d.ts.map +1 -1
- package/dist/flows/CustomerIdAndBiometricsEnrollmentFlow.js +45 -9
- package/dist/flows/DocumentCaptureFlow.d.ts +4 -3
- package/dist/flows/DocumentCaptureFlow.d.ts.map +1 -1
- package/dist/flows/DocumentCaptureFlow.js +14 -8
- package/dist/flows/FaceValidationFlow.d.ts +2 -2
- package/dist/flows/FaceValidationFlow.d.ts.map +1 -1
- package/dist/flows/FaceValidationFlow.js +7 -2
- package/dist/flows/FlowChassis.d.ts +19 -1
- package/dist/flows/FlowChassis.d.ts.map +1 -1
- package/dist/flows/FlowChassis.js +40 -4
- package/dist/flows/IdAndFaceValidationFlow.d.ts +3 -3
- package/dist/flows/IdAndFaceValidationFlow.d.ts.map +1 -1
- package/dist/flows/IdAndFaceValidationFlow.js +33 -3
- package/dist/flows/IdValidationFlow.d.ts +10 -5
- package/dist/flows/IdValidationFlow.d.ts.map +1 -1
- package/dist/flows/IdValidationFlow.js +32 -5
- package/dist/flows/SignatureKYCFlow.d.ts +43 -7
- package/dist/flows/SignatureKYCFlow.d.ts.map +1 -1
- package/dist/flows/SignatureKYCFlow.js +154 -16
- package/dist/flows/SubmissionProvider.d.ts +12 -3
- package/dist/flows/SubmissionProvider.d.ts.map +1 -1
- package/dist/flows/SubmissionProvider.js +142 -16
- package/dist/flows/VideoIdValidationFlow.d.ts +3 -5
- package/dist/flows/VideoIdValidationFlow.d.ts.map +1 -1
- package/dist/flows/VideoIdValidationFlow.js +38 -4
- package/dist/flows/additionalDocuments.d.ts.map +1 -1
- package/dist/flows/additionalDocuments.js +3 -6
- package/dist/flows/approval.d.ts +1 -14
- package/dist/flows/approval.d.ts.map +1 -1
- package/dist/flows/approval.js +1 -19
- 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/customerMatch/CustomerMatchCapture.d.ts +3 -2
- package/dist/flows/customerMatch/CustomerMatchCapture.d.ts.map +1 -1
- package/dist/flows/customerMatch/CustomerMatchCapture.js +3 -2
- package/dist/flows/customerMatch/CustomerMatchFlow.d.ts +13 -4
- package/dist/flows/customerMatch/CustomerMatchFlow.d.ts.map +1 -1
- package/dist/flows/customerMatch/CustomerMatchFlow.js +17 -12
- package/dist/flows/flowSettings.d.ts +11 -0
- package/dist/flows/flowSettings.d.ts.map +1 -0
- package/dist/flows/flowSettings.js +20 -0
- package/dist/flows/ringScreens.d.ts +1 -0
- package/dist/flows/ringScreens.d.ts.map +1 -1
- package/dist/flows/ringScreens.js +17 -2
- package/dist/flows/signatureStep.d.ts +6 -1
- package/dist/flows/signatureStep.d.ts.map +1 -1
- package/dist/flows/types.d.ts +120 -10
- package/dist/flows/types.d.ts.map +1 -1
- package/dist/flows/videoIdSteps.d.ts +2 -2
- package/dist/flows/videoIdSteps.d.ts.map +1 -1
- package/dist/guidance/selfieStrings.d.ts.map +1 -1
- package/dist/guidance/selfieStrings.js +8 -4
- 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 +5 -1
- package/dist/i18n/index.d.ts.map +1 -1
- package/dist/i18n/index.js +13 -2
- package/dist/i18n/locales/threeOh.d.ts.map +1 -1
- package/dist/i18n/locales/threeOh.js +56 -2
- package/dist/index.d.ts +9 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/testing/autoCaptureFrames.d.ts.map +1 -1
- package/dist/testing/autoCaptureFrames.js +10 -4
- 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/fakeClient.d.ts +41 -2
- package/dist/testing/fakeClient.d.ts.map +1 -1
- package/dist/testing/fakeClient.js +71 -16
- package/dist/testing/fakeSelfieController.d.ts.map +1 -1
- package/dist/testing/fakeSelfieController.js +7 -0
- package/dist/testing/index.d.ts +1 -1
- package/dist/testing/index.d.ts.map +1 -1
- package/dist/testing/index.js +1 -1
- 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 +24 -3
- package/dist/useIdmissionClient.d.ts.map +1 -1
- package/dist/useIdmissionClient.js +46 -0
- package/dist/utils/mountOnly.d.ts +25 -0
- package/dist/utils/mountOnly.d.ts.map +1 -0
- package/dist/utils/mountOnly.js +111 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +10 -9
- package/dist/flows/autoCaptureMountGuard.d.ts +0 -22
- package/dist/flows/autoCaptureMountGuard.d.ts.map +0 -1
- package/dist/flows/autoCaptureMountGuard.js +0 -61
package/README.md
CHANGED
|
@@ -4,6 +4,8 @@ React presentation layer for the modular IDmission Web SDK 2 implementation.
|
|
|
4
4
|
It sits on top of `@idmission/websdk-core`, the framework-agnostic engine, and
|
|
5
5
|
owns rendered UI, theming, i18n, React bindings, and complete validation flows.
|
|
6
6
|
|
|
7
|
+
Flows accept an optional `captureProgress` task handle from core. See [capture progress](../../docs/capture-progress.md) for lifecycle ownership, signed context, and local verification. The views report final committed prompt codes after display overrides.
|
|
8
|
+
|
|
7
9
|
## Install
|
|
8
10
|
|
|
9
11
|
```
|
|
@@ -11,7 +13,7 @@ pnpm add @idmission/websdk-core @idmission/websdk-ui
|
|
|
11
13
|
```
|
|
12
14
|
|
|
13
15
|
Migrating an existing `idmission-web-sdk` integration? Follow the
|
|
14
|
-
[compatibility-facade migration guide](https://github.com/
|
|
16
|
+
[compatibility-facade migration guide](https://github.com/idmission/websdk/blob/develop/packages/websdk-ui/MIGRATION_FROM_COMPAT.md).
|
|
15
17
|
|
|
16
18
|
### Peer dependencies
|
|
17
19
|
|
|
@@ -40,6 +42,10 @@ non-callback fields are read once when the controller is built, so to change
|
|
|
40
42
|
one after mount remount the flow with a `key` or pass your own `controller`.
|
|
41
43
|
The one exception is `checkLivenessOptions`, which is read live on every
|
|
42
44
|
liveness check.
|
|
45
|
+
In development builds, changing one of those fields (or a `DocumentCaptureFlow`
|
|
46
|
+
document's capture fields, such as a late `autoCapture`) after mount logs a
|
|
47
|
+
`console.warn` naming it. Inline objects rebuilt with equal values and new
|
|
48
|
+
callback implementations do not warn.
|
|
43
49
|
No `useMemo`/`useCallback` is required, and none of this depends on the
|
|
44
50
|
React Compiler.
|
|
45
51
|
|
|
@@ -86,12 +92,22 @@ and `timeoutMs` are mount-only.
|
|
|
86
92
|
|
|
87
93
|
Callback presence is mount-only too, while callbacks supplied at mount call
|
|
88
94
|
their latest committed defined implementation. This distinction matters for
|
|
89
|
-
`onSubmit`: supplying it selects customer handoff instead of
|
|
90
|
-
|
|
91
|
-
|
|
95
|
+
the deprecated `onSubmit`: supplying it selects customer handoff instead of
|
|
96
|
+
SDK posting for flows without a `submitMode`, so adding or removing it during
|
|
97
|
+
a capture cannot silently switch submission modes. Choose the handoff on the
|
|
98
|
+
flow instead, with `submitMode={{ handoff }}`, which can change between
|
|
99
|
+
submissions. If a later render omits a mounted callback, the most recent defined
|
|
92
100
|
implementation remains active; a callback absent at mount is ignored if it
|
|
93
101
|
appears later. Remount the component that owns the hook with a React `key` to
|
|
94
102
|
intentionally replace the client or change any mount-only option.
|
|
103
|
+
In development builds, changing a mount-only option, or whether a callback is
|
|
104
|
+
passed, logs a `console.warn` naming it.
|
|
105
|
+
|
|
106
|
+
The client also holds the submission status that flows render from, so a
|
|
107
|
+
retry that remounts the flow but reuses the client starts from the previous
|
|
108
|
+
attempt's result. Use one client per attempt: call `useIdmissionClient` in a
|
|
109
|
+
small component that renders the flow, and give that component a `key` that
|
|
110
|
+
changes on each attempt.
|
|
95
111
|
|
|
96
112
|
For enrolled-biometrics journeys, use `CustomerIdentificationFlow` (1:N face
|
|
97
113
|
match), `CustomerVerificationFlow` (1:1 against one `submission.enrollmentId`),
|
|
@@ -102,6 +118,30 @@ it, and recapture when the customer is not confirmed live. Set
|
|
|
102
118
|
`useFrontendLivenessToken` to require a confirmed live face — three failed
|
|
103
119
|
checks end on the failure screen and the matching endpoint is never called.
|
|
104
120
|
|
|
121
|
+
### Flow props: top level vs step bags
|
|
122
|
+
|
|
123
|
+
One rule decides where a flow prop goes. **The top level configures the
|
|
124
|
+
whole flow; a step bag configures that one step.** The step bags are the
|
|
125
|
+
`*View` props (`view`, `idView`, `faceView`, `signatureView`, `videoIdView`)
|
|
126
|
+
and the `*Capture` props (`capture`, `idCapture`, `faceCapture`, …). A
|
|
127
|
+
top-level setting reaches every step that has it. When a step bag sets the
|
|
128
|
+
same setting, the step's value wins for that step, `false` included.
|
|
129
|
+
|
|
130
|
+
| Setting | Top level | Reaches | Step override |
|
|
131
|
+
| --- | --- | --- | --- |
|
|
132
|
+
| `lang` | every flow | every step, plus the flow's own loading, error, submitting and result screens | `view.lang` etc. (deprecated in flow bags) |
|
|
133
|
+
| `debugMode` | every flow | every step's debug overlays, and the signature step's `showCaptureDiagnostics` | `view.debugMode` etc. (deprecated in flow bags) |
|
|
134
|
+
| `skipSuccessScreen` | flows with a capture review screen | each step's review screen ("ID captured", "Face liveness verified", the signature review) | `view.skipSuccessScreen` etc. |
|
|
135
|
+
| `showResultScreen` | flows that submit | the result screen after a successful submission | — |
|
|
136
|
+
| `theme`, `className` | every flow | the whole flow | per-step look is `colors` / `classNames` in the step bag |
|
|
137
|
+
|
|
138
|
+
Unset at every level, a step keeps its own default. For example, review
|
|
139
|
+
screens show unless a ring intro screen or the video-ID sequence skips them.
|
|
140
|
+
|
|
141
|
+
`skipSuccessScreen` and `showResultScreen` govern different screens.
|
|
142
|
+
`showSuccessScreen` is the deprecated name for `showResultScreen`, and
|
|
143
|
+
`showResultScreen` wins when both are set.
|
|
144
|
+
|
|
105
145
|
The lower-level views remain available for custom assemblies:
|
|
106
146
|
|
|
107
147
|
`IdCaptureView` is the whole ID-capture screen: it drives the camera, guide
|
|
@@ -207,6 +247,13 @@ explanatory page with an "Enable camera & start" button) before the camera
|
|
|
207
247
|
permission prompt fires, instead of requesting the camera immediately on
|
|
208
248
|
`attach()` — the same pairing `IdCaptureView`'s ring overlay uses.
|
|
209
249
|
|
|
250
|
+
`SignatureKYCFlow` defaults its shared front camera to a 1280×720 maximum
|
|
251
|
+
(720×1280 on portrait streams). Set `allowHigherCameraResolutions={true}` to
|
|
252
|
+
use normal camera resolution selection instead. Explicit limits in
|
|
253
|
+
`faceCapture.camera` or `signatureCapture.camera` still apply to the acquisition
|
|
254
|
+
that opens the shared stream. This prop is read once at mount; remount to change
|
|
255
|
+
it. Higher resolutions can reduce signing responsiveness on slower devices.
|
|
256
|
+
|
|
210
257
|
## Exports
|
|
211
258
|
|
|
212
259
|
| Import | Contents |
|
|
@@ -263,6 +310,30 @@ store/context reads beyond the layout contexts above) — pass
|
|
|
263
310
|
`controller.getState()` fields (or a `useIdCapture(controller)` /
|
|
264
311
|
`useIdCaptureSelector(controller, selector)` selection) straight through.
|
|
265
312
|
|
|
313
|
+
## Barcode controls
|
|
314
|
+
|
|
315
|
+
ID capture defaults to capturing barcode crops and showing them on its success
|
|
316
|
+
screen. To disable barcode crop analysis, model loading, decoding, recapture,
|
|
317
|
+
and the crop's upload, set `capture.enableBarcodeCapture: false` on
|
|
318
|
+
`IdValidationFlow` (or `idCapture.enableBarcodeCapture` on combined ID flows).
|
|
319
|
+
The ID front and back images are still captured. Precaptured barcode images
|
|
320
|
+
are ignored when barcode capture is disabled.
|
|
321
|
+
|
|
322
|
+
To keep barcode capture and submission but hide the crop on the ID capture
|
|
323
|
+
success screen, set `view.showBarcodeImage: false` (or `idView.showBarcodeImage`
|
|
324
|
+
on combined ID flows). The display option also hides barcode comparison images
|
|
325
|
+
in debug mode. It does not hide barcode data from the terminal submission
|
|
326
|
+
success diagnostics.
|
|
327
|
+
|
|
328
|
+
The `idmission-web-sdk` façade exposes both options as top-level props:
|
|
329
|
+
|
|
330
|
+
```tsx
|
|
331
|
+
<IdValidation sessionId={sessionId} enableBarcodeCapture={false} />
|
|
332
|
+
|
|
333
|
+
// Display only: the crop is still captured and submitted.
|
|
334
|
+
<IdValidation sessionId={sessionId} showBarcodeImage={false} />
|
|
335
|
+
```
|
|
336
|
+
|
|
266
337
|
## Test harness
|
|
267
338
|
|
|
268
339
|
Tests run under `node:test`, not a browser test runner. Because the
|
|
@@ -3,6 +3,7 @@ import type { DocumentCaptureController } from '@idmission/websdk-core/documentC
|
|
|
3
3
|
import { type CameraFeedMode } from './components/CameraFeed';
|
|
4
4
|
import { type DocumentCaptureGuideOverlayClassNames } from './components/document/DocumentCaptureGuideOverlay';
|
|
5
5
|
import type { DocumentCapturePrompt } from './components/document/types';
|
|
6
|
+
import type { CameraAccessDeniedReason } from './components/error/CameraAccessDeniedOverlay';
|
|
6
7
|
import { type CustomerSuppliedVerbiage, type LangOption } from './i18n';
|
|
7
8
|
export type DocumentCaptureViewClassNames = {
|
|
8
9
|
cameraFeedWrapper?: string;
|
|
@@ -64,12 +65,13 @@ export type DocumentCaptureViewProps = {
|
|
|
64
65
|
/** Fired once, when every document has uploaded successfully. */
|
|
65
66
|
onCompleted?: () => void;
|
|
66
67
|
/**
|
|
67
|
-
* Fires once when the
|
|
68
|
-
*
|
|
69
|
-
*
|
|
70
|
-
*
|
|
68
|
+
* Fires once when the camera cannot be used — sdk2's
|
|
69
|
+
* `onCameraAccessDenied`. `reason` tells a refused permission from a camera
|
|
70
|
+
* that could not be started. A pure notification: the view renders its
|
|
71
|
+
* camera error UI either way. Fires again only if the camera later works
|
|
72
|
+
* and then fails again, or fails for the other reason.
|
|
71
73
|
*/
|
|
72
|
-
onCameraAccessDenied?: () => void;
|
|
74
|
+
onCameraAccessDenied?: (reason: CameraAccessDeniedReason) => void;
|
|
73
75
|
/** sdk2's `onCameraTamperingDetected`, which its DocumentCapture wired
|
|
74
76
|
* through `CameraStoreProvider` (DocumentCapture.tsx:193). Fires once per
|
|
75
77
|
* detection. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DocumentCaptureView.d.ts","sourceRoot":"","sources":["../src/DocumentCaptureView.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAqB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAEzD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,wCAAwC,CAAA;AAEvF,OAAO,EAGL,KAAK,cAAc,EACpB,MAAM,yBAAyB,CAAA;
|
|
1
|
+
{"version":3,"file":"DocumentCaptureView.d.ts","sourceRoot":"","sources":["../src/DocumentCaptureView.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAqB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAEzD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,wCAAwC,CAAA;AAEvF,OAAO,EAGL,KAAK,cAAc,EACpB,MAAM,yBAAyB,CAAA;AAchC,OAAO,EAEL,KAAK,qCAAqC,EAC3C,MAAM,mDAAmD,CAAA;AAC1D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAA;AACxE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,8CAA8C,CAAA;AAG5F,OAAO,EAEL,KAAK,wBAAwB,EAC7B,KAAK,UAAU,EAGhB,MAAM,QAAQ,CAAA;AAGf,MAAM,MAAM,6BAA6B,GAAG;IAC1C,iBAAiB,CAAC,EA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AA;AAED;oEACoE;AACpE,eAAO,MAAM,kCAAkC;;;;;;;;;;;;;;;;;;;;;;CAqDc,CAAA;AAE7D;;;;;;;;;;;;GAYG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,wBAAwB,2CAQlE"}
|
|
@@ -18,7 +18,10 @@ import { LoaderButton } from './components/common/LoaderButton';
|
|
|
18
18
|
import { DocumentCaptureAutoCaptureDebugLayer } from './components/document/DocumentCaptureAutoCaptureDebugLayer';
|
|
19
19
|
import { DocumentCaptureAutoCaptureGuidance, DocumentCaptureManualCaptureHint, } from './components/document/DocumentCaptureAutoCaptureGuidance';
|
|
20
20
|
import { DocumentCaptureReviewScreen } from './components/document/DocumentCaptureReviewScreen';
|
|
21
|
+
import { BrowserEdgeTint, opaqueColor, } from './components/common/BrowserEdgeTint';
|
|
22
|
+
import { GRAY_OVERLAY_BACKGROUND } from './components/common/overlay';
|
|
21
23
|
import { DocumentCaptureGuideOverlay, } from './components/document/DocumentCaptureGuideOverlay';
|
|
24
|
+
import { useCameraAccessDeniedReport } from './components/error/useCameraAccessDeniedReport';
|
|
22
25
|
import { GuideLayoutProvider, useGuideLayout } from './layout/GuideLayoutContext';
|
|
23
26
|
import { SdkLanguageProvider, useLanguage, useTranslations, } from './i18n';
|
|
24
27
|
import { useSessionReady } from './flows/AuthStateContext';
|
|
@@ -301,6 +304,24 @@ function DocumentCaptureSurface({ controller, lang = 'auto', sessionReady: sessi
|
|
|
301
304
|
const showReview = !!contentUrl &&
|
|
302
305
|
!!entry?.item.autoCapture &&
|
|
303
306
|
(capturedMode === 'Auto' || capturedMode === 'Manual');
|
|
307
|
+
/**
|
|
308
|
+
* The colour touching both viewport edges, for the browser to tint its own
|
|
309
|
+
* bars with — see `BrowserEdgeTint`. Null outside the guided treatment, so a
|
|
310
|
+
* 2.x integrator's page chrome stays theirs.
|
|
311
|
+
*
|
|
312
|
+
* The capture screen and the review are the SAME route to a host, which is
|
|
313
|
+
* why this has to come from here: only the view knows it just swapped a
|
|
314
|
+
* near-black camera surface for a light card. Left to the host, iOS 26 Safari
|
|
315
|
+
* showed a white toolbar under the camera and kept the camera's dark top bar
|
|
316
|
+
* over the review.
|
|
317
|
+
*/
|
|
318
|
+
const browserEdgeColor = showReview
|
|
319
|
+
? GRAY_OVERLAY_BACKGROUND
|
|
320
|
+
: autoCaptureGuiding
|
|
321
|
+
? // The mask can be translucent — `fullscreen`'s scrim, or a theme's —
|
|
322
|
+
// and the strips must not be. Same hue, alpha dropped.
|
|
323
|
+
(opaqueColor(guidedMaskColor) ?? GUIDED_SURROUND_COLOR)
|
|
324
|
+
: null;
|
|
304
325
|
// Completion is derived rather than event-driven so it survives a remount:
|
|
305
326
|
// the ref only stops it firing twice within one mount.
|
|
306
327
|
const everyUploaded = state.documents.length > 0 &&
|
|
@@ -312,21 +333,14 @@ function DocumentCaptureSurface({ controller, lang = 'auto', sessionReady: sessi
|
|
|
312
333
|
completedRef.current = true;
|
|
313
334
|
onCompleted?.();
|
|
314
335
|
}, [everyUploaded, onCompleted]);
|
|
315
|
-
|
|
336
|
+
// Either camera failure leaves the capture button stuck on "Loading", so
|
|
337
|
+
// both get the retry button.
|
|
338
|
+
const cameraFailed = state.error?.code === 'CAMERA_PERMISSION_DENIED' ||
|
|
339
|
+
state.error?.code === 'CAMERA_UNAVAILABLE';
|
|
316
340
|
const cameraTampered = state.error?.code === 'CAMERA_TAMPERING_SUSPECTED';
|
|
317
|
-
// Latched like the completion effect above: a notification per
|
|
318
|
-
// detection, not per render.
|
|
319
|
-
|
|
320
|
-
useEffect(() => {
|
|
321
|
-
if (!cameraAccessDenied) {
|
|
322
|
-
deniedReportedRef.current = false;
|
|
323
|
-
return;
|
|
324
|
-
}
|
|
325
|
-
if (deniedReportedRef.current)
|
|
326
|
-
return;
|
|
327
|
-
deniedReportedRef.current = true;
|
|
328
|
-
onCameraAccessDenied?.();
|
|
329
|
-
}, [cameraAccessDenied, onCameraAccessDenied]);
|
|
341
|
+
// Latched like the completion effect above: a notification per camera
|
|
342
|
+
// failure or detection, not per render.
|
|
343
|
+
useCameraAccessDeniedReport(controller, state.error?.code, onCameraAccessDenied);
|
|
330
344
|
const tamperReportedRef = useRef(false);
|
|
331
345
|
useEffect(() => {
|
|
332
346
|
if (!cameraTampered) {
|
|
@@ -360,7 +374,7 @@ function DocumentCaptureSurface({ controller, lang = 'auto', sessionReady: sessi
|
|
|
360
374
|
void controller.actions.capture();
|
|
361
375
|
}, disabled: !state.camera.ready ||
|
|
362
376
|
state.capturing ||
|
|
363
|
-
manualBurstMs !== null }), manualBurstMs !== null && (_jsx(GuidedShutterSweep, { "$durationMs": manualBurstMs, viewBox: `0 0 ${SHUTTER_RING_BOX_PX} ${SHUTTER_RING_BOX_PX}`, "aria-hidden": "true", "data-testid": "document-capture-shutter-sweep", children: _jsx("circle", { cx: SHUTTER_RING_BOX_PX / 2, cy: SHUTTER_RING_BOX_PX / 2, r: SHUTTER_RING_RADIUS_PX }) }))] }) })), showReview && contentUrl && (_jsx(DocumentCaptureReviewScreen, { contentUrl: contentUrl, headingText: verbiage.reviewHeadingText, retryText: verbiage.retryCaptureBtnText, uploadText: verbiage.uploadBtnText, uploadingText: verbiage.uploadingBtnText, retryUploadText: verbiage.retryUploadBtnText, successText: verbiage.successBtnText, uploadState: uploadState, onRetry: () => controller.actions.retry(), onUpload: () => void controller.actions.upload(), classNames: classNames, alt: reviewImageAlt })), _jsxs(FooterRow, { "$maskColor": autoCaptureGuiding ? guidedMaskColor : maskColor, className: classNames.footerRow, "data-testid": "document-capture-footer", children: [resolvedInstructions && !autoCaptureGuiding && (_jsx(Instructions, { className: classNames.instructions, children: resolvedInstructions })), cameraTampered && (_jsx(Instructions, { className: classNames.tamperMessage, children: verbiage.tamperingText })), _jsx(StyledButtonsRow, { className: classNames.buttonsRow, children: cameraTampered ? (onExitAfterTamperSealPopped ? (_jsx(LoaderButton, { className: classNames.retryCameraAccessBtn, variant: "negative", finished: true, onClick: onExitAfterTamperSealPopped, children: verbiage.exitBtnText })) : null) :
|
|
377
|
+
manualBurstMs !== null }), manualBurstMs !== null && (_jsx(GuidedShutterSweep, { "$durationMs": manualBurstMs, viewBox: `0 0 ${SHUTTER_RING_BOX_PX} ${SHUTTER_RING_BOX_PX}`, "aria-hidden": "true", "data-testid": "document-capture-shutter-sweep", children: _jsx("circle", { cx: SHUTTER_RING_BOX_PX / 2, cy: SHUTTER_RING_BOX_PX / 2, r: SHUTTER_RING_RADIUS_PX }) }))] }) })), browserEdgeColor && _jsx(BrowserEdgeTint, { color: browserEdgeColor }), showReview && contentUrl && (_jsx(DocumentCaptureReviewScreen, { contentUrl: contentUrl, headingText: verbiage.reviewHeadingText, retryText: verbiage.retryCaptureBtnText, uploadText: verbiage.uploadBtnText, uploadingText: verbiage.uploadingBtnText, retryUploadText: verbiage.retryUploadBtnText, successText: verbiage.successBtnText, uploadState: uploadState, onRetry: () => controller.actions.retry(), onUpload: () => void controller.actions.upload(), classNames: classNames, alt: reviewImageAlt })), _jsxs(FooterRow, { "$maskColor": autoCaptureGuiding ? guidedMaskColor : maskColor, className: classNames.footerRow, "data-testid": "document-capture-footer", children: [resolvedInstructions && !autoCaptureGuiding && (_jsx(Instructions, { className: classNames.instructions, children: resolvedInstructions })), cameraTampered && (_jsx(Instructions, { className: classNames.tamperMessage, children: verbiage.tamperingText })), _jsx(StyledButtonsRow, { className: classNames.buttonsRow, children: cameraTampered ? (onExitAfterTamperSealPopped ? (_jsx(LoaderButton, { className: classNames.retryCameraAccessBtn, variant: "negative", finished: true, onClick: onExitAfterTamperSealPopped, children: verbiage.exitBtnText })) : null) : cameraFailed ? (_jsx(LoaderButton, { className: classNames.retryCameraAccessBtn, variant: "negative", finished: true, onClick: () => void controller.actions.requestCamera(), children: verbiage.retryCameraAccessBtnText })) : showReview ? (
|
|
364
378
|
// The review card owns these controls now. Rendering them here
|
|
365
379
|
// too would put two "Retry capture" buttons on screen at once.
|
|
366
380
|
null) : contentUrl ? (uploadState === 'not_started' ? (_jsxs(_Fragment, { children: [_jsx(LoaderButton, { className: classNames.retryCaptureBtn, finished: true, variant: "warning", onClick: () => controller.actions.retry(), children: verbiage.retryCaptureBtnText }), _jsx(LoaderButton, { className: classNames.uploadBtn, finished: true, variant: "positive", onClick: () => void controller.actions.upload(), children: verbiage.uploadBtnText })] })) : (_jsx(LoaderButton, { className: classNames.uploadProgressBtn, finished: uploadState !== 'in_progress', variant: uploadState === 'failed' ? 'negative' : 'positive', onClick: () => void controller.actions.upload(), disabled: uploadState === 'in_progress' ||
|
|
@@ -368,17 +382,7 @@ function DocumentCaptureSurface({ controller, lang = 'auto', sessionReady: sessi
|
|
|
368
382
|
? verbiage.successBtnText
|
|
369
383
|
: uploadState === 'failed'
|
|
370
384
|
? verbiage.retryUploadBtnText
|
|
371
|
-
: verbiage.uploadingBtnText }))) : autoCaptureGuiding ? null : (_jsx(LoaderButton, { className: classNames.captureBtn, finished: state.camera.ready, variant: "primary",
|
|
372
|
-
// Guarded rather than relying on `disabled` alone: with
|
|
373
|
-
// `finished` false, LoaderButton hands the element to ladda,
|
|
374
|
-
// which manipulates its disabled state imperatively
|
|
375
|
-
// (LoaderButton.tsx:63-79). The button can therefore be
|
|
376
|
-
// clickable mid-animation, which CI caught.
|
|
377
|
-
onClick: () => {
|
|
378
|
-
if (!state.camera.ready || state.capturing)
|
|
379
|
-
return;
|
|
380
|
-
void controller.actions.capture();
|
|
381
|
-
}, disabled: !state.camera.ready || state.capturing, children: !state.camera.ready
|
|
385
|
+
: verbiage.uploadingBtnText }))) : autoCaptureGuiding ? null : (_jsx(LoaderButton, { className: classNames.captureBtn, finished: state.camera.ready, variant: "primary", onClick: () => void controller.actions.capture(), disabled: !state.camera.ready || state.capturing, children: !state.camera.ready
|
|
382
386
|
? verbiage.loadingBtnText
|
|
383
387
|
: state.capturing
|
|
384
388
|
? verbiage.capturingBtnText
|
|
@@ -22,7 +22,7 @@ export type FaceLivenessViewVerbiage = SelfieCaptureViewVerbiage & {
|
|
|
22
22
|
success?: FaceLivenessSuccessVerbiage;
|
|
23
23
|
failure?: FaceLivenessFailureVerbiage;
|
|
24
24
|
};
|
|
25
|
-
export type FaceLivenessViewClassNames = SelfieCaptureViewClassNames & {
|
|
25
|
+
export type FaceLivenessViewClassNames = Omit<SelfieCaptureViewClassNames, 'fallback'> & {
|
|
26
26
|
success?: FaceLivenessSuccessClassNames;
|
|
27
27
|
failure?: FaceLivenessFailureClassNames;
|
|
28
28
|
};
|
|
@@ -34,7 +34,7 @@ export type FaceLivenessViewColors = SelfieCaptureViewColors & {
|
|
|
34
34
|
success?: FaceLivenessSuccessColors;
|
|
35
35
|
failure?: FaceLivenessFailureColors;
|
|
36
36
|
};
|
|
37
|
-
export type FaceLivenessViewProps = Omit<SelfieCaptureViewProps, 'onCaptured'> & {
|
|
37
|
+
export type FaceLivenessViewProps = Omit<SelfieCaptureViewProps, 'onCaptured' | 'classNames'> & {
|
|
38
38
|
/** Fires with the final (liveness-checked) image URL when the user clicks
|
|
39
39
|
* Done on the success screen -- or immediately on entering 'completed',
|
|
40
40
|
* exactly once, when `skipSuccessScreen` is true. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FaceLivenessView.d.ts","sourceRoot":"","sources":["../src/FaceLivenessView.tsx"],"names":[],"mappings":"AAqDA,OAAO,EACL,YAAY,EAEZ,KAAK,SAAS,EAIf,MAAM,OAAO,CAAA;AAQd,OAAO,EAIL,KAAK,wBAAwB,EAC9B,MAAM,QAAQ,CAAA;AAUf,OAAO,EAEL,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,EAC5B,KAAK,2BAA2B,EAChC,KAAK,sBAAsB,EAC3B,KAAK,yBAAyB,EAC/B,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EAEL,KAAK,6BAA6B,EAClC,KAAK,yBAAyB,EAC9B,KAAK,2BAA2B,EACjC,MAAM,gDAAgD,CAAA;AACvD,OAAO,EAEL,KAAK,yBAAyB,EAC9B,KAAK,6BAA6B,EAClC,KAAK,yBAAy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K,IAAI,CAAA;IACnC;sEACkE;IAClE,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B;;;;;;;OAOG;IACH,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,iFAAiF;IACjF,oBAAoB,CAAC,EAAE,OAAO,CAAA;IAC9B;;;;;;;;;;OAUG;IACH,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAA;IAC/B;;;;;;;;OAQG;IACH,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;IACnC,MAAM,CAAC,EAAE,sBAAsB,CAAA;IAC/B,iEAAiE;IACjE,QAAQ,CAAC,EAAE,SAAS,CAAC,gBAAgB,GAAG,IAAI,CAAC,CAAA;IAE7C,2EAA2E;IAC3E,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,QAAQ,CAAC,EAAE,wBAAwB,CAAA;IACnC,UAAU,CAAC,EAAE,0BAA0B,CAAA;IACvC,MAAM,CAAC,EAAE,sBAAsB,CAAA;CAChC,CAAA;AAuBD,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,GAAG,YAAY,CAM3E"}
|
package/dist/FaceLivenessView.js
CHANGED
|
@@ -111,7 +111,8 @@ const LIVENESS_CAPTURE_PATH_STATES = new Set([
|
|
|
111
111
|
// EXCLUDED here: this view swaps the whole surface for FaceLivenessSuccess
|
|
112
112
|
// once it lands, so the mask/pill underneath would be visual noise (the same
|
|
113
113
|
// "full-bleed screen owns the phase" rationale SelfieCaptureView applies to
|
|
114
|
-
// 'error').
|
|
114
|
+
// controller 'error'). Recoverable liveness ERROR has no controller error
|
|
115
|
+
// screen, so showCaptureSurface includes it separately during the retry delay.
|
|
115
116
|
//
|
|
116
117
|
// 'failed' IS included: a non-terminal liveness failure keeps the user on the
|
|
117
118
|
// camera (see the header note), where the mask's 'failure' status and the
|
|
@@ -140,7 +141,7 @@ const Container = styled.div `
|
|
|
140
141
|
export function FaceLivenessView(props) {
|
|
141
142
|
return (_jsx(SdkLanguageProvider, { lang: props.lang ?? 'auto', children: _jsx(FaceLivenessViewContent, { ...props }) }));
|
|
142
143
|
}
|
|
143
|
-
function FaceLivenessViewContent({ controller, loadingOverlayMode = 'default', sessionReady: sessionReadyProp, lang = 'auto', autoContinueAfterLoading = false, showIntroScreen = false, transitionFromIdCapture = false, debugMode = false, showFaceLandmarks = false, debugShowSamplePoints, onLoadingStarted, onLoadingProgress, onLoadingCompleted, onLoadingFailed, onLoadingOverlayDismissed, onCameraAccessDenied, onModelError, onCameraTamperingDetected, onExitAfterTamperSealPopped, onUserCancel, customOverlayContent, allowManualSelfieCaptureOnLoadingError = false, onExit, onExitAfterFailure, onRetry, onDone, skipSuccessScreen = false, maxRetries = 2, allowLivenessFailure = false, videoRef, renderCameraFeed = true, renderFaceGuide = true, verbiage = {}, classNames = {}, colors = {}, assets = {}, }) {
|
|
144
|
+
function FaceLivenessViewContent({ controller, loadingOverlayMode = 'default', sessionReady: sessionReadyProp, lang = 'auto', autoContinueAfterLoading = false, showIntroScreen = false, transitionFromIdCapture = false, debugMode = false, showFaceLandmarks = false, debugShowSamplePoints, onLoadingStarted, onLoadingProgress, onLoadingCompleted, onLoadingFailed, onLoadingOverlayDismissed, onCameraAccessDenied, onModelError, onCameraTamperingDetected, onExitAfterTamperSealPopped, onUserCancel, customOverlayContent, allowManualSelfieCaptureOnLoadingError = false, onExit, onExitAfterFailure, onRetry, onDone, skipSuccessScreen = false, maxRetries = 2, allowLivenessFailure = false, videoRef, renderCameraFeed = true, renderFaceGuide = true, faceGuideStyle, verbiage = {}, classNames = {}, colors = {}, assets = {}, }) {
|
|
144
145
|
// Omitted means "follow the session": mounted inside a flow this view now
|
|
145
146
|
// renders during session validation, so its own loading overlay is the one
|
|
146
147
|
// loading surface (2.x behaviour — see useSessionReady). An explicit prop
|
|
@@ -161,7 +162,9 @@ function FaceLivenessViewContent({ controller, loadingOverlayMode = 'default', s
|
|
|
161
162
|
// reads it -- the guidance pill does too, and it renders through a portal,
|
|
162
163
|
// so a stale `true` here escapes the lockout screen's own subtree and floats
|
|
163
164
|
// the last capture message ("Could not verify your face") over it.
|
|
164
|
-
const showCaptureSurface = CAPTURE_SURFACE_PHASES.has(state.phase)
|
|
165
|
+
const showCaptureSurface = (CAPTURE_SURFACE_PHASES.has(state.phase) ||
|
|
166
|
+
(state.liveness?.requestState === 'ERROR' && state.error === null)) &&
|
|
167
|
+
!showLockout;
|
|
165
168
|
// maskStatus (task-8 brief / sdk2 guidesByRequestState): liveness
|
|
166
169
|
// requestState wins when it says 'processing'/'failure' outright;
|
|
167
170
|
// otherwise fall back to task-7's live-faceReady derivation.
|
|
@@ -171,15 +174,24 @@ function FaceLivenessViewContent({ controller, loadingOverlayMode = 'default', s
|
|
|
171
174
|
// what the oval showed there before the prediction started advancing
|
|
172
175
|
// through the challenge (it froze on the faceReady frame that opened it).
|
|
173
176
|
const predictionDrivesGuides = !requestState || LIVENESS_CAPTURE_PATH_STATES.has(requestState);
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
177
|
+
// The hand-over-face check holds the shutter at fire time, on one frame,
|
|
178
|
+
// without touching `faceReady`, so the pill and the guides have to read its
|
|
179
|
+
// hold too. Ahead of the machine states on purpose: a dropped frame parks
|
|
180
|
+
// the machine in GUIDANCE_SATISFIED and re-arms through CAPTURE_STARTED on
|
|
181
|
+
// every hold, and both of those read 'processing' below -- which is what
|
|
182
|
+
// kept the oval animating while the shutter was actually held.
|
|
183
|
+
const handOverFace = state.guidance.code === SelfieGuidanceCode.HAND_OVER_FACE;
|
|
184
|
+
const maskStatus = handOverFace
|
|
185
|
+
? 'ready'
|
|
186
|
+
: requestState && LIVENESS_MASK_PROCESSING_STATES.has(requestState)
|
|
187
|
+
? 'processing'
|
|
188
|
+
: requestState && LIVENESS_MASK_FAILURE_STATES.has(requestState)
|
|
189
|
+
? 'failure'
|
|
190
|
+
: requestState === 'CHALLENGE'
|
|
181
191
|
? 'processing'
|
|
182
|
-
:
|
|
192
|
+
: state.prediction?.faceReady
|
|
193
|
+
? 'processing'
|
|
194
|
+
: 'ready';
|
|
183
195
|
// Message ladder (sdk2 FaceLivenessCapture.tsx:889-912): challenge prompt
|
|
184
196
|
// beats livenessStatusKey (covering/FAILED/ERROR/validating) beats the
|
|
185
197
|
// plain held-guidance-code pill. `challengeSnapshot` is only consulted
|
|
@@ -221,6 +233,8 @@ function FaceLivenessViewContent({ controller, loadingOverlayMode = 'default', s
|
|
|
221
233
|
const baseLadderText = useVerbiage(guidanceOverride, entry?.key ?? '');
|
|
222
234
|
const manualCaptureText = useVerbiage(verbiage.guidance?.guidanceManualCaptureText, 'Position your face in the circle and click to capture.');
|
|
223
235
|
const manualCaptureButtonText = useVerbiage(verbiage.guidance?.manualCaptureBtnText, 'Capture');
|
|
236
|
+
const recoveryCaptureText = useVerbiage(verbiage.guidance?.guidanceRecoveryCaptureText, 'We’re having trouble checking the lighting. Keep your face centered and hold still—we’ll still check your positioning.');
|
|
237
|
+
const recoveryCaptureButtonText = useVerbiage(verbiage.guidance?.recoveryCaptureBtnText, 'Continue with current lighting');
|
|
224
238
|
// Count/step suffixes are RAW, untranslated appends onto the already-
|
|
225
239
|
// translated base text -- sdk2 parity (guidance/selfieStrings.ts's own
|
|
226
240
|
// documented rationale), and only ever apply to the challenge branch.
|
|
@@ -245,7 +259,7 @@ function FaceLivenessViewContent({ controller, loadingOverlayMode = 'default', s
|
|
|
245
259
|
// challenge (which is entered on a satisfied face), neutral while the
|
|
246
260
|
// check is in flight. FAILED/ERROR go negative via `negative` regardless.
|
|
247
261
|
satisfied: predictionDrivesGuides
|
|
248
|
-
? Boolean(state.prediction?.faceReady)
|
|
262
|
+
? Boolean(state.prediction?.faceReady) && !handOverFace
|
|
249
263
|
: requestState === 'CHALLENGE',
|
|
250
264
|
negative,
|
|
251
265
|
});
|
|
@@ -292,6 +306,20 @@ function FaceLivenessViewContent({ controller, loadingOverlayMode = 'default', s
|
|
|
292
306
|
controller.actions.retry();
|
|
293
307
|
};
|
|
294
308
|
const canRetryFailure = maxRetries > -1 && retryCount < maxRetries;
|
|
309
|
+
const showSuccessScreen = state.phase === 'completed' && !skipSuccessScreen;
|
|
310
|
+
const showFailureScreen = showLockout && !allowLivenessFailure;
|
|
311
|
+
// Nobody is looking at the camera behind either terminal screen, so hand it
|
|
312
|
+
// back and let the camera light go out. `restartRun` gets it again through
|
|
313
|
+
// the controller's retry(). A skipped success screen needs nothing here: the
|
|
314
|
+
// host moves on and unmounting detaches.
|
|
315
|
+
// Core holds the terminal screen up while a retry waits for that camera
|
|
316
|
+
// (`retryPending`), so its Retry button shows the wait instead of the user
|
|
317
|
+
// landing on a black feed.
|
|
318
|
+
const coveredByTerminalScreen = showSuccessScreen || showFailureScreen;
|
|
319
|
+
useEffect(() => {
|
|
320
|
+
if (coveredByTerminalScreen)
|
|
321
|
+
controller.actions.releaseCamera();
|
|
322
|
+
}, [controller, coveredByTerminalScreen]);
|
|
295
323
|
return (_jsxs(Container, { className: classNames.container, children: [_jsx(SelfieCaptureSurface
|
|
296
324
|
// Never on the liveness stage: a supplied image cannot pass a liveness
|
|
297
325
|
// check, so offering it would complete the stage with a photo nothing
|
|
@@ -302,5 +330,11 @@ function FaceLivenessViewContent({ controller, loadingOverlayMode = 'default', s
|
|
|
302
330
|
// check, so offering it would complete the stage with a photo nothing
|
|
303
331
|
// verified. sdk2 scoped its fallback to the plain selfie component for
|
|
304
332
|
// the same reason. Core refuses the commit too (captureManually).
|
|
305
|
-
fallbackCapture: false, controller: controller, state: state, loadingOverlayMode: loadingOverlayMode, sessionReady: sessionReady, autoContinueAfterLoading: autoContinueAfterLoading, showIntroScreen: showIntroScreen, transitionFromIdCapture: transitionFromIdCapture, onExit: onExit, onLoadingStarted: onLoadingStarted, onLoadingProgress: onLoadingProgress, onLoadingCompleted: onLoadingCompleted, onLoadingFailed: onLoadingFailed, onLoadingOverlayDismissed: onLoadingOverlayDismissed, onCameraAccessDenied: onCameraAccessDenied, onModelError: onModelError, onCameraTamperingDetected: onCameraTamperingDetected, onExitAfterTamperSealPopped: onExitAfterTamperSealPopped, onUserCancel: onUserCancel, customOverlayContent: customOverlayContent, allowManualSelfieCaptureOnLoadingError: allowManualSelfieCaptureOnLoadingError, manualCaptureText: manualCaptureText, manualCaptureButtonText: manualCaptureButtonText, videoRef: videoRef, renderCameraFeed: renderCameraFeed, renderFaceGuide: renderFaceGuide, showCaptureSurface: showCaptureSurface, maskStatus: maskStatus, showGuidancePill: showGuidancePill, guidanceText: guidanceText, guidanceVariant: guidanceVariant, guidanceCode: entry?.code, debugMode: debugMode, showFaceLandmarks: showFaceLandmarks, debugShowSamplePoints: debugShowSamplePoints, verbiage: verbiage, classNames: classNames, colors: colors, assets: assets }),
|
|
333
|
+
fallbackCapture: false, controller: controller, state: state, loadingOverlayMode: loadingOverlayMode, sessionReady: sessionReady, autoContinueAfterLoading: autoContinueAfterLoading, showIntroScreen: showIntroScreen, transitionFromIdCapture: transitionFromIdCapture, onExit: onExit, onLoadingStarted: onLoadingStarted, onLoadingProgress: onLoadingProgress, onLoadingCompleted: onLoadingCompleted, onLoadingFailed: onLoadingFailed, onLoadingOverlayDismissed: onLoadingOverlayDismissed, onCameraAccessDenied: onCameraAccessDenied, onModelError: onModelError, onCameraTamperingDetected: onCameraTamperingDetected, onExitAfterTamperSealPopped: onExitAfterTamperSealPopped, onUserCancel: onUserCancel, customOverlayContent: customOverlayContent, allowManualSelfieCaptureOnLoadingError: allowManualSelfieCaptureOnLoadingError, manualCaptureText: manualCaptureText, manualCaptureButtonText: manualCaptureButtonText, recoveryCaptureText: recoveryCaptureText, recoveryCaptureButtonText: recoveryCaptureButtonText, videoRef: videoRef, renderCameraFeed: renderCameraFeed, renderFaceGuide: renderFaceGuide, faceGuideStyle: faceGuideStyle, showCaptureSurface: showCaptureSurface, maskStatus: maskStatus, showGuidancePill: showGuidancePill, guidanceText: guidanceText, guidanceVariant: guidanceVariant, guidanceCode: entry?.code, debugMode: debugMode, showFaceLandmarks: showFaceLandmarks, debugShowSamplePoints: debugShowSamplePoints, verbiage: verbiage, classNames: classNames, colors: colors, assets: assets }), showSuccessScreen && (_jsx(FaceLivenessSuccess, { imageUrl: completedImageUrl, onDoneClick: () => onDone?.(completedImageUrl), onRetryClick: restartRun, retrying: state.retryPending, verbiage: verbiage.success, classNames: classNames.success, colors: colors.success })), showFailureScreen && (_jsx(FaceLivenessFailure
|
|
334
|
+
// The click already spent the budget; keep the last retry's button
|
|
335
|
+
// up while it waits on the camera.
|
|
336
|
+
, {
|
|
337
|
+
// The click already spent the budget; keep the last retry's button
|
|
338
|
+
// up while it waits on the camera.
|
|
339
|
+
canRetry: canRetryFailure || state.retryPending, onRetryClick: restartRun, retrying: state.retryPending, onExitClick: onExitAfterFailure ?? onExit, assets: assets.failure, verbiage: verbiage.failure, classNames: classNames.failure, colors: colors.failure }))] }));
|
|
306
340
|
}
|
package/dist/IdCaptureView.d.ts
CHANGED
|
@@ -4,15 +4,25 @@ import type { SubmissionArtifacts, SubmissionResponse } from '@idmission/websdk-
|
|
|
4
4
|
import { type LangOption } from './i18n';
|
|
5
5
|
import { type CameraFeedMode } from './components/CameraFeed';
|
|
6
6
|
import { type IdCaptureGuideType, type IdCaptureGuidesClassNames, type IdCaptureGuidesVerbiage } from './components/guides/IdCaptureGuides';
|
|
7
|
+
import { type IdCaptureDocumentVerbiage } from './guidance/strings';
|
|
7
8
|
import { type OverrideWrongDocumentTypeDialogClassNames, type OverrideWrongDocumentTypeDialogVerbiage } from './components/OverrideWrongDocumentTypeDialog';
|
|
8
9
|
import { type IdCaptureLoadingOverlayAssets, type IdCaptureLoadingOverlayClassNames, type IdCaptureLoadingOverlayColors, type IdCaptureLoadingOverlayMode, type IdCaptureLoadingOverlayVerbiage } from './components/loading/IdCaptureLoadingOverlay';
|
|
9
|
-
import { type ReviewScreenClassNames, type ReviewScreenVerbiage } from './components/review/ReviewScreen';
|
|
10
|
+
import { type ReviewScreenClassNames, type ReviewScreenColors, type ReviewScreenVerbiage } from './components/review/ReviewScreen';
|
|
10
11
|
import { type ErrorScreenClassNames, type ErrorScreenVerbiage } from './components/error/ErrorScreen';
|
|
12
|
+
import type { CameraAccessDeniedReason } from './components/error/CameraAccessDeniedOverlay';
|
|
11
13
|
import type { IdCaptureGuideImages } from './components/guide_images';
|
|
12
14
|
import { type IdCaptureFallbackClassNames, type IdCaptureFallbackColors, type IdCaptureFallbackVerbiage } from './components/fallback/IdCaptureFallback';
|
|
13
15
|
import { type IdCaptureOrUploadScreenClassNames, type IdCaptureOrUploadScreenColors, type IdCaptureOrUploadScreenVerbiage } from './components/fallback/IdCaptureOrUploadScreen';
|
|
14
16
|
import { type SkipSuccessScreen } from './flows/useShowSuccessScreen';
|
|
15
17
|
export type IdCaptureViewVerbiage = {
|
|
18
|
+
/** Capture copy for each document: the scan instruction above the guide
|
|
19
|
+
* and the guidance message below it. The bag for the document currently
|
|
20
|
+
* requested is the one read, as in sdk2; its `instructionText`,
|
|
21
|
+
* `capturingText` and `captureFailedText` win over the same keys on
|
|
22
|
+
* `guides`. */
|
|
23
|
+
idCardFront?: IdCaptureDocumentVerbiage;
|
|
24
|
+
idCardBack?: IdCaptureDocumentVerbiage;
|
|
25
|
+
passport?: IdCaptureDocumentVerbiage;
|
|
16
26
|
guides?: IdCaptureGuidesVerbiage;
|
|
17
27
|
loadingOverlay?: IdCaptureLoadingOverlayVerbiage;
|
|
18
28
|
review?: ReviewScreenVerbiage;
|
|
@@ -41,16 +51,15 @@ export type IdCaptureViewClassNames = {
|
|
|
41
51
|
cameraFeed?: string;
|
|
42
52
|
};
|
|
43
53
|
/**
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
* and `success` button colors (now the ReviewScreen's `variant`-driven
|
|
49
|
-
* `theme.buttons`), so those reach this view through the theme instead. The
|
|
50
|
-
* loading overlay kept its own `colors` bag, so it is exposed here.
|
|
54
|
+
* Per-screen button colours. sdk2's `IdCaptureWizardColors` also carried
|
|
55
|
+
* `guideBox*`/`guidanceMessages*`, which are theme fields now
|
|
56
|
+
* (`theme.idCapture.guideBox`, `theme.guidanceMessages`), so those reach this
|
|
57
|
+
* view through the theme instead.
|
|
51
58
|
*/
|
|
52
59
|
export type IdCaptureViewColors = {
|
|
53
60
|
loadingOverlay?: IdCaptureLoadingOverlayColors;
|
|
61
|
+
/** sdk2's `success` bag: the review screen's buttons. */
|
|
62
|
+
review?: ReviewScreenColors;
|
|
54
63
|
fallback?: IdCaptureFallbackColors;
|
|
55
64
|
uploadOrCaptureScreen?: IdCaptureOrUploadScreenColors;
|
|
56
65
|
};
|
|
@@ -146,6 +155,9 @@ export type IdCaptureViewProps = {
|
|
|
146
155
|
* calls `actions.confirmFlip()` instead of showing the flip-prompt guide
|
|
147
156
|
* art. */
|
|
148
157
|
flipReview?: boolean;
|
|
158
|
+
/** Show the barcode crop on the ID capture success screen. Defaults to true.
|
|
159
|
+
* False only hides the image; capture, decoding, and submission are unchanged. */
|
|
160
|
+
showBarcodeImage?: boolean;
|
|
149
161
|
/** Default true. Gates ReviewScreen's submit button and the loading
|
|
150
162
|
* overlay's session-checking line — same seam those components already
|
|
151
163
|
* expose (see their own prop docs). */
|
|
@@ -214,16 +226,16 @@ export type IdCaptureViewProps = {
|
|
|
214
226
|
*/
|
|
215
227
|
onCameraTamperingDetected?: () => void;
|
|
216
228
|
/**
|
|
217
|
-
* Fires once when the
|
|
218
|
-
*
|
|
219
|
-
*
|
|
220
|
-
*
|
|
229
|
+
* Fires once when the camera cannot be used — sdk2's
|
|
230
|
+
* `onCameraAccessDenied`, which sdk2 fired for a refused permission and for
|
|
231
|
+
* a camera it could not start alike. `reason` tells the two apart. A pure
|
|
232
|
+
* notification: the view renders its camera error screen either way.
|
|
221
233
|
*
|
|
222
234
|
* Latched like `onCameraTamperingDetected`: it fires again only if the
|
|
223
|
-
* error clears and a later attempt
|
|
224
|
-
*
|
|
235
|
+
* error clears and a later attempt fails again, so a host counting these
|
|
236
|
+
* counts failures, not renders.
|
|
225
237
|
*/
|
|
226
|
-
onCameraAccessDenied?: () => void;
|
|
238
|
+
onCameraAccessDenied?: (reason: CameraAccessDeniedReason) => void;
|
|
227
239
|
/**
|
|
228
240
|
* Fires once with the underlying Error when a model fails to load (or times
|
|
229
241
|
* out) — sdk2's `onModelError` / `onIdCaptureModelError`. Distinct from
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IdCaptureView.d.ts","sourceRoot":"","sources":["../src/IdCaptureView.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"IdCaptureView.d.ts","sourceRoot":"","sources":["../src/IdCaptureView.tsx"],"names":[],"mappings":"AAwCA,OAAO,EACL,YAAY,EACZ,KAAK,SAAS,EAMf,MAAM,OAAO,CAAA;AAEd,OAAO,KAAK,EACV,oBAAoB,EAEpB,mBAAmB,EAEpB,MAAM,kCAAkC,CAAA;AACzC,OAAO,KAAK,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAA;AAE5F,OAAO,EAIL,KAAK,UAAU,EAChB,MAAM,QAAQ,CAAA;AAGf,OAAO,EAGL,KAAK,cAAc,EACpB,MAAM,yBAAyB,CAAA;AAoBhC,OAAO,EAEL,KAAK,kBAAkB,EACvB,KAAK,yBAAyB,EAC9B,KAAK,uBAAuB,EAC7B,MAAM,qCAAqC,CAAA;AAK5C,OAAO,EAGL,KAAK,yBAAyB,EAC/B,MAAM,oBAAoB,CAAA;AAE3B,OAAO,EAEL,KAAK,yCAAyC,EAC9C,KAAK,uCAAuC,EAC7C,MAAM,8CAA8C,CAAA;AACrD,OAAO,EAEL,KAAK,6BAA6B,EAClC,KAAK,iCAAiC,EACtC,KAAK,6BAA6B,EAClC,KAAK,2BAA2B,EAChC,KAAK,+BAA+B,EACrC,MAAM,8CAA8C,CAAA;AACrD,OAAO,EAEL,KAAK,sBAAsB,EAC3B,KAAK,kBAAkB,EACv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