@mattisvensson/strapi-plugin-webatlas 0.12.1 → 0.13.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 (32) hide show
  1. package/README.md +59 -2
  2. package/dist/admin/{SettingTitle-Ib_0AvoZ.js → ContentBox-D4PGQ8eh.js} +1 -5
  3. package/dist/admin/{SettingTitle-0mKlA80i.mjs → ContentBox-KyQN2KGV.mjs} +2 -6
  4. package/dist/admin/{RoutePicker-IRZiHKFi.mjs → RoutePicker-CgndSXoF.mjs} +1 -1
  5. package/dist/admin/{RoutePicker-C3_tzz9U.js → RoutePicker-CwoMMhf_.js} +1 -1
  6. package/dist/admin/WarningBox-AyYq0Onj.mjs +18 -0
  7. package/dist/admin/{WarningBox-BZ3BZ5fR.js → WarningBox-FF1yYDXP.js} +0 -24
  8. package/dist/admin/{de-DhwCZE_m.js → de-Cl0vM1wA.js} +52 -4
  9. package/dist/admin/{de-BFjenpyN.mjs → de-DWs5ckOd.mjs} +52 -4
  10. package/dist/admin/{en-CGCh9ld_.mjs → en-CyhISGZi.mjs} +52 -4
  11. package/dist/admin/{en-C-rPCNd2.js → en-DSmtmPYk.js} +52 -4
  12. package/dist/admin/{index-ByxM39aL.mjs → index-BKhrfzjO.mjs} +105 -33
  13. package/dist/admin/{index-Bym1mXg1.mjs → index-Bv5Ri-ri.mjs} +44 -12
  14. package/dist/admin/{index-88JTX1Mj.js → index-BxGPKxr_.js} +50 -18
  15. package/dist/admin/index-Ctm4TBT5.mjs +5308 -0
  16. package/dist/admin/{index-PD3gcnXA.mjs → index-D2O7sLKs.mjs} +1 -1
  17. package/dist/admin/{index-CsKnBzp6.js → index-DTrsl_uN.js} +105 -33
  18. package/dist/admin/index-FvaXwOH0.mjs +174 -0
  19. package/dist/admin/index-JBUU7dE6.js +5308 -0
  20. package/dist/admin/{index-DNBXz42q.js → index-jOCO4_-k.js} +1 -1
  21. package/dist/admin/index-uOC1Clyv.js +174 -0
  22. package/dist/admin/index.js +1 -1
  23. package/dist/admin/index.mjs +1 -1
  24. package/dist/server/index.js +443 -96
  25. package/dist/server/index.mjs +444 -97
  26. package/dist/server/src/index.d.ts +17 -4
  27. package/package.json +3 -3
  28. package/dist/admin/WarningBox-CXEmXfVx.mjs +0 -42
  29. package/dist/admin/index-BPUJTNed.js +0 -9622
  30. package/dist/admin/index-BY6JLZrD.mjs +0 -9622
  31. package/dist/admin/index-CEJBltoJ.js +0 -147
  32. package/dist/admin/index-CNCyng5O.mjs +0 -147
@@ -11,9 +11,6 @@ declare const _default: {
11
11
  config: {
12
12
  default: {
13
13
  selectedContentTypes: any[];
14
- navigation: {
15
- maxDepth: number;
16
- };
17
14
  routeBlacklist: any[];
18
15
  };
19
16
  validator(): void;
@@ -25,6 +22,9 @@ declare const _default: {
25
22
  getRoute(ctx: any): Promise<any>;
26
23
  getAllRoutes(ctx: any): Promise<any>;
27
24
  getRelatedRoute(ctx: any): Promise<any>;
25
+ getRelatedRoutes(ctx: any): Promise<any>;
26
+ getNavigationDepths(ctx: any): Promise<any>;
27
+ updateNavigationDepths(ctx: any): Promise<any>;
28
28
  getProhibitedRouteIds(ctx: any): Promise<any>;
29
29
  getNavigation(ctx: any): Promise<any>;
30
30
  createNavigation(ctx: any): Promise<any>;
@@ -78,10 +78,16 @@ declare const _default: {
78
78
  getRoute(documentId: string): Promise<any>;
79
79
  getAllRoutes(): Promise<any>;
80
80
  getRelatedRoute(documentId: string): Promise<any>;
81
+ getRelatedRoutes(documentIds: string[]): Promise<any>;
81
82
  getProhibitedRouteIds(documentId: string): Promise<string[]>;
82
83
  getNavigation(documentId?: string, variant?: import('../../types').StructuredNavigationVariant | "namesOnly"): Promise<any>;
83
84
  createNavigation(name: string, visible: boolean): Promise<any>;
84
85
  updateNavigation(documentId: string, data: import('../../types').NavigationInput): Promise<any>;
86
+ getNavigationDepths(): Promise<import('../../types').NavigationDepth[]>;
87
+ updateNavigationDepths(depths: {
88
+ documentId: string;
89
+ maxDepth: number;
90
+ }[]): Promise<import('../../types').NavigationDepth[]>;
85
91
  deleteNavigation(documentId: string): Promise<any>;
86
92
  updateNavigationItemStructure(navigationId: string, navigationItems: import('../../types').NestedNavItem[]): Promise<{
87
93
  success: boolean;
@@ -98,7 +104,7 @@ declare const _default: {
98
104
  client: ({ strapi }: {
99
105
  strapi: any;
100
106
  }) => {
101
- getEntityByPath(slug: string, populate: string, populateDeepDepth: string, fields: any, status?: "published" | "draft", breadcrumb?: boolean): Promise<any>;
107
+ getEntityByPath(slug: string, populate: string, populateDeepDepth: number, fields: any, status?: "published" | "draft", breadcrumb?: boolean, auth?: any): Promise<any>;
102
108
  getNavigation(id: string, name: string, slug: string, documentId: string, variant?: import('../../types').StructuredNavigationVariant): Promise<{
103
109
  items: {
104
110
  depth: any;
@@ -130,6 +136,7 @@ declare const _default: {
130
136
  name: string;
131
137
  slug: string;
132
138
  visible: boolean;
139
+ maxDepth?: number;
133
140
  updatedAt: string;
134
141
  createdAt: string;
135
142
  }>;
@@ -275,6 +282,12 @@ declare const _default: {
275
282
  default: boolean;
276
283
  configurable: boolean;
277
284
  };
285
+ maxDepth: {
286
+ type: string;
287
+ default: number;
288
+ min: number;
289
+ configurable: boolean;
290
+ };
278
291
  items: {
279
292
  type: string;
280
293
  configurable: boolean;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@mattisvensson/strapi-plugin-webatlas",
3
3
  "description": "A strapi plugin to manage URL routes and navigations.",
4
4
  "license": "MIT",
5
- "version": "0.12.1",
5
+ "version": "0.13.0",
6
6
  "keywords": [
7
7
  "strapi",
8
8
  "plugin",
@@ -37,8 +37,8 @@
37
37
  "watch": "strapi-plugin watch",
38
38
  "watch:link": "strapi-plugin watch:link",
39
39
  "verify": "strapi-plugin verify",
40
- "test:ts:front": "tsc -p admin/tsconfig.json",
41
- "test:ts:back": "tsc -p server/tsconfig.json",
40
+ "test:ts:front": "tsc -p admin/tsconfig.json --noEmit",
41
+ "test:ts:back": "tsc -p server/tsconfig.json --noEmit",
42
42
  "test:jest": "ENV_PATH=./playground/.env jest --verbose --runInBand --forceExit",
43
43
  "test:cypress": "cypress run",
44
44
  "test:cypress:open": "cypress open",
@@ -1,42 +0,0 @@
1
- import { useState, useEffect } from "react";
2
- import { u as useApi, i as isAbortError } from "./index-ByxM39aL.mjs";
3
- import { jsx, jsxs } from "react/jsx-runtime";
4
- import { Badge, Flex, Typography } from "@strapi/design-system";
5
- import { WarningCircle } from "@strapi/icons";
6
- const useAllEntities = () => {
7
- const { fetchAllEntities } = useApi();
8
- const [entities, setEntities] = useState([]);
9
- const [loading, setLoading] = useState(true);
10
- const [error, setError] = useState(null);
11
- useEffect(() => {
12
- const fetchEntities = async () => {
13
- try {
14
- const result = await fetchAllEntities();
15
- setEntities(result);
16
- setLoading(false);
17
- } catch (err) {
18
- if (isAbortError(err)) return;
19
- setError(err);
20
- setLoading(false);
21
- }
22
- };
23
- fetchEntities();
24
- }, []);
25
- return { entities, loading, error };
26
- };
27
- function WarningBox({
28
- title,
29
- description
30
- }) {
31
- return /* @__PURE__ */ jsx(Badge, { variant: "warning", minWidth: "100%", children: /* @__PURE__ */ jsxs(Flex, { direction: "column", alignItems: "center", gap: 2, children: [
32
- /* @__PURE__ */ jsxs(Flex, { alignItems: "center", gap: 2, children: [
33
- /* @__PURE__ */ jsx(WarningCircle, {}),
34
- /* @__PURE__ */ jsx(Typography, { children: title })
35
- ] }),
36
- description && /* @__PURE__ */ jsx(Typography, { variant: "sigma", children: description })
37
- ] }) });
38
- }
39
- export {
40
- WarningBox as W,
41
- useAllEntities as u
42
- };