@griddo/ax 10.6.0 → 10.6.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/package.json +2 -2
- package/src/__tests__/components/Fields/ComponentArray/MixableComponentArray/MixableComponentArray.test.tsx +3 -3
- package/src/components/Button/style.tsx +1 -1
- package/src/components/ConfigPanel/Form/ConnectedField/NavConnectedField/index.tsx +2 -2
- package/src/components/ConfigPanel/Form/ConnectedField/PageConnectedField/TemplateManager/index.tsx +2 -2
- package/src/components/ConfigPanel/Form/ConnectedField/PageConnectedField/index.tsx +3 -3
- package/src/components/Fields/ComponentArray/MixableComponentArray/index.tsx +4 -3
- package/src/components/Fields/ImageField/index.tsx +19 -2
- package/src/components/Gallery/GalleryPanel/DetailPanel/index.tsx +8 -5
- package/src/components/Gallery/GalleryPanel/GalleryDragAndDrop/index.tsx +15 -5
- package/src/components/Gallery/GalleryPanel/GalleryDragAndDrop/style.tsx +1 -0
- package/src/components/Gallery/GalleryPanel/index.tsx +2 -11
- package/src/components/MenuGroup/index.tsx +81 -0
- package/src/components/MenuGroup/style.tsx +46 -0
- package/src/components/MenuItem/index.tsx +14 -7
- package/src/components/MenuItem/style.tsx +48 -26
- package/src/components/Nav/index.tsx +2 -2
- package/src/components/SideModal/SideModalOption/index.tsx +1 -1
- package/src/components/SideModal/index.tsx +3 -2
- package/src/components/Tooltip/index.tsx +1 -1
- package/src/components/index.tsx +2 -0
- package/src/containers/Gallery/actions.tsx +10 -2
- package/src/containers/Sites/actions.tsx +27 -0
- package/src/containers/Sites/constants.tsx +1 -0
- package/src/containers/Sites/interfaces.tsx +6 -0
- package/src/containers/Sites/reducer.tsx +4 -0
- package/src/helpers/index.tsx +2 -2
- package/src/helpers/themes.tsx +18 -13
- package/src/modules/Categories/CategoriesList/CategoryNav/NavItem/index.tsx +2 -2
- package/src/modules/Content/BulkHeader/TableHeader/index.tsx +1 -5
- package/src/modules/Content/BulkHeader/TableHeader/style.tsx +6 -0
- package/src/modules/Content/ContentFilters/index.tsx +66 -41
- package/src/modules/Content/ContentFilters/style.tsx +4 -38
- package/src/modules/Content/ContentFilters/utils.tsx +47 -10
- package/src/modules/Content/OptionTable/index.tsx +24 -14
- package/src/modules/Content/index.tsx +26 -7
- package/src/modules/Content/utils.tsx +32 -31
- package/src/modules/Navigation/Defaults/Nav/index.tsx +4 -6
- package/src/modules/Navigation/Menus/List/Nav/index.tsx +2 -2
- package/src/modules/Settings/ContentTypes/DataPacks/Nav/index.tsx +6 -10
- package/src/modules/StructuredData/StructuredDataList/BulkHeader/TableHeader/index.tsx +1 -6
- package/src/modules/StructuredData/StructuredDataList/BulkHeader/TableHeader/style.tsx +6 -0
- package/src/modules/StructuredData/StructuredDataList/ContentFilters/index.tsx +33 -41
- package/src/modules/StructuredData/StructuredDataList/ContentFilters/style.tsx +4 -38
- package/src/modules/StructuredData/StructuredDataList/ContentFilters/utils.tsx +44 -11
- package/src/modules/StructuredData/StructuredDataList/OptionTable/index.tsx +5 -5
- package/src/modules/StructuredData/StructuredDataList/index.tsx +1 -2
- package/src/modules/Users/UserForm/index.tsx +13 -27
- package/src/routes/multisite.tsx +1 -1
- package/src/routes/site.tsx +1 -1
- package/src/types/index.tsx +15 -0
- package/src/modules/Content/ContentFilters/constants.tsx +0 -15
- package/src/modules/StructuredData/StructuredDataList/ContentFilters/constants.tsx +0 -21
|
@@ -2,9 +2,9 @@ import React, { useState, useEffect } from "react";
|
|
|
2
2
|
import { connect } from "react-redux";
|
|
3
3
|
|
|
4
4
|
import { appActions } from "@ax/containers/App";
|
|
5
|
-
import { Button, ErrorToast, FieldsBehavior, SearchField
|
|
5
|
+
import { Button, ErrorToast, FieldsBehavior, SearchField } from "@ax/components";
|
|
6
6
|
import { IImage, IRootState, IUser, ISite, IRole, ISiteRoles } from "@ax/types";
|
|
7
|
-
import { useModal
|
|
7
|
+
import { useModal } from "@ax/hooks";
|
|
8
8
|
import { RouteLeavingGuard } from "@ax/guards";
|
|
9
9
|
|
|
10
10
|
import { timezones } from "../../Settings/Globals/constants";
|
|
@@ -45,16 +45,11 @@ const UserForm = (props: IProps) => {
|
|
|
45
45
|
const [sitesList, setSiteList] = useState(sortedByNameSites);
|
|
46
46
|
const [showMore, setShowMore] = useState(false);
|
|
47
47
|
|
|
48
|
-
const isAllowedToAccessSiteGallery = usePermission("mediaGallery.accessToSiteGallery");
|
|
49
|
-
const isAllowedToAccessGlobalGallery = usePermission("global.mediaGallery.accessToGlobalGallery");
|
|
50
|
-
|
|
51
48
|
const allowedRoutes = ["/profile"];
|
|
52
49
|
const { isDirty } = shouldBeSaved(user, form);
|
|
53
50
|
|
|
54
51
|
const isSameUser = currentUser && currentUser.id === user.id;
|
|
55
52
|
const isEditDisabled = currentUser && !currentUser.isSuperAdmin && isSiteView && !isSameUser;
|
|
56
|
-
const isAvatarDisabled =
|
|
57
|
-
(isSiteView && !isAllowedToAccessSiteGallery) || (!isSiteView && !isAllowedToAccessGlobalGallery);
|
|
58
53
|
|
|
59
54
|
useEffect(() => {
|
|
60
55
|
if (form.roles.length === 0) {
|
|
@@ -189,19 +184,6 @@ const UserForm = (props: IProps) => {
|
|
|
189
184
|
const rolesGlobal = form.roles.find((roleSite: ISiteRoles) => roleSite.siteId === "global");
|
|
190
185
|
const globalDescription = "Global data will be accessible to the user based on the permissions assigned to the role.";
|
|
191
186
|
|
|
192
|
-
const AvatarField = () => (
|
|
193
|
-
<FieldsBehavior
|
|
194
|
-
title="Avatar profile"
|
|
195
|
-
name="image"
|
|
196
|
-
value={image}
|
|
197
|
-
fieldType="ImageField"
|
|
198
|
-
onChange={handleImageChange}
|
|
199
|
-
helptext="Customize how people see you."
|
|
200
|
-
disabled={isEditDisabled || isAvatarDisabled}
|
|
201
|
-
site={site}
|
|
202
|
-
/>
|
|
203
|
-
);
|
|
204
|
-
|
|
205
187
|
return (
|
|
206
188
|
<>
|
|
207
189
|
<RouteLeavingGuard when={isDirty} action={action} text={text} allowedRoutes={allowedRoutes} />
|
|
@@ -209,13 +191,17 @@ const UserForm = (props: IProps) => {
|
|
|
209
191
|
<S.Wrapper>
|
|
210
192
|
<S.SubTitle>USER DATA</S.SubTitle>
|
|
211
193
|
<S.NameTitle>{user.name}</S.NameTitle>
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
194
|
+
<FieldsBehavior
|
|
195
|
+
title="Avatar profile"
|
|
196
|
+
name="image"
|
|
197
|
+
value={image}
|
|
198
|
+
fieldType="ImageField"
|
|
199
|
+
onChange={handleImageChange}
|
|
200
|
+
helptext="Customize how people see you."
|
|
201
|
+
disabled={isEditDisabled}
|
|
202
|
+
site={site}
|
|
203
|
+
noGallery={true}
|
|
204
|
+
/>
|
|
219
205
|
<FieldsBehavior
|
|
220
206
|
title="Name"
|
|
221
207
|
name="name"
|
package/src/routes/multisite.tsx
CHANGED
package/src/routes/site.tsx
CHANGED
package/src/types/index.tsx
CHANGED
|
@@ -1044,6 +1044,21 @@ export interface IBulkAction {
|
|
|
1044
1044
|
action: () => void;
|
|
1045
1045
|
}
|
|
1046
1046
|
|
|
1047
|
+
export interface IContentFilter {
|
|
1048
|
+
label: string;
|
|
1049
|
+
value: string;
|
|
1050
|
+
description?: JSX.Element | string;
|
|
1051
|
+
items?: IDynamicFilter[];
|
|
1052
|
+
}
|
|
1053
|
+
|
|
1054
|
+
export interface IDynamicFilter {
|
|
1055
|
+
label: string;
|
|
1056
|
+
value: string;
|
|
1057
|
+
fromPage: boolean;
|
|
1058
|
+
firstTemplate: string | null;
|
|
1059
|
+
editable?: boolean;
|
|
1060
|
+
}
|
|
1061
|
+
|
|
1047
1062
|
export interface IGriddoTheme {
|
|
1048
1063
|
label: string;
|
|
1049
1064
|
value: string;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
export const filterStructure = [
|
|
2
|
-
{
|
|
3
|
-
fromPage: true,
|
|
4
|
-
filters: [
|
|
5
|
-
{
|
|
6
|
-
name: "All Pages",
|
|
7
|
-
value: "all-pages",
|
|
8
|
-
},
|
|
9
|
-
],
|
|
10
|
-
},
|
|
11
|
-
{
|
|
12
|
-
title: "Pages",
|
|
13
|
-
fromPage: true,
|
|
14
|
-
filters: [],
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
title: "Simple Content",
|
|
18
|
-
fromPage: false,
|
|
19
|
-
filters: [],
|
|
20
|
-
},
|
|
21
|
-
];
|