@mattisvensson/strapi-plugin-webatlas 0.7.0 → 0.8.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 (72) hide show
  1. package/dist/_chunks/FullLoader-Cmsf8xS6.js +0 -12
  2. package/dist/_chunks/FullLoader-Cmsf8xS6.js.map +0 -1
  3. package/dist/_chunks/FullLoader-CrPED_dY.mjs +0 -1
  4. package/dist/_chunks/PageWrapper-B6nLPFak.mjs +55 -0
  5. package/dist/_chunks/PageWrapper-BMzPDWn4.js +0 -0
  6. package/dist/_chunks/PageWrapper-BMzPDWn4.js.map +0 -0
  7. package/dist/_chunks/{de-oxxH8hft.mjs → de-C1QgkRoj.mjs} +3 -2
  8. package/dist/_chunks/de-DYxCPOdb.js +0 -0
  9. package/dist/_chunks/de-DYxCPOdb.js.map +0 -0
  10. package/dist/_chunks/{en-DqC5aDzA.mjs → en--8p5hbLP.mjs} +3 -2
  11. package/dist/_chunks/en-Be-athEA.js +0 -0
  12. package/dist/_chunks/en-Be-athEA.js.map +0 -0
  13. package/dist/_chunks/{index-DKdAgBbF.mjs → index-7rox7tGX.mjs} +94 -123
  14. package/dist/_chunks/index-Bu-uQ9jA.js +0 -0
  15. package/dist/_chunks/index-Bu-uQ9jA.js.map +0 -0
  16. package/dist/_chunks/index-C53yDU_z.js +0 -0
  17. package/dist/_chunks/index-C53yDU_z.js.map +0 -0
  18. package/dist/_chunks/index-CAz59RSr.js +0 -0
  19. package/dist/_chunks/index-CAz59RSr.js.map +0 -0
  20. package/dist/_chunks/{index-BdlPAWj6.mjs → index-DGSjLYNl.mjs} +1 -1
  21. package/dist/_chunks/index-DKfUSLPc.js +0 -0
  22. package/dist/_chunks/index-DKfUSLPc.js.map +0 -0
  23. package/dist/_chunks/index-DPMhcaxW.js +0 -0
  24. package/dist/_chunks/index-DPMhcaxW.js.map +0 -0
  25. package/dist/_chunks/{index-CZ5qsGXH.mjs → index-DSPh-fHL.mjs} +39 -12
  26. package/dist/_chunks/index-VcxUbdMO.mjs +123 -0
  27. package/dist/_chunks/{index-B6MYtu3A.mjs → index-Z3qq1ab8.mjs} +39 -39
  28. package/dist/admin/index.js +0 -5
  29. package/dist/admin/index.js.map +0 -1
  30. package/dist/admin/index.mjs +1 -2
  31. package/dist/admin/src/hooks/usePluginConfig.d.ts +1 -1
  32. package/dist/admin/src/pages/Settings/{ContentTypeAccordion.d.ts → General/ContentTypeAccordion.d.ts} +1 -1
  33. package/dist/admin/src/pages/Settings/Navigation/index.d.ts +2 -0
  34. package/dist/admin/src/pages/Settings/PageWrapper.d.ts +3 -4
  35. package/dist/admin/src/utils/dnd.d.ts +1 -1
  36. package/dist/server/index.js +22 -13
  37. package/dist/server/index.mjs +22 -13
  38. package/dist/server/src/index.d.ts +1 -1
  39. package/dist/server/src/services/admin.d.ts +2 -2
  40. package/dist/server/src/services/index.d.ts +1 -1
  41. package/package.json +1 -1
  42. package/dist/_chunks/FullLoader-CrPED_dY.mjs.map +0 -1
  43. package/dist/_chunks/de-BZc1BkzH.js +0 -121
  44. package/dist/_chunks/de-BZc1BkzH.js.map +0 -1
  45. package/dist/_chunks/de-oxxH8hft.mjs.map +0 -1
  46. package/dist/_chunks/en-Deg4n_IM.js +0 -121
  47. package/dist/_chunks/en-Deg4n_IM.js.map +0 -1
  48. package/dist/_chunks/en-DqC5aDzA.mjs.map +0 -1
  49. package/dist/_chunks/index-B6MYtu3A.mjs.map +0 -1
  50. package/dist/_chunks/index-BEgpEtto.mjs +0 -247
  51. package/dist/_chunks/index-BEgpEtto.mjs.map +0 -1
  52. package/dist/_chunks/index-BOEv4jIJ.js +0 -4177
  53. package/dist/_chunks/index-BOEv4jIJ.js.map +0 -1
  54. package/dist/_chunks/index-BPhRQoGD.mjs +0 -282
  55. package/dist/_chunks/index-BPhRQoGD.mjs.map +0 -1
  56. package/dist/_chunks/index-Bg96TqDm.js +0 -247
  57. package/dist/_chunks/index-Bg96TqDm.js.map +0 -1
  58. package/dist/_chunks/index-BgzZLDPv.mjs +0 -12229
  59. package/dist/_chunks/index-BoVX1KF8.js +0 -246
  60. package/dist/_chunks/index-ByU38WNH.js +0 -4176
  61. package/dist/_chunks/index-CZ5qsGXH.mjs.map +0 -1
  62. package/dist/_chunks/index-D3xDvB4d.mjs +0 -4160
  63. package/dist/_chunks/index-D_QCV5Z5.js +0 -282
  64. package/dist/_chunks/index-D_QCV5Z5.js.map +0 -1
  65. package/dist/_chunks/index-UJ0LQ3Y3.js +0 -281
  66. package/dist/_chunks/index-dSU20yZ4.js +0 -12229
  67. package/dist/_chunks/index-mObQ5NXj.js +0 -12230
  68. package/dist/_chunks/index-mObQ5NXj.js.map +0 -1
  69. package/dist/admin/index.mjs.map +0 -1
  70. package/dist/server/index.js.map +0 -1
  71. package/dist/server/index.mjs.map +0 -1
  72. /package/dist/admin/src/pages/Settings/{index.d.ts → General/index.d.ts} +0 -0
@@ -5,7 +5,7 @@ import { Box, Typography, Dialog, Button, Modal, Flex, SingleSelect, SingleSelec
5
5
  import { useState, useEffect, createContext, useRef, useContext, useReducer, useCallback, useMemo, 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, d as debounce, a as duplicateCheck, t as transformToUrl, U as URLInfo } from "./index-CZ5qsGXH.mjs";
8
+ import { u as useApi, g as getTranslation, d as debounce, a as duplicateCheck, t as transformToUrl, U as URLInfo, b as usePluginConfig } from "./index-DSPh-fHL.mjs";
9
9
  import { useFetchClient, useNotification, Page, Layouts } from "@strapi/strapi/admin";
10
10
  import { C as Center, F as FullLoader } from "./FullLoader-CrPED_dY.mjs";
11
11
  import { EmptyDocuments } from "@strapi/icons/symbols";
@@ -97,7 +97,6 @@ function Delete({ variant, item, onDelete }) {
97
97
  const { setModalType } = useContext(ModalContext);
98
98
  const { formatMessage } = useIntl();
99
99
  const { deleteNavigation } = useApi();
100
- useNavigate();
101
100
  const handleDelete = async () => {
102
101
  try {
103
102
  if (variant === "NavDelete") {
@@ -4650,31 +4649,30 @@ function ItemCreateComponent({
4650
4649
  }, [path.needsUrlCheck, entityRoute?.documentId]);
4651
4650
  useEffect(() => {
4652
4651
  async function fetchRoute() {
4653
- if (selectedContentType?.contentType && selectedEntity?.id) {
4654
- setLoadingRoute(true);
4655
- try {
4656
- const route = await getRelatedRoute(selectedEntity.documentId);
4657
- if (!route) throw new Error("No route found for the selected entity");
4658
- dispatchPath({ type: "NO_URL_CHECK", payload: route.fullPath });
4659
- dispatchPath({ type: "SET_UIDPATH", payload: route.uidPath });
4660
- dispatchPath({ type: "SET_INITIALPATH", payload: route.fullPath });
4661
- dispatchItemState({ type: "SET_TITLE", payload: route.title });
4662
- dispatchItemState({ type: "SET_ACTIVE", payload: route.active });
4663
- dispatchItemState({ type: "SET_INTERNAL", payload: route.internal });
4664
- dispatchItemState({ type: "SET_OVERRIDE", payload: route.isOverride });
4665
- initialState.current = {
4666
- title: route.title,
4667
- slug: route.fullPath,
4668
- active: route.active,
4669
- internal: route.internal,
4670
- isOverride: route.isOverride
4671
- };
4672
- setEntityRoute(route);
4673
- } catch (err) {
4674
- console.log(err);
4675
- } finally {
4676
- setLoadingRoute(false);
4677
- }
4652
+ if (!selectedContentType?.contentType || !selectedEntity?.documentId) return;
4653
+ setLoadingRoute(true);
4654
+ try {
4655
+ const route = await getRelatedRoute(selectedEntity.documentId);
4656
+ if (!route) throw new Error("No route found for the selected entity");
4657
+ dispatchPath({ type: "NO_URL_CHECK", payload: route.fullPath });
4658
+ dispatchPath({ type: "SET_UIDPATH", payload: route.uidPath });
4659
+ dispatchPath({ type: "SET_INITIALPATH", payload: route.fullPath });
4660
+ dispatchItemState({ type: "SET_TITLE", payload: route.title });
4661
+ dispatchItemState({ type: "SET_ACTIVE", payload: route.active });
4662
+ dispatchItemState({ type: "SET_INTERNAL", payload: route.internal });
4663
+ dispatchItemState({ type: "SET_OVERRIDE", payload: route.isOverride });
4664
+ initialState.current = {
4665
+ title: route.title,
4666
+ slug: route.fullPath,
4667
+ active: route.active,
4668
+ internal: route.internal,
4669
+ isOverride: route.isOverride
4670
+ };
4671
+ setEntityRoute(route);
4672
+ } catch (err) {
4673
+ console.log(err);
4674
+ } finally {
4675
+ setLoadingRoute(false);
4678
4676
  }
4679
4677
  }
4680
4678
  fetchRoute();
@@ -10587,7 +10585,7 @@ const measuring = {
10587
10585
  }
10588
10586
  };
10589
10587
  const indentationWidth = 48;
10590
- function getProjection(items, activeId, overId, dragOffset) {
10588
+ function getProjection(items, activeId, overId, dragOffset, maxDepthValue) {
10591
10589
  if (!items) return { depth: 0, maxDepth: 0, minDepth: 0 };
10592
10590
  const overItemIndex = items.findIndex(({ id }) => id === overId);
10593
10591
  const activeItemIndex = items.findIndex(({ id }) => id === activeId);
@@ -10596,7 +10594,7 @@ function getProjection(items, activeId, overId, dragOffset) {
10596
10594
  const previousItem = newItems[overItemIndex - 1];
10597
10595
  const dragDepth = getDragDepth(dragOffset, indentationWidth);
10598
10596
  const projectedDepth = activeItem && typeof activeItem.depth === "number" ? activeItem.depth + dragDepth : 0;
10599
- let maxDepth = getMaxDepth({ previousItem });
10597
+ let maxDepth = getMaxDepth({ previousItem, maxDepthValue });
10600
10598
  let minDepth = 0;
10601
10599
  let depth = projectedDepth;
10602
10600
  if (projectedDepth >= maxDepth) {
@@ -10606,9 +10604,9 @@ function getProjection(items, activeId, overId, dragOffset) {
10606
10604
  }
10607
10605
  return { depth, maxDepth, minDepth };
10608
10606
  }
10609
- function getMaxDepth({ previousItem }) {
10607
+ function getMaxDepth({ previousItem, maxDepthValue }) {
10610
10608
  if (previousItem && typeof previousItem.depth === "number") {
10611
- return previousItem.depth + 1;
10609
+ return Math.min(previousItem.depth + 1, maxDepthValue - 1);
10612
10610
  }
10613
10611
  return 0;
10614
10612
  }
@@ -11839,6 +11837,7 @@ const Navigation = () => {
11839
11837
  const [isSavingNavigation, setIsSavingNavigation] = useState(false);
11840
11838
  const [loading, setLoading] = useState(true);
11841
11839
  const cachedNavigations = useRef(null);
11840
+ const { config } = usePluginConfig();
11842
11841
  const [projected, setProjected] = useState(null);
11843
11842
  const [activeItem, setActiveItem] = useState();
11844
11843
  const [activeId, setActiveId] = useState(null);
@@ -11907,9 +11906,9 @@ const Navigation = () => {
11907
11906
  async function fetchNavigations() {
11908
11907
  if (!navigationId) {
11909
11908
  const navs = await getNavigation({ variant: "namesOnly" });
11910
- if (navs && navs.length > 0) {
11909
+ if (navs && navs.length > 0)
11911
11910
  navigate(`/plugins/webatlas/navigation/${navs[0].documentId}`);
11912
- }
11911
+ setLoading(false);
11913
11912
  return;
11914
11913
  }
11915
11914
  if (cachedNavigations.current) {
@@ -12028,11 +12027,12 @@ const Navigation = () => {
12028
12027
  navigationItems,
12029
12028
  activeId,
12030
12029
  overId,
12031
- offsetLeft
12030
+ offsetLeft,
12031
+ config?.navigation.maxDepth || 3
12032
12032
  ) : null;
12033
12033
  setProjected(projection);
12034
12034
  }, [activeId, overId, offsetLeft, navigationItems]);
12035
- if (loading || !navigationId) {
12035
+ if (loading) {
12036
12036
  return /* @__PURE__ */ jsx(PageWrapper, { navigations, loading, children: /* @__PURE__ */ jsx(FullLoader, {}) });
12037
12037
  }
12038
12038
  return /* @__PURE__ */ jsx(ModalContext.Provider, { value: { modalType, setModalType }, children: /* @__PURE__ */ jsxs(SelectedNavigationContext.Provider, { value: { selectedNavigation, setSelectedNavigation }, children: [
@@ -12125,8 +12125,9 @@ const Navigation = () => {
12125
12125
  {
12126
12126
  variant: "NavDelete",
12127
12127
  item: actionItem,
12128
- onDelete: async () => {
12128
+ onDelete: async (deletedItem) => {
12129
12129
  cachedNavigations.current = null;
12130
+ setNavigations((navs) => navs.filter((nav) => nav.id !== deletedItem.id));
12130
12131
  navigate("/plugins/webatlas/navigation");
12131
12132
  }
12132
12133
  }
@@ -12153,9 +12154,9 @@ const Navigation = () => {
12153
12154
  {
12154
12155
  variant: "ItemDelete",
12155
12156
  item: actionItem,
12156
- onDelete: (editedItem) => {
12157
+ onDelete: (deletedItem) => {
12157
12158
  setNavigationItems(
12158
- (items) => items?.map((item) => item.id === editedItem.id ? editedItem : item)
12159
+ (items) => items?.map((item) => item.id === deletedItem.id ? deletedItem : item)
12159
12160
  );
12160
12161
  }
12161
12162
  }
@@ -12227,4 +12228,3 @@ const App = () => {
12227
12228
  export {
12228
12229
  App as default
12229
12230
  };
12230
- //# sourceMappingURL=index-B6MYtu3A.mjs.map
@@ -1,5 +0,0 @@
1
- "use strict";
2
- const index = require("../_chunks/index-BOEv4jIJ.js");
3
- require("react/jsx-runtime");
4
- module.exports = index.index;
5
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
@@ -1,6 +1,5 @@
1
- import { i } from "../_chunks/index-CZ5qsGXH.mjs";
1
+ import { i } from "../_chunks/index-DSPh-fHL.mjs";
2
2
  import "react/jsx-runtime";
3
3
  export {
4
4
  i as default
5
5
  };
6
- //# sourceMappingURL=index.mjs.map
@@ -3,7 +3,7 @@ type UsePluginConfigResponse = {
3
3
  config: PluginConfig | null;
4
4
  loading: boolean;
5
5
  fetchError: string | null;
6
- setConfig: (body: PluginConfig) => Promise<void>;
6
+ setConfig: (body: Partial<PluginConfig>) => Promise<void>;
7
7
  };
8
8
  export default function usePluginConfig(): UsePluginConfigResponse;
9
9
  export {};
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import type { ContentType, ConfigContentType } from '../../../../types';
2
+ import type { ContentType, ConfigContentType } from '../../../../../types';
3
3
  export default function ContentTypeAccordion({ contentType, contentTypeSettings, dispatch }: {
4
4
  contentType: ContentType | undefined;
5
5
  contentTypeSettings: ConfigContentType;
@@ -0,0 +1,2 @@
1
+ declare const Settings: () => import("react/jsx-runtime").JSX.Element;
2
+ export default Settings;
@@ -1,8 +1,7 @@
1
1
  /// <reference types="react" />
2
- export default function PageWrapper({ settingsState, initialState, save, isSaving, children }: {
3
- settingsState?: any;
4
- initialState?: any;
2
+ export default function PageWrapper({ save, isSaving, disabledCondition, children }: {
5
3
  save?: () => void;
6
- isSaving?: boolean;
4
+ isSaving: boolean;
5
+ disabledCondition: boolean;
7
6
  children: React.ReactNode;
8
7
  }): import("react/jsx-runtime").JSX.Element;
@@ -6,7 +6,7 @@ export declare const measuring: {
6
6
  };
7
7
  };
8
8
  export declare const indentationWidth = 48;
9
- export declare function getProjection(items: NestedNavItem[] | undefined, activeId: UniqueIdentifier, overId: UniqueIdentifier, dragOffset: number): {
9
+ export declare function getProjection(items: NestedNavItem[] | undefined, activeId: UniqueIdentifier, overId: UniqueIdentifier, dragOffset: number, maxDepthValue: number): {
10
10
  depth: number;
11
11
  maxDepth: number;
12
12
  minDepth: number;
@@ -20,7 +20,7 @@ function transformToUrl(input) {
20
20
  input = input.replace(/-+/g, "-");
21
21
  return input;
22
22
  }
23
- const version = "0.7.0";
23
+ const version = "0.7.1";
24
24
  const keywords = [];
25
25
  const type = "commonjs";
26
26
  const exports$1 = {
@@ -5550,21 +5550,31 @@ async function createExternalRoute(data) {
5550
5550
  }
5551
5551
  const admin = ({ strapi: strapi2 }) => ({
5552
5552
  async updateConfig(newConfig) {
5553
- if (!newConfig || !newConfig.selectedContentTypes) return;
5553
+ if (!newConfig) return;
5554
+ let newConfigMerged;
5554
5555
  try {
5555
- const routes2 = await strapi2.documents(waRoute).findMany();
5556
- const invalidRoutes = routes2.filter((route2) => !newConfig.selectedContentTypes.find((type2) => type2.uid === route2.relatedContentType));
5557
- invalidRoutes?.map(async (route2) => {
5558
- await strapi2.documents(waRoute).delete({
5559
- documentId: route2.documentId
5560
- });
5561
- });
5556
+ const pluginStore = await strapi2.store({ type: "plugin", name: PLUGIN_ID });
5557
+ const config2 = await pluginStore.get({ key: "config" });
5558
+ newConfigMerged = { ...config2, ...newConfig };
5559
+ await pluginStore.set({ key: "config", value: newConfigMerged });
5562
5560
  } catch (err) {
5563
5561
  console.log(err);
5564
- return "Error. Couldn't delete invalid routes";
5562
+ return "Error. Couldn't update config";
5565
5563
  }
5566
- const pluginStore = await strapi2.store({ type: "plugin", name: PLUGIN_ID });
5567
- await pluginStore.set({ key: "config", value: newConfig });
5564
+ if (newConfigMerged.selectedContentTypes) {
5565
+ try {
5566
+ const routes2 = await strapi2.documents(waRoute).findMany();
5567
+ const invalidRoutes = routes2.filter(
5568
+ (route2) => !newConfigMerged.selectedContentTypes.find((type2) => type2.uid === route2.relatedContentType)
5569
+ );
5570
+ for (const route2 of invalidRoutes) {
5571
+ await strapi2.documents(waRoute).delete({ documentId: route2.documentId });
5572
+ }
5573
+ } catch (err) {
5574
+ console.log(err);
5575
+ }
5576
+ }
5577
+ return newConfigMerged;
5568
5578
  },
5569
5579
  async getConfig() {
5570
5580
  const pluginStore = await strapi2.store({ type: "plugin", name: PLUGIN_ID });
@@ -5916,4 +5926,3 @@ const index = {
5916
5926
  middlewares
5917
5927
  };
5918
5928
  module.exports = index;
5919
- //# sourceMappingURL=index.js.map
@@ -19,7 +19,7 @@ function transformToUrl(input) {
19
19
  input = input.replace(/-+/g, "-");
20
20
  return input;
21
21
  }
22
- const version = "0.7.0";
22
+ const version = "0.7.1";
23
23
  const keywords = [];
24
24
  const type = "commonjs";
25
25
  const exports = {
@@ -5549,21 +5549,31 @@ async function createExternalRoute(data) {
5549
5549
  }
5550
5550
  const admin = ({ strapi: strapi2 }) => ({
5551
5551
  async updateConfig(newConfig) {
5552
- if (!newConfig || !newConfig.selectedContentTypes) return;
5552
+ if (!newConfig) return;
5553
+ let newConfigMerged;
5553
5554
  try {
5554
- const routes2 = await strapi2.documents(waRoute).findMany();
5555
- const invalidRoutes = routes2.filter((route2) => !newConfig.selectedContentTypes.find((type2) => type2.uid === route2.relatedContentType));
5556
- invalidRoutes?.map(async (route2) => {
5557
- await strapi2.documents(waRoute).delete({
5558
- documentId: route2.documentId
5559
- });
5560
- });
5555
+ const pluginStore = await strapi2.store({ type: "plugin", name: PLUGIN_ID });
5556
+ const config2 = await pluginStore.get({ key: "config" });
5557
+ newConfigMerged = { ...config2, ...newConfig };
5558
+ await pluginStore.set({ key: "config", value: newConfigMerged });
5561
5559
  } catch (err) {
5562
5560
  console.log(err);
5563
- return "Error. Couldn't delete invalid routes";
5561
+ return "Error. Couldn't update config";
5564
5562
  }
5565
- const pluginStore = await strapi2.store({ type: "plugin", name: PLUGIN_ID });
5566
- await pluginStore.set({ key: "config", value: newConfig });
5563
+ if (newConfigMerged.selectedContentTypes) {
5564
+ try {
5565
+ const routes2 = await strapi2.documents(waRoute).findMany();
5566
+ const invalidRoutes = routes2.filter(
5567
+ (route2) => !newConfigMerged.selectedContentTypes.find((type2) => type2.uid === route2.relatedContentType)
5568
+ );
5569
+ for (const route2 of invalidRoutes) {
5570
+ await strapi2.documents(waRoute).delete({ documentId: route2.documentId });
5571
+ }
5572
+ } catch (err) {
5573
+ console.log(err);
5574
+ }
5575
+ }
5576
+ return newConfigMerged;
5567
5577
  },
5568
5578
  async getConfig() {
5569
5579
  const pluginStore = await strapi2.store({ type: "plugin", name: PLUGIN_ID });
@@ -5917,4 +5927,3 @@ const index = {
5917
5927
  export {
5918
5928
  index as default
5919
5929
  };
5920
- //# sourceMappingURL=index.mjs.map
@@ -62,7 +62,7 @@ declare const _default: {
62
62
  admin: ({ strapi }: {
63
63
  strapi: any;
64
64
  }) => {
65
- updateConfig(newConfig: any): Promise<string>;
65
+ updateConfig(newConfig: Partial<import("../../types").PluginConfig>): Promise<import("../../types").PluginConfig | "Error. Couldn't update config">;
66
66
  getConfig(): Promise<any>;
67
67
  getRoutes(): Promise<any>;
68
68
  updateRoute(documentId: string, data: any): Promise<any>;
@@ -1,8 +1,8 @@
1
- import type { NavigationInput, NestedNavItem, StructuredNavigationVariant } from "../../../types";
1
+ import type { NavigationInput, NestedNavItem, PluginConfig, StructuredNavigationVariant } from "../../../types";
2
2
  declare const _default: ({ strapi }: {
3
3
  strapi: any;
4
4
  }) => {
5
- updateConfig(newConfig: any): Promise<string>;
5
+ updateConfig(newConfig: Partial<PluginConfig>): Promise<PluginConfig | "Error. Couldn't update config">;
6
6
  getConfig(): Promise<any>;
7
7
  getRoutes(): Promise<any>;
8
8
  updateRoute(documentId: string, data: any): Promise<any>;
@@ -2,7 +2,7 @@ declare const _default: {
2
2
  admin: ({ strapi }: {
3
3
  strapi: any;
4
4
  }) => {
5
- updateConfig(newConfig: any): Promise<string>;
5
+ updateConfig(newConfig: Partial<import("../../../types").PluginConfig>): Promise<import("../../../types").PluginConfig | "Error. Couldn't update config">;
6
6
  getConfig(): Promise<any>;
7
7
  getRoutes(): Promise<any>;
8
8
  updateRoute(documentId: string, data: any): Promise<any>;
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.7.0",
2
+ "version": "0.8.0",
3
3
  "keywords": [],
4
4
  "type": "commonjs",
5
5
  "exports": {
@@ -1 +0,0 @@
1
- {"version":3,"file":"FullLoader-CrPED_dY.mjs","sources":["../../admin/src/components/UI/Center.tsx","../../admin/src/components/UI/FullLoader.tsx"],"sourcesContent":["import { Flex } from '@strapi/design-system';\n\nexport default function Center({ height = 400, children }: { height?: number, children: React.ReactNode }) {\n\n return (\n <Flex direction=\"column\" minHeight={`${height}px`} justifyContent=\"center\">\n {children}\n </Flex>\n )\n}","import { Loader, Box } from '@strapi/design-system';\nimport Center from './Center';\n\nexport default function FullLoader({ height }: { height?: number }) {\n return (\n <Center height={height}>\n <Loader>Loading...</Loader>\n </Center>\n );\n}"],"names":[],"mappings":";;AAEA,SAAwB,OAAO,EAAE,SAAS,KAAK,YAA4D;AAGvG,SAAA,oBAAC,MAAK,EAAA,WAAU,UAAS,WAAW,GAAG,MAAM,MAAM,gBAAe,UAC/D,SACH,CAAA;AAEJ;ACNwB,SAAA,WAAW,EAAE,UAA+B;AAClE,6BACG,QAAO,EAAA,QACN,UAAC,oBAAA,QAAA,EAAO,wBAAU,EACpB,CAAA;AAEJ;"}
@@ -1,121 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const de = {
4
- "webatlas.navigation.page.title": "Navigation",
5
- "webatlas.navigation.page.subtitle.noNavigationSelected": "Keine Navigation ausgewählt",
6
- "webatlas.navigation.page.emptyNavigation": "Es existiert noch keine Navigation...",
7
- "webatlas.navigation.page.createNewNavigation": "Neue Navigation erstellen",
8
- "webatlas.navigation.page.createNewItem": "Neues Element erstellen",
9
- "webatlas.navigation.page.newItemButton": "Neues Element",
10
- "webatlas.navigation.page.selectNavigation": "Navigation auswählen",
11
- "webatlas.navigation.page.navItem.addChildren": "Unterelement hinzufügen",
12
- "webatlas.routes.page.title": "Routen",
13
- "webatlas.routes.page.subtitle": "Übersicht aller vorhandenen Routen",
14
- "webatlas.routes.page.emptyRoutes": "Es wurden keine Routen gefunden",
15
- "webatlas.routes.page.column.type": "Typ",
16
- "webatlas.routes.page.searchPlaceholder": "Routen suchen",
17
- "webatlas.settings.page.subtitle": "Konfigurieren Sie Ihre Webatlas-Plugin-Einstellungen",
18
- "webatlas.settings.page.enabledContentTypes": "Aktivierte Inhaltstypen",
19
- "webatlas.settings.page.enabledContentTypes.hint": "Wählen Sie die Inhaltstypen aus, für die Sie URL-Aliase aktivieren möchten",
20
- "webatlas.settings.page.enabledContentTypes.placeholder": "Inhaltstypen auswählen...",
21
- "webatlas.settings.page.contentTypeSettings": "Inhaltstyp-Einstellungen",
22
- "webatlas.settings.page.defaultField": "Standard URL-Alias Feld",
23
- "webatlas.settings.page.defaultField.hint": 'Das ausgewählte Feld aus dem Inhaltstyp wird verwendet, um den URL-Alias zu generieren. Verwenden Sie ein Feld, das einzigartig und beschreibend ist, wie z.B. "Titel" oder "Name".',
24
- "webatlas.settings.page.defaultField.error": "Bitte wählen Sie ein Standardfeld aus",
25
- "webatlas.settings.page.urlAliasPattern": "URL-Alias Muster",
26
- "webatlas.settings.page.urlAliasPattern.hint": 'Das Muster, das dem generierten URL-Alias vorangestellt wird. Wenn Sie z.B. "blog" eingeben und der Wert des Standardfelds "Mein erster Beitrag" ist, wird der generierte URL-Alias "blog/mein-erster-beitrag" sein. Lassen Sie es leer für kein Präfix.',
27
- "webatlas.settings.page.urlAliasPattern.tooltip": "Führende und abschließende Schrägstriche werden entfernt. Leerzeichen werden durch Bindestriche ersetzt. Sonderzeichen werden kodiert.",
28
- "webatlas.settings.page.urlAliasPattern.placeholder": "z.B. blog",
29
- "webatlas.modal.navOverview.confirmText": "Neue Navigation",
30
- "webatlas.modal.navOverview.closeText": "Abbrechen",
31
- "webatlas.modal.navOverview.titleText": "Navigationsübersicht",
32
- "webatlas.modal.navOverview.loadingText": "Erstellen",
33
- "webatlas.modal.navModal.internalItem": "Internes Element",
34
- "webatlas.modal.navModal.externalItem": "Externes Element",
35
- "webatlas.modal.navModal.wrapperItem": "Wrapper Element",
36
- "webatlas.modal.navEdit.confirmText": "Aktualisieren",
37
- "webatlas.modal.navEdit.closeText": "Abbrechen",
38
- "webatlas.modal.navEdit.titleText": "Navigation bearbeiten:",
39
- "webatlas.modal.navEdit.loadingText": "Aktualisieren",
40
- "webatlas.modal.delete.cancelText": "Nein, behalten",
41
- "webatlas.modal.delete.confirmText": "Ja, löschen",
42
- "webatlas.modal.delete.message.start": "Sie löschen gerade",
43
- "webatlas.modal.delete.message.navItem": "das Navigationselement",
44
- "webatlas.modal.delete.message.navigation": "die Navigation",
45
- "webatlas.modal.delete.message.end": "Dies kann nicht rückgängig gemacht werden. Sind Sie sicher?",
46
- "webatlas.modal.nameField.label": "Name",
47
- "webatlas.modal.activeField.label": "Aktiv",
48
- "webatlas.modal.activeField.onLabel": "Ja",
49
- "webatlas.modal.activeField.offLabel": "Nein",
50
- "webatlas.modal.wrapperItem.titleText.create": "Neues Wrapper-Element erstellen",
51
- "webatlas.modal.wrapperItem.titleText.edit": "Wrapper-Element bearbeiten:",
52
- "webatlas.modal.wrapperItem.loadingText.create": "Wird hinzugefügt",
53
- "webatlas.modal.wrapperItem.loadingText.edit": "Wird gespeichert",
54
- "webatlas.modal.wrapperItem.titleField.label": "Titel",
55
- "webatlas.modal.wrapperItem.titleField.placeholder": "z.B. Über uns",
56
- "webatlas.modal.internalItem.titleText.create": "Neues Navigationselement hinzufügen",
57
- "webatlas.modal.internalItem.loadingText.create": "Wird erstellt",
58
- "webatlas.modal.internalItem.contentType.label": "Inhaltstyp",
59
- "webatlas.modal.internalItem.contentType.placeholder": "Wählen Sie einen Inhaltstyp",
60
- "webatlas.modal.internalItem.entity.label": "Entität",
61
- "webatlas.modal.internalItem.entity.placeholder": "Wählen Sie eine Entität",
62
- "webatlas.modal.internalItem.loadingText.edit": "Wird gespeichert",
63
- "webatlas.modal.externalItem.titleText.create": "Neues externes Element erstellen",
64
- "webatlas.modal.externalItem.loadingText.create": "Wird hinzugefügt",
65
- "webatlas.modal.externalItem.titleText.edit": "Externen Pfad bearbeiten:",
66
- "webatlas.modal.externalItem.loadingText.edit": "Wird gespeichert",
67
- "webatlas.modal.externalItem.routeField.placeholder": "z.B. https://example.com",
68
- "webatlas.modal.item.titleField.label": "Titel",
69
- "webatlas.modal.item.titleField.placeholder": "z.B. Über uns",
70
- "webatlas.modal.item.routeField.label": "Route",
71
- "webatlas.modal.item.routeField.placeholder": "z.B. ueber/",
72
- "webatlas.components.URLInfo.checking": "Überprüfe, ob die URL verfügbar ist...",
73
- "webatlas.components.URLInfo.available": "URL ist verfügbar",
74
- "webatlas.components.URLInfo.notAvailable": "URL ist nicht verfügbar. Ersetzt durch",
75
- "webatlas.components.CMEditViewAside.loading": "Wird geladen...",
76
- "webatlas.components.CMEditViewAside.notAllowed.start": "Dieser Inhaltstyp ist nicht erlaubt für",
77
- "webatlas.components.CMEditViewAside.notAllowed.end": "Wenn Sie ihn verwenden möchten, wenden Sie sich bitte an Ihren Administrator",
78
- "webatlas.components.CMEditViewAside.notConfigured.start": "Dieser Inhaltstyp ist nicht konfiguriert für",
79
- "webatlas.components.CMEditViewAside.notConfigured.middle": "Wenn Sie ihn verwenden möchten, konfigurieren Sie ihn bitte in den",
80
- "webatlas.components.CMEditViewAside.notConfigured.end": "Einstellungen",
81
- "webatlas.components.CMEditViewAside.alias.urlInput.tooltip": "Die folgenden Zeichen sind gültig: A-Z, a-z, 0-9, /, -, _, $, ., +, !, *, ', (, )",
82
- "webatlas.components.CMEditViewAside.alias.urlInput.label": "URL",
83
- "webatlas.components.CMEditViewAside.alias.urlInput.start": "Bearbeiten Sie das",
84
- "webatlas.components.CMEditViewAside.alias.urlInput.end": "Feld, um eine URL zu generieren",
85
- "webatlas.components.CMEditViewAside.alias.overrideCheckbox": "Automatische URL-Generierung überschreiben",
86
- "webatlas.components.CMEditViewAside.alias.uidRoute.label": "UID Route",
87
- "webatlas.components.CMEditViewAside.alias.uidRoute.hint": "Permanente UID-Route, kann nicht geändert werden",
88
- "webatlas.components.CMEditViewAside.alias.documentIdRoute.label": "Dokumenten-ID Route",
89
- "webatlas.components.CMEditViewAside.alias.documentIdRoute.hint": "Permanente Dokumenten-ID-Route, kann nicht geändert werden",
90
- "webatlas.components.CMEditViewAside.alias.newRouteInfo": "Eine neue URL-Route wird beim Speichern dieses Eintrags erstellt.",
91
- "webatlas.route.type.internal": "Intern",
92
- "webatlas.route.type.external": "Extern",
93
- "webatlas.route.type.wrapper": "Wrapper",
94
- "webatlas.link.navigation": "Navigation",
95
- "webatlas.link.routes": "Routen",
96
- "webatlas.title": "Titel",
97
- "webatlas.route": "Route",
98
- "webatlas.actions": "Aktionen",
99
- "webatlas.delete": "Löschen",
100
- "webatlas.edit": "Bearbeiten",
101
- "webatlas.add": "Hinzufügen",
102
- "webatlas.cancel": "Abbrechen",
103
- "webatlas.save": "Speichern",
104
- "webatlas.select": "Auswählen",
105
- "webatlas.manage": "Verwalten",
106
- "webatlas.published": "Veröffentlicht",
107
- "webatlas.draft": "Entwurf",
108
- "webatlas.modified": "Geändert",
109
- "webatlas.deleted": "Gelöscht",
110
- "webatlas.restore": "Wiederherstellen",
111
- "webatlas.notification.error": "Ein Fehler ist aufgetreten",
112
- "webatlas.notification.settings.saved": "Einstellungen erfolgreich gespeichert",
113
- "webatlas.notification.routes.fetchFailed": "Routen konnten nicht abgerufen werden",
114
- "webatlas.notification.navigation.saveNavigationFailed": "Fehler beim Aktualisieren des Navigationselements",
115
- "webatlas.notification.navigation.navigationSaved": "Navigation erfolgreich aktualisiert",
116
- "webatlas.notification.navigation.fetchFailed": "Fehler beim Abrufen der Navigationen",
117
- "webatlas.notification.navigation.notFound": "Navigation nicht gefunden. Zur Navigation weitergeleitet",
118
- "webatlas.notification.navigation.creationFailed": "Erstellung der Navigation fehlgeschlagen"
119
- };
120
- exports.default = de;
121
- //# sourceMappingURL=de-BZc1BkzH.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"de-BZc1BkzH.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"de-oxxH8hft.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}