@gataca/qr 0.0.10 → 0.0.12
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-alert-6127161a.js} +15 -1
- package/dist/cjs/{gataca-qr_2.cjs.entry.js → gataca-qr_3.cjs.entry.js} +281 -17
- package/dist/cjs/gataca-qrws.cjs.entry.js +1 -2
- package/dist/cjs/gataca-ssibuttonws.cjs.entry.js +60 -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/gataca-qr.js +25 -6
- package/dist/collection/components/gataca-qrdisplay/gataca-qrdisplay.js +24 -2
- package/dist/collection/components/gataca-ssibutton/gataca-ssibutton.js +23 -1
- package/dist/components/gataca-qr2.js +11 -8
- package/dist/components/gataca-qrdisplay2.js +8 -2
- package/dist/components/gataca-ssibutton2.js +7 -1
- package/dist/{cjs/qr-code-styling-412bbc7a.js → esm/gat-icon-alert-c9761842.js} +8 -2
- package/dist/esm/{gataca-qr_2.entry.js → gataca-qr_3.entry.js} +280 -17
- package/dist/esm/gataca-qrws.entry.js +1 -2
- package/dist/esm/gataca-ssibuttonws.entry.js +56 -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-8464955a.entry.js +1 -0
- package/dist/gatacaqr/p-bdd385ad.entry.js +1 -0
- package/dist/gatacaqr/p-d79c8f74.js +1 -0
- package/dist/gatacaqr/p-e956c420.entry.js +1 -0
- package/dist/types/components/gataca-qr/components/qr/QR.d.ts +1 -0
- package/dist/types/components/gataca-qr/gataca-qr.d.ts +5 -0
- package/dist/types/components/gataca-qrdisplay/gataca-qrdisplay.d.ts +5 -0
- package/dist/types/components/gataca-ssibutton/gataca-ssibutton.d.ts +5 -0
- package/dist/types/components.d.ts +24 -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 -315
- package/dist/esm/gat-icon-alert-7b06ef3a.js +0 -9
- package/dist/esm/gataca-ssibutton_2.entry.js +0 -310
- package/dist/gatacaqr/p-0be4566d.js +0 -1
- package/dist/gatacaqr/p-16298cb4.entry.js +0 -1
- package/dist/gatacaqr/p-328d4254.entry.js +0 -1
- package/dist/gatacaqr/p-9e9af27e.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 gatIconCheckSvg = 'data:image/svg+xml;base64,Cjxzdmcgd2lkdGg9IjUyIiBoZWlnaHQ9IjUzIiB2aWV3Qm94PSIwIDAgNTIgNTMiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxjaXJjbGUgY3g9IjI2IiBjeT0iMjYuNjcxOSIgcj0iMjYiIGZpbGw9IiMzRDlBNTAiLz4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0zOC41MiAxNy43NDk1QzM5LjU4MDUgMTguODA5OSAzOS41ODA1IDIwLjUyOTMgMzguNTIgMjEuNTg5OEwyMy41ODQ2IDM2LjUyNTFDMjIuNTI0MiAzNy41ODU2IDIwLjgwNDggMzcuNTg1NiAxOS43NDQzIDM2LjUyNTFMMTIuOTU1NSAyOS43MzYzQzExLjg5NSAyOC42NzU5IDExLjg5NSAyNi45NTY1IDEyLjk1NTUgMjUuODk2QzE0LjAxNiAyNC44MzU1IDE1LjczNTQgMjQuODM1NSAxNi43OTU4IDI1Ljg5NkwyMS42NjQ1IDMwLjc2NDdMMzQuNjc5NyAxNy43NDk1QzM1Ljc0MDIgMTYuNjg5IDM3LjQ1OTUgMTYuNjg5IDM4LjUyIDE3Ljc0OTVaIiBmaWxsPSJ3aGl0ZSIvPgo8L3N2Zz4K';
|
|
31
|
+
|
|
32
|
+
const gatIconRefreshSvg = 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTIzIDRWMTBIMTciIHN0cm9rZT0iIzhCOEI4QiIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPHBhdGggZD0iTTIwLjQ4OTkgMTVDMTkuODM5OSAxNi44Mzk5IDE4LjYwOTQgMTguNDE4NyAxNi45ODQgMTkuNDk4NUMxNS4zNTg2IDIwLjU3ODMgMTMuNDI2MyAyMS4xMDA2IDExLjQ3ODMgMjAuOTg2NkM5LjUzMDI2IDIwLjg3MjYgNy42NzIwMyAyMC4xMjg2IDYuMTgzNjMgMTguODY2N0M0LjY5NTI0IDE3LjYwNDcgMy42NTczIDE1Ljg5MzIgMy4yMjYyNSAxMy45OTAxQzIuNzk1MTkgMTIuMDg2OSAyLjk5NDM2IDEwLjA5NTIgMy43OTM3NCA4LjMxNTA4QzQuNTkzMTMgNi41MzQ5NiA1Ljk0OTQyIDUuMDYyODggNy42NTgyMyA0LjEyMDY1QzkuMzY3MDUgMy4xNzg0MyAxMS4zMzU4IDIuODE3MTEgMTMuMjY3OCAzLjA5MTE2QzE1LjE5OTkgMy4zNjUyIDE2Ljk5MDUgNC4yNTk3NSAxOC4zNjk5IDUuNjQwMDFMMjIuOTk5OSAxMCIgc3Ryb2tlPSIjOEI4QjhCIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPgo8L3N2Zz4K';
|
|
33
|
+
|
|
34
|
+
const gatIconAlertSvg = 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTEwLjI5MDggMy44NjAyTDEuODIwNzUgMTguMDAwMkMxLjY0NjEyIDE4LjMwMjYgMS41NTM3MiAxOC42NDU1IDEuNTUyNzQgMTguOTk0N0MxLjU1MTc2IDE5LjM0MzkgMS42NDIyNCAxOS42ODczIDEuODE1MTggMTkuOTkwN0MxLjk4ODEyIDIwLjI5NDEgMi4yMzc0OCAyMC41NDcgMi41Mzg0NiAyMC43MjQxQzIuODM5NDQgMjAuOTAxMiAzLjE4MTU1IDIwLjk5NjQgMy41MzA3NSAyMS4wMDAySDIwLjQ3MDhDMjAuODIgMjAuOTk2NCAyMS4xNjIxIDIwLjkwMTIgMjEuNDYzIDIwLjcyNDFDMjEuNzY0IDIwLjU0NyAyMi4wMTM0IDIwLjI5NDEgMjIuMTg2MyAxOS45OTA3QzIyLjM1OTMgMTkuNjg3MyAyMi40NDk3IDE5LjM0MzkgMjIuNDQ4OCAxOC45OTQ3QzIyLjQ0NzggMTguNjQ1NSAyMi4zNTU0IDE4LjMwMjYgMjIuMTgwOCAxOC4wMDAyTDEzLjcxMDggMy44NjAyQzEzLjUzMjUgMy41NjYzMSAxMy4yODE1IDMuMzIzMzIgMTIuOTgxOSAzLjE1NDY5QzEyLjY4MjQgMi45ODYwNSAxMi4zNDQ1IDIuODk3NDYgMTIuMDAwOCAyLjg5NzQ2QzExLjY1NyAyLjg5NzQ2IDExLjMxOTEgMi45ODYwNSAxMS4wMTk2IDMuMTU0NjlDMTAuNzIgMy4zMjMzMiAxMC40NjkgMy41NjYzMSAxMC4yOTA4IDMuODYwMlYzLjg2MDJaIiBzdHJva2U9IiNDRDJCMzEiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+CjxwYXRoIGQ9Ik0xMiA5VjEzIiBzdHJva2U9IiNDRDJCMzEiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+CjxwYXRoIGQ9Ik0xMiAxN0gxMi4wMSIgc3Ryb2tlPSIjQ0QyQjMxIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPgo8L3N2Zz4K';
|
|
35
|
+
|
|
36
|
+
exports.QRCodeStyling = QRCodeStyling;
|
|
37
|
+
exports.gatIconAlertSvg = gatIconAlertSvg;
|
|
38
|
+
exports.gatIconCheckSvg = gatIconCheckSvg;
|
|
39
|
+
exports.gatIconRefreshSvg = gatIconRefreshSvg;
|
|
40
|
+
exports.logoGatacaSvg = logoGatacaSvg;
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-93d47a75.js');
|
|
6
|
-
const gatIconAlert = require('./gat-icon-alert-
|
|
7
|
-
const qrCodeStyling = require('./qr-code-styling-412bbc7a.js');
|
|
6
|
+
const gatIconAlert = require('./gat-icon-alert-6127161a.js');
|
|
8
7
|
const utils = require('./utils-ef28b844.js');
|
|
9
8
|
|
|
10
9
|
const GatacaQRDisplay = class {
|
|
11
10
|
constructor(hostRef) {
|
|
12
11
|
index.registerInstance(this, hostRef);
|
|
12
|
+
this.qrId = undefined;
|
|
13
13
|
this.qrData = undefined;
|
|
14
14
|
this.size = 256;
|
|
15
15
|
this.logoSize = 0;
|
|
@@ -18,7 +18,7 @@ const GatacaQRDisplay = class {
|
|
|
18
18
|
this.rounded = true;
|
|
19
19
|
}
|
|
20
20
|
componentDidLoad() {
|
|
21
|
-
const qrCode = new
|
|
21
|
+
const qrCode = new gatIconAlert.QRCodeStyling({
|
|
22
22
|
data: this.qrData,
|
|
23
23
|
width: this.size,
|
|
24
24
|
height: this.size,
|
|
@@ -40,12 +40,16 @@ const GatacaQRDisplay = class {
|
|
|
40
40
|
imageSize: this.logoSize,
|
|
41
41
|
},
|
|
42
42
|
});
|
|
43
|
+
this.qr.id = this.qrId;
|
|
43
44
|
qrCode.append(this.qr);
|
|
44
45
|
}
|
|
45
46
|
render() {
|
|
46
|
-
return (index.h("div", {
|
|
47
|
+
return (index.h("div", {
|
|
48
|
+
// id={this.qrId}
|
|
49
|
+
ref: (el) => {
|
|
47
50
|
this.qr = el;
|
|
48
|
-
}
|
|
51
|
+
}
|
|
52
|
+
}));
|
|
49
53
|
}
|
|
50
54
|
};
|
|
51
55
|
|
|
@@ -109,18 +113,18 @@ const ReadQR = (props) => {
|
|
|
109
113
|
};
|
|
110
114
|
|
|
111
115
|
const QR = (props) => {
|
|
112
|
-
const { value, useLogo, logoSrc, size } = props;
|
|
113
|
-
return (index.h("gataca-qrdisplay", { qrData: value, rounded: true, size: size, "logo-size": useLogo ? 0.33 : 0, "logo-src": logoSrc }));
|
|
116
|
+
const { value, useLogo, logoSrc, size, qrId } = props;
|
|
117
|
+
return (index.h("gataca-qrdisplay", { id: qrId, qrData: value, rounded: true, size: size, "logo-size": useLogo ? 0.33 : 0, "logo-src": logoSrc }));
|
|
114
118
|
};
|
|
115
119
|
|
|
116
120
|
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)}}";
|
|
117
121
|
|
|
118
122
|
const DEEP_LINK_PREFIX = "https://api.gataca.io/qr/redirect.html";
|
|
119
123
|
//Default values
|
|
120
|
-
const DEFAULT_SESSION_TIMEOUT = 300; //5mins as in connect
|
|
121
|
-
const DEFAULT_POLLING_FREQ = 3;
|
|
124
|
+
const DEFAULT_SESSION_TIMEOUT$1 = 300; //5mins as in connect
|
|
125
|
+
const DEFAULT_POLLING_FREQ$1 = 3;
|
|
122
126
|
const GatacaQR = class {
|
|
123
|
-
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.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 = 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; }
|
|
127
|
+
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.qrId = undefined; this.qrRole = undefined; 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 = 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$1; this.pollingFrequency = DEFAULT_POLLING_FREQ$1; this.dynamicLink = true; this.sessionId = undefined; this.authenticationRequest = undefined; this.sessionData = undefined; this.result = utils.RESULT_STATUS.NOT_STARTED; }
|
|
124
128
|
disconnectedCallback() {
|
|
125
129
|
this.stop();
|
|
126
130
|
}
|
|
@@ -185,9 +189,9 @@ const GatacaQR = class {
|
|
|
185
189
|
: Promise.reject(new Error(this.failedLoginErrorLabel));
|
|
186
190
|
}
|
|
187
191
|
async getSessionId() {
|
|
188
|
-
if (this.sessionId) {
|
|
189
|
-
|
|
190
|
-
}
|
|
192
|
+
// if (this.sessionId) {
|
|
193
|
+
// return this.sessionId;
|
|
194
|
+
// }
|
|
191
195
|
let { sessionId, authenticationRequest } = await this.createSession();
|
|
192
196
|
this.sessionId = sessionId;
|
|
193
197
|
this.authenticationRequest = authenticationRequest;
|
|
@@ -202,8 +206,8 @@ const GatacaQR = class {
|
|
|
202
206
|
}
|
|
203
207
|
async poll() {
|
|
204
208
|
let endTime = new Date().getTime() +
|
|
205
|
-
(this.sessionTimeout || DEFAULT_SESSION_TIMEOUT) * 1000;
|
|
206
|
-
let interval = (this.pollingFrequency || DEFAULT_POLLING_FREQ) * 1000;
|
|
209
|
+
(this.sessionTimeout || DEFAULT_SESSION_TIMEOUT$1) * 1000;
|
|
210
|
+
let interval = (this.pollingFrequency || DEFAULT_POLLING_FREQ$1) * 1000;
|
|
207
211
|
let checkFunc = async (component) => {
|
|
208
212
|
if (component.result === utils.RESULT_STATUS.NOT_STARTED) {
|
|
209
213
|
return { result: utils.RESULT_STATUS.NOT_STARTED };
|
|
@@ -265,10 +269,12 @@ const GatacaQR = class {
|
|
|
265
269
|
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 }));
|
|
266
270
|
}
|
|
267
271
|
renderQR(value, useLogo) {
|
|
268
|
-
|
|
272
|
+
console.log("this.qrId", this.qrId);
|
|
273
|
+
return (index.h(QR, { qrId: this.qrId, 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 }));
|
|
269
274
|
}
|
|
270
275
|
renderRetryQR(value, useLogo) {
|
|
271
|
-
|
|
276
|
+
console.log("this.qrId", this.qrId);
|
|
277
|
+
return (index.h(QR, { qrId: this.qrId, value: value, useLogo: useLogo, 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
278
|
}
|
|
273
279
|
render() {
|
|
274
280
|
var _a, _b;
|
|
@@ -290,5 +296,263 @@ const GatacaQR = class {
|
|
|
290
296
|
};
|
|
291
297
|
GatacaQR.style = gatacaQrCss;
|
|
292
298
|
|
|
299
|
+
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}";
|
|
300
|
+
|
|
301
|
+
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=";
|
|
302
|
+
//Default values
|
|
303
|
+
const DEFAULT_SESSION_TIMEOUT = 300; //5mins as in connect
|
|
304
|
+
const DEFAULT_POLLING_FREQ = 3;
|
|
305
|
+
const GatacaSSIButton = class {
|
|
306
|
+
constructor(hostRef) {
|
|
307
|
+
index.registerInstance(this, hostRef);
|
|
308
|
+
this.gatacaLoginCompleted = index.createEvent(this, "gatacaLoginCompleted", 7);
|
|
309
|
+
this.gatacaLoginFailed = index.createEvent(this, "gatacaLoginFailed", 7);
|
|
310
|
+
this.qrId = undefined;
|
|
311
|
+
this.buttonText = "Easy login";
|
|
312
|
+
this.autostart = true;
|
|
313
|
+
this.checkStatus = undefined;
|
|
314
|
+
this.createSession = undefined;
|
|
315
|
+
this.successCallback = undefined;
|
|
316
|
+
this.errorCallback = undefined;
|
|
317
|
+
this.handleCheckAppLoading = undefined;
|
|
318
|
+
this.checkAppTimeout = 6;
|
|
319
|
+
this.qrRole = undefined;
|
|
320
|
+
this.callbackServer = undefined;
|
|
321
|
+
this.sessionTimeout = undefined;
|
|
322
|
+
this.pollingFrequency = undefined;
|
|
323
|
+
this.autorefresh = false;
|
|
324
|
+
this.v = "3";
|
|
325
|
+
this.qrModalTitle = "Quick Access";
|
|
326
|
+
this.modalTitleColor = "#4745B7";
|
|
327
|
+
this.qrModalDescription = "Sign up or sign in by scanning the QR Code with the Gataca Wallet";
|
|
328
|
+
this.hideBrandTitle = false;
|
|
329
|
+
this.dynamicLink = true;
|
|
330
|
+
this.logoSize = 0;
|
|
331
|
+
this.logoSrc = undefined;
|
|
332
|
+
this.qrCodeExpiredLabel = "QR Code expired";
|
|
333
|
+
this.credentialsNotValidatedLabel = "User credentials not validated";
|
|
334
|
+
this.clickInsideBoxLabel = "Click inside the box to";
|
|
335
|
+
this.refreshQrLabel = "Refresh QR Code";
|
|
336
|
+
this.scanQrLabel = "Scan QR Code";
|
|
337
|
+
this.userNotScanInTimeErrorLabel = "User did not scan the QR in the allowed time";
|
|
338
|
+
this.credsNotValidatedErrorLabel = "Provided user credentials couldn't be validated";
|
|
339
|
+
this.failedLoginErrorLabel = "No successful login";
|
|
340
|
+
this.successLoginLabel = "Successful Connection!";
|
|
341
|
+
this.byBrandLabel = "by Gataca";
|
|
342
|
+
this.waitingStartSessionLabel = "waiting to start a session";
|
|
343
|
+
this.hideQrModalDescription = false;
|
|
344
|
+
this.open = false;
|
|
345
|
+
this.sessionId = undefined;
|
|
346
|
+
this.authenticationRequest = undefined;
|
|
347
|
+
this.sessionData = undefined;
|
|
348
|
+
this.result = utils.RESULT_STATUS.NOT_STARTED;
|
|
349
|
+
console.log("qrId2", this.qrId);
|
|
350
|
+
this.qr = (index.h("gataca-qr", { ref: (el) => (this.qrElement = el), qrId: this.qrId, checkStatus: this.checkStatus, createSession: this.createSession, successCallback: this.successCallback, errorCallback: this.errorCallback, qrRole: this.qrRole, 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 }));
|
|
351
|
+
this.qr.qrId = this.qrId;
|
|
352
|
+
}
|
|
353
|
+
/**
|
|
354
|
+
* Retrieve manually the session data on a successful login
|
|
355
|
+
*/
|
|
356
|
+
async getSessionData() {
|
|
357
|
+
return this.qr.getSessionData();
|
|
358
|
+
}
|
|
359
|
+
async getSessionId() {
|
|
360
|
+
if (this.sessionId) {
|
|
361
|
+
return this.sessionId;
|
|
362
|
+
}
|
|
363
|
+
let { sessionId, authenticationRequest } = await this.createSession();
|
|
364
|
+
this.sessionId = sessionId;
|
|
365
|
+
this.authenticationRequest = authenticationRequest;
|
|
366
|
+
return this.sessionId;
|
|
367
|
+
}
|
|
368
|
+
/**
|
|
369
|
+
* Force manually the start polling
|
|
370
|
+
*/
|
|
371
|
+
async startMobilePolling() {
|
|
372
|
+
await this.getSessionId();
|
|
373
|
+
this.result = utils.RESULT_STATUS.ONGOING;
|
|
374
|
+
this.poll()
|
|
375
|
+
.then((data) => {
|
|
376
|
+
this.result = utils.RESULT_STATUS.SUCCESS;
|
|
377
|
+
this.sessionData = data;
|
|
378
|
+
this.gatacaLoginCompleted.emit(data);
|
|
379
|
+
this.successCallback(data);
|
|
380
|
+
})
|
|
381
|
+
.catch((err) => {
|
|
382
|
+
this.clean();
|
|
383
|
+
let expired = err === utils.RESULT_STATUS.EXPIRED;
|
|
384
|
+
if (expired && this.autorefresh) {
|
|
385
|
+
this.startMobilePolling();
|
|
386
|
+
}
|
|
387
|
+
else {
|
|
388
|
+
if (err !== utils.RESULT_STATUS.NOT_STARTED) {
|
|
389
|
+
let error = expired
|
|
390
|
+
? new Error(this.userNotScanInTimeErrorLabel)
|
|
391
|
+
: new Error(this.credsNotValidatedErrorLabel);
|
|
392
|
+
this.result = err;
|
|
393
|
+
this.gatacaLoginFailed.emit(error);
|
|
394
|
+
this.errorCallback(error);
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
});
|
|
398
|
+
}
|
|
399
|
+
/**
|
|
400
|
+
* Stop manually an ongoing session
|
|
401
|
+
*/
|
|
402
|
+
async stop() {
|
|
403
|
+
this.clean();
|
|
404
|
+
if (this.result === utils.RESULT_STATUS.ONGOING || utils.RESULT_STATUS.READ) {
|
|
405
|
+
this.result = utils.RESULT_STATUS.NOT_STARTED;
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
clean() {
|
|
409
|
+
this.sessionData = undefined;
|
|
410
|
+
this.sessionId = undefined;
|
|
411
|
+
}
|
|
412
|
+
renderModal() {
|
|
413
|
+
return this.qr;
|
|
414
|
+
}
|
|
415
|
+
async poll() {
|
|
416
|
+
let endTime = new Date().getTime() +
|
|
417
|
+
(this.sessionTimeout || DEFAULT_SESSION_TIMEOUT) * 1000;
|
|
418
|
+
let interval = (this.pollingFrequency || DEFAULT_POLLING_FREQ) * 1000;
|
|
419
|
+
let checkFunc = async (component) => {
|
|
420
|
+
if (component.result === utils.RESULT_STATUS.NOT_STARTED) {
|
|
421
|
+
return { result: utils.RESULT_STATUS.NOT_STARTED };
|
|
422
|
+
}
|
|
423
|
+
let id = await component.getSessionId();
|
|
424
|
+
return component.checkStatus(id);
|
|
425
|
+
};
|
|
426
|
+
let component = this;
|
|
427
|
+
let checkCondition = async function (resolve, reject) {
|
|
428
|
+
// If the condition is met, we're done!
|
|
429
|
+
let { result, data } = await checkFunc(component);
|
|
430
|
+
switch (result) {
|
|
431
|
+
case utils.RESULT_STATUS.SUCCESS:
|
|
432
|
+
resolve(data);
|
|
433
|
+
break;
|
|
434
|
+
case utils.RESULT_STATUS.READ:
|
|
435
|
+
component.result = utils.RESULT_STATUS.READ;
|
|
436
|
+
case utils.RESULT_STATUS.ONGOING:
|
|
437
|
+
if (component.sessionTimeout > 0 && new Date().getTime() < endTime) {
|
|
438
|
+
setTimeout(checkCondition, interval, resolve, reject);
|
|
439
|
+
}
|
|
440
|
+
else {
|
|
441
|
+
reject(utils.RESULT_STATUS.EXPIRED);
|
|
442
|
+
}
|
|
443
|
+
break;
|
|
444
|
+
default:
|
|
445
|
+
reject(result);
|
|
446
|
+
break;
|
|
447
|
+
}
|
|
448
|
+
};
|
|
449
|
+
return new Promise(checkCondition);
|
|
450
|
+
}
|
|
451
|
+
isAppInstalled(appScheme, callback) {
|
|
452
|
+
let timeout;
|
|
453
|
+
let detected = false;
|
|
454
|
+
if (appScheme === null || appScheme === void 0 ? void 0 : appScheme.length) {
|
|
455
|
+
window.location.href = appScheme;
|
|
456
|
+
}
|
|
457
|
+
const waitTimeToCheckApp = this.checkAppTimeout * 1000;
|
|
458
|
+
timeout = setTimeout(() => {
|
|
459
|
+
if (!detected) {
|
|
460
|
+
callback(false);
|
|
461
|
+
}
|
|
462
|
+
cleanup();
|
|
463
|
+
}, waitTimeToCheckApp);
|
|
464
|
+
const handleVisibilityChange = () => {
|
|
465
|
+
if (document.hidden) {
|
|
466
|
+
detected = true;
|
|
467
|
+
callback(true);
|
|
468
|
+
if (!this.autostart) {
|
|
469
|
+
this.startMobilePolling();
|
|
470
|
+
}
|
|
471
|
+
cleanup();
|
|
472
|
+
}
|
|
473
|
+
};
|
|
474
|
+
document.addEventListener("visibilitychange", handleVisibilityChange);
|
|
475
|
+
function cleanup() {
|
|
476
|
+
clearTimeout(timeout);
|
|
477
|
+
document.removeEventListener("visibilitychange", handleVisibilityChange);
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
renderDesktopButton() {
|
|
481
|
+
console.log("this.qrId333", this.qrId);
|
|
482
|
+
return (index.h("div", { class: "gatacaButtonWrapper" }, index.h("button", { class: "gatacaButton", onClick: () => {
|
|
483
|
+
this.open = !this.open;
|
|
484
|
+
setTimeout(() => {
|
|
485
|
+
var _a, _b;
|
|
486
|
+
this.qrElement.id = this.qrId;
|
|
487
|
+
if (this.open) {
|
|
488
|
+
(_a = this.qrElement) === null || _a === void 0 ? void 0 : _a.display();
|
|
489
|
+
}
|
|
490
|
+
else {
|
|
491
|
+
(_b = this.qrElement) === null || _b === void 0 ? void 0 : _b.stop();
|
|
492
|
+
}
|
|
493
|
+
}, 0);
|
|
494
|
+
} }, index.h("img", { src: PHONE_ICON, class: "buttonImg", alt: this.buttonText }), index.h("span", null, this.buttonText))));
|
|
495
|
+
}
|
|
496
|
+
async getAuthRequest() {
|
|
497
|
+
let { authenticationRequest } = await this.createSession();
|
|
498
|
+
return authenticationRequest;
|
|
499
|
+
}
|
|
500
|
+
renderMobileButton(isAndroid, isIos) {
|
|
501
|
+
if (this.autostart) {
|
|
502
|
+
this.startMobilePolling();
|
|
503
|
+
}
|
|
504
|
+
let loading = false;
|
|
505
|
+
const handleLoading = (isLoading) => {
|
|
506
|
+
loading = isLoading;
|
|
507
|
+
if (this.handleCheckAppLoading) {
|
|
508
|
+
this.handleCheckAppLoading(isLoading);
|
|
509
|
+
}
|
|
510
|
+
};
|
|
511
|
+
const executeRedirection = async () => {
|
|
512
|
+
handleLoading(true);
|
|
513
|
+
const androidStoreLink = "https://play.google.com/store/apps/details?id=com.gataca.identity";
|
|
514
|
+
const iosStoreLink = "https://apps.apple.com/us/app/gataca/id1498607616";
|
|
515
|
+
try {
|
|
516
|
+
const appScheme = await this.getAuthRequest();
|
|
517
|
+
this.isAppInstalled(appScheme, (installed) => {
|
|
518
|
+
if (!installed) {
|
|
519
|
+
this.stop();
|
|
520
|
+
if (isAndroid) {
|
|
521
|
+
window.location.href = androidStoreLink;
|
|
522
|
+
}
|
|
523
|
+
else if (isIos) {
|
|
524
|
+
window.location.href = iosStoreLink;
|
|
525
|
+
}
|
|
526
|
+
}
|
|
527
|
+
handleLoading(false);
|
|
528
|
+
});
|
|
529
|
+
}
|
|
530
|
+
catch (error) {
|
|
531
|
+
this.stop();
|
|
532
|
+
handleLoading(false);
|
|
533
|
+
}
|
|
534
|
+
};
|
|
535
|
+
return (index.h("div", { class: "gatacaButtonWrapper" }, index.h("button", { class: "gatacaButton", onClick: () => {
|
|
536
|
+
executeRedirection();
|
|
537
|
+
}, disabled: loading }, index.h("img", { src: PHONE_ICON, class: "buttonImg", alt: this.buttonText }), index.h("span", null, this.buttonText))));
|
|
538
|
+
}
|
|
539
|
+
render() {
|
|
540
|
+
const userAgent =
|
|
541
|
+
// @ts-ignore
|
|
542
|
+
(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);
|
|
543
|
+
const isAndroid = /android/i.test(userAgent);
|
|
544
|
+
const isIos =
|
|
545
|
+
// @ts-ignore
|
|
546
|
+
(/iPad|iPhone|iPod/.test(userAgent) && !window.MSStream) ||
|
|
547
|
+
(navigator.platform === "MacIntel" && navigator.maxTouchPoints > 1);
|
|
548
|
+
const isMobile = isAndroid || isIos;
|
|
549
|
+
return (index.h("div", { class: "buttonContainer" }, isMobile && this.v === "3"
|
|
550
|
+
? this.renderMobileButton(isAndroid, isIos)
|
|
551
|
+
: this.renderDesktopButton(), this.open && (!isMobile || this.v === "3") && this.renderModal()));
|
|
552
|
+
}
|
|
553
|
+
};
|
|
554
|
+
GatacaSSIButton.style = gatacaSsibuttonCss;
|
|
555
|
+
|
|
293
556
|
exports.gataca_qr = GatacaQR;
|
|
294
557
|
exports.gataca_qrdisplay = GatacaQRDisplay;
|
|
558
|
+
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 gatIconAlert = require('./gat-icon-alert-
|
|
7
|
-
require('./qr-code-styling-412bbc7a.js');
|
|
6
|
+
const gatIconAlert = require('./gat-icon-alert-6127161a.js');
|
|
8
7
|
const utils = require('./utils-ef28b844.js');
|
|
9
8
|
|
|
10
9
|
const Success = (props) => {
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-93d47a75.js');
|
|
6
|
+
|
|
7
|
+
const gatacaSsibuttonwsCss = "@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}";
|
|
8
|
+
|
|
9
|
+
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=";
|
|
10
|
+
const GatacaSSIButtonWS = class {
|
|
11
|
+
constructor(hostRef) {
|
|
12
|
+
index.registerInstance(this, hostRef);
|
|
13
|
+
this.gatacaLoginCompleted = index.createEvent(this, "gatacaLoginCompleted", 7);
|
|
14
|
+
this.gatacaLoginFailed = index.createEvent(this, "gatacaLoginFailed", 7);
|
|
15
|
+
this.buttonText = "Easy login";
|
|
16
|
+
this.successCallback = undefined;
|
|
17
|
+
this.errorCallback = undefined;
|
|
18
|
+
this.qrRole = undefined;
|
|
19
|
+
this.callbackServer = undefined;
|
|
20
|
+
this.socketEndpoint = undefined;
|
|
21
|
+
this.sessionTimeout = undefined;
|
|
22
|
+
this.wsOnOpen = undefined;
|
|
23
|
+
this.wsOnMessage = undefined;
|
|
24
|
+
this.autostart = true;
|
|
25
|
+
this.autorefresh = false;
|
|
26
|
+
this.v = "3";
|
|
27
|
+
this.qrModalTitle = "Quick Access";
|
|
28
|
+
this.qrModalDescription = "Sign up or sign in by scanning the QR Code with the Gataca Wallet";
|
|
29
|
+
this.hideBrandTitle = false;
|
|
30
|
+
this.dynamicLink = true;
|
|
31
|
+
this.open = false;
|
|
32
|
+
this.qr = (index.h("gataca-qrws", { wsOnMessage: this.wsOnMessage, wsOnOpen: this.wsOnOpen, successCallback: this.successCallback, errorCallback: this.errorCallback, qrRole: this.qrRole, callbackServer: this.callbackServer, sessionTimeout: this.sessionTimeout, socketEndpoint: this.socketEndpoint, autostart: true, autorefresh: this.autorefresh, v: this.v, qrModalTitle: this.qrModalTitle, qrModalDescription: this.qrModalDescription, hideBrandTitle: this.hideBrandTitle, dynamicLink: this.dynamicLink }));
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Retrieve manually the session data on a successful login
|
|
36
|
+
*/
|
|
37
|
+
async getSessionData() {
|
|
38
|
+
return this.qr.getSessionData();
|
|
39
|
+
}
|
|
40
|
+
renderModal() {
|
|
41
|
+
return this.qr;
|
|
42
|
+
}
|
|
43
|
+
renderButton() {
|
|
44
|
+
return (index.h("div", { class: "gatacaButtonWrapper" }, index.h("button", { class: "gatacaButton", onClick: () => {
|
|
45
|
+
this.open = !this.open;
|
|
46
|
+
if (this.open) {
|
|
47
|
+
this.qr.display();
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
50
|
+
this.qr.stop();
|
|
51
|
+
}
|
|
52
|
+
} }, index.h("img", { src: PHONE_ICON, class: "buttonImg", alt: this.buttonText }), index.h("span", null, this.buttonText))));
|
|
53
|
+
}
|
|
54
|
+
render() {
|
|
55
|
+
return (index.h("div", { class: "buttonContainer" }, this.renderButton(), this.open && this.renderModal()));
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
GatacaSSIButtonWS.style = gatacaSsibuttonwsCss;
|
|
59
|
+
|
|
60
|
+
exports.gataca_ssibuttonws = GatacaSSIButtonWS;
|
package/dist/cjs/gatacaqr.cjs.js
CHANGED
|
@@ -15,5 +15,5 @@ const patchBrowser = () => {
|
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
patchBrowser().then(options => {
|
|
18
|
-
return index.bootstrapLazy([["gataca-
|
|
18
|
+
return index.bootstrapLazy([["gataca-qr_3.cjs",[[1,"gataca-ssibutton",{"qrId":[1,"qr-id"],"buttonText":[1,"button-text"],"autostart":[4],"checkStatus":[16],"createSession":[16],"successCallback":[16],"errorCallback":[16],"handleCheckAppLoading":[16],"checkAppTimeout":[2,"check-app-timeout"],"qrRole":[1,"qr-role"],"callbackServer":[1,"callback-server"],"sessionTimeout":[2,"session-timeout"],"pollingFrequency":[2,"polling-frequency"],"autorefresh":[4],"v":[1],"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],"sessionId":[32],"authenticationRequest":[32],"sessionData":[32],"result":[32],"getSessionData":[64],"startMobilePolling":[64],"stop":[64]}],[1,"gataca-qr",{"checkStatus":[16],"createSession":[16],"successCallback":[16],"errorCallback":[16],"qrId":[1,"qr-id"],"qrRole":[1,"qr-role"],"callbackServer":[1,"callback-server"],"autostart":[4],"autorefresh":[4],"v":[1],"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",{"qrId":[1,"qr-id"],"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],"v":[1],"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-ssibuttonws.cjs",[[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],"v":[1],"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);
|
|
19
19
|
});
|
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-
|
|
17
|
+
return index.bootstrapLazy([["gataca-qr_3.cjs",[[1,"gataca-ssibutton",{"qrId":[1,"qr-id"],"buttonText":[1,"button-text"],"autostart":[4],"checkStatus":[16],"createSession":[16],"successCallback":[16],"errorCallback":[16],"handleCheckAppLoading":[16],"checkAppTimeout":[2,"check-app-timeout"],"qrRole":[1,"qr-role"],"callbackServer":[1,"callback-server"],"sessionTimeout":[2,"session-timeout"],"pollingFrequency":[2,"polling-frequency"],"autorefresh":[4],"v":[1],"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],"sessionId":[32],"authenticationRequest":[32],"sessionData":[32],"result":[32],"getSessionData":[64],"startMobilePolling":[64],"stop":[64]}],[1,"gataca-qr",{"checkStatus":[16],"createSession":[16],"successCallback":[16],"errorCallback":[16],"qrId":[1,"qr-id"],"qrRole":[1,"qr-role"],"callbackServer":[1,"callback-server"],"autostart":[4],"autorefresh":[4],"v":[1],"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",{"qrId":[1,"qr-id"],"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],"v":[1],"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-ssibuttonws.cjs",[[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],"v":[1],"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
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
2
|
export const QR = (props) => {
|
|
3
|
-
const { value, useLogo, logoSrc, size } = props;
|
|
4
|
-
return (h("gataca-qrdisplay", { qrData: value, rounded: true, size: size, "logo-size": useLogo ? 0.33 : 0, "logo-src": logoSrc }));
|
|
3
|
+
const { value, useLogo, logoSrc, size, qrId } = props;
|
|
4
|
+
return (h("gataca-qrdisplay", { id: qrId, qrData: value, rounded: true, size: size, "logo-size": useLogo ? 0.33 : 0, "logo-src": logoSrc }));
|
|
5
5
|
};
|