@gataca/qr 4.1.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.
- 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/gatacaqr/gat-icon-check-9132c0ad.js +5 -0
- package/dist/{esm → gatacaqr}/gataca-autoqr.entry.js +1 -1
- package/dist/{components/gataca-qr2.js → gatacaqr/gataca-qr.entry.js} +10 -77
- package/dist/gatacaqr/gataca-qrdisplay-9a22c242.js +123 -0
- package/dist/gatacaqr/gataca-qrdisplay.entry.js +2 -0
- package/dist/{esm → gatacaqr}/gataca-qrws.entry.js +3 -2
- package/dist/{components/gataca-ssibutton2.js → gatacaqr/gataca-ssibutton.entry.js} +39 -89
- package/dist/{esm → gatacaqr}/gataca-ssibuttonws.entry.js +1 -1
- package/dist/gatacaqr/gatacaqr.esm.js +129 -1
- package/dist/gatacaqr/index-aea56eb8.js +3262 -0
- package/dist/gatacaqr/index.esm.js +1 -1
- package/dist/gatacaqr/shadow-css-146f2f6f.js +387 -0
- package/dist/types/components/gataca-autoqr/gataca-autoqr.e2e.d.ts +1 -0
- package/dist/types/components/gataca-qr/gataca-qr.e2e.d.ts +1 -0
- package/dist/types/components/gataca-qrdisplay/gataca-qrdisplay.e2e.d.ts +1 -0
- package/dist/types/components/gataca-qrws/gataca-qrws.e2e.d.ts +1 -0
- package/dist/types/components/gataca-ssibutton/gataca-ssibutton.d.ts +2 -1
- package/dist/types/components/gataca-ssibutton/gataca-ssibutton.e2e.d.ts +1 -0
- package/dist/types/components/gataca-ssibuttonws/gataca-ssibuttonws.e2e.d.ts +1 -0
- package/package.json +1 -1
- package/dist/cjs/gat-icon-check-6b6780eb.js +0 -37
- package/dist/cjs/gataca-autoqr.cjs.entry.js +0 -106
- package/dist/cjs/gataca-qr_3.cjs.entry.js +0 -743
- package/dist/cjs/gataca-qrws.cjs.entry.js +0 -366
- package/dist/cjs/gataca-ssibuttonws.cjs.entry.js +0 -61
- package/dist/cjs/gatacaqr.cjs.js +0 -19
- package/dist/cjs/index-d8d3dfde.js +0 -1532
- package/dist/cjs/index.cjs.js +0 -17
- package/dist/cjs/loader.cjs.js +0 -21
- package/dist/cjs/utils-17b0a5ba.js +0 -72
- 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 -7
- 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 -347
- package/dist/collection/components/gataca-qr/components/qr/QR.js +0 -13
- package/dist/collection/components/gataca-qr/components/readQR/ReadQR.js +0 -16
- package/dist/collection/components/gataca-qr/components/readQR/components/AnimatedLoader.js +0 -6
- package/dist/collection/components/gataca-qr/components/retryButton/RetryButton.js +0 -19
- package/dist/collection/components/gataca-qr/components/success/Success.js +0 -9
- package/dist/collection/components/gataca-qr/gataca-qr.css +0 -415
- package/dist/collection/components/gataca-qr/gataca-qr.js +0 -1069
- package/dist/collection/components/gataca-qrdisplay/gataca-qrdisplay.js +0 -224
- package/dist/collection/components/gataca-qrws/components/qr/QR.js +0 -13
- package/dist/collection/components/gataca-qrws/components/readQR/ReadQR.js +0 -11
- package/dist/collection/components/gataca-qrws/components/readQR/components/AnimatedLoader.js +0 -4
- package/dist/collection/components/gataca-qrws/components/retryButton/RetryButton.js +0 -16
- package/dist/collection/components/gataca-qrws/components/success/Success.js +0 -8
- package/dist/collection/components/gataca-qrws/gataca-qrws.css +0 -407
- package/dist/collection/components/gataca-qrws/gataca-qrws.js +0 -1098
- package/dist/collection/components/gataca-ssibutton/gataca-ssibutton.css +0 -116
- package/dist/collection/components/gataca-ssibutton/gataca-ssibutton.js +0 -1151
- package/dist/collection/components/gataca-ssibuttonws/gataca-ssibuttonws.css +0 -116
- package/dist/collection/components/gataca-ssibuttonws/gataca-ssibuttonws.js +0 -434
- package/dist/collection/components/icons/RefreshIcon.js +0 -6
- package/dist/collection/index.js +0 -2
- package/dist/collection/utils/index.js +0 -1
- package/dist/collection/utils/utils.js +0 -66
- package/dist/components/gat-icon-check.js +0 -72
- package/dist/components/gataca-autoqr.js +0 -163
- package/dist/components/gataca-qr.js +0 -6
- package/dist/components/gataca-qrdisplay.js +0 -6
- package/dist/components/gataca-qrdisplay2.js +0 -121
- package/dist/components/gataca-qrws.js +0 -6
- package/dist/components/gataca-qrws2.js +0 -430
- package/dist/components/gataca-ssibutton.js +0 -6
- package/dist/components/gataca-ssibuttonws.js +0 -6
- package/dist/components/gataca-ssibuttonws2.js +0 -104
- package/dist/components/index.js +0 -8
- package/dist/esm/gat-icon-check-7320c81b.js +0 -32
- package/dist/esm/gataca-qr_3.entry.js +0 -737
- package/dist/esm/gatacaqr.js +0 -17
- package/dist/esm/index-dca2ab22.js +0 -1506
- 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/gatacaqr/p-143c0080.js +0 -1
- package/dist/gatacaqr/p-29119208.js +0 -1
- package/dist/gatacaqr/p-2dc7190a.entry.js +0 -1
- package/dist/gatacaqr/p-2e8accf9.entry.js +0 -1
- package/dist/gatacaqr/p-85af64b1.js +0 -2
- package/dist/gatacaqr/p-d27dabe4.entry.js +0 -1
- package/dist/gatacaqr/p-e172581d.entry.js +0 -1
- package/dist/index.cjs.js +0 -1
- package/dist/index.js +0 -1
- /package/dist/{esm → gatacaqr}/utils-e4a08623.js +0 -0
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const index = require('./index-d8d3dfde.js');
|
|
6
|
-
|
|
7
|
-
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}";
|
|
8
|
-
|
|
9
|
-
const DEFAULT_REPOSITORY = 'https://studio.gataca.io/api/v1/qrconfigs';
|
|
10
|
-
const fixFunctions = (data) => {
|
|
11
|
-
var _a, _b, _c, _d, _e, _f;
|
|
12
|
-
data.errorCallback = deserializeFunction((_a = data.errorCallback) === null || _a === void 0 ? void 0 : _a.toString());
|
|
13
|
-
data.successCallback = deserializeFunction((_b = data.successCallback) === null || _b === void 0 ? void 0 : _b.toString());
|
|
14
|
-
data.wsOnMessage = deserializeFunction((_c = data.wsOnMessage) === null || _c === void 0 ? void 0 : _c.toString());
|
|
15
|
-
data.wsOnOpen = deserializeFunction((_d = data.wsOnOpen) === null || _d === void 0 ? void 0 : _d.toString());
|
|
16
|
-
data.checkStatus = deserializeFunction((_e = data.checkStatus) === null || _e === void 0 ? void 0 : _e.toString());
|
|
17
|
-
data.createSession = deserializeFunction((_f = data.createSession) === null || _f === void 0 ? void 0 : _f.toString());
|
|
18
|
-
return data;
|
|
19
|
-
};
|
|
20
|
-
const deserializeFunction = (data) => {
|
|
21
|
-
if (data) {
|
|
22
|
-
return new Function('return ' + data)();
|
|
23
|
-
}
|
|
24
|
-
return undefined;
|
|
25
|
-
};
|
|
26
|
-
const GatacaAutoQR = class {
|
|
27
|
-
constructor(hostRef) {
|
|
28
|
-
index.registerInstance(this, hostRef);
|
|
29
|
-
this.gatacaLoginCompleted = index.createEvent(this, "gatacaLoginCompleted", 7);
|
|
30
|
-
this.gatacaLoginFailed = index.createEvent(this, "gatacaLoginFailed", 7);
|
|
31
|
-
this.configId = undefined;
|
|
32
|
-
this.qrType = 'svg';
|
|
33
|
-
this.configRepository = DEFAULT_REPOSITORY;
|
|
34
|
-
this.successCallback = undefined;
|
|
35
|
-
this.errorCallback = undefined;
|
|
36
|
-
this.checkStatus = undefined;
|
|
37
|
-
this.createSession = undefined;
|
|
38
|
-
this.wsOnOpen = undefined;
|
|
39
|
-
this.wsOnMessage = undefined;
|
|
40
|
-
this.config = undefined;
|
|
41
|
-
this.loading = undefined;
|
|
42
|
-
this.loading = true;
|
|
43
|
-
fetch(this.configRepository + '/' + this.configId, {
|
|
44
|
-
method: 'GET',
|
|
45
|
-
headers: {
|
|
46
|
-
'Content-Type': 'application/json'
|
|
47
|
-
}
|
|
48
|
-
})
|
|
49
|
-
.then((response) => {
|
|
50
|
-
response
|
|
51
|
-
.json()
|
|
52
|
-
.then((data) => {
|
|
53
|
-
data = fixFunctions(data);
|
|
54
|
-
this.config = data;
|
|
55
|
-
this.loading = false;
|
|
56
|
-
})
|
|
57
|
-
.catch((err) => {
|
|
58
|
-
console.log('Cannot retrieve selected config', err);
|
|
59
|
-
this.loading = false;
|
|
60
|
-
});
|
|
61
|
-
})
|
|
62
|
-
.catch((err) => {
|
|
63
|
-
console.log('Cannot retrieve selected config', err);
|
|
64
|
-
this.loading = false;
|
|
65
|
-
});
|
|
66
|
-
}
|
|
67
|
-
/**
|
|
68
|
-
* Retrieve manually the session data on a successful login
|
|
69
|
-
*/
|
|
70
|
-
async getSessionData() {
|
|
71
|
-
return this.qr.getSessionData();
|
|
72
|
-
}
|
|
73
|
-
selectQR() {
|
|
74
|
-
if (this.config.useButton) {
|
|
75
|
-
if (this.config.useWs) {
|
|
76
|
-
this.qr = (index.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, qrType: this.qrType, qrRole: this.config.qrRole, callbackServer: this.config.callbackServer, sessionTimeout: this.config.sessionTimeout, socketEndpoint: this.config.socketEndpoint, autostart: true, autorefresh: this.config.autorefresh, v: this.config.v, qrModalTitle: this.config.qrModalTitle, qrModalDescription: this.config.qrModalDescription, hideBrandTitle: this.config.hideBrandTitle, dynamicLink: this.config.dynamicLink }));
|
|
77
|
-
}
|
|
78
|
-
else {
|
|
79
|
-
this.qr = (index.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, qrType: this.qrType, qrRole: this.config.qrRole, callbackServer: this.config.callbackServer, sessionTimeout: this.config.sessionTimeout, pollingFrequency: this.config.pollingFrequency, autorefresh: this.config.autorefresh, v: this.config.v, qrModalTitle: this.config.qrModalTitle, qrModalDescription: this.config.qrModalDescription, hideBrandTitle: this.config.hideBrandTitle, dynamicLink: this.config.dynamicLink }));
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
else {
|
|
83
|
-
if (this.config.useWs) {
|
|
84
|
-
this.qr = (index.h("gataca-qrws", { wsOnMessage: this.wsOnMessage || this.config.wsOnMessage, wsOnOpen: this.wsOnOpen || this.config.wsOnOpen, successCallback: this.successCallback || this.config.successCallback, qrType: this.qrType, 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, v: this.config.v, qrModalTitle: this.config.qrModalTitle, qrModalDescription: this.config.qrModalDescription, hideBrandTitle: this.config.hideBrandTitle, dynamicLink: this.config.dynamicLink }));
|
|
85
|
-
}
|
|
86
|
-
else {
|
|
87
|
-
this.qr = (index.h("gataca-qr", { checkStatus: this.checkStatus || this.config.checkStatus, createSession: this.createSession || this.config.createSession, successCallback: this.successCallback || this.config.successCallback, qrType: this.qrType, 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, v: this.config.v, qrModalTitle: this.config.qrModalTitle, qrModalDescription: this.config.qrModalDescription, hideBrandTitle: this.config.hideBrandTitle, dynamicLink: this.config.dynamicLink }));
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
render() {
|
|
92
|
-
if (this.loading) {
|
|
93
|
-
//TODO: Improve loading message
|
|
94
|
-
return index.h("div", null, "Loading...");
|
|
95
|
-
}
|
|
96
|
-
if (this.config) {
|
|
97
|
-
this.selectQR();
|
|
98
|
-
return this.qr;
|
|
99
|
-
}
|
|
100
|
-
//TODO: Improve error message
|
|
101
|
-
return index.h("div", null, "Error loading your config...");
|
|
102
|
-
}
|
|
103
|
-
};
|
|
104
|
-
GatacaAutoQR.style = gatacaAutoqrCss;
|
|
105
|
-
|
|
106
|
-
exports.gataca_autoqr = GatacaAutoQR;
|