aesirx-analytics 2.2.20 → 2.3.0
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-4SM7WZEN.js → Consent-VKKGBHOL.js} +17 -14
- package/dist/{ConsentCustom-MHFD6YO3.js → ConsentCustom-ADJKXZV7.js} +81 -106
- package/dist/analytics.js +558 -723
- package/dist/{chunk-TDFENDG7.js → chunk-IAQD6GXT.js} +667 -279
- package/dist/{chunk-HGACFQLI.js → chunk-NKOHXSTE.js} +564 -45
- package/dist/index.js +40 -31
- package/package.json +15 -9
- package/dist/chunk-UJTYOAT7.js +0 -464
package/dist/index.js
CHANGED
@@ -1,19 +1,17 @@
|
|
1
|
-
import {
|
2
|
-
endTracker,
|
3
|
-
endTrackerVisibilityState,
|
4
|
-
fingerprint_default,
|
5
|
-
startTracker,
|
6
|
-
trackEvent
|
7
|
-
} from "./chunk-UJTYOAT7.js";
|
8
1
|
import {
|
9
2
|
AnalyticsContext,
|
10
3
|
AnalyticsContextProvider_default,
|
11
4
|
bg_default,
|
5
|
+
endTracker,
|
6
|
+
endTrackerVisibilityState,
|
7
|
+
fingerprint_default,
|
12
8
|
getConsentTemplate,
|
13
9
|
no_default,
|
14
10
|
privacy_default,
|
11
|
+
startTracker,
|
12
|
+
trackEvent,
|
15
13
|
useTranslation
|
16
|
-
} from "./chunk-
|
14
|
+
} from "./chunk-NKOHXSTE.js";
|
17
15
|
|
18
16
|
// src/AnalyticsNext/index.tsx
|
19
17
|
import React2, { useEffect as useEffect2, useState as useState2 } from "react";
|
@@ -76,8 +74,8 @@ var handle_default = AnalyticsHandle;
|
|
76
74
|
|
77
75
|
// src/AnalyticsNext/index.tsx
|
78
76
|
import dynamic from "next/dynamic";
|
79
|
-
var ConsentComponent = dynamic(() => import("./Consent-
|
80
|
-
var ConsentComponentCustom = dynamic(() => import("./ConsentCustom-
|
77
|
+
var ConsentComponent = dynamic(() => import("./Consent-VKKGBHOL.js"), { ssr: false });
|
78
|
+
var ConsentComponentCustom = dynamic(() => import("./ConsentCustom-ADJKXZV7.js"), { ssr: false });
|
81
79
|
var AnalyticsNext = ({
|
82
80
|
router,
|
83
81
|
attributes,
|
@@ -180,8 +178,8 @@ var AnalyticsHandle2 = ({ location, history, children }) => {
|
|
180
178
|
var handle_default2 = AnalyticsHandle2;
|
181
179
|
|
182
180
|
// src/AnalyticsReact/index.tsx
|
183
|
-
var ConsentComponent2 = React4.lazy(() => import("./Consent-
|
184
|
-
var ConsentComponentCustom2 = React4.lazy(() => import("./ConsentCustom-
|
181
|
+
var ConsentComponent2 = React4.lazy(() => import("./Consent-VKKGBHOL.js"));
|
182
|
+
var ConsentComponentCustom2 = React4.lazy(() => import("./ConsentCustom-ADJKXZV7.js"));
|
185
183
|
var AnalyticsReact = ({
|
186
184
|
location,
|
187
185
|
history,
|
@@ -241,6 +239,7 @@ var AnalyticsReact_default = AnalyticsReact;
|
|
241
239
|
// src/Components/OptInConsent.tsx
|
242
240
|
import React5, { useEffect as useEffect5, useState as useState4 } from "react";
|
243
241
|
import { Button, Form } from "react-bootstrap";
|
242
|
+
var endpoint = typeof window !== "undefined" && window["aesirx1stparty"] ? window["aesirx1stparty"] : process?.env?.NEXT_PUBLIC_ENDPOINT_ANALYTICS_URL ? process?.env?.NEXT_PUBLIC_ENDPOINT_ANALYTICS_URL : process?.env?.REACT_APP_ENDPOINT_ANALYTICS_URL ? process?.env?.REACT_APP_ENDPOINT_ANALYTICS_URL : "";
|
244
243
|
var OptInConsent = ({
|
245
244
|
optInConsentData = window?.optInConsentData ? JSON.parse(window?.optInConsentData) : []
|
246
245
|
}) => {
|
@@ -277,7 +276,8 @@ var OptInConsent = ({
|
|
277
276
|
"img",
|
278
277
|
{
|
279
278
|
className: "cover-img position-absolute h-100 w-100 object-fit-cover",
|
280
|
-
src: bg_default
|
279
|
+
src: bg_default,
|
280
|
+
alt: "Background Image"
|
281
281
|
}
|
282
282
|
), /* @__PURE__ */ React5.createElement(
|
283
283
|
"div",
|
@@ -287,8 +287,8 @@ var OptInConsent = ({
|
|
287
287
|
setShowExpandRevoke(true);
|
288
288
|
}
|
289
289
|
},
|
290
|
-
/* @__PURE__ */ React5.createElement("img", { src: privacy_default, alt: "
|
291
|
-
t("txt_shield_of_privacy")
|
290
|
+
/* @__PURE__ */ React5.createElement("img", { src: privacy_default, alt: "SoP Icon" }),
|
291
|
+
window?.aesirx_analytics_translate?.txt_shield_of_privacy ?? t("txt_shield_of_privacy")
|
292
292
|
)),
|
293
293
|
showExpandRevoke && /* @__PURE__ */ React5.createElement(React5.Fragment, null, /* @__PURE__ */ React5.createElement(
|
294
294
|
"div",
|
@@ -298,7 +298,7 @@ var OptInConsent = ({
|
|
298
298
|
borderBottom: "1px solid #DEDEDE"
|
299
299
|
}
|
300
300
|
},
|
301
|
-
/* @__PURE__ */ React5.createElement("div", { className: "text-primary text-nowrap" }, t("txt_tracking_data_privacy")),
|
301
|
+
/* @__PURE__ */ React5.createElement("div", { className: "text-primary text-nowrap" }, window?.aesirx_analytics_translate?.txt_tracking_data_privacy ?? t("txt_tracking_data_privacy")),
|
302
302
|
/* @__PURE__ */ React5.createElement("div", { className: "d-flex align-items-center fs-14 text-primary" }, /* @__PURE__ */ React5.createElement(
|
303
303
|
"a",
|
304
304
|
{
|
@@ -311,10 +311,11 @@ var OptInConsent = ({
|
|
311
311
|
"img",
|
312
312
|
{
|
313
313
|
className: "cover-img position-absolute h-100 w-100 object-fit-cover z-1",
|
314
|
-
src: bg_default
|
314
|
+
src: bg_default,
|
315
|
+
alt: "Background Image"
|
315
316
|
}
|
316
317
|
),
|
317
|
-
/* @__PURE__ */ React5.createElement("div", { className: "minimize-shield position-relative z-2 py-2" }, /* @__PURE__ */ React5.createElement("img", { src: privacy_default, alt: "
|
318
|
+
/* @__PURE__ */ React5.createElement("div", { className: "minimize-shield position-relative z-2 py-2" }, /* @__PURE__ */ React5.createElement("img", { src: privacy_default, alt: "SoP Icon" }), window?.aesirx_analytics_translate?.txt_shield_of_privacy ?? t("txt_shield_of_privacy"))
|
318
319
|
))
|
319
320
|
), /* @__PURE__ */ React5.createElement(
|
320
321
|
"div",
|
@@ -324,8 +325,8 @@ var OptInConsent = ({
|
|
324
325
|
setShowExpandRevoke(false);
|
325
326
|
}
|
326
327
|
},
|
327
|
-
/* @__PURE__ */ React5.createElement("img", { src: no_default })
|
328
|
-
), /* @__PURE__ */ React5.createElement("div", { className: "p-3 bg-white" }, t("txt_you_can_revoke")), /* @__PURE__ */ React5.createElement(Form, { className: "mb-0 w-100 bg-white px-3" }, optInRevokes?.map((item, key) => {
|
328
|
+
/* @__PURE__ */ React5.createElement("img", { src: no_default, alt: "No Icon" })
|
329
|
+
), /* @__PURE__ */ React5.createElement("div", { className: "p-3 bg-white" }, window?.aesirx_analytics_translate?.txt_you_can_revoke ?? t("txt_you_can_revoke")), /* @__PURE__ */ React5.createElement(Form, { className: "mb-0 w-100 bg-white px-3" }, optInRevokes?.map((item, key) => {
|
329
330
|
return /* @__PURE__ */ React5.createElement(
|
330
331
|
Form.Check,
|
331
332
|
{
|
@@ -333,7 +334,7 @@ var OptInConsent = ({
|
|
333
334
|
id: `option-revoke-${item}`,
|
334
335
|
checked: revokeConsentOption === item,
|
335
336
|
type: "checkbox",
|
336
|
-
label: item === "aesirx-analytics-optin-default" ? t("txt_revoke_opt_in") : t("txt_revoke_opt_in") + " " + item?.replace("aesirx-analytics-optin-", ""),
|
337
|
+
label: item === "aesirx-analytics-optin-default" ? window?.aesirx_analytics_translate?.txt_revoke_opt_in ?? t("txt_revoke_opt_in") : window?.aesirx_analytics_translate?.txt_revoke_opt_in ?? t("txt_revoke_opt_in") + " " + item?.replace("aesirx-analytics-optin-", ""),
|
337
338
|
value: item,
|
338
339
|
onChange: ({ target: { value } }) => {
|
339
340
|
setRevokeConsentOption(value);
|
@@ -348,7 +349,7 @@ var OptInConsent = ({
|
|
348
349
|
target: "_blank",
|
349
350
|
rel: "noreferrer"
|
350
351
|
},
|
351
|
-
t("txt_manage_consent")
|
352
|
+
window?.aesirx_analytics_translate?.txt_manage_consent ?? t("txt_manage_consent")
|
352
353
|
), /* @__PURE__ */ React5.createElement(
|
353
354
|
Button,
|
354
355
|
{
|
@@ -366,7 +367,7 @@ var OptInConsent = ({
|
|
366
367
|
},
|
367
368
|
className: "d-flex align-items-center justify-content-center w-100 w-lg-35 revoke-btn fs-14 rounded-pill py-2 py-lg-3"
|
368
369
|
},
|
369
|
-
t("txt_revoke_consent")
|
370
|
+
window?.aesirx_analytics_translate?.txt_revoke_consent ?? t("txt_revoke_consent")
|
370
371
|
))))))
|
371
372
|
))
|
372
373
|
)
|
@@ -390,6 +391,12 @@ var OptIntConsentDetail = ({ optIn, setShowRevoke }) => {
|
|
390
391
|
optIn?.handleConsent && optIn?.handleConsent();
|
391
392
|
window?.funcAfterOptInConsent && window.funcAfterOptInConsent();
|
392
393
|
window?.optInConsentData && document.querySelector(`.opt-in-consent.${optIn?.title}`).classList.remove("show");
|
394
|
+
const hostUrl = endpoint ? endpoint : "";
|
395
|
+
const root = hostUrl ? hostUrl.replace(/\/$/, "") : "";
|
396
|
+
root && trackEvent(root, "", {
|
397
|
+
event_name: "Opt-in consent",
|
398
|
+
event_type: "opt-in-consent"
|
399
|
+
});
|
393
400
|
};
|
394
401
|
const handleClose = () => {
|
395
402
|
setShow(false);
|
@@ -441,7 +448,8 @@ var OptIntConsentDetail = ({ optIn, setShowRevoke }) => {
|
|
441
448
|
"img",
|
442
449
|
{
|
443
450
|
className: "cover-img position-absolute h-100 w-100 object-fit-cover",
|
444
|
-
src: bg_default
|
451
|
+
src: bg_default,
|
452
|
+
alt: "Background Image"
|
445
453
|
}
|
446
454
|
), /* @__PURE__ */ React5.createElement(
|
447
455
|
"div",
|
@@ -453,8 +461,8 @@ var OptIntConsentDetail = ({ optIn, setShowRevoke }) => {
|
|
453
461
|
sessionStorage.removeItem("aesirx-analytics-rejected");
|
454
462
|
}
|
455
463
|
},
|
456
|
-
/* @__PURE__ */ React5.createElement("img", { src: privacy_default, alt: "
|
457
|
-
t("txt_shield_of_privacy")
|
464
|
+
/* @__PURE__ */ React5.createElement("img", { src: privacy_default, alt: "SoP Icon" }),
|
465
|
+
window?.aesirx_analytics_translate?.txt_shield_of_privacy ?? t("txt_shield_of_privacy")
|
458
466
|
))) : /* @__PURE__ */ React5.createElement("div", { className: "bg-white" }, /* @__PURE__ */ React5.createElement(
|
459
467
|
"div",
|
460
468
|
{
|
@@ -463,7 +471,7 @@ var OptIntConsentDetail = ({ optIn, setShowRevoke }) => {
|
|
463
471
|
borderBottom: "1px solid #DEDEDE"
|
464
472
|
}
|
465
473
|
},
|
466
|
-
/* @__PURE__ */ React5.createElement("div", { className: "text-primary text-nowrap" }, t("txt_tracking_data_privacy")),
|
474
|
+
/* @__PURE__ */ React5.createElement("div", { className: "text-primary text-nowrap" }, window?.aesirx_analytics_translate?.txt_tracking_data_privacy ?? t("txt_tracking_data_privacy")),
|
467
475
|
/* @__PURE__ */ React5.createElement("div", { className: "d-flex align-items-center fs-14 text-primary" }, /* @__PURE__ */ React5.createElement(
|
468
476
|
"a",
|
469
477
|
{
|
@@ -476,10 +484,11 @@ var OptIntConsentDetail = ({ optIn, setShowRevoke }) => {
|
|
476
484
|
"img",
|
477
485
|
{
|
478
486
|
className: "cover-img position-absolute h-100 w-100 object-fit-cover z-1",
|
479
|
-
src: bg_default
|
487
|
+
src: bg_default,
|
488
|
+
alt: "Background Image"
|
480
489
|
}
|
481
490
|
),
|
482
|
-
/* @__PURE__ */ React5.createElement("div", { className: "minimize-shield position-relative z-2 py-2" }, /* @__PURE__ */ React5.createElement("img", { src: privacy_default, alt: "
|
491
|
+
/* @__PURE__ */ React5.createElement("div", { className: "minimize-shield position-relative z-2 py-2" }, /* @__PURE__ */ React5.createElement("img", { src: privacy_default, alt: "SoP Icon" }), window?.aesirx_analytics_translate?.txt_shield_of_privacy ?? t("txt_shield_of_privacy"))
|
483
492
|
))
|
484
493
|
), /* @__PURE__ */ React5.createElement("div", { className: "p-4 pt-3 pb-0 bg-white" }, /* @__PURE__ */ React5.createElement(
|
485
494
|
"div",
|
@@ -495,7 +504,7 @@ var OptIntConsentDetail = ({ optIn, setShowRevoke }) => {
|
|
495
504
|
variant: "outline-success",
|
496
505
|
className: "border-2 fs-7 fw-bold text-primary rounded-pill"
|
497
506
|
},
|
498
|
-
t("txt_reject_consent")
|
507
|
+
window?.aesirx_analytics_translate?.txt_reject_consent ?? t("txt_reject_consent")
|
499
508
|
), /* @__PURE__ */ React5.createElement(
|
500
509
|
Button,
|
501
510
|
{
|
@@ -503,7 +512,7 @@ var OptIntConsentDetail = ({ optIn, setShowRevoke }) => {
|
|
503
512
|
variant: "outline-success",
|
504
513
|
className: "border-2 fs-7 fw-bold text-primary rounded-pill"
|
505
514
|
},
|
506
|
-
t("txt_yes_i_consent")
|
515
|
+
window?.aesirx_analytics_translate?.txt_yes_i_consent ?? t("txt_yes_i_consent")
|
507
516
|
))))))
|
508
517
|
)
|
509
518
|
)
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "aesirx-analytics",
|
3
|
-
"version": "2.
|
3
|
+
"version": "2.3.0",
|
4
4
|
"license": "GPL-3.0-only",
|
5
5
|
"author": "AesirX",
|
6
6
|
"repository": "https://gitlab.redweb.dk/aesirx/analytics",
|
@@ -9,13 +9,13 @@
|
|
9
9
|
"types": "dist/index.d.ts",
|
10
10
|
"type": "module",
|
11
11
|
"dependencies": {
|
12
|
-
"@concordium/browser-wallet-api-helpers": "
|
13
|
-
"@concordium/react-components": "
|
14
|
-
"@concordium/web-sdk": "
|
12
|
+
"@concordium/browser-wallet-api-helpers": "3.0.1",
|
13
|
+
"@concordium/react-components": "0.4.0-rc.7",
|
14
|
+
"@concordium/web-sdk": "7.0.4-rc.3",
|
15
15
|
"@web3modal/ethereum": "^2.7.0",
|
16
16
|
"@web3modal/react": "^2.7.0",
|
17
|
-
"aesirx-sso": "^1.4.
|
18
|
-
"axios": "^1.
|
17
|
+
"aesirx-sso": "^1.4.18",
|
18
|
+
"axios": "^1.7.4",
|
19
19
|
"bootstrap": "^5.3.2",
|
20
20
|
"bowser": "^2.11.0",
|
21
21
|
"buffer": "^6.0.3",
|
@@ -23,13 +23,14 @@
|
|
23
23
|
"i18next": "^23.6.0",
|
24
24
|
"i18next-browser-languagedetector": "^7.2.1",
|
25
25
|
"murmurhash-js": "^1.0.0",
|
26
|
-
"next": "^14.
|
26
|
+
"next": "^14.2.10",
|
27
27
|
"query-string": "^7.1.1",
|
28
28
|
"react": "^18.3.1",
|
29
29
|
"react-bootstrap": "^2.8.0",
|
30
30
|
"react-content-loader": "^7.0.0",
|
31
31
|
"react-device-detect": "^2.2.3",
|
32
32
|
"react-dom": "18",
|
33
|
+
"react-select": "^5.8.0",
|
33
34
|
"react-toastify": "^9.1.3",
|
34
35
|
"wagmi": "^1.3.2"
|
35
36
|
},
|
@@ -87,12 +88,17 @@
|
|
87
88
|
"react-i18next": "^13.1.2",
|
88
89
|
"ts-jest": "^29.0.5",
|
89
90
|
"tsup": "^7.2.0",
|
90
|
-
"typescript": "
|
91
|
+
"typescript": "5.1.6"
|
91
92
|
},
|
92
93
|
"files": [
|
93
94
|
"dist"
|
94
95
|
],
|
95
96
|
"resolutions": {
|
96
|
-
"postcss": "^8"
|
97
|
+
"postcss": "^8",
|
98
|
+
"ws": "8.17.1",
|
99
|
+
"@walletconnect/core": "2.9.1",
|
100
|
+
"@walletconnect/types": "2.9.1",
|
101
|
+
"@walletconnect/sign-client": "2.9.1",
|
102
|
+
"rollup": "3.29.5"
|
97
103
|
}
|
98
104
|
}
|