@idmission/websdk-ui 0.2.0-rc.1 → 0.2.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 +147 -56
- package/dist/DocumentCaptureView.d.ts +37 -0
- package/dist/DocumentCaptureView.d.ts.map +1 -1
- package/dist/DocumentCaptureView.js +489 -6
- package/dist/FaceLivenessView.d.ts +1 -1
- package/dist/FaceLivenessView.d.ts.map +1 -1
- package/dist/FaceLivenessView.js +37 -29
- package/dist/IdCaptureView.d.ts +6 -5
- package/dist/IdCaptureView.d.ts.map +1 -1
- package/dist/IdCaptureView.js +52 -12
- package/dist/SelfieCaptureView.d.ts +1 -1
- package/dist/SelfieCaptureView.d.ts.map +1 -1
- package/dist/SelfieCaptureView.js +6 -3
- package/dist/SignatureCaptureView.d.ts +9 -1
- package/dist/SignatureCaptureView.d.ts.map +1 -1
- package/dist/SignatureCaptureView.js +51 -10
- package/dist/VideoIdCaptureView.d.ts +1 -1
- package/dist/VideoIdCaptureView.d.ts.map +1 -1
- package/dist/VideoIdCaptureView.js +24 -4
- 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/debug/debug.d.ts +4 -4
- 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 +274 -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 +101 -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/guides/IdCaptureGuides.d.ts.map +1 -1
- package/dist/components/guides/IdCaptureGuides.js +3 -4
- package/dist/components/review/ReviewScreen.d.ts.map +1 -1
- package/dist/components/review/ReviewScreen.js +1 -1
- package/dist/components/review/SignatureCaptureDiagnostics.d.ts +50 -0
- package/dist/components/review/SignatureCaptureDiagnostics.d.ts.map +1 -0
- package/dist/components/review/SignatureCaptureDiagnostics.js +142 -0
- package/dist/components/selfie/SelfieCaptureSurface.d.ts +11 -2
- package/dist/components/selfie/SelfieCaptureSurface.d.ts.map +1 -1
- package/dist/components/selfie/SelfieCaptureSurface.js +5 -2
- 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/CompositeWizard.d.ts +5 -0
- package/dist/flows/CompositeWizard.d.ts.map +1 -1
- package/dist/flows/CompositeWizard.js +2 -1
- package/dist/flows/CustomerBiometricsEnrollmentFlow.d.ts +13 -0
- package/dist/flows/CustomerBiometricsEnrollmentFlow.d.ts.map +1 -1
- package/dist/flows/CustomerBiometricsEnrollmentFlow.js +8 -3
- package/dist/flows/CustomerIdAndBiometricsEnrollmentFlow.d.ts +25 -0
- package/dist/flows/CustomerIdAndBiometricsEnrollmentFlow.d.ts.map +1 -1
- package/dist/flows/CustomerIdAndBiometricsEnrollmentFlow.js +12 -5
- package/dist/flows/DocumentCaptureFlow.d.ts +7 -1
- package/dist/flows/DocumentCaptureFlow.d.ts.map +1 -1
- package/dist/flows/DocumentCaptureFlow.js +10 -7
- package/dist/flows/FaceValidationFlow.d.ts +7 -0
- package/dist/flows/FaceValidationFlow.d.ts.map +1 -1
- package/dist/flows/FaceValidationFlow.js +6 -2
- package/dist/flows/IdAndFaceValidationFlow.d.ts +19 -0
- package/dist/flows/IdAndFaceValidationFlow.d.ts.map +1 -1
- package/dist/flows/IdAndFaceValidationFlow.js +10 -4
- package/dist/flows/IdValidationFlow.d.ts +12 -0
- package/dist/flows/IdValidationFlow.d.ts.map +1 -1
- package/dist/flows/IdValidationFlow.js +6 -2
- package/dist/flows/SignatureKYCFlow.d.ts +13 -0
- package/dist/flows/SignatureKYCFlow.d.ts.map +1 -1
- package/dist/flows/SignatureKYCFlow.js +8 -3
- package/dist/flows/SubmissionProvider.d.ts.map +1 -1
- package/dist/flows/SubmissionProvider.js +2 -4
- package/dist/flows/VideoIdValidationFlow.d.ts +25 -1
- package/dist/flows/VideoIdValidationFlow.d.ts.map +1 -1
- package/dist/flows/VideoIdValidationFlow.js +12 -5
- package/dist/flows/approval.d.ts +15 -0
- package/dist/flows/approval.d.ts.map +1 -0
- package/dist/flows/approval.js +19 -0
- 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 +7 -0
- package/dist/flows/customerMatch/CustomerMatchFlow.d.ts.map +1 -1
- package/dist/flows/customerMatch/CustomerMatchFlow.js +4 -1
- package/dist/flows/latestCallbacks.d.ts +31 -0
- package/dist/flows/latestCallbacks.d.ts.map +1 -0
- package/dist/flows/latestCallbacks.js +56 -0
- package/dist/flows/ringScreens.d.ts +0 -3
- package/dist/flows/ringScreens.d.ts.map +1 -1
- package/dist/flows/ringScreens.js +2 -3
- package/dist/guidance/selfieStrings.d.ts +9 -1
- package/dist/guidance/selfieStrings.d.ts.map +1 -1
- package/dist/guidance/selfieStrings.js +59 -20
- 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 +105 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/testing/autoCaptureFrames.d.ts +23 -0
- package/dist/testing/autoCaptureFrames.d.ts.map +1 -0
- package/dist/testing/autoCaptureFrames.js +187 -0
- 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/index.d.ts +1 -0
- package/dist/testing/index.d.ts.map +1 -1
- package/dist/testing/index.js +1 -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 +3 -2
package/README.md
CHANGED
|
@@ -10,13 +10,16 @@ owns rendered UI, theming, i18n, React bindings, and complete validation flows.
|
|
|
10
10
|
pnpm add @idmission/websdk-core @idmission/websdk-ui
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
+
Migrating an existing `idmission-web-sdk` integration? Follow the
|
|
14
|
+
[compatibility-facade migration guide](https://github.com/Idmission-LLC/idmission-web-sdk-2.0/blob/develop/packages/websdk-ui/MIGRATION_FROM_COMPAT.md).
|
|
15
|
+
|
|
13
16
|
### Peer dependencies
|
|
14
17
|
|
|
15
|
-
| Package
|
|
16
|
-
|
|
|
17
|
-
| `react`
|
|
18
|
-
| `react-dom`
|
|
19
|
-
| `styled-components` | `^6`
|
|
18
|
+
| Package | Version |
|
|
19
|
+
| ------------------- | -------------- |
|
|
20
|
+
| `react` | `^18 \|\| ^19` |
|
|
21
|
+
| `react-dom` | `^18 \|\| ^19` |
|
|
22
|
+
| `styled-components` | `^6` |
|
|
20
23
|
|
|
21
24
|
## Quickstart
|
|
22
25
|
|
|
@@ -28,6 +31,68 @@ the live check, and sends exactly one ID-and-face validation request. The
|
|
|
28
31
|
face-only flow intentionally stops after its live check and returns captured
|
|
29
32
|
artifacts through `onCaptured`.
|
|
30
33
|
|
|
34
|
+
Flow configuration can be written inline. Unrelated parent renders never
|
|
35
|
+
restart a camera, rebuild a controller, or reset the wizard, and every
|
|
36
|
+
callback — flow-level props and the ones nested inside `capture`-style bags
|
|
37
|
+
— follows the latest render. The `capture`, `idCapture`, `faceCapture`,
|
|
38
|
+
`signatureCapture`, and `videoIdCapture` bags are otherwise mount-only: their
|
|
39
|
+
non-callback fields are read once when the controller is built, so to change
|
|
40
|
+
one after mount remount the flow with a `key` or pass your own `controller`.
|
|
41
|
+
The one exception is `checkLivenessOptions`, which is read live on every
|
|
42
|
+
liveness check.
|
|
43
|
+
No `useMemo`/`useCallback` is required, and none of this depends on the
|
|
44
|
+
React Compiler.
|
|
45
|
+
|
|
46
|
+
Create the stateful network client with `useIdmissionClient`. The hook may run
|
|
47
|
+
before an asynchronously loaded session is available; the current committed
|
|
48
|
+
session and callback implementations are read when the client needs them.
|
|
49
|
+
Inline options are safe and do not require consumer memoization:
|
|
50
|
+
|
|
51
|
+
```tsx
|
|
52
|
+
import { IdValidationFlow, useIdmissionClient } from "@idmission/websdk-ui";
|
|
53
|
+
|
|
54
|
+
function IdCaptureScreen({
|
|
55
|
+
sessionId,
|
|
56
|
+
onError,
|
|
57
|
+
}: {
|
|
58
|
+
sessionId?: string;
|
|
59
|
+
onError: (error: Error) => void;
|
|
60
|
+
}) {
|
|
61
|
+
const client = useIdmissionClient({
|
|
62
|
+
sessionId,
|
|
63
|
+
onRequestFailure: (error) => onError(error),
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
if (!sessionId) return null;
|
|
67
|
+
|
|
68
|
+
return (
|
|
69
|
+
<IdValidationFlow
|
|
70
|
+
client={client}
|
|
71
|
+
submission={{ jobID: "job-1" }}
|
|
72
|
+
geolocationEnabled={false}
|
|
73
|
+
/>
|
|
74
|
+
);
|
|
75
|
+
}
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
One hook mount owns one client and its validated session state. `sessionId`
|
|
79
|
+
is live for session resolution and can be a string, `null`/`undefined` while
|
|
80
|
+
loading, or an async resolver. It is read when validation or retry needs a
|
|
81
|
+
session; changing it does not silently replace an already validated session.
|
|
82
|
+
A later session also does not automatically retry a validation that has
|
|
83
|
+
already failed; call `client.retrySession()` (the standard flow error screen
|
|
84
|
+
does this) when retrying. `authUrl`, `submissionUrl`, `documentServiceUrl`,
|
|
85
|
+
and `timeoutMs` are mount-only.
|
|
86
|
+
|
|
87
|
+
Callback presence is mount-only too, while callbacks supplied at mount call
|
|
88
|
+
their latest committed defined implementation. This distinction matters for
|
|
89
|
+
`onSubmit`: supplying it selects customer handoff instead of SDK posting, so
|
|
90
|
+
adding or removing it during a capture cannot silently switch submission
|
|
91
|
+
modes. If a later render omits a mounted callback, the most recent defined
|
|
92
|
+
implementation remains active; a callback absent at mount is ignored if it
|
|
93
|
+
appears later. Remount the component that owns the hook with a React `key` to
|
|
94
|
+
intentionally replace the client or change any mount-only option.
|
|
95
|
+
|
|
31
96
|
For enrolled-biometrics journeys, use `CustomerIdentificationFlow` (1:N face
|
|
32
97
|
match), `CustomerVerificationFlow` (1:1 against one `submission.enrollmentId`),
|
|
33
98
|
`CustomerBiometricsEnrollmentFlow`, or
|
|
@@ -42,40 +107,44 @@ The lower-level views remain available for custom assemblies:
|
|
|
42
107
|
`IdCaptureView` is the whole ID-capture screen: it drives the camera, guide
|
|
43
108
|
box, guidance messages, loading overlay, and review/error screens off a
|
|
44
109
|
single headless `IdCaptureController` from `@idmission/websdk-core`. The host
|
|
45
|
-
app owns creating the controller
|
|
46
|
-
it
|
|
47
|
-
no theme, so it composes into whatever theme
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
110
|
+
app owns creating the controller; `useIdmissionClient` owns the stateful
|
|
111
|
+
client/session behind it. The host also wraps the tree in `ThemeProvider` —
|
|
112
|
+
`IdCaptureView` itself renders no theme, so it composes into whatever theme
|
|
113
|
+
context the host already has. The package initializes its bundled translations
|
|
114
|
+
automatically in an SDK-owned i18n instance; `IdCaptureView`'s `lang` prop
|
|
115
|
+
selects the language from the first client or server render without requiring
|
|
116
|
+
application bootstrap code.
|
|
52
117
|
|
|
53
118
|
```tsx
|
|
54
|
-
import { useMemo } from
|
|
55
|
-
import {
|
|
56
|
-
import { createIdCaptureController } from
|
|
57
|
-
import {
|
|
58
|
-
|
|
59
|
-
|
|
119
|
+
import { useMemo } from "react";
|
|
120
|
+
import { SubmissionAction } from "@idmission/websdk-core/client";
|
|
121
|
+
import { createIdCaptureController } from "@idmission/websdk-core/idCapture";
|
|
122
|
+
import {
|
|
123
|
+
IdCaptureView,
|
|
124
|
+
ThemeProvider,
|
|
125
|
+
useIdmissionClient,
|
|
126
|
+
} from "@idmission/websdk-ui";
|
|
60
127
|
|
|
61
128
|
function IdCaptureScreen({ sessionId }: { sessionId: string }) {
|
|
62
|
-
const
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
129
|
+
const client = useIdmissionClient({ sessionId });
|
|
130
|
+
const controller = useMemo(
|
|
131
|
+
() =>
|
|
132
|
+
createIdCaptureController({
|
|
133
|
+
client,
|
|
134
|
+
submission: { action: SubmissionAction.VERIFY },
|
|
135
|
+
}),
|
|
136
|
+
[client],
|
|
137
|
+
);
|
|
69
138
|
|
|
70
139
|
return (
|
|
71
140
|
<ThemeProvider theme="default">
|
|
72
141
|
<IdCaptureView
|
|
73
142
|
controller={controller}
|
|
74
|
-
onExit={() => console.log(
|
|
143
|
+
onExit={() => console.log("user exited capture")}
|
|
75
144
|
onSubmitted={(response) => console.log(response.status.statusCode)}
|
|
76
145
|
/>
|
|
77
146
|
</ThemeProvider>
|
|
78
|
-
)
|
|
147
|
+
);
|
|
79
148
|
}
|
|
80
149
|
```
|
|
81
150
|
|
|
@@ -96,27 +165,32 @@ passing the `IdmissionClient`'s own `checkLiveness` into the controller's
|
|
|
96
165
|
step:
|
|
97
166
|
|
|
98
167
|
```tsx
|
|
99
|
-
import { useMemo } from
|
|
100
|
-
import {
|
|
101
|
-
import {
|
|
102
|
-
|
|
168
|
+
import { useMemo } from "react";
|
|
169
|
+
import { createSelfieCaptureController } from "@idmission/websdk-core/selfieCapture";
|
|
170
|
+
import {
|
|
171
|
+
FaceLivenessView,
|
|
172
|
+
ThemeProvider,
|
|
173
|
+
useIdmissionClient,
|
|
174
|
+
} from "@idmission/websdk-ui";
|
|
103
175
|
|
|
104
176
|
function FaceLivenessScreen({ sessionId }: { sessionId: string }) {
|
|
105
|
-
const
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
177
|
+
const client = useIdmissionClient({ sessionId });
|
|
178
|
+
const controller = useMemo(
|
|
179
|
+
() =>
|
|
180
|
+
createSelfieCaptureController({
|
|
181
|
+
liveness: { checkLiveness: (img) => client.checkLiveness(img) },
|
|
182
|
+
}),
|
|
183
|
+
[client],
|
|
184
|
+
);
|
|
111
185
|
|
|
112
186
|
return (
|
|
113
187
|
<ThemeProvider theme="default">
|
|
114
188
|
<FaceLivenessView
|
|
115
189
|
controller={controller}
|
|
116
|
-
onDone={(imageUrl) => console.log(
|
|
190
|
+
onDone={(imageUrl) => console.log("liveness-checked selfie", imageUrl)}
|
|
117
191
|
/>
|
|
118
192
|
</ThemeProvider>
|
|
119
|
-
)
|
|
193
|
+
);
|
|
120
194
|
}
|
|
121
195
|
```
|
|
122
196
|
|
|
@@ -135,16 +209,33 @@ permission prompt fires, instead of requesting the camera immediately on
|
|
|
135
209
|
|
|
136
210
|
## Exports
|
|
137
211
|
|
|
138
|
-
| Import
|
|
139
|
-
|
|
|
140
|
-
| `@idmission/websdk-ui`
|
|
141
|
-
| `@idmission/websdk-ui/testing` | Scriptable fake ID/selfie controllers and `createFakeIdmissionClient` for tests and Storybook stories
|
|
212
|
+
| Import | Contents |
|
|
213
|
+
| ------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
214
|
+
| `@idmission/websdk-ui` | `useIdmissionClient`, validation flows and chassis, capture views, React bindings, theme, i18n, overlays, and the curated components used to assemble them |
|
|
215
|
+
| `@idmission/websdk-ui/testing` | Scriptable fake ID/selfie controllers and `createFakeIdmissionClient` for tests and Storybook stories |
|
|
142
216
|
|
|
143
217
|
`@idmission/websdk-ui`'s root export is a curated, named surface — never a
|
|
144
218
|
blanket `export *` — mirroring `@idmission/websdk-core/idCapture`'s barrel
|
|
145
219
|
policy. Internal helpers (e.g. the `useSyncExternalStore` listener-exception
|
|
146
220
|
guard) are deliberately not exported.
|
|
147
221
|
|
|
222
|
+
### Styling individual guidance messages
|
|
223
|
+
|
|
224
|
+
Every guidance message renders with a `data-guidance-code` attribute naming
|
|
225
|
+
which message it is, so a host can style one specific message from its own
|
|
226
|
+
stylesheet without the SDK shipping a severity opinion. "Guidance message"
|
|
227
|
+
means anything driven by one of the five guidance code enums, across every
|
|
228
|
+
layout that renders one — screen-level copy such as the upload-fallback step
|
|
229
|
+
instructions is not part of that vocabulary. The vocabulary is
|
|
230
|
+
append-only and enforced by `websdk-core`'s `guidanceCodeContract.test.ts` —
|
|
231
|
+
customer selectors are not type-checked against us, so renaming a code fails
|
|
232
|
+
silently in their production rather than in our build.
|
|
233
|
+
|
|
234
|
+
The customer-facing reference (every code for every flow, plus the CSS
|
|
235
|
+
specificity pattern that makes host rules win over the pill's
|
|
236
|
+
styled-components class) lives at
|
|
237
|
+
[apps/docs/content/other/styling-guidance-messages.mdx](../../apps/docs/content/other/styling-guidance-messages.mdx).
|
|
238
|
+
|
|
148
239
|
### Component surface (à la carte custom UI)
|
|
149
240
|
|
|
150
241
|
Everything `IdCaptureView` composes is independently exported, so a host that
|
|
@@ -153,19 +244,19 @@ in between, a completely custom review step — can skip `IdCaptureView` and
|
|
|
153
244
|
build its own tree from the same pieces, driven by the same
|
|
154
245
|
`useIdCapture(controller)` state:
|
|
155
246
|
|
|
156
|
-
| Area
|
|
157
|
-
|
|
|
158
|
-
| Flows
|
|
159
|
-
| Flow steps
|
|
160
|
-
| Match outcomes
|
|
161
|
-
| Camera
|
|
162
|
-
| Guides
|
|
163
|
-
| Guidance
|
|
164
|
-
| Barcode
|
|
165
|
-
| Loading
|
|
166
|
-
| Review / error
|
|
167
|
-
| Other
|
|
168
|
-
| Shared overlay primitives | `GrayOverlayContainer`, `OverlayInner`, `ButtonsColumn`, `WideButton`, `WideBorderButton` — the styled building blocks `ReviewScreen`/`ErrorScreen` compose
|
|
247
|
+
| Area | Components |
|
|
248
|
+
| ------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
249
|
+
| Flows | `IdValidationFlow`, `FaceValidationFlow`, `IdAndFaceValidationFlow`, `SignatureKYCFlow`, `VideoIdValidationFlow`, `CustomerIdentificationFlow`, `CustomerVerificationFlow`, `CustomerBiometricsEnrollmentFlow`, `CustomerIdAndBiometricsEnrollmentFlow`, `FlowChassis`, `CompositeWizard` |
|
|
250
|
+
| Flow steps | `buildAdditionalDocumentsStep`, `buildSignatureStep`, `buildVideoIdSteps` — assemble a custom `CompositeWizard` step list |
|
|
251
|
+
| Match outcomes | `CustomerMatchSuccess`, `CustomerMatchFailure` |
|
|
252
|
+
| Camera | `CameraVideoTag`, `ScalingCameraFeed`, `CameraFeedWrapper`, `GuideLayoutProvider`/`useGuideLayout`, `GuideOrientationContextProvider`/`useGuideOrientationContext` |
|
|
253
|
+
| Guides | `IdCaptureGuides` (fit/overlay router), `IdCaptureFitGuide`, `IdCaptureGuideOverlay`, `FlipIdPrompt`, `defaultIdCaptureGuideImages` |
|
|
254
|
+
| Guidance | `GuidanceMessage`, `GuidanceMessageContainer` (portal), `guidanceMessageKey`/`instructionKey` |
|
|
255
|
+
| Barcode | `BarcodeGuideOverlay`, `BarcodeSuccessOverlay` |
|
|
256
|
+
| Loading | `IdCaptureLoadingOverlay`, `IdCaptureLoadingGraphic` |
|
|
257
|
+
| Review / error | `ReviewScreen`, `ErrorScreen`, `CameraAccessDeniedOverlay`, `OverrideWrongDocumentTypeDialog` |
|
|
258
|
+
| Other | `ExitCaptureButton`, `Card`/`FlexCard`, `ButtonsRow`, `LoaderButton`, `CapturedDocumentImg`, `LoadingListItemIndicator` |
|
|
259
|
+
| Shared overlay primitives | `GrayOverlayContainer`, `OverlayInner`, `ButtonsColumn`, `WideButton`, `WideBorderButton` — the styled building blocks `ReviewScreen`/`ErrorScreen` compose |
|
|
169
260
|
|
|
170
261
|
Every component takes plain props derived from `IdCaptureControllerState` (no
|
|
171
262
|
store/context reads beyond the layout contexts above) — pass
|
|
@@ -21,6 +21,11 @@ export type DocumentCaptureViewClassNames = {
|
|
|
21
21
|
uploadBtn?: string;
|
|
22
22
|
uploadProgressBtn?: string;
|
|
23
23
|
captureBtn?: string;
|
|
24
|
+
autoCaptureGuidance?: string;
|
|
25
|
+
manualCaptureHint?: string;
|
|
26
|
+
reviewContainer?: string;
|
|
27
|
+
reviewCard?: string;
|
|
28
|
+
reviewHeading?: string;
|
|
24
29
|
};
|
|
25
30
|
export type DocumentCaptureViewVerbiage = {
|
|
26
31
|
headingText?: CustomerSuppliedVerbiage;
|
|
@@ -35,6 +40,15 @@ export type DocumentCaptureViewVerbiage = {
|
|
|
35
40
|
uploadingBtnText?: CustomerSuppliedVerbiage;
|
|
36
41
|
retryUploadBtnText?: CustomerSuppliedVerbiage;
|
|
37
42
|
successBtnText?: CustomerSuppliedVerbiage;
|
|
43
|
+
autoCaptureNoDocumentText?: CustomerSuppliedVerbiage;
|
|
44
|
+
autoCaptureTooCloseText?: CustomerSuppliedVerbiage;
|
|
45
|
+
autoCaptureTooFarText?: CustomerSuppliedVerbiage;
|
|
46
|
+
autoCaptureNotStableText?: CustomerSuppliedVerbiage;
|
|
47
|
+
autoCaptureOutOfFocusText?: CustomerSuppliedVerbiage;
|
|
48
|
+
autoCaptureHoldStillText?: CustomerSuppliedVerbiage;
|
|
49
|
+
manualCaptureHintText?: CustomerSuppliedVerbiage;
|
|
50
|
+
reviewHeadingText?: CustomerSuppliedVerbiage;
|
|
51
|
+
reviewImageAltText?: CustomerSuppliedVerbiage;
|
|
38
52
|
};
|
|
39
53
|
export type DocumentCaptureViewProps = {
|
|
40
54
|
controller: DocumentCaptureController;
|
|
@@ -75,6 +89,20 @@ export type DocumentCaptureViewProps = {
|
|
|
75
89
|
aspectRatio?: number;
|
|
76
90
|
/** Fallback instructions when the current document has none. */
|
|
77
91
|
instructions?: ReactNode;
|
|
92
|
+
/**
|
|
93
|
+
* Renders the auto-capture tuning overlay: per-label detection boxes plus a
|
|
94
|
+
* stats pane carrying every gate's value, threshold and verdict, and the
|
|
95
|
+
* ~300-frame diagnostics ring buffer behind a COPY button (#341).
|
|
96
|
+
*
|
|
97
|
+
* Deliberately the SAME prop 2.x already exposes rather than a new one — the
|
|
98
|
+
* sheets and the applicants are in Mexico, so the instrument has to be
|
|
99
|
+
* reachable from a published build by the people holding the paper.
|
|
100
|
+
*
|
|
101
|
+
* Renders nothing until a document opts into `autoCapture`: with no engine
|
|
102
|
+
* there are no diagnostics, and an empty pane would read as a broken model
|
|
103
|
+
* rather than a flow that never asked for one.
|
|
104
|
+
*/
|
|
105
|
+
debugMode?: boolean;
|
|
78
106
|
classNames?: DocumentCaptureViewClassNames;
|
|
79
107
|
verbiage?: DocumentCaptureViewVerbiage;
|
|
80
108
|
};
|
|
@@ -93,6 +121,15 @@ export declare const DOCUMENT_CAPTURE_FALLBACK_VERBIAGE: {
|
|
|
93
121
|
uploadingBtnText: string;
|
|
94
122
|
retryUploadBtnText: string;
|
|
95
123
|
successBtnText: string;
|
|
124
|
+
autoCaptureNoDocumentText: string;
|
|
125
|
+
autoCaptureTooCloseText: string;
|
|
126
|
+
autoCaptureTooFarText: string;
|
|
127
|
+
autoCaptureNotStableText: string;
|
|
128
|
+
autoCaptureOutOfFocusText: string;
|
|
129
|
+
autoCaptureHoldStillText: string;
|
|
130
|
+
manualCaptureHintText: string;
|
|
131
|
+
reviewHeadingText: string;
|
|
132
|
+
reviewImageAltText: string;
|
|
96
133
|
};
|
|
97
134
|
/**
|
|
98
135
|
* Owns its own `GuideLayoutProvider`, matching IdCaptureView (:364). The guide
|
|
@@ -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;AAShC,OAAO,EAEL,KAAK,qCAAqC,EAC3C,MAAM,mDAAmD,CAAA;AAC1D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAA;AAExE,OAAO,EAEL,KAAK,wBAAwB,EAC7B,KAAK,UAAU,EAGhB,MAAM,QAAQ,CAAA;AAGf,MAAM,MAAM,6BAA6B,GAAG;IAC1C,iBAAiB,CAAC,EAAE,MAAM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