@gataca/qr 3.0.11 → 4.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{esm/qr-code-styling-0eeb38d5.js → cjs/gat-icon-check-c88a30ed.js} +15 -1
- package/dist/cjs/{gataca-qr_2.cjs.entry.js → gataca-qr_3.cjs.entry.js} +398 -53
- package/dist/cjs/gataca-qrws.cjs.entry.js +6 -7
- package/dist/cjs/gataca-ssibuttonws.cjs.entry.js +61 -0
- package/dist/cjs/gatacaqr.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/gataca-qr/components/qr/QR.js +2 -2
- package/dist/collection/components/gataca-qr/components/readQR/ReadQR.js +13 -4
- package/dist/collection/components/gataca-qr/components/retryButton/RetryButton.js +3 -2
- package/dist/collection/components/gataca-qr/gataca-qr.css +1 -1
- package/dist/collection/components/gataca-qr/gataca-qr.js +31 -10
- package/dist/collection/components/gataca-qrdisplay/gataca-qrdisplay.js +22 -0
- package/dist/collection/components/gataca-ssibutton/gataca-ssibutton.js +163 -3
- package/dist/components/{gat-icon-alert.js → gat-icon-check.js} +3 -3
- package/dist/components/gataca-qr2.js +58 -45
- package/dist/components/gataca-qrdisplay2.js +5 -0
- package/dist/components/gataca-qrws2.js +1 -1
- package/dist/components/gataca-ssibutton2.js +88 -4
- package/dist/components/index.js +1 -1
- package/dist/{cjs/qr-code-styling-412bbc7a.js → esm/gat-icon-check-c188cd29.js} +8 -2
- package/dist/esm/{gataca-qr_2.entry.js → gataca-qr_3.entry.js} +395 -51
- package/dist/esm/gataca-qrws.entry.js +1 -2
- package/dist/esm/gataca-ssibuttonws.entry.js +57 -0
- package/dist/esm/gatacaqr.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/gatacaqr/gatacaqr.esm.js +1 -1
- package/dist/gatacaqr/p-5be73956.js +1 -0
- package/dist/gatacaqr/p-831794a4.entry.js +1 -0
- package/dist/gatacaqr/p-948e7d94.entry.js +1 -0
- package/dist/gatacaqr/p-e94e9be8.entry.js +1 -0
- package/dist/types/components/gataca-qr/components/qr/QR.d.ts +3 -1
- package/dist/types/components/gataca-qr/components/readQR/ReadQR.d.ts +2 -0
- package/dist/types/components/gataca-qr/components/retryButton/RetryButton.d.ts +2 -0
- package/dist/types/components/gataca-qr/gataca-qr.d.ts +12 -2
- package/dist/types/components/gataca-qrdisplay/gataca-qrdisplay.d.ts +5 -0
- package/dist/types/components/gataca-ssibutton/gataca-ssibutton.d.ts +30 -1
- package/dist/types/components.d.ts +50 -0
- package/package.json +1 -1
- package/dist/cjs/gat-icon-alert-0ad19b26.js +0 -14
- package/dist/cjs/gataca-ssibutton_2.cjs.entry.js +0 -313
- package/dist/esm/gat-icon-alert-7b06ef3a.js +0 -9
- package/dist/esm/gataca-ssibutton_2.entry.js +0 -308
- package/dist/gatacaqr/p-0be4566d.js +0 -1
- package/dist/gatacaqr/p-2adc0bcc.entry.js +0 -1
- package/dist/gatacaqr/p-2ddbc2fc.entry.js +0 -1
- package/dist/gatacaqr/p-d2dd7c85.entry.js +0 -1
- package/dist/gatacaqr/p-ea783014.js +0 -1
|
@@ -7,11 +7,32 @@ const DEFAULT_SESSION_TIMEOUT = 300; //5mins as in connect
|
|
|
7
7
|
const DEFAULT_POLLING_FREQ = 3;
|
|
8
8
|
export class GatacaSSIButton {
|
|
9
9
|
constructor() {
|
|
10
|
+
this.getRequestFromUri = async (authRequest) => {
|
|
11
|
+
const requrl = new URL(authRequest);
|
|
12
|
+
const requri = requrl.searchParams.get('request_uri');
|
|
13
|
+
if (requri) {
|
|
14
|
+
const response = await fetch(requri, {
|
|
15
|
+
method: 'GET',
|
|
16
|
+
headers: {
|
|
17
|
+
'Content-Type': 'application/json'
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
const jwt = await response.json();
|
|
21
|
+
const parts = jwt.split('.');
|
|
22
|
+
const base64 = parts[1].replace(/-/g, '+').replace(/_/g, '/');
|
|
23
|
+
const decoded = window.atob(base64);
|
|
24
|
+
let parsed = JSON.parse(decoded);
|
|
25
|
+
parsed.response_mode = 'dc_api';
|
|
26
|
+
return parsed;
|
|
27
|
+
}
|
|
28
|
+
};
|
|
10
29
|
this.buttonText = 'Easy login';
|
|
30
|
+
this.buttonDCAPIText = 'Login with Device Credentials';
|
|
11
31
|
this.qrType = 'svg';
|
|
12
32
|
this.autostart = true;
|
|
13
33
|
this.checkStatus = undefined;
|
|
14
34
|
this.createSession = undefined;
|
|
35
|
+
this.fillSession = undefined;
|
|
15
36
|
this.successCallback = undefined;
|
|
16
37
|
this.errorCallback = undefined;
|
|
17
38
|
this.handleCheckAppLoading = undefined;
|
|
@@ -40,13 +61,30 @@ export class GatacaSSIButton {
|
|
|
40
61
|
this.successLoginLabel = 'Successful Connection!';
|
|
41
62
|
this.byBrandLabel = 'by Gataca';
|
|
42
63
|
this.waitingStartSessionLabel = 'waiting to start a session';
|
|
64
|
+
this.enableDcApi = false;
|
|
43
65
|
this.hideQrModalDescription = false;
|
|
66
|
+
this.qrStyle = undefined;
|
|
44
67
|
this.open = false;
|
|
45
68
|
this.sessionId = undefined;
|
|
46
69
|
this.authenticationRequest = undefined;
|
|
47
70
|
this.sessionData = undefined;
|
|
48
71
|
this.result = RESULT_STATUS.NOT_STARTED;
|
|
49
|
-
this.qr = (h("gataca-qr", { ref: (el) => (this.qrElement = el), checkStatus: this.checkStatus, createSession: this.createSession, successCallback: this.successCallback, errorCallback: this.errorCallback, qrRole: this.qrRole, qrType: this.qrType, callbackServer: this.callbackServer, sessionTimeout: this.sessionTimeout, pollingFrequency: this.pollingFrequency, autostart: this.autostart, autorefresh: this.autorefresh, v: this.v, qrModalTitle: this.qrModalTitle, qrModalDescription: this.qrModalDescription, hideBrandTitle: this.hideBrandTitle, dynamicLink: this.dynamicLink, logoSize: this.logoSize, logoSrc: this.logoSrc, modalTitleColor: this.modalTitleColor, qrCodeExpiredLabel: this.qrCodeExpiredLabel, credentialsNotValidatedLabel: this.credentialsNotValidatedLabel, clickInsideBoxLabel: this.clickInsideBoxLabel, refreshQrLabel: this.refreshQrLabel, scanQrLabel: this.scanQrLabel, userNotScanInTimeErrorLabel: this.userNotScanInTimeErrorLabel, credsNotValidatedErrorLabel: this.credsNotValidatedErrorLabel, failedLoginErrorLabel: this.failedLoginErrorLabel, successLoginLabel: this.successLoginLabel, byBrandLabel: this.byBrandLabel, waitingStartSessionLabel: this.waitingStartSessionLabel, hideQrModalDescription: this.hideQrModalDescription }));
|
|
72
|
+
this.qr = (h("gataca-qr", { ref: (el) => (this.qrElement = el), checkStatus: this.checkStatus, createSession: this.createSession, successCallback: this.successCallback, errorCallback: this.errorCallback, qrRole: this.qrRole, qrType: this.qrType, callbackServer: this.callbackServer, sessionTimeout: this.sessionTimeout, pollingFrequency: this.pollingFrequency, autostart: this.autostart, autorefresh: this.autorefresh, v: this.v, qrModalTitle: this.qrModalTitle, qrModalDescription: this.qrModalDescription, hideBrandTitle: this.hideBrandTitle, dynamicLink: this.dynamicLink, logoSize: this.logoSize, logoSrc: this.logoSrc, modalTitleColor: this.modalTitleColor, qrCodeExpiredLabel: this.qrCodeExpiredLabel, credentialsNotValidatedLabel: this.credentialsNotValidatedLabel, clickInsideBoxLabel: this.clickInsideBoxLabel, refreshQrLabel: this.refreshQrLabel, scanQrLabel: this.scanQrLabel, userNotScanInTimeErrorLabel: this.userNotScanInTimeErrorLabel, credsNotValidatedErrorLabel: this.credsNotValidatedErrorLabel, failedLoginErrorLabel: this.failedLoginErrorLabel, successLoginLabel: this.successLoginLabel, byBrandLabel: this.byBrandLabel, waitingStartSessionLabel: this.waitingStartSessionLabel, hideQrModalDescription: this.hideQrModalDescription, qrStyle: this.qrStyle }));
|
|
73
|
+
}
|
|
74
|
+
supportsDCAPI() {
|
|
75
|
+
// let mobile = checkMobile();
|
|
76
|
+
// if (!mobile) return false;
|
|
77
|
+
if (!this.enableDcApi) {
|
|
78
|
+
return false;
|
|
79
|
+
}
|
|
80
|
+
//@ts-ignore
|
|
81
|
+
if (typeof window.DigitalCredential === 'undefined')
|
|
82
|
+
return false;
|
|
83
|
+
const protocols = ['org-iso-mdoc', 'openid4vp', 'openid4vci'];
|
|
84
|
+
//@ts-ignore
|
|
85
|
+
const supportedProtocols = protocols.filter(window.DigitalCredential.userAgentAllowsProtocol);
|
|
86
|
+
console.log(supportedProtocols, protocols);
|
|
87
|
+
return true;
|
|
50
88
|
}
|
|
51
89
|
/**
|
|
52
90
|
* Retrieve manually the session data on a successful login
|
|
@@ -191,7 +229,7 @@ export class GatacaSSIButton {
|
|
|
191
229
|
return authenticationRequest;
|
|
192
230
|
}
|
|
193
231
|
renderMobileButton(isAndroid, isIos) {
|
|
194
|
-
if (this.autostart) {
|
|
232
|
+
if (this.autostart && !this.supportsDCAPI()) {
|
|
195
233
|
this.startMobilePolling();
|
|
196
234
|
}
|
|
197
235
|
let loading = false;
|
|
@@ -230,6 +268,47 @@ export class GatacaSSIButton {
|
|
|
230
268
|
executeRedirection();
|
|
231
269
|
}, disabled: loading }, h("img", { src: PHONE_ICON, class: "buttonImg", alt: this.buttonText }), h("span", null, this.buttonText))));
|
|
232
270
|
}
|
|
271
|
+
renderDCAPIButton(isAndroid, isIos) {
|
|
272
|
+
let loading = false;
|
|
273
|
+
console.log('Maybe act different', isAndroid, isIos);
|
|
274
|
+
const handleLoading = (isLoading) => {
|
|
275
|
+
loading = isLoading;
|
|
276
|
+
if (this.handleCheckAppLoading) {
|
|
277
|
+
this.handleCheckAppLoading(isLoading);
|
|
278
|
+
}
|
|
279
|
+
};
|
|
280
|
+
const executeDCAPICall = async () => {
|
|
281
|
+
handleLoading(true);
|
|
282
|
+
try {
|
|
283
|
+
const authRequest = await this.getAuthRequest();
|
|
284
|
+
let request = await this.getRequestFromUri(authRequest);
|
|
285
|
+
let credentialResponse = await navigator.credentials.get({
|
|
286
|
+
//@ts-ignore
|
|
287
|
+
digital: {
|
|
288
|
+
requests: [
|
|
289
|
+
{
|
|
290
|
+
protocol: 'openid4vp-v1-unsigned',
|
|
291
|
+
data: request
|
|
292
|
+
}
|
|
293
|
+
]
|
|
294
|
+
}
|
|
295
|
+
});
|
|
296
|
+
if (credentialResponse.constructor.name == 'DigitalCredential') {
|
|
297
|
+
console.log('Digital Credential - Response Data: ' + credentialResponse);
|
|
298
|
+
}
|
|
299
|
+
//@ts-ignore
|
|
300
|
+
await this.fillSession(request, credentialResponse === null || credentialResponse === void 0 ? void 0 : credentialResponse.data);
|
|
301
|
+
}
|
|
302
|
+
catch (error) {
|
|
303
|
+
this.stop();
|
|
304
|
+
handleLoading(false);
|
|
305
|
+
}
|
|
306
|
+
};
|
|
307
|
+
return (h("div", { class: "gatacaButtonWrapper" }, h("button", { class: "gatacaButton", onClick: () => {
|
|
308
|
+
this.gatacaButtonPushed.emit();
|
|
309
|
+
executeDCAPICall();
|
|
310
|
+
}, disabled: loading }, h("img", { src: PHONE_ICON, class: "buttonImg", alt: this.buttonDCAPIText }), h("span", null, this.buttonDCAPIText))));
|
|
311
|
+
}
|
|
233
312
|
render() {
|
|
234
313
|
const userAgent =
|
|
235
314
|
// @ts-ignore
|
|
@@ -239,7 +318,8 @@ export class GatacaSSIButton {
|
|
|
239
318
|
// @ts-ignore
|
|
240
319
|
(/iPad|iPhone|iPod/.test(userAgent) && !window.MSStream) || (navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1);
|
|
241
320
|
const isMobile = isAndroid || isIos;
|
|
242
|
-
|
|
321
|
+
const displayDCApi = this.supportsDCAPI();
|
|
322
|
+
return (h("div", null, h("div", { class: "buttonContainer" }, isMobile && this.v === '3' ? this.renderMobileButton(isAndroid, isIos) : this.renderDesktopButton(), this.open && (!isMobile || this.v === '3') && this.renderModal()), displayDCApi /** && isMobile */ && h("div", { class: "buttonContainer" }, this.renderDCAPIButton(isAndroid, isIos))));
|
|
243
323
|
}
|
|
244
324
|
static get is() { return "gataca-ssibutton"; }
|
|
245
325
|
static get encapsulation() { return "shadow"; }
|
|
@@ -273,6 +353,24 @@ export class GatacaSSIButton {
|
|
|
273
353
|
"reflect": false,
|
|
274
354
|
"defaultValue": "'Easy login'"
|
|
275
355
|
},
|
|
356
|
+
"buttonDCAPIText": {
|
|
357
|
+
"type": "string",
|
|
358
|
+
"mutable": false,
|
|
359
|
+
"complexType": {
|
|
360
|
+
"original": "string",
|
|
361
|
+
"resolved": "string",
|
|
362
|
+
"references": {}
|
|
363
|
+
},
|
|
364
|
+
"required": false,
|
|
365
|
+
"optional": true,
|
|
366
|
+
"docs": {
|
|
367
|
+
"tags": [],
|
|
368
|
+
"text": "_[Optional]_\nIn the case of enabling DCAPI button, allows to configure the text displayed"
|
|
369
|
+
},
|
|
370
|
+
"attribute": "button-d-c-a-p-i-text",
|
|
371
|
+
"reflect": false,
|
|
372
|
+
"defaultValue": "'Login with Device Credentials'"
|
|
373
|
+
},
|
|
276
374
|
"qrType": {
|
|
277
375
|
"type": "string",
|
|
278
376
|
"mutable": false,
|
|
@@ -358,6 +456,30 @@ export class GatacaSSIButton {
|
|
|
358
456
|
},
|
|
359
457
|
"defaultValue": "undefined"
|
|
360
458
|
},
|
|
459
|
+
"fillSession": {
|
|
460
|
+
"type": "unknown",
|
|
461
|
+
"mutable": false,
|
|
462
|
+
"complexType": {
|
|
463
|
+
"original": "(request: any, sessionData?: any) => Promise<{result: RESULT_STATUS; data?: any}>",
|
|
464
|
+
"resolved": "(request: any, sessionData?: any) => Promise<{ result: RESULT_STATUS; data?: any; }>",
|
|
465
|
+
"references": {
|
|
466
|
+
"Promise": {
|
|
467
|
+
"location": "global"
|
|
468
|
+
},
|
|
469
|
+
"RESULT_STATUS": {
|
|
470
|
+
"location": "import",
|
|
471
|
+
"path": "../../utils/utils"
|
|
472
|
+
}
|
|
473
|
+
}
|
|
474
|
+
},
|
|
475
|
+
"required": false,
|
|
476
|
+
"optional": true,
|
|
477
|
+
"docs": {
|
|
478
|
+
"tags": [],
|
|
479
|
+
"text": "***Mandatory if DC API***\nSends the API response"
|
|
480
|
+
},
|
|
481
|
+
"defaultValue": "undefined"
|
|
482
|
+
},
|
|
361
483
|
"successCallback": {
|
|
362
484
|
"type": "unknown",
|
|
363
485
|
"mutable": false,
|
|
@@ -855,6 +977,24 @@ export class GatacaSSIButton {
|
|
|
855
977
|
"reflect": false,
|
|
856
978
|
"defaultValue": "'waiting to start a session'"
|
|
857
979
|
},
|
|
980
|
+
"enableDcApi": {
|
|
981
|
+
"type": "boolean",
|
|
982
|
+
"mutable": false,
|
|
983
|
+
"complexType": {
|
|
984
|
+
"original": "boolean",
|
|
985
|
+
"resolved": "boolean",
|
|
986
|
+
"references": {}
|
|
987
|
+
},
|
|
988
|
+
"required": false,
|
|
989
|
+
"optional": true,
|
|
990
|
+
"docs": {
|
|
991
|
+
"tags": [],
|
|
992
|
+
"text": "_[Optional]_\nString to show \"waiting start session\" label"
|
|
993
|
+
},
|
|
994
|
+
"attribute": "enable-dc-api",
|
|
995
|
+
"reflect": false,
|
|
996
|
+
"defaultValue": "false"
|
|
997
|
+
},
|
|
858
998
|
"hideQrModalDescription": {
|
|
859
999
|
"type": "boolean",
|
|
860
1000
|
"mutable": false,
|
|
@@ -872,6 +1012,26 @@ export class GatacaSSIButton {
|
|
|
872
1012
|
"attribute": "hide-qr-modal-description",
|
|
873
1013
|
"reflect": false,
|
|
874
1014
|
"defaultValue": "false"
|
|
1015
|
+
},
|
|
1016
|
+
"qrStyle": {
|
|
1017
|
+
"type": "unknown",
|
|
1018
|
+
"mutable": false,
|
|
1019
|
+
"complexType": {
|
|
1020
|
+
"original": "qrStyle",
|
|
1021
|
+
"resolved": "{ color: string; bgColor: string; boxShadow?: boolean; }",
|
|
1022
|
+
"references": {
|
|
1023
|
+
"qrStyle": {
|
|
1024
|
+
"location": "import",
|
|
1025
|
+
"path": "../gataca-qr/gataca-qr"
|
|
1026
|
+
}
|
|
1027
|
+
}
|
|
1028
|
+
},
|
|
1029
|
+
"required": false,
|
|
1030
|
+
"optional": true,
|
|
1031
|
+
"docs": {
|
|
1032
|
+
"tags": [],
|
|
1033
|
+
"text": "_[Optional]_\nAdjust the color styles of the QR"
|
|
1034
|
+
}
|
|
875
1035
|
}
|
|
876
1036
|
};
|
|
877
1037
|
}
|
|
@@ -21,10 +21,10 @@ var RESULT_STATUS;
|
|
|
21
21
|
RESULT_STATUS[RESULT_STATUS["READ"] = 5] = "READ";
|
|
22
22
|
})(RESULT_STATUS || (RESULT_STATUS = {}));
|
|
23
23
|
|
|
24
|
-
const gatIconCheckSvg = 'data:image/svg+xml;base64,Cjxzdmcgd2lkdGg9IjUyIiBoZWlnaHQ9IjUzIiB2aWV3Qm94PSIwIDAgNTIgNTMiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxjaXJjbGUgY3g9IjI2IiBjeT0iMjYuNjcxOSIgcj0iMjYiIGZpbGw9IiMzRDlBNTAiLz4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0zOC41MiAxNy43NDk1QzM5LjU4MDUgMTguODA5OSAzOS41ODA1IDIwLjUyOTMgMzguNTIgMjEuNTg5OEwyMy41ODQ2IDM2LjUyNTFDMjIuNTI0MiAzNy41ODU2IDIwLjgwNDggMzcuNTg1NiAxOS43NDQzIDM2LjUyNTFMMTIuOTU1NSAyOS43MzYzQzExLjg5NSAyOC42NzU5IDExLjg5NSAyNi45NTY1IDEyLjk1NTUgMjUuODk2QzE0LjAxNiAyNC44MzU1IDE1LjczNTQgMjQuODM1NSAxNi43OTU4IDI1Ljg5NkwyMS42NjQ1IDMwLjc2NDdMMzQuNjc5NyAxNy43NDk1QzM1Ljc0MDIgMTYuNjg5IDM3LjQ1OTUgMTYuNjg5IDM4LjUyIDE3Ljc0OTVaIiBmaWxsPSJ3aGl0ZSIvPgo8L3N2Zz4K';
|
|
25
|
-
|
|
26
24
|
const gatIconRefreshSvg = 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMj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T_STATUS as R, gatIconAlertSvg as a, base64UrlEncode as b, checkMobile as c, gatIconCheckSvg as d, gatIconRefreshSvg as g };
|
|
@@ -1,35 +1,10 @@
|
|
|
1
1
|
import { h, proxyCustomElement, HTMLElement, createEvent } from '@stencil/core/internal/client';
|
|
2
2
|
import { l as logoGatacaSvg, d as defineCustomElement$1 } from './gataca-qrdisplay2.js';
|
|
3
|
-
import { g as
|
|
3
|
+
import { g as gatIconRefreshSvg, a as gatIconAlertSvg, d as gatIconCheckSvg, R as RESULT_STATUS, c as checkMobile, b as base64UrlEncode } from './gat-icon-check.js';
|
|
4
4
|
|
|
5
|
-
const
|
|
6
|
-
const {
|
|
7
|
-
return
|
|
8
|
-
height: modalHeight ? (modalHeight === null || modalHeight === void 0 ? void 0 : modalHeight.toString()) + 'px' : '300px'
|
|
9
|
-
} },
|
|
10
|
-
h("img", { src: gatIconCheckSvg, height: 52, width: 52 }),
|
|
11
|
-
h("p", { class: "successMsg" }, successLoginLabel)));
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
const RetryButton = (props) => {
|
|
15
|
-
var _a;
|
|
16
|
-
const { errorMessage, modalWidth, clickInsideBoxLabel, refreshQrLabel, scanQrLabel, waitingStartSessionLabel, display, renderRetryQR } = props;
|
|
17
|
-
return (h("div", { class: "reload", style: {
|
|
18
|
-
width: (modalWidth - 48).toString() + 'px',
|
|
19
|
-
height: modalWidth ? ((_a = (modalWidth - 48)) === null || _a === void 0 ? void 0 : _a.toString()) + 'px' : ''
|
|
20
|
-
} },
|
|
21
|
-
h("div", { id: "notify", onClick: () => display() },
|
|
22
|
-
h("img", { src: gatIconRefreshSvg, height: 24, width: 24 }),
|
|
23
|
-
h("p", { class: "notify-text" },
|
|
24
|
-
clickInsideBoxLabel,
|
|
25
|
-
" "),
|
|
26
|
-
errorMessage ? h("p", { class: "notify-text bold" }, refreshQrLabel) : h("p", { class: "notify-text bold" }, scanQrLabel),
|
|
27
|
-
errorMessage && (h("div", { class: "alert", style: {
|
|
28
|
-
width: (modalWidth - 48).toString() + 'px'
|
|
29
|
-
} },
|
|
30
|
-
h("img", { src: gatIconAlertSvg, height: 24, width: 24 }),
|
|
31
|
-
h("p", null, errorMessage)))),
|
|
32
|
-
h("div", { id: "qrwait" }, renderRetryQR(waitingStartSessionLabel))));
|
|
5
|
+
const QR = (props) => {
|
|
6
|
+
const { value, useLogo, logoSrc, size, qrType, style } = props;
|
|
7
|
+
return h("gataca-qrdisplay", { qrData: value, rounded: true, qrType: qrType, size: size, "logo-size": useLogo ? 0.33 : 0, "logo-src": logoSrc, qrColor: style === null || style === void 0 ? void 0 : style.color, bgColor: style === null || style === void 0 ? void 0 : style.bgColor });
|
|
33
8
|
};
|
|
34
9
|
|
|
35
10
|
const AnimatedLoader = () => {
|
|
@@ -47,33 +22,68 @@ const AnimatedLoader = () => {
|
|
|
47
22
|
|
|
48
23
|
const ReadQR = (props) => {
|
|
49
24
|
var _a;
|
|
50
|
-
const { modalWidth, readQrMessages, renderQR, url, sizeQR } = props;
|
|
25
|
+
const { modalWidth, readQrMessages, renderQR, url, sizeQR, style } = props;
|
|
51
26
|
return (h("div", { class: "blured", style: {
|
|
52
27
|
width: (modalWidth - 48).toString() + 'px',
|
|
53
|
-
height: modalWidth ? ((_a = (modalWidth - 48)) === null || _a === void 0 ? void 0 : _a.toString()) + 'px' : ''
|
|
28
|
+
height: modalWidth ? ((_a = (modalWidth - 48)) === null || _a === void 0 ? void 0 : _a.toString()) + 'px' : '',
|
|
29
|
+
backgroundColor: style === null || style === void 0 ? void 0 : style.bgColor,
|
|
30
|
+
color: style === null || style === void 0 ? void 0 : style.color,
|
|
31
|
+
border: (style === null || style === void 0 ? void 0 : style.color) ? `1px dashed ${style === null || style === void 0 ? void 0 : style.color}` : `1px dashed #a1a1a1`
|
|
54
32
|
} },
|
|
55
|
-
h("div", { id: "notify"
|
|
33
|
+
h("div", { id: "notify", style: {
|
|
34
|
+
backgroundColor: (style === null || style === void 0 ? void 0 : style.bgColor) ? style === null || style === void 0 ? void 0 : style.bgColor : 'white'
|
|
35
|
+
} },
|
|
56
36
|
h(AnimatedLoader, null),
|
|
57
|
-
h("p", { class: "notify-text"
|
|
37
|
+
h("p", { class: "notify-text", style: {
|
|
38
|
+
color: (style === null || style === void 0 ? void 0 : style.color) ? style === null || style === void 0 ? void 0 : style.color : '#707074'
|
|
39
|
+
} }, readQrMessages === null || readQrMessages === void 0 ? void 0 :
|
|
58
40
|
readQrMessages.title,
|
|
59
|
-
|
|
60
|
-
h("p", { class: "notify-text bold"
|
|
41
|
+
' '),
|
|
42
|
+
h("p", { class: "notify-text bold", style: {
|
|
43
|
+
color: (style === null || style === void 0 ? void 0 : style.color) ? style === null || style === void 0 ? void 0 : style.color : '#707074'
|
|
44
|
+
} }, readQrMessages === null || readQrMessages === void 0 ? void 0 : readQrMessages.description)),
|
|
61
45
|
h("div", { id: "qrwait" }, renderQR(url, false, sizeQR))));
|
|
62
46
|
};
|
|
63
47
|
|
|
64
|
-
const
|
|
65
|
-
|
|
66
|
-
|
|
48
|
+
const RetryButton = (props) => {
|
|
49
|
+
var _a;
|
|
50
|
+
const { errorMessage, modalWidth, clickInsideBoxLabel, refreshQrLabel, scanQrLabel, waitingStartSessionLabel, style, display, renderRetryQR } = props;
|
|
51
|
+
return (h("div", { class: "reload", style: {
|
|
52
|
+
width: (modalWidth - 48).toString() + 'px',
|
|
53
|
+
height: modalWidth ? ((_a = (modalWidth - 48)) === null || _a === void 0 ? void 0 : _a.toString()) + 'px' : '',
|
|
54
|
+
border: (style === null || style === void 0 ? void 0 : style.color) ? `1px dashed ${style === null || style === void 0 ? void 0 : style.color}` : `1px dashed #a1a1a1`
|
|
55
|
+
} },
|
|
56
|
+
h("div", { id: "notify", onClick: () => display() },
|
|
57
|
+
h("img", { src: gatIconRefreshSvg, height: 24, width: 24 }),
|
|
58
|
+
h("p", { class: "notify-text" },
|
|
59
|
+
clickInsideBoxLabel,
|
|
60
|
+
" "),
|
|
61
|
+
errorMessage ? h("p", { class: "notify-text bold" }, refreshQrLabel) : h("p", { class: "notify-text bold" }, scanQrLabel),
|
|
62
|
+
errorMessage && (h("div", { class: "alert", style: {
|
|
63
|
+
width: (modalWidth - 48).toString() + 'px'
|
|
64
|
+
} },
|
|
65
|
+
h("img", { src: gatIconAlertSvg, height: 24, width: 24 }),
|
|
66
|
+
h("p", null, errorMessage)))),
|
|
67
|
+
h("div", { id: "qrwait" }, renderRetryQR(waitingStartSessionLabel))));
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
const Success = (props) => {
|
|
71
|
+
const { modalHeight, successLoginLabel } = props;
|
|
72
|
+
return (h("div", { class: 'success', style: {
|
|
73
|
+
height: modalHeight ? (modalHeight === null || modalHeight === void 0 ? void 0 : modalHeight.toString()) + 'px' : '300px'
|
|
74
|
+
} },
|
|
75
|
+
h("img", { src: gatIconCheckSvg, height: 52, width: 52 }),
|
|
76
|
+
h("p", { class: "successMsg" }, successLoginLabel)));
|
|
67
77
|
};
|
|
68
78
|
|
|
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:
|
|
79
|
+
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:20px;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
80
|
|
|
71
81
|
const DEEP_LINK_PREFIX = 'https://api.gataca.io/qr/redirect.html';
|
|
72
82
|
//Default values
|
|
73
83
|
const DEFAULT_SESSION_TIMEOUT = 300; //5mins as in connect
|
|
74
84
|
const DEFAULT_POLLING_FREQ = 3;
|
|
75
85
|
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 = '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; }
|
|
86
|
+
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.qrStyle = undefined; this.sessionId = undefined; this.authenticationRequest = undefined; this.sessionData = undefined; this.result = RESULT_STATUS.NOT_STARTED; }
|
|
77
87
|
disconnectedCallback() {
|
|
78
88
|
this.stop();
|
|
79
89
|
}
|
|
@@ -213,21 +223,23 @@ const GatacaQR = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
213
223
|
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) });
|
|
214
224
|
}
|
|
215
225
|
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 });
|
|
226
|
+
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, style: this === null || this === void 0 ? void 0 : this.qrStyle });
|
|
217
227
|
}
|
|
218
228
|
renderRetryQR(value, useLogo) {
|
|
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 });
|
|
229
|
+
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, style: this === null || this === void 0 ? void 0 : this.qrStyle });
|
|
220
230
|
}
|
|
221
231
|
render() {
|
|
222
|
-
var _a, _b;
|
|
232
|
+
var _a, _b, _c, _d, _e;
|
|
223
233
|
return (h("div", { class: "popUpContainer" }, h("div", { class: `is-visible modal-window ${this.hideModalTexts ? '' : 'large-modal'} ${this.hideModalBoxShadow ? 'noBoxShadow' : ''}`, style: {
|
|
224
234
|
width: (this.modalWidth - 2).toString() + 'px',
|
|
225
|
-
height: this.modalHeight ? ((_a = (this.modalHeight - 2)) === null || _a === void 0 ? void 0 : _a.toString()) + 'px' : ''
|
|
235
|
+
height: this.modalHeight ? ((_a = (this.modalHeight - 2)) === null || _a === void 0 ? void 0 : _a.toString()) + 'px' : '',
|
|
236
|
+
backgroundColor: ((_b = this === null || this === void 0 ? void 0 : this.qrStyle) === null || _b === void 0 ? void 0 : _b.bgColor) ? (_c = this === null || this === void 0 ? void 0 : this.qrStyle) === null || _c === void 0 ? void 0 : _c.bgColor : 'white',
|
|
237
|
+
boxShadow: ((_d = this === null || this === void 0 ? void 0 : this.qrStyle) === null || _d === void 0 ? void 0 : _d.boxShadow) ? '0px 3px 10px rgba(48, 48, 48, 0.1);' : 'none'
|
|
226
238
|
}, onClick: (event) => {
|
|
227
239
|
event.stopPropagation();
|
|
228
240
|
} }, 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
241
|
width: this.modalWidth.toString() + 'px',
|
|
230
|
-
height: this.modalWidth ? ((
|
|
242
|
+
height: this.modalWidth ? ((_e = this.modalWidth) === null || _e === void 0 ? void 0 : _e.toString()) + 'px' : ''
|
|
231
243
|
} }, this.renderQRSection())))));
|
|
232
244
|
}
|
|
233
245
|
static get style() { return gatacaQrCss; }
|
|
@@ -270,6 +282,7 @@ const GatacaQR = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
270
282
|
"sessionTimeout": [2, "session-timeout"],
|
|
271
283
|
"pollingFrequency": [2, "polling-frequency"],
|
|
272
284
|
"dynamicLink": [4, "dynamic-link"],
|
|
285
|
+
"qrStyle": [16],
|
|
273
286
|
"sessionId": [32],
|
|
274
287
|
"authenticationRequest": [32],
|
|
275
288
|
"sessionData": [32],
|
|
@@ -37,6 +37,7 @@ const GatacaQRDisplay = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
37
37
|
this.logoSize = 0;
|
|
38
38
|
this.logoSrc = undefined;
|
|
39
39
|
this.qrColor = '#1E1E20';
|
|
40
|
+
this.bgColor = '#FFFFFF';
|
|
40
41
|
this.rounded = true;
|
|
41
42
|
}
|
|
42
43
|
componentDidLoad() {
|
|
@@ -60,6 +61,9 @@ const GatacaQRDisplay = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
60
61
|
imageOptions: {
|
|
61
62
|
margin: 2,
|
|
62
63
|
imageSize: this.logoSize
|
|
64
|
+
},
|
|
65
|
+
backgroundOptions: {
|
|
66
|
+
color: this.bgColor
|
|
63
67
|
}
|
|
64
68
|
});
|
|
65
69
|
qrCode.append(this.qr);
|
|
@@ -76,6 +80,7 @@ const GatacaQRDisplay = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
76
80
|
"logoSize": [2, "logo-size"],
|
|
77
81
|
"logoSrc": [1, "logo-src"],
|
|
78
82
|
"qrColor": [1, "qr-color"],
|
|
83
|
+
"bgColor": [1, "bg-color"],
|
|
79
84
|
"rounded": [4]
|
|
80
85
|
}]);
|
|
81
86
|
function defineCustomElement() {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { h, proxyCustomElement, HTMLElement, createEvent } from '@stencil/core/internal/client';
|
|
2
2
|
import { l as logoGatacaSvg, d as defineCustomElement$1 } from './gataca-qrdisplay2.js';
|
|
3
|
-
import {
|
|
3
|
+
import { d as gatIconCheckSvg, g as gatIconRefreshSvg, a as gatIconAlertSvg, R as RESULT_STATUS, c as checkMobile, b as base64UrlEncode } from './gat-icon-check.js';
|
|
4
4
|
|
|
5
5
|
const Success = (props) => {
|
|
6
6
|
const { modalHeight, successLoginLabel } = props;
|