aesirx-analytics 2.2.4 → 2.2.5
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/{Consent-J6XDJB65.js → Consent-ZWVGMKB7.js} +17 -4
- package/dist/{ConsentCustom-6YFZO4ZJ.js → ConsentCustom-P3FMYMS3.js} +22 -9
- package/dist/analytics.js +136 -110
- package/dist/{chunk-FKCTTU52.js → chunk-JH54YDTD.js} +6 -3
- package/dist/{chunk-AJMXPNA2.js → chunk-PHG7RB3K.js} +44 -21
- package/dist/index.d.ts +7 -3
- package/dist/index.js +31 -12
- package/package.json +6 -6
@@ -381,7 +381,7 @@ import { createElement as createElement4 } from "react";
|
|
381
381
|
import { useContext as useContext3 } from "react";
|
382
382
|
|
383
383
|
// src/utils/AnalyticsContextProvider.tsx
|
384
|
-
import React3, { useState as useState2 } from "react";
|
384
|
+
import React3, { useRef as useRef2, useState as useState2 } from "react";
|
385
385
|
|
386
386
|
// src/translations/dk/common.json
|
387
387
|
var common_default = {
|
@@ -1093,11 +1093,13 @@ var AnalyticsContext = React3.createContext({
|
|
1093
1093
|
event_uuid: void 0,
|
1094
1094
|
visitor_uuid: void 0,
|
1095
1095
|
setEventID: void 0,
|
1096
|
-
setUUID: void 0
|
1096
|
+
setUUID: void 0,
|
1097
|
+
ref: void 0
|
1097
1098
|
});
|
1098
1099
|
var AnalyticsContextProvider = ({ children }) => {
|
1099
1100
|
const [eventID, setEventID] = useState2();
|
1100
1101
|
const [UUID, setUUID] = useState2();
|
1102
|
+
const ref = useRef2();
|
1101
1103
|
return /* @__PURE__ */ React3.createElement(
|
1102
1104
|
AnalyticsContext.Provider,
|
1103
1105
|
{
|
@@ -1105,7 +1107,8 @@ var AnalyticsContextProvider = ({ children }) => {
|
|
1105
1107
|
event_uuid: eventID,
|
1106
1108
|
visitor_uuid: UUID,
|
1107
1109
|
setEventID,
|
1108
|
-
setUUID
|
1110
|
+
setUUID,
|
1111
|
+
ref
|
1109
1112
|
}
|
1110
1113
|
},
|
1111
1114
|
/* @__PURE__ */ React3.createElement(AesirXI18nextProvider, { appLanguages }, children)
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import {
|
2
2
|
AnalyticsContext,
|
3
3
|
useTranslation
|
4
|
-
} from "./chunk-
|
4
|
+
} from "./chunk-JH54YDTD.js";
|
5
5
|
|
6
6
|
// src/utils/consent.ts
|
7
7
|
import { stringMessage } from "@concordium/react-components";
|
@@ -389,7 +389,7 @@ var useConsentStatus = (endpoint, props) => {
|
|
389
389
|
}, [rpc]);
|
390
390
|
useEffect(() => {
|
391
391
|
const initConnector = async () => {
|
392
|
-
if (isDesktop && sessionStorage.getItem("aesirx-analytics-revoke") !== "1" && sessionStorage.getItem("aesirx-analytics-revoke") !== "2") {
|
392
|
+
if (isDesktop && sessionStorage.getItem("aesirx-analytics-revoke") !== "1" && sessionStorage.getItem("aesirx-analytics-revoke") !== "2" && sessionStorage.getItem("aesirx-analytics-rejected") !== "true") {
|
393
393
|
if (window["concordium"]) {
|
394
394
|
const address2 = await window["concordium"]?.requestAccounts() ?? [];
|
395
395
|
if (window["concordium"] && address2?.length) {
|
@@ -406,7 +406,7 @@ var useConsentStatus = (endpoint, props) => {
|
|
406
406
|
}
|
407
407
|
};
|
408
408
|
initConnector();
|
409
|
-
}, []);
|
409
|
+
}, [window["concordium"]]);
|
410
410
|
useEffect(() => {
|
411
411
|
if (activeConnector) {
|
412
412
|
connect();
|
@@ -9328,6 +9328,11 @@ var css = `:root {
|
|
9328
9328
|
.aesirxconsent .btn-success:hover {
|
9329
9329
|
color: var(--aesirxconsent-white);
|
9330
9330
|
}
|
9331
|
+
@media (max-width: 991.98px) {
|
9332
|
+
.aesirxconsent .nav {
|
9333
|
+
--aesirxconsent-nav-link-padding-y: 5px;
|
9334
|
+
}
|
9335
|
+
}
|
9331
9336
|
.aesirxconsent .toast {
|
9332
9337
|
--aesirxconsent-toast-zindex: 1049;
|
9333
9338
|
--aesirxconsent-toast-font-size: 16px;
|
@@ -9338,6 +9343,13 @@ var css = `:root {
|
|
9338
9343
|
border: var(--aesirxconsent-toast-border-width) solid var(--aesirxconsent-toast-border-color);
|
9339
9344
|
box-shadow: var(--aesirxconsent-toast-box-shadow);
|
9340
9345
|
border-radius: var(--aesirxconsent-toast-border-radius);
|
9346
|
+
max-height: 100vh;
|
9347
|
+
overflow-y: auto;
|
9348
|
+
}
|
9349
|
+
@media (max-width: 991.98px) {
|
9350
|
+
.aesirxconsent .toast .toast-body {
|
9351
|
+
font-size: 14px;
|
9352
|
+
}
|
9341
9353
|
}
|
9342
9354
|
@media (max-width: 991.98px) {
|
9343
9355
|
.aesirxconsent .toast .toast-body button {
|
@@ -9383,16 +9395,16 @@ var css = `:root {
|
|
9383
9395
|
background-color: #222328;
|
9384
9396
|
}
|
9385
9397
|
.aesirxconsent .toast.custom .status-tier.tier-1 {
|
9386
|
-
background-color: #
|
9398
|
+
background-color: #F1C40F;
|
9387
9399
|
}
|
9388
9400
|
.aesirxconsent .toast.custom .status-tier.tier-2 {
|
9389
|
-
background-color: #
|
9401
|
+
background-color: #E67E22;
|
9390
9402
|
}
|
9391
9403
|
.aesirxconsent .toast.custom .status-tier.tier-3 {
|
9392
|
-
background-color: #
|
9404
|
+
background-color: #9B59B6;
|
9393
9405
|
}
|
9394
9406
|
.aesirxconsent .toast.custom .status-tier.tier-4 {
|
9395
|
-
background-color: #
|
9407
|
+
background-color: #C8192E;
|
9396
9408
|
}
|
9397
9409
|
.aesirxconsent .toast-container {
|
9398
9410
|
box-sizing: border-box;
|
@@ -9617,6 +9629,9 @@ var css = `:root {
|
|
9617
9629
|
opacity: 0;
|
9618
9630
|
}
|
9619
9631
|
}
|
9632
|
+
.aesirxconsent .header-consent-bg {
|
9633
|
+
background-color: #f8f9fd;
|
9634
|
+
}
|
9620
9635
|
|
9621
9636
|
body.modal-open .aesirxconsent .offcanvas-backdrop,
|
9622
9637
|
body.modal-sso-open .aesirxconsent .offcanvas-backdrop {
|
@@ -9689,7 +9704,7 @@ body.modal-sso-open .aesirxconsent .toast-container {
|
|
9689
9704
|
background-color: var(--aesirxconsent-dark-bg-subtle);
|
9690
9705
|
}
|
9691
9706
|
[data-bs-theme=dark] .aesirxconsent .bg-white {
|
9692
|
-
background-color: var(--aesirxconsent-
|
9707
|
+
background-color: var(--aesirxconsent-dark) !important;
|
9693
9708
|
}
|
9694
9709
|
[data-bs-theme=dark] .aesirxconsent .bg-light {
|
9695
9710
|
background-color: var(--aesirxconsent-light-bg-subtle);
|
@@ -9702,6 +9717,17 @@ body.modal-sso-open .aesirxconsent .toast-container {
|
|
9702
9717
|
}
|
9703
9718
|
[data-bs-theme=dark] .aesirxconsent .minimize-shield-wrapper .text {
|
9704
9719
|
color: #fff;
|
9720
|
+
}
|
9721
|
+
[data-bs-theme=dark] .aesirxconsent .header-consent-bg {
|
9722
|
+
background-color: var(--aesirxconsent-light-bg-subtle);
|
9723
|
+
}
|
9724
|
+
[data-bs-theme=dark] .aesirxconsent .toast.custom .consent_info_tab .nav-item button.active {
|
9725
|
+
color: #fff;
|
9726
|
+
background-color: #1B233F;
|
9727
|
+
}
|
9728
|
+
[data-bs-theme=dark] .aesirxconsent .item_compliant {
|
9729
|
+
background-color: #F0F3FB;
|
9730
|
+
color: #222328;
|
9705
9731
|
}`;
|
9706
9732
|
document.head.appendChild(document.createElement("style")).appendChild(document.createTextNode(css));
|
9707
9733
|
|
@@ -9798,11 +9824,8 @@ var TermsComponent = ({ children, level, handleLevel, isCustom = false }) => {
|
|
9798
9824
|
(term, key) => term.level === level && /* @__PURE__ */ React.createElement(Fragment, { key }, /* @__PURE__ */ React.createElement(
|
9799
9825
|
"div",
|
9800
9826
|
{
|
9801
|
-
className: `rounded-top d-flex align-items-center justify-content-between p-3 fw-medium flex-wrap ${isCustom ? "py-3 px-4" : "p-3 border-bottom bg-white"}`,
|
9827
|
+
className: `rounded-top d-flex align-items-center justify-content-between p-2 p-lg-3 fw-medium flex-wrap ${isCustom ? "py-2 py-lg-3 px-4 header-consent-bg" : "p-2 p-lg-3 border-bottom bg-white"}`,
|
9802
9828
|
style: {
|
9803
|
-
...isCustom && {
|
9804
|
-
backgroundColor: "#F8F9FD"
|
9805
|
-
},
|
9806
9829
|
...isCustom && {
|
9807
9830
|
borderBottom: "1px solid #DEDEDE"
|
9808
9831
|
}
|
@@ -9816,15 +9839,15 @@ var TermsComponent = ({ children, level, handleLevel, isCustom = false }) => {
|
|
9816
9839
|
src: bg_default
|
9817
9840
|
}
|
9818
9841
|
), /* @__PURE__ */ React.createElement("div", { className: "minimize-shield position-relative z-2 py-2" }, /* @__PURE__ */ React.createElement("img", { src: privacy_default, alt: "Shield of Privacy" }), t("txt_shield_of_privacy")))) : /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("div", { className: `status-tier tier-${term.level} rounded-circle` }), /* @__PURE__ */ React.createElement("div", { className: "status-tier-text" }, t(term.tier), " - ", t(term.levelname))))
|
9819
|
-
), /* @__PURE__ */ React.createElement("div", { className: `
|
9842
|
+
), /* @__PURE__ */ React.createElement("div", { className: `pb-3 ${isCustom ? "pt-0" : ""} bg-white` }, isCustom ? /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
9820
9843
|
Tabs,
|
9821
9844
|
{
|
9822
9845
|
id: "consent_info_tab",
|
9823
9846
|
activeKey: activeTab,
|
9824
9847
|
onSelect: (k) => setActiveTab(k),
|
9825
|
-
className: "mb-3 w-100 flex-nowrap consent_info_tab"
|
9848
|
+
className: "mb-2 mb-lg-3 w-100 flex-nowrap consent_info_tab"
|
9826
9849
|
},
|
9827
|
-
/* @__PURE__ */ React.createElement(Tab, { eventKey: "consent", title: "Consent", className: "w-100" }, /* @__PURE__ */ React.createElement("p", { className: "mb-3" }, t("txt_consent_to_data")), /* @__PURE__ */ React.createElement("div", { className: "d-flex align-items-center flex-wrap" }, /* @__PURE__ */ React.createElement("div", { className: "me-10px" }, t("txt_ethical_compliant")), /* @__PURE__ */ React.createElement("div", { className: "d-flex align-items-center" }, /* @__PURE__ */ React.createElement("div", { className: "item_compliant fw-semibold d-flex align-items-center
|
9850
|
+
/* @__PURE__ */ React.createElement(Tab, { eventKey: "consent", title: "Consent", className: "w-100 px-3" }, /* @__PURE__ */ React.createElement("p", { className: "mb-2 mb-lg-3" }, t("txt_consent_to_data")), /* @__PURE__ */ React.createElement("div", { className: "d-flex align-items-center flex-wrap" }, /* @__PURE__ */ React.createElement("div", { className: "me-10px" }, t("txt_ethical_compliant")), /* @__PURE__ */ React.createElement("div", { className: "d-flex align-items-center" }, /* @__PURE__ */ React.createElement("div", { className: "item_compliant fw-semibold d-flex align-items-center" }, /* @__PURE__ */ React.createElement("img", { src: check_line_default, width: 24, height: 24 }), "GDPR"), /* @__PURE__ */ React.createElement("div", { className: "item_compliant fw-semibold d-flex align-items-center ms-10px" }, /* @__PURE__ */ React.createElement("img", { src: check_line_default, width: 24, height: 24 }), "CCPA"))), /* @__PURE__ */ React.createElement("div", { className: "fw-semibold mt-2 mt-lg-3 mb-0 text-dark" }, t("txt_your_current_level")), /* @__PURE__ */ React.createElement(
|
9828
9851
|
ConsentLevel,
|
9829
9852
|
{
|
9830
9853
|
level: term.level,
|
@@ -9834,7 +9857,7 @@ var TermsComponent = ({ children, level, handleLevel, isCustom = false }) => {
|
|
9834
9857
|
content_custom: t(term.content_custom)
|
9835
9858
|
}
|
9836
9859
|
)),
|
9837
|
-
/* @__PURE__ */ React.createElement(Tab, { eventKey: "detail", title: "Detail" }, /* @__PURE__ */ React.createElement("div", { className: "about_section" }, /* @__PURE__ */ React.createElement("div", { className: "d-flex align-items-start" }, /* @__PURE__ */ React.createElement("span", null, /* @__PURE__ */ React.createElement("img", { src: check_circle_default, width: "14px", height: "15px" })), /* @__PURE__ */ React.createElement("div", { className: "ms-10px" }, /* @__PURE__ */ React.createElement(
|
9860
|
+
/* @__PURE__ */ React.createElement(Tab, { eventKey: "detail", title: "Detail", className: "px-3" }, /* @__PURE__ */ React.createElement("div", { className: "about_section" }, /* @__PURE__ */ React.createElement("div", { className: "d-flex align-items-start" }, /* @__PURE__ */ React.createElement("span", null, /* @__PURE__ */ React.createElement("img", { src: check_circle_default, width: "14px", height: "15px" })), /* @__PURE__ */ React.createElement("div", { className: "ms-10px" }, /* @__PURE__ */ React.createElement(
|
9838
9861
|
"div",
|
9839
9862
|
{
|
9840
9863
|
dangerouslySetInnerHTML: {
|
@@ -9898,7 +9921,7 @@ var TermsComponent = ({ children, level, handleLevel, isCustom = false }) => {
|
|
9898
9921
|
content_custom: t("txt_tier_4_content_custom")
|
9899
9922
|
}
|
9900
9923
|
))),
|
9901
|
-
/* @__PURE__ */ React.createElement(Tab, { eventKey: "about", title: "About" }, /* @__PURE__ */ React.createElement("div", { className: "d-flex align-items-start" }, /* @__PURE__ */ React.createElement("span", null, /* @__PURE__ */ React.createElement("img", { src: check_circle_default, width: "14px", height: "15px" })), /* @__PURE__ */ React.createElement("div", { className: "ms-10px" }, /* @__PURE__ */ React.createElement(
|
9924
|
+
/* @__PURE__ */ React.createElement(Tab, { eventKey: "about", title: "About", className: "px-3" }, /* @__PURE__ */ React.createElement("div", { className: "d-flex align-items-start" }, /* @__PURE__ */ React.createElement("span", null, /* @__PURE__ */ React.createElement("img", { src: check_circle_default, width: "14px", height: "15px" })), /* @__PURE__ */ React.createElement("div", { className: "ms-10px" }, /* @__PURE__ */ React.createElement(
|
9902
9925
|
"div",
|
9903
9926
|
{
|
9904
9927
|
dangerouslySetInnerHTML: {
|
@@ -9934,7 +9957,7 @@ var TermsComponent = ({ children, level, handleLevel, isCustom = false }) => {
|
|
9934
9957
|
})
|
9935
9958
|
}
|
9936
9959
|
}
|
9937
|
-
))), /* @__PURE__ */ React.createElement("div", { className: "d-flex align-items-center mt-3 flex-wrap" }, /* @__PURE__ */ React.createElement("div", { className: "me-10px" }, t("txt_ethical_compliant")), /* @__PURE__ */ React.createElement("div", { className: "d-flex align-items-center" }, /* @__PURE__ */ React.createElement("div", { className: "item_compliant fw-semibold d-flex align-items-center
|
9960
|
+
))), /* @__PURE__ */ React.createElement("div", { className: "d-flex align-items-center mt-3 flex-wrap" }, /* @__PURE__ */ React.createElement("div", { className: "me-10px" }, t("txt_ethical_compliant")), /* @__PURE__ */ React.createElement("div", { className: "d-flex align-items-center" }, /* @__PURE__ */ React.createElement("div", { className: "item_compliant fw-semibold d-flex align-items-center" }, /* @__PURE__ */ React.createElement("img", { src: check_line_default, width: 24, height: 24 }), "GDPR"), /* @__PURE__ */ React.createElement("div", { className: "item_compliant fw-semibold d-flex align-items-center ms-10px" }, /* @__PURE__ */ React.createElement("img", { src: check_line_default, width: 24, height: 24 }), "CCPA"))))
|
9938
9961
|
)) : /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("span", { className: "text-dark fw-medium" }, t(term.content)), " ", /* @__PURE__ */ React.createElement("span", { className: "" }, t(term.term)), /* @__PURE__ */ React.createElement("div", { className: "read-more d-flex justify-content-between align-items-center flex-wrap" }, term.upgrade && /* @__PURE__ */ React.createElement(
|
9939
9962
|
"a",
|
9940
9963
|
{
|
@@ -9954,17 +9977,17 @@ var TermsComponent = ({ children, level, handleLevel, isCustom = false }) => {
|
|
9954
9977
|
!showReadmore ? t("txt_show_details") : t("txt_hide_details"),
|
9955
9978
|
" ",
|
9956
9979
|
/* @__PURE__ */ React.createElement("img", { src: arrow_default, className: `ms-1 ${showReadmore ? "revert" : ""}` })
|
9957
|
-
)))), isCustom ? /* @__PURE__ */ React.createElement("div", { className: "rounded-bottom position-relative overflow-hidden text-white bg-white" }, /* @__PURE__ */ React.createElement("div", { className: "position-relative p-3" }, /* @__PURE__ */ React.createElement("div", { className: "d-flex align-items-center justify-content-between flex-wrap" }, children))) : /* @__PURE__ */ React.createElement("div", { className: "rounded-bottom position-relative overflow-hidden text-white" }, /* @__PURE__ */ React.createElement("img", { className: "position-absolute h-100 w-100 object-fit-cover", src: bg_default }), /* @__PURE__ */ React.createElement(
|
9980
|
+
)))), isCustom ? /* @__PURE__ */ React.createElement("div", { className: "rounded-bottom position-relative overflow-hidden text-white bg-white" }, /* @__PURE__ */ React.createElement("div", { className: "position-relative pt-2 pt-lg-3 p-3" }, /* @__PURE__ */ React.createElement("div", { className: "d-flex align-items-center justify-content-between flex-wrap" }, children))) : /* @__PURE__ */ React.createElement("div", { className: "rounded-bottom position-relative overflow-hidden text-white" }, /* @__PURE__ */ React.createElement("img", { className: "position-absolute h-100 w-100 object-fit-cover", src: bg_default }), /* @__PURE__ */ React.createElement(
|
9958
9981
|
"img",
|
9959
9982
|
{
|
9960
9983
|
className: "position-absolute h-100 w-100 object-fit-cover lightning flash-effect",
|
9961
9984
|
src: bg_default
|
9962
9985
|
}
|
9963
|
-
), /* @__PURE__ */ React.createElement("div", { className: "position-relative p-3" }, showReadmore && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("div", { className: "mb-3" }, term.upgrade && t(term.upgrade), t(term.upgradetext), /* @__PURE__ */ React.createElement("div", { className: "fs-14 fst-italic" }, "* ", t("txt_no_collect")))), /* @__PURE__ */ React.createElement("div", { className: "d-flex align-items-center justify-content-between flex-wrap" }, /* @__PURE__ */ React.createElement("div", { className: "me-2" }, /* @__PURE__ */ React.createElement("img", { src: privacy_default, alt: t(term.name) }), " ", t("txt_shield_of_privacy")), children))))
|
9986
|
+
), /* @__PURE__ */ React.createElement("div", { className: "position-relative pt-2 pt-lg-3 p-3" }, showReadmore && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("div", { className: "mb-3" }, term.upgrade && t(term.upgrade), t(term.upgradetext), /* @__PURE__ */ React.createElement("div", { className: "fs-14 fst-italic" }, "* ", t("txt_no_collect")))), /* @__PURE__ */ React.createElement("div", { className: "d-flex align-items-center justify-content-between flex-wrap" }, /* @__PURE__ */ React.createElement("div", { className: "me-2" }, /* @__PURE__ */ React.createElement("img", { src: privacy_default, alt: t(term.name) }), " ", t("txt_shield_of_privacy")), children))))
|
9964
9987
|
));
|
9965
9988
|
};
|
9966
9989
|
var ConsentLevel = ({ level, tier, levelname, term_custom, content_custom }) => {
|
9967
|
-
return /* @__PURE__ */ React.createElement("div", { className: "consent_level mt-3" }, /* @__PURE__ */ React.createElement("div", { className: "d-flex align-items-center justify-content-between flex-wrap mb-2" }, /* @__PURE__ */ React.createElement("div", { className: "d-flex align-items-center" }, /* @__PURE__ */ React.createElement("div", { className: `status-tier tier-${level} rounded-circle` }), /* @__PURE__ */ React.createElement("div", { className: "status-tier-text fw-semibold fs-14 text-primary" }, tier, " - ", levelname)), /* @__PURE__ */ React.createElement("div", { className: "fw-semibold fs-14 text-primary" }, term_custom)), /* @__PURE__ */ React.createElement("div", null, content_custom));
|
9990
|
+
return /* @__PURE__ */ React.createElement("div", { className: "consent_level mt-2 mt-lg-3" }, /* @__PURE__ */ React.createElement("div", { className: "d-flex align-items-center justify-content-between flex-wrap mb-2" }, /* @__PURE__ */ React.createElement("div", { className: "d-flex align-items-center" }, /* @__PURE__ */ React.createElement("div", { className: `status-tier tier-${level} rounded-circle` }), /* @__PURE__ */ React.createElement("div", { className: "status-tier-text fw-semibold fs-14 text-primary" }, tier, " - ", levelname)), /* @__PURE__ */ React.createElement("div", { className: "fw-semibold fs-14 text-primary" }, term_custom)), /* @__PURE__ */ React.createElement("div", null, content_custom));
|
9968
9991
|
};
|
9969
9992
|
|
9970
9993
|
// src/Assets/yes.svg
|
package/dist/index.d.ts
CHANGED
@@ -4,10 +4,12 @@ import { NextRouter } from 'next/router';
|
|
4
4
|
interface AnalyticsNext {
|
5
5
|
router: NextRouter;
|
6
6
|
attributes: any;
|
7
|
-
|
7
|
+
oldLayout?: boolean;
|
8
|
+
loginApp?: any;
|
9
|
+
isLoggedApp?: boolean;
|
8
10
|
children?: ReactNode;
|
9
11
|
}
|
10
|
-
declare const AnalyticsNext: ({ router, attributes,
|
12
|
+
declare const AnalyticsNext: ({ router, attributes, oldLayout, loginApp, isLoggedApp, children, }: AnalyticsNext) => React.JSX.Element;
|
11
13
|
|
12
14
|
interface AnalyticsReact {
|
13
15
|
location: {
|
@@ -18,8 +20,9 @@ interface AnalyticsReact {
|
|
18
20
|
replace: (_: object) => void;
|
19
21
|
};
|
20
22
|
children?: ReactNode;
|
23
|
+
oldLayout?: boolean;
|
21
24
|
}
|
22
|
-
declare const AnalyticsReact: ({ location, history, children }: AnalyticsReact) => React.JSX.Element;
|
25
|
+
declare const AnalyticsReact: ({ location, history, oldLayout, children }: AnalyticsReact) => React.JSX.Element;
|
23
26
|
|
24
27
|
declare const trackEvent: (endpoint: string, referer?: string, data?: object) => Promise<boolean>;
|
25
28
|
|
@@ -28,6 +31,7 @@ interface AnalyticsContextType {
|
|
28
31
|
visitor_uuid: string;
|
29
32
|
setEventID: Dispatch<SetStateAction<string>>;
|
30
33
|
setUUID: Dispatch<SetStateAction<string>>;
|
34
|
+
ref: any;
|
31
35
|
}
|
32
36
|
declare const AnalyticsContext: React.Context<AnalyticsContextType>;
|
33
37
|
|
package/dist/index.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
import {
|
2
2
|
AnalyticsContext,
|
3
3
|
AnalyticsContextProvider_default
|
4
|
-
} from "./chunk-
|
4
|
+
} from "./chunk-JH54YDTD.js";
|
5
5
|
|
6
6
|
// src/AnalyticsNext/index.tsx
|
7
7
|
import React2 from "react";
|
@@ -518,22 +518,33 @@ var handle_default = AnalyticsHandle;
|
|
518
518
|
|
519
519
|
// src/AnalyticsNext/index.tsx
|
520
520
|
import dynamic from "next/dynamic";
|
521
|
-
var ConsentComponent = dynamic(() => import("./Consent-
|
522
|
-
var ConsentComponentCustom = dynamic(() => import("./ConsentCustom-
|
523
|
-
var AnalyticsNext = ({
|
524
|
-
|
525
|
-
|
521
|
+
var ConsentComponent = dynamic(() => import("./Consent-ZWVGMKB7.js"), { ssr: false });
|
522
|
+
var ConsentComponentCustom = dynamic(() => import("./ConsentCustom-P3FMYMS3.js"), { ssr: false });
|
523
|
+
var AnalyticsNext = ({
|
524
|
+
router,
|
525
|
+
attributes,
|
526
|
+
oldLayout = false,
|
527
|
+
loginApp,
|
528
|
+
isLoggedApp,
|
529
|
+
children
|
530
|
+
}) => {
|
531
|
+
return /* @__PURE__ */ React2.createElement(React2.Fragment, null, /* @__PURE__ */ React2.createElement(AnalyticsContextProvider_default, null, /* @__PURE__ */ React2.createElement(handle_default, { router, attributes }, children, process.env.NEXT_PUBLIC_DISABLE_ANALYTICS_CONSENT !== "true" && /* @__PURE__ */ React2.createElement(React2.Fragment, null, oldLayout ? /* @__PURE__ */ React2.createElement(
|
532
|
+
ConsentComponent,
|
526
533
|
{
|
527
534
|
endpoint: process.env.NEXT_PUBLIC_ENDPOINT_ANALYTICS_URL,
|
528
535
|
networkEnv: process.env.NEXT_PUBLIC_CONCORDIUM_NETWORK,
|
529
|
-
aesirXEndpoint: process.env.NEXT_PUBLIC_ENDPOINT_URL ?? "https://api.aesirx.io"
|
536
|
+
aesirXEndpoint: process.env.NEXT_PUBLIC_ENDPOINT_URL ?? "https://api.aesirx.io",
|
537
|
+
loginApp,
|
538
|
+
isLoggedApp
|
530
539
|
}
|
531
540
|
) : /* @__PURE__ */ React2.createElement(
|
532
|
-
|
541
|
+
ConsentComponentCustom,
|
533
542
|
{
|
534
543
|
endpoint: process.env.NEXT_PUBLIC_ENDPOINT_ANALYTICS_URL,
|
535
544
|
networkEnv: process.env.NEXT_PUBLIC_CONCORDIUM_NETWORK,
|
536
|
-
aesirXEndpoint: process.env.NEXT_PUBLIC_ENDPOINT_URL ?? "https://api.aesirx.io"
|
545
|
+
aesirXEndpoint: process.env.NEXT_PUBLIC_ENDPOINT_URL ?? "https://api.aesirx.io",
|
546
|
+
loginApp,
|
547
|
+
isLoggedApp
|
537
548
|
}
|
538
549
|
)))));
|
539
550
|
};
|
@@ -579,15 +590,23 @@ var AnalyticsHandle2 = ({ location, history, children }) => {
|
|
579
590
|
var handle_default2 = AnalyticsHandle2;
|
580
591
|
|
581
592
|
// src/AnalyticsReact/index.tsx
|
582
|
-
var ConsentComponent2 = React4.lazy(() => import("./Consent-
|
583
|
-
var
|
584
|
-
|
593
|
+
var ConsentComponent2 = React4.lazy(() => import("./Consent-ZWVGMKB7.js"));
|
594
|
+
var ConsentComponentCustom2 = React4.lazy(() => import("./ConsentCustom-P3FMYMS3.js"));
|
595
|
+
var AnalyticsReact = ({ location, history, oldLayout = false, children }) => {
|
596
|
+
return /* @__PURE__ */ React4.createElement(AnalyticsContextProvider_default, null, /* @__PURE__ */ React4.createElement(handle_default2, { location, history }, children, process.env.REACT_APP_DISABLE_ANALYTICS_CONSENT !== "true" && /* @__PURE__ */ React4.createElement(Suspense, { fallback: /* @__PURE__ */ React4.createElement(React4.Fragment, null) }, oldLayout ? /* @__PURE__ */ React4.createElement(
|
585
597
|
ConsentComponent2,
|
586
598
|
{
|
587
599
|
endpoint: process.env.REACT_APP_ENDPOINT_ANALYTICS_URL,
|
588
600
|
networkEnv: process.env.REACT_APP_CONCORDIUM_NETWORK,
|
589
601
|
aesirXEndpoint: process.env.REACT_APP_ENDPOINT_URL ?? "https://api.aesirx.io"
|
590
602
|
}
|
603
|
+
) : /* @__PURE__ */ React4.createElement(
|
604
|
+
ConsentComponentCustom2,
|
605
|
+
{
|
606
|
+
endpoint: process.env.NEXT_PUBLIC_ENDPOINT_ANALYTICS_URL,
|
607
|
+
networkEnv: process.env.NEXT_PUBLIC_CONCORDIUM_NETWORK,
|
608
|
+
aesirXEndpoint: process.env.NEXT_PUBLIC_ENDPOINT_URL ?? "https://api.aesirx.io"
|
609
|
+
}
|
591
610
|
))));
|
592
611
|
};
|
593
612
|
var AnalyticsReact_default = AnalyticsReact;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "aesirx-analytics",
|
3
|
-
"version": "2.2.
|
3
|
+
"version": "2.2.5",
|
4
4
|
"license": "GPL-3.0-only",
|
5
5
|
"author": "AesirX",
|
6
6
|
"repository": "https://gitlab.redweb.dk/aesirx/analytics",
|
@@ -21,13 +21,13 @@
|
|
21
21
|
"buffer": "^6.0.3",
|
22
22
|
"ethers": "^6.6.5",
|
23
23
|
"i18next": "^23.6.0",
|
24
|
-
"i18next-browser-languagedetector": "^7.1
|
24
|
+
"i18next-browser-languagedetector": "^7.2.1",
|
25
25
|
"murmurhash-js": "^1.0.0",
|
26
26
|
"next": "^14.1.0",
|
27
27
|
"query-string": "^7.1.1",
|
28
|
-
"react": "^18.
|
28
|
+
"react": "^18.3.1",
|
29
29
|
"react-bootstrap": "^2.8.0",
|
30
|
-
"react-content-loader": "^
|
30
|
+
"react-content-loader": "^7.0.0",
|
31
31
|
"react-device-detect": "^2.2.3",
|
32
32
|
"react-dom": "18",
|
33
33
|
"react-toastify": "^9.1.3",
|
@@ -63,13 +63,13 @@
|
|
63
63
|
]
|
64
64
|
},
|
65
65
|
"devDependencies": {
|
66
|
-
"@babel/preset-env": "^7.
|
66
|
+
"@babel/preset-env": "^7.24.5",
|
67
67
|
"@babel/preset-typescript": "^7.23.0",
|
68
68
|
"@jest/globals": "^29.7.0",
|
69
69
|
"@types/jest": "^29.5.0",
|
70
70
|
"@types/murmurhash-js": "^1.0.3",
|
71
71
|
"@types/node": "^20.8.0",
|
72
|
-
"@types/react": "^18.
|
72
|
+
"@types/react": "^18.3.1",
|
73
73
|
"@types/react-dom": "^18.2.14",
|
74
74
|
"@typescript-eslint/eslint-plugin": "^5.57.0",
|
75
75
|
"@typescript-eslint/parser": "^5.57.0",
|