@gataca/qr 4.2.0 → 4.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (96) 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/gatacaqr/gat-icon-check-9132c0ad.js +5 -0
  5. package/dist/{esm → gatacaqr}/gataca-autoqr.entry.js +1 -1
  6. package/dist/{components/gataca-qr2.js → gatacaqr/gataca-qr.entry.js} +10 -77
  7. package/dist/gatacaqr/gataca-qrdisplay-9a22c242.js +123 -0
  8. package/dist/gatacaqr/gataca-qrdisplay.entry.js +2 -0
  9. package/dist/{esm → gatacaqr}/gataca-qrws.entry.js +3 -2
  10. package/dist/{components/gataca-ssibutton2.js → gatacaqr/gataca-ssibutton.entry.js} +39 -89
  11. package/dist/{esm → gatacaqr}/gataca-ssibuttonws.entry.js +1 -1
  12. package/dist/gatacaqr/gatacaqr.esm.js +129 -1
  13. package/dist/gatacaqr/index-aea56eb8.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-autoqr/gataca-autoqr.e2e.d.ts +1 -0
  17. package/dist/types/components/gataca-qr/gataca-qr.e2e.d.ts +1 -0
  18. package/dist/types/components/gataca-qrdisplay/gataca-qrdisplay.e2e.d.ts +1 -0
  19. package/dist/types/components/gataca-qrws/gataca-qrws.e2e.d.ts +1 -0
  20. package/dist/types/components/gataca-ssibutton/gataca-ssibutton.d.ts +2 -1
  21. package/dist/types/components/gataca-ssibutton/gataca-ssibutton.e2e.d.ts +1 -0
  22. package/dist/types/components/gataca-ssibuttonws/gataca-ssibuttonws.e2e.d.ts +1 -0
  23. package/package.json +1 -1
  24. package/dist/cjs/gat-icon-check-6b6780eb.js +0 -37
  25. package/dist/cjs/gataca-autoqr.cjs.entry.js +0 -106
  26. package/dist/cjs/gataca-qr_3.cjs.entry.js +0 -743
  27. package/dist/cjs/gataca-qrws.cjs.entry.js +0 -366
  28. package/dist/cjs/gataca-ssibuttonws.cjs.entry.js +0 -61
  29. package/dist/cjs/gatacaqr.cjs.js +0 -19
  30. package/dist/cjs/index-d8d3dfde.js +0 -1532
  31. package/dist/cjs/index.cjs.js +0 -17
  32. package/dist/cjs/loader.cjs.js +0 -21
  33. package/dist/cjs/utils-17b0a5ba.js +0 -72
  34. package/dist/collection/assets/icons/gat-icon-alert.svg +0 -5
  35. package/dist/collection/assets/icons/gat-icon-check.svg +0 -5
  36. package/dist/collection/assets/icons/gat-icon-refresh.svg +0 -4
  37. package/dist/collection/assets/images/logo_gataca.svg +0 -7
  38. package/dist/collection/collection-manifest.json +0 -17
  39. package/dist/collection/components/gataca-autoqr/gataca-autoqr.css +0 -116
  40. package/dist/collection/components/gataca-autoqr/gataca-autoqr.js +0 -347
  41. package/dist/collection/components/gataca-qr/components/qr/QR.js +0 -13
  42. package/dist/collection/components/gataca-qr/components/readQR/ReadQR.js +0 -16
  43. package/dist/collection/components/gataca-qr/components/readQR/components/AnimatedLoader.js +0 -6
  44. package/dist/collection/components/gataca-qr/components/retryButton/RetryButton.js +0 -19
  45. package/dist/collection/components/gataca-qr/components/success/Success.js +0 -9
  46. package/dist/collection/components/gataca-qr/gataca-qr.css +0 -415
  47. package/dist/collection/components/gataca-qr/gataca-qr.js +0 -1069
  48. package/dist/collection/components/gataca-qrdisplay/gataca-qrdisplay.js +0 -224
  49. package/dist/collection/components/gataca-qrws/components/qr/QR.js +0 -13
  50. package/dist/collection/components/gataca-qrws/components/readQR/ReadQR.js +0 -11
  51. package/dist/collection/components/gataca-qrws/components/readQR/components/AnimatedLoader.js +0 -4
  52. package/dist/collection/components/gataca-qrws/components/retryButton/RetryButton.js +0 -16
  53. package/dist/collection/components/gataca-qrws/components/success/Success.js +0 -8
  54. package/dist/collection/components/gataca-qrws/gataca-qrws.css +0 -407
  55. package/dist/collection/components/gataca-qrws/gataca-qrws.js +0 -1098
  56. package/dist/collection/components/gataca-ssibutton/gataca-ssibutton.css +0 -116
  57. package/dist/collection/components/gataca-ssibutton/gataca-ssibutton.js +0 -1151
  58. package/dist/collection/components/gataca-ssibuttonws/gataca-ssibuttonws.css +0 -116
  59. package/dist/collection/components/gataca-ssibuttonws/gataca-ssibuttonws.js +0 -434
  60. package/dist/collection/components/icons/RefreshIcon.js +0 -6
  61. package/dist/collection/index.js +0 -2
  62. package/dist/collection/utils/index.js +0 -1
  63. package/dist/collection/utils/utils.js +0 -66
  64. package/dist/components/gat-icon-check.js +0 -72
  65. package/dist/components/gataca-autoqr.js +0 -163
  66. package/dist/components/gataca-qr.js +0 -6
  67. package/dist/components/gataca-qrdisplay.js +0 -6
  68. package/dist/components/gataca-qrdisplay2.js +0 -121
  69. package/dist/components/gataca-qrws.js +0 -6
  70. package/dist/components/gataca-qrws2.js +0 -430
  71. package/dist/components/gataca-ssibutton.js +0 -6
  72. package/dist/components/gataca-ssibuttonws.js +0 -6
  73. package/dist/components/gataca-ssibuttonws2.js +0 -104
  74. package/dist/components/index.js +0 -8
  75. package/dist/esm/gat-icon-check-7320c81b.js +0 -32
  76. package/dist/esm/gataca-qr_3.entry.js +0 -737
  77. package/dist/esm/gatacaqr.js +0 -17
  78. package/dist/esm/index-dca2ab22.js +0 -1506
  79. package/dist/esm/index.js +0 -1
  80. package/dist/esm/loader.js +0 -17
  81. package/dist/esm/polyfills/core-js.js +0 -11
  82. package/dist/esm/polyfills/css-shim.js +0 -1
  83. package/dist/esm/polyfills/dom.js +0 -79
  84. package/dist/esm/polyfills/es5-html-element.js +0 -1
  85. package/dist/esm/polyfills/index.js +0 -34
  86. package/dist/esm/polyfills/system.js +0 -6
  87. package/dist/gatacaqr/p-143c0080.js +0 -1
  88. package/dist/gatacaqr/p-29119208.js +0 -1
  89. package/dist/gatacaqr/p-2dc7190a.entry.js +0 -1
  90. package/dist/gatacaqr/p-2e8accf9.entry.js +0 -1
  91. package/dist/gatacaqr/p-85af64b1.js +0 -2
  92. package/dist/gatacaqr/p-d27dabe4.entry.js +0 -1
  93. package/dist/gatacaqr/p-e172581d.entry.js +0 -1
  94. package/dist/index.cjs.js +0 -1
  95. package/dist/index.js +0 -1
  96. /package/dist/{esm → gatacaqr}/utils-e4a08623.js +0 -0
@@ -1,116 +0,0 @@
1
- /* http://meyerweb.com/eric/tools/css/reset/
2
- v2.0 | 20110126
3
- License: none (public domain)
4
- */
5
- @import url("https://fonts.googleapis.com/css2?family=Work+Sans:wght@300;400&display=swap");
6
- html, body, div, span, applet, object, iframe,
7
- h1, h2, h3, h4, h5, h6, p, blockquote, pre,
8
- a, abbr, acronym, address, big, cite, code,
9
- del, dfn, em, img, ins, kbd, q, s, samp,
10
- small, strike, strong, sub, sup, tt, var,
11
- b, u, i, center,
12
- dl, dt, dd, ol, ul, li,
13
- fieldset, form, label, legend,
14
- table, caption, tbody, tfoot, thead, tr, th, td,
15
- article, aside, canvas, details, embed,
16
- figure, figcaption, footer, header, hgroup,
17
- menu, nav, output, ruby, section, summary,
18
- time, mark, audio, video {
19
- margin: 0;
20
- padding: 0;
21
- border: 0;
22
- font-size: 100%;
23
- font: inherit;
24
- vertical-align: baseline;
25
- }
26
-
27
- /* HTML5 display-role reset for older browsers */
28
- article, aside, details, figcaption, figure,
29
- footer, header, hgroup, menu, nav, section {
30
- display: block;
31
- }
32
-
33
- body {
34
- line-height: 1;
35
- }
36
-
37
- ol, ul {
38
- list-style: none;
39
- }
40
-
41
- blockquote, q {
42
- quotes: none;
43
- }
44
-
45
- blockquote:before, blockquote:after,
46
- q:before, q:after {
47
- content: "";
48
- content: none;
49
- }
50
-
51
- table {
52
- border-collapse: collapse;
53
- border-spacing: 0;
54
- }
55
-
56
- /*
57
- QR COMPONENT
58
- */
59
- .img-fluid {
60
- height: auto;
61
- max-width: 50%;
62
- }
63
-
64
- img {
65
- margin-left: auto;
66
- margin-right: auto;
67
- }
68
-
69
- .buttonContainer {
70
- display: inline-block;
71
- text-align: right;
72
- padding: 10px;
73
- position: relative;
74
- }
75
-
76
- .gatacaButtonWrapper {
77
- margin: 8px;
78
- }
79
- .gatacaButtonWrapper .gatacaButton {
80
- display: flex;
81
- min-width: 100px;
82
- padding: 8px 8px;
83
- background-color: white;
84
- font-size: 12px;
85
- font-family: "Work Sans", sans-serif;
86
- letter-spacing: 1px;
87
- font-weight: 2;
88
- justify-content: space-between;
89
- align-items: center;
90
- border-radius: 6px;
91
- border: 1px solid rgba(24, 27, 94, 0.5);
92
- color: rgba(24, 27, 94, 0.8);
93
- box-shadow: 0px 1px 3px rgba(48, 48, 48, 0.15);
94
- cursor: pointer;
95
- }
96
- .gatacaButtonWrapper .gatacaButton > span {
97
- margin-right: 10px;
98
- }
99
- .gatacaButtonWrapper .gatacaButton:hover {
100
- box-shadow: 0px 2px 8px rgba(48, 48, 48, 0.1);
101
- }
102
- .gatacaButtonWrapper .buttonText {
103
- text-align: right;
104
- font-size: 8px;
105
- color: rgba(24, 27, 94, 0.5);
106
- font-family: "Helvetica Neue", sans-serif;
107
- letter-spacing: 1px;
108
- padding-right: 8px;
109
- font-weight: 1;
110
- }
111
- .gatacaButtonWrapper .buttonImg {
112
- height: 25px;
113
- width: 25px;
114
- margin: 0;
115
- margin-right: 20px;
116
- }
@@ -1,434 +0,0 @@
1
- import { h } from '@stencil/core';
2
- 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=';
3
- export class GatacaSSIButtonWS {
4
- constructor() {
5
- this.buttonText = 'Easy login';
6
- this.successCallback = undefined;
7
- this.errorCallback = undefined;
8
- this.qrType = 'svg';
9
- this.qrRole = undefined;
10
- this.callbackServer = undefined;
11
- this.socketEndpoint = undefined;
12
- this.sessionTimeout = undefined;
13
- this.wsOnOpen = undefined;
14
- this.wsOnMessage = undefined;
15
- this.autostart = true;
16
- this.autorefresh = false;
17
- this.v = '3';
18
- this.qrModalTitle = 'Quick Access';
19
- this.qrModalDescription = 'Sign up or sign in by scanning the QR Code with the Gataca Wallet';
20
- this.hideBrandTitle = false;
21
- this.dynamicLink = true;
22
- this.open = false;
23
- this.qr = (h("gataca-qrws", { wsOnMessage: this.wsOnMessage, wsOnOpen: this.wsOnOpen, successCallback: this.successCallback, errorCallback: this.errorCallback, qrRole: this.qrRole, qrType: this.qrType, 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 }));
24
- }
25
- /**
26
- * Retrieve manually the session data on a successful login
27
- */
28
- async getSessionData() {
29
- return this.qr.getSessionData();
30
- }
31
- renderModal() {
32
- return this.qr;
33
- }
34
- renderButton() {
35
- return (h("div", { class: "gatacaButtonWrapper" }, h("button", { class: "gatacaButton", onClick: () => {
36
- this.open = !this.open;
37
- if (this.open) {
38
- this.qr.display();
39
- }
40
- else {
41
- this.qr.stop();
42
- }
43
- } }, h("img", { src: PHONE_ICON, class: "buttonImg", alt: this.buttonText }), h("span", null, this.buttonText))));
44
- }
45
- render() {
46
- return (h("div", { class: "buttonContainer" }, this.renderButton(), this.open && this.renderModal()));
47
- }
48
- static get is() { return "gataca-ssibuttonws"; }
49
- static get encapsulation() { return "shadow"; }
50
- static get originalStyleUrls() {
51
- return {
52
- "$": ["gataca-ssibuttonws.scss"]
53
- };
54
- }
55
- static get styleUrls() {
56
- return {
57
- "$": ["gataca-ssibuttonws.css"]
58
- };
59
- }
60
- static get properties() {
61
- return {
62
- "buttonText": {
63
- "type": "string",
64
- "mutable": false,
65
- "complexType": {
66
- "original": "string",
67
- "resolved": "string",
68
- "references": {}
69
- },
70
- "required": false,
71
- "optional": true,
72
- "docs": {
73
- "tags": [],
74
- "text": "_[Optional]_\nIn the case of being a button, modifies its text"
75
- },
76
- "attribute": "button-text",
77
- "reflect": false,
78
- "defaultValue": "'Easy login'"
79
- },
80
- "successCallback": {
81
- "type": "unknown",
82
- "mutable": false,
83
- "complexType": {
84
- "original": "(data?: any) => void",
85
- "resolved": "(data?: any) => void",
86
- "references": {}
87
- },
88
- "required": false,
89
- "optional": false,
90
- "docs": {
91
- "tags": [],
92
- "text": "***Mandatory***\nCallback fired upon session correctly verified\nIf not set, session validation wouldn't trigger any action\nThe session data and a possible token will be sent as parameters to the callback"
93
- },
94
- "defaultValue": "undefined"
95
- },
96
- "errorCallback": {
97
- "type": "unknown",
98
- "mutable": false,
99
- "complexType": {
100
- "original": "(error?: Error) => void",
101
- "resolved": "(error?: Error) => void",
102
- "references": {
103
- "Error": {
104
- "location": "global"
105
- }
106
- }
107
- },
108
- "required": false,
109
- "optional": false,
110
- "docs": {
111
- "tags": [],
112
- "text": "***Mandatory***\nCallback fired upon session expired or invalid\nIf not set, session error would not be handled\nAn error containing information will be passed as parameter"
113
- },
114
- "defaultValue": "undefined"
115
- },
116
- "qrType": {
117
- "type": "string",
118
- "mutable": false,
119
- "complexType": {
120
- "original": "DrawType",
121
- "resolved": "\"canvas\" | \"svg\"",
122
- "references": {
123
- "DrawType": {
124
- "location": "import",
125
- "path": "qr-code-styling"
126
- }
127
- }
128
- },
129
- "required": false,
130
- "optional": true,
131
- "docs": {
132
- "tags": [],
133
- "text": "_[Optional]_\nSets the qr type. It can be \"svg\" or \"canvas\". \"svg\" by default."
134
- },
135
- "attribute": "qr-type",
136
- "reflect": false,
137
- "defaultValue": "'svg'"
138
- },
139
- "qrRole": {
140
- "type": "string",
141
- "mutable": false,
142
- "complexType": {
143
- "original": "string",
144
- "resolved": "string",
145
- "references": {}
146
- },
147
- "required": false,
148
- "optional": false,
149
- "docs": {
150
- "tags": [],
151
- "text": "***Mandatory***\nDecide if scanning the credential as a verifier to request credentials\nor as an issuer too issue credentials.\nOptions: connect | certify"
152
- },
153
- "attribute": "qr-role",
154
- "reflect": false
155
- },
156
- "callbackServer": {
157
- "type": "string",
158
- "mutable": false,
159
- "complexType": {
160
- "original": "string",
161
- "resolved": "string",
162
- "references": {}
163
- },
164
- "required": false,
165
- "optional": false,
166
- "docs": {
167
- "tags": [],
168
- "text": "***Mandatory just for V1***\nConnect/Certify Server where the wallet will send the data"
169
- },
170
- "attribute": "callback-server",
171
- "reflect": false
172
- },
173
- "socketEndpoint": {
174
- "type": "string",
175
- "mutable": false,
176
- "complexType": {
177
- "original": "string",
178
- "resolved": "string",
179
- "references": {}
180
- },
181
- "required": false,
182
- "optional": false,
183
- "docs": {
184
- "tags": [],
185
- "text": "***Mandatory***\nWS Endpoint on your service to be invoked upon display"
186
- },
187
- "attribute": "socket-endpoint",
188
- "reflect": false
189
- },
190
- "sessionTimeout": {
191
- "type": "number",
192
- "mutable": false,
193
- "complexType": {
194
- "original": "number",
195
- "resolved": "number",
196
- "references": {}
197
- },
198
- "required": false,
199
- "optional": true,
200
- "docs": {
201
- "tags": [],
202
- "text": "***Mandatory***\nMaximum time window to display the session and keep the websocket connection. It's needed to ensure the socket is closed."
203
- },
204
- "attribute": "session-timeout",
205
- "reflect": false
206
- },
207
- "wsOnOpen": {
208
- "type": "unknown",
209
- "mutable": false,
210
- "complexType": {
211
- "original": "(socket: WebSocket) => void",
212
- "resolved": "(socket: WebSocket) => void",
213
- "references": {
214
- "WebSocket": {
215
- "location": "global"
216
- }
217
- }
218
- },
219
- "required": false,
220
- "optional": false,
221
- "docs": {
222
- "tags": [],
223
- "text": "[Optional]\nFunction to send a message to the server upon socket creation"
224
- }
225
- },
226
- "wsOnMessage": {
227
- "type": "unknown",
228
- "mutable": false,
229
- "complexType": {
230
- "original": "(socket: WebSocket, msg: MessageEvent) => void",
231
- "resolved": "(socket: WebSocket, msg: MessageEvent<any>) => void",
232
- "references": {
233
- "WebSocket": {
234
- "location": "global"
235
- },
236
- "MessageEvent": {
237
- "location": "global"
238
- }
239
- }
240
- },
241
- "required": false,
242
- "optional": false,
243
- "docs": {
244
- "tags": [],
245
- "text": "**RECOMMENDED**\nCallback to invoke an a message has been received on the socket. It provides the socket itself and the message as parameters.\nIf not used, the messages provided by the server on the Socket connection must conform to the WSReponse interface\nIf used, an Event named **sessionMsg** must be triggered with a WSReponse as data"
246
- }
247
- },
248
- "autostart": {
249
- "type": "boolean",
250
- "mutable": false,
251
- "complexType": {
252
- "original": "boolean",
253
- "resolved": "boolean",
254
- "references": {}
255
- },
256
- "required": false,
257
- "optional": false,
258
- "docs": {
259
- "tags": [],
260
- "text": "_[Optional]_\nSet to enable autoload when the QR is displayed. By default it is true"
261
- },
262
- "attribute": "autostart",
263
- "reflect": false,
264
- "defaultValue": "true"
265
- },
266
- "autorefresh": {
267
- "type": "boolean",
268
- "mutable": false,
269
- "complexType": {
270
- "original": "boolean",
271
- "resolved": "boolean",
272
- "references": {}
273
- },
274
- "required": false,
275
- "optional": false,
276
- "docs": {
277
- "tags": [],
278
- "text": "_[Optional]_\nSet to refresh the session automatically upon expiration. By default it is false"
279
- },
280
- "attribute": "autorefresh",
281
- "reflect": false,
282
- "defaultValue": "false"
283
- },
284
- "v": {
285
- "type": "string",
286
- "mutable": false,
287
- "complexType": {
288
- "original": "string",
289
- "resolved": "string",
290
- "references": {}
291
- },
292
- "required": false,
293
- "optional": true,
294
- "docs": {
295
- "tags": [],
296
- "text": "**RECOMMENDED**\nIf 3, handle deeplink redirects and deprecates (remove) v1 functionality. If not, the create session must be providing both an authentication request and a session Id"
297
- },
298
- "attribute": "v",
299
- "reflect": false,
300
- "defaultValue": "'3'"
301
- },
302
- "qrModalTitle": {
303
- "type": "string",
304
- "mutable": false,
305
- "complexType": {
306
- "original": "string",
307
- "resolved": "string",
308
- "references": {}
309
- },
310
- "required": false,
311
- "optional": true,
312
- "docs": {
313
- "tags": [],
314
- "text": "_[Optional]_\nModifies the qr headline title"
315
- },
316
- "attribute": "qr-modal-title",
317
- "reflect": false,
318
- "defaultValue": "'Quick Access'"
319
- },
320
- "qrModalDescription": {
321
- "type": "string",
322
- "mutable": false,
323
- "complexType": {
324
- "original": "string",
325
- "resolved": "string",
326
- "references": {}
327
- },
328
- "required": false,
329
- "optional": true,
330
- "docs": {
331
- "tags": [],
332
- "text": "_[Optional]_\nModifies the Modal description"
333
- },
334
- "attribute": "qr-modal-description",
335
- "reflect": false,
336
- "defaultValue": "'Sign up or sign in by scanning the QR Code with the Gataca Wallet'"
337
- },
338
- "hideBrandTitle": {
339
- "type": "boolean",
340
- "mutable": false,
341
- "complexType": {
342
- "original": "boolean",
343
- "resolved": "boolean",
344
- "references": {}
345
- },
346
- "required": false,
347
- "optional": true,
348
- "docs": {
349
- "tags": [],
350
- "text": "_[Optional]_\nBoolean to show or not show the gataca brand title"
351
- },
352
- "attribute": "hide-brand-title",
353
- "reflect": false,
354
- "defaultValue": "false"
355
- },
356
- "dynamicLink": {
357
- "type": "boolean",
358
- "mutable": false,
359
- "complexType": {
360
- "original": "boolean",
361
- "resolved": "boolean",
362
- "references": {}
363
- },
364
- "required": false,
365
- "optional": true,
366
- "docs": {
367
- "tags": [],
368
- "text": "_[Optional]_\nDisplay a link containing a dynamic link to invoke the wallet if closed"
369
- },
370
- "attribute": "dynamic-link",
371
- "reflect": false,
372
- "defaultValue": "true"
373
- }
374
- };
375
- }
376
- static get states() {
377
- return {
378
- "open": {}
379
- };
380
- }
381
- static get events() {
382
- return [{
383
- "method": "gatacaLoginCompleted",
384
- "name": "gatacaLoginCompleted",
385
- "bubbles": true,
386
- "cancelable": true,
387
- "composed": true,
388
- "docs": {
389
- "tags": [],
390
- "text": "GatacaLoginCompleted event, triggered with session data upon login success"
391
- },
392
- "complexType": {
393
- "original": "any",
394
- "resolved": "any",
395
- "references": {}
396
- }
397
- }, {
398
- "method": "gatacaLoginFailed",
399
- "name": "gatacaLoginFailed",
400
- "bubbles": true,
401
- "cancelable": true,
402
- "composed": true,
403
- "docs": {
404
- "tags": [],
405
- "text": "GatacaLoginFailed event, triggered with error upon login failure"
406
- },
407
- "complexType": {
408
- "original": "any",
409
- "resolved": "any",
410
- "references": {}
411
- }
412
- }];
413
- }
414
- static get methods() {
415
- return {
416
- "getSessionData": {
417
- "complexType": {
418
- "signature": "() => Promise<any>",
419
- "parameters": [],
420
- "references": {
421
- "Promise": {
422
- "location": "global"
423
- }
424
- },
425
- "return": "Promise<any>"
426
- },
427
- "docs": {
428
- "text": "Retrieve manually the session data on a successful login",
429
- "tags": []
430
- }
431
- }
432
- };
433
- }
434
- }
@@ -1,6 +0,0 @@
1
- import { h } from '@stencil/core';
2
- export const RefreshIcon = (props) => {
3
- const { height = 24, width = 24, color } = props;
4
- const strokeColor = color ? color : '#8B8B8B';
5
- return (h("svg", { width: width, height: height, viewBox: `0 0 ${width} ${height}`, fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { d: "M23 4V10H17", stroke: strokeColor, "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }), h("path", { d: "M20.4899 15C19.8399 16.8399 18.6094 18.4187 16.984 19.4985C15.3586 20.5783 13.4263 21.1006 11.4783 20.9866C9.53026 20.8726 7.67203 20.1286 6.18363 18.8667C4.69524 17.6047 3.6573 15.8932 3.22625 13.9901C2.79519 12.0869 2.99436 10.0952 3.79374 8.31508C4.59313 6.53496 5.94942 5.06288 7.65823 4.12065C9.36705 3.17843 11.3358 2.81711 13.2678 3.09116C15.1999 3.3652 16.9905 4.25975 18.3699 5.64001L22.9999 10", stroke: strokeColor, "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" })));
6
- };
@@ -1,2 +0,0 @@
1
- export * from './components';
2
- export * from './utils';
@@ -1 +0,0 @@
1
- export * from './utils';
@@ -1,66 +0,0 @@
1
- export function checkMobile() {
2
- var check = false;
3
- (function (a) {
4
- if (/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(a) ||
5
- /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(a.substr(0, 4)))
6
- check = true;
7
- })(navigator.userAgent || navigator.vendor);
8
- return check;
9
- }
10
- export function base64UrlEncode(str) {
11
- let b64 = btoa(str);
12
- return b64.replace(/\+/g, '-').replace(/\//g, '_').replace(/\=+$/, '');
13
- }
14
- export var RESULT_STATUS;
15
- (function (RESULT_STATUS) {
16
- RESULT_STATUS[RESULT_STATUS["NOT_STARTED"] = -1] = "NOT_STARTED";
17
- RESULT_STATUS[RESULT_STATUS["ONGOING"] = 0] = "ONGOING";
18
- RESULT_STATUS[RESULT_STATUS["SUCCESS"] = 1] = "SUCCESS";
19
- RESULT_STATUS[RESULT_STATUS["FAILED"] = 2] = "FAILED";
20
- RESULT_STATUS[RESULT_STATUS["EXPIRED"] = 3] = "EXPIRED";
21
- RESULT_STATUS[RESULT_STATUS["READ"] = 5] = "READ";
22
- })(RESULT_STATUS || (RESULT_STATUS = {}));
23
- const GATACA_SHORTEN_API = 'https://links.gataca.io/api/v1/short';
24
- function extractShortUrlFromResponse(body) {
25
- if (!body || typeof body !== 'object') {
26
- return null;
27
- }
28
- const o = body;
29
- for (const key of ['url', 'shortUrl', 'short_url', 'link']) {
30
- const v = o[key];
31
- if (typeof v === 'string' && v.trim() !== '') {
32
- return v;
33
- }
34
- }
35
- return null;
36
- }
37
- /**
38
- * POSTs the link to shortener. On success with a non-empty url in the body, returns that url;
39
- * otherwise returns the original link.
40
- */
41
- export async function shortenUrlIfPossible(link) {
42
- const trimmedLink = (link === null || link === void 0 ? void 0 : link.trim()) || '';
43
- const linkHasLength = trimmedLink === null || trimmedLink === void 0 ? void 0 : trimmedLink.length;
44
- if (!linkHasLength) {
45
- return link !== null && link !== void 0 ? link : '';
46
- }
47
- try {
48
- const res = await fetch(GATACA_SHORTEN_API, {
49
- method: 'POST',
50
- mode: 'cors',
51
- credentials: 'omit',
52
- headers: { 'Content-Type': 'application/json' },
53
- body: JSON.stringify({ url: trimmedLink })
54
- });
55
- if (res.status !== 200 && res.status !== 201) {
56
- return link;
57
- }
58
- const data = await res.json().catch(() => null);
59
- const short = extractShortUrlFromResponse(data);
60
- return short !== null && short !== void 0 ? short : link;
61
- }
62
- catch (_a) {
63
- return link;
64
- }
65
- }
66
- //