aesirx-analytics 2.0.0 → 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  AnalyticsContext,
3
3
  AnalyticsContextProvider_default
4
- } from "./chunk-JQ6CXYV4.js";
4
+ } from "./chunk-RN267RCX.js";
5
5
 
6
6
  // src/AnalyticsNext/index.tsx
7
7
  import React2 from "react";
@@ -217,9 +217,9 @@ var handle_default = AnalyticsHandle;
217
217
 
218
218
  // src/AnalyticsNext/index.tsx
219
219
  import dynamic from "next/dynamic";
220
- var ConsentComponent = dynamic(() => import("./Consent-7KHERFGJ.js"), { ssr: false });
220
+ var ConsentComponent = dynamic(() => import("./Consent-OBULXA4M.js"), { ssr: false });
221
221
  var AnalyticsNext = ({ router, children }) => {
222
- return /* @__PURE__ */ React2.createElement(React2.Fragment, null, /* @__PURE__ */ React2.createElement(AnalyticsContextProvider_default, null, /* @__PURE__ */ React2.createElement(handle_default, { router }, children, /* @__PURE__ */ React2.createElement(ConsentComponent, { endpoint: process.env.NEXT_PUBLIC_ENDPOINT_ANALYTICS_URL }))));
222
+ return /* @__PURE__ */ React2.createElement(React2.Fragment, null, /* @__PURE__ */ React2.createElement(AnalyticsContextProvider_default, null, /* @__PURE__ */ React2.createElement(handle_default, { router }, children, process.env.NEXT_PUBLIC_DISABLE_ANALYTICS_CONSENT !== "true" && /* @__PURE__ */ React2.createElement(ConsentComponent, { endpoint: process.env.NEXT_PUBLIC_ENDPOINT_ANALYTICS_URL }))));
223
223
  };
224
224
  var AnalyticsNext_default = AnalyticsNext;
225
225
 
@@ -263,9 +263,9 @@ var AnalyticsHandle2 = ({ location, history, children }) => {
263
263
  var handle_default2 = AnalyticsHandle2;
264
264
 
265
265
  // src/AnalyticsReact/index.tsx
266
- var ConsentComponent2 = React4.lazy(() => import("./Consent-7KHERFGJ.js"));
266
+ var ConsentComponent2 = React4.lazy(() => import("./Consent-OBULXA4M.js"));
267
267
  var AnalyticsReact = ({ location, history, children }) => {
268
- return /* @__PURE__ */ React4.createElement(AnalyticsContextProvider_default, null, /* @__PURE__ */ React4.createElement(handle_default2, { location, history }, children, /* @__PURE__ */ React4.createElement(Suspense, { fallback: /* @__PURE__ */ React4.createElement(React4.Fragment, null) }, /* @__PURE__ */ React4.createElement(ConsentComponent2, { endpoint: process.env.REACT_APP_ENDPOINT_ANALYTICS_URL }))));
268
+ 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) }, /* @__PURE__ */ React4.createElement(ConsentComponent2, { endpoint: process.env.REACT_APP_ENDPOINT_ANALYTICS_URL }))));
269
269
  };
270
270
  var AnalyticsReact_default = AnalyticsReact;
271
271
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aesirx-analytics",
3
- "version": "2.0.0",
3
+ "version": "2.1.0",
4
4
  "license": "GPL-3.0-only",
5
5
  "author": "AesirX",
6
6
  "repository": "https://gitlab.redweb.dk/aesirx/analytics",
@@ -10,18 +10,22 @@
10
10
  "type": "module",
11
11
  "dependencies": {
12
12
  "@concordium/browser-wallet-api-helpers": "^2",
13
+ "@concordium/react-components": "^0.3.0",
13
14
  "@concordium/web-sdk": "^6",
14
- "@fingerprintjs/fingerprintjs": "^3.4.2",
15
- "aesirx-sso": "^1.1.1",
15
+ "@fingerprintjs/fingerprintjs": "^4.0.1",
16
+ "aesirx-sso": "^1.2.1",
16
17
  "axios": "^1.4.0",
17
18
  "bootstrap": "^5.3.0",
18
19
  "bowser": "^2.11.0",
19
20
  "buffer": "^6.0.3",
20
- "next": "12",
21
+ "i18next": "^23.4.4",
22
+ "i18next-browser-languagedetector": "^7.1.0",
23
+ "next": "^13.4.19",
21
24
  "query-string": "^7.1.1",
22
- "react": "18",
25
+ "react": "^18.2.0",
23
26
  "react-bootstrap": "^2.8.0",
24
27
  "react-content-loader": "^6.2.1",
28
+ "react-device-detect": "^2.2.3",
25
29
  "react-dom": "18",
26
30
  "react-toastify": "^9.1.3"
27
31
  },
@@ -64,6 +68,7 @@
64
68
  "@types/react-dom": "^18.2.4",
65
69
  "@typescript-eslint/eslint-plugin": "^5.57.0",
66
70
  "@typescript-eslint/parser": "^5.57.0",
71
+ "@walletconnect/types": "^2.9.1",
67
72
  "dotenv": "^16.0.3",
68
73
  "esbuild-plugin-inline-image": "^0.0.9",
69
74
  "esbuild-sass-plugin": "^2.10.0",
@@ -74,8 +79,9 @@
74
79
  "jest-environment-jsdom": "^29.4.3",
75
80
  "node-fetch": "^3.3.1",
76
81
  "prettier": "^2.8.4",
82
+ "react-i18next": "^13.1.2",
77
83
  "ts-jest": "^29.0.5",
78
- "tsup": "^6.7.0",
84
+ "tsup": "^7.2.0",
79
85
  "typescript": "^5.0.3"
80
86
  },
81
87
  "files": [
@@ -1,34 +0,0 @@
1
- // src/utils/AnalyticsContextProvider.tsx
2
- import React, { useState } from "react";
3
- var AnalyticsContext = React.createContext({
4
- event_uuid: void 0,
5
- visitor_uuid: void 0,
6
- setEventID: void 0,
7
- setUUID: void 0
8
- });
9
- var AnalyticsContextProvider = ({ children }) => {
10
- const [eventID, setEventID] = useState();
11
- const [UUID, setUUID] = useState();
12
- return /* @__PURE__ */ React.createElement(
13
- AnalyticsContext.Provider,
14
- {
15
- value: {
16
- event_uuid: eventID,
17
- visitor_uuid: UUID,
18
- setEventID,
19
- setUUID
20
- }
21
- },
22
- children
23
- );
24
- };
25
- var AnalyticsContextProvider_default = AnalyticsContextProvider;
26
-
27
- export {
28
- AnalyticsContext,
29
- AnalyticsContextProvider_default
30
- };
31
- /*
32
- * @copyright Copyright (C) 2022 AesirX. All rights reserved.
33
- * @license GNU General Public License version 3, see LICENSE.
34
- */