@gataca/qr 2.0.12 → 2.0.13
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/cjs/gataca-qr_2.cjs.entry.js +47 -16
- package/dist/cjs/gataca-qrws.cjs.entry.js +47 -16
- package/dist/cjs/gatacaqr.cjs.js +1 -1
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{utils-65e14ed0.js → utils-ef28b844.js} +1 -1
- package/dist/collection/components/gataca-qr/components/readQR/ReadQR.js +11 -0
- package/dist/collection/components/gataca-qr/components/readQR/components/AnimatedLoader.js +4 -0
- package/dist/collection/components/gataca-qr/components/retryButton/RetryButton.js +2 -3
- package/dist/collection/components/gataca-qr/gataca-qr.css +125 -2
- package/dist/collection/components/gataca-qr/gataca-qr.js +21 -16
- package/dist/collection/components/gataca-qrws/components/readQR/ReadQR.js +11 -0
- package/dist/collection/components/gataca-qrws/components/readQR/components/AnimatedLoader.js +4 -0
- package/dist/collection/components/gataca-qrws/components/retryButton/RetryButton.js +2 -3
- package/dist/collection/components/gataca-qrws/gataca-qrws.css +126 -2
- package/dist/collection/components/gataca-qrws/gataca-qrws.js +21 -16
- package/dist/collection/utils/utils.js +1 -1
- package/dist/components/gat-icon-alert.js +1 -1
- package/dist/components/gataca-qr2.js +48 -17
- package/dist/components/gataca-qrws2.js +48 -17
- package/dist/esm/gataca-qr_2.entry.js +47 -16
- package/dist/esm/gataca-qrws.entry.js +47 -16
- package/dist/esm/gatacaqr.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{utils-1b406699.js → utils-63e7a33b.js} +1 -1
- package/dist/gatacaqr/gatacaqr.esm.js +1 -1
- package/dist/gatacaqr/index.esm.js +1 -1
- package/dist/gatacaqr/{p-bceac8fa.js → p-2cd7b062.js} +1 -1
- package/dist/gatacaqr/p-64740141.entry.js +1 -0
- package/dist/gatacaqr/p-91a49030.entry.js +1 -0
- package/dist/types/components/gataca-qr/components/readQR/ReadQR.d.ts +13 -0
- package/dist/types/components/gataca-qr/components/readQR/components/AnimatedLoader.d.ts +2 -0
- package/dist/types/components/gataca-qr/components/retryButton/RetryButton.d.ts +0 -4
- package/dist/types/components/gataca-qr/gataca-qr.d.ts +6 -5
- package/dist/types/components/gataca-qrws/components/readQR/ReadQR.d.ts +13 -0
- package/dist/types/components/gataca-qrws/components/readQR/components/AnimatedLoader.d.ts +2 -0
- package/dist/types/components/gataca-qrws/components/retryButton/RetryButton.d.ts +0 -4
- package/dist/types/components/gataca-qrws/gataca-qrws.d.ts +6 -5
- package/dist/types/components.d.ts +24 -24
- package/dist/types/utils/utils.d.ts +1 -1
- package/package.json +1 -1
- package/dist/gatacaqr/p-5fe70d53.entry.js +0 -1
- package/dist/gatacaqr/p-8b58f3b3.entry.js +0 -1
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-f214ab7a.js');
|
|
6
6
|
const gatIconAlert = require('./gat-icon-alert-0ad19b26.js');
|
|
7
7
|
const qrCodeStyling = require('./qr-code-styling-412bbc7a.js');
|
|
8
|
-
const utils = require('./utils-
|
|
8
|
+
const utils = require('./utils-ef28b844.js');
|
|
9
9
|
|
|
10
10
|
const GatacaQRDisplay = class {
|
|
11
11
|
constructor(hostRef) {
|
|
@@ -60,19 +60,17 @@ const Success = (props) => {
|
|
|
60
60
|
|
|
61
61
|
const RetryButton = (props) => {
|
|
62
62
|
var _a;
|
|
63
|
-
const { errorMessage, modalWidth, clickInsideBoxLabel, refreshQrLabel, scanQrLabel, waitingStartSessionLabel, display, renderRetryQR,
|
|
63
|
+
const { errorMessage, modalWidth, clickInsideBoxLabel, refreshQrLabel, scanQrLabel, waitingStartSessionLabel, display, renderRetryQR, } = props;
|
|
64
64
|
return (index.h("div", { class: "reload", style: {
|
|
65
65
|
width: (modalWidth - 48).toString() + "px",
|
|
66
66
|
height: modalWidth ? ((_a = (modalWidth - 48)) === null || _a === void 0 ? void 0 : _a.toString()) + "px" : "",
|
|
67
67
|
} },
|
|
68
68
|
index.h("div", { id: "notify", onClick: () => display() },
|
|
69
69
|
index.h("img", { src: gatIconAlert.gatIconRefreshSvg, height: 24, width: 24 }),
|
|
70
|
-
|
|
71
|
-
readedQrMessages.title,
|
|
72
|
-
" ")) : (index.h("p", { class: "notify-text" },
|
|
70
|
+
index.h("p", { class: "notify-text" },
|
|
73
71
|
clickInsideBoxLabel,
|
|
74
|
-
" ")
|
|
75
|
-
errorMessage ? (index.h("p", { class: "notify-text bold" }, refreshQrLabel)) :
|
|
72
|
+
" "),
|
|
73
|
+
errorMessage ? (index.h("p", { class: "notify-text bold" }, refreshQrLabel)) : (index.h("p", { class: "notify-text bold" }, scanQrLabel)),
|
|
76
74
|
errorMessage && (index.h("div", { class: "alert", style: {
|
|
77
75
|
width: (modalWidth - 48).toString() + "px",
|
|
78
76
|
} },
|
|
@@ -81,12 +79,41 @@ const RetryButton = (props) => {
|
|
|
81
79
|
index.h("div", { id: "qrwait" }, renderRetryQR(waitingStartSessionLabel))));
|
|
82
80
|
};
|
|
83
81
|
|
|
82
|
+
const AnimatedLoader = () => {
|
|
83
|
+
return (index.h("div", { class: "containerLoader" },
|
|
84
|
+
index.h("div", { class: "loader" },
|
|
85
|
+
index.h("div", { class: "loader__item loader__item__1" }),
|
|
86
|
+
index.h("div", { class: "loader__item loader__item__2" }),
|
|
87
|
+
index.h("div", { class: "loader__item loader__item__3" }),
|
|
88
|
+
index.h("div", { class: "loader__item loader__item__4" }),
|
|
89
|
+
index.h("div", { class: "loader__item loader__item__5" }),
|
|
90
|
+
index.h("div", { class: "loader__item loader__item__6" }),
|
|
91
|
+
index.h("div", { class: "loader__item loader__item__7" }),
|
|
92
|
+
index.h("div", { class: "loader__item loader__item__8" }))));
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
const ReadQR = (props) => {
|
|
96
|
+
var _a;
|
|
97
|
+
const { modalWidth, readQrMessages, renderQR, url, sizeQR } = props;
|
|
98
|
+
return (index.h("div", { class: "blured", style: {
|
|
99
|
+
width: (modalWidth - 48).toString() + "px",
|
|
100
|
+
height: modalWidth ? ((_a = (modalWidth - 48)) === null || _a === void 0 ? void 0 : _a.toString()) + "px" : "",
|
|
101
|
+
} },
|
|
102
|
+
index.h("div", { id: "notify" },
|
|
103
|
+
index.h(AnimatedLoader, null),
|
|
104
|
+
index.h("p", { class: "notify-text" }, readQrMessages === null || readQrMessages === void 0 ? void 0 :
|
|
105
|
+
readQrMessages.title,
|
|
106
|
+
" "),
|
|
107
|
+
index.h("p", { class: "notify-text bold" }, readQrMessages === null || readQrMessages === void 0 ? void 0 : readQrMessages.description)),
|
|
108
|
+
index.h("div", { id: "qrwait" }, renderQR(url, false, sizeQR))));
|
|
109
|
+
};
|
|
110
|
+
|
|
84
111
|
const QR = (props) => {
|
|
85
112
|
const { value, useLogo, logoSrc, size } = props;
|
|
86
113
|
return (index.h("gataca-qrdisplay", { qrData: value, rounded: true, size: size, "logo-size": useLogo ? 0.33 : 0, "logo-src": logoSrc }));
|
|
87
114
|
};
|
|
88
115
|
|
|
89
|
-
const gatacaQrCss = "@import url(\"https://fonts.googleapis.com/css2?family=Ubuntu:wght@100;300;400;500;600;700&display=swap\"); @import url(\"https://fonts.googleapis.com/css2?family=Poppins:wght@100;300;400;500;600;700&display=swap\"); @import url(\"https://fonts.googleapis.com/css2?family=Work+Sans:wght@300;400&display=swap\"); html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:\"\";content:none}table{border-collapse:collapse;border-spacing:0}.img-fluid{height:auto;max-width:50%}img{margin-left:auto;margin-right:auto}.brandSection{padding-top:5px;display:flex;align-items:center}.brandSection .gatacaImgSmall{height:13px;width:13px;margin:0;margin-right:10px}.popUpContainer .large-modal{width:300px;min-height:350px}.popUpContainer .modal-window{position:relative;border-radius:6px;overflow:hidden;color:rgba(24, 27, 94, 0.8);box-shadow:0px 3px 10px rgba(48, 48, 48, 0.1);display:flex;flex-direction:column;justify-content:space-between;align-items:center;display:flex;z-index:1001;padding:1px;background-color:white;border-radius:12px;-webkit-transition:opacity 0.5s, visibility 0s 0.5s;transition:opacity 0.5s, visibility 0s 0.5s;visibility:hidden;opacity:0}.popUpContainer .modal-window__content{width:100%;height:100%;text-align:left}.popUpContainer .modal-window__content .hidenText{display:none}.popUpContainer .modal-window .modalText{font-family:\"Ubuntu\", \"Work Sans\", \"Helvetica Neue\", sans-serif;font-size:20px;font-style:normal;font-weight:700;line-height:24px;margin-top:10px;letter-spacing:1px}.popUpContainer .modal-window .qrTitleContainer{padding:14px 24px;padding-bottom:0px}.popUpContainer .modal-window .qrTitle{font-size:20px;font-weight:600;line-height:23.5px}.popUpContainer .modal-window .qrDescription{font-family:\"Poppins\", \"Ubuntu\", \"Work Sans\", \"Helvetica Neue\", sans-serif;font-size:14px;font-style:normal;font-weight:400;line-height:16px;color:#707074}.popUpContainer .modal-window .bold{font-weight:
|
|
116
|
+
const gatacaQrCss = "@import url(\"https://fonts.googleapis.com/css2?family=Ubuntu:wght@100;300;400;500;600;700&display=swap\"); @import url(\"https://fonts.googleapis.com/css2?family=Poppins:wght@100;300;400;500;600;700&display=swap\"); @import url(\"https://fonts.googleapis.com/css2?family=Work+Sans:wght@300;400&display=swap\"); html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:\"\";content:none}table{border-collapse:collapse;border-spacing:0}.img-fluid{height:auto;max-width:50%}img{margin-left:auto;margin-right:auto}.brandSection{padding-top:5px;display:flex;align-items:center}.brandSection .gatacaImgSmall{height:13px;width:13px;margin:0;margin-right:10px}.popUpContainer .large-modal{width:300px;min-height:350px}.popUpContainer .modal-window{position:relative;border-radius:6px;overflow:hidden;color:rgba(24, 27, 94, 0.8);box-shadow:0px 3px 10px rgba(48, 48, 48, 0.1);display:flex;flex-direction:column;justify-content:space-between;align-items:center;display:flex;z-index:1001;padding:1px;background-color:white;border-radius:12px;-webkit-transition:opacity 0.5s, visibility 0s 0.5s;transition:opacity 0.5s, visibility 0s 0.5s;visibility:hidden;opacity:0}.popUpContainer .modal-window__content{width:100%;height:100%;text-align:left}.popUpContainer .modal-window__content .hidenText{display:none}.popUpContainer .modal-window .modalText{font-family:\"Ubuntu\", \"Work Sans\", \"Helvetica Neue\", sans-serif;font-size:20px;font-style:normal;font-weight:700;line-height:24px;margin-top:10px;letter-spacing:1px}.popUpContainer .modal-window .qrTitleContainer{padding:14px 24px;padding-bottom:0px}.popUpContainer .modal-window .qrTitle{font-size:20px;font-weight:600;line-height:23.5px}.popUpContainer .modal-window .qrDescription{font-family:\"Poppins\", \"Ubuntu\", \"Work Sans\", \"Helvetica Neue\", sans-serif;font-size:14px;font-style:normal;font-weight:400;line-height:16px;color:#707074}.popUpContainer .modal-window .bold{font-weight:700}.popUpContainer .modal-window .qrBrand{margin-top:4px;font-size:14px;font-weight:400;line-height:16.5px;display:flex;align-items:center}.popUpContainer .modal-window .qrBrand img{margin-left:5px;height:12px}.popUpContainer .modal-window .qr-section{width:252px;height:252px}.popUpContainer .noBoxShadow{box-shadow:none}.popUpContainer .is-visible{opacity:1;visibility:visible}.is-transparent{opacity:0}.success{display:flex;height:300px;flex-direction:column;justify-content:center;align-items:center;padding:0px}.success>img{padding-bottom:12px}.success>.successMsg{line-height:23.5px;color:var(--neutral-1000, #1e1e20);text-align:center;font-family:\"Ubuntu\", \"Work Sans\", \"Helvetica Neue\", sans-serif;font-size:20px;font-style:normal;font-weight:700;line-height:24px}.reload,.blured{height:252px;width:252px;border:1px dashed #a1a1a1;border-radius:12px;position:relative;top:24px;margin:0 24px 24px;display:flex;overflow:hidden;justify-content:center;align-items:center}#qrwait{display:flex;justify-content:center}#qrwait,#notify{width:100%;height:100%;top:0;left:0;border-radius:20px}#notify{z-index:10;position:absolute;justify-self:center;justify-items:center;justify-content:center;align-items:center;align-content:center;display:flex;flex-direction:column;box-sizing:border-box;padding:20px;background:rgba(255, 255, 255, 0.95)}#notify>img{padding-bottom:12px}.alert{display:flex;flex-direction:row;justify-content:start;width:252px;position:absolute;bottom:0px;border:1px solid #ee888c;background:#ffdedf;border-radius:11px;box-sizing:border-box;padding:12px;align-items:center;gap:12px}.alert>img{margin:0}.alert>p{font-family:\"Poppins\", \"Ubuntu\", \"Work Sans\", \"Helvetica Neue\", sans-serif;font-size:14px;font-style:normal;font-weight:400;margin-top:0;line-height:16px;color:#1e1e20}.notify-text{font-family:\"Poppins\", \"Ubuntu\", \"Work Sans\", \"Helvetica Neue\", sans-serif;font-size:14px;font-style:normal;font-weight:400;line-height:16px;color:#707074;text-align:center}.containerLoader{display:flex;justify-content:center;align-items:center;width:30px;height:30px;margin-bottom:12px}.loader{position:relative;margin-left:0 !important}.loader__item{position:absolute;width:9.68px;height:4px;background:transparent;border-radius:2px}.loader__item__1{transform:translate(2.5846212025px, 5.4246212025px) rotate(45deg);-webkit-animation:translate(2.5846212025px, 5.4246212025px) rotate(45deg);-moz-animation:translate(2.5846212025px, 5.4246212025px) rotate(45deg);-o-animation:translate(2.5846212025px, 5.4246212025px) rotate(45deg);animation:blink 0.8333333333s linear 0.1041666667s infinite;-webkit-animation:blink 0.8333333333s linear 0.1041666667s infinite;-moz-animation:blink 0.8333333333s linear 0.1041666667s infinite;-o-animation:blink 0.8333333333s linear 0.1041666667s infinite}.loader__item__2{transform:translate(-4.84px, 8.5px) rotate(90deg);-webkit-animation:translate(-4.84px, 8.5px) rotate(90deg);-moz-animation:translate(-4.84px, 8.5px) rotate(90deg);-o-animation:translate(-4.84px, 8.5px) rotate(90deg);animation:blink 0.8333333333s linear 0.2083333333s infinite;-webkit-animation:blink 0.8333333333s linear 0.2083333333s infinite;-moz-animation:blink 0.8333333333s linear 0.2083333333s infinite;-o-animation:blink 0.8333333333s linear 0.2083333333s infinite}.loader__item__3{transform:translate(-12.2646212025px, 5.4246212025px) rotate(135deg);-webkit-animation:translate(-12.2646212025px, 5.4246212025px) rotate(135deg);-moz-animation:translate(-12.2646212025px, 5.4246212025px) rotate(135deg);-o-animation:translate(-12.2646212025px, 5.4246212025px) rotate(135deg);animation:blink 0.8333333333s linear 0.3125s infinite;-webkit-animation:blink 0.8333333333s linear 0.3125s infinite;-moz-animation:blink 0.8333333333s linear 0.3125s infinite;-o-animation:blink 0.8333333333s linear 0.3125s infinite}.loader__item__4{transform:translate(-15.3399999992px, -1.9999999999px) rotate(180deg);-webkit-animation:translate(-15.3399999992px, -1.9999999999px) rotate(180deg);-moz-animation:translate(-15.3399999992px, -1.9999999999px) rotate(180deg);-o-animation:translate(-15.3399999992px, -1.9999999999px) rotate(180deg);animation:blink 0.8333333333s linear 0.4166666667s infinite;-webkit-animation:blink 0.8333333333s linear 0.4166666667s infinite;-moz-animation:blink 0.8333333333s linear 0.4166666667s infinite;-o-animation:blink 0.8333333333s linear 0.4166666667s infinite}.loader__item__5{transform:translate(-12.2646210959px, -9.4246211842px) rotate(225deg);-webkit-animation:translate(-12.2646210959px, -9.4246211842px) rotate(225deg);-moz-animation:translate(-12.2646210959px, -9.4246211842px) rotate(225deg);-o-animation:translate(-12.2646210959px, -9.4246211842px) rotate(225deg);animation:blink 0.8333333333s linear 0.5208333333s infinite;-webkit-animation:blink 0.8333333333s linear 0.5208333333s infinite;-moz-animation:blink 0.8333333333s linear 0.5208333333s infinite;-o-animation:blink 0.8333333333s linear 0.5208333333s infinite}.loader__item__6{transform:translate(-4.8399941857px, -12.499998805px) rotate(270deg);-webkit-animation:translate(-4.8399941857px, -12.499998805px) rotate(270deg);-moz-animation:translate(-4.8399941857px, -12.499998805px) rotate(270deg);-o-animation:translate(-4.8399941857px, -12.499998805px) rotate(270deg);animation:blink 0.8333333333s linear 0.625s infinite;-webkit-animation:blink 0.8333333333s linear 0.625s infinite;-moz-animation:blink 0.8333333333s linear 0.625s infinite;-o-animation:blink 0.8333333333s linear 0.625s infinite}.loader__item__7{transform:translate(2.5847915061px, -9.4245803212px) rotate(315deg);-webkit-animation:translate(2.5847915061px, -9.4245803212px) rotate(315deg);-moz-animation:translate(2.5847915061px, -9.4245803212px) rotate(315deg);-o-animation:translate(2.5847915061px, -9.4245803212px) rotate(315deg);animation:blink 0.8333333333s linear 0.7291666667s infinite;-webkit-animation:blink 0.8333333333s linear 0.7291666667s infinite;-moz-animation:blink 0.8333333333s linear 0.7291666667s infinite;-o-animation:blink 0.8333333333s linear 0.7291666667s infinite}.loader__item__8{transform:translate(5.6631628524px, -1.99913122px) rotate(360deg);-webkit-animation:translate(5.6631628524px, -1.99913122px) rotate(360deg);-moz-animation:translate(5.6631628524px, -1.99913122px) rotate(360deg);-o-animation:translate(5.6631628524px, -1.99913122px) rotate(360deg);animation:blink 0.8333333333s linear 0.8333333333s infinite;-webkit-animation:blink 0.8333333333s linear 0.8333333333s infinite;-moz-animation:blink 0.8333333333s linear 0.8333333333s infinite;-o-animation:blink 0.8333333333s linear 0.8333333333s infinite}.loader__item__8{max-width:8.5px}@keyframes blink{0%{background:#4745B7}100%{background:#CCCBF8}}@keyframes rotate{0%{transform:rotate(0deg)}100%{background:rotate(360deg)}}";
|
|
90
117
|
|
|
91
118
|
const DEEP_LINK_PREFIX = "https://gataca.page.link/?apn=com.gatacaapp&ibi=com.gataca.wallet&link=";
|
|
92
119
|
//Default values
|
|
@@ -98,7 +125,7 @@ const FUNCTION_ROLES = {
|
|
|
98
125
|
certify: "credential",
|
|
99
126
|
};
|
|
100
127
|
const GatacaQR = class {
|
|
101
|
-
constructor(hostRef) { index.registerInstance(this, hostRef); this.gatacaLoginCompleted = index.createEvent(this, "gatacaLoginCompleted", 7); this.gatacaLoginFailed = index.createEvent(this, "gatacaLoginFailed", 7); this.checkStatus = undefined; this.createSession = undefined; this.successCallback = undefined; this.errorCallback = undefined; this.qrRole = undefined; this.callbackServer = undefined; this.autostart = true; this.autorefresh = false; this.v2 = false; this.qrModalTitle = "Quick Access"; this.modalTitleColor = "#4745B7"; this.qrModalDescription = "Sign up or sign in by scanning the QR Code with the Gataca Wallet"; this.hideModalTexts = false; this.hideModalBoxShadow = false; this.hideBrandTitle = false; this.logoSize = 0; this.logoSrc = gatIconAlert.logoGatacaSvg; this.qrSize = 300; this.modalWidth = 300; this.modalHeight = undefined; this.qrCodeExpiredLabel = "QR Code expired"; this.credentialsNotValidatedLabel = "User credentials not validated"; this.clickInsideBoxLabel = "Click inside the box to"; this.refreshQrLabel = "Refresh QR Code"; this.scanQrLabel = "Scan QR Code"; this.userNotScanInTimeErrorLabel = "User did not scan the QR in the allowed time"; this.credsNotValidatedErrorLabel = "Provided user credentials couldn't be validated"; this.failedLoginErrorLabel = "No successful login"; this.successLoginLabel = "Successful Connection!"; this.byBrandLabel = "by Gataca"; this.waitingStartSessionLabel = "waiting to start a session"; this.
|
|
128
|
+
constructor(hostRef) { index.registerInstance(this, hostRef); this.gatacaLoginCompleted = index.createEvent(this, "gatacaLoginCompleted", 7); this.gatacaLoginFailed = index.createEvent(this, "gatacaLoginFailed", 7); this.checkStatus = undefined; this.createSession = undefined; this.successCallback = undefined; this.errorCallback = undefined; this.qrRole = undefined; this.callbackServer = undefined; this.autostart = true; this.autorefresh = false; this.v2 = false; this.qrModalTitle = "Quick Access"; this.modalTitleColor = "#4745B7"; this.qrModalDescription = "Sign up or sign in by scanning the QR Code with the Gataca Wallet"; this.hideModalTexts = false; this.hideModalBoxShadow = false; this.hideBrandTitle = false; this.logoSize = 0; this.logoSrc = gatIconAlert.logoGatacaSvg; this.qrSize = 300; this.modalWidth = 300; this.modalHeight = undefined; this.qrCodeExpiredLabel = "QR Code expired"; this.credentialsNotValidatedLabel = "User credentials not validated"; this.clickInsideBoxLabel = "Click inside the box to"; this.refreshQrLabel = "Refresh QR Code"; this.scanQrLabel = "Scan QR Code"; this.userNotScanInTimeErrorLabel = "User did not scan the QR in the allowed time"; this.credsNotValidatedErrorLabel = "Provided user credentials couldn't be validated"; this.failedLoginErrorLabel = "No successful login"; this.successLoginLabel = "Successful Connection!"; this.byBrandLabel = "by Gataca"; this.waitingStartSessionLabel = "waiting to start a session"; this.readQrTitle = "Processing..."; this.readQrDescription = "Please wait a moment"; this.hideQrModalDescription = false; this.sessionTimeout = DEFAULT_SESSION_TIMEOUT; this.pollingFrequency = DEFAULT_POLLING_FREQ; this.dynamicLink = true; this.sessionId = undefined; this.authenticationRequest = undefined; this.sessionData = undefined; this.result = utils.RESULT_STATUS.NOT_STARTED; }
|
|
102
129
|
disconnectedCallback() {
|
|
103
130
|
this.stop();
|
|
104
131
|
}
|
|
@@ -146,7 +173,7 @@ const GatacaQR = class {
|
|
|
146
173
|
*/
|
|
147
174
|
async stop() {
|
|
148
175
|
this.clean();
|
|
149
|
-
if (this.result === utils.RESULT_STATUS.ONGOING) {
|
|
176
|
+
if (this.result === utils.RESULT_STATUS.ONGOING || utils.RESULT_STATUS.READ) {
|
|
150
177
|
this.result = utils.RESULT_STATUS.NOT_STARTED;
|
|
151
178
|
}
|
|
152
179
|
}
|
|
@@ -206,6 +233,7 @@ const GatacaQR = class {
|
|
|
206
233
|
resolve(data);
|
|
207
234
|
break;
|
|
208
235
|
case utils.RESULT_STATUS.ONGOING:
|
|
236
|
+
case utils.RESULT_STATUS.READ:
|
|
209
237
|
if (component.sessionTimeout > 0 && new Date().getTime() < endTime) {
|
|
210
238
|
setTimeout(checkCondition, interval, resolve, reject);
|
|
211
239
|
}
|
|
@@ -232,18 +260,21 @@ const GatacaQR = class {
|
|
|
232
260
|
return this.renderRetryButton(this.credentialsNotValidatedLabel);
|
|
233
261
|
case utils.RESULT_STATUS.SUCCESS:
|
|
234
262
|
return this.renderSuccess();
|
|
235
|
-
case utils.RESULT_STATUS.
|
|
236
|
-
return this.
|
|
237
|
-
title: this === null || this === void 0 ? void 0 : this.
|
|
238
|
-
description: this === null || this === void 0 ? void 0 : this.
|
|
263
|
+
case utils.RESULT_STATUS.READ:
|
|
264
|
+
return this.renderReadQR({
|
|
265
|
+
title: this === null || this === void 0 ? void 0 : this.readQrTitle,
|
|
266
|
+
description: this === null || this === void 0 ? void 0 : this.readQrDescription,
|
|
239
267
|
});
|
|
240
268
|
}
|
|
241
269
|
}
|
|
242
270
|
renderSuccess() {
|
|
243
271
|
return (index.h(Success, { modalHeight: this === null || this === void 0 ? void 0 : this.modalHeight, successLoginLabel: this === null || this === void 0 ? void 0 : this.successLoginLabel }));
|
|
244
272
|
}
|
|
245
|
-
renderRetryButton(errorMessage
|
|
246
|
-
return (index.h(RetryButton, { errorMessage: errorMessage, modalWidth: this === null || this === void 0 ? void 0 : this.modalWidth, clickInsideBoxLabel: this === null || this === void 0 ? void 0 : this.clickInsideBoxLabel, refreshQrLabel: this === null || this === void 0 ? void 0 : this.refreshQrLabel, scanQrLabel: this === null || this === void 0 ? void 0 : this.scanQrLabel, waitingStartSessionLabel: this === null || this === void 0 ? void 0 : this.waitingStartSessionLabel, display: this.display.bind(this), renderRetryQR: this.renderRetryQR.bind(this)
|
|
273
|
+
renderRetryButton(errorMessage) {
|
|
274
|
+
return (index.h(RetryButton, { errorMessage: errorMessage, modalWidth: this === null || this === void 0 ? void 0 : this.modalWidth, clickInsideBoxLabel: this === null || this === void 0 ? void 0 : this.clickInsideBoxLabel, refreshQrLabel: this === null || this === void 0 ? void 0 : this.refreshQrLabel, scanQrLabel: this === null || this === void 0 ? void 0 : this.scanQrLabel, waitingStartSessionLabel: this === null || this === void 0 ? void 0 : this.waitingStartSessionLabel, display: this.display.bind(this), renderRetryQR: this.renderRetryQR.bind(this) }));
|
|
275
|
+
}
|
|
276
|
+
renderReadQR(readQrMessages) {
|
|
277
|
+
return (index.h(ReadQR, { modalWidth: this === null || this === void 0 ? void 0 : this.modalWidth, readQrMessages: readQrMessages, url: this.getLink(), sizeQR: (this === null || this === void 0 ? void 0 : this.qrSize) ? (this === null || this === void 0 ? void 0 : this.qrSize) - 50 : undefined, renderQR: this.renderQR.bind(this) }));
|
|
247
278
|
}
|
|
248
279
|
renderQR(value, useLogo) {
|
|
249
280
|
return (index.h(QR, { value: value, useLogo: useLogo, size: (this === null || this === void 0 ? void 0 : this.qrSize) || undefined, logoSrc: this === null || this === void 0 ? void 0 : this.logoSrc }));
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-f214ab7a.js');
|
|
6
6
|
const gatIconAlert = require('./gat-icon-alert-0ad19b26.js');
|
|
7
7
|
require('./qr-code-styling-412bbc7a.js');
|
|
8
|
-
const utils = require('./utils-
|
|
8
|
+
const utils = require('./utils-ef28b844.js');
|
|
9
9
|
|
|
10
10
|
const Success = (props) => {
|
|
11
11
|
const { modalHeight, successLoginLabel } = props;
|
|
@@ -18,19 +18,17 @@ const Success = (props) => {
|
|
|
18
18
|
|
|
19
19
|
const RetryButton = (props) => {
|
|
20
20
|
var _a;
|
|
21
|
-
const { errorMessage, modalWidth, clickInsideBoxLabel, refreshQrLabel, scanQrLabel, waitingStartSessionLabel, display, renderRetryQR,
|
|
21
|
+
const { errorMessage, modalWidth, clickInsideBoxLabel, refreshQrLabel, scanQrLabel, waitingStartSessionLabel, display, renderRetryQR, } = props;
|
|
22
22
|
return (index.h("div", { class: "reload", style: {
|
|
23
23
|
width: (modalWidth - 48).toString() + "px",
|
|
24
24
|
height: modalWidth ? ((_a = (modalWidth - 48)) === null || _a === void 0 ? void 0 : _a.toString()) + "px" : "",
|
|
25
25
|
} },
|
|
26
26
|
index.h("div", { id: "notify", onClick: () => display() },
|
|
27
27
|
index.h("img", { src: gatIconAlert.gatIconRefreshSvg, height: 24, width: 24 }),
|
|
28
|
-
|
|
29
|
-
readedQrMessages.title,
|
|
30
|
-
" ")) : (index.h("p", { class: "notify-text" },
|
|
28
|
+
index.h("p", { class: "notify-text" },
|
|
31
29
|
clickInsideBoxLabel,
|
|
32
|
-
" ")
|
|
33
|
-
errorMessage ? (index.h("p", { class: "notify-text bold" }, refreshQrLabel)) :
|
|
30
|
+
" "),
|
|
31
|
+
errorMessage ? (index.h("p", { class: "notify-text bold" }, refreshQrLabel)) : (index.h("p", { class: "notify-text bold" }, scanQrLabel)),
|
|
34
32
|
errorMessage && (index.h("div", { class: "alert", style: {
|
|
35
33
|
width: (modalWidth - 48).toString() + "px",
|
|
36
34
|
} },
|
|
@@ -44,7 +42,36 @@ const QR = (props) => {
|
|
|
44
42
|
return (index.h("gataca-qrdisplay", { qrData: value, rounded: true, size: size, "logo-size": useLogo ? 0.33 : 0, "logo-src": logoSrc }));
|
|
45
43
|
};
|
|
46
44
|
|
|
47
|
-
const
|
|
45
|
+
const AnimatedLoader = () => {
|
|
46
|
+
return (index.h("div", { class: "containerLoader" },
|
|
47
|
+
index.h("div", { class: "loader" },
|
|
48
|
+
index.h("div", { class: "loader__item loader__item__1" }),
|
|
49
|
+
index.h("div", { class: "loader__item loader__item__2" }),
|
|
50
|
+
index.h("div", { class: "loader__item loader__item__3" }),
|
|
51
|
+
index.h("div", { class: "loader__item loader__item__4" }),
|
|
52
|
+
index.h("div", { class: "loader__item loader__item__5" }),
|
|
53
|
+
index.h("div", { class: "loader__item loader__item__6" }),
|
|
54
|
+
index.h("div", { class: "loader__item loader__item__7" }),
|
|
55
|
+
index.h("div", { class: "loader__item loader__item__8" }))));
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
const ReadQR = (props) => {
|
|
59
|
+
var _a;
|
|
60
|
+
const { modalWidth, readQrMessages, renderQR, url, sizeQR } = props;
|
|
61
|
+
return (index.h("div", { class: "blured", style: {
|
|
62
|
+
width: (modalWidth - 48).toString() + "px",
|
|
63
|
+
height: modalWidth ? ((_a = (modalWidth - 48)) === null || _a === void 0 ? void 0 : _a.toString()) + "px" : "",
|
|
64
|
+
} },
|
|
65
|
+
index.h("div", { id: "notify" },
|
|
66
|
+
index.h(AnimatedLoader, null),
|
|
67
|
+
index.h("p", { class: "notify-text" }, readQrMessages === null || readQrMessages === void 0 ? void 0 :
|
|
68
|
+
readQrMessages.title,
|
|
69
|
+
" "),
|
|
70
|
+
index.h("p", { class: "notify-text bold" }, readQrMessages === null || readQrMessages === void 0 ? void 0 : readQrMessages.description)),
|
|
71
|
+
index.h("div", { id: "qrwait" }, renderQR(url, false, sizeQR))));
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
const gatacaQrwsCss = "@import url(\"https://fonts.googleapis.com/css2?family=Ubuntu:wght@100;300;400;500;600;700&display=swap\"); @import url(\"https://fonts.googleapis.com/css2?family=Poppins:wght@100;300;400;500;600;700&display=swap\"); @import url(\"https://fonts.googleapis.com/css2?family=Work+Sans:wght@300;400&display=swap\"); html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:\"\";content:none}table{border-collapse:collapse;border-spacing:0}.img-fluid{height:auto;max-width:50%}img{margin-left:auto;margin-right:auto}.brandSection{padding-top:5px;display:flex;align-items:center}.brandSection .gatacaImgSmall{height:13px;width:13px;margin:0;margin-right:10px}.popUpContainer .large-modal{width:300px;min-height:350px}.popUpContainer .modal-window{position:relative;border-radius:6px;overflow:hidden;color:rgba(24, 27, 94, 0.8);box-shadow:0px 3px 10px rgba(48, 48, 48, 0.1);display:flex;flex-direction:column;justify-content:space-between;align-items:center;display:flex;z-index:1001;padding:1px;background-color:white;border-radius:12px;-webkit-transition:opacity 0.5s, visibility 0s 0.5s;transition:opacity 0.5s, visibility 0s 0.5s;visibility:hidden;opacity:0}.popUpContainer .modal-window__content{width:100%;height:100%;text-align:left}.popUpContainer .modal-window__content .hidenText{display:none}.popUpContainer .modal-window .modalText{font-family:\"Ubuntu\", \"Work Sans\", \"Helvetica Neue\", sans-serif;font-size:20px;font-style:normal;font-weight:700;line-height:24px;margin-top:10px;letter-spacing:1px}.popUpContainer .modal-window .qrTitleContainer{padding:14px 24px;padding-bottom:0px}.popUpContainer .modal-window .qrTitle{font-size:20px;font-weight:600;line-height:23.5px}.popUpContainer .modal-window .qrDescription{font-family:\"Poppins\", \"Ubuntu\", \"Work Sans\", \"Helvetica Neue\", sans-serif;font-size:14px;font-style:normal;font-weight:400;line-height:16px;color:#707074}.popUpContainer .modal-window .bold{font-weight:700}.popUpContainer .modal-window .qrBrand{margin-top:4px;font-size:14px;font-weight:400;line-height:16.5px;display:flex;align-items:center}.popUpContainer .modal-window .qrBrand img{margin-left:5px;height:12px}.popUpContainer .modal-window .qr-section{width:252px;height:252px}.popUpContainer .noBoxShadow{box-shadow:none}.popUpContainer .is-visible{opacity:1;visibility:visible}.is-transparent{opacity:0}.success{display:flex;height:300px;flex-direction:column;justify-content:center;align-items:center;padding:0px}.success>img{padding-bottom:12px}.success>.successMsg{line-height:23.5px;color:var(--neutral-1000, #1e1e20);text-align:center;font-family:\"Ubuntu\", \"Work Sans\", \"Helvetica Neue\", sans-serif;font-size:20px;font-style:normal;font-weight:700;line-height:24px}.reload,.blured{height:252px;width:252px;border:1px dashed #a1a1a1;border-radius:12px;position:relative;top:24px;margin:0 24px 24px;display:flex;overflow:hidden;justify-content:center;align-items:center}#qrwait{display:flex;justify-content:center}#qrwait,#notify{width:100%;height:100%;top:0;left:0;border-radius:20px}#notify{z-index:10;position:absolute;justify-self:center;justify-items:center;justify-content:center;align-items:center;align-content:center;display:flex;flex-direction:column;box-sizing:border-box;padding:20px;background:rgba(255, 255, 255, 0.95)}#notify>img{padding-bottom:12px}.alert{display:flex;flex-direction:row;justify-content:start;width:252px;position:absolute;bottom:0px;border:1px solid #ee888c;background:#ffdedf;border-radius:11px;box-sizing:border-box;padding:12px;align-items:center;gap:12px}.alert>img{margin:0}.alert>p{font-family:\"Poppins\", \"Ubuntu\", \"Work Sans\", \"Helvetica Neue\", sans-serif;font-size:14px;font-style:normal;font-weight:400;margin-top:0;line-height:16px;color:#1e1e20}.notify-text{font-family:\"Poppins\", \"Ubuntu\", \"Work Sans\", \"Helvetica Neue\", sans-serif;font-size:14px;font-style:normal;font-weight:400;line-height:16px;color:#707074;text-align:center}.containerLoader{display:flex;justify-content:center;align-items:center;width:30px;height:30px;margin-bottom:12px}.loader{position:relative;margin-left:0 !important}.loader__item{position:absolute;width:9.68px;height:4px;background:transparent;border-radius:2px}.loader__item__1{transform:translate(2.5846212025px, 5.4246212025px) rotate(45deg);-webkit-animation:translate(2.5846212025px, 5.4246212025px) rotate(45deg);-moz-animation:translate(2.5846212025px, 5.4246212025px) rotate(45deg);-o-animation:translate(2.5846212025px, 5.4246212025px) rotate(45deg);animation:blink 0.8333333333s linear 0.1041666667s infinite;-webkit-animation:blink 0.8333333333s linear 0.1041666667s infinite;-moz-animation:blink 0.8333333333s linear 0.1041666667s infinite;-o-animation:blink 0.8333333333s linear 0.1041666667s infinite}.loader__item__2{transform:translate(-4.84px, 8.5px) rotate(90deg);-webkit-animation:translate(-4.84px, 8.5px) rotate(90deg);-moz-animation:translate(-4.84px, 8.5px) rotate(90deg);-o-animation:translate(-4.84px, 8.5px) rotate(90deg);animation:blink 0.8333333333s linear 0.2083333333s infinite;-webkit-animation:blink 0.8333333333s linear 0.2083333333s infinite;-moz-animation:blink 0.8333333333s linear 0.2083333333s infinite;-o-animation:blink 0.8333333333s linear 0.2083333333s infinite}.loader__item__3{transform:translate(-12.2646212025px, 5.4246212025px) rotate(135deg);-webkit-animation:translate(-12.2646212025px, 5.4246212025px) rotate(135deg);-moz-animation:translate(-12.2646212025px, 5.4246212025px) rotate(135deg);-o-animation:translate(-12.2646212025px, 5.4246212025px) rotate(135deg);animation:blink 0.8333333333s linear 0.3125s infinite;-webkit-animation:blink 0.8333333333s linear 0.3125s infinite;-moz-animation:blink 0.8333333333s linear 0.3125s infinite;-o-animation:blink 0.8333333333s linear 0.3125s infinite}.loader__item__4{transform:translate(-15.3399999992px, -1.9999999999px) rotate(180deg);-webkit-animation:translate(-15.3399999992px, -1.9999999999px) rotate(180deg);-moz-animation:translate(-15.3399999992px, -1.9999999999px) rotate(180deg);-o-animation:translate(-15.3399999992px, -1.9999999999px) rotate(180deg);animation:blink 0.8333333333s linear 0.4166666667s infinite;-webkit-animation:blink 0.8333333333s linear 0.4166666667s infinite;-moz-animation:blink 0.8333333333s linear 0.4166666667s infinite;-o-animation:blink 0.8333333333s linear 0.4166666667s infinite}.loader__item__5{transform:translate(-12.2646210959px, -9.4246211842px) rotate(225deg);-webkit-animation:translate(-12.2646210959px, -9.4246211842px) rotate(225deg);-moz-animation:translate(-12.2646210959px, -9.4246211842px) rotate(225deg);-o-animation:translate(-12.2646210959px, -9.4246211842px) rotate(225deg);animation:blink 0.8333333333s linear 0.5208333333s infinite;-webkit-animation:blink 0.8333333333s linear 0.5208333333s infinite;-moz-animation:blink 0.8333333333s linear 0.5208333333s infinite;-o-animation:blink 0.8333333333s linear 0.5208333333s infinite}.loader__item__6{transform:translate(-4.8399941857px, -12.499998805px) rotate(270deg);-webkit-animation:translate(-4.8399941857px, -12.499998805px) rotate(270deg);-moz-animation:translate(-4.8399941857px, -12.499998805px) rotate(270deg);-o-animation:translate(-4.8399941857px, -12.499998805px) rotate(270deg);animation:blink 0.8333333333s linear 0.625s infinite;-webkit-animation:blink 0.8333333333s linear 0.625s infinite;-moz-animation:blink 0.8333333333s linear 0.625s infinite;-o-animation:blink 0.8333333333s linear 0.625s infinite}.loader__item__7{transform:translate(2.5847915061px, -9.4245803212px) rotate(315deg);-webkit-animation:translate(2.5847915061px, -9.4245803212px) rotate(315deg);-moz-animation:translate(2.5847915061px, -9.4245803212px) rotate(315deg);-o-animation:translate(2.5847915061px, -9.4245803212px) rotate(315deg);animation:blink 0.8333333333s linear 0.7291666667s infinite;-webkit-animation:blink 0.8333333333s linear 0.7291666667s infinite;-moz-animation:blink 0.8333333333s linear 0.7291666667s infinite;-o-animation:blink 0.8333333333s linear 0.7291666667s infinite}.loader__item__8{transform:translate(5.6631628524px, -1.99913122px) rotate(360deg);-webkit-animation:translate(5.6631628524px, -1.99913122px) rotate(360deg);-moz-animation:translate(5.6631628524px, -1.99913122px) rotate(360deg);-o-animation:translate(5.6631628524px, -1.99913122px) rotate(360deg);animation:blink 0.8333333333s linear 0.8333333333s infinite;-webkit-animation:blink 0.8333333333s linear 0.8333333333s infinite;-moz-animation:blink 0.8333333333s linear 0.8333333333s infinite;-o-animation:blink 0.8333333333s linear 0.8333333333s infinite}.loader__item__8{max-width:8.5px}@keyframes blink{0%{background:#4745B7}100%{background:#CCCBF8}}@keyframes rotate{0%{transform:rotate(0deg)}100%{background:rotate(360deg)}}";
|
|
48
75
|
|
|
49
76
|
const DEEP_LINK_PREFIX = "https://gataca.page.link/?apn=com.gatacaapp&ibi=com.gataca.wallet&link=";
|
|
50
77
|
const DEFAULT_SESSION_TIMEOUT = 300;
|
|
@@ -54,7 +81,7 @@ const FUNCTION_ROLES = {
|
|
|
54
81
|
certify: "credential",
|
|
55
82
|
};
|
|
56
83
|
const GatacaQRWS = class {
|
|
57
|
-
constructor(hostRef) { index.registerInstance(this, hostRef); this.gatacaLoginCompleted = index.createEvent(this, "gatacaLoginCompleted", 7); this.gatacaLoginFailed = index.createEvent(this, "gatacaLoginFailed", 7); this.successCallback = undefined; this.errorCallback = undefined; this.qrRole = undefined; this.callbackServer = undefined; this.socketEndpoint = undefined; this.sessionTimeout = DEFAULT_SESSION_TIMEOUT; this.wsOnOpen = undefined; this.wsOnMessage = undefined; this.autostart = true; this.autorefresh = false; this.v2 = false; this.qrModalTitle = "Quick Access"; this.modalTitleColor = "#4745B7"; this.qrModalDescription = "Sign up or sign in by scanning the QR Code with the Gataca Wallet"; this.hideModalTexts = false; this.hideModalBoxShadow = false; this.hideBrandTitle = false; this.logoSize = 0; this.logoSrc = gatIconAlert.logoGatacaSvg; this.qrSize = 300; this.modalWidth = 300; this.modalHeight = undefined; this.qrCodeExpiredLabel = "QR Code expired"; this.credentialsNotValidatedLabel = "User credentials not validated"; this.clickInsideBoxLabel = "Click inside the box to"; this.refreshQrLabel = "Refresh QR Code"; this.scanQrLabel = "Scan QR Code"; this.userNotScanInTimeErrorLabel = "User did not scan the QR in the allowed time"; this.credsNotValidatedErrorLabel = "Provided user credentials couldn't be validated"; this.failedLoginErrorLabel = "No successful login"; this.successLoginLabel = "Successful Connection!"; this.byBrandLabel = "by Gataca"; this.waitingStartSessionLabel = "waiting to start a session"; this.
|
|
84
|
+
constructor(hostRef) { index.registerInstance(this, hostRef); this.gatacaLoginCompleted = index.createEvent(this, "gatacaLoginCompleted", 7); this.gatacaLoginFailed = index.createEvent(this, "gatacaLoginFailed", 7); this.successCallback = undefined; this.errorCallback = undefined; this.qrRole = undefined; this.callbackServer = undefined; this.socketEndpoint = undefined; this.sessionTimeout = DEFAULT_SESSION_TIMEOUT; this.wsOnOpen = undefined; this.wsOnMessage = undefined; this.autostart = true; this.autorefresh = false; this.v2 = false; this.qrModalTitle = "Quick Access"; this.modalTitleColor = "#4745B7"; this.qrModalDescription = "Sign up or sign in by scanning the QR Code with the Gataca Wallet"; this.hideModalTexts = false; this.hideModalBoxShadow = false; this.hideBrandTitle = false; this.logoSize = 0; this.logoSrc = gatIconAlert.logoGatacaSvg; this.qrSize = 300; this.modalWidth = 300; this.modalHeight = undefined; this.qrCodeExpiredLabel = "QR Code expired"; this.credentialsNotValidatedLabel = "User credentials not validated"; this.clickInsideBoxLabel = "Click inside the box to"; this.refreshQrLabel = "Refresh QR Code"; this.scanQrLabel = "Scan QR Code"; this.userNotScanInTimeErrorLabel = "User did not scan the QR in the allowed time"; this.credsNotValidatedErrorLabel = "Provided user credentials couldn't be validated"; this.failedLoginErrorLabel = "No successful login"; this.successLoginLabel = "Successful Connection!"; this.byBrandLabel = "by Gataca"; this.waitingStartSessionLabel = "waiting to start a session"; this.readQrTitle = "Processing..."; this.readQrDescription = "Please wait a moment"; this.hideQrModalDescription = false; this.dynamicLink = true; this.sessionId = undefined; this.authenticationRequest = undefined; this.sessionData = undefined; this.result = utils.RESULT_STATUS.NOT_STARTED; }
|
|
58
85
|
disconnectedCallback() {
|
|
59
86
|
this.stop();
|
|
60
87
|
}
|
|
@@ -95,7 +122,7 @@ const GatacaQRWS = class {
|
|
|
95
122
|
socket.close(1000, "");
|
|
96
123
|
};
|
|
97
124
|
socket.onclose = () => {
|
|
98
|
-
if (this.result === utils.RESULT_STATUS.ONGOING) {
|
|
125
|
+
if (this.result === utils.RESULT_STATUS.ONGOING || utils.RESULT_STATUS.READ) {
|
|
99
126
|
this.result = utils.RESULT_STATUS.EXPIRED;
|
|
100
127
|
}
|
|
101
128
|
if (this.result === utils.RESULT_STATUS.EXPIRED) {
|
|
@@ -121,6 +148,7 @@ const GatacaQRWS = class {
|
|
|
121
148
|
this.result = wsresp.result;
|
|
122
149
|
switch (wsresp.result) {
|
|
123
150
|
case utils.RESULT_STATUS.ONGOING:
|
|
151
|
+
case utils.RESULT_STATUS.READ:
|
|
124
152
|
this.sessionId = wsresp.sessionId;
|
|
125
153
|
this.authenticationRequest = wsresp.authenticationRequest;
|
|
126
154
|
break;
|
|
@@ -191,18 +219,21 @@ const GatacaQRWS = class {
|
|
|
191
219
|
return this.renderRetryButton(this.credentialsNotValidatedLabel);
|
|
192
220
|
case utils.RESULT_STATUS.SUCCESS:
|
|
193
221
|
return this.renderSuccess();
|
|
194
|
-
case utils.RESULT_STATUS.
|
|
195
|
-
return this.
|
|
196
|
-
title: this === null || this === void 0 ? void 0 : this.
|
|
197
|
-
description: this === null || this === void 0 ? void 0 : this.
|
|
222
|
+
case utils.RESULT_STATUS.READ:
|
|
223
|
+
return this.renderReadQR({
|
|
224
|
+
title: this === null || this === void 0 ? void 0 : this.readQrTitle,
|
|
225
|
+
description: this === null || this === void 0 ? void 0 : this.readQrDescription,
|
|
198
226
|
});
|
|
199
227
|
}
|
|
200
228
|
}
|
|
201
229
|
renderSuccess() {
|
|
202
230
|
return (index.h(Success, { modalHeight: this === null || this === void 0 ? void 0 : this.modalHeight, successLoginLabel: this === null || this === void 0 ? void 0 : this.successLoginLabel }));
|
|
203
231
|
}
|
|
204
|
-
renderRetryButton(errorMessage
|
|
205
|
-
return (index.h(RetryButton, { errorMessage: errorMessage, modalWidth: this === null || this === void 0 ? void 0 : this.modalWidth, clickInsideBoxLabel: this === null || this === void 0 ? void 0 : this.clickInsideBoxLabel, refreshQrLabel: this === null || this === void 0 ? void 0 : this.refreshQrLabel, scanQrLabel: this === null || this === void 0 ? void 0 : this.scanQrLabel, waitingStartSessionLabel: this === null || this === void 0 ? void 0 : this.waitingStartSessionLabel, display: this.display.bind(this), renderRetryQR: this.renderRetryQR.bind(this)
|
|
232
|
+
renderRetryButton(errorMessage) {
|
|
233
|
+
return (index.h(RetryButton, { errorMessage: errorMessage, modalWidth: this === null || this === void 0 ? void 0 : this.modalWidth, clickInsideBoxLabel: this === null || this === void 0 ? void 0 : this.clickInsideBoxLabel, refreshQrLabel: this === null || this === void 0 ? void 0 : this.refreshQrLabel, scanQrLabel: this === null || this === void 0 ? void 0 : this.scanQrLabel, waitingStartSessionLabel: this === null || this === void 0 ? void 0 : this.waitingStartSessionLabel, display: this.display.bind(this), renderRetryQR: this.renderRetryQR.bind(this) }));
|
|
234
|
+
}
|
|
235
|
+
renderReadQR(readQrMessages) {
|
|
236
|
+
return (index.h(ReadQR, { modalWidth: this === null || this === void 0 ? void 0 : this.modalWidth, readQrMessages: readQrMessages, url: this.getLink(), sizeQR: (this === null || this === void 0 ? void 0 : this.qrSize) ? (this === null || this === void 0 ? void 0 : this.qrSize) - 50 : undefined, renderQR: this.renderQR.bind(this) }));
|
|
206
237
|
}
|
|
207
238
|
renderQR(value, useLogo) {
|
|
208
239
|
return (index.h(QR, { value: value, useLogo: useLogo, size: (this === null || this === void 0 ? void 0 : this.qrSize) || undefined, logoSrc: this === null || this === void 0 ? void 0 : this.logoSrc }));
|
package/dist/cjs/gatacaqr.cjs.js
CHANGED
|
@@ -17,7 +17,7 @@ const patchBrowser = () => {
|
|
|
17
17
|
};
|
|
18
18
|
|
|
19
19
|
patchBrowser().then(options => {
|
|
20
|
-
return index.bootstrapLazy([["gataca-qr_2.cjs",[[1,"gataca-qr",{"checkStatus":[16],"createSession":[16],"successCallback":[16],"errorCallback":[16],"qrRole":[1,"qr-role"],"callbackServer":[1,"callback-server"],"autostart":[4],"autorefresh":[4],"v2":[4,"v-2"],"qrModalTitle":[1,"qr-modal-title"],"modalTitleColor":[1,"modal-title-color"],"qrModalDescription":[1,"qr-modal-description"],"hideModalTexts":[4,"hide-modal-texts"],"hideModalBoxShadow":[4,"hide-modal-box-shadow"],"hideBrandTitle":[4,"hide-brand-title"],"logoSize":[2,"logo-size"],"logoSrc":[1,"logo-src"],"qrSize":[2,"qr-size"],"modalWidth":[2,"modal-width"],"modalHeight":[2,"modal-height"],"qrCodeExpiredLabel":[1,"qr-code-expired-label"],"credentialsNotValidatedLabel":[1,"credentials-not-validated-label"],"clickInsideBoxLabel":[1,"click-inside-box-label"],"refreshQrLabel":[1,"refresh-qr-label"],"scanQrLabel":[1,"scan-qr-label"],"userNotScanInTimeErrorLabel":[1,"user-not-scan-in-time-error-label"],"credsNotValidatedErrorLabel":[1,"creds-not-validated-error-label"],"failedLoginErrorLabel":[1,"failed-login-error-label"],"successLoginLabel":[1,"success-login-label"],"byBrandLabel":[1,"by-brand-label"],"waitingStartSessionLabel":[1,"waiting-start-session-label"],"
|
|
20
|
+
return index.bootstrapLazy([["gataca-qr_2.cjs",[[1,"gataca-qr",{"checkStatus":[16],"createSession":[16],"successCallback":[16],"errorCallback":[16],"qrRole":[1,"qr-role"],"callbackServer":[1,"callback-server"],"autostart":[4],"autorefresh":[4],"v2":[4,"v-2"],"qrModalTitle":[1,"qr-modal-title"],"modalTitleColor":[1,"modal-title-color"],"qrModalDescription":[1,"qr-modal-description"],"hideModalTexts":[4,"hide-modal-texts"],"hideModalBoxShadow":[4,"hide-modal-box-shadow"],"hideBrandTitle":[4,"hide-brand-title"],"logoSize":[2,"logo-size"],"logoSrc":[1,"logo-src"],"qrSize":[2,"qr-size"],"modalWidth":[2,"modal-width"],"modalHeight":[2,"modal-height"],"qrCodeExpiredLabel":[1,"qr-code-expired-label"],"credentialsNotValidatedLabel":[1,"credentials-not-validated-label"],"clickInsideBoxLabel":[1,"click-inside-box-label"],"refreshQrLabel":[1,"refresh-qr-label"],"scanQrLabel":[1,"scan-qr-label"],"userNotScanInTimeErrorLabel":[1,"user-not-scan-in-time-error-label"],"credsNotValidatedErrorLabel":[1,"creds-not-validated-error-label"],"failedLoginErrorLabel":[1,"failed-login-error-label"],"successLoginLabel":[1,"success-login-label"],"byBrandLabel":[1,"by-brand-label"],"waitingStartSessionLabel":[1,"waiting-start-session-label"],"readQrTitle":[1,"read-qr-title"],"readQrDescription":[1,"read-qr-description"],"hideQrModalDescription":[4,"hide-qr-modal-description"],"sessionTimeout":[2,"session-timeout"],"pollingFrequency":[2,"polling-frequency"],"dynamicLink":[4,"dynamic-link"],"sessionId":[32],"authenticationRequest":[32],"sessionData":[32],"result":[32],"display":[64],"stop":[64],"getSessionData":[64]}],[0,"gataca-qrdisplay",{"qrData":[1,"qr-data"],"size":[2],"logoSize":[2,"logo-size"],"logoSrc":[1,"logo-src"],"qrColor":[1,"qr-color"],"rounded":[4]}]]],["gataca-qrws.cjs",[[1,"gataca-qrws",{"successCallback":[16],"errorCallback":[16],"qrRole":[1,"qr-role"],"callbackServer":[1,"callback-server"],"socketEndpoint":[1,"socket-endpoint"],"sessionTimeout":[2,"session-timeout"],"wsOnOpen":[16],"wsOnMessage":[16],"autostart":[4],"autorefresh":[4],"v2":[4,"v-2"],"qrModalTitle":[1,"qr-modal-title"],"modalTitleColor":[1,"modal-title-color"],"qrModalDescription":[1,"qr-modal-description"],"hideModalTexts":[4,"hide-modal-texts"],"hideModalBoxShadow":[4,"hide-modal-box-shadow"],"hideBrandTitle":[4,"hide-brand-title"],"logoSize":[2,"logo-size"],"logoSrc":[1,"logo-src"],"qrSize":[2,"qr-size"],"modalWidth":[2,"modal-width"],"modalHeight":[2,"modal-height"],"qrCodeExpiredLabel":[1,"qr-code-expired-label"],"credentialsNotValidatedLabel":[1,"credentials-not-validated-label"],"clickInsideBoxLabel":[1,"click-inside-box-label"],"refreshQrLabel":[1,"refresh-qr-label"],"scanQrLabel":[1,"scan-qr-label"],"userNotScanInTimeErrorLabel":[1,"user-not-scan-in-time-error-label"],"credsNotValidatedErrorLabel":[1,"creds-not-validated-error-label"],"failedLoginErrorLabel":[1,"failed-login-error-label"],"successLoginLabel":[1,"success-login-label"],"byBrandLabel":[1,"by-brand-label"],"waitingStartSessionLabel":[1,"waiting-start-session-label"],"readQrTitle":[1,"read-qr-title"],"readQrDescription":[1,"read-qr-description"],"hideQrModalDescription":[4,"hide-qr-modal-description"],"dynamicLink":[4,"dynamic-link"],"sessionId":[32],"authenticationRequest":[32],"sessionData":[32],"result":[32],"display":[64],"stop":[64],"getSessionData":[64]},[[2,"sessionMsg","sessionMsgReceived"]]]]],["gataca-ssibutton_2.cjs",[[1,"gataca-ssibutton",{"buttonText":[1,"button-text"],"checkStatus":[16],"createSession":[16],"successCallback":[16],"errorCallback":[16],"qrRole":[1,"qr-role"],"callbackServer":[1,"callback-server"],"sessionTimeout":[2,"session-timeout"],"pollingFrequency":[2,"polling-frequency"],"autorefresh":[4],"v2":[4,"v-2"],"qrModalTitle":[1,"qr-modal-title"],"modalTitleColor":[1,"modal-title-color"],"qrModalDescription":[1,"qr-modal-description"],"hideBrandTitle":[4,"hide-brand-title"],"dynamicLink":[4,"dynamic-link"],"logoSize":[2,"logo-size"],"logoSrc":[1,"logo-src"],"qrCodeExpiredLabel":[1,"qr-code-expired-label"],"credentialsNotValidatedLabel":[1,"credentials-not-validated-label"],"clickInsideBoxLabel":[1,"click-inside-box-label"],"refreshQrLabel":[1,"refresh-qr-label"],"scanQrLabel":[1,"scan-qr-label"],"userNotScanInTimeErrorLabel":[1,"user-not-scan-in-time-error-label"],"credsNotValidatedErrorLabel":[1,"creds-not-validated-error-label"],"failedLoginErrorLabel":[1,"failed-login-error-label"],"successLoginLabel":[1,"success-login-label"],"byBrandLabel":[1,"by-brand-label"],"waitingStartSessionLabel":[1,"waiting-start-session-label"],"hideQrModalDescription":[4,"hide-qr-modal-description"],"open":[32],"getSessionData":[64]}],[1,"gataca-ssibuttonws",{"buttonText":[1,"button-text"],"successCallback":[16],"errorCallback":[16],"qrRole":[1,"qr-role"],"callbackServer":[1,"callback-server"],"socketEndpoint":[1,"socket-endpoint"],"sessionTimeout":[2,"session-timeout"],"wsOnOpen":[16],"wsOnMessage":[16],"autostart":[4],"autorefresh":[4],"v2":[4,"v-2"],"qrModalTitle":[1,"qr-modal-title"],"qrModalDescription":[1,"qr-modal-description"],"hideBrandTitle":[4,"hide-brand-title"],"dynamicLink":[4,"dynamic-link"],"open":[32],"getSessionData":[64]}]]],["gataca-autoqr.cjs",[[1,"gataca-autoqr",{"configId":[1,"config-id"],"configRepository":[1,"config-repository"],"successCallback":[16],"errorCallback":[16],"checkStatus":[16],"createSession":[16],"wsOnOpen":[16],"wsOnMessage":[16],"config":[32],"loading":[32],"getSessionData":[64]}]]]], options);
|
|
21
21
|
});
|
|
22
22
|
|
|
23
23
|
exports.setNonce = index.setNonce;
|
package/dist/cjs/index.cjs.js
CHANGED
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -14,7 +14,7 @@ const patchEsm = () => {
|
|
|
14
14
|
const defineCustomElements = (win, options) => {
|
|
15
15
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
16
16
|
return patchEsm().then(() => {
|
|
17
|
-
return index.bootstrapLazy([["gataca-qr_2.cjs",[[1,"gataca-qr",{"checkStatus":[16],"createSession":[16],"successCallback":[16],"errorCallback":[16],"qrRole":[1,"qr-role"],"callbackServer":[1,"callback-server"],"autostart":[4],"autorefresh":[4],"v2":[4,"v-2"],"qrModalTitle":[1,"qr-modal-title"],"modalTitleColor":[1,"modal-title-color"],"qrModalDescription":[1,"qr-modal-description"],"hideModalTexts":[4,"hide-modal-texts"],"hideModalBoxShadow":[4,"hide-modal-box-shadow"],"hideBrandTitle":[4,"hide-brand-title"],"logoSize":[2,"logo-size"],"logoSrc":[1,"logo-src"],"qrSize":[2,"qr-size"],"modalWidth":[2,"modal-width"],"modalHeight":[2,"modal-height"],"qrCodeExpiredLabel":[1,"qr-code-expired-label"],"credentialsNotValidatedLabel":[1,"credentials-not-validated-label"],"clickInsideBoxLabel":[1,"click-inside-box-label"],"refreshQrLabel":[1,"refresh-qr-label"],"scanQrLabel":[1,"scan-qr-label"],"userNotScanInTimeErrorLabel":[1,"user-not-scan-in-time-error-label"],"credsNotValidatedErrorLabel":[1,"creds-not-validated-error-label"],"failedLoginErrorLabel":[1,"failed-login-error-label"],"successLoginLabel":[1,"success-login-label"],"byBrandLabel":[1,"by-brand-label"],"waitingStartSessionLabel":[1,"waiting-start-session-label"],"
|
|
17
|
+
return index.bootstrapLazy([["gataca-qr_2.cjs",[[1,"gataca-qr",{"checkStatus":[16],"createSession":[16],"successCallback":[16],"errorCallback":[16],"qrRole":[1,"qr-role"],"callbackServer":[1,"callback-server"],"autostart":[4],"autorefresh":[4],"v2":[4,"v-2"],"qrModalTitle":[1,"qr-modal-title"],"modalTitleColor":[1,"modal-title-color"],"qrModalDescription":[1,"qr-modal-description"],"hideModalTexts":[4,"hide-modal-texts"],"hideModalBoxShadow":[4,"hide-modal-box-shadow"],"hideBrandTitle":[4,"hide-brand-title"],"logoSize":[2,"logo-size"],"logoSrc":[1,"logo-src"],"qrSize":[2,"qr-size"],"modalWidth":[2,"modal-width"],"modalHeight":[2,"modal-height"],"qrCodeExpiredLabel":[1,"qr-code-expired-label"],"credentialsNotValidatedLabel":[1,"credentials-not-validated-label"],"clickInsideBoxLabel":[1,"click-inside-box-label"],"refreshQrLabel":[1,"refresh-qr-label"],"scanQrLabel":[1,"scan-qr-label"],"userNotScanInTimeErrorLabel":[1,"user-not-scan-in-time-error-label"],"credsNotValidatedErrorLabel":[1,"creds-not-validated-error-label"],"failedLoginErrorLabel":[1,"failed-login-error-label"],"successLoginLabel":[1,"success-login-label"],"byBrandLabel":[1,"by-brand-label"],"waitingStartSessionLabel":[1,"waiting-start-session-label"],"readQrTitle":[1,"read-qr-title"],"readQrDescription":[1,"read-qr-description"],"hideQrModalDescription":[4,"hide-qr-modal-description"],"sessionTimeout":[2,"session-timeout"],"pollingFrequency":[2,"polling-frequency"],"dynamicLink":[4,"dynamic-link"],"sessionId":[32],"authenticationRequest":[32],"sessionData":[32],"result":[32],"display":[64],"stop":[64],"getSessionData":[64]}],[0,"gataca-qrdisplay",{"qrData":[1,"qr-data"],"size":[2],"logoSize":[2,"logo-size"],"logoSrc":[1,"logo-src"],"qrColor":[1,"qr-color"],"rounded":[4]}]]],["gataca-qrws.cjs",[[1,"gataca-qrws",{"successCallback":[16],"errorCallback":[16],"qrRole":[1,"qr-role"],"callbackServer":[1,"callback-server"],"socketEndpoint":[1,"socket-endpoint"],"sessionTimeout":[2,"session-timeout"],"wsOnOpen":[16],"wsOnMessage":[16],"autostart":[4],"autorefresh":[4],"v2":[4,"v-2"],"qrModalTitle":[1,"qr-modal-title"],"modalTitleColor":[1,"modal-title-color"],"qrModalDescription":[1,"qr-modal-description"],"hideModalTexts":[4,"hide-modal-texts"],"hideModalBoxShadow":[4,"hide-modal-box-shadow"],"hideBrandTitle":[4,"hide-brand-title"],"logoSize":[2,"logo-size"],"logoSrc":[1,"logo-src"],"qrSize":[2,"qr-size"],"modalWidth":[2,"modal-width"],"modalHeight":[2,"modal-height"],"qrCodeExpiredLabel":[1,"qr-code-expired-label"],"credentialsNotValidatedLabel":[1,"credentials-not-validated-label"],"clickInsideBoxLabel":[1,"click-inside-box-label"],"refreshQrLabel":[1,"refresh-qr-label"],"scanQrLabel":[1,"scan-qr-label"],"userNotScanInTimeErrorLabel":[1,"user-not-scan-in-time-error-label"],"credsNotValidatedErrorLabel":[1,"creds-not-validated-error-label"],"failedLoginErrorLabel":[1,"failed-login-error-label"],"successLoginLabel":[1,"success-login-label"],"byBrandLabel":[1,"by-brand-label"],"waitingStartSessionLabel":[1,"waiting-start-session-label"],"readQrTitle":[1,"read-qr-title"],"readQrDescription":[1,"read-qr-description"],"hideQrModalDescription":[4,"hide-qr-modal-description"],"dynamicLink":[4,"dynamic-link"],"sessionId":[32],"authenticationRequest":[32],"sessionData":[32],"result":[32],"display":[64],"stop":[64],"getSessionData":[64]},[[2,"sessionMsg","sessionMsgReceived"]]]]],["gataca-ssibutton_2.cjs",[[1,"gataca-ssibutton",{"buttonText":[1,"button-text"],"checkStatus":[16],"createSession":[16],"successCallback":[16],"errorCallback":[16],"qrRole":[1,"qr-role"],"callbackServer":[1,"callback-server"],"sessionTimeout":[2,"session-timeout"],"pollingFrequency":[2,"polling-frequency"],"autorefresh":[4],"v2":[4,"v-2"],"qrModalTitle":[1,"qr-modal-title"],"modalTitleColor":[1,"modal-title-color"],"qrModalDescription":[1,"qr-modal-description"],"hideBrandTitle":[4,"hide-brand-title"],"dynamicLink":[4,"dynamic-link"],"logoSize":[2,"logo-size"],"logoSrc":[1,"logo-src"],"qrCodeExpiredLabel":[1,"qr-code-expired-label"],"credentialsNotValidatedLabel":[1,"credentials-not-validated-label"],"clickInsideBoxLabel":[1,"click-inside-box-label"],"refreshQrLabel":[1,"refresh-qr-label"],"scanQrLabel":[1,"scan-qr-label"],"userNotScanInTimeErrorLabel":[1,"user-not-scan-in-time-error-label"],"credsNotValidatedErrorLabel":[1,"creds-not-validated-error-label"],"failedLoginErrorLabel":[1,"failed-login-error-label"],"successLoginLabel":[1,"success-login-label"],"byBrandLabel":[1,"by-brand-label"],"waitingStartSessionLabel":[1,"waiting-start-session-label"],"hideQrModalDescription":[4,"hide-qr-modal-description"],"open":[32],"getSessionData":[64]}],[1,"gataca-ssibuttonws",{"buttonText":[1,"button-text"],"successCallback":[16],"errorCallback":[16],"qrRole":[1,"qr-role"],"callbackServer":[1,"callback-server"],"socketEndpoint":[1,"socket-endpoint"],"sessionTimeout":[2,"session-timeout"],"wsOnOpen":[16],"wsOnMessage":[16],"autostart":[4],"autorefresh":[4],"v2":[4,"v-2"],"qrModalTitle":[1,"qr-modal-title"],"qrModalDescription":[1,"qr-modal-description"],"hideBrandTitle":[4,"hide-brand-title"],"dynamicLink":[4,"dynamic-link"],"open":[32],"getSessionData":[64]}]]],["gataca-autoqr.cjs",[[1,"gataca-autoqr",{"configId":[1,"config-id"],"configRepository":[1,"config-repository"],"successCallback":[16],"errorCallback":[16],"checkStatus":[16],"createSession":[16],"wsOnOpen":[16],"wsOnMessage":[16],"config":[32],"loading":[32],"getSessionData":[64]}]]]], options);
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
20
|
|
|
@@ -20,7 +20,7 @@ exports.RESULT_STATUS = void 0;
|
|
|
20
20
|
RESULT_STATUS[RESULT_STATUS["SUCCESS"] = 1] = "SUCCESS";
|
|
21
21
|
RESULT_STATUS[RESULT_STATUS["FAILED"] = 2] = "FAILED";
|
|
22
22
|
RESULT_STATUS[RESULT_STATUS["EXPIRED"] = 3] = "EXPIRED";
|
|
23
|
-
RESULT_STATUS[RESULT_STATUS["
|
|
23
|
+
RESULT_STATUS[RESULT_STATUS["READ"] = 5] = "READ";
|
|
24
24
|
})(exports.RESULT_STATUS || (exports.RESULT_STATUS = {}));
|
|
25
25
|
|
|
26
26
|
exports.base64UrlEncode = base64UrlEncode;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
import { AnimatedLoader } from "./components/AnimatedLoader";
|
|
3
|
+
export const ReadQR = (props) => {
|
|
4
|
+
var _a;
|
|
5
|
+
const { modalWidth, readQrMessages, renderQR, url, sizeQR } = props;
|
|
6
|
+
return (h("div", { class: "blured", style: {
|
|
7
|
+
width: (modalWidth - 48).toString() + "px",
|
|
8
|
+
height: modalWidth ? ((_a = (modalWidth - 48)) === null || _a === void 0 ? void 0 : _a.toString()) + "px" : "",
|
|
9
|
+
} }, h("div", { id: "notify" }, h(AnimatedLoader, null), h("p", { class: "notify-text" }, readQrMessages === null || readQrMessages === void 0 ? void 0 :
|
|
10
|
+
readQrMessages.title, " "), h("p", { class: "notify-text bold" }, readQrMessages === null || readQrMessages === void 0 ? void 0 : readQrMessages.description)), h("div", { id: "qrwait" }, renderQR(url, false, sizeQR))));
|
|
11
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
export const AnimatedLoader = () => {
|
|
3
|
+
return (h("div", { class: "containerLoader" }, h("div", { class: "loader" }, h("div", { class: "loader__item loader__item__1" }), h("div", { class: "loader__item loader__item__2" }), h("div", { class: "loader__item loader__item__3" }), h("div", { class: "loader__item loader__item__4" }), h("div", { class: "loader__item loader__item__5" }), h("div", { class: "loader__item loader__item__6" }), h("div", { class: "loader__item loader__item__7" }), h("div", { class: "loader__item loader__item__8" }))));
|
|
4
|
+
};
|
|
@@ -3,12 +3,11 @@ import refreshIcon from "../../../../assets/icons/gat-icon-refresh.svg";
|
|
|
3
3
|
import alertIcon from "../../../../assets/icons/gat-icon-alert.svg";
|
|
4
4
|
export const RetryButton = (props) => {
|
|
5
5
|
var _a;
|
|
6
|
-
const { errorMessage, modalWidth, clickInsideBoxLabel, refreshQrLabel, scanQrLabel, waitingStartSessionLabel, display, renderRetryQR,
|
|
6
|
+
const { errorMessage, modalWidth, clickInsideBoxLabel, refreshQrLabel, scanQrLabel, waitingStartSessionLabel, display, renderRetryQR, } = props;
|
|
7
7
|
return (h("div", { class: "reload", style: {
|
|
8
8
|
width: (modalWidth - 48).toString() + "px",
|
|
9
9
|
height: modalWidth ? ((_a = (modalWidth - 48)) === null || _a === void 0 ? void 0 : _a.toString()) + "px" : "",
|
|
10
|
-
} }, h("div", { id: "notify", onClick: () => display() }, h("img", { src: refreshIcon, height: 24, width: 24 }),
|
|
11
|
-
readedQrMessages.title, " ")) : (h("p", { class: "notify-text" }, clickInsideBoxLabel, " ")), errorMessage ? (h("p", { class: "notify-text bold" }, refreshQrLabel)) : readedQrMessages ? (h("p", { class: "notify-text bold" }, readedQrMessages === null || readedQrMessages === void 0 ? void 0 : readedQrMessages.description)) : (h("p", { class: "notify-text bold" }, scanQrLabel)), errorMessage && (h("div", { class: "alert", style: {
|
|
10
|
+
} }, h("div", { id: "notify", onClick: () => display() }, h("img", { src: refreshIcon, height: 24, width: 24 }), h("p", { class: "notify-text" }, clickInsideBoxLabel, " "), errorMessage ? (h("p", { class: "notify-text bold" }, refreshQrLabel)) : (h("p", { class: "notify-text bold" }, scanQrLabel)), errorMessage && (h("div", { class: "alert", style: {
|
|
12
11
|
width: (modalWidth - 48).toString() + "px",
|
|
13
12
|
} }, h("img", { src: alertIcon, height: 24, width: 24 }), h("p", null, errorMessage)))), h("div", { id: "qrwait" }, renderRetryQR(waitingStartSessionLabel))));
|
|
14
13
|
};
|