@mattisvensson/strapi-plugin-webatlas 0.11.4 → 0.11.6

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 CHANGED
@@ -34,6 +34,7 @@ This plugin is still in the early stages of development. Many features are plann
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.
37
+ - **🔗 RoutePicker Custom Field** Use the RoutePicker custom field to select routes within your content types, ensuring consistent linking and navigation throughout your application.
37
38
 
38
39
  ## ⏳ Installation
39
40
 
@@ -104,6 +105,10 @@ After selecting the source field for path generation in settings, you'll see the
104
105
 
105
106
  **UID Path (UID Path)**: A permanent identifier path that never changes, used as a backup URL.
106
107
 
108
+ ### RoutePicker Custom Field
109
+
110
+ The RoutePicker custom field allows you to select a route from the existing routes in your Strapi application. This ensures that links between content types are consistent and automatically updated when the route changes. You can use it for example in a "Button" component to link to a different page.
111
+
107
112
  ### API endpoints
108
113
 
109
114
  Webatlas provides two API endpoints. One to fetch routes and one to fetch navigations.
@@ -0,0 +1,101 @@
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ import { forwardRef, useState, useEffect } from "react";
3
+ import { Field, Combobox, ComboboxOption, Box } from "@strapi/design-system";
4
+ import { ExternalLink, Link } from "@strapi/icons";
5
+ import { u as useApi } from "./index-OkabmPb4.mjs";
6
+ import "@strapi/strapi/admin";
7
+ const Input = forwardRef((props, ref) => {
8
+ const { attribute, disabled, placeholder, label, name, onChange, required, value, hint } = props;
9
+ const { getAllRoutes } = useApi();
10
+ const [routes, setRoutes] = useState([]);
11
+ const [isLoading, setIsLoading] = useState(true);
12
+ const [displayValue, setDisplayValue] = useState("");
13
+ const isDisabled = disabled || isLoading;
14
+ const handleChange = (newValue) => {
15
+ onChange({
16
+ target: { name, type: attribute.type, value: encodeURI(newValue) }
17
+ });
18
+ };
19
+ const handleOptionCreate = (inputValue) => {
20
+ const linkValue = typeof inputValue === "string" ? inputValue : inputValue?.target?.value || String(inputValue || "");
21
+ if (linkValue) {
22
+ handleChange(linkValue);
23
+ setDisplayValue(encodeURI(linkValue));
24
+ }
25
+ };
26
+ const getStartIcon = () => {
27
+ if (!value) return null;
28
+ const matchedRoute = routes.find((route) => route.documentId === value);
29
+ if (matchedRoute) {
30
+ return /* @__PURE__ */ jsx(Link, { fill: "neutral500" });
31
+ }
32
+ return /* @__PURE__ */ jsx(ExternalLink, { fill: "neutral500" });
33
+ };
34
+ useEffect(() => {
35
+ const fetchRoutes = async () => {
36
+ setIsLoading(true);
37
+ const fetchedRoutes = await getAllRoutes();
38
+ setRoutes(fetchedRoutes);
39
+ setIsLoading(false);
40
+ if (value) {
41
+ const matchedRoute = fetchedRoutes.find((route) => route.documentId === value);
42
+ if (matchedRoute) {
43
+ setDisplayValue(`${matchedRoute.title} (${matchedRoute.path})`);
44
+ } else {
45
+ setDisplayValue(value);
46
+ }
47
+ } else {
48
+ setDisplayValue("");
49
+ }
50
+ };
51
+ fetchRoutes();
52
+ }, [value]);
53
+ return /* @__PURE__ */ jsxs(Field.Root, { id: name, required, hint, disabled: isDisabled, children: [
54
+ /* @__PURE__ */ jsx(Field.Label, { children: label }),
55
+ /* @__PURE__ */ jsx(
56
+ Combobox,
57
+ {
58
+ ref,
59
+ placeholder,
60
+ "aria-label": label,
61
+ "aria-disabled": isDisabled,
62
+ value: value || "",
63
+ textValue: displayValue || "",
64
+ creatable: true,
65
+ onCreateOption: handleOptionCreate,
66
+ createMessage: (inputValue) => `Use external link: ${encodeURI(inputValue)}`,
67
+ creatableStartIcon: /* @__PURE__ */ jsx(ExternalLink, { fill: "neutral500" }),
68
+ startIcon: getStartIcon(),
69
+ onChange: (routeId) => {
70
+ if (!routeId) {
71
+ setDisplayValue("");
72
+ handleChange("");
73
+ return;
74
+ }
75
+ const selectedRoute = routes.find((r) => r.documentId === routeId);
76
+ if (selectedRoute) {
77
+ setDisplayValue(`${selectedRoute.title} (${selectedRoute.path})`);
78
+ handleChange(routeId);
79
+ }
80
+ },
81
+ onInputChange: (inputValue) => {
82
+ const textValue = typeof inputValue === "string" ? inputValue : inputValue?.target?.value || "";
83
+ setDisplayValue(textValue);
84
+ },
85
+ children: routes.map((route) => /* @__PURE__ */ jsxs(ComboboxOption, { value: route.documentId, children: [
86
+ route.title,
87
+ " (",
88
+ route.path,
89
+ ")"
90
+ ] }, route.documentId))
91
+ }
92
+ ),
93
+ /* @__PURE__ */ jsxs(Box, { children: [
94
+ /* @__PURE__ */ jsx(Field.Hint, {}),
95
+ /* @__PURE__ */ jsx(Field.Error, {})
96
+ ] })
97
+ ] });
98
+ });
99
+ export {
100
+ Input as default
101
+ };
@@ -0,0 +1,101 @@
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 icons = require("@strapi/icons");
7
+ const index = require("./index-ik3u6iCE.js");
8
+ require("@strapi/strapi/admin");
9
+ const Input = React.forwardRef((props, ref) => {
10
+ const { attribute, disabled, placeholder, label, name, onChange, required, value, hint } = props;
11
+ const { getAllRoutes } = index.useApi();
12
+ const [routes, setRoutes] = React.useState([]);
13
+ const [isLoading, setIsLoading] = React.useState(true);
14
+ const [displayValue, setDisplayValue] = React.useState("");
15
+ const isDisabled = disabled || isLoading;
16
+ const handleChange = (newValue) => {
17
+ onChange({
18
+ target: { name, type: attribute.type, value: encodeURI(newValue) }
19
+ });
20
+ };
21
+ const handleOptionCreate = (inputValue) => {
22
+ const linkValue = typeof inputValue === "string" ? inputValue : inputValue?.target?.value || String(inputValue || "");
23
+ if (linkValue) {
24
+ handleChange(linkValue);
25
+ setDisplayValue(encodeURI(linkValue));
26
+ }
27
+ };
28
+ const getStartIcon = () => {
29
+ if (!value) return null;
30
+ const matchedRoute = routes.find((route) => route.documentId === value);
31
+ if (matchedRoute) {
32
+ return /* @__PURE__ */ jsxRuntime.jsx(icons.Link, { fill: "neutral500" });
33
+ }
34
+ return /* @__PURE__ */ jsxRuntime.jsx(icons.ExternalLink, { fill: "neutral500" });
35
+ };
36
+ React.useEffect(() => {
37
+ const fetchRoutes = async () => {
38
+ setIsLoading(true);
39
+ const fetchedRoutes = await getAllRoutes();
40
+ setRoutes(fetchedRoutes);
41
+ setIsLoading(false);
42
+ if (value) {
43
+ const matchedRoute = fetchedRoutes.find((route) => route.documentId === value);
44
+ if (matchedRoute) {
45
+ setDisplayValue(`${matchedRoute.title} (${matchedRoute.path})`);
46
+ } else {
47
+ setDisplayValue(value);
48
+ }
49
+ } else {
50
+ setDisplayValue("");
51
+ }
52
+ };
53
+ fetchRoutes();
54
+ }, [value]);
55
+ return /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Field.Root, { id: name, required, hint, disabled: isDisabled, children: [
56
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Label, { children: label }),
57
+ /* @__PURE__ */ jsxRuntime.jsx(
58
+ designSystem.Combobox,
59
+ {
60
+ ref,
61
+ placeholder,
62
+ "aria-label": label,
63
+ "aria-disabled": isDisabled,
64
+ value: value || "",
65
+ textValue: displayValue || "",
66
+ creatable: true,
67
+ onCreateOption: handleOptionCreate,
68
+ createMessage: (inputValue) => `Use external link: ${encodeURI(inputValue)}`,
69
+ creatableStartIcon: /* @__PURE__ */ jsxRuntime.jsx(icons.ExternalLink, { fill: "neutral500" }),
70
+ startIcon: getStartIcon(),
71
+ onChange: (routeId) => {
72
+ if (!routeId) {
73
+ setDisplayValue("");
74
+ handleChange("");
75
+ return;
76
+ }
77
+ const selectedRoute = routes.find((r) => r.documentId === routeId);
78
+ if (selectedRoute) {
79
+ setDisplayValue(`${selectedRoute.title} (${selectedRoute.path})`);
80
+ handleChange(routeId);
81
+ }
82
+ },
83
+ onInputChange: (inputValue) => {
84
+ const textValue = typeof inputValue === "string" ? inputValue : inputValue?.target?.value || "";
85
+ setDisplayValue(textValue);
86
+ },
87
+ children: routes.map((route) => /* @__PURE__ */ jsxRuntime.jsxs(designSystem.ComboboxOption, { value: route.documentId, children: [
88
+ route.title,
89
+ " (",
90
+ route.path,
91
+ ")"
92
+ ] }, route.documentId))
93
+ }
94
+ ),
95
+ /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Box, { children: [
96
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Hint, {}),
97
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Error, {})
98
+ ] })
99
+ ] });
100
+ });
101
+ exports.default = Input;
@@ -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-BX3hiURm.mjs";
4
+ import { f as PLUGIN_NAME, g as getTranslation } from "./index-OkabmPb4.mjs";
5
5
  import { useIntl } from "react-intl";
6
6
  import { Check } from "@strapi/icons";
7
7
  function PageWrapper({
@@ -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-BkPtrXJO.js");
5
+ const index = require("./index-ik3u6iCE.js");
6
6
  const reactIntl = require("react-intl");
7
7
  const icons = require("@strapi/icons");
8
8
  function PageWrapper({
@@ -1,6 +1,6 @@
1
1
  import { jsxs, jsx, Fragment } from "react/jsx-runtime";
2
2
  import { useState, useEffect, useMemo } from "react";
3
- import { g as getTranslation, u as useApi, d as debounce, p as pluginPermissions } from "./index-BX3hiURm.mjs";
3
+ import { g as getTranslation, u as useApi, d as debounce, p as pluginPermissions } from "./index-OkabmPb4.mjs";
4
4
  import { Page, Layouts, useNotification } from "@strapi/strapi/admin";
5
5
  import { Grid, Box, Field, Thead, Tr, Th, Typography, VisuallyHidden, Td, Flex, LinkButton, Table, Tbody, EmptyStateLayout } from "@strapi/design-system";
6
6
  import "@strapi/icons/symbols";
@@ -4,11 +4,11 @@ const jsxRuntime = require("react/jsx-runtime");
4
4
  const React = require("react");
5
5
  const designSystem = require("@strapi/design-system");
6
6
  const admin = require("@strapi/strapi/admin");
7
- const index = require("./index-BkPtrXJO.js");
7
+ const index = require("./index-ik3u6iCE.js");
8
8
  const reactIntl = require("react-intl");
9
9
  require("@strapi/icons/symbols");
10
10
  const FullLoader = require("./FullLoader-Da2n70bJ.js");
11
- const SettingTitle = require("./SettingTitle-BdiDHFXF.js");
11
+ const SettingTitle = require("./SettingTitle-DcQMSkno.js");
12
12
  function reducer(newConfig, action) {
13
13
  switch (action.type) {
14
14
  case "SET_MAX_DEPTH":
@@ -7,7 +7,7 @@ const designSystem = require("@strapi/design-system");
7
7
  const React = require("react");
8
8
  const ReactDOM = require("react-dom");
9
9
  const reactIntl = require("react-intl");
10
- const index = require("./index-BkPtrXJO.js");
10
+ const index = require("./index-ik3u6iCE.js");
11
11
  const admin = require("@strapi/strapi/admin");
12
12
  const FullLoader = require("./FullLoader-Da2n70bJ.js");
13
13
  const symbols = require("@strapi/icons/symbols");
@@ -582,8 +582,8 @@ function pathReducer(state, action) {
582
582
  prevValue: state.value,
583
583
  needsUrlCheck: false
584
584
  };
585
- case "RESET_URL_CHECK_FLAG":
586
- return { ...state, needsUrlCheck: false };
585
+ case "SET_URL_CHECK_FLAG":
586
+ return { ...state, needsUrlCheck: action.payload || false };
587
587
  case "SET_REPLACEMENT":
588
588
  return { ...state, replacement: action.payload };
589
589
  case "SET_UIDPATH":
@@ -866,7 +866,7 @@ function ItemDetails({
866
866
  routeDocumentId: route.documentId,
867
867
  withoutTransform: true
868
868
  });
869
- dispatchPath({ type: "RESET_URL_CHECK_FLAG" });
869
+ dispatchPath({ type: "SET_URL_CHECK_FLAG" });
870
870
  }
871
871
  }, [path.needsUrlCheck, route.documentId]);
872
872
  React.useEffect(() => {
@@ -6747,7 +6747,7 @@ function ItemEditComponent({
6747
6747
  url: path.value,
6748
6748
  routeDocumentId: item.route.documentId
6749
6749
  });
6750
- dispatchPath({ type: "RESET_URL_CHECK_FLAG" });
6750
+ dispatchPath({ type: "SET_URL_CHECK_FLAG" });
6751
6751
  }
6752
6752
  }, [path.needsUrlCheck, item.route.documentId]);
6753
6753
  const updateItem = async () => {
@@ -2,11 +2,11 @@ import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { useReducer, useState, useRef, useEffect } from "react";
3
3
  import { Field } from "@strapi/design-system";
4
4
  import { useNotification, Page } from "@strapi/strapi/admin";
5
- import { c as usePluginConfig, g as getTranslation, p as pluginPermissions } from "./index-BX3hiURm.mjs";
5
+ import { c as usePluginConfig, g as getTranslation, p as pluginPermissions } from "./index-OkabmPb4.mjs";
6
6
  import { useIntl } from "react-intl";
7
7
  import "@strapi/icons/symbols";
8
8
  import { F as FullLoader } from "./FullLoader-Btjb2W2p.mjs";
9
- import { P as PageWrapper, C as ContentBox, S as SettingTitle } from "./SettingTitle-CcNfx_4T.mjs";
9
+ import { P as PageWrapper, C as ContentBox, S as SettingTitle } from "./SettingTitle-Bu_8jLRE.mjs";
10
10
  function reducer(newConfig, action) {
11
11
  switch (action.type) {
12
12
  case "SET_MAX_DEPTH":
@@ -5,7 +5,7 @@ import { Box, Typography, Dialog, Button, Modal, Flex, SingleSelect, SingleSelec
5
5
  import { useState, useEffect, createContext, useRef, useContext, useMemo, useReducer, useCallback, forwardRef } from "react";
6
6
  import { createPortal } from "react-dom";
7
7
  import { useIntl } from "react-intl";
8
- import { u as useApi, g as getTranslation, P as PLUGIN_ID, d as debounce, a as duplicateCheck, T as Tooltip, b as PathInfo, c as usePluginConfig, p as pluginPermissions } from "./index-BX3hiURm.mjs";
8
+ import { u as useApi, g as getTranslation, P as PLUGIN_ID, d as debounce, a as duplicateCheck, T as Tooltip, b as PathInfo, c as usePluginConfig, p as pluginPermissions } from "./index-OkabmPb4.mjs";
9
9
  import { useNotification, useFetchClient, Page, Layouts } from "@strapi/strapi/admin";
10
10
  import { C as Center, F as FullLoader } from "./FullLoader-Btjb2W2p.mjs";
11
11
  import { EmptyDocuments } from "@strapi/icons/symbols";
@@ -580,8 +580,8 @@ function pathReducer(state, action) {
580
580
  prevValue: state.value,
581
581
  needsUrlCheck: false
582
582
  };
583
- case "RESET_URL_CHECK_FLAG":
584
- return { ...state, needsUrlCheck: false };
583
+ case "SET_URL_CHECK_FLAG":
584
+ return { ...state, needsUrlCheck: action.payload || false };
585
585
  case "SET_REPLACEMENT":
586
586
  return { ...state, replacement: action.payload };
587
587
  case "SET_UIDPATH":
@@ -864,7 +864,7 @@ function ItemDetails({
864
864
  routeDocumentId: route.documentId,
865
865
  withoutTransform: true
866
866
  });
867
- dispatchPath({ type: "RESET_URL_CHECK_FLAG" });
867
+ dispatchPath({ type: "SET_URL_CHECK_FLAG" });
868
868
  }
869
869
  }, [path.needsUrlCheck, route.documentId]);
870
870
  useEffect(() => {
@@ -6745,7 +6745,7 @@ function ItemEditComponent({
6745
6745
  url: path.value,
6746
6746
  routeDocumentId: item.route.documentId
6747
6747
  });
6748
- dispatchPath({ type: "RESET_URL_CHECK_FLAG" });
6748
+ dispatchPath({ type: "SET_URL_CHECK_FLAG" });
6749
6749
  }
6750
6750
  }, [path.needsUrlCheck, item.route.documentId]);
6751
6751
  const updateItem = async () => {
@@ -4,11 +4,11 @@ const jsxRuntime = require("react/jsx-runtime");
4
4
  const React = require("react");
5
5
  const designSystem = require("@strapi/design-system");
6
6
  const admin = require("@strapi/strapi/admin");
7
- const index = require("./index-BkPtrXJO.js");
7
+ const index = require("./index-ik3u6iCE.js");
8
8
  const reactIntl = require("react-intl");
9
9
  require("@strapi/icons/symbols");
10
10
  const FullLoader = require("./FullLoader-Da2n70bJ.js");
11
- const SettingTitle = require("./SettingTitle-BdiDHFXF.js");
11
+ const SettingTitle = require("./SettingTitle-DcQMSkno.js");
12
12
  const icons = require("@strapi/icons");
13
13
  function ContentTypeAccordion({
14
14
  contentType,
@@ -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, c as usePluginConfig, e as useAllContentTypes, p as pluginPermissions, f as PLUGIN_NAME, h as PLUGIN_VERSION } from "./index-BX3hiURm.mjs";
5
+ import { g as getTranslation, c as usePluginConfig, e as useAllContentTypes, p as pluginPermissions, f as PLUGIN_NAME, h as PLUGIN_VERSION } from "./index-OkabmPb4.mjs";
6
6
  import { useIntl } from "react-intl";
7
7
  import "@strapi/icons/symbols";
8
8
  import { F as FullLoader } from "./FullLoader-Btjb2W2p.mjs";
9
- import { P as PageWrapper, C as ContentBox, S as SettingTitle } from "./SettingTitle-CcNfx_4T.mjs";
9
+ import { P as PageWrapper, C as ContentBox, S as SettingTitle } from "./SettingTitle-Bu_8jLRE.mjs";
10
10
  import { ExternalLink } from "@strapi/icons";
11
11
  function ContentTypeAccordion({
12
12
  contentType,
@@ -52,7 +52,7 @@ function transformToUrl(input, replaceSlash = true) {
52
52
  input = input.replace(/-+/g, "-");
53
53
  return input;
54
54
  }
55
- const version = "0.11.3";
55
+ const version = "0.11.5";
56
56
  const strapi$1 = { "name": "webatlas", "displayName": "Webatlas" };
57
57
  const pluginPkg = {
58
58
  version,
@@ -3663,7 +3663,7 @@ function Tooltip({ description }) {
3663
3663
  ) }) })
3664
3664
  ] }) });
3665
3665
  }
3666
- function PathInput({ path, dispatchPath, isOverride, config }) {
3666
+ function PathInput({ path, dispatchPath, isOverride, config, hasUserInteracted }) {
3667
3667
  const { formatMessage } = useIntl();
3668
3668
  const displayedPath = isOverride && path.overridePath !== void 0 ? path.overridePath : path.value ?? "";
3669
3669
  const inputBorder = path.replacement === null ? "" : path.replacement ? "1px solid #ee5e52" : "1px solid #5cb176";
@@ -3701,12 +3701,21 @@ function PathInput({ path, dispatchPath, isOverride, config }) {
3701
3701
  {
3702
3702
  id: "path-input",
3703
3703
  value: displayedPath,
3704
- onChange: (e) => dispatchPath({ type: "SET_OVERRIDEPATH", payload: e.target.value }),
3704
+ onChange: (e) => {
3705
+ hasUserInteracted.current = true;
3706
+ dispatchPath({ type: "SET_OVERRIDEPATH", payload: e.target.value });
3707
+ },
3705
3708
  disabled: !isOverride,
3706
- onBlur: (e) => dispatchPath({
3707
- type: "SET_OVERRIDEPATH",
3708
- payload: transformToUrl(e.target.value, false)
3709
- }),
3709
+ onBlur: (e) => {
3710
+ dispatchPath({
3711
+ type: "SET_OVERRIDEPATH",
3712
+ payload: transformToUrl(e.target.value, false)
3713
+ });
3714
+ dispatchPath({
3715
+ type: "SET_URL_CHECK_FLAG",
3716
+ payload: true
3717
+ });
3718
+ },
3710
3719
  style: { outline: inputBorder }
3711
3720
  }
3712
3721
  ),
@@ -3795,8 +3804,8 @@ function reducer(state, action) {
3795
3804
  prevValue: state.value,
3796
3805
  needsUrlCheck: false
3797
3806
  };
3798
- case "RESET_URL_CHECK_FLAG":
3799
- return { ...state, needsUrlCheck: false };
3807
+ case "SET_URL_CHECK_FLAG":
3808
+ return { ...state, needsUrlCheck: action.payload || false };
3800
3809
  case "SET_REPLACEMENT":
3801
3810
  return { ...state, replacement: action.payload };
3802
3811
  case "SET_UIDPATH":
@@ -3928,7 +3937,7 @@ const Panel = ({ config }) => {
3928
3937
  if (path.needsUrlCheck && path.value) {
3929
3938
  if (path.uidPath === path.value || initialPath.current === path.value) return;
3930
3939
  debouncedCheckPath(path.value, route?.documentId || null);
3931
- dispatchPath({ type: "RESET_URL_CHECK_FLAG" });
3940
+ dispatchPath({ type: "SET_URL_CHECK_FLAG" });
3932
3941
  } else {
3933
3942
  setValidationState("idle");
3934
3943
  dispatchPath({ type: "SET_REPLACEMENT", payload: null });
@@ -4055,7 +4064,8 @@ const Panel = ({ config }) => {
4055
4064
  path,
4056
4065
  dispatchPath,
4057
4066
  isOverride,
4058
- config
4067
+ config,
4068
+ hasUserInteracted
4059
4069
  }
4060
4070
  ),
4061
4071
  validationState !== "initial" && /* @__PURE__ */ jsx(PathInfo, { validationState, replacement: path.replacement })
@@ -4141,7 +4151,7 @@ const index = {
4141
4151
  id: `${PLUGIN_ID}.link.paths`,
4142
4152
  defaultMessage: "Paths"
4143
4153
  },
4144
- Component: () => import("./index-BdyLsiR4.mjs"),
4154
+ Component: () => import("./index-Bp-XFH1V.mjs"),
4145
4155
  permissions: [pluginPermissions["page.routes"][0]]
4146
4156
  });
4147
4157
  app.addMenuLink({
@@ -4151,7 +4161,7 @@ const index = {
4151
4161
  id: `${PLUGIN_ID}.link.navigation`,
4152
4162
  defaultMessage: "Navigation"
4153
4163
  },
4154
- Component: () => import("./index-DkfE_arE.mjs"),
4164
+ Component: () => import("./index-DjLi4gIu.mjs"),
4155
4165
  permissions: [pluginPermissions["page.navigation"][0]]
4156
4166
  });
4157
4167
  app.addSettingsLink(
@@ -4169,7 +4179,7 @@ const index = {
4169
4179
  },
4170
4180
  id: `${PLUGIN_ID}-general`,
4171
4181
  to: `${PLUGIN_ID}/general`,
4172
- Component: () => import("./index-BMTlUOrK.mjs"),
4182
+ Component: () => import("./index-DqA1gNsu.mjs"),
4173
4183
  permissions: [pluginPermissions["settings.general"][0]]
4174
4184
  }
4175
4185
  );
@@ -4180,9 +4190,51 @@ const index = {
4180
4190
  },
4181
4191
  id: `${PLUGIN_ID}-navigation`,
4182
4192
  to: `${PLUGIN_ID}/navigation`,
4183
- Component: () => import("./index-DkEReTkt.mjs"),
4193
+ Component: () => import("./index-DLMGEpc0.mjs"),
4184
4194
  permissions: [pluginPermissions["settings.navigation"][0]]
4185
4195
  });
4196
+ app.customFields.register({
4197
+ name: "route-picker",
4198
+ pluginId: PLUGIN_ID,
4199
+ type: "string",
4200
+ intlLabel: {
4201
+ id: `${PLUGIN_ID}.route-picker.label`,
4202
+ defaultMessage: "Route Picker"
4203
+ },
4204
+ intlDescription: {
4205
+ id: `${PLUGIN_ID}.route-picker.description`,
4206
+ defaultMessage: "Select a route"
4207
+ },
4208
+ components: {
4209
+ Input: async () => import("./RoutePicker-C6omysLv.mjs").then((module) => ({
4210
+ default: module.default
4211
+ }))
4212
+ },
4213
+ options: {
4214
+ advanced: [
4215
+ {
4216
+ sectionTitle: {
4217
+ id: "global.settings",
4218
+ defaultMessage: "Settings"
4219
+ },
4220
+ items: [
4221
+ {
4222
+ name: "required",
4223
+ type: "checkbox",
4224
+ intlLabel: {
4225
+ id: "content-type-builder.form.attribute.item.requiredField",
4226
+ defaultMessage: "Required field"
4227
+ },
4228
+ description: {
4229
+ id: "content-type-builder.form.attribute.item.requiredField.description",
4230
+ defaultMessage: "You won't be able to create an entry if this field is empty"
4231
+ }
4232
+ }
4233
+ ]
4234
+ }
4235
+ ]
4236
+ }
4237
+ });
4186
4238
  app.registerPlugin({
4187
4239
  id: PLUGIN_ID,
4188
4240
  initializer: Initializer,
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const jsxRuntime = require("react/jsx-runtime");
4
4
  const React = require("react");
5
- const index = require("./index-BkPtrXJO.js");
5
+ const index = require("./index-ik3u6iCE.js");
6
6
  const admin = require("@strapi/strapi/admin");
7
7
  const designSystem = require("@strapi/design-system");
8
8
  require("@strapi/icons/symbols");