@gataca/qr 0.0.14 → 0.0.16

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 (40) hide show
  1. package/dist/cjs/gat-icon-alert-0ad19b26.js +14 -0
  2. package/dist/cjs/gataca-autoqr.cjs.entry.js +1 -1
  3. package/dist/cjs/{gataca-qr_3.cjs.entry.js → gataca-qr_2.cjs.entry.js} +29 -275
  4. package/dist/cjs/gataca-qrws.cjs.entry.js +3 -2
  5. package/dist/cjs/gataca-ssibutton_2.cjs.entry.js +320 -0
  6. package/dist/cjs/gatacaqr.cjs.js +2 -2
  7. package/dist/cjs/{index-93d47a75.js → index-8638645b.js} +13 -0
  8. package/dist/cjs/loader.cjs.js +2 -2
  9. package/dist/{esm/gat-icon-alert-c9761842.js → cjs/qr-code-styling-412bbc7a.js} +2 -8
  10. package/dist/collection/components/gataca-qr/gataca-qr.js +21 -9
  11. package/dist/collection/components/gataca-qrdisplay/gataca-qrdisplay.js +1 -1
  12. package/dist/collection/components/gataca-ssibutton/gataca-ssibutton.js +2 -2
  13. package/dist/components/gataca-qr2.js +22 -11
  14. package/dist/components/gataca-qrdisplay2.js +1 -1
  15. package/dist/components/gataca-ssibutton2.js +2 -2
  16. package/dist/esm/gat-icon-alert-7b06ef3a.js +9 -0
  17. package/dist/esm/gataca-autoqr.entry.js +1 -1
  18. package/dist/esm/{gataca-qr_3.entry.js → gataca-qr_2.entry.js} +29 -274
  19. package/dist/esm/gataca-qrws.entry.js +3 -2
  20. package/dist/esm/gataca-ssibutton_2.entry.js +315 -0
  21. package/dist/esm/gatacaqr.js +2 -2
  22. package/dist/esm/{index-2be54f32.js → index-af2994f7.js} +13 -1
  23. package/dist/esm/loader.js +2 -2
  24. package/dist/{cjs/gat-icon-alert-6127161a.js → esm/qr-code-styling-0eeb38d5.js} +1 -15
  25. package/dist/gatacaqr/gatacaqr.esm.js +1 -1
  26. package/dist/gatacaqr/p-0be4566d.js +1 -0
  27. package/dist/gatacaqr/{p-0381ab9a.entry.js → p-3ca3bb1a.entry.js} +1 -1
  28. package/dist/gatacaqr/p-88af482f.entry.js +1 -0
  29. package/dist/gatacaqr/p-ba0417e2.js +2 -0
  30. package/dist/gatacaqr/p-d0b1d317.entry.js +1 -0
  31. package/dist/gatacaqr/p-d59ae0ab.entry.js +1 -0
  32. package/dist/gatacaqr/p-ea783014.js +1 -0
  33. package/package.json +1 -1
  34. package/dist/cjs/gataca-ssibuttonws.cjs.entry.js +0 -60
  35. package/dist/esm/gataca-ssibuttonws.entry.js +0 -56
  36. package/dist/gatacaqr/p-044b978b.entry.js +0 -1
  37. package/dist/gatacaqr/p-5ae5f952.js +0 -2
  38. package/dist/gatacaqr/p-8464955a.entry.js +0 -1
  39. package/dist/gatacaqr/p-bdd385ad.entry.js +0 -1
  40. package/dist/gatacaqr/p-d79c8f74.js +0 -1
@@ -0,0 +1,320 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-8638645b.js');
6
+ require('./qr-code-styling-412bbc7a.js');
7
+ const utils = require('./utils-ef28b844.js');
8
+
9
+ const gatacaSsibuttonCss = "@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}.buttonContainer{display:inline-block;text-align:right;padding:10px;position:relative}.gatacaButtonWrapper{margin:8px}.gatacaButtonWrapper .gatacaButton{display:flex;min-width:100px;padding:8px 8px;background-color:white;font-size:12px;font-family:\"Work Sans\", sans-serif;letter-spacing:1px;font-weight:2;justify-content:space-between;align-items:center;border-radius:6px;border:1px solid rgba(24, 27, 94, 0.5);color:rgba(24, 27, 94, 0.8);box-shadow:0px 1px 3px rgba(48, 48, 48, 0.15);cursor:pointer}.gatacaButtonWrapper .gatacaButton>span{margin-right:10px}.gatacaButtonWrapper .gatacaButton:hover{box-shadow:0px 2px 8px rgba(48, 48, 48, 0.1)}.gatacaButtonWrapper .buttonText{text-align:right;font-size:8px;color:rgba(24, 27, 94, 0.5);font-family:\"Helvetica Neue\", sans-serif;letter-spacing:1px;padding-right:8px;font-weight:1}.gatacaButtonWrapper .buttonImg{height:25px;width:25px;margin:0;margin-right:20px}";
10
+
11
+ const PHONE_ICON$1 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABsAAAAbCAYAAACN1PRVAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAHvSURBVHgB3ZZPTttAFMbfe3YjL7qYLopcpZXSG7Q3CDfIsqrSJpyg5QQtJ2h7glgUdVs4AeEE5AYEQSDAgtnw357Hm0hAQDaeIRFCfFKyeKPxzzPzvc+DUKCZN80GEv1ABgWOQgSdGbOwv7u0nDueV4zjTzUIKhuAZna4vdQFR828azbI0K/TI/qodaLvjlP+tLDGDCs+IKv9Lbsi7kcv0w9541Q0EREPYcoieEQ9KiyECRXHzbpBUOcnYTfPFOOaaGVx9WsLiDrSIp0iU0wFNgIx/AQyc9I/OmOjy+Y8aBvHQcDUYebewc6/Xtk8J5htcg5efEPGhk0JtqkyBjo7DuZcnuO2sqCyKv8rUDmfTS9IBURqBAL+I6CkzBjOMOs22TLY21n8fl17KzXR3uDvb/CQk0GEdfvN07QvpnAOaGfYaRT25JzU6+rnG2tTpcWAy+Cp0m3U/URLms8HWfg/rn6RFaGSs9KQkZMpvGBWNs2Vandt46ac6YNBuc0fDLMaOU5DFybQ8039p/KJ4bq4rwPewtqoM/1gsCm/NfBXvWjgHhhuDAeLyd3qVSifHQULeZkou9EqemLhmUmav8qrZ4GEMGA7ivzjKvfeqGptFV2YdWPMPHHq0cCh3DdpVdLl/XCY9J1gVvbCiWa6N+JLocPFjCsx9cAAAAAASUVORK5CYII=";
12
+ //Default values
13
+ const DEFAULT_SESSION_TIMEOUT = 300; //5mins as in connect
14
+ const DEFAULT_POLLING_FREQ = 3;
15
+ const GatacaSSIButton = class {
16
+ constructor(hostRef) {
17
+ index.registerInstance(this, hostRef);
18
+ this.gatacaLoginCompleted = index.createEvent(this, "gatacaLoginCompleted", 7);
19
+ this.gatacaLoginFailed = index.createEvent(this, "gatacaLoginFailed", 7);
20
+ this.qrId = undefined;
21
+ this.buttonText = "Easy login";
22
+ this.autostart = true;
23
+ this.checkStatus = undefined;
24
+ this.createSession = undefined;
25
+ this.successCallback = undefined;
26
+ this.errorCallback = undefined;
27
+ this.handleCheckAppLoading = undefined;
28
+ this.checkAppTimeout = 6;
29
+ this.qrRole = undefined;
30
+ this.callbackServer = undefined;
31
+ this.sessionTimeout = undefined;
32
+ this.pollingFrequency = undefined;
33
+ this.autorefresh = false;
34
+ this.v = "3";
35
+ this.qrModalTitle = "Quick Access";
36
+ this.modalTitleColor = "#4745B7";
37
+ this.qrModalDescription = "Sign up or sign in by scanning the QR Code with the Gataca Wallet";
38
+ this.hideBrandTitle = false;
39
+ this.dynamicLink = true;
40
+ this.logoSize = 0;
41
+ this.logoSrc = undefined;
42
+ this.qrCodeExpiredLabel = "QR Code expired";
43
+ this.credentialsNotValidatedLabel = "User credentials not validated";
44
+ this.clickInsideBoxLabel = "Click inside the box to";
45
+ this.refreshQrLabel = "Refresh QR Code";
46
+ this.scanQrLabel = "Scan QR Code";
47
+ this.userNotScanInTimeErrorLabel = "User did not scan the QR in the allowed time";
48
+ this.credsNotValidatedErrorLabel = "Provided user credentials couldn't be validated";
49
+ this.failedLoginErrorLabel = "No successful login";
50
+ this.successLoginLabel = "Successful Connection!";
51
+ this.byBrandLabel = "by Gataca";
52
+ this.waitingStartSessionLabel = "waiting to start a session";
53
+ this.hideQrModalDescription = false;
54
+ this.open = false;
55
+ this.sessionId = undefined;
56
+ this.authenticationRequest = undefined;
57
+ this.sessionData = undefined;
58
+ this.result = utils.RESULT_STATUS.NOT_STARTED;
59
+ // console.log("qrId2", this.qrId);
60
+ this.qr = (index.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 }));
61
+ this.qr.qrId = this.qrId;
62
+ }
63
+ /**
64
+ * Retrieve manually the session data on a successful login
65
+ */
66
+ async getSessionData() {
67
+ return this.qr.getSessionData();
68
+ }
69
+ async getSessionId() {
70
+ if (this.sessionId) {
71
+ return this.sessionId;
72
+ }
73
+ let { sessionId, authenticationRequest } = await this.createSession();
74
+ this.sessionId = sessionId;
75
+ this.authenticationRequest = authenticationRequest;
76
+ return this.sessionId;
77
+ }
78
+ /**
79
+ * Force manually the start polling
80
+ */
81
+ async startMobilePolling() {
82
+ await this.getSessionId();
83
+ this.result = utils.RESULT_STATUS.ONGOING;
84
+ this.poll()
85
+ .then((data) => {
86
+ this.result = utils.RESULT_STATUS.SUCCESS;
87
+ this.sessionData = data;
88
+ this.gatacaLoginCompleted.emit(data);
89
+ this.successCallback(data);
90
+ })
91
+ .catch((err) => {
92
+ this.clean();
93
+ let expired = err === utils.RESULT_STATUS.EXPIRED;
94
+ if (expired && this.autorefresh) {
95
+ this.startMobilePolling();
96
+ }
97
+ else {
98
+ if (err !== utils.RESULT_STATUS.NOT_STARTED) {
99
+ let error = expired
100
+ ? new Error(this.userNotScanInTimeErrorLabel)
101
+ : new Error(this.credsNotValidatedErrorLabel);
102
+ this.result = err;
103
+ this.gatacaLoginFailed.emit(error);
104
+ this.errorCallback(error);
105
+ }
106
+ }
107
+ });
108
+ }
109
+ /**
110
+ * Stop manually an ongoing session
111
+ */
112
+ async stop() {
113
+ this.clean();
114
+ if (this.result === utils.RESULT_STATUS.ONGOING || utils.RESULT_STATUS.READ) {
115
+ this.result = utils.RESULT_STATUS.NOT_STARTED;
116
+ }
117
+ }
118
+ clean() {
119
+ this.sessionData = undefined;
120
+ this.sessionId = undefined;
121
+ }
122
+ renderModal() {
123
+ return this.qr;
124
+ }
125
+ async poll() {
126
+ let endTime = new Date().getTime() +
127
+ (this.sessionTimeout || DEFAULT_SESSION_TIMEOUT) * 1000;
128
+ let interval = (this.pollingFrequency || DEFAULT_POLLING_FREQ) * 1000;
129
+ let checkFunc = async (component) => {
130
+ if (component.result === utils.RESULT_STATUS.NOT_STARTED) {
131
+ return { result: utils.RESULT_STATUS.NOT_STARTED };
132
+ }
133
+ let id = await component.getSessionId();
134
+ return component.checkStatus(id);
135
+ };
136
+ let component = this;
137
+ let checkCondition = async function (resolve, reject) {
138
+ // If the condition is met, we're done!
139
+ let { result, data } = await checkFunc(component);
140
+ switch (result) {
141
+ case utils.RESULT_STATUS.SUCCESS:
142
+ resolve(data);
143
+ break;
144
+ case utils.RESULT_STATUS.READ:
145
+ component.result = utils.RESULT_STATUS.READ;
146
+ case utils.RESULT_STATUS.ONGOING:
147
+ if (component.sessionTimeout > 0 && new Date().getTime() < endTime) {
148
+ setTimeout(checkCondition, interval, resolve, reject);
149
+ }
150
+ else {
151
+ reject(utils.RESULT_STATUS.EXPIRED);
152
+ }
153
+ break;
154
+ default:
155
+ reject(result);
156
+ break;
157
+ }
158
+ };
159
+ return new Promise(checkCondition);
160
+ }
161
+ isAppInstalled(appScheme, callback) {
162
+ let timeout;
163
+ let detected = false;
164
+ if (appScheme === null || appScheme === void 0 ? void 0 : appScheme.length) {
165
+ window.location.href = appScheme;
166
+ }
167
+ const waitTimeToCheckApp = this.checkAppTimeout * 1000;
168
+ timeout = setTimeout(() => {
169
+ if (!detected) {
170
+ callback(false);
171
+ }
172
+ cleanup();
173
+ }, waitTimeToCheckApp);
174
+ const handleVisibilityChange = () => {
175
+ if (document.hidden) {
176
+ detected = true;
177
+ callback(true);
178
+ if (!this.autostart) {
179
+ this.startMobilePolling();
180
+ }
181
+ cleanup();
182
+ }
183
+ };
184
+ document.addEventListener("visibilitychange", handleVisibilityChange);
185
+ function cleanup() {
186
+ clearTimeout(timeout);
187
+ document.removeEventListener("visibilitychange", handleVisibilityChange);
188
+ }
189
+ }
190
+ renderDesktopButton() {
191
+ // console.log("this.qrId333", this.qrId);
192
+ return (index.h("div", { class: "gatacaButtonWrapper" }, index.h("button", { class: "gatacaButton", onClick: () => {
193
+ this.open = !this.open;
194
+ setTimeout(() => {
195
+ var _a, _b;
196
+ this.qrElement.id = this.qrId;
197
+ if (this.open) {
198
+ (_a = this.qrElement) === null || _a === void 0 ? void 0 : _a.display();
199
+ }
200
+ else {
201
+ (_b = this.qrElement) === null || _b === void 0 ? void 0 : _b.stop();
202
+ }
203
+ }, 0);
204
+ } }, index.h("img", { src: PHONE_ICON$1, class: "buttonImg", alt: this.buttonText }), index.h("span", null, this.buttonText))));
205
+ }
206
+ async getAuthRequest() {
207
+ let { authenticationRequest } = await this.createSession();
208
+ return authenticationRequest;
209
+ }
210
+ renderMobileButton(isAndroid, isIos) {
211
+ if (this.autostart) {
212
+ this.startMobilePolling();
213
+ }
214
+ let loading = false;
215
+ const handleLoading = (isLoading) => {
216
+ loading = isLoading;
217
+ if (this.handleCheckAppLoading) {
218
+ this.handleCheckAppLoading(isLoading);
219
+ }
220
+ };
221
+ const executeRedirection = async () => {
222
+ handleLoading(true);
223
+ const androidStoreLink = "https://play.google.com/store/apps/details?id=com.gataca.identity";
224
+ const iosStoreLink = "https://apps.apple.com/us/app/gataca/id1498607616";
225
+ try {
226
+ const appScheme = await this.getAuthRequest();
227
+ this.isAppInstalled(appScheme, (installed) => {
228
+ if (!installed) {
229
+ this.stop();
230
+ if (isAndroid) {
231
+ window.location.href = androidStoreLink;
232
+ }
233
+ else if (isIos) {
234
+ window.location.href = iosStoreLink;
235
+ }
236
+ }
237
+ handleLoading(false);
238
+ });
239
+ }
240
+ catch (error) {
241
+ this.stop();
242
+ handleLoading(false);
243
+ }
244
+ };
245
+ return (index.h("div", { class: "gatacaButtonWrapper" }, index.h("button", { class: "gatacaButton", onClick: () => {
246
+ executeRedirection();
247
+ }, disabled: loading }, index.h("img", { src: PHONE_ICON$1, class: "buttonImg", alt: this.buttonText }), index.h("span", null, this.buttonText))));
248
+ }
249
+ render() {
250
+ const userAgent =
251
+ // @ts-ignore
252
+ (navigator === null || navigator === void 0 ? void 0 : navigator.userAgent) || (navigator === null || navigator === void 0 ? void 0 : navigator.vendor) || (window === null || window === void 0 ? void 0 : window.opera);
253
+ const isAndroid = /android/i.test(userAgent);
254
+ const isIos =
255
+ // @ts-ignore
256
+ (/iPad|iPhone|iPod/.test(userAgent) && !window.MSStream) ||
257
+ (navigator.platform === "MacIntel" && navigator.maxTouchPoints > 1);
258
+ const isMobile = isAndroid || isIos;
259
+ return (index.h("div", { class: "buttonContainer" }, isMobile && this.v === "3"
260
+ ? this.renderMobileButton(isAndroid, isIos)
261
+ : this.renderDesktopButton(), this.open && (!isMobile || this.v === "3") && this.renderModal()));
262
+ }
263
+ };
264
+ GatacaSSIButton.style = gatacaSsibuttonCss;
265
+
266
+ const gatacaSsibuttonwsCss = "@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}.buttonContainer{display:inline-block;text-align:right;padding:10px;position:relative}.gatacaButtonWrapper{margin:8px}.gatacaButtonWrapper .gatacaButton{display:flex;min-width:100px;padding:8px 8px;background-color:white;font-size:12px;font-family:\"Work Sans\", sans-serif;letter-spacing:1px;font-weight:2;justify-content:space-between;align-items:center;border-radius:6px;border:1px solid rgba(24, 27, 94, 0.5);color:rgba(24, 27, 94, 0.8);box-shadow:0px 1px 3px rgba(48, 48, 48, 0.15);cursor:pointer}.gatacaButtonWrapper .gatacaButton>span{margin-right:10px}.gatacaButtonWrapper .gatacaButton:hover{box-shadow:0px 2px 8px rgba(48, 48, 48, 0.1)}.gatacaButtonWrapper .buttonText{text-align:right;font-size:8px;color:rgba(24, 27, 94, 0.5);font-family:\"Helvetica Neue\", sans-serif;letter-spacing:1px;padding-right:8px;font-weight:1}.gatacaButtonWrapper .buttonImg{height:25px;width:25px;margin:0;margin-right:20px}";
267
+
268
+ const PHONE_ICON = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABsAAAAbCAYAAACN1PRVAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAHvSURBVHgB3ZZPTttAFMbfe3YjL7qYLopcpZXSG7Q3CDfIsqrSJpyg5QQtJ2h7glgUdVs4AeEE5AYEQSDAgtnw357Hm0hAQDaeIRFCfFKyeKPxzzPzvc+DUKCZN80GEv1ABgWOQgSdGbOwv7u0nDueV4zjTzUIKhuAZna4vdQFR828azbI0K/TI/qodaLvjlP+tLDGDCs+IKv9Lbsi7kcv0w9541Q0EREPYcoieEQ9KiyECRXHzbpBUOcnYTfPFOOaaGVx9WsLiDrSIp0iU0wFNgIx/AQyc9I/OmOjy+Y8aBvHQcDUYebewc6/Xtk8J5htcg5efEPGhk0JtqkyBjo7DuZcnuO2sqCyKv8rUDmfTS9IBURqBAL+I6CkzBjOMOs22TLY21n8fl17KzXR3uDvb/CQk0GEdfvN07QvpnAOaGfYaRT25JzU6+rnG2tTpcWAy+Cp0m3U/URLms8HWfg/rn6RFaGSs9KQkZMpvGBWNs2Vandt46ac6YNBuc0fDLMaOU5DFybQ8039p/KJ4bq4rwPewtqoM/1gsCm/NfBXvWjgHhhuDAeLyd3qVSifHQULeZkou9EqemLhmUmav8qrZ4GEMGA7ivzjKvfeqGptFV2YdWPMPHHq0cCh3DdpVdLl/XCY9J1gVvbCiWa6N+JLocPFjCsx9cAAAAAASUVORK5CYII=";
269
+ const GatacaSSIButtonWS = class {
270
+ constructor(hostRef) {
271
+ index.registerInstance(this, hostRef);
272
+ this.gatacaLoginCompleted = index.createEvent(this, "gatacaLoginCompleted", 7);
273
+ this.gatacaLoginFailed = index.createEvent(this, "gatacaLoginFailed", 7);
274
+ this.buttonText = "Easy login";
275
+ this.successCallback = undefined;
276
+ this.errorCallback = undefined;
277
+ this.qrRole = undefined;
278
+ this.callbackServer = undefined;
279
+ this.socketEndpoint = undefined;
280
+ this.sessionTimeout = undefined;
281
+ this.wsOnOpen = undefined;
282
+ this.wsOnMessage = undefined;
283
+ this.autostart = true;
284
+ this.autorefresh = false;
285
+ this.v = "3";
286
+ this.qrModalTitle = "Quick Access";
287
+ this.qrModalDescription = "Sign up or sign in by scanning the QR Code with the Gataca Wallet";
288
+ this.hideBrandTitle = false;
289
+ this.dynamicLink = true;
290
+ this.open = false;
291
+ this.qr = (index.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 }));
292
+ }
293
+ /**
294
+ * Retrieve manually the session data on a successful login
295
+ */
296
+ async getSessionData() {
297
+ return this.qr.getSessionData();
298
+ }
299
+ renderModal() {
300
+ return this.qr;
301
+ }
302
+ renderButton() {
303
+ return (index.h("div", { class: "gatacaButtonWrapper" }, index.h("button", { class: "gatacaButton", onClick: () => {
304
+ this.open = !this.open;
305
+ if (this.open) {
306
+ this.qr.display();
307
+ }
308
+ else {
309
+ this.qr.stop();
310
+ }
311
+ } }, index.h("img", { src: PHONE_ICON, class: "buttonImg", alt: this.buttonText }), index.h("span", null, this.buttonText))));
312
+ }
313
+ render() {
314
+ return (index.h("div", { class: "buttonContainer" }, this.renderButton(), this.open && this.renderModal()));
315
+ }
316
+ };
317
+ GatacaSSIButtonWS.style = gatacaSsibuttonwsCss;
318
+
319
+ exports.gataca_ssibutton = GatacaSSIButton;
320
+ exports.gataca_ssibuttonws = GatacaSSIButtonWS;
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const index = require('./index-93d47a75.js');
3
+ const index = require('./index-8638645b.js');
4
4
 
5
5
  /*
6
6
  Stencil Client Patch Browser v2.19.3 | MIT Licensed | https://stenciljs.com
@@ -15,5 +15,5 @@ const patchBrowser = () => {
15
15
  };
16
16
 
17
17
  patchBrowser().then(options => {
18
- return index.bootstrapLazy([["gataca-qr_3.cjs",[[1,"gataca-ssibutton",{"qrId":[1,"qr-id"],"buttonText":[1,"button-text"],"autostart":[4],"checkStatus":[16],"createSession":[16],"successCallback":[16],"errorCallback":[16],"handleCheckAppLoading":[16],"checkAppTimeout":[2,"check-app-timeout"],"qrRole":[1,"qr-role"],"callbackServer":[1,"callback-server"],"sessionTimeout":[2,"session-timeout"],"pollingFrequency":[2,"polling-frequency"],"autorefresh":[4],"v":[1],"qrModalTitle":[1,"qr-modal-title"],"modalTitleColor":[1,"modal-title-color"],"qrModalDescription":[1,"qr-modal-description"],"hideBrandTitle":[4,"hide-brand-title"],"dynamicLink":[4,"dynamic-link"],"logoSize":[2,"logo-size"],"logoSrc":[1,"logo-src"],"qrCodeExpiredLabel":[1,"qr-code-expired-label"],"credentialsNotValidatedLabel":[1,"credentials-not-validated-label"],"clickInsideBoxLabel":[1,"click-inside-box-label"],"refreshQrLabel":[1,"refresh-qr-label"],"scanQrLabel":[1,"scan-qr-label"],"userNotScanInTimeErrorLabel":[1,"user-not-scan-in-time-error-label"],"credsNotValidatedErrorLabel":[1,"creds-not-validated-error-label"],"failedLoginErrorLabel":[1,"failed-login-error-label"],"successLoginLabel":[1,"success-login-label"],"byBrandLabel":[1,"by-brand-label"],"waitingStartSessionLabel":[1,"waiting-start-session-label"],"hideQrModalDescription":[4,"hide-qr-modal-description"],"open":[32],"sessionId":[32],"authenticationRequest":[32],"sessionData":[32],"result":[32],"getSessionData":[64],"startMobilePolling":[64],"stop":[64]}],[0,"gataca-qr",{"checkStatus":[16],"createSession":[16],"successCallback":[16],"errorCallback":[16],"qrId":[1,"qr-id"],"qrRole":[1,"qr-role"],"callbackServer":[1,"callback-server"],"autostart":[4],"autorefresh":[4],"v":[1],"qrModalTitle":[1,"qr-modal-title"],"modalTitleColor":[1,"modal-title-color"],"qrModalDescription":[1,"qr-modal-description"],"hideModalTexts":[4,"hide-modal-texts"],"hideModalBoxShadow":[4,"hide-modal-box-shadow"],"hideBrandTitle":[4,"hide-brand-title"],"logoSize":[2,"logo-size"],"logoSrc":[1,"logo-src"],"qrSize":[2,"qr-size"],"modalWidth":[2,"modal-width"],"modalHeight":[2,"modal-height"],"qrCodeExpiredLabel":[1,"qr-code-expired-label"],"credentialsNotValidatedLabel":[1,"credentials-not-validated-label"],"clickInsideBoxLabel":[1,"click-inside-box-label"],"refreshQrLabel":[1,"refresh-qr-label"],"scanQrLabel":[1,"scan-qr-label"],"userNotScanInTimeErrorLabel":[1,"user-not-scan-in-time-error-label"],"credsNotValidatedErrorLabel":[1,"creds-not-validated-error-label"],"failedLoginErrorLabel":[1,"failed-login-error-label"],"successLoginLabel":[1,"success-login-label"],"byBrandLabel":[1,"by-brand-label"],"waitingStartSessionLabel":[1,"waiting-start-session-label"],"readQrTitle":[1,"read-qr-title"],"readQrDescription":[1,"read-qr-description"],"hideQrModalDescription":[4,"hide-qr-modal-description"],"sessionTimeout":[2,"session-timeout"],"pollingFrequency":[2,"polling-frequency"],"dynamicLink":[4,"dynamic-link"],"sessionId":[32],"authenticationRequest":[32],"sessionData":[32],"result":[32],"display":[64],"stop":[64],"getSessionData":[64]}],[0,"gataca-qrdisplay",{"qrId":[1,"qr-id"],"qrData":[1,"qr-data"],"size":[2],"logoSize":[2,"logo-size"],"logoSrc":[1,"logo-src"],"qrColor":[1,"qr-color"],"rounded":[4]}]]],["gataca-qrws.cjs",[[1,"gataca-qrws",{"successCallback":[16],"errorCallback":[16],"qrRole":[1,"qr-role"],"callbackServer":[1,"callback-server"],"socketEndpoint":[1,"socket-endpoint"],"sessionTimeout":[2,"session-timeout"],"wsOnOpen":[16],"wsOnMessage":[16],"autostart":[4],"autorefresh":[4],"v":[1],"qrModalTitle":[1,"qr-modal-title"],"modalTitleColor":[1,"modal-title-color"],"qrModalDescription":[1,"qr-modal-description"],"hideModalTexts":[4,"hide-modal-texts"],"hideModalBoxShadow":[4,"hide-modal-box-shadow"],"hideBrandTitle":[4,"hide-brand-title"],"logoSize":[2,"logo-size"],"logoSrc":[1,"logo-src"],"qrSize":[2,"qr-size"],"modalWidth":[2,"modal-width"],"modalHeight":[2,"modal-height"],"qrCodeExpiredLabel":[1,"qr-code-expired-label"],"credentialsNotValidatedLabel":[1,"credentials-not-validated-label"],"clickInsideBoxLabel":[1,"click-inside-box-label"],"refreshQrLabel":[1,"refresh-qr-label"],"scanQrLabel":[1,"scan-qr-label"],"userNotScanInTimeErrorLabel":[1,"user-not-scan-in-time-error-label"],"credsNotValidatedErrorLabel":[1,"creds-not-validated-error-label"],"failedLoginErrorLabel":[1,"failed-login-error-label"],"successLoginLabel":[1,"success-login-label"],"byBrandLabel":[1,"by-brand-label"],"waitingStartSessionLabel":[1,"waiting-start-session-label"],"readQrTitle":[1,"read-qr-title"],"readQrDescription":[1,"read-qr-description"],"hideQrModalDescription":[4,"hide-qr-modal-description"],"dynamicLink":[4,"dynamic-link"],"sessionId":[32],"authenticationRequest":[32],"sessionData":[32],"result":[32],"display":[64],"stop":[64],"getSessionData":[64]},[[2,"sessionMsg","sessionMsgReceived"]]]]],["gataca-ssibuttonws.cjs",[[1,"gataca-ssibuttonws",{"buttonText":[1,"button-text"],"successCallback":[16],"errorCallback":[16],"qrRole":[1,"qr-role"],"callbackServer":[1,"callback-server"],"socketEndpoint":[1,"socket-endpoint"],"sessionTimeout":[2,"session-timeout"],"wsOnOpen":[16],"wsOnMessage":[16],"autostart":[4],"autorefresh":[4],"v":[1],"qrModalTitle":[1,"qr-modal-title"],"qrModalDescription":[1,"qr-modal-description"],"hideBrandTitle":[4,"hide-brand-title"],"dynamicLink":[4,"dynamic-link"],"open":[32],"getSessionData":[64]}]]],["gataca-autoqr.cjs",[[1,"gataca-autoqr",{"configId":[1,"config-id"],"configRepository":[1,"config-repository"],"successCallback":[16],"errorCallback":[16],"checkStatus":[16],"createSession":[16],"wsOnOpen":[16],"wsOnMessage":[16],"config":[32],"loading":[32],"getSessionData":[64]}]]]], options);
18
+ return index.bootstrapLazy([["gataca-qr_2.cjs",[[1,"gataca-qr",{"checkStatus":[16],"createSession":[16],"successCallback":[16],"errorCallback":[16],"qrId":[1,"qr-id"],"qrRole":[1,"qr-role"],"callbackServer":[1,"callback-server"],"autostart":[4],"autorefresh":[4],"v":[1],"qrModalTitle":[1,"qr-modal-title"],"modalTitleColor":[1,"modal-title-color"],"qrModalDescription":[1,"qr-modal-description"],"hideModalTexts":[4,"hide-modal-texts"],"hideModalBoxShadow":[4,"hide-modal-box-shadow"],"hideBrandTitle":[4,"hide-brand-title"],"logoSize":[2,"logo-size"],"logoSrc":[1,"logo-src"],"qrSize":[2,"qr-size"],"modalWidth":[2,"modal-width"],"modalHeight":[2,"modal-height"],"qrCodeExpiredLabel":[1,"qr-code-expired-label"],"credentialsNotValidatedLabel":[1,"credentials-not-validated-label"],"clickInsideBoxLabel":[1,"click-inside-box-label"],"refreshQrLabel":[1,"refresh-qr-label"],"scanQrLabel":[1,"scan-qr-label"],"userNotScanInTimeErrorLabel":[1,"user-not-scan-in-time-error-label"],"credsNotValidatedErrorLabel":[1,"creds-not-validated-error-label"],"failedLoginErrorLabel":[1,"failed-login-error-label"],"successLoginLabel":[1,"success-login-label"],"byBrandLabel":[1,"by-brand-label"],"waitingStartSessionLabel":[1,"waiting-start-session-label"],"readQrTitle":[1,"read-qr-title"],"readQrDescription":[1,"read-qr-description"],"hideQrModalDescription":[4,"hide-qr-modal-description"],"sessionTimeout":[2,"session-timeout"],"pollingFrequency":[2,"polling-frequency"],"dynamicLink":[4,"dynamic-link"],"sessionId":[32],"authenticationRequest":[32],"sessionData":[32],"result":[32],"display":[64],"stop":[64],"getSessionData":[64]}],[0,"gataca-qrdisplay",{"qrId":[1,"qr-id"],"qrData":[1,"qr-data"],"size":[2],"logoSize":[2,"logo-size"],"logoSrc":[1,"logo-src"],"qrColor":[1,"qr-color"],"rounded":[4]}]]],["gataca-qrws.cjs",[[1,"gataca-qrws",{"successCallback":[16],"errorCallback":[16],"qrRole":[1,"qr-role"],"callbackServer":[1,"callback-server"],"socketEndpoint":[1,"socket-endpoint"],"sessionTimeout":[2,"session-timeout"],"wsOnOpen":[16],"wsOnMessage":[16],"autostart":[4],"autorefresh":[4],"v":[1],"qrModalTitle":[1,"qr-modal-title"],"modalTitleColor":[1,"modal-title-color"],"qrModalDescription":[1,"qr-modal-description"],"hideModalTexts":[4,"hide-modal-texts"],"hideModalBoxShadow":[4,"hide-modal-box-shadow"],"hideBrandTitle":[4,"hide-brand-title"],"logoSize":[2,"logo-size"],"logoSrc":[1,"logo-src"],"qrSize":[2,"qr-size"],"modalWidth":[2,"modal-width"],"modalHeight":[2,"modal-height"],"qrCodeExpiredLabel":[1,"qr-code-expired-label"],"credentialsNotValidatedLabel":[1,"credentials-not-validated-label"],"clickInsideBoxLabel":[1,"click-inside-box-label"],"refreshQrLabel":[1,"refresh-qr-label"],"scanQrLabel":[1,"scan-qr-label"],"userNotScanInTimeErrorLabel":[1,"user-not-scan-in-time-error-label"],"credsNotValidatedErrorLabel":[1,"creds-not-validated-error-label"],"failedLoginErrorLabel":[1,"failed-login-error-label"],"successLoginLabel":[1,"success-login-label"],"byBrandLabel":[1,"by-brand-label"],"waitingStartSessionLabel":[1,"waiting-start-session-label"],"readQrTitle":[1,"read-qr-title"],"readQrDescription":[1,"read-qr-description"],"hideQrModalDescription":[4,"hide-qr-modal-description"],"dynamicLink":[4,"dynamic-link"],"sessionId":[32],"authenticationRequest":[32],"sessionData":[32],"result":[32],"display":[64],"stop":[64],"getSessionData":[64]},[[2,"sessionMsg","sessionMsgReceived"]]]]],["gataca-ssibutton_2.cjs",[[1,"gataca-ssibutton",{"qrId":[1,"qr-id"],"buttonText":[1,"button-text"],"autostart":[4],"checkStatus":[16],"createSession":[16],"successCallback":[16],"errorCallback":[16],"handleCheckAppLoading":[16],"checkAppTimeout":[2,"check-app-timeout"],"qrRole":[1,"qr-role"],"callbackServer":[1,"callback-server"],"sessionTimeout":[2,"session-timeout"],"pollingFrequency":[2,"polling-frequency"],"autorefresh":[4],"v":[1],"qrModalTitle":[1,"qr-modal-title"],"modalTitleColor":[1,"modal-title-color"],"qrModalDescription":[1,"qr-modal-description"],"hideBrandTitle":[4,"hide-brand-title"],"dynamicLink":[4,"dynamic-link"],"logoSize":[2,"logo-size"],"logoSrc":[1,"logo-src"],"qrCodeExpiredLabel":[1,"qr-code-expired-label"],"credentialsNotValidatedLabel":[1,"credentials-not-validated-label"],"clickInsideBoxLabel":[1,"click-inside-box-label"],"refreshQrLabel":[1,"refresh-qr-label"],"scanQrLabel":[1,"scan-qr-label"],"userNotScanInTimeErrorLabel":[1,"user-not-scan-in-time-error-label"],"credsNotValidatedErrorLabel":[1,"creds-not-validated-error-label"],"failedLoginErrorLabel":[1,"failed-login-error-label"],"successLoginLabel":[1,"success-login-label"],"byBrandLabel":[1,"by-brand-label"],"waitingStartSessionLabel":[1,"waiting-start-session-label"],"hideQrModalDescription":[4,"hide-qr-modal-description"],"open":[32],"sessionId":[32],"authenticationRequest":[32],"sessionData":[32],"result":[32],"getSessionData":[64],"startMobilePolling":[64],"stop":[64]}],[1,"gataca-ssibuttonws",{"buttonText":[1,"button-text"],"successCallback":[16],"errorCallback":[16],"qrRole":[1,"qr-role"],"callbackServer":[1,"callback-server"],"socketEndpoint":[1,"socket-endpoint"],"sessionTimeout":[2,"session-timeout"],"wsOnOpen":[16],"wsOnMessage":[16],"autostart":[4],"autorefresh":[4],"v":[1],"qrModalTitle":[1,"qr-modal-title"],"qrModalDescription":[1,"qr-modal-description"],"hideBrandTitle":[4,"hide-brand-title"],"dynamicLink":[4,"dynamic-link"],"open":[32],"getSessionData":[64]}]]],["gataca-autoqr.cjs",[[1,"gataca-autoqr",{"configId":[1,"config-id"],"configRepository":[1,"config-repository"],"successCallback":[16],"errorCallback":[16],"checkStatus":[16],"createSession":[16],"wsOnOpen":[16],"wsOnMessage":[16],"config":[32],"loading":[32],"getSessionData":[64]}]]]], options);
19
19
  });
@@ -941,6 +941,18 @@ const postUpdateComponent = (hostRef) => {
941
941
  // ( •_•)>⌐■-■
942
942
  // (⌐■_■)
943
943
  };
944
+ const forceUpdate = (ref) => {
945
+ {
946
+ const hostRef = getHostRef(ref);
947
+ const isConnected = hostRef.$hostElement$.isConnected;
948
+ if (isConnected &&
949
+ (hostRef.$flags$ & (2 /* HOST_FLAGS.hasRendered */ | 16 /* HOST_FLAGS.isQueuedForUpdate */)) === 2 /* HOST_FLAGS.hasRendered */) {
950
+ scheduleUpdate(hostRef, false);
951
+ }
952
+ // Returns "true" when the forced update was successfully scheduled
953
+ return isConnected;
954
+ }
955
+ };
944
956
  const appDidLoad = (who) => {
945
957
  // on appload
946
958
  // we have finish the first big initial render
@@ -1464,6 +1476,7 @@ const writeTask = /*@__PURE__*/ queueTask(queueDomWrites, true);
1464
1476
 
1465
1477
  exports.bootstrapLazy = bootstrapLazy;
1466
1478
  exports.createEvent = createEvent;
1479
+ exports.forceUpdate = forceUpdate;
1467
1480
  exports.h = h;
1468
1481
  exports.promiseResolve = promiseResolve;
1469
1482
  exports.registerInstance = registerInstance;
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-93d47a75.js');
5
+ const index = require('./index-8638645b.js');
6
6
 
7
7
  /*
8
8
  Stencil Client Patch Esm v2.19.3 | MIT Licensed | https://stenciljs.com
@@ -14,7 +14,7 @@ const patchEsm = () => {
14
14
  const defineCustomElements = (win, options) => {
15
15
  if (typeof window === 'undefined') return Promise.resolve();
16
16
  return patchEsm().then(() => {
17
- return index.bootstrapLazy([["gataca-qr_3.cjs",[[1,"gataca-ssibutton",{"qrId":[1,"qr-id"],"buttonText":[1,"button-text"],"autostart":[4],"checkStatus":[16],"createSession":[16],"successCallback":[16],"errorCallback":[16],"handleCheckAppLoading":[16],"checkAppTimeout":[2,"check-app-timeout"],"qrRole":[1,"qr-role"],"callbackServer":[1,"callback-server"],"sessionTimeout":[2,"session-timeout"],"pollingFrequency":[2,"polling-frequency"],"autorefresh":[4],"v":[1],"qrModalTitle":[1,"qr-modal-title"],"modalTitleColor":[1,"modal-title-color"],"qrModalDescription":[1,"qr-modal-description"],"hideBrandTitle":[4,"hide-brand-title"],"dynamicLink":[4,"dynamic-link"],"logoSize":[2,"logo-size"],"logoSrc":[1,"logo-src"],"qrCodeExpiredLabel":[1,"qr-code-expired-label"],"credentialsNotValidatedLabel":[1,"credentials-not-validated-label"],"clickInsideBoxLabel":[1,"click-inside-box-label"],"refreshQrLabel":[1,"refresh-qr-label"],"scanQrLabel":[1,"scan-qr-label"],"userNotScanInTimeErrorLabel":[1,"user-not-scan-in-time-error-label"],"credsNotValidatedErrorLabel":[1,"creds-not-validated-error-label"],"failedLoginErrorLabel":[1,"failed-login-error-label"],"successLoginLabel":[1,"success-login-label"],"byBrandLabel":[1,"by-brand-label"],"waitingStartSessionLabel":[1,"waiting-start-session-label"],"hideQrModalDescription":[4,"hide-qr-modal-description"],"open":[32],"sessionId":[32],"authenticationRequest":[32],"sessionData":[32],"result":[32],"getSessionData":[64],"startMobilePolling":[64],"stop":[64]}],[0,"gataca-qr",{"checkStatus":[16],"createSession":[16],"successCallback":[16],"errorCallback":[16],"qrId":[1,"qr-id"],"qrRole":[1,"qr-role"],"callbackServer":[1,"callback-server"],"autostart":[4],"autorefresh":[4],"v":[1],"qrModalTitle":[1,"qr-modal-title"],"modalTitleColor":[1,"modal-title-color"],"qrModalDescription":[1,"qr-modal-description"],"hideModalTexts":[4,"hide-modal-texts"],"hideModalBoxShadow":[4,"hide-modal-box-shadow"],"hideBrandTitle":[4,"hide-brand-title"],"logoSize":[2,"logo-size"],"logoSrc":[1,"logo-src"],"qrSize":[2,"qr-size"],"modalWidth":[2,"modal-width"],"modalHeight":[2,"modal-height"],"qrCodeExpiredLabel":[1,"qr-code-expired-label"],"credentialsNotValidatedLabel":[1,"credentials-not-validated-label"],"clickInsideBoxLabel":[1,"click-inside-box-label"],"refreshQrLabel":[1,"refresh-qr-label"],"scanQrLabel":[1,"scan-qr-label"],"userNotScanInTimeErrorLabel":[1,"user-not-scan-in-time-error-label"],"credsNotValidatedErrorLabel":[1,"creds-not-validated-error-label"],"failedLoginErrorLabel":[1,"failed-login-error-label"],"successLoginLabel":[1,"success-login-label"],"byBrandLabel":[1,"by-brand-label"],"waitingStartSessionLabel":[1,"waiting-start-session-label"],"readQrTitle":[1,"read-qr-title"],"readQrDescription":[1,"read-qr-description"],"hideQrModalDescription":[4,"hide-qr-modal-description"],"sessionTimeout":[2,"session-timeout"],"pollingFrequency":[2,"polling-frequency"],"dynamicLink":[4,"dynamic-link"],"sessionId":[32],"authenticationRequest":[32],"sessionData":[32],"result":[32],"display":[64],"stop":[64],"getSessionData":[64]}],[0,"gataca-qrdisplay",{"qrId":[1,"qr-id"],"qrData":[1,"qr-data"],"size":[2],"logoSize":[2,"logo-size"],"logoSrc":[1,"logo-src"],"qrColor":[1,"qr-color"],"rounded":[4]}]]],["gataca-qrws.cjs",[[1,"gataca-qrws",{"successCallback":[16],"errorCallback":[16],"qrRole":[1,"qr-role"],"callbackServer":[1,"callback-server"],"socketEndpoint":[1,"socket-endpoint"],"sessionTimeout":[2,"session-timeout"],"wsOnOpen":[16],"wsOnMessage":[16],"autostart":[4],"autorefresh":[4],"v":[1],"qrModalTitle":[1,"qr-modal-title"],"modalTitleColor":[1,"modal-title-color"],"qrModalDescription":[1,"qr-modal-description"],"hideModalTexts":[4,"hide-modal-texts"],"hideModalBoxShadow":[4,"hide-modal-box-shadow"],"hideBrandTitle":[4,"hide-brand-title"],"logoSize":[2,"logo-size"],"logoSrc":[1,"logo-src"],"qrSize":[2,"qr-size"],"modalWidth":[2,"modal-width"],"modalHeight":[2,"modal-height"],"qrCodeExpiredLabel":[1,"qr-code-expired-label"],"credentialsNotValidatedLabel":[1,"credentials-not-validated-label"],"clickInsideBoxLabel":[1,"click-inside-box-label"],"refreshQrLabel":[1,"refresh-qr-label"],"scanQrLabel":[1,"scan-qr-label"],"userNotScanInTimeErrorLabel":[1,"user-not-scan-in-time-error-label"],"credsNotValidatedErrorLabel":[1,"creds-not-validated-error-label"],"failedLoginErrorLabel":[1,"failed-login-error-label"],"successLoginLabel":[1,"success-login-label"],"byBrandLabel":[1,"by-brand-label"],"waitingStartSessionLabel":[1,"waiting-start-session-label"],"readQrTitle":[1,"read-qr-title"],"readQrDescription":[1,"read-qr-description"],"hideQrModalDescription":[4,"hide-qr-modal-description"],"dynamicLink":[4,"dynamic-link"],"sessionId":[32],"authenticationRequest":[32],"sessionData":[32],"result":[32],"display":[64],"stop":[64],"getSessionData":[64]},[[2,"sessionMsg","sessionMsgReceived"]]]]],["gataca-ssibuttonws.cjs",[[1,"gataca-ssibuttonws",{"buttonText":[1,"button-text"],"successCallback":[16],"errorCallback":[16],"qrRole":[1,"qr-role"],"callbackServer":[1,"callback-server"],"socketEndpoint":[1,"socket-endpoint"],"sessionTimeout":[2,"session-timeout"],"wsOnOpen":[16],"wsOnMessage":[16],"autostart":[4],"autorefresh":[4],"v":[1],"qrModalTitle":[1,"qr-modal-title"],"qrModalDescription":[1,"qr-modal-description"],"hideBrandTitle":[4,"hide-brand-title"],"dynamicLink":[4,"dynamic-link"],"open":[32],"getSessionData":[64]}]]],["gataca-autoqr.cjs",[[1,"gataca-autoqr",{"configId":[1,"config-id"],"configRepository":[1,"config-repository"],"successCallback":[16],"errorCallback":[16],"checkStatus":[16],"createSession":[16],"wsOnOpen":[16],"wsOnMessage":[16],"config":[32],"loading":[32],"getSessionData":[64]}]]]], options);
17
+ return index.bootstrapLazy([["gataca-qr_2.cjs",[[1,"gataca-qr",{"checkStatus":[16],"createSession":[16],"successCallback":[16],"errorCallback":[16],"qrId":[1,"qr-id"],"qrRole":[1,"qr-role"],"callbackServer":[1,"callback-server"],"autostart":[4],"autorefresh":[4],"v":[1],"qrModalTitle":[1,"qr-modal-title"],"modalTitleColor":[1,"modal-title-color"],"qrModalDescription":[1,"qr-modal-description"],"hideModalTexts":[4,"hide-modal-texts"],"hideModalBoxShadow":[4,"hide-modal-box-shadow"],"hideBrandTitle":[4,"hide-brand-title"],"logoSize":[2,"logo-size"],"logoSrc":[1,"logo-src"],"qrSize":[2,"qr-size"],"modalWidth":[2,"modal-width"],"modalHeight":[2,"modal-height"],"qrCodeExpiredLabel":[1,"qr-code-expired-label"],"credentialsNotValidatedLabel":[1,"credentials-not-validated-label"],"clickInsideBoxLabel":[1,"click-inside-box-label"],"refreshQrLabel":[1,"refresh-qr-label"],"scanQrLabel":[1,"scan-qr-label"],"userNotScanInTimeErrorLabel":[1,"user-not-scan-in-time-error-label"],"credsNotValidatedErrorLabel":[1,"creds-not-validated-error-label"],"failedLoginErrorLabel":[1,"failed-login-error-label"],"successLoginLabel":[1,"success-login-label"],"byBrandLabel":[1,"by-brand-label"],"waitingStartSessionLabel":[1,"waiting-start-session-label"],"readQrTitle":[1,"read-qr-title"],"readQrDescription":[1,"read-qr-description"],"hideQrModalDescription":[4,"hide-qr-modal-description"],"sessionTimeout":[2,"session-timeout"],"pollingFrequency":[2,"polling-frequency"],"dynamicLink":[4,"dynamic-link"],"sessionId":[32],"authenticationRequest":[32],"sessionData":[32],"result":[32],"display":[64],"stop":[64],"getSessionData":[64]}],[0,"gataca-qrdisplay",{"qrId":[1,"qr-id"],"qrData":[1,"qr-data"],"size":[2],"logoSize":[2,"logo-size"],"logoSrc":[1,"logo-src"],"qrColor":[1,"qr-color"],"rounded":[4]}]]],["gataca-qrws.cjs",[[1,"gataca-qrws",{"successCallback":[16],"errorCallback":[16],"qrRole":[1,"qr-role"],"callbackServer":[1,"callback-server"],"socketEndpoint":[1,"socket-endpoint"],"sessionTimeout":[2,"session-timeout"],"wsOnOpen":[16],"wsOnMessage":[16],"autostart":[4],"autorefresh":[4],"v":[1],"qrModalTitle":[1,"qr-modal-title"],"modalTitleColor":[1,"modal-title-color"],"qrModalDescription":[1,"qr-modal-description"],"hideModalTexts":[4,"hide-modal-texts"],"hideModalBoxShadow":[4,"hide-modal-box-shadow"],"hideBrandTitle":[4,"hide-brand-title"],"logoSize":[2,"logo-size"],"logoSrc":[1,"logo-src"],"qrSize":[2,"qr-size"],"modalWidth":[2,"modal-width"],"modalHeight":[2,"modal-height"],"qrCodeExpiredLabel":[1,"qr-code-expired-label"],"credentialsNotValidatedLabel":[1,"credentials-not-validated-label"],"clickInsideBoxLabel":[1,"click-inside-box-label"],"refreshQrLabel":[1,"refresh-qr-label"],"scanQrLabel":[1,"scan-qr-label"],"userNotScanInTimeErrorLabel":[1,"user-not-scan-in-time-error-label"],"credsNotValidatedErrorLabel":[1,"creds-not-validated-error-label"],"failedLoginErrorLabel":[1,"failed-login-error-label"],"successLoginLabel":[1,"success-login-label"],"byBrandLabel":[1,"by-brand-label"],"waitingStartSessionLabel":[1,"waiting-start-session-label"],"readQrTitle":[1,"read-qr-title"],"readQrDescription":[1,"read-qr-description"],"hideQrModalDescription":[4,"hide-qr-modal-description"],"dynamicLink":[4,"dynamic-link"],"sessionId":[32],"authenticationRequest":[32],"sessionData":[32],"result":[32],"display":[64],"stop":[64],"getSessionData":[64]},[[2,"sessionMsg","sessionMsgReceived"]]]]],["gataca-ssibutton_2.cjs",[[1,"gataca-ssibutton",{"qrId":[1,"qr-id"],"buttonText":[1,"button-text"],"autostart":[4],"checkStatus":[16],"createSession":[16],"successCallback":[16],"errorCallback":[16],"handleCheckAppLoading":[16],"checkAppTimeout":[2,"check-app-timeout"],"qrRole":[1,"qr-role"],"callbackServer":[1,"callback-server"],"sessionTimeout":[2,"session-timeout"],"pollingFrequency":[2,"polling-frequency"],"autorefresh":[4],"v":[1],"qrModalTitle":[1,"qr-modal-title"],"modalTitleColor":[1,"modal-title-color"],"qrModalDescription":[1,"qr-modal-description"],"hideBrandTitle":[4,"hide-brand-title"],"dynamicLink":[4,"dynamic-link"],"logoSize":[2,"logo-size"],"logoSrc":[1,"logo-src"],"qrCodeExpiredLabel":[1,"qr-code-expired-label"],"credentialsNotValidatedLabel":[1,"credentials-not-validated-label"],"clickInsideBoxLabel":[1,"click-inside-box-label"],"refreshQrLabel":[1,"refresh-qr-label"],"scanQrLabel":[1,"scan-qr-label"],"userNotScanInTimeErrorLabel":[1,"user-not-scan-in-time-error-label"],"credsNotValidatedErrorLabel":[1,"creds-not-validated-error-label"],"failedLoginErrorLabel":[1,"failed-login-error-label"],"successLoginLabel":[1,"success-login-label"],"byBrandLabel":[1,"by-brand-label"],"waitingStartSessionLabel":[1,"waiting-start-session-label"],"hideQrModalDescription":[4,"hide-qr-modal-description"],"open":[32],"sessionId":[32],"authenticationRequest":[32],"sessionData":[32],"result":[32],"getSessionData":[64],"startMobilePolling":[64],"stop":[64]}],[1,"gataca-ssibuttonws",{"buttonText":[1,"button-text"],"successCallback":[16],"errorCallback":[16],"qrRole":[1,"qr-role"],"callbackServer":[1,"callback-server"],"socketEndpoint":[1,"socket-endpoint"],"sessionTimeout":[2,"session-timeout"],"wsOnOpen":[16],"wsOnMessage":[16],"autostart":[4],"autorefresh":[4],"v":[1],"qrModalTitle":[1,"qr-modal-title"],"qrModalDescription":[1,"qr-modal-description"],"hideBrandTitle":[4,"hide-brand-title"],"dynamicLink":[4,"dynamic-link"],"open":[32],"getSessionData":[64]}]]],["gataca-autoqr.cjs",[[1,"gataca-autoqr",{"configId":[1,"config-id"],"configRepository":[1,"config-repository"],"successCallback":[16],"errorCallback":[16],"checkStatus":[16],"createSession":[16],"wsOnOpen":[16],"wsOnMessage":[16],"config":[32],"loading":[32],"getSessionData":[64]}]]]], options);
18
18
  });
19
19
  };
20
20
 
@@ -1,4 +1,4 @@
1
- const logoGatacaSvg = 'data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgdmlld0JveD0iMCAwIDc2IDcxIiB3aWR0aD0iNzEiIGhlaWdodD0iNjYiPgoJPHRpdGxlPlZlY3RvciAoMyktc3ZnPC90aXRsZT4KCTxzdHlsZT4KCQkuczAgeyBmaWxsOiAjNDc0NWI3IH0gCgk8L3N0eWxlPgoJPHBhdGggaWQ9IkxheWVyIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsYXNzPSJzMCIgZD0ibTcyLjIgMzguNGMyLjIgMy4zIDMuNSA3LjIgMy41IDExLjQgMCAxMS4yLTguOCAyMC4yLTE5LjkgMjAuN3EtMC40IDAtMC44IDBjLTMgMC01LjgtMC42LTguNC0xLjdxLTIuMS0xLTMuOC0yLjMtMS4xLTAuOC0yLjEtMS43LTEuMy0xLjItMi4zLTIuNi0wLjUgMC42LTEgMS4yYy0zLjggNC40LTkuNCA3LjEtMTUuNyA3LjEtNi43IDAtMTIuNi0zLjItMTYuNC04LjEtMi43LTMuNS00LjMtNy44LTQuMy0xMi42IDAtMTAuNiA4LTE5LjMgMTguMy0yMC41LTEuMS0yLjUtMS43LTUuMi0xLjctOC4xIDAtMTEuNSA5LjMtMjAuNyAyMC44LTIwLjcgMTAuMiAwIDE4LjcgNy40IDIwLjQgMTcuMnEwLjMgMS43IDAuMyAzLjVjMCAyLjktMC42IDUuNi0xLjcgOC4xIDYuMiAwLjcgMTEuNiA0LjIgMTQuOCA5LjF6bS00NC43LTIzLjVjLTMuNCA2LTEuNCAxMy41IDQuNSAxN3EwLjEgMCAwLjIgMC4xYzIuNCAxLjMgNS4xIDEuOCA3LjcgMS41IDEuNS0wLjIgMy4xLTAuNyA0LjUtMS40cTAuMi0wLjIgMC40LTAuM2MxLjgtMSAzLjMtMi41IDQuNC00LjRxMC43LTEuMyAxLjEtMi42YzEuNy01LjQtMC42LTExLjUtNS43LTE0LjQtNi0zLjQtMTMuNi0xLjQtMTcuMSA0LjV6bTM4LjUgNDAuOGMyLTMuOSAxLjktOC40LTAuMi0xMi0xLTEuOC0yLjYtMy41LTQuNi00LjYtMy45LTIuMy04LjUtMi4yLTEyLjMtMC4ycS0wLjIgMC4yLTAuNCAwLjMtMC45IDAuNS0xLjcgMS4ybDEzLjYgNy44djAuMWwtNi43IDUuNi0xMS02LjQtMC40LTAuMi03LTQtNC4yLTIuNS0yLjYtMS40cS0wLjItMC4yLTAuNC0wLjMtMC4xIDAtMC4yLTAuMWMtNS45LTMuNC0xMy41LTEuMy0xNyA0LjYtMi41IDQuNC0yLjEgOS43IDAuNyAxMy41IDEgMS40IDIuMyAyLjYgMy45IDMuNSA0LjggMi43IDEwLjYgMiAxNC41LTEuNGwtMTIuNC03LjEgNi44LTUuNiA5LjYgNS41IDAuNCAwLjIgNyA0LjEgNS42IDMuMiAxLjggMWMzLjMgMS45IDcuMyAyLjMgMTAuOSAwLjkgMi42LTEuMSA0LjgtMyA2LjMtNS43eiIvPgo8L3N2Zz4=';
1
+ 'use strict';
2
2
 
3
3
  function getDefaultExportFromCjs (x) {
4
4
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
@@ -25,10 +25,4 @@ var qrCodeStyling = createCommonjsModule(function (module, exports) {
25
25
 
26
26
  const QRCodeStyling = /*@__PURE__*/getDefaultExportFromCjs(qrCodeStyling);
27
27
 
28
- const gatIconCheckSvg = 'data:image/svg+xml;base64,Cjxzdmcgd2lkdGg9IjUyIiBoZWlnaHQ9IjUzIiB2aWV3Qm94PSIwIDAgNTIgNTMiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxjaXJjbGUgY3g9IjI2IiBjeT0iMjYuNjcxOSIgcj0iMjYiIGZpbGw9IiMzRDlBNTAiLz4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0zOC41MiAxNy43NDk1QzM5LjU4MDUgMTguODA5OSAzOS41ODA1IDIwLjUyOTMgMzguNTIgMjEuNTg5OEwyMy41ODQ2IDM2LjUyNTFDMjIuNTI0MiAzNy41ODU2IDIwLjgwNDggMzcuNTg1NiAxOS43NDQzIDM2LjUyNTFMMTIuOTU1NSAyOS43MzYzQzExLjg5NSAyOC42NzU5IDExLjg5NSAyNi45NTY1IDEyLjk1NTUgMjUuODk2QzE0LjAxNiAyNC44MzU1IDE1LjczNTQgMjQuODM1NSAxNi43OTU4IDI1Ljg5NkwyMS42NjQ1IDMwLjc2NDdMMzQuNjc5NyAxNy43NDk1QzM1Ljc0MDIgMTYuNjg5IDM3LjQ1OTUgMTYuNjg5IDM4LjUyIDE3Ljc0OTVaIiBmaWxsPSJ3aGl0ZSIvPgo8L3N2Zz4K';
29
-
30
- const gatIconRefreshSvg = 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTIzIDRWMTBIMTciIHN0cm9rZT0iIzhCOEI4QiIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPHBhdGggZD0iTTIwLjQ4OTkgMTVDMTkuODM5OSAxNi44Mzk5IDE4LjYwOTQgMTguNDE4NyAxNi45ODQgMTkuNDk4NUMxNS4zNTg2IDIwLjU3ODMgMTMuNDI2MyAyMS4xMDA2IDExLjQ3ODMgMjAuOTg2NkM5LjUzMDI2IDIwLjg3MjYgNy42NzIwMyAyMC4xMjg2IDYuMTgzNjMgMTguODY2N0M0LjY5NTI0IDE3LjYwNDcgMy42NTczIDE1Ljg5MzIgMy4yMjYyNSAxMy45OTAxQzIuNzk1MTkgMTIuMDg2OSAyLjk5NDM2IDEwLjA5NTIgMy43OTM3NCA4LjMxNTA4QzQuNTkzMTMgNi41MzQ5NiA1Ljk0OTQyIDUuMDYyODggNy42NTgyMyA0LjEyMDY1QzkuMzY3MDUgMy4xNzg0MyAxMS4zMzU4IDIuODE3MTEgMTMuMjY3OCAzLjA5MTE2QzE1LjE5OTkgMy4zNjUyIDE2Ljk5MDUgNC4yNTk3NSAxOC4zNjk5IDUuNjQwMDFMMjIuOTk5OSAxMCIgc3Ryb2tlPSIjOEI4QjhCIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPgo8L3N2Zz4K';
31
-
32
- const gatIconAlertSvg = 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTEwLjI5MDggMy44NjAyTDEuODIwNzUgMTguMDAwMkMxLjY0NjEyIDE4LjMwMjYgMS41NTM3MiAxOC42NDU1IDEuNTUyNzQgMTguOTk0N0MxLjU1MTc2IDE5LjM0MzkgMS42NDIyNCAxOS42ODczIDEuODE1MTggMTkuOTkwN0MxLjk4ODEyIDIwLjI5NDEgMi4yMzc0OCAyMC41NDcgMi41Mzg0NiAyMC43MjQxQzIuODM5NDQgMjAuOTAxMiAzLjE4MTU1IDIwLjk5NjQgMy41MzA3NSAyMS4wMDAySDIwLjQ3MDhDMjAuODIgMjAuOTk2NCAyMS4xNjIxIDIwLjkwMTIgMjEuNDYzIDIwLjcyNDFDMjEuNzY0IDIwLjU0NyAyMi4wMTM0IDIwLjI5NDEgMjIuMTg2MyAxOS45OTA3QzIyLjM1OTMgMTkuNjg3MyAyMi40NDk3IDE5LjM0MzkgMjIuNDQ4OCAxOC45OTQ3QzIyLjQ0NzggMTguNjQ1NSAyMi4zNTU0IDE4LjMwMjYgMjIuMTgwOCAxOC4wMDAyTDEzLjcxMDggMy44NjAyQzEzLjUzMjUgMy41NjYzMSAxMy4yODE1IDMuMzIzMzIgMTIuOTgxOSAzLjE1NDY5QzEyLjY4MjQgMi45ODYwNSAxMi4zNDQ1IDIuODk3NDYgMTIuMDAwOCAyLjg5NzQ2QzExLjY1NyAyLjg5NzQ2IDExLjMxOTEgMi45ODYwNSAxMS4wMTk2IDMuMTU0NjlDMTAuNzIgMy4zMjMzMiAxMC40NjkgMy41NjYzMSAxMC4yOTA4IDMuODYwMlYzLjg2MDJaIiBzdHJva2U9IiNDRDJCMzEiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+CjxwYXRoIGQ9Ik0xMiA5VjEzIiBzdHJva2U9IiNDRDJCMzEiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+CjxwYXRoIGQ9Ik0xMiAxN0gxMi4wMSIgc3Ryb2tlPSIjQ0QyQjMxIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPgo8L3N2Zz4K';
33
-
34
- export { QRCodeStyling as Q, gatIconRefreshSvg as a, gatIconAlertSvg as b, gatIconCheckSvg as g, logoGatacaSvg as l };
28
+ exports.QRCodeStyling = QRCodeStyling;
@@ -1,4 +1,4 @@
1
- import { h, } from "@stencil/core";
1
+ import { forceUpdate, 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";
@@ -26,9 +26,15 @@ 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);
29
32
  this.poll()
30
33
  .then((data) => {
31
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);
32
38
  this.sessionData = data;
33
39
  this.gatacaLoginCompleted.emit(data);
34
40
  this.successCallback(data);
@@ -45,6 +51,9 @@ export class GatacaQR {
45
51
  ? new Error(this.userNotScanInTimeErrorLabel)
46
52
  : new Error(this.credsNotValidatedErrorLabel);
47
53
  this.result = err;
54
+ console.log("display4", "this.result", this.result);
55
+ forceUpdate(this);
56
+ console.log("display5", "this.result", this.result);
48
57
  this.gatacaLoginFailed.emit(error);
49
58
  this.errorCallback(error);
50
59
  }
@@ -76,17 +85,17 @@ export class GatacaQR {
76
85
  : Promise.reject(new Error(this.failedLoginErrorLabel));
77
86
  }
78
87
  async getSessionId() {
79
- // if (this.sessionId) {
80
- // return this.sessionId;
81
- // }
82
- console.log("111 getSessionId", "this.sessionId", this.sessionId);
88
+ if (this.sessionId) {
89
+ return this.sessionId;
90
+ }
91
+ // console.log("111 getSessionId", "this.sessionId", this.sessionId);
83
92
  if (this.createSession) {
84
93
  let { sessionId, authenticationRequest } = await this.createSession();
85
- console.log("222 getSessionId", "sessionId", sessionId);
94
+ // console.log("222 getSessionId", "sessionId", sessionId);
86
95
  this.sessionId = sessionId;
87
96
  this.authenticationRequest = authenticationRequest;
88
97
  }
89
- console.log("333 getSessionId", "this.sessionId", this.sessionId);
98
+ // console.log("333 getSessionId", "this.sessionId", this.sessionId);
90
99
  return this.sessionId;
91
100
  }
92
101
  getLink() {
@@ -133,6 +142,7 @@ export class GatacaQR {
133
142
  return new Promise(checkCondition);
134
143
  }
135
144
  renderQRSection() {
145
+ console.log("renderQRSection", "this.result", this.result);
136
146
  switch (this.result) {
137
147
  case RESULT_STATUS.NOT_STARTED:
138
148
  return this.renderRetryButton();
@@ -152,6 +162,7 @@ export class GatacaQR {
152
162
  }
153
163
  }
154
164
  renderSuccess() {
165
+ console.log("renderSuccess", "this.result", this.result);
155
166
  return (h(Success, { modalHeight: this === null || this === void 0 ? void 0 : this.modalHeight, successLoginLabel: this === null || this === void 0 ? void 0 : this.successLoginLabel }));
156
167
  }
157
168
  renderRetryButton(errorMessage) {
@@ -161,11 +172,11 @@ export class GatacaQR {
161
172
  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 }));
162
173
  }
163
174
  renderQR(value, useLogo) {
164
- console.log("this.qrId", this.qrId);
175
+ // console.log("this.qrId", this.qrId);
165
176
  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 }));
166
177
  }
167
178
  renderRetryQR(value, useLogo) {
168
- console.log("this.qrId", this.qrId);
179
+ // console.log("this.qrId", this.qrId);
169
180
  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 }));
170
181
  }
171
182
  render() {
@@ -186,6 +197,7 @@ export class GatacaQR {
186
197
  } }, this.renderQRSection())))));
187
198
  }
188
199
  static get is() { return "gataca-qr"; }
200
+ static get encapsulation() { return "shadow"; }
189
201
  static get originalStyleUrls() {
190
202
  return {
191
203
  "$": ["gataca-qr.scss"]
@@ -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: "svg",
21
+ type: "canvas",
22
22
  dotsOptions: {
23
23
  color: this.qrColor,
24
24
  type: this.rounded ? "dots" : "square",
@@ -46,7 +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);
49
+ // console.log("qrId2", this.qrId);
50
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
51
  this.qr.qrId = this.qrId;
52
52
  }
@@ -178,7 +178,7 @@ export class GatacaSSIButton {
178
178
  }
179
179
  }
180
180
  renderDesktopButton() {
181
- console.log("this.qrId333", this.qrId);
181
+ // console.log("this.qrId333", this.qrId);
182
182
  return (h("div", { class: "gatacaButtonWrapper" }, h("button", { class: "gatacaButton", onClick: () => {
183
183
  this.open = !this.open;
184
184
  setTimeout(() => {