@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.
Files changed (64) hide show
  1. package/config/jest/setup.js +13 -7
  2. package/package.json +2 -2
  3. package/src/__tests__/components/KeywordsPreviewModal/KeywordsPreviewModal.test.tsx +4 -3
  4. package/src/components/CategoryCell/index.tsx +3 -1
  5. package/src/components/ElementsTooltip/index.tsx +8 -4
  6. package/src/components/ErrorPage/index.tsx +3 -1
  7. package/src/components/FilterTagsBar/index.tsx +3 -3
  8. package/src/components/HeadingsPreviewModal/utils.tsx +2 -1
  9. package/src/components/KeywordsPreviewModal/atoms.tsx +2 -2
  10. package/src/components/KeywordsPreviewModal/index.tsx +6 -6
  11. package/src/components/KeywordsPreviewModal/utils.tsx +5 -3
  12. package/src/components/Modal/style.tsx +5 -5
  13. package/src/components/TableFilters/CheckGroupFilter/index.tsx +3 -2
  14. package/src/components/TableFilters/LiveFilter/index.tsx +4 -4
  15. package/src/components/TableFilters/SiteFilter/index.tsx +11 -12
  16. package/src/components/TableFilters/TranslationsFilter/index.tsx +2 -2
  17. package/src/components/TableFilters/TranslationsFilter/style.tsx +2 -2
  18. package/src/components/Tag/index.tsx +15 -7
  19. package/src/components/TruncatedTooltip/index.tsx +48 -0
  20. package/src/components/index.tsx +2 -0
  21. package/src/constants/index.ts +3 -0
  22. package/src/helpers/categoryColumns.tsx +55 -0
  23. package/src/helpers/images.tsx +3 -1
  24. package/src/helpers/index.tsx +2 -0
  25. package/src/modules/ActivityLog/ItemLog/EventItem/index.tsx +17 -10
  26. package/src/modules/ActivityLog/ItemLog/EventItem/style.tsx +18 -1
  27. package/src/modules/ActivityLog/ItemLogUser/UserItem/EventItem/index.tsx +10 -7
  28. package/src/modules/ActivityLog/ItemLogUser/UserItem/index.tsx +9 -3
  29. package/src/modules/ActivityLog/ItemLogUser/UserItem/style.tsx +17 -1
  30. package/src/modules/App/Routing/NavMenu/NavItem/style.tsx +1 -0
  31. package/src/modules/App/Routing/index.tsx +2 -2
  32. package/src/modules/App/Routing/style.tsx +8 -1
  33. package/src/modules/Categories/CategoriesList/BulkHeader/TableHeader/style.tsx +1 -0
  34. package/src/modules/Categories/CategoriesList/CategoryItem/index.tsx +7 -3
  35. package/src/modules/Categories/CategoriesList/CategoryItem/style.tsx +38 -5
  36. package/src/modules/Content/BulkHeader/TableHeader/style.tsx +1 -1
  37. package/src/modules/Content/PageItem/index.tsx +80 -204
  38. package/src/modules/Content/PageItem/style.tsx +18 -10
  39. package/src/modules/Content/atoms.tsx +147 -18
  40. package/src/modules/Content/index.tsx +2 -9
  41. package/src/modules/Forms/FormCategoriesList/CategoryItem/index.tsx +7 -3
  42. package/src/modules/Forms/FormCategoriesList/CategoryItem/style.tsx +34 -0
  43. package/src/modules/Forms/FormEditor/index.tsx +28 -50
  44. package/src/modules/Forms/FormList/FormItem/index.tsx +91 -120
  45. package/src/modules/Forms/FormList/FormItem/style.tsx +19 -0
  46. package/src/modules/Forms/FormList/index.tsx +27 -48
  47. package/src/modules/Forms/atoms.tsx +44 -32
  48. package/src/modules/StructuredData/StructuredDataList/BulkHeader/TableHeader/index.tsx +8 -8
  49. package/src/modules/StructuredData/StructuredDataList/BulkHeader/TableHeader/style.tsx +2 -2
  50. package/src/modules/StructuredData/StructuredDataList/GlobalPageItem/index.tsx +83 -101
  51. package/src/modules/StructuredData/StructuredDataList/GlobalPageItem/style.tsx +11 -5
  52. package/src/modules/StructuredData/StructuredDataList/StructuredDataItem/index.tsx +31 -54
  53. package/src/modules/StructuredData/StructuredDataList/StructuredDataItem/style.tsx +13 -7
  54. package/src/modules/Users/Roles/BulkHeader/TableHeader/style.tsx +6 -6
  55. package/src/modules/Users/Roles/RoleItem/index.tsx +3 -4
  56. package/src/modules/Users/Roles/RoleItem/style.tsx +12 -15
  57. package/src/modules/Users/Roles/index.tsx +1 -2
  58. package/src/modules/Users/UserCreate/SiteItem/index.tsx +10 -4
  59. package/src/modules/Users/UserCreate/SiteItem/style.tsx +33 -1
  60. package/src/modules/Users/UserForm/index.tsx +6 -4
  61. package/src/modules/Users/UserList/BulkHeader/TableHeader/index.tsx +2 -4
  62. package/src/modules/Users/UserList/BulkHeader/TableHeader/style.tsx +1 -1
  63. package/src/modules/Users/UserList/UserItem/index.tsx +18 -10
  64. package/src/modules/Users/UserList/UserItem/style.tsx +60 -4
@@ -1,17 +1,19 @@
1
- import React, { useState } from "react";
1
+ import type React from "react";
2
+ import { useState } from "react";
2
3
  import { connect } from "react-redux";
3
4
 
4
- import { LogActivityDTO, LogContentDTO, LogContentTypeDTO } from "@griddo/api-types";
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 { IRootState } from "@ax/types";
11
- import { RestoreModal } from "@ax/components";
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 React, { useState } from "react";
2
- import { Avatar } from "@ax/components";
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>{name}</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
 
@@ -1,5 +1,12 @@
1
1
  import styled from "styled-components";
2
2
 
3
- export const Main = styled.main`
3
+ export const Root = styled.div`
4
+ display: flex;
4
5
  width: 100%;
6
+ height: 100%;
7
+ `;
8
+
9
+ export const Main = styled.main`
10
+ flex: 1;
11
+ overflow-x: hidden;
5
12
  `;
@@ -28,6 +28,7 @@ const TransHeader = styled(Header)`
28
28
  flex: 0 0 115px;
29
29
  justify-content: center;
30
30
  position: relative;
31
+ padding: 0;
31
32
  `;
32
33
 
33
34
  const SelectHeader = styled(Header)`
@@ -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
- <div>{content?.title || ""}</div>
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,
@@ -76,7 +76,7 @@ const HeaderWrapper = styled.div`
76
76
  `;
77
77
 
78
78
  const ColumnHeader = styled(Header)`
79
- flex: 0 0 150px;
79
+ flex: 0 0 215px;
80
80
  justify-content: center;
81
81
  `;
82
82