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.
@@ -68,6 +68,11 @@ declare const _default: {
68
68
  default: boolean;
69
69
  configurable: boolean;
70
70
  };
71
+ autoSync: {
72
+ type: string;
73
+ default: boolean;
74
+ configurable: boolean;
75
+ };
71
76
  related: {
72
77
  type: string;
73
78
  relation: string;
@@ -67,6 +67,11 @@ declare const _default: {
67
67
  default: boolean;
68
68
  configurable: boolean;
69
69
  };
70
+ autoSync: {
71
+ type: string;
72
+ default: boolean;
73
+ configurable: boolean;
74
+ };
70
75
  related: {
71
76
  type: string;
72
77
  relation: string;
@@ -73,6 +73,11 @@ exports.default = {
73
73
  default: false,
74
74
  configurable: false
75
75
  },
76
+ autoSync: {
77
+ type: "boolean",
78
+ default: true,
79
+ configurable: false
80
+ },
76
81
  related: {
77
82
  type: "relation",
78
83
  relation: "oneToOne",
package/server/index.d.ts CHANGED
@@ -154,6 +154,11 @@ declare const _default: {
154
154
  default: boolean;
155
155
  configurable: boolean;
156
156
  };
157
+ autoSync: {
158
+ type: string;
159
+ default: boolean;
160
+ configurable: boolean;
161
+ };
157
162
  related: {
158
163
  type: string;
159
164
  relation: string;
@@ -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[];
@@ -154,6 +154,11 @@ declare const _default: () => {
154
154
  default: boolean;
155
155
  configurable: boolean;
156
156
  };
157
+ autoSync: {
158
+ type: string;
159
+ default: boolean;
160
+ configurable: boolean;
161
+ };
157
162
  related: {
158
163
  type: string;
159
164
  relation: string;