@mattisvensson/strapi-plugin-webatlas 0.6.2 → 0.7.1

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 (59) 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-Z3yKckP0.js → index-2J9mPFyV.js} +6 -6
  10. package/dist/_chunks/{index-Z3yKckP0.js.map → index-2J9mPFyV.js.map} +1 -1
  11. package/dist/_chunks/{index-CjA6bLGU.js → index-B79--vLg.js} +1 -1
  12. package/dist/_chunks/{index-BDoljrOj.js.map → index-B79--vLg.js.map} +1 -1
  13. package/dist/_chunks/{index-C4-VBSgi.mjs → index-BFMLU2kR.mjs} +18 -13
  14. package/dist/_chunks/index-BFMLU2kR.mjs.map +1 -0
  15. package/dist/_chunks/{index-iF1y6Mhe.mjs → index-C6Dorrjz.mjs} +6 -6
  16. package/dist/_chunks/{index-iF1y6Mhe.mjs.map → index-C6Dorrjz.mjs.map} +1 -1
  17. package/dist/_chunks/{index-Ch8tSWp4.js → index-C6e9wLau.js} +5 -5
  18. package/dist/_chunks/index-C6e9wLau.js.map +1 -0
  19. package/dist/_chunks/index-CHB_8c7e.js +246 -0
  20. package/dist/_chunks/index-CHB_8c7e.js.map +1 -0
  21. package/dist/_chunks/{index-B9OfSpne.mjs → index-D5Uc0GLu.mjs} +17 -12
  22. package/dist/_chunks/index-D5Uc0GLu.mjs.map +1 -0
  23. package/dist/_chunks/{index-D1zlwukG.js → index-DCejsR9X.js} +18 -13
  24. package/dist/_chunks/index-DCejsR9X.js.map +1 -0
  25. package/dist/_chunks/{index-CC1UR_w8.mjs → index-DLZJ_sUK.mjs} +2 -2
  26. package/dist/_chunks/{index-CC1UR_w8.mjs.map → index-DLZJ_sUK.mjs.map} +1 -1
  27. package/dist/_chunks/{index-BPIdov2N.mjs → index-DY1ICa5c.mjs} +5 -5
  28. package/dist/_chunks/index-DY1ICa5c.mjs.map +1 -0
  29. package/dist/_chunks/{index-13yB9fna.mjs → index-DcFYhqke.mjs} +1 -1
  30. package/dist/_chunks/index-DcFYhqke.mjs.map +1 -0
  31. package/dist/_chunks/{index-Bw2Yq-Hx.js → index-DeCgextE.js} +17 -12
  32. package/dist/_chunks/index-DeCgextE.js.map +1 -0
  33. package/dist/_chunks/index-DzqTj_0f.mjs +247 -0
  34. package/dist/_chunks/index-DzqTj_0f.mjs.map +1 -0
  35. package/dist/_chunks/index-KC82xDAD.mjs +246 -0
  36. package/dist/_chunks/index-KC82xDAD.mjs.map +1 -0
  37. package/dist/_chunks/{index-BDoljrOj.js → index-NZpDoHIv.js} +2 -2
  38. package/dist/_chunks/index-NZpDoHIv.js.map +1 -0
  39. package/dist/_chunks/index-dzRHjemo.js +247 -0
  40. package/dist/_chunks/index-dzRHjemo.js.map +1 -0
  41. package/dist/admin/index.js +1 -1
  42. package/dist/admin/index.mjs +1 -1
  43. package/dist/admin/src/pages/Routes/TableHeader.d.ts +5 -1
  44. package/dist/admin/src/pages/Routes/compareBy.d.ts +2 -0
  45. package/dist/server/index.js +1 -1
  46. package/dist/server/index.mjs +1 -1
  47. package/package.json +1 -1
  48. package/dist/_chunks/EmptyBox-BM4IscSk.mjs +0 -13
  49. package/dist/_chunks/EmptyBox-BM4IscSk.mjs.map +0 -1
  50. package/dist/_chunks/EmptyBox-T8t29l25.js +0 -12
  51. package/dist/_chunks/EmptyBox-T8t29l25.js.map +0 -1
  52. package/dist/_chunks/index-AIXu4HZz.mjs +0 -127
  53. package/dist/_chunks/index-AIXu4HZz.mjs.map +0 -1
  54. package/dist/_chunks/index-BOF-1QDH.js +0 -127
  55. package/dist/_chunks/index-BOF-1QDH.js.map +0 -1
  56. package/dist/_chunks/index-BluRjThy.mjs +0 -126
  57. package/dist/_chunks/index-C4-VBSgi.mjs.map +0 -1
  58. package/dist/_chunks/index-D1zlwukG.js.map +0 -1
  59. 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;