@gataca/qr 2.0.0 → 2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/gatacaqr/app-globals-0f993ce5.js +3 -0
- package/dist/gatacaqr/css-shim-8eec97b3.js +4 -0
- package/dist/gatacaqr/dom-1b0cf05d.js +73 -0
- package/dist/{components/gat-icon-refresh.js → gatacaqr/gat-icon-refresh-8d3dc25f.js} +1 -23
- package/dist/{esm → gatacaqr}/gataca-autoqr.entry.js +19 -2
- package/dist/{esm → gatacaqr}/gataca-qr.entry.js +4 -4
- package/dist/gatacaqr/gataca-qrdisplay-0320bb25.js +97 -0
- package/dist/gatacaqr/gataca-qrdisplay.entry.js +2 -0
- package/dist/{esm/gataca-qrdisplay_2.entry.js → gatacaqr/gataca-qrws.entry.js} +5 -47
- package/dist/{components/gataca-ssibutton2.js → gatacaqr/gataca-ssibutton.entry.js} +8 -52
- package/dist/{components/gataca-ssibuttonws2.js → gatacaqr/gataca-ssibuttonws.entry.js} +7 -53
- package/dist/gatacaqr/gatacaqr.esm.js +129 -1
- package/dist/gatacaqr/index-d0db23e4.js +3262 -0
- package/dist/gatacaqr/index.esm.js +1 -1
- package/dist/gatacaqr/shadow-css-146f2f6f.js +387 -0
- package/package.json +1 -1
- package/dist/cjs/gat-icon-refresh-751505ff.js +0 -14
- package/dist/cjs/gataca-autoqr.cjs.entry.js +0 -88
- package/dist/cjs/gataca-qr.cjs.entry.js +0 -175
- package/dist/cjs/gataca-qrdisplay_2.cjs.entry.js +0 -219
- package/dist/cjs/gataca-ssibutton_2.cjs.entry.js +0 -114
- package/dist/cjs/gatacaqr.cjs.js +0 -19
- package/dist/cjs/index-0b7a1532.js +0 -1410
- package/dist/cjs/index.cjs.js +0 -16
- package/dist/cjs/loader.cjs.js +0 -21
- package/dist/cjs/qr-code-styling-412bbc7a.js +0 -28
- package/dist/cjs/utils-383ee834.js +0 -26
- package/dist/collection/assets/icons/gat-icon-alert.svg +0 -5
- package/dist/collection/assets/icons/gat-icon-check.svg +0 -5
- package/dist/collection/assets/icons/gat-icon-refresh.svg +0 -4
- package/dist/collection/assets/images/logo_gataca.svg +0 -26
- package/dist/collection/collection-manifest.json +0 -17
- package/dist/collection/components/gataca-autoqr/gataca-autoqr.css +0 -116
- package/dist/collection/components/gataca-autoqr/gataca-autoqr.js +0 -306
- package/dist/collection/components/gataca-qr/gataca-qr.css +0 -249
- package/dist/collection/components/gataca-qr/gataca-qr.js +0 -557
- package/dist/collection/components/gataca-qrdisplay/gataca-qrdisplay.js +0 -154
- package/dist/collection/components/gataca-qrws/gataca-qrws.css +0 -249
- package/dist/collection/components/gataca-qrws/gataca-qrws.js +0 -566
- package/dist/collection/components/gataca-ssibutton/gataca-ssibutton.css +0 -116
- package/dist/collection/components/gataca-ssibutton/gataca-ssibutton.js +0 -395
- package/dist/collection/components/gataca-ssibuttonws/gataca-ssibuttonws.css +0 -116
- package/dist/collection/components/gataca-ssibuttonws/gataca-ssibuttonws.js +0 -410
- package/dist/collection/index.js +0 -2
- package/dist/collection/utils/index.js +0 -1
- package/dist/collection/utils/utils.js +0 -21
- package/dist/components/gataca-autoqr.js +0 -144
- package/dist/components/gataca-qr.js +0 -6
- package/dist/components/gataca-qr2.js +0 -211
- package/dist/components/gataca-qrdisplay.js +0 -6
- package/dist/components/gataca-qrdisplay2.js +0 -93
- package/dist/components/gataca-qrws.js +0 -6
- package/dist/components/gataca-qrws2.js +0 -212
- package/dist/components/gataca-ssibutton.js +0 -6
- package/dist/components/gataca-ssibuttonws.js +0 -6
- package/dist/components/index.js +0 -8
- package/dist/esm/gat-icon-refresh-179ea123.js +0 -9
- package/dist/esm/gataca-ssibutton_2.entry.js +0 -109
- package/dist/esm/gatacaqr.js +0 -17
- package/dist/esm/index-19eef502.js +0 -1384
- package/dist/esm/index.js +0 -1
- package/dist/esm/loader.js +0 -17
- package/dist/esm/polyfills/core-js.js +0 -11
- package/dist/esm/polyfills/css-shim.js +0 -1
- package/dist/esm/polyfills/dom.js +0 -79
- package/dist/esm/polyfills/es5-html-element.js +0 -1
- package/dist/esm/polyfills/index.js +0 -34
- package/dist/esm/polyfills/system.js +0 -6
- package/dist/esm/qr-code-styling-0eeb38d5.js +0 -26
- package/dist/gatacaqr/p-0905677f.entry.js +0 -1
- package/dist/gatacaqr/p-0be4566d.js +0 -1
- package/dist/gatacaqr/p-1d35273f.entry.js +0 -1
- package/dist/gatacaqr/p-2f22c7fc.js +0 -1
- package/dist/gatacaqr/p-4139a068.entry.js +0 -1
- package/dist/gatacaqr/p-a6f85341.js +0 -2
- package/dist/gatacaqr/p-b8ba109f.js +0 -1
- package/dist/gatacaqr/p-f85d7e76.entry.js +0 -1
- package/dist/index.cjs.js +0 -1
- package/dist/index.js +0 -1
- /package/dist/{esm → gatacaqr}/utils-05ba6c9f.js +0 -0
|
@@ -1,410 +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.qrRole = undefined;
|
|
9
|
-
this.callbackServer = undefined;
|
|
10
|
-
this.socketEndpoint = undefined;
|
|
11
|
-
this.sessionTimeout = undefined;
|
|
12
|
-
this.wsOnOpen = undefined;
|
|
13
|
-
this.wsOnMessage = undefined;
|
|
14
|
-
this.autostart = true;
|
|
15
|
-
this.autorefresh = false;
|
|
16
|
-
this.v2 = false;
|
|
17
|
-
this.qrModalTitle = "Quick Access";
|
|
18
|
-
this.qrModalDescription = "Sign up or sign in by scanning the QR Code with the Gataca Wallet";
|
|
19
|
-
this.hideBrandTitle = false;
|
|
20
|
-
this.dynamicLink = true;
|
|
21
|
-
this.open = false;
|
|
22
|
-
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, v2: this.v2, qrModalTitle: this.qrModalTitle, qrModalDescription: this.qrModalDescription, hideBrandTitle: this.hideBrandTitle, dynamicLink: this.dynamicLink }));
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Retrieve manually the session data on a successful login
|
|
26
|
-
*/
|
|
27
|
-
async getSessionData() {
|
|
28
|
-
return this.qr.getSessionData();
|
|
29
|
-
}
|
|
30
|
-
renderModal() {
|
|
31
|
-
return this.qr;
|
|
32
|
-
}
|
|
33
|
-
renderButton() {
|
|
34
|
-
return (h("div", { class: "gatacaButtonWrapper" }, h("button", { class: "gatacaButton", onClick: () => {
|
|
35
|
-
this.open = !this.open;
|
|
36
|
-
if (this.open) {
|
|
37
|
-
this.qr.display();
|
|
38
|
-
}
|
|
39
|
-
else {
|
|
40
|
-
this.qr.stop();
|
|
41
|
-
}
|
|
42
|
-
} }, h("img", { src: PHONE_ICON, class: "buttonImg", alt: this.buttonText }), h("span", null, this.buttonText))));
|
|
43
|
-
}
|
|
44
|
-
render() {
|
|
45
|
-
return (h("div", { class: "buttonContainer" }, this.renderButton(), this.open && this.renderModal()));
|
|
46
|
-
}
|
|
47
|
-
static get is() { return "gataca-ssibuttonws"; }
|
|
48
|
-
static get encapsulation() { return "shadow"; }
|
|
49
|
-
static get originalStyleUrls() {
|
|
50
|
-
return {
|
|
51
|
-
"$": ["gataca-ssibuttonws.scss"]
|
|
52
|
-
};
|
|
53
|
-
}
|
|
54
|
-
static get styleUrls() {
|
|
55
|
-
return {
|
|
56
|
-
"$": ["gataca-ssibuttonws.css"]
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
static get properties() {
|
|
60
|
-
return {
|
|
61
|
-
"buttonText": {
|
|
62
|
-
"type": "string",
|
|
63
|
-
"mutable": false,
|
|
64
|
-
"complexType": {
|
|
65
|
-
"original": "string",
|
|
66
|
-
"resolved": "string",
|
|
67
|
-
"references": {}
|
|
68
|
-
},
|
|
69
|
-
"required": false,
|
|
70
|
-
"optional": true,
|
|
71
|
-
"docs": {
|
|
72
|
-
"tags": [],
|
|
73
|
-
"text": "_[Optional]_\nIn the case of being a button, modifies its text"
|
|
74
|
-
},
|
|
75
|
-
"attribute": "button-text",
|
|
76
|
-
"reflect": false,
|
|
77
|
-
"defaultValue": "\"Easy login\""
|
|
78
|
-
},
|
|
79
|
-
"successCallback": {
|
|
80
|
-
"type": "unknown",
|
|
81
|
-
"mutable": false,
|
|
82
|
-
"complexType": {
|
|
83
|
-
"original": "(data?: any) => void",
|
|
84
|
-
"resolved": "(data?: any) => void",
|
|
85
|
-
"references": {}
|
|
86
|
-
},
|
|
87
|
-
"required": false,
|
|
88
|
-
"optional": false,
|
|
89
|
-
"docs": {
|
|
90
|
-
"tags": [],
|
|
91
|
-
"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"
|
|
92
|
-
},
|
|
93
|
-
"defaultValue": "undefined"
|
|
94
|
-
},
|
|
95
|
-
"errorCallback": {
|
|
96
|
-
"type": "unknown",
|
|
97
|
-
"mutable": false,
|
|
98
|
-
"complexType": {
|
|
99
|
-
"original": "(error?: Error) => void",
|
|
100
|
-
"resolved": "(error?: Error) => void",
|
|
101
|
-
"references": {
|
|
102
|
-
"Error": {
|
|
103
|
-
"location": "global"
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
},
|
|
107
|
-
"required": false,
|
|
108
|
-
"optional": false,
|
|
109
|
-
"docs": {
|
|
110
|
-
"tags": [],
|
|
111
|
-
"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"
|
|
112
|
-
},
|
|
113
|
-
"defaultValue": "undefined"
|
|
114
|
-
},
|
|
115
|
-
"qrRole": {
|
|
116
|
-
"type": "string",
|
|
117
|
-
"mutable": false,
|
|
118
|
-
"complexType": {
|
|
119
|
-
"original": "string",
|
|
120
|
-
"resolved": "string",
|
|
121
|
-
"references": {}
|
|
122
|
-
},
|
|
123
|
-
"required": false,
|
|
124
|
-
"optional": false,
|
|
125
|
-
"docs": {
|
|
126
|
-
"tags": [],
|
|
127
|
-
"text": "***Mandatory***\nDecide if scanning the credential as a verifier to request credentials\nor as an issuer too issue credentials.\nOptions: connect | certify"
|
|
128
|
-
},
|
|
129
|
-
"attribute": "qr-role",
|
|
130
|
-
"reflect": false
|
|
131
|
-
},
|
|
132
|
-
"callbackServer": {
|
|
133
|
-
"type": "string",
|
|
134
|
-
"mutable": false,
|
|
135
|
-
"complexType": {
|
|
136
|
-
"original": "string",
|
|
137
|
-
"resolved": "string",
|
|
138
|
-
"references": {}
|
|
139
|
-
},
|
|
140
|
-
"required": false,
|
|
141
|
-
"optional": false,
|
|
142
|
-
"docs": {
|
|
143
|
-
"tags": [],
|
|
144
|
-
"text": "***Mandatory just for V1***\nConnect/Certify Server where the wallet will send the data"
|
|
145
|
-
},
|
|
146
|
-
"attribute": "callback-server",
|
|
147
|
-
"reflect": false
|
|
148
|
-
},
|
|
149
|
-
"socketEndpoint": {
|
|
150
|
-
"type": "string",
|
|
151
|
-
"mutable": false,
|
|
152
|
-
"complexType": {
|
|
153
|
-
"original": "string",
|
|
154
|
-
"resolved": "string",
|
|
155
|
-
"references": {}
|
|
156
|
-
},
|
|
157
|
-
"required": false,
|
|
158
|
-
"optional": false,
|
|
159
|
-
"docs": {
|
|
160
|
-
"tags": [],
|
|
161
|
-
"text": "***Mandatory***\nWS Endpoint on your service to be invoked upon display"
|
|
162
|
-
},
|
|
163
|
-
"attribute": "socket-endpoint",
|
|
164
|
-
"reflect": false
|
|
165
|
-
},
|
|
166
|
-
"sessionTimeout": {
|
|
167
|
-
"type": "number",
|
|
168
|
-
"mutable": false,
|
|
169
|
-
"complexType": {
|
|
170
|
-
"original": "number",
|
|
171
|
-
"resolved": "number",
|
|
172
|
-
"references": {}
|
|
173
|
-
},
|
|
174
|
-
"required": false,
|
|
175
|
-
"optional": true,
|
|
176
|
-
"docs": {
|
|
177
|
-
"tags": [],
|
|
178
|
-
"text": "***Mandatory***\nMaximum time window to display the session and keep the websocket connection. It's needed to ensure the socket is closed."
|
|
179
|
-
},
|
|
180
|
-
"attribute": "session-timeout",
|
|
181
|
-
"reflect": false
|
|
182
|
-
},
|
|
183
|
-
"wsOnOpen": {
|
|
184
|
-
"type": "unknown",
|
|
185
|
-
"mutable": false,
|
|
186
|
-
"complexType": {
|
|
187
|
-
"original": "(socket: WebSocket) => void",
|
|
188
|
-
"resolved": "(socket: WebSocket) => void",
|
|
189
|
-
"references": {
|
|
190
|
-
"WebSocket": {
|
|
191
|
-
"location": "global"
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
},
|
|
195
|
-
"required": false,
|
|
196
|
-
"optional": false,
|
|
197
|
-
"docs": {
|
|
198
|
-
"tags": [],
|
|
199
|
-
"text": "[Optional]\nFunction to send a message to the server upon socket creation"
|
|
200
|
-
}
|
|
201
|
-
},
|
|
202
|
-
"wsOnMessage": {
|
|
203
|
-
"type": "unknown",
|
|
204
|
-
"mutable": false,
|
|
205
|
-
"complexType": {
|
|
206
|
-
"original": "(socket: WebSocket, msg: MessageEvent) => void",
|
|
207
|
-
"resolved": "(socket: WebSocket, msg: MessageEvent<any>) => void",
|
|
208
|
-
"references": {
|
|
209
|
-
"WebSocket": {
|
|
210
|
-
"location": "global"
|
|
211
|
-
},
|
|
212
|
-
"MessageEvent": {
|
|
213
|
-
"location": "global"
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
},
|
|
217
|
-
"required": false,
|
|
218
|
-
"optional": false,
|
|
219
|
-
"docs": {
|
|
220
|
-
"tags": [],
|
|
221
|
-
"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"
|
|
222
|
-
}
|
|
223
|
-
},
|
|
224
|
-
"autostart": {
|
|
225
|
-
"type": "boolean",
|
|
226
|
-
"mutable": false,
|
|
227
|
-
"complexType": {
|
|
228
|
-
"original": "boolean",
|
|
229
|
-
"resolved": "boolean",
|
|
230
|
-
"references": {}
|
|
231
|
-
},
|
|
232
|
-
"required": false,
|
|
233
|
-
"optional": false,
|
|
234
|
-
"docs": {
|
|
235
|
-
"tags": [],
|
|
236
|
-
"text": "_[Optional]_\nSet to enable autoload when the QR is displayed. By default it is true"
|
|
237
|
-
},
|
|
238
|
-
"attribute": "autostart",
|
|
239
|
-
"reflect": false,
|
|
240
|
-
"defaultValue": "true"
|
|
241
|
-
},
|
|
242
|
-
"autorefresh": {
|
|
243
|
-
"type": "boolean",
|
|
244
|
-
"mutable": false,
|
|
245
|
-
"complexType": {
|
|
246
|
-
"original": "boolean",
|
|
247
|
-
"resolved": "boolean",
|
|
248
|
-
"references": {}
|
|
249
|
-
},
|
|
250
|
-
"required": false,
|
|
251
|
-
"optional": false,
|
|
252
|
-
"docs": {
|
|
253
|
-
"tags": [],
|
|
254
|
-
"text": "_[Optional]_\nSet to refresh the session automatically upon expiration. By default it is false"
|
|
255
|
-
},
|
|
256
|
-
"attribute": "autorefresh",
|
|
257
|
-
"reflect": false,
|
|
258
|
-
"defaultValue": "false"
|
|
259
|
-
},
|
|
260
|
-
"v2": {
|
|
261
|
-
"type": "boolean",
|
|
262
|
-
"mutable": false,
|
|
263
|
-
"complexType": {
|
|
264
|
-
"original": "boolean",
|
|
265
|
-
"resolved": "boolean",
|
|
266
|
-
"references": {}
|
|
267
|
-
},
|
|
268
|
-
"required": false,
|
|
269
|
-
"optional": true,
|
|
270
|
-
"docs": {
|
|
271
|
-
"tags": [],
|
|
272
|
-
"text": "**RECOMMENDED**\nSet to use v2 links. The create session must be providing both an authentication request and a session Id"
|
|
273
|
-
},
|
|
274
|
-
"attribute": "v-2",
|
|
275
|
-
"reflect": false,
|
|
276
|
-
"defaultValue": "false"
|
|
277
|
-
},
|
|
278
|
-
"qrModalTitle": {
|
|
279
|
-
"type": "string",
|
|
280
|
-
"mutable": false,
|
|
281
|
-
"complexType": {
|
|
282
|
-
"original": "string",
|
|
283
|
-
"resolved": "string",
|
|
284
|
-
"references": {}
|
|
285
|
-
},
|
|
286
|
-
"required": false,
|
|
287
|
-
"optional": true,
|
|
288
|
-
"docs": {
|
|
289
|
-
"tags": [],
|
|
290
|
-
"text": "_[Optional]_\nModifies the qr headline title"
|
|
291
|
-
},
|
|
292
|
-
"attribute": "qr-modal-title",
|
|
293
|
-
"reflect": false,
|
|
294
|
-
"defaultValue": "\"Quick Access\""
|
|
295
|
-
},
|
|
296
|
-
"qrModalDescription": {
|
|
297
|
-
"type": "string",
|
|
298
|
-
"mutable": false,
|
|
299
|
-
"complexType": {
|
|
300
|
-
"original": "string",
|
|
301
|
-
"resolved": "string",
|
|
302
|
-
"references": {}
|
|
303
|
-
},
|
|
304
|
-
"required": false,
|
|
305
|
-
"optional": true,
|
|
306
|
-
"docs": {
|
|
307
|
-
"tags": [],
|
|
308
|
-
"text": "_[Optional]_\nModifies the Modal description"
|
|
309
|
-
},
|
|
310
|
-
"attribute": "qr-modal-description",
|
|
311
|
-
"reflect": false,
|
|
312
|
-
"defaultValue": "\"Sign up or sign in by scanning the QR Code with the Gataca Wallet\""
|
|
313
|
-
},
|
|
314
|
-
"hideBrandTitle": {
|
|
315
|
-
"type": "boolean",
|
|
316
|
-
"mutable": false,
|
|
317
|
-
"complexType": {
|
|
318
|
-
"original": "boolean",
|
|
319
|
-
"resolved": "boolean",
|
|
320
|
-
"references": {}
|
|
321
|
-
},
|
|
322
|
-
"required": false,
|
|
323
|
-
"optional": true,
|
|
324
|
-
"docs": {
|
|
325
|
-
"tags": [],
|
|
326
|
-
"text": "_[Optional]_\nBoolean to show or not show the gataca brand title"
|
|
327
|
-
},
|
|
328
|
-
"attribute": "hide-brand-title",
|
|
329
|
-
"reflect": false,
|
|
330
|
-
"defaultValue": "false"
|
|
331
|
-
},
|
|
332
|
-
"dynamicLink": {
|
|
333
|
-
"type": "boolean",
|
|
334
|
-
"mutable": false,
|
|
335
|
-
"complexType": {
|
|
336
|
-
"original": "boolean",
|
|
337
|
-
"resolved": "boolean",
|
|
338
|
-
"references": {}
|
|
339
|
-
},
|
|
340
|
-
"required": false,
|
|
341
|
-
"optional": true,
|
|
342
|
-
"docs": {
|
|
343
|
-
"tags": [],
|
|
344
|
-
"text": "_[Optional]_\nDisplay a link containing a dynamic link to invoke the wallet if closed"
|
|
345
|
-
},
|
|
346
|
-
"attribute": "dynamic-link",
|
|
347
|
-
"reflect": false,
|
|
348
|
-
"defaultValue": "true"
|
|
349
|
-
}
|
|
350
|
-
};
|
|
351
|
-
}
|
|
352
|
-
static get states() {
|
|
353
|
-
return {
|
|
354
|
-
"open": {}
|
|
355
|
-
};
|
|
356
|
-
}
|
|
357
|
-
static get events() {
|
|
358
|
-
return [{
|
|
359
|
-
"method": "gatacaLoginCompleted",
|
|
360
|
-
"name": "gatacaLoginCompleted",
|
|
361
|
-
"bubbles": true,
|
|
362
|
-
"cancelable": true,
|
|
363
|
-
"composed": true,
|
|
364
|
-
"docs": {
|
|
365
|
-
"tags": [],
|
|
366
|
-
"text": "GatacaLoginCompleted event, triggered with session data upon login success"
|
|
367
|
-
},
|
|
368
|
-
"complexType": {
|
|
369
|
-
"original": "any",
|
|
370
|
-
"resolved": "any",
|
|
371
|
-
"references": {}
|
|
372
|
-
}
|
|
373
|
-
}, {
|
|
374
|
-
"method": "gatacaLoginFailed",
|
|
375
|
-
"name": "gatacaLoginFailed",
|
|
376
|
-
"bubbles": true,
|
|
377
|
-
"cancelable": true,
|
|
378
|
-
"composed": true,
|
|
379
|
-
"docs": {
|
|
380
|
-
"tags": [],
|
|
381
|
-
"text": "GatacaLoginFailed event, triggered with error upon login failure"
|
|
382
|
-
},
|
|
383
|
-
"complexType": {
|
|
384
|
-
"original": "any",
|
|
385
|
-
"resolved": "any",
|
|
386
|
-
"references": {}
|
|
387
|
-
}
|
|
388
|
-
}];
|
|
389
|
-
}
|
|
390
|
-
static get methods() {
|
|
391
|
-
return {
|
|
392
|
-
"getSessionData": {
|
|
393
|
-
"complexType": {
|
|
394
|
-
"signature": "() => Promise<any>",
|
|
395
|
-
"parameters": [],
|
|
396
|
-
"references": {
|
|
397
|
-
"Promise": {
|
|
398
|
-
"location": "global"
|
|
399
|
-
}
|
|
400
|
-
},
|
|
401
|
-
"return": "Promise<any>"
|
|
402
|
-
},
|
|
403
|
-
"docs": {
|
|
404
|
-
"text": "Retrieve manually the session data on a successful login",
|
|
405
|
-
"tags": []
|
|
406
|
-
}
|
|
407
|
-
}
|
|
408
|
-
};
|
|
409
|
-
}
|
|
410
|
-
}
|
package/dist/collection/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./utils";
|
|
@@ -1,21 +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 = {}));
|
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
|
|
2
|
-
import { d as defineCustomElement$6 } from './gataca-qr2.js';
|
|
3
|
-
import { d as defineCustomElement$5 } from './gataca-qrdisplay2.js';
|
|
4
|
-
import { d as defineCustomElement$4 } from './gataca-qrws2.js';
|
|
5
|
-
import { d as defineCustomElement$3 } from './gataca-ssibutton2.js';
|
|
6
|
-
import { d as defineCustomElement$2 } from './gataca-ssibuttonws2.js';
|
|
7
|
-
|
|
8
|
-
const gatacaAutoqrCss = "@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}";
|
|
9
|
-
|
|
10
|
-
const DEFAULT_REPOSITORY = "https://studio.gataca.io/api/v1/qrs";
|
|
11
|
-
const GatacaAutoQR = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
12
|
-
constructor() {
|
|
13
|
-
super();
|
|
14
|
-
this.__registerHost();
|
|
15
|
-
this.__attachShadow();
|
|
16
|
-
this.gatacaLoginCompleted = createEvent(this, "gatacaLoginCompleted", 7);
|
|
17
|
-
this.gatacaLoginFailed = createEvent(this, "gatacaLoginFailed", 7);
|
|
18
|
-
this.configId = undefined;
|
|
19
|
-
this.configRepository = DEFAULT_REPOSITORY;
|
|
20
|
-
this.successCallback = undefined;
|
|
21
|
-
this.errorCallback = undefined;
|
|
22
|
-
this.checkStatus = undefined;
|
|
23
|
-
this.createSession = undefined;
|
|
24
|
-
this.wsOnOpen = undefined;
|
|
25
|
-
this.wsOnMessage = undefined;
|
|
26
|
-
this.config = undefined;
|
|
27
|
-
this.loading = undefined;
|
|
28
|
-
this.loading = true;
|
|
29
|
-
fetch(this.configRepository + "/" + this.configId, {
|
|
30
|
-
method: "GET",
|
|
31
|
-
headers: {
|
|
32
|
-
"Content-Type": "application/json",
|
|
33
|
-
},
|
|
34
|
-
})
|
|
35
|
-
.then((response) => {
|
|
36
|
-
response
|
|
37
|
-
.json()
|
|
38
|
-
.then((data) => {
|
|
39
|
-
this.config = data;
|
|
40
|
-
this.loading = false;
|
|
41
|
-
})
|
|
42
|
-
.catch((err) => {
|
|
43
|
-
console.log("Cannot retrieve selected config", err);
|
|
44
|
-
this.loading = false;
|
|
45
|
-
});
|
|
46
|
-
})
|
|
47
|
-
.catch((err) => {
|
|
48
|
-
console.log("Cannot retrieve selected config", err);
|
|
49
|
-
this.loading = false;
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* Retrieve manually the session data on a successful login
|
|
54
|
-
*/
|
|
55
|
-
async getSessionData() {
|
|
56
|
-
return this.qr.getSessionData();
|
|
57
|
-
}
|
|
58
|
-
selectQR() {
|
|
59
|
-
if (this.config.useButton) {
|
|
60
|
-
if (this.config.useWs) {
|
|
61
|
-
this.qr = (h("gataca-ssibuttonws", { buttonText: this.config.buttonText, wsOnMessage: this.wsOnMessage || this.config.wsOnMessage, wsOnOpen: this.wsOnOpen || this.config.wsOnOpen, successCallback: this.successCallback || this.config.successCallback, errorCallback: this.errorCallback || this.config.errorCallback, qrRole: this.config.qrRole, callbackServer: this.config.callbackServer, sessionTimeout: this.config.sessionTimeout, socketEndpoint: this.config.socketEndpoint, autostart: true, autorefresh: this.config.autorefresh, v2: this.config.v2, qrModalTitle: this.config.qrModalTitle, qrModalDescription: this.config.qrModalDescription, hideBrandTitle: this.config.hideBrandTitle, dynamicLink: this.config.dynamicLink }));
|
|
62
|
-
}
|
|
63
|
-
else {
|
|
64
|
-
this.qr = (h("gataca-ssibutton", { buttonText: this.config.buttonText, checkStatus: this.checkStatus || this.config.checkStatus, createSession: this.createSession || this.config.createSession, successCallback: this.successCallback || this.config.successCallback, errorCallback: this.errorCallback || this.config.errorCallback, qrRole: this.config.qrRole, callbackServer: this.config.callbackServer, sessionTimeout: this.config.sessionTimeout, pollingFrequency: this.config.pollingFrequency, autorefresh: this.config.autorefresh, v2: this.config.v2, qrModalTitle: this.config.qrModalTitle, qrModalDescription: this.config.qrModalDescription, hideBrandTitle: this.config.hideBrandTitle, dynamicLink: this.config.dynamicLink }));
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
else {
|
|
68
|
-
if (this.config.useWs) {
|
|
69
|
-
this.qr = (h("gataca-qrws", { wsOnMessage: this.wsOnMessage || this.config.wsOnMessage, wsOnOpen: this.wsOnOpen || this.config.wsOnOpen, successCallback: this.successCallback || this.config.successCallback, errorCallback: this.errorCallback || this.config.errorCallback, qrRole: this.config.qrRole, callbackServer: this.config.callbackServer, sessionTimeout: this.config.sessionTimeout, socketEndpoint: this.config.socketEndpoint, autostart: this.config.autostart, autorefresh: this.config.autorefresh, v2: this.config.v2, qrModalTitle: this.config.qrModalTitle, qrModalDescription: this.config.qrModalDescription, hideBrandTitle: this.config.hideBrandTitle, dynamicLink: this.config.dynamicLink }));
|
|
70
|
-
}
|
|
71
|
-
else {
|
|
72
|
-
this.qr = (h("gataca-qr", { checkStatus: this.checkStatus || this.config.checkStatus, createSession: this.createSession || this.config.createSession, successCallback: this.successCallback || this.config.successCallback, errorCallback: this.errorCallback || this.config.errorCallback, qrRole: this.config.qrRole, callbackServer: this.config.callbackServer, sessionTimeout: this.config.sessionTimeout, pollingFrequency: this.config.pollingFrequency, autostart: this.config.autostart, autorefresh: this.config.autorefresh, v2: this.config.v2, qrModalTitle: this.config.qrModalTitle, qrModalDescription: this.config.qrModalDescription, hideBrandTitle: this.config.hideBrandTitle, dynamicLink: this.config.dynamicLink }));
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
render() {
|
|
77
|
-
if (this.loading) {
|
|
78
|
-
//TODO: Improve loading message
|
|
79
|
-
return h("div", null, "Loading...");
|
|
80
|
-
}
|
|
81
|
-
if (this.config) {
|
|
82
|
-
this.selectQR();
|
|
83
|
-
return this.qr;
|
|
84
|
-
}
|
|
85
|
-
//TODO: Improve error message
|
|
86
|
-
return h("div", null, "Error loading your config...");
|
|
87
|
-
}
|
|
88
|
-
static get style() { return gatacaAutoqrCss; }
|
|
89
|
-
}, [1, "gataca-autoqr", {
|
|
90
|
-
"configId": [1, "config-id"],
|
|
91
|
-
"configRepository": [1, "config-repository"],
|
|
92
|
-
"successCallback": [16],
|
|
93
|
-
"errorCallback": [16],
|
|
94
|
-
"checkStatus": [16],
|
|
95
|
-
"createSession": [16],
|
|
96
|
-
"wsOnOpen": [16],
|
|
97
|
-
"wsOnMessage": [16],
|
|
98
|
-
"config": [32],
|
|
99
|
-
"loading": [32],
|
|
100
|
-
"getSessionData": [64]
|
|
101
|
-
}]);
|
|
102
|
-
function defineCustomElement$1() {
|
|
103
|
-
if (typeof customElements === "undefined") {
|
|
104
|
-
return;
|
|
105
|
-
}
|
|
106
|
-
const components = ["gataca-autoqr", "gataca-qr", "gataca-qrdisplay", "gataca-qrws", "gataca-ssibutton", "gataca-ssibuttonws"];
|
|
107
|
-
components.forEach(tagName => { switch (tagName) {
|
|
108
|
-
case "gataca-autoqr":
|
|
109
|
-
if (!customElements.get(tagName)) {
|
|
110
|
-
customElements.define(tagName, GatacaAutoQR);
|
|
111
|
-
}
|
|
112
|
-
break;
|
|
113
|
-
case "gataca-qr":
|
|
114
|
-
if (!customElements.get(tagName)) {
|
|
115
|
-
defineCustomElement$6();
|
|
116
|
-
}
|
|
117
|
-
break;
|
|
118
|
-
case "gataca-qrdisplay":
|
|
119
|
-
if (!customElements.get(tagName)) {
|
|
120
|
-
defineCustomElement$5();
|
|
121
|
-
}
|
|
122
|
-
break;
|
|
123
|
-
case "gataca-qrws":
|
|
124
|
-
if (!customElements.get(tagName)) {
|
|
125
|
-
defineCustomElement$4();
|
|
126
|
-
}
|
|
127
|
-
break;
|
|
128
|
-
case "gataca-ssibutton":
|
|
129
|
-
if (!customElements.get(tagName)) {
|
|
130
|
-
defineCustomElement$3();
|
|
131
|
-
}
|
|
132
|
-
break;
|
|
133
|
-
case "gataca-ssibuttonws":
|
|
134
|
-
if (!customElements.get(tagName)) {
|
|
135
|
-
defineCustomElement$2();
|
|
136
|
-
}
|
|
137
|
-
break;
|
|
138
|
-
} });
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
const GatacaAutoqr = GatacaAutoQR;
|
|
142
|
-
const defineCustomElement = defineCustomElement$1;
|
|
143
|
-
|
|
144
|
-
export { GatacaAutoqr, defineCustomElement };
|