strapi-plugin-navigation 2.2.11 → 2.2.13
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/components/AdditionalFieldInput/types.d.ts +3 -3
- package/admin/src/components/ConfirmationDialog/index.d.ts +10 -10
- package/admin/src/components/EmptyView/index.js +2 -0
- package/admin/src/components/Item/index.d.ts +15 -15
- package/admin/src/components/NavigationItemList/index.d.ts +11 -11
- package/admin/src/index.d.ts +5 -7
- package/admin/src/index.js +9 -17
- package/admin/src/pages/DataManagerProvider/index.d.ts +1 -1
- package/admin/src/pages/DataManagerProvider/index.js +18 -4
- package/admin/src/pages/DataManagerProvider/reducer.d.ts +15 -15
- package/admin/src/pages/SettingsPage/types.d.ts +8 -8
- package/admin/src/pages/SettingsPage/utils/functions.d.ts +0 -2
- package/admin/src/pages/View/components/NavigationHeader/index.js +2 -0
- package/admin/src/pages/View/components/NavigationItemForm/types.d.ts +8 -8
- package/admin/src/pages/View/components/NavigationItemPopup/NavigationItemPopupFooter.d.ts +9 -9
- package/admin/src/pages/View/components/NavigationItemPopup/index.d.ts +11 -11
- package/admin/src/pages/View/components/NavigationManager/Footer/index.d.ts +1 -1
- package/admin/src/pages/View/components/NavigationManager/types.d.ts +3 -3
- package/admin/src/pages/View/index.d.ts +1 -1
- package/admin/src/pages/View/index.js +3 -0
- package/admin/src/permissions.d.ts +3 -3
- package/admin/src/translations/ca.json +197 -0
- package/admin/src/translations/en.json +2 -1
- package/admin/src/translations/fr.json +2 -1
- package/admin/src/translations/index.d.ts +2 -0
- package/admin/src/translations/index.js +2 -0
- package/admin/src/utils/functions.d.ts +2 -2
- package/package.json +4 -4
- package/server/config/setupStrategy.js +11 -0
- package/server/i18n/graphQLEnhancers.d.ts +1 -1
- package/server/i18n/types.d.ts +11 -11
- package/server/i18n/utils.d.ts +2 -2
- package/server/services/admin.js +1 -1
- package/server/services/common.js +16 -9
- package/server/utils/functions.d.ts +2 -1
- package/server/utils/functions.js +16 -1
- package/tsconfig.tsbuildinfo +1 -1
- package/types/config.d.ts +8 -8
- package/types/contentTypes.d.ts +20 -20
- package/types/controllers.d.ts +2 -2
- package/types/graphQL.d.ts +1 -1
- package/types/i18n.d.ts +2 -2
- package/types/services.d.ts +2 -2
- package/types/utils.d.ts +21 -21
package/README.md
CHANGED
|
@@ -122,7 +122,7 @@ Complete installation requirements are exact same as for Strapi itself and can b
|
|
|
122
122
|
|
|
123
123
|
**Supported Strapi versions**:
|
|
124
124
|
|
|
125
|
-
- Strapi v4.
|
|
125
|
+
- Strapi v4.13.x (recently tested)
|
|
126
126
|
- Strapi v4.x
|
|
127
127
|
|
|
128
128
|
> This plugin is designed for **Strapi v4** and is not working with v3.x. To get version for **Strapi v3** install version [v1.x](https://github.com/VirtusLab-Open-Source/strapi-plugin-navigation/tree/strapi-v3).
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { MessageDescriptor } from "react-intl";
|
|
2
2
|
import { NavigationItemCustomField } from "../../../../types";
|
|
3
|
-
export
|
|
3
|
+
export type AdditionalFieldInputProps = {
|
|
4
4
|
field: NavigationItemCustomField;
|
|
5
5
|
isLoading: boolean;
|
|
6
6
|
onChange: (name: string, value: string) => void;
|
|
@@ -8,8 +8,8 @@ export declare type AdditionalFieldInputProps = {
|
|
|
8
8
|
disabled: boolean;
|
|
9
9
|
error: MessageDescriptor | null;
|
|
10
10
|
};
|
|
11
|
-
export
|
|
12
|
-
export
|
|
11
|
+
export type TargetProp = "value" | "checked";
|
|
12
|
+
export type Input = {
|
|
13
13
|
prop: TargetProp;
|
|
14
14
|
} & Pick<AdditionalFieldInputProps, "onChange" | "field">;
|
|
15
15
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -13,16 +13,16 @@ declare function ConfirmationDialog({ isVisible, isActionAsync, children, onConf
|
|
|
13
13
|
}): JSX.Element;
|
|
14
14
|
declare namespace ConfirmationDialog {
|
|
15
15
|
namespace propTypes {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
16
|
+
let isVisible: PropTypes.Requireable<boolean>;
|
|
17
|
+
let isActionAsync: PropTypes.Requireable<boolean>;
|
|
18
|
+
let children: PropTypes.Requireable<any>;
|
|
19
|
+
let header: PropTypes.Requireable<string>;
|
|
20
|
+
let labelCancel: PropTypes.Requireable<string>;
|
|
21
|
+
let labelConfirm: PropTypes.Requireable<string>;
|
|
22
|
+
let iconConfirm: PropTypes.Requireable<object>;
|
|
23
|
+
let onConfirm: PropTypes.Validator<(...args: any[]) => any>;
|
|
24
|
+
let onCancel: PropTypes.Validator<(...args: any[]) => any>;
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
|
-
import PropTypes from
|
|
27
|
+
import PropTypes from 'prop-types';
|
|
28
28
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -4,6 +4,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const styled_components_1 = __importDefault(require("styled-components"));
|
|
7
|
+
const Box_1 = require("@strapi/design-system/Box");
|
|
8
|
+
const Button_1 = require("@strapi/design-system/Button");
|
|
7
9
|
const EmptyView = styled_components_1.default.div `
|
|
8
10
|
display: flex;
|
|
9
11
|
flex-grow: 1;
|
|
@@ -2,30 +2,30 @@ export default Item;
|
|
|
2
2
|
declare function Item(props: any): JSX.Element;
|
|
3
3
|
declare namespace Item {
|
|
4
4
|
namespace propTypes {
|
|
5
|
-
|
|
5
|
+
let item: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
6
6
|
title: PropTypes.Requireable<string>;
|
|
7
7
|
type: PropTypes.Requireable<string>;
|
|
8
8
|
uiRouterKey: PropTypes.Requireable<string>;
|
|
9
9
|
path: PropTypes.Requireable<string>;
|
|
10
10
|
externalPath: PropTypes.Requireable<string>;
|
|
11
|
-
related: PropTypes.Requireable<string | number
|
|
11
|
+
related: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
12
12
|
menuAttached: PropTypes.Requireable<boolean>;
|
|
13
13
|
collapsed: PropTypes.Requireable<boolean>;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
14
|
+
}>>>;
|
|
15
|
+
let relatedRef: PropTypes.Requireable<object>;
|
|
16
|
+
let level: PropTypes.Requireable<number>;
|
|
17
|
+
let levelPath: PropTypes.Requireable<string>;
|
|
18
|
+
let isParentAttachedToMenu: PropTypes.Requireable<boolean>;
|
|
19
|
+
let onItemRestore: PropTypes.Validator<(...args: any[]) => any>;
|
|
20
|
+
let onItemLevelAdd: PropTypes.Validator<(...args: any[]) => any>;
|
|
21
|
+
let onItemRemove: PropTypes.Validator<(...args: any[]) => any>;
|
|
22
|
+
let onItemReOrder: PropTypes.Validator<(...args: any[]) => any>;
|
|
23
|
+
let onItemToggleCollapse: PropTypes.Validator<(...args: any[]) => any>;
|
|
24
|
+
let config: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
25
25
|
contentTypes: PropTypes.Validator<any[]>;
|
|
26
26
|
contentTypesNameFields: PropTypes.Validator<object>;
|
|
27
|
-
}
|
|
27
|
+
}>>>;
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
|
-
import PropTypes from
|
|
30
|
+
import PropTypes from 'prop-types';
|
|
31
31
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -19,17 +19,17 @@ declare function List({ allowedLevels, error, isParentAttachedToMenu, items, lev
|
|
|
19
19
|
}): JSX.Element;
|
|
20
20
|
declare namespace List {
|
|
21
21
|
namespace propTypes {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
22
|
+
let allowedLevels: PropTypes.Requireable<number>;
|
|
23
|
+
let isParentAttachedToMenu: PropTypes.Requireable<boolean>;
|
|
24
|
+
let items: PropTypes.Requireable<any[]>;
|
|
25
|
+
let level: PropTypes.Requireable<number>;
|
|
26
|
+
let onItemLevelAdd: PropTypes.Validator<(...args: any[]) => any>;
|
|
27
|
+
let onItemRemove: PropTypes.Validator<(...args: any[]) => any>;
|
|
28
|
+
let onItemRestore: PropTypes.Validator<(...args: any[]) => any>;
|
|
29
|
+
let onItemReOrder: PropTypes.Validator<(...args: any[]) => any>;
|
|
30
|
+
let onItemToggleCollapse: PropTypes.Validator<(...args: any[]) => any>;
|
|
31
|
+
let contentTypes: PropTypes.Validator<any[]>;
|
|
32
|
+
let contentTypesNameFields: PropTypes.Validator<object>;
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
import PropTypes from "prop-types";
|
package/admin/src/index.d.ts
CHANGED
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
declare namespace _default {
|
|
2
2
|
function register(app: any): void;
|
|
3
|
-
function register(app: any): void;
|
|
4
|
-
function bootstrap(): void;
|
|
5
3
|
function bootstrap(): void;
|
|
6
4
|
function registerTrads({ locales }: {
|
|
7
|
-
locales
|
|
8
|
-
}):
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
5
|
+
locales?: any[] | undefined;
|
|
6
|
+
}): {
|
|
7
|
+
data: any;
|
|
8
|
+
locale: any;
|
|
9
|
+
}[];
|
|
12
10
|
}
|
|
13
11
|
export default _default;
|
|
14
12
|
//# sourceMappingURL=index.d.ts.map
|
package/admin/src/index.js
CHANGED
|
@@ -31,7 +31,8 @@ const package_json_1 = __importDefault(require("../../package.json"));
|
|
|
31
31
|
const pluginId_1 = __importDefault(require("./pluginId"));
|
|
32
32
|
const permissions_1 = __importDefault(require("./permissions"));
|
|
33
33
|
const navigation_1 = __importDefault(require("./components/icons/navigation"));
|
|
34
|
-
const translations_1 = require("./translations");
|
|
34
|
+
const translations_1 = __importStar(require("./translations"));
|
|
35
|
+
const lodash_1 = require("lodash");
|
|
35
36
|
const name = package_json_1.default.strapi.name;
|
|
36
37
|
exports.default = {
|
|
37
38
|
register(app) {
|
|
@@ -72,22 +73,13 @@ exports.default = {
|
|
|
72
73
|
});
|
|
73
74
|
},
|
|
74
75
|
bootstrap() { },
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
return
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
})
|
|
83
|
-
.catch(() => {
|
|
84
|
-
return {
|
|
85
|
-
data: {},
|
|
86
|
-
locale,
|
|
87
|
-
};
|
|
88
|
-
});
|
|
89
|
-
}));
|
|
90
|
-
return Promise.resolve(importedTrads);
|
|
76
|
+
registerTrads({ locales = [] }) {
|
|
77
|
+
return locales.map((locale) => {
|
|
78
|
+
return {
|
|
79
|
+
data: (0, helper_plugin_1.prefixPluginTranslations)((0, lodash_1.get)(translations_1.default, locale), pluginId_1.default, {}),
|
|
80
|
+
locale,
|
|
81
|
+
};
|
|
82
|
+
});
|
|
91
83
|
},
|
|
92
84
|
};
|
|
93
85
|
//# sourceMappingURL=index.js.map
|
|
@@ -3,7 +3,7 @@ declare const _default: React.MemoExoticComponent<{
|
|
|
3
3
|
children: any;
|
|
4
4
|
}): JSX.Element;
|
|
5
5
|
propTypes: {
|
|
6
|
-
children: PropTypes.Validator<
|
|
6
|
+
children: PropTypes.Validator<NonNullable<PropTypes.ReactNodeLike>>;
|
|
7
7
|
};
|
|
8
8
|
}>;
|
|
9
9
|
export default _default;
|
|
@@ -274,12 +274,18 @@ const DataManagerProvider = ({ children }) => {
|
|
|
274
274
|
type: actions_1.SUBMIT_NAVIGATION_ERROR,
|
|
275
275
|
error: err.response.payload.data
|
|
276
276
|
});
|
|
277
|
-
|
|
278
|
-
|
|
277
|
+
if (err.response.payload.error &&
|
|
278
|
+
err.response.payload.error.details &&
|
|
279
|
+
err.response.payload.error.details.errorTitles) {
|
|
279
280
|
return toggleNotification({
|
|
280
281
|
type: 'warning',
|
|
281
282
|
message: {
|
|
282
|
-
id: formatMessage((0, translations_1.getTrad)('notification.navigation.error'), {
|
|
283
|
+
id: formatMessage((0, translations_1.getTrad)('notification.navigation.error'), {
|
|
284
|
+
...err.response.payload.error.details,
|
|
285
|
+
errorTitles: err.response.payload.error.details.errorTitles
|
|
286
|
+
.map(title => `"${title}"`)
|
|
287
|
+
.join(", ")
|
|
288
|
+
})
|
|
283
289
|
},
|
|
284
290
|
});
|
|
285
291
|
}
|
|
@@ -294,7 +300,15 @@ const DataManagerProvider = ({ children }) => {
|
|
|
294
300
|
method: "DELETE",
|
|
295
301
|
signal,
|
|
296
302
|
});
|
|
297
|
-
const slugify = (query) => (0, helper_plugin_1.request)(`/${pluginId_1.default}/slug?q=${query}`, { method: "GET", signal })
|
|
303
|
+
const slugify = (query) => (0, helper_plugin_1.request)(`/${pluginId_1.default}/slug?q=${query}`, { method: "GET", signal }).then((res) => {
|
|
304
|
+
if (!res?.slug) {
|
|
305
|
+
toggleNotification({
|
|
306
|
+
type: 'warning',
|
|
307
|
+
message: formatMessage((0, translations_1.getTrad)('notification.error.item.slug'), { query, result: res?.slug || "" })
|
|
308
|
+
});
|
|
309
|
+
}
|
|
310
|
+
return res;
|
|
311
|
+
});
|
|
298
312
|
const hardReset = () => getDataRef.current();
|
|
299
313
|
if (!canAccess && !isLoadingForPermissions) {
|
|
300
314
|
return (react_1.default.createElement(NoAccessPage_1.default, null));
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
export default reducer;
|
|
2
2
|
declare function reducer(state: any, action: any): (base?: ((draftState: any) => any) | undefined, ...args: unknown[]) => ((draftState: any) => any) | Promise<(draftState: any) => any>;
|
|
3
3
|
export namespace initialState {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
4
|
+
let items: never[];
|
|
5
|
+
let activeItem: undefined;
|
|
6
|
+
let changedActiveItem: undefined;
|
|
7
|
+
let navigationPopupOpened: boolean;
|
|
8
|
+
let navigationItemPopupOpened: boolean;
|
|
9
|
+
let config: {};
|
|
10
|
+
let isLoading: boolean;
|
|
11
|
+
let isLoadingForDataToBeSet: boolean;
|
|
12
|
+
let isLoadingForDetailsDataToBeSet: boolean;
|
|
13
|
+
let isLoadingForAdditionalDataToBeSet: boolean;
|
|
14
|
+
let isLoadingForSubmit: boolean;
|
|
15
|
+
let error: undefined;
|
|
16
|
+
let i18nEnabled: boolean;
|
|
17
|
+
let cascadeMenuAttached: boolean;
|
|
18
|
+
let availableLocale: never[];
|
|
19
19
|
}
|
|
20
20
|
//# sourceMappingURL=reducer.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { StrapiContentTypeFullSchema } from "strapi-typed";
|
|
2
2
|
import { Effect, NavigationPluginConfig } from "../../../../types";
|
|
3
|
-
export
|
|
3
|
+
export type RawPayload = {
|
|
4
4
|
allowedLevels: number;
|
|
5
5
|
audienceFieldChecked: boolean;
|
|
6
6
|
cascadeMenuAttachedChecked: boolean;
|
|
@@ -10,21 +10,21 @@ export declare type RawPayload = {
|
|
|
10
10
|
populate: Record<string, string[]>;
|
|
11
11
|
selectedContentTypes: string[];
|
|
12
12
|
};
|
|
13
|
-
export
|
|
13
|
+
export type StrapiContentTypeSchema = StrapiContentTypeFullSchema & {
|
|
14
14
|
available: boolean;
|
|
15
15
|
isSingle: boolean;
|
|
16
16
|
plugin: string;
|
|
17
17
|
label: string;
|
|
18
18
|
};
|
|
19
|
-
export
|
|
19
|
+
export type PreparePayload = (payload: {
|
|
20
20
|
form: RawPayload;
|
|
21
21
|
pruneObsoleteI18nNavigations: boolean;
|
|
22
22
|
}) => NavigationPluginConfig;
|
|
23
|
-
export
|
|
24
|
-
export
|
|
25
|
-
export
|
|
26
|
-
export
|
|
27
|
-
export
|
|
23
|
+
export type OnSave = Effect<RawPayload>;
|
|
24
|
+
export type OnPopupClose = Effect<boolean>;
|
|
25
|
+
export type HandleSetContentTypeExpanded = Effect<string | undefined>;
|
|
26
|
+
export type RestartReasons = 'I18N' | 'GRAPH_QL' | 'I18N_NAVIGATIONS_PRUNE';
|
|
27
|
+
export type RestartStatus = {
|
|
28
28
|
required: true;
|
|
29
29
|
reasons?: RestartReasons[];
|
|
30
30
|
} | {
|
|
@@ -1,5 +1,3 @@
|
|
|
1
1
|
export function resolveGlobalLikeId(uid?: string): any;
|
|
2
|
-
export function resolveGlobalLikeId(uid?: string): any;
|
|
3
|
-
export function isContentTypeEligible(uid?: string, config?: {}): boolean;
|
|
4
2
|
export function isContentTypeEligible(uid?: string, config?: {}): boolean;
|
|
5
3
|
//# sourceMappingURL=functions.d.ts.map
|
|
@@ -32,7 +32,9 @@ const Layout_1 = require("@strapi/design-system/Layout");
|
|
|
32
32
|
const Stack_1 = require("@strapi/design-system/Stack");
|
|
33
33
|
const Button_1 = require("@strapi/design-system/Button");
|
|
34
34
|
const Check_1 = __importDefault(require("@strapi/icons/Check"));
|
|
35
|
+
const More_1 = __importDefault(require("@strapi/icons/More"));
|
|
35
36
|
const translations_1 = require("../../../../translations");
|
|
37
|
+
const styles_1 = require("./styles");
|
|
36
38
|
const Select_1 = require("@strapi/design-system/Select");
|
|
37
39
|
const Box_1 = require("@strapi/design-system/Box");
|
|
38
40
|
const Grid_1 = require("@strapi/design-system/Grid");
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { Audience, Effect, ContentTypeEntity, NavigationItemAdditionalField, NavigationItemAdditionalFieldValues, NavigationItemType, NavigationPluginConfig, PluginConfigNameFields, PluginPermissions, ToBeFixed, VoidEffect } from '../../../../../../types';
|
|
2
2
|
import { Id } from 'strapi-typed';
|
|
3
3
|
import { StrapiContentTypeSchema } from '../../../SettingsPage/types';
|
|
4
|
-
export
|
|
4
|
+
export type FormEventTarget<TValue = unknown> = {
|
|
5
5
|
name: string;
|
|
6
6
|
value: TValue;
|
|
7
7
|
};
|
|
8
|
-
|
|
8
|
+
type GetContentTypeEntitiesPayload = {
|
|
9
9
|
modelUID: string;
|
|
10
10
|
query: ContentTypeSearchQuery;
|
|
11
11
|
locale: ToBeFixed;
|
|
12
12
|
};
|
|
13
|
-
export
|
|
13
|
+
export type NavigationItemFormData = {
|
|
14
14
|
isMenuAllowedLevel: boolean;
|
|
15
15
|
levelPath: string;
|
|
16
16
|
parentAttachedToMenu: boolean;
|
|
@@ -41,7 +41,7 @@ export declare type NavigationItemFormData = {
|
|
|
41
41
|
relatedRef?: ToBeFixed;
|
|
42
42
|
structureId: ToBeFixed;
|
|
43
43
|
};
|
|
44
|
-
export
|
|
44
|
+
export type NavigationItemFormProps = {
|
|
45
45
|
additionalFields: NavigationItemAdditionalField[];
|
|
46
46
|
appendLabelPublicationStatus: (label: string, entity: ContentTypeEntity) => string;
|
|
47
47
|
availableAudience: string[];
|
|
@@ -65,8 +65,8 @@ export declare type NavigationItemFormProps = {
|
|
|
65
65
|
}>;
|
|
66
66
|
permissions: PluginPermissions;
|
|
67
67
|
};
|
|
68
|
-
export
|
|
69
|
-
export
|
|
68
|
+
export type ContentTypeSearchQuery = ToBeFixed;
|
|
69
|
+
export type RawFormPayload = {
|
|
70
70
|
type: NavigationItemType;
|
|
71
71
|
related?: string;
|
|
72
72
|
relatedType?: string;
|
|
@@ -78,7 +78,7 @@ export declare type RawFormPayload = {
|
|
|
78
78
|
additionalFields: NavigationItemAdditionalFieldValues;
|
|
79
79
|
updated: boolean;
|
|
80
80
|
};
|
|
81
|
-
export
|
|
81
|
+
export type SanitizedFormPayload = {
|
|
82
82
|
title: string;
|
|
83
83
|
type: NavigationItemType;
|
|
84
84
|
menuAttached: boolean;
|
|
@@ -90,7 +90,7 @@ export declare type SanitizedFormPayload = {
|
|
|
90
90
|
singleRelatedItem: ContentTypeEntity | undefined;
|
|
91
91
|
uiRouterKey: string | undefined;
|
|
92
92
|
};
|
|
93
|
-
export
|
|
93
|
+
export type Slugify = (q: string) => Promise<{
|
|
94
94
|
slug: string;
|
|
95
95
|
}>;
|
|
96
96
|
export {};
|
|
@@ -7,19 +7,19 @@ export function NavigationItemPopupFooter({ handleCancel, handleSubmit, submitDi
|
|
|
7
7
|
}): JSX.Element | null;
|
|
8
8
|
export namespace NavigationItemPopupFooter {
|
|
9
9
|
namespace defaultProps {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
let onValidate: undefined;
|
|
11
|
+
let submitDisabled: boolean;
|
|
12
|
+
let formViewId: undefined;
|
|
13
13
|
}
|
|
14
14
|
namespace propTypes {
|
|
15
|
-
export
|
|
16
|
-
export
|
|
17
|
-
|
|
15
|
+
export let handleCancel: PropTypes.Validator<(...args: any[]) => any>;
|
|
16
|
+
export let handleSubmit: PropTypes.Requireable<(...args: any[]) => any>;
|
|
17
|
+
let submitDisabled_1: PropTypes.Requireable<boolean>;
|
|
18
18
|
export { submitDisabled_1 as submitDisabled };
|
|
19
|
-
|
|
19
|
+
let formViewId_1: PropTypes.Requireable<object>;
|
|
20
20
|
export { formViewId_1 as formViewId };
|
|
21
|
-
export
|
|
21
|
+
export let canUpdate: PropTypes.Requireable<boolean>;
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
|
-
import PropTypes from
|
|
24
|
+
import PropTypes from 'prop-types';
|
|
25
25
|
//# sourceMappingURL=NavigationItemPopupFooter.d.ts.map
|
|
@@ -17,17 +17,17 @@ declare function NavigationItemPopUp({ availableLocale, isOpen, isLoading, data,
|
|
|
17
17
|
}): JSX.Element;
|
|
18
18
|
declare namespace NavigationItemPopUp {
|
|
19
19
|
namespace propTypes {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
20
|
+
let data: PropTypes.Validator<object>;
|
|
21
|
+
let config: PropTypes.Validator<object>;
|
|
22
|
+
let isOpen: PropTypes.Requireable<boolean>;
|
|
23
|
+
let isLoading: PropTypes.Requireable<boolean>;
|
|
24
|
+
let onSubmit: PropTypes.Validator<(...args: any[]) => any>;
|
|
25
|
+
let onClose: PropTypes.Validator<(...args: any[]) => any>;
|
|
26
|
+
let getContentTypeItems: PropTypes.Validator<(...args: any[]) => any>;
|
|
27
|
+
let locale: PropTypes.Requireable<string>;
|
|
28
|
+
let readNavigationItemFromLocale: PropTypes.Validator<(...args: any[]) => any>;
|
|
29
|
+
let slugify: PropTypes.Validator<(...args: any[]) => any>;
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
|
-
import PropTypes from
|
|
32
|
+
import PropTypes from 'prop-types';
|
|
33
33
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Dispatch, SetStateAction } from "react";
|
|
2
2
|
import { Navigation as FullNavigationEntity } from "../../../../../../types";
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
3
|
+
export type Navigation = Pick<FullNavigationEntity, "id" | "items" | "name" | "localeCode" | "localizations" | "visible">;
|
|
4
|
+
export type State = InitialState | ListState | EditState | CreateState | DeleteState | ErrorState;
|
|
5
|
+
export type SetState = Dispatch<SetStateAction<State>>;
|
|
6
6
|
interface CommonState {
|
|
7
7
|
isLoading?: boolean;
|
|
8
8
|
}
|
|
@@ -37,9 +37,11 @@ const Box_1 = require("@strapi/design-system/Box");
|
|
|
37
37
|
const Icon_1 = require("@strapi/design-system/Icon");
|
|
38
38
|
const Button_1 = require("@strapi/design-system/Button");
|
|
39
39
|
const Select_1 = require("@strapi/design-system/Select");
|
|
40
|
+
const Grid_1 = require("@strapi/design-system/Grid");
|
|
40
41
|
const helper_plugin_1 = require("@strapi/helper-plugin");
|
|
41
42
|
const EmptyDocuments_1 = __importDefault(require("@strapi/icons/EmptyDocuments"));
|
|
42
43
|
const Plus_1 = __importDefault(require("@strapi/icons/Plus"));
|
|
44
|
+
const permissions_1 = __importDefault(require("../../permissions"));
|
|
43
45
|
const NavigationItemList_1 = __importDefault(require("../../components/NavigationItemList"));
|
|
44
46
|
const NavigationContentHeader_1 = __importDefault(require("./components/NavigationContentHeader"));
|
|
45
47
|
const NavigationHeader_1 = __importDefault(require("./components/NavigationHeader"));
|
|
@@ -49,6 +51,7 @@ const Search_1 = __importDefault(require("../../components/Search"));
|
|
|
49
51
|
const useDataManager_1 = __importDefault(require("../../hooks/useDataManager"));
|
|
50
52
|
const translations_1 = require("../../translations");
|
|
51
53
|
const parsers_1 = require("./utils/parsers");
|
|
54
|
+
const NoAccessPage_1 = __importDefault(require("../NoAccessPage"));
|
|
52
55
|
const View = () => {
|
|
53
56
|
const toggleNotification = (0, helper_plugin_1.useNotification)();
|
|
54
57
|
const { items: availableNavigations, activeItem: activeNavigation, changedActiveItem: changedActiveNavigation, config, navigationItemPopupOpened, isLoading, isLoadingForAdditionalDataToBeSet, isLoadingForSubmit, handleChangeNavigationItemPopupVisibility, handleChangeSelection, handleChangeNavigationData, handleResetNavigationData, handleSubmitNavigation, handleLocalizationSelection, handleI18nCopy, getContentTypeItems, error, availableLocale: allAvailableLocale, readNavigationItemFromLocale, slugify, permissions, } = (0, useDataManager_1.default)();
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
export default pluginPermissions;
|
|
2
2
|
declare namespace pluginPermissions {
|
|
3
|
-
|
|
3
|
+
let access: {
|
|
4
4
|
action: string;
|
|
5
5
|
subject: null;
|
|
6
6
|
}[];
|
|
7
|
-
|
|
7
|
+
let update: {
|
|
8
8
|
action: string;
|
|
9
9
|
subject: null;
|
|
10
10
|
}[];
|
|
11
|
-
|
|
11
|
+
let settings: {
|
|
12
12
|
action: string;
|
|
13
13
|
subject: null;
|
|
14
14
|
}[];
|