@gataca/qr 0.0.20 → 0.0.22

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 (49) hide show
  1. package/dist/cjs/gataca-autoqr.cjs.entry.js +6 -5
  2. package/dist/cjs/gataca-qr_2.cjs.entry.js +13 -36
  3. package/dist/cjs/gataca-qrws.cjs.entry.js +6 -6
  4. package/dist/cjs/gataca-ssibutton_2.cjs.entry.js +5 -8
  5. package/dist/cjs/gatacaqr.cjs.js +2 -2
  6. package/dist/cjs/{index-8638645b.js → index-93d47a75.js} +0 -13
  7. package/dist/cjs/loader.cjs.js +2 -2
  8. package/dist/collection/components/gataca-autoqr/gataca-autoqr.js +28 -4
  9. package/dist/collection/components/gataca-qr/components/qr/QR.js +2 -2
  10. package/dist/collection/components/gataca-qr/gataca-qr.js +25 -38
  11. package/dist/collection/components/gataca-qrdisplay/gataca-qrdisplay.js +22 -20
  12. package/dist/collection/components/gataca-qrws/components/qr/QR.js +2 -2
  13. package/dist/collection/components/gataca-qrws/gataca-qrws.js +26 -3
  14. package/dist/collection/components/gataca-ssibutton/gataca-ssibutton.js +19 -17
  15. package/dist/collection/components/gataca-ssibuttonws/gataca-ssibuttonws.js +25 -1
  16. package/dist/components/gataca-autoqr.js +6 -4
  17. package/dist/components/gataca-qr2.js +10 -29
  18. package/dist/components/gataca-qrdisplay2.js +5 -9
  19. package/dist/components/gataca-qrws2.js +6 -5
  20. package/dist/components/gataca-ssibutton2.js +3 -7
  21. package/dist/components/gataca-ssibuttonws2.js +3 -1
  22. package/dist/esm/gataca-autoqr.entry.js +6 -5
  23. package/dist/esm/gataca-qr_2.entry.js +13 -36
  24. package/dist/esm/gataca-qrws.entry.js +6 -6
  25. package/dist/esm/gataca-ssibutton_2.entry.js +5 -8
  26. package/dist/esm/gatacaqr.js +2 -2
  27. package/dist/esm/{index-af2994f7.js → index-2be54f32.js} +1 -13
  28. package/dist/esm/loader.js +2 -2
  29. package/dist/gatacaqr/gatacaqr.esm.js +1 -1
  30. package/dist/gatacaqr/p-5ae5f952.js +2 -0
  31. package/dist/gatacaqr/p-5e81ab9e.entry.js +1 -0
  32. package/dist/gatacaqr/p-92a2e6f0.entry.js +1 -0
  33. package/dist/gatacaqr/p-9af5d2fe.entry.js +1 -0
  34. package/dist/gatacaqr/p-dc592fa5.entry.js +1 -0
  35. package/dist/types/components/gataca-autoqr/gataca-autoqr.d.ts +6 -0
  36. package/dist/types/components/gataca-qr/components/qr/QR.d.ts +2 -1
  37. package/dist/types/components/gataca-qr/gataca-qr.d.ts +6 -5
  38. package/dist/types/components/gataca-qrdisplay/gataca-qrdisplay.d.ts +6 -5
  39. package/dist/types/components/gataca-qrws/components/qr/QR.d.ts +2 -0
  40. package/dist/types/components/gataca-qrws/gataca-qrws.d.ts +6 -0
  41. package/dist/types/components/gataca-ssibutton/gataca-ssibutton.d.ts +5 -4
  42. package/dist/types/components/gataca-ssibuttonws/gataca-ssibuttonws.d.ts +6 -0
  43. package/dist/types/components.d.ts +45 -20
  44. package/package.json +1 -1
  45. package/dist/gatacaqr/p-3ca3bb1a.entry.js +0 -1
  46. package/dist/gatacaqr/p-49424123.entry.js +0 -1
  47. package/dist/gatacaqr/p-88af482f.entry.js +0 -1
  48. package/dist/gatacaqr/p-ba0417e2.js +0 -2
  49. package/dist/gatacaqr/p-d59ae0ab.entry.js +0 -1
@@ -1,4 +1,4 @@
1
- import { forceUpdate, h, } from "@stencil/core";
1
+ import { h, } from "@stencil/core";
2
2
  import logoGataca from "../../assets/images/logo_gataca.svg";
3
3
  import "../gataca-qrdisplay/gataca-qrdisplay";
4
4
  import { base64UrlEncode, checkMobile, RESULT_STATUS } from "../../utils/utils";
@@ -11,7 +11,7 @@ const DEEP_LINK_PREFIX = "https://api.gataca.io/qr/redirect.html";
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.qrId = undefined; this.qrRole = undefined; 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.sessionId = undefined; this.authenticationRequest = undefined; this.sessionData = undefined; this.result = RESULT_STATUS.NOT_STARTED; }
15
15
  disconnectedCallback() {
16
16
  this.stop();
17
17
  }
@@ -26,15 +26,9 @@ export class GatacaQR {
26
26
  async display() {
27
27
  await this.getSessionId();
28
28
  this.result = RESULT_STATUS.ONGOING;
29
- console.log("display0", "this.result", this.result);
30
- forceUpdate(this);
31
- console.log("display1", "this.result", this.result);
32
29
  this.poll()
33
30
  .then((data) => {
34
31
  this.result = RESULT_STATUS.SUCCESS;
35
- console.log("display2", "this.result", this.result);
36
- forceUpdate(this);
37
- console.log("display3", "this.result", this.result);
38
32
  this.sessionData = data;
39
33
  this.gatacaLoginCompleted.emit(data);
40
34
  this.successCallback(data);
@@ -51,9 +45,6 @@ export class GatacaQR {
51
45
  ? new Error(this.userNotScanInTimeErrorLabel)
52
46
  : new Error(this.credsNotValidatedErrorLabel);
53
47
  this.result = err;
54
- console.log("display4", "this.result", this.result);
55
- forceUpdate(this);
56
- console.log("display5", "this.result", this.result);
57
48
  this.gatacaLoginFailed.emit(error);
58
49
  this.errorCallback(error);
59
50
  }
@@ -88,14 +79,9 @@ export class GatacaQR {
88
79
  if (this.sessionId) {
89
80
  return this.sessionId;
90
81
  }
91
- // console.log("111 getSessionId", "this.sessionId", this.sessionId);
92
- if (this.createSession) {
93
- let { sessionId, authenticationRequest } = await this.createSession();
94
- // console.log("222 getSessionId", "sessionId", sessionId);
95
- this.sessionId = sessionId;
96
- this.authenticationRequest = authenticationRequest;
97
- }
98
- // console.log("333 getSessionId", "this.sessionId", this.sessionId);
82
+ let { sessionId, authenticationRequest } = await this.createSession();
83
+ this.sessionId = sessionId;
84
+ this.authenticationRequest = authenticationRequest;
99
85
  return this.sessionId;
100
86
  }
101
87
  getLink() {
@@ -142,7 +128,6 @@ export class GatacaQR {
142
128
  return new Promise(checkCondition);
143
129
  }
144
130
  renderQRSection() {
145
- console.log("renderQRSection", "this.result", this.result);
146
131
  switch (this.result) {
147
132
  case RESULT_STATUS.NOT_STARTED:
148
133
  return this.renderRetryButton();
@@ -162,23 +147,19 @@ export class GatacaQR {
162
147
  }
163
148
  }
164
149
  renderSuccess() {
165
- console.log("renderSuccess", "this.result", this.result);
166
150
  return (h(Success, { modalHeight: this === null || this === void 0 ? void 0 : this.modalHeight, successLoginLabel: this === null || this === void 0 ? void 0 : this.successLoginLabel }));
167
151
  }
168
152
  renderRetryButton(errorMessage) {
169
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) }));
170
154
  }
171
155
  renderReadQR(readQrMessages) {
172
- console.log("renderReadQR", readQrMessages);
173
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) }));
174
157
  }
175
158
  renderQR(value, useLogo) {
176
- console.log("renderQR", value, useLogo);
177
- return (h(QR, { qrId: this.qrId, value: value, useLogo: useLogo, size: (this === null || this === void 0 ? void 0 : this.qrSize) || undefined, logoSrc: this === null || this === void 0 ? void 0 : this.logoSrc }));
159
+ return (h(QR, { value: value, qrType: this.qrType, useLogo: useLogo, size: (this === null || this === void 0 ? void 0 : this.qrSize) || undefined, logoSrc: this === null || this === void 0 ? void 0 : this.logoSrc }));
178
160
  }
179
161
  renderRetryQR(value, useLogo) {
180
- // console.log("this.qrId", this.qrId);
181
- return (h(QR, { qrId: this.qrId, value: value, useLogo: useLogo, size: (this === null || this === void 0 ? void 0 : this.qrSize) ? (this === null || this === void 0 ? void 0 : this.qrSize) - 50 : undefined, logoSrc: this === null || this === void 0 ? void 0 : this.logoSrc }));
162
+ return (h(QR, { value: value, useLogo: useLogo, qrType: this.qrType, size: (this === null || this === void 0 ? void 0 : this.qrSize) ? (this === null || this === void 0 ? void 0 : this.qrSize) - 50 : undefined, logoSrc: this === null || this === void 0 ? void 0 : this.logoSrc }));
182
163
  }
183
164
  render() {
184
165
  var _a, _b;
@@ -291,7 +272,7 @@ export class GatacaQR {
291
272
  },
292
273
  "defaultValue": "undefined"
293
274
  },
294
- "qrId": {
275
+ "qrRole": {
295
276
  "type": "string",
296
277
  "mutable": false,
297
278
  "complexType": {
@@ -300,30 +281,36 @@ export class GatacaQR {
300
281
  "references": {}
301
282
  },
302
283
  "required": false,
303
- "optional": true,
284
+ "optional": false,
304
285
  "docs": {
305
286
  "tags": [],
306
- "text": "_[Optional]_\nUnique identificator for html tag"
287
+ "text": "***Mandatory just for V1***\nDecide if scanning the credential as a verifier to request credentials\nor as an issuer too issue credentials.\nOptions: connect | certify"
307
288
  },
308
- "attribute": "qr-id",
289
+ "attribute": "qr-role",
309
290
  "reflect": false
310
291
  },
311
- "qrRole": {
292
+ "qrType": {
312
293
  "type": "string",
313
294
  "mutable": false,
314
295
  "complexType": {
315
- "original": "string",
316
- "resolved": "string",
317
- "references": {}
296
+ "original": "DrawType",
297
+ "resolved": "\"canvas\" | \"svg\"",
298
+ "references": {
299
+ "DrawType": {
300
+ "location": "import",
301
+ "path": "qr-code-styling"
302
+ }
303
+ }
318
304
  },
319
305
  "required": false,
320
- "optional": false,
306
+ "optional": true,
321
307
  "docs": {
322
308
  "tags": [],
323
- "text": "***Mandatory just for V1***\nDecide if scanning the credential as a verifier to request credentials\nor as an issuer too issue credentials.\nOptions: connect | certify"
309
+ "text": "_[Optional]_\nSets the qr type. It can be \"svg\" or \"canvas\". \"svg\" by default."
324
310
  },
325
- "attribute": "qr-role",
326
- "reflect": false
311
+ "attribute": "qr-type",
312
+ "reflect": false,
313
+ "defaultValue": "\"svg\""
327
314
  },
328
315
  "callbackServer": {
329
316
  "type": "string",
@@ -3,8 +3,8 @@ import QRCodeStyling from "qr-code-styling";
3
3
  import logoGataca from "../../assets/images/logo_gataca.svg";
4
4
  export class GatacaQRDisplay {
5
5
  constructor() {
6
- this.qrId = undefined;
7
6
  this.qrData = undefined;
7
+ this.qrType = "svg";
8
8
  this.size = 256;
9
9
  this.logoSize = 0;
10
10
  this.logoSrc = undefined;
@@ -18,7 +18,7 @@ export class GatacaQRDisplay {
18
18
  height: this.size,
19
19
  image: this.logoSize > 0 ? this.logoSrc || logoGataca : undefined,
20
20
  margin: 10,
21
- type: "canvas",
21
+ type: this.qrType,
22
22
  dotsOptions: {
23
23
  color: this.qrColor,
24
24
  type: this.rounded ? "dots" : "square",
@@ -34,21 +34,17 @@ export class GatacaQRDisplay {
34
34
  imageSize: this.logoSize,
35
35
  },
36
36
  });
37
- this.qr.id = this.qrId;
38
37
  qrCode.append(this.qr);
39
38
  }
40
39
  render() {
41
- return (h("div", {
42
- // id={this.qrId}
43
- ref: (el) => {
40
+ return (h("div", { ref: (el) => {
44
41
  this.qr = el;
45
- }
46
- }));
42
+ } }));
47
43
  }
48
44
  static get is() { return "gataca-qrdisplay"; }
49
45
  static get properties() {
50
46
  return {
51
- "qrId": {
47
+ "qrData": {
52
48
  "type": "string",
53
49
  "mutable": false,
54
50
  "complexType": {
@@ -57,30 +53,36 @@ export class GatacaQRDisplay {
57
53
  "references": {}
58
54
  },
59
55
  "required": false,
60
- "optional": true,
56
+ "optional": false,
61
57
  "docs": {
62
58
  "tags": [],
63
- "text": "_[Optional]_\nUnique identificator for html tag"
59
+ "text": "_[Mandatory]_\nSets the contents of the QR"
64
60
  },
65
- "attribute": "qr-id",
61
+ "attribute": "qr-data",
66
62
  "reflect": false
67
63
  },
68
- "qrData": {
64
+ "qrType": {
69
65
  "type": "string",
70
66
  "mutable": false,
71
67
  "complexType": {
72
- "original": "string",
73
- "resolved": "string",
74
- "references": {}
68
+ "original": "DrawType",
69
+ "resolved": "\"canvas\" | \"svg\"",
70
+ "references": {
71
+ "DrawType": {
72
+ "location": "import",
73
+ "path": "qr-code-styling"
74
+ }
75
+ }
75
76
  },
76
77
  "required": false,
77
- "optional": false,
78
+ "optional": true,
78
79
  "docs": {
79
80
  "tags": [],
80
- "text": "_[Mandatory]_\nSets the contents of the QR"
81
+ "text": "_[Optional]_\nSets the qr type. It can be \"svg\" or \"canvas\". \"svg\" by default."
81
82
  },
82
- "attribute": "qr-data",
83
- "reflect": false
83
+ "attribute": "qr-type",
84
+ "reflect": false,
85
+ "defaultValue": "\"svg\""
84
86
  },
85
87
  "size": {
86
88
  "type": "number",
@@ -1,5 +1,5 @@
1
1
  import { h } from "@stencil/core";
2
2
  export const QR = (props) => {
3
- const { value, useLogo, logoSrc, size } = props;
4
- return (h("gataca-qrdisplay", { qrData: value, rounded: true, size: size, "logo-size": useLogo ? 0.33 : 0, "logo-src": logoSrc }));
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 }));
5
5
  };
@@ -10,7 +10,7 @@ const DEEP_LINK_PREFIX = "https://api.gataca.io/qr/redirect.html";
10
10
  const DEFAULT_SESSION_TIMEOUT = 300;
11
11
  const QR_ROLE_CONNECT = "connect";
12
12
  export class GatacaQRWS {
13
- constructor() { this.successCallback = undefined; this.errorCallback = undefined; this.qrRole = undefined; this.callbackServer = undefined; this.socketEndpoint = undefined; this.sessionTimeout = DEFAULT_SESSION_TIMEOUT; this.wsOnOpen = undefined; this.wsOnMessage = undefined; this.autostart = true; this.autorefresh = false; this.v = "3"; this.qrModalTitle = "Quick Access"; this.modalTitleColor = "#4745B7"; this.qrModalDescription = "Sign up or sign in by scanning the QR Code with the Gataca Wallet"; this.hideModalTexts = false; this.hideModalBoxShadow = false; this.hideBrandTitle = false; this.logoSize = 0; this.logoSrc = 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.dynamicLink = true; this.sessionId = undefined; this.authenticationRequest = undefined; this.sessionData = undefined; this.result = RESULT_STATUS.NOT_STARTED; }
13
+ constructor() { this.successCallback = undefined; this.errorCallback = undefined; this.qrRole = undefined; this.qrType = "svg"; this.callbackServer = undefined; this.socketEndpoint = undefined; this.sessionTimeout = DEFAULT_SESSION_TIMEOUT; this.wsOnOpen = undefined; this.wsOnMessage = undefined; this.autostart = true; this.autorefresh = false; this.v = "3"; this.qrModalTitle = "Quick Access"; this.modalTitleColor = "#4745B7"; this.qrModalDescription = "Sign up or sign in by scanning the QR Code with the Gataca Wallet"; this.hideModalTexts = false; this.hideModalBoxShadow = false; this.hideBrandTitle = false; this.logoSize = 0; this.logoSrc = 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.dynamicLink = true; this.sessionId = undefined; this.authenticationRequest = undefined; this.sessionData = undefined; this.result = RESULT_STATUS.NOT_STARTED; }
14
14
  disconnectedCallback() {
15
15
  this.stop();
16
16
  }
@@ -157,10 +157,10 @@ export class GatacaQRWS {
157
157
  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) }));
158
158
  }
159
159
  renderQR(value, useLogo) {
160
- return (h(QR, { value: value, useLogo: useLogo, size: (this === null || this === void 0 ? void 0 : this.qrSize) || undefined, logoSrc: this === null || this === void 0 ? void 0 : this.logoSrc }));
160
+ return (h(QR, { value: value, qrType: this.qrType, useLogo: useLogo, size: (this === null || this === void 0 ? void 0 : this.qrSize) || undefined, logoSrc: this === null || this === void 0 ? void 0 : this.logoSrc }));
161
161
  }
162
162
  renderRetryQR(value, useLogo) {
163
- return (h(QR, { value: value, useLogo: useLogo, size: (this === null || this === void 0 ? void 0 : this.qrSize) ? (this === null || this === void 0 ? void 0 : this.qrSize) - 50 : undefined, logoSrc: this === null || this === void 0 ? void 0 : this.logoSrc }));
163
+ return (h(QR, { value: value, qrType: this.qrType, useLogo: useLogo, size: (this === null || this === void 0 ? void 0 : this.qrSize) ? (this === null || this === void 0 ? void 0 : this.qrSize) - 50 : undefined, logoSrc: this === null || this === void 0 ? void 0 : this.logoSrc }));
164
164
  }
165
165
  render() {
166
166
  var _a, _b;
@@ -246,6 +246,29 @@ export class GatacaQRWS {
246
246
  "attribute": "qr-role",
247
247
  "reflect": false
248
248
  },
249
+ "qrType": {
250
+ "type": "string",
251
+ "mutable": false,
252
+ "complexType": {
253
+ "original": "DrawType",
254
+ "resolved": "\"canvas\" | \"svg\"",
255
+ "references": {
256
+ "DrawType": {
257
+ "location": "import",
258
+ "path": "qr-code-styling"
259
+ }
260
+ }
261
+ },
262
+ "required": false,
263
+ "optional": true,
264
+ "docs": {
265
+ "tags": [],
266
+ "text": "_[Optional]_\nSets the qr type. It can be \"svg\" or \"canvas\". \"svg\" by default."
267
+ },
268
+ "attribute": "qr-type",
269
+ "reflect": false,
270
+ "defaultValue": "\"svg\""
271
+ },
249
272
  "callbackServer": {
250
273
  "type": "string",
251
274
  "mutable": false,
@@ -7,8 +7,8 @@ const DEFAULT_SESSION_TIMEOUT = 300; //5mins as in connect
7
7
  const DEFAULT_POLLING_FREQ = 3;
8
8
  export class GatacaSSIButton {
9
9
  constructor() {
10
- this.qrId = undefined;
11
10
  this.buttonText = "Easy login";
11
+ this.qrType = "svg";
12
12
  this.autostart = true;
13
13
  this.checkStatus = undefined;
14
14
  this.createSession = undefined;
@@ -46,9 +46,7 @@ export class GatacaSSIButton {
46
46
  this.authenticationRequest = undefined;
47
47
  this.sessionData = undefined;
48
48
  this.result = RESULT_STATUS.NOT_STARTED;
49
- // console.log("qrId2", this.qrId);
50
- this.qr = (h("gataca-qr", { ref: (el) => (this.qrElement = el), qrId: this.qrId, checkStatus: this.checkStatus, createSession: this.createSession, successCallback: this.successCallback, errorCallback: this.errorCallback, qrRole: this.qrRole, callbackServer: this.callbackServer, sessionTimeout: this.sessionTimeout, pollingFrequency: this.pollingFrequency, autostart: this.autostart, autorefresh: this.autorefresh, v: this.v, qrModalTitle: this.qrModalTitle, qrModalDescription: this.qrModalDescription, hideBrandTitle: this.hideBrandTitle, dynamicLink: this.dynamicLink, logoSize: this.logoSize, logoSrc: this.logoSrc, modalTitleColor: this.modalTitleColor, qrCodeExpiredLabel: this.qrCodeExpiredLabel, credentialsNotValidatedLabel: this.credentialsNotValidatedLabel, clickInsideBoxLabel: this.clickInsideBoxLabel, refreshQrLabel: this.refreshQrLabel, scanQrLabel: this.scanQrLabel, userNotScanInTimeErrorLabel: this.userNotScanInTimeErrorLabel, credsNotValidatedErrorLabel: this.credsNotValidatedErrorLabel, failedLoginErrorLabel: this.failedLoginErrorLabel, successLoginLabel: this.successLoginLabel, byBrandLabel: this.byBrandLabel, waitingStartSessionLabel: this.waitingStartSessionLabel, hideQrModalDescription: this.hideQrModalDescription }));
51
- this.qr.qrId = this.qrId;
49
+ this.qr = (h("gataca-qr", { ref: (el) => (this.qrElement = el), checkStatus: this.checkStatus, createSession: this.createSession, successCallback: this.successCallback, errorCallback: this.errorCallback, qrRole: this.qrRole, qrType: this.qrType, callbackServer: this.callbackServer, sessionTimeout: this.sessionTimeout, pollingFrequency: this.pollingFrequency, autostart: this.autostart, autorefresh: this.autorefresh, v: this.v, qrModalTitle: this.qrModalTitle, qrModalDescription: this.qrModalDescription, hideBrandTitle: this.hideBrandTitle, dynamicLink: this.dynamicLink, logoSize: this.logoSize, logoSrc: this.logoSrc, modalTitleColor: this.modalTitleColor, qrCodeExpiredLabel: this.qrCodeExpiredLabel, credentialsNotValidatedLabel: this.credentialsNotValidatedLabel, clickInsideBoxLabel: this.clickInsideBoxLabel, refreshQrLabel: this.refreshQrLabel, scanQrLabel: this.scanQrLabel, userNotScanInTimeErrorLabel: this.userNotScanInTimeErrorLabel, credsNotValidatedErrorLabel: this.credsNotValidatedErrorLabel, failedLoginErrorLabel: this.failedLoginErrorLabel, successLoginLabel: this.successLoginLabel, byBrandLabel: this.byBrandLabel, waitingStartSessionLabel: this.waitingStartSessionLabel, hideQrModalDescription: this.hideQrModalDescription }));
52
50
  }
53
51
  /**
54
52
  * Retrieve manually the session data on a successful login
@@ -178,12 +176,10 @@ export class GatacaSSIButton {
178
176
  }
179
177
  }
180
178
  renderDesktopButton() {
181
- // console.log("this.qrId333", this.qrId);
182
179
  return (h("div", { class: "gatacaButtonWrapper" }, h("button", { class: "gatacaButton", onClick: () => {
183
180
  this.open = !this.open;
184
181
  setTimeout(() => {
185
182
  var _a, _b;
186
- this.qrElement.id = this.qrId;
187
183
  if (this.open) {
188
184
  (_a = this.qrElement) === null || _a === void 0 ? void 0 : _a.display();
189
185
  }
@@ -264,7 +260,7 @@ export class GatacaSSIButton {
264
260
  }
265
261
  static get properties() {
266
262
  return {
267
- "qrId": {
263
+ "buttonText": {
268
264
  "type": "string",
269
265
  "mutable": false,
270
266
  "complexType": {
@@ -276,28 +272,34 @@ export class GatacaSSIButton {
276
272
  "optional": true,
277
273
  "docs": {
278
274
  "tags": [],
279
- "text": "_[Optional]_\nUnique identificator for html tag"
275
+ "text": "_[Optional]_\nIn the case of being a button, modifies its text"
280
276
  },
281
- "attribute": "qr-id",
282
- "reflect": false
277
+ "attribute": "button-text",
278
+ "reflect": false,
279
+ "defaultValue": "\"Easy login\""
283
280
  },
284
- "buttonText": {
281
+ "qrType": {
285
282
  "type": "string",
286
283
  "mutable": false,
287
284
  "complexType": {
288
- "original": "string",
289
- "resolved": "string",
290
- "references": {}
285
+ "original": "DrawType",
286
+ "resolved": "\"canvas\" | \"svg\"",
287
+ "references": {
288
+ "DrawType": {
289
+ "location": "import",
290
+ "path": "qr-code-styling"
291
+ }
292
+ }
291
293
  },
292
294
  "required": false,
293
295
  "optional": true,
294
296
  "docs": {
295
297
  "tags": [],
296
- "text": "_[Optional]_\nIn the case of being a button, modifies its text"
298
+ "text": "_[Optional]_\nSets the qr type. It can be \"svg\" or \"canvas\". \"svg\" by default."
297
299
  },
298
- "attribute": "button-text",
300
+ "attribute": "qr-type",
299
301
  "reflect": false,
300
- "defaultValue": "\"Easy login\""
302
+ "defaultValue": "\"svg\""
301
303
  },
302
304
  "autostart": {
303
305
  "type": "boolean",
@@ -5,6 +5,7 @@ export class GatacaSSIButtonWS {
5
5
  this.buttonText = "Easy login";
6
6
  this.successCallback = undefined;
7
7
  this.errorCallback = undefined;
8
+ this.qrType = "svg";
8
9
  this.qrRole = undefined;
9
10
  this.callbackServer = undefined;
10
11
  this.socketEndpoint = undefined;
@@ -19,7 +20,7 @@ export class GatacaSSIButtonWS {
19
20
  this.hideBrandTitle = false;
20
21
  this.dynamicLink = true;
21
22
  this.open = false;
22
- this.qr = (h("gataca-qrws", { wsOnMessage: this.wsOnMessage, wsOnOpen: this.wsOnOpen, successCallback: this.successCallback, errorCallback: this.errorCallback, qrRole: this.qrRole, callbackServer: this.callbackServer, sessionTimeout: this.sessionTimeout, socketEndpoint: this.socketEndpoint, autostart: true, autorefresh: this.autorefresh, v: this.v, qrModalTitle: this.qrModalTitle, qrModalDescription: this.qrModalDescription, hideBrandTitle: this.hideBrandTitle, dynamicLink: this.dynamicLink }));
23
+ this.qr = (h("gataca-qrws", { wsOnMessage: this.wsOnMessage, wsOnOpen: this.wsOnOpen, successCallback: this.successCallback, errorCallback: this.errorCallback, qrRole: this.qrRole, qrType: this.qrType, callbackServer: this.callbackServer, sessionTimeout: this.sessionTimeout, socketEndpoint: this.socketEndpoint, autostart: true, autorefresh: this.autorefresh, v: this.v, qrModalTitle: this.qrModalTitle, qrModalDescription: this.qrModalDescription, hideBrandTitle: this.hideBrandTitle, dynamicLink: this.dynamicLink }));
23
24
  }
24
25
  /**
25
26
  * Retrieve manually the session data on a successful login
@@ -112,6 +113,29 @@ export class GatacaSSIButtonWS {
112
113
  },
113
114
  "defaultValue": "undefined"
114
115
  },
116
+ "qrType": {
117
+ "type": "string",
118
+ "mutable": false,
119
+ "complexType": {
120
+ "original": "DrawType",
121
+ "resolved": "\"canvas\" | \"svg\"",
122
+ "references": {
123
+ "DrawType": {
124
+ "location": "import",
125
+ "path": "qr-code-styling"
126
+ }
127
+ }
128
+ },
129
+ "required": false,
130
+ "optional": true,
131
+ "docs": {
132
+ "tags": [],
133
+ "text": "_[Optional]_\nSets the qr type. It can be \"svg\" or \"canvas\". \"svg\" by default."
134
+ },
135
+ "attribute": "qr-type",
136
+ "reflect": false,
137
+ "defaultValue": "\"svg\""
138
+ },
115
139
  "qrRole": {
116
140
  "type": "string",
117
141
  "mutable": false,
@@ -32,6 +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
36
  this.configRepository = DEFAULT_REPOSITORY;
36
37
  this.successCallback = undefined;
37
38
  this.errorCallback = undefined;
@@ -75,18 +76,18 @@ const GatacaAutoQR = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
75
76
  selectQR() {
76
77
  if (this.config.useButton) {
77
78
  if (this.config.useWs) {
78
- this.qr = (h("gataca-ssibuttonws", { buttonText: this.config.buttonText, wsOnMessage: this.wsOnMessage || this.config.wsOnMessage, wsOnOpen: this.wsOnOpen || this.config.wsOnOpen, successCallback: this.successCallback || this.config.successCallback, errorCallback: this.errorCallback || this.config.errorCallback, qrRole: this.config.qrRole, callbackServer: this.config.callbackServer, sessionTimeout: this.config.sessionTimeout, socketEndpoint: this.config.socketEndpoint, autostart: true, autorefresh: this.config.autorefresh, v: this.config.v, qrModalTitle: this.config.qrModalTitle, qrModalDescription: this.config.qrModalDescription, hideBrandTitle: this.config.hideBrandTitle, dynamicLink: this.config.dynamicLink }));
79
+ this.qr = (h("gataca-ssibuttonws", { buttonText: this.config.buttonText, wsOnMessage: this.wsOnMessage || this.config.wsOnMessage, wsOnOpen: this.wsOnOpen || this.config.wsOnOpen, successCallback: this.successCallback || this.config.successCallback, errorCallback: this.errorCallback || this.config.errorCallback, qrType: this.qrType, qrRole: this.config.qrRole, callbackServer: this.config.callbackServer, sessionTimeout: this.config.sessionTimeout, socketEndpoint: this.config.socketEndpoint, autostart: true, autorefresh: this.config.autorefresh, v: this.config.v, qrModalTitle: this.config.qrModalTitle, qrModalDescription: this.config.qrModalDescription, hideBrandTitle: this.config.hideBrandTitle, dynamicLink: this.config.dynamicLink }));
79
80
  }
80
81
  else {
81
- this.qr = (h("gataca-ssibutton", { buttonText: this.config.buttonText, checkStatus: this.checkStatus || this.config.checkStatus, createSession: this.createSession || this.config.createSession, successCallback: this.successCallback || this.config.successCallback, errorCallback: this.errorCallback || this.config.errorCallback, qrRole: this.config.qrRole, callbackServer: this.config.callbackServer, sessionTimeout: this.config.sessionTimeout, pollingFrequency: this.config.pollingFrequency, autorefresh: this.config.autorefresh, v: this.config.v, qrModalTitle: this.config.qrModalTitle, qrModalDescription: this.config.qrModalDescription, hideBrandTitle: this.config.hideBrandTitle, dynamicLink: this.config.dynamicLink }));
82
+ this.qr = (h("gataca-ssibutton", { buttonText: this.config.buttonText, checkStatus: this.checkStatus || this.config.checkStatus, createSession: this.createSession || this.config.createSession, successCallback: this.successCallback || this.config.successCallback, errorCallback: this.errorCallback || this.config.errorCallback, qrType: this.qrType, qrRole: this.config.qrRole, callbackServer: this.config.callbackServer, sessionTimeout: this.config.sessionTimeout, pollingFrequency: this.config.pollingFrequency, autorefresh: this.config.autorefresh, v: this.config.v, qrModalTitle: this.config.qrModalTitle, qrModalDescription: this.config.qrModalDescription, hideBrandTitle: this.config.hideBrandTitle, dynamicLink: this.config.dynamicLink }));
82
83
  }
83
84
  }
84
85
  else {
85
86
  if (this.config.useWs) {
86
- this.qr = (h("gataca-qrws", { wsOnMessage: this.wsOnMessage || this.config.wsOnMessage, wsOnOpen: this.wsOnOpen || this.config.wsOnOpen, successCallback: this.successCallback || this.config.successCallback, errorCallback: this.errorCallback || this.config.errorCallback, qrRole: this.config.qrRole, callbackServer: this.config.callbackServer, sessionTimeout: this.config.sessionTimeout, socketEndpoint: this.config.socketEndpoint, autostart: this.config.autostart, autorefresh: this.config.autorefresh, v: this.config.v, qrModalTitle: this.config.qrModalTitle, qrModalDescription: this.config.qrModalDescription, hideBrandTitle: this.config.hideBrandTitle, dynamicLink: this.config.dynamicLink }));
87
+ this.qr = (h("gataca-qrws", { wsOnMessage: this.wsOnMessage || this.config.wsOnMessage, wsOnOpen: this.wsOnOpen || this.config.wsOnOpen, successCallback: this.successCallback || this.config.successCallback, qrType: this.qrType, errorCallback: this.errorCallback || this.config.errorCallback, qrRole: this.config.qrRole, callbackServer: this.config.callbackServer, sessionTimeout: this.config.sessionTimeout, socketEndpoint: this.config.socketEndpoint, autostart: this.config.autostart, autorefresh: this.config.autorefresh, v: this.config.v, qrModalTitle: this.config.qrModalTitle, qrModalDescription: this.config.qrModalDescription, hideBrandTitle: this.config.hideBrandTitle, dynamicLink: this.config.dynamicLink }));
87
88
  }
88
89
  else {
89
- this.qr = (h("gataca-qr", { checkStatus: this.checkStatus || this.config.checkStatus, createSession: this.createSession || this.config.createSession, successCallback: this.successCallback || this.config.successCallback, errorCallback: this.errorCallback || this.config.errorCallback, qrRole: this.config.qrRole, callbackServer: this.config.callbackServer, sessionTimeout: this.config.sessionTimeout, pollingFrequency: this.config.pollingFrequency, autostart: this.config.autostart, autorefresh: this.config.autorefresh, v: this.config.v, qrModalTitle: this.config.qrModalTitle, qrModalDescription: this.config.qrModalDescription, hideBrandTitle: this.config.hideBrandTitle, dynamicLink: this.config.dynamicLink }));
90
+ this.qr = (h("gataca-qr", { checkStatus: this.checkStatus || this.config.checkStatus, createSession: this.createSession || this.config.createSession, successCallback: this.successCallback || this.config.successCallback, qrType: this.qrType, errorCallback: this.errorCallback || this.config.errorCallback, qrRole: this.config.qrRole, callbackServer: this.config.callbackServer, sessionTimeout: this.config.sessionTimeout, pollingFrequency: this.config.pollingFrequency, autostart: this.config.autostart, autorefresh: this.config.autorefresh, v: this.config.v, qrModalTitle: this.config.qrModalTitle, qrModalDescription: this.config.qrModalDescription, hideBrandTitle: this.config.hideBrandTitle, dynamicLink: this.config.dynamicLink }));
90
91
  }
91
92
  }
92
93
  }
@@ -105,6 +106,7 @@ const GatacaAutoQR = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
105
106
  static get style() { return gatacaAutoqrCss; }
106
107
  }, [1, "gataca-autoqr", {
107
108
  "configId": [1, "config-id"],
109
+ "qrType": [1, "qr-type"],
108
110
  "configRepository": [1, "config-repository"],
109
111
  "successCallback": [16],
110
112
  "errorCallback": [16],
@@ -1,4 +1,4 @@
1
- import { h, proxyCustomElement, HTMLElement, createEvent, forceUpdate } from '@stencil/core/internal/client';
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
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';
4
4
 
@@ -62,8 +62,8 @@ const ReadQR = (props) => {
62
62
  };
63
63
 
64
64
  const QR = (props) => {
65
- const { value, useLogo, logoSrc, size, qrId } = props;
66
- return (h("gataca-qrdisplay", { id: qrId, qrData: value, rounded: true, size: size, "logo-size": useLogo ? 0.33 : 0, "logo-src": logoSrc }));
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 }));
67
67
  };
68
68
 
69
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)}}";
@@ -73,7 +73,7 @@ const DEEP_LINK_PREFIX = "https://api.gataca.io/qr/redirect.html";
73
73
  const DEFAULT_SESSION_TIMEOUT = 300; //5mins as in connect
74
74
  const DEFAULT_POLLING_FREQ = 3;
75
75
  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.qrId = undefined; this.qrRole = undefined; 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; }
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; }
77
77
  disconnectedCallback() {
78
78
  this.stop();
79
79
  }
@@ -88,15 +88,9 @@ const GatacaQR = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
88
88
  async display() {
89
89
  await this.getSessionId();
90
90
  this.result = RESULT_STATUS.ONGOING;
91
- console.log("display0", "this.result", this.result);
92
- forceUpdate(this);
93
- console.log("display1", "this.result", this.result);
94
91
  this.poll()
95
92
  .then((data) => {
96
93
  this.result = RESULT_STATUS.SUCCESS;
97
- console.log("display2", "this.result", this.result);
98
- forceUpdate(this);
99
- console.log("display3", "this.result", this.result);
100
94
  this.sessionData = data;
101
95
  this.gatacaLoginCompleted.emit(data);
102
96
  this.successCallback(data);
@@ -113,9 +107,6 @@ const GatacaQR = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
113
107
  ? new Error(this.userNotScanInTimeErrorLabel)
114
108
  : new Error(this.credsNotValidatedErrorLabel);
115
109
  this.result = err;
116
- console.log("display4", "this.result", this.result);
117
- forceUpdate(this);
118
- console.log("display5", "this.result", this.result);
119
110
  this.gatacaLoginFailed.emit(error);
120
111
  this.errorCallback(error);
121
112
  }
@@ -150,14 +141,9 @@ const GatacaQR = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
150
141
  if (this.sessionId) {
151
142
  return this.sessionId;
152
143
  }
153
- // console.log("111 getSessionId", "this.sessionId", this.sessionId);
154
- if (this.createSession) {
155
- let { sessionId, authenticationRequest } = await this.createSession();
156
- // console.log("222 getSessionId", "sessionId", sessionId);
157
- this.sessionId = sessionId;
158
- this.authenticationRequest = authenticationRequest;
159
- }
160
- // console.log("333 getSessionId", "this.sessionId", this.sessionId);
144
+ let { sessionId, authenticationRequest } = await this.createSession();
145
+ this.sessionId = sessionId;
146
+ this.authenticationRequest = authenticationRequest;
161
147
  return this.sessionId;
162
148
  }
163
149
  getLink() {
@@ -204,7 +190,6 @@ const GatacaQR = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
204
190
  return new Promise(checkCondition);
205
191
  }
206
192
  renderQRSection() {
207
- console.log("renderQRSection", "this.result", this.result);
208
193
  switch (this.result) {
209
194
  case RESULT_STATUS.NOT_STARTED:
210
195
  return this.renderRetryButton();
@@ -224,23 +209,19 @@ const GatacaQR = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
224
209
  }
225
210
  }
226
211
  renderSuccess() {
227
- console.log("renderSuccess", "this.result", this.result);
228
212
  return (h(Success, { modalHeight: this === null || this === void 0 ? void 0 : this.modalHeight, successLoginLabel: this === null || this === void 0 ? void 0 : this.successLoginLabel }));
229
213
  }
230
214
  renderRetryButton(errorMessage) {
231
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) }));
232
216
  }
233
217
  renderReadQR(readQrMessages) {
234
- console.log("renderReadQR", readQrMessages);
235
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) }));
236
219
  }
237
220
  renderQR(value, useLogo) {
238
- console.log("renderQR", value, useLogo);
239
- return (h(QR, { qrId: this.qrId, value: value, useLogo: useLogo, size: (this === null || this === void 0 ? void 0 : this.qrSize) || undefined, logoSrc: this === null || this === void 0 ? void 0 : this.logoSrc }));
221
+ return (h(QR, { value: value, qrType: this.qrType, useLogo: useLogo, size: (this === null || this === void 0 ? void 0 : this.qrSize) || undefined, logoSrc: this === null || this === void 0 ? void 0 : this.logoSrc }));
240
222
  }
241
223
  renderRetryQR(value, useLogo) {
242
- // console.log("this.qrId", this.qrId);
243
- return (h(QR, { qrId: this.qrId, value: value, useLogo: useLogo, size: (this === null || this === void 0 ? void 0 : this.qrSize) ? (this === null || this === void 0 ? void 0 : this.qrSize) - 50 : undefined, logoSrc: this === null || this === void 0 ? void 0 : this.logoSrc }));
224
+ return (h(QR, { value: value, useLogo: useLogo, qrType: this.qrType, size: (this === null || this === void 0 ? void 0 : this.qrSize) ? (this === null || this === void 0 ? void 0 : this.qrSize) - 50 : undefined, logoSrc: this === null || this === void 0 ? void 0 : this.logoSrc }));
244
225
  }
245
226
  render() {
246
227
  var _a, _b;
@@ -265,8 +246,8 @@ const GatacaQR = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
265
246
  "createSession": [16],
266
247
  "successCallback": [16],
267
248
  "errorCallback": [16],
268
- "qrId": [1, "qr-id"],
269
249
  "qrRole": [1, "qr-role"],
250
+ "qrType": [1, "qr-type"],
270
251
  "callbackServer": [1, "callback-server"],
271
252
  "autostart": [4],
272
253
  "autorefresh": [4],