@mattisvensson/strapi-plugin-webatlas 0.2.6 → 0.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.
Files changed (53) hide show
  1. package/README.md +2 -3
  2. package/dist/_chunks/EmptyBox-7D4LrvdH.mjs.map +1 -0
  3. package/dist/_chunks/EmptyBox-DT6D5gcf.js.map +1 -0
  4. package/dist/_chunks/_baseConvert-B84_vf8X.js.map +1 -0
  5. package/dist/_chunks/_baseConvert-C2SW1VHq.mjs.map +1 -0
  6. package/dist/_chunks/de-4tL_cJTC.js +104 -0
  7. package/dist/_chunks/de-4tL_cJTC.js.map +1 -0
  8. package/dist/_chunks/de-C8PE3n3B.mjs +104 -0
  9. package/dist/_chunks/de-C8PE3n3B.mjs.map +1 -0
  10. package/dist/_chunks/en-Bg4z3fR7.js +104 -0
  11. package/dist/_chunks/en-Bg4z3fR7.js.map +1 -0
  12. package/dist/_chunks/en-CR1YZvJo.mjs +104 -0
  13. package/dist/_chunks/en-CR1YZvJo.mjs.map +1 -0
  14. package/dist/_chunks/{index-D4IHmUrH.js → index-B0XE_zRP.js} +298 -91
  15. package/dist/_chunks/index-B2Tiv3EK.mjs +92 -0
  16. package/dist/_chunks/index-B48CGofU.mjs +17170 -0
  17. package/dist/_chunks/index-B48CGofU.mjs.map +1 -0
  18. package/dist/_chunks/{index-DrlYDm6a.js → index-B85fJxGa.js} +165 -76
  19. package/dist/_chunks/{index-DIyVy-8D.js → index-BbM9Sn1t.js} +57 -17
  20. package/dist/_chunks/{index-B_RPO9ty.mjs → index-BocSkZOu.mjs} +57 -17
  21. package/dist/_chunks/{index-uoH_HJQr.mjs → index-C7B8QHDT.mjs} +296 -89
  22. package/dist/_chunks/{index-BMQSVj43.mjs → index-CCiDvLAC.mjs} +166 -77
  23. package/dist/_chunks/index-CXzNr2cH.mjs +93 -0
  24. package/dist/_chunks/index-CXzNr2cH.mjs.map +1 -0
  25. package/dist/_chunks/index-Cd6y6nuf.js +93 -0
  26. package/dist/_chunks/index-Cd6y6nuf.js.map +1 -0
  27. package/dist/_chunks/index-Cf9ZIBLd.js +4195 -0
  28. package/dist/_chunks/index-Cf9ZIBLd.js.map +1 -0
  29. package/dist/_chunks/index-D981K4TK.mjs +4179 -0
  30. package/dist/_chunks/index-D981K4TK.mjs.map +1 -0
  31. package/dist/_chunks/{index-BvXbuF1E.js → index-DGb8ESH-.js} +56 -8
  32. package/dist/_chunks/index-DYiJBXKE.js +10131 -0
  33. package/dist/_chunks/index-DYiJBXKE.js.map +1 -0
  34. package/dist/_chunks/index-DjZ3ZaVB.js +17189 -0
  35. package/dist/_chunks/index-DjZ3ZaVB.js.map +1 -0
  36. package/dist/_chunks/index-DkhJl5mF.mjs +10131 -0
  37. package/dist/_chunks/index-DkhJl5mF.mjs.map +1 -0
  38. package/dist/admin/index.js +1 -1
  39. package/dist/admin/index.js.map +1 -0
  40. package/dist/admin/index.mjs +1 -1
  41. package/dist/admin/index.mjs.map +1 -0
  42. package/dist/admin/src/components/URLInfo.d.ts +2 -1
  43. package/dist/admin/src/components/modals/NavModal.d.ts +2 -1
  44. package/dist/admin/src/utils/getRouteType.d.ts +2 -0
  45. package/dist/admin/src/utils/index.d.ts +2 -1
  46. package/dist/server/index.js +12 -1
  47. package/dist/server/index.js.map +1 -1
  48. package/dist/server/index.mjs +12 -1
  49. package/dist/server/index.mjs.map +1 -1
  50. package/package.json +1 -1
  51. package/dist/_chunks/en-B4KWt_jN.js +0 -4
  52. package/dist/_chunks/en-Byx4XI2L.mjs +0 -4
  53. package/dist/_chunks/index-BMlQpLGa.mjs +0 -44
@@ -5,10 +5,21 @@ const React = require("react");
5
5
  const admin = require("@strapi/strapi/admin");
6
6
  const designSystem = require("@strapi/design-system");
7
7
  const icons = require("@strapi/icons");
8
- const index = require("./index-DrlYDm6a.js");
8
+ const index = require("./index-B85fJxGa.js");
9
9
  const EmptyBox = require("./EmptyBox-DT6D5gcf.js");
10
+ const reactIntl = require("react-intl");
11
+ function getRouteType(route) {
12
+ if (route.wrapper) {
13
+ return "wrapper";
14
+ } else if (!route.internal) {
15
+ return "external";
16
+ } else {
17
+ return "internal";
18
+ }
19
+ }
10
20
  const Routes = () => {
11
21
  const { getRoutes } = index.useApi();
22
+ const { formatMessage } = reactIntl.useIntl();
12
23
  const [routes, setRoutes] = React.useState([]);
13
24
  React.useEffect(() => {
14
25
  async function fetchRoutes() {
@@ -21,22 +32,59 @@ const Routes = () => {
21
32
  /* @__PURE__ */ jsxRuntime.jsx(
22
33
  admin.Layouts.Header,
23
34
  {
24
- title: "Routes",
25
- subtitle: "Overview of all existing routes"
35
+ title: formatMessage({
36
+ id: index.getTranslation("routes.page.title"),
37
+ defaultMessage: "Routes"
38
+ }),
39
+ subtitle: formatMessage({
40
+ id: index.getTranslation("routes.page.subtitle"),
41
+ defaultMessage: "Overview of all existing routes"
42
+ })
26
43
  }
27
44
  ),
28
- /* @__PURE__ */ jsxRuntime.jsx(admin.Layouts.Content, { children: routes.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(EmptyBox.Center, { height: 400, children: /* @__PURE__ */ jsxRuntime.jsx(EmptyBox.EmptyBox, { msg: "No routes found" }) }) : /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Table, { colCount: 4, rowCount: routes.length, children: [
45
+ /* @__PURE__ */ jsxRuntime.jsx(admin.Layouts.Content, { children: routes.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(EmptyBox.Center, { height: 400, children: /* @__PURE__ */ jsxRuntime.jsx(EmptyBox.EmptyBox, { msg: formatMessage({
46
+ id: index.getTranslation("routes.page.emptyRoutes"),
47
+ defaultMessage: "No routes found"
48
+ }) }) }) : /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Table, { colCount: 4, rowCount: routes.length, children: [
29
49
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Thead, { children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Tr, { children: [
30
50
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Th, { children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "sigma", children: "ID" }) }),
31
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Th, { children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "sigma", children: "Title" }) }),
32
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Th, { children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "sigma", children: "Route" }) }),
33
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Th, { children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.VisuallyHidden, { children: "Actions" }) })
51
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Th, { children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "sigma", children: formatMessage({
52
+ id: index.getTranslation("title"),
53
+ defaultMessage: "Title"
54
+ }) }) }),
55
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Th, { children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "sigma", children: formatMessage({
56
+ id: index.getTranslation("route"),
57
+ defaultMessage: "Route"
58
+ }) }) }),
59
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Th, { children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "sigma", children: formatMessage({
60
+ id: index.getTranslation("routes.page.column.type"),
61
+ defaultMessage: "Type"
62
+ }) }) }),
63
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Th, { children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.VisuallyHidden, { children: formatMessage({
64
+ id: index.getTranslation("actions"),
65
+ defaultMessage: "Actions"
66
+ }) }) })
34
67
  ] }) }),
35
68
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Tbody, { children: routes.map((route) => /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Tr, { children: [
36
69
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Td, { children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { textColor: "neutral800", children: route.id }) }),
37
70
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Td, { children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { textColor: "neutral800", children: route.title }) }),
38
71
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Td, { children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { textColor: "neutral800", children: route.fullPath }) }),
39
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Td, { children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { gap: 2, justifyContent: "end", children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.LinkButton, { variant: "secondary", startIcon: /* @__PURE__ */ jsxRuntime.jsx(icons.Pencil, {}), href: `/admin/content-manager/collection-types/${route.relatedContentType}/${route.relatedDocumentId}`, children: "Edit" }) }) })
72
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Td, { children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { textColor: "neutral800", children: formatMessage({
73
+ id: index.getTranslation(`route.type.${getRouteType(route)}`),
74
+ defaultMessage: "-"
75
+ }) }) }),
76
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Td, { children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { gap: 2, justifyContent: "end", children: route.internal && /* @__PURE__ */ jsxRuntime.jsx(
77
+ designSystem.LinkButton,
78
+ {
79
+ variant: "secondary",
80
+ startIcon: /* @__PURE__ */ jsxRuntime.jsx(icons.Pencil, {}),
81
+ href: `/admin/content-manager/collection-types/${route.relatedContentType}/${route.relatedDocumentId}`,
82
+ children: formatMessage({
83
+ id: index.getTranslation("edit"),
84
+ defaultMessage: "Edit"
85
+ })
86
+ }
87
+ ) }) })
40
88
  ] }, route.id)) })
41
89
  ] }) })
42
90
  ] });