strapi-plugin-navigation 2.0.13 → 2.1.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 +105 -27
- package/admin/src/components/Alert/styles.d.ts +2 -0
- package/admin/src/components/Alert/styles.js +10 -4
- package/admin/src/components/CollapseButton/index.d.ts +7 -0
- package/admin/src/components/CollapseButton/index.js +21 -22
- package/admin/src/components/ConfirmationDialog/index.d.ts +28 -0
- package/admin/src/components/ConfirmationDialog/index.js +32 -54
- package/admin/src/components/EmptyView/index.d.ts +3 -0
- package/admin/src/components/EmptyView/index.js +9 -7
- package/admin/src/components/Item/ItemCardBadge/index.d.ts +3 -0
- package/admin/src/components/Item/ItemCardBadge/index.js +11 -7
- package/admin/src/components/Item/ItemCardHeader/Wrapper.d.ts +3 -0
- package/admin/src/components/Item/ItemCardHeader/Wrapper.js +10 -6
- package/admin/src/components/Item/ItemCardHeader/index.d.ts +12 -0
- package/admin/src/components/Item/ItemCardHeader/index.js +33 -52
- package/admin/src/components/Item/ItemCardRemovedOverlay/index.d.ts +2 -0
- package/admin/src/components/Item/ItemCardRemovedOverlay/index.js +10 -4
- package/admin/src/components/Item/Wrapper.d.ts +3 -0
- package/admin/src/components/Item/Wrapper.js +10 -6
- package/admin/src/components/Item/index.d.ts +31 -0
- package/admin/src/components/Item/index.js +163 -242
- package/admin/src/components/NavigationItemList/Wrapper.d.ts +3 -0
- package/admin/src/components/NavigationItemList/Wrapper.js +9 -5
- package/admin/src/components/NavigationItemList/index.d.ts +35 -0
- package/admin/src/components/NavigationItemList/index.js +28 -66
- package/admin/src/components/RestartAlert/index.d.ts +3 -0
- package/admin/src/components/RestartAlert/index.js +10 -5
- package/admin/src/components/Search/index.d.ts +6 -0
- package/admin/src/components/Search/index.js +57 -46
- package/admin/src/components/icons/navigation.d.ts +6 -0
- package/admin/src/components/icons/navigation.js +11 -13
- package/admin/src/contexts/DataManagerContext.d.ts +3 -0
- package/admin/src/contexts/DataManagerContext.js +6 -5
- package/admin/src/hooks/useAllContentTypes.d.ts +6 -0
- package/admin/src/hooks/useAllContentTypes.js +10 -11
- package/admin/src/hooks/useDataManager.d.ts +3 -0
- package/admin/src/hooks/useDataManager.js +10 -6
- package/admin/src/hooks/useI18nCopyNavigationItemsModal.d.ts +9 -0
- package/admin/src/hooks/useI18nCopyNavigationItemsModal.js +51 -0
- package/admin/src/hooks/useNavigationConfig.d.ts +10 -0
- package/admin/src/hooks/useNavigationConfig.js +52 -56
- package/admin/src/hooks/useNavigationManager.d.ts +7 -0
- package/admin/src/hooks/useNavigationManager.js +41 -0
- package/admin/src/index.d.ts +14 -0
- package/admin/src/index.js +92 -76
- package/admin/src/pages/App/index.d.ts +3 -0
- package/admin/src/pages/App/index.js +43 -31
- package/admin/src/pages/DataManagerProvider/actions.d.ts +19 -0
- package/admin/src/pages/DataManagerProvider/actions.js +22 -26
- package/admin/src/pages/DataManagerProvider/index.d.ts +12 -0
- package/admin/src/pages/DataManagerProvider/index.js +316 -298
- package/admin/src/pages/DataManagerProvider/init.d.ts +3 -0
- package/admin/src/pages/DataManagerProvider/init.js +5 -3
- package/admin/src/pages/DataManagerProvider/reducer.d.ts +19 -0
- package/admin/src/pages/DataManagerProvider/reducer.js +119 -121
- package/admin/src/pages/SettingsPage/components/DisableI18nModal/index.d.ts +24 -0
- package/admin/src/pages/SettingsPage/components/DisableI18nModal/index.js +88 -0
- package/admin/src/pages/SettingsPage/index.d.ts +3 -0
- package/admin/src/pages/SettingsPage/index.js +242 -335
- package/admin/src/pages/SettingsPage/utils/functions.d.ts +5 -0
- package/admin/src/pages/SettingsPage/utils/functions.js +3 -8
- package/admin/src/pages/View/components/I18nCopyNavigationItems/index.d.ts +14 -0
- package/admin/src/pages/View/components/I18nCopyNavigationItems/index.js +15 -0
- package/admin/src/pages/View/components/NavigationContentHeader/index.d.ts +6 -0
- package/admin/src/pages/View/components/NavigationContentHeader/index.js +13 -17
- package/admin/src/pages/View/components/NavigationHeader/index.d.ts +12 -0
- package/admin/src/pages/View/components/NavigationHeader/index.js +79 -65
- package/admin/src/pages/View/components/NavigationHeader/styles.d.ts +2 -0
- package/admin/src/pages/View/components/NavigationHeader/styles.js +10 -5
- package/admin/src/pages/View/components/NavigationItemForm/index.d.ts +57 -0
- package/admin/src/pages/View/components/NavigationItemForm/index.js +416 -453
- package/admin/src/pages/View/components/NavigationItemForm/utils/form.d.ts +45 -0
- package/admin/src/pages/View/components/NavigationItemForm/utils/form.js +84 -52
- package/admin/src/pages/View/components/NavigationItemPopup/NavigationItemPopupFooter.d.ts +23 -0
- package/admin/src/pages/View/components/NavigationItemPopup/NavigationItemPopupFooter.js +24 -34
- package/admin/src/pages/View/components/NavigationItemPopup/NavigationItemPopupHeader.d.ts +4 -0
- package/admin/src/pages/View/components/NavigationItemPopup/NavigationItemPopupHeader.js +16 -16
- package/admin/src/pages/View/components/NavigationItemPopup/index.d.ts +30 -0
- package/admin/src/pages/View/components/NavigationItemPopup/index.js +85 -108
- package/admin/src/pages/View/components/NavigationManager/Create/index.d.ts +9 -0
- package/admin/src/pages/View/components/NavigationManager/Create/index.js +57 -0
- package/admin/src/pages/View/components/NavigationManager/Delete/index.d.ts +8 -0
- package/admin/src/pages/View/components/NavigationManager/Delete/index.js +28 -0
- package/admin/src/pages/View/components/NavigationManager/Edit/index.d.ts +8 -0
- package/admin/src/pages/View/components/NavigationManager/Edit/index.js +54 -0
- package/admin/src/pages/View/components/NavigationManager/Error/index.d.ts +8 -0
- package/admin/src/pages/View/components/NavigationManager/Error/index.js +53 -0
- package/admin/src/pages/View/components/NavigationManager/Form/index.d.ts +19 -0
- package/admin/src/pages/View/components/NavigationManager/Form/index.js +98 -0
- package/admin/src/pages/View/components/NavigationManager/List/index.d.ts +8 -0
- package/admin/src/pages/View/components/NavigationManager/List/index.js +138 -0
- package/admin/src/pages/View/components/NavigationManager/index.d.ts +10 -0
- package/admin/src/pages/View/components/NavigationManager/index.js +189 -0
- package/admin/src/pages/View/components/NavigationManager/types.d.ts +53 -0
- package/admin/src/pages/View/components/NavigationManager/types.js +3 -0
- package/admin/src/pages/View/index.d.ts +4 -0
- package/admin/src/pages/View/index.js +231 -304
- package/admin/src/pages/View/utils/enums.d.ts +9 -0
- package/admin/src/pages/View/utils/enums.js +11 -8
- package/admin/src/pages/View/utils/form.d.ts +2 -0
- package/admin/src/pages/View/utils/form.js +15 -12
- package/admin/src/pages/View/utils/index.d.ts +2 -0
- package/admin/src/pages/View/utils/index.js +11 -3
- package/admin/src/pages/View/utils/parsers.d.ts +49 -0
- package/admin/src/pages/View/utils/parsers.js +239 -278
- package/admin/src/permissions.d.ts +12 -0
- package/admin/src/permissions.js +11 -7
- package/admin/src/pluginId.d.ts +3 -0
- package/admin/src/pluginId.js +2 -2
- package/admin/src/translations/en.json +157 -104
- package/admin/src/translations/fr.json +44 -44
- package/admin/src/translations/index.d.ts +12 -0
- package/admin/src/translations/index.js +17 -11
- package/admin/src/utils/api.d.ts +8 -0
- package/admin/src/utils/api.js +54 -50
- package/admin/src/utils/getTrad.d.ts +3 -0
- package/admin/src/utils/getTrad.js +9 -5
- package/admin/src/utils/index.d.ts +18 -0
- package/admin/src/utils/index.js +36 -15
- package/package.json +20 -19
- package/permissions.d.ts +9 -0
- package/permissions.js +5 -4
- package/server/bootstrap/index.d.ts +4 -0
- package/server/bootstrap/index.js +41 -0
- package/server/config/index.d.ts +5 -0
- package/server/config/index.js +33 -9
- package/server/config/setupStrategy.d.ts +3 -0
- package/server/config/setupStrategy.js +38 -0
- package/server/content-types/audience/index.d.ts +27 -0
- package/server/content-types/audience/index.js +9 -8
- package/server/content-types/audience/schema.d.ts +25 -0
- package/server/content-types/audience/schema.js +26 -0
- package/server/content-types/index.d.ts +255 -0
- package/server/content-types/index.js +15 -12
- package/server/content-types/navigation/index.d.ts +64 -0
- package/server/content-types/navigation/index.js +11 -8
- package/server/content-types/navigation/lifecycle.d.ts +9 -0
- package/server/content-types/navigation/lifecycle.js +8 -12
- package/server/content-types/navigation/schema.d.ts +55 -0
- package/server/content-types/navigation/schema.js +56 -0
- package/server/content-types/navigation-item/index.d.ts +112 -0
- package/server/content-types/navigation-item/index.js +11 -8
- package/server/content-types/navigation-item/lifecycle.d.ts +16 -0
- package/server/content-types/navigation-item/lifecycle.js +28 -32
- package/server/content-types/navigation-item/schema.d.ts +97 -0
- package/server/content-types/navigation-item/schema.js +102 -0
- package/server/content-types/navigations-items-related/index.d.ts +56 -0
- package/server/content-types/navigations-items-related/index.js +11 -8
- package/server/content-types/navigations-items-related/lifecycle.d.ts +8 -0
- package/server/content-types/navigations-items-related/lifecycle.js +20 -17
- package/server/content-types/navigations-items-related/schema.d.ts +49 -0
- package/server/content-types/navigations-items-related/schema.js +50 -0
- package/server/controllers/admin.d.ts +4 -0
- package/server/controllers/admin.js +130 -0
- package/server/controllers/client.d.ts +4 -0
- package/server/controllers/client.js +57 -0
- package/server/controllers/index.d.ts +4 -0
- package/server/controllers/index.js +12 -6
- package/server/destroy.d.ts +3 -0
- package/server/destroy.js +5 -0
- package/server/graphql/config.d.ts +4 -0
- package/server/graphql/config.js +28 -0
- package/server/graphql/index.d.ts +2 -0
- package/server/graphql/index.js +18 -22
- package/server/graphql/queries/index.d.ts +3 -0
- package/server/graphql/queries/index.js +15 -15
- package/server/graphql/queries/render-navigation-child.d.ts +15 -0
- package/server/graphql/queries/render-navigation-child.js +24 -15
- package/server/graphql/queries/render-navigation.d.ts +21 -0
- package/server/graphql/queries/render-navigation.js +31 -15
- package/server/graphql/resolvers-config.d.ts +10 -0
- package/server/graphql/resolvers-config.js +5 -3
- package/server/graphql/setupStrategy.d.ts +3 -0
- package/server/graphql/setupStrategy.js +15 -0
- package/server/graphql/types/content-types-name-fields.d.ts +6 -0
- package/server/graphql/types/content-types-name-fields.js +13 -9
- package/server/graphql/types/content-types.d.ts +5 -0
- package/server/graphql/types/content-types.js +17 -15
- package/server/graphql/types/create-navigation-item.d.ts +5 -0
- package/server/graphql/types/create-navigation-item.js +18 -16
- package/server/graphql/types/create-navigation-related.d.ts +5 -0
- package/server/graphql/types/create-navigation-related.js +9 -7
- package/server/graphql/types/create-navigation.d.ts +5 -0
- package/server/graphql/types/create-navigation.js +8 -6
- package/server/graphql/types/index.d.ts +3 -0
- package/server/graphql/types/index.js +15 -13
- package/server/graphql/types/navigation-config.d.ts +5 -0
- package/server/graphql/types/navigation-config.js +10 -8
- package/server/graphql/types/navigation-details.d.ts +5 -0
- package/server/graphql/types/navigation-details.js +11 -9
- package/server/graphql/types/navigation-item-related-data.d.ts +5 -0
- package/server/graphql/types/navigation-item-related-data.js +9 -0
- package/server/graphql/types/navigation-item-related.d.ts +7 -0
- package/server/graphql/types/navigation-item-related.js +25 -0
- package/server/graphql/types/navigation-item.d.ts +5 -0
- package/server/graphql/types/navigation-item.js +28 -29
- package/server/graphql/types/navigation-render-type.d.ts +5 -0
- package/server/graphql/types/navigation-render-type.js +7 -4
- package/server/graphql/types/navigation.d.ts +5 -0
- package/server/graphql/types/navigation.js +10 -8
- package/server/i18n/constant.d.ts +2 -0
- package/server/i18n/constant.js +5 -0
- package/server/i18n/errors.d.ts +7 -0
- package/server/i18n/errors.js +14 -0
- package/server/i18n/graphQLEnhancers.d.ts +10 -0
- package/server/i18n/graphQLEnhancers.js +10 -0
- package/server/i18n/index.d.ts +8 -0
- package/server/i18n/index.js +23 -0
- package/server/i18n/navigationSetupStrategy.d.ts +3 -0
- package/server/i18n/navigationSetupStrategy.js +119 -0
- package/server/i18n/serviceEnhancers.d.ts +13 -0
- package/server/i18n/serviceEnhancers.js +156 -0
- package/server/i18n/types.d.ts +60 -0
- package/server/i18n/types.js +3 -0
- package/server/i18n/utils.d.ts +12 -0
- package/server/i18n/utils.js +29 -0
- package/server/index.d.ts +273 -0
- package/server/index.js +26 -0
- package/server/navigation/index.d.ts +2 -0
- package/server/navigation/index.js +18 -0
- package/server/navigation/setupStrategy.d.ts +3 -0
- package/server/navigation/setupStrategy.js +39 -0
- package/server/register/index.d.ts +3 -0
- package/server/register/index.js +4 -0
- package/server/routes/admin.d.ts +4 -0
- package/server/routes/admin.js +82 -61
- package/server/routes/client.d.ts +4 -0
- package/server/routes/client.js +25 -21
- package/server/routes/index.d.ts +6 -0
- package/server/routes/index.js +13 -4
- package/server/services/admin.d.ts +5 -0
- package/server/services/admin.js +238 -0
- package/server/services/client.d.ts +5 -0
- package/server/services/client.js +249 -0
- package/server/services/common.d.ts +5 -0
- package/server/services/common.js +313 -0
- package/server/services/index.d.ts +7 -0
- package/server/services/index.js +14 -6
- package/server/utils/constant.d.ts +27 -0
- package/server/utils/constant.js +24 -0
- package/server/utils/functions.d.ts +139 -0
- package/server/utils/functions.js +226 -0
- package/server/utils/index.d.ts +3 -0
- package/server/utils/index.js +19 -0
- package/strapi-admin.d.ts +3 -0
- package/strapi-admin.js +8 -1
- package/strapi-server.d.ts +273 -0
- package/strapi-server.js +6 -17
- package/tsconfig.tsbuildinfo +1 -0
- package/types/bootstrap.d.ts +13 -0
- package/types/bootstrap.js +3 -0
- package/types/config.d.ts +21 -0
- package/types/config.js +3 -0
- package/types/contentTypes.d.ts +85 -0
- package/types/contentTypes.js +3 -0
- package/types/controllers.d.ts +48 -0
- package/types/controllers.js +5 -0
- package/types/graphQL.d.ts +3 -0
- package/types/graphQL.js +3 -0
- package/types/i18n.d.ts +9 -0
- package/types/i18n.js +3 -0
- package/types/index.d.ts +9 -0
- package/types/index.js +25 -0
- package/types/services.d.ts +74 -0
- package/types/services.js +3 -0
- package/types/utils.d.ts +62 -0
- package/types/utils.js +27 -0
- package/utils/InvalidParamNavigationError.d.ts +4 -0
- package/utils/InvalidParamNavigationError.js +8 -0
- package/utils/NavigationError.d.ts +5 -0
- package/utils/NavigationError.js +7 -7
- package/__mocks__/pages.settings.json +0 -25
- package/__mocks__/strapi.js +0 -207
- package/jest.config.js +0 -14
- package/server/bootstrap.js +0 -52
- package/server/config.js +0 -9
- package/server/content-types/audience/lifecycle.js +0 -8
- package/server/content-types/audience/schema.json +0 -23
- package/server/content-types/navigation/schema.json +0 -45
- package/server/content-types/navigation-item/schema.json +0 -99
- package/server/content-types/navigations-items-related/schema.json +0 -47
- package/server/controllers/navigation.js +0 -105
- package/server/graphql/types/navigation-related.js +0 -25
- package/server/services/__tests__/functions.test.js +0 -48
- package/server/services/__tests__/navigation.test.js +0 -91
- package/server/services/navigation.js +0 -791
- package/server/services/utils/constant.js +0 -21
- package/server/services/utils/functions.js +0 -226
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Navigation as FullNavigationEntity } from "../../../../../../types";
|
|
3
|
+
export declare type Navigation = Pick<FullNavigationEntity, "id" | "items" | "name" | "localeCode" | "localizations" | "visible">;
|
|
4
|
+
export declare type State = InitialState | ListState | EditState | CreateState | DeleteState | ErrorState;
|
|
5
|
+
export declare type SetState = React.Dispatch<React.SetStateAction<State>>;
|
|
6
|
+
interface CommonState {
|
|
7
|
+
isLoading?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export interface CommonProps {
|
|
10
|
+
setState: SetState;
|
|
11
|
+
}
|
|
12
|
+
export interface InitialState extends CommonState {
|
|
13
|
+
view: "INITIAL";
|
|
14
|
+
}
|
|
15
|
+
export interface ListState extends CommonState {
|
|
16
|
+
view: "LIST";
|
|
17
|
+
navigations: Array<Navigation>;
|
|
18
|
+
selected: Array<Navigation>;
|
|
19
|
+
}
|
|
20
|
+
export interface EditState extends CommonState {
|
|
21
|
+
view: "EDIT";
|
|
22
|
+
navigation: Navigation;
|
|
23
|
+
current?: Navigation;
|
|
24
|
+
alreadyUsedNames: Array<string>;
|
|
25
|
+
}
|
|
26
|
+
export interface CreateState extends CommonState {
|
|
27
|
+
view: "CREATE";
|
|
28
|
+
current: Navigation;
|
|
29
|
+
alreadyUsedNames: Array<string>;
|
|
30
|
+
}
|
|
31
|
+
export interface DeleteState extends CommonState {
|
|
32
|
+
view: "DELETE";
|
|
33
|
+
navigations: Array<Navigation>;
|
|
34
|
+
}
|
|
35
|
+
export interface ErrorState extends CommonState {
|
|
36
|
+
view: "ERROR";
|
|
37
|
+
errors: Array<Error>;
|
|
38
|
+
}
|
|
39
|
+
export interface FooterActionsFactory {
|
|
40
|
+
(props: {
|
|
41
|
+
onSubmit: () => void;
|
|
42
|
+
onClose: (() => void) | undefined;
|
|
43
|
+
setState: SetState;
|
|
44
|
+
state: State;
|
|
45
|
+
onReset: () => void;
|
|
46
|
+
navigations: Array<Navigation>;
|
|
47
|
+
}): {
|
|
48
|
+
startActions?: React.ReactElement;
|
|
49
|
+
endActions?: React.ReactElement;
|
|
50
|
+
} | null;
|
|
51
|
+
}
|
|
52
|
+
export {};
|
|
53
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1,307 +1,234 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
const react_1 = __importStar(require("react"));
|
|
30
|
+
const react_intl_1 = require("react-intl");
|
|
31
|
+
const lodash_1 = require("lodash");
|
|
32
|
+
const Main_1 = require("@strapi/design-system/Main");
|
|
33
|
+
const Flex_1 = require("@strapi/design-system/Flex");
|
|
34
|
+
const Layout_1 = require("@strapi/design-system/Layout");
|
|
35
|
+
const Typography_1 = require("@strapi/design-system/Typography");
|
|
36
|
+
const Box_1 = require("@strapi/design-system/Box");
|
|
37
|
+
const Icon_1 = require("@strapi/design-system/Icon");
|
|
38
|
+
const Button_1 = require("@strapi/design-system/Button");
|
|
39
|
+
const Select_1 = require("@strapi/design-system/Select");
|
|
40
|
+
const helper_plugin_1 = require("@strapi/helper-plugin");
|
|
41
|
+
const EmptyDocuments_1 = __importDefault(require("@strapi/icons/EmptyDocuments"));
|
|
42
|
+
const Plus_1 = __importDefault(require("@strapi/icons/Plus"));
|
|
43
|
+
const NavigationItemList_1 = __importDefault(require("../../components/NavigationItemList"));
|
|
44
|
+
const NavigationContentHeader_1 = __importDefault(require("./components/NavigationContentHeader"));
|
|
45
|
+
const NavigationHeader_1 = __importDefault(require("./components/NavigationHeader"));
|
|
46
|
+
const NavigationItemPopup_1 = __importDefault(require("./components/NavigationItemPopup"));
|
|
47
|
+
const useI18nCopyNavigationItemsModal_1 = require("../../hooks/useI18nCopyNavigationItemsModal");
|
|
48
|
+
const Search_1 = __importDefault(require("../../components/Search"));
|
|
49
|
+
const useDataManager_1 = __importDefault(require("../../hooks/useDataManager"));
|
|
50
|
+
const translations_1 = require("../../translations");
|
|
51
|
+
const parsers_1 = require("./utils/parsers");
|
|
38
52
|
const View = () => {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
const [structureChanged, setStructureChanged] = useState(false);
|
|
62
|
-
const isSearchEmpty = isEmpty(searchValue);
|
|
63
|
-
|
|
64
|
-
const structureHasErrors = !validateNavigationStructure((changedActiveNavigation || {}).items);
|
|
65
|
-
const navigationSelectValue = get(activeNavigation, "id", null);
|
|
66
|
-
const handleSave = () => isLoadingForSubmit || structureHasErrors
|
|
67
|
-
? null
|
|
68
|
-
: handleSubmitNavigation(formatMessage, transformToRESTPayload(changedActiveNavigation, config));
|
|
69
|
-
|
|
70
|
-
const changeNavigationItemPopupState = (visible, editedItem = {}) => {
|
|
71
|
-
setActiveNavigationItemState(editedItem);
|
|
72
|
-
handleChangeNavigationItemPopupVisibility(visible);
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
const addNewNavigationItem = (
|
|
76
|
-
e,
|
|
77
|
-
viewId = null,
|
|
78
|
-
isMenuAllowedLevel = true,
|
|
79
|
-
levelPath = '',
|
|
80
|
-
parentAttachedToMenu = true,
|
|
81
|
-
) => {
|
|
82
|
-
e.preventDefault();
|
|
83
|
-
e.stopPropagation();
|
|
84
|
-
changeNavigationItemPopupState(true, {
|
|
85
|
-
viewParentId: viewId,
|
|
86
|
-
isMenuAllowedLevel,
|
|
87
|
-
levelPath,
|
|
88
|
-
parentAttachedToMenu,
|
|
89
|
-
});
|
|
90
|
-
};
|
|
91
|
-
|
|
92
|
-
const usedContentTypesData = useMemo(
|
|
93
|
-
() => changedActiveNavigation ? usedContentTypes(changedActiveNavigation.items) : [],
|
|
94
|
-
[changedActiveNavigation],
|
|
95
|
-
);
|
|
96
|
-
|
|
97
|
-
const pullUsedContentTypeItem = (items = []) =>
|
|
98
|
-
items.reduce((prev, curr) =>
|
|
99
|
-
[...prev, curr.relatedRef ? {
|
|
100
|
-
__collectionUid: curr.relatedRef.__collectionUid,
|
|
101
|
-
id: curr.relatedRef.id
|
|
102
|
-
} : undefined, ...pullUsedContentTypeItem(curr.items)].filter(item => item)
|
|
103
|
-
, []);
|
|
104
|
-
const usedContentTypeItems = pullUsedContentTypeItem((changedActiveNavigation || {}).items);
|
|
105
|
-
const handleSubmitNavigationItem = (payload) => {
|
|
106
|
-
const changedStructure = {
|
|
107
|
-
...changedActiveNavigation,
|
|
108
|
-
items: transformItemToViewPayload(payload, changedActiveNavigation.items, config),
|
|
53
|
+
const { items: availableNavigations, activeItem: activeNavigation, changedActiveItem: changedActiveNavigation, config, navigationItemPopupOpened, isLoading, isLoadingForAdditionalDataToBeSet, isLoadingForSubmit, handleChangeNavigationItemPopupVisibility, handleChangeSelection, handleChangeNavigationData, handleResetNavigationData, handleSubmitNavigation, handleLocalizationSelection, handleI18nCopy, getContentTypeItems, error, availableLocale: allAvailableLocale, readNavigationItemFromLocale, } = (0, useDataManager_1.default)();
|
|
54
|
+
const availableLocale = (0, react_1.useMemo)(() => allAvailableLocale.filter(locale => locale !== changedActiveNavigation?.localeCode), [changedActiveNavigation, allAvailableLocale]);
|
|
55
|
+
const { i18nCopyItemsModal, i18nCopySourceLocale, setI18nCopyModalOpened, setI18nCopySourceLocale } = (0, useI18nCopyNavigationItemsModal_1.useI18nCopyNavigationItemsModal)((0, react_1.useCallback)((sourceLocale) => {
|
|
56
|
+
const source = activeNavigation?.localizations?.find(({ localeCode }) => localeCode === sourceLocale);
|
|
57
|
+
if (source) {
|
|
58
|
+
handleI18nCopy(source.id, activeNavigation?.id);
|
|
59
|
+
}
|
|
60
|
+
}, [activeNavigation, handleI18nCopy]));
|
|
61
|
+
const openI18nCopyModalOpened = (0, react_1.useCallback)(() => { i18nCopySourceLocale && setI18nCopyModalOpened(true); }, [setI18nCopyModalOpened, i18nCopySourceLocale]);
|
|
62
|
+
const [activeNavigationItem, setActiveNavigationItemState] = (0, react_1.useState)({});
|
|
63
|
+
const { formatMessage } = (0, react_intl_1.useIntl)();
|
|
64
|
+
const [searchValue, setSearchValue] = (0, react_1.useState)('');
|
|
65
|
+
const [structureChanged, setStructureChanged] = (0, react_1.useState)(false);
|
|
66
|
+
const isSearchEmpty = (0, lodash_1.isEmpty)(searchValue);
|
|
67
|
+
const structureHasErrors = !(0, parsers_1.validateNavigationStructure)((changedActiveNavigation || {}).items);
|
|
68
|
+
const navigationSelectValue = (0, lodash_1.get)(activeNavigation, "id", null);
|
|
69
|
+
const handleSave = () => isLoadingForSubmit || structureHasErrors
|
|
70
|
+
? null
|
|
71
|
+
: handleSubmitNavigation(formatMessage, (0, parsers_1.transformToRESTPayload)(changedActiveNavigation, config));
|
|
72
|
+
const changeNavigationItemPopupState = (visible, editedItem = {}) => {
|
|
73
|
+
setActiveNavigationItemState(editedItem);
|
|
74
|
+
handleChangeNavigationItemPopupVisibility(visible);
|
|
109
75
|
};
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
handleChangeSelection
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
>
|
|
267
|
-
{formatMessage(getTrad('empty.cta'))}
|
|
268
|
-
</Button>
|
|
269
|
-
</Flex>
|
|
270
|
-
)}
|
|
271
|
-
{
|
|
272
|
-
!isEmpty(changedActiveNavigation.items || [])
|
|
273
|
-
&& <List
|
|
274
|
-
items={isSearchEmpty ? changedActiveNavigation.items || [] : filteredList}
|
|
275
|
-
onItemLevelAdd={addNewNavigationItem}
|
|
276
|
-
onItemRemove={handleItemRemove}
|
|
277
|
-
onItemEdit={handleItemEdit}
|
|
278
|
-
onItemRestore={handleItemRestore}
|
|
279
|
-
onItemReOrder={handleItemReOrder}
|
|
280
|
-
onItemToggleCollapse={handleItemToggleCollapse}
|
|
281
|
-
displayFlat={!isSearchEmpty}
|
|
282
|
-
root
|
|
283
|
-
error={error}
|
|
284
|
-
allowedLevels={config.allowedLevels}
|
|
285
|
-
contentTypes={config.contentTypes}
|
|
286
|
-
isParentAttachedToMenu={true}
|
|
287
|
-
contentTypesNameFields={config.contentTypesNameFields}
|
|
288
|
-
/>
|
|
289
|
-
}
|
|
290
|
-
</>
|
|
291
|
-
)}
|
|
292
|
-
</ContentLayout>
|
|
293
|
-
{navigationItemPopupOpened && <NavigationItemPopUp
|
|
294
|
-
isLoading={isLoadingForAdditionalDataToBeSet}
|
|
295
|
-
data={activeNavigationItem}
|
|
296
|
-
config={config}
|
|
297
|
-
usedContentTypesData={usedContentTypesData}
|
|
298
|
-
usedContentTypeItems={usedContentTypeItems}
|
|
299
|
-
getContentTypeItems={getContentTypeItems}
|
|
300
|
-
onSubmit={handleSubmitNavigationItem}
|
|
301
|
-
onClose={onPopUpClose}
|
|
302
|
-
/>}
|
|
303
|
-
</Main>
|
|
304
|
-
);
|
|
76
|
+
const addNewNavigationItem = (0, react_1.useCallback)((event, viewParentId = null, isMenuAllowedLevel = true, levelPath = '', parentAttachedToMenu = true, structureId = "0") => {
|
|
77
|
+
event.preventDefault();
|
|
78
|
+
event.stopPropagation();
|
|
79
|
+
changeNavigationItemPopupState(true, {
|
|
80
|
+
viewParentId,
|
|
81
|
+
isMenuAllowedLevel,
|
|
82
|
+
levelPath,
|
|
83
|
+
parentAttachedToMenu,
|
|
84
|
+
structureId,
|
|
85
|
+
});
|
|
86
|
+
}, [changeNavigationItemPopupState]);
|
|
87
|
+
const usedContentTypesData = (0, react_1.useMemo)(() => changedActiveNavigation ? (0, parsers_1.usedContentTypes)(changedActiveNavigation.items) : [], [changedActiveNavigation]);
|
|
88
|
+
const pullUsedContentTypeItem = (items = []) => items.reduce((prev, curr) => [...prev, curr.relatedRef ? {
|
|
89
|
+
__collectionUid: curr.relatedRef.__collectionUid,
|
|
90
|
+
id: curr.relatedRef.id
|
|
91
|
+
} : undefined, ...pullUsedContentTypeItem(curr.items)].filter(item => item), []);
|
|
92
|
+
const usedContentTypeItems = pullUsedContentTypeItem(changedActiveNavigation?.items);
|
|
93
|
+
const handleSubmitNavigationItem = (payload) => {
|
|
94
|
+
const changedStructure = {
|
|
95
|
+
...changedActiveNavigation,
|
|
96
|
+
items: (0, parsers_1.transformItemToViewPayload)(payload, changedActiveNavigation.items, config),
|
|
97
|
+
};
|
|
98
|
+
handleChangeNavigationData(changedStructure, true);
|
|
99
|
+
setStructureChanged(true);
|
|
100
|
+
};
|
|
101
|
+
const filteredListFactory = (items, doUse) => items.reduce((acc, item) => {
|
|
102
|
+
const subItems = !(0, lodash_1.isEmpty)(item.items) ? filteredListFactory(item.items, doUse) : [];
|
|
103
|
+
if (doUse(item))
|
|
104
|
+
return [item, ...subItems, ...acc];
|
|
105
|
+
else
|
|
106
|
+
return [...subItems, ...acc];
|
|
107
|
+
}, []);
|
|
108
|
+
const filteredList = !isSearchEmpty ? filteredListFactory(changedActiveNavigation.items, (item) => item?.title.includes(searchValue)) : [];
|
|
109
|
+
const changeCollapseItemDeep = (item, isCollapsed) => {
|
|
110
|
+
if (item.collapsed !== isCollapsed) {
|
|
111
|
+
return {
|
|
112
|
+
...item,
|
|
113
|
+
collapsed: isCollapsed,
|
|
114
|
+
updated: true,
|
|
115
|
+
items: item.items?.map(el => changeCollapseItemDeep(el, isCollapsed))
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
return {
|
|
119
|
+
...item,
|
|
120
|
+
items: item.items?.map(el => changeCollapseItemDeep(el, isCollapsed))
|
|
121
|
+
};
|
|
122
|
+
};
|
|
123
|
+
const handleCollapseAll = () => {
|
|
124
|
+
handleChangeNavigationData({
|
|
125
|
+
...changedActiveNavigation,
|
|
126
|
+
items: changedActiveNavigation.items.map(item => changeCollapseItemDeep(item, true))
|
|
127
|
+
}, true);
|
|
128
|
+
setStructureChanged(true);
|
|
129
|
+
};
|
|
130
|
+
const handleExpandAll = () => {
|
|
131
|
+
handleChangeNavigationData({
|
|
132
|
+
...changedActiveNavigation,
|
|
133
|
+
items: changedActiveNavigation.items.map(item => changeCollapseItemDeep(item, false))
|
|
134
|
+
}, true);
|
|
135
|
+
setStructureChanged(true);
|
|
136
|
+
};
|
|
137
|
+
const handleItemReOrder = (item, newOrder) => {
|
|
138
|
+
handleSubmitNavigationItem({
|
|
139
|
+
...item,
|
|
140
|
+
order: newOrder,
|
|
141
|
+
});
|
|
142
|
+
};
|
|
143
|
+
const handleItemRemove = (item) => {
|
|
144
|
+
handleSubmitNavigationItem({
|
|
145
|
+
...item,
|
|
146
|
+
removed: true,
|
|
147
|
+
});
|
|
148
|
+
};
|
|
149
|
+
const handleItemRestore = (item) => {
|
|
150
|
+
handleSubmitNavigationItem({
|
|
151
|
+
...item,
|
|
152
|
+
removed: false,
|
|
153
|
+
});
|
|
154
|
+
};
|
|
155
|
+
const handleItemToggleCollapse = (item) => {
|
|
156
|
+
handleSubmitNavigationItem({
|
|
157
|
+
...item,
|
|
158
|
+
collapsed: !item.collapsed,
|
|
159
|
+
updated: true,
|
|
160
|
+
});
|
|
161
|
+
};
|
|
162
|
+
const handleItemEdit = (item, levelPath = '', parentAttachedToMenu = true) => {
|
|
163
|
+
changeNavigationItemPopupState(true, {
|
|
164
|
+
...item,
|
|
165
|
+
levelPath,
|
|
166
|
+
parentAttachedToMenu,
|
|
167
|
+
});
|
|
168
|
+
};
|
|
169
|
+
const onPopUpClose = (e) => {
|
|
170
|
+
e.preventDefault();
|
|
171
|
+
e.stopPropagation();
|
|
172
|
+
changeNavigationItemPopupState(false);
|
|
173
|
+
};
|
|
174
|
+
const handleChangeNavigationSelection = (...args) => {
|
|
175
|
+
handleChangeSelection(...args);
|
|
176
|
+
setSearchValue('');
|
|
177
|
+
};
|
|
178
|
+
const endActions = [
|
|
179
|
+
{
|
|
180
|
+
onClick: handleExpandAll,
|
|
181
|
+
disabled: isLoadingForSubmit,
|
|
182
|
+
type: "submit",
|
|
183
|
+
variant: 'tertiary',
|
|
184
|
+
tradId: 'header.action.expandAll',
|
|
185
|
+
margin: '8px',
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
onClick: handleCollapseAll,
|
|
189
|
+
disabled: isLoadingForSubmit,
|
|
190
|
+
type: "submit",
|
|
191
|
+
variant: 'tertiary',
|
|
192
|
+
tradId: 'header.action.collapseAll',
|
|
193
|
+
margin: '8px',
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
onClick: addNewNavigationItem,
|
|
197
|
+
startIcon: react_1.default.createElement(Plus_1.default, null),
|
|
198
|
+
disabled: isLoadingForSubmit,
|
|
199
|
+
type: "submit",
|
|
200
|
+
variant: "primary",
|
|
201
|
+
tradId: 'header.action.newItem',
|
|
202
|
+
margin: '16px',
|
|
203
|
+
},
|
|
204
|
+
];
|
|
205
|
+
return (react_1.default.createElement(Main_1.Main, { labelledBy: "title", "aria-busy": isLoadingForSubmit },
|
|
206
|
+
react_1.default.createElement(NavigationHeader_1.default, { structureHasErrors: structureHasErrors, structureHasChanged: structureChanged, availableNavigations: availableNavigations, activeNavigation: activeNavigation, handleChangeSelection: handleChangeNavigationSelection, handleSave: handleSave, handleLocalizationSelection: handleLocalizationSelection, config: config }),
|
|
207
|
+
react_1.default.createElement(Layout_1.ContentLayout, null,
|
|
208
|
+
isLoading && react_1.default.createElement(helper_plugin_1.LoadingIndicatorPage, null),
|
|
209
|
+
changedActiveNavigation && (react_1.default.createElement(react_1.default.Fragment, null,
|
|
210
|
+
react_1.default.createElement(NavigationContentHeader_1.default, { startActions: react_1.default.createElement(Search_1.default, { value: searchValue, setValue: setSearchValue }), endActions: endActions.map(({ tradId, margin, ...item }, i) => react_1.default.createElement(Box_1.Box, { marginLeft: margin, key: i },
|
|
211
|
+
react_1.default.createElement(Button_1.Button, { ...item },
|
|
212
|
+
" ",
|
|
213
|
+
formatMessage((0, translations_1.getTrad)(tradId)),
|
|
214
|
+
" "))) }),
|
|
215
|
+
(0, lodash_1.isEmpty)(changedActiveNavigation.items || []) && (react_1.default.createElement(Flex_1.Flex, { direction: "column", minHeight: "400px", justifyContent: "center" },
|
|
216
|
+
react_1.default.createElement(Icon_1.Icon, { as: EmptyDocuments_1.default, width: "160px", height: "88px", color: "" }),
|
|
217
|
+
react_1.default.createElement(Box_1.Box, { padding: 4 },
|
|
218
|
+
react_1.default.createElement(Typography_1.Typography, { variant: "beta", textColor: "neutral600" }, formatMessage((0, translations_1.getTrad)('empty')))),
|
|
219
|
+
react_1.default.createElement(Button_1.Button, { variant: 'secondary', startIcon: react_1.default.createElement(Plus_1.default, null), label: formatMessage((0, translations_1.getTrad)('empty.cta')), onClick: addNewNavigationItem }, formatMessage((0, translations_1.getTrad)('empty.cta'))),
|
|
220
|
+
config.i18nEnabled && availableLocale.length ? (react_1.default.createElement(Flex_1.Flex, { direction: "column", justifyContent: "center" },
|
|
221
|
+
react_1.default.createElement(Box_1.Box, { paddingTop: 3, paddingBottom: 3 },
|
|
222
|
+
react_1.default.createElement(Typography_1.Typography, { variant: "beta", textColor: "neutral600" }, formatMessage((0, translations_1.getTrad)('view.i18n.fill.cta')))),
|
|
223
|
+
react_1.default.createElement(Flex_1.Flex, { direction: "row", justifyContent: "center", alignItems: "center" },
|
|
224
|
+
react_1.default.createElement(Box_1.Box, { paddingLeft: 1, paddingRight: 1 },
|
|
225
|
+
react_1.default.createElement(Select_1.Select, { onChange: setI18nCopySourceLocale, value: i18nCopySourceLocale, size: "S" }, availableLocale.map(locale => react_1.default.createElement(Select_1.Option, { key: locale, value: locale }, formatMessage((0, translations_1.getTrad)('view.i18n.fill.option'), { locale }))))),
|
|
226
|
+
react_1.default.createElement(Box_1.Box, { paddingLeft: 1, paddingRight: 1 },
|
|
227
|
+
react_1.default.createElement(Button_1.Button, { variant: "tertiary", onClick: openI18nCopyModalOpened, disabled: !i18nCopySourceLocale, size: "S" }, formatMessage((0, translations_1.getTrad)('view.i18n.fill.cta.button'))))))) : null)),
|
|
228
|
+
!(0, lodash_1.isEmpty)(changedActiveNavigation.items || [])
|
|
229
|
+
&& react_1.default.createElement(NavigationItemList_1.default, { items: isSearchEmpty ? changedActiveNavigation.items || [] : filteredList, onItemLevelAdd: addNewNavigationItem, onItemRemove: handleItemRemove, onItemEdit: handleItemEdit, onItemRestore: handleItemRestore, onItemReOrder: handleItemReOrder, onItemToggleCollapse: handleItemToggleCollapse, displayFlat: !isSearchEmpty, root: true, error: error, allowedLevels: config.allowedLevels, contentTypes: config.contentTypes, isParentAttachedToMenu: true, contentTypesNameFields: config.contentTypesNameFields })))),
|
|
230
|
+
navigationItemPopupOpened && react_1.default.createElement(NavigationItemPopup_1.default, { availableLocale: availableLocale, isLoading: isLoadingForAdditionalDataToBeSet, data: activeNavigationItem, config: config, usedContentTypesData: usedContentTypesData, usedContentTypeItems: usedContentTypeItems, getContentTypeItems: getContentTypeItems, onSubmit: handleSubmitNavigationItem, onClose: onPopUpClose, locale: activeNavigation.localeCode, readNavigationItemFromLocale: readNavigationItemFromLocale }),
|
|
231
|
+
i18nCopyItemsModal));
|
|
305
232
|
};
|
|
306
|
-
|
|
307
|
-
|
|
233
|
+
exports.default = (0, react_1.memo)(View);
|
|
234
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.navigationItemAdditionalFields = exports.navigationItemType = void 0;
|
|
4
|
+
exports.navigationItemType = {
|
|
5
|
+
INTERNAL: "INTERNAL",
|
|
6
|
+
EXTERNAL: "EXTERNAL",
|
|
7
|
+
WRAPPER: "WRAPPER",
|
|
5
8
|
};
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
9
|
+
exports.navigationItemAdditionalFields = {
|
|
10
|
+
AUDIENCE: 'audience',
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=enums.js.map
|