@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.
Files changed (69) hide show
  1. package/README.md +2 -3
  2. package/dist/_chunks/{_baseConvert-DVIhGQH6.js.map → _baseConvert-B84_vf8X.js.map} +1 -1
  3. package/dist/_chunks/{_baseConvert-CDjccxdO.mjs.map → _baseConvert-C2SW1VHq.mjs.map} +1 -1
  4. package/dist/_chunks/de-4tL_cJTC.js +104 -0
  5. package/dist/_chunks/de-4tL_cJTC.js.map +1 -0
  6. package/dist/_chunks/de-C8PE3n3B.mjs +104 -0
  7. package/dist/_chunks/de-C8PE3n3B.mjs.map +1 -0
  8. package/dist/_chunks/en-Bg4z3fR7.js +104 -0
  9. package/dist/_chunks/en-Bg4z3fR7.js.map +1 -0
  10. package/dist/_chunks/en-CR1YZvJo.mjs +104 -0
  11. package/dist/_chunks/en-CR1YZvJo.mjs.map +1 -0
  12. package/dist/_chunks/{index-B-ABW-o6.js → index-B0XE_zRP.js} +298 -91
  13. package/dist/_chunks/index-B2Tiv3EK.mjs +92 -0
  14. package/dist/_chunks/{index-HHBjOGX5.mjs → index-B48CGofU.mjs} +70 -30
  15. package/dist/_chunks/{index-HHBjOGX5.mjs.map → index-B48CGofU.mjs.map} +1 -1
  16. package/dist/_chunks/{index-CAjBRbaH.js → index-B85fJxGa.js} +170 -77
  17. package/dist/_chunks/{index-Cs_oxZfX.js → index-BbM9Sn1t.js} +169 -108
  18. package/dist/_chunks/{index-BxuR805w.mjs → index-BocSkZOu.mjs} +57 -17
  19. package/dist/_chunks/{index-D_OdzeaU.mjs → index-C7B8QHDT.mjs} +296 -89
  20. package/dist/_chunks/{index-BjbgWZrg.mjs → index-CCiDvLAC.mjs} +171 -78
  21. package/dist/_chunks/index-CXzNr2cH.mjs +93 -0
  22. package/dist/_chunks/index-CXzNr2cH.mjs.map +1 -0
  23. package/dist/_chunks/{index-kz3NL7uv.js → index-Cd6y6nuf.js} +57 -8
  24. package/dist/_chunks/index-Cd6y6nuf.js.map +1 -0
  25. package/dist/_chunks/{index-CPE1Ne_e.js → index-Cf9ZIBLd.js} +171 -78
  26. package/dist/_chunks/index-Cf9ZIBLd.js.map +1 -0
  27. package/dist/_chunks/{index-yLrZAFVv.mjs → index-D981K4TK.mjs} +172 -79
  28. package/dist/_chunks/index-D981K4TK.mjs.map +1 -0
  29. package/dist/_chunks/{index-Djk_-mU6.js → index-DGb8ESH-.js} +56 -9
  30. package/dist/_chunks/{index-CuMn96qA.js → index-DYiJBXKE.js} +300 -93
  31. package/dist/_chunks/index-DYiJBXKE.js.map +1 -0
  32. package/dist/_chunks/{index-B7vKSyAn.js → index-DjZ3ZaVB.js} +60 -20
  33. package/dist/_chunks/{index-B7vKSyAn.js.map → index-DjZ3ZaVB.js.map} +1 -1
  34. package/dist/_chunks/{index-ChOgKZGK.mjs → index-DkhJl5mF.mjs} +298 -91
  35. package/dist/_chunks/index-DkhJl5mF.mjs.map +1 -0
  36. package/dist/admin/index.js +1 -1
  37. package/dist/admin/index.mjs +1 -1
  38. package/dist/admin/src/components/CMEditViewAside/Alias.d.ts +1 -1
  39. package/dist/admin/src/components/URLInfo.d.ts +2 -1
  40. package/dist/admin/src/components/modals/NavModal.d.ts +2 -1
  41. package/dist/admin/src/utils/getRouteType.d.ts +2 -0
  42. package/dist/admin/src/utils/index.d.ts +2 -1
  43. package/dist/server/index.js +23 -12
  44. package/dist/server/index.js.map +1 -1
  45. package/dist/server/index.mjs +23 -12
  46. package/dist/server/index.mjs.map +1 -1
  47. package/dist/server/src/content-types/index.d.ts +5 -5
  48. package/dist/server/src/content-types/navigation/index.d.ts +1 -1
  49. package/dist/server/src/content-types/navigation/schema.d.ts +1 -1
  50. package/dist/server/src/content-types/navitem/index.d.ts +3 -3
  51. package/dist/server/src/content-types/navitem/schema.d.ts +3 -3
  52. package/dist/server/src/content-types/route/index.d.ts +1 -1
  53. package/dist/server/src/content-types/route/schema.d.ts +1 -1
  54. package/dist/server/src/index.d.ts +5 -5
  55. package/package.json +1 -1
  56. package/dist/_chunks/_baseConvert-CDjccxdO.mjs +0 -859
  57. package/dist/_chunks/_baseConvert-DVIhGQH6.js +0 -858
  58. package/dist/_chunks/en-B4KWt_jN.js +0 -4
  59. package/dist/_chunks/en-B4KWt_jN.js.map +0 -1
  60. package/dist/_chunks/en-Byx4XI2L.mjs +0 -4
  61. package/dist/_chunks/en-Byx4XI2L.mjs.map +0 -1
  62. package/dist/_chunks/index-1VNPebOd.mjs +0 -45
  63. package/dist/_chunks/index-1VNPebOd.mjs.map +0 -1
  64. package/dist/_chunks/index-B5ilx6DT.mjs +0 -44
  65. package/dist/_chunks/index-CPE1Ne_e.js.map +0 -1
  66. package/dist/_chunks/index-ChOgKZGK.mjs.map +0 -1
  67. package/dist/_chunks/index-CuMn96qA.js.map +0 -1
  68. package/dist/_chunks/index-Djk_-mU6.js.map +0 -1
  69. package/dist/_chunks/index-yLrZAFVv.mjs.map +0 -1
@@ -5,6 +5,7 @@ const icons = require("@strapi/icons");
5
5
  const admin = require("@strapi/strapi/admin");
6
6
  const designSystem = require("@strapi/design-system");
7
7
  const ReactDOM = require("react-dom");
8
+ const reactIntl = require("react-intl");
8
9
  function _interopNamespace(e) {
9
10
  if (e && e.__esModule) return e;
10
11
  const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
@@ -40,7 +41,7 @@ const __variableDynamicImportRuntimeHelper = (glob, path, segs) => {
40
41
  );
41
42
  });
42
43
  };
43
- const version = "0.2.4";
44
+ const version = "0.2.6";
44
45
  const keywords = [];
45
46
  const type = "commonjs";
46
47
  const exports$1 = {
@@ -164,6 +165,7 @@ const pluginPkg = {
164
165
  packageManager
165
166
  };
166
167
  const PLUGIN_ID = pluginPkg.strapi.name.replace(/^(@[^-,.][\w,-]+\/|strapi-)plugin-/i, "") || "webatlas";
168
+ const PLUGIN_NAME = pluginPkg.strapi.displayName;
167
169
  const Initializer = ({ setPlugin }) => {
168
170
  const ref = React.useRef(setPlugin);
169
171
  React.useEffect(() => {
@@ -3659,6 +3661,7 @@ function Tooltip({ description: description2 }) {
3659
3661
  background: "neutral1000",
3660
3662
  hasRadius: true,
3661
3663
  shadow: "filterShadow",
3664
+ maxWidth: "300px",
3662
3665
  children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { textColor: "neutral0", children: description2 })
3663
3666
  }
3664
3667
  ) }) })
@@ -3675,19 +3678,6 @@ function debounce(func, wait) {
3675
3678
  timeout = setTimeout(later, wait);
3676
3679
  };
3677
3680
  }
3678
- function URLInfo({ validationState, replacement }) {
3679
- if (validationState === "initial") return null;
3680
- let color = "neutral800";
3681
- let text = "Checking if URL is available...";
3682
- if (validationState === "checking") {
3683
- color = "neutral800";
3684
- text = "Checking if URL is available...";
3685
- } else if (validationState === "done") {
3686
- color = replacement ? "danger500" : "success500";
3687
- text = replacement ? `URL is not available. Replaced with "${replacement}".` : "URL is available";
3688
- }
3689
- return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { paddingTop: 2, children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { textColor: color, children: text }) });
3690
- }
3691
3681
  async function duplicateCheck(url, routeDocumentId) {
3692
3682
  if (!url) throw new Error("URL is required");
3693
3683
  try {
@@ -3699,6 +3689,33 @@ async function duplicateCheck(url, routeDocumentId) {
3699
3689
  throw new Error("Failed to check URL uniqueness");
3700
3690
  }
3701
3691
  }
3692
+ const getTranslation = (id) => `${PLUGIN_ID}.${id}`;
3693
+ function URLInfo({ validationState, replacement, setUrlStatus }) {
3694
+ const [color, setColor] = React.useState(null);
3695
+ const [text, setText] = React.useState(null);
3696
+ const { formatMessage } = reactIntl.useIntl();
3697
+ React.useEffect(() => {
3698
+ if (validationState === "initial") return;
3699
+ if (validationState === "checking") {
3700
+ setColor("neutral800");
3701
+ setText(formatMessage({
3702
+ id: getTranslation("components.URLInfo.checking"),
3703
+ defaultMessage: "Checking if URL is available..."
3704
+ }));
3705
+ } else if (validationState === "done") {
3706
+ setColor(replacement ? "danger500" : "success500");
3707
+ setText(replacement ? `${formatMessage({
3708
+ id: getTranslation("components.URLInfo.notAvailable"),
3709
+ defaultMessage: "URL is not available. Replaced with"
3710
+ })} "${replacement}".` : formatMessage({
3711
+ id: getTranslation("components.URLInfo.available"),
3712
+ defaultMessage: "URL is available."
3713
+ }));
3714
+ if (setUrlStatus) setUrlStatus(replacement ? "invalid" : "valid");
3715
+ }
3716
+ }, [validationState, replacement, formatMessage, setUrlStatus]);
3717
+ return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { paddingTop: 2, children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { textColor: color, children: text }) });
3718
+ }
3702
3719
  function reducer(state, action) {
3703
3720
  switch (action.type) {
3704
3721
  case "DEFAULT":
@@ -3733,14 +3750,16 @@ function reducer(state, action) {
3733
3750
  }
3734
3751
  }
3735
3752
  const Alias = ({ config }) => {
3736
- const { layout, form } = admin.unstable_useContentManagerContext();
3753
+ const { form } = admin.unstable_useContentManagerContext();
3737
3754
  const { initialValues, values, onChange } = form;
3738
3755
  const { getRelatedRoute } = useApi();
3756
+ const { formatMessage } = reactIntl.useIntl();
3739
3757
  const [routeId, setRouteId] = React.useState();
3740
3758
  const [isOverride, setIsOverride] = React.useState(false);
3741
3759
  const [validationState, setValidationState] = React.useState("initial");
3742
3760
  const [replacement, setReplacement] = React.useState("");
3743
3761
  const [initialLoadComplete, setInitialLoadComplete] = React.useState(false);
3762
+ const [urlIsValid, setUrlIsValid] = React.useState(null);
3744
3763
  const [path, dispatchPath] = React.useReducer(reducer, {
3745
3764
  needsUrlCheck: false,
3746
3765
  value: "",
@@ -3750,39 +3769,39 @@ const Alias = ({ config }) => {
3750
3769
  const hasUserChangedField = React.useRef(false);
3751
3770
  const initialPath = React.useRef("");
3752
3771
  const prevValueRef = React.useRef(null);
3753
- if (!config) return null;
3754
- const debouncedCheckUrl = React.useCallback(debounce(checkUrl, 500), []);
3772
+ const debouncedCheckUrl = React.useCallback(debounce(checkUrl, 250), []);
3755
3773
  React.useEffect(() => {
3756
3774
  onChange("webatlas_path", path.value);
3757
3775
  onChange("webatlas_override", isOverride);
3758
- }, [path.value, routeId, isOverride]);
3759
- const debouncedValueEffect = React.useMemo(
3760
- () => debounce((currentValues) => {
3761
- const key = config?.default;
3762
- if (!key) return;
3763
- const currentValue = currentValues[key];
3764
- if (!currentValue) {
3765
- dispatchPath({ type: "NO_URL_CHECK", payload: "" });
3766
- return;
3767
- }
3768
- if (initialLoadComplete && (hasUserChangedField.current || !routeId) && prevValueRef.current !== currentValue && !isOverride) {
3769
- const path2 = config.pattern ? `${config.pattern}/${currentValue}` : `${currentValue}`;
3770
- if (currentValue === initialValues[key]) {
3771
- dispatchPath({ type: "NO_URL_CHECK", payload: path2 });
3772
- } else {
3773
- dispatchPath({ type: "DEFAULT", payload: path2 });
3774
- }
3775
- prevValueRef.current = currentValue;
3776
+ }, [path.value, isOverride]);
3777
+ const debouncedValueEffect = React.useMemo(() => debounce((currentValues) => {
3778
+ const key = config?.default;
3779
+ if (!key) return;
3780
+ const currentValue = currentValues[key];
3781
+ if (!currentValue) {
3782
+ dispatchPath({ type: "NO_URL_CHECK", payload: "" });
3783
+ return;
3784
+ }
3785
+ if (initialLoadComplete && (hasUserChangedField.current || !routeId) && prevValueRef.current !== currentValue && !isOverride) {
3786
+ const path2 = config.pattern ? `${config.pattern}/${currentValue}` : `${currentValue}`;
3787
+ if (currentValue === initialValues[key]) {
3788
+ dispatchPath({ type: "NO_URL_CHECK", payload: path2 });
3789
+ } else {
3790
+ dispatchPath({ type: "DEFAULT", payload: path2 });
3776
3791
  }
3777
- }, 500),
3778
- [config?.default, config?.pattern, initialValues, isOverride, initialLoadComplete, routeId]
3779
- );
3792
+ prevValueRef.current = currentValue;
3793
+ }
3794
+ }, 500), [config?.default, config?.pattern, initialValues, isOverride, initialLoadComplete, routeId]);
3780
3795
  React.useEffect(() => {
3781
- if (!initialLoadComplete) return;
3782
3796
  const key = config?.default;
3783
3797
  if (!key) return;
3784
3798
  const currentValue = values[key];
3785
3799
  const initialValue = initialValues[key];
3800
+ if (currentValue && !isOverride) {
3801
+ const path2 = config.pattern ? `${config.pattern}/${currentValue}` : `${currentValue}`;
3802
+ onChange("webatlas_path", path2);
3803
+ }
3804
+ if (!initialLoadComplete) return;
3786
3805
  if (currentValue !== initialValue) {
3787
3806
  hasUserChangedField.current = true;
3788
3807
  }
@@ -3838,9 +3857,14 @@ const Alias = ({ config }) => {
3838
3857
  } catch (err) {
3839
3858
  console.log(err);
3840
3859
  } finally {
3860
+ setUrlIsValid(null);
3841
3861
  setValidationState("done");
3842
3862
  }
3843
3863
  }
3864
+ if (!initialLoadComplete) return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { textColor: "neutral600", children: formatMessage({
3865
+ id: getTranslation("components.CMEditViewAside.loading"),
3866
+ defaultMessage: "Loading..."
3867
+ }) });
3844
3868
  return /* @__PURE__ */ jsxRuntime.jsx(
3845
3869
  designSystem.Box,
3846
3870
  {
@@ -3855,28 +3879,53 @@ const Alias = ({ config }) => {
3855
3879
  gap: 4,
3856
3880
  children: [
3857
3881
  /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Box, { children: [
3858
- /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Field.Root, { hint: !initialValues.id && !config.default ? "[id] will be replaced with the entry ID" : "", children: [
3859
- /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Field.Label, { children: [
3860
- "URL",
3861
- /* @__PURE__ */ jsxRuntime.jsx(Tooltip, { description: "The following characters are valid: A-Z, a-z, 0-9, /, -, _, $, ., +, !, *, ', (, )" })
3862
- ] }),
3863
- /* @__PURE__ */ jsxRuntime.jsx(
3864
- designSystem.Field.Input,
3865
- {
3866
- id: "url-input",
3867
- value: path.value,
3868
- placeholder: config.default ? `Edit the "${config.default}" field to generate a URL` : `${layout.list.settings.displayName?.toLowerCase()}/[id]`,
3869
- onChange: (e) => dispatchPath({ type: "NO_TRANSFORM_AND_CHECK", payload: e.target.value }),
3870
- disabled: !isOverride,
3871
- onBlur: (e) => {
3872
- if (e.target.value === path.prevValue) return;
3873
- dispatchPath({ type: "DEFAULT", payload: e.target.value });
3874
- }
3875
- }
3876
- ),
3877
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Hint, {})
3882
+ !routeId && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
3883
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { textColor: "neutral600", marginBottom: 2, children: formatMessage({
3884
+ id: getTranslation("components.CMEditViewAside.alias.newRouteInfo"),
3885
+ defaultMessage: "A new URL route will be created upon saving this entry."
3886
+ }) }),
3887
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { paddingBottom: 2, paddingTop: 2, children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Divider, {}) })
3878
3888
  ] }),
3879
- /* @__PURE__ */ jsxRuntime.jsx(URLInfo, { validationState, replacement }),
3889
+ /* @__PURE__ */ jsxRuntime.jsxs(
3890
+ designSystem.Field.Root,
3891
+ {
3892
+ hint: formatMessage({
3893
+ id: getTranslation("components.CMEditViewAside.alias.urlInput.start"),
3894
+ defaultMessage: "Edit the"
3895
+ }) + ' "' + config.default + '" ' + formatMessage({
3896
+ id: getTranslation("components.CMEditViewAside.alias.urlInput.end"),
3897
+ defaultMessage: "field to generate a URL"
3898
+ }),
3899
+ children: [
3900
+ /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Field.Label, { children: [
3901
+ formatMessage({
3902
+ id: getTranslation("components.CMEditViewAside.alias.urlInput.label"),
3903
+ defaultMessage: "URL"
3904
+ }),
3905
+ /* @__PURE__ */ jsxRuntime.jsx(Tooltip, { description: formatMessage({
3906
+ id: getTranslation("components.CMEditViewAside.alias.urlInput.tooltip"),
3907
+ defaultMessage: "The following characters are valid: A-Z, a-z, 0-9, /, -, _, $, ., +, !, *, ', (, )"
3908
+ }) })
3909
+ ] }),
3910
+ /* @__PURE__ */ jsxRuntime.jsx(
3911
+ designSystem.Field.Input,
3912
+ {
3913
+ id: "url-input",
3914
+ value: path.value,
3915
+ onChange: (e) => dispatchPath({ type: "NO_TRANSFORM_AND_CHECK", payload: e.target.value }),
3916
+ disabled: !isOverride,
3917
+ onBlur: (e) => {
3918
+ if (e.target.value === path.prevValue) return;
3919
+ dispatchPath({ type: "DEFAULT", payload: e.target.value });
3920
+ },
3921
+ style: { outline: urlIsValid !== null ? urlIsValid === "valid" ? "1px solid #5cb176" : "1px solid #ee5e52" : void 0 }
3922
+ }
3923
+ ),
3924
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Hint, {})
3925
+ ]
3926
+ }
3927
+ ),
3928
+ /* @__PURE__ */ jsxRuntime.jsx(URLInfo, { validationState, replacement, setUrlStatus: setUrlIsValid }),
3880
3929
  /* @__PURE__ */ jsxRuntime.jsx(
3881
3930
  designSystem.Flex,
3882
3931
  {
@@ -3888,7 +3937,10 @@ const Alias = ({ config }) => {
3888
3937
  id: "override-url",
3889
3938
  checked: isOverride,
3890
3939
  onCheckedChange: () => setIsOverride((prev) => !prev),
3891
- children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { textColor: "neutral600", children: "Override generated URL" })
3940
+ children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { textColor: "neutral600", children: formatMessage({
3941
+ id: getTranslation("components.CMEditViewAside.alias.overrideCheckbox"),
3942
+ defaultMessage: "Override automatic URL generation"
3943
+ }) })
3892
3944
  }
3893
3945
  )
3894
3946
  }
@@ -3899,8 +3951,14 @@ const Alias = ({ config }) => {
3899
3951
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { children: /* @__PURE__ */ jsxRuntime.jsxs(
3900
3952
  designSystem.Field.Root,
3901
3953
  {
3902
- hint: "Permanent UID path, cannot be changed.",
3903
- label: "UID path",
3954
+ hint: formatMessage({
3955
+ id: getTranslation("components.CMEditViewAside.alias.uidRoute.hint"),
3956
+ defaultMessage: "Permanent UID route, cannot be changed"
3957
+ }),
3958
+ label: formatMessage({
3959
+ id: getTranslation("components.CMEditViewAside.alias.uidRoute.label"),
3960
+ defaultMessage: "UID route"
3961
+ }),
3904
3962
  children: [
3905
3963
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Label, {}),
3906
3964
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -3917,8 +3975,14 @@ const Alias = ({ config }) => {
3917
3975
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { children: /* @__PURE__ */ jsxRuntime.jsxs(
3918
3976
  designSystem.Field.Root,
3919
3977
  {
3920
- hint: "Permanent DocumentID path, cannot be changed.",
3921
- label: "DocumentID path",
3978
+ hint: formatMessage({
3979
+ id: getTranslation("components.CMEditViewAside.alias.documentIdRoute.hint"),
3980
+ defaultMessage: "Permanent Document ID route, cannot be changed"
3981
+ }),
3982
+ label: formatMessage({
3983
+ id: getTranslation("components.CMEditViewAside.alias.documentIdRoute.label"),
3984
+ defaultMessage: "Document ID route"
3985
+ }),
3922
3986
  children: [
3923
3987
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Label, {}),
3924
3988
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -3947,6 +4011,7 @@ const CMEditViewAside = () => {
3947
4011
  const [isAllowedContentType, setIsAllowedContentType] = React.useState(false);
3948
4012
  const [isActiveContentType, setIsActiveContentType] = React.useState(false);
3949
4013
  const [isLoading, setIsLoading] = React.useState(true);
4014
+ const { formatMessage } = reactIntl.useIntl();
3950
4015
  React.useEffect(() => {
3951
4016
  if (!config) return;
3952
4017
  const contentType = contentTypes?.find((ct) => ct.uid === model);
@@ -3978,17 +4043,43 @@ const CMEditViewAside = () => {
3978
4043
  }
3979
4044
  });
3980
4045
  }, []);
3981
- if (isLoading) return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { textColor: "neutral600", children: "Loading..." });
4046
+ if (isLoading || !config) return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { textColor: "neutral600", children: formatMessage({
4047
+ id: getTranslation("components.CMEditViewAside.loading"),
4048
+ defaultMessage: "Loading..."
4049
+ }) });
3982
4050
  if (!isAllowedContentType) return /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Typography, { textColor: "neutral600", children: [
3983
- "This content type is not allowed for ",
3984
- /* @__PURE__ */ jsxRuntime.jsx("strong", { children: "WebAtlas" }),
3985
- ". If you wish to use it, please contact your administrator."
4051
+ formatMessage({
4052
+ id: getTranslation("components.CMEditViewAside.notAllowed.start"),
4053
+ defaultMessage: "This content type is not allowed for"
4054
+ }),
4055
+ " ",
4056
+ /* @__PURE__ */ jsxRuntime.jsx("strong", { children: PLUGIN_NAME }),
4057
+ ".",
4058
+ " ",
4059
+ formatMessage({
4060
+ id: getTranslation("components.CMEditViewAside.notAllowed.end"),
4061
+ defaultMessage: "If you wish to use it, please contact your administrator"
4062
+ }),
4063
+ "."
3986
4064
  ] });
3987
4065
  if (!isActiveContentType || !contentTypeConfig) return /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Typography, { textColor: "neutral600", children: [
3988
- "This content type is not configured for ",
3989
- /* @__PURE__ */ jsxRuntime.jsx("strong", { children: "WebAtlas" }),
3990
- ". If you wish to use it, please configure it in the",
3991
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Link, { href: "/admin/settings/webatlas/configuration", marginLeft: 1, children: "settings" }),
4066
+ formatMessage({
4067
+ id: getTranslation("components.CMEditViewAside.notConfigured.start"),
4068
+ defaultMessage: "This content type is not configured for"
4069
+ }),
4070
+ " ",
4071
+ /* @__PURE__ */ jsxRuntime.jsx("strong", { children: PLUGIN_NAME }),
4072
+ ".",
4073
+ " ",
4074
+ formatMessage({
4075
+ id: getTranslation("components.CMEditViewAside.notConfigured.middle"),
4076
+ defaultMessage: "If you wish to use it, please configure it in the"
4077
+ }),
4078
+ " ",
4079
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Link, { href: "/admin/settings/webatlas/configuration", children: formatMessage({
4080
+ id: getTranslation("components.CMEditViewAside.notConfigured.end"),
4081
+ defaultMessage: "settings"
4082
+ }) }),
3992
4083
  "."
3993
4084
  ] });
3994
4085
  return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsx(Alias, { config: contentTypeConfig }) });
@@ -4003,7 +4094,7 @@ const index = {
4003
4094
  defaultMessage: "Routes"
4004
4095
  },
4005
4096
  Component: async () => {
4006
- const component = await Promise.resolve().then(() => require("./index-kz3NL7uv.js"));
4097
+ const component = await Promise.resolve().then(() => require("./index-DGb8ESH-.js"));
4007
4098
  return { default: component.default };
4008
4099
  },
4009
4100
  permissions: [
@@ -4022,7 +4113,7 @@ const index = {
4022
4113
  defaultMessage: "Navigation"
4023
4114
  },
4024
4115
  Component: async () => {
4025
- const component = await Promise.resolve().then(() => require("./index-B-ABW-o6.js"));
4116
+ const component = await Promise.resolve().then(() => require("./index-B0XE_zRP.js"));
4026
4117
  return { default: component.default };
4027
4118
  },
4028
4119
  permissions: [
@@ -4051,7 +4142,7 @@ const index = {
4051
4142
  Component: async () => {
4052
4143
  return await Promise.resolve().then(() => require(
4053
4144
  /* webpackChunkName: "webatlas-settings-page" */
4054
- "./index-Cs_oxZfX.js"
4145
+ "./index-BbM9Sn1t.js"
4055
4146
  ));
4056
4147
  },
4057
4148
  permissions: [
@@ -4080,7 +4171,7 @@ const index = {
4080
4171
  return Promise.all(
4081
4172
  locales.map(async (locale) => {
4082
4173
  try {
4083
- const { default: data } = await __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "./translations/en.json": () => Promise.resolve().then(() => require("./en-B4KWt_jN.js")) }), `./translations/${locale}.json`, 3);
4174
+ const { default: data } = await __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "./translations/de.json": () => Promise.resolve().then(() => require("./de-4tL_cJTC.js")), "./translations/en.json": () => Promise.resolve().then(() => require("./en-Bg4z3fR7.js")) }), `./translations/${locale}.json`, 3);
4084
4175
  return { data, locale };
4085
4176
  } catch {
4086
4177
  return { data: {}, locale };
@@ -4089,11 +4180,13 @@ const index = {
4089
4180
  );
4090
4181
  }
4091
4182
  };
4183
+ exports.PLUGIN_NAME = PLUGIN_NAME;
4092
4184
  exports.Tooltip = Tooltip;
4093
4185
  exports.URLInfo = URLInfo;
4094
4186
  exports._extends = _extends;
4095
4187
  exports.debounce = debounce;
4096
4188
  exports.duplicateCheck = duplicateCheck;
4189
+ exports.getTranslation = getTranslation;
4097
4190
  exports.index = index;
4098
4191
  exports.transformToUrl = transformToUrl;
4099
4192
  exports.useAllContentTypes = useAllContentTypes;