@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.
- 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
package/dist/cjs/index.cjs.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const utils = require('./utils-17b0a5ba.js');
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
Object.defineProperty(exports, 'RESULT_STATUS', {
|
|
10
|
-
enumerable: true,
|
|
11
|
-
get: function () {
|
|
12
|
-
return utils.RESULT_STATUS;
|
|
13
|
-
}
|
|
14
|
-
});
|
|
15
|
-
exports.base64UrlEncode = utils.base64UrlEncode;
|
|
16
|
-
exports.checkMobile = utils.checkMobile;
|
|
17
|
-
exports.shortenUrlIfPossible = utils.shortenUrlIfPossible;
|
package/dist/cjs/loader.cjs.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const index = require('./index-d8d3dfde.js');
|
|
6
|
-
|
|
7
|
-
/*
|
|
8
|
-
Stencil Client Patch Esm v2.19.3 | MIT Licensed | https://stenciljs.com
|
|
9
|
-
*/
|
|
10
|
-
const patchEsm = () => {
|
|
11
|
-
return index.promiseResolve();
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
const defineCustomElements = (win, options) => {
|
|
15
|
-
if (typeof window === 'undefined') return Promise.resolve();
|
|
16
|
-
return patchEsm().then(() => {
|
|
17
|
-
return index.bootstrapLazy([["gataca-qr_3.cjs",[[1,"gataca-ssibutton",{"buttonText":[1,"button-text"],"buttonDCAPIText":[1,"button-d-c-a-p-i-text"],"qrType":[1,"qr-type"],"autostart":[4],"checkStatus":[16],"createSession":[16],"fillSession":[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"],"enableDcApi":[4,"enable-dc-api"],"hideQrModalDescription":[4,"hide-qr-modal-description"],"qrStyle":[16],"open":[32],"sessionId":[32],"authenticationRequest":[32],"sessionData":[32],"result":[32],"getSessionData":[64],"startMobilePolling":[64],"stop":[64]}],[1,"gataca-qr",{"checkStatus":[16],"createSession":[16],"successCallback":[16],"errorCallback":[16],"qrRole":[1,"qr-role"],"qrType":[1,"qr-type"],"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"],"qrStyle":[16],"sessionId":[32],"authenticationRequest":[32],"sessionData":[32],"result":[32],"qrHref":[32],"display":[64],"stop":[64],"getSessionData":[64]}],[0,"gataca-qrdisplay",{"qrData":[1,"qr-data"],"qrType":[1,"qr-type"],"size":[2],"logoSize":[2,"logo-size"],"logoSrc":[1,"logo-src"],"qrColor":[1,"qr-color"],"bgColor":[1,"bg-color"],"rounded":[4]}]]],["gataca-qrws.cjs",[[1,"gataca-qrws",{"successCallback":[16],"errorCallback":[16],"qrRole":[1,"qr-role"],"qrType":[1,"qr-type"],"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],"qrHref":[32],"qrShortenPending":[32],"display":[64],"stop":[64],"getSessionData":[64]},[[2,"sessionMsg","sessionMsgReceived"]]]]],["gataca-ssibuttonws.cjs",[[1,"gataca-ssibuttonws",{"buttonText":[1,"button-text"],"successCallback":[16],"errorCallback":[16],"qrType":[1,"qr-type"],"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"],"qrType":[1,"qr-type"],"configRepository":[1,"config-repository"],"successCallback":[16],"errorCallback":[16],"checkStatus":[16],"createSession":[16],"wsOnOpen":[16],"wsOnMessage":[16],"config":[32],"loading":[32],"getSessionData":[64]}]]]], options);
|
|
18
|
-
});
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
exports.defineCustomElements = defineCustomElements;
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
function checkMobile() {
|
|
4
|
-
var check = false;
|
|
5
|
-
(function (a) {
|
|
6
|
-
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) ||
|
|
7
|
-
/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)))
|
|
8
|
-
check = true;
|
|
9
|
-
})(navigator.userAgent || navigator.vendor);
|
|
10
|
-
return check;
|
|
11
|
-
}
|
|
12
|
-
function base64UrlEncode(str) {
|
|
13
|
-
let b64 = btoa(str);
|
|
14
|
-
return b64.replace(/\+/g, '-').replace(/\//g, '_').replace(/\=+$/, '');
|
|
15
|
-
}
|
|
16
|
-
exports.RESULT_STATUS = void 0;
|
|
17
|
-
(function (RESULT_STATUS) {
|
|
18
|
-
RESULT_STATUS[RESULT_STATUS["NOT_STARTED"] = -1] = "NOT_STARTED";
|
|
19
|
-
RESULT_STATUS[RESULT_STATUS["ONGOING"] = 0] = "ONGOING";
|
|
20
|
-
RESULT_STATUS[RESULT_STATUS["SUCCESS"] = 1] = "SUCCESS";
|
|
21
|
-
RESULT_STATUS[RESULT_STATUS["FAILED"] = 2] = "FAILED";
|
|
22
|
-
RESULT_STATUS[RESULT_STATUS["EXPIRED"] = 3] = "EXPIRED";
|
|
23
|
-
RESULT_STATUS[RESULT_STATUS["READ"] = 5] = "READ";
|
|
24
|
-
})(exports.RESULT_STATUS || (exports.RESULT_STATUS = {}));
|
|
25
|
-
const GATACA_SHORTEN_API = 'https://links.gataca.io/api/v1/short';
|
|
26
|
-
function extractShortUrlFromResponse(body) {
|
|
27
|
-
if (!body || typeof body !== 'object') {
|
|
28
|
-
return null;
|
|
29
|
-
}
|
|
30
|
-
const o = body;
|
|
31
|
-
for (const key of ['url', 'shortUrl', 'short_url', 'link']) {
|
|
32
|
-
const v = o[key];
|
|
33
|
-
if (typeof v === 'string' && v.trim() !== '') {
|
|
34
|
-
return v;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
return null;
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* POSTs the link to shortener. On success with a non-empty url in the body, returns that url;
|
|
41
|
-
* otherwise returns the original link.
|
|
42
|
-
*/
|
|
43
|
-
async function shortenUrlIfPossible(link) {
|
|
44
|
-
const trimmedLink = (link === null || link === void 0 ? void 0 : link.trim()) || '';
|
|
45
|
-
const linkHasLength = trimmedLink === null || trimmedLink === void 0 ? void 0 : trimmedLink.length;
|
|
46
|
-
if (!linkHasLength) {
|
|
47
|
-
return link !== null && link !== void 0 ? link : '';
|
|
48
|
-
}
|
|
49
|
-
try {
|
|
50
|
-
const res = await fetch(GATACA_SHORTEN_API, {
|
|
51
|
-
method: 'POST',
|
|
52
|
-
mode: 'cors',
|
|
53
|
-
credentials: 'omit',
|
|
54
|
-
headers: { 'Content-Type': 'application/json' },
|
|
55
|
-
body: JSON.stringify({ url: trimmedLink })
|
|
56
|
-
});
|
|
57
|
-
if (res.status !== 200 && res.status !== 201) {
|
|
58
|
-
return link;
|
|
59
|
-
}
|
|
60
|
-
const data = await res.json().catch(() => null);
|
|
61
|
-
const short = extractShortUrlFromResponse(data);
|
|
62
|
-
return short !== null && short !== void 0 ? short : link;
|
|
63
|
-
}
|
|
64
|
-
catch (_a) {
|
|
65
|
-
return link;
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
//
|
|
69
|
-
|
|
70
|
-
exports.base64UrlEncode = base64UrlEncode;
|
|
71
|
-
exports.checkMobile = checkMobile;
|
|
72
|
-
exports.shortenUrlIfPossible = shortenUrlIfPossible;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
<path d="M10.2908 3.8602L1.82075 18.0002C1.64612 18.3026 1.55372 18.6455 1.55274 18.9947C1.55176 19.3439 1.64224 19.6873 1.81518 19.9907C1.98812 20.2941 2.23748 20.547 2.53846 20.7241C2.83944 20.9012 3.18155 20.9964 3.53075 21.0002H20.4708C20.82 20.9964 21.1621 20.9012 21.463 20.7241C21.764 20.547 22.0134 20.2941 22.1863 19.9907C22.3593 19.6873 22.4497 19.3439 22.4488 18.9947C22.4478 18.6455 22.3554 18.3026 22.1808 18.0002L13.7108 3.8602C13.5325 3.56631 13.2815 3.32332 12.9819 3.15469C12.6824 2.98605 12.3445 2.89746 12.0008 2.89746C11.657 2.89746 11.3191 2.98605 11.0196 3.15469C10.72 3.32332 10.469 3.56631 10.2908 3.8602V3.8602Z" stroke="#CD2B31" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
3
|
-
<path d="M12 9V13" stroke="#CD2B31" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
4
|
-
<path d="M12 17H12.01" stroke="#CD2B31" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
5
|
-
</svg>
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
<svg width="52" height="53" viewBox="0 0 52 53" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
3
|
-
<circle cx="26" cy="26.6719" r="26" fill="#3D9A50"/>
|
|
4
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M38.52 17.7495C39.5805 18.8099 39.5805 20.5293 38.52 21.5898L23.5846 36.5251C22.5242 37.5856 20.8048 37.5856 19.7443 36.5251L12.9555 29.7363C11.895 28.6759 11.895 26.9565 12.9555 25.896C14.016 24.8355 15.7354 24.8355 16.7958 25.896L21.6645 30.7647L34.6797 17.7495C35.7402 16.689 37.4595 16.689 38.52 17.7495Z" fill="white"/>
|
|
5
|
-
</svg>
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
<path d="M23 4V10H17" stroke="#8B8B8B" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
3
|
-
<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="#8B8B8B" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
4
|
-
</svg>
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
<svg version="1.2" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 76 71" width="71" height="66">
|
|
2
|
-
<title>Vector (3)-svg</title>
|
|
3
|
-
<style>
|
|
4
|
-
.s0 { fill: #4745b7 }
|
|
5
|
-
</style>
|
|
6
|
-
<path id="Layer" fill-rule="evenodd" class="s0" d="m72.2 38.4c2.2 3.3 3.5 7.2 3.5 11.4 0 11.2-8.8 20.2-19.9 20.7q-0.4 0-0.8 0c-3 0-5.8-0.6-8.4-1.7q-2.1-1-3.8-2.3-1.1-0.8-2.1-1.7-1.3-1.2-2.3-2.6-0.5 0.6-1 1.2c-3.8 4.4-9.4 7.1-15.7 7.1-6.7 0-12.6-3.2-16.4-8.1-2.7-3.5-4.3-7.8-4.3-12.6 0-10.6 8-19.3 18.3-20.5-1.1-2.5-1.7-5.2-1.7-8.1 0-11.5 9.3-20.7 20.8-20.7 10.2 0 18.7 7.4 20.4 17.2q0.3 1.7 0.3 3.5c0 2.9-0.6 5.6-1.7 8.1 6.2 0.7 11.6 4.2 14.8 9.1zm-44.7-23.5c-3.4 6-1.4 13.5 4.5 17q0.1 0 0.2 0.1c2.4 1.3 5.1 1.8 7.7 1.5 1.5-0.2 3.1-0.7 4.5-1.4q0.2-0.2 0.4-0.3c1.8-1 3.3-2.5 4.4-4.4q0.7-1.3 1.1-2.6c1.7-5.4-0.6-11.5-5.7-14.4-6-3.4-13.6-1.4-17.1 4.5zm38.5 40.8c2-3.9 1.9-8.4-0.2-12-1-1.8-2.6-3.5-4.6-4.6-3.9-2.3-8.5-2.2-12.3-0.2q-0.2 0.2-0.4 0.3-0.9 0.5-1.7 1.2l13.6 7.8v0.1l-6.7 5.6-11-6.4-0.4-0.2-7-4-4.2-2.5-2.6-1.4q-0.2-0.2-0.4-0.3-0.1 0-0.2-0.1c-5.9-3.4-13.5-1.3-17 4.6-2.5 4.4-2.1 9.7 0.7 13.5 1 1.4 2.3 2.6 3.9 3.5 4.8 2.7 10.6 2 14.5-1.4l-12.4-7.1 6.8-5.6 9.6 5.5 0.4 0.2 7 4.1 5.6 3.2 1.8 1c3.3 1.9 7.3 2.3 10.9 0.9 2.6-1.1 4.8-3 6.3-5.7z"/>
|
|
7
|
-
</svg>
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"entries": [
|
|
3
|
-
"./components/gataca-qrdisplay/gataca-qrdisplay.js",
|
|
4
|
-
"./components/gataca-qr/gataca-qr.js",
|
|
5
|
-
"./components/gataca-qrws/gataca-qrws.js",
|
|
6
|
-
"./components/gataca-ssibutton/gataca-ssibutton.js",
|
|
7
|
-
"./components/gataca-ssibuttonws/gataca-ssibuttonws.js",
|
|
8
|
-
"./components/gataca-autoqr/gataca-autoqr.js"
|
|
9
|
-
],
|
|
10
|
-
"compiler": {
|
|
11
|
-
"name": "@stencil/core",
|
|
12
|
-
"version": "2.19.3",
|
|
13
|
-
"typescriptVersion": "4.7.4"
|
|
14
|
-
},
|
|
15
|
-
"collections": [],
|
|
16
|
-
"bundles": []
|
|
17
|
-
}
|
|
@@ -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,347 +0,0 @@
|
|
|
1
|
-
import { h } from '@stencil/core';
|
|
2
|
-
const DEFAULT_REPOSITORY = 'https://studio.gataca.io/api/v1/qrconfigs';
|
|
3
|
-
const fixFunctions = (data) => {
|
|
4
|
-
var _a, _b, _c, _d, _e, _f;
|
|
5
|
-
data.errorCallback = deserializeFunction((_a = data.errorCallback) === null || _a === void 0 ? void 0 : _a.toString());
|
|
6
|
-
data.successCallback = deserializeFunction((_b = data.successCallback) === null || _b === void 0 ? void 0 : _b.toString());
|
|
7
|
-
data.wsOnMessage = deserializeFunction((_c = data.wsOnMessage) === null || _c === void 0 ? void 0 : _c.toString());
|
|
8
|
-
data.wsOnOpen = deserializeFunction((_d = data.wsOnOpen) === null || _d === void 0 ? void 0 : _d.toString());
|
|
9
|
-
data.checkStatus = deserializeFunction((_e = data.checkStatus) === null || _e === void 0 ? void 0 : _e.toString());
|
|
10
|
-
data.createSession = deserializeFunction((_f = data.createSession) === null || _f === void 0 ? void 0 : _f.toString());
|
|
11
|
-
return data;
|
|
12
|
-
};
|
|
13
|
-
const deserializeFunction = (data) => {
|
|
14
|
-
if (data) {
|
|
15
|
-
return new Function('return ' + data)();
|
|
16
|
-
}
|
|
17
|
-
return undefined;
|
|
18
|
-
};
|
|
19
|
-
export class GatacaAutoQR {
|
|
20
|
-
constructor() {
|
|
21
|
-
this.configId = undefined;
|
|
22
|
-
this.qrType = 'svg';
|
|
23
|
-
this.configRepository = DEFAULT_REPOSITORY;
|
|
24
|
-
this.successCallback = undefined;
|
|
25
|
-
this.errorCallback = undefined;
|
|
26
|
-
this.checkStatus = undefined;
|
|
27
|
-
this.createSession = undefined;
|
|
28
|
-
this.wsOnOpen = undefined;
|
|
29
|
-
this.wsOnMessage = undefined;
|
|
30
|
-
this.config = undefined;
|
|
31
|
-
this.loading = undefined;
|
|
32
|
-
this.loading = true;
|
|
33
|
-
fetch(this.configRepository + '/' + this.configId, {
|
|
34
|
-
method: 'GET',
|
|
35
|
-
headers: {
|
|
36
|
-
'Content-Type': 'application/json'
|
|
37
|
-
}
|
|
38
|
-
})
|
|
39
|
-
.then((response) => {
|
|
40
|
-
response
|
|
41
|
-
.json()
|
|
42
|
-
.then((data) => {
|
|
43
|
-
data = fixFunctions(data);
|
|
44
|
-
this.config = data;
|
|
45
|
-
this.loading = false;
|
|
46
|
-
})
|
|
47
|
-
.catch((err) => {
|
|
48
|
-
console.log('Cannot retrieve selected config', err);
|
|
49
|
-
this.loading = false;
|
|
50
|
-
});
|
|
51
|
-
})
|
|
52
|
-
.catch((err) => {
|
|
53
|
-
console.log('Cannot retrieve selected config', err);
|
|
54
|
-
this.loading = false;
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
/**
|
|
58
|
-
* Retrieve manually the session data on a successful login
|
|
59
|
-
*/
|
|
60
|
-
async getSessionData() {
|
|
61
|
-
return this.qr.getSessionData();
|
|
62
|
-
}
|
|
63
|
-
selectQR() {
|
|
64
|
-
if (this.config.useButton) {
|
|
65
|
-
if (this.config.useWs) {
|
|
66
|
-
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, 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 }));
|
|
67
|
-
}
|
|
68
|
-
else {
|
|
69
|
-
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, 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 }));
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
else {
|
|
73
|
-
if (this.config.useWs) {
|
|
74
|
-
this.qr = (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 }));
|
|
75
|
-
}
|
|
76
|
-
else {
|
|
77
|
-
this.qr = (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 }));
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
render() {
|
|
82
|
-
if (this.loading) {
|
|
83
|
-
//TODO: Improve loading message
|
|
84
|
-
return h("div", null, "Loading...");
|
|
85
|
-
}
|
|
86
|
-
if (this.config) {
|
|
87
|
-
this.selectQR();
|
|
88
|
-
return this.qr;
|
|
89
|
-
}
|
|
90
|
-
//TODO: Improve error message
|
|
91
|
-
return h("div", null, "Error loading your config...");
|
|
92
|
-
}
|
|
93
|
-
static get is() { return "gataca-autoqr"; }
|
|
94
|
-
static get encapsulation() { return "shadow"; }
|
|
95
|
-
static get originalStyleUrls() {
|
|
96
|
-
return {
|
|
97
|
-
"$": ["gataca-autoqr.scss"]
|
|
98
|
-
};
|
|
99
|
-
}
|
|
100
|
-
static get styleUrls() {
|
|
101
|
-
return {
|
|
102
|
-
"$": ["gataca-autoqr.css"]
|
|
103
|
-
};
|
|
104
|
-
}
|
|
105
|
-
static get properties() {
|
|
106
|
-
return {
|
|
107
|
-
"configId": {
|
|
108
|
-
"type": "string",
|
|
109
|
-
"mutable": false,
|
|
110
|
-
"complexType": {
|
|
111
|
-
"original": "string",
|
|
112
|
-
"resolved": "string",
|
|
113
|
-
"references": {}
|
|
114
|
-
},
|
|
115
|
-
"required": false,
|
|
116
|
-
"optional": false,
|
|
117
|
-
"docs": {
|
|
118
|
-
"tags": [],
|
|
119
|
-
"text": "***Mandatory***\nID of the QR configuration to display"
|
|
120
|
-
},
|
|
121
|
-
"attribute": "config-id",
|
|
122
|
-
"reflect": false
|
|
123
|
-
},
|
|
124
|
-
"qrType": {
|
|
125
|
-
"type": "string",
|
|
126
|
-
"mutable": false,
|
|
127
|
-
"complexType": {
|
|
128
|
-
"original": "DrawType",
|
|
129
|
-
"resolved": "\"canvas\" | \"svg\"",
|
|
130
|
-
"references": {
|
|
131
|
-
"DrawType": {
|
|
132
|
-
"location": "import",
|
|
133
|
-
"path": "qr-code-styling"
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
},
|
|
137
|
-
"required": false,
|
|
138
|
-
"optional": true,
|
|
139
|
-
"docs": {
|
|
140
|
-
"tags": [],
|
|
141
|
-
"text": "_[Optional]_\nSets the qr type. It can be \"svg\" or \"canvas\". \"svg\" by default."
|
|
142
|
-
},
|
|
143
|
-
"attribute": "qr-type",
|
|
144
|
-
"reflect": false,
|
|
145
|
-
"defaultValue": "'svg'"
|
|
146
|
-
},
|
|
147
|
-
"configRepository": {
|
|
148
|
-
"type": "string",
|
|
149
|
-
"mutable": false,
|
|
150
|
-
"complexType": {
|
|
151
|
-
"original": "string",
|
|
152
|
-
"resolved": "string",
|
|
153
|
-
"references": {}
|
|
154
|
-
},
|
|
155
|
-
"required": false,
|
|
156
|
-
"optional": false,
|
|
157
|
-
"docs": {
|
|
158
|
-
"tags": [],
|
|
159
|
-
"text": "___Optional___\nConfigURL Repository to download the config from"
|
|
160
|
-
},
|
|
161
|
-
"attribute": "config-repository",
|
|
162
|
-
"reflect": false,
|
|
163
|
-
"defaultValue": "DEFAULT_REPOSITORY"
|
|
164
|
-
},
|
|
165
|
-
"successCallback": {
|
|
166
|
-
"type": "unknown",
|
|
167
|
-
"mutable": false,
|
|
168
|
-
"complexType": {
|
|
169
|
-
"original": "(data?: any) => void",
|
|
170
|
-
"resolved": "(data?: any) => void",
|
|
171
|
-
"references": {}
|
|
172
|
-
},
|
|
173
|
-
"required": false,
|
|
174
|
-
"optional": false,
|
|
175
|
-
"docs": {
|
|
176
|
-
"tags": [],
|
|
177
|
-
"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"
|
|
178
|
-
},
|
|
179
|
-
"defaultValue": "undefined"
|
|
180
|
-
},
|
|
181
|
-
"errorCallback": {
|
|
182
|
-
"type": "unknown",
|
|
183
|
-
"mutable": false,
|
|
184
|
-
"complexType": {
|
|
185
|
-
"original": "(error?: Error) => void",
|
|
186
|
-
"resolved": "(error?: Error) => void",
|
|
187
|
-
"references": {
|
|
188
|
-
"Error": {
|
|
189
|
-
"location": "global"
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
},
|
|
193
|
-
"required": false,
|
|
194
|
-
"optional": false,
|
|
195
|
-
"docs": {
|
|
196
|
-
"tags": [],
|
|
197
|
-
"text": "___Just for polling flavour___\n***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"
|
|
198
|
-
},
|
|
199
|
-
"defaultValue": "undefined"
|
|
200
|
-
},
|
|
201
|
-
"checkStatus": {
|
|
202
|
-
"type": "unknown",
|
|
203
|
-
"mutable": false,
|
|
204
|
-
"complexType": {
|
|
205
|
-
"original": "(id?: string) => Promise<{result: RESULT_STATUS; data?: any}>",
|
|
206
|
-
"resolved": "(id?: string) => Promise<{ result: RESULT_STATUS; data?: any; }>",
|
|
207
|
-
"references": {
|
|
208
|
-
"Promise": {
|
|
209
|
-
"location": "global"
|
|
210
|
-
},
|
|
211
|
-
"RESULT_STATUS": {
|
|
212
|
-
"location": "import",
|
|
213
|
-
"path": "../../utils"
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
},
|
|
217
|
-
"required": false,
|
|
218
|
-
"optional": true,
|
|
219
|
-
"docs": {
|
|
220
|
-
"tags": [],
|
|
221
|
-
"text": "___Just for polling flavour___\n***Mandatory***\nCheck status function to query the current status of the session\nThe function must query a client endpoint to check the status. That endpoint must return an error if the session has expired."
|
|
222
|
-
},
|
|
223
|
-
"defaultValue": "undefined"
|
|
224
|
-
},
|
|
225
|
-
"createSession": {
|
|
226
|
-
"type": "unknown",
|
|
227
|
-
"mutable": false,
|
|
228
|
-
"complexType": {
|
|
229
|
-
"original": "() => Promise<{\n sessionId: string;\n authenticationRequest?: string;\n }>",
|
|
230
|
-
"resolved": "() => Promise<{ sessionId: string; authenticationRequest?: string; }>",
|
|
231
|
-
"references": {
|
|
232
|
-
"Promise": {
|
|
233
|
-
"location": "global"
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
|
-
},
|
|
237
|
-
"required": false,
|
|
238
|
-
"optional": true,
|
|
239
|
-
"docs": {
|
|
240
|
-
"tags": [],
|
|
241
|
-
"text": "***Mandatory***\nCreate session function to generate a new Session\nUsing v=\"3\", it can provide just a session Id\nUsing another version, it must provide also the authentication request. The session Id is the id of the presentation definition"
|
|
242
|
-
},
|
|
243
|
-
"defaultValue": "undefined"
|
|
244
|
-
},
|
|
245
|
-
"wsOnOpen": {
|
|
246
|
-
"type": "unknown",
|
|
247
|
-
"mutable": false,
|
|
248
|
-
"complexType": {
|
|
249
|
-
"original": "(socket: WebSocket) => void",
|
|
250
|
-
"resolved": "(socket: WebSocket) => void",
|
|
251
|
-
"references": {
|
|
252
|
-
"WebSocket": {
|
|
253
|
-
"location": "global"
|
|
254
|
-
}
|
|
255
|
-
}
|
|
256
|
-
},
|
|
257
|
-
"required": false,
|
|
258
|
-
"optional": false,
|
|
259
|
-
"docs": {
|
|
260
|
-
"tags": [],
|
|
261
|
-
"text": "___Just for WS flavour___\n[Optional]\nFunction to send a message to the server upon socket creation"
|
|
262
|
-
}
|
|
263
|
-
},
|
|
264
|
-
"wsOnMessage": {
|
|
265
|
-
"type": "unknown",
|
|
266
|
-
"mutable": false,
|
|
267
|
-
"complexType": {
|
|
268
|
-
"original": "(socket: WebSocket, msg: MessageEvent) => void",
|
|
269
|
-
"resolved": "(socket: WebSocket, msg: MessageEvent<any>) => void",
|
|
270
|
-
"references": {
|
|
271
|
-
"WebSocket": {
|
|
272
|
-
"location": "global"
|
|
273
|
-
},
|
|
274
|
-
"MessageEvent": {
|
|
275
|
-
"location": "global"
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
},
|
|
279
|
-
"required": false,
|
|
280
|
-
"optional": false,
|
|
281
|
-
"docs": {
|
|
282
|
-
"tags": [],
|
|
283
|
-
"text": "___Just for WS flavour___\n**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"
|
|
284
|
-
}
|
|
285
|
-
}
|
|
286
|
-
};
|
|
287
|
-
}
|
|
288
|
-
static get states() {
|
|
289
|
-
return {
|
|
290
|
-
"config": {},
|
|
291
|
-
"loading": {}
|
|
292
|
-
};
|
|
293
|
-
}
|
|
294
|
-
static get events() {
|
|
295
|
-
return [{
|
|
296
|
-
"method": "gatacaLoginCompleted",
|
|
297
|
-
"name": "gatacaLoginCompleted",
|
|
298
|
-
"bubbles": true,
|
|
299
|
-
"cancelable": true,
|
|
300
|
-
"composed": true,
|
|
301
|
-
"docs": {
|
|
302
|
-
"tags": [],
|
|
303
|
-
"text": "GatacaLoginCompleted event, triggered with session data upon login success"
|
|
304
|
-
},
|
|
305
|
-
"complexType": {
|
|
306
|
-
"original": "any",
|
|
307
|
-
"resolved": "any",
|
|
308
|
-
"references": {}
|
|
309
|
-
}
|
|
310
|
-
}, {
|
|
311
|
-
"method": "gatacaLoginFailed",
|
|
312
|
-
"name": "gatacaLoginFailed",
|
|
313
|
-
"bubbles": true,
|
|
314
|
-
"cancelable": true,
|
|
315
|
-
"composed": true,
|
|
316
|
-
"docs": {
|
|
317
|
-
"tags": [],
|
|
318
|
-
"text": "GatacaLoginFailed event, triggered with error upon login failure"
|
|
319
|
-
},
|
|
320
|
-
"complexType": {
|
|
321
|
-
"original": "any",
|
|
322
|
-
"resolved": "any",
|
|
323
|
-
"references": {}
|
|
324
|
-
}
|
|
325
|
-
}];
|
|
326
|
-
}
|
|
327
|
-
static get methods() {
|
|
328
|
-
return {
|
|
329
|
-
"getSessionData": {
|
|
330
|
-
"complexType": {
|
|
331
|
-
"signature": "() => Promise<any>",
|
|
332
|
-
"parameters": [],
|
|
333
|
-
"references": {
|
|
334
|
-
"Promise": {
|
|
335
|
-
"location": "global"
|
|
336
|
-
}
|
|
337
|
-
},
|
|
338
|
-
"return": "Promise<any>"
|
|
339
|
-
},
|
|
340
|
-
"docs": {
|
|
341
|
-
"text": "Retrieve manually the session data on a successful login",
|
|
342
|
-
"tags": []
|
|
343
|
-
}
|
|
344
|
-
}
|
|
345
|
-
};
|
|
346
|
-
}
|
|
347
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { h } from '@stencil/core';
|
|
2
|
-
export const QR = (props) => {
|
|
3
|
-
const { value, useLogo, logoSrc, size, qrType, style, linkReady = true } = props;
|
|
4
|
-
const s = size !== null && size !== void 0 ? size : 256;
|
|
5
|
-
if (!linkReady) {
|
|
6
|
-
return (h("div", { class: "qr-loading-slot", style: {
|
|
7
|
-
width: s + 'px',
|
|
8
|
-
height: s + 'px',
|
|
9
|
-
margin: '0 auto'
|
|
10
|
-
} }));
|
|
11
|
-
}
|
|
12
|
-
return h("gataca-qrdisplay", { qrData: value, rounded: true, qrType: qrType, size: size, "logo-size": useLogo ? 0.33 : 0, "logo-src": logoSrc, qrColor: style === null || style === void 0 ? void 0 : style.color, bgColor: style === null || style === void 0 ? void 0 : style.bgColor });
|
|
13
|
-
};
|