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
@@ -19,11 +19,11 @@ import {
|
|
19
19
|
useConsentStatus_default,
|
20
20
|
verifySignature,
|
21
21
|
yes_default
|
22
|
-
} from "./chunk-
|
22
|
+
} from "./chunk-PHG7RB3K.js";
|
23
23
|
import {
|
24
24
|
AnalyticsContext,
|
25
25
|
useTranslation
|
26
|
-
} from "./chunk-
|
26
|
+
} from "./chunk-JH54YDTD.js";
|
27
27
|
|
28
28
|
// src/Components/Consent.tsx
|
29
29
|
import React, { useContext, useEffect, useState } from "react";
|
@@ -47,13 +47,24 @@ import {
|
|
47
47
|
} from "@concordium/react-components";
|
48
48
|
import { OsTypes, isDesktop, isMobile, osName } from "react-device-detect";
|
49
49
|
import { useAccount, useSignMessage } from "wagmi";
|
50
|
-
var ConsentComponent = ({ endpoint, aesirXEndpoint, networkEnv }) => {
|
51
|
-
return /* @__PURE__ */ React.createElement(WithWalletConnector, { network: networkEnv === "testnet" ? TESTNET : MAINNET }, (props) => /* @__PURE__ */ React.createElement("div", { className: "aesirxconsent" }, /* @__PURE__ */ React.createElement(Ethereum_default, null, /* @__PURE__ */ React.createElement(
|
50
|
+
var ConsentComponent = ({ endpoint, aesirXEndpoint, networkEnv, loginApp, isLoggedApp }) => {
|
51
|
+
return /* @__PURE__ */ React.createElement(WithWalletConnector, { network: networkEnv === "testnet" ? TESTNET : MAINNET }, (props) => /* @__PURE__ */ React.createElement("div", { className: "aesirxconsent" }, /* @__PURE__ */ React.createElement(Ethereum_default, null, /* @__PURE__ */ React.createElement(
|
52
|
+
ConsentComponentApp,
|
53
|
+
{
|
54
|
+
...props,
|
55
|
+
endpoint,
|
56
|
+
aesirXEndpoint,
|
57
|
+
loginApp,
|
58
|
+
isLoggedApp
|
59
|
+
}
|
60
|
+
))));
|
52
61
|
};
|
53
62
|
var ConsentComponentApp = (props) => {
|
54
63
|
const {
|
55
64
|
endpoint,
|
56
65
|
aesirXEndpoint,
|
66
|
+
loginApp,
|
67
|
+
isLoggedApp,
|
57
68
|
activeConnectorType,
|
58
69
|
activeConnector,
|
59
70
|
activeConnectorError,
|
@@ -197,6 +208,7 @@ var ConsentComponentApp = (props) => {
|
|
197
208
|
);
|
198
209
|
sessionStorage.setItem("aesirx-analytics-jwt", data?.jwt);
|
199
210
|
jwt = data?.jwt;
|
211
|
+
loginApp && !isLoggedApp && loginApp(data);
|
200
212
|
setLoadingCheckAccount(false);
|
201
213
|
}
|
202
214
|
} else {
|
@@ -348,6 +360,7 @@ var ConsentComponentApp = (props) => {
|
|
348
360
|
setLoading("done");
|
349
361
|
}
|
350
362
|
}
|
363
|
+
loginApp && !isLoggedApp && loginApp(response);
|
351
364
|
} catch (error) {
|
352
365
|
console.log(error);
|
353
366
|
setShow(false);
|
@@ -20,11 +20,11 @@ import {
|
|
20
20
|
useConsentStatus_default,
|
21
21
|
verifySignature,
|
22
22
|
yes_default
|
23
|
-
} from "./chunk-
|
23
|
+
} from "./chunk-PHG7RB3K.js";
|
24
24
|
import {
|
25
25
|
AnalyticsContext,
|
26
26
|
useTranslation
|
27
|
-
} from "./chunk-
|
27
|
+
} from "./chunk-JH54YDTD.js";
|
28
28
|
|
29
29
|
// src/Components/ConsentCustom.tsx
|
30
30
|
import React, { useContext, useEffect, useState } from "react";
|
@@ -51,13 +51,21 @@ import {
|
|
51
51
|
} from "@concordium/react-components";
|
52
52
|
import { OsTypes, isDesktop, isMobile, osName } from "react-device-detect";
|
53
53
|
import { useAccount, useSignMessage } from "wagmi";
|
54
|
-
var ConsentComponentCustom = ({
|
54
|
+
var ConsentComponentCustom = ({
|
55
|
+
endpoint,
|
56
|
+
aesirXEndpoint,
|
57
|
+
networkEnv,
|
58
|
+
loginApp,
|
59
|
+
isLoggedApp
|
60
|
+
}) => {
|
55
61
|
return /* @__PURE__ */ React.createElement(WithWalletConnector, { network: networkEnv === "testnet" ? TESTNET : MAINNET }, (props) => /* @__PURE__ */ React.createElement("div", { className: "aesirxconsent" }, /* @__PURE__ */ React.createElement(Ethereum_default, null, /* @__PURE__ */ React.createElement(
|
56
62
|
ConsentComponentCustomApp,
|
57
63
|
{
|
58
64
|
...props,
|
59
65
|
endpoint,
|
60
|
-
aesirXEndpoint
|
66
|
+
aesirXEndpoint,
|
67
|
+
loginApp,
|
68
|
+
isLoggedApp
|
61
69
|
}
|
62
70
|
))));
|
63
71
|
};
|
@@ -65,6 +73,8 @@ var ConsentComponentCustomApp = (props) => {
|
|
65
73
|
const {
|
66
74
|
endpoint,
|
67
75
|
aesirXEndpoint,
|
76
|
+
loginApp,
|
77
|
+
isLoggedApp,
|
68
78
|
activeConnectorType,
|
69
79
|
activeConnector,
|
70
80
|
activeConnectorError,
|
@@ -211,6 +221,7 @@ var ConsentComponentCustomApp = (props) => {
|
|
211
221
|
);
|
212
222
|
sessionStorage.setItem("aesirx-analytics-jwt", data?.jwt);
|
213
223
|
jwt = data?.jwt;
|
224
|
+
loginApp && !isLoggedApp && loginApp(data);
|
214
225
|
setLoadingCheckAccount(false);
|
215
226
|
}
|
216
227
|
} else {
|
@@ -362,6 +373,7 @@ var ConsentComponentCustomApp = (props) => {
|
|
362
373
|
setLoading("done");
|
363
374
|
}
|
364
375
|
}
|
376
|
+
loginApp && !isLoggedApp && loginApp(response);
|
365
377
|
} catch (error) {
|
366
378
|
console.log(error);
|
367
379
|
setShow(false);
|
@@ -611,6 +623,7 @@ var ConsentComponentCustomApp = (props) => {
|
|
611
623
|
"div",
|
612
624
|
{
|
613
625
|
className: "minimize-shield",
|
626
|
+
ref: analyticsContext?.ref,
|
614
627
|
onClick: () => {
|
615
628
|
setShowExpandConsent(true);
|
616
629
|
sessionStorage.removeItem("aesirx-analytics-rejected");
|
@@ -618,7 +631,7 @@ var ConsentComponentCustomApp = (props) => {
|
|
618
631
|
},
|
619
632
|
/* @__PURE__ */ React.createElement("img", { src: privacy_default, alt: "Shield of Privacy" }),
|
620
633
|
t("txt_shield_of_privacy")
|
621
|
-
))) : /* @__PURE__ */ React.createElement("div", { className: "bg-white" }, level ? /* @__PURE__ */ React.createElement(React.Fragment, null, upgradeLayout ? /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("div", { className: "bg-white rounded p-3 w-100" }, loading === "done" ? /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("p", { className: "mb-3" }, t("txt_upgrade_consent_text")), /* @__PURE__ */ React.createElement("p", { className: "fw-semibold text-dark" }, t("txt_your_current_level")), /* @__PURE__ */ React.createElement(
|
634
|
+
))) : /* @__PURE__ */ React.createElement("div", { className: "bg-white" }, level ? /* @__PURE__ */ React.createElement(React.Fragment, null, upgradeLayout ? /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("div", { className: "bg-white rounded p-3 w-100" }, loading === "done" ? /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("p", { className: "mb-2 mb-lg-3" }, t("txt_upgrade_consent_text")), /* @__PURE__ */ React.createElement("p", { className: "fw-semibold text-dark" }, t("txt_your_current_level")), /* @__PURE__ */ React.createElement(
|
622
635
|
ConsentLevelUprade,
|
623
636
|
{
|
624
637
|
level,
|
@@ -736,7 +749,7 @@ var ConsentComponentCustomApp = (props) => {
|
|
736
749
|
onClick: () => {
|
737
750
|
setUpgradeLayout(true);
|
738
751
|
},
|
739
|
-
className: "d-flex align-items-center justify-content-center fs-14 w-100 me-3 mb-2 mb-lg-0 rounded-pill py-3 text-dark"
|
752
|
+
className: "d-flex align-items-center justify-content-center fs-14 w-100 me-3 mb-2 mb-lg-0 rounded-pill py-2 py-lg-3 text-dark"
|
740
753
|
},
|
741
754
|
t("txt_change_consent")
|
742
755
|
), " ", /* @__PURE__ */ React.createElement(
|
@@ -744,7 +757,7 @@ var ConsentComponentCustomApp = (props) => {
|
|
744
757
|
{
|
745
758
|
variant: "outline-success",
|
746
759
|
onClick: handleNotAllow,
|
747
|
-
className: "d-flex align-items-center justify-content-center fs-14 w-100 me-3 mb-2 mb-lg-0 rounded-pill py-3 text-dark"
|
760
|
+
className: "d-flex align-items-center justify-content-center fs-14 w-100 me-3 mb-2 mb-lg-0 rounded-pill py-2 py-lg-3 text-dark"
|
748
761
|
},
|
749
762
|
t("txt_reject_consent")
|
750
763
|
), /* @__PURE__ */ React.createElement(
|
@@ -755,7 +768,7 @@ var ConsentComponentCustomApp = (props) => {
|
|
755
768
|
/* @__PURE__ */ React.createElement(
|
756
769
|
SSOButton,
|
757
770
|
{
|
758
|
-
className: "btn btn-success text-white d-flex align-items-center justify-content-center loginSSO rounded-pill py-3 w-100",
|
771
|
+
className: "btn btn-success text-white d-flex align-items-center justify-content-center loginSSO rounded-pill py-2 py-lg-3 w-100",
|
759
772
|
text: /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("img", { src: yes_default, className: "me-1" }), t("txt_yes_i_consent")),
|
760
773
|
ssoState: "noscopes",
|
761
774
|
onGetData,
|
@@ -767,7 +780,7 @@ var ConsentComponentCustomApp = (props) => {
|
|
767
780
|
{
|
768
781
|
variant: "success",
|
769
782
|
onClick: handleAgree,
|
770
|
-
className: "w-100 me-3 text-white d-flex align-items-center justify-content-center fs-14 rounded-pill py-3"
|
783
|
+
className: "w-100 me-3 text-white d-flex align-items-center justify-content-center fs-14 rounded-pill py-2 py-lg-3"
|
771
784
|
},
|
772
785
|
loadingCheckAccount ? /* @__PURE__ */ React.createElement(
|
773
786
|
"span",
|