@incodetech/web 2.1.1 → 2.2.0-rc.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/dist/ae-signature/ae-signature.es.js +7 -4
- package/dist/antifraud/antifraud.es.js +6 -6
- package/dist/authentication/authentication.es.js +7 -7
- package/dist/{autoFocusTitle-CuRu2lPg.js → autoFocusTitle-gLba2mgp.js} +6 -3
- package/dist/{back-horizontal-hint-xTnSQbzn.js → back-horizontal-hint-BBGuJ75y.js} +1 -1
- package/dist/{back-vertical-hint-BWWlHfX2.js → back-vertical-hint-B9usJ5lY.js} +1 -1
- package/dist/base.css +425 -3290
- package/dist/{bottomSheet-CnWbbUAM.js → bottomSheet-Cp8DLulN.js} +7 -8
- package/dist/certificate-issuance/certificate-issuance.es.js +34 -87
- package/dist/certificate-issuance/styles.css +0 -41
- package/dist/{checkbox-1wUHSoaK.js → checkbox-C38Elx0O.js} +5 -5
- package/dist/connectionError-DAeXp8sE.js +45 -0
- package/dist/consent/consent.es.js +10 -12
- package/dist/consent/styles.css +5 -4
- package/dist/{countrySelector-SvUOyPo0.js → countrySelector-2t-ZTgGo.js} +3 -3
- package/dist/cross-document-data-match/cross-document-data-match.es.js +13 -10
- package/dist/curp-validation/curp-validation.es.js +28 -29
- package/dist/curp-validation/styles.css +47 -0
- package/dist/{customFields-BDsXR7A-.js → customFields-B8HQZ7Mh.js} +13 -14
- package/dist/{customWatchlist-CYoRNCim.js → customWatchlist-_tUmZ855.js} +9 -9
- package/dist/dashboardTheme-CVliZSR-.js +223 -0
- package/dist/{dateInputComposed-DuaofcBl.js → dateInputComposed-eRcbt_SL.js} +5 -5
- package/dist/dateInputComposed-ks0-opuq.js +1 -0
- package/dist/document-capture/document-capture.es.js +1 -1
- package/dist/document-capture/styles.css +85 -70
- package/dist/{documentCapture-DhbO-A-V.js → documentCapture-BvEGCYj-.js} +218 -136
- package/dist/documentCapture-DdHdRPzR.js +2 -0
- package/dist/{dropdownComposed-CoU0enG6.js → dropdownComposed-OHDHzt1Q.js} +18 -11
- package/dist/dropdownComposed-kjG4UblM.js +1 -0
- package/dist/dynamic-forms/styles.css +58 -6
- package/dist/{dynamicForms-BifGbC9F.js → dynamicForms-P-4E42IA.js} +53 -45
- package/dist/ekyb/ekyb.es.js +1 -1
- package/dist/ekyb/styles.css +1 -28
- package/dist/ekybModule-CiaxFHXo.js +2 -0
- package/dist/{ekybModule-DGnTw5UV.js → ekybModule-DmjkzVWE.js} +51 -27
- package/dist/ekyc/ekyc.es.js +1 -1
- package/dist/ekyc/styles.css +2 -2
- package/dist/ekycModule-BVt10kgv.js +2 -0
- package/dist/{ekycModule-Dxpdd0ns.js → ekycModule-Da1Fm7ai.js} +45 -19
- package/dist/electronic-signature/electronic-signature.es.js +1 -1
- package/dist/{ae-signature → electronic-signature}/styles.css +2 -2
- package/dist/{electronic-signature-Ueoffasr.js → electronic-signature-yamI6zHM.js} +31 -23
- package/dist/email/email.es.js +10 -11
- package/dist/{emailInput-DsLkDtER.js → emailInput-B0P2Q-pk.js} +4 -4
- package/dist/{expiredId-BZXLrLk-.js → expiredId-BXXE3srN.js} +6 -6
- package/dist/{extensibility-7sRIN0JC.js → extensibility-iJYzpW6H.js} +440 -374
- package/dist/extensibility.es.js +24 -28
- package/dist/face-match/face-match.es.js +1 -1
- package/dist/face-match/styles.css +9 -609
- package/dist/faceMatch-D4XFihTc.js +2 -0
- package/dist/{faceMatch-DyTBoMDm.js → faceMatch-VtEZvsen.js} +71 -79
- package/dist/field-comparison/field-comparison.es.js +1 -1
- package/dist/fieldComparison-B_r9Bal7.js +2 -0
- package/dist/{fieldComparison-L_knHqgw.js → fieldComparison-NLdDSOEh.js} +11 -12
- package/dist/finalSuccessScreen-DryADx1n.js +500 -0
- package/dist/fiscal-qr/fiscal-qr.es.js +12 -12
- package/dist/flip-animation-CvN8FLNc.js +6996 -0
- package/dist/flow/flow.es.js +81 -45
- package/dist/flow/styles.css +908 -5423
- package/dist/{front-horizontal-hint-B84GgTO1.js → front-horizontal-hint-D3CrWViZ.js} +1 -1
- package/dist/{front-vertical-hint-Bs_avngq.js → front-vertical-hint-BoLZvyx5.js} +1 -1
- package/dist/geolocation/geolocation.es.js +36 -13
- package/dist/geolocation/styles.css +1 -1
- package/dist/government-validation/government-validation.es.js +11 -12
- package/dist/{homeScreen-B6T0JVh8.js → homeScreen-Pv3v_0ji.js} +7 -9
- package/dist/{icons-CJJbIpBq.js → icons--ezYG2Fb.js} +92 -7
- package/dist/id/id.es.js +222 -52
- package/dist/id/styles.css +290 -10
- package/dist/id-back-of-card-DO593HH8.js +83 -0
- package/dist/id-back-of-card-vertical-DArEQ0hE.js +88 -0
- package/dist/id-front-of-card-Bcit7Pnq.js +308 -0
- package/dist/id-front-of-card-vertical-Bcr-KXcl.js +278 -0
- package/dist/id-laser-h-BaUHzX-d.js +480 -0
- package/dist/{id-laser-v-BiUXkM4x.js → id-laser-v-Dv9yEYJE.js} +7 -17
- package/dist/id-selfie-flow/id-selfie-flow.es.js +239 -0
- package/dist/id-selfie-flow/styles.css +749 -0
- package/dist/id-verification/id-verification.es.js +13 -9
- package/dist/{idOcr-WFBvqy3b.js → idOcr-gsIXHq6R.js} +14 -15
- package/dist/identity-reuse/identity-reuse.es.js +6 -8
- package/dist/identity-reuse/styles.css +1 -1
- package/dist/{incode-logo-57XFniXU.js → incode-logo-rGFjZHqi.js} +64 -1
- package/dist/incodeComponent-K9ZWg302.js +713 -0
- package/dist/incodeModule-CcLzar_X.js +25 -0
- package/dist/index.es.js +16 -5
- package/dist/{inputComposed-C1R2LAa3.js → inputComposed-BeROn635.js} +9 -9
- package/dist/inputComposed-CADVQW-o.js +1 -0
- package/dist/{mandatoryConsent-D0GTKu-H.js → mandatoryConsent-BtqB-FxY.js} +9 -11
- package/dist/{capture-CkGvdDNH.js → manualCaptureButton-quGa2ufS.js} +68 -198
- package/dist/manualCaptureButton-t_oIol88.js +300 -0
- package/dist/{modal-OxkFuuiR.js → modal-BjjJFpZu.js} +4 -4
- package/dist/{modal.hooks-ZrzmHAUa.js → modal.hooks-BvXzNWvY.js} +1 -1
- package/dist/{numberedStep-CEb-lFJm.js → numberedStep-DUs77Gy3.js} +1 -1
- package/dist/{optionAccessibleLabel-gfF-58Mv.js → optionAccessibleLabel-DgfHD_mx.js} +6 -6
- package/dist/{otpInput-CnDc6pQm.js → otpInput-D5dLXrmC.js} +72 -36
- package/dist/{passport-horizontal-hint-Bj0ZJY0g.js → passport-horizontal-hint-DgnU-8bl.js} +1 -1
- package/dist/{passport-vertical-hint-Dfk77xUJ.js → passport-vertical-hint-Dd2Wknw7.js} +1 -1
- package/dist/{pdf-BqtJTlor.js → pdf-BUoY_2gv.js} +1 -1
- package/dist/pdfViewer-CZb6obcZ.js +2 -0
- package/dist/{pdfViewer-B97DmT9m.js → pdfViewer-vud1VZv6.js} +5 -7
- package/dist/phone/phone.es.js +13 -12
- package/dist/{phoneInputComposed-DMiXfF-1.js → phoneInputComposed-CeVWTS_O.js} +7 -6
- package/dist/{processing-BeUMfdJJ.js → processing-BsvHyDWa.js} +2 -2
- package/dist/qe-signature/qe-signature.es.js +7 -4
- package/dist/{radioGroupComposed-DuQxslB2.js → radioGroupComposed-DzNGUbZQ.js} +16 -15
- package/dist/redirect-to-mobile/redirect-to-mobile.es.js +132 -45
- package/dist/redirect-to-mobile/styles.css +20 -10
- package/dist/{registerIncodeElement-DaNjbAwZ.js → registerIncodeElement-BduCekz5.js} +1 -1
- package/dist/{richText-CB1fmegc.js → richText-CTHBpZOw.js} +3 -1607
- package/dist/selfie/selfie.es.js +10 -10
- package/dist/selfie/styles.css +16 -949
- package/dist/signature/signature.es.js +27 -19
- package/dist/{ae-signature/styles2.css → signature/styles.css} +4 -4
- package/dist/{snackbar-DS7Mv62v.js → snackbar-C9Mqrh0e.js} +2 -2
- package/dist/spacer-CDlQd12V.js +2344 -0
- package/dist/{spinner-BMeIEK1d.js → spinner-CLZ2fz4u.js} +45 -4
- package/dist/statusPage--GVFSUJp.js +36 -0
- package/dist/{successIcon-B5mGvdx1.js → successIcon-Bj8Y9CuI.js} +1 -1
- package/dist/{tabs-C__chW-u.js → tabs-DweBZTV2.js} +4 -3
- package/dist/themes/dark.css +35 -0
- package/dist/themes/light.css +35 -0
- package/dist/{tutorial-CCfPuVKX.js → tutorial-BZZC93Ur.js} +222 -180
- package/dist/types/ae-signature.d.ts +91 -5
- package/dist/types/antifraud.d.ts +86 -3
- package/dist/types/authentication.d.ts +86 -3
- package/dist/types/certificate-issuance.d.ts +86 -3
- package/dist/types/consent.d.ts +86 -3
- package/dist/types/cross-document-data-match.d.ts +88 -4
- package/dist/types/curp-validation.d.ts +86 -3
- package/dist/types/document-capture.d.ts +88 -4
- package/dist/types/ekyb.d.ts +88 -4
- package/dist/types/ekyc.d.ts +88 -4
- package/dist/types/electronic-signature.d.ts +87 -4
- package/dist/types/email.d.ts +82 -22
- package/dist/types/extensibility.d.ts +157 -5
- package/dist/types/face-match.d.ts +84 -22
- package/dist/types/field-comparison.d.ts +86 -3
- package/dist/types/fiscal-qr.d.ts +89 -5
- package/dist/types/flow.d.ts +92 -2
- package/dist/types/geolocation.d.ts +86 -3
- package/dist/types/government-validation.d.ts +86 -3
- package/dist/types/id-selfie-flow.d.ts +161 -0
- package/dist/types/id-verification.d.ts +87 -4
- package/dist/types/id.d.ts +88 -5
- package/dist/types/identity-reuse.d.ts +82 -2
- package/dist/types/index.d.ts +106 -1
- package/dist/types/phone.d.ts +83 -24
- package/dist/types/qe-signature.d.ts +91 -5
- package/dist/types/redirect-to-mobile.d.ts +4 -1
- package/dist/types/selfie.d.ts +86 -3
- package/dist/types/signature.d.ts +91 -5
- package/dist/types/video-selfie.d.ts +83 -6
- package/dist/types/watchlist.d.ts +91 -5
- package/dist/types/workflow.d.ts +85 -2
- package/dist/{i18n-CU4xq8qC.js → uiConfig-B5ASPUL4.js} +26 -3
- package/dist/{useModuleLoader-Bi26kJbg.js → useModuleLoader-D_YpuVsS.js} +37 -248
- package/dist/{vendor-preact-DThS2ZQ_.js → vendor-preact-mvwZ8mJj.js} +1 -1
- package/dist/{verificationResult-BWWkmeiA.js → verificationResult-B8HwR07t.js} +26 -15
- package/dist/video-selfie/styles.css +349 -1202
- package/dist/video-selfie/video-selfie.es.js +120 -381
- package/dist/watchlist/watchlist.es.js +16 -13
- package/dist/{watchlistForBusiness-D2Uo_TwF.js → watchlistForBusiness-D8Is99bZ.js} +12 -13
- package/dist/workflow/styles.css +501 -3977
- package/dist/workflow/workflow.es.js +25 -18
- package/package.json +22 -20
- package/dist/button-Dz6AsbmF.js +0 -40
- package/dist/cameraView-DIEzM5ru.js +0 -47
- package/dist/cpf-ocr/cpf-ocr.es.js +0 -2
- package/dist/cpf-ocr/styles.css +0 -45
- package/dist/cpfOcr-B79245-3.js +0 -2
- package/dist/cpfOcr-BhxT-lRN.js +0 -92
- package/dist/dateInputComposed-DRzZi6uy.js +0 -1
- package/dist/documentCapture-DXYYyxZl.js +0 -2
- package/dist/dropdownComposed-BAoxIIsE.js +0 -1
- package/dist/ekybModule-C6Nttked.js +0 -2
- package/dist/ekycModule-CDIEjI6V.js +0 -2
- package/dist/errorIcon-BA4T6iy-.js +0 -26
- package/dist/faceMatch-B_HvxLm_.js +0 -2
- package/dist/fieldComparison-DfNEuEE5.js +0 -2
- package/dist/flip-animation-CZYSUtMm.js +0 -6983
- package/dist/hooks-CNu7o-v8.js +0 -186
- package/dist/id-laser-h-CzPegPMn.js +0 -467
- package/dist/incodeComponent-CfzJGETt.js +0 -64
- package/dist/incodeModule-B-4_3JrK.js +0 -13
- package/dist/inputComposed-BaY5q9WM.js +0 -1
- package/dist/loadingIcon-B0ysgiNq.js +0 -148
- package/dist/page-DidH_RkX.js +0 -171
- package/dist/spinner-BCDCoi9C.js +0 -1
- package/dist/statusPage-Bk8nJwXV.js +0 -28
- package/dist/transitionSpinner-CuNCqHNi.js +0 -30
- package/dist/types/cpf-ocr.d.ts +0 -12
- package/dist/typography-BZIpjo97.js +0 -45
- package/dist/uiConfig-D2_wawvr.js +0 -25
- /package/dist/{aligndevicelottie-DFscByAI.js → aligndevicelottie-CfoZ5Uus.js} +0 -0
- /package/dist/{back-tutorial-cI_4VHmE.js → back-tutorial-BHyRHyET.js} +0 -0
- /package/dist/{backdevicelottie-COyhTrxM.js → backdevicelottie-yKkczgFy.js} +0 -0
- /package/dist/{blurdevicelottie-BLVeJHEG.js → blurdevicelottie-8BbophdM.js} +0 -0
- /package/dist/{browser-ponyfill-Df13Th-G.js → browser-ponyfill-CBjGwwPW.js} +0 -0
- /package/dist/{defineProperty-Qjefk7Uf.js → defineProperty-BbpBna-2.js} +0 -0
- /package/dist/{frontdevicelottie-B4tE2PYQ.js → frontdevicelottie-CFcahVLk.js} +0 -0
- /package/dist/{glaredevicelottie-D1pR73sx.js → glaredevicelottie-Cnvah0kz.js} +0 -0
- /package/dist/{id-tutorial-DwO90SAm.js → id-tutorial-BOOsXlAJ.js} +0 -0
- /package/dist/{lottie_light-C6B2ec41.js → lottie_light-Bv56F2Ae.js} +0 -0
- /package/dist/{passport-tutorial-D9JNsMsM.js → passport-tutorial-CeSup6m9.js} +0 -0
- /package/dist/{requiredLabelHint-D0RhuMed.js → requiredLabelHint-Dx0WS2cR.js} +0 -0
- /package/dist/{selfieTutorial-pB-N-fj5.js → selfieTutorial-CYa8bq6B.js} +0 -0
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { c as z, h as q, l as A, m as g, o as P, p as d, v as u
|
|
3
|
-
import {
|
|
4
|
-
import { t as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { t as
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import { t as BottomSheet } from "./bottomSheet-
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import { t as registerIncodeModuleElement } from "./incodeModule-
|
|
1
|
+
import { i as useTranslation } from "./uiConfig-B5ASPUL4.js";
|
|
2
|
+
import { S as k, c as z, h as q, l as A, m as g, o as P, p as d, v as u } from "./vendor-preact-mvwZ8mJj.js";
|
|
3
|
+
import { _ as useModuleTerminalCallbacks, m as useIsMobileDeviceWidth, o as Page, r as withStandaloneModuleBootstrap, t as IncodeComponent, y as useManager } from "./incodeComponent-K9ZWg302.js";
|
|
4
|
+
import { s as Asset, t as Spacer, u as cn } from "./spacer-CDlQd12V.js";
|
|
5
|
+
import { t as Spinner } from "./spinner-CLZ2fz4u.js";
|
|
6
|
+
import { r as Button } from "./incode-logo-rGFjZHqi.js";
|
|
7
|
+
import { b as ProgressBar, d as CaptureFooter, f as CameraOverlayHeader, p as CameraOverlay } from "./extensibility-iJYzpW6H.js";
|
|
8
|
+
import { a as FileIcon, g as CameraIcon, r as LockIcon } from "./icons--ezYG2Fb.js";
|
|
9
|
+
import { t as SuccessIcon } from "./successIcon-Bj8Y9CuI.js";
|
|
10
|
+
import { t as Modal } from "./modal-BjjJFpZu.js";
|
|
11
|
+
import { i as ErrorContent } from "./tutorial-BZZC93Ur.js";
|
|
12
|
+
import { t as AutoFocusTitle } from "./autoFocusTitle-gLba2mgp.js";
|
|
13
|
+
import { t as BottomSheet } from "./bottomSheet-Cp8DLulN.js";
|
|
14
|
+
import { a as CameraView, o as CameraFrame } from "./manualCaptureButton-t_oIol88.js";
|
|
15
|
+
import { n as Permissions } from "./manualCaptureButton-quGa2ufS.js";
|
|
16
|
+
import { t as registerIncodeModuleElement } from "./incodeModule-CcLzar_X.js";
|
|
17
17
|
import { createDocumentCaptureManager } from "@incodetech/core/document-capture";
|
|
18
18
|
//#region src/modules/document-capture/documentCameraView.tsx
|
|
19
19
|
function captureFrameFromVideo(video) {
|
|
@@ -26,7 +26,7 @@ function captureFrameFromVideo(video) {
|
|
|
26
26
|
ctx.drawImage(video, 0, 0);
|
|
27
27
|
return canvas.toDataURL("image/jpeg", .92).split(",")[1] ?? null;
|
|
28
28
|
}
|
|
29
|
-
var DocumentCameraView = ({ stream, manager, onOpenHelp }) => {
|
|
29
|
+
var DocumentCameraView = ({ stream, manager, onOpenHelp, helpButtonRef }) => {
|
|
30
30
|
const { t } = useTranslation();
|
|
31
31
|
const videoRef = A(null);
|
|
32
32
|
const handleCapture = q(() => {
|
|
@@ -38,26 +38,30 @@ var DocumentCameraView = ({ stream, manager, onOpenHelp }) => {
|
|
|
38
38
|
const file = new File([blob], "document.jpg", { type: "image/jpeg" });
|
|
39
39
|
manager.setFile(file, `data:image/jpeg;base64,${base64}`);
|
|
40
40
|
}, [manager]);
|
|
41
|
-
return /* @__PURE__ */ u(
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
41
|
+
return /* @__PURE__ */ u("main", {
|
|
42
|
+
class: "IncodeDocumentCaptureCameraPage",
|
|
43
|
+
children: /* @__PURE__ */ u(CameraView, {
|
|
44
|
+
stream,
|
|
45
|
+
videoRef,
|
|
46
|
+
"data-testid": "document-capture-camera",
|
|
47
|
+
children: /* @__PURE__ */ u(CameraOverlay, { children: [
|
|
48
|
+
/* @__PURE__ */ u(CameraOverlayHeader, {
|
|
49
|
+
title: t("documentCapture.camera.title"),
|
|
50
|
+
subtitle: t("documentCapture.camera.subtitle")
|
|
51
|
+
}),
|
|
52
|
+
/* @__PURE__ */ u(Spacer, { size: 16 }),
|
|
53
|
+
/* @__PURE__ */ u(CameraFrame, { variant: "fill" }),
|
|
54
|
+
/* @__PURE__ */ u(CaptureFooter, {
|
|
55
|
+
onOpenHelp,
|
|
56
|
+
helpButtonRef,
|
|
57
|
+
onCapture: handleCapture,
|
|
58
|
+
isManualCapture: true,
|
|
59
|
+
captureAriaLabel: t("manualCapture.ariaLabel"),
|
|
60
|
+
helpAriaLabel: t("documentCapture.needHelp.open"),
|
|
61
|
+
encryptionLabel: t("encryptionLabel.encryptedPhotos")
|
|
62
|
+
})
|
|
63
|
+
] })
|
|
64
|
+
})
|
|
61
65
|
});
|
|
62
66
|
};
|
|
63
67
|
//#endregion
|
|
@@ -201,44 +205,53 @@ var ISSUES = [
|
|
|
201
205
|
Icon: DirtyIcon
|
|
202
206
|
}
|
|
203
207
|
];
|
|
204
|
-
var DocumentCommonIssues = ({ onClose }) => {
|
|
208
|
+
var DocumentCommonIssues = ({ onClose, returnFocusRef }) => {
|
|
205
209
|
const { t } = useTranslation();
|
|
206
|
-
return /* @__PURE__ */ u(
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
class: "
|
|
219
|
-
children:
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
210
|
+
return /* @__PURE__ */ u(Modal.Root, {
|
|
211
|
+
open: true,
|
|
212
|
+
returnFocusRef,
|
|
213
|
+
onOpenChange: (open) => {
|
|
214
|
+
if (!open) onClose();
|
|
215
|
+
},
|
|
216
|
+
class: "IncodeDocumentCommonIssuesFullScreen",
|
|
217
|
+
hasBackdrop: false,
|
|
218
|
+
children: /* @__PURE__ */ u(Modal.Content, {
|
|
219
|
+
class: "IncodeDocumentCommonIssuesContent",
|
|
220
|
+
children: [
|
|
221
|
+
/* @__PURE__ */ u(Modal.TitleSection, { children: /* @__PURE__ */ u(Modal.Title, {
|
|
222
|
+
class: "IncodeDocumentCommonIssuesTitle",
|
|
223
|
+
children: t("commonIssues.commonIssues")
|
|
224
|
+
}) }),
|
|
225
|
+
/* @__PURE__ */ u("div", {
|
|
226
|
+
class: "IncodeDocumentCommonIssuesCards",
|
|
227
|
+
children: ISSUES.map((issue) => /* @__PURE__ */ u("div", {
|
|
228
|
+
class: "IncodeDocumentCommonIssuesCard",
|
|
229
|
+
children: [/* @__PURE__ */ u("div", {
|
|
230
|
+
class: "IncodeDocumentCommonIssuesCardIcon",
|
|
231
|
+
children: /* @__PURE__ */ u(issue.Icon, {})
|
|
232
|
+
}), /* @__PURE__ */ u("div", {
|
|
233
|
+
class: "IncodeDocumentCommonIssuesCardText",
|
|
234
|
+
children: [/* @__PURE__ */ u("h3", {
|
|
235
|
+
class: "IncodeDocumentCommonIssuesCardTitle",
|
|
236
|
+
children: t(issue.titleKey)
|
|
237
|
+
}), /* @__PURE__ */ u("p", {
|
|
238
|
+
class: "IncodeDocumentCommonIssuesCardBody",
|
|
239
|
+
children: t(issue.bodyKey)
|
|
240
|
+
})]
|
|
230
241
|
})]
|
|
231
|
-
})
|
|
232
|
-
},
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
242
|
+
}, issue.titleKey))
|
|
243
|
+
}),
|
|
244
|
+
/* @__PURE__ */ u(Modal.Actions, {
|
|
245
|
+
class: "IncodeDocumentCommonIssuesButtons",
|
|
246
|
+
children: /* @__PURE__ */ u(Button, {
|
|
247
|
+
onClick: onClose,
|
|
248
|
+
class: "IncodeDocumentCommonIssuesTryAgain",
|
|
249
|
+
"data-testid": "document-capture-common-issues-close-button",
|
|
250
|
+
children: t("commonIssues.tryAgain")
|
|
251
|
+
})
|
|
239
252
|
})
|
|
240
|
-
|
|
241
|
-
|
|
253
|
+
]
|
|
254
|
+
})
|
|
242
255
|
});
|
|
243
256
|
};
|
|
244
257
|
//#endregion
|
|
@@ -264,8 +277,8 @@ var PreviewFooter = ({ manager }) => {
|
|
|
264
277
|
var PreviewHeader = ({ isFilePdf }) => {
|
|
265
278
|
const { t } = useTranslation();
|
|
266
279
|
return /* @__PURE__ */ u(k, { children: [
|
|
267
|
-
/* @__PURE__ */ u(
|
|
268
|
-
|
|
280
|
+
/* @__PURE__ */ u(AutoFocusTitle, {
|
|
281
|
+
className: "IncodeDocumentCaptureReviewTitle",
|
|
269
282
|
children: isFilePdf ? t("documentCapture.review.titlePdfUpload") : t("documentCapture.review.titleCaptured")
|
|
270
283
|
}),
|
|
271
284
|
/* @__PURE__ */ u(Spacer, { size: 12 }),
|
|
@@ -292,8 +305,8 @@ var SuccessHeader = () => {
|
|
|
292
305
|
return /* @__PURE__ */ u(k, { children: [
|
|
293
306
|
/* @__PURE__ */ u(SuccessIcon, { size: 30 }),
|
|
294
307
|
/* @__PURE__ */ u(Spacer, { size: 16 }),
|
|
295
|
-
/* @__PURE__ */ u(
|
|
296
|
-
|
|
308
|
+
/* @__PURE__ */ u(AutoFocusTitle, {
|
|
309
|
+
className: "IncodeDocumentCaptureReviewTitle",
|
|
297
310
|
children: t("documentCapture.review.successTitle")
|
|
298
311
|
})
|
|
299
312
|
] });
|
|
@@ -303,23 +316,35 @@ var SuccessHeader = () => {
|
|
|
303
316
|
var UploadingHeader = ({ progress, isFilePdf }) => {
|
|
304
317
|
const { t } = useTranslation();
|
|
305
318
|
const label = isFilePdf ? t("documentCapture.review.uploading") : t("documentCapture.review.analyzing");
|
|
306
|
-
return /* @__PURE__ */ u(k, { children: [
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
319
|
+
return /* @__PURE__ */ u(k, { children: [
|
|
320
|
+
/* @__PURE__ */ u(Spacer, { size: 8 }),
|
|
321
|
+
/* @__PURE__ */ u(ProgressBar, {
|
|
322
|
+
progress,
|
|
323
|
+
labelledById: "document-capture-uploading-title"
|
|
324
|
+
}),
|
|
325
|
+
/* @__PURE__ */ u(Spacer, { size: 24 }),
|
|
326
|
+
/* @__PURE__ */ u(AutoFocusTitle, {
|
|
327
|
+
id: "document-capture-uploading-title",
|
|
328
|
+
className: "IncodeProgressBarLabel",
|
|
329
|
+
children: label
|
|
330
|
+
})
|
|
331
|
+
] });
|
|
310
332
|
};
|
|
311
333
|
//#endregion
|
|
312
334
|
//#region src/modules/document-capture/documentReview.tsx
|
|
313
|
-
var PdfViewer = z(() => import("./pdfViewer-
|
|
335
|
+
var PdfViewer = z(() => import("./pdfViewer-CZb6obcZ.js").then((m) => ({ default: m.PdfViewer })));
|
|
314
336
|
var DocumentReview = ({ state, manager }) => {
|
|
315
337
|
const { t } = useTranslation();
|
|
316
|
-
if (state.status === "failure")
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
338
|
+
if (state.status === "failure") {
|
|
339
|
+
const noMoreAttempts = state.attemptsRemaining <= 0;
|
|
340
|
+
return /* @__PURE__ */ u(ErrorContent, {
|
|
341
|
+
"data-testid": "document-capture-error",
|
|
342
|
+
title: noMoreAttempts ? t("documentCapture.review.error.exhaustedTitle") : t("documentCapture.review.error.title"),
|
|
343
|
+
description: noMoreAttempts ? t("documentCapture.review.error.exhaustedDescription") : t("documentCapture.review.error.description"),
|
|
344
|
+
attemptsRemaining: state.attemptsRemaining,
|
|
345
|
+
onButtonClick: noMoreAttempts ? () => manager.continue() : () => manager.retry()
|
|
346
|
+
});
|
|
347
|
+
}
|
|
323
348
|
const isFilePdf = state.fileType === "application/pdf" || state.imageBase64.startsWith("data:application/pdf");
|
|
324
349
|
const { fileName } = state;
|
|
325
350
|
const isPreview = state.status === "preview";
|
|
@@ -352,14 +377,14 @@ var DocumentReview = ({ state, manager }) => {
|
|
|
352
377
|
isFilePdf ? /* @__PURE__ */ u(k, { children: [/* @__PURE__ */ u("div", {
|
|
353
378
|
class: "IncodeDocumentCapturePdfCard",
|
|
354
379
|
children: [/* @__PURE__ */ u("div", {
|
|
355
|
-
class: "
|
|
380
|
+
class: "IncodeImageDocumentCapturePdfPreviewContainer",
|
|
356
381
|
children: /* @__PURE__ */ u(P, {
|
|
357
382
|
fallback: null,
|
|
358
383
|
children: /* @__PURE__ */ u(PdfViewer, {
|
|
359
384
|
url: state.imageBase64,
|
|
360
385
|
mode: "thumbnail",
|
|
361
386
|
"aria-label": t("documentCapture.review.titlePdfUpload"),
|
|
362
|
-
className: "
|
|
387
|
+
className: "IncodeImageDocumentCapturePdfPreview"
|
|
363
388
|
})
|
|
364
389
|
})
|
|
365
390
|
}), /* @__PURE__ */ u("p", {
|
|
@@ -370,7 +395,7 @@ var DocumentReview = ({ state, manager }) => {
|
|
|
370
395
|
class: "IncodeDocumentCaptureReviewImageContainer",
|
|
371
396
|
children: /* @__PURE__ */ u("img", {
|
|
372
397
|
src: state.imageBase64,
|
|
373
|
-
alt: "",
|
|
398
|
+
alt: t("documentCapture.review.titlePdfUpload"),
|
|
374
399
|
class: cn("IncodeDocumentCaptureReviewImage", showSuccessChrome && "IncodeDocumentCaptureSuccessBorder"),
|
|
375
400
|
"data-testid": "document-capture-review-image"
|
|
376
401
|
})
|
|
@@ -595,7 +620,7 @@ var SvgDocumentCaptureTutorial = (props) => /* @__PURE__ */ u("svg", {
|
|
|
595
620
|
});
|
|
596
621
|
//#endregion
|
|
597
622
|
//#region src/modules/document-capture/documentCaptureBottomSheet.tsx
|
|
598
|
-
var DocumentCaptureBottomSheet = ({ isOpen, onClose, onCameraClick, onUploadClick, cameraOptionTestId, uploadOptionTestId }) => {
|
|
623
|
+
var DocumentCaptureBottomSheet = ({ isOpen, onClose, onCameraClick, onUploadClick, cameraOptionTestId, uploadOptionTestId, returnFocusRef }) => {
|
|
599
624
|
const { t } = useTranslation();
|
|
600
625
|
const labelledById = g();
|
|
601
626
|
if (!isOpen) return null;
|
|
@@ -603,6 +628,7 @@ var DocumentCaptureBottomSheet = ({ isOpen, onClose, onCameraClick, onUploadClic
|
|
|
603
628
|
isOpen,
|
|
604
629
|
onClose,
|
|
605
630
|
labelledById,
|
|
631
|
+
returnFocusRef,
|
|
606
632
|
children: /* @__PURE__ */ u("div", {
|
|
607
633
|
class: "IncodeDocumentCaptureBottomSheetOptions",
|
|
608
634
|
children: [/* @__PURE__ */ u("button", {
|
|
@@ -636,22 +662,44 @@ function fileToBase64(file) {
|
|
|
636
662
|
}
|
|
637
663
|
//#endregion
|
|
638
664
|
//#region src/modules/document-capture/documentTutorial.tsx
|
|
639
|
-
var DocumentTutorial = ({ manager, title: titleProp, text: textProp, allowSkipDocumentCapture,
|
|
665
|
+
var DocumentTutorial = ({ manager, title: titleProp, text: textProp, allowSkipDocumentCapture, onlyCapture, onlyUpload, methodSelectionOpen, error, pageNumber, onlyPdf = false, directFilePick = false }) => {
|
|
640
666
|
const { t } = useTranslation();
|
|
641
|
-
const isMobileWidth = useIsMobileDeviceWidth();
|
|
642
667
|
const fileInputRef = A(null);
|
|
643
|
-
const
|
|
668
|
+
const primaryButtonRef = A(null);
|
|
669
|
+
const fileAccept = onlyPdf ? "application/pdf" : "image/*,application/pdf";
|
|
670
|
+
const isCaptureOnly = onlyCapture;
|
|
671
|
+
const isUploadOnly = onlyUpload;
|
|
672
|
+
const isBoth = !onlyCapture && !onlyUpload;
|
|
644
673
|
const prefix = pageNumber > 1 ? "documentCapture.tutorial.multiPageDocument" : "documentCapture.tutorial";
|
|
674
|
+
const subtitleKey = pageNumber > 1 ? `${prefix}.subtitle` : isCaptureOnly ? "documentCapture.tutorial.captureOnlySubtitle" : isUploadOnly ? "documentCapture.tutorial.uploadOnlySubtitle" : "documentCapture.tutorial.subtitle";
|
|
645
675
|
const title = titleProp?.trim() ? titleProp : t(`${prefix}.title`);
|
|
646
|
-
const text = textProp?.trim() ? textProp : t(
|
|
647
|
-
const showBottomSheet = captureMode === "camera" && isMobileWidth;
|
|
648
|
-
const closeBottomSheet = q(() => setIsBottomSheetOpen(false), []);
|
|
676
|
+
const text = textProp?.trim() ? textProp : t(subtitleKey);
|
|
649
677
|
const openFilePicker = () => {
|
|
650
678
|
fileInputRef.current?.click();
|
|
651
679
|
};
|
|
652
680
|
const handlePrimaryClick = () => {
|
|
653
|
-
if (
|
|
654
|
-
|
|
681
|
+
if (directFilePick) {
|
|
682
|
+
openFilePicker();
|
|
683
|
+
return;
|
|
684
|
+
}
|
|
685
|
+
if (isCaptureOnly) {
|
|
686
|
+
manager.capture();
|
|
687
|
+
return;
|
|
688
|
+
}
|
|
689
|
+
if (isUploadOnly) {
|
|
690
|
+
manager.openMethodSelection();
|
|
691
|
+
openFilePicker();
|
|
692
|
+
return;
|
|
693
|
+
}
|
|
694
|
+
manager.openMethodSelection();
|
|
695
|
+
};
|
|
696
|
+
const handleSelectorUpload = () => {
|
|
697
|
+
manager.selectUploadMethod();
|
|
698
|
+
openFilePicker();
|
|
699
|
+
};
|
|
700
|
+
const handlePickerDismissed = () => {
|
|
701
|
+
if (isUploadOnly) manager.closeMethodSelection();
|
|
702
|
+
else if (isBoth) manager.deselectUploadMethod();
|
|
655
703
|
};
|
|
656
704
|
const handleFileChange = async (e) => {
|
|
657
705
|
const target = e.target;
|
|
@@ -659,14 +707,13 @@ var DocumentTutorial = ({ manager, title: titleProp, text: textProp, allowSkipDo
|
|
|
659
707
|
if (file) {
|
|
660
708
|
const base64 = await fileToBase64(file);
|
|
661
709
|
manager.setFile(file, base64);
|
|
662
|
-
|
|
663
|
-
}
|
|
710
|
+
} else handlePickerDismissed();
|
|
664
711
|
target.value = "";
|
|
665
712
|
};
|
|
666
|
-
const
|
|
667
|
-
|
|
668
|
-
manager.capture();
|
|
713
|
+
const handleFileCancel = () => {
|
|
714
|
+
handlePickerDismissed();
|
|
669
715
|
};
|
|
716
|
+
const primaryLabel = isCaptureOnly ? t("documentCapture.tutorial.captureDocument") : isUploadOnly ? t("documentCapture.tutorial.uploadDocument") : t("documentCapture.tutorial.continue");
|
|
670
717
|
return /* @__PURE__ */ u(k, { children: [/* @__PURE__ */ u(Page, {
|
|
671
718
|
className: "IncodeDocumentCapturePageTutorial",
|
|
672
719
|
title,
|
|
@@ -676,18 +723,25 @@ var DocumentTutorial = ({ manager, title: titleProp, text: textProp, allowSkipDo
|
|
|
676
723
|
/* @__PURE__ */ u("input", {
|
|
677
724
|
ref: fileInputRef,
|
|
678
725
|
type: "file",
|
|
679
|
-
accept:
|
|
726
|
+
accept: fileAccept,
|
|
680
727
|
onChange: handleFileChange,
|
|
728
|
+
onCancel: handleFileCancel,
|
|
681
729
|
"aria-hidden": true,
|
|
682
730
|
tabIndex: -1,
|
|
683
|
-
class: "IncodeDocumentCaptureFileInput"
|
|
731
|
+
class: "IncodeDocumentCaptureFileInput",
|
|
732
|
+
"data-testid": "document-capture-file-input"
|
|
684
733
|
}),
|
|
685
734
|
/* @__PURE__ */ u("div", {
|
|
686
735
|
class: "IncodeDocumentCaptureTutorialContent",
|
|
687
736
|
children: /* @__PURE__ */ u("div", {
|
|
688
737
|
class: "IncodeDocumentCaptureTutorialIllustration",
|
|
689
738
|
"aria-hidden": true,
|
|
690
|
-
|
|
739
|
+
"data-testid": "document-capture-tutorial-illustration",
|
|
740
|
+
children: /* @__PURE__ */ u(Asset, {
|
|
741
|
+
name: "documentCapture.tutorial",
|
|
742
|
+
class: "IncodeDocumentCaptureTutorialImage",
|
|
743
|
+
default: SvgDocumentCaptureTutorial
|
|
744
|
+
})
|
|
691
745
|
})
|
|
692
746
|
}),
|
|
693
747
|
error ? /* @__PURE__ */ u("p", {
|
|
@@ -698,9 +752,10 @@ var DocumentTutorial = ({ manager, title: titleProp, text: textProp, allowSkipDo
|
|
|
698
752
|
/* @__PURE__ */ u("div", {
|
|
699
753
|
class: "IncodeDocumentCaptureActions",
|
|
700
754
|
children: [/* @__PURE__ */ u(Button, {
|
|
755
|
+
ref: primaryButtonRef,
|
|
701
756
|
onClick: handlePrimaryClick,
|
|
702
757
|
"data-testid": "document-capture-continue-button",
|
|
703
|
-
children:
|
|
758
|
+
children: primaryLabel
|
|
704
759
|
}), allowSkipDocumentCapture ? /* @__PURE__ */ u("div", {
|
|
705
760
|
class: "IncodeDocumentCaptureSkipWrapper",
|
|
706
761
|
children: /* @__PURE__ */ u(Button, {
|
|
@@ -712,25 +767,28 @@ var DocumentTutorial = ({ manager, title: titleProp, text: textProp, allowSkipDo
|
|
|
712
767
|
}) : null]
|
|
713
768
|
})
|
|
714
769
|
]
|
|
715
|
-
}),
|
|
716
|
-
isOpen:
|
|
717
|
-
onClose:
|
|
718
|
-
onCameraClick:
|
|
719
|
-
onUploadClick:
|
|
770
|
+
}), isBoth ? /* @__PURE__ */ u(DocumentCaptureBottomSheet, {
|
|
771
|
+
isOpen: methodSelectionOpen,
|
|
772
|
+
onClose: () => manager.closeMethodSelection(),
|
|
773
|
+
onCameraClick: () => manager.capture(),
|
|
774
|
+
onUploadClick: handleSelectorUpload,
|
|
720
775
|
cameraOptionTestId: "camera-option",
|
|
721
|
-
uploadOptionTestId: "file-option"
|
|
776
|
+
uploadOptionTestId: "file-option",
|
|
777
|
+
returnFocusRef: primaryButtonRef
|
|
722
778
|
}) : null] });
|
|
723
779
|
};
|
|
724
780
|
//#endregion
|
|
725
781
|
//#region src/modules/document-capture/nextDocumentPage.tsx
|
|
726
|
-
var NextDocumentPage = ({ manager, nextPageType,
|
|
782
|
+
var NextDocumentPage = ({ manager, nextPageType, onlyUpload, onlyPdf = false }) => {
|
|
727
783
|
const { t } = useTranslation();
|
|
728
784
|
const isMobileWidth = useIsMobileDeviceWidth();
|
|
729
785
|
const fileInputRef = A(null);
|
|
786
|
+
const primaryButtonRef = A(null);
|
|
730
787
|
const [isBottomSheetOpen, setIsBottomSheetOpen] = d(false);
|
|
788
|
+
const fileAccept = onlyPdf ? "application/pdf" : "image/jpeg,image/png";
|
|
731
789
|
const prefix = "documentCapture.tutorial.multiPageDocument";
|
|
732
790
|
const subtitle = t(nextPageType === "optional" ? `${prefix}.optionalPage.subtitle` : `${prefix}.subtitle`);
|
|
733
|
-
const showBottomSheet =
|
|
791
|
+
const showBottomSheet = !onlyUpload && isMobileWidth;
|
|
734
792
|
const closeBottomSheet = q(() => setIsBottomSheetOpen(false), []);
|
|
735
793
|
const openFilePicker = () => {
|
|
736
794
|
fileInputRef.current?.click();
|
|
@@ -763,7 +821,7 @@ var NextDocumentPage = ({ manager, nextPageType, captureMode }) => {
|
|
|
763
821
|
/* @__PURE__ */ u("input", {
|
|
764
822
|
ref: fileInputRef,
|
|
765
823
|
type: "file",
|
|
766
|
-
accept:
|
|
824
|
+
accept: fileAccept,
|
|
767
825
|
onChange: handleNextPageFileChange,
|
|
768
826
|
"aria-hidden": true,
|
|
769
827
|
tabIndex: -1,
|
|
@@ -774,10 +832,15 @@ var NextDocumentPage = ({ manager, nextPageType, captureMode }) => {
|
|
|
774
832
|
children: /* @__PURE__ */ u("div", {
|
|
775
833
|
class: "IncodeDocumentCaptureTutorialIllustration",
|
|
776
834
|
"aria-hidden": true,
|
|
777
|
-
children: /* @__PURE__ */ u(
|
|
835
|
+
children: /* @__PURE__ */ u(Asset, {
|
|
836
|
+
name: "documentCapture.tutorial",
|
|
837
|
+
class: "IncodeDocumentCaptureTutorialImage",
|
|
838
|
+
default: SvgDocumentCaptureTutorial
|
|
839
|
+
})
|
|
778
840
|
})
|
|
779
841
|
}),
|
|
780
842
|
/* @__PURE__ */ u(Button, {
|
|
843
|
+
ref: primaryButtonRef,
|
|
781
844
|
onClick: handlePrimaryClick,
|
|
782
845
|
"data-testid": "document-capture-add-next-page-button",
|
|
783
846
|
children: t("documentCapture.button.nextPage")
|
|
@@ -796,7 +859,8 @@ var NextDocumentPage = ({ manager, nextPageType, captureMode }) => {
|
|
|
796
859
|
onCameraClick: handleCameraClick,
|
|
797
860
|
onUploadClick: openFilePicker,
|
|
798
861
|
cameraOptionTestId: "next-page-camera-option",
|
|
799
|
-
uploadOptionTestId: "next-page-upload-document-option"
|
|
862
|
+
uploadOptionTestId: "next-page-upload-document-option",
|
|
863
|
+
returnFocusRef: primaryButtonRef
|
|
800
864
|
}) : null] });
|
|
801
865
|
};
|
|
802
866
|
//#endregion
|
|
@@ -805,7 +869,7 @@ var DocumentCaptureLoading = ({ title }) => {
|
|
|
805
869
|
return /* @__PURE__ */ u(Page, {
|
|
806
870
|
hideHeader: true,
|
|
807
871
|
hideFooterBranding: true,
|
|
808
|
-
className: "
|
|
872
|
+
className: "IncodeDocumentCaptureLoadingPage",
|
|
809
873
|
children: /* @__PURE__ */ u("div", {
|
|
810
874
|
class: "IncodeDocumentCaptureCentered",
|
|
811
875
|
children: /* @__PURE__ */ u(Spinner, {
|
|
@@ -817,10 +881,14 @@ var DocumentCaptureLoading = ({ title }) => {
|
|
|
817
881
|
};
|
|
818
882
|
//#endregion
|
|
819
883
|
//#region src/modules/document-capture/documentCapture.tsx
|
|
820
|
-
var DocumentCaptureContent = ({ config, onFinish, onError }) => {
|
|
821
|
-
const [state, manager] = useManager(() =>
|
|
822
|
-
|
|
884
|
+
var DocumentCaptureContent = ({ config, manager: externalManager, onFinish, onError }) => {
|
|
885
|
+
const [state, manager] = useManager(() => {
|
|
886
|
+
if (externalManager) return externalManager;
|
|
887
|
+
if (!config) throw new Error("DocumentCapture config is required when no manager is provided");
|
|
888
|
+
return createDocumentCaptureManager({ config });
|
|
889
|
+
}, { manageLifecycle: !externalManager });
|
|
823
890
|
const { t } = useTranslation();
|
|
891
|
+
const helpButtonRef = A(null);
|
|
824
892
|
useModuleTerminalCallbacks({
|
|
825
893
|
status: state.status,
|
|
826
894
|
onFinish,
|
|
@@ -832,36 +900,48 @@ var DocumentCaptureContent = ({ config, onFinish, onError }) => {
|
|
|
832
900
|
title: state.title,
|
|
833
901
|
text: state.text,
|
|
834
902
|
allowSkipDocumentCapture: state.allowSkipDocumentCapture,
|
|
835
|
-
|
|
903
|
+
onlyCapture: state.onlyCapture,
|
|
904
|
+
onlyUpload: state.onlyUpload,
|
|
905
|
+
methodSelectionOpen: state.methodSelectionOpen,
|
|
906
|
+
onlyPdf: state.onlyPdf,
|
|
836
907
|
error: state.error,
|
|
837
908
|
pageNumber: state.pageNumber
|
|
838
909
|
});
|
|
839
910
|
if (state.status === "nextPage") return /* @__PURE__ */ u(NextDocumentPage, {
|
|
840
911
|
manager,
|
|
841
912
|
nextPageType: state.nextPageType,
|
|
842
|
-
|
|
913
|
+
onlyUpload: state.onlyUpload,
|
|
914
|
+
onlyPdf: state.onlyPdf
|
|
843
915
|
});
|
|
844
|
-
if (state.status === "capturing" && state.
|
|
916
|
+
if (state.status === "capturing" && (state.captureMethod === "file" || state.captureMethod === "gallery")) return /* @__PURE__ */ u(DocumentTutorial, {
|
|
845
917
|
manager,
|
|
846
|
-
title: config
|
|
847
|
-
text: config
|
|
918
|
+
title: config?.title,
|
|
919
|
+
text: config?.text,
|
|
848
920
|
allowSkipDocumentCapture: false,
|
|
849
|
-
|
|
921
|
+
onlyCapture: false,
|
|
922
|
+
onlyUpload: true,
|
|
923
|
+
methodSelectionOpen: false,
|
|
924
|
+
onlyPdf: state.onlyPdf,
|
|
850
925
|
error: state.error,
|
|
851
|
-
pageNumber: state.pageNumber
|
|
926
|
+
pageNumber: state.pageNumber,
|
|
927
|
+
directFilePick: true
|
|
852
928
|
});
|
|
853
929
|
if (state.status === "permissions") return /* @__PURE__ */ u(Permissions, {
|
|
854
930
|
manager,
|
|
855
931
|
permissionStatus: state.permissionStatus
|
|
856
932
|
});
|
|
857
933
|
if (state.status === "initializingCamera") return /* @__PURE__ */ u(DocumentCaptureLoading, {});
|
|
858
|
-
if (state.status === "capturing"
|
|
934
|
+
if (state.status === "capturing") {
|
|
859
935
|
if (!state.stream) return /* @__PURE__ */ u(DocumentCaptureLoading, {});
|
|
860
936
|
return /* @__PURE__ */ u(k, { children: [/* @__PURE__ */ u(DocumentCameraView, {
|
|
861
937
|
stream: state.stream,
|
|
862
938
|
manager,
|
|
863
|
-
onOpenHelp: () =>
|
|
864
|
-
|
|
939
|
+
onOpenHelp: () => manager.openHelp(),
|
|
940
|
+
helpButtonRef
|
|
941
|
+
}), state.helpOpen ? /* @__PURE__ */ u(DocumentCommonIssues, {
|
|
942
|
+
onClose: () => manager.closeHelp(),
|
|
943
|
+
returnFocusRef: helpButtonRef
|
|
944
|
+
}) : null] });
|
|
865
945
|
}
|
|
866
946
|
if (state.status === "finalizing") return /* @__PURE__ */ u(DocumentCaptureLoading, { title: t("common.processing") });
|
|
867
947
|
if (state.status === "preview" || state.status === "uploading" || state.status === "success" || state.status === "failure") return /* @__PURE__ */ u(DocumentReview, {
|
|
@@ -870,13 +950,15 @@ var DocumentCaptureContent = ({ config, onFinish, onError }) => {
|
|
|
870
950
|
});
|
|
871
951
|
return null;
|
|
872
952
|
};
|
|
873
|
-
var
|
|
874
|
-
return /* @__PURE__ */ u(IncodeComponent, { children: config ? /* @__PURE__ */ u(DocumentCaptureContent, {
|
|
953
|
+
var DocumentCaptureWithLocalConfig = ({ config, manager, onFinish, onError }) => {
|
|
954
|
+
return /* @__PURE__ */ u(IncodeComponent, { children: config || manager ? /* @__PURE__ */ u(DocumentCaptureContent, {
|
|
875
955
|
config,
|
|
956
|
+
manager,
|
|
876
957
|
onFinish,
|
|
877
958
|
onError
|
|
878
959
|
}) : null });
|
|
879
960
|
};
|
|
961
|
+
var DocumentCapture = withStandaloneModuleBootstrap(DocumentCaptureWithLocalConfig, "DOCUMENT_CAPTURE", { supportsExternalManager: true });
|
|
880
962
|
registerIncodeModuleElement(DocumentCapture, "incode-document-capture");
|
|
881
963
|
//#endregion
|
|
882
964
|
export { DocumentCapture as t };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { _ as y, l as A, p as d, v as u
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { t as SuccessIcon } from "./successIcon-
|
|
1
|
+
import { S as k, _ as y, l as A, p as d, v as u } from "./vendor-preact-mvwZ8mJj.js";
|
|
2
|
+
import { u as cn } from "./spacer-CDlQd12V.js";
|
|
3
|
+
import { n as ErrorIcon } from "./incode-logo-rGFjZHqi.js";
|
|
4
|
+
import { f as ChevronDown, l as CloseIcon, n as SearchIcon, p as CheckmarkCompactIcon } from "./icons--ezYG2Fb.js";
|
|
5
|
+
import { t as SuccessIcon } from "./successIcon-Bj8Y9CuI.js";
|
|
6
6
|
//#region src/shared/dropdownComposed/dropdownComposed.tsx
|
|
7
7
|
var DropdownComposed = ({ id, label, labelHint, placeholder = "Choose an option", value, options, onChange, error, helper, showErrorIcon, showHelperIcon, suppressMessages = false, disabled = false, required, searchable = false, searchPlaceholder = "Search...", noResultsText = "No results found", name, tabIndex, onKeyDown, onBlur, renderSelectedLabel, siblingElement, class: className, "aria-label": ariaLabel, "data-testid": dataTestId }) => {
|
|
8
8
|
const [isOpen, setIsOpen] = d(false);
|
|
@@ -222,16 +222,16 @@ var DropdownComposed = ({ id, label, labelHint, placeholder = "Choose an option"
|
|
|
222
222
|
onKeyDown: handleKeyboardNavigation,
|
|
223
223
|
tabIndex: disabled ? -1 : tabIndex ?? 0,
|
|
224
224
|
disabled,
|
|
225
|
-
role: "combobox",
|
|
225
|
+
role: searchable ? void 0 : "combobox",
|
|
226
226
|
"aria-haspopup": "listbox",
|
|
227
227
|
"aria-expanded": isOpen ? "true" : "false",
|
|
228
228
|
"aria-disabled": disabled ? "true" : void 0,
|
|
229
|
-
"aria-required": required ? "true" : void 0,
|
|
230
|
-
"aria-invalid": error ? "true" : void 0,
|
|
229
|
+
"aria-required": !searchable && required ? "true" : void 0,
|
|
230
|
+
"aria-invalid": !searchable && error ? "true" : void 0,
|
|
231
231
|
"aria-labelledby": label ? `${labelId} ${valueId}` : ariaLabel ? void 0 : valueId,
|
|
232
232
|
"aria-label": !label ? ariaLabel : void 0,
|
|
233
233
|
"aria-controls": isOpen ? listboxId : void 0,
|
|
234
|
-
"aria-activedescendant": isOpen && highlightedIndex >= 0 ? `${id}-option-${highlightedIndex}` : void 0,
|
|
234
|
+
"aria-activedescendant": !searchable && isOpen && highlightedIndex >= 0 ? `${id}-option-${highlightedIndex}` : void 0,
|
|
235
235
|
"aria-describedby": describedByIds || void 0,
|
|
236
236
|
"data-error": error ? "true" : void 0,
|
|
237
237
|
"data-focused": isFocused || isOpen ? "true" : void 0,
|
|
@@ -268,6 +268,8 @@ var DropdownComposed = ({ id, label, labelHint, placeholder = "Choose an option"
|
|
|
268
268
|
children: [/* @__PURE__ */ u("input", {
|
|
269
269
|
ref: searchInputRef,
|
|
270
270
|
type: "text",
|
|
271
|
+
id: `${id}-search`,
|
|
272
|
+
"data-testid": `${id}-search`,
|
|
271
273
|
class: "IncodeDropdownComposedSearchInput",
|
|
272
274
|
value: searchQuery,
|
|
273
275
|
onInput: (e) => {
|
|
@@ -276,11 +278,16 @@ var DropdownComposed = ({ id, label, labelHint, placeholder = "Choose an option"
|
|
|
276
278
|
},
|
|
277
279
|
onKeyDown: handleSearchKeyDown,
|
|
278
280
|
placeholder: searchPlaceholder,
|
|
279
|
-
role: "
|
|
281
|
+
role: "combobox",
|
|
280
282
|
"aria-autocomplete": "list",
|
|
283
|
+
"aria-expanded": "true",
|
|
281
284
|
"aria-controls": listboxId,
|
|
282
285
|
"aria-activedescendant": highlightedIndex >= 0 ? `${id}-option-${highlightedIndex}` : void 0,
|
|
283
|
-
"aria-
|
|
286
|
+
"aria-required": required ? "true" : void 0,
|
|
287
|
+
"aria-invalid": error ? "true" : void 0,
|
|
288
|
+
"aria-labelledby": label ? labelId : void 0,
|
|
289
|
+
"aria-label": !label ? ariaLabel ?? searchPlaceholder : void 0,
|
|
290
|
+
"aria-describedby": describedByIds || void 0,
|
|
284
291
|
autocomplete: "off"
|
|
285
292
|
}), searchQuery ? /* @__PURE__ */ u("button", {
|
|
286
293
|
type: "button",
|