@gataca/qr 3.0.11 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{esm/qr-code-styling-0eeb38d5.js → cjs/gat-icon-check-c88a30ed.js} +15 -1
- package/dist/cjs/{gataca-qr_2.cjs.entry.js → gataca-qr_3.cjs.entry.js} +380 -45
- package/dist/cjs/gataca-qrws.cjs.entry.js +6 -7
- package/dist/cjs/gataca-ssibuttonws.cjs.entry.js +61 -0
- package/dist/cjs/gatacaqr.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/gataca-qr/components/qr/QR.js +2 -2
- package/dist/collection/components/gataca-qr/components/readQR/ReadQR.js +4 -2
- package/dist/collection/components/gataca-qr/gataca-qr.js +26 -7
- package/dist/collection/components/gataca-qrdisplay/gataca-qrdisplay.js +22 -0
- package/dist/collection/components/gataca-ssibutton/gataca-ssibutton.js +163 -3
- package/dist/components/{gat-icon-alert.js → gat-icon-check.js} +3 -3
- package/dist/components/gataca-qr2.js +40 -37
- package/dist/components/gataca-qrdisplay2.js +5 -0
- package/dist/components/gataca-qrws2.js +1 -1
- package/dist/components/gataca-ssibutton2.js +88 -4
- package/dist/components/index.js +1 -1
- package/dist/{cjs/qr-code-styling-412bbc7a.js → esm/gat-icon-check-c188cd29.js} +8 -2
- package/dist/esm/{gataca-qr_2.entry.js → gataca-qr_3.entry.js} +377 -43
- package/dist/esm/gataca-qrws.entry.js +1 -2
- package/dist/esm/gataca-ssibuttonws.entry.js +57 -0
- package/dist/esm/gatacaqr.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/gatacaqr/gatacaqr.esm.js +1 -1
- package/dist/gatacaqr/p-5be73956.js +1 -0
- package/dist/gatacaqr/p-948e7d94.entry.js +1 -0
- package/dist/gatacaqr/p-e94e9be8.entry.js +1 -0
- package/dist/gatacaqr/p-fb41fad9.entry.js +1 -0
- package/dist/types/components/gataca-qr/components/qr/QR.d.ts +3 -1
- package/dist/types/components/gataca-qr/components/readQR/ReadQR.d.ts +2 -0
- package/dist/types/components/gataca-qr/gataca-qr.d.ts +11 -2
- package/dist/types/components/gataca-qrdisplay/gataca-qrdisplay.d.ts +5 -0
- package/dist/types/components/gataca-ssibutton/gataca-ssibutton.d.ts +30 -1
- package/dist/types/components.d.ts +50 -0
- package/package.json +1 -1
- package/dist/cjs/gat-icon-alert-0ad19b26.js +0 -14
- package/dist/cjs/gataca-ssibutton_2.cjs.entry.js +0 -313
- package/dist/esm/gat-icon-alert-7b06ef3a.js +0 -9
- package/dist/esm/gataca-ssibutton_2.entry.js +0 -308
- package/dist/gatacaqr/p-0be4566d.js +0 -1
- package/dist/gatacaqr/p-2adc0bcc.entry.js +0 -1
- package/dist/gatacaqr/p-2ddbc2fc.entry.js +0 -1
- package/dist/gatacaqr/p-d2dd7c85.entry.js +0 -1
- package/dist/gatacaqr/p-ea783014.js +0 -1
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const logoGatacaSvg = 'data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgdmlld0JveD0iMCAwIDc2IDcxIiB3aWR0aD0iNzEiIGhlaWdodD0iNjYiPgoJPHRpdGxlPlZlY3RvciAoMyktc3ZnPC90aXRsZT4KCTxzdHlsZT4KCQkuczAgeyBmaWxsOiAjNDc0NWI3IH0gCgk8L3N0eWxlPgoJPHBhdGggaWQ9IkxheWVyIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsYXNzPSJzMCIgZD0ibTcyLjIgMzguNGMyLjIgMy4zIDMuNSA3LjIgMy41IDExLjQgMCAxMS4yLTguOCAyMC4yLTE5LjkgMjAuN3EtMC40IDAtMC44IDBjLTMgMC01LjgtMC42LTguNC0xLjdxLTIuMS0xLTMuOC0yLjMtMS4xLTAuOC0yLjEtMS43LTEuMy0xLjItMi4zLTIuNi0wLjUgMC42LTEgMS4yYy0zLjggNC40LTkuNCA3LjEtMTUuNyA3LjEtNi43IDAtMTIuNi0zLjItMTYuNC04LjEtMi43LTMuNS00LjMtNy44LTQuMy0xMi42IDAtMTAuNiA4LTE5LjMgMTguMy0yMC41LTEuMS0yLjUtMS43LTUuMi0xLjctOC4xIDAtMTEuNSA5LjMtMjAuNyAyMC44LTIwLjcgMTAuMiAwIDE4LjcgNy40IDIwLjQgMTcuMnEwLjMgMS43IDAuMyAzLjVjMCAyLjktMC42IDUuNi0xLjcgOC4xIDYuMiAwLjcgMTEuNiA0LjIgMTQuOCA5LjF6bS00NC43LTIzLjVjLTMuNCA2LTEuNCAxMy41IDQuNSAxN3EwLjEgMCAwLjIgMC4xYzIuNCAxLjMgNS4xIDEuOCA3LjcgMS41IDEuNS0wLjIgMy4xLTAuNyA0LjUtMS40cTAuMi0wLjIgMC40LTAuM2MxLjgtMSAzLjMtMi41IDQuNC00LjRxMC43LTEuMyAxLjEtMi42YzEuNy01LjQtMC42LTExLjUtNS43LTE0LjQtNi0zLjQtMTMuNi0xLjQtMTcuMSA0LjV6bTM4LjUgNDAuOGMyLTMuOSAxLjktOC40LTAuMi0xMi0xLTEuOC0yLjYtMy41LTQuNi00LjYtMy45LTIuMy04LjUtMi4yLTEyLjMtMC4ycS0wLjIgMC4yLTAuNCAwLjMtMC45IDAuNS0xLjcgMS4ybDEzLjYgNy44djAuMWwtNi43IDUuNi0xMS02LjQtMC40LTAuMi03LTQtNC4yLTIuNS0yLjYtMS40cS0wLjItMC4yLTAuNC0wLjMtMC4xIDAtMC4yLTAuMWMtNS45LTMuNC0xMy41LTEuMy0xNyA0LjYtMi41IDQuNC0yLjEgOS43IDAuNyAxMy41IDEgMS40IDIuMyAyLjYgMy45IDMuNSA0LjggMi43IDEwLjYgMiAxNC41LTEuNGwtMTIuNC03LjEgNi44LTUuNiA5LjYgNS41IDAuNCAwLjIgNyA0LjEgNS42IDMuMiAxLjggMWMzLjMgMS45IDcuMyAyLjMgMTAuOSAwLjkgMi42LTEuMSA0LjgtMyA2LjMtNS43eiIvPgo8L3N2Zz4=';
|
|
4
|
+
|
|
1
5
|
function getDefaultExportFromCjs (x) {
|
|
2
6
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
3
7
|
}
|
|
@@ -23,4 +27,14 @@ var qrCodeStyling = createCommonjsModule(function (module, exports) {
|
|
|
23
27
|
|
|
24
28
|
const QRCodeStyling = /*@__PURE__*/getDefaultExportFromCjs(qrCodeStyling);
|
|
25
29
|
|
|
26
|
-
|
|
30
|
+
const gatIconRefreshSvg = 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTIzIDRWMTBIMTciIHN0cm9rZT0iIzhCOEI4QiIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPHBhdGggZD0iTTIwLjQ4OTkgMTVDMTkuODM5OSAxNi44Mzk5IDE4LjYwOTQgMTguNDE4NyAxNi45ODQgMTkuNDk4NUMxNS4zNTg2IDIwLjU3ODMgMTMuNDI2MyAyMS4xMDA2IDExLjQ3ODMgMjAuOTg2NkM5LjUzMDI2IDIwLjg3MjYgNy42NzIwMyAyMC4xMjg2IDYuMTgzNjMgMTguODY2N0M0LjY5NTI0IDE3LjYwNDcgMy42NTczIDE1Ljg5MzIgMy4yMjYyNSAxMy45OTAxQzIuNzk1MTkgMTIuMDg2OSAyLjk5NDM2IDEwLjA5NTIgMy43OTM3NCA4LjMxNTA4QzQuNTkzMTMgNi41MzQ5NiA1Ljk0OTQyIDUuMDYyODggNy42NTgyMyA0LjEyMDY1QzkuMzY3MDUgMy4xNzg0MyAxMS4zMzU4IDIuODE3MTEgMTMuMjY3OCAzLjA5MTE2QzE1LjE5OTkgMy4zNjUyIDE2Ljk5MDUgNC4yNTk3NSAxOC4zNjk5IDUuNjQwMDFMMjIuOTk5OSAxMCIgc3Ryb2tlPSIjOEI4QjhCIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPgo8L3N2Zz4K';
|
|
31
|
+
|
|
32
|
+
const gatIconAlertSvg = 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTEwLjI5MDggMy44NjAyTDEuODIwNzUgMTguMDAwMkMxLjY0NjEyIDE4LjMwMjYgMS41NTM3MiAxOC42NDU1IDEuNTUyNzQgMTguOTk0N0MxLjU1MTc2IDE5LjM0MzkgMS42NDIyNCAxOS42ODczIDEuODE1MTggMTkuOTkwN0MxLjk4ODEyIDIwLjI5NDEgMi4yMzc0OCAyMC41NDcgMi41Mzg0NiAyMC43MjQxQzIuODM5NDQgMjAuOTAxMiAzLjE4MTU1IDIwLjk5NjQgMy41MzA3NSAyMS4wMDAySDIwLjQ3MDhDMjAuODIgMjAuOTk2NCAyMS4xNjIxIDIwLjkwMTIgMjEuNDYzIDIwLjcyNDFDMjEuNzY0IDIwLjU0NyAyMi4wMTM0IDIwLjI5NDEgMjIuMTg2MyAxOS45OTA3QzIyLjM1OTMgMTkuNjg3MyAyMi40NDk3IDE5LjM0MzkgMjIuNDQ4OCAxOC45OTQ3QzIyLjQ0NzggMTguNjQ1NSAyMi4zNTU0IDE4LjMwMjYgMjIuMTgwOCAxOC4wMDAyTDEzLjcxMDggMy44NjAyQzEzLjUzMjUgMy41NjYzMSAxMy4yODE1IDMuMzIzMzIgMTIuOTgxOSAzLjE1NDY5QzEyLjY4MjQgMi45ODYwNSAxMi4zNDQ1IDIuODk3NDYgMTIuMDAwOCAyLjg5NzQ2QzExLjY1NyAyLjg5NzQ2IDExLjMxOTEgMi45ODYwNSAxMS4wMTk2IDMuMTU0NjlDMTAuNzIgMy4zMjMzMiAxMC40NjkgMy41NjYzMSAxMC4yOTA4IDMuODYwMlYzLjg2MDJaIiBzdHJva2U9IiNDRDJCMzEiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+CjxwYXRoIGQ9Ik0xMiA5VjEzIiBzdHJva2U9IiNDRDJCMzEiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+CjxwYXRoIGQ9Ik0xMiAxN0gxMi4wMSIgc3Ryb2tlPSIjQ0QyQjMxIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPgo8L3N2Zz4K';
|
|
33
|
+
|
|
34
|
+
const gatIconCheckSvg = 'data:image/svg+xml;base64,Cjxzdmcgd2lkdGg9IjUyIiBoZWlnaHQ9IjUzIiB2aWV3Qm94PSIwIDAgNTIgNTMiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxjaXJjbGUgY3g9IjI2IiBjeT0iMjYuNjcxOSIgcj0iMjYiIGZpbGw9IiMzRDlBNTAiLz4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0zOC41MiAxNy43NDk1QzM5LjU4MDUgMTguODA5OSAzOS41ODA1IDIwLjUyOTMgMzguNTIgMjEuNTg5OEwyMy41ODQ2IDM2LjUyNTFDMjIuNTI0MiAzNy41ODU2IDIwLjgwNDggMzcuNTg1NiAxOS43NDQzIDM2LjUyNTFMMTIuOTU1NSAyOS43MzYzQzExLjg5NSAyOC42NzU5IDExLjg5NSAyNi45NTY1IDEyLjk1NTUgMjUuODk2QzE0LjAxNiAyNC44MzU1IDE1LjczNTQgMjQuODM1NSAxNi43OTU4IDI1Ljg5NkwyMS42NjQ1IDMwLjc2NDdMMzQuNjc5NyAxNy43NDk1QzM1Ljc0MDIgMTYuNjg5IDM3LjQ1OTUgMTYuNjg5IDM4LjUyIDE3Ljc0OTVaIiBmaWxsPSJ3aGl0ZSIvPgo8L3N2Zz4K';
|
|
35
|
+
|
|
36
|
+
exports.QRCodeStyling = QRCodeStyling;
|
|
37
|
+
exports.gatIconAlertSvg = gatIconAlertSvg;
|
|
38
|
+
exports.gatIconCheckSvg = gatIconCheckSvg;
|
|
39
|
+
exports.gatIconRefreshSvg = gatIconRefreshSvg;
|
|
40
|
+
exports.logoGatacaSvg = logoGatacaSvg;
|
|
@@ -3,8 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-93d47a75.js');
|
|
6
|
-
const
|
|
7
|
-
const qrCodeStyling = require('./qr-code-styling-412bbc7a.js');
|
|
6
|
+
const gatIconCheck = require('./gat-icon-check-c88a30ed.js');
|
|
8
7
|
const utils = require('./utils-b4e62bc0.js');
|
|
9
8
|
|
|
10
9
|
const GatacaQRDisplay = class {
|
|
@@ -16,14 +15,15 @@ const GatacaQRDisplay = class {
|
|
|
16
15
|
this.logoSize = 0;
|
|
17
16
|
this.logoSrc = undefined;
|
|
18
17
|
this.qrColor = '#1E1E20';
|
|
18
|
+
this.bgColor = '#FFFFFF';
|
|
19
19
|
this.rounded = true;
|
|
20
20
|
}
|
|
21
21
|
componentDidLoad() {
|
|
22
|
-
const qrCode = new
|
|
22
|
+
const qrCode = new gatIconCheck.QRCodeStyling({
|
|
23
23
|
data: this.qrData,
|
|
24
24
|
width: this.size,
|
|
25
25
|
height: this.size,
|
|
26
|
-
image: this.logoSize > 0 ? this.logoSrc ||
|
|
26
|
+
image: this.logoSize > 0 ? this.logoSrc || gatIconCheck.logoGatacaSvg : undefined,
|
|
27
27
|
margin: 10,
|
|
28
28
|
type: this.qrType,
|
|
29
29
|
dotsOptions: {
|
|
@@ -39,6 +39,9 @@ const GatacaQRDisplay = class {
|
|
|
39
39
|
imageOptions: {
|
|
40
40
|
margin: 2,
|
|
41
41
|
imageSize: this.logoSize
|
|
42
|
+
},
|
|
43
|
+
backgroundOptions: {
|
|
44
|
+
color: this.bgColor
|
|
42
45
|
}
|
|
43
46
|
});
|
|
44
47
|
qrCode.append(this.qr);
|
|
@@ -50,34 +53,9 @@ const GatacaQRDisplay = class {
|
|
|
50
53
|
}
|
|
51
54
|
};
|
|
52
55
|
|
|
53
|
-
const
|
|
54
|
-
const {
|
|
55
|
-
return
|
|
56
|
-
height: modalHeight ? (modalHeight === null || modalHeight === void 0 ? void 0 : modalHeight.toString()) + 'px' : '300px'
|
|
57
|
-
} },
|
|
58
|
-
index.h("img", { src: gatIconAlert.gatIconCheckSvg, height: 52, width: 52 }),
|
|
59
|
-
index.h("p", { class: "successMsg" }, successLoginLabel)));
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
const RetryButton = (props) => {
|
|
63
|
-
var _a;
|
|
64
|
-
const { errorMessage, modalWidth, clickInsideBoxLabel, refreshQrLabel, scanQrLabel, waitingStartSessionLabel, display, renderRetryQR } = props;
|
|
65
|
-
return (index.h("div", { class: "reload", style: {
|
|
66
|
-
width: (modalWidth - 48).toString() + 'px',
|
|
67
|
-
height: modalWidth ? ((_a = (modalWidth - 48)) === null || _a === void 0 ? void 0 : _a.toString()) + 'px' : ''
|
|
68
|
-
} },
|
|
69
|
-
index.h("div", { id: "notify", onClick: () => display() },
|
|
70
|
-
index.h("img", { src: gatIconAlert.gatIconRefreshSvg, height: 24, width: 24 }),
|
|
71
|
-
index.h("p", { class: "notify-text" },
|
|
72
|
-
clickInsideBoxLabel,
|
|
73
|
-
" "),
|
|
74
|
-
errorMessage ? index.h("p", { class: "notify-text bold" }, refreshQrLabel) : index.h("p", { class: "notify-text bold" }, scanQrLabel),
|
|
75
|
-
errorMessage && (index.h("div", { class: "alert", style: {
|
|
76
|
-
width: (modalWidth - 48).toString() + 'px'
|
|
77
|
-
} },
|
|
78
|
-
index.h("img", { src: gatIconAlert.gatIconAlertSvg, height: 24, width: 24 }),
|
|
79
|
-
index.h("p", null, errorMessage)))),
|
|
80
|
-
index.h("div", { id: "qrwait" }, renderRetryQR(waitingStartSessionLabel))));
|
|
56
|
+
const QR = (props) => {
|
|
57
|
+
const { value, useLogo, logoSrc, size, qrType, style } = props;
|
|
58
|
+
return index.h("gataca-qrdisplay", { qrData: value, rounded: true, qrType: qrType, size: size, "logo-size": useLogo ? 0.33 : 0, "logo-src": logoSrc, qrColor: style === null || style === void 0 ? void 0 : style.color, bgColor: style === null || style === void 0 ? void 0 : style.bgColor });
|
|
81
59
|
};
|
|
82
60
|
|
|
83
61
|
const AnimatedLoader = () => {
|
|
@@ -95,10 +73,12 @@ const AnimatedLoader = () => {
|
|
|
95
73
|
|
|
96
74
|
const ReadQR = (props) => {
|
|
97
75
|
var _a;
|
|
98
|
-
const { modalWidth, readQrMessages, renderQR, url, sizeQR } = props;
|
|
76
|
+
const { modalWidth, readQrMessages, renderQR, url, sizeQR, style } = props;
|
|
99
77
|
return (index.h("div", { class: "blured", style: {
|
|
100
78
|
width: (modalWidth - 48).toString() + 'px',
|
|
101
|
-
height: modalWidth ? ((_a = (modalWidth - 48)) === null || _a === void 0 ? void 0 : _a.toString()) + 'px' : ''
|
|
79
|
+
height: modalWidth ? ((_a = (modalWidth - 48)) === null || _a === void 0 ? void 0 : _a.toString()) + 'px' : '',
|
|
80
|
+
backgroundColor: style === null || style === void 0 ? void 0 : style.bgColor,
|
|
81
|
+
color: style === null || style === void 0 ? void 0 : style.color
|
|
102
82
|
} },
|
|
103
83
|
index.h("div", { id: "notify" },
|
|
104
84
|
index.h(AnimatedLoader, null),
|
|
@@ -109,19 +89,44 @@ const ReadQR = (props) => {
|
|
|
109
89
|
index.h("div", { id: "qrwait" }, renderQR(url, false, sizeQR))));
|
|
110
90
|
};
|
|
111
91
|
|
|
112
|
-
const
|
|
113
|
-
|
|
114
|
-
|
|
92
|
+
const RetryButton = (props) => {
|
|
93
|
+
var _a;
|
|
94
|
+
const { errorMessage, modalWidth, clickInsideBoxLabel, refreshQrLabel, scanQrLabel, waitingStartSessionLabel, display, renderRetryQR } = props;
|
|
95
|
+
return (index.h("div", { class: "reload", style: {
|
|
96
|
+
width: (modalWidth - 48).toString() + 'px',
|
|
97
|
+
height: modalWidth ? ((_a = (modalWidth - 48)) === null || _a === void 0 ? void 0 : _a.toString()) + 'px' : ''
|
|
98
|
+
} },
|
|
99
|
+
index.h("div", { id: "notify", onClick: () => display() },
|
|
100
|
+
index.h("img", { src: gatIconCheck.gatIconRefreshSvg, height: 24, width: 24 }),
|
|
101
|
+
index.h("p", { class: "notify-text" },
|
|
102
|
+
clickInsideBoxLabel,
|
|
103
|
+
" "),
|
|
104
|
+
errorMessage ? index.h("p", { class: "notify-text bold" }, refreshQrLabel) : index.h("p", { class: "notify-text bold" }, scanQrLabel),
|
|
105
|
+
errorMessage && (index.h("div", { class: "alert", style: {
|
|
106
|
+
width: (modalWidth - 48).toString() + 'px'
|
|
107
|
+
} },
|
|
108
|
+
index.h("img", { src: gatIconCheck.gatIconAlertSvg, height: 24, width: 24 }),
|
|
109
|
+
index.h("p", null, errorMessage)))),
|
|
110
|
+
index.h("div", { id: "qrwait" }, renderRetryQR(waitingStartSessionLabel))));
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
const Success = (props) => {
|
|
114
|
+
const { modalHeight, successLoginLabel } = props;
|
|
115
|
+
return (index.h("div", { class: 'success', style: {
|
|
116
|
+
height: modalHeight ? (modalHeight === null || modalHeight === void 0 ? void 0 : modalHeight.toString()) + 'px' : '300px'
|
|
117
|
+
} },
|
|
118
|
+
index.h("img", { src: gatIconCheck.gatIconCheckSvg, height: 52, width: 52 }),
|
|
119
|
+
index.h("p", { class: "successMsg" }, successLoginLabel)));
|
|
115
120
|
};
|
|
116
121
|
|
|
117
122
|
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)}}";
|
|
118
123
|
|
|
119
124
|
const DEEP_LINK_PREFIX = 'https://api.gataca.io/qr/redirect.html';
|
|
120
125
|
//Default values
|
|
121
|
-
const DEFAULT_SESSION_TIMEOUT = 300; //5mins as in connect
|
|
122
|
-
const DEFAULT_POLLING_FREQ = 3;
|
|
126
|
+
const DEFAULT_SESSION_TIMEOUT$1 = 300; //5mins as in connect
|
|
127
|
+
const DEFAULT_POLLING_FREQ$1 = 3;
|
|
123
128
|
const GatacaQR = class {
|
|
124
|
-
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.qrType = 'svg'; this.callbackServer = undefined; this.autostart = true; this.autorefresh = false; this.v = '3'; 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 =
|
|
129
|
+
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.qrType = 'svg'; this.callbackServer = undefined; this.autostart = true; this.autorefresh = false; this.v = '3'; 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 = gatIconCheck.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$1; this.pollingFrequency = DEFAULT_POLLING_FREQ$1; this.dynamicLink = true; this.qrStyle = undefined; this.sessionId = undefined; this.authenticationRequest = undefined; this.sessionData = undefined; this.result = utils.RESULT_STATUS.NOT_STARTED; }
|
|
125
130
|
disconnectedCallback() {
|
|
126
131
|
this.stop();
|
|
127
132
|
}
|
|
@@ -198,8 +203,8 @@ const GatacaQR = class {
|
|
|
198
203
|
return DEEP_LINK_PREFIX + authRequestEncoded;
|
|
199
204
|
}
|
|
200
205
|
async poll() {
|
|
201
|
-
let endTime = new Date().getTime() + (this.sessionTimeout || DEFAULT_SESSION_TIMEOUT) * 1000;
|
|
202
|
-
let interval = (this.pollingFrequency || DEFAULT_POLLING_FREQ) * 1000;
|
|
206
|
+
let endTime = new Date().getTime() + (this.sessionTimeout || DEFAULT_SESSION_TIMEOUT$1) * 1000;
|
|
207
|
+
let interval = (this.pollingFrequency || DEFAULT_POLLING_FREQ$1) * 1000;
|
|
203
208
|
let checkFunc = async (component) => {
|
|
204
209
|
if (component.result === utils.RESULT_STATUS.NOT_STARTED) {
|
|
205
210
|
return { result: utils.RESULT_STATUS.NOT_STARTED };
|
|
@@ -261,10 +266,10 @@ const GatacaQR = class {
|
|
|
261
266
|
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) });
|
|
262
267
|
}
|
|
263
268
|
renderQR(value, useLogo, sizeQR) {
|
|
264
|
-
return index.h(QR, { value: value, qrType: this.qrType, useLogo: useLogo && this.logoSize !== 0, size: sizeQR || (this === null || this === void 0 ? void 0 : this.qrSize) || undefined, logoSrc: this === null || this === void 0 ? void 0 : this.logoSrc });
|
|
269
|
+
return index.h(QR, { value: value, qrType: this.qrType, useLogo: useLogo && this.logoSize !== 0, size: sizeQR || (this === null || this === void 0 ? void 0 : this.qrSize) || undefined, logoSrc: this === null || this === void 0 ? void 0 : this.logoSrc, style: this === null || this === void 0 ? void 0 : this.qrStyle });
|
|
265
270
|
}
|
|
266
271
|
renderRetryQR(value, useLogo) {
|
|
267
|
-
return index.h(QR, { value: value, useLogo: useLogo && this.logoSize !== 0, qrType: this.qrType, size: (this === null || this === void 0 ? void 0 : this.qrSize) ? (this === null || this === void 0 ? void 0 : this.qrSize) - 50 : undefined, logoSrc: this === null || this === void 0 ? void 0 : this.logoSrc });
|
|
272
|
+
return index.h(QR, { value: value, useLogo: useLogo && this.logoSize !== 0, qrType: this.qrType, size: (this === null || this === void 0 ? void 0 : this.qrSize) ? (this === null || this === void 0 ? void 0 : this.qrSize) - 50 : undefined, logoSrc: this === null || this === void 0 ? void 0 : this.logoSrc, style: this === null || this === void 0 ? void 0 : this.qrStyle });
|
|
268
273
|
}
|
|
269
274
|
render() {
|
|
270
275
|
var _a, _b;
|
|
@@ -273,7 +278,7 @@ const GatacaQR = class {
|
|
|
273
278
|
height: this.modalHeight ? ((_a = (this.modalHeight - 2)) === null || _a === void 0 ? void 0 : _a.toString()) + 'px' : ''
|
|
274
279
|
}, onClick: (event) => {
|
|
275
280
|
event.stopPropagation();
|
|
276
|
-
} }, index.h("div", { class: "modal-window__content" }, index.h("div", { class: `qrTitleContainer ${this.hideModalTexts ? 'hidenText' : ''}` }, index.h("p", { class: "qrTitle modalText", style: { color: this.modalTitleColor || '#1e1e20' } }, this.qrModalTitle), !this.hideBrandTitle && (index.h("p", { class: "qrBrand modalText" }, this.byBrandLabel, ' ', index.h("span", null, index.h("img", { src:
|
|
281
|
+
} }, index.h("div", { class: "modal-window__content" }, index.h("div", { class: `qrTitleContainer ${this.hideModalTexts ? 'hidenText' : ''}` }, index.h("p", { class: "qrTitle modalText", style: { color: this.modalTitleColor || '#1e1e20' } }, this.qrModalTitle), !this.hideBrandTitle && (index.h("p", { class: "qrBrand modalText" }, this.byBrandLabel, ' ', index.h("span", null, index.h("img", { src: gatIconCheck.logoGatacaSvg })))), this.result !== utils.RESULT_STATUS.SUCCESS && !this.hideQrModalDescription && index.h("p", { class: "qrDescription modalText" }, this.qrModalDescription)), index.h("div", { class: "qrSection", style: {
|
|
277
282
|
width: this.modalWidth.toString() + 'px',
|
|
278
283
|
height: this.modalWidth ? ((_b = this.modalWidth) === null || _b === void 0 ? void 0 : _b.toString()) + 'px' : ''
|
|
279
284
|
} }, this.renderQRSection())))));
|
|
@@ -281,5 +286,335 @@ const GatacaQR = class {
|
|
|
281
286
|
};
|
|
282
287
|
GatacaQR.style = gatacaQrCss;
|
|
283
288
|
|
|
289
|
+
const gatacaSsibuttonCss = "@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}.buttonContainer{display:inline-block;text-align:right;padding:10px;position:relative}.gatacaButtonWrapper{margin:8px}.gatacaButtonWrapper .gatacaButton{display:flex;min-width:100px;padding:8px 8px;background-color:white;font-size:12px;font-family:\"Work Sans\", sans-serif;letter-spacing:1px;font-weight:2;justify-content:space-between;align-items:center;border-radius:6px;border:1px solid rgba(24, 27, 94, 0.5);color:rgba(24, 27, 94, 0.8);box-shadow:0px 1px 3px rgba(48, 48, 48, 0.15);cursor:pointer}.gatacaButtonWrapper .gatacaButton>span{margin-right:10px}.gatacaButtonWrapper .gatacaButton:hover{box-shadow:0px 2px 8px rgba(48, 48, 48, 0.1)}.gatacaButtonWrapper .buttonText{text-align:right;font-size:8px;color:rgba(24, 27, 94, 0.5);font-family:\"Helvetica Neue\", sans-serif;letter-spacing:1px;padding-right:8px;font-weight:1}.gatacaButtonWrapper .buttonImg{height:25px;width:25px;margin:0;margin-right:20px}";
|
|
290
|
+
|
|
291
|
+
const PHONE_ICON = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABsAAAAbCAYAAACN1PRVAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAHvSURBVHgB3ZZPTttAFMbfe3YjL7qYLopcpZXSG7Q3CDfIsqrSJpyg5QQtJ2h7glgUdVs4AeEE5AYEQSDAgtnw357Hm0hAQDaeIRFCfFKyeKPxzzPzvc+DUKCZN80GEv1ABgWOQgSdGbOwv7u0nDueV4zjTzUIKhuAZna4vdQFR828azbI0K/TI/qodaLvjlP+tLDGDCs+IKv9Lbsi7kcv0w9541Q0EREPYcoieEQ9KiyECRXHzbpBUOcnYTfPFOOaaGVx9WsLiDrSIp0iU0wFNgIx/AQyc9I/OmOjy+Y8aBvHQcDUYebewc6/Xtk8J5htcg5efEPGhk0JtqkyBjo7DuZcnuO2sqCyKv8rUDmfTS9IBURqBAL+I6CkzBjOMOs22TLY21n8fl17KzXR3uDvb/CQk0GEdfvN07QvpnAOaGfYaRT25JzU6+rnG2tTpcWAy+Cp0m3U/URLms8HWfg/rn6RFaGSs9KQkZMpvGBWNs2Vandt46ac6YNBuc0fDLMaOU5DFybQ8039p/KJ4bq4rwPewtqoM/1gsCm/NfBXvWjgHhhuDAeLyd3qVSifHQULeZkou9EqemLhmUmav8qrZ4GEMGA7ivzjKvfeqGptFV2YdWPMPHHq0cCh3DdpVdLl/XCY9J1gVvbCiWa6N+JLocPFjCsx9cAAAAAASUVORK5CYII=';
|
|
292
|
+
//Default values
|
|
293
|
+
const DEFAULT_SESSION_TIMEOUT = 300; //5mins as in connect
|
|
294
|
+
const DEFAULT_POLLING_FREQ = 3;
|
|
295
|
+
const GatacaSSIButton = class {
|
|
296
|
+
constructor(hostRef) {
|
|
297
|
+
index.registerInstance(this, hostRef);
|
|
298
|
+
this.gatacaLoginCompleted = index.createEvent(this, "gatacaLoginCompleted", 7);
|
|
299
|
+
this.gatacaLoginFailed = index.createEvent(this, "gatacaLoginFailed", 7);
|
|
300
|
+
this.gatacaButtonPushed = index.createEvent(this, "gatacaButtonPushed", 7);
|
|
301
|
+
this.getRequestFromUri = async (authRequest) => {
|
|
302
|
+
const requrl = new URL(authRequest);
|
|
303
|
+
const requri = requrl.searchParams.get('request_uri');
|
|
304
|
+
if (requri) {
|
|
305
|
+
const response = await fetch(requri, {
|
|
306
|
+
method: 'GET',
|
|
307
|
+
headers: {
|
|
308
|
+
'Content-Type': 'application/json'
|
|
309
|
+
}
|
|
310
|
+
});
|
|
311
|
+
const jwt = await response.json();
|
|
312
|
+
const parts = jwt.split('.');
|
|
313
|
+
const base64 = parts[1].replace(/-/g, '+').replace(/_/g, '/');
|
|
314
|
+
const decoded = window.atob(base64);
|
|
315
|
+
let parsed = JSON.parse(decoded);
|
|
316
|
+
parsed.response_mode = 'dc_api';
|
|
317
|
+
return parsed;
|
|
318
|
+
}
|
|
319
|
+
};
|
|
320
|
+
this.buttonText = 'Easy login';
|
|
321
|
+
this.buttonDCAPIText = 'Login with Device Credentials';
|
|
322
|
+
this.qrType = 'svg';
|
|
323
|
+
this.autostart = true;
|
|
324
|
+
this.checkStatus = undefined;
|
|
325
|
+
this.createSession = undefined;
|
|
326
|
+
this.fillSession = undefined;
|
|
327
|
+
this.successCallback = undefined;
|
|
328
|
+
this.errorCallback = undefined;
|
|
329
|
+
this.handleCheckAppLoading = undefined;
|
|
330
|
+
this.checkAppTimeout = 6;
|
|
331
|
+
this.qrRole = undefined;
|
|
332
|
+
this.callbackServer = undefined;
|
|
333
|
+
this.sessionTimeout = undefined;
|
|
334
|
+
this.pollingFrequency = undefined;
|
|
335
|
+
this.autorefresh = false;
|
|
336
|
+
this.v = '3';
|
|
337
|
+
this.qrModalTitle = 'Quick Access';
|
|
338
|
+
this.modalTitleColor = '#4745B7';
|
|
339
|
+
this.qrModalDescription = 'Sign up or sign in by scanning the QR Code with the Gataca Wallet';
|
|
340
|
+
this.hideBrandTitle = false;
|
|
341
|
+
this.dynamicLink = true;
|
|
342
|
+
this.logoSize = 0;
|
|
343
|
+
this.logoSrc = undefined;
|
|
344
|
+
this.qrCodeExpiredLabel = 'QR Code expired';
|
|
345
|
+
this.credentialsNotValidatedLabel = 'User credentials not validated';
|
|
346
|
+
this.clickInsideBoxLabel = 'Click inside the box to';
|
|
347
|
+
this.refreshQrLabel = 'Refresh QR Code';
|
|
348
|
+
this.scanQrLabel = 'Scan QR Code';
|
|
349
|
+
this.userNotScanInTimeErrorLabel = 'User did not scan the QR in the allowed time';
|
|
350
|
+
this.credsNotValidatedErrorLabel = "Provided user credentials couldn't be validated";
|
|
351
|
+
this.failedLoginErrorLabel = 'No successful login';
|
|
352
|
+
this.successLoginLabel = 'Successful Connection!';
|
|
353
|
+
this.byBrandLabel = 'by Gataca';
|
|
354
|
+
this.waitingStartSessionLabel = 'waiting to start a session';
|
|
355
|
+
this.enableDcApi = false;
|
|
356
|
+
this.hideQrModalDescription = false;
|
|
357
|
+
this.qrStyle = undefined;
|
|
358
|
+
this.open = false;
|
|
359
|
+
this.sessionId = undefined;
|
|
360
|
+
this.authenticationRequest = undefined;
|
|
361
|
+
this.sessionData = undefined;
|
|
362
|
+
this.result = utils.RESULT_STATUS.NOT_STARTED;
|
|
363
|
+
this.qr = (index.h("gataca-qr", { ref: (el) => (this.qrElement = el), checkStatus: this.checkStatus, createSession: this.createSession, successCallback: this.successCallback, errorCallback: this.errorCallback, qrRole: this.qrRole, qrType: this.qrType, callbackServer: this.callbackServer, sessionTimeout: this.sessionTimeout, pollingFrequency: this.pollingFrequency, autostart: this.autostart, autorefresh: this.autorefresh, v: this.v, qrModalTitle: this.qrModalTitle, qrModalDescription: this.qrModalDescription, hideBrandTitle: this.hideBrandTitle, dynamicLink: this.dynamicLink, logoSize: this.logoSize, logoSrc: this.logoSrc, modalTitleColor: this.modalTitleColor, qrCodeExpiredLabel: this.qrCodeExpiredLabel, credentialsNotValidatedLabel: this.credentialsNotValidatedLabel, clickInsideBoxLabel: this.clickInsideBoxLabel, refreshQrLabel: this.refreshQrLabel, scanQrLabel: this.scanQrLabel, userNotScanInTimeErrorLabel: this.userNotScanInTimeErrorLabel, credsNotValidatedErrorLabel: this.credsNotValidatedErrorLabel, failedLoginErrorLabel: this.failedLoginErrorLabel, successLoginLabel: this.successLoginLabel, byBrandLabel: this.byBrandLabel, waitingStartSessionLabel: this.waitingStartSessionLabel, hideQrModalDescription: this.hideQrModalDescription, qrStyle: this.qrStyle }));
|
|
364
|
+
}
|
|
365
|
+
supportsDCAPI() {
|
|
366
|
+
// let mobile = checkMobile();
|
|
367
|
+
// if (!mobile) return false;
|
|
368
|
+
if (!this.enableDcApi) {
|
|
369
|
+
return false;
|
|
370
|
+
}
|
|
371
|
+
//@ts-ignore
|
|
372
|
+
if (typeof window.DigitalCredential === 'undefined')
|
|
373
|
+
return false;
|
|
374
|
+
const protocols = ['org-iso-mdoc', 'openid4vp', 'openid4vci'];
|
|
375
|
+
//@ts-ignore
|
|
376
|
+
const supportedProtocols = protocols.filter(window.DigitalCredential.userAgentAllowsProtocol);
|
|
377
|
+
console.log(supportedProtocols, protocols);
|
|
378
|
+
return true;
|
|
379
|
+
}
|
|
380
|
+
/**
|
|
381
|
+
* Retrieve manually the session data on a successful login
|
|
382
|
+
*/
|
|
383
|
+
async getSessionData() {
|
|
384
|
+
return this.qr.getSessionData();
|
|
385
|
+
}
|
|
386
|
+
async getSessionId() {
|
|
387
|
+
if (this.sessionId) {
|
|
388
|
+
return this.sessionId;
|
|
389
|
+
}
|
|
390
|
+
let { sessionId, authenticationRequest } = await this.createSession();
|
|
391
|
+
this.sessionId = sessionId;
|
|
392
|
+
this.authenticationRequest = authenticationRequest;
|
|
393
|
+
return this.sessionId;
|
|
394
|
+
}
|
|
395
|
+
/**
|
|
396
|
+
* Force manually the start polling
|
|
397
|
+
*/
|
|
398
|
+
async startMobilePolling() {
|
|
399
|
+
await this.getSessionId();
|
|
400
|
+
this.result = utils.RESULT_STATUS.ONGOING;
|
|
401
|
+
this.poll()
|
|
402
|
+
.then((data) => {
|
|
403
|
+
this.result = utils.RESULT_STATUS.SUCCESS;
|
|
404
|
+
this.sessionData = data;
|
|
405
|
+
this.gatacaLoginCompleted.emit(data);
|
|
406
|
+
this.successCallback(data);
|
|
407
|
+
})
|
|
408
|
+
.catch((err) => {
|
|
409
|
+
this.clean();
|
|
410
|
+
let expired = err === utils.RESULT_STATUS.EXPIRED;
|
|
411
|
+
if (expired && this.autorefresh) {
|
|
412
|
+
this.startMobilePolling();
|
|
413
|
+
}
|
|
414
|
+
else {
|
|
415
|
+
if (err !== utils.RESULT_STATUS.NOT_STARTED) {
|
|
416
|
+
let error = expired ? new Error(this.userNotScanInTimeErrorLabel) : new Error(this.credsNotValidatedErrorLabel);
|
|
417
|
+
this.result = err;
|
|
418
|
+
this.gatacaLoginFailed.emit(error);
|
|
419
|
+
this.errorCallback(error);
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
});
|
|
423
|
+
}
|
|
424
|
+
/**
|
|
425
|
+
* Stop manually an ongoing session
|
|
426
|
+
*/
|
|
427
|
+
async stop() {
|
|
428
|
+
this.clean();
|
|
429
|
+
if (this.result === utils.RESULT_STATUS.ONGOING || utils.RESULT_STATUS.READ) {
|
|
430
|
+
this.result = utils.RESULT_STATUS.NOT_STARTED;
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
clean() {
|
|
434
|
+
this.sessionData = undefined;
|
|
435
|
+
this.sessionId = undefined;
|
|
436
|
+
}
|
|
437
|
+
renderModal() {
|
|
438
|
+
return this.qr;
|
|
439
|
+
}
|
|
440
|
+
async poll() {
|
|
441
|
+
let endTime = new Date().getTime() + (this.sessionTimeout || DEFAULT_SESSION_TIMEOUT) * 1000;
|
|
442
|
+
let interval = (this.pollingFrequency || DEFAULT_POLLING_FREQ) * 1000;
|
|
443
|
+
let checkFunc = async (component) => {
|
|
444
|
+
if (component.result === utils.RESULT_STATUS.NOT_STARTED) {
|
|
445
|
+
return { result: utils.RESULT_STATUS.NOT_STARTED };
|
|
446
|
+
}
|
|
447
|
+
let id = await component.getSessionId();
|
|
448
|
+
return component.checkStatus(id);
|
|
449
|
+
};
|
|
450
|
+
let component = this;
|
|
451
|
+
let checkCondition = async function (resolve, reject) {
|
|
452
|
+
// If the condition is met, we're done!
|
|
453
|
+
let { result, data } = await checkFunc(component);
|
|
454
|
+
switch (result) {
|
|
455
|
+
case utils.RESULT_STATUS.SUCCESS:
|
|
456
|
+
resolve(data);
|
|
457
|
+
break;
|
|
458
|
+
case utils.RESULT_STATUS.READ:
|
|
459
|
+
component.result = utils.RESULT_STATUS.READ;
|
|
460
|
+
case utils.RESULT_STATUS.ONGOING:
|
|
461
|
+
if (component.sessionTimeout > 0 && new Date().getTime() < endTime) {
|
|
462
|
+
setTimeout(checkCondition, interval, resolve, reject);
|
|
463
|
+
}
|
|
464
|
+
else {
|
|
465
|
+
reject(utils.RESULT_STATUS.EXPIRED);
|
|
466
|
+
}
|
|
467
|
+
break;
|
|
468
|
+
default:
|
|
469
|
+
reject(result);
|
|
470
|
+
break;
|
|
471
|
+
}
|
|
472
|
+
};
|
|
473
|
+
return new Promise(checkCondition);
|
|
474
|
+
}
|
|
475
|
+
isAppInstalled(appScheme, callback) {
|
|
476
|
+
let timeout;
|
|
477
|
+
let detected = false;
|
|
478
|
+
if (appScheme === null || appScheme === void 0 ? void 0 : appScheme.length) {
|
|
479
|
+
window.location.href = appScheme;
|
|
480
|
+
}
|
|
481
|
+
const waitTimeToCheckApp = this.checkAppTimeout * 1000;
|
|
482
|
+
timeout = setTimeout(() => {
|
|
483
|
+
if (!detected) {
|
|
484
|
+
callback(false);
|
|
485
|
+
}
|
|
486
|
+
cleanup();
|
|
487
|
+
}, waitTimeToCheckApp);
|
|
488
|
+
const handleVisibilityChange = () => {
|
|
489
|
+
if (document.hidden) {
|
|
490
|
+
detected = true;
|
|
491
|
+
callback(true);
|
|
492
|
+
if (!this.autostart) {
|
|
493
|
+
this.startMobilePolling();
|
|
494
|
+
}
|
|
495
|
+
cleanup();
|
|
496
|
+
}
|
|
497
|
+
};
|
|
498
|
+
document.addEventListener('visibilitychange', handleVisibilityChange);
|
|
499
|
+
function cleanup() {
|
|
500
|
+
clearTimeout(timeout);
|
|
501
|
+
document.removeEventListener('visibilitychange', handleVisibilityChange);
|
|
502
|
+
}
|
|
503
|
+
}
|
|
504
|
+
renderDesktopButton() {
|
|
505
|
+
return (index.h("div", { class: "gatacaButtonWrapper" }, index.h("button", { class: "gatacaButton", onClick: () => {
|
|
506
|
+
this.open = !this.open;
|
|
507
|
+
setTimeout(() => {
|
|
508
|
+
var _a, _b;
|
|
509
|
+
if (this.open) {
|
|
510
|
+
(_a = this.qrElement) === null || _a === void 0 ? void 0 : _a.display();
|
|
511
|
+
}
|
|
512
|
+
else {
|
|
513
|
+
(_b = this.qrElement) === null || _b === void 0 ? void 0 : _b.stop();
|
|
514
|
+
}
|
|
515
|
+
}, 0);
|
|
516
|
+
} }, index.h("img", { src: PHONE_ICON, class: "buttonImg", alt: this.buttonText }), index.h("span", null, this.buttonText))));
|
|
517
|
+
}
|
|
518
|
+
async getAuthRequest() {
|
|
519
|
+
let { authenticationRequest } = await this.createSession();
|
|
520
|
+
return authenticationRequest;
|
|
521
|
+
}
|
|
522
|
+
renderMobileButton(isAndroid, isIos) {
|
|
523
|
+
if (this.autostart && !this.supportsDCAPI()) {
|
|
524
|
+
this.startMobilePolling();
|
|
525
|
+
}
|
|
526
|
+
let loading = false;
|
|
527
|
+
const handleLoading = (isLoading) => {
|
|
528
|
+
loading = isLoading;
|
|
529
|
+
if (this.handleCheckAppLoading) {
|
|
530
|
+
this.handleCheckAppLoading(isLoading);
|
|
531
|
+
}
|
|
532
|
+
};
|
|
533
|
+
const executeRedirection = async () => {
|
|
534
|
+
handleLoading(true);
|
|
535
|
+
const androidStoreLink = 'https://play.google.com/store/apps/details?id=com.gataca.identity';
|
|
536
|
+
const iosStoreLink = 'https://apps.apple.com/us/app/gataca/id1498607616';
|
|
537
|
+
try {
|
|
538
|
+
const appScheme = await this.getAuthRequest();
|
|
539
|
+
this.isAppInstalled(appScheme, (installed) => {
|
|
540
|
+
if (!installed) {
|
|
541
|
+
this.stop();
|
|
542
|
+
if (isAndroid) {
|
|
543
|
+
window.location.href = androidStoreLink;
|
|
544
|
+
}
|
|
545
|
+
else if (isIos) {
|
|
546
|
+
window.location.href = iosStoreLink;
|
|
547
|
+
}
|
|
548
|
+
}
|
|
549
|
+
handleLoading(false);
|
|
550
|
+
});
|
|
551
|
+
}
|
|
552
|
+
catch (error) {
|
|
553
|
+
this.stop();
|
|
554
|
+
handleLoading(false);
|
|
555
|
+
}
|
|
556
|
+
};
|
|
557
|
+
return (index.h("div", { class: "gatacaButtonWrapper" }, index.h("button", { class: "gatacaButton", onClick: () => {
|
|
558
|
+
this.gatacaButtonPushed.emit();
|
|
559
|
+
executeRedirection();
|
|
560
|
+
}, disabled: loading }, index.h("img", { src: PHONE_ICON, class: "buttonImg", alt: this.buttonText }), index.h("span", null, this.buttonText))));
|
|
561
|
+
}
|
|
562
|
+
renderDCAPIButton(isAndroid, isIos) {
|
|
563
|
+
let loading = false;
|
|
564
|
+
console.log('Maybe act different', isAndroid, isIos);
|
|
565
|
+
const handleLoading = (isLoading) => {
|
|
566
|
+
loading = isLoading;
|
|
567
|
+
if (this.handleCheckAppLoading) {
|
|
568
|
+
this.handleCheckAppLoading(isLoading);
|
|
569
|
+
}
|
|
570
|
+
};
|
|
571
|
+
const executeDCAPICall = async () => {
|
|
572
|
+
handleLoading(true);
|
|
573
|
+
try {
|
|
574
|
+
const authRequest = await this.getAuthRequest();
|
|
575
|
+
let request = await this.getRequestFromUri(authRequest);
|
|
576
|
+
let credentialResponse = await navigator.credentials.get({
|
|
577
|
+
//@ts-ignore
|
|
578
|
+
digital: {
|
|
579
|
+
requests: [
|
|
580
|
+
{
|
|
581
|
+
protocol: 'openid4vp-v1-unsigned',
|
|
582
|
+
data: request
|
|
583
|
+
}
|
|
584
|
+
]
|
|
585
|
+
}
|
|
586
|
+
});
|
|
587
|
+
if (credentialResponse.constructor.name == 'DigitalCredential') {
|
|
588
|
+
console.log('Digital Credential - Response Data: ' + credentialResponse);
|
|
589
|
+
}
|
|
590
|
+
//@ts-ignore
|
|
591
|
+
await this.fillSession(request, credentialResponse === null || credentialResponse === void 0 ? void 0 : credentialResponse.data);
|
|
592
|
+
}
|
|
593
|
+
catch (error) {
|
|
594
|
+
this.stop();
|
|
595
|
+
handleLoading(false);
|
|
596
|
+
}
|
|
597
|
+
};
|
|
598
|
+
return (index.h("div", { class: "gatacaButtonWrapper" }, index.h("button", { class: "gatacaButton", onClick: () => {
|
|
599
|
+
this.gatacaButtonPushed.emit();
|
|
600
|
+
executeDCAPICall();
|
|
601
|
+
}, disabled: loading }, index.h("img", { src: PHONE_ICON, class: "buttonImg", alt: this.buttonDCAPIText }), index.h("span", null, this.buttonDCAPIText))));
|
|
602
|
+
}
|
|
603
|
+
render() {
|
|
604
|
+
const userAgent =
|
|
605
|
+
// @ts-ignore
|
|
606
|
+
(navigator === null || navigator === void 0 ? void 0 : navigator.userAgent) || (navigator === null || navigator === void 0 ? void 0 : navigator.vendor) || (window === null || window === void 0 ? void 0 : window.opera);
|
|
607
|
+
const isAndroid = /android/i.test(userAgent);
|
|
608
|
+
const isIos =
|
|
609
|
+
// @ts-ignore
|
|
610
|
+
(/iPad|iPhone|iPod/.test(userAgent) && !window.MSStream) || (navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1);
|
|
611
|
+
const isMobile = isAndroid || isIos;
|
|
612
|
+
const displayDCApi = this.supportsDCAPI();
|
|
613
|
+
return (index.h("div", null, index.h("div", { class: "buttonContainer" }, isMobile && this.v === '3' ? this.renderMobileButton(isAndroid, isIos) : this.renderDesktopButton(), this.open && (!isMobile || this.v === '3') && this.renderModal()), displayDCApi /** && isMobile */ && index.h("div", { class: "buttonContainer" }, this.renderDCAPIButton(isAndroid, isIos))));
|
|
614
|
+
}
|
|
615
|
+
};
|
|
616
|
+
GatacaSSIButton.style = gatacaSsibuttonCss;
|
|
617
|
+
|
|
284
618
|
exports.gataca_qr = GatacaQR;
|
|
285
619
|
exports.gataca_qrdisplay = GatacaQRDisplay;
|
|
620
|
+
exports.gataca_ssibutton = GatacaSSIButton;
|
|
@@ -3,8 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-93d47a75.js');
|
|
6
|
-
const
|
|
7
|
-
require('./qr-code-styling-412bbc7a.js');
|
|
6
|
+
const gatIconCheck = require('./gat-icon-check-c88a30ed.js');
|
|
8
7
|
const utils = require('./utils-b4e62bc0.js');
|
|
9
8
|
|
|
10
9
|
const Success = (props) => {
|
|
@@ -12,7 +11,7 @@ const Success = (props) => {
|
|
|
12
11
|
return (index.h("div", { class: 'success', style: {
|
|
13
12
|
height: modalHeight ? (modalHeight === null || modalHeight === void 0 ? void 0 : modalHeight.toString()) + 'px' : '300px'
|
|
14
13
|
} },
|
|
15
|
-
index.h("img", { src:
|
|
14
|
+
index.h("img", { src: gatIconCheck.gatIconCheckSvg, height: 52, width: 52 }),
|
|
16
15
|
index.h("p", { class: "successMsg" }, successLoginLabel)));
|
|
17
16
|
};
|
|
18
17
|
|
|
@@ -24,7 +23,7 @@ const RetryButton = (props) => {
|
|
|
24
23
|
height: modalWidth ? ((_a = (modalWidth - 48)) === null || _a === void 0 ? void 0 : _a.toString()) + 'px' : ''
|
|
25
24
|
} },
|
|
26
25
|
index.h("div", { id: "notify", onClick: () => display() },
|
|
27
|
-
index.h("img", { src:
|
|
26
|
+
index.h("img", { src: gatIconCheck.gatIconRefreshSvg, height: 24, width: 24 }),
|
|
28
27
|
index.h("p", { class: "notify-text" },
|
|
29
28
|
clickInsideBoxLabel,
|
|
30
29
|
" "),
|
|
@@ -32,7 +31,7 @@ const RetryButton = (props) => {
|
|
|
32
31
|
errorMessage && (index.h("div", { class: "alert", style: {
|
|
33
32
|
width: (modalWidth - 48).toString() + 'px'
|
|
34
33
|
} },
|
|
35
|
-
index.h("img", { src:
|
|
34
|
+
index.h("img", { src: gatIconCheck.gatIconAlertSvg, height: 24, width: 24 }),
|
|
36
35
|
index.h("p", null, errorMessage)))),
|
|
37
36
|
index.h("div", { id: "qrwait" }, renderRetryQR(waitingStartSessionLabel))));
|
|
38
37
|
};
|
|
@@ -77,7 +76,7 @@ const DEEP_LINK_PREFIX = 'https://api.gataca.io/qr/redirect.html';
|
|
|
77
76
|
const DEFAULT_SESSION_TIMEOUT = 300;
|
|
78
77
|
const QR_ROLE_CONNECT = 'connect';
|
|
79
78
|
const GatacaQRWS = class {
|
|
80
|
-
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.qrType = 'svg'; this.callbackServer = undefined; this.socketEndpoint = undefined; this.sessionTimeout = DEFAULT_SESSION_TIMEOUT; this.wsOnOpen = undefined; this.wsOnMessage = undefined; this.autostart = true; this.autorefresh = false; this.v = '3'; 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 =
|
|
79
|
+
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.qrType = 'svg'; this.callbackServer = undefined; this.socketEndpoint = undefined; this.sessionTimeout = DEFAULT_SESSION_TIMEOUT; this.wsOnOpen = undefined; this.wsOnMessage = undefined; this.autostart = true; this.autorefresh = false; this.v = '3'; 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 = gatIconCheck.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; }
|
|
81
80
|
disconnectedCallback() {
|
|
82
81
|
this.stop();
|
|
83
82
|
}
|
|
@@ -234,7 +233,7 @@ const GatacaQRWS = class {
|
|
|
234
233
|
height: this.modalHeight ? ((_a = (this.modalHeight - 2)) === null || _a === void 0 ? void 0 : _a.toString()) + 'px' : ''
|
|
235
234
|
}, onClick: (event) => {
|
|
236
235
|
event.stopPropagation();
|
|
237
|
-
} }, index.h("div", { class: "modal-window__content" }, index.h("div", { class: `qrTitleContainer ${this.hideModalTexts ? 'hidenText' : ''}` }, index.h("p", { class: "qrTitle modalText", style: { color: this.modalTitleColor || '#1e1e20' } }, this.qrModalTitle), !this.hideBrandTitle && (index.h("p", { class: "qrBrand modalText" }, this.byBrandLabel, ' ', index.h("span", null, index.h("img", { src:
|
|
236
|
+
} }, index.h("div", { class: "modal-window__content" }, index.h("div", { class: `qrTitleContainer ${this.hideModalTexts ? 'hidenText' : ''}` }, index.h("p", { class: "qrTitle modalText", style: { color: this.modalTitleColor || '#1e1e20' } }, this.qrModalTitle), !this.hideBrandTitle && (index.h("p", { class: "qrBrand modalText" }, this.byBrandLabel, ' ', index.h("span", null, index.h("img", { src: gatIconCheck.logoGatacaSvg })))), this.result !== utils.RESULT_STATUS.SUCCESS && !this.hideQrModalDescription && index.h("p", { class: "qrDescription modalText" }, this.qrModalDescription)), index.h("div", { class: "qrSection", style: {
|
|
238
237
|
width: this.modalWidth.toString() + 'px',
|
|
239
238
|
height: this.modalWidth ? ((_b = this.modalWidth) === null || _b === void 0 ? void 0 : _b.toString()) + 'px' : ''
|
|
240
239
|
} }, this.renderQRSection())))));
|