@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
|
@@ -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)))),
|
|
@@ -34,7 +34,7 @@ const RetryButton = (props) => {
|
|
|
34
34
|
|
|
35
35
|
const QR = (props) => {
|
|
36
36
|
const { value, useLogo, logoSrc, size, qrType } = props;
|
|
37
|
-
return
|
|
37
|
+
return h("gataca-qrdisplay", { qrData: value, rounded: true, size: size, qrType: qrType, "logo-size": useLogo ? 0.33 : 0, "logo-src": logoSrc });
|
|
38
38
|
};
|
|
39
39
|
|
|
40
40
|
const AnimatedLoader = () => {
|
|
@@ -54,8 +54,8 @@ const ReadQR = (props) => {
|
|
|
54
54
|
var _a;
|
|
55
55
|
const { modalWidth, readQrMessages, renderQR, url, sizeQR } = props;
|
|
56
56
|
return (h("div", { class: "blured", style: {
|
|
57
|
-
width: (modalWidth - 48).toString() +
|
|
58
|
-
height: modalWidth ? ((_a = (modalWidth - 48)) === null || _a === void 0 ? void 0 : _a.toString()) +
|
|
57
|
+
width: (modalWidth - 48).toString() + 'px',
|
|
58
|
+
height: modalWidth ? ((_a = (modalWidth - 48)) === null || _a === void 0 ? void 0 : _a.toString()) + 'px' : ''
|
|
59
59
|
} },
|
|
60
60
|
h("div", { id: "notify" },
|
|
61
61
|
h(AnimatedLoader, null),
|
|
@@ -68,11 +68,11 @@ const ReadQR = (props) => {
|
|
|
68
68
|
|
|
69
69
|
const gatacaQrwsCss = "@import url(\"https://fonts.googleapis.com/css2?family=Ubuntu:wght@100;300;400;500;600;700&display=swap\"); @import url(\"https://fonts.googleapis.com/css2?family=Poppins:wght@100;300;400;500;600;700&display=swap\"); @import url(\"https://fonts.googleapis.com/css2?family=Work+Sans:wght@300;400&display=swap\"); html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:\"\";content:none}table{border-collapse:collapse;border-spacing:0}.img-fluid{height:auto;max-width:50%}img{margin-left:auto;margin-right:auto}.brandSection{padding-top:5px;display:flex;align-items:center}.brandSection .gatacaImgSmall{height:13px;width:13px;margin:0;margin-right:10px}.popUpContainer .large-modal{width:300px;min-height:350px}.popUpContainer .modal-window{position:relative;border-radius:6px;overflow:hidden;color:rgba(24, 27, 94, 0.8);box-shadow:0px 3px 10px rgba(48, 48, 48, 0.1);display:flex;flex-direction:column;justify-content:space-between;align-items:center;display:flex;z-index:1001;padding:1px;background-color:white;border-radius:12px;-webkit-transition:opacity 0.5s, visibility 0s 0.5s;transition:opacity 0.5s, visibility 0s 0.5s;visibility:hidden;opacity:0}.popUpContainer .modal-window__content{width:100%;height:100%;text-align:left}.popUpContainer .modal-window__content .hidenText{display:none}.popUpContainer .modal-window .modalText{font-family:\"Ubuntu\", \"Work Sans\", \"Helvetica Neue\", sans-serif;font-size:20px;font-style:normal;font-weight:700;line-height:24px;margin-top:10px;letter-spacing:1px}.popUpContainer .modal-window .qrTitleContainer{padding:14px 24px;padding-bottom:0px}.popUpContainer .modal-window .qrTitle{font-size:20px;font-weight:600;line-height:23.5px}.popUpContainer .modal-window .qrDescription{font-family:\"Poppins\", \"Ubuntu\", \"Work Sans\", \"Helvetica Neue\", sans-serif;font-size:14px;font-style:normal;font-weight:400;line-height:16px;color:#707074}.popUpContainer .modal-window .bold{font-weight:700}.popUpContainer .modal-window .qrBrand{margin-top:4px;font-size:14px;font-weight:400;line-height:16.5px;display:flex;align-items:center}.popUpContainer .modal-window .qrBrand img{margin-left:5px;height:12px}.popUpContainer .modal-window .qr-section{width:252px;height:252px}.popUpContainer .noBoxShadow{box-shadow:none}.popUpContainer .is-visible{opacity:1;visibility:visible}.is-transparent{opacity:0}.success{display:flex;height:300px;flex-direction:column;justify-content:center;align-items:center;padding:0px}.success>img{padding-bottom:12px}.success>.successMsg{line-height:23.5px;color:var(--neutral-1000, #1e1e20);text-align:center;font-family:\"Ubuntu\", \"Work Sans\", \"Helvetica Neue\", sans-serif;font-size:20px;font-style:normal;font-weight:700;line-height:24px}.reload,.blured{height:252px;width:252px;border:1px dashed #a1a1a1;border-radius:12px;position:relative;top:24px;margin:0 24px 24px;display:flex;overflow:hidden;justify-content:center;align-items:center}#qrwait{display:flex;justify-content:center}#qrwait,#notify{width:100%;height:100%;top:0;left:0;border-radius:20px}#notify{z-index:10;position:absolute;justify-self:center;justify-items:center;justify-content:center;align-items:center;align-content:center;display:flex;flex-direction:column;box-sizing:border-box;padding:20px;background:rgba(255, 255, 255, 0.95)}#notify>img{padding-bottom:12px}.alert{display:flex;flex-direction:row;justify-content:start;width:252px;position:absolute;bottom:0px;border:1px solid #ee888c;background:#ffdedf;border-radius:11px;box-sizing:border-box;padding:12px;align-items:center;gap:12px}.alert>img{margin:0}.alert>p{font-family:\"Poppins\", \"Ubuntu\", \"Work Sans\", \"Helvetica Neue\", sans-serif;font-size:14px;font-style:normal;font-weight:400;margin-top:0;line-height:16px;color:#1e1e20}.notify-text{font-family:\"Poppins\", \"Ubuntu\", \"Work Sans\", \"Helvetica Neue\", sans-serif;font-size:14px;font-style:normal;font-weight:400;line-height:16px;color:#707074;text-align:center}.containerLoader{display:flex;justify-content:center;align-items:center;width:30px;height:30px;margin-bottom:12px}.loader{position:relative;margin-left:0 !important}.loader__item{position:absolute;width:9.68px;height:4px;background:transparent;border-radius:2px}.loader__item__1{transform:translate(2.5846212025px, 5.4246212025px) rotate(45deg);-webkit-animation:translate(2.5846212025px, 5.4246212025px) rotate(45deg);-moz-animation:translate(2.5846212025px, 5.4246212025px) rotate(45deg);-o-animation:translate(2.5846212025px, 5.4246212025px) rotate(45deg);animation:blink 0.8333333333s linear 0.1041666667s infinite;-webkit-animation:blink 0.8333333333s linear 0.1041666667s infinite;-moz-animation:blink 0.8333333333s linear 0.1041666667s infinite;-o-animation:blink 0.8333333333s linear 0.1041666667s infinite}.loader__item__2{transform:translate(-4.84px, 8.5px) rotate(90deg);-webkit-animation:translate(-4.84px, 8.5px) rotate(90deg);-moz-animation:translate(-4.84px, 8.5px) rotate(90deg);-o-animation:translate(-4.84px, 8.5px) rotate(90deg);animation:blink 0.8333333333s linear 0.2083333333s infinite;-webkit-animation:blink 0.8333333333s linear 0.2083333333s infinite;-moz-animation:blink 0.8333333333s linear 0.2083333333s infinite;-o-animation:blink 0.8333333333s linear 0.2083333333s infinite}.loader__item__3{transform:translate(-12.2646212025px, 5.4246212025px) rotate(135deg);-webkit-animation:translate(-12.2646212025px, 5.4246212025px) rotate(135deg);-moz-animation:translate(-12.2646212025px, 5.4246212025px) rotate(135deg);-o-animation:translate(-12.2646212025px, 5.4246212025px) rotate(135deg);animation:blink 0.8333333333s linear 0.3125s infinite;-webkit-animation:blink 0.8333333333s linear 0.3125s infinite;-moz-animation:blink 0.8333333333s linear 0.3125s infinite;-o-animation:blink 0.8333333333s linear 0.3125s infinite}.loader__item__4{transform:translate(-15.3399999992px, -1.9999999999px) rotate(180deg);-webkit-animation:translate(-15.3399999992px, -1.9999999999px) rotate(180deg);-moz-animation:translate(-15.3399999992px, -1.9999999999px) rotate(180deg);-o-animation:translate(-15.3399999992px, -1.9999999999px) rotate(180deg);animation:blink 0.8333333333s linear 0.4166666667s infinite;-webkit-animation:blink 0.8333333333s linear 0.4166666667s infinite;-moz-animation:blink 0.8333333333s linear 0.4166666667s infinite;-o-animation:blink 0.8333333333s linear 0.4166666667s infinite}.loader__item__5{transform:translate(-12.2646210959px, -9.4246211842px) rotate(225deg);-webkit-animation:translate(-12.2646210959px, -9.4246211842px) rotate(225deg);-moz-animation:translate(-12.2646210959px, -9.4246211842px) rotate(225deg);-o-animation:translate(-12.2646210959px, -9.4246211842px) rotate(225deg);animation:blink 0.8333333333s linear 0.5208333333s infinite;-webkit-animation:blink 0.8333333333s linear 0.5208333333s infinite;-moz-animation:blink 0.8333333333s linear 0.5208333333s infinite;-o-animation:blink 0.8333333333s linear 0.5208333333s infinite}.loader__item__6{transform:translate(-4.8399941857px, -12.499998805px) rotate(270deg);-webkit-animation:translate(-4.8399941857px, -12.499998805px) rotate(270deg);-moz-animation:translate(-4.8399941857px, -12.499998805px) rotate(270deg);-o-animation:translate(-4.8399941857px, -12.499998805px) rotate(270deg);animation:blink 0.8333333333s linear 0.625s infinite;-webkit-animation:blink 0.8333333333s linear 0.625s infinite;-moz-animation:blink 0.8333333333s linear 0.625s infinite;-o-animation:blink 0.8333333333s linear 0.625s infinite}.loader__item__7{transform:translate(2.5847915061px, -9.4245803212px) rotate(315deg);-webkit-animation:translate(2.5847915061px, -9.4245803212px) rotate(315deg);-moz-animation:translate(2.5847915061px, -9.4245803212px) rotate(315deg);-o-animation:translate(2.5847915061px, -9.4245803212px) rotate(315deg);animation:blink 0.8333333333s linear 0.7291666667s infinite;-webkit-animation:blink 0.8333333333s linear 0.7291666667s infinite;-moz-animation:blink 0.8333333333s linear 0.7291666667s infinite;-o-animation:blink 0.8333333333s linear 0.7291666667s infinite}.loader__item__8{transform:translate(5.6631628524px, -1.99913122px) rotate(360deg);-webkit-animation:translate(5.6631628524px, -1.99913122px) rotate(360deg);-moz-animation:translate(5.6631628524px, -1.99913122px) rotate(360deg);-o-animation:translate(5.6631628524px, -1.99913122px) rotate(360deg);animation:blink 0.8333333333s linear 0.8333333333s infinite;-webkit-animation:blink 0.8333333333s linear 0.8333333333s infinite;-moz-animation:blink 0.8333333333s linear 0.8333333333s infinite;-o-animation:blink 0.8333333333s linear 0.8333333333s infinite}.loader__item__8{max-width:8.5px}@keyframes blink{0%{background:#4745B7}100%{background:#CCCBF8}}@keyframes rotate{0%{transform:rotate(0deg)}100%{background:rotate(360deg)}}";
|
|
70
70
|
|
|
71
|
-
const DEEP_LINK_PREFIX =
|
|
71
|
+
const DEEP_LINK_PREFIX = 'https://api.gataca.io/qr/redirect.html';
|
|
72
72
|
const DEFAULT_SESSION_TIMEOUT = 300;
|
|
73
|
-
const QR_ROLE_CONNECT =
|
|
73
|
+
const QR_ROLE_CONNECT = 'connect';
|
|
74
74
|
const GatacaQRWS = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
75
|
-
constructor() { super(); this.__registerHost(); this.__attachShadow(); this.gatacaLoginCompleted = createEvent(this, "gatacaLoginCompleted", 7); this.gatacaLoginFailed = createEvent(this, "gatacaLoginFailed", 7); this.successCallback = undefined; this.errorCallback = undefined; this.qrRole = undefined; this.qrType =
|
|
75
|
+
constructor() { super(); this.__registerHost(); this.__attachShadow(); this.gatacaLoginCompleted = createEvent(this, "gatacaLoginCompleted", 7); this.gatacaLoginFailed = createEvent(this, "gatacaLoginFailed", 7); this.successCallback = undefined; this.errorCallback = undefined; this.qrRole = undefined; this.qrType = 'svg'; this.callbackServer = undefined; this.socketEndpoint = undefined; this.sessionTimeout = DEFAULT_SESSION_TIMEOUT; this.wsOnOpen = undefined; this.wsOnMessage = undefined; this.autostart = true; this.autorefresh = false; this.v = '3'; this.qrModalTitle = 'Quick Access'; this.modalTitleColor = '#4745B7'; this.qrModalDescription = 'Sign up or sign in by scanning the QR Code with the Gataca Wallet'; this.hideModalTexts = false; this.hideModalBoxShadow = false; this.hideBrandTitle = false; this.logoSize = 0; this.logoSrc = logoGatacaSvg; this.qrSize = 300; this.modalWidth = 300; this.modalHeight = undefined; this.qrCodeExpiredLabel = 'QR Code expired'; this.credentialsNotValidatedLabel = 'User credentials not validated'; this.clickInsideBoxLabel = 'Click inside the box to'; this.refreshQrLabel = 'Refresh QR Code'; this.scanQrLabel = 'Scan QR Code'; this.userNotScanInTimeErrorLabel = 'User did not scan the QR in the allowed time'; this.credsNotValidatedErrorLabel = "Provided user credentials couldn't be validated"; this.failedLoginErrorLabel = 'No successful login'; this.successLoginLabel = 'Successful Connection!'; this.byBrandLabel = 'by Gataca'; this.waitingStartSessionLabel = 'waiting to start a session'; this.readQrTitle = 'Processing...'; this.readQrDescription = 'Please wait a moment'; this.hideQrModalDescription = false; this.dynamicLink = true; this.sessionId = undefined; this.authenticationRequest = undefined; this.sessionData = undefined; this.result = RESULT_STATUS.NOT_STARTED; }
|
|
76
76
|
disconnectedCallback() {
|
|
77
77
|
this.stop();
|
|
78
78
|
}
|
|
@@ -87,7 +87,7 @@ const GatacaQRWS = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
87
87
|
async display() {
|
|
88
88
|
let socket = new WebSocket(this.socketEndpoint);
|
|
89
89
|
setTimeout(() => {
|
|
90
|
-
this.socket.close(1000,
|
|
90
|
+
this.socket.close(1000, '');
|
|
91
91
|
}, 1000 * this.sessionTimeout);
|
|
92
92
|
this.socket = socket;
|
|
93
93
|
socket.onopen = () => {
|
|
@@ -106,11 +106,11 @@ const GatacaQRWS = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
106
106
|
}
|
|
107
107
|
};
|
|
108
108
|
socket.onerror = () => {
|
|
109
|
-
let error = new Error(
|
|
109
|
+
let error = new Error('Error connecting with server');
|
|
110
110
|
this.result = RESULT_STATUS.FAILED;
|
|
111
111
|
this.gatacaLoginFailed.emit(error);
|
|
112
112
|
this.errorCallback(error);
|
|
113
|
-
socket.close(1000,
|
|
113
|
+
socket.close(1000, '');
|
|
114
114
|
};
|
|
115
115
|
socket.onclose = () => {
|
|
116
116
|
if (this.result === RESULT_STATUS.ONGOING || RESULT_STATUS.READ) {
|
|
@@ -121,7 +121,7 @@ const GatacaQRWS = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
121
121
|
this.display();
|
|
122
122
|
}
|
|
123
123
|
else {
|
|
124
|
-
let error = new Error(
|
|
124
|
+
let error = new Error('User did not scan the QR in the alloted time');
|
|
125
125
|
this.gatacaLoginFailed.emit(error);
|
|
126
126
|
this.errorCallback(error);
|
|
127
127
|
}
|
|
@@ -147,7 +147,7 @@ const GatacaQRWS = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
147
147
|
this.sessionData = wsresp.authenticatedUserData;
|
|
148
148
|
this.gatacaLoginCompleted.emit(wsresp.authenticatedUserData);
|
|
149
149
|
this.successCallback(wsresp.authenticatedUserData);
|
|
150
|
-
this.socket.close(1000,
|
|
150
|
+
this.socket.close(1000, '');
|
|
151
151
|
break;
|
|
152
152
|
case RESULT_STATUS.FAILED:
|
|
153
153
|
this.socket.close();
|
|
@@ -161,7 +161,7 @@ const GatacaQRWS = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
161
161
|
this.display();
|
|
162
162
|
}
|
|
163
163
|
else {
|
|
164
|
-
let error = new Error(
|
|
164
|
+
let error = new Error('User did not scan the QR in the alloted time');
|
|
165
165
|
this.gatacaLoginFailed.emit(error);
|
|
166
166
|
this.errorCallback(error);
|
|
167
167
|
}
|
|
@@ -173,21 +173,19 @@ const GatacaQRWS = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
173
173
|
async stop() {
|
|
174
174
|
this.sessionData = undefined;
|
|
175
175
|
this.sessionId = undefined;
|
|
176
|
-
this.socket.close(1000,
|
|
176
|
+
this.socket.close(1000, 'Client stopped the connection');
|
|
177
177
|
}
|
|
178
178
|
/**
|
|
179
179
|
* Retrieve manually the session data on a successful login
|
|
180
180
|
*/
|
|
181
181
|
async getSessionData() {
|
|
182
|
-
return this.sessionData
|
|
183
|
-
? Promise.resolve(this.sessionData)
|
|
184
|
-
: Promise.reject(new Error("No successful login"));
|
|
182
|
+
return this.sessionData ? Promise.resolve(this.sessionData) : Promise.reject(new Error('No successful login'));
|
|
185
183
|
}
|
|
186
184
|
getLink() {
|
|
187
|
-
if (this.v ===
|
|
185
|
+
if (this.v === '2' && this.qrRole == QR_ROLE_CONNECT) {
|
|
188
186
|
return this.authenticationRequest;
|
|
189
187
|
}
|
|
190
|
-
const authRequestEncoded =
|
|
188
|
+
const authRequestEncoded = '?dl=' + base64UrlEncode(this.authenticationRequest);
|
|
191
189
|
return DEEP_LINK_PREFIX + authRequestEncoded;
|
|
192
190
|
}
|
|
193
191
|
renderQRSection() {
|
|
@@ -205,40 +203,35 @@ const GatacaQRWS = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
205
203
|
case RESULT_STATUS.READ:
|
|
206
204
|
return this.renderReadQR({
|
|
207
205
|
title: this === null || this === void 0 ? void 0 : this.readQrTitle,
|
|
208
|
-
description: this === null || this === void 0 ? void 0 : this.readQrDescription
|
|
206
|
+
description: this === null || this === void 0 ? void 0 : this.readQrDescription
|
|
209
207
|
});
|
|
210
208
|
}
|
|
211
209
|
}
|
|
212
210
|
renderSuccess() {
|
|
213
|
-
return
|
|
211
|
+
return h(Success, { modalHeight: this === null || this === void 0 ? void 0 : this.modalHeight, successLoginLabel: this === null || this === void 0 ? void 0 : this.successLoginLabel });
|
|
214
212
|
}
|
|
215
213
|
renderRetryButton(errorMessage) {
|
|
216
214
|
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) }));
|
|
217
215
|
}
|
|
218
216
|
renderReadQR(readQrMessages) {
|
|
219
|
-
return
|
|
217
|
+
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) });
|
|
220
218
|
}
|
|
221
|
-
renderQR(value, useLogo) {
|
|
222
|
-
return
|
|
219
|
+
renderQR(value, useLogo, sizeQR) {
|
|
220
|
+
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 });
|
|
223
221
|
}
|
|
224
222
|
renderRetryQR(value, useLogo) {
|
|
225
|
-
return
|
|
223
|
+
return h(QR, { value: value, qrType: this.qrType, useLogo: useLogo && this.logoSize !== 0, 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 });
|
|
226
224
|
}
|
|
227
225
|
render() {
|
|
228
226
|
var _a, _b;
|
|
229
|
-
return (h("div", { class: "popUpContainer" }, h("div", { class: `is-visible modal-window ${this.hideModalTexts ?
|
|
230
|
-
width: (this.modalWidth - 2).toString() +
|
|
231
|
-
height: this.modalHeight
|
|
232
|
-
? ((_a = (this.modalHeight - 2)) === null || _a === void 0 ? void 0 : _a.toString()) + "px"
|
|
233
|
-
: "",
|
|
227
|
+
return (h("div", { class: "popUpContainer" }, h("div", { class: `is-visible modal-window ${this.hideModalTexts ? '' : 'large-modal'} ${this.hideModalBoxShadow ? 'noBoxShadow' : ''}`, style: {
|
|
228
|
+
width: (this.modalWidth - 2).toString() + 'px',
|
|
229
|
+
height: this.modalHeight ? ((_a = (this.modalHeight - 2)) === null || _a === void 0 ? void 0 : _a.toString()) + 'px' : ''
|
|
234
230
|
}, onClick: (event) => {
|
|
235
231
|
event.stopPropagation();
|
|
236
|
-
} }, h("div", { class: "modal-window__content" }, h("div", { class: `qrTitleContainer ${this.hideModalTexts ?
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
height: this.modalWidth
|
|
240
|
-
? ((_b = this.modalWidth) === null || _b === void 0 ? void 0 : _b.toString()) + "px"
|
|
241
|
-
: "",
|
|
232
|
+
} }, 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: {
|
|
233
|
+
width: this.modalWidth.toString() + 'px',
|
|
234
|
+
height: this.modalWidth ? ((_b = this.modalWidth) === null || _b === void 0 ? void 0 : _b.toString()) + 'px' : ''
|
|
242
235
|
} }, this.renderQRSection())))));
|
|
243
236
|
}
|
|
244
237
|
static get style() { return gatacaQrwsCss; }
|
|
@@ -5,7 +5,7 @@ import { d as defineCustomElement$2 } from './gataca-qr2.js';
|
|
|
5
5
|
|
|
6
6
|
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}";
|
|
7
7
|
|
|
8
|
-
const PHONE_ICON =
|
|
8
|
+
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=';
|
|
9
9
|
//Default values
|
|
10
10
|
const DEFAULT_SESSION_TIMEOUT = 300; //5mins as in connect
|
|
11
11
|
const DEFAULT_POLLING_FREQ = 3;
|
|
@@ -16,8 +16,9 @@ const GatacaSSIButton = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
16
16
|
this.__attachShadow();
|
|
17
17
|
this.gatacaLoginCompleted = createEvent(this, "gatacaLoginCompleted", 7);
|
|
18
18
|
this.gatacaLoginFailed = createEvent(this, "gatacaLoginFailed", 7);
|
|
19
|
-
this.
|
|
20
|
-
this.
|
|
19
|
+
this.gatacaButtonPushed = createEvent(this, "gatacaButtonPushed", 7);
|
|
20
|
+
this.buttonText = 'Easy login';
|
|
21
|
+
this.qrType = 'svg';
|
|
21
22
|
this.autostart = true;
|
|
22
23
|
this.checkStatus = undefined;
|
|
23
24
|
this.createSession = undefined;
|
|
@@ -30,25 +31,25 @@ const GatacaSSIButton = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
30
31
|
this.sessionTimeout = undefined;
|
|
31
32
|
this.pollingFrequency = undefined;
|
|
32
33
|
this.autorefresh = false;
|
|
33
|
-
this.v =
|
|
34
|
-
this.qrModalTitle =
|
|
35
|
-
this.modalTitleColor =
|
|
36
|
-
this.qrModalDescription =
|
|
34
|
+
this.v = '3';
|
|
35
|
+
this.qrModalTitle = 'Quick Access';
|
|
36
|
+
this.modalTitleColor = '#4745B7';
|
|
37
|
+
this.qrModalDescription = 'Sign up or sign in by scanning the QR Code with the Gataca Wallet';
|
|
37
38
|
this.hideBrandTitle = false;
|
|
38
39
|
this.dynamicLink = true;
|
|
39
40
|
this.logoSize = 0;
|
|
40
41
|
this.logoSrc = undefined;
|
|
41
|
-
this.qrCodeExpiredLabel =
|
|
42
|
-
this.credentialsNotValidatedLabel =
|
|
43
|
-
this.clickInsideBoxLabel =
|
|
44
|
-
this.refreshQrLabel =
|
|
45
|
-
this.scanQrLabel =
|
|
46
|
-
this.userNotScanInTimeErrorLabel =
|
|
42
|
+
this.qrCodeExpiredLabel = 'QR Code expired';
|
|
43
|
+
this.credentialsNotValidatedLabel = 'User credentials not validated';
|
|
44
|
+
this.clickInsideBoxLabel = 'Click inside the box to';
|
|
45
|
+
this.refreshQrLabel = 'Refresh QR Code';
|
|
46
|
+
this.scanQrLabel = 'Scan QR Code';
|
|
47
|
+
this.userNotScanInTimeErrorLabel = 'User did not scan the QR in the allowed time';
|
|
47
48
|
this.credsNotValidatedErrorLabel = "Provided user credentials couldn't be validated";
|
|
48
|
-
this.failedLoginErrorLabel =
|
|
49
|
-
this.successLoginLabel =
|
|
50
|
-
this.byBrandLabel =
|
|
51
|
-
this.waitingStartSessionLabel =
|
|
49
|
+
this.failedLoginErrorLabel = 'No successful login';
|
|
50
|
+
this.successLoginLabel = 'Successful Connection!';
|
|
51
|
+
this.byBrandLabel = 'by Gataca';
|
|
52
|
+
this.waitingStartSessionLabel = 'waiting to start a session';
|
|
52
53
|
this.hideQrModalDescription = false;
|
|
53
54
|
this.open = false;
|
|
54
55
|
this.sessionId = undefined;
|
|
@@ -93,9 +94,7 @@ const GatacaSSIButton = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
93
94
|
}
|
|
94
95
|
else {
|
|
95
96
|
if (err !== RESULT_STATUS.NOT_STARTED) {
|
|
96
|
-
let error = expired
|
|
97
|
-
? new Error(this.userNotScanInTimeErrorLabel)
|
|
98
|
-
: new Error(this.credsNotValidatedErrorLabel);
|
|
97
|
+
let error = expired ? new Error(this.userNotScanInTimeErrorLabel) : new Error(this.credsNotValidatedErrorLabel);
|
|
99
98
|
this.result = err;
|
|
100
99
|
this.gatacaLoginFailed.emit(error);
|
|
101
100
|
this.errorCallback(error);
|
|
@@ -120,8 +119,7 @@ const GatacaSSIButton = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
120
119
|
return this.qr;
|
|
121
120
|
}
|
|
122
121
|
async poll() {
|
|
123
|
-
let endTime = new Date().getTime() +
|
|
124
|
-
(this.sessionTimeout || DEFAULT_SESSION_TIMEOUT) * 1000;
|
|
122
|
+
let endTime = new Date().getTime() + (this.sessionTimeout || DEFAULT_SESSION_TIMEOUT) * 1000;
|
|
125
123
|
let interval = (this.pollingFrequency || DEFAULT_POLLING_FREQ) * 1000;
|
|
126
124
|
let checkFunc = async (component) => {
|
|
127
125
|
if (component.result === RESULT_STATUS.NOT_STARTED) {
|
|
@@ -178,10 +176,10 @@ const GatacaSSIButton = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
178
176
|
cleanup();
|
|
179
177
|
}
|
|
180
178
|
};
|
|
181
|
-
document.addEventListener(
|
|
179
|
+
document.addEventListener('visibilitychange', handleVisibilityChange);
|
|
182
180
|
function cleanup() {
|
|
183
181
|
clearTimeout(timeout);
|
|
184
|
-
document.removeEventListener(
|
|
182
|
+
document.removeEventListener('visibilitychange', handleVisibilityChange);
|
|
185
183
|
}
|
|
186
184
|
}
|
|
187
185
|
renderDesktopButton() {
|
|
@@ -215,8 +213,8 @@ const GatacaSSIButton = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
215
213
|
};
|
|
216
214
|
const executeRedirection = async () => {
|
|
217
215
|
handleLoading(true);
|
|
218
|
-
const androidStoreLink =
|
|
219
|
-
const iosStoreLink =
|
|
216
|
+
const androidStoreLink = 'https://play.google.com/store/apps/details?id=com.gataca.identity';
|
|
217
|
+
const iosStoreLink = 'https://apps.apple.com/us/app/gataca/id1498607616';
|
|
220
218
|
try {
|
|
221
219
|
const appScheme = await this.getAuthRequest();
|
|
222
220
|
this.isAppInstalled(appScheme, (installed) => {
|
|
@@ -238,6 +236,7 @@ const GatacaSSIButton = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
238
236
|
}
|
|
239
237
|
};
|
|
240
238
|
return (h("div", { class: "gatacaButtonWrapper" }, h("button", { class: "gatacaButton", onClick: () => {
|
|
239
|
+
this.gatacaButtonPushed.emit();
|
|
241
240
|
executeRedirection();
|
|
242
241
|
}, disabled: loading }, h("img", { src: PHONE_ICON, class: "buttonImg", alt: this.buttonText }), h("span", null, this.buttonText))));
|
|
243
242
|
}
|
|
@@ -248,12 +247,9 @@ const GatacaSSIButton = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
248
247
|
const isAndroid = /android/i.test(userAgent);
|
|
249
248
|
const isIos =
|
|
250
249
|
// @ts-ignore
|
|
251
|
-
(/iPad|iPhone|iPod/.test(userAgent) && !window.MSStream) ||
|
|
252
|
-
(navigator.platform === "MacIntel" && navigator.maxTouchPoints > 1);
|
|
250
|
+
(/iPad|iPhone|iPod/.test(userAgent) && !window.MSStream) || (navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1);
|
|
253
251
|
const isMobile = isAndroid || isIos;
|
|
254
|
-
return (h("div", { class: "buttonContainer" }, isMobile && this.v ===
|
|
255
|
-
? this.renderMobileButton(isAndroid, isIos)
|
|
256
|
-
: this.renderDesktopButton(), this.open && (!isMobile || this.v === "3") && this.renderModal()));
|
|
252
|
+
return (h("div", { class: "buttonContainer" }, isMobile && this.v === '3' ? this.renderMobileButton(isAndroid, isIos) : this.renderDesktopButton(), this.open && (!isMobile || this.v === '3') && this.renderModal()));
|
|
257
253
|
}
|
|
258
254
|
static get style() { return gatacaSsibuttonCss; }
|
|
259
255
|
}, [1, "gataca-ssibutton", {
|
|
@@ -4,7 +4,7 @@ import { d as defineCustomElement$1 } from './gataca-qrws2.js';
|
|
|
4
4
|
|
|
5
5
|
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}";
|
|
6
6
|
|
|
7
|
-
const PHONE_ICON =
|
|
7
|
+
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=';
|
|
8
8
|
const GatacaSSIButtonWS = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
9
9
|
constructor() {
|
|
10
10
|
super();
|
|
@@ -12,10 +12,10 @@ const GatacaSSIButtonWS = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
|
|
|
12
12
|
this.__attachShadow();
|
|
13
13
|
this.gatacaLoginCompleted = createEvent(this, "gatacaLoginCompleted", 7);
|
|
14
14
|
this.gatacaLoginFailed = createEvent(this, "gatacaLoginFailed", 7);
|
|
15
|
-
this.buttonText =
|
|
15
|
+
this.buttonText = 'Easy login';
|
|
16
16
|
this.successCallback = undefined;
|
|
17
17
|
this.errorCallback = undefined;
|
|
18
|
-
this.qrType =
|
|
18
|
+
this.qrType = 'svg';
|
|
19
19
|
this.qrRole = undefined;
|
|
20
20
|
this.callbackServer = undefined;
|
|
21
21
|
this.socketEndpoint = undefined;
|
|
@@ -24,9 +24,9 @@ const GatacaSSIButtonWS = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
|
|
|
24
24
|
this.wsOnMessage = undefined;
|
|
25
25
|
this.autostart = true;
|
|
26
26
|
this.autorefresh = false;
|
|
27
|
-
this.v =
|
|
28
|
-
this.qrModalTitle =
|
|
29
|
-
this.qrModalDescription =
|
|
27
|
+
this.v = '3';
|
|
28
|
+
this.qrModalTitle = 'Quick Access';
|
|
29
|
+
this.qrModalDescription = 'Sign up or sign in by scanning the QR Code with the Gataca Wallet';
|
|
30
30
|
this.hideBrandTitle = false;
|
|
31
31
|
this.dynamicLink = true;
|
|
32
32
|
this.open = false;
|
|
@@ -2,7 +2,7 @@ import { r as registerInstance, c as createEvent, h } from './index-2be54f32.js'
|
|
|
2
2
|
|
|
3
3
|
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}";
|
|
4
4
|
|
|
5
|
-
const DEFAULT_REPOSITORY =
|
|
5
|
+
const DEFAULT_REPOSITORY = 'https://studio.gataca.io/api/v1/qrconfigs';
|
|
6
6
|
const fixFunctions = (data) => {
|
|
7
7
|
var _a, _b, _c, _d, _e, _f;
|
|
8
8
|
data.errorCallback = deserializeFunction((_a = data.errorCallback) === null || _a === void 0 ? void 0 : _a.toString());
|
|
@@ -15,7 +15,7 @@ const fixFunctions = (data) => {
|
|
|
15
15
|
};
|
|
16
16
|
const deserializeFunction = (data) => {
|
|
17
17
|
if (data) {
|
|
18
|
-
return new Function(
|
|
18
|
+
return new Function('return ' + data)();
|
|
19
19
|
}
|
|
20
20
|
return undefined;
|
|
21
21
|
};
|
|
@@ -25,7 +25,7 @@ const GatacaAutoQR = class {
|
|
|
25
25
|
this.gatacaLoginCompleted = createEvent(this, "gatacaLoginCompleted", 7);
|
|
26
26
|
this.gatacaLoginFailed = createEvent(this, "gatacaLoginFailed", 7);
|
|
27
27
|
this.configId = undefined;
|
|
28
|
-
this.qrType =
|
|
28
|
+
this.qrType = 'svg';
|
|
29
29
|
this.configRepository = DEFAULT_REPOSITORY;
|
|
30
30
|
this.successCallback = undefined;
|
|
31
31
|
this.errorCallback = undefined;
|
|
@@ -36,11 +36,11 @@ const GatacaAutoQR = class {
|
|
|
36
36
|
this.config = undefined;
|
|
37
37
|
this.loading = undefined;
|
|
38
38
|
this.loading = true;
|
|
39
|
-
fetch(this.configRepository +
|
|
40
|
-
method:
|
|
39
|
+
fetch(this.configRepository + '/' + this.configId, {
|
|
40
|
+
method: 'GET',
|
|
41
41
|
headers: {
|
|
42
|
-
|
|
43
|
-
}
|
|
42
|
+
'Content-Type': 'application/json'
|
|
43
|
+
}
|
|
44
44
|
})
|
|
45
45
|
.then((response) => {
|
|
46
46
|
response
|
|
@@ -51,12 +51,12 @@ const GatacaAutoQR = class {
|
|
|
51
51
|
this.loading = false;
|
|
52
52
|
})
|
|
53
53
|
.catch((err) => {
|
|
54
|
-
console.log(
|
|
54
|
+
console.log('Cannot retrieve selected config', err);
|
|
55
55
|
this.loading = false;
|
|
56
56
|
});
|
|
57
57
|
})
|
|
58
58
|
.catch((err) => {
|
|
59
|
-
console.log(
|
|
59
|
+
console.log('Cannot retrieve selected config', err);
|
|
60
60
|
this.loading = false;
|
|
61
61
|
});
|
|
62
62
|
}
|