@gataca/qr 3.0.10 → 4.0.0

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 (83) hide show
  1. package/dist/{esm/qr-code-styling-0eeb38d5.js → cjs/gat-icon-check-c88a30ed.js} +15 -1
  2. package/dist/cjs/gataca-autoqr.cjs.entry.js +9 -9
  3. package/dist/cjs/gataca-qr_3.cjs.entry.js +620 -0
  4. package/dist/cjs/gataca-qrws.cjs.entry.js +39 -47
  5. package/dist/cjs/gataca-ssibuttonws.cjs.entry.js +61 -0
  6. package/dist/cjs/gatacaqr.cjs.js +1 -1
  7. package/dist/cjs/index.cjs.js +1 -1
  8. package/dist/cjs/loader.cjs.js +1 -1
  9. package/dist/cjs/{utils-ef28b844.js → utils-b4e62bc0.js} +1 -1
  10. package/dist/collection/components/gataca-autoqr/gataca-autoqr.js +13 -13
  11. package/dist/collection/components/gataca-qr/components/qr/QR.js +3 -3
  12. package/dist/collection/components/gataca-qr/components/readQR/ReadQR.js +7 -5
  13. package/dist/collection/components/gataca-qr/components/readQR/components/AnimatedLoader.js +1 -1
  14. package/dist/collection/components/gataca-qr/components/retryButton/RetryButton.js +8 -8
  15. package/dist/collection/components/gataca-qr/components/success/Success.js +4 -4
  16. package/dist/collection/components/gataca-qr/gataca-qr.js +64 -55
  17. package/dist/collection/components/gataca-qrdisplay/gataca-qrdisplay.js +33 -11
  18. package/dist/collection/components/gataca-qrws/components/qr/QR.js +2 -2
  19. package/dist/collection/components/gataca-qrws/components/readQR/ReadQR.js +4 -4
  20. package/dist/collection/components/gataca-qrws/components/readQR/components/AnimatedLoader.js +1 -1
  21. package/dist/collection/components/gataca-qrws/components/retryButton/RetryButton.js +8 -8
  22. package/dist/collection/components/gataca-qrws/components/success/Success.js +4 -4
  23. package/dist/collection/components/gataca-qrws/gataca-qrws.js +49 -56
  24. package/dist/collection/components/gataca-ssibutton/gataca-ssibutton.js +224 -54
  25. package/dist/collection/components/gataca-ssibuttonws/gataca-ssibuttonws.js +12 -12
  26. package/dist/collection/index.js +2 -2
  27. package/dist/collection/utils/index.js +1 -1
  28. package/dist/collection/utils/utils.js +1 -1
  29. package/dist/components/{gat-icon-alert.js → gat-icon-check.js} +4 -4
  30. package/dist/components/gataca-autoqr.js +9 -9
  31. package/dist/components/gataca-qr2.js +56 -63
  32. package/dist/components/gataca-qrdisplay2.js +11 -6
  33. package/dist/components/gataca-qrws2.js +35 -42
  34. package/dist/components/gataca-ssibutton2.js +114 -34
  35. package/dist/components/gataca-ssibuttonws2.js +6 -6
  36. package/dist/components/index.js +1 -1
  37. package/dist/{cjs/qr-code-styling-412bbc7a.js → esm/gat-icon-check-c188cd29.js} +8 -2
  38. package/dist/esm/gataca-autoqr.entry.js +9 -9
  39. package/dist/esm/gataca-qr_3.entry.js +614 -0
  40. package/dist/esm/gataca-qrws.entry.js +36 -44
  41. package/dist/esm/gataca-ssibuttonws.entry.js +57 -0
  42. package/dist/esm/gatacaqr.js +1 -1
  43. package/dist/esm/index.js +1 -1
  44. package/dist/esm/loader.js +1 -1
  45. package/dist/esm/{utils-63e7a33b.js → utils-21ffcc1e.js} +1 -1
  46. package/dist/gatacaqr/gatacaqr.esm.js +1 -1
  47. package/dist/gatacaqr/index.esm.js +1 -1
  48. package/dist/gatacaqr/p-5be73956.js +1 -0
  49. package/dist/gatacaqr/p-948e7d94.entry.js +1 -0
  50. package/dist/gatacaqr/p-e94e9be8.entry.js +1 -0
  51. package/dist/gatacaqr/p-fb41fad9.entry.js +1 -0
  52. package/dist/types/components/gataca-autoqr/gataca-autoqr.d.ts +7 -7
  53. package/dist/types/components/gataca-qr/components/qr/QR.d.ts +4 -2
  54. package/dist/types/components/gataca-qr/components/readQR/ReadQR.d.ts +3 -1
  55. package/dist/types/components/gataca-qr/components/readQR/components/AnimatedLoader.d.ts +1 -1
  56. package/dist/types/components/gataca-qr/components/retryButton/RetryButton.d.ts +1 -1
  57. package/dist/types/components/gataca-qr/components/success/Success.d.ts +1 -1
  58. package/dist/types/components/gataca-qr/gataca-qr.d.ts +13 -4
  59. package/dist/types/components/gataca-qrdisplay/gataca-qrdisplay.d.ts +6 -1
  60. package/dist/types/components/gataca-qrws/components/qr/QR.d.ts +2 -2
  61. package/dist/types/components/gataca-qrws/components/readQR/ReadQR.d.ts +1 -1
  62. package/dist/types/components/gataca-qrws/components/readQR/components/AnimatedLoader.d.ts +1 -1
  63. package/dist/types/components/gataca-qrws/components/retryButton/RetryButton.d.ts +1 -1
  64. package/dist/types/components/gataca-qrws/components/success/Success.d.ts +1 -1
  65. package/dist/types/components/gataca-qrws/gataca-qrws.d.ts +4 -4
  66. package/dist/types/components/gataca-ssibutton/gataca-ssibutton.d.ts +38 -5
  67. package/dist/types/components/gataca-ssibuttonws/gataca-ssibuttonws.d.ts +3 -3
  68. package/dist/types/components.d.ts +78 -36
  69. package/dist/types/index.d.ts +2 -2
  70. package/dist/types/utils/index.d.ts +1 -1
  71. package/package.json +30 -7
  72. package/dist/cjs/gat-icon-alert-0ad19b26.js +0 -14
  73. package/dist/cjs/gataca-qr_2.cjs.entry.js +0 -295
  74. package/dist/cjs/gataca-ssibutton_2.cjs.entry.js +0 -317
  75. package/dist/esm/gat-icon-alert-7b06ef3a.js +0 -9
  76. package/dist/esm/gataca-qr_2.entry.js +0 -290
  77. package/dist/esm/gataca-ssibutton_2.entry.js +0 -312
  78. package/dist/gatacaqr/p-0be4566d.js +0 -1
  79. package/dist/gatacaqr/p-3500ae66.entry.js +0 -1
  80. package/dist/gatacaqr/p-68272823.entry.js +0 -1
  81. package/dist/gatacaqr/p-92a2e6f0.entry.js +0 -1
  82. package/dist/gatacaqr/p-ea783014.js +0 -1
  83. /package/dist/gatacaqr/{p-2cd7b062.js → p-bce7e590.js} +0 -0
@@ -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,35 @@ 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 });
151
146
  }
152
147
  renderRetryButton(errorMessage) {
153
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) }));
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) });
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
160
  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
- : "",
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' : ''
171
164
  }, onClick: (event) => {
172
165
  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
- : "",
166
+ } }, 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: {
167
+ width: this.modalWidth.toString() + 'px',
168
+ height: this.modalWidth ? ((_b = this.modalWidth) === null || _b === void 0 ? void 0 : _b.toString()) + 'px' : ''
179
169
  } }, this.renderQRSection())))));
180
170
  }
181
171
  static get is() { return "gataca-qr"; }
@@ -196,7 +186,7 @@ export class GatacaQR {
196
186
  "type": "unknown",
197
187
  "mutable": false,
198
188
  "complexType": {
199
- "original": "(\n id?: string\n ) => Promise<{ result: RESULT_STATUS; data?: any }>",
189
+ "original": "(id?: string) => Promise<{result: RESULT_STATUS; data?: any}>",
200
190
  "resolved": "(id?: string) => Promise<{ result: RESULT_STATUS; data?: any; }>",
201
191
  "references": {
202
192
  "Promise": {
@@ -220,7 +210,7 @@ export class GatacaQR {
220
210
  "type": "unknown",
221
211
  "mutable": false,
222
212
  "complexType": {
223
- "original": "() => Promise<{\n sessionId: string;\n authenticationRequest?: string;\n }>",
213
+ "original": "() => Promise<{\n sessionId: string;\n authenticationRequest?: string;\n }>",
224
214
  "resolved": "() => Promise<{ sessionId: string; authenticationRequest?: string; }>",
225
215
  "references": {
226
216
  "Promise": {
@@ -310,7 +300,7 @@ export class GatacaQR {
310
300
  },
311
301
  "attribute": "qr-type",
312
302
  "reflect": false,
313
- "defaultValue": "\"svg\""
303
+ "defaultValue": "'svg'"
314
304
  },
315
305
  "callbackServer": {
316
306
  "type": "string",
@@ -381,7 +371,7 @@ export class GatacaQR {
381
371
  },
382
372
  "attribute": "v",
383
373
  "reflect": false,
384
- "defaultValue": "\"3\""
374
+ "defaultValue": "'3'"
385
375
  },
386
376
  "qrModalTitle": {
387
377
  "type": "string",
@@ -399,7 +389,7 @@ export class GatacaQR {
399
389
  },
400
390
  "attribute": "qr-modal-title",
401
391
  "reflect": false,
402
- "defaultValue": "\"Quick Access\""
392
+ "defaultValue": "'Quick Access'"
403
393
  },
404
394
  "modalTitleColor": {
405
395
  "type": "string",
@@ -417,7 +407,7 @@ export class GatacaQR {
417
407
  },
418
408
  "attribute": "modal-title-color",
419
409
  "reflect": false,
420
- "defaultValue": "\"#4745B7\""
410
+ "defaultValue": "'#4745B7'"
421
411
  },
422
412
  "qrModalDescription": {
423
413
  "type": "string",
@@ -435,7 +425,7 @@ export class GatacaQR {
435
425
  },
436
426
  "attribute": "qr-modal-description",
437
427
  "reflect": false,
438
- "defaultValue": "\"Sign up or sign in by scanning the QR Code with the Gataca Wallet\""
428
+ "defaultValue": "'Sign up or sign in by scanning the QR Code with the Gataca Wallet'"
439
429
  },
440
430
  "hideModalTexts": {
441
431
  "type": "boolean",
@@ -596,7 +586,7 @@ export class GatacaQR {
596
586
  },
597
587
  "attribute": "qr-code-expired-label",
598
588
  "reflect": false,
599
- "defaultValue": "\"QR Code expired\""
589
+ "defaultValue": "'QR Code expired'"
600
590
  },
601
591
  "credentialsNotValidatedLabel": {
602
592
  "type": "string",
@@ -614,7 +604,7 @@ export class GatacaQR {
614
604
  },
615
605
  "attribute": "credentials-not-validated-label",
616
606
  "reflect": false,
617
- "defaultValue": "\"User credentials not validated\""
607
+ "defaultValue": "'User credentials not validated'"
618
608
  },
619
609
  "clickInsideBoxLabel": {
620
610
  "type": "string",
@@ -632,7 +622,7 @@ export class GatacaQR {
632
622
  },
633
623
  "attribute": "click-inside-box-label",
634
624
  "reflect": false,
635
- "defaultValue": "\"Click inside the box to\""
625
+ "defaultValue": "'Click inside the box to'"
636
626
  },
637
627
  "refreshQrLabel": {
638
628
  "type": "string",
@@ -650,7 +640,7 @@ export class GatacaQR {
650
640
  },
651
641
  "attribute": "refresh-qr-label",
652
642
  "reflect": false,
653
- "defaultValue": "\"Refresh QR Code\""
643
+ "defaultValue": "'Refresh QR Code'"
654
644
  },
655
645
  "scanQrLabel": {
656
646
  "type": "string",
@@ -668,7 +658,7 @@ export class GatacaQR {
668
658
  },
669
659
  "attribute": "scan-qr-label",
670
660
  "reflect": false,
671
- "defaultValue": "\"Scan QR Code\""
661
+ "defaultValue": "'Scan QR Code'"
672
662
  },
673
663
  "userNotScanInTimeErrorLabel": {
674
664
  "type": "string",
@@ -686,7 +676,7 @@ export class GatacaQR {
686
676
  },
687
677
  "attribute": "user-not-scan-in-time-error-label",
688
678
  "reflect": false,
689
- "defaultValue": "\"User did not scan the QR in the allowed time\""
679
+ "defaultValue": "'User did not scan the QR in the allowed time'"
690
680
  },
691
681
  "credsNotValidatedErrorLabel": {
692
682
  "type": "string",
@@ -722,7 +712,7 @@ export class GatacaQR {
722
712
  },
723
713
  "attribute": "failed-login-error-label",
724
714
  "reflect": false,
725
- "defaultValue": "\"No successful login\""
715
+ "defaultValue": "'No successful login'"
726
716
  },
727
717
  "successLoginLabel": {
728
718
  "type": "string",
@@ -740,7 +730,7 @@ export class GatacaQR {
740
730
  },
741
731
  "attribute": "success-login-label",
742
732
  "reflect": false,
743
- "defaultValue": "\"Successful Connection!\""
733
+ "defaultValue": "'Successful Connection!'"
744
734
  },
745
735
  "byBrandLabel": {
746
736
  "type": "string",
@@ -758,7 +748,7 @@ export class GatacaQR {
758
748
  },
759
749
  "attribute": "by-brand-label",
760
750
  "reflect": false,
761
- "defaultValue": "\"by Gataca\""
751
+ "defaultValue": "'by Gataca'"
762
752
  },
763
753
  "waitingStartSessionLabel": {
764
754
  "type": "string",
@@ -776,7 +766,7 @@ export class GatacaQR {
776
766
  },
777
767
  "attribute": "waiting-start-session-label",
778
768
  "reflect": false,
779
- "defaultValue": "\"waiting to start a session\""
769
+ "defaultValue": "'waiting to start a session'"
780
770
  },
781
771
  "readQrTitle": {
782
772
  "type": "string",
@@ -794,7 +784,7 @@ export class GatacaQR {
794
784
  },
795
785
  "attribute": "read-qr-title",
796
786
  "reflect": false,
797
- "defaultValue": "\"Processing...\""
787
+ "defaultValue": "'Processing...'"
798
788
  },
799
789
  "readQrDescription": {
800
790
  "type": "string",
@@ -812,7 +802,7 @@ export class GatacaQR {
812
802
  },
813
803
  "attribute": "read-qr-description",
814
804
  "reflect": false,
815
- "defaultValue": "\"Please wait a moment\""
805
+ "defaultValue": "'Please wait a moment'"
816
806
  },
817
807
  "hideQrModalDescription": {
818
808
  "type": "boolean",
@@ -885,6 +875,25 @@ export class GatacaQR {
885
875
  "attribute": "dynamic-link",
886
876
  "reflect": false,
887
877
  "defaultValue": "true"
878
+ },
879
+ "qrStyle": {
880
+ "type": "unknown",
881
+ "mutable": false,
882
+ "complexType": {
883
+ "original": "qrStyle",
884
+ "resolved": "{ color: string; bgColor: string; }",
885
+ "references": {
886
+ "qrStyle": {
887
+ "location": "local"
888
+ }
889
+ }
890
+ },
891
+ "required": false,
892
+ "optional": true,
893
+ "docs": {
894
+ "tags": [],
895
+ "text": "_[Optional]_\nAdjust the color styles of the QR"
896
+ }
888
897
  }
889
898
  };
890
899
  }
@@ -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
  };
@@ -1,4 +1,4 @@
1
- import { h } from "@stencil/core";
1
+ import { h } from '@stencil/core';
2
2
  export const AnimatedLoader = () => {
3
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" }))));
4
4
  };
@@ -1,13 +1,13 @@
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 refreshIcon from '../../../../assets/icons/gat-icon-refresh.svg';
3
+ import alertIcon from '../../../../assets/icons/gat-icon-alert.svg';
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, display, renderRetryQR } = props;
7
7
  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",
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
12
  } }, h("img", { src: alertIcon, height: 24, width: 24 }), h("p", null, errorMessage)))), h("div", { id: "qrwait" }, renderRetryQR(waitingStartSessionLabel))));
13
13
  };
@@ -1,8 +1,8 @@
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
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",
5
+ return (h("div", { class: 'success', style: {
6
+ height: modalHeight ? (modalHeight === null || modalHeight === void 0 ? void 0 : modalHeight.toString()) + 'px' : '300px'
7
7
  } }, h("img", { src: successIcon, height: 52, width: 52 }), h("p", { class: "successMsg" }, successLoginLabel)));
8
8
  };