@mattisvensson/strapi-plugin-webatlas 0.9.6 → 0.10.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.
- package/README.md +24 -36
- package/dist/{_chunks/SettingTitle-77mvMRg_.mjs → admin/SettingTitle-DbsxB1V9.mjs} +2 -2
- package/dist/{_chunks/SettingTitle-DLj_Wwqy.js → admin/SettingTitle-uw1S5OmC.js} +2 -2
- package/dist/{_chunks/de-C-uxto84.mjs → admin/de-B5pRvs13.mjs} +13 -7
- package/dist/{_chunks/de-CGXL_3o_.js → admin/de-CqU1FU8C.js} +13 -7
- package/dist/{_chunks/en-B1CHnIH7.mjs → admin/en-BE-zzIv8.mjs} +13 -7
- package/dist/{_chunks/en-DWEd5BXK.js → admin/en-C7I90FwV.js} +13 -7
- package/dist/{_chunks/index-5OG4i6qO.mjs → admin/index-B07KlG03.mjs} +40 -84
- package/dist/{_chunks/index-BRKi-K-v.mjs → admin/index-BKWY9Ta-.mjs} +61 -24
- package/dist/admin/index-BXt-QjKo.js +9368 -0
- package/dist/{_chunks/index-VXuAEnpX.js → admin/index-BYlmJycd.js} +3 -3
- package/dist/{_chunks/index-Dt-AXdaw.js → admin/index-CGsC8P9P.js} +40 -84
- package/dist/{_chunks/index-DwaKIwAz.mjs → admin/index-CIr8o1RP.mjs} +403 -356
- package/dist/{_chunks/index-3pYLMhui.mjs → admin/index-CUaBX_v-.mjs} +3 -3
- package/dist/{_chunks/index-COfk3YSm.js → admin/index-DC5WwNdi.js} +402 -355
- package/dist/{_chunks/index-DTsHvlTa.js → admin/index-DkqiqVx2.js} +61 -24
- package/dist/admin/index-tPrfjOIn.mjs +9368 -0
- package/dist/admin/index.js +3 -2
- package/dist/admin/index.mjs +1 -1
- package/dist/server/index.js +5266 -4524
- package/dist/server/index.mjs +5264 -4523
- package/dist/server/src/index.d.ts +33 -13
- package/package.json +19 -7
- package/dist/_chunks/index-BOtvXSPU.js +0 -8310
- package/dist/_chunks/index-BWzalvVi.mjs +0 -8310
- package/dist/admin/src/components/CMEditViewAside/Path.d.ts +0 -5
- package/dist/admin/src/components/CMEditViewAside/index.d.ts +0 -3
- package/dist/admin/src/components/Initializer.d.ts +0 -5
- package/dist/admin/src/components/PathInfo.d.ts +0 -7
- package/dist/admin/src/components/PluginIcon.d.ts +0 -3
- package/dist/admin/src/components/Tooltip.d.ts +0 -3
- package/dist/admin/src/components/UI/Center.d.ts +0 -5
- package/dist/admin/src/components/UI/EmptyBox.d.ts +0 -5
- package/dist/admin/src/components/UI/FullLoader.d.ts +0 -3
- package/dist/admin/src/components/UI/index.d.ts +0 -4
- package/dist/admin/src/components/modals/Delete.d.ts +0 -14
- package/dist/admin/src/components/modals/NavCreate.d.ts +0 -1
- package/dist/admin/src/components/modals/NavEdit.d.ts +0 -7
- package/dist/admin/src/components/modals/NavModal.d.ts +0 -17
- package/dist/admin/src/components/modals/NavOverview.d.ts +0 -8
- package/dist/admin/src/components/modals/externalItem/index.d.ts +0 -15
- package/dist/admin/src/components/modals/index.d.ts +0 -12
- package/dist/admin/src/components/modals/internalItem/internalItemCreate.d.ts +0 -3
- package/dist/admin/src/components/modals/internalItem/internalItemEdit.d.ts +0 -3
- package/dist/admin/src/components/modals/useModalSharedLogic.d.ts +0 -2
- package/dist/admin/src/components/modals/withModalSharedLogic.d.ts +0 -3
- package/dist/admin/src/components/modals/wrapperItem/index.d.ts +0 -15
- package/dist/admin/src/contexts/index.d.ts +0 -13
- package/dist/admin/src/hooks/index.d.ts +0 -6
- package/dist/admin/src/hooks/useAllContentTypes.d.ts +0 -7
- package/dist/admin/src/hooks/useAllEntities.d.ts +0 -7
- package/dist/admin/src/hooks/useApi.d.ts +0 -17
- package/dist/admin/src/hooks/useNavigations.d.ts +0 -7
- package/dist/admin/src/hooks/usePluginConfig.d.ts +0 -9
- package/dist/admin/src/pages/Navigation/Page.d.ts +0 -2
- package/dist/admin/src/pages/Navigation/PageWrapper.d.ts +0 -7
- package/dist/admin/src/pages/Navigation/RouteItem.d.ts +0 -17
- package/dist/admin/src/pages/Navigation/SortableRouteItem.d.ts +0 -2
- package/dist/admin/src/pages/Navigation/index.d.ts +0 -2
- package/dist/admin/src/pages/Paths/PageWrapper.d.ts +0 -4
- package/dist/admin/src/pages/Paths/PathTable.d.ts +0 -8
- package/dist/admin/src/pages/Paths/SearchInput.d.ts +0 -6
- package/dist/admin/src/pages/Paths/TableHeader.d.ts +0 -5
- package/dist/admin/src/pages/Paths/TableRow.d.ts +0 -4
- package/dist/admin/src/pages/Paths/compareBy.d.ts +0 -3
- package/dist/admin/src/pages/Paths/index.d.ts +0 -2
- package/dist/admin/src/pages/Settings/ContentBox.d.ts +0 -5
- package/dist/admin/src/pages/Settings/General/ContentTypeAccordion.d.ts +0 -7
- package/dist/admin/src/pages/Settings/General/index.d.ts +0 -2
- package/dist/admin/src/pages/Settings/Navigation/index.d.ts +0 -2
- package/dist/admin/src/pages/Settings/PageWrapper.d.ts +0 -8
- package/dist/admin/src/pages/Settings/SettingTitle.d.ts +0 -4
- package/dist/admin/src/pages/Settings/index.d.ts +0 -4
- package/dist/admin/src/permissions.d.ts +0 -23
- package/dist/admin/src/types/index.d.ts +0 -1
- package/dist/admin/src/types/modal.d.ts +0 -0
- package/dist/admin/src/types/route.d.ts +0 -2
- package/dist/admin/src/utils/countChildren.d.ts +0 -2
- package/dist/admin/src/utils/createTempNavItemObject.d.ts +0 -24
- package/dist/admin/src/utils/debounce.d.ts +0 -1
- package/dist/admin/src/utils/dnd.d.ts +0 -13
- package/dist/admin/src/utils/duplicateCheck.d.ts +0 -9
- package/dist/admin/src/utils/getTranslation.d.ts +0 -2
- package/dist/admin/src/utils/index.d.ts +0 -7
- package/dist/admin/src/utils/typeChecks.d.ts +0 -3
- package/dist/server/src/bootstrap.d.ts +0 -5
- package/dist/server/src/config/index.d.ts +0 -10
- package/dist/server/src/content-types/index.d.ts +0 -184
- package/dist/server/src/content-types/navigation/index.d.ts +0 -50
- package/dist/server/src/content-types/navigation/schema.d.ts +0 -48
- package/dist/server/src/content-types/navitem/index.d.ts +0 -51
- package/dist/server/src/content-types/navitem/schema.d.ts +0 -49
- package/dist/server/src/content-types/route/index.d.ts +0 -83
- package/dist/server/src/content-types/route/schema.d.ts +0 -81
- package/dist/server/src/controllers/admin.d.ts +0 -14
- package/dist/server/src/controllers/client.d.ts +0 -8
- package/dist/server/src/controllers/index.d.ts +0 -22
- package/dist/server/src/destroy.d.ts +0 -5
- package/dist/server/src/middlewares/index.d.ts +0 -2
- package/dist/server/src/policies/has-permissions.d.ts +0 -2
- package/dist/server/src/policies/index.d.ts +0 -4
- package/dist/server/src/register.d.ts +0 -5
- package/dist/server/src/routes/admin.d.ts +0 -17
- package/dist/server/src/routes/client.d.ts +0 -12
- package/dist/server/src/routes/index.d.ts +0 -30
- package/dist/server/src/services/admin.d.ts +0 -17
- package/dist/server/src/services/client.d.ts +0 -8
- package/dist/server/src/services/index.d.ts +0 -24
- package/dist/server/src/utils/buildStructuredNavigation.d.ts +0 -11
- package/dist/server/src/utils/cleanRootKeys.d.ts +0 -1
- package/dist/server/src/utils/duplicateCheck.d.ts +0 -1
- package/dist/server/src/utils/extractRouteAndItems.d.ts +0 -2
- package/dist/server/src/utils/index.d.ts +0 -11
- package/dist/server/src/utils/navItemHandler.d.ts +0 -5
- package/dist/server/src/utils/pluginHelpers.d.ts +0 -3
- package/dist/server/src/utils/populateDeep.d.ts +0 -4
- package/dist/server/src/utils/reduceDepthOfOrphanedItems.d.ts +0 -2
- package/dist/server/src/utils/removeWaFields.d.ts +0 -1
- package/dist/server/src/utils/routeHandler.d.ts +0 -3
- package/dist/types/api.d.ts +0 -7
- package/dist/types/index.d.ts +0 -5
- package/dist/types/modal.d.ts +0 -36
- package/dist/types/navigation.d.ts +0 -65
- package/dist/types/route.d.ts +0 -32
- package/dist/types/strapi.d.ts +0 -53
- package/dist/utils/getPath.d.ts +0 -1
- package/dist/utils/index.d.ts +0 -5
- package/dist/utils/pluginConstants.d.ts +0 -3
- package/dist/utils/pluginId.d.ts +0 -4
- package/dist/utils/transformToUrl.d.ts +0 -1
- /package/dist/{_chunks → admin}/FullLoader-Cmsf8xS6.js +0 -0
- /package/dist/{_chunks → admin}/FullLoader-CrPED_dY.mjs +0 -0
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
-
This plugin bridges the gap between slugs and navigations in Strapi, making URL management and menu building seamless. With automatic slug generation, a clear route overview, and support for multiple navigations, it keeps your content organized and your routes consistent—effortlessly.
|
|
8
|
+
This plugin bridges the gap between slugs and navigations in Strapi, making URL management and menu building seamless. With automatic slug generation, a clear route overview, and support for multiple navigations, it keeps your content organized and your routes consistent — effortlessly.
|
|
9
9
|
|
|
10
10
|
---
|
|
11
11
|
|
|
@@ -25,12 +25,12 @@ This plugin is still in the early stages of development. Many features are plann
|
|
|
25
25
|
|
|
26
26
|
## 💎 Versions
|
|
27
27
|
|
|
28
|
-
- **Strapi v5** - [v0.x.x (work in progress - beta)](https://github.com/mattisvensson/strapi-plugin-webatlas/
|
|
28
|
+
- **Strapi v5** - [v0.x.x (work in progress - beta)](https://github.com/mattisvensson/strapi-plugin-webatlas/releases)
|
|
29
29
|
- **Strapi v4** - not supported
|
|
30
30
|
## ✨ Features
|
|
31
31
|
|
|
32
|
-
- **🚀 Automatic Slug Generation:** Automatically generate clean, SEO-friendly slugs based on your content fields. No more manual slug writing — just choose the field, and the plugin takes care of the rest. Slugs are unique and easily customizable.
|
|
33
|
-
- **🗺️ Route Overview
|
|
32
|
+
- **🚀 Automatic Slug Generation:** Automatically generate clean, SEO-friendly slugs based on your content fields and the route hierarchy. No more manual slug writing — just choose the field, place it under a different route and the plugin takes care of the rest. Slugs are unique and easily customizable.
|
|
33
|
+
- **🗺️ Route Hierarchy and Overview:** Create a hierarchical structure for your routes and gain a full, centralized overview of all registered routes and their corresponding content entries.
|
|
34
34
|
- **🧭 Multiple Navigations** Support for creating and managing multiple navigation structures. Whether it's a main menu, footer links, or a custom mobile drawer — organize your content into any number of navigations with drag-and-drop sorting, nested items, and visibility toggles.
|
|
35
35
|
- **🧩 Composable Component Integration** Use plugin-generated slugs and navigations directly in your frontend. Fetch routes and navigation data by slug and with a consistent API response, optimized for dynamic rendering.
|
|
36
36
|
- **🧠 Conflict Detection & Validation** Webatlas prevents slug collisions and helps avoid route conflicts by validating changes in real time. Get clear error messages and automatic suggestions when something doesn’t align.
|
|
@@ -49,9 +49,7 @@ Using Yarn:
|
|
|
49
49
|
yarn add @mattisvensson/strapi-plugin-webatlas@beta
|
|
50
50
|
```
|
|
51
51
|
|
|
52
|
-
As a next step you must configure your the plugin by the way you want to. See [
|
|
53
|
-
|
|
54
|
-
All done. Enjoy 🎉
|
|
52
|
+
As a next step you must configure your the plugin by the way you want to. See [🔧 Configuration](#-configuration) section.
|
|
55
53
|
|
|
56
54
|
## 🖐 Requirements
|
|
57
55
|
|
|
@@ -82,15 +80,23 @@ Your schema should contain the following:
|
|
|
82
80
|
|
|
83
81
|
Use the settings page to configure the plugin.
|
|
84
82
|
|
|
85
|
-
- **
|
|
86
|
-
- **URL Alias pattern:** Create a default pattern for the slug. For example, when creating a 'news' content type and you want your url structure to be like '/news/some-title' for all entities, enter 'news' in this setting field. The slug will automatically be appended to this string.
|
|
83
|
+
- **Generate path from:** Select a field from which the slug will automatically be generated. For example, use the 'title' field or a dedicated slug field.
|
|
87
84
|
|
|
88
85
|
## 📖 Usage
|
|
89
86
|
|
|
90
|
-
###
|
|
91
|
-
|
|
87
|
+
### Path Generation & Hierarchy
|
|
88
|
+
|
|
89
|
+
After selecting the source field for path generation in settings, you'll see the webatlas panel in the content editor sidebar:
|
|
90
|
+
|
|
91
|
+
**Parent Hierarchy (Place under)**: Select a parent page to create nested URLs (e.g., placing "Services" under "About" creates `/about/services`)
|
|
92
|
+
|
|
93
|
+
**Generated Path (Path)**: Automatically created from your selected field (e.g., "About Us" → `/about-us`)
|
|
94
|
+
|
|
95
|
+
**Override Option**: Check "Override automatic path generation" to set a custom URL that ignores the automatic generation and parent hierarchy. (Be careful: This breaks the automatic slug generation for this entry)
|
|
92
96
|
|
|
93
|
-
|
|
97
|
+
**Canonical Path (Canonical Path)**: Shows the complete URL based on content structure - automatically updates when you change the slug or parent relationship. Changes cascade to all child pages.
|
|
98
|
+
|
|
99
|
+
**UID Path (UID Path)**: A permanent identifier path that never changes, used as a backup URL.
|
|
94
100
|
|
|
95
101
|
### API endpoints
|
|
96
102
|
|
|
@@ -101,47 +107,33 @@ Webatlas provides two API endpoints. One to fetch routes and one to fetch naviga
|
|
|
101
107
|
`GET /api/webatlas/path`
|
|
102
108
|
|
|
103
109
|
Query parameters:
|
|
104
|
-
- `slug` (string, required): The slug/path to fetch the route for. This can either be the generated path from webatlas, the uId path or the
|
|
110
|
+
- `slug` (string, required): The slug/path to fetch the route for. This can either be the generated path from webatlas, the uId path or the canonical path.
|
|
105
111
|
- `populate` (string, optional): Comma-separated list of relations to populate. Use `deep` to populate all relations in any depth.
|
|
106
112
|
- `populateDeepDepth` (string, optional): Depth for deep population.
|
|
107
113
|
- `fields` (string, optional): Comma-separated list of fields to include in the response.
|
|
108
114
|
- `status` (string, optional): `draft` or `published`. Default is `published`. Returns the draft or published version of the entity.
|
|
109
115
|
|
|
116
|
+
The response contains the entity's content type and a `webatlas` object with additional information about the path, including the canonical path, uidPath and slug.
|
|
117
|
+
|
|
110
118
|
#### Fetch navigation
|
|
111
119
|
|
|
112
120
|
`GET /api/webatlas/navigation`
|
|
113
121
|
|
|
114
|
-
One of these query parameters are mandatory to fetch a navigation. If you provide multiple, `documentId` has the highest priority, followed by `name` and `id`.
|
|
122
|
+
One of these query parameters (`documentId`, `name`, or `id`) are mandatory to fetch a navigation. If you provide multiple, `documentId` has the highest priority, followed by `name` and `id`.
|
|
115
123
|
- `documentId` (string, optional): The document ID of the navigation to fetch.
|
|
116
124
|
- `name` (string, optional): The name of the navigation to fetch.
|
|
117
125
|
- `id` (string, optional): The ID of the navigation to fetch.
|
|
118
|
-
|
|
119
|
-
Optional parameters:
|
|
120
|
-
- `variant` (string, optional): `nested` or `flat`.The variant of the navigation to fetch. Default is `nested`.
|
|
126
|
+
- `variant` (string, optional): `nested` or `flat`. The variant of the navigation to fetch. Default is `nested`.
|
|
121
127
|
|
|
122
128
|
## 🧩 Roadmap
|
|
123
129
|
|
|
124
130
|
- More fine-grained RBAC
|
|
125
131
|
- Internationalization
|
|
126
|
-
- Route page
|
|
127
|
-
- Nested url structure
|
|
128
|
-
- Entity page
|
|
129
|
-
- Add to navigation from entity
|
|
130
|
-
- Settings
|
|
131
|
-
- Navigation settings
|
|
132
|
-
- Prevent navigation deletion option
|
|
133
|
-
- Navigation page
|
|
134
|
-
- Custom fields for nav items
|
|
135
|
-
- Nested paths through wrapper/external item
|
|
136
|
-
- Move navigation item with children
|
|
137
|
-
- Item search
|
|
138
|
-
- Collapse items
|
|
139
|
-
- Multi action for items
|
|
140
132
|
- Redirects management
|
|
141
133
|
|
|
142
134
|
---
|
|
143
135
|
|
|
144
|
-
This plugin is still in
|
|
136
|
+
This plugin is still in development. Many features are planned but not yet implemented. The plugin is not fully documented. If you find any bugs, please contact me or create an issue.
|
|
145
137
|
|
|
146
138
|
---
|
|
147
139
|
|
|
@@ -150,7 +142,3 @@ This plugin is still in the early stages of development. Many features are plann
|
|
|
150
142
|
[MIT License](LICENSE.md) Copyright (c) [Matti Svensson](https://mattisvensson.dev/)
|
|
151
143
|
|
|
152
144
|
Webatlas v5 is based on the [plugin boilerplate](https://github.com/pluginpal/strapi-plugin-boilerplate#readme) by [PluginPal](https://www.pluginpal.io/).
|
|
153
|
-
|
|
154
|
-
> Copyright (c) 2025 PluginPal.
|
|
155
|
-
>
|
|
156
|
-
> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Button, Flex, Typography, Box } from "@strapi/design-system";
|
|
3
3
|
import { Page, Layouts } from "@strapi/strapi/admin";
|
|
4
|
-
import { f as PLUGIN_NAME, g as getTranslation } from "./index-
|
|
4
|
+
import { f as PLUGIN_NAME, g as getTranslation } from "./index-CIr8o1RP.mjs";
|
|
5
5
|
import { useIntl } from "react-intl";
|
|
6
6
|
import { Check } from "@strapi/icons";
|
|
7
7
|
function PageWrapper({
|
|
@@ -52,7 +52,7 @@ function ContentBox({ title, children }) {
|
|
|
52
52
|
alignItems: "stretch",
|
|
53
53
|
gap: 4,
|
|
54
54
|
children: [
|
|
55
|
-
/* @__PURE__ */ jsx(Typography, { variant: "delta",
|
|
55
|
+
/* @__PURE__ */ jsx(Typography, { variant: "delta", children: title }),
|
|
56
56
|
/* @__PURE__ */ jsx(Box, { children })
|
|
57
57
|
]
|
|
58
58
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
const jsxRuntime = require("react/jsx-runtime");
|
|
3
3
|
const designSystem = require("@strapi/design-system");
|
|
4
4
|
const admin = require("@strapi/strapi/admin");
|
|
5
|
-
const index = require("./index-
|
|
5
|
+
const index = require("./index-DC5WwNdi.js");
|
|
6
6
|
const reactIntl = require("react-intl");
|
|
7
7
|
const icons = require("@strapi/icons");
|
|
8
8
|
function PageWrapper({
|
|
@@ -53,7 +53,7 @@ function ContentBox({ title, children }) {
|
|
|
53
53
|
alignItems: "stretch",
|
|
54
54
|
gap: 4,
|
|
55
55
|
children: [
|
|
56
|
-
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "delta",
|
|
56
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "delta", children: title }),
|
|
57
57
|
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { children })
|
|
58
58
|
]
|
|
59
59
|
}
|
|
@@ -7,6 +7,7 @@ const de = {
|
|
|
7
7
|
"webatlas.navigation.page.newItemButton": "Neues Element",
|
|
8
8
|
"webatlas.navigation.page.selectNavigation": "Navigation auswählen",
|
|
9
9
|
"webatlas.navigation.page.navItem.addChildren": "Unterelement hinzufügen",
|
|
10
|
+
"webatlas.navigation.page.navItem.viewEntity": "Entität anzeigen",
|
|
10
11
|
"webatlas.paths.page.title": "Pfad",
|
|
11
12
|
"webatlas.paths.page.subtitle": "Übersicht aller vorhandenen Pfade",
|
|
12
13
|
"webatlas.paths.page.emptyPaths": "Es wurden keine Pfade gefunden",
|
|
@@ -22,10 +23,6 @@ const de = {
|
|
|
22
23
|
"webatlas.settings.page.generate": "Generiere Pfade aus",
|
|
23
24
|
"webatlas.settings.page.generate.hint": 'Das ausgewählte Feld aus dem Inhaltstyp wird verwendet, um den Pfad zu generieren. Verwenden Sie ein Feld, das einzigartig und beschreibend ist, wie z.B. "Titel" oder "Name".',
|
|
24
25
|
"webatlas.settings.page.generate.error": "Bitte wählen Sie ein Standardfeld aus",
|
|
25
|
-
"webatlas.settings.page.pattern": "Pfad Muster",
|
|
26
|
-
"webatlas.settings.page.pattern.hint": 'Das Muster, das dem generierten Pfad vorangestellt wird. Wenn Sie z.B. "blog" eingeben und der Wert des Standardfelds "Mein erster Beitrag" ist, wird der generierte Pfad "blog/mein-erster-beitrag" sein. Lassen Sie es leer für kein Präfix.',
|
|
27
|
-
"webatlas.settings.page.pattern.tooltip": "Führende und abschließende Schrägstriche werden entfernt. Leerzeichen werden durch Bindestriche ersetzt. Sonderzeichen werden kodiert.",
|
|
28
|
-
"webatlas.settings.page.pattern.placeholder": "z.B. blog",
|
|
29
26
|
"webatlas.settings.page.navigation.subtitle": "Konfigurieren Sie Navigationseinstellungen",
|
|
30
27
|
"webatlas.settings.page.navigation.navigation": "Navigation",
|
|
31
28
|
"webatlas.settings.page.navigation.maxNavDepth.label": "Maximale Tiefe des Navigationsbaums",
|
|
@@ -69,9 +66,14 @@ const de = {
|
|
|
69
66
|
"webatlas.modal.externalItem.loadingText.edit": "Wird gespeichert",
|
|
70
67
|
"webatlas.modal.externalItem.pathField.placeholder": "z.B. https://example.com",
|
|
71
68
|
"webatlas.modal.item.titleField.label": "Titel",
|
|
72
|
-
"webatlas.modal.item.
|
|
69
|
+
"webatlas.modal.item.canonicalPathField.label": "Kanonischer Pfad",
|
|
70
|
+
"webatlas.modal.item.canonicalPathField.tooltip": "Basierend auf der Inhaltsstruktur",
|
|
71
|
+
"webatlas.modal.item.slugField.label": "Slug",
|
|
72
|
+
"webatlas.modal.item.navigationPosition.label": "Navigationsposition",
|
|
73
73
|
"webatlas.modal.item.pathField.label": "Pfad",
|
|
74
|
-
"webatlas.modal.item.
|
|
74
|
+
"webatlas.modal.item.canonicalPathMismatch": "Warnung: Der kanonische Pfad stimmt nicht mit dem Navigationspfad überein",
|
|
75
|
+
"webatlas.modal.item.routeAlreadyUsed": 'Warnung: Diese Route wird bereits in der Navigation "{navigationName}" verwendet',
|
|
76
|
+
"webatlas.modal.item.routeAlreadyUsed.info": "Wenn Sie den Pfad für dieses Element ändern, wird der Pfad im vorhandenen Element ebenfalls aktualisiert.",
|
|
75
77
|
"webatlas.components.pathInfo.checking": "Überprüfe, ob der Pfad verfügbar ist...",
|
|
76
78
|
"webatlas.components.pathInfo.available": "Pfad ist verfügbar",
|
|
77
79
|
"webatlas.components.pathInfo.notAvailable": "Pfad ist nicht verfügbar. Ersetzt durch",
|
|
@@ -83,6 +85,10 @@ const de = {
|
|
|
83
85
|
"webatlas.components.CMEditViewAside.path.uidPath.hint": "Permanenter UID-Pfad, kann nicht geändert werden",
|
|
84
86
|
"webatlas.components.CMEditViewAside.path.newPathInfo": "Ein neuer Pfad wird beim Speichern dieses Eintrags erstellt.",
|
|
85
87
|
"webatlas.components.CMEditViewAside.path.input.noSourceField": "Verwenden Sie die Überschreibungsoption, um einen benutzerdefinierten Pfad festzulegen.",
|
|
88
|
+
"webatlas.components.CMEditViewAside.path.input.parentSelect.label": "Platzieren unter",
|
|
89
|
+
"webatlas.components.CMEditViewAside.path.input.parentSelect.rootPath": "Keine (Stammverzeichnis)",
|
|
90
|
+
"webatlas.components.CMEditViewAside.canonicalPath.input.label": "Kanonischer Pfad",
|
|
91
|
+
"webatlas.components.CMEditViewAside.canonicalPath.input.tooltip": "Pfad, der durch die natürliche Hierarchie Ihrer Inhalte bestimmt wird, unabhängig davon, wo er in den Navigationsmenüs erscheint.",
|
|
86
92
|
"webatlas.path.type.internal": "Intern",
|
|
87
93
|
"webatlas.path.type.external": "Extern",
|
|
88
94
|
"webatlas.path.type.wrapper": "Wrapper",
|
|
@@ -102,7 +108,7 @@ const de = {
|
|
|
102
108
|
"webatlas.draft": "Entwurf",
|
|
103
109
|
"webatlas.modified": "Geändert",
|
|
104
110
|
"webatlas.deleted": "Gelöscht",
|
|
105
|
-
"webatlas.restore": "
|
|
111
|
+
"webatlas.restore.metadata": "Metadaten wiederherstellen",
|
|
106
112
|
"webatlas.loading": "Laden...",
|
|
107
113
|
"webatlas.version": "Version",
|
|
108
114
|
"webatlas.notification.error": "Ein Fehler ist aufgetreten",
|
|
@@ -9,6 +9,7 @@ const de = {
|
|
|
9
9
|
"webatlas.navigation.page.newItemButton": "Neues Element",
|
|
10
10
|
"webatlas.navigation.page.selectNavigation": "Navigation auswählen",
|
|
11
11
|
"webatlas.navigation.page.navItem.addChildren": "Unterelement hinzufügen",
|
|
12
|
+
"webatlas.navigation.page.navItem.viewEntity": "Entität anzeigen",
|
|
12
13
|
"webatlas.paths.page.title": "Pfad",
|
|
13
14
|
"webatlas.paths.page.subtitle": "Übersicht aller vorhandenen Pfade",
|
|
14
15
|
"webatlas.paths.page.emptyPaths": "Es wurden keine Pfade gefunden",
|
|
@@ -24,10 +25,6 @@ const de = {
|
|
|
24
25
|
"webatlas.settings.page.generate": "Generiere Pfade aus",
|
|
25
26
|
"webatlas.settings.page.generate.hint": 'Das ausgewählte Feld aus dem Inhaltstyp wird verwendet, um den Pfad zu generieren. Verwenden Sie ein Feld, das einzigartig und beschreibend ist, wie z.B. "Titel" oder "Name".',
|
|
26
27
|
"webatlas.settings.page.generate.error": "Bitte wählen Sie ein Standardfeld aus",
|
|
27
|
-
"webatlas.settings.page.pattern": "Pfad Muster",
|
|
28
|
-
"webatlas.settings.page.pattern.hint": 'Das Muster, das dem generierten Pfad vorangestellt wird. Wenn Sie z.B. "blog" eingeben und der Wert des Standardfelds "Mein erster Beitrag" ist, wird der generierte Pfad "blog/mein-erster-beitrag" sein. Lassen Sie es leer für kein Präfix.',
|
|
29
|
-
"webatlas.settings.page.pattern.tooltip": "Führende und abschließende Schrägstriche werden entfernt. Leerzeichen werden durch Bindestriche ersetzt. Sonderzeichen werden kodiert.",
|
|
30
|
-
"webatlas.settings.page.pattern.placeholder": "z.B. blog",
|
|
31
28
|
"webatlas.settings.page.navigation.subtitle": "Konfigurieren Sie Navigationseinstellungen",
|
|
32
29
|
"webatlas.settings.page.navigation.navigation": "Navigation",
|
|
33
30
|
"webatlas.settings.page.navigation.maxNavDepth.label": "Maximale Tiefe des Navigationsbaums",
|
|
@@ -71,9 +68,14 @@ const de = {
|
|
|
71
68
|
"webatlas.modal.externalItem.loadingText.edit": "Wird gespeichert",
|
|
72
69
|
"webatlas.modal.externalItem.pathField.placeholder": "z.B. https://example.com",
|
|
73
70
|
"webatlas.modal.item.titleField.label": "Titel",
|
|
74
|
-
"webatlas.modal.item.
|
|
71
|
+
"webatlas.modal.item.canonicalPathField.label": "Kanonischer Pfad",
|
|
72
|
+
"webatlas.modal.item.canonicalPathField.tooltip": "Basierend auf der Inhaltsstruktur",
|
|
73
|
+
"webatlas.modal.item.slugField.label": "Slug",
|
|
74
|
+
"webatlas.modal.item.navigationPosition.label": "Navigationsposition",
|
|
75
75
|
"webatlas.modal.item.pathField.label": "Pfad",
|
|
76
|
-
"webatlas.modal.item.
|
|
76
|
+
"webatlas.modal.item.canonicalPathMismatch": "Warnung: Der kanonische Pfad stimmt nicht mit dem Navigationspfad überein",
|
|
77
|
+
"webatlas.modal.item.routeAlreadyUsed": 'Warnung: Diese Route wird bereits in der Navigation "{navigationName}" verwendet',
|
|
78
|
+
"webatlas.modal.item.routeAlreadyUsed.info": "Wenn Sie den Pfad für dieses Element ändern, wird der Pfad im vorhandenen Element ebenfalls aktualisiert.",
|
|
77
79
|
"webatlas.components.pathInfo.checking": "Überprüfe, ob der Pfad verfügbar ist...",
|
|
78
80
|
"webatlas.components.pathInfo.available": "Pfad ist verfügbar",
|
|
79
81
|
"webatlas.components.pathInfo.notAvailable": "Pfad ist nicht verfügbar. Ersetzt durch",
|
|
@@ -85,6 +87,10 @@ const de = {
|
|
|
85
87
|
"webatlas.components.CMEditViewAside.path.uidPath.hint": "Permanenter UID-Pfad, kann nicht geändert werden",
|
|
86
88
|
"webatlas.components.CMEditViewAside.path.newPathInfo": "Ein neuer Pfad wird beim Speichern dieses Eintrags erstellt.",
|
|
87
89
|
"webatlas.components.CMEditViewAside.path.input.noSourceField": "Verwenden Sie die Überschreibungsoption, um einen benutzerdefinierten Pfad festzulegen.",
|
|
90
|
+
"webatlas.components.CMEditViewAside.path.input.parentSelect.label": "Platzieren unter",
|
|
91
|
+
"webatlas.components.CMEditViewAside.path.input.parentSelect.rootPath": "Keine (Stammverzeichnis)",
|
|
92
|
+
"webatlas.components.CMEditViewAside.canonicalPath.input.label": "Kanonischer Pfad",
|
|
93
|
+
"webatlas.components.CMEditViewAside.canonicalPath.input.tooltip": "Pfad, der durch die natürliche Hierarchie Ihrer Inhalte bestimmt wird, unabhängig davon, wo er in den Navigationsmenüs erscheint.",
|
|
88
94
|
"webatlas.path.type.internal": "Intern",
|
|
89
95
|
"webatlas.path.type.external": "Extern",
|
|
90
96
|
"webatlas.path.type.wrapper": "Wrapper",
|
|
@@ -104,7 +110,7 @@ const de = {
|
|
|
104
110
|
"webatlas.draft": "Entwurf",
|
|
105
111
|
"webatlas.modified": "Geändert",
|
|
106
112
|
"webatlas.deleted": "Gelöscht",
|
|
107
|
-
"webatlas.restore": "
|
|
113
|
+
"webatlas.restore.metadata": "Metadaten wiederherstellen",
|
|
108
114
|
"webatlas.loading": "Laden...",
|
|
109
115
|
"webatlas.version": "Version",
|
|
110
116
|
"webatlas.notification.error": "Ein Fehler ist aufgetreten",
|
|
@@ -7,6 +7,7 @@ const en = {
|
|
|
7
7
|
"webatlas.navigation.page.newItemButton": "New Item",
|
|
8
8
|
"webatlas.navigation.page.selectNavigation": "Select Navigation",
|
|
9
9
|
"webatlas.navigation.page.navItem.addChildren": "Add children",
|
|
10
|
+
"webatlas.navigation.page.navItem.viewEntity": "View entity",
|
|
10
11
|
"webatlas.paths.page.title": "Paths",
|
|
11
12
|
"webatlas.paths.page.subtitle": "Overview of all existing paths",
|
|
12
13
|
"webatlas.paths.page.emptyPaths": "No paths found",
|
|
@@ -22,10 +23,6 @@ const en = {
|
|
|
22
23
|
"webatlas.settings.page.generate": "Generate paths from",
|
|
23
24
|
"webatlas.settings.page.generate.hint": 'The selected field from the content type will be used to generate the path. Use a field that is unique and descriptive, such as a "title" or "name".',
|
|
24
25
|
"webatlas.settings.page.generate.error": "Please select a default field",
|
|
25
|
-
"webatlas.settings.page.pattern": "Path Pattern",
|
|
26
|
-
"webatlas.settings.page.pattern.hint": 'The pattern to prepend to the generated path. For example, if you enter "blog" and the value of default field is "My First Post", the generated path will be "blog/my-first-post". Leave empty for no prefix.',
|
|
27
|
-
"webatlas.settings.page.pattern.tooltip": "Leading and trailing slashes will be removed. Spaces will be replaced with hyphens. Special characters will be encoded.",
|
|
28
|
-
"webatlas.settings.page.pattern.placeholder": "e.g. blog",
|
|
29
26
|
"webatlas.settings.page.navigation.subtitle": "Configure navigation settings",
|
|
30
27
|
"webatlas.settings.page.navigation.navigation": "Navigation",
|
|
31
28
|
"webatlas.settings.page.navigation.maxNavDepth.label": "Max depth of navigation tree",
|
|
@@ -69,9 +66,14 @@ const en = {
|
|
|
69
66
|
"webatlas.modal.externalItem.loadingText.edit": "Saving",
|
|
70
67
|
"webatlas.modal.externalItem.pathField.placeholder": "e.g. https://example.com",
|
|
71
68
|
"webatlas.modal.item.titleField.label": "Title",
|
|
72
|
-
"webatlas.modal.item.
|
|
69
|
+
"webatlas.modal.item.canonicalPathField.label": "Canonical Path",
|
|
70
|
+
"webatlas.modal.item.canonicalPathField.tooltip": "Based on content hierarchy",
|
|
71
|
+
"webatlas.modal.item.slugField.label": "Slug",
|
|
72
|
+
"webatlas.modal.item.navigationPosition.label": "Navigation Position",
|
|
73
73
|
"webatlas.modal.item.pathField.label": "Path",
|
|
74
|
-
"webatlas.modal.item.
|
|
74
|
+
"webatlas.modal.item.canonicalPathMismatch": "Warning: Canonical Path does not match navigation path",
|
|
75
|
+
"webatlas.modal.item.routeAlreadyUsed": 'Warning: This route is already used in the navigation "{navigationName}"',
|
|
76
|
+
"webatlas.modal.item.routeAlreadyUsed.info": "Changing the path for this item will also update the path in the existing item.",
|
|
75
77
|
"webatlas.components.pathInfo.checking": "Checking if path is available...",
|
|
76
78
|
"webatlas.components.pathInfo.available": "Path is available",
|
|
77
79
|
"webatlas.components.pathInfo.notAvailable": "Path is not available. Replaced with",
|
|
@@ -83,6 +85,10 @@ const en = {
|
|
|
83
85
|
"webatlas.components.CMEditViewAside.path.uidPath.hint": "Permanent UID path, cannot be changed",
|
|
84
86
|
"webatlas.components.CMEditViewAside.path.newPathInfo": "A new path will be created upon saving this entry.",
|
|
85
87
|
"webatlas.components.CMEditViewAside.path.input.noSourceField": "Use the override option to set a custom Path.",
|
|
88
|
+
"webatlas.components.CMEditViewAside.path.input.parentSelect.label": "Place under",
|
|
89
|
+
"webatlas.components.CMEditViewAside.path.input.parentSelect.rootPath": "None (root path)",
|
|
90
|
+
"webatlas.components.CMEditViewAside.canonicalPath.input.label": "Canonical Path",
|
|
91
|
+
"webatlas.components.CMEditViewAside.canonicalPath.input.tooltip": "The path determined by your content's natural hierarchy, independent of where it appears in navigation menus.",
|
|
86
92
|
"webatlas.path.type.internal": "Internal",
|
|
87
93
|
"webatlas.path.type.external": "External",
|
|
88
94
|
"webatlas.path.type.wrapper": "Wrapper",
|
|
@@ -102,7 +108,7 @@ const en = {
|
|
|
102
108
|
"webatlas.draft": "Draft",
|
|
103
109
|
"webatlas.modified": "Modified",
|
|
104
110
|
"webatlas.deleted": "Deleted",
|
|
105
|
-
"webatlas.restore": "Restore",
|
|
111
|
+
"webatlas.restore.metadata": "Restore Metadata",
|
|
106
112
|
"webatlas.loading": "Loading...",
|
|
107
113
|
"webatlas.version": "Version",
|
|
108
114
|
"webatlas.notification.error": "An error occurred",
|
|
@@ -9,6 +9,7 @@ const en = {
|
|
|
9
9
|
"webatlas.navigation.page.newItemButton": "New Item",
|
|
10
10
|
"webatlas.navigation.page.selectNavigation": "Select Navigation",
|
|
11
11
|
"webatlas.navigation.page.navItem.addChildren": "Add children",
|
|
12
|
+
"webatlas.navigation.page.navItem.viewEntity": "View entity",
|
|
12
13
|
"webatlas.paths.page.title": "Paths",
|
|
13
14
|
"webatlas.paths.page.subtitle": "Overview of all existing paths",
|
|
14
15
|
"webatlas.paths.page.emptyPaths": "No paths found",
|
|
@@ -24,10 +25,6 @@ const en = {
|
|
|
24
25
|
"webatlas.settings.page.generate": "Generate paths from",
|
|
25
26
|
"webatlas.settings.page.generate.hint": 'The selected field from the content type will be used to generate the path. Use a field that is unique and descriptive, such as a "title" or "name".',
|
|
26
27
|
"webatlas.settings.page.generate.error": "Please select a default field",
|
|
27
|
-
"webatlas.settings.page.pattern": "Path Pattern",
|
|
28
|
-
"webatlas.settings.page.pattern.hint": 'The pattern to prepend to the generated path. For example, if you enter "blog" and the value of default field is "My First Post", the generated path will be "blog/my-first-post". Leave empty for no prefix.',
|
|
29
|
-
"webatlas.settings.page.pattern.tooltip": "Leading and trailing slashes will be removed. Spaces will be replaced with hyphens. Special characters will be encoded.",
|
|
30
|
-
"webatlas.settings.page.pattern.placeholder": "e.g. blog",
|
|
31
28
|
"webatlas.settings.page.navigation.subtitle": "Configure navigation settings",
|
|
32
29
|
"webatlas.settings.page.navigation.navigation": "Navigation",
|
|
33
30
|
"webatlas.settings.page.navigation.maxNavDepth.label": "Max depth of navigation tree",
|
|
@@ -71,9 +68,14 @@ const en = {
|
|
|
71
68
|
"webatlas.modal.externalItem.loadingText.edit": "Saving",
|
|
72
69
|
"webatlas.modal.externalItem.pathField.placeholder": "e.g. https://example.com",
|
|
73
70
|
"webatlas.modal.item.titleField.label": "Title",
|
|
74
|
-
"webatlas.modal.item.
|
|
71
|
+
"webatlas.modal.item.canonicalPathField.label": "Canonical Path",
|
|
72
|
+
"webatlas.modal.item.canonicalPathField.tooltip": "Based on content hierarchy",
|
|
73
|
+
"webatlas.modal.item.slugField.label": "Slug",
|
|
74
|
+
"webatlas.modal.item.navigationPosition.label": "Navigation Position",
|
|
75
75
|
"webatlas.modal.item.pathField.label": "Path",
|
|
76
|
-
"webatlas.modal.item.
|
|
76
|
+
"webatlas.modal.item.canonicalPathMismatch": "Warning: Canonical Path does not match navigation path",
|
|
77
|
+
"webatlas.modal.item.routeAlreadyUsed": 'Warning: This route is already used in the navigation "{navigationName}"',
|
|
78
|
+
"webatlas.modal.item.routeAlreadyUsed.info": "Changing the path for this item will also update the path in the existing item.",
|
|
77
79
|
"webatlas.components.pathInfo.checking": "Checking if path is available...",
|
|
78
80
|
"webatlas.components.pathInfo.available": "Path is available",
|
|
79
81
|
"webatlas.components.pathInfo.notAvailable": "Path is not available. Replaced with",
|
|
@@ -85,6 +87,10 @@ const en = {
|
|
|
85
87
|
"webatlas.components.CMEditViewAside.path.uidPath.hint": "Permanent UID path, cannot be changed",
|
|
86
88
|
"webatlas.components.CMEditViewAside.path.newPathInfo": "A new path will be created upon saving this entry.",
|
|
87
89
|
"webatlas.components.CMEditViewAside.path.input.noSourceField": "Use the override option to set a custom Path.",
|
|
90
|
+
"webatlas.components.CMEditViewAside.path.input.parentSelect.label": "Place under",
|
|
91
|
+
"webatlas.components.CMEditViewAside.path.input.parentSelect.rootPath": "None (root path)",
|
|
92
|
+
"webatlas.components.CMEditViewAside.canonicalPath.input.label": "Canonical Path",
|
|
93
|
+
"webatlas.components.CMEditViewAside.canonicalPath.input.tooltip": "The path determined by your content's natural hierarchy, independent of where it appears in navigation menus.",
|
|
88
94
|
"webatlas.path.type.internal": "Internal",
|
|
89
95
|
"webatlas.path.type.external": "External",
|
|
90
96
|
"webatlas.path.type.wrapper": "Wrapper",
|
|
@@ -104,7 +110,7 @@ const en = {
|
|
|
104
110
|
"webatlas.draft": "Draft",
|
|
105
111
|
"webatlas.modified": "Modified",
|
|
106
112
|
"webatlas.deleted": "Deleted",
|
|
107
|
-
"webatlas.restore": "Restore",
|
|
113
|
+
"webatlas.restore.metadata": "Restore Metadata",
|
|
108
114
|
"webatlas.loading": "Loading...",
|
|
109
115
|
"webatlas.version": "Version",
|
|
110
116
|
"webatlas.notification.error": "An error occurred",
|
|
@@ -2,11 +2,11 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { useReducer, useState, useRef, useEffect } from "react";
|
|
3
3
|
import { Box, Accordion, Field, SingleSelect, SingleSelectOption, Typography, Link } from "@strapi/design-system";
|
|
4
4
|
import { useNotification, Page } from "@strapi/strapi/admin";
|
|
5
|
-
import { g as getTranslation,
|
|
5
|
+
import { g as getTranslation, c as usePluginConfig, e as useAllContentTypes, p as pluginPermissions, f as PLUGIN_NAME, h as PLUGIN_VERSION } from "./index-CIr8o1RP.mjs";
|
|
6
6
|
import { useIntl } from "react-intl";
|
|
7
7
|
import "@strapi/icons/symbols";
|
|
8
8
|
import { F as FullLoader } from "./FullLoader-CrPED_dY.mjs";
|
|
9
|
-
import { P as PageWrapper, C as ContentBox, S as SettingTitle } from "./SettingTitle-
|
|
9
|
+
import { P as PageWrapper, C as ContentBox, S as SettingTitle } from "./SettingTitle-DbsxB1V9.mjs";
|
|
10
10
|
import { ExternalLink } from "@strapi/icons";
|
|
11
11
|
function ContentTypeAccordion({
|
|
12
12
|
contentType,
|
|
@@ -18,82 +18,44 @@ function ContentTypeAccordion({
|
|
|
18
18
|
return /* @__PURE__ */ jsx(
|
|
19
19
|
Box,
|
|
20
20
|
{
|
|
21
|
-
borderColor: !contentTypeSettings.default
|
|
22
|
-
children: /* @__PURE__ */ jsxs(Accordion.Item, { value: contentType.uid,
|
|
21
|
+
borderColor: !contentTypeSettings.default ? "danger500" : void 0,
|
|
22
|
+
children: /* @__PURE__ */ jsxs(Accordion.Item, { value: contentType.uid, children: [
|
|
23
23
|
/* @__PURE__ */ jsx(Accordion.Header, { children: /* @__PURE__ */ jsx(Accordion.Trigger, { children: contentType?.info.displayName }) }),
|
|
24
|
-
/* @__PURE__ */ jsx(Accordion.Content, { children: /* @__PURE__ */
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
children:
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
{
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
),
|
|
60
|
-
/* @__PURE__ */ jsx(Box, { paddingTop: 4, children: /* @__PURE__ */ jsxs(
|
|
61
|
-
Field.Root,
|
|
62
|
-
{
|
|
63
|
-
name: "pattern",
|
|
64
|
-
hint: formatMessage({
|
|
65
|
-
id: getTranslation("settings.page.pattern.hint"),
|
|
66
|
-
defaultMessage: 'The pattern to prepend to the generated path. For example, if you enter "blog" and the value of default field is "My First Post", the generated path will be "blog/my-first-post". Leave empty for no prefix.'
|
|
67
|
-
}),
|
|
68
|
-
children: [
|
|
69
|
-
/* @__PURE__ */ jsxs(Field.Label, { children: [
|
|
70
|
-
formatMessage({
|
|
71
|
-
id: getTranslation("settings.page.pattern"),
|
|
72
|
-
defaultMessage: "Path Pattern"
|
|
73
|
-
}),
|
|
74
|
-
/* @__PURE__ */ jsx(Tooltip, { description: formatMessage({
|
|
75
|
-
id: getTranslation("settings.page.pattern.tooltip"),
|
|
76
|
-
defaultMessage: "Leading and trailing slashes will be removed. Spaces will be replaced with hyphens. Special characters will be encoded."
|
|
77
|
-
}) })
|
|
78
|
-
] }),
|
|
79
|
-
/* @__PURE__ */ jsx(
|
|
80
|
-
Field.Input,
|
|
81
|
-
{
|
|
82
|
-
value: contentTypeSettings.pattern,
|
|
83
|
-
onChange: (e) => dispatch({ type: "SET_PATTERN", payload: { ctUid: contentType.uid, pattern: e.target.value } }),
|
|
84
|
-
disabled: !contentTypeSettings.default,
|
|
85
|
-
type: "text",
|
|
86
|
-
placeholder: formatMessage({
|
|
87
|
-
id: getTranslation("settings.page.pattern.placeholder"),
|
|
88
|
-
defaultMessage: "e.g. blog"
|
|
89
|
-
})
|
|
90
|
-
}
|
|
91
|
-
),
|
|
92
|
-
/* @__PURE__ */ jsx(Field.Hint, {})
|
|
93
|
-
]
|
|
94
|
-
}
|
|
95
|
-
) })
|
|
96
|
-
] }) })
|
|
24
|
+
/* @__PURE__ */ jsx(Accordion.Content, { children: /* @__PURE__ */ jsx(Box, { padding: 3, children: /* @__PURE__ */ jsxs(
|
|
25
|
+
Field.Root,
|
|
26
|
+
{
|
|
27
|
+
name: "selectedContentTypes",
|
|
28
|
+
hint: formatMessage({
|
|
29
|
+
id: getTranslation("settings.page.generate.hint"),
|
|
30
|
+
defaultMessage: 'The selected field from the content type will be used to generate the path. Use a field that is unique and descriptive, such as a "title" or "name".'
|
|
31
|
+
}),
|
|
32
|
+
error: !contentTypeSettings.default && formatMessage({
|
|
33
|
+
id: getTranslation("settings.page.generate.error"),
|
|
34
|
+
defaultMessage: "Please select a default field"
|
|
35
|
+
}),
|
|
36
|
+
required: true,
|
|
37
|
+
children: [
|
|
38
|
+
/* @__PURE__ */ jsx(Field.Label, { children: formatMessage({
|
|
39
|
+
id: getTranslation("settings.page.generate"),
|
|
40
|
+
defaultMessage: "Generate paths from"
|
|
41
|
+
}) }),
|
|
42
|
+
/* @__PURE__ */ jsx(
|
|
43
|
+
SingleSelect,
|
|
44
|
+
{
|
|
45
|
+
name: `defaultField-${contentType.uid}`,
|
|
46
|
+
onClear: () => dispatch({ type: "SET_DEFAULT_FIELD", payload: { ctUid: contentType.uid, field: "" } }),
|
|
47
|
+
value: contentTypeSettings?.default || "",
|
|
48
|
+
onChange: (value) => dispatch({ type: "SET_DEFAULT_FIELD", payload: { ctUid: contentType.uid, field: String(value) } }),
|
|
49
|
+
children: Object.entries(contentType.attributes).map(([key], index) => {
|
|
50
|
+
if (key === "id" || key === "documentId" || key === "createdAt" || key === "updatedAt" || key === "createdBy" || key === "updatedBy" || key === "webatlas_path" || key === "webatlas_override" || key === "webatlas_parent") return null;
|
|
51
|
+
return /* @__PURE__ */ jsx(SingleSelectOption, { value: key, children: key }, index);
|
|
52
|
+
})
|
|
53
|
+
}
|
|
54
|
+
),
|
|
55
|
+
/* @__PURE__ */ jsx(Field.Hint, {})
|
|
56
|
+
]
|
|
57
|
+
}
|
|
58
|
+
) }) })
|
|
97
59
|
] }, contentType.uid)
|
|
98
60
|
},
|
|
99
61
|
contentType.uid
|
|
@@ -108,12 +70,6 @@ function reducer(newConfig, action) {
|
|
|
108
70
|
(ct) => ct.uid === action.payload.ctUid ? { ...ct, default: action.payload.field } : ct
|
|
109
71
|
);
|
|
110
72
|
return { ...newConfig, selectedContentTypes: updatedContentTypes || [] };
|
|
111
|
-
case "SET_PATTERN":
|
|
112
|
-
if (!newConfig) return null;
|
|
113
|
-
updatedContentTypes = newConfig?.selectedContentTypes.map(
|
|
114
|
-
(ct) => ct.uid === action.payload.ctUid ? { ...ct, pattern: transformToUrl(action.payload.pattern) } : ct
|
|
115
|
-
);
|
|
116
|
-
return { ...newConfig, selectedContentTypes: updatedContentTypes || [] };
|
|
117
73
|
case "SET_CONFIG":
|
|
118
74
|
return action.payload;
|
|
119
75
|
default:
|
|
@@ -168,7 +124,7 @@ const Settings = () => {
|
|
|
168
124
|
defaultMessage: "An error occurred"
|
|
169
125
|
}) + ": " + err
|
|
170
126
|
});
|
|
171
|
-
|
|
127
|
+
strapi.log.error(err);
|
|
172
128
|
}
|
|
173
129
|
}
|
|
174
130
|
if (loading) {
|