gbc-kyc-kit 2.2.7 → 2.2.9
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/gbc-kyc-kit.es.js +35 -16
- package/dist/gbc-kyc-kit.umd.js +46 -46
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/gbc-kyc-kit.es.js
CHANGED
|
@@ -39046,6 +39046,7 @@ function BackButton({
|
|
|
39046
39046
|
width: "100%",
|
|
39047
39047
|
textAlign: "left",
|
|
39048
39048
|
marginBottom: 3,
|
|
39049
|
+
marginLeft: 3,
|
|
39049
39050
|
children: /* @__PURE__ */ jsx$1(MUITooltip, {
|
|
39050
39051
|
arrow: true,
|
|
39051
39052
|
title: "Volver",
|
|
@@ -39242,7 +39243,6 @@ const DocumentReaderController = (dataDocument, clientId, authorize, eventId, so
|
|
|
39242
39243
|
setStatus("");
|
|
39243
39244
|
setMessage("");
|
|
39244
39245
|
setIsLoading(false);
|
|
39245
|
-
setUploadDocumentByPhone(false);
|
|
39246
39246
|
};
|
|
39247
39247
|
const {
|
|
39248
39248
|
handleSubmit: simpleHandleSubmit
|
|
@@ -39306,13 +39306,12 @@ const DocumentReaderController = (dataDocument, clientId, authorize, eventId, so
|
|
|
39306
39306
|
clientId,
|
|
39307
39307
|
geolocation
|
|
39308
39308
|
});
|
|
39309
|
+
if (data2.count_try >= 2)
|
|
39310
|
+
setUploadDocumentByPhone(true);
|
|
39309
39311
|
await dataDocument({
|
|
39310
39312
|
...error,
|
|
39311
39313
|
countAttempts: data2.count_try
|
|
39312
39314
|
});
|
|
39313
|
-
console.log(data2.count_try, uploadDocumentByPhone);
|
|
39314
|
-
if (data2.count_try === 1)
|
|
39315
|
-
setUploadDocumentByPhone(true);
|
|
39316
39315
|
if ((_a = error.response.data) == null ? void 0 : _a.message) {
|
|
39317
39316
|
message2 = error.response.data.message;
|
|
39318
39317
|
} else if (status2 === 500) {
|
|
@@ -39331,6 +39330,7 @@ const DocumentReaderController = (dataDocument, clientId, authorize, eventId, so
|
|
|
39331
39330
|
setIsLoading(false);
|
|
39332
39331
|
}
|
|
39333
39332
|
};
|
|
39333
|
+
console.log(uploadDocumentByPhone);
|
|
39334
39334
|
const onUploadImage = async (side) => {
|
|
39335
39335
|
const getImage = webcamRef.current.getScreenshot();
|
|
39336
39336
|
const newImage = Object.assign(base64, {
|
|
@@ -39420,7 +39420,8 @@ function UploadDocument2({
|
|
|
39420
39420
|
detail,
|
|
39421
39421
|
videoRef,
|
|
39422
39422
|
streamRef,
|
|
39423
|
-
onTapToFocus
|
|
39423
|
+
onTapToFocus,
|
|
39424
|
+
title
|
|
39424
39425
|
}) {
|
|
39425
39426
|
useEffect(() => {
|
|
39426
39427
|
if (activateCamera && videoRef.current) {
|
|
@@ -39481,7 +39482,7 @@ function UploadDocument2({
|
|
|
39481
39482
|
variant: "h6",
|
|
39482
39483
|
className: "title",
|
|
39483
39484
|
mt: 2,
|
|
39484
|
-
children:
|
|
39485
|
+
children: title
|
|
39485
39486
|
}), /* @__PURE__ */ jsx$1(Typography$1, {
|
|
39486
39487
|
variant: "body2",
|
|
39487
39488
|
children: detail
|
|
@@ -39494,7 +39495,9 @@ function UploadDocument2({
|
|
|
39494
39495
|
function UploadByGallery({
|
|
39495
39496
|
fileInputRef,
|
|
39496
39497
|
handleFileChange,
|
|
39497
|
-
side
|
|
39498
|
+
side,
|
|
39499
|
+
title,
|
|
39500
|
+
subtitle
|
|
39498
39501
|
}) {
|
|
39499
39502
|
const [startUpload, setStartUpload] = useState(false);
|
|
39500
39503
|
const handleClick = () => {
|
|
@@ -39508,10 +39511,10 @@ function UploadByGallery({
|
|
|
39508
39511
|
variant: "h6",
|
|
39509
39512
|
className: "title",
|
|
39510
39513
|
mt: 2,
|
|
39511
|
-
children:
|
|
39514
|
+
children: title
|
|
39512
39515
|
}), /* @__PURE__ */ jsx$1(Typography$1, {
|
|
39513
39516
|
variant: "body2",
|
|
39514
|
-
children:
|
|
39517
|
+
children: subtitle
|
|
39515
39518
|
}), /* @__PURE__ */ jsxs(List$1, {
|
|
39516
39519
|
dense: true,
|
|
39517
39520
|
children: [/* @__PURE__ */ jsxs(ListItem$1, {
|
|
@@ -39552,6 +39555,7 @@ function UploadByGallery({
|
|
|
39552
39555
|
display: "flex",
|
|
39553
39556
|
justifyContent: "center",
|
|
39554
39557
|
alignItems: "center",
|
|
39558
|
+
padding: 2,
|
|
39555
39559
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
39556
39560
|
style: {
|
|
39557
39561
|
display: "flex",
|
|
@@ -39569,7 +39573,7 @@ function UploadByGallery({
|
|
|
39569
39573
|
},
|
|
39570
39574
|
children: [/* @__PURE__ */ jsx$1("strong", {
|
|
39571
39575
|
children: "Haz clic aqu\xED"
|
|
39572
|
-
}), " para subir una foto desde
|
|
39576
|
+
}), " para subir una foto desde tu dispositivo"]
|
|
39573
39577
|
})]
|
|
39574
39578
|
}), /* @__PURE__ */ jsx$1("input", {
|
|
39575
39579
|
ref: fileInputRef,
|
|
@@ -39651,7 +39655,7 @@ function SideDocsSelector({
|
|
|
39651
39655
|
onUploadImage2,
|
|
39652
39656
|
uploadDocumentByPhone,
|
|
39653
39657
|
uploadByGallery,
|
|
39654
|
-
|
|
39658
|
+
onSendSubmitDocument
|
|
39655
39659
|
}) {
|
|
39656
39660
|
const [value, setValue] = React$2.useState(0);
|
|
39657
39661
|
const [showZoom, setShowZoom] = React$2.useState(false);
|
|
@@ -39735,8 +39739,12 @@ function SideDocsSelector({
|
|
|
39735
39739
|
const handleFileChange = async (e2) => {
|
|
39736
39740
|
const imageData = e2.target.files[0];
|
|
39737
39741
|
const side = e2.target.name;
|
|
39738
|
-
setUploadDocumentByPhone(false);
|
|
39739
39742
|
onUploadImage2(side, await fileToBase64(imageData));
|
|
39743
|
+
if (side === "firstImage") {
|
|
39744
|
+
handleChange((e22) => e22, 1);
|
|
39745
|
+
} else {
|
|
39746
|
+
onSendSubmitDocument();
|
|
39747
|
+
}
|
|
39740
39748
|
};
|
|
39741
39749
|
return /* @__PURE__ */ jsxs(Box$1, {
|
|
39742
39750
|
sx: {
|
|
@@ -39846,7 +39854,9 @@ function SideDocsSelector({
|
|
|
39846
39854
|
}) : uploadDocumentByPhone || uploadByGallery ? /* @__PURE__ */ jsx$1(UploadByGallery, {
|
|
39847
39855
|
handleFileChange,
|
|
39848
39856
|
side: "firstImage",
|
|
39849
|
-
fileInputRef
|
|
39857
|
+
fileInputRef,
|
|
39858
|
+
title: "Intentemos de otra manera",
|
|
39859
|
+
subtitle: "Vamos a cargar el documento desde tu dispositivo. \xA1Ten en cuenta lo siguiente!"
|
|
39850
39860
|
}) : /* @__PURE__ */ jsx$1(UploadDocument2, {
|
|
39851
39861
|
videoRef,
|
|
39852
39862
|
streamRef,
|
|
@@ -39855,7 +39865,8 @@ function SideDocsSelector({
|
|
|
39855
39865
|
videoConstraints,
|
|
39856
39866
|
base64,
|
|
39857
39867
|
detail: "Subir frontal del documento",
|
|
39858
|
-
onTapToFocus: handleTapToFocus
|
|
39868
|
+
onTapToFocus: handleTapToFocus,
|
|
39869
|
+
title: "Cargar documento"
|
|
39859
39870
|
}), /* @__PURE__ */ jsxs(Box$1, {
|
|
39860
39871
|
width: "100%",
|
|
39861
39872
|
children: [activateCamera && /* @__PURE__ */ jsx$1(CustomButton, {
|
|
@@ -39954,6 +39965,12 @@ function SideDocsSelector({
|
|
|
39954
39965
|
})
|
|
39955
39966
|
})]
|
|
39956
39967
|
})]
|
|
39968
|
+
}) : uploadDocumentByPhone || uploadByGallery ? /* @__PURE__ */ jsx$1(UploadByGallery, {
|
|
39969
|
+
handleFileChange,
|
|
39970
|
+
side: "secondImage",
|
|
39971
|
+
fileInputRef,
|
|
39972
|
+
title: "Bien ahora vamos por el reverso",
|
|
39973
|
+
subtitle: "\xA1Recuerda tener en cuenta lo siguiente!"
|
|
39957
39974
|
}) : /* @__PURE__ */ jsx$1(UploadDocument2, {
|
|
39958
39975
|
videoRef,
|
|
39959
39976
|
streamRef,
|
|
@@ -39961,7 +39978,8 @@ function SideDocsSelector({
|
|
|
39961
39978
|
activateCamera,
|
|
39962
39979
|
videoConstraints,
|
|
39963
39980
|
base64,
|
|
39964
|
-
|
|
39981
|
+
title: "Bien ahora carguemos el reverso",
|
|
39982
|
+
detail: "Asegurate de que sea legible",
|
|
39965
39983
|
onTapToFocus: handleTapToFocus
|
|
39966
39984
|
}), /* @__PURE__ */ jsxs(Box$1, {
|
|
39967
39985
|
width: "100%",
|
|
@@ -40483,7 +40501,8 @@ function DocumentReader({
|
|
|
40483
40501
|
onUploadImage2,
|
|
40484
40502
|
uploadDocumentByPhone,
|
|
40485
40503
|
uploadByGallery,
|
|
40486
|
-
setUploadDocumentByPhone
|
|
40504
|
+
setUploadDocumentByPhone,
|
|
40505
|
+
onSendSubmitDocument
|
|
40487
40506
|
})]
|
|
40488
40507
|
})
|
|
40489
40508
|
})]
|