@gataca/qr 2.0.8 → 2.0.9
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/cjs/gataca-autoqr.cjs.entry.js +1 -1
- package/dist/cjs/gataca-qr_2.cjs.entry.js +46 -24
- package/dist/cjs/gataca-qrws.cjs.entry.js +5 -5
- package/dist/cjs/gataca-ssibutton_2.cjs.entry.js +1 -1
- package/dist/cjs/gatacaqr.cjs.js +1 -1
- package/dist/cjs/{index-a49c526c.js → index-f214ab7a.js} +57 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/gataca-qr/components/qr/QR.js +5 -0
- package/dist/collection/components/gataca-qr/components/retryButton/RetryButton.js +13 -0
- package/dist/collection/components/gataca-qr/components/success/Success.js +8 -0
- package/dist/collection/components/gataca-qr/gataca-qr.css +172 -85
- package/dist/collection/components/gataca-qr/gataca-qr.js +9 -22
- package/dist/components/gataca-qr2.js +44 -22
- package/dist/components/gataca-qrws2.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/esm/gataca-autoqr.entry.js +1 -1
- package/dist/esm/gataca-qr_2.entry.js +44 -22
- package/dist/esm/gataca-qrws.entry.js +2 -2
- package/dist/esm/gataca-ssibutton_2.entry.js +1 -1
- package/dist/esm/gatacaqr.js +2 -2
- package/dist/esm/{index-6929cc53.js → index-570c9813.js} +57 -0
- package/dist/esm/loader.js +2 -2
- package/dist/gatacaqr/gatacaqr.esm.js +1 -1
- package/dist/gatacaqr/{p-1d72ef98.entry.js → p-23197d75.entry.js} +1 -1
- package/dist/gatacaqr/{p-49c7cbac.entry.js → p-3d1a6526.entry.js} +1 -1
- package/dist/gatacaqr/{p-e715b443.entry.js → p-bd6bd52f.entry.js} +1 -1
- package/dist/gatacaqr/p-c134f057.entry.js +1 -0
- package/dist/gatacaqr/p-ea783014.js +1 -0
- package/dist/gatacaqr/p-ec0f00a6.js +2 -0
- package/dist/types/components/gataca-qr/components/qr/QR.d.ts +9 -0
- package/dist/types/components/gataca-qr/components/retryButton/RetryButton.d.ts +13 -0
- package/dist/types/components/gataca-qr/components/success/Success.d.ts +7 -0
- package/package.json +2 -1
- package/dist/gatacaqr/p-554598aa.js +0 -2
- package/dist/gatacaqr/p-aa580c47.entry.js +0 -1
- package/dist/gatacaqr/p-e6f1b2b6.js +0 -1
- package/dist/cjs/{logo_gataca-2d5c8a85.js → gat-icon-alert-0ad19b26.js} +2 -2
- package/dist/components/{gat-icon-refresh.js → gat-icon-alert.js} +2 -2
- package/dist/esm/{logo_gataca-273fcfb8.js → gat-icon-alert-7b06ef3a.js} +2 -2
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-f214ab7a.js');
|
|
6
6
|
|
|
7
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
8
|
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
6
|
-
const
|
|
5
|
+
const index = require('./index-f214ab7a.js');
|
|
6
|
+
const gatIconAlert = require('./gat-icon-alert-0ad19b26.js');
|
|
7
7
|
const qrCodeStyling = require('./qr-code-styling-412bbc7a.js');
|
|
8
8
|
const utils = require('./utils-383ee834.js');
|
|
9
9
|
|
|
@@ -22,7 +22,7 @@ const GatacaQRDisplay = class {
|
|
|
22
22
|
data: this.qrData,
|
|
23
23
|
width: this.size,
|
|
24
24
|
height: this.size,
|
|
25
|
-
image: this.logoSize > 0 ? this.logoSrc ||
|
|
25
|
+
image: this.logoSize > 0 ? this.logoSrc || gatIconAlert.logoGatacaSvg : undefined,
|
|
26
26
|
margin: 10,
|
|
27
27
|
type: "svg",
|
|
28
28
|
dotsOptions: {
|
|
@@ -49,7 +49,42 @@ const GatacaQRDisplay = class {
|
|
|
49
49
|
}
|
|
50
50
|
};
|
|
51
51
|
|
|
52
|
-
const
|
|
52
|
+
const Success = (props) => {
|
|
53
|
+
const { modalHeight, successLoginLabel } = props;
|
|
54
|
+
return (index.h("div", { class: "success", style: {
|
|
55
|
+
height: modalHeight ? (modalHeight === null || modalHeight === void 0 ? void 0 : modalHeight.toString()) + "px" : "300px",
|
|
56
|
+
} },
|
|
57
|
+
index.h("img", { src: gatIconAlert.gatIconCheckSvg, height: 52, width: 52 }),
|
|
58
|
+
index.h("p", { class: "successMsg" }, successLoginLabel)));
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
const RetryButton = (props) => {
|
|
62
|
+
var _a;
|
|
63
|
+
const { errorMessage, modalWidth, clickInsideBoxLabel, refreshQrLabel, scanQrLabel, waitingStartSessionLabel, display, renderRetryQR, } = props;
|
|
64
|
+
return (index.h("div", { class: "reload", style: {
|
|
65
|
+
width: (modalWidth - 48).toString() + "px",
|
|
66
|
+
height: modalWidth ? ((_a = (modalWidth - 48)) === null || _a === void 0 ? void 0 : _a.toString()) + "px" : "",
|
|
67
|
+
} },
|
|
68
|
+
index.h("div", { id: "notify", onClick: () => display() },
|
|
69
|
+
index.h("img", { src: gatIconAlert.gatIconRefreshSvg, height: 24, width: 24 }),
|
|
70
|
+
index.h("p", { class: "notify-text" },
|
|
71
|
+
clickInsideBoxLabel,
|
|
72
|
+
" "),
|
|
73
|
+
errorMessage ? (index.h("p", { class: "notify-text bold" }, refreshQrLabel)) : (index.h("p", { class: "notify-text bold" }, scanQrLabel)),
|
|
74
|
+
errorMessage && (index.h("div", { class: "alert", style: {
|
|
75
|
+
width: (modalWidth - 48).toString() + "px",
|
|
76
|
+
} },
|
|
77
|
+
index.h("img", { src: gatIconAlert.gatIconAlertSvg, height: 24, width: 24 }),
|
|
78
|
+
index.h("p", null, errorMessage)))),
|
|
79
|
+
index.h("div", { id: "qrwait" }, renderRetryQR(waitingStartSessionLabel))));
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
const QR = (props) => {
|
|
83
|
+
const { value, useLogo, logoSrc, size } = props;
|
|
84
|
+
return (index.h("gataca-qrdisplay", { qrData: value, rounded: true, size: size, "logo-size": useLogo ? 0.33 : 0, "logo-src": logoSrc }));
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
const gatacaQrCss = "@import url(\"https://fonts.googleapis.com/css2?family=Ubuntu:wght@100;300;400;500;600;700&display=swap\"); @import url(\"https://fonts.googleapis.com/css2?family=Poppins:wght@100;300;400;500;600;700&display=swap\"); @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}.brandSection{padding-top:5px;display:flex;align-items:center}.brandSection .gatacaImgSmall{height:13px;width:13px;margin:0;margin-right:10px}.popUpContainer .large-modal{width:300px;min-height:350px}.popUpContainer .modal-window{position:relative;border-radius:6px;overflow:hidden;color:rgba(24, 27, 94, 0.8);box-shadow:0px 3px 10px rgba(48, 48, 48, 0.1);display:flex;flex-direction:column;justify-content:space-between;align-items:center;display:flex;z-index:1001;padding:1px;background-color:white;border-radius:12px;-webkit-transition:opacity 0.5s, visibility 0s 0.5s;transition:opacity 0.5s, visibility 0s 0.5s;visibility:hidden;opacity:0}.popUpContainer .modal-window__content{width:100%;height:100%;text-align:left}.popUpContainer .modal-window__content .hidenText{display:none}.popUpContainer .modal-window .modalText{font-family:\"Ubuntu\", \"Work Sans\", \"Helvetica Neue\", sans-serif;font-size:20px;font-style:normal;font-weight:700;line-height:24px;margin-top:10px;letter-spacing:1px}.popUpContainer .modal-window .qrTitleContainer{padding:14px 24px;padding-bottom:0px}.popUpContainer .modal-window .qrTitle{font-size:20px;font-weight:600;line-height:23.5px}.popUpContainer .modal-window .qrDescription{font-family:Poppins;font-size:14px;font-style:normal;font-weight:400;line-height:16px;color:#707074}.popUpContainer .modal-window .bold{font-weight:600}.popUpContainer .modal-window .qrBrand{margin-top:4px;font-size:14px;font-weight:400;line-height:16.5px;display:flex;align-items:center}.popUpContainer .modal-window .qrBrand img{margin-left:5px;height:12px}.popUpContainer .modal-window .qr-section{width:252px;height:252px}.popUpContainer .noBoxShadow{box-shadow:none}.popUpContainer .is-visible{opacity:1;visibility:visible}.is-transparent{opacity:0}.success{display:flex;height:300px;flex-direction:column;justify-content:center;align-items:center;padding:0px}.success .successMsg{line-height:23.5px;color:var(--neutral-1000, #1e1e20);text-align:center;font-family:\"Ubuntu\", \"Work Sans\", \"Helvetica Neue\", sans-serif;font-size:20px;font-style:normal;font-weight:700;line-height:24px}.reload{height:252px;width:252px;border:1px dashed #a1a1a1;border-radius:12px;position:relative;top:24px;margin:0 24px 24px;display:flex;overflow:hidden;justify-content:center;align-items:center}#qrwait{display:flex;justify-content:center}#qrwait,#notify{width:100%;height:100%;top:0;left:0;border-radius:20px}#notify{z-index:10;position:absolute;justify-self:center;justify-items:center;justify-content:center;align-items:center;align-content:center;align-self:center;display:flex;flex-direction:column;padding:24px;box-sizing:border-box;display:flex;flex-direction:column;justify-content:center;align-items:center;padding:20px;background:rgba(255, 255, 255, 0.95)}#notify>img{padding-bottom:12px}.alert{display:flex;flex-direction:row;align-items:center;justify-content:start;width:252px;position:absolute;bottom:0px;border:1px solid #ee888c;background:#ffdedf;border-radius:11px;display:flex;box-sizing:border-box;padding:12px;align-items:center;gap:12px}.alert>p{font-family:\"Poppins\", \"Ubuntu\", \"Work Sans\", \"Helvetica Neue\", sans-serif;font-size:14px;font-style:normal;font-weight:400;margin-top:0;line-height:16px;color:#1e1e20}.notify-text{font-family:\"Poppins\", \"Ubuntu\", \"Work Sans\", \"Helvetica Neue\", sans-serif;font-size:14px;font-style:normal;font-weight:400;line-height:16px;color:#707074}";
|
|
53
88
|
|
|
54
89
|
const DEEP_LINK_PREFIX = "https://gataca.page.link/?apn=com.gatacaapp&ibi=com.gataca.wallet&link=";
|
|
55
90
|
//Default values
|
|
@@ -61,7 +96,7 @@ const FUNCTION_ROLES = {
|
|
|
61
96
|
certify: "credential",
|
|
62
97
|
};
|
|
63
98
|
const GatacaQR = class {
|
|
64
|
-
constructor(hostRef) { index.registerInstance(this, hostRef); this.gatacaLoginCompleted = index.createEvent(this, "gatacaLoginCompleted", 7); this.gatacaLoginFailed = index.createEvent(this, "gatacaLoginFailed", 7); this.checkStatus = undefined; this.createSession = undefined; this.successCallback = undefined; this.errorCallback = undefined; this.qrRole = undefined; this.callbackServer = undefined; this.autostart = true; this.autorefresh = false; this.v2 = false; this.qrModalTitle = "Quick Access"; this.modalTitleColor = "#4745B7"; this.qrModalDescription = "Sign up or sign in by scanning the QR Code with the Gataca Wallet"; this.hideModalTexts = false; this.hideModalBoxShadow = false; this.hideBrandTitle = false; this.logoSize = 0; this.logoSrc =
|
|
99
|
+
constructor(hostRef) { index.registerInstance(this, hostRef); this.gatacaLoginCompleted = index.createEvent(this, "gatacaLoginCompleted", 7); this.gatacaLoginFailed = index.createEvent(this, "gatacaLoginFailed", 7); this.checkStatus = undefined; this.createSession = undefined; this.successCallback = undefined; this.errorCallback = undefined; this.qrRole = undefined; this.callbackServer = undefined; this.autostart = true; this.autorefresh = false; this.v2 = false; this.qrModalTitle = "Quick Access"; this.modalTitleColor = "#4745B7"; this.qrModalDescription = "Sign up or sign in by scanning the QR Code with the Gataca Wallet"; this.hideModalTexts = false; this.hideModalBoxShadow = false; this.hideBrandTitle = false; this.logoSize = 0; this.logoSrc = gatIconAlert.logoGatacaSvg; this.qrSize = 300; this.modalWidth = 300; this.modalHeight = undefined; this.qrCodeExpiredLabel = "QR Code expired"; this.credentialsNotValidatedLabel = "User credentials not validated"; this.clickInsideBoxLabel = "Click inside the box to"; this.refreshQrLabel = "Refresh QR Code"; this.scanQrLabel = "Scan QR Code"; this.userNotScanInTimeErrorLabel = "User did not scan the QR in the allowed time"; this.credsNotValidatedErrorLabel = "Provided user credentials couldn't be validated"; this.failedLoginErrorLabel = "No successful login"; this.successLoginLabel = "Successful Connection!"; this.byBrandLabel = "by Gataca"; this.waitingStartSessionLabel = "waiting to start a session"; this.hideQrModalDescription = false; this.sessionTimeout = DEFAULT_SESSION_TIMEOUT; this.pollingFrequency = DEFAULT_POLLING_FREQ; this.dynamicLink = true; this.sessionId = undefined; this.authenticationRequest = undefined; this.sessionData = undefined; this.result = utils.RESULT_STATUS.NOT_STARTED; }
|
|
65
100
|
disconnectedCallback() {
|
|
66
101
|
this.stop();
|
|
67
102
|
}
|
|
@@ -198,29 +233,16 @@ const GatacaQR = class {
|
|
|
198
233
|
}
|
|
199
234
|
}
|
|
200
235
|
renderSuccess() {
|
|
201
|
-
|
|
202
|
-
return (index.h("div", { class: "success", style: {
|
|
203
|
-
height: this.modalHeight
|
|
204
|
-
? ((_a = this.modalHeight) === null || _a === void 0 ? void 0 : _a.toString()) + "px"
|
|
205
|
-
: "300px",
|
|
206
|
-
} }, index.h("img", { src: logo_gataca.gatIconCheckSvg, height: 52, width: 52 }), index.h("p", { class: "successMsg" }, this.successLoginLabel)));
|
|
236
|
+
return (index.h(Success, { modalHeight: this === null || this === void 0 ? void 0 : this.modalHeight, successLoginLabel: this === null || this === void 0 ? void 0 : this.successLoginLabel }));
|
|
207
237
|
}
|
|
208
238
|
renderRetryButton(errorMessage) {
|
|
209
|
-
|
|
210
|
-
return (index.h("div", { class: "reload", style: {
|
|
211
|
-
width: (this.modalWidth - 50).toString() + "px",
|
|
212
|
-
height: this.modalWidth
|
|
213
|
-
? ((_a = (this.modalWidth - 50)) === null || _a === void 0 ? void 0 : _a.toString()) + "px"
|
|
214
|
-
: "",
|
|
215
|
-
} }, index.h("div", { id: "notify", onClick: () => this.display() }, index.h("img", { src: logo_gataca.gatIconRefreshSvg, height: 24, width: 24 }), index.h("p", { class: "qrDescription" }, this.clickInsideBoxLabel, " "), errorMessage ? (index.h("p", { class: "qrDescription bold" }, this.refreshQrLabel)) : (index.h("p", { class: "qrDescription bold" }, this.scanQrLabel)), errorMessage && (index.h("div", { class: "alert", style: {
|
|
216
|
-
width: (this.modalWidth - 50).toString() + "px",
|
|
217
|
-
} }, index.h("img", { src: logo_gataca.gatIconAlertSvg, height: 24, width: 24 }), index.h("p", null, errorMessage)))), index.h("div", { id: "qrwait" }, this.renderRetryQR(this.waitingStartSessionLabel))));
|
|
239
|
+
return (index.h(RetryButton, { errorMessage: errorMessage, modalWidth: this === null || this === void 0 ? void 0 : this.modalWidth, clickInsideBoxLabel: this === null || this === void 0 ? void 0 : this.clickInsideBoxLabel, refreshQrLabel: this === null || this === void 0 ? void 0 : this.refreshQrLabel, scanQrLabel: this === null || this === void 0 ? void 0 : this.scanQrLabel, waitingStartSessionLabel: this === null || this === void 0 ? void 0 : this.waitingStartSessionLabel, display: this === null || this === void 0 ? void 0 : this.display, renderRetryQR: this === null || this === void 0 ? void 0 : this.renderRetryQR }));
|
|
218
240
|
}
|
|
219
241
|
renderQR(value, useLogo) {
|
|
220
|
-
return (index.h(
|
|
242
|
+
return (index.h(QR, { value: value, useLogo: useLogo, size: (this === null || this === void 0 ? void 0 : this.qrSize) || undefined, logoSrc: this === null || this === void 0 ? void 0 : this.logoSrc }));
|
|
221
243
|
}
|
|
222
244
|
renderRetryQR(value, useLogo) {
|
|
223
|
-
return (index.h(
|
|
245
|
+
return (index.h(QR, { value: value, useLogo: useLogo, size: (this === null || this === void 0 ? void 0 : this.qrSize) ? (this === null || this === void 0 ? void 0 : this.qrSize) - 50 : undefined, logoSrc: this === null || this === void 0 ? void 0 : this.logoSrc }));
|
|
224
246
|
}
|
|
225
247
|
render() {
|
|
226
248
|
var _a, _b;
|
|
@@ -232,8 +254,8 @@ const GatacaQR = class {
|
|
|
232
254
|
: "",
|
|
233
255
|
}, onClick: (event) => {
|
|
234
256
|
event.stopPropagation();
|
|
235
|
-
} }, index.h("div", { class: "modal-window__content" }, index.h("div", { class: `qrTitleContainer ${this.hideModalTexts ? "hidenText" : ""}` }, index.h("p", { class: "qrTitle", style: { color: this.modalTitleColor || "#1e1e20" } }, this.qrModalTitle), !this.hideBrandTitle && (index.h("p", { class: "qrBrand" }, this.byBrandLabel, " ", index.h("span", null, index.h("img", { src:
|
|
236
|
-
!this.hideQrModalDescription && (index.h("p", { class: "qrDescription" }, this.qrModalDescription))), index.h("div", { class: "qrSection", style: {
|
|
257
|
+
} }, index.h("div", { class: "modal-window__content" }, index.h("div", { class: `qrTitleContainer ${this.hideModalTexts ? "hidenText" : ""}` }, index.h("p", { class: "qrTitle modalText", style: { color: this.modalTitleColor || "#1e1e20" } }, this.qrModalTitle), !this.hideBrandTitle && (index.h("p", { class: "qrBrand modalText" }, this.byBrandLabel, " ", index.h("span", null, index.h("img", { src: gatIconAlert.logoGatacaSvg })))), this.result !== utils.RESULT_STATUS.SUCCESS &&
|
|
258
|
+
!this.hideQrModalDescription && (index.h("p", { class: "qrDescription modalText" }, this.qrModalDescription))), index.h("div", { class: "qrSection", style: {
|
|
237
259
|
width: this.modalWidth.toString() + "px",
|
|
238
260
|
height: this.modalWidth
|
|
239
261
|
? ((_b = this.modalWidth) === null || _b === void 0 ? void 0 : _b.toString()) + "px"
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
6
|
-
const
|
|
5
|
+
const index = require('./index-f214ab7a.js');
|
|
6
|
+
const gatIconAlert = require('./gat-icon-alert-0ad19b26.js');
|
|
7
7
|
require('./qr-code-styling-412bbc7a.js');
|
|
8
8
|
const utils = require('./utils-383ee834.js');
|
|
9
9
|
|
|
@@ -157,10 +157,10 @@ const GatacaQRWS = class {
|
|
|
157
157
|
}
|
|
158
158
|
}
|
|
159
159
|
renderSuccess() {
|
|
160
|
-
return (index.h("div", { class: "success" }, index.h("img", { src:
|
|
160
|
+
return (index.h("div", { class: "success" }, index.h("img", { src: gatIconAlert.gatIconCheckSvg, height: 52, width: 52 }), index.h("p", { class: "successMsg" }, "Successful Connection!")));
|
|
161
161
|
}
|
|
162
162
|
renderRetryButton(errorMessage) {
|
|
163
|
-
return (index.h("div", { class: "reload" }, index.h("div", { id: "notify", onClick: () => this.display() }, index.h("img", { src:
|
|
163
|
+
return (index.h("div", { class: "reload" }, index.h("div", { id: "notify", onClick: () => this.display() }, index.h("img", { src: gatIconAlert.gatIconRefreshSvg, height: 24, width: 24 }), index.h("p", { class: "qrDescription" }, "Click inside the box to "), errorMessage ? (index.h("p", { class: "qrDescription bold" }, "Refresh QR Code")) : (index.h("p", { class: "qrDescription bold" }, "Scan QR Code")), errorMessage && (index.h("div", { class: "alert" }, index.h("img", { src: gatIconAlert.gatIconAlertSvg, height: 24, width: 24 }), index.h("p", null, errorMessage)))), index.h("div", { id: "qrwait" }, this.renderQR("waiting to start a session", 250))));
|
|
164
164
|
}
|
|
165
165
|
renderQR(value, size, useLogo) {
|
|
166
166
|
return (index.h("gataca-qrdisplay", { qrData: value, rounded: true, size: size, "logo-size": useLogo ? 0.33 : 0 }));
|
|
@@ -168,7 +168,7 @@ const GatacaQRWS = class {
|
|
|
168
168
|
render() {
|
|
169
169
|
return (index.h("div", { class: "popUpContainer" }, index.h("div", { class: "modal-window is-visible", onClick: (event) => {
|
|
170
170
|
event.stopPropagation();
|
|
171
|
-
} }, index.h("div", { class: "modal-window__content" }, index.h("div", { class: "qrTitleContainer" }, index.h("p", { class: "qrTitle" }, this.qrModalTitle), !this.hideBrandTitle && (index.h("p", { class: "qrBrand" }, "by Gataca", " ", index.h("span", null, index.h("img", { src:
|
|
171
|
+
} }, index.h("div", { class: "modal-window__content" }, index.h("div", { class: "qrTitleContainer" }, index.h("p", { class: "qrTitle" }, this.qrModalTitle), !this.hideBrandTitle && (index.h("p", { class: "qrBrand" }, "by Gataca", " ", index.h("span", null, index.h("img", { src: gatIconAlert.logoGatacaSvg })))), this.result !== utils.RESULT_STATUS.SUCCESS && (index.h("p", { class: "qrDescription" }, this.qrModalDescription))), index.h("div", { class: "qrSection" }, this.renderQRSection())))));
|
|
172
172
|
}
|
|
173
173
|
};
|
|
174
174
|
GatacaQRWS.style = gatacaQrwsCss;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-f214ab7a.js');
|
|
6
6
|
require('./qr-code-styling-412bbc7a.js');
|
|
7
7
|
|
|
8
8
|
const gatacaSsibuttonCss = "@import url(\"https://fonts.googleapis.com/css2?family=Work+Sans:wght@300;400&display=swap\"); html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:\"\";content:none}table{border-collapse:collapse;border-spacing:0}.img-fluid{height:auto;max-width:50%}img{margin-left:auto;margin-right:auto}.buttonContainer{display:inline-block;text-align:right;padding:10px;position:relative}.gatacaButtonWrapper{margin:8px}.gatacaButtonWrapper .gatacaButton{display:flex;min-width:100px;padding:8px 8px;background-color:white;font-size:12px;font-family:\"Work Sans\", sans-serif;letter-spacing:1px;font-weight:2;justify-content:space-between;align-items:center;border-radius:6px;border:1px solid rgba(24, 27, 94, 0.5);color:rgba(24, 27, 94, 0.8);box-shadow:0px 1px 3px rgba(48, 48, 48, 0.15);cursor:pointer}.gatacaButtonWrapper .gatacaButton>span{margin-right:10px}.gatacaButtonWrapper .gatacaButton:hover{box-shadow:0px 2px 8px rgba(48, 48, 48, 0.1)}.gatacaButtonWrapper .buttonText{text-align:right;font-size:8px;color:rgba(24, 27, 94, 0.5);font-family:\"Helvetica Neue\", sans-serif;letter-spacing:1px;padding-right:8px;font-weight:1}.gatacaButtonWrapper .buttonImg{height:25px;width:25px;margin:0;margin-right:20px}";
|
package/dist/cjs/gatacaqr.cjs.js
CHANGED
|
@@ -126,6 +126,10 @@ const h = (nodeName, vnodeData, ...children) => {
|
|
|
126
126
|
}
|
|
127
127
|
}
|
|
128
128
|
}
|
|
129
|
+
if (typeof nodeName === 'function') {
|
|
130
|
+
// nodeName is a functional component
|
|
131
|
+
return nodeName(vnodeData === null ? {} : vnodeData, vNodeChildren, vdomFnUtils);
|
|
132
|
+
}
|
|
129
133
|
const vnode = newVNode(nodeName, null);
|
|
130
134
|
vnode.$attrs$ = vnodeData;
|
|
131
135
|
if (vNodeChildren.length > 0) {
|
|
@@ -162,6 +166,59 @@ const Host = {};
|
|
|
162
166
|
* @returns whether it's a Host node or not
|
|
163
167
|
*/
|
|
164
168
|
const isHost = (node) => node && node.$tag$ === Host;
|
|
169
|
+
/**
|
|
170
|
+
* Implementation of {@link d.FunctionalUtilities} for Stencil's VDom.
|
|
171
|
+
*
|
|
172
|
+
* Note that these functions convert from {@link d.VNode} to
|
|
173
|
+
* {@link d.ChildNode} to give functional component developers a friendly
|
|
174
|
+
* interface.
|
|
175
|
+
*/
|
|
176
|
+
const vdomFnUtils = {
|
|
177
|
+
forEach: (children, cb) => children.map(convertToPublic).forEach(cb),
|
|
178
|
+
map: (children, cb) => children.map(convertToPublic).map(cb).map(convertToPrivate),
|
|
179
|
+
};
|
|
180
|
+
/**
|
|
181
|
+
* Convert a {@link d.VNode} to a {@link d.ChildNode} in order to present a
|
|
182
|
+
* friendlier public interface (hence, 'convertToPublic').
|
|
183
|
+
*
|
|
184
|
+
* @param node the virtual DOM node to convert
|
|
185
|
+
* @returns a converted child node
|
|
186
|
+
*/
|
|
187
|
+
const convertToPublic = (node) => ({
|
|
188
|
+
vattrs: node.$attrs$,
|
|
189
|
+
vchildren: node.$children$,
|
|
190
|
+
vkey: node.$key$,
|
|
191
|
+
vname: node.$name$,
|
|
192
|
+
vtag: node.$tag$,
|
|
193
|
+
vtext: node.$text$,
|
|
194
|
+
});
|
|
195
|
+
/**
|
|
196
|
+
* Convert a {@link d.ChildNode} back to an equivalent {@link d.VNode} in
|
|
197
|
+
* order to use the resulting object in the virtual DOM. The initial object was
|
|
198
|
+
* likely created as part of presenting a public API, so converting it back
|
|
199
|
+
* involved making it 'private' again (hence, `convertToPrivate`).
|
|
200
|
+
*
|
|
201
|
+
* @param node the child node to convert
|
|
202
|
+
* @returns a converted virtual DOM node
|
|
203
|
+
*/
|
|
204
|
+
const convertToPrivate = (node) => {
|
|
205
|
+
if (typeof node.vtag === 'function') {
|
|
206
|
+
const vnodeData = Object.assign({}, node.vattrs);
|
|
207
|
+
if (node.vkey) {
|
|
208
|
+
vnodeData.key = node.vkey;
|
|
209
|
+
}
|
|
210
|
+
if (node.vname) {
|
|
211
|
+
vnodeData.name = node.vname;
|
|
212
|
+
}
|
|
213
|
+
return h(node.vtag, vnodeData, ...(node.vchildren || []));
|
|
214
|
+
}
|
|
215
|
+
const vnode = newVNode(node.vtag, node.vtext);
|
|
216
|
+
vnode.$attrs$ = node.vattrs;
|
|
217
|
+
vnode.$children$ = node.vchildren;
|
|
218
|
+
vnode.$key$ = node.vkey;
|
|
219
|
+
vnode.$name$ = node.vname;
|
|
220
|
+
return vnode;
|
|
221
|
+
};
|
|
165
222
|
/**
|
|
166
223
|
* Parse a new property value for a given property type.
|
|
167
224
|
*
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
import refreshIcon from "../../../../assets/icons/gat-icon-refresh.svg";
|
|
3
|
+
import alertIcon from "../../../../assets/icons/gat-icon-alert.svg";
|
|
4
|
+
export const RetryButton = (props) => {
|
|
5
|
+
var _a;
|
|
6
|
+
const { errorMessage, modalWidth, clickInsideBoxLabel, refreshQrLabel, scanQrLabel, waitingStartSessionLabel, display, renderRetryQR, } = props;
|
|
7
|
+
return (h("div", { class: "reload", style: {
|
|
8
|
+
width: (modalWidth - 48).toString() + "px",
|
|
9
|
+
height: modalWidth ? ((_a = (modalWidth - 48)) === null || _a === void 0 ? void 0 : _a.toString()) + "px" : "",
|
|
10
|
+
} }, h("div", { id: "notify", onClick: () => display() }, h("img", { src: refreshIcon, height: 24, width: 24 }), h("p", { class: "notify-text" }, clickInsideBoxLabel, " "), errorMessage ? (h("p", { class: "notify-text bold" }, refreshQrLabel)) : (h("p", { class: "notify-text bold" }, scanQrLabel)), errorMessage && (h("div", { class: "alert", style: {
|
|
11
|
+
width: (modalWidth - 48).toString() + "px",
|
|
12
|
+
} }, h("img", { src: alertIcon, height: 24, width: 24 }), h("p", null, errorMessage)))), h("div", { id: "qrwait" }, renderRetryQR(waitingStartSessionLabel))));
|
|
13
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import successIcon from "../../../../assets/icons/gat-icon-check.svg";
|
|
2
|
+
import { h } from "@stencil/core";
|
|
3
|
+
export const Success = (props) => {
|
|
4
|
+
const { modalHeight, successLoginLabel } = props;
|
|
5
|
+
return (h("div", { class: "success", style: {
|
|
6
|
+
height: modalHeight ? (modalHeight === null || modalHeight === void 0 ? void 0 : modalHeight.toString()) + "px" : "300px",
|
|
7
|
+
} }, h("img", { src: successIcon, height: 52, width: 52 }), h("p", { class: "successMsg" }, successLoginLabel)));
|
|
8
|
+
};
|