gbc-kyc-kit 1.2.3 → 1.2.5

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.
@@ -20348,7 +20348,6 @@ const DocumentReaderController = (dataDocument, clientId, authorize, inProductio
20348
20348
  setMessage("Documento verificado con \xE9xito");
20349
20349
  } catch (error) {
20350
20350
  let message2 = "";
20351
- console.log(error);
20352
20351
  const {
20353
20352
  status: status2
20354
20353
  } = error.response;
@@ -20541,20 +20540,27 @@ const LivenessCheckController = (clientId, authorize, inProduction) => {
20541
20540
  const [status, setStatus] = useState(clientId === void 0 ? "CLIENTID" : authorize === void 0 ? "TOKEN" : "");
20542
20541
  const [message, setMessage] = useState("");
20543
20542
  const listener = (event) => {
20544
- console.log(event.detail);
20545
20543
  if (event.detail) {
20546
20544
  if (event.detail.action === "PROCESS_FINISHED") {
20547
20545
  const {
20548
- response
20549
- } = event.detail.data;
20550
- const {
20551
- code
20552
- } = response;
20553
- if (code === -1) {
20546
+ data: data2
20547
+ } = event.detail;
20548
+ if (data2.reason) {
20554
20549
  setStatus("NOT_VERIFY");
20555
- setMessage("Error interno de aplicaci\xF3n, contactar con soporte!");
20550
+ setMessage("Error de conexi\xF3n, contactar con soporte!");
20551
+ } else {
20552
+ const {
20553
+ response
20554
+ } = event.detail.data;
20555
+ const {
20556
+ code
20557
+ } = response;
20558
+ if (code === -1) {
20559
+ setStatus("NOT_VERIFY");
20560
+ setMessage("Error interno de aplicaci\xF3n, contactar con soporte!");
20561
+ }
20562
+ onSendSubmitLiveness();
20556
20563
  }
20557
- onSendSubmitLiveness();
20558
20564
  }
20559
20565
  }
20560
20566
  };
@@ -20580,7 +20586,6 @@ const LivenessCheckController = (clientId, authorize, inProduction) => {
20580
20586
  const res2 = await request2(parseReq);
20581
20587
  } catch (error) {
20582
20588
  let message2 = "";
20583
- console.log(error);
20584
20589
  const {
20585
20590
  status: status2
20586
20591
  } = error.response;
@@ -21768,31 +21773,33 @@ function LivenessCheck({
21768
21773
  component.addEventListener("face-liveness", listener);
21769
21774
  }
21770
21775
  }, []);
21771
- return /* @__PURE__ */ jsxs("div", {
21772
- id: "liveness-check",
21773
- className: `kit-gbc liveness-container ${mode}`,
21774
- children: [/* @__PURE__ */ jsx(k$1, {
21775
- position: "top-center",
21776
- autoClose: 5e3,
21777
- hideProgressBar: false,
21778
- newestOnTop: false,
21779
- closeOnClick: true,
21780
- rtl: false,
21781
- pauseOnFocusLoss: true,
21782
- draggable: true,
21783
- pauseOnHover: true
21784
- }), isLoading && /* @__PURE__ */ jsx(BackDropLoader, {}), !lib$1(status) ? /* @__PURE__ */ jsx("div", {
21785
- className: "sub",
21786
- children: /* @__PURE__ */ jsx(StatusComponent, {
21787
- status,
21788
- message,
21789
- clearState
21790
- })
21791
- }) : /* @__PURE__ */ jsx("face-liveness", {
21792
- locale: "es",
21793
- class: "liveness",
21794
- url: "https://regula.globalbridgeconnections.com.py/face-sdk"
21795
- })]
21776
+ return /* @__PURE__ */ jsx("div", {
21777
+ className: `kit-gbc liveness-container ${mode} ${status === "NOT_VERIFY" && "error"}`,
21778
+ children: /* @__PURE__ */ jsxs("div", {
21779
+ id: "liveness-check",
21780
+ children: [/* @__PURE__ */ jsx(k$1, {
21781
+ position: "top-center",
21782
+ autoClose: 5e3,
21783
+ hideProgressBar: false,
21784
+ newestOnTop: false,
21785
+ closeOnClick: true,
21786
+ rtl: false,
21787
+ pauseOnFocusLoss: true,
21788
+ draggable: true,
21789
+ pauseOnHover: true
21790
+ }), isLoading && /* @__PURE__ */ jsx(BackDropLoader, {}), !lib$1(status) ? /* @__PURE__ */ jsx("div", {
21791
+ className: "sub",
21792
+ children: /* @__PURE__ */ jsx(StatusComponent, {
21793
+ status,
21794
+ message,
21795
+ clearState
21796
+ })
21797
+ }) : /* @__PURE__ */ jsx("face-liveness", {
21798
+ locale: "es",
21799
+ class: "liveness",
21800
+ url: "https://regula.globalbridgeconnections.com.py/face-sdk"
21801
+ })]
21802
+ })
21796
21803
  });
21797
21804
  }
21798
21805
  LivenessCheck.defaultProps = {