strapi-plugin-matomo 1.0.1 → 1.1.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.
@@ -2,7 +2,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { Page } from "@strapi/strapi/admin";
3
3
  import { Routes, Route } from "react-router-dom";
4
4
  import { Suspense, lazy } from "react";
5
- const Dashboard = lazy(() => import("./Dashboard-CBCcLNJi.mjs"));
5
+ const Dashboard = lazy(() => import("./Dashboard-CYss1z6R.mjs"));
6
6
  const HomePage = () => {
7
7
  return /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Page.Loading, {}), children: /* @__PURE__ */ jsx(Dashboard, {}) });
8
8
  };
@@ -4,7 +4,7 @@ const jsxRuntime = require("react/jsx-runtime");
4
4
  const admin = require("@strapi/strapi/admin");
5
5
  const reactRouterDom = require("react-router-dom");
6
6
  const react = require("react");
7
- const Dashboard = react.lazy(() => Promise.resolve().then(() => require("./Dashboard-D_U2f9RI.js")));
7
+ const Dashboard = react.lazy(() => Promise.resolve().then(() => require("./Dashboard-B3Fux96c.js")));
8
8
  const HomePage = () => {
9
9
  return /* @__PURE__ */ jsxRuntime.jsx(react.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(admin.Page.Loading, {}), children: /* @__PURE__ */ jsxRuntime.jsx(Dashboard, {}) });
10
10
  };
@@ -9,9 +9,8 @@ const Dashboard = () => {
9
9
  const { get } = admin.useFetchClient();
10
10
  react.useEffect(() => {
11
11
  (async () => {
12
- const res = await get(`/${PLUGIN_ID}/config`);
13
- const config = res.data;
14
- setUrl(config.config.widgetURL);
12
+ const { data } = await get(`/${PLUGIN_ID}/config`);
13
+ setUrl(data.config.widgetURL);
15
14
  })();
16
15
  }, []);
17
16
  return url ? /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
@@ -41,5 +40,5 @@ const Dashboard = () => {
41
40
  ] })
42
41
  ] }) : null;
43
42
  };
44
- const Dashboard$1 = react.memo(Dashboard);
45
- exports.default = Dashboard$1;
43
+ const Dashboard_default = react.memo(Dashboard);
44
+ exports.default = Dashboard_default;
@@ -7,9 +7,8 @@ const Dashboard = () => {
7
7
  const { get } = useFetchClient();
8
8
  useEffect(() => {
9
9
  (async () => {
10
- const res = await get(`/${PLUGIN_ID}/config`);
11
- const config = res.data;
12
- setUrl(config.config.widgetURL);
10
+ const { data } = await get(`/${PLUGIN_ID}/config`);
11
+ setUrl(data.config.widgetURL);
13
12
  })();
14
13
  }, []);
15
14
  return url ? /* @__PURE__ */ jsxs("div", { children: [
@@ -39,7 +38,7 @@ const Dashboard = () => {
39
38
  ] })
40
39
  ] }) : null;
41
40
  };
42
- const Dashboard$1 = memo(Dashboard);
41
+ const Dashboard_default = memo(Dashboard);
43
42
  export {
44
- Dashboard$1 as default
43
+ Dashboard_default as default
45
44
  };
@@ -1,4 +1,5 @@
1
1
  "use strict";
2
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
2
3
  const react = require("react");
3
4
  const jsxRuntime = require("react/jsx-runtime");
4
5
  const __variableDynamicImportRuntimeHelper = (glob, path, segs) => {
@@ -77,7 +78,7 @@ const index = {
77
78
  defaultMessage: "Matomo"
78
79
  },
79
80
  Component: async () => {
80
- const { App } = await Promise.resolve().then(() => require("../_chunks/App-DqSIMJjz.js"));
81
+ const { App } = await Promise.resolve().then(() => require("./App-E7J3rbe-.js"));
81
82
  return App;
82
83
  }
83
84
  });
@@ -92,7 +93,7 @@ const index = {
92
93
  return Promise.all(
93
94
  locales.map(async (locale) => {
94
95
  try {
95
- const { default: data } = await __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "./translations/en.json": () => Promise.resolve().then(() => require("../_chunks/en-B4KWt_jN.js")) }), `./translations/${locale}.json`, 3);
96
+ const { default: data } = await __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "./translations/en.json": () => Promise.resolve().then(() => require("./en-B4KWt_jN.js")) }), `./translations/${locale}.json`, 3);
96
97
  return { data, locale };
97
98
  } catch {
98
99
  return { data: {}, locale };
@@ -101,4 +102,4 @@ const index = {
101
102
  );
102
103
  }
103
104
  };
104
- module.exports = index;
105
+ exports.default = index;
@@ -76,7 +76,7 @@ const index = {
76
76
  defaultMessage: "Matomo"
77
77
  },
78
78
  Component: async () => {
79
- const { App } = await import("../_chunks/App-BUfybguc.mjs");
79
+ const { App } = await import("./App-DFni9nGt.mjs");
80
80
  return App;
81
81
  }
82
82
  });
@@ -91,7 +91,7 @@ const index = {
91
91
  return Promise.all(
92
92
  locales.map(async (locale) => {
93
93
  try {
94
- const { default: data } = await __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "./translations/en.json": () => import("../_chunks/en-Byx4XI2L.mjs") }), `./translations/${locale}.json`, 3);
94
+ const { default: data } = await __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "./translations/en.json": () => import("./en-Byx4XI2L.mjs") }), `./translations/${locale}.json`, 3);
95
95
  return { data, locale };
96
96
  } catch {
97
97
  return { data: {}, locale };
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
- declare const _default: import("react").MemoExoticComponent<() => import("react/jsx-runtime").JSX.Element | null>;
1
+ declare const _default: import('react').MemoExoticComponent<() => import("react").JSX.Element | null>;
3
2
  export default _default;
@@ -1,2 +1,2 @@
1
- declare const PluginIcon: () => import("react/jsx-runtime").JSX.Element;
1
+ declare const PluginIcon: () => import("react").JSX.Element;
2
2
  export { PluginIcon };
@@ -1,2 +1,2 @@
1
- declare const App: () => import("react/jsx-runtime").JSX.Element;
1
+ declare const App: () => import("react").JSX.Element;
2
2
  export { App };
@@ -1,2 +1,2 @@
1
- declare const HomePage: () => import("react/jsx-runtime").JSX.Element;
1
+ declare const HomePage: () => import("react").JSX.Element;
2
2
  export { HomePage };
@@ -1,4 +1,5 @@
1
1
  "use strict";
2
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
2
3
  const bootstrap = ({ strapi }) => {
3
4
  };
4
5
  const destroy = ({ strapi }) => {
@@ -58,4 +59,4 @@ const index = {
58
59
  policies,
59
60
  middlewares
60
61
  };
61
- module.exports = index;
62
+ exports.default = index;
@@ -1,4 +1,4 @@
1
- import type { Core } from '@strapi/strapi';
1
+ import { Core } from '@strapi/strapi';
2
2
  declare const bootstrap: ({ strapi }: {
3
3
  strapi: Core.Strapi;
4
4
  }) => void;
@@ -1,4 +1,4 @@
1
- import type { Core } from '@strapi/strapi';
1
+ import { Core } from '@strapi/strapi';
2
2
  declare const destroy: ({ strapi }: {
3
3
  strapi: Core.Strapi;
4
4
  }) => void;
@@ -1,12 +1,12 @@
1
1
  declare const _default: {
2
2
  register: ({ strapi }: {
3
- strapi: import("@strapi/types/dist/core").Strapi;
3
+ strapi: import('@strapi/types/dist/core').Strapi;
4
4
  }) => void;
5
5
  bootstrap: ({ strapi }: {
6
- strapi: import("@strapi/types/dist/core").Strapi;
6
+ strapi: import('@strapi/types/dist/core').Strapi;
7
7
  }) => void;
8
8
  destroy: ({ strapi }: {
9
- strapi: import("@strapi/types/dist/core").Strapi;
9
+ strapi: import('@strapi/types/dist/core').Strapi;
10
10
  }) => void;
11
11
  controllers: {
12
12
  matomo: {
@@ -20,9 +20,6 @@ declare const _default: {
20
20
  method: string;
21
21
  path: string;
22
22
  handler: string;
23
- /**
24
- * Plugin server methods
25
- */
26
23
  config: {
27
24
  policies: string[];
28
25
  };
@@ -31,9 +28,9 @@ declare const _default: {
31
28
  };
32
29
  services: {
33
30
  config: ({ strapi }: {
34
- strapi: import("@strapi/types/dist/core").Strapi;
31
+ strapi: import('@strapi/types/dist/core').Strapi;
35
32
  }) => {
36
- get(): Promise<import("./config").MatomoPluginConfig>;
33
+ get(): Promise<import('./config').MatomoPluginConfig>;
37
34
  };
38
35
  };
39
36
  contentTypes: {};
@@ -1,4 +1,4 @@
1
- import type { Core } from '@strapi/strapi';
1
+ import { Core } from '@strapi/strapi';
2
2
  declare const register: ({ strapi }: {
3
3
  strapi: Core.Strapi;
4
4
  }) => void;
@@ -1,5 +1,5 @@
1
- import { type Core } from '@strapi/strapi';
2
- import { type MatomoPluginConfig } from '../config';
1
+ import { Core } from '@strapi/strapi';
2
+ import { MatomoPluginConfig } from '../config';
3
3
  export type ConfigService = ReturnType<typeof configService>;
4
4
  declare const configService: ({ strapi }: {
5
5
  strapi: Core.Strapi;
@@ -1,12 +1,12 @@
1
- import { type ConfigService } from './config';
1
+ import { ConfigService } from './config';
2
2
  export interface MatomoServices {
3
3
  config: ConfigService;
4
4
  }
5
5
  declare const _default: {
6
6
  config: ({ strapi }: {
7
- strapi: import("@strapi/types/dist/core").Strapi;
7
+ strapi: import('@strapi/types/dist/core').Strapi;
8
8
  }) => {
9
- get(): Promise<import("../config").MatomoPluginConfig>;
9
+ get(): Promise<import('../config').MatomoPluginConfig>;
10
10
  };
11
11
  };
12
12
  export default _default;
@@ -1,3 +1,3 @@
1
- import { type MatomoServices } from '../services';
2
- declare const getService: <TName extends "config">(name: TName) => MatomoServices[TName];
1
+ import { MatomoServices } from '../services';
2
+ declare const getService: <TName extends keyof MatomoServices>(name: TName) => MatomoServices[TName];
3
3
  export default getService;
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.0.1",
2
+ "version": "1.1.0",
3
3
  "keywords": [],
4
4
  "type": "commonjs",
5
5
  "exports": {
@@ -28,29 +28,24 @@
28
28
  "watch:link": "strapi-plugin watch:link",
29
29
  "verify": "strapi-plugin verify",
30
30
  "test:ts:front": "run -T tsc -p admin/tsconfig.json",
31
- "test:ts:back": "run -T tsc -p server/tsconfig.json"
32
- },
33
- "dependencies": {
34
- "@strapi/design-system": "^2.0.0-rc.18",
35
- "@strapi/icons": "^2.0.0-rc.18",
36
- "react-intl": "^7.1.6"
31
+ "test:ts:back": "run -T tsc -p server/tsconfig.json",
32
+ "prepublishOnly": "npm run build && npm run verify"
37
33
  },
38
34
  "devDependencies": {
39
- "@strapi/strapi": "^5.11.1",
40
- "@strapi/sdk-plugin": "^5.3.2",
35
+ "@strapi/sdk-plugin": "^6.1.1",
36
+ "@strapi/strapi": "^5.64.0",
37
+ "@strapi/typescript-utils": "^5.64.0",
38
+ "@types/react": "^18.3.12",
39
+ "@types/react-dom": "^18.3.1",
41
40
  "prettier": "^3.5.3",
42
41
  "react": "^18.3.1",
43
42
  "react-dom": "^18.3.1",
44
43
  "react-router-dom": "^6.30.0",
45
44
  "styled-components": "^6.1.15",
46
- "@types/react": "^19.0.10",
47
- "@types/react-dom": "^19.0.4",
48
- "@strapi/typescript-utils": "^5.11.1",
49
- "typescript": "^5.8.2"
45
+ "typescript": "^5.9.3"
50
46
  },
51
47
  "peerDependencies": {
52
48
  "@strapi/strapi": "^5.11.1",
53
- "@strapi/sdk-plugin": "^5.3.2",
54
49
  "react": "^18.3.1",
55
50
  "react-dom": "^18.3.1",
56
51
  "react-router-dom": "^6.30.0",
@@ -65,5 +60,9 @@
65
60
  "name": "strapi-plugin-matomo",
66
61
  "description": "Add your Matomo analytics dahsboard to Strapi.",
67
62
  "license": "MIT",
68
- "author": "Tobias Blättermann <tobias.blaettermann1@gmail.com>"
63
+ "author": "Tobias Blättermann <tobias.blaettermann1@gmail.com>",
64
+ "repository": {
65
+ "type": "git",
66
+ "url": "git+https://github.com/TobeyTG/strapi-plugin-matomo.git"
67
+ }
69
68
  }
File without changes
File without changes