@mattisvensson/strapi-plugin-webatlas 0.2.5 → 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.
- package/README.md +2 -3
- package/dist/_chunks/{_baseConvert-DVIhGQH6.js.map → _baseConvert-B84_vf8X.js.map} +1 -1
- package/dist/_chunks/{_baseConvert-CDjccxdO.mjs.map → _baseConvert-C2SW1VHq.mjs.map} +1 -1
- package/dist/_chunks/de-4tL_cJTC.js +104 -0
- package/dist/_chunks/de-4tL_cJTC.js.map +1 -0
- package/dist/_chunks/de-C8PE3n3B.mjs +104 -0
- package/dist/_chunks/de-C8PE3n3B.mjs.map +1 -0
- package/dist/_chunks/en-Bg4z3fR7.js +104 -0
- package/dist/_chunks/en-Bg4z3fR7.js.map +1 -0
- package/dist/_chunks/en-CR1YZvJo.mjs +104 -0
- package/dist/_chunks/en-CR1YZvJo.mjs.map +1 -0
- package/dist/_chunks/{index-B-ABW-o6.js → index-B0XE_zRP.js} +298 -91
- package/dist/_chunks/index-B2Tiv3EK.mjs +92 -0
- package/dist/_chunks/{index-HHBjOGX5.mjs → index-B48CGofU.mjs} +70 -30
- package/dist/_chunks/{index-HHBjOGX5.mjs.map → index-B48CGofU.mjs.map} +1 -1
- package/dist/_chunks/{index-CAjBRbaH.js → index-B85fJxGa.js} +170 -77
- package/dist/_chunks/{index-Cs_oxZfX.js → index-BbM9Sn1t.js} +169 -108
- package/dist/_chunks/{index-BxuR805w.mjs → index-BocSkZOu.mjs} +57 -17
- package/dist/_chunks/{index-D_OdzeaU.mjs → index-C7B8QHDT.mjs} +296 -89
- package/dist/_chunks/{index-BjbgWZrg.mjs → index-CCiDvLAC.mjs} +171 -78
- package/dist/_chunks/index-CXzNr2cH.mjs +93 -0
- package/dist/_chunks/index-CXzNr2cH.mjs.map +1 -0
- package/dist/_chunks/{index-kz3NL7uv.js → index-Cd6y6nuf.js} +57 -8
- package/dist/_chunks/index-Cd6y6nuf.js.map +1 -0
- package/dist/_chunks/{index-CPE1Ne_e.js → index-Cf9ZIBLd.js} +171 -78
- package/dist/_chunks/index-Cf9ZIBLd.js.map +1 -0
- package/dist/_chunks/{index-yLrZAFVv.mjs → index-D981K4TK.mjs} +172 -79
- package/dist/_chunks/index-D981K4TK.mjs.map +1 -0
- package/dist/_chunks/{index-Djk_-mU6.js → index-DGb8ESH-.js} +56 -9
- package/dist/_chunks/{index-CuMn96qA.js → index-DYiJBXKE.js} +300 -93
- package/dist/_chunks/index-DYiJBXKE.js.map +1 -0
- package/dist/_chunks/{index-B7vKSyAn.js → index-DjZ3ZaVB.js} +60 -20
- package/dist/_chunks/{index-B7vKSyAn.js.map → index-DjZ3ZaVB.js.map} +1 -1
- package/dist/_chunks/{index-ChOgKZGK.mjs → index-DkhJl5mF.mjs} +298 -91
- package/dist/_chunks/index-DkhJl5mF.mjs.map +1 -0
- package/dist/admin/index.js +1 -1
- package/dist/admin/index.mjs +1 -1
- package/dist/admin/src/components/CMEditViewAside/Alias.d.ts +1 -1
- package/dist/admin/src/components/URLInfo.d.ts +2 -1
- package/dist/admin/src/components/modals/NavModal.d.ts +2 -1
- package/dist/admin/src/utils/getRouteType.d.ts +2 -0
- package/dist/admin/src/utils/index.d.ts +2 -1
- package/dist/server/index.js +23 -12
- package/dist/server/index.js.map +1 -1
- package/dist/server/index.mjs +23 -12
- package/dist/server/index.mjs.map +1 -1
- package/dist/server/src/content-types/index.d.ts +5 -5
- package/dist/server/src/content-types/navigation/index.d.ts +1 -1
- package/dist/server/src/content-types/navigation/schema.d.ts +1 -1
- package/dist/server/src/content-types/navitem/index.d.ts +3 -3
- package/dist/server/src/content-types/navitem/schema.d.ts +3 -3
- package/dist/server/src/content-types/route/index.d.ts +1 -1
- package/dist/server/src/content-types/route/schema.d.ts +1 -1
- package/dist/server/src/index.d.ts +5 -5
- package/package.json +1 -1
- package/dist/_chunks/_baseConvert-CDjccxdO.mjs +0 -859
- package/dist/_chunks/_baseConvert-DVIhGQH6.js +0 -858
- package/dist/_chunks/en-B4KWt_jN.js +0 -4
- package/dist/_chunks/en-B4KWt_jN.js.map +0 -1
- package/dist/_chunks/en-Byx4XI2L.mjs +0 -4
- package/dist/_chunks/en-Byx4XI2L.mjs.map +0 -1
- package/dist/_chunks/index-1VNPebOd.mjs +0 -45
- package/dist/_chunks/index-1VNPebOd.mjs.map +0 -1
- package/dist/_chunks/index-B5ilx6DT.mjs +0 -44
- package/dist/_chunks/index-CPE1Ne_e.js.map +0 -1
- package/dist/_chunks/index-ChOgKZGK.mjs.map +0 -1
- package/dist/_chunks/index-CuMn96qA.js.map +0 -1
- package/dist/_chunks/index-Djk_-mU6.js.map +0 -1
- package/dist/_chunks/index-yLrZAFVv.mjs.map +0 -1
|
@@ -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-
|
|
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,25 +32,61 @@ const Routes = () => {
|
|
|
21
32
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
22
33
|
admin.Layouts.Header,
|
|
23
34
|
{
|
|
24
|
-
title:
|
|
25
|
-
|
|
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:
|
|
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:
|
|
32
|
-
|
|
33
|
-
|
|
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.
|
|
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
|
] });
|
|
43
91
|
};
|
|
44
92
|
exports.default = Routes;
|
|
45
|
-
//# sourceMappingURL=index-Djk_-mU6.js.map
|