@mattisvensson/strapi-plugin-webatlas 0.3.1 → 0.4.2

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 (56) hide show
  1. package/dist/_chunks/{EmptyBox-7D4LrvdH.mjs → EmptyBox-BM4IscSk.mjs} +2 -6
  2. package/dist/_chunks/{EmptyBox-DT6D5gcf.js → EmptyBox-T8t29l25.js} +1 -5
  3. package/dist/_chunks/FullLoader-Cmsf8xS6.js +11 -0
  4. package/dist/_chunks/FullLoader-CrPED_dY.mjs +12 -0
  5. package/dist/_chunks/{de-C8PE3n3B.mjs → de-Dn24NwJf.mjs} +11 -1
  6. package/dist/_chunks/{de-4tL_cJTC.js → de-RiCps8UH.js} +11 -1
  7. package/dist/_chunks/{en-CR1YZvJo.mjs → en-D9Lxaugc.mjs} +11 -1
  8. package/dist/_chunks/{en-Bg4z3fR7.js → en-JLW5S3ZC.js} +11 -1
  9. package/dist/_chunks/index-9db80XRS.mjs +126 -0
  10. package/dist/_chunks/{index-CwHhwtOU.mjs → index-B4pe6Yuh.mjs} +1375 -357
  11. package/dist/_chunks/{index-CKoxbSC0.js → index-CSYue_D0.js} +42 -60
  12. package/dist/_chunks/index-CVj7qbwh.mjs +281 -0
  13. package/dist/_chunks/index-CiY-8z8F.js +126 -0
  14. package/dist/_chunks/{index-BAqGJ3TM.js → index-Clikpy91.js} +1381 -363
  15. package/dist/_chunks/{index-BBL_eQ0G.mjs → index-CtJ_9-RB.mjs} +42 -60
  16. package/dist/_chunks/index-IHvD3566.js +281 -0
  17. package/dist/admin/index.js +1 -1
  18. package/dist/admin/index.mjs +1 -1
  19. package/dist/admin/src/components/UI/FullLoader.d.ts +3 -0
  20. package/dist/admin/src/components/UI/index.d.ts +2 -1
  21. package/dist/admin/src/components/modals/Delete.d.ts +3 -3
  22. package/dist/admin/src/components/modals/NavEdit.d.ts +2 -2
  23. package/dist/admin/src/components/modals/externalItem/index.d.ts +10 -4
  24. package/dist/admin/src/components/modals/internalItem/internalItemCreate.d.ts +1 -1
  25. package/dist/admin/src/components/modals/wrapperItem/index.d.ts +11 -5
  26. package/dist/admin/src/hooks/useApi.d.ts +6 -5
  27. package/dist/admin/src/hooks/useNavigations.d.ts +2 -0
  28. package/dist/admin/src/hooks/usePluginConfig.d.ts +3 -3
  29. package/dist/admin/src/pages/Navigation/PageWrapper.d.ts +7 -0
  30. package/dist/admin/src/pages/Navigation/index.d.ts +1 -1
  31. package/dist/admin/src/pages/Routes/PageWrapper.d.ts +4 -0
  32. package/dist/admin/src/pages/Routes/TableHeader.d.ts +1 -0
  33. package/dist/admin/src/pages/Routes/TableRow.d.ts +4 -0
  34. package/dist/admin/src/pages/Settings/ContentTypeAccordion.d.ts +7 -0
  35. package/dist/admin/src/pages/Settings/PageWrapper.d.ts +8 -0
  36. package/dist/admin/src/utils/createTempNavItemObject.d.ts +25 -0
  37. package/dist/admin/src/utils/index.d.ts +2 -1
  38. package/dist/server/index.js +225 -176
  39. package/dist/server/index.mjs +225 -176
  40. package/dist/server/src/controllers/admin.d.ts +1 -4
  41. package/dist/server/src/controllers/index.d.ts +1 -4
  42. package/dist/server/src/index.d.ts +2 -8
  43. package/dist/server/src/services/admin.d.ts +2 -5
  44. package/dist/server/src/services/index.d.ts +1 -4
  45. package/dist/server/src/utils/navItemHandler.d.ts +5 -0
  46. package/dist/server/src/utils/routeHandler.d.ts +3 -0
  47. package/package.json +1 -1
  48. package/dist/_chunks/_baseConvert-B84_vf8X.js +0 -864
  49. package/dist/_chunks/_baseConvert-C2SW1VHq.mjs +0 -865
  50. package/dist/_chunks/index-BOq-WidK.mjs +0 -17176
  51. package/dist/_chunks/index-C4ou6MTp.js +0 -17195
  52. package/dist/_chunks/index-DZmhgSeq.mjs +0 -92
  53. package/dist/_chunks/index-DsTyLL2l.js +0 -92
  54. package/dist/admin/src/pages/Navigation/Header.d.ts +0 -6
  55. package/dist/server/index.js.map +0 -1
  56. package/dist/server/index.mjs.map +0 -1
@@ -1,92 +0,0 @@
1
- import { jsxs, Fragment, jsx } from "react/jsx-runtime";
2
- import { useState, useEffect } from "react";
3
- import { Layouts } from "@strapi/strapi/admin";
4
- import { Table, Thead, Tr, Th, Typography, VisuallyHidden, Tbody, Td, Flex, LinkButton } from "@strapi/design-system";
5
- import { Pencil } from "@strapi/icons";
6
- import { u as useApi, g as getTranslation } from "./index-BBL_eQ0G.mjs";
7
- import { C as Center, E as EmptyBox } from "./EmptyBox-7D4LrvdH.mjs";
8
- import { useIntl } from "react-intl";
9
- function getRouteType(route) {
10
- if (route.wrapper) {
11
- return "wrapper";
12
- } else if (!route.internal) {
13
- return "external";
14
- } else {
15
- return "internal";
16
- }
17
- }
18
- const Routes = () => {
19
- const { getRoutes } = useApi();
20
- const { formatMessage } = useIntl();
21
- const [routes, setRoutes] = useState([]);
22
- useEffect(() => {
23
- async function fetchRoutes() {
24
- const data = await getRoutes();
25
- setRoutes(data);
26
- }
27
- fetchRoutes();
28
- }, []);
29
- return /* @__PURE__ */ jsxs(Fragment, { children: [
30
- /* @__PURE__ */ jsx(
31
- Layouts.Header,
32
- {
33
- title: formatMessage({
34
- id: getTranslation("routes.page.title"),
35
- defaultMessage: "Routes"
36
- }),
37
- subtitle: formatMessage({
38
- id: getTranslation("routes.page.subtitle"),
39
- defaultMessage: "Overview of all existing routes"
40
- })
41
- }
42
- ),
43
- /* @__PURE__ */ jsx(Layouts.Content, { children: routes.length === 0 ? /* @__PURE__ */ jsx(Center, { height: 400, children: /* @__PURE__ */ jsx(EmptyBox, { msg: formatMessage({
44
- id: getTranslation("routes.page.emptyRoutes"),
45
- defaultMessage: "No routes found"
46
- }) }) }) : /* @__PURE__ */ jsxs(Table, { colCount: 4, rowCount: routes.length, children: [
47
- /* @__PURE__ */ jsx(Thead, { children: /* @__PURE__ */ jsxs(Tr, { children: [
48
- /* @__PURE__ */ jsx(Th, { children: /* @__PURE__ */ jsx(Typography, { variant: "sigma", children: "ID" }) }),
49
- /* @__PURE__ */ jsx(Th, { children: /* @__PURE__ */ jsx(Typography, { variant: "sigma", children: formatMessage({
50
- id: getTranslation("title"),
51
- defaultMessage: "Title"
52
- }) }) }),
53
- /* @__PURE__ */ jsx(Th, { children: /* @__PURE__ */ jsx(Typography, { variant: "sigma", children: formatMessage({
54
- id: getTranslation("route"),
55
- defaultMessage: "Route"
56
- }) }) }),
57
- /* @__PURE__ */ jsx(Th, { children: /* @__PURE__ */ jsx(Typography, { variant: "sigma", children: formatMessage({
58
- id: getTranslation("routes.page.column.type"),
59
- defaultMessage: "Type"
60
- }) }) }),
61
- /* @__PURE__ */ jsx(Th, { children: /* @__PURE__ */ jsx(VisuallyHidden, { children: formatMessage({
62
- id: getTranslation("actions"),
63
- defaultMessage: "Actions"
64
- }) }) })
65
- ] }) }),
66
- /* @__PURE__ */ jsx(Tbody, { children: routes.map((route) => /* @__PURE__ */ jsxs(Tr, { children: [
67
- /* @__PURE__ */ jsx(Td, { children: /* @__PURE__ */ jsx(Typography, { textColor: "neutral800", children: route.id }) }),
68
- /* @__PURE__ */ jsx(Td, { children: /* @__PURE__ */ jsx(Typography, { textColor: "neutral800", children: route.title }) }),
69
- /* @__PURE__ */ jsx(Td, { children: /* @__PURE__ */ jsx(Typography, { textColor: "neutral800", children: route.fullPath }) }),
70
- /* @__PURE__ */ jsx(Td, { children: /* @__PURE__ */ jsx(Typography, { textColor: "neutral800", children: formatMessage({
71
- id: getTranslation(`route.type.${getRouteType(route)}`),
72
- defaultMessage: "-"
73
- }) }) }),
74
- /* @__PURE__ */ jsx(Td, { children: /* @__PURE__ */ jsx(Flex, { gap: 2, justifyContent: "end", children: route.internal && /* @__PURE__ */ jsx(
75
- LinkButton,
76
- {
77
- variant: "secondary",
78
- startIcon: /* @__PURE__ */ jsx(Pencil, {}),
79
- href: `/admin/content-manager/collection-types/${route.relatedContentType}/${route.relatedDocumentId}`,
80
- children: formatMessage({
81
- id: getTranslation("edit"),
82
- defaultMessage: "Edit"
83
- })
84
- }
85
- ) }) })
86
- ] }, route.id)) })
87
- ] }) })
88
- ] });
89
- };
90
- export {
91
- Routes as default
92
- };
@@ -1,92 +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 admin = require("@strapi/strapi/admin");
6
- const designSystem = require("@strapi/design-system");
7
- const icons = require("@strapi/icons");
8
- const index = require("./index-CKoxbSC0.js");
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
- }
20
- const Routes = () => {
21
- const { getRoutes } = index.useApi();
22
- const { formatMessage } = reactIntl.useIntl();
23
- const [routes, setRoutes] = React.useState([]);
24
- React.useEffect(() => {
25
- async function fetchRoutes() {
26
- const data = await getRoutes();
27
- setRoutes(data);
28
- }
29
- fetchRoutes();
30
- }, []);
31
- return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
32
- /* @__PURE__ */ jsxRuntime.jsx(
33
- admin.Layouts.Header,
34
- {
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
- })
43
- }
44
- ),
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: [
49
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Thead, { children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Tr, { children: [
50
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Th, { children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "sigma", children: "ID" }) }),
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
- }) }) })
67
- ] }) }),
68
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Tbody, { children: routes.map((route) => /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Tr, { children: [
69
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Td, { children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { textColor: "neutral800", children: route.id }) }),
70
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Td, { children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { textColor: "neutral800", children: route.title }) }),
71
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Td, { children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { textColor: "neutral800", children: route.fullPath }) }),
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
- ) }) })
88
- ] }, route.id)) })
89
- ] }) })
90
- ] });
91
- };
92
- exports.default = Routes;
@@ -1,6 +0,0 @@
1
- import { NestedNavigation } from '../../../../types';
2
- type HeaderProps = {
3
- navigations: NestedNavigation[];
4
- };
5
- export default function Header({ navigations }: HeaderProps): import("react/jsx-runtime").JSX.Element;
6
- export {};