@griddo/ax 11.14.2 → 11.14.3
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/jest/setup.js +13 -7
- package/package.json +2 -2
- package/src/__tests__/components/KeywordsPreviewModal/KeywordsPreviewModal.test.tsx +4 -3
- package/src/components/CategoryCell/index.tsx +3 -1
- package/src/components/ElementsTooltip/index.tsx +8 -4
- package/src/components/ErrorPage/index.tsx +3 -1
- package/src/components/FilterTagsBar/index.tsx +3 -3
- package/src/components/HeadingsPreviewModal/utils.tsx +2 -1
- package/src/components/KeywordsPreviewModal/atoms.tsx +2 -2
- package/src/components/KeywordsPreviewModal/index.tsx +6 -6
- package/src/components/KeywordsPreviewModal/utils.tsx +5 -3
- package/src/components/Modal/style.tsx +5 -5
- package/src/components/TableFilters/CheckGroupFilter/index.tsx +3 -2
- package/src/components/TableFilters/LiveFilter/index.tsx +4 -4
- package/src/components/TableFilters/SiteFilter/index.tsx +11 -12
- package/src/components/TableFilters/TranslationsFilter/index.tsx +2 -2
- package/src/components/TableFilters/TranslationsFilter/style.tsx +2 -2
- package/src/components/Tag/index.tsx +15 -7
- package/src/components/TruncatedTooltip/index.tsx +48 -0
- package/src/components/index.tsx +2 -0
- package/src/constants/index.ts +3 -0
- package/src/helpers/categoryColumns.tsx +55 -0
- package/src/helpers/images.tsx +3 -1
- package/src/helpers/index.tsx +2 -0
- package/src/modules/ActivityLog/ItemLog/EventItem/index.tsx +17 -10
- package/src/modules/ActivityLog/ItemLog/EventItem/style.tsx +18 -1
- package/src/modules/ActivityLog/ItemLogUser/UserItem/EventItem/index.tsx +10 -7
- package/src/modules/ActivityLog/ItemLogUser/UserItem/index.tsx +9 -3
- package/src/modules/ActivityLog/ItemLogUser/UserItem/style.tsx +17 -1
- package/src/modules/App/Routing/NavMenu/NavItem/style.tsx +1 -0
- package/src/modules/App/Routing/index.tsx +2 -2
- package/src/modules/App/Routing/style.tsx +8 -1
- package/src/modules/Categories/CategoriesList/BulkHeader/TableHeader/style.tsx +1 -0
- package/src/modules/Categories/CategoriesList/CategoryItem/index.tsx +7 -3
- package/src/modules/Categories/CategoriesList/CategoryItem/style.tsx +38 -5
- package/src/modules/Content/BulkHeader/TableHeader/style.tsx +1 -1
- package/src/modules/Content/PageItem/index.tsx +80 -204
- package/src/modules/Content/PageItem/style.tsx +18 -10
- package/src/modules/Content/atoms.tsx +147 -18
- package/src/modules/Content/index.tsx +2 -9
- package/src/modules/Forms/FormCategoriesList/CategoryItem/index.tsx +7 -3
- package/src/modules/Forms/FormCategoriesList/CategoryItem/style.tsx +34 -0
- package/src/modules/Forms/FormEditor/index.tsx +28 -50
- package/src/modules/Forms/FormList/FormItem/index.tsx +91 -120
- package/src/modules/Forms/FormList/FormItem/style.tsx +19 -0
- package/src/modules/Forms/FormList/index.tsx +27 -48
- package/src/modules/Forms/atoms.tsx +44 -32
- package/src/modules/StructuredData/StructuredDataList/BulkHeader/TableHeader/index.tsx +8 -8
- package/src/modules/StructuredData/StructuredDataList/BulkHeader/TableHeader/style.tsx +2 -2
- package/src/modules/StructuredData/StructuredDataList/GlobalPageItem/index.tsx +83 -101
- package/src/modules/StructuredData/StructuredDataList/GlobalPageItem/style.tsx +11 -5
- package/src/modules/StructuredData/StructuredDataList/StructuredDataItem/index.tsx +31 -54
- package/src/modules/StructuredData/StructuredDataList/StructuredDataItem/style.tsx +13 -7
- package/src/modules/Users/Roles/BulkHeader/TableHeader/style.tsx +6 -6
- package/src/modules/Users/Roles/RoleItem/index.tsx +3 -4
- package/src/modules/Users/Roles/RoleItem/style.tsx +12 -15
- package/src/modules/Users/Roles/index.tsx +1 -2
- package/src/modules/Users/UserCreate/SiteItem/index.tsx +10 -4
- package/src/modules/Users/UserCreate/SiteItem/style.tsx +33 -1
- package/src/modules/Users/UserForm/index.tsx +6 -4
- package/src/modules/Users/UserList/BulkHeader/TableHeader/index.tsx +2 -4
- package/src/modules/Users/UserList/BulkHeader/TableHeader/style.tsx +1 -1
- package/src/modules/Users/UserList/UserItem/index.tsx +18 -10
- package/src/modules/Users/UserList/UserItem/style.tsx +60 -4
|
@@ -1,17 +1,19 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import type React from "react";
|
|
2
|
+
import { useState } from "react";
|
|
2
3
|
import { connect } from "react-redux";
|
|
3
4
|
|
|
4
|
-
import {
|
|
5
|
-
import { useModal } from "@ax/hooks";
|
|
6
|
-
import { pageEditorActions } from "@ax/containers/PageEditor";
|
|
5
|
+
import { RestoreModal } from "@ax/components";
|
|
7
6
|
import { activityLogActions } from "@ax/containers/ActivityLog";
|
|
8
7
|
import { navigationActions } from "@ax/containers/Navigation";
|
|
8
|
+
import { pageEditorActions } from "@ax/containers/PageEditor";
|
|
9
9
|
import { structuredDataActions } from "@ax/containers/StructuredData";
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
10
|
+
import { useModal } from "@ax/hooks";
|
|
11
|
+
import type { IRootState } from "@ax/types";
|
|
12
|
+
|
|
13
|
+
import type { LogActivityDTO, LogContentDTO, LogContentTypeDTO } from "@griddo/api-types";
|
|
12
14
|
|
|
13
|
-
import DetailModal from "./../../../DetailModal";
|
|
14
15
|
import { eventKey } from "./../../../constants";
|
|
16
|
+
import DetailModal from "./../../../DetailModal";
|
|
15
17
|
import { getContentTypeSchemaVersion, getPageSchemaVersion } from "./../../../utils";
|
|
16
18
|
|
|
17
19
|
import * as S from "./style";
|
|
@@ -114,6 +116,7 @@ const EventItem = (props: IEventItemProps) => {
|
|
|
114
116
|
type="square"
|
|
115
117
|
color={site ? undefined : "#C3F4FF"}
|
|
116
118
|
textColor="rgba(32, 34, 76, 0.6)"
|
|
119
|
+
maxChar={30}
|
|
117
120
|
/>
|
|
118
121
|
</S.Site>
|
|
119
122
|
<S.ContentType>
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import { useState } from "react";
|
|
2
|
+
|
|
3
|
+
import { Avatar, TruncatedTooltip } from "@ax/components";
|
|
4
|
+
|
|
3
5
|
import EventItem from "./EventItem";
|
|
4
6
|
|
|
5
7
|
import * as S from "./style";
|
|
@@ -21,7 +23,11 @@ const UserItem = (props: IUserItemProps) => {
|
|
|
21
23
|
<S.AvatarWrapper>
|
|
22
24
|
<Avatar image={image} name={name || ""} size={24} />
|
|
23
25
|
</S.AvatarWrapper>
|
|
24
|
-
<S.Name>
|
|
26
|
+
<S.Name>
|
|
27
|
+
<TruncatedTooltip content={name || ""} expanded top={-5}>
|
|
28
|
+
<S.Title>{name}</S.Title>
|
|
29
|
+
</TruncatedTooltip>
|
|
30
|
+
</S.Name>
|
|
25
31
|
{!isOpen && <S.CounterWrapper>{logActivity.length} events created</S.CounterWrapper>}
|
|
26
32
|
<S.ToggleWrapper>
|
|
27
33
|
<S.Toggle onClick={handleToggle} isOpen={isOpen}>
|
|
@@ -15,9 +15,25 @@ const User = styled.div`
|
|
|
15
15
|
`;
|
|
16
16
|
|
|
17
17
|
const Name = styled.div`
|
|
18
|
+
position: relative;
|
|
18
19
|
${(p) => p.theme.textStyle.uiS};
|
|
19
20
|
color: ${(p) => p.theme.colors.textHighEmphasis};
|
|
20
21
|
width: 25%;
|
|
22
|
+
min-width: 0;
|
|
23
|
+
> * {
|
|
24
|
+
min-width: 0;
|
|
25
|
+
}
|
|
26
|
+
`;
|
|
27
|
+
|
|
28
|
+
const Title = styled.div`
|
|
29
|
+
width: 100%;
|
|
30
|
+
${(p) => p.theme.textStyle.uiS};
|
|
31
|
+
color: ${(p) => p.theme.colors.textHighEmphasis};
|
|
32
|
+
overflow: hidden;
|
|
33
|
+
text-overflow: ellipsis;
|
|
34
|
+
white-space: nowrap;
|
|
35
|
+
display: block;
|
|
36
|
+
min-width: 0;
|
|
21
37
|
`;
|
|
22
38
|
|
|
23
39
|
const AvatarWrapper = styled.div`
|
|
@@ -57,4 +73,4 @@ const Toggle = styled.button<{ isOpen: boolean }>`
|
|
|
57
73
|
}
|
|
58
74
|
`;
|
|
59
75
|
|
|
60
|
-
export { Item, User, Name, AvatarWrapper, EventList, CounterWrapper, ToggleWrapper, Toggle };
|
|
76
|
+
export { Item, User, Name, Title, AvatarWrapper, EventList, CounterWrapper, ToggleWrapper, Toggle };
|
|
@@ -180,6 +180,7 @@ const AvatarWithBorder = styled.div`
|
|
|
180
180
|
border: 2px solid;
|
|
181
181
|
border-color: ${(p) => p.theme.color.textHighEmphasisInverse};
|
|
182
182
|
border-radius: 50%;
|
|
183
|
+
margin-right: ${(p) => p.theme.spacing.xs};
|
|
183
184
|
`;
|
|
184
185
|
|
|
185
186
|
export { Heading, Dropdown, Arrow, LinkName, Item, NavLink, Icon, AvatarWithBorder };
|
|
@@ -93,7 +93,7 @@ const Routing = (props: IProps) => {
|
|
|
93
93
|
));
|
|
94
94
|
|
|
95
95
|
return (
|
|
96
|
-
|
|
96
|
+
<S.Root>
|
|
97
97
|
{route && !route.hideNav && <NavMenu />}
|
|
98
98
|
<S.Main>
|
|
99
99
|
<ErrorGuard />
|
|
@@ -107,7 +107,7 @@ const Routing = (props: IProps) => {
|
|
|
107
107
|
</Route>
|
|
108
108
|
</Switch>
|
|
109
109
|
</S.Main>
|
|
110
|
-
|
|
110
|
+
</S.Root>
|
|
111
111
|
);
|
|
112
112
|
};
|
|
113
113
|
|
|
@@ -3,7 +3,7 @@ import { useState } from "react";
|
|
|
3
3
|
import { connect } from "react-redux";
|
|
4
4
|
|
|
5
5
|
import { structuredData } from "@ax/api";
|
|
6
|
-
import { CheckField, Flag, FloatingMenu, Icon, LanguageMenu, Tag } from "@ax/components";
|
|
6
|
+
import { CheckField, Flag, FloatingMenu, Icon, LanguageMenu, Tag, TruncatedTooltip } from "@ax/components";
|
|
7
7
|
import { structuredDataActions } from "@ax/containers/StructuredData";
|
|
8
8
|
import { isReqOk } from "@ax/helpers";
|
|
9
9
|
import { useModal, usePermission } from "@ax/hooks";
|
|
@@ -231,10 +231,14 @@ const CategoryItem = (props: ICategoryItemProps): JSX.Element => {
|
|
|
231
231
|
<Icon name="project" size="24" />
|
|
232
232
|
</S.FolderWrapper>
|
|
233
233
|
)}
|
|
234
|
-
<
|
|
234
|
+
<TruncatedTooltip content={content?.title || ""} expanded top={-5}>
|
|
235
|
+
<S.Title>{content?.title || ""}</S.Title>
|
|
236
|
+
</TruncatedTooltip>
|
|
235
237
|
</S.NameCell>
|
|
236
238
|
<S.CodeCell role="cell" clickable={allowedToEditTaxonomy}>
|
|
237
|
-
{isCategory(category) && category.content ? category.content.code : ""}
|
|
239
|
+
<TruncatedTooltip content={isCategory(category) && category.content ? category.content.code : ""} expanded top={-5}>
|
|
240
|
+
<S.Code>{isCategory(category) && category.content ? category.content.code : ""}</S.Code>
|
|
241
|
+
</TruncatedTooltip>
|
|
238
242
|
</S.CodeCell>
|
|
239
243
|
<S.SelectableCell role="cell">
|
|
240
244
|
<Tag
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import styled from "styled-components";
|
|
2
|
-
import { CSS, Transform } from "@dnd-kit/utilities";
|
|
3
|
-
|
|
4
|
-
import { Cell, Row } from "@ax/components/TableList/TableItem/style";
|
|
5
1
|
import { ActionMenu } from "@ax/components";
|
|
2
|
+
import { Cell, Row } from "@ax/components/TableList/TableItem/style";
|
|
3
|
+
|
|
4
|
+
import { CSS, type Transform } from "@dnd-kit/utilities";
|
|
5
|
+
import styled from "styled-components";
|
|
6
6
|
|
|
7
7
|
const Wrapper = styled.div<{ identationWidth: number }>`
|
|
8
8
|
padding-left: ${(p) => `${p.identationWidth}px`};
|
|
@@ -18,7 +18,6 @@ const CheckCell = styled(Cell)`
|
|
|
18
18
|
`;
|
|
19
19
|
|
|
20
20
|
const NameCell = styled(Cell)<{ clickable: boolean; isGroup: boolean }>`
|
|
21
|
-
${(p) => p.theme.textStyle.uiL};
|
|
22
21
|
padding-left: ${(p) => p.theme.spacing.xs};
|
|
23
22
|
pointer-events: ${(p) => (p.clickable ? "auto" : "none")};
|
|
24
23
|
color: ${(p) => (p.isGroup ? p.theme.color.interactive01 : p.theme.color.textHighEmphasis)};
|
|
@@ -27,6 +26,21 @@ const NameCell = styled(Cell)<{ clickable: boolean; isGroup: boolean }>`
|
|
|
27
26
|
align-items: center;
|
|
28
27
|
justify-content: flex-start;
|
|
29
28
|
flex-grow: 1;
|
|
29
|
+
min-width: 0;
|
|
30
|
+
> * {
|
|
31
|
+
min-width: 0;
|
|
32
|
+
max-width: 100%;
|
|
33
|
+
}
|
|
34
|
+
`;
|
|
35
|
+
|
|
36
|
+
const Title = styled.div`
|
|
37
|
+
width: 100%;
|
|
38
|
+
${(p) => p.theme.textStyle.uiL};
|
|
39
|
+
overflow: hidden;
|
|
40
|
+
text-overflow: ellipsis;
|
|
41
|
+
white-space: nowrap;
|
|
42
|
+
display: block;
|
|
43
|
+
min-width: 0;
|
|
30
44
|
`;
|
|
31
45
|
|
|
32
46
|
const ActionsCell = styled(Cell)`
|
|
@@ -49,6 +63,22 @@ const CodeCell = styled(Cell)<{ clickable: boolean }>`
|
|
|
49
63
|
${(p) => p.theme.textStyle.uiXS};
|
|
50
64
|
pointer-events: ${(p) => (p.clickable ? "auto" : "none")};
|
|
51
65
|
flex: 0 0 250px;
|
|
66
|
+
min-width: 0;
|
|
67
|
+
> * {
|
|
68
|
+
min-width: 0;
|
|
69
|
+
max-width: 100%;
|
|
70
|
+
}
|
|
71
|
+
`;
|
|
72
|
+
|
|
73
|
+
const Code = styled.div`
|
|
74
|
+
width: 100%;
|
|
75
|
+
${(p) => p.theme.textStyle.uiXS};
|
|
76
|
+
color: ${(p) => p.theme.color.textMediumEmphasis};
|
|
77
|
+
overflow: hidden;
|
|
78
|
+
text-overflow: ellipsis;
|
|
79
|
+
white-space: nowrap;
|
|
80
|
+
display: block;
|
|
81
|
+
min-width: 0;
|
|
52
82
|
`;
|
|
53
83
|
|
|
54
84
|
const StyledActionMenu = styled(ActionMenu)`
|
|
@@ -107,15 +137,18 @@ const FolderWrapper = styled.div`
|
|
|
107
137
|
width: 24px;
|
|
108
138
|
height: 24px;
|
|
109
139
|
margin-right: ${(p) => p.theme.spacing.xs};
|
|
140
|
+
flex-shrink: 0;
|
|
110
141
|
`;
|
|
111
142
|
|
|
112
143
|
export {
|
|
113
144
|
Wrapper,
|
|
114
145
|
CheckCell,
|
|
115
146
|
NameCell,
|
|
147
|
+
Title,
|
|
116
148
|
ActionsCell,
|
|
117
149
|
TransCell,
|
|
118
150
|
CodeCell,
|
|
151
|
+
Code,
|
|
119
152
|
SelectableCell,
|
|
120
153
|
StyledActionMenu,
|
|
121
154
|
CategoryRow,
|