@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.
Files changed (67) hide show
  1. package/dist/cjs/gataca-autoqr.cjs.entry.js +9 -9
  2. package/dist/cjs/gataca-qr_2.cjs.entry.js +37 -47
  3. package/dist/cjs/gataca-qrws.cjs.entry.js +36 -43
  4. package/dist/cjs/gataca-ssibutton_2.cjs.entry.js +34 -38
  5. package/dist/cjs/index.cjs.js +1 -1
  6. package/dist/cjs/{utils-ef28b844.js → utils-b4e62bc0.js} +1 -1
  7. package/dist/collection/components/gataca-autoqr/gataca-autoqr.js +13 -13
  8. package/dist/collection/components/gataca-qr/components/qr/QR.js +2 -2
  9. package/dist/collection/components/gataca-qr/components/readQR/ReadQR.js +4 -4
  10. package/dist/collection/components/gataca-qr/components/readQR/components/AnimatedLoader.js +1 -1
  11. package/dist/collection/components/gataca-qr/components/retryButton/RetryButton.js +8 -8
  12. package/dist/collection/components/gataca-qr/components/success/Success.js +4 -4
  13. package/dist/collection/components/gataca-qr/gataca-qr.js +46 -56
  14. package/dist/collection/components/gataca-qrdisplay/gataca-qrdisplay.js +12 -12
  15. package/dist/collection/components/gataca-qrws/components/qr/QR.js +2 -2
  16. package/dist/collection/components/gataca-qrws/components/readQR/ReadQR.js +4 -4
  17. package/dist/collection/components/gataca-qrws/components/readQR/components/AnimatedLoader.js +1 -1
  18. package/dist/collection/components/gataca-qrws/components/retryButton/RetryButton.js +8 -8
  19. package/dist/collection/components/gataca-qrws/components/success/Success.js +4 -4
  20. package/dist/collection/components/gataca-qrws/gataca-qrws.js +50 -57
  21. package/dist/collection/components/gataca-ssibutton/gataca-ssibutton.js +62 -52
  22. package/dist/collection/components/gataca-ssibuttonws/gataca-ssibuttonws.js +12 -12
  23. package/dist/collection/index.js +2 -2
  24. package/dist/collection/utils/index.js +1 -1
  25. package/dist/collection/utils/utils.js +1 -1
  26. package/dist/components/gat-icon-alert.js +1 -1
  27. package/dist/components/gataca-autoqr.js +9 -9
  28. package/dist/components/gataca-qr2.js +29 -39
  29. package/dist/components/gataca-qrdisplay2.js +7 -7
  30. package/dist/components/gataca-qrws2.js +35 -42
  31. package/dist/components/gataca-ssibutton2.js +27 -31
  32. package/dist/components/gataca-ssibuttonws2.js +6 -6
  33. package/dist/esm/gataca-autoqr.entry.js +9 -9
  34. package/dist/esm/gataca-qr_2.entry.js +37 -47
  35. package/dist/esm/gataca-qrws.entry.js +36 -43
  36. package/dist/esm/gataca-ssibutton_2.entry.js +34 -38
  37. package/dist/esm/index.js +1 -1
  38. package/dist/esm/{utils-63e7a33b.js → utils-21ffcc1e.js} +1 -1
  39. package/dist/gatacaqr/gatacaqr.esm.js +1 -1
  40. package/dist/gatacaqr/index.esm.js +1 -1
  41. package/dist/gatacaqr/p-2adc0bcc.entry.js +1 -0
  42. package/dist/gatacaqr/p-2ddbc2fc.entry.js +1 -0
  43. package/dist/gatacaqr/p-d2dd7c85.entry.js +1 -0
  44. package/dist/types/components/gataca-autoqr/gataca-autoqr.d.ts +7 -7
  45. package/dist/types/components/gataca-qr/components/qr/QR.d.ts +2 -2
  46. package/dist/types/components/gataca-qr/components/readQR/ReadQR.d.ts +1 -1
  47. package/dist/types/components/gataca-qr/components/readQR/components/AnimatedLoader.d.ts +1 -1
  48. package/dist/types/components/gataca-qr/components/retryButton/RetryButton.d.ts +1 -1
  49. package/dist/types/components/gataca-qr/components/success/Success.d.ts +1 -1
  50. package/dist/types/components/gataca-qr/gataca-qr.d.ts +5 -5
  51. package/dist/types/components/gataca-qrdisplay/gataca-qrdisplay.d.ts +1 -1
  52. package/dist/types/components/gataca-qrws/components/qr/QR.d.ts +2 -2
  53. package/dist/types/components/gataca-qrws/components/readQR/ReadQR.d.ts +1 -1
  54. package/dist/types/components/gataca-qrws/components/readQR/components/AnimatedLoader.d.ts +1 -1
  55. package/dist/types/components/gataca-qrws/components/retryButton/RetryButton.d.ts +1 -1
  56. package/dist/types/components/gataca-qrws/components/success/Success.d.ts +1 -1
  57. package/dist/types/components/gataca-qrws/gataca-qrws.d.ts +5 -5
  58. package/dist/types/components/gataca-ssibutton/gataca-ssibutton.d.ts +9 -5
  59. package/dist/types/components/gataca-ssibuttonws/gataca-ssibuttonws.d.ts +3 -3
  60. package/dist/types/components.d.ts +28 -36
  61. package/dist/types/index.d.ts +2 -2
  62. package/dist/types/utils/index.d.ts +1 -1
  63. package/package.json +30 -7
  64. package/dist/gatacaqr/p-92a2e6f0.entry.js +0 -1
  65. package/dist/gatacaqr/p-9af5d2fe.entry.js +0 -1
  66. package/dist/gatacaqr/p-dc592fa5.entry.js +0 -1
  67. /package/dist/gatacaqr/{p-2cd7b062.js → p-bce7e590.js} +0 -0
@@ -1,17 +1,17 @@
1
1
  import { r as registerInstance, h, c as createEvent } from './index-2be54f32.js';
2
2
  import { l as logoGatacaSvg, g as gatIconCheckSvg, a as gatIconRefreshSvg, b as gatIconAlertSvg } from './gat-icon-alert-7b06ef3a.js';
3
3
  import { Q as QRCodeStyling } from './qr-code-styling-0eeb38d5.js';
4
- import { R as RESULT_STATUS, c as checkMobile, b as base64UrlEncode } from './utils-63e7a33b.js';
4
+ import { R as RESULT_STATUS, c as checkMobile, b as base64UrlEncode } from './utils-21ffcc1e.js';
5
5
 
6
6
  const GatacaQRDisplay = class {
7
7
  constructor(hostRef) {
8
8
  registerInstance(this, hostRef);
9
9
  this.qrData = undefined;
10
- this.qrType = "svg";
10
+ this.qrType = 'svg';
11
11
  this.size = 256;
12
12
  this.logoSize = 0;
13
13
  this.logoSrc = undefined;
14
- this.qrColor = "#1E1E20";
14
+ this.qrColor = '#1E1E20';
15
15
  this.rounded = true;
16
16
  }
17
17
  componentDidLoad() {
@@ -24,18 +24,18 @@ const GatacaQRDisplay = class {
24
24
  type: this.qrType,
25
25
  dotsOptions: {
26
26
  color: this.qrColor,
27
- type: this.rounded ? "dots" : "square",
27
+ type: this.rounded ? 'dots' : 'square'
28
28
  },
29
29
  cornersSquareOptions: {
30
- type: this.rounded ? "extra-rounded" : "square",
30
+ type: this.rounded ? 'extra-rounded' : 'square'
31
31
  },
32
32
  cornersDotOptions: {
33
- type: this.rounded ? "dot" : "square",
33
+ type: this.rounded ? 'dot' : 'square'
34
34
  },
35
35
  imageOptions: {
36
36
  margin: 2,
37
- imageSize: this.logoSize,
38
- },
37
+ imageSize: this.logoSize
38
+ }
39
39
  });
40
40
  qrCode.append(this.qr);
41
41
  }
@@ -48,8 +48,8 @@ const GatacaQRDisplay = class {
48
48
 
49
49
  const Success = (props) => {
50
50
  const { modalHeight, successLoginLabel } = props;
51
- return (h("div", { class: "success", style: {
52
- height: modalHeight ? (modalHeight === null || modalHeight === void 0 ? void 0 : modalHeight.toString()) + "px" : "300px",
51
+ return (h("div", { class: 'success', style: {
52
+ height: modalHeight ? (modalHeight === null || modalHeight === void 0 ? void 0 : modalHeight.toString()) + 'px' : '300px'
53
53
  } },
54
54
  h("img", { src: gatIconCheckSvg, height: 52, width: 52 }),
55
55
  h("p", { class: "successMsg" }, successLoginLabel)));
@@ -57,19 +57,19 @@ const Success = (props) => {
57
57
 
58
58
  const RetryButton = (props) => {
59
59
  var _a;
60
- const { errorMessage, modalWidth, clickInsideBoxLabel, refreshQrLabel, scanQrLabel, waitingStartSessionLabel, display, renderRetryQR, } = props;
60
+ const { errorMessage, modalWidth, clickInsideBoxLabel, refreshQrLabel, scanQrLabel, waitingStartSessionLabel, display, renderRetryQR } = props;
61
61
  return (h("div", { class: "reload", style: {
62
- width: (modalWidth - 48).toString() + "px",
63
- height: modalWidth ? ((_a = (modalWidth - 48)) === null || _a === void 0 ? void 0 : _a.toString()) + "px" : "",
62
+ width: (modalWidth - 48).toString() + 'px',
63
+ height: modalWidth ? ((_a = (modalWidth - 48)) === null || _a === void 0 ? void 0 : _a.toString()) + 'px' : ''
64
64
  } },
65
65
  h("div", { id: "notify", onClick: () => display() },
66
66
  h("img", { src: gatIconRefreshSvg, height: 24, width: 24 }),
67
67
  h("p", { class: "notify-text" },
68
68
  clickInsideBoxLabel,
69
69
  " "),
70
- errorMessage ? (h("p", { class: "notify-text bold" }, refreshQrLabel)) : (h("p", { class: "notify-text bold" }, scanQrLabel)),
70
+ errorMessage ? h("p", { class: "notify-text bold" }, refreshQrLabel) : h("p", { class: "notify-text bold" }, scanQrLabel),
71
71
  errorMessage && (h("div", { class: "alert", style: {
72
- width: (modalWidth - 48).toString() + "px",
72
+ width: (modalWidth - 48).toString() + 'px'
73
73
  } },
74
74
  h("img", { src: gatIconAlertSvg, height: 24, width: 24 }),
75
75
  h("p", null, errorMessage)))),
@@ -93,8 +93,8 @@ const ReadQR = (props) => {
93
93
  var _a;
94
94
  const { modalWidth, readQrMessages, renderQR, url, sizeQR } = props;
95
95
  return (h("div", { class: "blured", style: {
96
- width: (modalWidth - 48).toString() + "px",
97
- height: modalWidth ? ((_a = (modalWidth - 48)) === null || _a === void 0 ? void 0 : _a.toString()) + "px" : "",
96
+ width: (modalWidth - 48).toString() + 'px',
97
+ height: modalWidth ? ((_a = (modalWidth - 48)) === null || _a === void 0 ? void 0 : _a.toString()) + 'px' : ''
98
98
  } },
99
99
  h("div", { id: "notify" },
100
100
  h(AnimatedLoader, null),
@@ -107,17 +107,17 @@ const ReadQR = (props) => {
107
107
 
108
108
  const QR = (props) => {
109
109
  const { value, useLogo, logoSrc, size, qrType } = props;
110
- return (h("gataca-qrdisplay", { qrData: value, rounded: true, qrType: qrType, size: size, "logo-size": useLogo ? 0.33 : 0, "logo-src": logoSrc }));
110
+ return h("gataca-qrdisplay", { qrData: value, rounded: true, qrType: qrType, size: size, "logo-size": useLogo ? 0.33 : 0, "logo-src": logoSrc });
111
111
  };
112
112
 
113
113
  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)}}";
114
114
 
115
- const DEEP_LINK_PREFIX = "https://api.gataca.io/qr/redirect.html";
115
+ const DEEP_LINK_PREFIX = 'https://api.gataca.io/qr/redirect.html';
116
116
  //Default values
117
117
  const DEFAULT_SESSION_TIMEOUT = 300; //5mins as in connect
118
118
  const DEFAULT_POLLING_FREQ = 3;
119
119
  const GatacaQR = class {
120
- constructor(hostRef) { registerInstance(this, hostRef); 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; }
120
+ constructor(hostRef) { registerInstance(this, hostRef); 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; }
121
121
  disconnectedCallback() {
122
122
  this.stop();
123
123
  }
@@ -147,9 +147,7 @@ const GatacaQR = class {
147
147
  }
148
148
  else {
149
149
  if (err !== RESULT_STATUS.NOT_STARTED) {
150
- let error = expired
151
- ? new Error(this.userNotScanInTimeErrorLabel)
152
- : new Error(this.credsNotValidatedErrorLabel);
150
+ let error = expired ? new Error(this.userNotScanInTimeErrorLabel) : new Error(this.credsNotValidatedErrorLabel);
153
151
  this.result = err;
154
152
  this.gatacaLoginFailed.emit(error);
155
153
  this.errorCallback(error);
@@ -177,9 +175,7 @@ const GatacaQR = class {
177
175
  * Retrieve manually the session data on a successful login
178
176
  */
179
177
  async getSessionData() {
180
- return this.sessionData
181
- ? Promise.resolve(this.sessionData)
182
- : Promise.reject(new Error(this.failedLoginErrorLabel));
178
+ return this.sessionData ? Promise.resolve(this.sessionData) : Promise.reject(new Error(this.failedLoginErrorLabel));
183
179
  }
184
180
  async getSessionId() {
185
181
  if (this.sessionId) {
@@ -191,15 +187,14 @@ const GatacaQR = class {
191
187
  return this.sessionId;
192
188
  }
193
189
  getLink() {
194
- if (this.v === "2") {
190
+ if (this.v === '2') {
195
191
  return this.authenticationRequest;
196
192
  }
197
- const authRequestEncoded = "?dl=" + base64UrlEncode(this.authenticationRequest);
193
+ const authRequestEncoded = '?dl=' + base64UrlEncode(this.authenticationRequest);
198
194
  return DEEP_LINK_PREFIX + authRequestEncoded;
199
195
  }
200
196
  async poll() {
201
- let endTime = new Date().getTime() +
202
- (this.sessionTimeout || DEFAULT_SESSION_TIMEOUT) * 1000;
197
+ let endTime = new Date().getTime() + (this.sessionTimeout || DEFAULT_SESSION_TIMEOUT) * 1000;
203
198
  let interval = (this.pollingFrequency || DEFAULT_POLLING_FREQ) * 1000;
204
199
  let checkFunc = async (component) => {
205
200
  if (component.result === RESULT_STATUS.NOT_STARTED) {
@@ -248,40 +243,35 @@ const GatacaQR = class {
248
243
  case RESULT_STATUS.READ:
249
244
  return this.renderReadQR({
250
245
  title: this === null || this === void 0 ? void 0 : this.readQrTitle,
251
- description: this === null || this === void 0 ? void 0 : this.readQrDescription,
246
+ description: this === null || this === void 0 ? void 0 : this.readQrDescription
252
247
  });
253
248
  }
254
249
  }
255
250
  renderSuccess() {
256
- return (h(Success, { modalHeight: this === null || this === void 0 ? void 0 : this.modalHeight, successLoginLabel: this === null || this === void 0 ? void 0 : this.successLoginLabel }));
251
+ return h(Success, { modalHeight: this === null || this === void 0 ? void 0 : this.modalHeight, successLoginLabel: this === null || this === void 0 ? void 0 : this.successLoginLabel });
257
252
  }
258
253
  renderRetryButton(errorMessage) {
259
254
  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) }));
260
255
  }
261
256
  renderReadQR(readQrMessages) {
262
- 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) }));
257
+ 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) });
263
258
  }
264
- renderQR(value, useLogo) {
265
- return (h(QR, { value: value, qrType: this.qrType, useLogo: useLogo, size: (this === null || this === void 0 ? void 0 : this.qrSize) || undefined, logoSrc: this === null || this === void 0 ? void 0 : this.logoSrc }));
259
+ renderQR(value, useLogo, sizeQR) {
260
+ 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 });
266
261
  }
267
262
  renderRetryQR(value, useLogo) {
268
- return (h(QR, { value: value, useLogo: useLogo, 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 }));
263
+ 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 });
269
264
  }
270
265
  render() {
271
266
  var _a, _b;
272
- return (h("div", { class: "popUpContainer" }, h("div", { class: `is-visible modal-window ${this.hideModalTexts ? "" : "large-modal"} ${this.hideModalBoxShadow ? "noBoxShadow" : ""}`, style: {
273
- width: (this.modalWidth - 2).toString() + "px",
274
- height: this.modalHeight
275
- ? ((_a = (this.modalHeight - 2)) === null || _a === void 0 ? void 0 : _a.toString()) + "px"
276
- : "",
267
+ return (h("div", { class: "popUpContainer" }, h("div", { class: `is-visible modal-window ${this.hideModalTexts ? '' : 'large-modal'} ${this.hideModalBoxShadow ? 'noBoxShadow' : ''}`, style: {
268
+ width: (this.modalWidth - 2).toString() + 'px',
269
+ height: this.modalHeight ? ((_a = (this.modalHeight - 2)) === null || _a === void 0 ? void 0 : _a.toString()) + 'px' : ''
277
270
  }, onClick: (event) => {
278
271
  event.stopPropagation();
279
- } }, 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 &&
280
- !this.hideQrModalDescription && (h("p", { class: "qrDescription modalText" }, this.qrModalDescription))), h("div", { class: "qrSection", style: {
281
- width: this.modalWidth.toString() + "px",
282
- height: this.modalWidth
283
- ? ((_b = this.modalWidth) === null || _b === void 0 ? void 0 : _b.toString()) + "px"
284
- : "",
272
+ } }, 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: {
273
+ width: this.modalWidth.toString() + 'px',
274
+ height: this.modalWidth ? ((_b = this.modalWidth) === null || _b === void 0 ? void 0 : _b.toString()) + 'px' : ''
285
275
  } }, this.renderQRSection())))));
286
276
  }
287
277
  };
@@ -1,12 +1,12 @@
1
1
  import { h, r as registerInstance, c as createEvent } from './index-2be54f32.js';
2
2
  import { g as gatIconCheckSvg, a as gatIconRefreshSvg, b as gatIconAlertSvg, l as logoGatacaSvg } from './gat-icon-alert-7b06ef3a.js';
3
3
  import './qr-code-styling-0eeb38d5.js';
4
- import { R as RESULT_STATUS, c as checkMobile, b as base64UrlEncode } from './utils-63e7a33b.js';
4
+ import { R as RESULT_STATUS, c as checkMobile, b as base64UrlEncode } from './utils-21ffcc1e.js';
5
5
 
6
6
  const Success = (props) => {
7
7
  const { modalHeight, successLoginLabel } = props;
8
- return (h("div", { class: "success", style: {
9
- height: modalHeight ? (modalHeight === null || modalHeight === void 0 ? void 0 : modalHeight.toString()) + "px" : "300px",
8
+ return (h("div", { class: 'success', style: {
9
+ height: modalHeight ? (modalHeight === null || modalHeight === void 0 ? void 0 : modalHeight.toString()) + 'px' : '300px'
10
10
  } },
11
11
  h("img", { src: gatIconCheckSvg, height: 52, width: 52 }),
12
12
  h("p", { class: "successMsg" }, successLoginLabel)));
@@ -14,19 +14,19 @@ const Success = (props) => {
14
14
 
15
15
  const RetryButton = (props) => {
16
16
  var _a;
17
- const { errorMessage, modalWidth, clickInsideBoxLabel, refreshQrLabel, scanQrLabel, waitingStartSessionLabel, display, renderRetryQR, } = props;
17
+ const { errorMessage, modalWidth, clickInsideBoxLabel, refreshQrLabel, scanQrLabel, waitingStartSessionLabel, display, renderRetryQR } = props;
18
18
  return (h("div", { class: "reload", style: {
19
- width: (modalWidth - 48).toString() + "px",
20
- height: modalWidth ? ((_a = (modalWidth - 48)) === null || _a === void 0 ? void 0 : _a.toString()) + "px" : "",
19
+ width: (modalWidth - 48).toString() + 'px',
20
+ height: modalWidth ? ((_a = (modalWidth - 48)) === null || _a === void 0 ? void 0 : _a.toString()) + 'px' : ''
21
21
  } },
22
22
  h("div", { id: "notify", onClick: () => display() },
23
23
  h("img", { src: gatIconRefreshSvg, height: 24, width: 24 }),
24
24
  h("p", { class: "notify-text" },
25
25
  clickInsideBoxLabel,
26
26
  " "),
27
- errorMessage ? (h("p", { class: "notify-text bold" }, refreshQrLabel)) : (h("p", { class: "notify-text bold" }, scanQrLabel)),
27
+ errorMessage ? h("p", { class: "notify-text bold" }, refreshQrLabel) : h("p", { class: "notify-text bold" }, scanQrLabel),
28
28
  errorMessage && (h("div", { class: "alert", style: {
29
- width: (modalWidth - 48).toString() + "px",
29
+ width: (modalWidth - 48).toString() + 'px'
30
30
  } },
31
31
  h("img", { src: gatIconAlertSvg, height: 24, width: 24 }),
32
32
  h("p", null, errorMessage)))),
@@ -35,7 +35,7 @@ const RetryButton = (props) => {
35
35
 
36
36
  const QR = (props) => {
37
37
  const { value, useLogo, logoSrc, size, qrType } = props;
38
- return (h("gataca-qrdisplay", { qrData: value, rounded: true, size: size, qrType: qrType, "logo-size": useLogo ? 0.33 : 0, "logo-src": logoSrc }));
38
+ return h("gataca-qrdisplay", { qrData: value, rounded: true, size: size, qrType: qrType, "logo-size": useLogo ? 0.33 : 0, "logo-src": logoSrc });
39
39
  };
40
40
 
41
41
  const AnimatedLoader = () => {
@@ -55,8 +55,8 @@ const ReadQR = (props) => {
55
55
  var _a;
56
56
  const { modalWidth, readQrMessages, renderQR, url, sizeQR } = props;
57
57
  return (h("div", { class: "blured", style: {
58
- width: (modalWidth - 48).toString() + "px",
59
- height: modalWidth ? ((_a = (modalWidth - 48)) === null || _a === void 0 ? void 0 : _a.toString()) + "px" : "",
58
+ width: (modalWidth - 48).toString() + 'px',
59
+ height: modalWidth ? ((_a = (modalWidth - 48)) === null || _a === void 0 ? void 0 : _a.toString()) + 'px' : ''
60
60
  } },
61
61
  h("div", { id: "notify" },
62
62
  h(AnimatedLoader, null),
@@ -69,11 +69,11 @@ const ReadQR = (props) => {
69
69
 
70
70
  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)}}";
71
71
 
72
- const DEEP_LINK_PREFIX = "https://api.gataca.io/qr/redirect.html";
72
+ const DEEP_LINK_PREFIX = 'https://api.gataca.io/qr/redirect.html';
73
73
  const DEFAULT_SESSION_TIMEOUT = 300;
74
- const QR_ROLE_CONNECT = "connect";
74
+ const QR_ROLE_CONNECT = 'connect';
75
75
  const GatacaQRWS = class {
76
- constructor(hostRef) { registerInstance(this, hostRef); 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
+ constructor(hostRef) { registerInstance(this, hostRef); 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; }
77
77
  disconnectedCallback() {
78
78
  this.stop();
79
79
  }
@@ -88,7 +88,7 @@ const GatacaQRWS = class {
88
88
  async display() {
89
89
  let socket = new WebSocket(this.socketEndpoint);
90
90
  setTimeout(() => {
91
- this.socket.close(1000, "");
91
+ this.socket.close(1000, '');
92
92
  }, 1000 * this.sessionTimeout);
93
93
  this.socket = socket;
94
94
  socket.onopen = () => {
@@ -107,11 +107,11 @@ const GatacaQRWS = class {
107
107
  }
108
108
  };
109
109
  socket.onerror = () => {
110
- let error = new Error("Error connecting with server");
110
+ let error = new Error('Error connecting with server');
111
111
  this.result = RESULT_STATUS.FAILED;
112
112
  this.gatacaLoginFailed.emit(error);
113
113
  this.errorCallback(error);
114
- socket.close(1000, "");
114
+ socket.close(1000, '');
115
115
  };
116
116
  socket.onclose = () => {
117
117
  if (this.result === RESULT_STATUS.ONGOING || RESULT_STATUS.READ) {
@@ -122,7 +122,7 @@ const GatacaQRWS = class {
122
122
  this.display();
123
123
  }
124
124
  else {
125
- let error = new Error("User did not scan the QR in the alloted time");
125
+ let error = new Error('User did not scan the QR in the alloted time');
126
126
  this.gatacaLoginFailed.emit(error);
127
127
  this.errorCallback(error);
128
128
  }
@@ -148,7 +148,7 @@ const GatacaQRWS = class {
148
148
  this.sessionData = wsresp.authenticatedUserData;
149
149
  this.gatacaLoginCompleted.emit(wsresp.authenticatedUserData);
150
150
  this.successCallback(wsresp.authenticatedUserData);
151
- this.socket.close(1000, "");
151
+ this.socket.close(1000, '');
152
152
  break;
153
153
  case RESULT_STATUS.FAILED:
154
154
  this.socket.close();
@@ -162,7 +162,7 @@ const GatacaQRWS = class {
162
162
  this.display();
163
163
  }
164
164
  else {
165
- let error = new Error("User did not scan the QR in the alloted time");
165
+ let error = new Error('User did not scan the QR in the alloted time');
166
166
  this.gatacaLoginFailed.emit(error);
167
167
  this.errorCallback(error);
168
168
  }
@@ -174,21 +174,19 @@ const GatacaQRWS = class {
174
174
  async stop() {
175
175
  this.sessionData = undefined;
176
176
  this.sessionId = undefined;
177
- this.socket.close(1000, "Client stopped the connection");
177
+ this.socket.close(1000, 'Client stopped the connection');
178
178
  }
179
179
  /**
180
180
  * Retrieve manually the session data on a successful login
181
181
  */
182
182
  async getSessionData() {
183
- return this.sessionData
184
- ? Promise.resolve(this.sessionData)
185
- : Promise.reject(new Error("No successful login"));
183
+ return this.sessionData ? Promise.resolve(this.sessionData) : Promise.reject(new Error('No successful login'));
186
184
  }
187
185
  getLink() {
188
- if (this.v === "2" && this.qrRole == QR_ROLE_CONNECT) {
186
+ if (this.v === '2' && this.qrRole == QR_ROLE_CONNECT) {
189
187
  return this.authenticationRequest;
190
188
  }
191
- const authRequestEncoded = "?dl=" + base64UrlEncode(this.authenticationRequest);
189
+ const authRequestEncoded = '?dl=' + base64UrlEncode(this.authenticationRequest);
192
190
  return DEEP_LINK_PREFIX + authRequestEncoded;
193
191
  }
194
192
  renderQRSection() {
@@ -206,40 +204,35 @@ const GatacaQRWS = class {
206
204
  case RESULT_STATUS.READ:
207
205
  return this.renderReadQR({
208
206
  title: this === null || this === void 0 ? void 0 : this.readQrTitle,
209
- description: this === null || this === void 0 ? void 0 : this.readQrDescription,
207
+ description: this === null || this === void 0 ? void 0 : this.readQrDescription
210
208
  });
211
209
  }
212
210
  }
213
211
  renderSuccess() {
214
- return (h(Success, { modalHeight: this === null || this === void 0 ? void 0 : this.modalHeight, successLoginLabel: this === null || this === void 0 ? void 0 : this.successLoginLabel }));
212
+ return h(Success, { modalHeight: this === null || this === void 0 ? void 0 : this.modalHeight, successLoginLabel: this === null || this === void 0 ? void 0 : this.successLoginLabel });
215
213
  }
216
214
  renderRetryButton(errorMessage) {
217
215
  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) }));
218
216
  }
219
217
  renderReadQR(readQrMessages) {
220
- 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) }));
218
+ 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) });
221
219
  }
222
- renderQR(value, useLogo) {
223
- return (h(QR, { value: value, qrType: this.qrType, useLogo: useLogo, size: (this === null || this === void 0 ? void 0 : this.qrSize) || undefined, logoSrc: this === null || this === void 0 ? void 0 : this.logoSrc }));
220
+ renderQR(value, useLogo, sizeQR) {
221
+ 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 });
224
222
  }
225
223
  renderRetryQR(value, useLogo) {
226
- return (h(QR, { value: value, qrType: this.qrType, useLogo: useLogo, size: (this === null || this === void 0 ? void 0 : this.qrSize) ? (this === null || this === void 0 ? void 0 : this.qrSize) - 50 : undefined, logoSrc: this === null || this === void 0 ? void 0 : this.logoSrc }));
224
+ 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 });
227
225
  }
228
226
  render() {
229
227
  var _a, _b;
230
- return (h("div", { class: "popUpContainer" }, h("div", { class: `is-visible modal-window ${this.hideModalTexts ? "" : "large-modal"} ${this.hideModalBoxShadow ? "noBoxShadow" : ""}`, style: {
231
- width: (this.modalWidth - 2).toString() + "px",
232
- height: this.modalHeight
233
- ? ((_a = (this.modalHeight - 2)) === null || _a === void 0 ? void 0 : _a.toString()) + "px"
234
- : "",
228
+ return (h("div", { class: "popUpContainer" }, h("div", { class: `is-visible modal-window ${this.hideModalTexts ? '' : 'large-modal'} ${this.hideModalBoxShadow ? 'noBoxShadow' : ''}`, style: {
229
+ width: (this.modalWidth - 2).toString() + 'px',
230
+ height: this.modalHeight ? ((_a = (this.modalHeight - 2)) === null || _a === void 0 ? void 0 : _a.toString()) + 'px' : ''
235
231
  }, onClick: (event) => {
236
232
  event.stopPropagation();
237
- } }, 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 &&
238
- !this.hideQrModalDescription && (h("p", { class: "qrDescription modalText" }, this.qrModalDescription))), h("div", { class: "qrSection", style: {
239
- width: this.modalWidth.toString() + "px",
240
- height: this.modalWidth
241
- ? ((_b = this.modalWidth) === null || _b === void 0 ? void 0 : _b.toString()) + "px"
242
- : "",
233
+ } }, 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: {
234
+ width: this.modalWidth.toString() + 'px',
235
+ height: this.modalWidth ? ((_b = this.modalWidth) === null || _b === void 0 ? void 0 : _b.toString()) + 'px' : ''
243
236
  } }, this.renderQRSection())))));
244
237
  }
245
238
  };