@gataca/qr 0.0.20 → 0.0.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (95) hide show
  1. package/dist/gatacaqr/app-globals-0f993ce5.js +3 -0
  2. package/dist/gatacaqr/css-shim-8eec97b3.js +4 -0
  3. package/dist/gatacaqr/dom-1b0cf05d.js +73 -0
  4. package/dist/{esm/gat-icon-alert-7b06ef3a.js → gatacaqr/gat-icon-alert-13a1894e.js} +1 -3
  5. package/dist/{esm → gatacaqr}/gataca-autoqr.entry.js +1 -1
  6. package/dist/{esm/gataca-qr_2.entry.js → gatacaqr/gataca-qr.entry.js} +14 -78
  7. package/dist/gatacaqr/gataca-qrdisplay-55780157.js +97 -0
  8. package/dist/gatacaqr/gataca-qrdisplay.entry.js +2 -0
  9. package/dist/{esm → gatacaqr}/gataca-qrws.entry.js +3 -3
  10. package/dist/{components/gataca-ssibutton2.js → gatacaqr/gataca-ssibutton.entry.js} +10 -84
  11. package/dist/{components/gataca-ssibuttonws2.js → gatacaqr/gataca-ssibuttonws.entry.js} +7 -53
  12. package/dist/gatacaqr/gatacaqr.esm.js +129 -1
  13. package/dist/gatacaqr/index-4bc6f36b.js +3262 -0
  14. package/dist/gatacaqr/index.esm.js +1 -1
  15. package/dist/gatacaqr/shadow-css-146f2f6f.js +387 -0
  16. package/dist/types/components/gataca-qr/components/qr/QR.d.ts +0 -1
  17. package/dist/types/components/gataca-qr/gataca-qr.d.ts +0 -5
  18. package/dist/types/components/gataca-qrdisplay/gataca-qrdisplay.d.ts +0 -5
  19. package/dist/types/components/gataca-ssibutton/gataca-ssibutton.d.ts +0 -5
  20. package/dist/types/components.d.ts +0 -24
  21. package/package.json +1 -1
  22. package/dist/cjs/gat-icon-alert-0ad19b26.js +0 -14
  23. package/dist/cjs/gataca-autoqr.cjs.entry.js +0 -105
  24. package/dist/cjs/gataca-qr_2.cjs.entry.js +0 -318
  25. package/dist/cjs/gataca-qrws.cjs.entry.js +0 -252
  26. package/dist/cjs/gataca-ssibutton_2.cjs.entry.js +0 -320
  27. package/dist/cjs/gatacaqr.cjs.js +0 -19
  28. package/dist/cjs/index-8638645b.js +0 -1482
  29. package/dist/cjs/index.cjs.js +0 -16
  30. package/dist/cjs/loader.cjs.js +0 -21
  31. package/dist/cjs/qr-code-styling-412bbc7a.js +0 -28
  32. package/dist/cjs/utils-ef28b844.js +0 -27
  33. package/dist/collection/assets/icons/gat-icon-alert.svg +0 -5
  34. package/dist/collection/assets/icons/gat-icon-check.svg +0 -5
  35. package/dist/collection/assets/icons/gat-icon-refresh.svg +0 -4
  36. package/dist/collection/assets/images/logo_gataca.svg +0 -7
  37. package/dist/collection/collection-manifest.json +0 -17
  38. package/dist/collection/components/gataca-autoqr/gataca-autoqr.css +0 -116
  39. package/dist/collection/components/gataca-autoqr/gataca-autoqr.js +0 -323
  40. package/dist/collection/components/gataca-qr/components/qr/QR.js +0 -5
  41. package/dist/collection/components/gataca-qr/components/readQR/ReadQR.js +0 -11
  42. package/dist/collection/components/gataca-qr/components/readQR/components/AnimatedLoader.js +0 -4
  43. package/dist/collection/components/gataca-qr/components/retryButton/RetryButton.js +0 -13
  44. package/dist/collection/components/gataca-qr/components/success/Success.js +0 -8
  45. package/dist/collection/components/gataca-qr/gataca-qr.css +0 -399
  46. package/dist/collection/components/gataca-qr/gataca-qr.js +0 -1001
  47. package/dist/collection/components/gataca-qrdisplay/gataca-qrdisplay.js +0 -176
  48. package/dist/collection/components/gataca-qrws/components/qr/QR.js +0 -5
  49. package/dist/collection/components/gataca-qrws/components/readQR/ReadQR.js +0 -11
  50. package/dist/collection/components/gataca-qrws/components/readQR/components/AnimatedLoader.js +0 -4
  51. package/dist/collection/components/gataca-qrws/components/retryButton/RetryButton.js +0 -13
  52. package/dist/collection/components/gataca-qrws/components/success/Success.js +0 -8
  53. package/dist/collection/components/gataca-qrws/gataca-qrws.css +0 -400
  54. package/dist/collection/components/gataca-qrws/gataca-qrws.js +0 -974
  55. package/dist/collection/components/gataca-ssibutton/gataca-ssibutton.css +0 -116
  56. package/dist/collection/components/gataca-ssibutton/gataca-ssibutton.js +0 -979
  57. package/dist/collection/components/gataca-ssibuttonws/gataca-ssibuttonws.css +0 -116
  58. package/dist/collection/components/gataca-ssibuttonws/gataca-ssibuttonws.js +0 -410
  59. package/dist/collection/index.js +0 -2
  60. package/dist/collection/utils/index.js +0 -1
  61. package/dist/collection/utils/utils.js +0 -22
  62. package/dist/components/gat-icon-alert.js +0 -30
  63. package/dist/components/gataca-autoqr.js +0 -161
  64. package/dist/components/gataca-qr.js +0 -6
  65. package/dist/components/gataca-qr2.js +0 -329
  66. package/dist/components/gataca-qrdisplay.js +0 -6
  67. package/dist/components/gataca-qrdisplay2.js +0 -99
  68. package/dist/components/gataca-qrws.js +0 -6
  69. package/dist/components/gataca-qrws2.js +0 -310
  70. package/dist/components/gataca-ssibutton.js +0 -6
  71. package/dist/components/gataca-ssibuttonws.js +0 -6
  72. package/dist/components/index.js +0 -8
  73. package/dist/esm/gataca-ssibutton_2.entry.js +0 -315
  74. package/dist/esm/gatacaqr.js +0 -17
  75. package/dist/esm/index-af2994f7.js +0 -1455
  76. package/dist/esm/index.js +0 -1
  77. package/dist/esm/loader.js +0 -17
  78. package/dist/esm/polyfills/core-js.js +0 -11
  79. package/dist/esm/polyfills/css-shim.js +0 -1
  80. package/dist/esm/polyfills/dom.js +0 -79
  81. package/dist/esm/polyfills/es5-html-element.js +0 -1
  82. package/dist/esm/polyfills/index.js +0 -34
  83. package/dist/esm/polyfills/system.js +0 -6
  84. package/dist/esm/qr-code-styling-0eeb38d5.js +0 -26
  85. package/dist/gatacaqr/p-0be4566d.js +0 -1
  86. package/dist/gatacaqr/p-2cd7b062.js +0 -1
  87. package/dist/gatacaqr/p-3ca3bb1a.entry.js +0 -1
  88. package/dist/gatacaqr/p-49424123.entry.js +0 -1
  89. package/dist/gatacaqr/p-88af482f.entry.js +0 -1
  90. package/dist/gatacaqr/p-ba0417e2.js +0 -2
  91. package/dist/gatacaqr/p-d59ae0ab.entry.js +0 -1
  92. package/dist/gatacaqr/p-ea783014.js +0 -1
  93. package/dist/index.cjs.js +0 -1
  94. package/dist/index.js +0 -1
  95. /package/dist/{esm → gatacaqr}/utils-63e7a33b.js +0 -0
@@ -1,315 +0,0 @@
1
- import { r as registerInstance, c as createEvent, h } from './index-af2994f7.js';
2
- import './qr-code-styling-0eeb38d5.js';
3
- import { R as RESULT_STATUS } from './utils-63e7a33b.js';
4
-
5
- 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}";
6
-
7
- 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=";
8
- //Default values
9
- const DEFAULT_SESSION_TIMEOUT = 300; //5mins as in connect
10
- const DEFAULT_POLLING_FREQ = 3;
11
- const GatacaSSIButton = class {
12
- constructor(hostRef) {
13
- registerInstance(this, hostRef);
14
- this.gatacaLoginCompleted = createEvent(this, "gatacaLoginCompleted", 7);
15
- this.gatacaLoginFailed = createEvent(this, "gatacaLoginFailed", 7);
16
- this.qrId = undefined;
17
- this.buttonText = "Easy login";
18
- this.autostart = true;
19
- this.checkStatus = undefined;
20
- this.createSession = undefined;
21
- this.successCallback = undefined;
22
- this.errorCallback = undefined;
23
- this.handleCheckAppLoading = undefined;
24
- this.checkAppTimeout = 6;
25
- this.qrRole = undefined;
26
- this.callbackServer = undefined;
27
- this.sessionTimeout = undefined;
28
- this.pollingFrequency = undefined;
29
- this.autorefresh = false;
30
- this.v = "3";
31
- this.qrModalTitle = "Quick Access";
32
- this.modalTitleColor = "#4745B7";
33
- this.qrModalDescription = "Sign up or sign in by scanning the QR Code with the Gataca Wallet";
34
- this.hideBrandTitle = false;
35
- this.dynamicLink = true;
36
- this.logoSize = 0;
37
- this.logoSrc = undefined;
38
- this.qrCodeExpiredLabel = "QR Code expired";
39
- this.credentialsNotValidatedLabel = "User credentials not validated";
40
- this.clickInsideBoxLabel = "Click inside the box to";
41
- this.refreshQrLabel = "Refresh QR Code";
42
- this.scanQrLabel = "Scan QR Code";
43
- this.userNotScanInTimeErrorLabel = "User did not scan the QR in the allowed time";
44
- this.credsNotValidatedErrorLabel = "Provided user credentials couldn't be validated";
45
- this.failedLoginErrorLabel = "No successful login";
46
- this.successLoginLabel = "Successful Connection!";
47
- this.byBrandLabel = "by Gataca";
48
- this.waitingStartSessionLabel = "waiting to start a session";
49
- this.hideQrModalDescription = false;
50
- this.open = false;
51
- this.sessionId = undefined;
52
- this.authenticationRequest = undefined;
53
- this.sessionData = undefined;
54
- this.result = RESULT_STATUS.NOT_STARTED;
55
- // console.log("qrId2", this.qrId);
56
- 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 }));
57
- this.qr.qrId = this.qrId;
58
- }
59
- /**
60
- * Retrieve manually the session data on a successful login
61
- */
62
- async getSessionData() {
63
- return this.qr.getSessionData();
64
- }
65
- async getSessionId() {
66
- if (this.sessionId) {
67
- return this.sessionId;
68
- }
69
- let { sessionId, authenticationRequest } = await this.createSession();
70
- this.sessionId = sessionId;
71
- this.authenticationRequest = authenticationRequest;
72
- return this.sessionId;
73
- }
74
- /**
75
- * Force manually the start polling
76
- */
77
- async startMobilePolling() {
78
- await this.getSessionId();
79
- this.result = RESULT_STATUS.ONGOING;
80
- this.poll()
81
- .then((data) => {
82
- this.result = RESULT_STATUS.SUCCESS;
83
- this.sessionData = data;
84
- this.gatacaLoginCompleted.emit(data);
85
- this.successCallback(data);
86
- })
87
- .catch((err) => {
88
- this.clean();
89
- let expired = err === RESULT_STATUS.EXPIRED;
90
- if (expired && this.autorefresh) {
91
- this.startMobilePolling();
92
- }
93
- else {
94
- if (err !== RESULT_STATUS.NOT_STARTED) {
95
- let error = expired
96
- ? new Error(this.userNotScanInTimeErrorLabel)
97
- : new Error(this.credsNotValidatedErrorLabel);
98
- this.result = err;
99
- this.gatacaLoginFailed.emit(error);
100
- this.errorCallback(error);
101
- }
102
- }
103
- });
104
- }
105
- /**
106
- * Stop manually an ongoing session
107
- */
108
- async stop() {
109
- this.clean();
110
- if (this.result === RESULT_STATUS.ONGOING || RESULT_STATUS.READ) {
111
- this.result = RESULT_STATUS.NOT_STARTED;
112
- }
113
- }
114
- clean() {
115
- this.sessionData = undefined;
116
- this.sessionId = undefined;
117
- }
118
- renderModal() {
119
- return this.qr;
120
- }
121
- async poll() {
122
- let endTime = new Date().getTime() +
123
- (this.sessionTimeout || DEFAULT_SESSION_TIMEOUT) * 1000;
124
- let interval = (this.pollingFrequency || DEFAULT_POLLING_FREQ) * 1000;
125
- let checkFunc = async (component) => {
126
- if (component.result === RESULT_STATUS.NOT_STARTED) {
127
- return { result: RESULT_STATUS.NOT_STARTED };
128
- }
129
- let id = await component.getSessionId();
130
- return component.checkStatus(id);
131
- };
132
- let component = this;
133
- let checkCondition = async function (resolve, reject) {
134
- // If the condition is met, we're done!
135
- let { result, data } = await checkFunc(component);
136
- switch (result) {
137
- case RESULT_STATUS.SUCCESS:
138
- resolve(data);
139
- break;
140
- case RESULT_STATUS.READ:
141
- component.result = RESULT_STATUS.READ;
142
- case RESULT_STATUS.ONGOING:
143
- if (component.sessionTimeout > 0 && new Date().getTime() < endTime) {
144
- setTimeout(checkCondition, interval, resolve, reject);
145
- }
146
- else {
147
- reject(RESULT_STATUS.EXPIRED);
148
- }
149
- break;
150
- default:
151
- reject(result);
152
- break;
153
- }
154
- };
155
- return new Promise(checkCondition);
156
- }
157
- isAppInstalled(appScheme, callback) {
158
- let timeout;
159
- let detected = false;
160
- if (appScheme === null || appScheme === void 0 ? void 0 : appScheme.length) {
161
- window.location.href = appScheme;
162
- }
163
- const waitTimeToCheckApp = this.checkAppTimeout * 1000;
164
- timeout = setTimeout(() => {
165
- if (!detected) {
166
- callback(false);
167
- }
168
- cleanup();
169
- }, waitTimeToCheckApp);
170
- const handleVisibilityChange = () => {
171
- if (document.hidden) {
172
- detected = true;
173
- callback(true);
174
- if (!this.autostart) {
175
- this.startMobilePolling();
176
- }
177
- cleanup();
178
- }
179
- };
180
- document.addEventListener("visibilitychange", handleVisibilityChange);
181
- function cleanup() {
182
- clearTimeout(timeout);
183
- document.removeEventListener("visibilitychange", handleVisibilityChange);
184
- }
185
- }
186
- renderDesktopButton() {
187
- // console.log("this.qrId333", this.qrId);
188
- return (h("div", { class: "gatacaButtonWrapper" }, h("button", { class: "gatacaButton", onClick: () => {
189
- this.open = !this.open;
190
- setTimeout(() => {
191
- var _a, _b;
192
- this.qrElement.id = this.qrId;
193
- if (this.open) {
194
- (_a = this.qrElement) === null || _a === void 0 ? void 0 : _a.display();
195
- }
196
- else {
197
- (_b = this.qrElement) === null || _b === void 0 ? void 0 : _b.stop();
198
- }
199
- }, 0);
200
- } }, h("img", { src: PHONE_ICON$1, class: "buttonImg", alt: this.buttonText }), h("span", null, this.buttonText))));
201
- }
202
- async getAuthRequest() {
203
- let { authenticationRequest } = await this.createSession();
204
- return authenticationRequest;
205
- }
206
- renderMobileButton(isAndroid, isIos) {
207
- if (this.autostart) {
208
- this.startMobilePolling();
209
- }
210
- let loading = false;
211
- const handleLoading = (isLoading) => {
212
- loading = isLoading;
213
- if (this.handleCheckAppLoading) {
214
- this.handleCheckAppLoading(isLoading);
215
- }
216
- };
217
- const executeRedirection = async () => {
218
- handleLoading(true);
219
- const androidStoreLink = "https://play.google.com/store/apps/details?id=com.gataca.identity";
220
- const iosStoreLink = "https://apps.apple.com/us/app/gataca/id1498607616";
221
- try {
222
- const appScheme = await this.getAuthRequest();
223
- this.isAppInstalled(appScheme, (installed) => {
224
- if (!installed) {
225
- this.stop();
226
- if (isAndroid) {
227
- window.location.href = androidStoreLink;
228
- }
229
- else if (isIos) {
230
- window.location.href = iosStoreLink;
231
- }
232
- }
233
- handleLoading(false);
234
- });
235
- }
236
- catch (error) {
237
- this.stop();
238
- handleLoading(false);
239
- }
240
- };
241
- return (h("div", { class: "gatacaButtonWrapper" }, h("button", { class: "gatacaButton", onClick: () => {
242
- executeRedirection();
243
- }, disabled: loading }, h("img", { src: PHONE_ICON$1, class: "buttonImg", alt: this.buttonText }), h("span", null, this.buttonText))));
244
- }
245
- render() {
246
- const userAgent =
247
- // @ts-ignore
248
- (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);
249
- const isAndroid = /android/i.test(userAgent);
250
- const isIos =
251
- // @ts-ignore
252
- (/iPad|iPhone|iPod/.test(userAgent) && !window.MSStream) ||
253
- (navigator.platform === "MacIntel" && navigator.maxTouchPoints > 1);
254
- const isMobile = isAndroid || isIos;
255
- return (h("div", { class: "buttonContainer" }, isMobile && this.v === "3"
256
- ? this.renderMobileButton(isAndroid, isIos)
257
- : this.renderDesktopButton(), this.open && (!isMobile || this.v === "3") && this.renderModal()));
258
- }
259
- };
260
- GatacaSSIButton.style = gatacaSsibuttonCss;
261
-
262
- 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}";
263
-
264
- 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=";
265
- const GatacaSSIButtonWS = class {
266
- constructor(hostRef) {
267
- registerInstance(this, hostRef);
268
- this.gatacaLoginCompleted = createEvent(this, "gatacaLoginCompleted", 7);
269
- this.gatacaLoginFailed = createEvent(this, "gatacaLoginFailed", 7);
270
- this.buttonText = "Easy login";
271
- this.successCallback = undefined;
272
- this.errorCallback = undefined;
273
- this.qrRole = undefined;
274
- this.callbackServer = undefined;
275
- this.socketEndpoint = undefined;
276
- this.sessionTimeout = undefined;
277
- this.wsOnOpen = undefined;
278
- this.wsOnMessage = undefined;
279
- this.autostart = true;
280
- this.autorefresh = false;
281
- this.v = "3";
282
- this.qrModalTitle = "Quick Access";
283
- this.qrModalDescription = "Sign up or sign in by scanning the QR Code with the Gataca Wallet";
284
- this.hideBrandTitle = false;
285
- this.dynamicLink = true;
286
- this.open = false;
287
- this.qr = (h("gataca-qrws", { wsOnMessage: this.wsOnMessage, wsOnOpen: this.wsOnOpen, successCallback: this.successCallback, errorCallback: this.errorCallback, qrRole: this.qrRole, callbackServer: this.callbackServer, sessionTimeout: this.sessionTimeout, socketEndpoint: this.socketEndpoint, autostart: true, autorefresh: this.autorefresh, v: this.v, qrModalTitle: this.qrModalTitle, qrModalDescription: this.qrModalDescription, hideBrandTitle: this.hideBrandTitle, dynamicLink: this.dynamicLink }));
288
- }
289
- /**
290
- * Retrieve manually the session data on a successful login
291
- */
292
- async getSessionData() {
293
- return this.qr.getSessionData();
294
- }
295
- renderModal() {
296
- return this.qr;
297
- }
298
- renderButton() {
299
- return (h("div", { class: "gatacaButtonWrapper" }, h("button", { class: "gatacaButton", onClick: () => {
300
- this.open = !this.open;
301
- if (this.open) {
302
- this.qr.display();
303
- }
304
- else {
305
- this.qr.stop();
306
- }
307
- } }, h("img", { src: PHONE_ICON, class: "buttonImg", alt: this.buttonText }), h("span", null, this.buttonText))));
308
- }
309
- render() {
310
- return (h("div", { class: "buttonContainer" }, this.renderButton(), this.open && this.renderModal()));
311
- }
312
- };
313
- GatacaSSIButtonWS.style = gatacaSsibuttonwsCss;
314
-
315
- export { GatacaSSIButton as gataca_ssibutton, GatacaSSIButtonWS as gataca_ssibuttonws };
@@ -1,17 +0,0 @@
1
- import { p as promiseResolve, b as bootstrapLazy } from './index-af2994f7.js';
2
-
3
- /*
4
- Stencil Client Patch Browser v2.19.3 | MIT Licensed | https://stenciljs.com
5
- */
6
- const patchBrowser = () => {
7
- const importMeta = import.meta.url;
8
- const opts = {};
9
- if (importMeta !== '') {
10
- opts.resourcesUrl = new URL('.', importMeta).href;
11
- }
12
- return promiseResolve(opts);
13
- };
14
-
15
- patchBrowser().then(options => {
16
- return bootstrapLazy([["gataca-qr_2",[[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",[[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",[[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",[[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
- });