strapi-plugin-navigation 3.2.3 → 3.2.4
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 +5 -0
- package/dist/admin/index.js +280 -280
- package/dist/admin/index.mjs +4455 -4448
- package/dist/server/index.js +27 -27
- package/dist/server/index.mjs +2228 -2218
- package/dist/server/src/controllers/admin.d.ts +1 -1
- package/dist/server/src/controllers/client.d.ts +3 -3
- package/dist/server/src/controllers/validators.d.ts +7 -0
- package/dist/server/src/index.d.ts +4 -4
- package/dist/server/src/services/client/client.d.ts +3 -3
- package/dist/server/src/services/client/types.d.ts +3 -0
- package/dist/server/src/services/common/common.d.ts +1 -1
- package/dist/server/src/services/common/types.d.ts +1 -0
- package/dist/server/src/services/index.d.ts +4 -4
- package/package.json +1 -1
|
@@ -98,7 +98,7 @@ export default function adminController(context: {
|
|
|
98
98
|
tag?: string | undefined;
|
|
99
99
|
}> | undefined): Promise<void>;
|
|
100
100
|
}>;
|
|
101
|
-
mapToNavigationItemDTO({ locale, master, navigationItems, parent, populate, }: import("../services/common/types").MapToNavigationItemDTOInput): Promise<import("../dtos").NavigationItemDTO[]>;
|
|
101
|
+
mapToNavigationItemDTO({ locale, master, navigationItems, parent, populate, status, }: import("../services/common/types").MapToNavigationItemDTOInput): Promise<import("../dtos").NavigationItemDTO[]>;
|
|
102
102
|
setDefaultConfig(): Promise<{
|
|
103
103
|
additionalFields: ("audience" | {
|
|
104
104
|
type: "string" | "boolean";
|
|
@@ -81,7 +81,7 @@ export default function clientController(context: {
|
|
|
81
81
|
required?: boolean | undefined;
|
|
82
82
|
enabled?: boolean | undefined;
|
|
83
83
|
})[];
|
|
84
|
-
renderType({ criteria, filter, itemCriteria, locale, populate, rootPath, type, wrapRelated, }: import("../services/client/types").RenderTypeInput): Promise<import("../dtos").NavigationItemDTO[] | {
|
|
84
|
+
renderType({ criteria, filter, itemCriteria, locale, populate, rootPath, type, wrapRelated, status, }: import("../services/client/types").RenderTypeInput): Promise<import("../dtos").NavigationItemDTO[] | {
|
|
85
85
|
pages: {};
|
|
86
86
|
nav: {};
|
|
87
87
|
} | {
|
|
@@ -104,7 +104,7 @@ export default function clientController(context: {
|
|
|
104
104
|
master?: import("../dtos").NavigationDTO | undefined;
|
|
105
105
|
parent?: import("../dtos").NavigationItemDTO | null | undefined;
|
|
106
106
|
}[]>;
|
|
107
|
-
renderChildren({ childUIKey, idOrSlug, locale, menuOnly, type, wrapRelated, }: import("../services/client/types").RenderChildrenInput): Promise<import("../dtos").NavigationItemDTO[] | {
|
|
107
|
+
renderChildren({ childUIKey, idOrSlug, locale, menuOnly, type, wrapRelated, status, }: import("../services/client/types").RenderChildrenInput): Promise<import("../dtos").NavigationItemDTO[] | {
|
|
108
108
|
pages: {};
|
|
109
109
|
nav: {};
|
|
110
110
|
} | {
|
|
@@ -127,7 +127,7 @@ export default function clientController(context: {
|
|
|
127
127
|
master?: import("../dtos").NavigationDTO | undefined;
|
|
128
128
|
parent?: import("../dtos").NavigationItemDTO | null | undefined;
|
|
129
129
|
}[]>;
|
|
130
|
-
render({ idOrSlug, locale, menuOnly, populate, rootPath, type, wrapRelated, }: import("../services/client/types").RenderInput): Promise<import("../dtos").NavigationItemDTO[] | {
|
|
130
|
+
render({ idOrSlug, locale, menuOnly, populate, rootPath, type, wrapRelated, status, }: import("../services/client/types").RenderInput): Promise<import("../dtos").NavigationItemDTO[] | {
|
|
131
131
|
pages: {};
|
|
132
132
|
nav: {};
|
|
133
133
|
} | {
|
|
@@ -14,6 +14,7 @@ export declare const readAllQuerySchema: z.ZodObject<{
|
|
|
14
14
|
orderDirection?: "DESC" | "ASC" | undefined;
|
|
15
15
|
}>;
|
|
16
16
|
export declare const renderTypeSchema: z.ZodEnum<["FLAT", "TREE", "RFR"]>;
|
|
17
|
+
export declare const statusSchema: z.ZodEnum<["draft", "published"]>;
|
|
17
18
|
export declare const populateSchema: z.ZodUnion<[z.ZodBoolean, z.ZodString, z.ZodArray<z.ZodString, "many">, z.ZodUndefined]>;
|
|
18
19
|
export declare const renderQuerySchema: z.ZodObject<{
|
|
19
20
|
type: z.ZodOptional<z.ZodEnum<["FLAT", "TREE", "RFR"]>>;
|
|
@@ -21,13 +22,16 @@ export declare const renderQuerySchema: z.ZodObject<{
|
|
|
21
22
|
path: z.ZodOptional<z.ZodString>;
|
|
22
23
|
locale: z.ZodOptional<z.ZodString>;
|
|
23
24
|
populate: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodString, z.ZodArray<z.ZodString, "many">, z.ZodUndefined]>>;
|
|
25
|
+
status: z.ZodOptional<z.ZodEnum<["draft", "published"]>>;
|
|
24
26
|
}, "strip", z.ZodTypeAny, {
|
|
27
|
+
status?: "published" | "draft" | undefined;
|
|
25
28
|
path?: string | undefined;
|
|
26
29
|
type?: "FLAT" | "TREE" | "RFR" | undefined;
|
|
27
30
|
locale?: string | undefined;
|
|
28
31
|
populate?: string | boolean | string[] | undefined;
|
|
29
32
|
menu?: "true" | "false" | undefined;
|
|
30
33
|
}, {
|
|
34
|
+
status?: "published" | "draft" | undefined;
|
|
31
35
|
path?: string | undefined;
|
|
32
36
|
type?: "FLAT" | "TREE" | "RFR" | undefined;
|
|
33
37
|
locale?: string | undefined;
|
|
@@ -38,11 +42,14 @@ export declare const renderChildQueryParams: z.ZodObject<{
|
|
|
38
42
|
type: z.ZodOptional<z.ZodEnum<["FLAT", "TREE", "RFR"]>>;
|
|
39
43
|
menu: z.ZodOptional<z.ZodEnum<["true", "false"]>>;
|
|
40
44
|
locale: z.ZodOptional<z.ZodString>;
|
|
45
|
+
status: z.ZodOptional<z.ZodEnum<["draft", "published"]>>;
|
|
41
46
|
}, "strip", z.ZodTypeAny, {
|
|
47
|
+
status?: "published" | "draft" | undefined;
|
|
42
48
|
type?: "FLAT" | "TREE" | "RFR" | undefined;
|
|
43
49
|
locale?: string | undefined;
|
|
44
50
|
menu?: "true" | "false" | undefined;
|
|
45
51
|
}, {
|
|
52
|
+
status?: "published" | "draft" | undefined;
|
|
46
53
|
type?: "FLAT" | "TREE" | "RFR" | undefined;
|
|
47
54
|
locale?: string | undefined;
|
|
48
55
|
menu?: "true" | "false" | undefined;
|
|
@@ -356,7 +356,7 @@ declare const _default: {
|
|
|
356
356
|
tag?: string | undefined;
|
|
357
357
|
}> | undefined): Promise<void>;
|
|
358
358
|
}>;
|
|
359
|
-
mapToNavigationItemDTO({ locale, master, navigationItems, parent, populate, }: import("./services/common/types").MapToNavigationItemDTOInput): Promise<import("./dtos").NavigationItemDTO[]>;
|
|
359
|
+
mapToNavigationItemDTO({ locale, master, navigationItems, parent, populate, status, }: import("./services/common/types").MapToNavigationItemDTOInput): Promise<import("./dtos").NavigationItemDTO[]>;
|
|
360
360
|
setDefaultConfig(): Promise<{
|
|
361
361
|
additionalFields: ("audience" | {
|
|
362
362
|
type: "string" | "boolean";
|
|
@@ -1395,7 +1395,7 @@ declare const _default: {
|
|
|
1395
1395
|
required?: boolean | undefined;
|
|
1396
1396
|
enabled?: boolean | undefined;
|
|
1397
1397
|
})[];
|
|
1398
|
-
renderType({ criteria, filter, itemCriteria, locale, populate, rootPath, type, wrapRelated, }: import("./services/client/types").RenderTypeInput): Promise<import("./dtos").NavigationItemDTO[] | {
|
|
1398
|
+
renderType({ criteria, filter, itemCriteria, locale, populate, rootPath, type, wrapRelated, status, }: import("./services/client/types").RenderTypeInput): Promise<import("./dtos").NavigationItemDTO[] | {
|
|
1399
1399
|
pages: {};
|
|
1400
1400
|
nav: {};
|
|
1401
1401
|
} | {
|
|
@@ -1418,7 +1418,7 @@ declare const _default: {
|
|
|
1418
1418
|
master?: import("./dtos").NavigationDTO | undefined;
|
|
1419
1419
|
parent?: import("./dtos").NavigationItemDTO | null | undefined;
|
|
1420
1420
|
}[]>;
|
|
1421
|
-
renderChildren({ childUIKey, idOrSlug, locale, menuOnly, type, wrapRelated, }: import("./services/client/types").RenderChildrenInput): Promise<import("./dtos").NavigationItemDTO[] | {
|
|
1421
|
+
renderChildren({ childUIKey, idOrSlug, locale, menuOnly, type, wrapRelated, status, }: import("./services/client/types").RenderChildrenInput): Promise<import("./dtos").NavigationItemDTO[] | {
|
|
1422
1422
|
pages: {};
|
|
1423
1423
|
nav: {};
|
|
1424
1424
|
} | {
|
|
@@ -1441,7 +1441,7 @@ declare const _default: {
|
|
|
1441
1441
|
master?: import("./dtos").NavigationDTO | undefined;
|
|
1442
1442
|
parent?: import("./dtos").NavigationItemDTO | null | undefined;
|
|
1443
1443
|
}[]>;
|
|
1444
|
-
render({ idOrSlug, locale, menuOnly, populate, rootPath, type, wrapRelated, }: import("./services/client/types").RenderInput): Promise<import("./dtos").NavigationItemDTO[] | {
|
|
1444
|
+
render({ idOrSlug, locale, menuOnly, populate, rootPath, type, wrapRelated, status, }: import("./services/client/types").RenderInput): Promise<import("./dtos").NavigationItemDTO[] | {
|
|
1445
1445
|
pages: {};
|
|
1446
1446
|
nav: {};
|
|
1447
1447
|
} | {
|
|
@@ -23,7 +23,7 @@ declare const clientService: (context: {
|
|
|
23
23
|
};
|
|
24
24
|
renderTree({ items, documentId, path, itemParser, }: RenderTreeInput): Promise<NavigationItemDTO[]>;
|
|
25
25
|
getCustomFields(additionalFields: NavigationItemAdditionalField[]): NavigationItemCustomField[];
|
|
26
|
-
renderType({ criteria, filter, itemCriteria, locale, populate, rootPath, type, wrapRelated, }: RenderTypeInput): Promise<NavigationItemDTO[] | {
|
|
26
|
+
renderType({ criteria, filter, itemCriteria, locale, populate, rootPath, type, wrapRelated, status, }: RenderTypeInput): Promise<NavigationItemDTO[] | {
|
|
27
27
|
pages: {};
|
|
28
28
|
nav: {};
|
|
29
29
|
} | {
|
|
@@ -46,7 +46,7 @@ declare const clientService: (context: {
|
|
|
46
46
|
master?: import("../../dtos").NavigationDTO | undefined;
|
|
47
47
|
parent?: NavigationItemDTO | null | undefined;
|
|
48
48
|
}[]>;
|
|
49
|
-
renderChildren({ childUIKey, idOrSlug, locale, menuOnly, type, wrapRelated, }: RenderChildrenInput): Promise<NavigationItemDTO[] | {
|
|
49
|
+
renderChildren({ childUIKey, idOrSlug, locale, menuOnly, type, wrapRelated, status, }: RenderChildrenInput): Promise<NavigationItemDTO[] | {
|
|
50
50
|
pages: {};
|
|
51
51
|
nav: {};
|
|
52
52
|
} | {
|
|
@@ -69,7 +69,7 @@ declare const clientService: (context: {
|
|
|
69
69
|
master?: import("../../dtos").NavigationDTO | undefined;
|
|
70
70
|
parent?: NavigationItemDTO | null | undefined;
|
|
71
71
|
}[]>;
|
|
72
|
-
render({ idOrSlug, locale, menuOnly, populate, rootPath, type, wrapRelated, }: RenderInput): Promise<NavigationItemDTO[] | {
|
|
72
|
+
render({ idOrSlug, locale, menuOnly, populate, rootPath, type, wrapRelated, status, }: RenderInput): Promise<NavigationItemDTO[] | {
|
|
73
73
|
pages: {};
|
|
74
74
|
nav: {};
|
|
75
75
|
} | {
|
|
@@ -46,6 +46,7 @@ export interface RenderTypeInput {
|
|
|
46
46
|
wrapRelated?: boolean;
|
|
47
47
|
populate?: PopulateQueryParam;
|
|
48
48
|
locale?: string;
|
|
49
|
+
status?: 'draft' | 'published';
|
|
49
50
|
}
|
|
50
51
|
export interface RenderChildrenInput {
|
|
51
52
|
idOrSlug: number | string;
|
|
@@ -54,6 +55,7 @@ export interface RenderChildrenInput {
|
|
|
54
55
|
menuOnly?: boolean;
|
|
55
56
|
wrapRelated?: boolean;
|
|
56
57
|
locale?: string;
|
|
58
|
+
status?: 'draft' | 'published';
|
|
57
59
|
}
|
|
58
60
|
export interface RenderInput {
|
|
59
61
|
idOrSlug: string | number;
|
|
@@ -63,4 +65,5 @@ export interface RenderInput {
|
|
|
63
65
|
wrapRelated?: boolean;
|
|
64
66
|
populate?: PopulateQueryParam;
|
|
65
67
|
locale?: string;
|
|
68
|
+
status?: 'draft' | 'published';
|
|
66
69
|
}
|
|
@@ -8,7 +8,7 @@ declare const commonService: (context: {
|
|
|
8
8
|
strapi: Core.Strapi;
|
|
9
9
|
}) => {
|
|
10
10
|
getPluginStore(): Promise<ReturnType<typeof strapi.store>>;
|
|
11
|
-
mapToNavigationItemDTO({ locale, master, navigationItems, parent, populate, }: MapToNavigationItemDTOInput): Promise<NavigationItemDTO[]>;
|
|
11
|
+
mapToNavigationItemDTO({ locale, master, navigationItems, parent, populate, status, }: MapToNavigationItemDTOInput): Promise<NavigationItemDTO[]>;
|
|
12
12
|
setDefaultConfig(): Promise<NavigationPluginConfigDBSchema>;
|
|
13
13
|
getBranchName({ item }: GetBranchNameInput): NavigationActionsCategories | void;
|
|
14
14
|
analyzeBranch({ masterEntity, navigationItems, parentItem, prevAction, }: AnalyzeBranchInput): Promise<NavigationAction[]>;
|
|
@@ -19,6 +19,7 @@ export interface MapToNavigationItemDTOInput {
|
|
|
19
19
|
master?: Omit<NavigationDTO, 'items'>;
|
|
20
20
|
parent?: NavigationItemDTO;
|
|
21
21
|
locale?: string;
|
|
22
|
+
status?: 'draft' | 'published';
|
|
22
23
|
}
|
|
23
24
|
export interface CreateBranchInput {
|
|
24
25
|
navigationItems: CreateBranchNavigationItemDTO[];
|
|
@@ -96,7 +96,7 @@ declare const _default: {
|
|
|
96
96
|
tag?: string | undefined;
|
|
97
97
|
}> | undefined): Promise<void>;
|
|
98
98
|
}>;
|
|
99
|
-
mapToNavigationItemDTO({ locale, master, navigationItems, parent, populate, }: import("./common/types").MapToNavigationItemDTOInput): Promise<import("../dtos").NavigationItemDTO[]>;
|
|
99
|
+
mapToNavigationItemDTO({ locale, master, navigationItems, parent, populate, status, }: import("./common/types").MapToNavigationItemDTOInput): Promise<import("../dtos").NavigationItemDTO[]>;
|
|
100
100
|
setDefaultConfig(): Promise<{
|
|
101
101
|
additionalFields: ("audience" | {
|
|
102
102
|
type: "string" | "boolean";
|
|
@@ -1135,7 +1135,7 @@ declare const _default: {
|
|
|
1135
1135
|
required?: boolean | undefined;
|
|
1136
1136
|
enabled?: boolean | undefined;
|
|
1137
1137
|
})[];
|
|
1138
|
-
renderType({ criteria, filter, itemCriteria, locale, populate, rootPath, type, wrapRelated, }: import("./client/types").RenderTypeInput): Promise<import("../dtos").NavigationItemDTO[] | {
|
|
1138
|
+
renderType({ criteria, filter, itemCriteria, locale, populate, rootPath, type, wrapRelated, status, }: import("./client/types").RenderTypeInput): Promise<import("../dtos").NavigationItemDTO[] | {
|
|
1139
1139
|
pages: {};
|
|
1140
1140
|
nav: {};
|
|
1141
1141
|
} | {
|
|
@@ -1158,7 +1158,7 @@ declare const _default: {
|
|
|
1158
1158
|
master?: import("../dtos").NavigationDTO | undefined;
|
|
1159
1159
|
parent?: import("../dtos").NavigationItemDTO | null | undefined;
|
|
1160
1160
|
}[]>;
|
|
1161
|
-
renderChildren({ childUIKey, idOrSlug, locale, menuOnly, type, wrapRelated, }: import("./client/types").RenderChildrenInput): Promise<import("../dtos").NavigationItemDTO[] | {
|
|
1161
|
+
renderChildren({ childUIKey, idOrSlug, locale, menuOnly, type, wrapRelated, status, }: import("./client/types").RenderChildrenInput): Promise<import("../dtos").NavigationItemDTO[] | {
|
|
1162
1162
|
pages: {};
|
|
1163
1163
|
nav: {};
|
|
1164
1164
|
} | {
|
|
@@ -1181,7 +1181,7 @@ declare const _default: {
|
|
|
1181
1181
|
master?: import("../dtos").NavigationDTO | undefined;
|
|
1182
1182
|
parent?: import("../dtos").NavigationItemDTO | null | undefined;
|
|
1183
1183
|
}[]>;
|
|
1184
|
-
render({ idOrSlug, locale, menuOnly, populate, rootPath, type, wrapRelated, }: import("./client/types").RenderInput): Promise<import("../dtos").NavigationItemDTO[] | {
|
|
1184
|
+
render({ idOrSlug, locale, menuOnly, populate, rootPath, type, wrapRelated, status, }: import("./client/types").RenderInput): Promise<import("../dtos").NavigationItemDTO[] | {
|
|
1185
1185
|
pages: {};
|
|
1186
1186
|
nav: {};
|
|
1187
1187
|
} | {
|