@griddo/ax 11.10.16 → 11.10.17-rc.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.
Files changed (79) hide show
  1. package/README.md +1 -0
  2. package/config/griddo-config/index.js +1 -0
  3. package/package.json +2 -2
  4. package/src/__tests__/components/BulkSelectionOptions/BulkSelectionOptions.test.tsx +10 -24
  5. package/src/components/BulkSelectionOptions/index.tsx +9 -11
  6. package/src/components/BulkSelectionOptions/style.tsx +12 -5
  7. package/src/components/Fields/CheckField/index.tsx +4 -5
  8. package/src/components/Fields/ReferenceField/AutoPanel/index.tsx +17 -17
  9. package/src/components/Fields/UniqueCheck/index.tsx +21 -16
  10. package/src/components/Fields/UniqueCheck/style.tsx +17 -0
  11. package/src/components/FileGallery/GalleryPanel/DetailPanel/index.tsx +2 -1
  12. package/src/components/FilterTagsBar/style.tsx +2 -0
  13. package/src/components/Gallery/GalleryPanel/DetailPanel/index.tsx +2 -1
  14. package/src/components/Gallery/index.tsx +25 -26
  15. package/src/components/TableList/TableItem/style.tsx +4 -1
  16. package/src/components/TableList/index.tsx +3 -3
  17. package/src/components/TableList/style.tsx +11 -1
  18. package/src/hooks/bulk.tsx +17 -8
  19. package/src/hooks/index.tsx +8 -7
  20. package/src/locales/en-US.ts +47 -0
  21. package/src/locales/es-ES.ts +47 -0
  22. package/src/locales/index.ts +11 -0
  23. package/src/modules/Categories/CategoriesList/BulkHeader/TableHeader/index.tsx +1 -3
  24. package/src/modules/Categories/CategoriesList/BulkHeader/TableHeader/style.tsx +4 -2
  25. package/src/modules/Categories/CategoriesList/BulkHeader/index.tsx +6 -2
  26. package/src/modules/Categories/CategoriesList/index.tsx +29 -28
  27. package/src/modules/Categories/CategoriesList/utils.tsx +3 -2
  28. package/src/modules/Content/BulkHeader/TableHeader/style.tsx +4 -3
  29. package/src/modules/Content/BulkHeader/index.tsx +6 -2
  30. package/src/modules/Content/index.tsx +51 -51
  31. package/src/modules/FileDrive/BulkGridHeader/GridHeader/style.tsx +2 -0
  32. package/src/modules/FileDrive/BulkGridHeader/index.tsx +5 -3
  33. package/src/modules/FileDrive/BulkGridHeader/style.tsx +6 -4
  34. package/src/modules/FileDrive/BulkListHeader/TableHeader/style.tsx +5 -3
  35. package/src/modules/FileDrive/BulkListHeader/index.tsx +15 -4
  36. package/src/modules/FileDrive/BulkListHeader/style.tsx +5 -4
  37. package/src/modules/FileDrive/FileModal/DetailPanel/index.tsx +9 -7
  38. package/src/modules/FileDrive/index.tsx +25 -23
  39. package/src/modules/Forms/FormCategoriesList/BulkHeader/TableHeader/style.tsx +4 -2
  40. package/src/modules/Forms/FormCategoriesList/BulkHeader/index.tsx +6 -2
  41. package/src/modules/Forms/FormCategoriesList/BulkHeader/style.tsx +3 -3
  42. package/src/modules/Forms/FormCategoriesList/index.tsx +13 -12
  43. package/src/modules/Forms/FormList/BulkHeader/TableHeader/style.tsx +5 -2
  44. package/src/modules/Forms/FormList/BulkHeader/index.tsx +6 -2
  45. package/src/modules/Forms/FormList/index.tsx +20 -19
  46. package/src/modules/MediaGallery/BulkGridHeader/GridHeader/style.tsx +2 -0
  47. package/src/modules/MediaGallery/BulkGridHeader/index.tsx +5 -3
  48. package/src/modules/MediaGallery/BulkGridHeader/style.tsx +6 -4
  49. package/src/modules/MediaGallery/BulkListHeader/TableHeader/style.tsx +4 -3
  50. package/src/modules/MediaGallery/BulkListHeader/index.tsx +6 -3
  51. package/src/modules/MediaGallery/BulkListHeader/style.tsx +3 -4
  52. package/src/modules/MediaGallery/ImageModal/DetailPanel/index.tsx +7 -6
  53. package/src/modules/MediaGallery/index.tsx +27 -25
  54. package/src/modules/Navigation/Defaults/BulkHeader/TableHeader/style.tsx +6 -4
  55. package/src/modules/Navigation/Defaults/BulkHeader/index.tsx +15 -3
  56. package/src/modules/Navigation/Defaults/index.tsx +8 -9
  57. package/src/modules/Redirects/BulkHeader/TableHeader/style.tsx +4 -2
  58. package/src/modules/Redirects/BulkHeader/index.tsx +7 -2
  59. package/src/modules/Redirects/index.tsx +12 -12
  60. package/src/modules/Settings/Integrations/BulkHeader/TableHeader/style.tsx +4 -2
  61. package/src/modules/Settings/Integrations/BulkHeader/index.tsx +5 -2
  62. package/src/modules/Settings/Integrations/index.tsx +16 -16
  63. package/src/modules/Sites/SitesList/ListView/BulkHeader/TableHeader/style.tsx +4 -3
  64. package/src/modules/Sites/SitesList/ListView/BulkHeader/index.tsx +5 -3
  65. package/src/modules/Sites/SitesList/ListView/BulkHeader/style.tsx +4 -2
  66. package/src/modules/Sites/SitesList/index.tsx +25 -18
  67. package/src/modules/StructuredData/StructuredDataList/BulkHeader/TableHeader/style.tsx +4 -2
  68. package/src/modules/StructuredData/StructuredDataList/BulkHeader/index.tsx +6 -2
  69. package/src/modules/StructuredData/StructuredDataList/index.tsx +46 -45
  70. package/src/modules/StructuredData/StructuredDataList/utils.tsx +7 -5
  71. package/src/modules/Users/Roles/BulkHeader/TableHeader/style.tsx +4 -2
  72. package/src/modules/Users/Roles/BulkHeader/index.tsx +6 -2
  73. package/src/modules/Users/Roles/index.tsx +7 -7
  74. package/src/modules/Users/UserList/BulkHeader/TableHeader/style.tsx +4 -2
  75. package/src/modules/Users/UserList/BulkHeader/index.tsx +6 -2
  76. package/src/modules/Users/UserList/index.tsx +14 -15
  77. package/src/schemas/pages/GlobalPage.tsx +17 -0
  78. package/src/schemas/pages/Page.tsx +17 -0
  79. package/tsconfig.paths.json +1 -0
@@ -1,6 +1,7 @@
1
- import styled from "styled-components";
2
1
  import { BulkSelectionOptions } from "@ax/components";
3
2
 
3
+ import styled from "styled-components";
4
+
4
5
  const BulkWrapper = styled.div`
5
6
  width: 100%;
6
7
  span {
@@ -9,9 +10,9 @@ const BulkWrapper = styled.div`
9
10
  `;
10
11
 
11
12
  const StyledBulkSelectionOptions = styled(BulkSelectionOptions)`
12
- padding: ${(p) => `0 0 ${p.theme.spacing.m} 0`};
13
- margin-top: ${(p) => `-${p.theme.spacing.xs}`};
14
- margin-bottom: ${(p) => `-${p.theme.spacing.xs}`};
13
+ padding: 0;
14
+ margin: 0;
15
+ padding-right: ${(p) => p.theme.spacing.s};
15
16
  `;
16
17
 
17
18
  export { BulkWrapper, StyledBulkSelectionOptions };
@@ -1,15 +1,16 @@
1
- import React, { useEffect, useState } from "react";
1
+ import { useEffect, useState } from "react";
2
2
  import { connect } from "react-redux";
3
3
 
4
- import { formatBytes, getFormattedDateWithTimezone } from "@ax/helpers";
5
- import { Button, FieldsBehavior, IconAction, Tabs } from "@ax/components";
6
- import { IFile, IRootState } from "@ax/types";
4
+ import { Button, FieldsBehavior, IconAction } from "@ax/components";
7
5
  import { fileDriveActions } from "@ax/containers/FileDrive";
6
+ import { formatBytes, getFormattedDateWithTimezone } from "@ax/helpers";
8
7
  import { useModal } from "@ax/hooks";
9
- import { DeleteFileModal } from "../../atoms";
10
- import UsageContent from "./UsageContent";
8
+ import { LOCALE } from "@ax/locales";
9
+ import type { IFile, IRootState } from "@ax/types";
11
10
 
11
+ import { DeleteFileModal } from "../../atoms";
12
12
  import * as S from "./style";
13
+ import UsageContent from "./UsageContent";
13
14
 
14
15
  const DetailPanel = (props: IProps) => {
15
16
  const {
@@ -30,6 +31,7 @@ const DetailPanel = (props: IProps) => {
30
31
  const [selectedTab, setSelectedTab] = useState("details");
31
32
  const { isOpen: isDeleteOpen, toggleModal: toggleDeleteModal } = useModal();
32
33
 
34
+ // biome-ignore lint/correctness/useExhaustiveDependencies: TODO: fix this
33
35
  useEffect(() => {
34
36
  const initState: IFormState = { title: title || "", alt: alt || "", tags: tags || [] };
35
37
  setForm(initState);
@@ -138,7 +140,7 @@ const DetailPanel = (props: IProps) => {
138
140
  fieldType="TagsField"
139
141
  onChange={handleTags}
140
142
  disabled={!isAllowedToEdit}
141
- helptext="Type a tag and press enter to create it"
143
+ helptext={LOCALE.fields.tags.helptext}
142
144
  />
143
145
  </S.FileForm>
144
146
  </S.Content>
@@ -1,25 +1,27 @@
1
- import React, { useRef, useEffect, useState, useCallback, useLayoutEffect } from "react";
1
+ import { useCallback, useEffect, useLayoutEffect, useRef, useState } from "react";
2
2
  import { connect } from "react-redux";
3
3
 
4
4
  import {
5
+ BackFolder,
5
6
  Button,
6
7
  EmptyState,
7
8
  ErrorToast,
9
+ FilterTagsBar,
8
10
  Icon,
9
11
  IconAction,
10
- MainWrapper,
11
- TableList,
12
12
  Loading,
13
- Tooltip,
14
- Toast,
13
+ MainWrapper,
15
14
  Modal,
16
- Tabs,
17
- BackFolder,
18
15
  SearchField,
19
16
  SearchTagsBar,
20
- FilterTagsBar,
17
+ TableList,
18
+ Tabs,
19
+ Toast,
20
+ Tooltip,
21
21
  } from "@ax/components";
22
- import {
22
+ import { fileDriveActions } from "@ax/containers/FileDrive";
23
+ import { useBulkSelection, useIsDirty, useModal, usePermission, useResizable, useToast } from "@ax/hooks";
24
+ import type {
23
25
  IBulkAction,
24
26
  IFile,
25
27
  IFilesFolder,
@@ -29,24 +31,22 @@ import {
29
31
  IQueryValue,
30
32
  IRootState,
31
33
  } from "@ax/types";
32
- import { useBulkSelection, useIsDirty, useModal, usePermission, useResizable, useToast } from "@ax/hooks";
33
- import { fileDriveActions } from "@ax/containers/FileDrive";
34
34
 
35
- import GridItem from "./GridItem";
36
- import ListItem from "./ListItem";
37
- import BulkListHeader from "./BulkListHeader";
38
- import FolderItem from "./FolderItem";
35
+ import { DeleteFileModal, MoveItemModal, NewFolderModal, NotSavedModal } from "./atoms";
39
36
  import Breadcrumb from "./Breadcrumb";
40
- import FolderTree from "./FolderTree";
37
+ import BulkGridHeader from "./BulkGridHeader";
38
+ import BulkListHeader from "./BulkListHeader";
41
39
  import FileDragAndDrop from "./FileDragAndDrop";
40
+ import SortBy from "./FileFilters/SortBy";
41
+ import Type from "./FileFilters/Type";
42
42
  import FileModal from "./FileModal";
43
- import BulkGridHeader from "./BulkGridHeader";
44
- import { DeleteFileModal, MoveItemModal, NewFolderModal, NotSavedModal } from "./atoms";
43
+ import FolderItem from "./FolderItem";
44
+ import FolderTree from "./FolderTree";
45
+ import GridItem from "./GridItem";
45
46
  import { useFilterQuery, useSortedListStatus } from "./hooks";
46
- import { getSortedListStatus } from "./utils";
47
- import Type from "./FileFilters/Type";
48
- import SortBy from "./FileFilters/SortBy";
47
+ import ListItem from "./ListItem";
49
48
  import UploadItem from "./UploadItem";
49
+ import { getSortedListStatus } from "./utils";
50
50
 
51
51
  import * as S from "./style";
52
52
 
@@ -459,6 +459,7 @@ const FileDrive = (props: IProps) => {
459
459
  bulkActions={bulkActions}
460
460
  isSearching={isSearching}
461
461
  setHoverCheck={setHoverCheck}
462
+ selectedItems={selectedItems}
462
463
  />
463
464
  );
464
465
 
@@ -614,7 +615,7 @@ const FileDrive = (props: IProps) => {
614
615
 
615
616
  const filters = (
616
617
  <S.Filters>
617
- <Type filterItems={filterItems} value={filterValues["filterType"]} />
618
+ <Type filterItems={filterItems} value={filterValues.filterType} />
618
619
  <SortBy sortItems={sortItems} sortedState={sortedListStatus} />
619
620
  </S.Filters>
620
621
  );
@@ -711,6 +712,7 @@ const FileDrive = (props: IProps) => {
711
712
  totalItems={totalItems}
712
713
  selectItems={selectItems}
713
714
  bulkActions={bulkActions}
715
+ selectedItems={selectedItems}
714
716
  />
715
717
  )}
716
718
  {!hasFolders && isRoot && !isSearching && <NewFolderButton />}
@@ -860,7 +862,7 @@ const mapStateToProps = (state: IRootState) => ({
860
862
  currentFolderContent: state.fileDrive.currentFolderContent,
861
863
  currentFolderID: state.fileDrive.currentFolderID,
862
864
  breadcrumb: state.fileDrive.breadcrumb,
863
- currentSiteID: state.sites.currentSiteInfo && state.sites.currentSiteInfo.id,
865
+ currentSiteID: state.sites.currentSiteInfo?.id ?? null,
864
866
  displayMode: state.fileDrive.displayMode,
865
867
  selectedTab: state.fileDrive.selectedTab,
866
868
  });
@@ -1,12 +1,14 @@
1
- import styled from "styled-components";
2
1
  import { Header } from "@ax/components/TableList/style";
3
2
 
3
+ import styled from "styled-components";
4
+
4
5
  const TableHeader = styled.div<{ isScrolling?: boolean }>`
5
6
  width: 100%;
6
7
  display: flex;
7
8
  flex-direction: row;
8
- padding: ${(p) => `${p.theme.spacing.s} ${p.theme.spacing.m}`};
9
+ align-items: center;
9
10
  border-bottom: ${(p) => (p.isScrolling ? `1px solid ${p.theme.color.uiLine};` : "")};
11
+ min-height: 40px;
10
12
  `;
11
13
 
12
14
  const CheckHeader = styled(Header)`
@@ -1,10 +1,12 @@
1
- import React from "react";
1
+ import type { IBulkSelectedItems } from "@ax/hooks";
2
+
2
3
  import TableHeader from "./TableHeader";
3
4
 
4
5
  import * as S from "./style";
5
6
 
6
7
  const BulkHeader = (props: IProps): JSX.Element => {
7
- const { showBulk, checkState, selectItems, totalItems, isScrolling, bulkActions, setHoverCheck } = props;
8
+ const { showBulk, checkState, selectItems, totalItems, isScrolling, bulkActions, setHoverCheck, selectedItems } =
9
+ props;
8
10
 
9
11
  return showBulk ? (
10
12
  <S.StyledBulkSelectionOptions
@@ -12,6 +14,7 @@ const BulkHeader = (props: IProps): JSX.Element => {
12
14
  actions={bulkActions}
13
15
  selectItems={selectItems}
14
16
  totalItems={totalItems}
17
+ selectedItems={selectedItems}
15
18
  />
16
19
  ) : (
17
20
  <TableHeader
@@ -32,6 +35,7 @@ interface IProps {
32
35
  isScrolling: boolean;
33
36
  bulkActions: { icon: string; text: string; action: () => void }[];
34
37
  setHoverCheck: (state: boolean) => void;
38
+ selectedItems: IBulkSelectedItems;
35
39
  }
36
40
 
37
41
  export default BulkHeader;
@@ -1,9 +1,9 @@
1
- import React from "react";
2
- import styled from "styled-components";
3
1
  import { BulkSelectionOptions } from "@ax/components";
4
2
 
3
+ import styled from "styled-components";
4
+
5
5
  const StyledBulkSelectionOptions = styled((props) => <BulkSelectionOptions {...props} />)`
6
- padding: ${(p) => `${p.theme.spacing.xs} ${p.theme.spacing.m}`};
6
+ // padding: ${(p) => `${p.theme.spacing.xs} ${p.theme.spacing.m}`};
7
7
  `;
8
8
 
9
9
  export { StyledBulkSelectionOptions };
@@ -1,11 +1,18 @@
1
- import React, { useEffect, useState, useRef } from "react";
1
+ import { useEffect, useRef, useState } from "react";
2
2
  import { connect } from "react-redux";
3
3
  import { useParams } from "react-router-dom";
4
+
5
+ import { EmptyState, ErrorToast, MainWrapper, SearchTagsBar, TableList, Toast } from "@ax/components";
6
+ import { formsActions } from "@ax/containers/Forms";
7
+ import { getSchemaFormCategories } from "@ax/helpers";
8
+ import { useBulkSelection, useModal, usePermission, useToast } from "@ax/hooks";
9
+ import type { FormCategoriesOrderParams, FormCategory, IRootState } from "@ax/types";
10
+
4
11
  import {
5
12
  closestCenter,
6
13
  DndContext,
7
- DragEndEvent,
8
- DragStartEvent,
14
+ type DragEndEvent,
15
+ type DragStartEvent,
9
16
  KeyboardSensor,
10
17
  PointerSensor,
11
18
  useSensor,
@@ -13,18 +20,11 @@ import {
13
20
  } from "@dnd-kit/core";
14
21
  import { SortableContext, sortableKeyboardCoordinates, verticalListSortingStrategy } from "@dnd-kit/sortable";
15
22
 
16
- import { formsActions } from "@ax/containers/Forms";
17
- import { IRootState, FormCategory, FormCategoriesOrderParams } from "@ax/types";
18
- import { useBulkSelection, useModal, usePermission, useToast } from "@ax/hooks";
19
- import { MainWrapper, TableList, ErrorToast, Toast, EmptyState, SearchTagsBar } from "@ax/components";
20
- import { getSchemaFormCategories } from "@ax/helpers";
21
-
23
+ import FormsMenu from "../FormsMenu";
22
24
  import { DeleteModal } from "./atoms";
25
+ import BulkHeader from "./BulkHeader";
23
26
  import CategoryItem from "./CategoryItem";
24
27
  import CategoryPanel from "./CategoryPanel";
25
- import BulkHeader from "./BulkHeader";
26
- import FormsMenu from "../FormsMenu";
27
-
28
28
  import * as S from "./style";
29
29
 
30
30
  const FormCategoriesList = (props: IProps): JSX.Element => {
@@ -128,6 +128,7 @@ const FormCategoriesList = (props: IProps): JSX.Element => {
128
128
  const TableHeader = (
129
129
  <BulkHeader
130
130
  showBulk={areItemsSelected(catIds)}
131
+ selectedItems={selectedItems}
131
132
  totalItems={totalItems}
132
133
  selectItems={selectItems}
133
134
  checkState={checkState}
@@ -1,12 +1,15 @@
1
- import styled from "styled-components";
2
1
  import { Header } from "@ax/components/TableList/style";
3
2
 
3
+ import styled from "styled-components";
4
+
4
5
  const TableHeader = styled.div<{ isScrolling?: boolean }>`
5
6
  width: 100%;
6
7
  display: flex;
7
8
  flex-direction: row;
8
- padding: ${(p) => p.theme.spacing.m};
9
+ align-items: center;
10
+ // padding: ${(p) => p.theme.spacing.m};
9
11
  border-bottom: ${(p) => (p.isScrolling ? `1px solid ${p.theme.color.uiLine};` : "")};
12
+ min-height: 40px;
10
13
  `;
11
14
 
12
15
  const CheckHeader = styled(Header)`
@@ -1,10 +1,12 @@
1
- import React from "react";
2
1
  import { BulkSelectionOptions } from "@ax/components";
3
- import { IQueryValue } from "@ax/types";
2
+ import type { IBulkSelectedItems } from "@ax/hooks";
3
+ import type { IQueryValue } from "@ax/types";
4
+
4
5
  import TableHeader from "./TableHeader";
5
6
 
6
7
  const BulkHeader = (props: IProps): JSX.Element => {
7
8
  const {
9
+ selectedItems,
8
10
  showBulk,
9
11
  checkState,
10
12
  selectItems,
@@ -27,6 +29,7 @@ const BulkHeader = (props: IProps): JSX.Element => {
27
29
  actions={bulkActions}
28
30
  selectItems={selectItems}
29
31
  totalItems={totalItems}
32
+ selectedItems={selectedItems}
30
33
  />
31
34
  ) : (
32
35
  <TableHeader
@@ -60,6 +63,7 @@ interface IProps {
60
63
  siteID: number | null;
61
64
  filterItems: (filterPointer: string, filtersSelected: IQueryValue[]) => void;
62
65
  setHoverCheck: (state: boolean) => void;
66
+ selectedItems: IBulkSelectedItems;
63
67
  }
64
68
 
65
69
  export default BulkHeader;
@@ -1,4 +1,4 @@
1
- import React, { useCallback, useEffect, useRef, useState } from "react";
1
+ import { useCallback, useEffect, useRef, useState } from "react";
2
2
  import { connect } from "react-redux";
3
3
 
4
4
  import {
@@ -6,37 +6,37 @@ import {
6
6
  ErrorToast,
7
7
  FilterTagsBar,
8
8
  MainWrapper,
9
+ Notification,
9
10
  SearchTagsBar,
10
11
  TableList,
11
12
  Toast,
12
- Notification,
13
13
  } from "@ax/components";
14
- import {
15
- IQueryValue,
16
- IRootState,
17
- ISite,
14
+ import { appActions } from "@ax/containers/App";
15
+ import { formsActions } from "@ax/containers/Forms";
16
+ import { ITEMS_PER_PAGE } from "@ax/containers/Forms/constants";
17
+ import { getFormTemplates, getSchemaFormCategories } from "@ax/helpers";
18
+ import { useBulkSelection, useCategoryColors, useModal, usePermission, useToast } from "@ax/hooks";
19
+ import type {
18
20
  FormContent,
19
- ISchema,
21
+ FormState,
20
22
  GetFormsParams,
21
23
  ILanguage,
22
- FormState,
23
24
  INotification,
25
+ IQueryValue,
26
+ IRootState,
27
+ ISchema,
28
+ ISite,
24
29
  } from "@ax/types";
25
- import { useBulkSelection, useCategoryColors, useModal, usePermission, useToast } from "@ax/hooks";
26
- import { appActions } from "@ax/containers/App";
27
- import { formsActions } from "@ax/containers/Forms";
28
- import { ITEMS_PER_PAGE } from "@ax/containers/Forms/constants";
29
- import { getFormTemplates, getSchemaFormCategories } from "@ax/helpers";
30
- import Summary from "./Summary";
31
- import BulkHeader from "./BulkHeader";
32
- import FormItem from "./FormItem";
33
- import { TemplateModal } from "./TemplateModal";
34
- import FormsMenu from "../FormsMenu";
30
+
35
31
  import { DeleteModal, UnPublishModal } from "../atoms";
32
+ import FormsMenu from "../FormsMenu";
36
33
  import { getAllLangFormsIds, getSortedListStatus } from "../utils";
34
+ import BulkHeader from "./BulkHeader";
35
+ import FormItem from "./FormItem";
37
36
  import { useFilterQuery, useSortedListStatus } from "./hooks";
38
-
37
+ import Summary from "./Summary";
39
38
  import * as S from "./style";
39
+ import { TemplateModal } from "./TemplateModal";
40
40
 
41
41
  const FormList = (props: IUserListProps): JSX.Element => {
42
42
  const {
@@ -254,6 +254,7 @@ const FormList = (props: IUserListProps): JSX.Element => {
254
254
 
255
255
  const TableHeader = (
256
256
  <BulkHeader
257
+ selectedItems={selectedItems}
257
258
  filterValues={filterValues}
258
259
  showBulk={areItemsSelected(formIds)}
259
260
  selectAllItems={handleSelectAll}
@@ -6,6 +6,8 @@ const Header = styled.div`
6
6
  align-items: center;
7
7
  justify-content: space-between;
8
8
  margin-left: ${(p) => p.theme.spacing.m};
9
+ min-height: 40px;
10
+ padding-inline: 8px;
9
11
  `;
10
12
 
11
13
  const CheckWrapper = styled.div`
@@ -1,12 +1,12 @@
1
- import React from "react";
2
- import { IBulkAction } from "@ax/types";
1
+ import type { IBulkSelectedItems } from "@ax/hooks";
2
+ import type { IBulkAction } from "@ax/types";
3
3
 
4
4
  import GridHeader from "./GridHeader";
5
5
 
6
6
  import * as S from "./style";
7
7
 
8
8
  const BulkGridHeader = (props: IBulkHeaderProps): JSX.Element => {
9
- const { showBulk, checkState, selectItems, selectAllItems, totalItems, bulkActions } = props;
9
+ const { showBulk, checkState, selectItems, selectAllItems, totalItems, bulkActions, selectedItems } = props;
10
10
 
11
11
  return showBulk ? (
12
12
  <S.BulkWrapper>
@@ -16,6 +16,7 @@ const BulkGridHeader = (props: IBulkHeaderProps): JSX.Element => {
16
16
  actions={bulkActions}
17
17
  selectItems={selectItems}
18
18
  totalItems={totalItems}
19
+ selectedItems={selectedItems}
19
20
  />
20
21
  </S.BulkWrapper>
21
22
  ) : (
@@ -30,6 +31,7 @@ export interface IBulkHeaderProps {
30
31
  selectAllItems: () => void;
31
32
  totalItems: number;
32
33
  bulkActions: IBulkAction[];
34
+ selectedItems: IBulkSelectedItems;
33
35
  }
34
36
 
35
37
  export default BulkGridHeader;
@@ -1,7 +1,7 @@
1
- import React from "react";
2
- import styled from "styled-components";
3
1
  import { BulkSelectionOptions } from "@ax/components";
4
2
 
3
+ import styled from "styled-components";
4
+
5
5
  const BulkWrapper = styled.div`
6
6
  width: 100%;
7
7
  span {
@@ -10,8 +10,10 @@ const BulkWrapper = styled.div`
10
10
  `;
11
11
 
12
12
  const StyledBulkSelectionOptions = styled(BulkSelectionOptions)`
13
- padding: ${(p) => `0 0 0 ${p.theme.spacing.xs}`};
14
- height: ${(p) => p.theme.spacing.s};
13
+ padding:0;
14
+ padding-right: 16px;
15
+ margin-left: 16px;
16
+ width: auto;
15
17
  `;
16
18
 
17
19
  export { BulkWrapper, StyledBulkSelectionOptions };
@@ -1,12 +1,13 @@
1
- import styled from "styled-components";
2
-
3
1
  import { Header } from "@ax/components/TableList/style";
4
2
 
3
+ import styled from "styled-components";
4
+
5
5
  const TableHeader = styled.div<{ isScrolling?: boolean }>`
6
6
  width: 100%;
7
7
  display: flex;
8
8
  flex-direction: row;
9
- padding-bottom: ${(p) => p.theme.spacing.m};
9
+ align-items: center;
10
+ min-height: 40px;
10
11
  border-bottom: ${(p) => (p.isScrolling ? `1px solid ${p.theme.color.uiLine};` : "")};
11
12
  `;
12
13
 
@@ -1,12 +1,13 @@
1
- import React from "react";
2
- import { IBulkAction } from "@ax/types";
1
+ import type { IBulkSelectedItems } from "@ax/hooks";
2
+ import type { IBulkAction } from "@ax/types";
3
3
 
4
4
  import TableHeader from "./TableHeader";
5
5
 
6
6
  import * as S from "./style";
7
7
 
8
8
  const BulkListHeader = (props: IBulkHeaderProps): JSX.Element => {
9
- const { showBulk, checkState, selectItems, selectAllItems, totalItems, bulkActions, setHoverCheck } = props;
9
+ const { showBulk, checkState, selectItems, selectAllItems, totalItems, bulkActions, setHoverCheck, selectedItems } =
10
+ props;
10
11
 
11
12
  return showBulk ? (
12
13
  <S.BulkWrapper>
@@ -16,6 +17,7 @@ const BulkListHeader = (props: IBulkHeaderProps): JSX.Element => {
16
17
  actions={bulkActions}
17
18
  selectItems={selectItems}
18
19
  totalItems={totalItems}
20
+ selectedItems={selectedItems}
19
21
  />
20
22
  </S.BulkWrapper>
21
23
  ) : (
@@ -37,6 +39,7 @@ export interface IBulkHeaderProps {
37
39
  totalItems: number;
38
40
  bulkActions: IBulkAction[];
39
41
  setHoverCheck: (state: boolean) => void;
42
+ selectedItems: IBulkSelectedItems;
40
43
  }
41
44
 
42
45
  export default BulkListHeader;
@@ -1,6 +1,7 @@
1
- import styled from "styled-components";
2
1
  import { BulkSelectionOptions } from "@ax/components";
3
2
 
3
+ import styled from "styled-components";
4
+
4
5
  const BulkWrapper = styled.div`
5
6
  width: 100%;
6
7
  span {
@@ -9,9 +10,7 @@ const BulkWrapper = styled.div`
9
10
  `;
10
11
 
11
12
  const StyledBulkSelectionOptions = styled(BulkSelectionOptions)`
12
- padding: ${(p) => `0 0 ${p.theme.spacing.m} 0`};
13
- margin-top: ${(p) => `-${p.theme.spacing.xs}`};
14
- margin-bottom: ${(p) => `-${p.theme.spacing.xs}`};
13
+ padding-left: 0;
15
14
  `;
16
15
 
17
16
  export { BulkWrapper, StyledBulkSelectionOptions };
@@ -1,15 +1,16 @@
1
- import React, { useEffect, useState } from "react";
1
+ import { useEffect, useState } from "react";
2
2
  import { connect } from "react-redux";
3
3
 
4
- import { formatBytes, getFileExtension, getFormattedDateWithTimezone } from "@ax/helpers";
5
4
  import { Button, FieldsBehavior, IconAction, Tabs } from "@ax/components";
6
- import { IGetFolderParams, IImage, IRootState } from "@ax/types";
7
5
  import { galleryActions } from "@ax/containers/Gallery";
6
+ import { formatBytes, getFileExtension, getFormattedDateWithTimezone } from "@ax/helpers";
8
7
  import { useModal } from "@ax/hooks";
9
- import { DeleteFileModal } from "../../atoms";
10
- import UsageContent from "./UsageContent";
8
+ import { LOCALE } from "@ax/locales";
9
+ import type { IGetFolderParams, IImage, IRootState } from "@ax/types";
11
10
 
11
+ import { DeleteFileModal } from "../../atoms";
12
12
  import * as S from "./style";
13
+ import UsageContent from "./UsageContent";
13
14
 
14
15
  const DetailPanel = (props: IProps) => {
15
16
  const {
@@ -142,7 +143,7 @@ const DetailPanel = (props: IProps) => {
142
143
  fieldType="TagsField"
143
144
  onChange={handleTags}
144
145
  disabled={!isAllowedToEdit}
145
- helptext="Type a tag and press enter to create it"
146
+ helptext={LOCALE.fields.tags.helptext}
146
147
  />
147
148
  </S.FileForm>
148
149
  </S.Content>