@gataca/qr 0.0.19 → 0.0.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (95) hide show
  1. package/dist/gatacaqr/app-globals-0f993ce5.js +3 -0
  2. package/dist/gatacaqr/css-shim-8eec97b3.js +4 -0
  3. package/dist/gatacaqr/dom-1b0cf05d.js +73 -0
  4. package/dist/{esm/gat-icon-alert-7b06ef3a.js → gatacaqr/gat-icon-alert-13a1894e.js} +1 -3
  5. package/dist/{esm → gatacaqr}/gataca-autoqr.entry.js +1 -1
  6. package/dist/{esm/gataca-qr_2.entry.js → gatacaqr/gataca-qr.entry.js} +17 -81
  7. package/dist/gatacaqr/gataca-qrdisplay-55780157.js +97 -0
  8. package/dist/gatacaqr/gataca-qrdisplay.entry.js +2 -0
  9. package/dist/{esm → gatacaqr}/gataca-qrws.entry.js +3 -3
  10. package/dist/{components/gataca-ssibutton2.js → gatacaqr/gataca-ssibutton.entry.js} +10 -84
  11. package/dist/{components/gataca-ssibuttonws2.js → gatacaqr/gataca-ssibuttonws.entry.js} +7 -53
  12. package/dist/gatacaqr/gatacaqr.esm.js +129 -1
  13. package/dist/gatacaqr/index-4bc6f36b.js +3262 -0
  14. package/dist/gatacaqr/index.esm.js +1 -1
  15. package/dist/gatacaqr/shadow-css-146f2f6f.js +387 -0
  16. package/dist/types/components/gataca-qr/components/qr/QR.d.ts +0 -1
  17. package/dist/types/components/gataca-qr/gataca-qr.d.ts +0 -5
  18. package/dist/types/components/gataca-qrdisplay/gataca-qrdisplay.d.ts +0 -5
  19. package/dist/types/components/gataca-ssibutton/gataca-ssibutton.d.ts +0 -5
  20. package/dist/types/components.d.ts +0 -24
  21. package/package.json +1 -1
  22. package/dist/cjs/gat-icon-alert-0ad19b26.js +0 -14
  23. package/dist/cjs/gataca-autoqr.cjs.entry.js +0 -105
  24. package/dist/cjs/gataca-qr_2.cjs.entry.js +0 -318
  25. package/dist/cjs/gataca-qrws.cjs.entry.js +0 -252
  26. package/dist/cjs/gataca-ssibutton_2.cjs.entry.js +0 -320
  27. package/dist/cjs/gatacaqr.cjs.js +0 -19
  28. package/dist/cjs/index-8638645b.js +0 -1482
  29. package/dist/cjs/index.cjs.js +0 -16
  30. package/dist/cjs/loader.cjs.js +0 -21
  31. package/dist/cjs/qr-code-styling-412bbc7a.js +0 -28
  32. package/dist/cjs/utils-ef28b844.js +0 -27
  33. package/dist/collection/assets/icons/gat-icon-alert.svg +0 -5
  34. package/dist/collection/assets/icons/gat-icon-check.svg +0 -5
  35. package/dist/collection/assets/icons/gat-icon-refresh.svg +0 -4
  36. package/dist/collection/assets/images/logo_gataca.svg +0 -7
  37. package/dist/collection/collection-manifest.json +0 -17
  38. package/dist/collection/components/gataca-autoqr/gataca-autoqr.css +0 -116
  39. package/dist/collection/components/gataca-autoqr/gataca-autoqr.js +0 -323
  40. package/dist/collection/components/gataca-qr/components/qr/QR.js +0 -5
  41. package/dist/collection/components/gataca-qr/components/readQR/ReadQR.js +0 -11
  42. package/dist/collection/components/gataca-qr/components/readQR/components/AnimatedLoader.js +0 -4
  43. package/dist/collection/components/gataca-qr/components/retryButton/RetryButton.js +0 -13
  44. package/dist/collection/components/gataca-qr/components/success/Success.js +0 -8
  45. package/dist/collection/components/gataca-qr/gataca-qr.css +0 -399
  46. package/dist/collection/components/gataca-qr/gataca-qr.js +0 -1001
  47. package/dist/collection/components/gataca-qrdisplay/gataca-qrdisplay.js +0 -176
  48. package/dist/collection/components/gataca-qrws/components/qr/QR.js +0 -5
  49. package/dist/collection/components/gataca-qrws/components/readQR/ReadQR.js +0 -11
  50. package/dist/collection/components/gataca-qrws/components/readQR/components/AnimatedLoader.js +0 -4
  51. package/dist/collection/components/gataca-qrws/components/retryButton/RetryButton.js +0 -13
  52. package/dist/collection/components/gataca-qrws/components/success/Success.js +0 -8
  53. package/dist/collection/components/gataca-qrws/gataca-qrws.css +0 -400
  54. package/dist/collection/components/gataca-qrws/gataca-qrws.js +0 -974
  55. package/dist/collection/components/gataca-ssibutton/gataca-ssibutton.css +0 -116
  56. package/dist/collection/components/gataca-ssibutton/gataca-ssibutton.js +0 -979
  57. package/dist/collection/components/gataca-ssibuttonws/gataca-ssibuttonws.css +0 -116
  58. package/dist/collection/components/gataca-ssibuttonws/gataca-ssibuttonws.js +0 -410
  59. package/dist/collection/index.js +0 -2
  60. package/dist/collection/utils/index.js +0 -1
  61. package/dist/collection/utils/utils.js +0 -22
  62. package/dist/components/gat-icon-alert.js +0 -30
  63. package/dist/components/gataca-autoqr.js +0 -161
  64. package/dist/components/gataca-qr.js +0 -6
  65. package/dist/components/gataca-qr2.js +0 -329
  66. package/dist/components/gataca-qrdisplay.js +0 -6
  67. package/dist/components/gataca-qrdisplay2.js +0 -99
  68. package/dist/components/gataca-qrws.js +0 -6
  69. package/dist/components/gataca-qrws2.js +0 -310
  70. package/dist/components/gataca-ssibutton.js +0 -6
  71. package/dist/components/gataca-ssibuttonws.js +0 -6
  72. package/dist/components/index.js +0 -8
  73. package/dist/esm/gataca-ssibutton_2.entry.js +0 -315
  74. package/dist/esm/gatacaqr.js +0 -17
  75. package/dist/esm/index-af2994f7.js +0 -1455
  76. package/dist/esm/index.js +0 -1
  77. package/dist/esm/loader.js +0 -17
  78. package/dist/esm/polyfills/core-js.js +0 -11
  79. package/dist/esm/polyfills/css-shim.js +0 -1
  80. package/dist/esm/polyfills/dom.js +0 -79
  81. package/dist/esm/polyfills/es5-html-element.js +0 -1
  82. package/dist/esm/polyfills/index.js +0 -34
  83. package/dist/esm/polyfills/system.js +0 -6
  84. package/dist/esm/qr-code-styling-0eeb38d5.js +0 -26
  85. package/dist/gatacaqr/p-0be4566d.js +0 -1
  86. package/dist/gatacaqr/p-2cd7b062.js +0 -1
  87. package/dist/gatacaqr/p-3ca3bb1a.entry.js +0 -1
  88. package/dist/gatacaqr/p-57b89b78.entry.js +0 -1
  89. package/dist/gatacaqr/p-88af482f.entry.js +0 -1
  90. package/dist/gatacaqr/p-ba0417e2.js +0 -2
  91. package/dist/gatacaqr/p-d59ae0ab.entry.js +0 -1
  92. package/dist/gatacaqr/p-ea783014.js +0 -1
  93. package/dist/index.cjs.js +0 -1
  94. package/dist/index.js +0 -1
  95. /package/dist/{esm → gatacaqr}/utils-63e7a33b.js +0 -0
@@ -1,320 +0,0 @@
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,19 +0,0 @@
1
- 'use strict';
2
-
3
- const index = require('./index-8638645b.js');
4
-
5
- /*
6
- Stencil Client Patch Browser v2.19.3 | MIT Licensed | https://stenciljs.com
7
- */
8
- const patchBrowser = () => {
9
- const importMeta = (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('gatacaqr.cjs.js', document.baseURI).href));
10
- const opts = {};
11
- if (importMeta !== '') {
12
- opts.resourcesUrl = new URL('.', importMeta).href;
13
- }
14
- return index.promiseResolve(opts);
15
- };
16
-
17
- patchBrowser().then(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
- });