@mattisvensson/strapi-plugin-webatlas 0.6.2 → 0.7.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.
Files changed (51) hide show
  1. package/dist/_chunks/{de-CL1TIZPg.js → de-BZc1BkzH.js} +4 -1
  2. package/dist/_chunks/{de-CL1TIZPg.js.map → de-BZc1BkzH.js.map} +1 -1
  3. package/dist/_chunks/{de-CzVD4dbZ.mjs → de-oxxH8hft.mjs} +4 -1
  4. package/dist/_chunks/{de-CzVD4dbZ.mjs.map → de-oxxH8hft.mjs.map} +1 -1
  5. package/dist/_chunks/{en-Du-Ap60j.js → en-Deg4n_IM.js} +4 -1
  6. package/dist/_chunks/{en-Du-Ap60j.js.map → en-Deg4n_IM.js.map} +1 -1
  7. package/dist/_chunks/{en-Nk6QcTdr.mjs → en-DqC5aDzA.mjs} +4 -1
  8. package/dist/_chunks/{en-Nk6QcTdr.mjs.map → en-DqC5aDzA.mjs.map} +1 -1
  9. package/dist/_chunks/{index-C4-VBSgi.mjs → index-B6MYtu3A.mjs} +11 -6
  10. package/dist/_chunks/index-B6MYtu3A.mjs.map +1 -0
  11. package/dist/_chunks/index-BEgpEtto.mjs +247 -0
  12. package/dist/_chunks/index-BEgpEtto.mjs.map +1 -0
  13. package/dist/_chunks/{index-Z3yKckP0.js → index-BOEv4jIJ.js} +6 -6
  14. package/dist/_chunks/{index-Z3yKckP0.js.map → index-BOEv4jIJ.js.map} +1 -1
  15. package/dist/_chunks/{index-CC1UR_w8.mjs → index-BPhRQoGD.mjs} +2 -2
  16. package/dist/_chunks/{index-CC1UR_w8.mjs.map → index-BPhRQoGD.mjs.map} +1 -1
  17. package/dist/_chunks/index-BdlPAWj6.mjs +246 -0
  18. package/dist/_chunks/index-Bg96TqDm.js +247 -0
  19. package/dist/_chunks/index-Bg96TqDm.js.map +1 -0
  20. package/dist/_chunks/{index-B9OfSpne.mjs → index-BgzZLDPv.mjs} +10 -5
  21. package/dist/_chunks/index-BoVX1KF8.js +246 -0
  22. package/dist/_chunks/{index-Ch8tSWp4.js → index-ByU38WNH.js} +5 -5
  23. package/dist/_chunks/{index-iF1y6Mhe.mjs → index-CZ5qsGXH.mjs} +6 -6
  24. package/dist/_chunks/{index-iF1y6Mhe.mjs.map → index-CZ5qsGXH.mjs.map} +1 -1
  25. package/dist/_chunks/{index-BPIdov2N.mjs → index-D3xDvB4d.mjs} +5 -5
  26. package/dist/_chunks/{index-13yB9fna.mjs → index-DKdAgBbF.mjs} +1 -1
  27. package/dist/_chunks/{index-BDoljrOj.js → index-D_QCV5Z5.js} +2 -2
  28. package/dist/_chunks/{index-BDoljrOj.js.map → index-D_QCV5Z5.js.map} +1 -1
  29. package/dist/_chunks/{index-CjA6bLGU.js → index-UJ0LQ3Y3.js} +1 -1
  30. package/dist/_chunks/{index-Bw2Yq-Hx.js → index-dSU20yZ4.js} +10 -5
  31. package/dist/_chunks/{index-D1zlwukG.js → index-mObQ5NXj.js} +11 -6
  32. package/dist/_chunks/index-mObQ5NXj.js.map +1 -0
  33. package/dist/admin/index.js +1 -1
  34. package/dist/admin/index.mjs +1 -1
  35. package/dist/admin/src/pages/Routes/TableHeader.d.ts +5 -1
  36. package/dist/admin/src/pages/Routes/compareBy.d.ts +2 -0
  37. package/dist/server/index.js +1 -1
  38. package/dist/server/index.mjs +1 -1
  39. package/package.json +1 -1
  40. package/dist/_chunks/EmptyBox-BM4IscSk.mjs +0 -13
  41. package/dist/_chunks/EmptyBox-BM4IscSk.mjs.map +0 -1
  42. package/dist/_chunks/EmptyBox-T8t29l25.js +0 -12
  43. package/dist/_chunks/EmptyBox-T8t29l25.js.map +0 -1
  44. package/dist/_chunks/index-AIXu4HZz.mjs +0 -127
  45. package/dist/_chunks/index-AIXu4HZz.mjs.map +0 -1
  46. package/dist/_chunks/index-BOF-1QDH.js +0 -127
  47. package/dist/_chunks/index-BOF-1QDH.js.map +0 -1
  48. package/dist/_chunks/index-BluRjThy.mjs +0 -126
  49. package/dist/_chunks/index-C4-VBSgi.mjs.map +0 -1
  50. package/dist/_chunks/index-D1zlwukG.js.map +0 -1
  51. package/dist/_chunks/index-DeNZkmpv.js +0 -126
@@ -1,126 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const jsxRuntime = require("react/jsx-runtime");
4
- const React = require("react");
5
- const designSystem = require("@strapi/design-system");
6
- const index = require("./index-Ch8tSWp4.js");
7
- const admin = require("@strapi/strapi/admin");
8
- const FullLoader = require("./FullLoader-Cmsf8xS6.js");
9
- const EmptyBox = require("./EmptyBox-T8t29l25.js");
10
- const reactIntl = require("react-intl");
11
- const icons = require("@strapi/icons");
12
- function getRouteType(route) {
13
- if (route.wrapper) {
14
- return "wrapper";
15
- } else if (!route.internal) {
16
- return "external";
17
- } else {
18
- return "internal";
19
- }
20
- }
21
- function TableHeader() {
22
- const { formatMessage } = reactIntl.useIntl();
23
- return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Thead, { children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Tr, { children: [
24
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Th, { children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "sigma", children: "ID" }) }),
25
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Th, { children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "sigma", children: formatMessage({
26
- id: index.getTranslation("title"),
27
- defaultMessage: "Title"
28
- }) }) }),
29
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Th, { children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "sigma", children: formatMessage({
30
- id: index.getTranslation("route"),
31
- defaultMessage: "Route"
32
- }) }) }),
33
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Th, { children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "sigma", children: formatMessage({
34
- id: index.getTranslation("routes.page.column.type"),
35
- defaultMessage: "Type"
36
- }) }) }),
37
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Th, { children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.VisuallyHidden, { children: formatMessage({
38
- id: index.getTranslation("actions"),
39
- defaultMessage: "Actions"
40
- }) }) })
41
- ] }) });
42
- }
43
- function TableRow({ route }) {
44
- const { formatMessage } = reactIntl.useIntl();
45
- return /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Tr, { children: [
46
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Td, { children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { textColor: "neutral800", children: route.id }) }),
47
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Td, { children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { textColor: "neutral800", children: route.title }) }),
48
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Td, { children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { textColor: "neutral800", children: route.fullPath }) }),
49
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Td, { children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { textColor: "neutral800", children: formatMessage({
50
- id: index.getTranslation(`route.type.${getRouteType(route)}`),
51
- defaultMessage: "-"
52
- }) }) }),
53
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Td, { children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { gap: 2, justifyContent: "end", children: route.internal && /* @__PURE__ */ jsxRuntime.jsx(
54
- designSystem.LinkButton,
55
- {
56
- variant: "secondary",
57
- startIcon: /* @__PURE__ */ jsxRuntime.jsx(icons.Pencil, {}),
58
- href: `/admin/content-manager/collection-types/${route.relatedContentType}/${route.relatedDocumentId}`,
59
- children: formatMessage({
60
- id: index.getTranslation("edit"),
61
- defaultMessage: "Edit"
62
- })
63
- }
64
- ) }) })
65
- ] });
66
- }
67
- function PageWrapper({ children }) {
68
- const { formatMessage } = reactIntl.useIntl();
69
- return /* @__PURE__ */ jsxRuntime.jsxs(admin.Page.Main, { children: [
70
- /* @__PURE__ */ jsxRuntime.jsx(
71
- admin.Layouts.Header,
72
- {
73
- title: formatMessage({
74
- id: index.getTranslation("routes.page.title"),
75
- defaultMessage: "Routes"
76
- }),
77
- subtitle: formatMessage({
78
- id: index.getTranslation("routes.page.subtitle"),
79
- defaultMessage: "Overview of all existing routes"
80
- })
81
- }
82
- ),
83
- /* @__PURE__ */ jsxRuntime.jsx(admin.Layouts.Content, { children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { children }) })
84
- ] });
85
- }
86
- const Routes = () => {
87
- const { getRoutes } = index.useApi();
88
- const { formatMessage } = reactIntl.useIntl();
89
- const { toggleNotification } = admin.useNotification();
90
- const [routes, setRoutes] = React.useState([]);
91
- const [loading, setLoading] = React.useState(true);
92
- React.useEffect(() => {
93
- async function fetchRoutes() {
94
- try {
95
- const data = await getRoutes();
96
- setRoutes(data);
97
- } catch (err) {
98
- console.error("Failed to fetch routes:", err);
99
- toggleNotification({
100
- type: "danger",
101
- message: formatMessage({
102
- id: index.getTranslation("notification.routes.fetchFailed"),
103
- defaultMessage: "Failed to fetch routes"
104
- })
105
- });
106
- } finally {
107
- setLoading(false);
108
- }
109
- }
110
- fetchRoutes();
111
- }, []);
112
- if (loading) {
113
- return /* @__PURE__ */ jsxRuntime.jsx(PageWrapper, { children: /* @__PURE__ */ jsxRuntime.jsx(FullLoader.FullLoader, {}) });
114
- }
115
- if (routes.length === 0) {
116
- return /* @__PURE__ */ jsxRuntime.jsx(PageWrapper, { children: /* @__PURE__ */ jsxRuntime.jsx(FullLoader.Center, { height: 400, children: /* @__PURE__ */ jsxRuntime.jsx(EmptyBox.EmptyBox, { msg: formatMessage({
117
- id: index.getTranslation("routes.page.emptyRoutes"),
118
- defaultMessage: "No routes found"
119
- }) }) }) });
120
- }
121
- return /* @__PURE__ */ jsxRuntime.jsx(PageWrapper, { children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Table, { colCount: 4, rowCount: routes.length, children: [
122
- /* @__PURE__ */ jsxRuntime.jsx(TableHeader, {}),
123
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Tbody, { children: routes.map((route) => /* @__PURE__ */ jsxRuntime.jsx(TableRow, { route }, route.id)) })
124
- ] }) });
125
- };
126
- exports.default = Routes;