aesirx-analytics 2.2.21 → 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.
@@ -7,7 +7,7 @@ import {
7
7
  WALLET_CONNECT,
8
8
  getWeb3ID,
9
9
  useConsentStatus_default
10
- } from "./chunk-AS3MN6ER.js";
10
+ } from "./chunk-IAQD6GXT.js";
11
11
  import {
12
12
  AnalyticsContext,
13
13
  agreeConsents,
@@ -24,12 +24,12 @@ import {
24
24
  revokeConsents,
25
25
  useTranslation,
26
26
  verifySignature
27
- } from "./chunk-NTEWP6UQ.js";
27
+ } from "./chunk-NKOHXSTE.js";
28
28
 
29
29
  // src/Components/Consent.tsx
30
30
  import React, { Suspense, useContext, useEffect, useState } from "react";
31
31
  import { Button, Form } from "react-bootstrap";
32
- import { ToastContainer, toast } from "react-toastify";
32
+ import { toast } from "react-toastify";
33
33
 
34
34
  // src/Assets/yes.svg
35
35
  var yes_default = 'data:image/svg+xml,<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">%0A<path d="M9 1C7.41775 1 5.87103 1.46919 4.55544 2.34824C3.23985 3.22729 2.21447 4.47672 1.60897 5.93853C1.00347 7.40034 0.84504 9.00887 1.15372 10.5607C1.4624 12.1126 2.22433 13.538 3.34315 14.6569C4.46197 15.7757 5.88743 16.5376 7.43928 16.8463C8.99113 17.155 10.5997 16.9965 12.0615 16.391C13.5233 15.7855 14.7727 14.7602 15.6518 13.4446C16.5308 12.129 17 10.5823 17 9C17 6.87827 16.1571 4.84344 14.6569 3.34315C13.1566 1.84285 11.1217 1 9 1V1ZM9 16C7.61553 16 6.26216 15.5895 5.11101 14.8203C3.95987 14.0511 3.06266 12.9579 2.53285 11.6788C2.00303 10.3997 1.86441 8.99223 2.13451 7.63437C2.4046 6.2765 3.07129 5.02922 4.05026 4.05025C5.02922 3.07128 6.2765 2.4046 7.63437 2.1345C8.99224 1.86441 10.3997 2.00303 11.6788 2.53284C12.9579 3.06266 14.0511 3.95986 14.8203 5.11101C15.5895 6.26215 16 7.61553 16 9C16 10.8565 15.2625 12.637 13.9498 13.9497C12.637 15.2625 10.8565 16 9 16Z" fill="white"/>%0A<path d="M13.9985 6.04969C13.9048 5.95657 13.7781 5.9043 13.646 5.9043C13.5139 5.9043 13.3872 5.95657 13.2935 6.04969L7.7435 11.5747L4.7435 8.57469C4.652 8.4759 4.52501 8.4175 4.39045 8.41234C4.25589 8.40719 4.1248 8.45569 4.026 8.54719C3.92721 8.63869 3.86881 8.76569 3.86365 8.90025C3.8585 9.03481 3.907 9.1659 3.9985 9.26469L7.7435 12.9997L13.9985 6.75969C14.0454 6.71321 14.0826 6.65791 14.108 6.59698C14.1333 6.53605 14.1464 6.4707 14.1464 6.40469C14.1464 6.33869 14.1333 6.27333 14.108 6.21241C14.0826 6.15148 14.0454 6.09618 13.9985 6.04969Z" fill="white"/>%0A</svg>%0A';
@@ -599,7 +599,7 @@ var ConsentComponentApp = (props) => {
599
599
  (gtagId || gtmId) && loadConsentDefault(gtagId, gtmId);
600
600
  }, [layout]);
601
601
  console.log("level", uuid, level, web3ID, account, loading);
602
- return /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement(ToastContainer, null), /* @__PURE__ */ React.createElement("div", { className: `offcanvas-backdrop fade ${showBackdrop && show ? "show" : "d-none"}` }), /* @__PURE__ */ React.createElement(
602
+ return /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("div", { className: `offcanvas-backdrop fade ${showBackdrop && show ? "show" : "d-none"}` }), /* @__PURE__ */ React.createElement(
603
603
  "div",
604
604
  {
605
605
  tabIndex: -1,
@@ -1,9 +1,7 @@
1
- import {
2
- trackEvent
3
- } from "./chunk-YOHHSMUP.js";
4
1
  import {
5
2
  BROWSER_WALLET,
6
3
  Connect_default,
4
+ ConsentHeader_default,
7
5
  Ethereum_default,
8
6
  LoadingStatus,
9
7
  TermsComponent,
@@ -11,7 +9,7 @@ import {
11
9
  check_circle_default,
12
10
  getWeb3ID,
13
11
  useConsentStatus_default
14
- } from "./chunk-AS3MN6ER.js";
12
+ } from "./chunk-IAQD6GXT.js";
15
13
  import {
16
14
  AnalyticsContext,
17
15
  agreeConsents,
@@ -26,14 +24,15 @@ import {
26
24
  no_default,
27
25
  privacy_default,
28
26
  revokeConsents,
27
+ trackEvent,
29
28
  useTranslation,
30
29
  verifySignature
31
- } from "./chunk-NTEWP6UQ.js";
30
+ } from "./chunk-NKOHXSTE.js";
32
31
 
33
32
  // src/Components/ConsentCustom.tsx
34
33
  import React, { Suspense, useContext, useEffect, useState } from "react";
35
34
  import { Button, Col, Form, Row } from "react-bootstrap";
36
- import { ToastContainer, toast } from "react-toastify";
35
+ import { toast } from "react-toastify";
37
36
 
38
37
  // src/Assets/checkbox.svg
39
38
  var checkbox_default = 'data:image/svg+xml,<svg width="23" height="23" viewBox="0 0 23 23" fill="none" xmlns="http://www.w3.org/2000/svg">%0A<circle cx="11.5" cy="11.5" r="10.5" stroke="%23DEDEDE" stroke-width="2"/>%0A</svg>%0A';
@@ -73,7 +72,8 @@ var ConsentComponentCustom = ({
73
72
  gtmId,
74
73
  layout,
75
74
  isOptInReplaceAnalytics,
76
- customConsentText
75
+ customConsentText,
76
+ languageSwitcher
77
77
  }) => {
78
78
  return /* @__PURE__ */ React.createElement(React.Fragment, null, !isOptInReplaceAnalytics ? /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(WithWalletConnector, { network: networkEnv === "testnet" ? TESTNET : MAINNET }, (props) => /* @__PURE__ */ React.createElement(
79
79
  ConsentComponentCustomWrapper,
@@ -86,7 +86,8 @@ var ConsentComponentCustom = ({
86
86
  gtagId,
87
87
  gtmId,
88
88
  layout,
89
- customConsentText
89
+ customConsentText,
90
+ languageSwitcher
90
91
  }
91
92
  ))) : /* @__PURE__ */ React.createElement(React.Fragment, null));
92
93
  };
@@ -116,6 +117,7 @@ var ConsentComponentCustomWrapper = (props) => {
116
117
  gtmId: props?.gtmId,
117
118
  layout: props?.layout,
118
119
  customConsentText: props?.customConsentText,
120
+ languageSwitcher: props?.languageSwitcher,
119
121
  uuid,
120
122
  level,
121
123
  connection,
@@ -140,6 +142,7 @@ var ConsentComponentCustomApp = (props) => {
140
142
  gtmId,
141
143
  layout,
142
144
  customConsentText,
145
+ languageSwitcher,
143
146
  activeConnectorType,
144
147
  activeConnector,
145
148
  activeConnectorError,
@@ -237,8 +240,7 @@ var ConsentComponentCustomApp = (props) => {
237
240
  jwt,
238
241
  "metamask",
239
242
  gtagId,
240
- gtmId,
241
- layout
243
+ gtmId
242
244
  );
243
245
  sessionStorage.setItem("aesirx-analytics-uuid", uuid);
244
246
  sessionStorage.setItem("aesirx-analytics-allow", "1");
@@ -327,8 +329,7 @@ var ConsentComponentCustomApp = (props) => {
327
329
  jwt,
328
330
  "concordium",
329
331
  gtagId,
330
- gtmId,
331
- layout
332
+ gtmId
332
333
  );
333
334
  sessionStorage.setItem("aesirx-analytics-consent-type", "concordium");
334
335
  setUpgradeLayout(false);
@@ -363,8 +364,7 @@ var ConsentComponentCustomApp = (props) => {
363
364
  null,
364
365
  null,
365
366
  gtagId,
366
- gtmId,
367
- layout
367
+ gtmId
368
368
  );
369
369
  } else if (!!existConsent?.consent_uuid && existConsent?.expiration && new Date(existConsent.expiration) < /* @__PURE__ */ new Date()) {
370
370
  await agreeConsents(
@@ -378,8 +378,7 @@ var ConsentComponentCustomApp = (props) => {
378
378
  null,
379
379
  null,
380
380
  gtagId,
381
- gtmId,
382
- layout
381
+ gtmId
383
382
  );
384
383
  }
385
384
  });
@@ -443,8 +442,7 @@ var ConsentComponentCustomApp = (props) => {
443
442
  response?.jwt,
444
443
  "concordium",
445
444
  gtagId,
446
- gtmId,
447
- layout
445
+ gtmId
448
446
  );
449
447
  setShow(false);
450
448
  handleRevoke(true, level);
@@ -498,8 +496,7 @@ var ConsentComponentCustomApp = (props) => {
498
496
  response?.jwt,
499
497
  "concordium",
500
498
  gtagId,
501
- gtmId,
502
- layout
499
+ gtmId
503
500
  );
504
501
  setShow(false);
505
502
  handleRevoke(true, level);
@@ -705,7 +702,7 @@ var ConsentComponentCustomApp = (props) => {
705
702
  };
706
703
  const paymentRevoke = sessionStorage.getItem("aesirx-analytics-opt-payment");
707
704
  const optInRevokes = Object.keys(sessionStorage).filter((key) => key.startsWith("aesirx-analytics-optin")).map((key) => key);
708
- return /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement(ToastContainer, null), /* @__PURE__ */ React.createElement("div", { className: `offcanvas-backdrop fade ${showBackdrop && show ? "show" : "d-none"}` }), /* @__PURE__ */ React.createElement(
705
+ return /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("div", { className: `offcanvas-backdrop fade ${showBackdrop && show ? "show" : "d-none"}` }), /* @__PURE__ */ React.createElement(
709
706
  "div",
710
707
  {
711
708
  tabIndex: -1,
@@ -743,34 +740,7 @@ var ConsentComponentCustomApp = (props) => {
743
740
  /* @__PURE__ */ React.createElement("img", { src: privacy_default, alt: "SoP Icon" }),
744
741
  window?.aesirx_analytics_translate?.txt_shield_of_privacy ?? t("txt_shield_of_privacy")
745
742
  )),
746
- showExpandRevoke && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
747
- "div",
748
- {
749
- className: `d-flex rounded-top align-items-center justify-content-between p-2 p-lg-3 fw-medium flex-wrap py-2 py-lg-3 px-4 header-consent-bg`,
750
- style: {
751
- borderBottom: "1px solid #DEDEDE"
752
- }
753
- },
754
- /* @__PURE__ */ React.createElement("div", { className: "text-primary text-nowrap" }, window?.aesirx_analytics_translate?.txt_tracking_data_privacy ?? t("txt_tracking_data_privacy")),
755
- /* @__PURE__ */ React.createElement("div", { className: "d-flex align-items-center fs-14 text-primary" }, /* @__PURE__ */ React.createElement(
756
- "a",
757
- {
758
- href: "https://shield.aesirx.io/",
759
- rel: "noreferrer",
760
- target: "_blank",
761
- className: "minimize-shield-wrapper position-relative text-decoration-none"
762
- },
763
- /* @__PURE__ */ React.createElement(
764
- "img",
765
- {
766
- className: "cover-img position-absolute h-100 w-100 object-fit-cover z-1",
767
- src: bg_default,
768
- alt: "Background Image"
769
- }
770
- ),
771
- /* @__PURE__ */ React.createElement("div", { className: "minimize-shield position-relative z-2 py-2" }, /* @__PURE__ */ React.createElement("img", { src: privacy_default, alt: "SoP Icon" }), window?.aesirx_analytics_translate?.txt_shield_of_privacy ?? t("txt_shield_of_privacy"))
772
- ))
773
- ), /* @__PURE__ */ React.createElement(
743
+ showExpandRevoke && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(ConsentHeader_default, { languageSwitcher }), /* @__PURE__ */ React.createElement(
774
744
  "div",
775
745
  {
776
746
  className: "minimize-revoke",
@@ -1029,7 +999,8 @@ var ConsentComponentCustomApp = (props) => {
1029
999
  handleLevel,
1030
1000
  isCustom: true,
1031
1001
  layout,
1032
- isRejectedLayout: true
1002
+ isRejectedLayout: true,
1003
+ languageSwitcher
1033
1004
  },
1034
1005
  /* @__PURE__ */ React.createElement(Form, { className: "mb-0 w-100" }, /* @__PURE__ */ React.createElement(
1035
1006
  Form.Check,
@@ -1093,7 +1064,8 @@ var ConsentComponentCustomApp = (props) => {
1093
1064
  handleLevel,
1094
1065
  isCustom: true,
1095
1066
  layout,
1096
- customConsentText
1067
+ customConsentText,
1068
+ languageSwitcher
1097
1069
  },
1098
1070
  /* @__PURE__ */ React.createElement(Form, { className: "mb-0 w-100" }, /* @__PURE__ */ React.createElement(
1099
1071
  Form.Check,