@gataca/qr 0.0.28 → 0.0.30

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/components/gataca-autoqr/gataca-autoqr.js +13 -13
  12. package/dist/collection/components/gataca-qr/components/qr/QR.js +3 -3
  13. package/dist/collection/components/gataca-qr/components/readQR/ReadQR.js +12 -7
  14. package/dist/collection/components/gataca-qr/components/readQR/components/AnimatedLoader.js +5 -3
  15. package/dist/collection/components/gataca-qr/components/retryButton/RetryButton.js +12 -9
  16. package/dist/collection/components/gataca-qr/components/success/Success.js +7 -6
  17. package/dist/collection/components/gataca-qr/gataca-qr.css +15 -5
  18. package/dist/collection/components/gataca-qr/gataca-qr.js +68 -57
  19. package/dist/collection/components/gataca-qrdisplay/gataca-qrdisplay.js +33 -11
  20. package/dist/collection/components/gataca-qrws/components/qr/QR.js +2 -2
  21. package/dist/collection/components/gataca-qrws/components/readQR/ReadQR.js +4 -4
  22. package/dist/collection/components/gataca-qrws/components/readQR/components/AnimatedLoader.js +1 -1
  23. package/dist/collection/components/gataca-qrws/components/retryButton/RetryButton.js +8 -8
  24. package/dist/collection/components/gataca-qrws/components/success/Success.js +4 -4
  25. package/dist/collection/components/gataca-qrws/gataca-qrws.js +49 -56
  26. package/dist/collection/components/gataca-ssibutton/gataca-ssibutton.js +224 -54
  27. package/dist/collection/components/gataca-ssibuttonws/gataca-ssibuttonws.js +12 -12
  28. package/dist/collection/components/icons/RefreshIcon.js +6 -0
  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/components/gataca-autoqr/gataca-autoqr.d.ts +7 -7
  59. package/dist/types/components/gataca-qr/components/qr/QR.d.ts +4 -2
  60. package/dist/types/components/gataca-qr/components/readQR/ReadQR.d.ts +3 -1
  61. package/dist/types/components/gataca-qr/components/readQR/components/AnimatedLoader.d.ts +6 -2
  62. package/dist/types/components/gataca-qr/components/retryButton/RetryButton.d.ts +3 -1
  63. package/dist/types/components/gataca-qr/components/success/Success.d.ts +3 -1
  64. package/dist/types/components/gataca-qr/gataca-qr.d.ts +16 -4
  65. package/dist/types/components/gataca-qrdisplay/gataca-qrdisplay.d.ts +6 -1
  66. package/dist/types/components/gataca-qrws/components/qr/QR.d.ts +2 -2
  67. package/dist/types/components/gataca-qrws/components/readQR/ReadQR.d.ts +1 -1
  68. package/dist/types/components/gataca-qrws/components/readQR/components/AnimatedLoader.d.ts +1 -1
  69. package/dist/types/components/gataca-qrws/components/retryButton/RetryButton.d.ts +1 -1
  70. package/dist/types/components/gataca-qrws/components/success/Success.d.ts +1 -1
  71. package/dist/types/components/gataca-qrws/gataca-qrws.d.ts +4 -4
  72. package/dist/types/components/gataca-ssibutton/gataca-ssibutton.d.ts +38 -5
  73. package/dist/types/components/gataca-ssibuttonws/gataca-ssibuttonws.d.ts +3 -3
  74. package/dist/types/components/icons/RefreshIcon.d.ts +8 -0
  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
@@ -1,11 +1,16 @@
1
- import { h } from "@stencil/core";
2
- import { AnimatedLoader } from "./components/AnimatedLoader";
1
+ import { h } from '@stencil/core';
2
+ import { AnimatedLoader } from './components/AnimatedLoader';
3
3
  export const ReadQR = (props) => {
4
4
  var _a;
5
- const { modalWidth, readQrMessages, renderQR, url, sizeQR } = props;
5
+ const { modalWidth, readQrMessages, renderQR, url, sizeQR, style } = props;
6
+ const bgStyle = { backgroundColor: (style === null || style === void 0 ? void 0 : style.bgColor) ? style === null || style === void 0 ? void 0 : style.bgColor : 'white' };
7
+ const color = { color: (style === null || style === void 0 ? void 0 : style.color) ? style === null || style === void 0 ? void 0 : style.color : '#707074' };
6
8
  return (h("div", { class: "blured", style: {
7
- width: (modalWidth - 48).toString() + "px",
8
- height: modalWidth ? ((_a = (modalWidth - 48)) === null || _a === void 0 ? void 0 : _a.toString()) + "px" : "",
9
- } }, h("div", { id: "notify" }, h(AnimatedLoader, null), h("p", { class: "notify-text" }, readQrMessages === null || readQrMessages === void 0 ? void 0 :
10
- readQrMessages.title, " "), h("p", { class: "notify-text bold" }, readQrMessages === null || readQrMessages === void 0 ? void 0 : readQrMessages.description)), h("div", { id: "qrwait" }, renderQR(url, false, sizeQR))));
9
+ width: (modalWidth - 48).toString() + 'px',
10
+ height: modalWidth ? ((_a = (modalWidth - 48)) === null || _a === void 0 ? void 0 : _a.toString()) + 'px' : '',
11
+ backgroundColor: style === null || style === void 0 ? void 0 : style.bgColor,
12
+ color: style === null || style === void 0 ? void 0 : style.color,
13
+ border: (style === null || style === void 0 ? void 0 : style.color) ? `1px dashed ${style === null || style === void 0 ? void 0 : style.color}` : `1px dashed #a1a1a1`
14
+ } }, h("div", { id: "notify", style: bgStyle }, h(AnimatedLoader, { color: style === null || style === void 0 ? void 0 : style.color }), h("p", { class: "notify-text", style: color }, readQrMessages === null || readQrMessages === void 0 ? void 0 :
15
+ readQrMessages.title, ' '), h("p", { class: "notify-text bold", style: color }, readQrMessages === null || readQrMessages === void 0 ? void 0 : readQrMessages.description)), h("div", { id: "qrwait" }, renderQR(url, false, sizeQR))));
11
16
  };
@@ -1,4 +1,6 @@
1
- import { h } from "@stencil/core";
2
- export const AnimatedLoader = () => {
3
- return (h("div", { class: "containerLoader" }, h("div", { class: "loader" }, h("div", { class: "loader__item loader__item__1" }), h("div", { class: "loader__item loader__item__2" }), h("div", { class: "loader__item loader__item__3" }), h("div", { class: "loader__item loader__item__4" }), h("div", { class: "loader__item loader__item__5" }), h("div", { class: "loader__item loader__item__6" }), h("div", { class: "loader__item loader__item__7" }), h("div", { class: "loader__item loader__item__8" }))));
1
+ import { h } from '@stencil/core';
2
+ export const AnimatedLoader = (props) => {
3
+ const { color = '#4745B7' } = props;
4
+ const style = { '--loader-color': color };
5
+ return (h("div", { class: "containerLoader", style: style }, h("div", { class: "loader" }, h("div", { class: "loader__item loader__item__1" }), h("div", { class: "loader__item loader__item__2" }), h("div", { class: "loader__item loader__item__3" }), h("div", { class: "loader__item loader__item__4" }), h("div", { class: "loader__item loader__item__5" }), h("div", { class: "loader__item loader__item__6" }), h("div", { class: "loader__item loader__item__7" }), h("div", { class: "loader__item loader__item__8" }))));
4
6
  };
@@ -1,13 +1,16 @@
1
- import { h } from "@stencil/core";
2
- import refreshIcon from "../../../../assets/icons/gat-icon-refresh.svg";
3
- import alertIcon from "../../../../assets/icons/gat-icon-alert.svg";
1
+ import { h } from '@stencil/core';
2
+ import alertIcon from '../../../../assets/icons/gat-icon-alert.svg';
3
+ import { RefreshIcon } from '../../../icons/RefreshIcon';
4
4
  export const RetryButton = (props) => {
5
5
  var _a;
6
- const { errorMessage, modalWidth, clickInsideBoxLabel, refreshQrLabel, scanQrLabel, waitingStartSessionLabel, display, renderRetryQR, } = props;
6
+ const { errorMessage, modalWidth, clickInsideBoxLabel, refreshQrLabel, scanQrLabel, waitingStartSessionLabel, style, display, renderRetryQR } = props;
7
+ const bgStyle = { backgroundColor: (style === null || style === void 0 ? void 0 : style.bgColor) ? style === null || style === void 0 ? void 0 : style.bgColor : 'white' };
8
+ const alertBgStyle = { backgroundColor: (style === null || style === void 0 ? void 0 : style.alertBgColor) ? style === null || style === void 0 ? void 0 : style.alertBgColor : '#ffdedf' };
9
+ const alertBorderColor = { borderColor: (style === null || style === void 0 ? void 0 : style.alertBorderColor) ? style === null || style === void 0 ? void 0 : style.alertBorderColor : '#ee888c' };
10
+ const color = { color: (style === null || style === void 0 ? void 0 : style.color) ? style === null || style === void 0 ? void 0 : style.color : '#707074' };
7
11
  return (h("div", { class: "reload", style: {
8
- width: (modalWidth - 48).toString() + "px",
9
- height: modalWidth ? ((_a = (modalWidth - 48)) === null || _a === void 0 ? void 0 : _a.toString()) + "px" : "",
10
- } }, h("div", { id: "notify", onClick: () => display() }, h("img", { src: refreshIcon, height: 24, width: 24 }), h("p", { class: "notify-text" }, clickInsideBoxLabel, " "), errorMessage ? (h("p", { class: "notify-text bold" }, refreshQrLabel)) : (h("p", { class: "notify-text bold" }, scanQrLabel)), errorMessage && (h("div", { class: "alert", style: {
11
- width: (modalWidth - 48).toString() + "px",
12
- } }, h("img", { src: alertIcon, height: 24, width: 24 }), h("p", null, errorMessage)))), h("div", { id: "qrwait" }, renderRetryQR(waitingStartSessionLabel))));
12
+ width: (modalWidth - 48).toString() + 'px',
13
+ height: modalWidth ? ((_a = (modalWidth - 48)) === null || _a === void 0 ? void 0 : _a.toString()) + 'px' : '',
14
+ border: (style === null || style === void 0 ? void 0 : style.color) ? `1px dashed ${style === null || style === void 0 ? void 0 : style.color}` : `1px dashed #a1a1a1`
15
+ } }, h("div", { id: "notify", onClick: () => display(), style: bgStyle }, h(RefreshIcon, { color: style === null || style === void 0 ? void 0 : style.color, height: 24, width: 24 }), h("p", { class: "notify-text", style: color }, clickInsideBoxLabel, ' '), errorMessage ? (h("p", { class: "notify-text bold", style: color }, refreshQrLabel)) : (h("p", { class: "notify-text bold", style: color }, scanQrLabel)), errorMessage && (h("div", { class: "alert", style: Object.assign(Object.assign({ width: (modalWidth - 48).toString() + 'px' }, alertBgStyle), { border: `1px solid ${alertBorderColor}` }) }, h("img", { src: alertIcon, height: 24, width: 24 }), h("p", { style: { color: (style === null || style === void 0 ? void 0 : style.color) ? style === null || style === void 0 ? void 0 : style.color : '#1e1e20' } }, errorMessage)))), h("div", { id: "qrwait" }, renderRetryQR(waitingStartSessionLabel))));
13
16
  };
@@ -1,8 +1,9 @@
1
- import successIcon from "../../../../assets/icons/gat-icon-check.svg";
2
- import { h } from "@stencil/core";
1
+ import successIcon from '../../../../assets/icons/gat-icon-check.svg';
2
+ import { h } from '@stencil/core';
3
3
  export const Success = (props) => {
4
- const { modalHeight, successLoginLabel } = props;
5
- return (h("div", { class: "success", style: {
6
- height: modalHeight ? (modalHeight === null || modalHeight === void 0 ? void 0 : modalHeight.toString()) + "px" : "300px",
7
- } }, h("img", { src: successIcon, height: 52, width: 52 }), h("p", { class: "successMsg" }, successLoginLabel)));
4
+ const { modalHeight, successLoginLabel, style } = props;
5
+ const colorStyle = { color: (style === null || style === void 0 ? void 0 : style.color) ? style === null || style === void 0 ? void 0 : style.color : '#1e1e20' };
6
+ return (h("div", { class: 'success', style: {
7
+ height: modalHeight ? (modalHeight === null || modalHeight === void 0 ? void 0 : modalHeight.toString()) + 'px' : '300px'
8
+ } }, h("img", { src: successIcon, height: 52, width: 52 }), h("p", { class: "successMsg", style: colorStyle }, successLoginLabel)));
8
9
  };
@@ -197,7 +197,7 @@ img {
197
197
  height: 252px;
198
198
  width: 252px;
199
199
  border: 1px dashed #a1a1a1;
200
- border-radius: 12px;
200
+ border-radius: 20px;
201
201
  position: relative;
202
202
  top: 24px;
203
203
  margin: 0 24px 24px;
@@ -235,7 +235,7 @@ img {
235
235
  padding: 20px;
236
236
  background: rgba(255, 255, 255, 0.95);
237
237
  }
238
- #notify > img {
238
+ #notify > svg {
239
239
  padding-bottom: 12px;
240
240
  }
241
241
 
@@ -294,14 +294,17 @@ img {
294
294
  position: absolute;
295
295
  width: 9.68px;
296
296
  height: 4px;
297
- background: transparent;
297
+ background-color: var(--loader-color, #4745B7);
298
298
  border-radius: 2px;
299
+ --to-opacity: 1;
300
+ opacity: var(--to-opacity);
299
301
  }
300
302
  .loader__item__1 {
301
303
  transform: translate(2.5846212025px, 5.4246212025px) rotate(45deg);
302
304
  -webkit-animation: translate(2.5846212025px, 5.4246212025px) rotate(45deg);
303
305
  -moz-animation: translate(2.5846212025px, 5.4246212025px) rotate(45deg);
304
306
  -o-animation: translate(2.5846212025px, 5.4246212025px) rotate(45deg);
307
+ --to-opacity: calc(1 - (0 / 8));
305
308
  animation: blink 0.8333333333s linear 0.1041666667s infinite;
306
309
  -webkit-animation: blink 0.8333333333s linear 0.1041666667s infinite;
307
310
  -moz-animation: blink 0.8333333333s linear 0.1041666667s infinite;
@@ -312,6 +315,7 @@ img {
312
315
  -webkit-animation: translate(-4.84px, 8.5px) rotate(90deg);
313
316
  -moz-animation: translate(-4.84px, 8.5px) rotate(90deg);
314
317
  -o-animation: translate(-4.84px, 8.5px) rotate(90deg);
318
+ --to-opacity: calc(1 - (1 / 8));
315
319
  animation: blink 0.8333333333s linear 0.2083333333s infinite;
316
320
  -webkit-animation: blink 0.8333333333s linear 0.2083333333s infinite;
317
321
  -moz-animation: blink 0.8333333333s linear 0.2083333333s infinite;
@@ -322,6 +326,7 @@ img {
322
326
  -webkit-animation: translate(-12.2646212025px, 5.4246212025px) rotate(135deg);
323
327
  -moz-animation: translate(-12.2646212025px, 5.4246212025px) rotate(135deg);
324
328
  -o-animation: translate(-12.2646212025px, 5.4246212025px) rotate(135deg);
329
+ --to-opacity: calc(1 - (2 / 8));
325
330
  animation: blink 0.8333333333s linear 0.3125s infinite;
326
331
  -webkit-animation: blink 0.8333333333s linear 0.3125s infinite;
327
332
  -moz-animation: blink 0.8333333333s linear 0.3125s infinite;
@@ -332,6 +337,7 @@ img {
332
337
  -webkit-animation: translate(-15.3399999992px, -1.9999999999px) rotate(180deg);
333
338
  -moz-animation: translate(-15.3399999992px, -1.9999999999px) rotate(180deg);
334
339
  -o-animation: translate(-15.3399999992px, -1.9999999999px) rotate(180deg);
340
+ --to-opacity: calc(1 - (3 / 8));
335
341
  animation: blink 0.8333333333s linear 0.4166666667s infinite;
336
342
  -webkit-animation: blink 0.8333333333s linear 0.4166666667s infinite;
337
343
  -moz-animation: blink 0.8333333333s linear 0.4166666667s infinite;
@@ -342,6 +348,7 @@ img {
342
348
  -webkit-animation: translate(-12.2646210959px, -9.4246211842px) rotate(225deg);
343
349
  -moz-animation: translate(-12.2646210959px, -9.4246211842px) rotate(225deg);
344
350
  -o-animation: translate(-12.2646210959px, -9.4246211842px) rotate(225deg);
351
+ --to-opacity: calc(1 - (4 / 8));
345
352
  animation: blink 0.8333333333s linear 0.5208333333s infinite;
346
353
  -webkit-animation: blink 0.8333333333s linear 0.5208333333s infinite;
347
354
  -moz-animation: blink 0.8333333333s linear 0.5208333333s infinite;
@@ -352,6 +359,7 @@ img {
352
359
  -webkit-animation: translate(-4.8399941857px, -12.499998805px) rotate(270deg);
353
360
  -moz-animation: translate(-4.8399941857px, -12.499998805px) rotate(270deg);
354
361
  -o-animation: translate(-4.8399941857px, -12.499998805px) rotate(270deg);
362
+ --to-opacity: calc(1 - (5 / 8));
355
363
  animation: blink 0.8333333333s linear 0.625s infinite;
356
364
  -webkit-animation: blink 0.8333333333s linear 0.625s infinite;
357
365
  -moz-animation: blink 0.8333333333s linear 0.625s infinite;
@@ -362,6 +370,7 @@ img {
362
370
  -webkit-animation: translate(2.5847915061px, -9.4245803212px) rotate(315deg);
363
371
  -moz-animation: translate(2.5847915061px, -9.4245803212px) rotate(315deg);
364
372
  -o-animation: translate(2.5847915061px, -9.4245803212px) rotate(315deg);
373
+ --to-opacity: calc(1 - (6 / 8));
365
374
  animation: blink 0.8333333333s linear 0.7291666667s infinite;
366
375
  -webkit-animation: blink 0.8333333333s linear 0.7291666667s infinite;
367
376
  -moz-animation: blink 0.8333333333s linear 0.7291666667s infinite;
@@ -372,6 +381,7 @@ img {
372
381
  -webkit-animation: translate(5.6631628524px, -1.99913122px) rotate(360deg);
373
382
  -moz-animation: translate(5.6631628524px, -1.99913122px) rotate(360deg);
374
383
  -o-animation: translate(5.6631628524px, -1.99913122px) rotate(360deg);
384
+ --to-opacity: calc(1 - (7 / 8));
375
385
  animation: blink 0.8333333333s linear 0.8333333333s infinite;
376
386
  -webkit-animation: blink 0.8333333333s linear 0.8333333333s infinite;
377
387
  -moz-animation: blink 0.8333333333s linear 0.8333333333s infinite;
@@ -383,10 +393,10 @@ img {
383
393
 
384
394
  @keyframes blink {
385
395
  0% {
386
- background: #4745B7;
396
+ opacity: 1;
387
397
  }
388
398
  100% {
389
- background: #CCCBF8;
399
+ opacity: var(--to-opacity);
390
400
  }
391
401
  }
392
402
  @keyframes rotate {
@@ -1,17 +1,17 @@
1
- import { h, } from "@stencil/core";
2
- import logoGataca from "../../assets/images/logo_gataca.svg";
3
- import "../gataca-qrdisplay/gataca-qrdisplay";
4
- import { base64UrlEncode, checkMobile, RESULT_STATUS } from "../../utils/utils";
5
- import { Success } from "./components/success/Success";
6
- import { RetryButton } from "./components/retryButton/RetryButton";
7
- import { ReadQR } from "./components/readQR/ReadQR";
8
- import { QR } from "./components/qr/QR";
9
- const DEEP_LINK_PREFIX = "https://api.gataca.io/qr/redirect.html";
1
+ import { h } from '@stencil/core';
2
+ import logoGataca from '../../assets/images/logo_gataca.svg';
3
+ import { base64UrlEncode, checkMobile, RESULT_STATUS } from '../../utils/utils';
4
+ import '../gataca-qrdisplay/gataca-qrdisplay';
5
+ import { QR } from './components/qr/QR';
6
+ import { ReadQR } from './components/readQR/ReadQR';
7
+ import { RetryButton } from './components/retryButton/RetryButton';
8
+ import { Success } from './components/success/Success';
9
+ const DEEP_LINK_PREFIX = 'https://api.gataca.io/qr/redirect.html';
10
10
  //Default values
11
11
  const DEFAULT_SESSION_TIMEOUT = 300; //5mins as in connect
12
12
  const DEFAULT_POLLING_FREQ = 3;
13
13
  export class GatacaQR {
14
- constructor() { 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 = logoGataca; 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; }
14
+ constructor() { 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 = logoGataca; 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; }
15
15
  disconnectedCallback() {
16
16
  this.stop();
17
17
  }
@@ -41,9 +41,7 @@ export class GatacaQR {
41
41
  }
42
42
  else {
43
43
  if (err !== RESULT_STATUS.NOT_STARTED) {
44
- let error = expired
45
- ? new Error(this.userNotScanInTimeErrorLabel)
46
- : new Error(this.credsNotValidatedErrorLabel);
44
+ let error = expired ? new Error(this.userNotScanInTimeErrorLabel) : new Error(this.credsNotValidatedErrorLabel);
47
45
  this.result = err;
48
46
  this.gatacaLoginFailed.emit(error);
49
47
  this.errorCallback(error);
@@ -71,9 +69,7 @@ export class GatacaQR {
71
69
  * Retrieve manually the session data on a successful login
72
70
  */
73
71
  async getSessionData() {
74
- return this.sessionData
75
- ? Promise.resolve(this.sessionData)
76
- : Promise.reject(new Error(this.failedLoginErrorLabel));
72
+ return this.sessionData ? Promise.resolve(this.sessionData) : Promise.reject(new Error(this.failedLoginErrorLabel));
77
73
  }
78
74
  async getSessionId() {
79
75
  if (this.sessionId) {
@@ -85,15 +81,14 @@ export class GatacaQR {
85
81
  return this.sessionId;
86
82
  }
87
83
  getLink() {
88
- if (this.v === "2") {
84
+ if (this.v === '2') {
89
85
  return this.authenticationRequest;
90
86
  }
91
- const authRequestEncoded = "?dl=" + base64UrlEncode(this.authenticationRequest);
87
+ const authRequestEncoded = '?dl=' + base64UrlEncode(this.authenticationRequest);
92
88
  return DEEP_LINK_PREFIX + authRequestEncoded;
93
89
  }
94
90
  async poll() {
95
- let endTime = new Date().getTime() +
96
- (this.sessionTimeout || DEFAULT_SESSION_TIMEOUT) * 1000;
91
+ let endTime = new Date().getTime() + (this.sessionTimeout || DEFAULT_SESSION_TIMEOUT) * 1000;
97
92
  let interval = (this.pollingFrequency || DEFAULT_POLLING_FREQ) * 1000;
98
93
  let checkFunc = async (component) => {
99
94
  if (component.result === RESULT_STATUS.NOT_STARTED) {
@@ -142,40 +137,37 @@ export class GatacaQR {
142
137
  case RESULT_STATUS.READ:
143
138
  return this.renderReadQR({
144
139
  title: this === null || this === void 0 ? void 0 : this.readQrTitle,
145
- description: this === null || this === void 0 ? void 0 : this.readQrDescription,
140
+ description: this === null || this === void 0 ? void 0 : this.readQrDescription
146
141
  });
147
142
  }
148
143
  }
149
144
  renderSuccess() {
150
- return (h(Success, { modalHeight: this === null || this === void 0 ? void 0 : this.modalHeight, successLoginLabel: this === null || this === void 0 ? void 0 : this.successLoginLabel }));
145
+ 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 });
151
146
  }
152
147
  renderRetryButton(errorMessage) {
153
- 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) }));
148
+ 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 }));
154
149
  }
155
150
  renderReadQR(readQrMessages) {
156
- 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) }));
151
+ 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 }));
157
152
  }
158
153
  renderQR(value, useLogo, sizeQR) {
159
- 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 }));
154
+ 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 });
160
155
  }
161
156
  renderRetryQR(value, useLogo) {
162
- 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 }));
157
+ 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 });
163
158
  }
164
159
  render() {
165
- var _a, _b;
166
- return (h("div", { class: "popUpContainer" }, h("div", { class: `is-visible modal-window ${this.hideModalTexts ? "" : "large-modal"} ${this.hideModalBoxShadow ? "noBoxShadow" : ""}`, style: {
167
- width: (this.modalWidth - 2).toString() + "px",
168
- height: this.modalHeight
169
- ? ((_a = (this.modalHeight - 2)) === null || _a === void 0 ? void 0 : _a.toString()) + "px"
170
- : "",
160
+ var _a, _b, _c, _d, _e, _f;
161
+ return (h("div", { class: "popUpContainer" }, h("div", { class: `is-visible modal-window ${this.hideModalTexts ? '' : 'large-modal'} ${this.hideModalBoxShadow ? 'noBoxShadow' : ''}`, style: {
162
+ width: (this.modalWidth - 2).toString() + 'px',
163
+ height: this.modalHeight ? ((_a = (this.modalHeight - 2)) === null || _a === void 0 ? void 0 : _a.toString()) + 'px' : '',
164
+ 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',
165
+ 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);'
171
166
  }, onClick: (event) => {
172
167
  event.stopPropagation();
173
- } }, 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: logoGataca })))), this.result !== RESULT_STATUS.SUCCESS &&
174
- !this.hideQrModalDescription && (h("p", { class: "qrDescription modalText" }, this.qrModalDescription))), h("div", { class: "qrSection", style: {
175
- width: this.modalWidth.toString() + "px",
176
- height: this.modalWidth
177
- ? ((_b = this.modalWidth) === null || _b === void 0 ? void 0 : _b.toString()) + "px"
178
- : "",
168
+ } }, 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: logoGataca })))), this.result !== RESULT_STATUS.SUCCESS && !this.hideQrModalDescription && h("p", { class: "qrDescription modalText" }, this.qrModalDescription)), h("div", { class: "qrSection", style: {
169
+ width: this.modalWidth.toString() + 'px',
170
+ height: this.modalWidth ? ((_f = this.modalWidth) === null || _f === void 0 ? void 0 : _f.toString()) + 'px' : ''
179
171
  } }, this.renderQRSection())))));
180
172
  }
181
173
  static get is() { return "gataca-qr"; }
@@ -196,7 +188,7 @@ export class GatacaQR {
196
188
  "type": "unknown",
197
189
  "mutable": false,
198
190
  "complexType": {
199
- "original": "(\n id?: string\n ) => Promise<{ result: RESULT_STATUS; data?: any }>",
191
+ "original": "(id?: string) => Promise<{result: RESULT_STATUS; data?: any}>",
200
192
  "resolved": "(id?: string) => Promise<{ result: RESULT_STATUS; data?: any; }>",
201
193
  "references": {
202
194
  "Promise": {
@@ -220,7 +212,7 @@ export class GatacaQR {
220
212
  "type": "unknown",
221
213
  "mutable": false,
222
214
  "complexType": {
223
- "original": "() => Promise<{\n sessionId: string;\n authenticationRequest?: string;\n }>",
215
+ "original": "() => Promise<{\n sessionId: string;\n authenticationRequest?: string;\n }>",
224
216
  "resolved": "() => Promise<{ sessionId: string; authenticationRequest?: string; }>",
225
217
  "references": {
226
218
  "Promise": {
@@ -310,7 +302,7 @@ export class GatacaQR {
310
302
  },
311
303
  "attribute": "qr-type",
312
304
  "reflect": false,
313
- "defaultValue": "\"svg\""
305
+ "defaultValue": "'svg'"
314
306
  },
315
307
  "callbackServer": {
316
308
  "type": "string",
@@ -381,7 +373,7 @@ export class GatacaQR {
381
373
  },
382
374
  "attribute": "v",
383
375
  "reflect": false,
384
- "defaultValue": "\"3\""
376
+ "defaultValue": "'3'"
385
377
  },
386
378
  "qrModalTitle": {
387
379
  "type": "string",
@@ -399,7 +391,7 @@ export class GatacaQR {
399
391
  },
400
392
  "attribute": "qr-modal-title",
401
393
  "reflect": false,
402
- "defaultValue": "\"Quick Access\""
394
+ "defaultValue": "'Quick Access'"
403
395
  },
404
396
  "modalTitleColor": {
405
397
  "type": "string",
@@ -417,7 +409,7 @@ export class GatacaQR {
417
409
  },
418
410
  "attribute": "modal-title-color",
419
411
  "reflect": false,
420
- "defaultValue": "\"#4745B7\""
412
+ "defaultValue": "'#4745B7'"
421
413
  },
422
414
  "qrModalDescription": {
423
415
  "type": "string",
@@ -435,7 +427,7 @@ export class GatacaQR {
435
427
  },
436
428
  "attribute": "qr-modal-description",
437
429
  "reflect": false,
438
- "defaultValue": "\"Sign up or sign in by scanning the QR Code with the Gataca Wallet\""
430
+ "defaultValue": "'Sign up or sign in by scanning the QR Code with the Gataca Wallet'"
439
431
  },
440
432
  "hideModalTexts": {
441
433
  "type": "boolean",
@@ -596,7 +588,7 @@ export class GatacaQR {
596
588
  },
597
589
  "attribute": "qr-code-expired-label",
598
590
  "reflect": false,
599
- "defaultValue": "\"QR Code expired\""
591
+ "defaultValue": "'QR Code expired'"
600
592
  },
601
593
  "credentialsNotValidatedLabel": {
602
594
  "type": "string",
@@ -614,7 +606,7 @@ export class GatacaQR {
614
606
  },
615
607
  "attribute": "credentials-not-validated-label",
616
608
  "reflect": false,
617
- "defaultValue": "\"User credentials not validated\""
609
+ "defaultValue": "'User credentials not validated'"
618
610
  },
619
611
  "clickInsideBoxLabel": {
620
612
  "type": "string",
@@ -632,7 +624,7 @@ export class GatacaQR {
632
624
  },
633
625
  "attribute": "click-inside-box-label",
634
626
  "reflect": false,
635
- "defaultValue": "\"Click inside the box to\""
627
+ "defaultValue": "'Click inside the box to'"
636
628
  },
637
629
  "refreshQrLabel": {
638
630
  "type": "string",
@@ -650,7 +642,7 @@ export class GatacaQR {
650
642
  },
651
643
  "attribute": "refresh-qr-label",
652
644
  "reflect": false,
653
- "defaultValue": "\"Refresh QR Code\""
645
+ "defaultValue": "'Refresh QR Code'"
654
646
  },
655
647
  "scanQrLabel": {
656
648
  "type": "string",
@@ -668,7 +660,7 @@ export class GatacaQR {
668
660
  },
669
661
  "attribute": "scan-qr-label",
670
662
  "reflect": false,
671
- "defaultValue": "\"Scan QR Code\""
663
+ "defaultValue": "'Scan QR Code'"
672
664
  },
673
665
  "userNotScanInTimeErrorLabel": {
674
666
  "type": "string",
@@ -686,7 +678,7 @@ export class GatacaQR {
686
678
  },
687
679
  "attribute": "user-not-scan-in-time-error-label",
688
680
  "reflect": false,
689
- "defaultValue": "\"User did not scan the QR in the allowed time\""
681
+ "defaultValue": "'User did not scan the QR in the allowed time'"
690
682
  },
691
683
  "credsNotValidatedErrorLabel": {
692
684
  "type": "string",
@@ -722,7 +714,7 @@ export class GatacaQR {
722
714
  },
723
715
  "attribute": "failed-login-error-label",
724
716
  "reflect": false,
725
- "defaultValue": "\"No successful login\""
717
+ "defaultValue": "'No successful login'"
726
718
  },
727
719
  "successLoginLabel": {
728
720
  "type": "string",
@@ -740,7 +732,7 @@ export class GatacaQR {
740
732
  },
741
733
  "attribute": "success-login-label",
742
734
  "reflect": false,
743
- "defaultValue": "\"Successful Connection!\""
735
+ "defaultValue": "'Successful Connection!'"
744
736
  },
745
737
  "byBrandLabel": {
746
738
  "type": "string",
@@ -758,7 +750,7 @@ export class GatacaQR {
758
750
  },
759
751
  "attribute": "by-brand-label",
760
752
  "reflect": false,
761
- "defaultValue": "\"by Gataca\""
753
+ "defaultValue": "'by Gataca'"
762
754
  },
763
755
  "waitingStartSessionLabel": {
764
756
  "type": "string",
@@ -776,7 +768,7 @@ export class GatacaQR {
776
768
  },
777
769
  "attribute": "waiting-start-session-label",
778
770
  "reflect": false,
779
- "defaultValue": "\"waiting to start a session\""
771
+ "defaultValue": "'waiting to start a session'"
780
772
  },
781
773
  "readQrTitle": {
782
774
  "type": "string",
@@ -794,7 +786,7 @@ export class GatacaQR {
794
786
  },
795
787
  "attribute": "read-qr-title",
796
788
  "reflect": false,
797
- "defaultValue": "\"Processing...\""
789
+ "defaultValue": "'Processing...'"
798
790
  },
799
791
  "readQrDescription": {
800
792
  "type": "string",
@@ -812,7 +804,7 @@ export class GatacaQR {
812
804
  },
813
805
  "attribute": "read-qr-description",
814
806
  "reflect": false,
815
- "defaultValue": "\"Please wait a moment\""
807
+ "defaultValue": "'Please wait a moment'"
816
808
  },
817
809
  "hideQrModalDescription": {
818
810
  "type": "boolean",
@@ -885,6 +877,25 @@ export class GatacaQR {
885
877
  "attribute": "dynamic-link",
886
878
  "reflect": false,
887
879
  "defaultValue": "true"
880
+ },
881
+ "qrStyle": {
882
+ "type": "unknown",
883
+ "mutable": false,
884
+ "complexType": {
885
+ "original": "qrStyle",
886
+ "resolved": "{ color: string; bgColor: string; alertBgColor?: string; alertBorderColor?: string; boxShadow?: string; }",
887
+ "references": {
888
+ "qrStyle": {
889
+ "location": "local"
890
+ }
891
+ }
892
+ },
893
+ "required": false,
894
+ "optional": true,
895
+ "docs": {
896
+ "tags": [],
897
+ "text": "_[Optional]_\nAdjust the color styles of the QR"
898
+ }
888
899
  }
889
900
  };
890
901
  }
@@ -1,14 +1,15 @@
1
- import { h } from "@stencil/core";
2
- import QRCodeStyling from "qr-code-styling";
3
- import logoGataca from "../../assets/images/logo_gataca.svg";
1
+ import { h } from '@stencil/core';
2
+ import QRCodeStyling from 'qr-code-styling';
3
+ import logoGataca from '../../assets/images/logo_gataca.svg';
4
4
  export class GatacaQRDisplay {
5
5
  constructor() {
6
6
  this.qrData = undefined;
7
- this.qrType = "svg";
7
+ this.qrType = 'svg';
8
8
  this.size = 256;
9
9
  this.logoSize = 0;
10
10
  this.logoSrc = undefined;
11
- this.qrColor = "#1E1E20";
11
+ this.qrColor = '#1E1E20';
12
+ this.bgColor = '#FFFFFF';
12
13
  this.rounded = true;
13
14
  }
14
15
  componentDidLoad() {
@@ -21,18 +22,21 @@ export class GatacaQRDisplay {
21
22
  type: this.qrType,
22
23
  dotsOptions: {
23
24
  color: this.qrColor,
24
- type: this.rounded ? "dots" : "square",
25
+ type: this.rounded ? 'dots' : 'square'
25
26
  },
26
27
  cornersSquareOptions: {
27
- type: this.rounded ? "extra-rounded" : "square",
28
+ type: this.rounded ? 'extra-rounded' : 'square'
28
29
  },
29
30
  cornersDotOptions: {
30
- type: this.rounded ? "dot" : "square",
31
+ type: this.rounded ? 'dot' : 'square'
31
32
  },
32
33
  imageOptions: {
33
34
  margin: 2,
34
- imageSize: this.logoSize,
35
+ imageSize: this.logoSize
35
36
  },
37
+ backgroundOptions: {
38
+ color: this.bgColor
39
+ }
36
40
  });
37
41
  qrCode.append(this.qr);
38
42
  }
@@ -82,7 +86,7 @@ export class GatacaQRDisplay {
82
86
  },
83
87
  "attribute": "qr-type",
84
88
  "reflect": false,
85
- "defaultValue": "\"svg\""
89
+ "defaultValue": "'svg'"
86
90
  },
87
91
  "size": {
88
92
  "type": "number",
@@ -153,7 +157,25 @@ export class GatacaQRDisplay {
153
157
  },
154
158
  "attribute": "qr-color",
155
159
  "reflect": false,
156
- "defaultValue": "\"#1E1E20\""
160
+ "defaultValue": "'#1E1E20'"
161
+ },
162
+ "bgColor": {
163
+ "type": "string",
164
+ "mutable": false,
165
+ "complexType": {
166
+ "original": "string",
167
+ "resolved": "string",
168
+ "references": {}
169
+ },
170
+ "required": false,
171
+ "optional": true,
172
+ "docs": {
173
+ "tags": [],
174
+ "text": "_[Optional]_\nQR Color."
175
+ },
176
+ "attribute": "bg-color",
177
+ "reflect": false,
178
+ "defaultValue": "'#FFFFFF'"
157
179
  },
158
180
  "rounded": {
159
181
  "type": "boolean",
@@ -1,5 +1,5 @@
1
- import { h } from "@stencil/core";
1
+ import { h } from '@stencil/core';
2
2
  export const QR = (props) => {
3
3
  const { value, useLogo, logoSrc, size, qrType } = props;
4
- return (h("gataca-qrdisplay", { qrData: value, rounded: true, size: size, qrType: qrType, "logo-size": useLogo ? 0.33 : 0, "logo-src": logoSrc }));
4
+ return h("gataca-qrdisplay", { qrData: value, rounded: true, size: size, qrType: qrType, "logo-size": useLogo ? 0.33 : 0, "logo-src": logoSrc });
5
5
  };
@@ -1,11 +1,11 @@
1
- import { h } from "@stencil/core";
2
- import { AnimatedLoader } from "./components/AnimatedLoader";
1
+ import { h } from '@stencil/core';
2
+ import { AnimatedLoader } from './components/AnimatedLoader';
3
3
  export const ReadQR = (props) => {
4
4
  var _a;
5
5
  const { modalWidth, readQrMessages, renderQR, url, sizeQR } = props;
6
6
  return (h("div", { class: "blured", style: {
7
- width: (modalWidth - 48).toString() + "px",
8
- height: modalWidth ? ((_a = (modalWidth - 48)) === null || _a === void 0 ? void 0 : _a.toString()) + "px" : "",
7
+ width: (modalWidth - 48).toString() + 'px',
8
+ height: modalWidth ? ((_a = (modalWidth - 48)) === null || _a === void 0 ? void 0 : _a.toString()) + 'px' : ''
9
9
  } }, h("div", { id: "notify" }, h(AnimatedLoader, null), h("p", { class: "notify-text" }, readQrMessages === null || readQrMessages === void 0 ? void 0 :
10
10
  readQrMessages.title, " "), h("p", { class: "notify-text bold" }, readQrMessages === null || readQrMessages === void 0 ? void 0 : readQrMessages.description)), h("div", { id: "qrwait" }, renderQR(url, false, sizeQR))));
11
11
  };