@gataca/qr 0.0.19 → 0.0.21

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 (95) hide show
  1. package/dist/gatacaqr/app-globals-0f993ce5.js +3 -0
  2. package/dist/gatacaqr/css-shim-8eec97b3.js +4 -0
  3. package/dist/gatacaqr/dom-1b0cf05d.js +73 -0
  4. package/dist/{esm/gat-icon-alert-7b06ef3a.js → gatacaqr/gat-icon-alert-13a1894e.js} +1 -3
  5. package/dist/{esm → gatacaqr}/gataca-autoqr.entry.js +1 -1
  6. package/dist/{esm/gataca-qr_2.entry.js → gatacaqr/gataca-qr.entry.js} +17 -81
  7. package/dist/gatacaqr/gataca-qrdisplay-55780157.js +97 -0
  8. package/dist/gatacaqr/gataca-qrdisplay.entry.js +2 -0
  9. package/dist/{esm → gatacaqr}/gataca-qrws.entry.js +3 -3
  10. package/dist/{components/gataca-ssibutton2.js → gatacaqr/gataca-ssibutton.entry.js} +10 -84
  11. package/dist/{components/gataca-ssibuttonws2.js → gatacaqr/gataca-ssibuttonws.entry.js} +7 -53
  12. package/dist/gatacaqr/gatacaqr.esm.js +129 -1
  13. package/dist/gatacaqr/index-4bc6f36b.js +3262 -0
  14. package/dist/gatacaqr/index.esm.js +1 -1
  15. package/dist/gatacaqr/shadow-css-146f2f6f.js +387 -0
  16. package/dist/types/components/gataca-qr/components/qr/QR.d.ts +0 -1
  17. package/dist/types/components/gataca-qr/gataca-qr.d.ts +0 -5
  18. package/dist/types/components/gataca-qrdisplay/gataca-qrdisplay.d.ts +0 -5
  19. package/dist/types/components/gataca-ssibutton/gataca-ssibutton.d.ts +0 -5
  20. package/dist/types/components.d.ts +0 -24
  21. package/package.json +1 -1
  22. package/dist/cjs/gat-icon-alert-0ad19b26.js +0 -14
  23. package/dist/cjs/gataca-autoqr.cjs.entry.js +0 -105
  24. package/dist/cjs/gataca-qr_2.cjs.entry.js +0 -318
  25. package/dist/cjs/gataca-qrws.cjs.entry.js +0 -252
  26. package/dist/cjs/gataca-ssibutton_2.cjs.entry.js +0 -320
  27. package/dist/cjs/gatacaqr.cjs.js +0 -19
  28. package/dist/cjs/index-8638645b.js +0 -1482
  29. package/dist/cjs/index.cjs.js +0 -16
  30. package/dist/cjs/loader.cjs.js +0 -21
  31. package/dist/cjs/qr-code-styling-412bbc7a.js +0 -28
  32. package/dist/cjs/utils-ef28b844.js +0 -27
  33. package/dist/collection/assets/icons/gat-icon-alert.svg +0 -5
  34. package/dist/collection/assets/icons/gat-icon-check.svg +0 -5
  35. package/dist/collection/assets/icons/gat-icon-refresh.svg +0 -4
  36. package/dist/collection/assets/images/logo_gataca.svg +0 -7
  37. package/dist/collection/collection-manifest.json +0 -17
  38. package/dist/collection/components/gataca-autoqr/gataca-autoqr.css +0 -116
  39. package/dist/collection/components/gataca-autoqr/gataca-autoqr.js +0 -323
  40. package/dist/collection/components/gataca-qr/components/qr/QR.js +0 -5
  41. package/dist/collection/components/gataca-qr/components/readQR/ReadQR.js +0 -11
  42. package/dist/collection/components/gataca-qr/components/readQR/components/AnimatedLoader.js +0 -4
  43. package/dist/collection/components/gataca-qr/components/retryButton/RetryButton.js +0 -13
  44. package/dist/collection/components/gataca-qr/components/success/Success.js +0 -8
  45. package/dist/collection/components/gataca-qr/gataca-qr.css +0 -399
  46. package/dist/collection/components/gataca-qr/gataca-qr.js +0 -1001
  47. package/dist/collection/components/gataca-qrdisplay/gataca-qrdisplay.js +0 -176
  48. package/dist/collection/components/gataca-qrws/components/qr/QR.js +0 -5
  49. package/dist/collection/components/gataca-qrws/components/readQR/ReadQR.js +0 -11
  50. package/dist/collection/components/gataca-qrws/components/readQR/components/AnimatedLoader.js +0 -4
  51. package/dist/collection/components/gataca-qrws/components/retryButton/RetryButton.js +0 -13
  52. package/dist/collection/components/gataca-qrws/components/success/Success.js +0 -8
  53. package/dist/collection/components/gataca-qrws/gataca-qrws.css +0 -400
  54. package/dist/collection/components/gataca-qrws/gataca-qrws.js +0 -974
  55. package/dist/collection/components/gataca-ssibutton/gataca-ssibutton.css +0 -116
  56. package/dist/collection/components/gataca-ssibutton/gataca-ssibutton.js +0 -979
  57. package/dist/collection/components/gataca-ssibuttonws/gataca-ssibuttonws.css +0 -116
  58. package/dist/collection/components/gataca-ssibuttonws/gataca-ssibuttonws.js +0 -410
  59. package/dist/collection/index.js +0 -2
  60. package/dist/collection/utils/index.js +0 -1
  61. package/dist/collection/utils/utils.js +0 -22
  62. package/dist/components/gat-icon-alert.js +0 -30
  63. package/dist/components/gataca-autoqr.js +0 -161
  64. package/dist/components/gataca-qr.js +0 -6
  65. package/dist/components/gataca-qr2.js +0 -329
  66. package/dist/components/gataca-qrdisplay.js +0 -6
  67. package/dist/components/gataca-qrdisplay2.js +0 -99
  68. package/dist/components/gataca-qrws.js +0 -6
  69. package/dist/components/gataca-qrws2.js +0 -310
  70. package/dist/components/gataca-ssibutton.js +0 -6
  71. package/dist/components/gataca-ssibuttonws.js +0 -6
  72. package/dist/components/index.js +0 -8
  73. package/dist/esm/gataca-ssibutton_2.entry.js +0 -315
  74. package/dist/esm/gatacaqr.js +0 -17
  75. package/dist/esm/index-af2994f7.js +0 -1455
  76. package/dist/esm/index.js +0 -1
  77. package/dist/esm/loader.js +0 -17
  78. package/dist/esm/polyfills/core-js.js +0 -11
  79. package/dist/esm/polyfills/css-shim.js +0 -1
  80. package/dist/esm/polyfills/dom.js +0 -79
  81. package/dist/esm/polyfills/es5-html-element.js +0 -1
  82. package/dist/esm/polyfills/index.js +0 -34
  83. package/dist/esm/polyfills/system.js +0 -6
  84. package/dist/esm/qr-code-styling-0eeb38d5.js +0 -26
  85. package/dist/gatacaqr/p-0be4566d.js +0 -1
  86. package/dist/gatacaqr/p-2cd7b062.js +0 -1
  87. package/dist/gatacaqr/p-3ca3bb1a.entry.js +0 -1
  88. package/dist/gatacaqr/p-57b89b78.entry.js +0 -1
  89. package/dist/gatacaqr/p-88af482f.entry.js +0 -1
  90. package/dist/gatacaqr/p-ba0417e2.js +0 -2
  91. package/dist/gatacaqr/p-d59ae0ab.entry.js +0 -1
  92. package/dist/gatacaqr/p-ea783014.js +0 -1
  93. package/dist/index.cjs.js +0 -1
  94. package/dist/index.js +0 -1
  95. /package/dist/{esm → gatacaqr}/utils-63e7a33b.js +0 -0
@@ -1,1001 +0,0 @@
1
- import { forceUpdate, 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";
10
- //Default values
11
- const DEFAULT_SESSION_TIMEOUT = 300; //5mins as in connect
12
- const DEFAULT_POLLING_FREQ = 3;
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; }
15
- disconnectedCallback() {
16
- this.stop();
17
- }
18
- async componentDidLoad() {
19
- if (this.autostart) {
20
- await this.display();
21
- }
22
- }
23
- /**
24
- * Force manually the display of a QR
25
- */
26
- async display() {
27
- await this.getSessionId();
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
- this.poll()
33
- .then((data) => {
34
- 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
- this.sessionData = data;
39
- this.gatacaLoginCompleted.emit(data);
40
- this.successCallback(data);
41
- })
42
- .catch((err) => {
43
- this.clean();
44
- let expired = err === RESULT_STATUS.EXPIRED;
45
- if (expired && this.autorefresh) {
46
- this.display();
47
- }
48
- else {
49
- if (err !== RESULT_STATUS.NOT_STARTED) {
50
- let error = expired
51
- ? new Error(this.userNotScanInTimeErrorLabel)
52
- : new Error(this.credsNotValidatedErrorLabel);
53
- this.result = err;
54
- console.log("display4", "this.result", this.result);
55
- forceUpdate(this);
56
- console.log("display5", "this.result", this.result);
57
- this.gatacaLoginFailed.emit(error);
58
- this.errorCallback(error);
59
- }
60
- }
61
- });
62
- if (checkMobile() && this.dynamicLink) {
63
- window.location.href = this.getLink();
64
- }
65
- }
66
- /**
67
- * Stop manually an ongoing session
68
- */
69
- async stop() {
70
- this.clean();
71
- if (this.result === RESULT_STATUS.ONGOING || RESULT_STATUS.READ) {
72
- this.result = RESULT_STATUS.NOT_STARTED;
73
- }
74
- }
75
- clean() {
76
- this.sessionData = undefined;
77
- this.sessionId = undefined;
78
- }
79
- /**
80
- * Retrieve manually the session data on a successful login
81
- */
82
- async getSessionData() {
83
- return this.sessionData
84
- ? Promise.resolve(this.sessionData)
85
- : Promise.reject(new Error(this.failedLoginErrorLabel));
86
- }
87
- async getSessionId() {
88
- if (this.sessionId) {
89
- return this.sessionId;
90
- }
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);
99
- return this.sessionId;
100
- }
101
- getLink() {
102
- if (this.v === "2") {
103
- return this.authenticationRequest;
104
- }
105
- const authRequestEncoded = "?dl=" + base64UrlEncode(this.authenticationRequest);
106
- return DEEP_LINK_PREFIX + authRequestEncoded;
107
- }
108
- async poll() {
109
- let endTime = new Date().getTime() +
110
- (this.sessionTimeout || DEFAULT_SESSION_TIMEOUT) * 1000;
111
- let interval = (this.pollingFrequency || DEFAULT_POLLING_FREQ) * 1000;
112
- let checkFunc = async (component) => {
113
- if (component.result === RESULT_STATUS.NOT_STARTED) {
114
- return { result: RESULT_STATUS.NOT_STARTED };
115
- }
116
- let id = await component.getSessionId();
117
- return component.checkStatus(id);
118
- };
119
- let component = this;
120
- let checkCondition = async function (resolve, reject) {
121
- // If the condition is met, we're done!
122
- let { result, data } = await checkFunc(component);
123
- switch (result) {
124
- case RESULT_STATUS.SUCCESS:
125
- resolve(data);
126
- break;
127
- case RESULT_STATUS.READ:
128
- component.result = RESULT_STATUS.READ;
129
- case RESULT_STATUS.ONGOING:
130
- if (component.sessionTimeout > 0 && new Date().getTime() < endTime) {
131
- setTimeout(checkCondition, interval, resolve, reject);
132
- }
133
- else {
134
- reject(RESULT_STATUS.EXPIRED);
135
- }
136
- break;
137
- default:
138
- reject(result);
139
- break;
140
- }
141
- };
142
- return new Promise(checkCondition);
143
- }
144
- renderQRSection() {
145
- console.log("renderQRSection", "this.result", this.result);
146
- switch (this.result) {
147
- case RESULT_STATUS.NOT_STARTED:
148
- return this.renderRetryButton();
149
- case RESULT_STATUS.ONGOING:
150
- return this.renderQR(this.getLink(), true);
151
- case RESULT_STATUS.EXPIRED:
152
- return this.renderRetryButton(this.qrCodeExpiredLabel);
153
- case RESULT_STATUS.FAILED:
154
- return this.renderRetryButton(this.credentialsNotValidatedLabel);
155
- case RESULT_STATUS.SUCCESS:
156
- return this.renderSuccess();
157
- case RESULT_STATUS.READ:
158
- return this.renderReadQR({
159
- title: this === null || this === void 0 ? void 0 : this.readQrTitle,
160
- description: this === null || this === void 0 ? void 0 : this.readQrDescription,
161
- });
162
- }
163
- }
164
- renderSuccess() {
165
- console.log("renderSuccess", "this.result", this.result);
166
- return (h(Success, { modalHeight: this === null || this === void 0 ? void 0 : this.modalHeight, successLoginLabel: this === null || this === void 0 ? void 0 : this.successLoginLabel }));
167
- }
168
- renderRetryButton(errorMessage) {
169
- 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
- }
171
- renderReadQR(readQrMessages) {
172
- console.log("renderReadQR", readQrMessages);
173
- 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 }));
174
- }
175
- 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 }));
178
- }
179
- 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 }));
182
- }
183
- render() {
184
- var _a, _b;
185
- return (h("div", { class: "popUpContainer" }, h("div", { class: `is-visible modal-window ${this.hideModalTexts ? "" : "large-modal"} ${this.hideModalBoxShadow ? "noBoxShadow" : ""}`, style: {
186
- width: (this.modalWidth - 2).toString() + "px",
187
- height: this.modalHeight
188
- ? ((_a = (this.modalHeight - 2)) === null || _a === void 0 ? void 0 : _a.toString()) + "px"
189
- : "",
190
- }, onClick: (event) => {
191
- event.stopPropagation();
192
- } }, 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 &&
193
- !this.hideQrModalDescription && (h("p", { class: "qrDescription modalText" }, this.qrModalDescription))), h("div", { class: "qrSection", style: {
194
- width: this.modalWidth.toString() + "px",
195
- height: this.modalWidth
196
- ? ((_b = this.modalWidth) === null || _b === void 0 ? void 0 : _b.toString()) + "px"
197
- : "",
198
- } }, this.renderQRSection())))));
199
- }
200
- static get is() { return "gataca-qr"; }
201
- static get encapsulation() { return "shadow"; }
202
- static get originalStyleUrls() {
203
- return {
204
- "$": ["gataca-qr.scss"]
205
- };
206
- }
207
- static get styleUrls() {
208
- return {
209
- "$": ["gataca-qr.css"]
210
- };
211
- }
212
- static get properties() {
213
- return {
214
- "checkStatus": {
215
- "type": "unknown",
216
- "mutable": false,
217
- "complexType": {
218
- "original": "(\n id?: string\n ) => Promise<{ result: RESULT_STATUS; data?: any }>",
219
- "resolved": "(id?: string) => Promise<{ result: RESULT_STATUS; data?: any; }>",
220
- "references": {
221
- "Promise": {
222
- "location": "global"
223
- },
224
- "RESULT_STATUS": {
225
- "location": "import",
226
- "path": "../../utils/utils"
227
- }
228
- }
229
- },
230
- "required": false,
231
- "optional": true,
232
- "docs": {
233
- "tags": [],
234
- "text": "***Mandatory***\nCheck status function to query the current status of the session\nThe function must query a client endpoint to check the status. That endpoint must return an error if the session has expired."
235
- },
236
- "defaultValue": "undefined"
237
- },
238
- "createSession": {
239
- "type": "unknown",
240
- "mutable": false,
241
- "complexType": {
242
- "original": "() => Promise<{\n sessionId: string;\n authenticationRequest?: string;\n }>",
243
- "resolved": "() => Promise<{ sessionId: string; authenticationRequest?: string; }>",
244
- "references": {
245
- "Promise": {
246
- "location": "global"
247
- }
248
- }
249
- },
250
- "required": false,
251
- "optional": true,
252
- "docs": {
253
- "tags": [],
254
- "text": "***Mandatory***\nCreate session function to generate a new Session\nUsing v=\"3\", it can provide just a session Id\nUsing another version, it must provide also the authentication request. The session Id is the id of the presentation definition"
255
- },
256
- "defaultValue": "undefined"
257
- },
258
- "successCallback": {
259
- "type": "unknown",
260
- "mutable": false,
261
- "complexType": {
262
- "original": "(data?: any) => void",
263
- "resolved": "(data?: any) => void",
264
- "references": {}
265
- },
266
- "required": false,
267
- "optional": false,
268
- "docs": {
269
- "tags": [],
270
- "text": "***Mandatory***\nCallback fired upon session correctly verified\nIf not set, session validation wouldn't trigger any action\nThe session data and a possible token will be sent as parameters to the callback"
271
- },
272
- "defaultValue": "undefined"
273
- },
274
- "errorCallback": {
275
- "type": "unknown",
276
- "mutable": false,
277
- "complexType": {
278
- "original": "(error?: Error) => void",
279
- "resolved": "(error?: Error) => void",
280
- "references": {
281
- "Error": {
282
- "location": "global"
283
- }
284
- }
285
- },
286
- "required": false,
287
- "optional": false,
288
- "docs": {
289
- "tags": [],
290
- "text": "***Mandatory***\nCallback fired upon session expired or invalid\nIf not set, session error would not be handled\nAn error containing information will be passed as parameter"
291
- },
292
- "defaultValue": "undefined"
293
- },
294
- "qrId": {
295
- "type": "string",
296
- "mutable": false,
297
- "complexType": {
298
- "original": "string",
299
- "resolved": "string",
300
- "references": {}
301
- },
302
- "required": false,
303
- "optional": true,
304
- "docs": {
305
- "tags": [],
306
- "text": "_[Optional]_\nUnique identificator for html tag"
307
- },
308
- "attribute": "qr-id",
309
- "reflect": false
310
- },
311
- "qrRole": {
312
- "type": "string",
313
- "mutable": false,
314
- "complexType": {
315
- "original": "string",
316
- "resolved": "string",
317
- "references": {}
318
- },
319
- "required": false,
320
- "optional": false,
321
- "docs": {
322
- "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"
324
- },
325
- "attribute": "qr-role",
326
- "reflect": false
327
- },
328
- "callbackServer": {
329
- "type": "string",
330
- "mutable": false,
331
- "complexType": {
332
- "original": "string",
333
- "resolved": "string",
334
- "references": {}
335
- },
336
- "required": false,
337
- "optional": false,
338
- "docs": {
339
- "tags": [],
340
- "text": "***Mandatory just for V1***\nConnect/Certify Server where the wallet will send the data"
341
- },
342
- "attribute": "callback-server",
343
- "reflect": false
344
- },
345
- "autostart": {
346
- "type": "boolean",
347
- "mutable": false,
348
- "complexType": {
349
- "original": "boolean",
350
- "resolved": "boolean",
351
- "references": {}
352
- },
353
- "required": false,
354
- "optional": false,
355
- "docs": {
356
- "tags": [],
357
- "text": "_[Optional]_\nSet to enable autoload when the QR is displayed. By default it is true"
358
- },
359
- "attribute": "autostart",
360
- "reflect": false,
361
- "defaultValue": "true"
362
- },
363
- "autorefresh": {
364
- "type": "boolean",
365
- "mutable": false,
366
- "complexType": {
367
- "original": "boolean",
368
- "resolved": "boolean",
369
- "references": {}
370
- },
371
- "required": false,
372
- "optional": false,
373
- "docs": {
374
- "tags": [],
375
- "text": "_[Optional]_\nSet to refresh the session automatically upon expiration. By default it is false"
376
- },
377
- "attribute": "autorefresh",
378
- "reflect": false,
379
- "defaultValue": "false"
380
- },
381
- "v": {
382
- "type": "string",
383
- "mutable": false,
384
- "complexType": {
385
- "original": "string",
386
- "resolved": "string",
387
- "references": {}
388
- },
389
- "required": false,
390
- "optional": true,
391
- "docs": {
392
- "tags": [],
393
- "text": "_[Optional]_\nIf 3, handle deeplink redirects and deprecates (remove) v1 functionality. If not, the create session must be providing both an authentication request and a session Id"
394
- },
395
- "attribute": "v",
396
- "reflect": false,
397
- "defaultValue": "\"3\""
398
- },
399
- "qrModalTitle": {
400
- "type": "string",
401
- "mutable": false,
402
- "complexType": {
403
- "original": "string",
404
- "resolved": "string",
405
- "references": {}
406
- },
407
- "required": false,
408
- "optional": true,
409
- "docs": {
410
- "tags": [],
411
- "text": "_[Optional]_\nModifies the qr headline title"
412
- },
413
- "attribute": "qr-modal-title",
414
- "reflect": false,
415
- "defaultValue": "\"Quick Access\""
416
- },
417
- "modalTitleColor": {
418
- "type": "string",
419
- "mutable": false,
420
- "complexType": {
421
- "original": "string",
422
- "resolved": "string",
423
- "references": {}
424
- },
425
- "required": false,
426
- "optional": true,
427
- "docs": {
428
- "tags": [],
429
- "text": "_[Optional]_\nString to set Modal title color"
430
- },
431
- "attribute": "modal-title-color",
432
- "reflect": false,
433
- "defaultValue": "\"#4745B7\""
434
- },
435
- "qrModalDescription": {
436
- "type": "string",
437
- "mutable": false,
438
- "complexType": {
439
- "original": "string",
440
- "resolved": "string",
441
- "references": {}
442
- },
443
- "required": false,
444
- "optional": true,
445
- "docs": {
446
- "tags": [],
447
- "text": "_[Optional]_\nModifies the Modal description"
448
- },
449
- "attribute": "qr-modal-description",
450
- "reflect": false,
451
- "defaultValue": "\"Sign up or sign in by scanning the QR Code with the Gataca Wallet\""
452
- },
453
- "hideModalTexts": {
454
- "type": "boolean",
455
- "mutable": false,
456
- "complexType": {
457
- "original": "boolean",
458
- "resolved": "boolean",
459
- "references": {}
460
- },
461
- "required": false,
462
- "optional": true,
463
- "docs": {
464
- "tags": [],
465
- "text": "_[Optional]_\nBoolean to show or not show the modal title, brandTitle and description"
466
- },
467
- "attribute": "hide-modal-texts",
468
- "reflect": false,
469
- "defaultValue": "false"
470
- },
471
- "hideModalBoxShadow": {
472
- "type": "boolean",
473
- "mutable": false,
474
- "complexType": {
475
- "original": "boolean",
476
- "resolved": "boolean",
477
- "references": {}
478
- },
479
- "required": false,
480
- "optional": true,
481
- "docs": {
482
- "tags": [],
483
- "text": "_[Optional]_\nBoolean to show or not show the modal title, brandTitle and description"
484
- },
485
- "attribute": "hide-modal-box-shadow",
486
- "reflect": false,
487
- "defaultValue": "false"
488
- },
489
- "hideBrandTitle": {
490
- "type": "boolean",
491
- "mutable": false,
492
- "complexType": {
493
- "original": "boolean",
494
- "resolved": "boolean",
495
- "references": {}
496
- },
497
- "required": false,
498
- "optional": true,
499
- "docs": {
500
- "tags": [],
501
- "text": "_[Optional]_\nBoolean to show or not show the gataca brand title"
502
- },
503
- "attribute": "hide-brand-title",
504
- "reflect": false,
505
- "defaultValue": "false"
506
- },
507
- "logoSize": {
508
- "type": "number",
509
- "mutable": false,
510
- "complexType": {
511
- "original": "number",
512
- "resolved": "number",
513
- "references": {}
514
- },
515
- "required": false,
516
- "optional": true,
517
- "docs": {
518
- "tags": [],
519
- "text": "_[Optional]_\nSize of the logo to display in percentage to the total size [0-1]. 0 means no logo will be displayed. Default is the GATACA logo. Recommended size is around 0.33"
520
- },
521
- "attribute": "logo-size",
522
- "reflect": false,
523
- "defaultValue": "0"
524
- },
525
- "logoSrc": {
526
- "type": "string",
527
- "mutable": false,
528
- "complexType": {
529
- "original": "string",
530
- "resolved": "string",
531
- "references": {}
532
- },
533
- "required": false,
534
- "optional": true,
535
- "docs": {
536
- "tags": [],
537
- "text": "_[Optional]_\nLogo to display, just if the logo size is greater than 0. No logo is the GATACA logo."
538
- },
539
- "attribute": "logo-src",
540
- "reflect": false,
541
- "defaultValue": "logoGataca"
542
- },
543
- "qrSize": {
544
- "type": "number",
545
- "mutable": false,
546
- "complexType": {
547
- "original": "number",
548
- "resolved": "number",
549
- "references": {}
550
- },
551
- "required": false,
552
- "optional": true,
553
- "docs": {
554
- "tags": [],
555
- "text": "_[Optional]_\nSize of QR Displayed"
556
- },
557
- "attribute": "qr-size",
558
- "reflect": false,
559
- "defaultValue": "300"
560
- },
561
- "modalWidth": {
562
- "type": "number",
563
- "mutable": false,
564
- "complexType": {
565
- "original": "number",
566
- "resolved": "number",
567
- "references": {}
568
- },
569
- "required": false,
570
- "optional": true,
571
- "docs": {
572
- "tags": [],
573
- "text": "_[Optional]_\nWidth of the modal"
574
- },
575
- "attribute": "modal-width",
576
- "reflect": false,
577
- "defaultValue": "300"
578
- },
579
- "modalHeight": {
580
- "type": "number",
581
- "mutable": false,
582
- "complexType": {
583
- "original": "number",
584
- "resolved": "number",
585
- "references": {}
586
- },
587
- "required": false,
588
- "optional": true,
589
- "docs": {
590
- "tags": [],
591
- "text": "_[Optional]_\nHeight of the modal"
592
- },
593
- "attribute": "modal-height",
594
- "reflect": false
595
- },
596
- "qrCodeExpiredLabel": {
597
- "type": "string",
598
- "mutable": false,
599
- "complexType": {
600
- "original": "string",
601
- "resolved": "string",
602
- "references": {}
603
- },
604
- "required": false,
605
- "optional": true,
606
- "docs": {
607
- "tags": [],
608
- "text": "_[Optional]_\nString to show when qr code expired"
609
- },
610
- "attribute": "qr-code-expired-label",
611
- "reflect": false,
612
- "defaultValue": "\"QR Code expired\""
613
- },
614
- "credentialsNotValidatedLabel": {
615
- "type": "string",
616
- "mutable": false,
617
- "complexType": {
618
- "original": "string",
619
- "resolved": "string",
620
- "references": {}
621
- },
622
- "required": false,
623
- "optional": true,
624
- "docs": {
625
- "tags": [],
626
- "text": "_[Optional]_\nString to show when credentials not validatedd"
627
- },
628
- "attribute": "credentials-not-validated-label",
629
- "reflect": false,
630
- "defaultValue": "\"User credentials not validated\""
631
- },
632
- "clickInsideBoxLabel": {
633
- "type": "string",
634
- "mutable": false,
635
- "complexType": {
636
- "original": "string",
637
- "resolved": "string",
638
- "references": {}
639
- },
640
- "required": false,
641
- "optional": true,
642
- "docs": {
643
- "tags": [],
644
- "text": "_[Optional]_\nString to show \"click inside\" label"
645
- },
646
- "attribute": "click-inside-box-label",
647
- "reflect": false,
648
- "defaultValue": "\"Click inside the box to\""
649
- },
650
- "refreshQrLabel": {
651
- "type": "string",
652
- "mutable": false,
653
- "complexType": {
654
- "original": "string",
655
- "resolved": "string",
656
- "references": {}
657
- },
658
- "required": false,
659
- "optional": true,
660
- "docs": {
661
- "tags": [],
662
- "text": "_[Optional]_\nString to show \"refresh QR\" label"
663
- },
664
- "attribute": "refresh-qr-label",
665
- "reflect": false,
666
- "defaultValue": "\"Refresh QR Code\""
667
- },
668
- "scanQrLabel": {
669
- "type": "string",
670
- "mutable": false,
671
- "complexType": {
672
- "original": "string",
673
- "resolved": "string",
674
- "references": {}
675
- },
676
- "required": false,
677
- "optional": true,
678
- "docs": {
679
- "tags": [],
680
- "text": "_[Optional]_\nString to show \"scan QR\" label"
681
- },
682
- "attribute": "scan-qr-label",
683
- "reflect": false,
684
- "defaultValue": "\"Scan QR Code\""
685
- },
686
- "userNotScanInTimeErrorLabel": {
687
- "type": "string",
688
- "mutable": false,
689
- "complexType": {
690
- "original": "string",
691
- "resolved": "string",
692
- "references": {}
693
- },
694
- "required": false,
695
- "optional": true,
696
- "docs": {
697
- "tags": [],
698
- "text": "_[Optional]_\nString to show \"user not scan in time\" error"
699
- },
700
- "attribute": "user-not-scan-in-time-error-label",
701
- "reflect": false,
702
- "defaultValue": "\"User did not scan the QR in the allowed time\""
703
- },
704
- "credsNotValidatedErrorLabel": {
705
- "type": "string",
706
- "mutable": false,
707
- "complexType": {
708
- "original": "string",
709
- "resolved": "string",
710
- "references": {}
711
- },
712
- "required": false,
713
- "optional": true,
714
- "docs": {
715
- "tags": [],
716
- "text": "_[Optional]_\nString to show \"provided credentials not validates\" error"
717
- },
718
- "attribute": "creds-not-validated-error-label",
719
- "reflect": false,
720
- "defaultValue": "\"Provided user credentials couldn't be validated\""
721
- },
722
- "failedLoginErrorLabel": {
723
- "type": "string",
724
- "mutable": false,
725
- "complexType": {
726
- "original": "string",
727
- "resolved": "string",
728
- "references": {}
729
- },
730
- "required": false,
731
- "optional": true,
732
- "docs": {
733
- "tags": [],
734
- "text": "_[Optional]_\nString to show \"failed login\" error"
735
- },
736
- "attribute": "failed-login-error-label",
737
- "reflect": false,
738
- "defaultValue": "\"No successful login\""
739
- },
740
- "successLoginLabel": {
741
- "type": "string",
742
- "mutable": false,
743
- "complexType": {
744
- "original": "string",
745
- "resolved": "string",
746
- "references": {}
747
- },
748
- "required": false,
749
- "optional": true,
750
- "docs": {
751
- "tags": [],
752
- "text": "_[Optional]_\nString to show \"successful login\" label"
753
- },
754
- "attribute": "success-login-label",
755
- "reflect": false,
756
- "defaultValue": "\"Successful Connection!\""
757
- },
758
- "byBrandLabel": {
759
- "type": "string",
760
- "mutable": false,
761
- "complexType": {
762
- "original": "string",
763
- "resolved": "string",
764
- "references": {}
765
- },
766
- "required": false,
767
- "optional": true,
768
- "docs": {
769
- "tags": [],
770
- "text": "_[Optional]_\nString to show \"by brand\" label"
771
- },
772
- "attribute": "by-brand-label",
773
- "reflect": false,
774
- "defaultValue": "\"by Gataca\""
775
- },
776
- "waitingStartSessionLabel": {
777
- "type": "string",
778
- "mutable": false,
779
- "complexType": {
780
- "original": "string",
781
- "resolved": "string",
782
- "references": {}
783
- },
784
- "required": false,
785
- "optional": true,
786
- "docs": {
787
- "tags": [],
788
- "text": "_[Optional]_\nString to show \"waiting start session\" label"
789
- },
790
- "attribute": "waiting-start-session-label",
791
- "reflect": false,
792
- "defaultValue": "\"waiting to start a session\""
793
- },
794
- "readQrTitle": {
795
- "type": "string",
796
- "mutable": false,
797
- "complexType": {
798
- "original": "string",
799
- "resolved": "string",
800
- "references": {}
801
- },
802
- "required": false,
803
- "optional": true,
804
- "docs": {
805
- "tags": [],
806
- "text": "_[Optional]_\nString title to show when QR already read"
807
- },
808
- "attribute": "read-qr-title",
809
- "reflect": false,
810
- "defaultValue": "\"Processing...\""
811
- },
812
- "readQrDescription": {
813
- "type": "string",
814
- "mutable": false,
815
- "complexType": {
816
- "original": "string",
817
- "resolved": "string",
818
- "references": {}
819
- },
820
- "required": false,
821
- "optional": true,
822
- "docs": {
823
- "tags": [],
824
- "text": "_[Optional]_\nString description to show when QR already read"
825
- },
826
- "attribute": "read-qr-description",
827
- "reflect": false,
828
- "defaultValue": "\"Please wait a moment\""
829
- },
830
- "hideQrModalDescription": {
831
- "type": "boolean",
832
- "mutable": false,
833
- "complexType": {
834
- "original": "boolean",
835
- "resolved": "boolean",
836
- "references": {}
837
- },
838
- "required": false,
839
- "optional": true,
840
- "docs": {
841
- "tags": [],
842
- "text": "_[Optional]_\nBoolean to show or not show the QR Modal description"
843
- },
844
- "attribute": "hide-qr-modal-description",
845
- "reflect": false,
846
- "defaultValue": "false"
847
- },
848
- "sessionTimeout": {
849
- "type": "number",
850
- "mutable": false,
851
- "complexType": {
852
- "original": "number",
853
- "resolved": "number",
854
- "references": {}
855
- },
856
- "required": false,
857
- "optional": true,
858
- "docs": {
859
- "tags": [],
860
- "text": "_[Optional]_\nMaximum time window to display the session"
861
- },
862
- "attribute": "session-timeout",
863
- "reflect": false,
864
- "defaultValue": "DEFAULT_SESSION_TIMEOUT"
865
- },
866
- "pollingFrequency": {
867
- "type": "number",
868
- "mutable": false,
869
- "complexType": {
870
- "original": "number",
871
- "resolved": "number",
872
- "references": {}
873
- },
874
- "required": false,
875
- "optional": true,
876
- "docs": {
877
- "tags": [],
878
- "text": "_[Optional]_\nFrequency in seconds to check if the session has been validated"
879
- },
880
- "attribute": "polling-frequency",
881
- "reflect": false,
882
- "defaultValue": "DEFAULT_POLLING_FREQ"
883
- },
884
- "dynamicLink": {
885
- "type": "boolean",
886
- "mutable": false,
887
- "complexType": {
888
- "original": "boolean",
889
- "resolved": "boolean",
890
- "references": {}
891
- },
892
- "required": false,
893
- "optional": true,
894
- "docs": {
895
- "tags": [],
896
- "text": "_[Optional]_\nDisplay a link containing a dynamic link to invoke the wallet if closed"
897
- },
898
- "attribute": "dynamic-link",
899
- "reflect": false,
900
- "defaultValue": "true"
901
- }
902
- };
903
- }
904
- static get states() {
905
- return {
906
- "sessionId": {},
907
- "authenticationRequest": {},
908
- "sessionData": {},
909
- "result": {}
910
- };
911
- }
912
- static get events() {
913
- return [{
914
- "method": "gatacaLoginCompleted",
915
- "name": "gatacaLoginCompleted",
916
- "bubbles": true,
917
- "cancelable": true,
918
- "composed": true,
919
- "docs": {
920
- "tags": [],
921
- "text": "GatacaLoginCompleted event, triggered with session data upon login success"
922
- },
923
- "complexType": {
924
- "original": "any",
925
- "resolved": "any",
926
- "references": {}
927
- }
928
- }, {
929
- "method": "gatacaLoginFailed",
930
- "name": "gatacaLoginFailed",
931
- "bubbles": true,
932
- "cancelable": true,
933
- "composed": true,
934
- "docs": {
935
- "tags": [],
936
- "text": "GatacaLoginFailed event, triggered with error upon login failure"
937
- },
938
- "complexType": {
939
- "original": "any",
940
- "resolved": "any",
941
- "references": {}
942
- }
943
- }];
944
- }
945
- static get methods() {
946
- return {
947
- "display": {
948
- "complexType": {
949
- "signature": "() => Promise<void>",
950
- "parameters": [],
951
- "references": {
952
- "Promise": {
953
- "location": "global"
954
- },
955
- "RESULT_STATUS": {
956
- "location": "import",
957
- "path": "../../utils/utils"
958
- }
959
- },
960
- "return": "Promise<void>"
961
- },
962
- "docs": {
963
- "text": "Force manually the display of a QR",
964
- "tags": []
965
- }
966
- },
967
- "stop": {
968
- "complexType": {
969
- "signature": "() => Promise<void>",
970
- "parameters": [],
971
- "references": {
972
- "Promise": {
973
- "location": "global"
974
- }
975
- },
976
- "return": "Promise<void>"
977
- },
978
- "docs": {
979
- "text": "Stop manually an ongoing session",
980
- "tags": []
981
- }
982
- },
983
- "getSessionData": {
984
- "complexType": {
985
- "signature": "() => Promise<any>",
986
- "parameters": [],
987
- "references": {
988
- "Promise": {
989
- "location": "global"
990
- }
991
- },
992
- "return": "Promise<any>"
993
- },
994
- "docs": {
995
- "text": "Retrieve manually the session data on a successful login",
996
- "tags": []
997
- }
998
- }
999
- };
1000
- }
1001
- }