@gataca/qr 3.0.9 → 3.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/gataca-autoqr.cjs.entry.js +9 -9
- package/dist/cjs/gataca-qr_2.cjs.entry.js +37 -47
- package/dist/cjs/gataca-qrws.cjs.entry.js +36 -43
- package/dist/cjs/gataca-ssibutton_2.cjs.entry.js +34 -38
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/{utils-ef28b844.js → utils-b4e62bc0.js} +1 -1
- package/dist/collection/components/gataca-autoqr/gataca-autoqr.js +13 -13
- package/dist/collection/components/gataca-qr/components/qr/QR.js +2 -2
- package/dist/collection/components/gataca-qr/components/readQR/ReadQR.js +4 -4
- package/dist/collection/components/gataca-qr/components/readQR/components/AnimatedLoader.js +1 -1
- package/dist/collection/components/gataca-qr/components/retryButton/RetryButton.js +8 -8
- package/dist/collection/components/gataca-qr/components/success/Success.js +4 -4
- package/dist/collection/components/gataca-qr/gataca-qr.js +46 -56
- package/dist/collection/components/gataca-qrdisplay/gataca-qrdisplay.js +12 -12
- package/dist/collection/components/gataca-qrws/components/qr/QR.js +2 -2
- package/dist/collection/components/gataca-qrws/components/readQR/ReadQR.js +4 -4
- package/dist/collection/components/gataca-qrws/components/readQR/components/AnimatedLoader.js +1 -1
- package/dist/collection/components/gataca-qrws/components/retryButton/RetryButton.js +8 -8
- package/dist/collection/components/gataca-qrws/components/success/Success.js +4 -4
- package/dist/collection/components/gataca-qrws/gataca-qrws.js +50 -57
- package/dist/collection/components/gataca-ssibutton/gataca-ssibutton.js +62 -52
- package/dist/collection/components/gataca-ssibuttonws/gataca-ssibuttonws.js +12 -12
- package/dist/collection/index.js +2 -2
- package/dist/collection/utils/index.js +1 -1
- package/dist/collection/utils/utils.js +1 -1
- package/dist/components/gat-icon-alert.js +1 -1
- package/dist/components/gataca-autoqr.js +9 -9
- package/dist/components/gataca-qr2.js +29 -39
- package/dist/components/gataca-qrdisplay2.js +7 -7
- package/dist/components/gataca-qrws2.js +35 -42
- package/dist/components/gataca-ssibutton2.js +27 -31
- package/dist/components/gataca-ssibuttonws2.js +6 -6
- package/dist/esm/gataca-autoqr.entry.js +9 -9
- package/dist/esm/gataca-qr_2.entry.js +37 -47
- package/dist/esm/gataca-qrws.entry.js +36 -43
- package/dist/esm/gataca-ssibutton_2.entry.js +34 -38
- package/dist/esm/index.js +1 -1
- package/dist/esm/{utils-63e7a33b.js → utils-21ffcc1e.js} +1 -1
- package/dist/gatacaqr/gatacaqr.esm.js +1 -1
- package/dist/gatacaqr/index.esm.js +1 -1
- package/dist/gatacaqr/p-2adc0bcc.entry.js +1 -0
- package/dist/gatacaqr/p-2ddbc2fc.entry.js +1 -0
- package/dist/gatacaqr/p-d2dd7c85.entry.js +1 -0
- package/dist/types/components/gataca-autoqr/gataca-autoqr.d.ts +7 -7
- package/dist/types/components/gataca-qr/components/qr/QR.d.ts +2 -2
- package/dist/types/components/gataca-qr/components/readQR/ReadQR.d.ts +1 -1
- package/dist/types/components/gataca-qr/components/readQR/components/AnimatedLoader.d.ts +1 -1
- package/dist/types/components/gataca-qr/components/retryButton/RetryButton.d.ts +1 -1
- package/dist/types/components/gataca-qr/components/success/Success.d.ts +1 -1
- package/dist/types/components/gataca-qr/gataca-qr.d.ts +5 -5
- package/dist/types/components/gataca-qrdisplay/gataca-qrdisplay.d.ts +1 -1
- package/dist/types/components/gataca-qrws/components/qr/QR.d.ts +2 -2
- package/dist/types/components/gataca-qrws/components/readQR/ReadQR.d.ts +1 -1
- package/dist/types/components/gataca-qrws/components/readQR/components/AnimatedLoader.d.ts +1 -1
- package/dist/types/components/gataca-qrws/components/retryButton/RetryButton.d.ts +1 -1
- package/dist/types/components/gataca-qrws/components/success/Success.d.ts +1 -1
- package/dist/types/components/gataca-qrws/gataca-qrws.d.ts +5 -5
- package/dist/types/components/gataca-ssibutton/gataca-ssibutton.d.ts +9 -5
- package/dist/types/components/gataca-ssibuttonws/gataca-ssibuttonws.d.ts +3 -3
- package/dist/types/components.d.ts +28 -36
- package/dist/types/index.d.ts +2 -2
- package/dist/types/utils/index.d.ts +1 -1
- package/package.json +30 -7
- package/dist/gatacaqr/p-92a2e6f0.entry.js +0 -1
- package/dist/gatacaqr/p-9af5d2fe.entry.js +0 -1
- package/dist/gatacaqr/p-dc592fa5.entry.js +0 -1
- /package/dist/gatacaqr/{p-2cd7b062.js → p-bce7e590.js} +0 -0
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { h
|
|
2
|
-
const PHONE_ICON =
|
|
1
|
+
import { h } from '@stencil/core';
|
|
2
|
+
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=';
|
|
3
3
|
export class GatacaSSIButtonWS {
|
|
4
4
|
constructor() {
|
|
5
|
-
this.buttonText =
|
|
5
|
+
this.buttonText = 'Easy login';
|
|
6
6
|
this.successCallback = undefined;
|
|
7
7
|
this.errorCallback = undefined;
|
|
8
|
-
this.qrType =
|
|
8
|
+
this.qrType = 'svg';
|
|
9
9
|
this.qrRole = undefined;
|
|
10
10
|
this.callbackServer = undefined;
|
|
11
11
|
this.socketEndpoint = undefined;
|
|
@@ -14,9 +14,9 @@ export class GatacaSSIButtonWS {
|
|
|
14
14
|
this.wsOnMessage = undefined;
|
|
15
15
|
this.autostart = true;
|
|
16
16
|
this.autorefresh = false;
|
|
17
|
-
this.v =
|
|
18
|
-
this.qrModalTitle =
|
|
19
|
-
this.qrModalDescription =
|
|
17
|
+
this.v = '3';
|
|
18
|
+
this.qrModalTitle = 'Quick Access';
|
|
19
|
+
this.qrModalDescription = 'Sign up or sign in by scanning the QR Code with the Gataca Wallet';
|
|
20
20
|
this.hideBrandTitle = false;
|
|
21
21
|
this.dynamicLink = true;
|
|
22
22
|
this.open = false;
|
|
@@ -75,7 +75,7 @@ export class GatacaSSIButtonWS {
|
|
|
75
75
|
},
|
|
76
76
|
"attribute": "button-text",
|
|
77
77
|
"reflect": false,
|
|
78
|
-
"defaultValue": "
|
|
78
|
+
"defaultValue": "'Easy login'"
|
|
79
79
|
},
|
|
80
80
|
"successCallback": {
|
|
81
81
|
"type": "unknown",
|
|
@@ -134,7 +134,7 @@ export class GatacaSSIButtonWS {
|
|
|
134
134
|
},
|
|
135
135
|
"attribute": "qr-type",
|
|
136
136
|
"reflect": false,
|
|
137
|
-
"defaultValue": "
|
|
137
|
+
"defaultValue": "'svg'"
|
|
138
138
|
},
|
|
139
139
|
"qrRole": {
|
|
140
140
|
"type": "string",
|
|
@@ -297,7 +297,7 @@ export class GatacaSSIButtonWS {
|
|
|
297
297
|
},
|
|
298
298
|
"attribute": "v",
|
|
299
299
|
"reflect": false,
|
|
300
|
-
"defaultValue": "
|
|
300
|
+
"defaultValue": "'3'"
|
|
301
301
|
},
|
|
302
302
|
"qrModalTitle": {
|
|
303
303
|
"type": "string",
|
|
@@ -315,7 +315,7 @@ export class GatacaSSIButtonWS {
|
|
|
315
315
|
},
|
|
316
316
|
"attribute": "qr-modal-title",
|
|
317
317
|
"reflect": false,
|
|
318
|
-
"defaultValue": "
|
|
318
|
+
"defaultValue": "'Quick Access'"
|
|
319
319
|
},
|
|
320
320
|
"qrModalDescription": {
|
|
321
321
|
"type": "string",
|
|
@@ -333,7 +333,7 @@ export class GatacaSSIButtonWS {
|
|
|
333
333
|
},
|
|
334
334
|
"attribute": "qr-modal-description",
|
|
335
335
|
"reflect": false,
|
|
336
|
-
"defaultValue": "
|
|
336
|
+
"defaultValue": "'Sign up or sign in by scanning the QR Code with the Gataca Wallet'"
|
|
337
337
|
},
|
|
338
338
|
"hideBrandTitle": {
|
|
339
339
|
"type": "boolean",
|
package/dist/collection/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
1
|
+
export * from './components';
|
|
2
|
+
export * from './utils';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from
|
|
1
|
+
export * from './utils';
|
|
@@ -9,7 +9,7 @@ export function checkMobile() {
|
|
|
9
9
|
}
|
|
10
10
|
export function base64UrlEncode(str) {
|
|
11
11
|
let b64 = btoa(str);
|
|
12
|
-
return b64.replace(/\+/g,
|
|
12
|
+
return b64.replace(/\+/g, '-').replace(/\//g, '_').replace(/\=+$/, '');
|
|
13
13
|
}
|
|
14
14
|
export var RESULT_STATUS;
|
|
15
15
|
(function (RESULT_STATUS) {
|
|
@@ -9,7 +9,7 @@ function checkMobile() {
|
|
|
9
9
|
}
|
|
10
10
|
function base64UrlEncode(str) {
|
|
11
11
|
let b64 = btoa(str);
|
|
12
|
-
return b64.replace(/\+/g,
|
|
12
|
+
return b64.replace(/\+/g, '-').replace(/\//g, '_').replace(/\=+$/, '');
|
|
13
13
|
}
|
|
14
14
|
var RESULT_STATUS;
|
|
15
15
|
(function (RESULT_STATUS) {
|
|
@@ -7,7 +7,7 @@ import { d as defineCustomElement$2 } from './gataca-ssibuttonws2.js';
|
|
|
7
7
|
|
|
8
8
|
const gatacaAutoqrCss = "@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}";
|
|
9
9
|
|
|
10
|
-
const DEFAULT_REPOSITORY =
|
|
10
|
+
const DEFAULT_REPOSITORY = 'https://studio.gataca.io/api/v1/qrconfigs';
|
|
11
11
|
const fixFunctions = (data) => {
|
|
12
12
|
var _a, _b, _c, _d, _e, _f;
|
|
13
13
|
data.errorCallback = deserializeFunction((_a = data.errorCallback) === null || _a === void 0 ? void 0 : _a.toString());
|
|
@@ -20,7 +20,7 @@ const fixFunctions = (data) => {
|
|
|
20
20
|
};
|
|
21
21
|
const deserializeFunction = (data) => {
|
|
22
22
|
if (data) {
|
|
23
|
-
return new Function(
|
|
23
|
+
return new Function('return ' + data)();
|
|
24
24
|
}
|
|
25
25
|
return undefined;
|
|
26
26
|
};
|
|
@@ -32,7 +32,7 @@ const GatacaAutoQR = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
32
32
|
this.gatacaLoginCompleted = createEvent(this, "gatacaLoginCompleted", 7);
|
|
33
33
|
this.gatacaLoginFailed = createEvent(this, "gatacaLoginFailed", 7);
|
|
34
34
|
this.configId = undefined;
|
|
35
|
-
this.qrType =
|
|
35
|
+
this.qrType = 'svg';
|
|
36
36
|
this.configRepository = DEFAULT_REPOSITORY;
|
|
37
37
|
this.successCallback = undefined;
|
|
38
38
|
this.errorCallback = undefined;
|
|
@@ -43,11 +43,11 @@ const GatacaAutoQR = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
43
43
|
this.config = undefined;
|
|
44
44
|
this.loading = undefined;
|
|
45
45
|
this.loading = true;
|
|
46
|
-
fetch(this.configRepository +
|
|
47
|
-
method:
|
|
46
|
+
fetch(this.configRepository + '/' + this.configId, {
|
|
47
|
+
method: 'GET',
|
|
48
48
|
headers: {
|
|
49
|
-
|
|
50
|
-
}
|
|
49
|
+
'Content-Type': 'application/json'
|
|
50
|
+
}
|
|
51
51
|
})
|
|
52
52
|
.then((response) => {
|
|
53
53
|
response
|
|
@@ -58,12 +58,12 @@ const GatacaAutoQR = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
58
58
|
this.loading = false;
|
|
59
59
|
})
|
|
60
60
|
.catch((err) => {
|
|
61
|
-
console.log(
|
|
61
|
+
console.log('Cannot retrieve selected config', err);
|
|
62
62
|
this.loading = false;
|
|
63
63
|
});
|
|
64
64
|
})
|
|
65
65
|
.catch((err) => {
|
|
66
|
-
console.log(
|
|
66
|
+
console.log('Cannot retrieve selected config', err);
|
|
67
67
|
this.loading = false;
|
|
68
68
|
});
|
|
69
69
|
}
|
|
@@ -4,8 +4,8 @@ import { g as gatIconCheckSvg, a as gatIconRefreshSvg, d as gatIconAlertSvg, R a
|
|
|
4
4
|
|
|
5
5
|
const Success = (props) => {
|
|
6
6
|
const { modalHeight, successLoginLabel } = props;
|
|
7
|
-
return (h("div", { class:
|
|
8
|
-
height: modalHeight ? (modalHeight === null || modalHeight === void 0 ? void 0 : modalHeight.toString()) +
|
|
7
|
+
return (h("div", { class: 'success', style: {
|
|
8
|
+
height: modalHeight ? (modalHeight === null || modalHeight === void 0 ? void 0 : modalHeight.toString()) + 'px' : '300px'
|
|
9
9
|
} },
|
|
10
10
|
h("img", { src: gatIconCheckSvg, height: 52, width: 52 }),
|
|
11
11
|
h("p", { class: "successMsg" }, successLoginLabel)));
|
|
@@ -13,19 +13,19 @@ const Success = (props) => {
|
|
|
13
13
|
|
|
14
14
|
const RetryButton = (props) => {
|
|
15
15
|
var _a;
|
|
16
|
-
const { errorMessage, modalWidth, clickInsideBoxLabel, refreshQrLabel, scanQrLabel, waitingStartSessionLabel, display, renderRetryQR
|
|
16
|
+
const { errorMessage, modalWidth, clickInsideBoxLabel, refreshQrLabel, scanQrLabel, waitingStartSessionLabel, display, renderRetryQR } = props;
|
|
17
17
|
return (h("div", { class: "reload", style: {
|
|
18
|
-
width: (modalWidth - 48).toString() +
|
|
19
|
-
height: modalWidth ? ((_a = (modalWidth - 48)) === null || _a === void 0 ? void 0 : _a.toString()) +
|
|
18
|
+
width: (modalWidth - 48).toString() + 'px',
|
|
19
|
+
height: modalWidth ? ((_a = (modalWidth - 48)) === null || _a === void 0 ? void 0 : _a.toString()) + 'px' : ''
|
|
20
20
|
} },
|
|
21
21
|
h("div", { id: "notify", onClick: () => display() },
|
|
22
22
|
h("img", { src: gatIconRefreshSvg, height: 24, width: 24 }),
|
|
23
23
|
h("p", { class: "notify-text" },
|
|
24
24
|
clickInsideBoxLabel,
|
|
25
25
|
" "),
|
|
26
|
-
errorMessage ?
|
|
26
|
+
errorMessage ? h("p", { class: "notify-text bold" }, refreshQrLabel) : h("p", { class: "notify-text bold" }, scanQrLabel),
|
|
27
27
|
errorMessage && (h("div", { class: "alert", style: {
|
|
28
|
-
width: (modalWidth - 48).toString() +
|
|
28
|
+
width: (modalWidth - 48).toString() + 'px'
|
|
29
29
|
} },
|
|
30
30
|
h("img", { src: gatIconAlertSvg, height: 24, width: 24 }),
|
|
31
31
|
h("p", null, errorMessage)))),
|
|
@@ -49,8 +49,8 @@ const ReadQR = (props) => {
|
|
|
49
49
|
var _a;
|
|
50
50
|
const { modalWidth, readQrMessages, renderQR, url, sizeQR } = props;
|
|
51
51
|
return (h("div", { class: "blured", style: {
|
|
52
|
-
width: (modalWidth - 48).toString() +
|
|
53
|
-
height: modalWidth ? ((_a = (modalWidth - 48)) === null || _a === void 0 ? void 0 : _a.toString()) +
|
|
52
|
+
width: (modalWidth - 48).toString() + 'px',
|
|
53
|
+
height: modalWidth ? ((_a = (modalWidth - 48)) === null || _a === void 0 ? void 0 : _a.toString()) + 'px' : ''
|
|
54
54
|
} },
|
|
55
55
|
h("div", { id: "notify" },
|
|
56
56
|
h(AnimatedLoader, null),
|
|
@@ -63,17 +63,17 @@ const ReadQR = (props) => {
|
|
|
63
63
|
|
|
64
64
|
const QR = (props) => {
|
|
65
65
|
const { value, useLogo, logoSrc, size, qrType } = props;
|
|
66
|
-
return
|
|
66
|
+
return h("gataca-qrdisplay", { qrData: value, rounded: true, qrType: qrType, size: size, "logo-size": useLogo ? 0.33 : 0, "logo-src": logoSrc });
|
|
67
67
|
};
|
|
68
68
|
|
|
69
69
|
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)}}";
|
|
70
70
|
|
|
71
|
-
const DEEP_LINK_PREFIX =
|
|
71
|
+
const DEEP_LINK_PREFIX = 'https://api.gataca.io/qr/redirect.html';
|
|
72
72
|
//Default values
|
|
73
73
|
const DEFAULT_SESSION_TIMEOUT = 300; //5mins as in connect
|
|
74
74
|
const DEFAULT_POLLING_FREQ = 3;
|
|
75
75
|
const GatacaQR = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
76
|
-
constructor() { super(); this.__registerHost(); this.__attachShadow(); this.gatacaLoginCompleted = createEvent(this, "gatacaLoginCompleted", 7); this.gatacaLoginFailed = createEvent(this, "gatacaLoginFailed", 7); this.checkStatus = undefined; this.createSession = undefined; this.successCallback = undefined; this.errorCallback = undefined; this.qrRole = undefined; this.qrType =
|
|
76
|
+
constructor() { super(); this.__registerHost(); this.__attachShadow(); this.gatacaLoginCompleted = createEvent(this, "gatacaLoginCompleted", 7); this.gatacaLoginFailed = 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 = 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 = RESULT_STATUS.NOT_STARTED; }
|
|
77
77
|
disconnectedCallback() {
|
|
78
78
|
this.stop();
|
|
79
79
|
}
|
|
@@ -103,9 +103,7 @@ const GatacaQR = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
103
103
|
}
|
|
104
104
|
else {
|
|
105
105
|
if (err !== RESULT_STATUS.NOT_STARTED) {
|
|
106
|
-
let error = expired
|
|
107
|
-
? new Error(this.userNotScanInTimeErrorLabel)
|
|
108
|
-
: new Error(this.credsNotValidatedErrorLabel);
|
|
106
|
+
let error = expired ? new Error(this.userNotScanInTimeErrorLabel) : new Error(this.credsNotValidatedErrorLabel);
|
|
109
107
|
this.result = err;
|
|
110
108
|
this.gatacaLoginFailed.emit(error);
|
|
111
109
|
this.errorCallback(error);
|
|
@@ -133,9 +131,7 @@ const GatacaQR = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
133
131
|
* Retrieve manually the session data on a successful login
|
|
134
132
|
*/
|
|
135
133
|
async getSessionData() {
|
|
136
|
-
return this.sessionData
|
|
137
|
-
? Promise.resolve(this.sessionData)
|
|
138
|
-
: Promise.reject(new Error(this.failedLoginErrorLabel));
|
|
134
|
+
return this.sessionData ? Promise.resolve(this.sessionData) : Promise.reject(new Error(this.failedLoginErrorLabel));
|
|
139
135
|
}
|
|
140
136
|
async getSessionId() {
|
|
141
137
|
if (this.sessionId) {
|
|
@@ -147,15 +143,14 @@ const GatacaQR = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
147
143
|
return this.sessionId;
|
|
148
144
|
}
|
|
149
145
|
getLink() {
|
|
150
|
-
if (this.v ===
|
|
146
|
+
if (this.v === '2') {
|
|
151
147
|
return this.authenticationRequest;
|
|
152
148
|
}
|
|
153
|
-
const authRequestEncoded =
|
|
149
|
+
const authRequestEncoded = '?dl=' + base64UrlEncode(this.authenticationRequest);
|
|
154
150
|
return DEEP_LINK_PREFIX + authRequestEncoded;
|
|
155
151
|
}
|
|
156
152
|
async poll() {
|
|
157
|
-
let endTime = new Date().getTime() +
|
|
158
|
-
(this.sessionTimeout || DEFAULT_SESSION_TIMEOUT) * 1000;
|
|
153
|
+
let endTime = new Date().getTime() + (this.sessionTimeout || DEFAULT_SESSION_TIMEOUT) * 1000;
|
|
159
154
|
let interval = (this.pollingFrequency || DEFAULT_POLLING_FREQ) * 1000;
|
|
160
155
|
let checkFunc = async (component) => {
|
|
161
156
|
if (component.result === RESULT_STATUS.NOT_STARTED) {
|
|
@@ -204,40 +199,35 @@ const GatacaQR = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
204
199
|
case RESULT_STATUS.READ:
|
|
205
200
|
return this.renderReadQR({
|
|
206
201
|
title: this === null || this === void 0 ? void 0 : this.readQrTitle,
|
|
207
|
-
description: this === null || this === void 0 ? void 0 : this.readQrDescription
|
|
202
|
+
description: this === null || this === void 0 ? void 0 : this.readQrDescription
|
|
208
203
|
});
|
|
209
204
|
}
|
|
210
205
|
}
|
|
211
206
|
renderSuccess() {
|
|
212
|
-
return
|
|
207
|
+
return h(Success, { modalHeight: this === null || this === void 0 ? void 0 : this.modalHeight, successLoginLabel: this === null || this === void 0 ? void 0 : this.successLoginLabel });
|
|
213
208
|
}
|
|
214
209
|
renderRetryButton(errorMessage) {
|
|
215
210
|
return (h(RetryButton, { errorMessage: errorMessage, modalWidth: this === null || this === void 0 ? void 0 : this.modalWidth, clickInsideBoxLabel: this === null || this === void 0 ? void 0 : this.clickInsideBoxLabel, refreshQrLabel: this === null || this === void 0 ? void 0 : this.refreshQrLabel, scanQrLabel: this === null || this === void 0 ? void 0 : this.scanQrLabel, waitingStartSessionLabel: this === null || this === void 0 ? void 0 : this.waitingStartSessionLabel, display: this.display.bind(this), renderRetryQR: this.renderRetryQR.bind(this) }));
|
|
216
211
|
}
|
|
217
212
|
renderReadQR(readQrMessages) {
|
|
218
|
-
return
|
|
213
|
+
return 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) });
|
|
219
214
|
}
|
|
220
|
-
renderQR(value, useLogo) {
|
|
221
|
-
return
|
|
215
|
+
renderQR(value, useLogo, sizeQR) {
|
|
216
|
+
return 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 });
|
|
222
217
|
}
|
|
223
218
|
renderRetryQR(value, useLogo) {
|
|
224
|
-
return
|
|
219
|
+
return 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 });
|
|
225
220
|
}
|
|
226
221
|
render() {
|
|
227
222
|
var _a, _b;
|
|
228
|
-
return (h("div", { class: "popUpContainer" }, h("div", { class: `is-visible modal-window ${this.hideModalTexts ?
|
|
229
|
-
width: (this.modalWidth - 2).toString() +
|
|
230
|
-
height: this.modalHeight
|
|
231
|
-
? ((_a = (this.modalHeight - 2)) === null || _a === void 0 ? void 0 : _a.toString()) + "px"
|
|
232
|
-
: "",
|
|
223
|
+
return (h("div", { class: "popUpContainer" }, h("div", { class: `is-visible modal-window ${this.hideModalTexts ? '' : 'large-modal'} ${this.hideModalBoxShadow ? 'noBoxShadow' : ''}`, style: {
|
|
224
|
+
width: (this.modalWidth - 2).toString() + 'px',
|
|
225
|
+
height: this.modalHeight ? ((_a = (this.modalHeight - 2)) === null || _a === void 0 ? void 0 : _a.toString()) + 'px' : ''
|
|
233
226
|
}, onClick: (event) => {
|
|
234
227
|
event.stopPropagation();
|
|
235
|
-
} }, h("div", { class: "modal-window__content" }, h("div", { class: `qrTitleContainer ${this.hideModalTexts ?
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
height: this.modalWidth
|
|
239
|
-
? ((_b = this.modalWidth) === null || _b === void 0 ? void 0 : _b.toString()) + "px"
|
|
240
|
-
: "",
|
|
228
|
+
} }, h("div", { class: "modal-window__content" }, h("div", { class: `qrTitleContainer ${this.hideModalTexts ? 'hidenText' : ''}` }, h("p", { class: "qrTitle modalText", style: { color: this.modalTitleColor || '#1e1e20' } }, this.qrModalTitle), !this.hideBrandTitle && (h("p", { class: "qrBrand modalText" }, this.byBrandLabel, ' ', h("span", null, h("img", { src: logoGatacaSvg })))), this.result !== RESULT_STATUS.SUCCESS && !this.hideQrModalDescription && h("p", { class: "qrDescription modalText" }, this.qrModalDescription)), h("div", { class: "qrSection", style: {
|
|
229
|
+
width: this.modalWidth.toString() + 'px',
|
|
230
|
+
height: this.modalWidth ? ((_b = this.modalWidth) === null || _b === void 0 ? void 0 : _b.toString()) + 'px' : ''
|
|
241
231
|
} }, this.renderQRSection())))));
|
|
242
232
|
}
|
|
243
233
|
static get style() { return gatacaQrCss; }
|
|
@@ -32,11 +32,11 @@ const GatacaQRDisplay = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
32
32
|
super();
|
|
33
33
|
this.__registerHost();
|
|
34
34
|
this.qrData = undefined;
|
|
35
|
-
this.qrType =
|
|
35
|
+
this.qrType = 'svg';
|
|
36
36
|
this.size = 256;
|
|
37
37
|
this.logoSize = 0;
|
|
38
38
|
this.logoSrc = undefined;
|
|
39
|
-
this.qrColor =
|
|
39
|
+
this.qrColor = '#1E1E20';
|
|
40
40
|
this.rounded = true;
|
|
41
41
|
}
|
|
42
42
|
componentDidLoad() {
|
|
@@ -49,18 +49,18 @@ const GatacaQRDisplay = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
49
49
|
type: this.qrType,
|
|
50
50
|
dotsOptions: {
|
|
51
51
|
color: this.qrColor,
|
|
52
|
-
type: this.rounded ?
|
|
52
|
+
type: this.rounded ? 'dots' : 'square'
|
|
53
53
|
},
|
|
54
54
|
cornersSquareOptions: {
|
|
55
|
-
type: this.rounded ?
|
|
55
|
+
type: this.rounded ? 'extra-rounded' : 'square'
|
|
56
56
|
},
|
|
57
57
|
cornersDotOptions: {
|
|
58
|
-
type: this.rounded ?
|
|
58
|
+
type: this.rounded ? 'dot' : 'square'
|
|
59
59
|
},
|
|
60
60
|
imageOptions: {
|
|
61
61
|
margin: 2,
|
|
62
|
-
imageSize: this.logoSize
|
|
63
|
-
}
|
|
62
|
+
imageSize: this.logoSize
|
|
63
|
+
}
|
|
64
64
|
});
|
|
65
65
|
qrCode.append(this.qr);
|
|
66
66
|
}
|