strapi-plugin-navigation 2.5.0 → 2.5.2
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 +1 -1
- package/admin/src/pages/SettingsPage/index.js +112 -102
- package/admin/src/pages/SettingsPage/types.d.ts +1 -0
- package/admin/src/pages/SettingsPage/utils/functions.js +2 -1
- package/admin/src/pages/View/components/NavigationItemForm/index.js +17 -18
- package/admin/src/pages/View/components/NavigationItemForm/types.d.ts +1 -0
- package/admin/src/pages/View/components/NavigationItemForm/utils/form.d.ts +2 -0
- package/admin/src/pages/View/components/NavigationItemForm/utils/form.js +2 -0
- package/admin/src/pages/View/utils/parsers.d.ts +1 -0
- package/admin/src/pages/View/utils/parsers.js +2 -1
- package/admin/src/translations/en.json +2 -0
- package/package.json +3 -3
- package/server/config/index.js +1 -0
- package/server/config/setupStrategy.js +1 -0
- package/server/content-types/index.d.ts +5 -0
- package/server/content-types/navigation-item/index.d.ts +5 -0
- package/server/content-types/navigation-item/schema.d.ts +5 -0
- package/server/content-types/navigation-item/schema.js +5 -0
- package/server/index.d.ts +5 -0
- package/server/services/admin.js +2 -0
- package/server/services/client.js +1 -1
- package/server/utils/functions.d.ts +4 -0
- package/strapi-server.d.ts +5 -0
- package/tsconfig.tsbuildinfo +1 -1
- package/types/config.d.ts +1 -0
- package/types/contentTypes.d.ts +1 -0
package/server/index.d.ts
CHANGED
package/server/services/admin.js
CHANGED
|
@@ -20,6 +20,7 @@ const adminService = ({ strapi, }) => ({
|
|
|
20
20
|
const contentTypesPopulate = config.contentTypesPopulate;
|
|
21
21
|
const pathDefaultFields = config.pathDefaultFields;
|
|
22
22
|
const allowedLevels = config.allowedLevels;
|
|
23
|
+
const preferCustomContentTypes = config.preferCustomContentTypes;
|
|
23
24
|
const isGQLPluginEnabled = !(0, lodash_1.isNil)(strapi.plugin("graphql"));
|
|
24
25
|
let extendedResult = {
|
|
25
26
|
allowedContentTypes: utils_2.ALLOWED_CONTENT_TYPES,
|
|
@@ -45,6 +46,7 @@ const adminService = ({ strapi, }) => ({
|
|
|
45
46
|
},
|
|
46
47
|
isGQLPluginEnabled: viaSettingsPage ? isGQLPluginEnabled : undefined,
|
|
47
48
|
cascadeMenuAttached,
|
|
49
|
+
preferCustomContentTypes,
|
|
48
50
|
};
|
|
49
51
|
const i18nConfig = await (0, i18n_1.addI18NConfigFields)({
|
|
50
52
|
strapi,
|
|
@@ -308,7 +308,7 @@ const clientService = ({ strapi }) => ({
|
|
|
308
308
|
return nestedOrders;
|
|
309
309
|
};
|
|
310
310
|
return result
|
|
311
|
-
.map(({ additionalFields, ...item }) => {
|
|
311
|
+
.map(({ additionalFields, autoSync: _, ...item }) => {
|
|
312
312
|
const customFields = enabledCustomFieldsNames.reduce((acc, field) => {
|
|
313
313
|
const mapper = customFieldsDefinitions.find(({ name }) => name === field)?.type === "media"
|
|
314
314
|
? (_) => pickMediaFields(JSON.parse(_.toString()))
|
|
@@ -56,12 +56,14 @@ export declare const templateNameFactory: (items: import("strapi-typed").TypeRes
|
|
|
56
56
|
externalPath: string | null;
|
|
57
57
|
related: import("../../types").NavigationItemRelated | null;
|
|
58
58
|
additionalFields: StringMap<string | boolean>;
|
|
59
|
+
autoSync?: boolean | undefined;
|
|
59
60
|
}> | null;
|
|
60
61
|
master: import("../../types").Navigation;
|
|
61
62
|
audience: import("../../types").Audience[];
|
|
62
63
|
externalPath: string | null;
|
|
63
64
|
related: ContentTypeEntity | ContentTypeEntity[] | null;
|
|
64
65
|
additionalFields: StringMap<string | boolean>;
|
|
66
|
+
autoSync?: boolean | undefined;
|
|
65
67
|
}>[] | undefined, strapi: IStrapi, contentTypes?: StrapiContentType<ToBeFixed>[]) => Promise<(contentType: ToBeFixed, id: Id) => any>;
|
|
66
68
|
export declare const getTemplateComponentFromTemplate: (strapi: IStrapi, template?: ToBeFixed[]) => any;
|
|
67
69
|
export declare const prepareAuditLog: (actions: NavigationActions[]) => string;
|
|
@@ -102,6 +104,7 @@ export declare const buildNestedPaths: <T extends Pick<import("strapi-typed").Ty
|
|
|
102
104
|
externalPath: string | null;
|
|
103
105
|
related: import("../../types").NavigationItemRelated | null;
|
|
104
106
|
additionalFields: StringMap<string | boolean>;
|
|
107
|
+
autoSync?: boolean | undefined;
|
|
105
108
|
}>, "id" | "path" | "parent">>(items: T[], id?: Id | null, parentPath?: string | null) => NestedPath[];
|
|
106
109
|
export declare const filterByPath: <T extends Pick<import("strapi-typed").TypeResult<{
|
|
107
110
|
path: string | null;
|
|
@@ -133,6 +136,7 @@ export declare const filterByPath: <T extends Pick<import("strapi-typed").TypeRe
|
|
|
133
136
|
externalPath: string | null;
|
|
134
137
|
related: import("../../types").NavigationItemRelated | null;
|
|
135
138
|
additionalFields: StringMap<string | boolean>;
|
|
139
|
+
autoSync?: boolean | undefined;
|
|
136
140
|
}>, "id" | "path" | "parent">>(items: T[], path: string | null) => {
|
|
137
141
|
root?: NestedPath | undefined;
|
|
138
142
|
items: T[];
|
package/strapi-server.d.ts
CHANGED