@gataca/qr 0.0.28 → 0.0.29

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 (91) hide show
  1. package/dist/{esm/qr-code-styling-0eeb38d5.js → cjs/gat-icon-check-6b6780eb.js} +12 -1
  2. package/dist/cjs/gataca-autoqr.cjs.entry.js +10 -10
  3. package/dist/cjs/gataca-qr_3.cjs.entry.js +639 -0
  4. package/dist/cjs/gataca-qrws.cjs.entry.js +42 -48
  5. package/dist/cjs/gataca-ssibuttonws.cjs.entry.js +61 -0
  6. package/dist/cjs/gatacaqr.cjs.js +2 -2
  7. package/dist/cjs/{index-93d47a75.js → index-1332a8ce.js} +32 -1
  8. package/dist/cjs/index.cjs.js +1 -1
  9. package/dist/cjs/loader.cjs.js +2 -2
  10. package/dist/cjs/{utils-ef28b844.js → utils-b4e62bc0.js} +1 -1
  11. package/dist/collection/assets/icons/RefreshIcon.js +6 -0
  12. package/dist/collection/components/gataca-autoqr/gataca-autoqr.js +13 -13
  13. package/dist/collection/components/gataca-qr/components/qr/QR.js +3 -3
  14. package/dist/collection/components/gataca-qr/components/readQR/ReadQR.js +12 -7
  15. package/dist/collection/components/gataca-qr/components/readQR/components/AnimatedLoader.js +5 -3
  16. package/dist/collection/components/gataca-qr/components/retryButton/RetryButton.js +12 -9
  17. package/dist/collection/components/gataca-qr/components/success/Success.js +7 -6
  18. package/dist/collection/components/gataca-qr/gataca-qr.css +15 -5
  19. package/dist/collection/components/gataca-qr/gataca-qr.js +68 -57
  20. package/dist/collection/components/gataca-qrdisplay/gataca-qrdisplay.js +33 -11
  21. package/dist/collection/components/gataca-qrws/components/qr/QR.js +2 -2
  22. package/dist/collection/components/gataca-qrws/components/readQR/ReadQR.js +4 -4
  23. package/dist/collection/components/gataca-qrws/components/readQR/components/AnimatedLoader.js +1 -1
  24. package/dist/collection/components/gataca-qrws/components/retryButton/RetryButton.js +8 -8
  25. package/dist/collection/components/gataca-qrws/components/success/Success.js +4 -4
  26. package/dist/collection/components/gataca-qrws/gataca-qrws.js +49 -56
  27. package/dist/collection/components/gataca-ssibutton/gataca-ssibutton.js +224 -54
  28. package/dist/collection/components/gataca-ssibuttonws/gataca-ssibuttonws.js +12 -12
  29. package/dist/collection/index.js +2 -2
  30. package/dist/collection/utils/index.js +1 -1
  31. package/dist/collection/utils/utils.js +1 -1
  32. package/dist/components/{gat-icon-alert.js → gat-icon-check.js} +4 -6
  33. package/dist/components/gataca-autoqr.js +9 -9
  34. package/dist/components/gataca-qr2.js +85 -73
  35. package/dist/components/gataca-qrdisplay2.js +11 -6
  36. package/dist/components/gataca-qrws2.js +37 -42
  37. package/dist/components/gataca-ssibutton2.js +114 -34
  38. package/dist/components/gataca-ssibuttonws2.js +6 -6
  39. package/dist/components/index.js +1 -1
  40. package/dist/{cjs/qr-code-styling-412bbc7a.js → esm/gat-icon-check-7320c81b.js} +6 -2
  41. package/dist/esm/gataca-autoqr.entry.js +10 -10
  42. package/dist/esm/gataca-qr_3.entry.js +633 -0
  43. package/dist/esm/gataca-qrws.entry.js +39 -45
  44. package/dist/esm/gataca-ssibuttonws.entry.js +57 -0
  45. package/dist/esm/gatacaqr.js +2 -2
  46. package/dist/esm/{index-2be54f32.js → index-055790a7.js} +32 -1
  47. package/dist/esm/index.js +1 -1
  48. package/dist/esm/loader.js +2 -2
  49. package/dist/esm/{utils-63e7a33b.js → utils-21ffcc1e.js} +1 -1
  50. package/dist/gatacaqr/gatacaqr.esm.js +1 -1
  51. package/dist/gatacaqr/index.esm.js +1 -1
  52. package/dist/gatacaqr/p-1d1129b7.entry.js +1 -0
  53. package/dist/gatacaqr/p-29119208.js +1 -0
  54. package/dist/gatacaqr/p-49cf321c.entry.js +1 -0
  55. package/dist/gatacaqr/p-9f83bae1.entry.js +1 -0
  56. package/dist/gatacaqr/{p-5e81ab9e.entry.js → p-c65f810b.entry.js} +1 -1
  57. package/dist/gatacaqr/p-fccf9d4d.js +2 -0
  58. package/dist/types/assets/icons/RefreshIcon.d.ts +8 -0
  59. package/dist/types/components/gataca-autoqr/gataca-autoqr.d.ts +7 -7
  60. package/dist/types/components/gataca-qr/components/qr/QR.d.ts +4 -2
  61. package/dist/types/components/gataca-qr/components/readQR/ReadQR.d.ts +3 -1
  62. package/dist/types/components/gataca-qr/components/readQR/components/AnimatedLoader.d.ts +6 -2
  63. package/dist/types/components/gataca-qr/components/retryButton/RetryButton.d.ts +3 -1
  64. package/dist/types/components/gataca-qr/components/success/Success.d.ts +3 -1
  65. package/dist/types/components/gataca-qr/gataca-qr.d.ts +16 -4
  66. package/dist/types/components/gataca-qrdisplay/gataca-qrdisplay.d.ts +6 -1
  67. package/dist/types/components/gataca-qrws/components/qr/QR.d.ts +2 -2
  68. package/dist/types/components/gataca-qrws/components/readQR/ReadQR.d.ts +1 -1
  69. package/dist/types/components/gataca-qrws/components/readQR/components/AnimatedLoader.d.ts +1 -1
  70. package/dist/types/components/gataca-qrws/components/retryButton/RetryButton.d.ts +1 -1
  71. package/dist/types/components/gataca-qrws/components/success/Success.d.ts +1 -1
  72. package/dist/types/components/gataca-qrws/gataca-qrws.d.ts +4 -4
  73. package/dist/types/components/gataca-ssibutton/gataca-ssibutton.d.ts +38 -5
  74. package/dist/types/components/gataca-ssibuttonws/gataca-ssibuttonws.d.ts +3 -3
  75. package/dist/types/components.d.ts +78 -36
  76. package/dist/types/index.d.ts +2 -2
  77. package/dist/types/utils/index.d.ts +1 -1
  78. package/package.json +30 -7
  79. package/dist/cjs/gat-icon-alert-0ad19b26.js +0 -14
  80. package/dist/cjs/gataca-qr_2.cjs.entry.js +0 -295
  81. package/dist/cjs/gataca-ssibutton_2.cjs.entry.js +0 -317
  82. package/dist/esm/gat-icon-alert-7b06ef3a.js +0 -9
  83. package/dist/esm/gataca-qr_2.entry.js +0 -290
  84. package/dist/esm/gataca-ssibutton_2.entry.js +0 -312
  85. package/dist/gatacaqr/p-0be4566d.js +0 -1
  86. package/dist/gatacaqr/p-3500ae66.entry.js +0 -1
  87. package/dist/gatacaqr/p-5ae5f952.js +0 -2
  88. package/dist/gatacaqr/p-68272823.entry.js +0 -1
  89. package/dist/gatacaqr/p-92a2e6f0.entry.js +0 -1
  90. package/dist/gatacaqr/p-ea783014.js +0 -1
  91. /package/dist/gatacaqr/{p-2cd7b062.js → p-bce7e590.js} +0 -0
@@ -7,7 +7,7 @@ import { d as defineCustomElement$2 } from './gataca-ssibuttonws2.js';
7
7
 
8
8
  const gatacaAutoqrCss = "@import url(\"https://fonts.googleapis.com/css2?family=Work+Sans:wght@300;400&display=swap\"); html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:\"\";content:none}table{border-collapse:collapse;border-spacing:0}.img-fluid{height:auto;max-width:50%}img{margin-left:auto;margin-right:auto}.buttonContainer{display:inline-block;text-align:right;padding:10px;position:relative}.gatacaButtonWrapper{margin:8px}.gatacaButtonWrapper .gatacaButton{display:flex;min-width:100px;padding:8px 8px;background-color:white;font-size:12px;font-family:\"Work Sans\", sans-serif;letter-spacing:1px;font-weight:2;justify-content:space-between;align-items:center;border-radius:6px;border:1px solid rgba(24, 27, 94, 0.5);color:rgba(24, 27, 94, 0.8);box-shadow:0px 1px 3px rgba(48, 48, 48, 0.15);cursor:pointer}.gatacaButtonWrapper .gatacaButton>span{margin-right:10px}.gatacaButtonWrapper .gatacaButton:hover{box-shadow:0px 2px 8px rgba(48, 48, 48, 0.1)}.gatacaButtonWrapper .buttonText{text-align:right;font-size:8px;color:rgba(24, 27, 94, 0.5);font-family:\"Helvetica Neue\", sans-serif;letter-spacing:1px;padding-right:8px;font-weight:1}.gatacaButtonWrapper .buttonImg{height:25px;width:25px;margin:0;margin-right:20px}";
9
9
 
10
- const DEFAULT_REPOSITORY = "https://studio.gataca.io/api/v1/qrconfigs";
10
+ const DEFAULT_REPOSITORY = 'https://studio.gataca.io/api/v1/qrconfigs';
11
11
  const fixFunctions = (data) => {
12
12
  var _a, _b, _c, _d, _e, _f;
13
13
  data.errorCallback = deserializeFunction((_a = data.errorCallback) === null || _a === void 0 ? void 0 : _a.toString());
@@ -20,7 +20,7 @@ const fixFunctions = (data) => {
20
20
  };
21
21
  const deserializeFunction = (data) => {
22
22
  if (data) {
23
- return new Function("return " + data)();
23
+ return new Function('return ' + data)();
24
24
  }
25
25
  return undefined;
26
26
  };
@@ -32,7 +32,7 @@ const GatacaAutoQR = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
32
32
  this.gatacaLoginCompleted = createEvent(this, "gatacaLoginCompleted", 7);
33
33
  this.gatacaLoginFailed = createEvent(this, "gatacaLoginFailed", 7);
34
34
  this.configId = undefined;
35
- this.qrType = "svg";
35
+ this.qrType = 'svg';
36
36
  this.configRepository = DEFAULT_REPOSITORY;
37
37
  this.successCallback = undefined;
38
38
  this.errorCallback = undefined;
@@ -43,11 +43,11 @@ const GatacaAutoQR = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
43
43
  this.config = undefined;
44
44
  this.loading = undefined;
45
45
  this.loading = true;
46
- fetch(this.configRepository + "/" + this.configId, {
47
- method: "GET",
46
+ fetch(this.configRepository + '/' + this.configId, {
47
+ method: 'GET',
48
48
  headers: {
49
- "Content-Type": "application/json",
50
- },
49
+ 'Content-Type': 'application/json'
50
+ }
51
51
  })
52
52
  .then((response) => {
53
53
  response
@@ -58,12 +58,12 @@ const GatacaAutoQR = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
58
58
  this.loading = false;
59
59
  })
60
60
  .catch((err) => {
61
- console.log("Cannot retrieve selected config", err);
61
+ console.log('Cannot retrieve selected config', err);
62
62
  this.loading = false;
63
63
  });
64
64
  })
65
65
  .catch((err) => {
66
- console.log("Cannot retrieve selected config", err);
66
+ console.log('Cannot retrieve selected config', err);
67
67
  this.loading = false;
68
68
  });
69
69
  }
@@ -1,39 +1,16 @@
1
1
  import { h, proxyCustomElement, HTMLElement, createEvent } from '@stencil/core/internal/client';
2
2
  import { l as logoGatacaSvg, d as defineCustomElement$1 } from './gataca-qrdisplay2.js';
3
- import { g as gatIconCheckSvg, a as gatIconRefreshSvg, d as gatIconAlertSvg, R as RESULT_STATUS, c as checkMobile, b as base64UrlEncode } from './gat-icon-alert.js';
3
+ import { g as gatIconAlertSvg, a as gatIconCheckSvg, R as RESULT_STATUS, c as checkMobile, b as base64UrlEncode } from './gat-icon-check.js';
4
4
 
5
- const Success = (props) => {
6
- const { modalHeight, successLoginLabel } = props;
7
- return (h("div", { class: "success", style: {
8
- height: modalHeight ? (modalHeight === null || modalHeight === void 0 ? void 0 : modalHeight.toString()) + "px" : "300px",
9
- } },
10
- h("img", { src: gatIconCheckSvg, height: 52, width: 52 }),
11
- h("p", { class: "successMsg" }, successLoginLabel)));
12
- };
13
-
14
- const RetryButton = (props) => {
15
- var _a;
16
- const { errorMessage, modalWidth, clickInsideBoxLabel, refreshQrLabel, scanQrLabel, waitingStartSessionLabel, display, renderRetryQR, } = props;
17
- return (h("div", { class: "reload", style: {
18
- width: (modalWidth - 48).toString() + "px",
19
- height: modalWidth ? ((_a = (modalWidth - 48)) === null || _a === void 0 ? void 0 : _a.toString()) + "px" : "",
20
- } },
21
- h("div", { id: "notify", onClick: () => display() },
22
- h("img", { src: gatIconRefreshSvg, height: 24, width: 24 }),
23
- h("p", { class: "notify-text" },
24
- clickInsideBoxLabel,
25
- " "),
26
- errorMessage ? (h("p", { class: "notify-text bold" }, refreshQrLabel)) : (h("p", { class: "notify-text bold" }, scanQrLabel)),
27
- errorMessage && (h("div", { class: "alert", style: {
28
- width: (modalWidth - 48).toString() + "px",
29
- } },
30
- h("img", { src: gatIconAlertSvg, height: 24, width: 24 }),
31
- h("p", null, errorMessage)))),
32
- h("div", { id: "qrwait" }, renderRetryQR(waitingStartSessionLabel))));
5
+ const QR = (props) => {
6
+ const { value, useLogo, logoSrc, size, qrType, style } = props;
7
+ return h("gataca-qrdisplay", { qrData: value, rounded: true, qrType: qrType, size: size, "logo-size": useLogo ? 0.33 : 0, "logo-src": logoSrc, qrColor: style === null || style === void 0 ? void 0 : style.color, bgColor: style === null || style === void 0 ? void 0 : style.bgColor });
33
8
  };
34
9
 
35
- const AnimatedLoader = () => {
36
- return (h("div", { class: "containerLoader" },
10
+ const AnimatedLoader = (props) => {
11
+ const { color = '#4745B7' } = props;
12
+ const style = { '--loader-color': color };
13
+ return (h("div", { class: "containerLoader", style: style },
37
14
  h("div", { class: "loader" },
38
15
  h("div", { class: "loader__item loader__item__1" }),
39
16
  h("div", { class: "loader__item loader__item__2" }),
@@ -47,33 +24,75 @@ const AnimatedLoader = () => {
47
24
 
48
25
  const ReadQR = (props) => {
49
26
  var _a;
50
- const { modalWidth, readQrMessages, renderQR, url, sizeQR } = props;
27
+ const { modalWidth, readQrMessages, renderQR, url, sizeQR, style } = props;
28
+ const bgStyle = { backgroundColor: (style === null || style === void 0 ? void 0 : style.bgColor) ? style === null || style === void 0 ? void 0 : style.bgColor : 'white' };
29
+ const color = { color: (style === null || style === void 0 ? void 0 : style.color) ? style === null || style === void 0 ? void 0 : style.color : '#707074' };
51
30
  return (h("div", { class: "blured", style: {
52
- width: (modalWidth - 48).toString() + "px",
53
- height: modalWidth ? ((_a = (modalWidth - 48)) === null || _a === void 0 ? void 0 : _a.toString()) + "px" : "",
31
+ width: (modalWidth - 48).toString() + 'px',
32
+ height: modalWidth ? ((_a = (modalWidth - 48)) === null || _a === void 0 ? void 0 : _a.toString()) + 'px' : '',
33
+ backgroundColor: style === null || style === void 0 ? void 0 : style.bgColor,
34
+ color: style === null || style === void 0 ? void 0 : style.color,
35
+ border: (style === null || style === void 0 ? void 0 : style.color) ? `1px dashed ${style === null || style === void 0 ? void 0 : style.color}` : `1px dashed #a1a1a1`
54
36
  } },
55
- h("div", { id: "notify" },
56
- h(AnimatedLoader, null),
57
- h("p", { class: "notify-text" }, readQrMessages === null || readQrMessages === void 0 ? void 0 :
37
+ h("div", { id: "notify", style: bgStyle },
38
+ h(AnimatedLoader, { color: style === null || style === void 0 ? void 0 : style.color }),
39
+ h("p", { class: "notify-text", style: color }, readQrMessages === null || readQrMessages === void 0 ? void 0 :
58
40
  readQrMessages.title,
59
- " "),
60
- h("p", { class: "notify-text bold" }, readQrMessages === null || readQrMessages === void 0 ? void 0 : readQrMessages.description)),
41
+ ' '),
42
+ h("p", { class: "notify-text bold", style: color }, readQrMessages === null || readQrMessages === void 0 ? void 0 : readQrMessages.description)),
61
43
  h("div", { id: "qrwait" }, renderQR(url, false, sizeQR))));
62
44
  };
63
45
 
64
- const QR = (props) => {
65
- const { value, useLogo, logoSrc, size, qrType } = props;
66
- return (h("gataca-qrdisplay", { qrData: value, rounded: true, qrType: qrType, size: size, "logo-size": useLogo ? 0.33 : 0, "logo-src": logoSrc }));
46
+ const RefreshIcon = (props) => {
47
+ const { height = 24, width = 24, color } = props;
48
+ const strokeColor = color ? color : '#8B8B8B';
49
+ return (h("svg", { width: width, height: height, viewBox: `0 0 ${width} ${height}`, fill: "none", xmlns: "http://www.w3.org/2000/svg" },
50
+ h("path", { d: "M23 4V10H17", stroke: strokeColor, "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }),
51
+ h("path", { d: "M20.4899 15C19.8399 16.8399 18.6094 18.4187 16.984 19.4985C15.3586 20.5783 13.4263 21.1006 11.4783 20.9866C9.53026 20.8726 7.67203 20.1286 6.18363 18.8667C4.69524 17.6047 3.6573 15.8932 3.22625 13.9901C2.79519 12.0869 2.99436 10.0952 3.79374 8.31508C4.59313 6.53496 5.94942 5.06288 7.65823 4.12065C9.36705 3.17843 11.3358 2.81711 13.2678 3.09116C15.1999 3.3652 16.9905 4.25975 18.3699 5.64001L22.9999 10", stroke: strokeColor, "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" })));
52
+ };
53
+
54
+ const RetryButton = (props) => {
55
+ var _a;
56
+ const { errorMessage, modalWidth, clickInsideBoxLabel, refreshQrLabel, scanQrLabel, waitingStartSessionLabel, style, display, renderRetryQR } = props;
57
+ const bgStyle = { backgroundColor: (style === null || style === void 0 ? void 0 : style.bgColor) ? style === null || style === void 0 ? void 0 : style.bgColor : 'white' };
58
+ const alertBgStyle = { backgroundColor: (style === null || style === void 0 ? void 0 : style.alertBgColor) ? style === null || style === void 0 ? void 0 : style.alertBgColor : '#ffdedf' };
59
+ const alertBorderColor = { borderColor: (style === null || style === void 0 ? void 0 : style.alertBorderColor) ? style === null || style === void 0 ? void 0 : style.alertBorderColor : '#ee888c' };
60
+ const color = { color: (style === null || style === void 0 ? void 0 : style.color) ? style === null || style === void 0 ? void 0 : style.color : '#707074' };
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' : '',
64
+ border: (style === null || style === void 0 ? void 0 : style.color) ? `1px dashed ${style === null || style === void 0 ? void 0 : style.color}` : `1px dashed #a1a1a1`
65
+ } },
66
+ h("div", { id: "notify", onClick: () => display(), style: bgStyle },
67
+ h(RefreshIcon, { color: style === null || style === void 0 ? void 0 : style.color, height: 24, width: 24 }),
68
+ h("p", { class: "notify-text", style: color },
69
+ clickInsideBoxLabel,
70
+ ' '),
71
+ errorMessage ? (h("p", { class: "notify-text bold", style: color }, refreshQrLabel)) : (h("p", { class: "notify-text bold", style: color }, scanQrLabel)),
72
+ errorMessage && (h("div", { class: "alert", style: Object.assign(Object.assign({ width: (modalWidth - 48).toString() + 'px' }, alertBgStyle), { border: `1px solid ${alertBorderColor}` }) },
73
+ h("img", { src: gatIconAlertSvg, height: 24, width: 24 }),
74
+ h("p", { style: { color: (style === null || style === void 0 ? void 0 : style.color) ? style === null || style === void 0 ? void 0 : style.color : '#1e1e20' } }, errorMessage)))),
75
+ h("div", { id: "qrwait" }, renderRetryQR(waitingStartSessionLabel))));
76
+ };
77
+
78
+ const Success = (props) => {
79
+ const { modalHeight, successLoginLabel, style } = props;
80
+ const colorStyle = { color: (style === null || style === void 0 ? void 0 : style.color) ? style === null || style === void 0 ? void 0 : style.color : '#1e1e20' };
81
+ return (h("div", { class: 'success', style: {
82
+ height: modalHeight ? (modalHeight === null || modalHeight === void 0 ? void 0 : modalHeight.toString()) + 'px' : '300px'
83
+ } },
84
+ h("img", { src: gatIconCheckSvg, height: 52, width: 52 }),
85
+ h("p", { class: "successMsg", style: colorStyle }, successLoginLabel)));
67
86
  };
68
87
 
69
- const gatacaQrCss = "@import url(\"https://fonts.googleapis.com/css2?family=Ubuntu:wght@100;300;400;500;600;700&display=swap\"); @import url(\"https://fonts.googleapis.com/css2?family=Poppins:wght@100;300;400;500;600;700&display=swap\"); @import url(\"https://fonts.googleapis.com/css2?family=Work+Sans:wght@300;400&display=swap\"); html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:\"\";content:none}table{border-collapse:collapse;border-spacing:0}.img-fluid{height:auto;max-width:50%}img{margin-left:auto;margin-right:auto}.brandSection{padding-top:5px;display:flex;align-items:center}.brandSection .gatacaImgSmall{height:13px;width:13px;margin:0;margin-right:10px}.popUpContainer .large-modal{width:300px;min-height:350px}.popUpContainer .modal-window{position:relative;border-radius:6px;overflow:hidden;color:rgba(24, 27, 94, 0.8);box-shadow:0px 3px 10px rgba(48, 48, 48, 0.1);display:flex;flex-direction:column;justify-content:space-between;align-items:center;display:flex;z-index:1001;padding:1px;background-color:white;border-radius:12px;-webkit-transition:opacity 0.5s, visibility 0s 0.5s;transition:opacity 0.5s, visibility 0s 0.5s;visibility:hidden;opacity:0}.popUpContainer .modal-window__content{width:100%;height:100%;text-align:left}.popUpContainer .modal-window__content .hidenText{display:none}.popUpContainer .modal-window .modalText{font-family:\"Ubuntu\", \"Work Sans\", \"Helvetica Neue\", sans-serif;font-size:20px;font-style:normal;font-weight:700;line-height:24px;margin-top:10px;letter-spacing:1px}.popUpContainer .modal-window .qrTitleContainer{padding:14px 24px;padding-bottom:0px}.popUpContainer .modal-window .qrTitle{font-size:20px;font-weight:600;line-height:23.5px}.popUpContainer .modal-window .qrDescription{font-family:\"Poppins\", \"Ubuntu\", \"Work Sans\", \"Helvetica Neue\", sans-serif;font-size:14px;font-style:normal;font-weight:400;line-height:16px;color:#707074}.popUpContainer .modal-window .bold{font-weight:700}.popUpContainer .modal-window .qrBrand{margin-top:4px;font-size:14px;font-weight:400;line-height:16.5px;display:flex;align-items:center}.popUpContainer .modal-window .qrBrand img{margin-left:5px;height:12px}.popUpContainer .modal-window .qr-section{width:252px;height:252px}.popUpContainer .noBoxShadow{box-shadow:none}.popUpContainer .is-visible{opacity:1;visibility:visible}.is-transparent{opacity:0}.success{display:flex;height:300px;flex-direction:column;justify-content:center;align-items:center;padding:0px}.success>img{padding-bottom:12px}.success>.successMsg{line-height:23.5px;color:var(--neutral-1000, #1e1e20);text-align:center;font-family:\"Ubuntu\", \"Work Sans\", \"Helvetica Neue\", sans-serif;font-size:20px;font-style:normal;font-weight:700;line-height:24px}.reload,.blured{height:252px;width:252px;border:1px dashed #a1a1a1;border-radius:12px;position:relative;top:24px;margin:0 24px 24px;display:flex;overflow:hidden;justify-content:center;align-items:center}#qrwait{display:flex;justify-content:center}#qrwait,#notify{width:100%;height:100%;top:0;left:0;border-radius:20px}#notify{z-index:10;position:absolute;justify-self:center;justify-items:center;justify-content:center;align-items:center;align-content:center;display:flex;flex-direction:column;box-sizing:border-box;padding:20px;background:rgba(255, 255, 255, 0.95)}#notify>img{padding-bottom:12px}.alert{display:flex;flex-direction:row;justify-content:start;width:252px;position:absolute;bottom:0px;border:1px solid #ee888c;background:#ffdedf;border-radius:11px;box-sizing:border-box;padding:12px;align-items:center;gap:12px}.alert>img{margin:0}.alert>p{font-family:\"Poppins\", \"Ubuntu\", \"Work Sans\", \"Helvetica Neue\", sans-serif;font-size:14px;font-style:normal;font-weight:400;margin-top:0;line-height:16px;color:#1e1e20}.notify-text{font-family:\"Poppins\", \"Ubuntu\", \"Work Sans\", \"Helvetica Neue\", sans-serif;font-size:14px;font-style:normal;font-weight:400;line-height:16px;color:#707074;text-align:center}.containerLoader{display:flex;justify-content:center;align-items:center;width:30px;height:30px;margin-bottom:12px}.loader{position:relative;margin-left:0 !important}.loader__item{position:absolute;width:9.68px;height:4px;background:transparent;border-radius:2px}.loader__item__1{transform:translate(2.5846212025px, 5.4246212025px) rotate(45deg);-webkit-animation:translate(2.5846212025px, 5.4246212025px) rotate(45deg);-moz-animation:translate(2.5846212025px, 5.4246212025px) rotate(45deg);-o-animation:translate(2.5846212025px, 5.4246212025px) rotate(45deg);animation:blink 0.8333333333s linear 0.1041666667s infinite;-webkit-animation:blink 0.8333333333s linear 0.1041666667s infinite;-moz-animation:blink 0.8333333333s linear 0.1041666667s infinite;-o-animation:blink 0.8333333333s linear 0.1041666667s infinite}.loader__item__2{transform:translate(-4.84px, 8.5px) rotate(90deg);-webkit-animation:translate(-4.84px, 8.5px) rotate(90deg);-moz-animation:translate(-4.84px, 8.5px) rotate(90deg);-o-animation:translate(-4.84px, 8.5px) rotate(90deg);animation:blink 0.8333333333s linear 0.2083333333s infinite;-webkit-animation:blink 0.8333333333s linear 0.2083333333s infinite;-moz-animation:blink 0.8333333333s linear 0.2083333333s infinite;-o-animation:blink 0.8333333333s linear 0.2083333333s infinite}.loader__item__3{transform:translate(-12.2646212025px, 5.4246212025px) rotate(135deg);-webkit-animation:translate(-12.2646212025px, 5.4246212025px) rotate(135deg);-moz-animation:translate(-12.2646212025px, 5.4246212025px) rotate(135deg);-o-animation:translate(-12.2646212025px, 5.4246212025px) rotate(135deg);animation:blink 0.8333333333s linear 0.3125s infinite;-webkit-animation:blink 0.8333333333s linear 0.3125s infinite;-moz-animation:blink 0.8333333333s linear 0.3125s infinite;-o-animation:blink 0.8333333333s linear 0.3125s infinite}.loader__item__4{transform:translate(-15.3399999992px, -1.9999999999px) rotate(180deg);-webkit-animation:translate(-15.3399999992px, -1.9999999999px) rotate(180deg);-moz-animation:translate(-15.3399999992px, -1.9999999999px) rotate(180deg);-o-animation:translate(-15.3399999992px, -1.9999999999px) rotate(180deg);animation:blink 0.8333333333s linear 0.4166666667s infinite;-webkit-animation:blink 0.8333333333s linear 0.4166666667s infinite;-moz-animation:blink 0.8333333333s linear 0.4166666667s infinite;-o-animation:blink 0.8333333333s linear 0.4166666667s infinite}.loader__item__5{transform:translate(-12.2646210959px, -9.4246211842px) rotate(225deg);-webkit-animation:translate(-12.2646210959px, -9.4246211842px) rotate(225deg);-moz-animation:translate(-12.2646210959px, -9.4246211842px) rotate(225deg);-o-animation:translate(-12.2646210959px, -9.4246211842px) rotate(225deg);animation:blink 0.8333333333s linear 0.5208333333s infinite;-webkit-animation:blink 0.8333333333s linear 0.5208333333s infinite;-moz-animation:blink 0.8333333333s linear 0.5208333333s infinite;-o-animation:blink 0.8333333333s linear 0.5208333333s infinite}.loader__item__6{transform:translate(-4.8399941857px, -12.499998805px) rotate(270deg);-webkit-animation:translate(-4.8399941857px, -12.499998805px) rotate(270deg);-moz-animation:translate(-4.8399941857px, -12.499998805px) rotate(270deg);-o-animation:translate(-4.8399941857px, -12.499998805px) rotate(270deg);animation:blink 0.8333333333s linear 0.625s infinite;-webkit-animation:blink 0.8333333333s linear 0.625s infinite;-moz-animation:blink 0.8333333333s linear 0.625s infinite;-o-animation:blink 0.8333333333s linear 0.625s infinite}.loader__item__7{transform:translate(2.5847915061px, -9.4245803212px) rotate(315deg);-webkit-animation:translate(2.5847915061px, -9.4245803212px) rotate(315deg);-moz-animation:translate(2.5847915061px, -9.4245803212px) rotate(315deg);-o-animation:translate(2.5847915061px, -9.4245803212px) rotate(315deg);animation:blink 0.8333333333s linear 0.7291666667s infinite;-webkit-animation:blink 0.8333333333s linear 0.7291666667s infinite;-moz-animation:blink 0.8333333333s linear 0.7291666667s infinite;-o-animation:blink 0.8333333333s linear 0.7291666667s infinite}.loader__item__8{transform:translate(5.6631628524px, -1.99913122px) rotate(360deg);-webkit-animation:translate(5.6631628524px, -1.99913122px) rotate(360deg);-moz-animation:translate(5.6631628524px, -1.99913122px) rotate(360deg);-o-animation:translate(5.6631628524px, -1.99913122px) rotate(360deg);animation:blink 0.8333333333s linear 0.8333333333s infinite;-webkit-animation:blink 0.8333333333s linear 0.8333333333s infinite;-moz-animation:blink 0.8333333333s linear 0.8333333333s infinite;-o-animation:blink 0.8333333333s linear 0.8333333333s infinite}.loader__item__8{max-width:8.5px}@keyframes blink{0%{background:#4745B7}100%{background:#CCCBF8}}@keyframes rotate{0%{transform:rotate(0deg)}100%{background:rotate(360deg)}}";
88
+ const gatacaQrCss = "@import url(\"https://fonts.googleapis.com/css2?family=Ubuntu:wght@100;300;400;500;600;700&display=swap\"); @import url(\"https://fonts.googleapis.com/css2?family=Poppins:wght@100;300;400;500;600;700&display=swap\"); @import url(\"https://fonts.googleapis.com/css2?family=Work+Sans:wght@300;400&display=swap\"); html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:\"\";content:none}table{border-collapse:collapse;border-spacing:0}.img-fluid{height:auto;max-width:50%}img{margin-left:auto;margin-right:auto}.brandSection{padding-top:5px;display:flex;align-items:center}.brandSection .gatacaImgSmall{height:13px;width:13px;margin:0;margin-right:10px}.popUpContainer .large-modal{width:300px;min-height:350px}.popUpContainer .modal-window{position:relative;border-radius:6px;overflow:hidden;color:rgba(24, 27, 94, 0.8);box-shadow:0px 3px 10px rgba(48, 48, 48, 0.1);display:flex;flex-direction:column;justify-content:space-between;align-items:center;display:flex;z-index:1001;padding:1px;background-color:white;border-radius:12px;-webkit-transition:opacity 0.5s, visibility 0s 0.5s;transition:opacity 0.5s, visibility 0s 0.5s;visibility:hidden;opacity:0}.popUpContainer .modal-window__content{width:100%;height:100%;text-align:left}.popUpContainer .modal-window__content .hidenText{display:none}.popUpContainer .modal-window .modalText{font-family:\"Ubuntu\", \"Work Sans\", \"Helvetica Neue\", sans-serif;font-size:20px;font-style:normal;font-weight:700;line-height:24px;margin-top:10px;letter-spacing:1px}.popUpContainer .modal-window .qrTitleContainer{padding:14px 24px;padding-bottom:0px}.popUpContainer .modal-window .qrTitle{font-size:20px;font-weight:600;line-height:23.5px}.popUpContainer .modal-window .qrDescription{font-family:\"Poppins\", \"Ubuntu\", \"Work Sans\", \"Helvetica Neue\", sans-serif;font-size:14px;font-style:normal;font-weight:400;line-height:16px;color:#707074}.popUpContainer .modal-window .bold{font-weight:700}.popUpContainer .modal-window .qrBrand{margin-top:4px;font-size:14px;font-weight:400;line-height:16.5px;display:flex;align-items:center}.popUpContainer .modal-window .qrBrand img{margin-left:5px;height:12px}.popUpContainer .modal-window .qr-section{width:252px;height:252px}.popUpContainer .noBoxShadow{box-shadow:none}.popUpContainer .is-visible{opacity:1;visibility:visible}.is-transparent{opacity:0}.success{display:flex;height:300px;flex-direction:column;justify-content:center;align-items:center;padding:0px}.success>img{padding-bottom:12px}.success>.successMsg{line-height:23.5px;color:var(--neutral-1000, #1e1e20);text-align:center;font-family:\"Ubuntu\", \"Work Sans\", \"Helvetica Neue\", sans-serif;font-size:20px;font-style:normal;font-weight:700;line-height:24px}.reload,.blured{height:252px;width:252px;border:1px dashed #a1a1a1;border-radius:20px;position:relative;top:24px;margin:0 24px 24px;display:flex;overflow:hidden;justify-content:center;align-items:center}#qrwait{display:flex;justify-content:center}#qrwait,#notify{width:100%;height:100%;top:0;left:0;border-radius:20px}#notify{z-index:10;position:absolute;justify-self:center;justify-items:center;justify-content:center;align-items:center;align-content:center;display:flex;flex-direction:column;box-sizing:border-box;padding:20px;background:rgba(255, 255, 255, 0.95)}#notify>svg{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-color:var(--loader-color, #4745B7);border-radius:2px;--to-opacity:1;opacity:var(--to-opacity)}.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);--to-opacity:calc(1 - (0 / 8));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);--to-opacity:calc(1 - (1 / 8));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);--to-opacity:calc(1 - (2 / 8));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);--to-opacity:calc(1 - (3 / 8));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);--to-opacity:calc(1 - (4 / 8));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);--to-opacity:calc(1 - (5 / 8));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);--to-opacity:calc(1 - (6 / 8));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);--to-opacity:calc(1 - (7 / 8));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%{opacity:1}100%{opacity:var(--to-opacity)}}@keyframes rotate{0%{transform:rotate(0deg)}100%{background:rotate(360deg)}}";
70
89
 
71
- const DEEP_LINK_PREFIX = "https://api.gataca.io/qr/redirect.html";
90
+ const DEEP_LINK_PREFIX = 'https://api.gataca.io/qr/redirect.html';
72
91
  //Default values
73
92
  const DEFAULT_SESSION_TIMEOUT = 300; //5mins as in connect
74
93
  const DEFAULT_POLLING_FREQ = 3;
75
94
  const GatacaQR = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
76
- constructor() { super(); this.__registerHost(); this.__attachShadow(); this.gatacaLoginCompleted = createEvent(this, "gatacaLoginCompleted", 7); this.gatacaLoginFailed = createEvent(this, "gatacaLoginFailed", 7); this.checkStatus = undefined; this.createSession = undefined; this.successCallback = undefined; this.errorCallback = undefined; this.qrRole = undefined; this.qrType = "svg"; this.callbackServer = undefined; this.autostart = true; this.autorefresh = false; this.v = "3"; this.qrModalTitle = "Quick Access"; this.modalTitleColor = "#4745B7"; this.qrModalDescription = "Sign up or sign in by scanning the QR Code with the Gataca Wallet"; this.hideModalTexts = false; this.hideModalBoxShadow = false; this.hideBrandTitle = false; this.logoSize = 0; this.logoSrc = logoGatacaSvg; this.qrSize = 300; this.modalWidth = 300; this.modalHeight = undefined; this.qrCodeExpiredLabel = "QR Code expired"; this.credentialsNotValidatedLabel = "User credentials not validated"; this.clickInsideBoxLabel = "Click inside the box to"; this.refreshQrLabel = "Refresh QR Code"; this.scanQrLabel = "Scan QR Code"; this.userNotScanInTimeErrorLabel = "User did not scan the QR in the allowed time"; this.credsNotValidatedErrorLabel = "Provided user credentials couldn't be validated"; this.failedLoginErrorLabel = "No successful login"; this.successLoginLabel = "Successful Connection!"; this.byBrandLabel = "by Gataca"; this.waitingStartSessionLabel = "waiting to start a session"; this.readQrTitle = "Processing..."; this.readQrDescription = "Please wait a moment"; this.hideQrModalDescription = false; this.sessionTimeout = DEFAULT_SESSION_TIMEOUT; this.pollingFrequency = DEFAULT_POLLING_FREQ; this.dynamicLink = true; this.sessionId = undefined; this.authenticationRequest = undefined; this.sessionData = undefined; this.result = RESULT_STATUS.NOT_STARTED; }
95
+ constructor() { super(); this.__registerHost(); this.__attachShadow(); this.gatacaLoginCompleted = createEvent(this, "gatacaLoginCompleted", 7); this.gatacaLoginFailed = createEvent(this, "gatacaLoginFailed", 7); this.checkStatus = undefined; this.createSession = undefined; this.successCallback = undefined; this.errorCallback = undefined; this.qrRole = undefined; this.qrType = 'svg'; this.callbackServer = undefined; this.autostart = true; this.autorefresh = false; this.v = '3'; this.qrModalTitle = 'Quick Access'; this.modalTitleColor = '#4745B7'; this.qrModalDescription = 'Sign up or sign in by scanning the QR Code with the Gataca Wallet'; this.hideModalTexts = false; this.hideModalBoxShadow = false; this.hideBrandTitle = false; this.logoSize = 0; this.logoSrc = logoGatacaSvg; this.qrSize = 300; this.modalWidth = 300; this.modalHeight = undefined; this.qrCodeExpiredLabel = 'QR Code expired'; this.credentialsNotValidatedLabel = 'User credentials not validated'; this.clickInsideBoxLabel = 'Click inside the box to'; this.refreshQrLabel = 'Refresh QR Code'; this.scanQrLabel = 'Scan QR Code'; this.userNotScanInTimeErrorLabel = 'User did not scan the QR in the allowed time'; this.credsNotValidatedErrorLabel = "Provided user credentials couldn't be validated"; this.failedLoginErrorLabel = 'No successful login'; this.successLoginLabel = 'Successful Connection!'; this.byBrandLabel = 'by Gataca'; this.waitingStartSessionLabel = 'waiting to start a session'; this.readQrTitle = 'Processing...'; this.readQrDescription = 'Please wait a moment'; this.hideQrModalDescription = false; this.sessionTimeout = DEFAULT_SESSION_TIMEOUT; this.pollingFrequency = DEFAULT_POLLING_FREQ; this.dynamicLink = true; this.qrStyle = undefined; this.sessionId = undefined; this.authenticationRequest = undefined; this.sessionData = undefined; this.result = RESULT_STATUS.NOT_STARTED; }
77
96
  disconnectedCallback() {
78
97
  this.stop();
79
98
  }
@@ -103,9 +122,7 @@ const GatacaQR = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
103
122
  }
104
123
  else {
105
124
  if (err !== RESULT_STATUS.NOT_STARTED) {
106
- let error = expired
107
- ? new Error(this.userNotScanInTimeErrorLabel)
108
- : new Error(this.credsNotValidatedErrorLabel);
125
+ let error = expired ? new Error(this.userNotScanInTimeErrorLabel) : new Error(this.credsNotValidatedErrorLabel);
109
126
  this.result = err;
110
127
  this.gatacaLoginFailed.emit(error);
111
128
  this.errorCallback(error);
@@ -133,9 +150,7 @@ const GatacaQR = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
133
150
  * Retrieve manually the session data on a successful login
134
151
  */
135
152
  async getSessionData() {
136
- return this.sessionData
137
- ? Promise.resolve(this.sessionData)
138
- : Promise.reject(new Error(this.failedLoginErrorLabel));
153
+ return this.sessionData ? Promise.resolve(this.sessionData) : Promise.reject(new Error(this.failedLoginErrorLabel));
139
154
  }
140
155
  async getSessionId() {
141
156
  if (this.sessionId) {
@@ -147,15 +162,14 @@ const GatacaQR = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
147
162
  return this.sessionId;
148
163
  }
149
164
  getLink() {
150
- if (this.v === "2") {
165
+ if (this.v === '2') {
151
166
  return this.authenticationRequest;
152
167
  }
153
- const authRequestEncoded = "?dl=" + base64UrlEncode(this.authenticationRequest);
168
+ const authRequestEncoded = '?dl=' + base64UrlEncode(this.authenticationRequest);
154
169
  return DEEP_LINK_PREFIX + authRequestEncoded;
155
170
  }
156
171
  async poll() {
157
- let endTime = new Date().getTime() +
158
- (this.sessionTimeout || DEFAULT_SESSION_TIMEOUT) * 1000;
172
+ let endTime = new Date().getTime() + (this.sessionTimeout || DEFAULT_SESSION_TIMEOUT) * 1000;
159
173
  let interval = (this.pollingFrequency || DEFAULT_POLLING_FREQ) * 1000;
160
174
  let checkFunc = async (component) => {
161
175
  if (component.result === RESULT_STATUS.NOT_STARTED) {
@@ -204,40 +218,37 @@ const GatacaQR = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
204
218
  case RESULT_STATUS.READ:
205
219
  return this.renderReadQR({
206
220
  title: this === null || this === void 0 ? void 0 : this.readQrTitle,
207
- description: this === null || this === void 0 ? void 0 : this.readQrDescription,
221
+ description: this === null || this === void 0 ? void 0 : this.readQrDescription
208
222
  });
209
223
  }
210
224
  }
211
225
  renderSuccess() {
212
- return (h(Success, { modalHeight: this === null || this === void 0 ? void 0 : this.modalHeight, successLoginLabel: this === null || this === void 0 ? void 0 : this.successLoginLabel }));
226
+ return h(Success, { modalHeight: this === null || this === void 0 ? void 0 : this.modalHeight, successLoginLabel: this === null || this === void 0 ? void 0 : this.successLoginLabel, style: this === null || this === void 0 ? void 0 : this.qrStyle });
213
227
  }
214
228
  renderRetryButton(errorMessage) {
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) }));
229
+ 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), style: this === null || this === void 0 ? void 0 : this.qrStyle }));
216
230
  }
217
231
  renderReadQR(readQrMessages) {
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) }));
232
+ 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), style: this.qrStyle }));
219
233
  }
220
234
  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 }));
235
+ return h(QR, { value: value, qrType: this.qrType, useLogo: useLogo && this.logoSize !== 0, size: sizeQR || (this === null || this === void 0 ? void 0 : this.qrSize) || undefined, logoSrc: this === null || this === void 0 ? void 0 : this.logoSrc, style: this === null || this === void 0 ? void 0 : this.qrStyle });
222
236
  }
223
237
  renderRetryQR(value, useLogo) {
224
- 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 }));
238
+ return h(QR, { value: value, useLogo: useLogo && this.logoSize !== 0, qrType: this.qrType, size: (this === null || this === void 0 ? void 0 : this.qrSize) ? (this === null || this === void 0 ? void 0 : this.qrSize) - 50 : undefined, logoSrc: this === null || this === void 0 ? void 0 : this.logoSrc, style: this === null || this === void 0 ? void 0 : this.qrStyle });
225
239
  }
226
240
  render() {
227
- var _a, _b;
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
231
- ? ((_a = (this.modalHeight - 2)) === null || _a === void 0 ? void 0 : _a.toString()) + "px"
232
- : "",
241
+ var _a, _b, _c, _d, _e, _f;
242
+ return (h("div", { class: "popUpContainer" }, h("div", { class: `is-visible modal-window ${this.hideModalTexts ? '' : 'large-modal'} ${this.hideModalBoxShadow ? 'noBoxShadow' : ''}`, style: {
243
+ width: (this.modalWidth - 2).toString() + 'px',
244
+ height: this.modalHeight ? ((_a = (this.modalHeight - 2)) === null || _a === void 0 ? void 0 : _a.toString()) + 'px' : '',
245
+ backgroundColor: ((_b = this === null || this === void 0 ? void 0 : this.qrStyle) === null || _b === void 0 ? void 0 : _b.bgColor) ? (_c = this === null || this === void 0 ? void 0 : this.qrStyle) === null || _c === void 0 ? void 0 : _c.bgColor : 'white',
246
+ boxShadow: ((_d = this === null || this === void 0 ? void 0 : this.qrStyle) === null || _d === void 0 ? void 0 : _d.boxShadow) ? (_e = this === null || this === void 0 ? void 0 : this.qrStyle) === null || _e === void 0 ? void 0 : _e.boxShadow : '0px 3px 10px rgba(48, 48, 48, 0.1);'
233
247
  }, onClick: (event) => {
234
248
  event.stopPropagation();
235
- } }, 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 &&
236
- !this.hideQrModalDescription && (h("p", { class: "qrDescription modalText" }, this.qrModalDescription))), h("div", { class: "qrSection", style: {
237
- width: this.modalWidth.toString() + "px",
238
- height: this.modalWidth
239
- ? ((_b = this.modalWidth) === null || _b === void 0 ? void 0 : _b.toString()) + "px"
240
- : "",
249
+ } }, 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: {
250
+ width: this.modalWidth.toString() + 'px',
251
+ height: this.modalWidth ? ((_f = this.modalWidth) === null || _f === void 0 ? void 0 : _f.toString()) + 'px' : ''
241
252
  } }, this.renderQRSection())))));
242
253
  }
243
254
  static get style() { return gatacaQrCss; }
@@ -280,6 +291,7 @@ const GatacaQR = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
280
291
  "sessionTimeout": [2, "session-timeout"],
281
292
  "pollingFrequency": [2, "polling-frequency"],
282
293
  "dynamicLink": [4, "dynamic-link"],
294
+ "qrStyle": [16],
283
295
  "sessionId": [32],
284
296
  "authenticationRequest": [32],
285
297
  "sessionData": [32],
@@ -32,11 +32,12 @@ const GatacaQRDisplay = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
32
32
  super();
33
33
  this.__registerHost();
34
34
  this.qrData = undefined;
35
- this.qrType = "svg";
35
+ this.qrType = 'svg';
36
36
  this.size = 256;
37
37
  this.logoSize = 0;
38
38
  this.logoSrc = undefined;
39
- this.qrColor = "#1E1E20";
39
+ this.qrColor = '#1E1E20';
40
+ this.bgColor = '#FFFFFF';
40
41
  this.rounded = true;
41
42
  }
42
43
  componentDidLoad() {
@@ -49,18 +50,21 @@ const GatacaQRDisplay = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
49
50
  type: this.qrType,
50
51
  dotsOptions: {
51
52
  color: this.qrColor,
52
- type: this.rounded ? "dots" : "square",
53
+ type: this.rounded ? 'dots' : 'square'
53
54
  },
54
55
  cornersSquareOptions: {
55
- type: this.rounded ? "extra-rounded" : "square",
56
+ type: this.rounded ? 'extra-rounded' : 'square'
56
57
  },
57
58
  cornersDotOptions: {
58
- type: this.rounded ? "dot" : "square",
59
+ type: this.rounded ? 'dot' : 'square'
59
60
  },
60
61
  imageOptions: {
61
62
  margin: 2,
62
- imageSize: this.logoSize,
63
+ imageSize: this.logoSize
63
64
  },
65
+ backgroundOptions: {
66
+ color: this.bgColor
67
+ }
64
68
  });
65
69
  qrCode.append(this.qr);
66
70
  }
@@ -76,6 +80,7 @@ const GatacaQRDisplay = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
76
80
  "logoSize": [2, "logo-size"],
77
81
  "logoSrc": [1, "logo-src"],
78
82
  "qrColor": [1, "qr-color"],
83
+ "bgColor": [1, "bg-color"],
79
84
  "rounded": [4]
80
85
  }]);
81
86
  function defineCustomElement() {