@mattisvensson/strapi-plugin-webatlas 0.9.6 → 0.10.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.
- package/README.md +24 -36
- package/dist/_chunks/{SettingTitle-77mvMRg_.mjs → SettingTitle-CdR3SVn_.mjs} +1 -1
- package/dist/_chunks/{SettingTitle-DLj_Wwqy.js → SettingTitle-RU1azFIM.js} +1 -1
- package/dist/_chunks/{de-C-uxto84.mjs → de-B5pRvs13.mjs} +13 -7
- package/dist/_chunks/{de-CGXL_3o_.js → de-CqU1FU8C.js} +13 -7
- package/dist/_chunks/{en-B1CHnIH7.mjs → en-BE-zzIv8.mjs} +13 -7
- package/dist/_chunks/{en-DWEd5BXK.js → en-C7I90FwV.js} +13 -7
- package/dist/_chunks/{index-DwaKIwAz.mjs → index-B07UVUOa.mjs} +387 -229
- package/dist/_chunks/{index-3pYLMhui.mjs → index-BmyxSosC.mjs} +3 -3
- package/dist/_chunks/{index-Dt-AXdaw.js → index-BucL4va6.js} +38 -82
- package/dist/_chunks/{index-BRKi-K-v.mjs → index-BvcX9hcc.mjs} +61 -24
- package/dist/_chunks/{index-COfk3YSm.js → index-BxpDM360.js} +386 -228
- package/dist/_chunks/{index-5OG4i6qO.mjs → index-CIM-JzLK.mjs} +38 -82
- package/dist/_chunks/{index-BWzalvVi.mjs → index-CNKWb8pn.mjs} +614 -320
- package/dist/_chunks/{index-VXuAEnpX.js → index-D-vJE_K8.js} +3 -3
- package/dist/_chunks/{index-BOtvXSPU.js → index-IRSCe8PX.js} +609 -315
- package/dist/_chunks/{index-DTsHvlTa.js → index-d09V61nm.js} +61 -24
- package/dist/admin/index.js +1 -1
- package/dist/admin/index.mjs +1 -1
- package/dist/admin/src/components/CMEditViewAside/NewPathInfo.d.ts +2 -0
- package/dist/admin/src/components/CMEditViewAside/OverrideCheckbox.d.ts +7 -0
- package/dist/admin/src/components/CMEditViewAside/Panel.d.ts +5 -0
- package/dist/admin/src/components/CMEditViewAside/PathInput.d.ts +11 -0
- package/dist/admin/src/components/CMEditViewAside/RouteStructure.d.ts +3 -0
- package/dist/admin/src/components/CMEditViewAside/UidPathDisplay.d.ts +4 -0
- package/dist/admin/src/components/PathInfo.d.ts +2 -3
- package/dist/admin/src/components/modals/externalItem/index.d.ts +1 -1
- package/dist/admin/src/components/modals/internalItem/ItemDetails.d.ts +13 -0
- package/dist/admin/src/components/modals/internalItem/internalItemCreate.d.ts +1 -1
- package/dist/admin/src/components/modals/internalItem/internalItemEdit.d.ts +1 -1
- package/dist/admin/src/components/modals/useModalSharedLogic.d.ts +1 -1
- package/dist/admin/src/components/modals/wrapperItem/index.d.ts +1 -1
- package/dist/admin/src/hooks/useApi.d.ts +4 -3
- package/dist/admin/src/pages/Navigation/RouteItem.d.ts +1 -15
- package/dist/admin/src/pages/Navigation/RouteItemBadge.d.ts +4 -0
- package/dist/admin/src/pages/Navigation/RouteItemIcon.d.ts +5 -0
- package/dist/admin/src/pages/Navigation/RouteItemMenu.d.ts +10 -0
- package/dist/admin/src/pages/Navigation/RouteItemStatus.d.ts +5 -0
- package/dist/admin/src/pages/Navigation/SortableRouteItem.d.ts +1 -1
- package/dist/admin/src/types/index.d.ts +3 -0
- package/dist/admin/src/types/modal.d.ts +56 -0
- package/dist/admin/src/types/navigation.d.ts +18 -0
- package/dist/admin/src/types/panel.d.ts +41 -0
- package/dist/admin/src/types/route.d.ts +1 -1
- package/dist/admin/src/utils/buildBreadcrumbString.d.ts +16 -0
- package/dist/admin/src/utils/createTempNavItemObject.d.ts +6 -8
- package/dist/admin/src/utils/duplicateCheck.d.ts +10 -4
- package/dist/admin/src/utils/findParentNavItem.d.ts +13 -0
- package/dist/admin/src/utils/index.d.ts +3 -2
- package/dist/server/index.js +630 -200
- package/dist/server/index.mjs +630 -200
- package/dist/server/src/content-types/index.d.ts +18 -0
- package/dist/server/src/content-types/route/index.d.ts +18 -0
- package/dist/server/src/content-types/route/schema.d.ts +18 -0
- package/dist/server/src/controllers/admin.d.ts +3 -2
- package/dist/server/src/controllers/index.d.ts +3 -2
- package/dist/server/src/index.d.ts +24 -4
- package/dist/server/src/migrations/001-canonical-path.d.ts +7 -0
- package/dist/server/src/migrations/index.d.ts +3 -0
- package/dist/server/src/services/admin.d.ts +3 -2
- package/dist/server/src/services/index.d.ts +3 -2
- package/dist/server/src/utils/buildCanonicalPath.d.ts +1 -0
- package/dist/server/src/utils/buildNavigationPath.d.ts +5 -0
- package/dist/server/src/utils/cascadeCanonicalPathUpdates.d.ts +1 -0
- package/dist/server/src/utils/getNonInternalRouteIds.d.ts +1 -0
- package/dist/server/src/utils/getRouteAncestors.d.ts +1 -0
- package/dist/server/src/utils/getRouteDescendants.d.ts +1 -0
- package/dist/server/src/utils/index.d.ts +10 -2
- package/dist/server/src/utils/navigationItemStructure.d.ts +27 -0
- package/dist/server/src/utils/routeHandler.d.ts +4 -2
- package/dist/server/src/utils/validateRouteDependencies.d.ts +4 -0
- package/dist/types/index.d.ts +0 -1
- package/dist/types/navigation.d.ts +13 -12
- package/dist/types/route.d.ts +7 -2
- package/dist/types/strapi.d.ts +1 -2
- package/dist/utils/index.d.ts +1 -2
- package/package.json +1 -1
- package/dist/admin/src/components/CMEditViewAside/Path.d.ts +0 -5
- package/dist/admin/src/utils/countChildren.d.ts +0 -2
- package/dist/types/modal.d.ts +0 -36
- package/dist/utils/getPath.d.ts +0 -1
|
@@ -46,6 +46,10 @@ declare const _default: {
|
|
|
46
46
|
type: string;
|
|
47
47
|
configurable: boolean;
|
|
48
48
|
};
|
|
49
|
+
canonicalPath: {
|
|
50
|
+
type: string;
|
|
51
|
+
configurable: boolean;
|
|
52
|
+
};
|
|
49
53
|
slug: {
|
|
50
54
|
type: string;
|
|
51
55
|
configurable: boolean;
|
|
@@ -78,6 +82,20 @@ declare const _default: {
|
|
|
78
82
|
configurable: boolean;
|
|
79
83
|
required: boolean;
|
|
80
84
|
};
|
|
85
|
+
parent: {
|
|
86
|
+
type: string;
|
|
87
|
+
relation: string;
|
|
88
|
+
target: string;
|
|
89
|
+
inversedBy: string;
|
|
90
|
+
configurable: boolean;
|
|
91
|
+
};
|
|
92
|
+
children: {
|
|
93
|
+
type: string;
|
|
94
|
+
relation: string;
|
|
95
|
+
target: string;
|
|
96
|
+
mappedBy: string;
|
|
97
|
+
configurable: boolean;
|
|
98
|
+
};
|
|
81
99
|
};
|
|
82
100
|
};
|
|
83
101
|
};
|
|
@@ -45,6 +45,10 @@ declare const _default: {
|
|
|
45
45
|
type: string;
|
|
46
46
|
configurable: boolean;
|
|
47
47
|
};
|
|
48
|
+
canonicalPath: {
|
|
49
|
+
type: string;
|
|
50
|
+
configurable: boolean;
|
|
51
|
+
};
|
|
48
52
|
slug: {
|
|
49
53
|
type: string;
|
|
50
54
|
configurable: boolean;
|
|
@@ -77,6 +81,20 @@ declare const _default: {
|
|
|
77
81
|
configurable: boolean;
|
|
78
82
|
required: boolean;
|
|
79
83
|
};
|
|
84
|
+
parent: {
|
|
85
|
+
type: string;
|
|
86
|
+
relation: string;
|
|
87
|
+
target: string;
|
|
88
|
+
inversedBy: string;
|
|
89
|
+
configurable: boolean;
|
|
90
|
+
};
|
|
91
|
+
children: {
|
|
92
|
+
type: string;
|
|
93
|
+
relation: string;
|
|
94
|
+
target: string;
|
|
95
|
+
mappedBy: string;
|
|
96
|
+
configurable: boolean;
|
|
97
|
+
};
|
|
80
98
|
};
|
|
81
99
|
};
|
|
82
100
|
};
|
|
@@ -44,6 +44,10 @@ declare const _default: {
|
|
|
44
44
|
type: string;
|
|
45
45
|
configurable: boolean;
|
|
46
46
|
};
|
|
47
|
+
canonicalPath: {
|
|
48
|
+
type: string;
|
|
49
|
+
configurable: boolean;
|
|
50
|
+
};
|
|
47
51
|
slug: {
|
|
48
52
|
type: string;
|
|
49
53
|
configurable: boolean;
|
|
@@ -76,6 +80,20 @@ declare const _default: {
|
|
|
76
80
|
configurable: boolean;
|
|
77
81
|
required: boolean;
|
|
78
82
|
};
|
|
83
|
+
parent: {
|
|
84
|
+
type: string;
|
|
85
|
+
relation: string;
|
|
86
|
+
target: string;
|
|
87
|
+
inversedBy: string;
|
|
88
|
+
configurable: boolean;
|
|
89
|
+
};
|
|
90
|
+
children: {
|
|
91
|
+
type: string;
|
|
92
|
+
relation: string;
|
|
93
|
+
target: string;
|
|
94
|
+
mappedBy: string;
|
|
95
|
+
configurable: boolean;
|
|
96
|
+
};
|
|
79
97
|
};
|
|
80
98
|
};
|
|
81
99
|
export default _default;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
declare const admin: () => {
|
|
2
2
|
updateConfig(ctx: any): Promise<any>;
|
|
3
3
|
getConfig(ctx: any): Promise<any>;
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
getRoute(ctx: any): Promise<any>;
|
|
5
|
+
getAllRoutes(ctx: any): Promise<any>;
|
|
6
6
|
getRelatedRoute(ctx: any): Promise<any>;
|
|
7
|
+
getProhibitedRouteIds(ctx: any): Promise<any>;
|
|
7
8
|
getNavigation(ctx: any): Promise<any>;
|
|
8
9
|
createNavigation(ctx: any): Promise<any>;
|
|
9
10
|
updateNavigation(ctx: any): Promise<any>;
|
|
@@ -2,9 +2,10 @@ declare const _default: {
|
|
|
2
2
|
admin: () => {
|
|
3
3
|
updateConfig(ctx: any): Promise<any>;
|
|
4
4
|
getConfig(ctx: any): Promise<any>;
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
getRoute(ctx: any): Promise<any>;
|
|
6
|
+
getAllRoutes(ctx: any): Promise<any>;
|
|
7
7
|
getRelatedRoute(ctx: any): Promise<any>;
|
|
8
|
+
getProhibitedRouteIds(ctx: any): Promise<any>;
|
|
8
9
|
getNavigation(ctx: any): Promise<any>;
|
|
9
10
|
createNavigation(ctx: any): Promise<any>;
|
|
10
11
|
updateNavigation(ctx: any): Promise<any>;
|
|
@@ -21,9 +21,10 @@ declare const _default: {
|
|
|
21
21
|
admin: () => {
|
|
22
22
|
updateConfig(ctx: any): Promise<any>;
|
|
23
23
|
getConfig(ctx: any): Promise<any>;
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
getRoute(ctx: any): Promise<any>;
|
|
25
|
+
getAllRoutes(ctx: any): Promise<any>;
|
|
26
26
|
getRelatedRoute(ctx: any): Promise<any>;
|
|
27
|
+
getProhibitedRouteIds(ctx: any): Promise<any>;
|
|
27
28
|
getNavigation(ctx: any): Promise<any>;
|
|
28
29
|
createNavigation(ctx: any): Promise<any>;
|
|
29
30
|
updateNavigation(ctx: any): Promise<any>;
|
|
@@ -73,9 +74,10 @@ declare const _default: {
|
|
|
73
74
|
}) => {
|
|
74
75
|
updateConfig(newConfig: Partial<import("../../types").PluginConfig>): Promise<import("../../types").PluginConfig | "Error. Couldn't update config">;
|
|
75
76
|
getConfig(): Promise<any>;
|
|
76
|
-
|
|
77
|
-
|
|
77
|
+
getRoute(documentId: string): Promise<any>;
|
|
78
|
+
getAllRoutes(): Promise<any>;
|
|
78
79
|
getRelatedRoute(documentId: string): Promise<any>;
|
|
80
|
+
getProhibitedRouteIds(documentId: string): Promise<string[]>;
|
|
79
81
|
getNavigation(documentId?: string, variant?: import("../../types").StructuredNavigationVariant | "namesOnly"): Promise<any>;
|
|
80
82
|
createNavigation(name: string, visible: boolean): Promise<any>;
|
|
81
83
|
updateNavigation(documentId: string, data: import("../../types").NavigationInput): Promise<any>;
|
|
@@ -138,6 +140,10 @@ declare const _default: {
|
|
|
138
140
|
type: string;
|
|
139
141
|
configurable: boolean;
|
|
140
142
|
};
|
|
143
|
+
canonicalPath: {
|
|
144
|
+
type: string;
|
|
145
|
+
configurable: boolean;
|
|
146
|
+
};
|
|
141
147
|
slug: {
|
|
142
148
|
type: string;
|
|
143
149
|
configurable: boolean;
|
|
@@ -170,6 +176,20 @@ declare const _default: {
|
|
|
170
176
|
configurable: boolean;
|
|
171
177
|
required: boolean;
|
|
172
178
|
};
|
|
179
|
+
parent: {
|
|
180
|
+
type: string;
|
|
181
|
+
relation: string;
|
|
182
|
+
target: string;
|
|
183
|
+
inversedBy: string;
|
|
184
|
+
configurable: boolean;
|
|
185
|
+
};
|
|
186
|
+
children: {
|
|
187
|
+
type: string;
|
|
188
|
+
relation: string;
|
|
189
|
+
target: string;
|
|
190
|
+
mappedBy: string;
|
|
191
|
+
configurable: boolean;
|
|
192
|
+
};
|
|
173
193
|
};
|
|
174
194
|
};
|
|
175
195
|
};
|
|
@@ -4,9 +4,10 @@ declare const _default: ({ strapi }: {
|
|
|
4
4
|
}) => {
|
|
5
5
|
updateConfig(newConfig: Partial<PluginConfig>): Promise<PluginConfig | "Error. Couldn't update config">;
|
|
6
6
|
getConfig(): Promise<any>;
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
getRoute(documentId: string): Promise<any>;
|
|
8
|
+
getAllRoutes(): Promise<any>;
|
|
9
9
|
getRelatedRoute(documentId: string): Promise<any>;
|
|
10
|
+
getProhibitedRouteIds(documentId: string | undefined): Promise<string[]>;
|
|
10
11
|
getNavigation(documentId?: string, variant?: StructuredNavigationVariant | "namesOnly"): Promise<any>;
|
|
11
12
|
createNavigation(name: string, visible: boolean): Promise<any>;
|
|
12
13
|
updateNavigation(documentId: string, data: NavigationInput): Promise<any>;
|
|
@@ -4,9 +4,10 @@ declare const _default: {
|
|
|
4
4
|
}) => {
|
|
5
5
|
updateConfig(newConfig: Partial<import("../../../types").PluginConfig>): Promise<import("../../../types").PluginConfig | "Error. Couldn't update config">;
|
|
6
6
|
getConfig(): Promise<any>;
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
getRoute(documentId: string): Promise<any>;
|
|
8
|
+
getAllRoutes(): Promise<any>;
|
|
9
9
|
getRelatedRoute(documentId: string): Promise<any>;
|
|
10
|
+
getProhibitedRouteIds(documentId: string): Promise<string[]>;
|
|
10
11
|
getNavigation(documentId?: string, variant?: import("../../../types").StructuredNavigationVariant | "namesOnly"): Promise<any>;
|
|
11
12
|
createNavigation(name: string, visible: boolean): Promise<any>;
|
|
12
13
|
updateNavigation(documentId: string, data: import("../../../types").NavigationInput): Promise<any>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function buildCanonicalPath(slug: string, parentDocumentId: string): Promise<string>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function cascadeCanonicalPathUpdates(parentRouteId: string, newParentCanonicalPath: string): Promise<void>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function getNonInternalRouteIds(): Promise<string[]>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function getRouteAncestors(routeId: string): Promise<string[]>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function getRouteDescendants(routeId: string): Promise<string[]>;
|
|
@@ -2,10 +2,18 @@ import duplicateCheck from "./duplicateCheck";
|
|
|
2
2
|
import { createNavItem, updateNavItem, deleteNavItem } from "./navItemHandler";
|
|
3
3
|
import { getAdminService, getClientService } from "./pluginHelpers";
|
|
4
4
|
import reduceDepthOfOrphanedItems from "./reduceDepthOfOrphanedItems";
|
|
5
|
-
import { createExternalRoute } from "./routeHandler";
|
|
5
|
+
import { createExternalRoute, updateRoute, deleteRoute } from "./routeHandler";
|
|
6
6
|
import buildStructuredNavigation from './buildStructuredNavigation';
|
|
7
7
|
import extractRouteAndItems from './extractRouteAndItems';
|
|
8
8
|
import getFullPopulateObject from './populateDeep';
|
|
9
9
|
import cleanRootKeys from './cleanRootKeys';
|
|
10
10
|
import removeWaFields from './removeWaFields';
|
|
11
|
-
|
|
11
|
+
import buildCanonicalPath from './buildCanonicalPath';
|
|
12
|
+
import cascadeCanonicalPathUpdates from "./cascadeCanonicalPathUpdates";
|
|
13
|
+
import getRouteAncestors from "./getRouteAncestors";
|
|
14
|
+
import getRouteDescendants from "./getRouteDescendants";
|
|
15
|
+
import getNonInternalRouteIds from "./getNonInternalRouteIds";
|
|
16
|
+
import validateRouteDependencies from "./validateRouteDependencies";
|
|
17
|
+
import buildNavigationPath from "./buildNavigationPath";
|
|
18
|
+
import { handleItemDeletion, handleItemUpdate, calculateParentAndOrder } from "./navigationItemStructure";
|
|
19
|
+
export { duplicateCheck, createNavItem, updateNavItem, deleteNavItem, getAdminService, getClientService, reduceDepthOfOrphanedItems, createExternalRoute, updateRoute, deleteRoute, buildStructuredNavigation, extractRouteAndItems, getFullPopulateObject, cleanRootKeys, removeWaFields, buildCanonicalPath, cascadeCanonicalPathUpdates, getRouteAncestors, getRouteDescendants, getNonInternalRouteIds, validateRouteDependencies, buildNavigationPath, handleItemDeletion, handleItemUpdate, calculateParentAndOrder, };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { NestedNavItem } from "../../../types";
|
|
2
|
+
export declare function handleItemDeletion(navigationItems: NestedNavItem[]): Promise<{
|
|
3
|
+
success: boolean;
|
|
4
|
+
items: NestedNavItem[];
|
|
5
|
+
errors: string[];
|
|
6
|
+
}>;
|
|
7
|
+
export declare function handleItemUpdate({ item, calculatedParent, calculatedOrder, navigationId, newNavItemsMap, }: {
|
|
8
|
+
item: NestedNavItem;
|
|
9
|
+
calculatedParent: string | null;
|
|
10
|
+
calculatedOrder: number;
|
|
11
|
+
navigationId: string;
|
|
12
|
+
newNavItemsMap: Map<string, NestedNavItem>;
|
|
13
|
+
}): Promise<{
|
|
14
|
+
success: boolean;
|
|
15
|
+
errors: string[];
|
|
16
|
+
}>;
|
|
17
|
+
export declare function calculateParentAndOrder({ navigationItems, item, index, parentIds, groupIndices, newNavItemsMap }: {
|
|
18
|
+
navigationItems: NestedNavItem[];
|
|
19
|
+
item: NestedNavItem;
|
|
20
|
+
index: number;
|
|
21
|
+
parentIds: string[];
|
|
22
|
+
groupIndices: number[];
|
|
23
|
+
newNavItemsMap: Map<string, NestedNavItem>;
|
|
24
|
+
}): {
|
|
25
|
+
calculatedParent: string;
|
|
26
|
+
calculatedOrder: number;
|
|
27
|
+
};
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
-
import type { RouteSettings } from "../../../types";
|
|
1
|
+
import type { Route, RouteSettings } from "../../../types";
|
|
2
2
|
declare function createExternalRoute(data: RouteSettings): Promise<import("@strapi/types/dist/modules/documents").AnyDocument>;
|
|
3
|
-
|
|
3
|
+
declare function updateRoute(documentId: string, data: RouteSettings): Promise<Route>;
|
|
4
|
+
declare function deleteRoute(documentId: string): Promise<boolean>;
|
|
5
|
+
export { createExternalRoute, updateRoute, deleteRoute, };
|
package/dist/types/index.d.ts
CHANGED
|
@@ -49,17 +49,18 @@ export type NestedNavItem = {
|
|
|
49
49
|
status: 'published' | 'draft' | 'modified' | null;
|
|
50
50
|
depth?: number;
|
|
51
51
|
order: number;
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
52
|
+
clientModifications?: ClientModifications;
|
|
53
|
+
initialClientModifications?: ClientModifications;
|
|
54
|
+
};
|
|
55
|
+
export type ClientModifications = {
|
|
56
|
+
type: 'create' | 'update' | 'delete';
|
|
57
|
+
title?: string;
|
|
58
|
+
slug?: string;
|
|
59
|
+
path?: string;
|
|
60
|
+
isOverride?: boolean;
|
|
61
|
+
route?: string | null;
|
|
62
|
+
parent?: string | null;
|
|
63
|
+
navigation?: string | null;
|
|
64
|
+
autoGenerated?: boolean;
|
|
64
65
|
};
|
|
65
66
|
export type StructuredNavigationVariant = 'nested' | 'flat';
|
package/dist/types/route.d.ts
CHANGED
|
@@ -5,15 +5,18 @@ export type Route = {
|
|
|
5
5
|
slug: string;
|
|
6
6
|
path: string;
|
|
7
7
|
uidPath: string;
|
|
8
|
+
canonicalPath: string;
|
|
8
9
|
relatedContentType: string;
|
|
9
10
|
relatedId: number;
|
|
10
11
|
relatedDocumentId: string;
|
|
11
|
-
type:
|
|
12
|
+
type: RouteType;
|
|
12
13
|
active: boolean;
|
|
13
14
|
isOverride: boolean;
|
|
14
15
|
navitem: {
|
|
15
16
|
id: number;
|
|
16
17
|
} | null;
|
|
18
|
+
parent?: Route;
|
|
19
|
+
children?: Route[];
|
|
17
20
|
createdAt: string;
|
|
18
21
|
updatedAt: string;
|
|
19
22
|
};
|
|
@@ -28,5 +31,7 @@ export type RouteSettings = {
|
|
|
28
31
|
isOverride?: boolean;
|
|
29
32
|
active?: boolean;
|
|
30
33
|
navitem?: number;
|
|
31
|
-
type?:
|
|
34
|
+
type?: RouteType;
|
|
35
|
+
parent?: string;
|
|
32
36
|
};
|
|
37
|
+
export type RouteType = 'internal' | 'external' | 'wrapper';
|
package/dist/types/strapi.d.ts
CHANGED
|
@@ -23,14 +23,13 @@ export type ConfigContentType = {
|
|
|
23
23
|
uid: string;
|
|
24
24
|
label: string;
|
|
25
25
|
default: string;
|
|
26
|
-
pattern?: string;
|
|
27
26
|
};
|
|
28
27
|
export type PluginConfig = {
|
|
29
28
|
selectedContentTypes: ConfigContentType[];
|
|
30
29
|
navigation: {
|
|
31
30
|
maxDepth: number;
|
|
32
31
|
};
|
|
33
|
-
migrationVersion
|
|
32
|
+
migrationVersion?: string;
|
|
34
33
|
};
|
|
35
34
|
export type Entity = {
|
|
36
35
|
id: number;
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import getPath from './getPath';
|
|
2
1
|
import transformToUrl from './transformToUrl';
|
|
3
2
|
import { waNavigation, waNavItem, waRoute } from './pluginConstants';
|
|
4
3
|
import { PLUGIN_ID, PLUGIN_NAME, PLUGIN_VERSION } from './pluginId';
|
|
5
|
-
export {
|
|
4
|
+
export { transformToUrl, waNavigation, waNavItem, waRoute, PLUGIN_ID, PLUGIN_NAME, PLUGIN_VERSION };
|
package/package.json
CHANGED
package/dist/types/modal.d.ts
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import type { Entity, GroupedEntities, NestedNavItem, NestedNavigation, Route, RouteSettings } from './';
|
|
3
|
-
export type ModalItem_VariantCreate = {
|
|
4
|
-
parentId?: string;
|
|
5
|
-
onCreate: (newItem: NestedNavItem) => void;
|
|
6
|
-
};
|
|
7
|
-
export type ModalItem_VariantEdit = {
|
|
8
|
-
item: NestedNavItem;
|
|
9
|
-
onEdit: (editedItem: NestedNavItem) => void;
|
|
10
|
-
};
|
|
11
|
-
export type modalSharedLogic = {
|
|
12
|
-
availableEntities: GroupedEntities[];
|
|
13
|
-
setAvailableEntities: (value: GroupedEntities[]) => void;
|
|
14
|
-
selectedEntity: Entity | null | undefined;
|
|
15
|
-
setSelectedEntity: (value: Entity | null | undefined) => void;
|
|
16
|
-
selectedContentType: GroupedEntities | undefined;
|
|
17
|
-
setSelectedContentType: (value: GroupedEntities) => void;
|
|
18
|
-
entityRoute: Route | undefined;
|
|
19
|
-
setEntityRoute: (value: Route) => void;
|
|
20
|
-
entities: GroupedEntities[];
|
|
21
|
-
updateRoute: (body: RouteSettings, documentId: string) => Promise<any>;
|
|
22
|
-
getRelatedRoute: (relatedDocumentId: string) => Promise<Route>;
|
|
23
|
-
replacement: string;
|
|
24
|
-
setReplacement: (value: string) => void;
|
|
25
|
-
validationState: 'initial' | 'checking' | 'done';
|
|
26
|
-
setValidationState: (value: 'initial' | 'checking' | 'done') => void;
|
|
27
|
-
initialState: React.RefObject<RouteSettings>;
|
|
28
|
-
navItemState: RouteSettings;
|
|
29
|
-
dispatchItemState: React.Dispatch<any>;
|
|
30
|
-
path: any;
|
|
31
|
-
dispatchPath: React.Dispatch<any>;
|
|
32
|
-
debouncedCheckUrl: (url: string, routeDocumentId?: string | null | undefined) => void;
|
|
33
|
-
modalType: string;
|
|
34
|
-
setModalType: (value: string) => void;
|
|
35
|
-
selectedNavigation: NestedNavigation | undefined;
|
|
36
|
-
};
|
package/dist/utils/getPath.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default function getPath(parentPath: string, slug: string): string;
|