@griddo/ax 1.56.9 → 1.57.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/config/griddo-config.js +1 -0
- package/package.json +2 -2
- package/src/components/ActionMenu/index.tsx +1 -1
- package/src/components/Fields/ComponentArray/MixableComponentArray/index.tsx +7 -1
- package/src/components/Fields/ComponentArray/MixableComponentArray/style.tsx +29 -24
- package/src/components/Fields/ComponentArray/SameComponentArray/index.tsx +7 -1
- package/src/components/Fields/ComponentArray/SameComponentArray/style.tsx +29 -24
- package/src/components/Fields/DateField/index.tsx +3 -2
- package/src/components/Fields/ReferenceField/AutoPanel/AutoItem/index.tsx +1 -1
- package/src/components/Fields/ReferenceField/AutoPanel/index.tsx +1 -1
- package/src/components/Fields/ReferenceField/ItemList/Item/index.tsx +1 -1
- package/src/components/Fields/UrlField/index.tsx +12 -1
- package/src/components/Fields/Wysiwyg/config.tsx +80 -56
- package/src/components/Fields/Wysiwyg/index.tsx +23 -6
- package/src/components/FloatingMenu/index.tsx +9 -6
- package/src/components/FloatingMenu/style.tsx +8 -6
- package/src/components/Gallery/GalleryFilters/Orientation/index.tsx +1 -1
- package/src/components/Gallery/GalleryFilters/SortBy/index.tsx +1 -1
- package/src/components/InformativeMenu/index.tsx +3 -2
- package/src/components/InformativeMenu/style.tsx +0 -1
- package/src/components/MainWrapper/AppBar/index.tsx +8 -7
- package/src/components/MainWrapper/AppBar/style.tsx +7 -0
- package/src/components/MenuItem/style.tsx +1 -0
- package/src/components/Modal/style.tsx +14 -13
- package/src/components/Nav/index.tsx +8 -3
- package/src/components/Nav/style.tsx +5 -0
- package/src/components/SearchField/index.tsx +43 -14
- package/src/components/SearchField/style.tsx +23 -10
- package/src/components/SideModal/index.tsx +24 -8
- package/src/components/SideModal/style.tsx +13 -2
- package/src/components/SubNav/style.tsx +3 -2
- package/src/containers/Navigation/Defaults/actions.tsx +26 -24
- package/src/containers/Navigation/Defaults/reducer.tsx +2 -2
- package/src/containers/PageEditor/actions.tsx +9 -8
- package/src/containers/Settings/Social/actions.tsx +9 -31
- package/src/containers/Settings/Social/constants.tsx +2 -3
- package/src/containers/Settings/Social/interfaces.tsx +2 -7
- package/src/containers/Settings/Social/reducer.tsx +3 -14
- package/src/containers/Sites/actions.tsx +3 -63
- package/src/containers/Sites/constants.tsx +0 -1
- package/src/containers/Sites/interfaces.tsx +0 -6
- package/src/containers/Sites/reducer.tsx +1 -29
- package/src/forms/editor.tsx +2 -0
- package/src/forms/validators.tsx +2 -0
- package/src/helpers/dates.tsx +23 -24
- package/src/helpers/index.tsx +2 -0
- package/src/helpers/objects.tsx +17 -2
- package/src/helpers/schemas.tsx +7 -4
- package/src/hooks/forms.tsx +23 -24
- package/src/modules/App/Routing/NavMenu/NavItem/index.tsx +10 -5
- package/src/modules/App/Routing/NavMenu/NavItem/style.tsx +13 -9
- package/src/modules/App/Routing/NavMenu/index.tsx +39 -37
- package/src/modules/App/Routing/NavMenu/style.tsx +9 -3
- package/src/modules/Categories/CategoriesList/CategoryItem/index.tsx +1 -1
- package/src/modules/Categories/CategoriesList/CategoryNav/NavItem/index.tsx +6 -3
- package/src/modules/Categories/CategoriesList/CategoryNav/NavItem/style.tsx +5 -1
- package/src/modules/Content/ContentFilters/index.tsx +6 -3
- package/src/modules/Content/ContentFilters/style.tsx +6 -1
- package/src/modules/Content/HeaderMenus/Live/index.tsx +1 -1
- package/src/modules/Content/HeaderMenus/Name/index.tsx +10 -4
- package/src/modules/Content/HeaderMenus/Status/index.tsx +7 -3
- package/src/modules/Content/HeaderMenus/Translations/index.tsx +1 -1
- package/src/modules/Content/HeaderMenus/Types/index.tsx +1 -1
- package/src/modules/Content/OptionTable/index.tsx +6 -3
- package/src/modules/Content/OptionTable/style.tsx +4 -0
- package/src/modules/Content/PageItem/index.tsx +3 -3
- package/src/modules/Content/index.tsx +5 -3
- package/src/modules/GlobalEditor/index.tsx +37 -14
- package/src/modules/Navigation/Defaults/DefaultsEditor/index.tsx +33 -13
- package/src/modules/Navigation/Defaults/Item/atoms.tsx +1 -1
- package/src/modules/Navigation/Defaults/Nav/index.tsx +8 -3
- package/src/modules/Navigation/Defaults/Nav/style.tsx +4 -0
- package/src/modules/Navigation/Defaults/index.tsx +4 -0
- package/src/modules/Navigation/Menus/List/Nav/index.tsx +8 -3
- package/src/modules/Navigation/Menus/List/Nav/style.tsx +4 -0
- package/src/modules/Navigation/Menus/List/index.tsx +3 -1
- package/src/modules/Navigation/Menus/List/style.tsx +9 -1
- package/src/modules/PageEditor/index.tsx +38 -14
- package/src/modules/Settings/ContentTypes/DataPacks/AddModal/Filter/index.tsx +1 -1
- package/src/modules/Settings/ContentTypes/DataPacks/AddModal/SortFilter/index.tsx +1 -1
- package/src/modules/Settings/ContentTypes/DataPacks/Nav/index.tsx +11 -6
- package/src/modules/Settings/ContentTypes/DataPacks/Nav/style.tsx +6 -1
- package/src/modules/Settings/Globals/index.tsx +19 -31
- package/src/modules/Settings/Languages/LanguagePanel/Form/index.tsx +1 -1
- package/src/modules/Settings/Languages/Table/Item/index.tsx +1 -1
- package/src/modules/Settings/Social/index.tsx +35 -91
- package/src/modules/Sites/SitesList/SiteModal/index.tsx +12 -27
- package/src/modules/Sites/SitesList/index.tsx +15 -15
- package/src/modules/StructuredData/StructuredDataList/ContentFilters/index.tsx +3 -1
- package/src/modules/StructuredData/StructuredDataList/ContentFilters/style.tsx +6 -1
- package/src/modules/StructuredData/StructuredDataList/GlobalPageItem/index.tsx +3 -3
- package/src/modules/StructuredData/StructuredDataList/HeaderMenus/Live/index.tsx +1 -1
- package/src/modules/StructuredData/StructuredDataList/HeaderMenus/Name/index.tsx +10 -4
- package/src/modules/StructuredData/StructuredDataList/HeaderMenus/Site/index.tsx +1 -1
- package/src/modules/StructuredData/StructuredDataList/HeaderMenus/Status/index.tsx +7 -3
- package/src/modules/StructuredData/StructuredDataList/HeaderMenus/Translations/index.tsx +1 -1
- package/src/modules/StructuredData/StructuredDataList/HeaderMenus/Types/index.tsx +1 -1
- package/src/modules/StructuredData/StructuredDataList/OptionTable/index.tsx +6 -3
- package/src/modules/StructuredData/StructuredDataList/OptionTable/style.tsx +4 -0
- package/src/modules/StructuredData/StructuredDataList/StructuredDataItem/index.tsx +1 -1
- package/src/modules/Users/UserList/HeaderMenus/Name/index.tsx +13 -5
- package/src/schemas/index.tsx +7 -0
- package/src/schemas/pages/GlobalPage.tsx +166 -0
- package/src/schemas/pages/Page.tsx +181 -0
- package/src/schemas/pages/index.tsx +4 -0
- package/src/types/index.tsx +8 -14
- package/tsconfig.paths.json +2 -1
- package/public/img/schemas/Accordion/thumbnails/thumbnail@1x.png +0 -0
- package/public/img/schemas/Accordion/thumbnails/thumbnail@2x.png +0 -0
- package/public/img/schemas/AddressCollection/thumbnails/thumbnail@1x.png +0 -0
- package/public/img/schemas/AddressCollection/thumbnails/thumbnail@2x.png +0 -0
- package/public/img/schemas/BasicBoxedCard/thumbnails/thumbnail@1x.png +0 -0
- package/public/img/schemas/BasicBoxedCard/thumbnails/thumbnail@2x.png +0 -0
- package/public/img/schemas/BasicCard/thumbnails/thumbnail@1x.png +0 -0
- package/public/img/schemas/BasicCard/thumbnails/thumbnail@2x.png +0 -0
- package/public/img/schemas/BasicContent/layouts/layout001@1x.png +0 -0
- package/public/img/schemas/BasicContent/layouts/layout001@2x.png +0 -0
- package/public/img/schemas/BasicContent/layouts/layout002@1x.png +0 -0
- package/public/img/schemas/BasicContent/layouts/layout002@2x.png +0 -0
- package/public/img/schemas/BasicContent/layouts/layout003@1x.png +0 -0
- package/public/img/schemas/BasicContent/layouts/layout003@2x.png +0 -0
- package/public/img/schemas/BasicContent/layouts/layout004@1x.png +0 -0
- package/public/img/schemas/BasicContent/layouts/layout004@2x.png +0 -0
- package/public/img/schemas/BasicContent/layouts/layout005@1x.png +0 -0
- package/public/img/schemas/BasicContent/layouts/layout005@2x.png +0 -0
- package/public/img/schemas/BasicContent/layouts/layout006@1x.png +0 -0
- package/public/img/schemas/BasicContent/layouts/layout006@2x.png +0 -0
- package/public/img/schemas/BasicContent/layouts/layout007@1x.png +0 -0
- package/public/img/schemas/BasicContent/layouts/layout007@2x.png +0 -0
- package/public/img/schemas/BasicContent/thumbnails/thumbnail@1x.png +0 -0
- package/public/img/schemas/BasicContent/thumbnails/thumbnail@2x.png +0 -0
- package/public/img/schemas/BasicIconCard/thumbnails/thumbnail@1x.png +0 -0
- package/public/img/schemas/BasicIconCard/thumbnails/thumbnail@2x.png +0 -0
- package/public/img/schemas/CardCollection/layouts/layout001@1x.png +0 -0
- package/public/img/schemas/CardCollection/layouts/layout001@2x.png +0 -0
- package/public/img/schemas/CardCollection/layouts/layout002@1x.png +0 -0
- package/public/img/schemas/CardCollection/layouts/layout002@2x.png +0 -0
- package/public/img/schemas/CardCollection/layouts/layout003@1x.png +0 -0
- package/public/img/schemas/CardCollection/layouts/layout003@2x.png +0 -0
- package/public/img/schemas/CardCollection/layouts/layout004@1x.png +0 -0
- package/public/img/schemas/CardCollection/layouts/layout004@2x.png +0 -0
- package/public/img/schemas/CardCollection/layouts/layout005@1x.png +0 -0
- package/public/img/schemas/CardCollection/layouts/layout005@2x.png +0 -0
- package/public/img/schemas/CardCollection/thumbnails/thumbnail@1x.png +0 -0
- package/public/img/schemas/CardCollection/thumbnails/thumbnail@2x.png +0 -0
- package/public/img/schemas/DownloadCollection/thumbnails/thumbnail@1x.png +0 -0
- package/public/img/schemas/DownloadCollection/thumbnails/thumbnail@2x.png +0 -0
- package/public/img/schemas/EventCard/layouts/layout001@1x.png +0 -0
- package/public/img/schemas/EventCard/layouts/layout001@2x.png +0 -0
- package/public/img/schemas/EventCard/layouts/layout002@1x.png +0 -0
- package/public/img/schemas/EventCard/layouts/layout002@2x.png +0 -0
- package/public/img/schemas/EventCard/thumbnails/thumbnail@1x.png +0 -0
- package/public/img/schemas/EventCard/thumbnails/thumbnail@2x.png +0 -0
- package/public/img/schemas/EventsDistributor/thumbnails/thumbnail@1x.png +0 -0
- package/public/img/schemas/EventsDistributor/thumbnails/thumbnail@2x.png +0 -0
- package/public/img/schemas/FeaturedAudiovisual/layouts/layout001@1x.png +0 -0
- package/public/img/schemas/FeaturedAudiovisual/layouts/layout001@2x.png +0 -0
- package/public/img/schemas/FeaturedAudiovisual/layouts/layout002@1x.png +0 -0
- package/public/img/schemas/FeaturedAudiovisual/layouts/layout002@2x.png +0 -0
- package/public/img/schemas/FeaturedAudiovisual/layouts/layout003@1x.png +0 -0
- package/public/img/schemas/FeaturedAudiovisual/layouts/layout003@2x.png +0 -0
- package/public/img/schemas/FeaturedAudiovisual/layouts/layout004@1x.png +0 -0
- package/public/img/schemas/FeaturedAudiovisual/layouts/layout004@2x.png +0 -0
- package/public/img/schemas/FeaturedAudiovisual/layouts/layout005@1x.png +0 -0
- package/public/img/schemas/FeaturedAudiovisual/layouts/layout005@2x.png +0 -0
- package/public/img/schemas/FeaturedAudiovisual/layouts/layout006@1x.png +0 -0
- package/public/img/schemas/FeaturedAudiovisual/layouts/layout006@2x.png +0 -0
- package/public/img/schemas/FeaturedAudiovisual/layouts/layout007@1x.png +0 -0
- package/public/img/schemas/FeaturedAudiovisual/layouts/layout007@2x.png +0 -0
- package/public/img/schemas/FeaturedAudiovisual/layouts/layout008@1x.png +0 -0
- package/public/img/schemas/FeaturedAudiovisual/layouts/layout008@2x.png +0 -0
- package/public/img/schemas/FeaturedAudiovisual/layouts/layout009@1x.png +0 -0
- package/public/img/schemas/FeaturedAudiovisual/layouts/layout009@2x.png +0 -0
- package/public/img/schemas/FeaturedAudiovisual/layouts/layout010@1x.png +0 -0
- package/public/img/schemas/FeaturedAudiovisual/layouts/layout010@2x.png +0 -0
- package/public/img/schemas/FeaturedAudiovisual/layouts/layout011@1x.png +0 -0
- package/public/img/schemas/FeaturedAudiovisual/layouts/layout011@2x.png +0 -0
- package/public/img/schemas/FeaturedAudiovisual/layouts/layout012@1x.png +0 -0
- package/public/img/schemas/FeaturedAudiovisual/layouts/layout012@2x.png +0 -0
- package/public/img/schemas/FeaturedAudiovisual/thumbnails/thumbnail@1x.png +0 -0
- package/public/img/schemas/FeaturedAudiovisual/thumbnails/thumbnail@2x.png +0 -0
- package/public/img/schemas/FeaturedBlock/layouts/layout001@1x.png +0 -0
- package/public/img/schemas/FeaturedBlock/layouts/layout001@2x.png +0 -0
- package/public/img/schemas/FeaturedBlock/layouts/layout002@1x.png +0 -0
- package/public/img/schemas/FeaturedBlock/layouts/layout002@2x.png +0 -0
- package/public/img/schemas/FeaturedProgram/thumbnails/thumbnail@1x.png +0 -0
- package/public/img/schemas/FeaturedProgram/thumbnails/thumbnail@2x.png +0 -0
- package/public/img/schemas/FeaturedText/thumbnails/thumbnail@1x.png +0 -0
- package/public/img/schemas/FeaturedText/thumbnails/thumbnail@2x.png +0 -0
- package/public/img/schemas/FeedbackForm/thumbnails/thumbnail@1x.png +0 -0
- package/public/img/schemas/FeedbackForm/thumbnails/thumbnail@2x.png +0 -0
- package/public/img/schemas/HeroCarousel/thumbnails/thumbnail@1x.png +0 -0
- package/public/img/schemas/HeroCarousel/thumbnails/thumbnail@2x.png +0 -0
- package/public/img/schemas/HeroImage/thumbnails/thumbnail@1x.png +0 -0
- package/public/img/schemas/HeroImage/thumbnails/thumbnail@2x.png +0 -0
- package/public/img/schemas/IconCard/thumbnails/thumbnail@1x.png +0 -0
- package/public/img/schemas/IconCard/thumbnails/thumbnail@2x.png +0 -0
- package/public/img/schemas/IconCenteredCard/thumbnails/thumbnail@1x.png +0 -0
- package/public/img/schemas/IconCenteredCard/thumbnails/thumbnail@2x.png +0 -0
- package/public/img/schemas/Image/thumbnails/thumbnail@1x.png +0 -0
- package/public/img/schemas/Image/thumbnails/thumbnail@2x.png +0 -0
- package/public/img/schemas/ImageCard/thumbnails/thumbnail@1x.png +0 -0
- package/public/img/schemas/ImageCard/thumbnails/thumbnail@2x.png +0 -0
- package/public/img/schemas/Intro/thumbnails/thumbnail@1x.png +0 -0
- package/public/img/schemas/Intro/thumbnails/thumbnail@2x.png +0 -0
- package/public/img/schemas/LogoCard/thumbnails/thumbnail@1x.png +0 -0
- package/public/img/schemas/LogoCard/thumbnails/thumbnail@2x.png +0 -0
- package/public/img/schemas/NewsDistributor/thumbnails/thumbnail@1x.png +0 -0
- package/public/img/schemas/NewsDistributor/thumbnails/thumbnail@2x.png +0 -0
- package/public/img/schemas/PersonDistributor/thumbnails/thumbnail@1x.png +0 -0
- package/public/img/schemas/PersonDistributor/thumbnails/thumbnail@2x.png +0 -0
- package/public/img/schemas/PublicationDistributor/thumbnails/thumbnail@1x.png +0 -0
- package/public/img/schemas/PublicationDistributor/thumbnails/thumbnail@2x.png +0 -0
- package/public/img/schemas/SchoolFooter/thumbnails/thumbnail@1x.png +0 -0
- package/public/img/schemas/SchoolFooter/thumbnails/thumbnail@2x.png +0 -0
- package/public/img/schemas/Slider/thumbnails/thumbnail@1x.png +0 -0
- package/public/img/schemas/Slider/thumbnails/thumbnail@2x.png +0 -0
- package/public/img/schemas/Testimonial/layouts/layout001@1x.png +0 -0
- package/public/img/schemas/Testimonial/layouts/layout001@2x.png +0 -0
- package/public/img/schemas/Testimonial/layouts/layout002@1x.png +0 -0
- package/public/img/schemas/Testimonial/layouts/layout002@2x.png +0 -0
- package/public/img/schemas/Testimonial/thumbnails/thumbnail@1x.png +0 -0
- package/public/img/schemas/Testimonial/thumbnails/thumbnail@2x.png +0 -0
- package/public/img/schemas/TextBluePanel/layouts/layout001@1x.png +0 -0
- package/public/img/schemas/TextBluePanel/layouts/layout001@2x.png +0 -0
- package/public/img/schemas/TextBluePanel/layouts/layout002@1x.png +0 -0
- package/public/img/schemas/TextBluePanel/layouts/layout002@2x.png +0 -0
- package/public/img/schemas/TextBluePanel/thumbnails/thumbnail@1x.png +0 -0
- package/public/img/schemas/TextBluePanel/thumbnails/thumbnail@2x.png +0 -0
- package/public/img/schemas/Video/thumbnails/thumbnail@1x.png +0 -0
- package/public/img/schemas/Video/thumbnails/thumbnail@2x.png +0 -0
- package/public/img/schemas/imgHeros.png +0 -0
- package/public/img/schemas/imgStandard.jpg +0 -0
- package/public/img/schemas/templates/BasicTemplate/thumbnails/thumbnail@1x.png +0 -0
- package/public/img/schemas/templates/BasicTemplate/thumbnails/thumbnail@2x.png +0 -0
- package/public/img/schemas/templates/Error404/thumbnails/thumbnail@1x.png +0 -0
- package/public/img/schemas/templates/Error404/thumbnails/thumbnail@2x.png +0 -0
- package/public/img/schemas/templates/NewsList/thumbnails/thumbnail@1x.png +0 -0
- package/public/img/schemas/templates/NewsList/thumbnails/thumbnail@2x.png +0 -0
- package/public/img/schemas/themes/LinkStyle.png +0 -0
- package/public/img/schemas/themes/LinkStyle@2x.png +0 -0
- package/public/img/schemas/themes/PrimaryStyle.png +0 -0
- package/public/img/schemas/themes/PrimaryStyle@2x.png +0 -0
- package/public/img/schemas/themes/STYLE01.png +0 -0
- package/public/img/schemas/themes/STYLE02.png +0 -0
- package/public/img/schemas/themes/STYLE03.png +0 -0
- package/public/img/schemas/themes/STYLE04.png +0 -0
- package/public/img/schemas/themes/STYLE05.png +0 -0
- package/public/img/schemas/themes/STYLE06.png +0 -0
- package/public/img/schemas/themes/SecondaryStyle.png +0 -0
- package/public/img/schemas/themes/SecondaryStyle@2x.png +0 -0
- package/src/components/MainWrapper/AppBar/SearchField/index.tsx +0 -54
- package/src/components/MainWrapper/AppBar/SearchField/style.tsx +0 -55
package/src/hooks/forms.tsx
CHANGED
|
@@ -2,7 +2,7 @@ import { useState, useEffect, useRef, memo } from "react";
|
|
|
2
2
|
import isEqual from "lodash.isequal";
|
|
3
3
|
|
|
4
4
|
import { deepClone } from "@ax/helpers";
|
|
5
|
-
import { cleanPageValues, getIsSavedData
|
|
5
|
+
import { cleanPageValues, getIsSavedData } from "@ax/forms";
|
|
6
6
|
|
|
7
7
|
const useEqualValue = (component: any) =>
|
|
8
8
|
memo(component, (prevProps: any, newProps: any) => {
|
|
@@ -59,7 +59,7 @@ const useEqualStructured = (component: any) => {
|
|
|
59
59
|
});
|
|
60
60
|
};
|
|
61
61
|
|
|
62
|
-
const usePrevious = (value: any): Record<string, unknown> | undefined => {
|
|
62
|
+
const usePrevious = (value: any, isSaved?: boolean): Record<string, unknown> | undefined => {
|
|
63
63
|
const stringValue = value && JSON.stringify(value);
|
|
64
64
|
const ref = useRef();
|
|
65
65
|
const isSavedData = getIsSavedData();
|
|
@@ -71,19 +71,24 @@ const usePrevious = (value: any): Record<string, unknown> | undefined => {
|
|
|
71
71
|
}, [stringValue]);
|
|
72
72
|
|
|
73
73
|
useEffect(() => {
|
|
74
|
-
if (isSavedData) {
|
|
74
|
+
if (isSavedData || isSaved) {
|
|
75
75
|
ref.current = stringValue && JSON.parse(stringValue);
|
|
76
76
|
}
|
|
77
77
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
78
|
-
}, [isSavedData]);
|
|
78
|
+
}, [isSavedData, isSaved]);
|
|
79
79
|
|
|
80
80
|
return ref.current;
|
|
81
81
|
};
|
|
82
82
|
|
|
83
|
-
const useIsDirty = (
|
|
83
|
+
const useIsDirty = (
|
|
84
|
+
updatedValues: any,
|
|
85
|
+
isNew?: boolean
|
|
86
|
+
): { isDirty: boolean; setIsDirty(state: boolean): void; resetDirty: any } => {
|
|
84
87
|
const [isDirty, setIsDirty] = useState(false);
|
|
88
|
+
const [isSaved, setIsSaved] = useState(false);
|
|
89
|
+
|
|
90
|
+
const prevContent = usePrevious(updatedValues, isSaved);
|
|
85
91
|
|
|
86
|
-
const prevContent = usePrevious(updatedValues);
|
|
87
92
|
const hasChanged = () => {
|
|
88
93
|
if (prevContent && updatedValues) {
|
|
89
94
|
const updatedValuesCloned = updatedValues && deepClone(updatedValues);
|
|
@@ -97,15 +102,20 @@ const useIsDirty = (updatedValues: any): { isDirty: boolean } => {
|
|
|
97
102
|
}
|
|
98
103
|
};
|
|
99
104
|
|
|
100
|
-
const
|
|
105
|
+
const resetDirty = () => {
|
|
106
|
+
setIsDirty(false);
|
|
107
|
+
setIsSaved(true);
|
|
108
|
+
};
|
|
101
109
|
|
|
102
110
|
useEffect(() => {
|
|
103
|
-
if (
|
|
104
|
-
|
|
111
|
+
if (isNew) {
|
|
112
|
+
setIsDirty(true);
|
|
113
|
+
} else if (prevContent && updatedValues) {
|
|
105
114
|
const isUpdated = hasChanged();
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
115
|
+
|
|
116
|
+
if (isUpdated) {
|
|
117
|
+
setIsDirty(true);
|
|
118
|
+
setIsSaved(false);
|
|
109
119
|
} else {
|
|
110
120
|
setIsDirty(false);
|
|
111
121
|
}
|
|
@@ -113,18 +123,7 @@ const useIsDirty = (updatedValues: any): { isDirty: boolean } => {
|
|
|
113
123
|
// eslint-disable-next-line
|
|
114
124
|
}, [JSON.stringify(updatedValues)]);
|
|
115
125
|
|
|
116
|
-
|
|
117
|
-
if (updatedValues && updatedValues.id === undefined && isSavedData === "false") {
|
|
118
|
-
setIsDirty(true);
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
if (prevContent && !hasChanged() && isSavedData === "true") {
|
|
122
|
-
setIsDirty(false);
|
|
123
|
-
}
|
|
124
|
-
// eslint-disable-next-line
|
|
125
|
-
}, [isSavedData]);
|
|
126
|
-
|
|
127
|
-
return { isDirty };
|
|
126
|
+
return { isDirty, setIsDirty, resetDirty };
|
|
128
127
|
};
|
|
129
128
|
|
|
130
129
|
export { useEqualValue, useDebounce, useEqualStructured, usePrevious, useIsDirty };
|
|
@@ -19,7 +19,8 @@ const NavItem = (props: IProps) => {
|
|
|
19
19
|
|
|
20
20
|
const { state, toggleSubmenu } = useContext(NavContext)!;
|
|
21
21
|
|
|
22
|
-
const isSelected = location && (location.pathname === path || location.pathname.includes(path))
|
|
22
|
+
const isSelected = location && (location.pathname === path || location.pathname.includes(path));
|
|
23
|
+
const isSelectedClass = isSelected ? "selected" : "";
|
|
23
24
|
|
|
24
25
|
const hasSubmenu = routesGroups && routesGroups.length > 0;
|
|
25
26
|
|
|
@@ -40,10 +41,10 @@ const NavItem = (props: IProps) => {
|
|
|
40
41
|
const DropdownClass = isOpened ? "inline" : "floating";
|
|
41
42
|
|
|
42
43
|
return (
|
|
43
|
-
<S.Item key={name} type={type} isOpened={isOpened} isSubmenuOpen={state[name]}>
|
|
44
|
-
<S.NavLink onClick={handleClick} className={
|
|
44
|
+
<S.Item key={name} type={type} isOpened={isOpened} isSubmenuOpen={state[name]} active={isSelected}>
|
|
45
|
+
<S.NavLink onClick={handleClick} className={isSelectedClass}>
|
|
45
46
|
<S.Icon>{icon && <Icon name={icon} size="24px" />}</S.Icon>
|
|
46
|
-
<S.LinkName>{name}</S.LinkName>
|
|
47
|
+
<S.LinkName active={isSelected || state[name]}>{name}</S.LinkName>
|
|
47
48
|
{hasSubmenu && isOpened && (
|
|
48
49
|
<S.Arrow>
|
|
49
50
|
<Icon name={subMenuIcon} />
|
|
@@ -73,7 +74,11 @@ const NavItem = (props: IProps) => {
|
|
|
73
74
|
|
|
74
75
|
return (
|
|
75
76
|
<NavSubItem key={subI} active={isSelectedSubItem} type={type}>
|
|
76
|
-
<S.NavLink onClick={goToSubLink}>
|
|
77
|
+
<S.NavLink onClick={goToSubLink}>
|
|
78
|
+
<S.LinkName active={isSelected}>
|
|
79
|
+
{subLink.name}
|
|
80
|
+
</S.LinkName>
|
|
81
|
+
</S.NavLink>
|
|
77
82
|
</NavSubItem>
|
|
78
83
|
);
|
|
79
84
|
})}
|
|
@@ -28,8 +28,7 @@ export const Dropdown = styled.ul<{ isSubmenu?: boolean; isSubmenuOpen: boolean;
|
|
|
28
28
|
z-index: 1000;
|
|
29
29
|
height: ${(p) => p.isSubmenu ? "auto" : "40px"};
|
|
30
30
|
width: calc(${(p) => p.theme.spacing.xl} * 3);
|
|
31
|
-
padding
|
|
32
|
-
padding-bottom: ${(p) => p.isSubmenu ? p.theme.spacing.s : "0"};
|
|
31
|
+
padding: ${(p) => p.isSubmenu ? p.theme.spacing.s : "0"};
|
|
33
32
|
}
|
|
34
33
|
|
|
35
34
|
&.inline {
|
|
@@ -60,7 +59,13 @@ export const Arrow = styled.div`
|
|
|
60
59
|
}
|
|
61
60
|
`;
|
|
62
61
|
|
|
63
|
-
export const
|
|
62
|
+
export const LinkName = styled.span<{ active: boolean }>`
|
|
63
|
+
white-space: nowrap;
|
|
64
|
+
overflow: hidden;
|
|
65
|
+
color: ${(p) => p.active ? p.theme.color.textHighEmphasisInverse : p.theme.color.textMediumEmphasisInverse};
|
|
66
|
+
`;
|
|
67
|
+
|
|
68
|
+
export const Item = styled.li<{ type: string; isOpened: boolean; isSubmenuOpen: boolean; active: boolean }>`
|
|
64
69
|
position: relative;
|
|
65
70
|
margin-left: ${(p) => p.isSubmenuOpen ? "0" : p.theme.spacing.s};
|
|
66
71
|
margin-right: ${(p) => p.isOpened && !p.isSubmenuOpen ? p.theme.spacing.s : "0"};
|
|
@@ -73,7 +78,7 @@ export const Item = styled.li<{ type: string; isOpened: boolean; isSubmenuOpen:
|
|
|
73
78
|
|
|
74
79
|
svg {
|
|
75
80
|
path {
|
|
76
|
-
fill: ${(p) => p.isSubmenuOpen ? p.theme.color.textHighEmphasisInverse : p.theme.color.textMediumEmphasisInverse };
|
|
81
|
+
fill: ${(p) => (p.isSubmenuOpen || p.active) ? p.theme.color.textHighEmphasisInverse : p.theme.color.textMediumEmphasisInverse };
|
|
77
82
|
}
|
|
78
83
|
}
|
|
79
84
|
|
|
@@ -81,6 +86,10 @@ export const Item = styled.li<{ type: string; isOpened: boolean; isSubmenuOpen:
|
|
|
81
86
|
background-color: ${(p) => p.theme.color.overlayHoverDark};
|
|
82
87
|
color: ${(p) => p.theme.color.textHighEmphasisInverse};
|
|
83
88
|
|
|
89
|
+
${LinkName} {
|
|
90
|
+
color: ${(p) => p.theme.color.textHighEmphasisInverse};
|
|
91
|
+
}
|
|
92
|
+
|
|
84
93
|
svg {
|
|
85
94
|
path {
|
|
86
95
|
fill: ${(p) => p.theme.color.textHighEmphasisInverse};
|
|
@@ -154,8 +163,3 @@ export const Icon = styled.div`
|
|
|
154
163
|
fill: ${(p) => p.theme.color.textMediumEmphasisInverse};
|
|
155
164
|
}
|
|
156
165
|
`;
|
|
157
|
-
|
|
158
|
-
export const LinkName = styled.span`
|
|
159
|
-
white-space: nowrap;
|
|
160
|
-
overflow: hidden;
|
|
161
|
-
`;
|
|
@@ -125,43 +125,45 @@ const NavMenu = (props: IProps) => {
|
|
|
125
125
|
)}
|
|
126
126
|
<S.NavLink>{config.logo}</S.NavLink>
|
|
127
127
|
</S.Home>
|
|
128
|
-
<S.
|
|
129
|
-
|
|
130
|
-
config.routes
|
|
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
|
-
|
|
128
|
+
<S.Lists>
|
|
129
|
+
<S.List>
|
|
130
|
+
{config.routes &&
|
|
131
|
+
config.routes
|
|
132
|
+
.filter((route: IRouter) => route.showInNav)
|
|
133
|
+
.map(
|
|
134
|
+
(route: IRouter): JSX.Element => (
|
|
135
|
+
<NavItem
|
|
136
|
+
setHistoryPush={setHistoryPush}
|
|
137
|
+
key={route.name}
|
|
138
|
+
route={route}
|
|
139
|
+
location={location}
|
|
140
|
+
type={config.type}
|
|
141
|
+
isOpened={isOpened}
|
|
142
|
+
/>
|
|
143
|
+
)
|
|
144
|
+
)}
|
|
145
|
+
</S.List>
|
|
146
|
+
<S.List>
|
|
147
|
+
{isSitePublished && (
|
|
148
|
+
<>
|
|
149
|
+
<NavItem setHistoryPush={setHistoryPush} route={siteRoute} type={config.type} isOpened={isOpened} />
|
|
150
|
+
<S.Separator />
|
|
151
|
+
</>
|
|
152
|
+
)}
|
|
153
|
+
{!isSite && (
|
|
154
|
+
<NavItem
|
|
155
|
+
setHistoryPush={setHistoryPush}
|
|
156
|
+
route={profileRoute}
|
|
157
|
+
type={config.type}
|
|
158
|
+
isOpened={isOpened}
|
|
159
|
+
location={location}
|
|
160
|
+
/>
|
|
161
|
+
)}
|
|
162
|
+
<NavItem setHistoryPush={setHistoryPush} route={logoutRoute} type={config.type} isOpened={isOpened} />
|
|
163
|
+
<S.Separator />
|
|
164
|
+
<NavItem setHistoryPush={setHistoryPush} route={collapseRoute} type={config.type} isOpened={isOpened} />
|
|
165
|
+
</S.List>
|
|
166
|
+
</S.Lists>
|
|
165
167
|
</S.NavWrapper>
|
|
166
168
|
</NavProvider>
|
|
167
169
|
);
|
|
@@ -18,7 +18,7 @@ export const Home = styled.div<{ type: string; isSite: boolean; isOpened: boolea
|
|
|
18
18
|
padding: ${(p) => `${p.theme.spacing.xs} 12px`};
|
|
19
19
|
background-color: ${(p) =>
|
|
20
20
|
p.type === "multisite" ? p.theme.color.uiMainMenuBackground : p.theme.color.uiBarBackground};
|
|
21
|
-
height: ${(p) => p.theme.spacing.
|
|
21
|
+
height: calc(${(p) => p.theme.spacing.xxs} * 17);
|
|
22
22
|
display: flex;
|
|
23
23
|
align-items: center;
|
|
24
24
|
justify-content: ${(p) => (p.isOpened ? "flex-start" : "center")};
|
|
@@ -106,10 +106,16 @@ export const NavWrapper = styled.nav<{ type: string; isOpened: boolean }>`
|
|
|
106
106
|
}
|
|
107
107
|
`;
|
|
108
108
|
|
|
109
|
-
export const
|
|
110
|
-
|
|
109
|
+
export const Lists = styled.div`
|
|
110
|
+
display: flex;
|
|
111
|
+
flex-direction: column;
|
|
112
|
+
justify-content: space-between;
|
|
113
|
+
height: 100%;
|
|
114
|
+
padding-top: ${(p) => p.theme.spacing.s};
|
|
111
115
|
`;
|
|
112
116
|
|
|
117
|
+
export const List = styled.ul``;
|
|
118
|
+
|
|
113
119
|
export const Separator = styled.li`
|
|
114
120
|
border-bottom: 1px solid ${(p) => p.theme.color.uiLineInverse};
|
|
115
121
|
margin: ${(p) => `${p.theme.spacing.s} 0`};
|
|
@@ -116,7 +116,7 @@ const CategoryItem = (props: ICategoryItemProps): JSX.Element => {
|
|
|
116
116
|
);
|
|
117
117
|
|
|
118
118
|
const translations = isTranslatable ? (
|
|
119
|
-
<FloatingMenu Button={FlagsButton}
|
|
119
|
+
<FloatingMenu Button={FlagsButton}>
|
|
120
120
|
{languageMenu()}
|
|
121
121
|
</FloatingMenu>
|
|
122
122
|
) : (
|
|
@@ -26,12 +26,15 @@ const NavItem = (props: IProps): JSX.Element => {
|
|
|
26
26
|
<S.Dropdown isOpen={isOpen}>
|
|
27
27
|
{categories &&
|
|
28
28
|
categories.map((category: IStructuredData, key: number) => {
|
|
29
|
-
const isSelected = current && category.id === current.id
|
|
29
|
+
const isSelected = !!current && category.id === current.id;
|
|
30
|
+
const selectedClass = isSelected ? "selected" : "";
|
|
30
31
|
const handleClick = () => onClick(category.id);
|
|
31
32
|
return (
|
|
32
33
|
<MenuItem key={key} onClick={handleClick}>
|
|
33
|
-
<NavLink to="#" className={
|
|
34
|
-
{
|
|
34
|
+
<NavLink to="#" className={selectedClass}>
|
|
35
|
+
<S.Link active={isSelected}>
|
|
36
|
+
{category.title}
|
|
37
|
+
</S.Link>
|
|
35
38
|
</NavLink>
|
|
36
39
|
</MenuItem>
|
|
37
40
|
);
|
|
@@ -31,4 +31,8 @@ const Dropdown = styled.ul<{isOpen: boolean}>`
|
|
|
31
31
|
flex-direction: column;
|
|
32
32
|
`;
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
const Link = styled.div<{ active: boolean }>`
|
|
35
|
+
color: ${p => p.active ? p.theme.color.textHighEmphasis : p.theme.color.textMediumEmphasis};
|
|
36
|
+
`;
|
|
37
|
+
|
|
38
|
+
export { NavItemWrapper, NavLink, Title, Arrow, Dropdown, Link };
|
|
@@ -41,12 +41,15 @@ const ContentFilters = (props: IProps): JSX.Element => {
|
|
|
41
41
|
}
|
|
42
42
|
};
|
|
43
43
|
|
|
44
|
-
const isSelected = value === current
|
|
44
|
+
const isSelected = value === current;
|
|
45
|
+
const selectedClass = isSelected ? "selected" : "";
|
|
45
46
|
|
|
46
47
|
return (
|
|
47
48
|
<MenuItem key={filterKey} onClick={handleClick}>
|
|
48
|
-
<NavLink to="#" className={
|
|
49
|
-
{
|
|
49
|
+
<NavLink to="#" className={selectedClass}>
|
|
50
|
+
<S.Link active={isSelected}>
|
|
51
|
+
{name}
|
|
52
|
+
</S.Link>
|
|
50
53
|
</NavLink>
|
|
51
54
|
</MenuItem>
|
|
52
55
|
);
|
|
@@ -2,6 +2,7 @@ import styled from "styled-components";
|
|
|
2
2
|
|
|
3
3
|
export const Heading = styled.li`
|
|
4
4
|
${p => p.theme.textStyle.headingXXS};
|
|
5
|
+
color: ${p => p.theme.color.textLowEmphasis};
|
|
5
6
|
margin-bottom: ${p => p.theme.spacing.xs};
|
|
6
7
|
cursor: default;
|
|
7
8
|
|
|
@@ -33,6 +34,10 @@ export const SubItem = styled.li`
|
|
|
33
34
|
}
|
|
34
35
|
`;
|
|
35
36
|
|
|
36
|
-
export const Item = styled.
|
|
37
|
+
export const Item = styled.div`
|
|
37
38
|
margin-bottom: ${p => p.theme.spacing.m};
|
|
38
39
|
`;
|
|
40
|
+
|
|
41
|
+
export const Link = styled.div<{ active: boolean }>`
|
|
42
|
+
color: ${p => p.active ? p.theme.color.textHighEmphasis : p.theme.color.textMediumEmphasis};
|
|
43
|
+
`;
|
|
@@ -77,7 +77,7 @@ const Live = (props: ILiveProps): JSX.Element => {
|
|
|
77
77
|
);
|
|
78
78
|
|
|
79
79
|
return (
|
|
80
|
-
<FloatingMenu
|
|
80
|
+
<FloatingMenu Button={Header} position="left" closeOnSelect={false}>
|
|
81
81
|
<ListTitle>Filter by status</ListTitle>
|
|
82
82
|
<S.ChecksWrapper>
|
|
83
83
|
<CheckGroup options={options} value={selectedValue} onChange={setQuery} selectAllOption={selectAllOption} />
|
|
@@ -28,12 +28,18 @@ const NameHeader = ({ sortItems, sortedState }: INameHeaderProps) => {
|
|
|
28
28
|
);
|
|
29
29
|
|
|
30
30
|
return (
|
|
31
|
-
<FloatingMenu
|
|
31
|
+
<FloatingMenu Button={Header} position="left">
|
|
32
32
|
<ListTitle>Name Sorting</ListTitle>
|
|
33
|
-
<ListItem onClick={sortAscendingName}>
|
|
34
|
-
|
|
33
|
+
<ListItem isSelected={sortedByTitle && isAscending} onClick={sortAscendingName}>
|
|
34
|
+
Ascendent
|
|
35
|
+
</ListItem>
|
|
36
|
+
<ListItem isSelected={sortedByTitle && !isAscending} onClick={sortDescendingName}>
|
|
37
|
+
Descendent
|
|
38
|
+
</ListItem>
|
|
35
39
|
<ListTitle>URL Sorting</ListTitle>
|
|
36
|
-
<ListItem onClick={sortAscendingURL}>
|
|
40
|
+
<ListItem isSelected={sortedByURL} onClick={sortAscendingURL}>
|
|
41
|
+
Ascendent
|
|
42
|
+
</ListItem>
|
|
37
43
|
</FloatingMenu>
|
|
38
44
|
);
|
|
39
45
|
};
|
|
@@ -27,10 +27,14 @@ const Status = ({ sortItems, sortedState }: IStatusProps) => {
|
|
|
27
27
|
);
|
|
28
28
|
|
|
29
29
|
return (
|
|
30
|
-
<FloatingMenu
|
|
30
|
+
<FloatingMenu Button={Header} position="left">
|
|
31
31
|
<ListTitle>Sort by modified date</ListTitle>
|
|
32
|
-
<ListItem onClick={sortMostRecentModifiedDate}>
|
|
33
|
-
|
|
32
|
+
<ListItem isSelected={sortedByDate && !isAscending} onClick={sortMostRecentModifiedDate}>
|
|
33
|
+
Most recent
|
|
34
|
+
</ListItem>
|
|
35
|
+
<ListItem isSelected={sortedByDate && isAscending} onClick={sortOldestModifiedDate}>
|
|
36
|
+
Oldest
|
|
37
|
+
</ListItem>
|
|
34
38
|
</FloatingMenu>
|
|
35
39
|
);
|
|
36
40
|
};
|
|
@@ -46,7 +46,7 @@ const Translations = ({ filterItems }: ITranslationsProps) => {
|
|
|
46
46
|
);
|
|
47
47
|
|
|
48
48
|
return (
|
|
49
|
-
<FloatingMenu
|
|
49
|
+
<FloatingMenu Button={Header} position="left" closeOnSelect={true} isCheckGroup={true}>
|
|
50
50
|
<ListTitle>Filter by translations</ListTitle>
|
|
51
51
|
<S.ChecksWrapper>
|
|
52
52
|
<CheckGroup options={filters} value={selectedValue} onChange={setQuery} selectAllOption={selectAllOption} />
|
|
@@ -51,7 +51,7 @@ const Types = ({ filterItems }: ITypesProps) => {
|
|
|
51
51
|
);
|
|
52
52
|
|
|
53
53
|
return (
|
|
54
|
-
<FloatingMenu
|
|
54
|
+
<FloatingMenu Button={Header} position="left" closeOnSelect={true} isCheckGroup={true}>
|
|
55
55
|
<ListTitle>Filter by types</ListTitle>
|
|
56
56
|
<S.ChecksWrapper>
|
|
57
57
|
<CheckGroup
|
|
@@ -101,11 +101,14 @@ const OptionTable = (props: IOptionTableProps): JSX.Element => {
|
|
|
101
101
|
<S.Column>
|
|
102
102
|
{filters.map((item: any, i: number) => {
|
|
103
103
|
const displayFilteredOptions = () => state.selectedType !== item.type && displayOptions(item);
|
|
104
|
-
const isSelected = item.value === state.selectedType
|
|
104
|
+
const isSelected = item.value === state.selectedType;
|
|
105
|
+
const selectedClass = isSelected ? "selected" : "";
|
|
105
106
|
return (
|
|
106
107
|
<MenuItem key={`${item.type}${i}`}>
|
|
107
|
-
<S.NavLink onClick={displayFilteredOptions} className={
|
|
108
|
-
{
|
|
108
|
+
<S.NavLink onClick={displayFilteredOptions} className={selectedClass}>
|
|
109
|
+
<S.Link active={isSelected}>
|
|
110
|
+
{item.label}
|
|
111
|
+
</S.Link>
|
|
109
112
|
</S.NavLink>
|
|
110
113
|
</MenuItem>
|
|
111
114
|
);
|
|
@@ -48,3 +48,7 @@ export const Thumbnail = styled.div<{backgroundUrl: string | boolean}>`
|
|
|
48
48
|
min-width: calc(${p => p.theme.spacing.l} * 3);
|
|
49
49
|
height: 100%;
|
|
50
50
|
`;
|
|
51
|
+
|
|
52
|
+
export const Link = styled.div<{ active: boolean }>`
|
|
53
|
+
color: ${p => p.active ? p.theme.color.textHighEmphasis : p.theme.color.textMediumEmphasis};
|
|
54
|
+
`;
|
|
@@ -96,7 +96,7 @@ const PageItem = (props: IPageItemProps): JSX.Element => {
|
|
|
96
96
|
const SeoTitleMenu = () => {
|
|
97
97
|
if (page.metaTitle) {
|
|
98
98
|
return (
|
|
99
|
-
<FloatingMenu
|
|
99
|
+
<FloatingMenu Button={SeoItems.Title}>
|
|
100
100
|
<S.FloatingSeo>{page.metaTitle}</S.FloatingSeo>
|
|
101
101
|
</FloatingMenu>
|
|
102
102
|
);
|
|
@@ -107,7 +107,7 @@ const PageItem = (props: IPageItemProps): JSX.Element => {
|
|
|
107
107
|
const SeoDescriptionMenu = () => {
|
|
108
108
|
if (page.metaDescription) {
|
|
109
109
|
return (
|
|
110
|
-
<FloatingMenu
|
|
110
|
+
<FloatingMenu Button={SeoItems.Description}>
|
|
111
111
|
<S.FloatingSeo>{page.metaDescription}</S.FloatingSeo>
|
|
112
112
|
</FloatingMenu>
|
|
113
113
|
);
|
|
@@ -382,7 +382,7 @@ const PageItem = (props: IPageItemProps): JSX.Element => {
|
|
|
382
382
|
<S.ModDate>{`Mod. ${getHumanLastModifiedDate(page.modified)}`}</S.ModDate>
|
|
383
383
|
</S.StatusCell>
|
|
384
384
|
<S.TransCell role="cell">
|
|
385
|
-
<FloatingMenu Button={FlagsButton}
|
|
385
|
+
<FloatingMenu Button={FlagsButton}>
|
|
386
386
|
{languageMenu()}
|
|
387
387
|
</FloatingMenu>
|
|
388
388
|
</S.TransCell>
|
|
@@ -169,9 +169,11 @@ const Content = (props: IProps): JSX.Element => {
|
|
|
169
169
|
const getPages = (params: any, siteID: number, filterQuery?: any) => {
|
|
170
170
|
const isStructuredDataPage = filter !== "unique-pages";
|
|
171
171
|
if (filterQuery && !isStructuredDataPage) {
|
|
172
|
-
const { deleted, page, itemsPerPage } = params;
|
|
173
|
-
const
|
|
174
|
-
|
|
172
|
+
const { deleted, page, itemsPerPage, query } = params;
|
|
173
|
+
const fullQuery = filterQuery.concat(
|
|
174
|
+
`&deleted=${deleted}&page=${page}&itemsPerPage=${itemsPerPage}&query=${query}`
|
|
175
|
+
);
|
|
176
|
+
getOrderedSitePages(siteID, fullQuery);
|
|
175
177
|
} else {
|
|
176
178
|
const pageFilter = isStructuredDataPage ? filter : undefined;
|
|
177
179
|
getSitePages(params, pageFilter);
|