@gataca/qr 4.1.0 → 4.2.1
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.
- package/dist/gatacaqr/app-globals-0f993ce5.js +3 -0
- package/dist/gatacaqr/css-shim-8eec97b3.js +4 -0
- package/dist/gatacaqr/dom-1b0cf05d.js +73 -0
- package/dist/gatacaqr/gat-icon-check-9132c0ad.js +5 -0
- package/dist/{esm → gatacaqr}/gataca-autoqr.entry.js +1 -1
- package/dist/{components/gataca-qr2.js → gatacaqr/gataca-qr.entry.js} +10 -77
- package/dist/gatacaqr/gataca-qrdisplay-9a22c242.js +123 -0
- package/dist/gatacaqr/gataca-qrdisplay.entry.js +2 -0
- package/dist/{esm → gatacaqr}/gataca-qrws.entry.js +3 -2
- package/dist/{components/gataca-ssibutton2.js → gatacaqr/gataca-ssibutton.entry.js} +39 -89
- package/dist/{esm → gatacaqr}/gataca-ssibuttonws.entry.js +1 -1
- package/dist/gatacaqr/gatacaqr.esm.js +129 -1
- package/dist/gatacaqr/index-aea56eb8.js +3262 -0
- package/dist/gatacaqr/index.esm.js +1 -1
- package/dist/gatacaqr/shadow-css-146f2f6f.js +387 -0
- package/dist/types/components/gataca-autoqr/gataca-autoqr.e2e.d.ts +1 -0
- package/dist/types/components/gataca-qr/gataca-qr.e2e.d.ts +1 -0
- package/dist/types/components/gataca-qrdisplay/gataca-qrdisplay.e2e.d.ts +1 -0
- package/dist/types/components/gataca-qrws/gataca-qrws.e2e.d.ts +1 -0
- package/dist/types/components/gataca-ssibutton/gataca-ssibutton.d.ts +2 -1
- package/dist/types/components/gataca-ssibutton/gataca-ssibutton.e2e.d.ts +1 -0
- package/dist/types/components/gataca-ssibuttonws/gataca-ssibuttonws.e2e.d.ts +1 -0
- package/package.json +1 -1
- package/dist/cjs/gat-icon-check-6b6780eb.js +0 -37
- package/dist/cjs/gataca-autoqr.cjs.entry.js +0 -106
- package/dist/cjs/gataca-qr_3.cjs.entry.js +0 -743
- package/dist/cjs/gataca-qrws.cjs.entry.js +0 -366
- package/dist/cjs/gataca-ssibuttonws.cjs.entry.js +0 -61
- package/dist/cjs/gatacaqr.cjs.js +0 -19
- package/dist/cjs/index-d8d3dfde.js +0 -1532
- package/dist/cjs/index.cjs.js +0 -17
- package/dist/cjs/loader.cjs.js +0 -21
- package/dist/cjs/utils-17b0a5ba.js +0 -72
- package/dist/collection/assets/icons/gat-icon-alert.svg +0 -5
- package/dist/collection/assets/icons/gat-icon-check.svg +0 -5
- package/dist/collection/assets/icons/gat-icon-refresh.svg +0 -4
- package/dist/collection/assets/images/logo_gataca.svg +0 -7
- package/dist/collection/collection-manifest.json +0 -17
- package/dist/collection/components/gataca-autoqr/gataca-autoqr.css +0 -116
- package/dist/collection/components/gataca-autoqr/gataca-autoqr.js +0 -347
- package/dist/collection/components/gataca-qr/components/qr/QR.js +0 -13
- package/dist/collection/components/gataca-qr/components/readQR/ReadQR.js +0 -16
- package/dist/collection/components/gataca-qr/components/readQR/components/AnimatedLoader.js +0 -6
- package/dist/collection/components/gataca-qr/components/retryButton/RetryButton.js +0 -19
- package/dist/collection/components/gataca-qr/components/success/Success.js +0 -9
- package/dist/collection/components/gataca-qr/gataca-qr.css +0 -415
- package/dist/collection/components/gataca-qr/gataca-qr.js +0 -1069
- package/dist/collection/components/gataca-qrdisplay/gataca-qrdisplay.js +0 -224
- package/dist/collection/components/gataca-qrws/components/qr/QR.js +0 -13
- package/dist/collection/components/gataca-qrws/components/readQR/ReadQR.js +0 -11
- package/dist/collection/components/gataca-qrws/components/readQR/components/AnimatedLoader.js +0 -4
- package/dist/collection/components/gataca-qrws/components/retryButton/RetryButton.js +0 -16
- package/dist/collection/components/gataca-qrws/components/success/Success.js +0 -8
- package/dist/collection/components/gataca-qrws/gataca-qrws.css +0 -407
- package/dist/collection/components/gataca-qrws/gataca-qrws.js +0 -1098
- package/dist/collection/components/gataca-ssibutton/gataca-ssibutton.css +0 -116
- package/dist/collection/components/gataca-ssibutton/gataca-ssibutton.js +0 -1151
- package/dist/collection/components/gataca-ssibuttonws/gataca-ssibuttonws.css +0 -116
- package/dist/collection/components/gataca-ssibuttonws/gataca-ssibuttonws.js +0 -434
- package/dist/collection/components/icons/RefreshIcon.js +0 -6
- package/dist/collection/index.js +0 -2
- package/dist/collection/utils/index.js +0 -1
- package/dist/collection/utils/utils.js +0 -66
- package/dist/components/gat-icon-check.js +0 -72
- package/dist/components/gataca-autoqr.js +0 -163
- package/dist/components/gataca-qr.js +0 -6
- package/dist/components/gataca-qrdisplay.js +0 -6
- package/dist/components/gataca-qrdisplay2.js +0 -121
- package/dist/components/gataca-qrws.js +0 -6
- package/dist/components/gataca-qrws2.js +0 -430
- package/dist/components/gataca-ssibutton.js +0 -6
- package/dist/components/gataca-ssibuttonws.js +0 -6
- package/dist/components/gataca-ssibuttonws2.js +0 -104
- package/dist/components/index.js +0 -8
- package/dist/esm/gat-icon-check-7320c81b.js +0 -32
- package/dist/esm/gataca-qr_3.entry.js +0 -737
- package/dist/esm/gatacaqr.js +0 -17
- package/dist/esm/index-dca2ab22.js +0 -1506
- package/dist/esm/index.js +0 -1
- package/dist/esm/loader.js +0 -17
- package/dist/esm/polyfills/core-js.js +0 -11
- package/dist/esm/polyfills/css-shim.js +0 -1
- package/dist/esm/polyfills/dom.js +0 -79
- package/dist/esm/polyfills/es5-html-element.js +0 -1
- package/dist/esm/polyfills/index.js +0 -34
- package/dist/esm/polyfills/system.js +0 -6
- package/dist/gatacaqr/p-143c0080.js +0 -1
- package/dist/gatacaqr/p-29119208.js +0 -1
- package/dist/gatacaqr/p-2dc7190a.entry.js +0 -1
- package/dist/gatacaqr/p-2e8accf9.entry.js +0 -1
- package/dist/gatacaqr/p-85af64b1.js +0 -2
- package/dist/gatacaqr/p-d27dabe4.entry.js +0 -1
- package/dist/gatacaqr/p-e172581d.entry.js +0 -1
- package/dist/index.cjs.js +0 -1
- package/dist/index.js +0 -1
- /package/dist/{esm → gatacaqr}/utils-e4a08623.js +0 -0
|
@@ -1,1098 +0,0 @@
|
|
|
1
|
-
import { h } from '@stencil/core';
|
|
2
|
-
import logoGataca from '../../assets/images/logo_gataca.svg';
|
|
3
|
-
import '../gataca-qrdisplay/gataca-qrdisplay';
|
|
4
|
-
import { base64UrlEncode, checkMobile, RESULT_STATUS, shortenUrlIfPossible } from '../../utils/utils';
|
|
5
|
-
import { Success } from './components/success/Success';
|
|
6
|
-
import { RetryButton } from './components/retryButton/RetryButton';
|
|
7
|
-
import { QR } from './components/qr/QR';
|
|
8
|
-
import { ReadQR } from './components/readQR/ReadQR';
|
|
9
|
-
const DEEP_LINK_PREFIX = 'https://api.gataca.io/qr/redirect.html';
|
|
10
|
-
const DEFAULT_SESSION_TIMEOUT = 300;
|
|
11
|
-
const QR_ROLE_CONNECT = 'connect';
|
|
12
|
-
export class GatacaQRWS {
|
|
13
|
-
constructor() {
|
|
14
|
-
this.qrRefreshGeneration = 0;
|
|
15
|
-
this.lastShortenRaw = null;
|
|
16
|
-
this.successCallback = undefined;
|
|
17
|
-
this.errorCallback = undefined;
|
|
18
|
-
this.qrRole = undefined;
|
|
19
|
-
this.qrType = 'svg';
|
|
20
|
-
this.callbackServer = undefined;
|
|
21
|
-
this.socketEndpoint = undefined;
|
|
22
|
-
this.sessionTimeout = DEFAULT_SESSION_TIMEOUT;
|
|
23
|
-
this.wsOnOpen = undefined;
|
|
24
|
-
this.wsOnMessage = undefined;
|
|
25
|
-
this.autostart = true;
|
|
26
|
-
this.autorefresh = false;
|
|
27
|
-
this.v = '3';
|
|
28
|
-
this.qrModalTitle = 'Quick Access';
|
|
29
|
-
this.modalTitleColor = '#4745B7';
|
|
30
|
-
this.qrModalDescription = 'Sign up or sign in by scanning the QR Code with the Gataca Wallet';
|
|
31
|
-
this.hideModalTexts = false;
|
|
32
|
-
this.hideModalBoxShadow = false;
|
|
33
|
-
this.hideBrandTitle = false;
|
|
34
|
-
this.logoSize = 0;
|
|
35
|
-
this.logoSrc = logoGataca;
|
|
36
|
-
this.qrSize = 300;
|
|
37
|
-
this.modalWidth = 300;
|
|
38
|
-
this.modalHeight = undefined;
|
|
39
|
-
this.qrCodeExpiredLabel = 'QR Code expired';
|
|
40
|
-
this.credentialsNotValidatedLabel = 'User credentials not validated';
|
|
41
|
-
this.clickInsideBoxLabel = 'Click inside the box to';
|
|
42
|
-
this.refreshQrLabel = 'Refresh QR Code';
|
|
43
|
-
this.scanQrLabel = 'Scan QR Code';
|
|
44
|
-
this.userNotScanInTimeErrorLabel = 'User did not scan the QR in the allowed time';
|
|
45
|
-
this.credsNotValidatedErrorLabel = "Provided user credentials couldn't be validated";
|
|
46
|
-
this.failedLoginErrorLabel = 'No successful login';
|
|
47
|
-
this.successLoginLabel = 'Successful Connection!';
|
|
48
|
-
this.byBrandLabel = 'by Gataca';
|
|
49
|
-
this.waitingStartSessionLabel = 'waiting to start a session';
|
|
50
|
-
this.readQrTitle = 'Processing...';
|
|
51
|
-
this.readQrDescription = 'Please wait a moment';
|
|
52
|
-
this.hideQrModalDescription = false;
|
|
53
|
-
this.dynamicLink = true;
|
|
54
|
-
this.sessionId = undefined;
|
|
55
|
-
this.authenticationRequest = undefined;
|
|
56
|
-
this.sessionData = undefined;
|
|
57
|
-
this.result = RESULT_STATUS.NOT_STARTED;
|
|
58
|
-
this.qrHref = '';
|
|
59
|
-
this.qrShortenPending = false;
|
|
60
|
-
}
|
|
61
|
-
disconnectedCallback() {
|
|
62
|
-
this.stop();
|
|
63
|
-
}
|
|
64
|
-
async componentDidLoad() {
|
|
65
|
-
if (this.autostart) {
|
|
66
|
-
await this.display();
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
/**
|
|
70
|
-
* Force manually the display of a QR
|
|
71
|
-
*/
|
|
72
|
-
async display() {
|
|
73
|
-
this.qrHref = '';
|
|
74
|
-
this.qrShortenPending = false;
|
|
75
|
-
this.lastShortenRaw = null;
|
|
76
|
-
this.qrRefreshGeneration++;
|
|
77
|
-
let socket = new WebSocket(this.socketEndpoint);
|
|
78
|
-
setTimeout(() => {
|
|
79
|
-
this.socket.close(1000, '');
|
|
80
|
-
}, 1000 * this.sessionTimeout);
|
|
81
|
-
this.socket = socket;
|
|
82
|
-
socket.onopen = () => {
|
|
83
|
-
if (this.wsOnOpen)
|
|
84
|
-
this.wsOnOpen(this.socket);
|
|
85
|
-
};
|
|
86
|
-
socket.onmessage = (msg) => {
|
|
87
|
-
if (this.wsOnMessage) {
|
|
88
|
-
this.wsOnMessage(this.socket, msg);
|
|
89
|
-
}
|
|
90
|
-
else {
|
|
91
|
-
let wsresp = JSON.parse(msg.data);
|
|
92
|
-
if (!!wsresp.sessionId) {
|
|
93
|
-
this.handleWSResponse(wsresp);
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
};
|
|
97
|
-
socket.onerror = () => {
|
|
98
|
-
let error = new Error('Error connecting with server');
|
|
99
|
-
this.result = RESULT_STATUS.FAILED;
|
|
100
|
-
this.gatacaLoginFailed.emit(error);
|
|
101
|
-
this.errorCallback(error);
|
|
102
|
-
socket.close(1000, '');
|
|
103
|
-
};
|
|
104
|
-
socket.onclose = () => {
|
|
105
|
-
if (this.result === RESULT_STATUS.ONGOING || RESULT_STATUS.READ) {
|
|
106
|
-
this.result = RESULT_STATUS.EXPIRED;
|
|
107
|
-
}
|
|
108
|
-
if (this.result === RESULT_STATUS.EXPIRED) {
|
|
109
|
-
if (this.autorefresh) {
|
|
110
|
-
this.display();
|
|
111
|
-
}
|
|
112
|
-
else {
|
|
113
|
-
let error = new Error('User did not scan the QR in the alloted time');
|
|
114
|
-
this.gatacaLoginFailed.emit(error);
|
|
115
|
-
this.errorCallback(error);
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
};
|
|
119
|
-
if (checkMobile() && this.dynamicLink) {
|
|
120
|
-
window.location.href = this.getLink();
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
sessionMsgReceived(event) {
|
|
124
|
-
let wsresp = event.detail;
|
|
125
|
-
this.handleWSResponse(wsresp);
|
|
126
|
-
}
|
|
127
|
-
handleWSResponse(wsresp) {
|
|
128
|
-
this.result = wsresp.result;
|
|
129
|
-
switch (wsresp.result) {
|
|
130
|
-
case RESULT_STATUS.ONGOING:
|
|
131
|
-
case RESULT_STATUS.READ: {
|
|
132
|
-
this.sessionId = wsresp.sessionId;
|
|
133
|
-
this.authenticationRequest = wsresp.authenticationRequest;
|
|
134
|
-
const raw = this.buildRawLink();
|
|
135
|
-
if (raw === null || raw === void 0 ? void 0 : raw.trim()) {
|
|
136
|
-
this.qrShortenPending = true;
|
|
137
|
-
void this.refreshQrHref();
|
|
138
|
-
}
|
|
139
|
-
break;
|
|
140
|
-
}
|
|
141
|
-
case RESULT_STATUS.SUCCESS:
|
|
142
|
-
this.sessionData = wsresp.authenticatedUserData;
|
|
143
|
-
this.gatacaLoginCompleted.emit(wsresp.authenticatedUserData);
|
|
144
|
-
this.successCallback(wsresp.authenticatedUserData);
|
|
145
|
-
this.socket.close(1000, '');
|
|
146
|
-
break;
|
|
147
|
-
case RESULT_STATUS.FAILED:
|
|
148
|
-
this.socket.close();
|
|
149
|
-
let error = new Error("Provided user credentials couldn't be validated");
|
|
150
|
-
this.gatacaLoginFailed.emit(error);
|
|
151
|
-
this.errorCallback(error);
|
|
152
|
-
break;
|
|
153
|
-
case RESULT_STATUS.EXPIRED:
|
|
154
|
-
this.socket.close();
|
|
155
|
-
if (this.autorefresh) {
|
|
156
|
-
this.display();
|
|
157
|
-
}
|
|
158
|
-
else {
|
|
159
|
-
let error = new Error('User did not scan the QR in the alloted time');
|
|
160
|
-
this.gatacaLoginFailed.emit(error);
|
|
161
|
-
this.errorCallback(error);
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
/**
|
|
166
|
-
* Stop manually an ongoing session
|
|
167
|
-
*/
|
|
168
|
-
async stop() {
|
|
169
|
-
this.sessionData = undefined;
|
|
170
|
-
this.sessionId = undefined;
|
|
171
|
-
this.qrHref = '';
|
|
172
|
-
this.qrShortenPending = false;
|
|
173
|
-
this.lastShortenRaw = null;
|
|
174
|
-
this.socket.close(1000, 'Client stopped the connection');
|
|
175
|
-
}
|
|
176
|
-
/**
|
|
177
|
-
* Retrieve manually the session data on a successful login
|
|
178
|
-
*/
|
|
179
|
-
async getSessionData() {
|
|
180
|
-
return this.sessionData ? Promise.resolve(this.sessionData) : Promise.reject(new Error('No successful login'));
|
|
181
|
-
}
|
|
182
|
-
buildRawLink() {
|
|
183
|
-
var _a;
|
|
184
|
-
if (this.v === '2' && this.qrRole == QR_ROLE_CONNECT) {
|
|
185
|
-
return (_a = this.authenticationRequest) !== null && _a !== void 0 ? _a : '';
|
|
186
|
-
}
|
|
187
|
-
const authRequestEncoded = '?dl=' + base64UrlEncode(this.authenticationRequest);
|
|
188
|
-
return DEEP_LINK_PREFIX + authRequestEncoded;
|
|
189
|
-
}
|
|
190
|
-
async refreshQrHref() {
|
|
191
|
-
var _a, _b, _c;
|
|
192
|
-
const raw = this.buildRawLink();
|
|
193
|
-
if (!(raw === null || raw === void 0 ? void 0 : raw.trim())) {
|
|
194
|
-
this.qrShortenPending = false;
|
|
195
|
-
return;
|
|
196
|
-
}
|
|
197
|
-
if (raw === this.lastShortenRaw && ((_a = this.qrHref) === null || _a === void 0 ? void 0 : _a.trim())) {
|
|
198
|
-
this.qrShortenPending = false;
|
|
199
|
-
return;
|
|
200
|
-
}
|
|
201
|
-
if (this.qrShortenPending && raw === this.lastShortenRaw && !((_b = this.qrHref) === null || _b === void 0 ? void 0 : _b.trim())) {
|
|
202
|
-
return;
|
|
203
|
-
}
|
|
204
|
-
const gen = ++this.qrRefreshGeneration;
|
|
205
|
-
this.lastShortenRaw = raw;
|
|
206
|
-
try {
|
|
207
|
-
const shortened = await shortenUrlIfPossible(raw);
|
|
208
|
-
const now = this.buildRawLink();
|
|
209
|
-
if (now === raw) {
|
|
210
|
-
this.qrHref = shortened;
|
|
211
|
-
}
|
|
212
|
-
else if (!((_c = this.qrHref) === null || _c === void 0 ? void 0 : _c.trim())) {
|
|
213
|
-
this.qrHref = now;
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
finally {
|
|
217
|
-
if (gen === this.qrRefreshGeneration) {
|
|
218
|
-
this.qrShortenPending = false;
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
getLink() {
|
|
223
|
-
return this.qrHref || this.buildRawLink();
|
|
224
|
-
}
|
|
225
|
-
renderQRSection() {
|
|
226
|
-
var _a, _b, _c;
|
|
227
|
-
switch (this.result) {
|
|
228
|
-
case RESULT_STATUS.NOT_STARTED:
|
|
229
|
-
return this.renderRetryButton();
|
|
230
|
-
case RESULT_STATUS.ONGOING:
|
|
231
|
-
return this.qrShortenPending || !((_a = this.qrHref) === null || _a === void 0 ? void 0 : _a.trim()) ? this.renderQrLoadingSlot() : this.renderQR(this.getLink(), true, undefined, !!((_b = this.qrHref) === null || _b === void 0 ? void 0 : _b.trim()));
|
|
232
|
-
case RESULT_STATUS.EXPIRED:
|
|
233
|
-
return this.renderRetryButton(this.qrCodeExpiredLabel);
|
|
234
|
-
case RESULT_STATUS.FAILED:
|
|
235
|
-
return this.renderRetryButton(this.credentialsNotValidatedLabel);
|
|
236
|
-
case RESULT_STATUS.SUCCESS:
|
|
237
|
-
return this.renderSuccess();
|
|
238
|
-
case RESULT_STATUS.READ:
|
|
239
|
-
return this.qrShortenPending || !((_c = this.qrHref) === null || _c === void 0 ? void 0 : _c.trim())
|
|
240
|
-
? this.renderQrLoadingSlot()
|
|
241
|
-
: this.renderReadQR({
|
|
242
|
-
title: this === null || this === void 0 ? void 0 : this.readQrTitle,
|
|
243
|
-
description: this === null || this === void 0 ? void 0 : this.readQrDescription
|
|
244
|
-
});
|
|
245
|
-
}
|
|
246
|
-
}
|
|
247
|
-
renderSuccess() {
|
|
248
|
-
return h(Success, { modalHeight: this === null || this === void 0 ? void 0 : this.modalHeight, successLoginLabel: this === null || this === void 0 ? void 0 : this.successLoginLabel });
|
|
249
|
-
}
|
|
250
|
-
renderRetryButton(errorMessage) {
|
|
251
|
-
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, display: this.display.bind(this) }));
|
|
252
|
-
}
|
|
253
|
-
renderReadQR(readQrMessages) {
|
|
254
|
-
var _a;
|
|
255
|
-
const linkReady = !!((_a = this.qrHref) === null || _a === void 0 ? void 0 : _a.trim());
|
|
256
|
-
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: (url, useLogo, size) => this.renderQR(url, useLogo, size, linkReady) }));
|
|
257
|
-
}
|
|
258
|
-
renderQR(value, useLogo, sizeQR, linkReady = true) {
|
|
259
|
-
return h(QR, { value: value, qrType: this.qrType, useLogo: useLogo && this.logoSize !== 0, size: sizeQR || (this === null || this === void 0 ? void 0 : this.qrSize) || undefined, logoSrc: this === null || this === void 0 ? void 0 : this.logoSrc, linkReady: linkReady });
|
|
260
|
-
}
|
|
261
|
-
renderQrLoadingSlot() {
|
|
262
|
-
const s = this.qrSize || 300;
|
|
263
|
-
return (h("div", { class: "qr-loading-slot", style: {
|
|
264
|
-
width: s + 'px',
|
|
265
|
-
height: s + 'px',
|
|
266
|
-
margin: '0 auto'
|
|
267
|
-
} }));
|
|
268
|
-
}
|
|
269
|
-
render() {
|
|
270
|
-
var _a, _b;
|
|
271
|
-
return (h("div", { class: "popUpContainer" }, h("div", { class: `is-visible modal-window ${this.hideModalTexts ? '' : 'large-modal'} ${this.hideModalBoxShadow ? 'noBoxShadow' : ''}`, style: {
|
|
272
|
-
width: (this.modalWidth - 2).toString() + 'px',
|
|
273
|
-
height: this.modalHeight ? ((_a = (this.modalHeight - 2)) === null || _a === void 0 ? void 0 : _a.toString()) + 'px' : ''
|
|
274
|
-
}, onClick: (event) => {
|
|
275
|
-
event.stopPropagation();
|
|
276
|
-
} }, h("div", { class: "modal-window__content" }, h("div", { class: `qrTitleContainer ${this.hideModalTexts ? 'hidenText' : ''}` }, h("p", { class: "qrTitle modalText", style: { color: this.modalTitleColor || '#1e1e20' } }, this.qrModalTitle), !this.hideBrandTitle && (h("p", { class: "qrBrand modalText" }, this.byBrandLabel, ' ', h("span", null, h("img", { src: logoGataca })))), this.result !== RESULT_STATUS.SUCCESS && !this.hideQrModalDescription && h("p", { class: "qrDescription modalText" }, this.qrModalDescription)), h("div", { class: "qrSection", style: {
|
|
277
|
-
width: this.modalWidth.toString() + 'px',
|
|
278
|
-
height: this.modalWidth ? ((_b = this.modalWidth) === null || _b === void 0 ? void 0 : _b.toString()) + 'px' : ''
|
|
279
|
-
} }, this.renderQRSection())))));
|
|
280
|
-
}
|
|
281
|
-
static get is() { return "gataca-qrws"; }
|
|
282
|
-
static get encapsulation() { return "shadow"; }
|
|
283
|
-
static get originalStyleUrls() {
|
|
284
|
-
return {
|
|
285
|
-
"$": ["gataca-qrws.scss"]
|
|
286
|
-
};
|
|
287
|
-
}
|
|
288
|
-
static get styleUrls() {
|
|
289
|
-
return {
|
|
290
|
-
"$": ["gataca-qrws.css"]
|
|
291
|
-
};
|
|
292
|
-
}
|
|
293
|
-
static get properties() {
|
|
294
|
-
return {
|
|
295
|
-
"successCallback": {
|
|
296
|
-
"type": "unknown",
|
|
297
|
-
"mutable": false,
|
|
298
|
-
"complexType": {
|
|
299
|
-
"original": "(data?: any) => void",
|
|
300
|
-
"resolved": "(data?: any) => void",
|
|
301
|
-
"references": {}
|
|
302
|
-
},
|
|
303
|
-
"required": false,
|
|
304
|
-
"optional": false,
|
|
305
|
-
"docs": {
|
|
306
|
-
"tags": [],
|
|
307
|
-
"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"
|
|
308
|
-
},
|
|
309
|
-
"defaultValue": "undefined"
|
|
310
|
-
},
|
|
311
|
-
"errorCallback": {
|
|
312
|
-
"type": "unknown",
|
|
313
|
-
"mutable": false,
|
|
314
|
-
"complexType": {
|
|
315
|
-
"original": "(error?: Error) => void",
|
|
316
|
-
"resolved": "(error?: Error) => void",
|
|
317
|
-
"references": {
|
|
318
|
-
"Error": {
|
|
319
|
-
"location": "global"
|
|
320
|
-
}
|
|
321
|
-
}
|
|
322
|
-
},
|
|
323
|
-
"required": false,
|
|
324
|
-
"optional": false,
|
|
325
|
-
"docs": {
|
|
326
|
-
"tags": [],
|
|
327
|
-
"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"
|
|
328
|
-
},
|
|
329
|
-
"defaultValue": "undefined"
|
|
330
|
-
},
|
|
331
|
-
"qrRole": {
|
|
332
|
-
"type": "string",
|
|
333
|
-
"mutable": false,
|
|
334
|
-
"complexType": {
|
|
335
|
-
"original": "string",
|
|
336
|
-
"resolved": "string",
|
|
337
|
-
"references": {}
|
|
338
|
-
},
|
|
339
|
-
"required": false,
|
|
340
|
-
"optional": false,
|
|
341
|
-
"docs": {
|
|
342
|
-
"tags": [],
|
|
343
|
-
"text": "***Mandatory***\nDecide if scanning the credential as a verifier to request credentials\nor as an issuer too issue credentials.\nOptions: connect | certify"
|
|
344
|
-
},
|
|
345
|
-
"attribute": "qr-role",
|
|
346
|
-
"reflect": false
|
|
347
|
-
},
|
|
348
|
-
"qrType": {
|
|
349
|
-
"type": "string",
|
|
350
|
-
"mutable": false,
|
|
351
|
-
"complexType": {
|
|
352
|
-
"original": "DrawType",
|
|
353
|
-
"resolved": "\"canvas\" | \"svg\"",
|
|
354
|
-
"references": {
|
|
355
|
-
"DrawType": {
|
|
356
|
-
"location": "import",
|
|
357
|
-
"path": "qr-code-styling"
|
|
358
|
-
}
|
|
359
|
-
}
|
|
360
|
-
},
|
|
361
|
-
"required": false,
|
|
362
|
-
"optional": true,
|
|
363
|
-
"docs": {
|
|
364
|
-
"tags": [],
|
|
365
|
-
"text": "_[Optional]_\nSets the qr type. It can be \"svg\" or \"canvas\". \"svg\" by default."
|
|
366
|
-
},
|
|
367
|
-
"attribute": "qr-type",
|
|
368
|
-
"reflect": false,
|
|
369
|
-
"defaultValue": "'svg'"
|
|
370
|
-
},
|
|
371
|
-
"callbackServer": {
|
|
372
|
-
"type": "string",
|
|
373
|
-
"mutable": false,
|
|
374
|
-
"complexType": {
|
|
375
|
-
"original": "string",
|
|
376
|
-
"resolved": "string",
|
|
377
|
-
"references": {}
|
|
378
|
-
},
|
|
379
|
-
"required": false,
|
|
380
|
-
"optional": false,
|
|
381
|
-
"docs": {
|
|
382
|
-
"tags": [],
|
|
383
|
-
"text": "***Mandatory just for V1***\nConnect/Certify Server where the wallet will send the data"
|
|
384
|
-
},
|
|
385
|
-
"attribute": "callback-server",
|
|
386
|
-
"reflect": false
|
|
387
|
-
},
|
|
388
|
-
"socketEndpoint": {
|
|
389
|
-
"type": "string",
|
|
390
|
-
"mutable": false,
|
|
391
|
-
"complexType": {
|
|
392
|
-
"original": "string",
|
|
393
|
-
"resolved": "string",
|
|
394
|
-
"references": {}
|
|
395
|
-
},
|
|
396
|
-
"required": false,
|
|
397
|
-
"optional": false,
|
|
398
|
-
"docs": {
|
|
399
|
-
"tags": [],
|
|
400
|
-
"text": "***Mandatory***\nWS Endpoint on your service to be invoked upon display"
|
|
401
|
-
},
|
|
402
|
-
"attribute": "socket-endpoint",
|
|
403
|
-
"reflect": false
|
|
404
|
-
},
|
|
405
|
-
"sessionTimeout": {
|
|
406
|
-
"type": "number",
|
|
407
|
-
"mutable": false,
|
|
408
|
-
"complexType": {
|
|
409
|
-
"original": "number",
|
|
410
|
-
"resolved": "number",
|
|
411
|
-
"references": {}
|
|
412
|
-
},
|
|
413
|
-
"required": false,
|
|
414
|
-
"optional": true,
|
|
415
|
-
"docs": {
|
|
416
|
-
"tags": [],
|
|
417
|
-
"text": "***Mandatory***\nMaximum time window to display the session and keep the websocket connection. It's needed to ensure the socket is closed."
|
|
418
|
-
},
|
|
419
|
-
"attribute": "session-timeout",
|
|
420
|
-
"reflect": false,
|
|
421
|
-
"defaultValue": "DEFAULT_SESSION_TIMEOUT"
|
|
422
|
-
},
|
|
423
|
-
"wsOnOpen": {
|
|
424
|
-
"type": "unknown",
|
|
425
|
-
"mutable": false,
|
|
426
|
-
"complexType": {
|
|
427
|
-
"original": "(socket: WebSocket) => void",
|
|
428
|
-
"resolved": "(socket: WebSocket) => void",
|
|
429
|
-
"references": {
|
|
430
|
-
"WebSocket": {
|
|
431
|
-
"location": "global"
|
|
432
|
-
}
|
|
433
|
-
}
|
|
434
|
-
},
|
|
435
|
-
"required": false,
|
|
436
|
-
"optional": false,
|
|
437
|
-
"docs": {
|
|
438
|
-
"tags": [],
|
|
439
|
-
"text": "[Optional]\nFunction to send a message to the server upon socket creation"
|
|
440
|
-
}
|
|
441
|
-
},
|
|
442
|
-
"wsOnMessage": {
|
|
443
|
-
"type": "unknown",
|
|
444
|
-
"mutable": false,
|
|
445
|
-
"complexType": {
|
|
446
|
-
"original": "(socket: WebSocket, msg: MessageEvent) => void",
|
|
447
|
-
"resolved": "(socket: WebSocket, msg: MessageEvent<any>) => void",
|
|
448
|
-
"references": {
|
|
449
|
-
"WebSocket": {
|
|
450
|
-
"location": "global"
|
|
451
|
-
},
|
|
452
|
-
"MessageEvent": {
|
|
453
|
-
"location": "global"
|
|
454
|
-
}
|
|
455
|
-
}
|
|
456
|
-
},
|
|
457
|
-
"required": false,
|
|
458
|
-
"optional": false,
|
|
459
|
-
"docs": {
|
|
460
|
-
"tags": [],
|
|
461
|
-
"text": "**RECOMMENDED**\nCallback to invoke an a message has been received on the socket. It provides the socket itself and the message as parameters.\nIf not used, the messages provided by the server on the Socket connection must conform to the WSReponse interface\nIf used, an Event named **sessionMsg** must be triggered with a WSReponse as data"
|
|
462
|
-
}
|
|
463
|
-
},
|
|
464
|
-
"autostart": {
|
|
465
|
-
"type": "boolean",
|
|
466
|
-
"mutable": false,
|
|
467
|
-
"complexType": {
|
|
468
|
-
"original": "boolean",
|
|
469
|
-
"resolved": "boolean",
|
|
470
|
-
"references": {}
|
|
471
|
-
},
|
|
472
|
-
"required": false,
|
|
473
|
-
"optional": false,
|
|
474
|
-
"docs": {
|
|
475
|
-
"tags": [],
|
|
476
|
-
"text": "_[Optional]_\nSet to enable autoload when the QR is displayed. By default it is true"
|
|
477
|
-
},
|
|
478
|
-
"attribute": "autostart",
|
|
479
|
-
"reflect": false,
|
|
480
|
-
"defaultValue": "true"
|
|
481
|
-
},
|
|
482
|
-
"autorefresh": {
|
|
483
|
-
"type": "boolean",
|
|
484
|
-
"mutable": false,
|
|
485
|
-
"complexType": {
|
|
486
|
-
"original": "boolean",
|
|
487
|
-
"resolved": "boolean",
|
|
488
|
-
"references": {}
|
|
489
|
-
},
|
|
490
|
-
"required": false,
|
|
491
|
-
"optional": false,
|
|
492
|
-
"docs": {
|
|
493
|
-
"tags": [],
|
|
494
|
-
"text": "_[Optional]_\nSet to refresh the session automatically upon expiration. By default it is false"
|
|
495
|
-
},
|
|
496
|
-
"attribute": "autorefresh",
|
|
497
|
-
"reflect": false,
|
|
498
|
-
"defaultValue": "false"
|
|
499
|
-
},
|
|
500
|
-
"v": {
|
|
501
|
-
"type": "string",
|
|
502
|
-
"mutable": false,
|
|
503
|
-
"complexType": {
|
|
504
|
-
"original": "string",
|
|
505
|
-
"resolved": "string",
|
|
506
|
-
"references": {}
|
|
507
|
-
},
|
|
508
|
-
"required": false,
|
|
509
|
-
"optional": true,
|
|
510
|
-
"docs": {
|
|
511
|
-
"tags": [],
|
|
512
|
-
"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"
|
|
513
|
-
},
|
|
514
|
-
"attribute": "v",
|
|
515
|
-
"reflect": false,
|
|
516
|
-
"defaultValue": "'3'"
|
|
517
|
-
},
|
|
518
|
-
"qrModalTitle": {
|
|
519
|
-
"type": "string",
|
|
520
|
-
"mutable": false,
|
|
521
|
-
"complexType": {
|
|
522
|
-
"original": "string",
|
|
523
|
-
"resolved": "string",
|
|
524
|
-
"references": {}
|
|
525
|
-
},
|
|
526
|
-
"required": false,
|
|
527
|
-
"optional": true,
|
|
528
|
-
"docs": {
|
|
529
|
-
"tags": [],
|
|
530
|
-
"text": "_[Optional]_\nModifies the qr headline title"
|
|
531
|
-
},
|
|
532
|
-
"attribute": "qr-modal-title",
|
|
533
|
-
"reflect": false,
|
|
534
|
-
"defaultValue": "'Quick Access'"
|
|
535
|
-
},
|
|
536
|
-
"modalTitleColor": {
|
|
537
|
-
"type": "string",
|
|
538
|
-
"mutable": false,
|
|
539
|
-
"complexType": {
|
|
540
|
-
"original": "string",
|
|
541
|
-
"resolved": "string",
|
|
542
|
-
"references": {}
|
|
543
|
-
},
|
|
544
|
-
"required": false,
|
|
545
|
-
"optional": true,
|
|
546
|
-
"docs": {
|
|
547
|
-
"tags": [],
|
|
548
|
-
"text": "_[Optional]_\nString to set Modal title color"
|
|
549
|
-
},
|
|
550
|
-
"attribute": "modal-title-color",
|
|
551
|
-
"reflect": false,
|
|
552
|
-
"defaultValue": "'#4745B7'"
|
|
553
|
-
},
|
|
554
|
-
"qrModalDescription": {
|
|
555
|
-
"type": "string",
|
|
556
|
-
"mutable": false,
|
|
557
|
-
"complexType": {
|
|
558
|
-
"original": "string",
|
|
559
|
-
"resolved": "string",
|
|
560
|
-
"references": {}
|
|
561
|
-
},
|
|
562
|
-
"required": false,
|
|
563
|
-
"optional": true,
|
|
564
|
-
"docs": {
|
|
565
|
-
"tags": [],
|
|
566
|
-
"text": "_[Optional]_\nModifies the Modal description"
|
|
567
|
-
},
|
|
568
|
-
"attribute": "qr-modal-description",
|
|
569
|
-
"reflect": false,
|
|
570
|
-
"defaultValue": "'Sign up or sign in by scanning the QR Code with the Gataca Wallet'"
|
|
571
|
-
},
|
|
572
|
-
"hideModalTexts": {
|
|
573
|
-
"type": "boolean",
|
|
574
|
-
"mutable": false,
|
|
575
|
-
"complexType": {
|
|
576
|
-
"original": "boolean",
|
|
577
|
-
"resolved": "boolean",
|
|
578
|
-
"references": {}
|
|
579
|
-
},
|
|
580
|
-
"required": false,
|
|
581
|
-
"optional": true,
|
|
582
|
-
"docs": {
|
|
583
|
-
"tags": [],
|
|
584
|
-
"text": "_[Optional]_\nBoolean to show or not show the modal title, brandTitle and description"
|
|
585
|
-
},
|
|
586
|
-
"attribute": "hide-modal-texts",
|
|
587
|
-
"reflect": false,
|
|
588
|
-
"defaultValue": "false"
|
|
589
|
-
},
|
|
590
|
-
"hideModalBoxShadow": {
|
|
591
|
-
"type": "boolean",
|
|
592
|
-
"mutable": false,
|
|
593
|
-
"complexType": {
|
|
594
|
-
"original": "boolean",
|
|
595
|
-
"resolved": "boolean",
|
|
596
|
-
"references": {}
|
|
597
|
-
},
|
|
598
|
-
"required": false,
|
|
599
|
-
"optional": true,
|
|
600
|
-
"docs": {
|
|
601
|
-
"tags": [],
|
|
602
|
-
"text": "_[Optional]_\nBoolean to show or not show the modal title, brandTitle and description"
|
|
603
|
-
},
|
|
604
|
-
"attribute": "hide-modal-box-shadow",
|
|
605
|
-
"reflect": false,
|
|
606
|
-
"defaultValue": "false"
|
|
607
|
-
},
|
|
608
|
-
"hideBrandTitle": {
|
|
609
|
-
"type": "boolean",
|
|
610
|
-
"mutable": false,
|
|
611
|
-
"complexType": {
|
|
612
|
-
"original": "boolean",
|
|
613
|
-
"resolved": "boolean",
|
|
614
|
-
"references": {}
|
|
615
|
-
},
|
|
616
|
-
"required": false,
|
|
617
|
-
"optional": true,
|
|
618
|
-
"docs": {
|
|
619
|
-
"tags": [],
|
|
620
|
-
"text": "_[Optional]_\nBoolean to show or not show the gataca brand title"
|
|
621
|
-
},
|
|
622
|
-
"attribute": "hide-brand-title",
|
|
623
|
-
"reflect": false,
|
|
624
|
-
"defaultValue": "false"
|
|
625
|
-
},
|
|
626
|
-
"logoSize": {
|
|
627
|
-
"type": "number",
|
|
628
|
-
"mutable": false,
|
|
629
|
-
"complexType": {
|
|
630
|
-
"original": "number",
|
|
631
|
-
"resolved": "number",
|
|
632
|
-
"references": {}
|
|
633
|
-
},
|
|
634
|
-
"required": false,
|
|
635
|
-
"optional": true,
|
|
636
|
-
"docs": {
|
|
637
|
-
"tags": [],
|
|
638
|
-
"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"
|
|
639
|
-
},
|
|
640
|
-
"attribute": "logo-size",
|
|
641
|
-
"reflect": false,
|
|
642
|
-
"defaultValue": "0"
|
|
643
|
-
},
|
|
644
|
-
"logoSrc": {
|
|
645
|
-
"type": "string",
|
|
646
|
-
"mutable": false,
|
|
647
|
-
"complexType": {
|
|
648
|
-
"original": "string",
|
|
649
|
-
"resolved": "string",
|
|
650
|
-
"references": {}
|
|
651
|
-
},
|
|
652
|
-
"required": false,
|
|
653
|
-
"optional": true,
|
|
654
|
-
"docs": {
|
|
655
|
-
"tags": [],
|
|
656
|
-
"text": "_[Optional]_\nLogo to display, just if the logo size is greater than 0. No logo is the GATACA logo."
|
|
657
|
-
},
|
|
658
|
-
"attribute": "logo-src",
|
|
659
|
-
"reflect": false,
|
|
660
|
-
"defaultValue": "logoGataca"
|
|
661
|
-
},
|
|
662
|
-
"qrSize": {
|
|
663
|
-
"type": "number",
|
|
664
|
-
"mutable": false,
|
|
665
|
-
"complexType": {
|
|
666
|
-
"original": "number",
|
|
667
|
-
"resolved": "number",
|
|
668
|
-
"references": {}
|
|
669
|
-
},
|
|
670
|
-
"required": false,
|
|
671
|
-
"optional": true,
|
|
672
|
-
"docs": {
|
|
673
|
-
"tags": [],
|
|
674
|
-
"text": "_[Optional]_\nSize of QR Displayed"
|
|
675
|
-
},
|
|
676
|
-
"attribute": "qr-size",
|
|
677
|
-
"reflect": false,
|
|
678
|
-
"defaultValue": "300"
|
|
679
|
-
},
|
|
680
|
-
"modalWidth": {
|
|
681
|
-
"type": "number",
|
|
682
|
-
"mutable": false,
|
|
683
|
-
"complexType": {
|
|
684
|
-
"original": "number",
|
|
685
|
-
"resolved": "number",
|
|
686
|
-
"references": {}
|
|
687
|
-
},
|
|
688
|
-
"required": false,
|
|
689
|
-
"optional": true,
|
|
690
|
-
"docs": {
|
|
691
|
-
"tags": [],
|
|
692
|
-
"text": "_[Optional]_\nWidth of the modal"
|
|
693
|
-
},
|
|
694
|
-
"attribute": "modal-width",
|
|
695
|
-
"reflect": false,
|
|
696
|
-
"defaultValue": "300"
|
|
697
|
-
},
|
|
698
|
-
"modalHeight": {
|
|
699
|
-
"type": "number",
|
|
700
|
-
"mutable": false,
|
|
701
|
-
"complexType": {
|
|
702
|
-
"original": "number",
|
|
703
|
-
"resolved": "number",
|
|
704
|
-
"references": {}
|
|
705
|
-
},
|
|
706
|
-
"required": false,
|
|
707
|
-
"optional": true,
|
|
708
|
-
"docs": {
|
|
709
|
-
"tags": [],
|
|
710
|
-
"text": "_[Optional]_\nHeight of the modal"
|
|
711
|
-
},
|
|
712
|
-
"attribute": "modal-height",
|
|
713
|
-
"reflect": false
|
|
714
|
-
},
|
|
715
|
-
"qrCodeExpiredLabel": {
|
|
716
|
-
"type": "string",
|
|
717
|
-
"mutable": false,
|
|
718
|
-
"complexType": {
|
|
719
|
-
"original": "string",
|
|
720
|
-
"resolved": "string",
|
|
721
|
-
"references": {}
|
|
722
|
-
},
|
|
723
|
-
"required": false,
|
|
724
|
-
"optional": true,
|
|
725
|
-
"docs": {
|
|
726
|
-
"tags": [],
|
|
727
|
-
"text": "_[Optional]_\nString to show when qr code expired"
|
|
728
|
-
},
|
|
729
|
-
"attribute": "qr-code-expired-label",
|
|
730
|
-
"reflect": false,
|
|
731
|
-
"defaultValue": "'QR Code expired'"
|
|
732
|
-
},
|
|
733
|
-
"credentialsNotValidatedLabel": {
|
|
734
|
-
"type": "string",
|
|
735
|
-
"mutable": false,
|
|
736
|
-
"complexType": {
|
|
737
|
-
"original": "string",
|
|
738
|
-
"resolved": "string",
|
|
739
|
-
"references": {}
|
|
740
|
-
},
|
|
741
|
-
"required": false,
|
|
742
|
-
"optional": true,
|
|
743
|
-
"docs": {
|
|
744
|
-
"tags": [],
|
|
745
|
-
"text": "_[Optional]_\nString to show when credentials not validatedd"
|
|
746
|
-
},
|
|
747
|
-
"attribute": "credentials-not-validated-label",
|
|
748
|
-
"reflect": false,
|
|
749
|
-
"defaultValue": "'User credentials not validated'"
|
|
750
|
-
},
|
|
751
|
-
"clickInsideBoxLabel": {
|
|
752
|
-
"type": "string",
|
|
753
|
-
"mutable": false,
|
|
754
|
-
"complexType": {
|
|
755
|
-
"original": "string",
|
|
756
|
-
"resolved": "string",
|
|
757
|
-
"references": {}
|
|
758
|
-
},
|
|
759
|
-
"required": false,
|
|
760
|
-
"optional": true,
|
|
761
|
-
"docs": {
|
|
762
|
-
"tags": [],
|
|
763
|
-
"text": "_[Optional]_\nString to show \"click inside\" label"
|
|
764
|
-
},
|
|
765
|
-
"attribute": "click-inside-box-label",
|
|
766
|
-
"reflect": false,
|
|
767
|
-
"defaultValue": "'Click inside the box to'"
|
|
768
|
-
},
|
|
769
|
-
"refreshQrLabel": {
|
|
770
|
-
"type": "string",
|
|
771
|
-
"mutable": false,
|
|
772
|
-
"complexType": {
|
|
773
|
-
"original": "string",
|
|
774
|
-
"resolved": "string",
|
|
775
|
-
"references": {}
|
|
776
|
-
},
|
|
777
|
-
"required": false,
|
|
778
|
-
"optional": true,
|
|
779
|
-
"docs": {
|
|
780
|
-
"tags": [],
|
|
781
|
-
"text": "_[Optional]_\nString to show \"refresh QR\" label"
|
|
782
|
-
},
|
|
783
|
-
"attribute": "refresh-qr-label",
|
|
784
|
-
"reflect": false,
|
|
785
|
-
"defaultValue": "'Refresh QR Code'"
|
|
786
|
-
},
|
|
787
|
-
"scanQrLabel": {
|
|
788
|
-
"type": "string",
|
|
789
|
-
"mutable": false,
|
|
790
|
-
"complexType": {
|
|
791
|
-
"original": "string",
|
|
792
|
-
"resolved": "string",
|
|
793
|
-
"references": {}
|
|
794
|
-
},
|
|
795
|
-
"required": false,
|
|
796
|
-
"optional": true,
|
|
797
|
-
"docs": {
|
|
798
|
-
"tags": [],
|
|
799
|
-
"text": "_[Optional]_\nString to show \"scan QR\" label"
|
|
800
|
-
},
|
|
801
|
-
"attribute": "scan-qr-label",
|
|
802
|
-
"reflect": false,
|
|
803
|
-
"defaultValue": "'Scan QR Code'"
|
|
804
|
-
},
|
|
805
|
-
"userNotScanInTimeErrorLabel": {
|
|
806
|
-
"type": "string",
|
|
807
|
-
"mutable": false,
|
|
808
|
-
"complexType": {
|
|
809
|
-
"original": "string",
|
|
810
|
-
"resolved": "string",
|
|
811
|
-
"references": {}
|
|
812
|
-
},
|
|
813
|
-
"required": false,
|
|
814
|
-
"optional": true,
|
|
815
|
-
"docs": {
|
|
816
|
-
"tags": [],
|
|
817
|
-
"text": "_[Optional]_\nString to show \"user not scan in time\" error"
|
|
818
|
-
},
|
|
819
|
-
"attribute": "user-not-scan-in-time-error-label",
|
|
820
|
-
"reflect": false,
|
|
821
|
-
"defaultValue": "'User did not scan the QR in the allowed time'"
|
|
822
|
-
},
|
|
823
|
-
"credsNotValidatedErrorLabel": {
|
|
824
|
-
"type": "string",
|
|
825
|
-
"mutable": false,
|
|
826
|
-
"complexType": {
|
|
827
|
-
"original": "string",
|
|
828
|
-
"resolved": "string",
|
|
829
|
-
"references": {}
|
|
830
|
-
},
|
|
831
|
-
"required": false,
|
|
832
|
-
"optional": true,
|
|
833
|
-
"docs": {
|
|
834
|
-
"tags": [],
|
|
835
|
-
"text": "_[Optional]_\nString to show \"provided credentials not validates\" error"
|
|
836
|
-
},
|
|
837
|
-
"attribute": "creds-not-validated-error-label",
|
|
838
|
-
"reflect": false,
|
|
839
|
-
"defaultValue": "\"Provided user credentials couldn't be validated\""
|
|
840
|
-
},
|
|
841
|
-
"failedLoginErrorLabel": {
|
|
842
|
-
"type": "string",
|
|
843
|
-
"mutable": false,
|
|
844
|
-
"complexType": {
|
|
845
|
-
"original": "string",
|
|
846
|
-
"resolved": "string",
|
|
847
|
-
"references": {}
|
|
848
|
-
},
|
|
849
|
-
"required": false,
|
|
850
|
-
"optional": true,
|
|
851
|
-
"docs": {
|
|
852
|
-
"tags": [],
|
|
853
|
-
"text": "_[Optional]_\nString to show \"failed login\" error"
|
|
854
|
-
},
|
|
855
|
-
"attribute": "failed-login-error-label",
|
|
856
|
-
"reflect": false,
|
|
857
|
-
"defaultValue": "'No successful login'"
|
|
858
|
-
},
|
|
859
|
-
"successLoginLabel": {
|
|
860
|
-
"type": "string",
|
|
861
|
-
"mutable": false,
|
|
862
|
-
"complexType": {
|
|
863
|
-
"original": "string",
|
|
864
|
-
"resolved": "string",
|
|
865
|
-
"references": {}
|
|
866
|
-
},
|
|
867
|
-
"required": false,
|
|
868
|
-
"optional": true,
|
|
869
|
-
"docs": {
|
|
870
|
-
"tags": [],
|
|
871
|
-
"text": "_[Optional]_\nString to show \"successful login\" label"
|
|
872
|
-
},
|
|
873
|
-
"attribute": "success-login-label",
|
|
874
|
-
"reflect": false,
|
|
875
|
-
"defaultValue": "'Successful Connection!'"
|
|
876
|
-
},
|
|
877
|
-
"byBrandLabel": {
|
|
878
|
-
"type": "string",
|
|
879
|
-
"mutable": false,
|
|
880
|
-
"complexType": {
|
|
881
|
-
"original": "string",
|
|
882
|
-
"resolved": "string",
|
|
883
|
-
"references": {}
|
|
884
|
-
},
|
|
885
|
-
"required": false,
|
|
886
|
-
"optional": true,
|
|
887
|
-
"docs": {
|
|
888
|
-
"tags": [],
|
|
889
|
-
"text": "_[Optional]_\nString to show \"by brand\" label"
|
|
890
|
-
},
|
|
891
|
-
"attribute": "by-brand-label",
|
|
892
|
-
"reflect": false,
|
|
893
|
-
"defaultValue": "'by Gataca'"
|
|
894
|
-
},
|
|
895
|
-
"waitingStartSessionLabel": {
|
|
896
|
-
"type": "string",
|
|
897
|
-
"mutable": false,
|
|
898
|
-
"complexType": {
|
|
899
|
-
"original": "string",
|
|
900
|
-
"resolved": "string",
|
|
901
|
-
"references": {}
|
|
902
|
-
},
|
|
903
|
-
"required": false,
|
|
904
|
-
"optional": true,
|
|
905
|
-
"docs": {
|
|
906
|
-
"tags": [],
|
|
907
|
-
"text": "_[Optional]_\nString to show \"waiting start session\" label"
|
|
908
|
-
},
|
|
909
|
-
"attribute": "waiting-start-session-label",
|
|
910
|
-
"reflect": false,
|
|
911
|
-
"defaultValue": "'waiting to start a session'"
|
|
912
|
-
},
|
|
913
|
-
"readQrTitle": {
|
|
914
|
-
"type": "string",
|
|
915
|
-
"mutable": false,
|
|
916
|
-
"complexType": {
|
|
917
|
-
"original": "string",
|
|
918
|
-
"resolved": "string",
|
|
919
|
-
"references": {}
|
|
920
|
-
},
|
|
921
|
-
"required": false,
|
|
922
|
-
"optional": true,
|
|
923
|
-
"docs": {
|
|
924
|
-
"tags": [],
|
|
925
|
-
"text": "_[Optional]_\nString title to show when QR already read"
|
|
926
|
-
},
|
|
927
|
-
"attribute": "read-qr-title",
|
|
928
|
-
"reflect": false,
|
|
929
|
-
"defaultValue": "'Processing...'"
|
|
930
|
-
},
|
|
931
|
-
"readQrDescription": {
|
|
932
|
-
"type": "string",
|
|
933
|
-
"mutable": false,
|
|
934
|
-
"complexType": {
|
|
935
|
-
"original": "string",
|
|
936
|
-
"resolved": "string",
|
|
937
|
-
"references": {}
|
|
938
|
-
},
|
|
939
|
-
"required": false,
|
|
940
|
-
"optional": true,
|
|
941
|
-
"docs": {
|
|
942
|
-
"tags": [],
|
|
943
|
-
"text": "_[Optional]_\nString description to show when QR already read"
|
|
944
|
-
},
|
|
945
|
-
"attribute": "read-qr-description",
|
|
946
|
-
"reflect": false,
|
|
947
|
-
"defaultValue": "'Please wait a moment'"
|
|
948
|
-
},
|
|
949
|
-
"hideQrModalDescription": {
|
|
950
|
-
"type": "boolean",
|
|
951
|
-
"mutable": false,
|
|
952
|
-
"complexType": {
|
|
953
|
-
"original": "boolean",
|
|
954
|
-
"resolved": "boolean",
|
|
955
|
-
"references": {}
|
|
956
|
-
},
|
|
957
|
-
"required": false,
|
|
958
|
-
"optional": true,
|
|
959
|
-
"docs": {
|
|
960
|
-
"tags": [],
|
|
961
|
-
"text": "_[Optional]_\nBoolean to show or not show the QR Modal description"
|
|
962
|
-
},
|
|
963
|
-
"attribute": "hide-qr-modal-description",
|
|
964
|
-
"reflect": false,
|
|
965
|
-
"defaultValue": "false"
|
|
966
|
-
},
|
|
967
|
-
"dynamicLink": {
|
|
968
|
-
"type": "boolean",
|
|
969
|
-
"mutable": false,
|
|
970
|
-
"complexType": {
|
|
971
|
-
"original": "boolean",
|
|
972
|
-
"resolved": "boolean",
|
|
973
|
-
"references": {}
|
|
974
|
-
},
|
|
975
|
-
"required": false,
|
|
976
|
-
"optional": true,
|
|
977
|
-
"docs": {
|
|
978
|
-
"tags": [],
|
|
979
|
-
"text": "_[Optional]_\nDisplay a link containing a dynamic link to invoke the wallet if closed"
|
|
980
|
-
},
|
|
981
|
-
"attribute": "dynamic-link",
|
|
982
|
-
"reflect": false,
|
|
983
|
-
"defaultValue": "true"
|
|
984
|
-
}
|
|
985
|
-
};
|
|
986
|
-
}
|
|
987
|
-
static get states() {
|
|
988
|
-
return {
|
|
989
|
-
"sessionId": {},
|
|
990
|
-
"authenticationRequest": {},
|
|
991
|
-
"sessionData": {},
|
|
992
|
-
"result": {},
|
|
993
|
-
"qrHref": {},
|
|
994
|
-
"qrShortenPending": {}
|
|
995
|
-
};
|
|
996
|
-
}
|
|
997
|
-
static get events() {
|
|
998
|
-
return [{
|
|
999
|
-
"method": "gatacaLoginCompleted",
|
|
1000
|
-
"name": "gatacaLoginCompleted",
|
|
1001
|
-
"bubbles": true,
|
|
1002
|
-
"cancelable": true,
|
|
1003
|
-
"composed": true,
|
|
1004
|
-
"docs": {
|
|
1005
|
-
"tags": [],
|
|
1006
|
-
"text": "GatacaLoginCompleted event, triggered with session data upon login success"
|
|
1007
|
-
},
|
|
1008
|
-
"complexType": {
|
|
1009
|
-
"original": "any",
|
|
1010
|
-
"resolved": "any",
|
|
1011
|
-
"references": {}
|
|
1012
|
-
}
|
|
1013
|
-
}, {
|
|
1014
|
-
"method": "gatacaLoginFailed",
|
|
1015
|
-
"name": "gatacaLoginFailed",
|
|
1016
|
-
"bubbles": true,
|
|
1017
|
-
"cancelable": true,
|
|
1018
|
-
"composed": true,
|
|
1019
|
-
"docs": {
|
|
1020
|
-
"tags": [],
|
|
1021
|
-
"text": "GatacaLoginFailed event, triggered with error upon login failure"
|
|
1022
|
-
},
|
|
1023
|
-
"complexType": {
|
|
1024
|
-
"original": "any",
|
|
1025
|
-
"resolved": "any",
|
|
1026
|
-
"references": {}
|
|
1027
|
-
}
|
|
1028
|
-
}];
|
|
1029
|
-
}
|
|
1030
|
-
static get methods() {
|
|
1031
|
-
return {
|
|
1032
|
-
"display": {
|
|
1033
|
-
"complexType": {
|
|
1034
|
-
"signature": "() => Promise<void>",
|
|
1035
|
-
"parameters": [],
|
|
1036
|
-
"references": {
|
|
1037
|
-
"Promise": {
|
|
1038
|
-
"location": "global"
|
|
1039
|
-
},
|
|
1040
|
-
"MessageEvent": {
|
|
1041
|
-
"location": "global"
|
|
1042
|
-
},
|
|
1043
|
-
"WSResponse": {
|
|
1044
|
-
"location": "import",
|
|
1045
|
-
"path": "../../utils/utils"
|
|
1046
|
-
}
|
|
1047
|
-
},
|
|
1048
|
-
"return": "Promise<void>"
|
|
1049
|
-
},
|
|
1050
|
-
"docs": {
|
|
1051
|
-
"text": "Force manually the display of a QR",
|
|
1052
|
-
"tags": []
|
|
1053
|
-
}
|
|
1054
|
-
},
|
|
1055
|
-
"stop": {
|
|
1056
|
-
"complexType": {
|
|
1057
|
-
"signature": "() => Promise<void>",
|
|
1058
|
-
"parameters": [],
|
|
1059
|
-
"references": {
|
|
1060
|
-
"Promise": {
|
|
1061
|
-
"location": "global"
|
|
1062
|
-
}
|
|
1063
|
-
},
|
|
1064
|
-
"return": "Promise<void>"
|
|
1065
|
-
},
|
|
1066
|
-
"docs": {
|
|
1067
|
-
"text": "Stop manually an ongoing session",
|
|
1068
|
-
"tags": []
|
|
1069
|
-
}
|
|
1070
|
-
},
|
|
1071
|
-
"getSessionData": {
|
|
1072
|
-
"complexType": {
|
|
1073
|
-
"signature": "() => Promise<any>",
|
|
1074
|
-
"parameters": [],
|
|
1075
|
-
"references": {
|
|
1076
|
-
"Promise": {
|
|
1077
|
-
"location": "global"
|
|
1078
|
-
}
|
|
1079
|
-
},
|
|
1080
|
-
"return": "Promise<any>"
|
|
1081
|
-
},
|
|
1082
|
-
"docs": {
|
|
1083
|
-
"text": "Retrieve manually the session data on a successful login",
|
|
1084
|
-
"tags": []
|
|
1085
|
-
}
|
|
1086
|
-
}
|
|
1087
|
-
};
|
|
1088
|
-
}
|
|
1089
|
-
static get listeners() {
|
|
1090
|
-
return [{
|
|
1091
|
-
"name": "sessionMsg",
|
|
1092
|
-
"method": "sessionMsgReceived",
|
|
1093
|
-
"target": undefined,
|
|
1094
|
-
"capture": true,
|
|
1095
|
-
"passive": false
|
|
1096
|
-
}];
|
|
1097
|
-
}
|
|
1098
|
-
}
|