@idscan/onboarding 2.10.1 → 2.10.3
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/Wrapper.css +1 -1
- package/dist/Wrapper.d.ts +2 -1
- package/dist/networks/Face-chunk.js +1 -1
- package/dist/networks/MRZ-chunk.js +1 -1
- package/dist/networks/PDF-chunk.js +1 -1
- package/dist/networks/ZXing-chunk.js +1 -1
- package/dist/src/Wrapper.d.ts +1 -0
- package/dist/wrapper.es.js +48 -19
- package/dist/wrapper.umd.js +1 -1
- package/package.json +2 -2
- package/readme.md +8 -0
package/dist/src/Wrapper.d.ts
CHANGED
|
@@ -23,6 +23,7 @@ export default class Wrapper {
|
|
|
23
23
|
* reinitialize the library with new applicant id
|
|
24
24
|
*/
|
|
25
25
|
setApplicant(applicantId: string): Promise<void>;
|
|
26
|
+
private retryInit;
|
|
26
27
|
restart(): Promise<void>;
|
|
27
28
|
showLoader(val: boolean, bottomText?: string, topText?: string): void;
|
|
28
29
|
private wrapIDVCComponent;
|
package/dist/wrapper.es.js
CHANGED
|
@@ -522,11 +522,15 @@ function requireRuntime() {
|
|
|
522
522
|
return runtime.exports;
|
|
523
523
|
}
|
|
524
524
|
requireRuntime();
|
|
525
|
-
const
|
|
526
|
-
const
|
|
527
|
-
const
|
|
528
|
-
const
|
|
525
|
+
const isString$1 = (val) => typeof val === "string";
|
|
526
|
+
const notEmptyString = (val) => isString$1(val) && !!val;
|
|
527
|
+
const isUUID = (str) => isString$1(str) && /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(str);
|
|
528
|
+
const isPublicKey = (str) => isString$1(str) && str.toLowerCase().startsWith("pk_") && isUUID(str);
|
|
529
|
+
const isElExist = (str) => isString$1(str) && !!document.getElementById(str);
|
|
529
530
|
const isPackageVersionNumber = (input) => {
|
|
531
|
+
if (!isString$1(input)) {
|
|
532
|
+
return false;
|
|
533
|
+
}
|
|
530
534
|
const regex2 = /^([1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)$/;
|
|
531
535
|
return regex2.test(input);
|
|
532
536
|
};
|
|
@@ -786,6 +790,7 @@ class Configs {
|
|
|
786
790
|
}
|
|
787
791
|
this.cssStyles = options == null ? void 0 : options.cssStyles;
|
|
788
792
|
this.cssVariables = options == null ? void 0 : options.cssVariables;
|
|
793
|
+
this.showQrCode = this.wrapper.preferApiConfig ? settings.showQrCode ?? true : options.showQrCode;
|
|
789
794
|
}
|
|
790
795
|
faceAuthorizationConfig(settings) {
|
|
791
796
|
settings.isShowDocumentTypeSelect = false;
|
|
@@ -885,6 +890,9 @@ class Configs {
|
|
|
885
890
|
get cssVariablesConfig() {
|
|
886
891
|
return this.cssVariables;
|
|
887
892
|
}
|
|
893
|
+
get showQrCodeConfig() {
|
|
894
|
+
return this.showQrCode;
|
|
895
|
+
}
|
|
888
896
|
get mountElement() {
|
|
889
897
|
return this.wrapper.el || "videoCapturingEl";
|
|
890
898
|
}
|
|
@@ -939,10 +947,13 @@ class ValidationError extends WrapperError {
|
|
|
939
947
|
}
|
|
940
948
|
class HttpError extends WrapperError {
|
|
941
949
|
constructor(response) {
|
|
942
|
-
|
|
943
|
-
|
|
950
|
+
const status = (response == null ? void 0 : response.status) ?? 0;
|
|
951
|
+
super(status.toString());
|
|
944
952
|
let message;
|
|
945
953
|
switch (status) {
|
|
954
|
+
case 0:
|
|
955
|
+
message = "Network Error";
|
|
956
|
+
break;
|
|
946
957
|
case 400:
|
|
947
958
|
message = "Bad Request";
|
|
948
959
|
break;
|
|
@@ -961,7 +972,7 @@ class HttpError extends WrapperError {
|
|
|
961
972
|
default:
|
|
962
973
|
message = "Something Went Wrong!";
|
|
963
974
|
}
|
|
964
|
-
this.message = `Status code: ${status}. ${message}
|
|
975
|
+
this.message = status ? `Status code: ${status}. ${message}` : message;
|
|
965
976
|
this.name = "HttpError";
|
|
966
977
|
this.statusCode = status;
|
|
967
978
|
this.header = "Server Side Problems";
|
|
@@ -1278,9 +1289,8 @@ class Api {
|
|
|
1278
1289
|
} catch (e) {
|
|
1279
1290
|
if (e instanceof HttpError) {
|
|
1280
1291
|
throw e;
|
|
1281
|
-
} else {
|
|
1282
|
-
throw new HttpError(e);
|
|
1283
1292
|
}
|
|
1293
|
+
throw new HttpError();
|
|
1284
1294
|
}
|
|
1285
1295
|
}
|
|
1286
1296
|
async validateApplicant(data, demoMode = false, isFaceAuth = false) {
|
|
@@ -1530,10 +1540,10 @@ class Lib {
|
|
|
1530
1540
|
};
|
|
1531
1541
|
}
|
|
1532
1542
|
}
|
|
1533
|
-
const validationModalHTML = '<div class="idvc-modal-background" id="idvc-modal-background">\n
|
|
1543
|
+
const validationModalHTML = '<div class="idvc-modal-background d-none" id="idvc-modal-background">\n <div class="idvc-modal idvc-modal_validation d-none" id="idvc-modal">\n <div class="loading-spinner d-none" id="idvc-loading-spinner">\n <svg viewBox="25 25 50 50" class="circular">\n <circle cx="50" cy="50" r="20" fill="none" class="path"></circle>\n </svg>\n </div>\n <div class="idvc-modal__header">\n <div class="idvc-modal__header__body">\n <div class="idvc-modal__header__sign">\n <div id="idvc-modal-header-sign-info"></div>\n <div id="idvc-modal-header-sign-check" class="d-none"></div>\n </div>\n <h2 class="idvc-modal__header__content">\n Header\n </h2>\n </div>\n <div class="idvc-modal__close-btn" id="idvc-close-modal-btn">\n <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024"><path fill="currentColor" d="M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"></path></svg>\n </div>\n </div>\n <div class="idvc-modal__body">\n Please try again\n </div>\n <div class="idvc-modal__footer">\n <button type="button" class="btn btn--primary" id="idvc-modal-try-again-btn"><span>Try again</span></button>\n <button type="button" class="btn btn--default" id="idvc-modal-complete-btn"><span>Complete </span></button>\n </div>\n </div>\n</div>\n';
|
|
1534
1544
|
const infoCircleSVG = '<svg width="20" height="20" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M8 1C9.97933 1.052 11.6278 1.73683 12.9455 3.0545C14.2632 4.37217 14.948 6.02067 15 8C14.948 9.97933 14.2632 11.6278 12.9455 12.9455C11.6278 14.2632 9.97933 14.948 8 15C6.02067 14.948 4.37217 14.2632 3.0545 12.9455C1.73683 11.6278 1.052 9.97933 1 8C1.052 6.02067 1.73683 4.37217 3.0545 3.0545C4.37217 1.73683 6.02067 1.052 8 1ZM8 4C7.729 4 7.505 4.099 7.328 4.297C7.151 4.495 7.07283 4.72933 7.0935 5L7.453 9C7.474 9.146 7.53383 9.26317 7.6325 9.3515C7.73117 9.43983 7.8535 9.48417 7.9995 9.4845C8.1455 9.48483 8.26783 9.4405 8.3665 9.3515C8.46517 9.2625 8.525 9.14533 8.546 9L8.9055 5C8.9265 4.729 8.84833 4.49467 8.671 4.297C8.49367 4.09933 8.27067 4.00033 8 4ZM8 12C8.22933 11.9897 8.4195 11.9115 8.5705 11.7655C8.7215 11.6195 8.797 11.432 8.797 11.203C8.797 10.974 8.7215 10.7838 8.5705 10.6325C8.4195 10.4812 8.22933 10.4057 8 10.406C7.77067 10.4063 7.5805 10.4818 7.4295 10.6325C7.2785 10.7832 7.203 10.9733 7.203 11.203C7.203 11.4327 7.2785 11.6202 7.4295 11.7655C7.5805 11.9108 7.77067 11.989 8 12Z"/>\n</svg>\n';
|
|
1535
1545
|
const checkCircleSVG = '<svg width="20" height="20" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path class="color-success" d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zm-3.97-3.03a.75.75 0 0 0-1.08.022L7.477 9.417 5.384 7.323a.75.75 0 0 0-1.06 1.06L6.97 11.03a.75.75 0 0 0 1.079-.02l3.992-4.99a.75.75 0 0 0-.01-1.05z"/>\n</svg>\n';
|
|
1536
|
-
const modalHTML = '<div class="idvc-modal d-none" id="idvc-modal">\n <div class="
|
|
1546
|
+
const modalHTML = '<div class="idvc-modal-background d-none" id="idvc-modal-background">\n <div class="idvc-modal d-none" id="idvc-modal">\n <div class="loading-spinner d-none" id="idvc-loading-spinner">\n <svg viewBox="25 25 50 50" class="circular">\n <circle cx="50" cy="50" r="20" fill="none" class="path"></circle>\n </svg>\n </div>\n <div class="idvc-modal__close-btn" id="idvc-close-modal-btn"></div>\n <div class="idvc-modal__header">\n <h2 class="idvc-modal__header__content"></h2>\n </div>\n <div class="idvc-modal__body"></div>\n <div class="idvc-modal__footer"></div>\n </div>\n</div>\n';
|
|
1537
1547
|
class Modal {
|
|
1538
1548
|
constructor(mountEl) {
|
|
1539
1549
|
this._closable = true;
|
|
@@ -1554,7 +1564,7 @@ class Modal {
|
|
|
1554
1564
|
this.background = this.modalContainer.querySelector("#idvc-modal-background");
|
|
1555
1565
|
this.spinner = this.modalContainer.querySelector("#idvc-loading-spinner");
|
|
1556
1566
|
this.closeBtn = this.modalContainer.querySelector("#idvc-close-modal-btn");
|
|
1557
|
-
this.mountEl.classList.add("pos-relative");
|
|
1567
|
+
this.mountEl.classList.add("pos-relative", "idvc-mount-host");
|
|
1558
1568
|
this.body = this.container.querySelector(".idvc-modal__body");
|
|
1559
1569
|
this.footer = this.container.querySelector(".idvc-modal__footer");
|
|
1560
1570
|
this.closeHandler();
|
|
@@ -1637,6 +1647,11 @@ class Modal {
|
|
|
1637
1647
|
}
|
|
1638
1648
|
}
|
|
1639
1649
|
class ValidationModal extends Modal {
|
|
1650
|
+
constructor() {
|
|
1651
|
+
super(...arguments);
|
|
1652
|
+
this.tryAgainHandler = () => {
|
|
1653
|
+
};
|
|
1654
|
+
}
|
|
1640
1655
|
init(html2 = validationModalHTML) {
|
|
1641
1656
|
super.init(html2);
|
|
1642
1657
|
this.headerInfoContainer = this.headerContainer.querySelector("#idvc-modal-header-sign-info");
|
|
@@ -1646,7 +1661,10 @@ class ValidationModal extends Modal {
|
|
|
1646
1661
|
this.headerInfoSvg = this.headerInfoContainer.querySelector("svg");
|
|
1647
1662
|
this.tryAgainBtn = this.container.querySelector("#idvc-modal-try-again-btn");
|
|
1648
1663
|
this.completeBtn = this.container.querySelector("#idvc-modal-complete-btn");
|
|
1649
|
-
this.tryAgainBtn.addEventListener("click", () =>
|
|
1664
|
+
this.tryAgainBtn.addEventListener("click", () => {
|
|
1665
|
+
this.hide();
|
|
1666
|
+
this.tryAgainHandler();
|
|
1667
|
+
});
|
|
1650
1668
|
this.addCompleteHandler();
|
|
1651
1669
|
}
|
|
1652
1670
|
set type(status) {
|
|
@@ -1691,6 +1709,9 @@ class ValidationModal extends Modal {
|
|
|
1691
1709
|
el.classList.add("d-none");
|
|
1692
1710
|
}
|
|
1693
1711
|
}
|
|
1712
|
+
set onTryAgain(handler) {
|
|
1713
|
+
this.tryAgainHandler = handler;
|
|
1714
|
+
}
|
|
1694
1715
|
addCompleteHandler(handler = () => {
|
|
1695
1716
|
}) {
|
|
1696
1717
|
this.completeBtn.addEventListener("click", () => {
|
|
@@ -4545,7 +4566,7 @@ function requireBrowser() {
|
|
|
4545
4566
|
}
|
|
4546
4567
|
var browserExports = requireBrowser();
|
|
4547
4568
|
const QRCode = /* @__PURE__ */ getDefaultExportFromCjs(browserExports);
|
|
4548
|
-
const qrCodeModalHTML = '<div class="idvc-modal-background" id="idvc-modal-background">\n <div class="
|
|
4569
|
+
const qrCodeModalHTML = '<div class="idvc-modal-background d-none" id="idvc-modal-background">\n <div class="loading-spinner d-none" id="idvc-loading-spinner">\n <svg viewBox="25 25 50 50" class="circular">\n <circle cx="50" cy="50" r="20" fill="none" class="path"></circle>\n </svg>\n </div>\n <div class="idvc-modal idvc-modal_qr-code" id="idvc-modal">\n <div class="idvc-modal__header-wrap qr-code__header">\n <div class="idvc-modal__close-btn" id="idvc-close-modal-btn">\n <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024"><path fill="currentColor" d="M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"></path></svg>\n </div>\n <div class="idvc-modal__header">\n <h2 class="idvc-modal__header__content idvc-modal__header__content_qr-code">\n Verify Documents by Phone\n </h2>\n </div>\n </div>\n <div class="idvc-modal__body idvc-modal__body_qr-code">\n <div class="idvc-modal__body_process_ready" id="idvc-modal__body_process_ready">\n <h3 class="idvc-modal__body_process_ready-header">Scan the QR Сode below to continue on your mobile device</h3>\n <div class="idvc-modal__body_process_ready__canvas-container">\n <canvas class="idvc-modal__body_process_ready-canvas" id="idvc-modal__body_process_ready-canvas"></canvas>\n </div>\n <div class="idvc-modal__body_process_ready-info qr-code__header">\n <svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M7 0C8.97933 0.052 10.6278 0.736833 11.9455 2.0545C13.2632 3.37217 13.948 5.02067 14 7C13.948 8.97933 13.2632 10.6278 11.9455 11.9455C10.6278 13.2632 8.97933 13.948 7 14C5.02067 13.948 3.37217 13.2632 2.0545 11.9455C0.736833 10.6278 0.052 8.97933 0 7C0.052 5.02067 0.736833 3.37217 2.0545 2.0545C3.37217 0.736833 5.02067 0.052 7 0ZM7 3C6.729 3 6.505 3.099 6.328 3.297C6.151 3.495 6.07283 3.72933 6.0935 4L6.453 8C6.474 8.146 6.53383 8.26317 6.6325 8.3515C6.73117 8.43983 6.8535 8.48417 6.9995 8.4845C7.1455 8.48483 7.26783 8.4405 7.3665 8.3515C7.46517 8.2625 7.525 8.14533 7.546 8L7.9055 4C7.9265 3.729 7.84833 3.49467 7.671 3.297C7.49367 3.09933 7.26967 3.00033 6.999 3H7ZM7 11C7.22933 10.9897 7.4195 10.9115 7.5705 10.7655C7.7215 10.6195 7.797 10.432 7.797 10.203C7.797 9.974 7.7215 9.78383 7.5705 9.6325C7.4195 9.48117 7.22933 9.40567 7 9.406C6.77067 9.40633 6.5805 9.48183 6.4295 9.6325C6.2785 9.78317 6.203 9.97333 6.203 10.203C6.203 10.4327 6.2785 10.6202 6.4295 10.7655C6.5805 10.9108 6.77067 10.989 7 11Z" fill="#F7BA2A"/>\n </svg>\n <span class="idvc-modal__body_process_ready-info__text">Any images you have uploaded will be lost if you scan the QR code and continue the process on your mobile device</span>\n </div>\n </div>\n\n <div class="idvc-modal__body_process_validating d-none" id="idvc-modal__body_process_validating">\n <div class="loading-spinner el-loading-spinner_qr-code" id="idvc-validating-spinner">\n <svg viewBox="25 25 50 50" class="circular">\n <circle cx="50" cy="50" r="20" fill="none" class="path"></circle>\n </svg>\n <span class="idvc-modal__body_process_validating-info__text">The verification process is currently being completed using a mobile device ...</span>\n </div>\n </div>\n\n <div class="idvc-modal__body_process_done d-none" id="result-success">\n <div class="idvc-modal__body_process_done-container">\n <svg\n width="64"\n height="64"\n viewBox="0 0 64 64"\n fill="none"\n xmlns="http://www.w3.org/2000/svg">\n <path d="M31.5 0.5C40.407 0.734 47.8253 3.81575 53.7548 9.74525C59.6842 15.6748 62.766 23.093 63 32C62.766 40.907 59.6842 48.3253 53.7548 54.2548C47.8253 60.1842 40.407 63.266 31.5 63.5C22.593 63.266 15.1748 60.1842 9.24525 54.2548C3.31575 48.3253 0.234 40.907 0 32C0.234 23.093 3.31575 15.6748 9.24525 9.74525C15.1748 3.81575 22.593 0.734 31.5 0.5ZM27.5625 38.1875L20.601 31.226C20.0385 30.71 19.3942 30.452 18.6682 30.452C17.9422 30.452 17.3092 30.7212 16.7693 31.2597C16.2292 31.7982 15.96 32.4193 15.9615 33.1227C15.963 33.8263 16.221 34.4593 16.7355 35.0218L25.6657 43.952C26.1817 44.468 26.8148 44.726 27.5648 44.726C28.3148 44.726 28.9478 44.468 29.4638 43.952L47.9565 25.4593C48.66 24.7558 48.8828 23.9 48.6247 22.892C48.3667 21.884 47.7337 21.251 46.7257 20.993C45.7178 20.735 44.862 20.9578 44.1585 21.6612L27.5625 38.1875Z" fill="#5FCA71"/>\n </svg>\n <div class="idvc-modal__body_process_done__text" id="result__text-success">\n Success\n </div>\n </div>\n </div>\n\n <div class="idvc-modal__body_process_done d-none" id="result-error">\n <div class="idvc-modal__body_process_done-container">\n <svg\n xmlns="http://www.w3.org/2000/svg"\n width="64"\n height="64"\n fill="#ff0000"\n viewBox="0 0 512 512">\n <path d="M502.876 379.713l-189.486-316.329c-6.088-9.895-14.349-17.903-24.154-23.52l-0.329-0.174c-20.048-11.267-45.677-11.292-65.788 0.022-10.123 5.785-18.372 13.786-24.282 23.381l-0.167 0.291c-0.022 0.045-0.042 0.066-0.064 0.109l-189.619 316.546c-18.512 32.098-7.501 73.127 24.596 91.642 9.476 5.56 20.852 8.88 32.997 8.972h379.12c37.046-0.406 66.736-30.765 66.347-67.804-0.137-12.231-3.526-23.642-9.34-33.446l0.171 0.31zM233.656 189.931c0.138-12.246 10.097-22.12 22.363-22.12s22.225 9.874 22.363 22.107v89.466c0 0.002 0 0.003 0 0.005 0 12.347-10.010 22.356-22.356 22.356-0.002 0-0.004 0-0.005 0h0c-0.002 0-0.005 0-0.008 0-12.345 0-22.352-10.005-22.357-22.348v-0zM278.413 368.985c0 12.368-10.026 22.394-22.394 22.394s-22.394-10.026-22.394-22.394c0-12.367 10.024-22.392 22.391-22.394v0c0.001 0 0.002 0 0.002 0 12.368 0 22.394 10.026 22.394 22.394v0z"/>\n </svg>\n <div class="idvc-modal__body_process_done__text" id="result__text-error">\n Validation Failed\n </div>\n </div>\n </div>\n </div>\n <div class="idvc-modal__footer_qr-code">\n <button type="button" class="btn btn--primary" id="idvc-qr-code-terminate-process-btn">\n <span>Stop the mobile validation process</span>\n </button>\n </div>\n </div>\n</div>\n';
|
|
4549
4570
|
class QRCodeModal extends Modal {
|
|
4550
4571
|
constructor(mountEl, applicantId, domainApi, embeddedAppConnectionId, qrCodeLinkOrigin, state = QRCodeModalState.READY) {
|
|
4551
4572
|
super(mountEl);
|
|
@@ -4605,7 +4626,7 @@ class QRCodeModal extends Modal {
|
|
|
4605
4626
|
async generateQR(url) {
|
|
4606
4627
|
try {
|
|
4607
4628
|
await QRCode.toCanvas(this.qrCodeCanvas, url, {
|
|
4608
|
-
width:
|
|
4629
|
+
width: 180
|
|
4609
4630
|
});
|
|
4610
4631
|
} catch (e) {
|
|
4611
4632
|
throw new Error(`generate qr code error: ${e}`);
|
|
@@ -4628,7 +4649,7 @@ const checkIfMobile = () => {
|
|
|
4628
4649
|
const { userAgent } = navigator;
|
|
4629
4650
|
return browserRE.test(userAgent) || browserREAlt.test(userAgent.slice(0, 4)) || isiOS();
|
|
4630
4651
|
};
|
|
4631
|
-
const version = "2.10.
|
|
4652
|
+
const version = "2.10.3";
|
|
4632
4653
|
const packageJson = {
|
|
4633
4654
|
version
|
|
4634
4655
|
};
|
|
@@ -4648,7 +4669,7 @@ class Wrapper {
|
|
|
4648
4669
|
return getQueryParam("qrCode") === "true";
|
|
4649
4670
|
}
|
|
4650
4671
|
get QRCodeIsAvailable() {
|
|
4651
|
-
return !this.isEmbeddedFromQR && !this.config.demoMode && this.
|
|
4672
|
+
return !this.isEmbeddedFromQR && !this.config.demoMode && this.configs.showQrCodeConfig && !checkIfMobile();
|
|
4652
4673
|
}
|
|
4653
4674
|
updateConfig(newConfig) {
|
|
4654
4675
|
this.configs.libConfig = this.prepareConfig(newConfig);
|
|
@@ -4675,6 +4696,10 @@ class Wrapper {
|
|
|
4675
4696
|
this.onError(e);
|
|
4676
4697
|
}
|
|
4677
4698
|
}
|
|
4699
|
+
retryInit() {
|
|
4700
|
+
this.validationModal.modalContainer.remove();
|
|
4701
|
+
this.beforeMount(this.config);
|
|
4702
|
+
}
|
|
4678
4703
|
async restart() {
|
|
4679
4704
|
if (this.lib.initialized) {
|
|
4680
4705
|
this.lib.restart();
|
|
@@ -5029,7 +5054,7 @@ class Wrapper {
|
|
|
5029
5054
|
this.configs.onValidate(this.validationOutput);
|
|
5030
5055
|
}
|
|
5031
5056
|
onError(e) {
|
|
5032
|
-
var _a, _b;
|
|
5057
|
+
var _a, _b, _c;
|
|
5033
5058
|
if ((_a = this.configs) == null ? void 0 : _a.onError) {
|
|
5034
5059
|
this.configs.onError(e);
|
|
5035
5060
|
const buttons = {
|
|
@@ -5043,11 +5068,15 @@ class Wrapper {
|
|
|
5043
5068
|
buttons.tryAgain = true;
|
|
5044
5069
|
}
|
|
5045
5070
|
this.validationModal.buttons = buttons;
|
|
5071
|
+
if (buttons.tryAgain && !((_b = this.lib) == null ? void 0 : _b.initialized)) {
|
|
5072
|
+
this.validationModal.onTryAgain = () => this.retryInit();
|
|
5073
|
+
}
|
|
5046
5074
|
this.validationModal.showSpinner(false);
|
|
5047
5075
|
if (this.form) {
|
|
5048
5076
|
this.form.form.remove();
|
|
5049
5077
|
}
|
|
5050
|
-
(
|
|
5078
|
+
(_c = document.getElementById(this.configs.mountElement)) == null ? void 0 : _c.classList.remove("hidden-element");
|
|
5079
|
+
this.validationModal.prepareBackgroundStyles();
|
|
5051
5080
|
this.validationModal.show();
|
|
5052
5081
|
}
|
|
5053
5082
|
return e;
|