@griddo/ax 11.10.16 → 11.10.17-rc.1
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/README.md +1 -0
- package/config/griddo-config/index.js +1 -0
- package/package.json +2 -2
- package/src/__tests__/components/BulkSelectionOptions/BulkSelectionOptions.test.tsx +10 -24
- package/src/components/BulkSelectionOptions/index.tsx +9 -11
- package/src/components/BulkSelectionOptions/style.tsx +12 -5
- package/src/components/Fields/CheckField/index.tsx +4 -5
- package/src/components/Fields/ReferenceField/AutoPanel/index.tsx +17 -17
- package/src/components/Fields/UniqueCheck/index.tsx +21 -16
- package/src/components/Fields/UniqueCheck/style.tsx +17 -0
- package/src/components/FileGallery/GalleryPanel/DetailPanel/index.tsx +2 -1
- package/src/components/FilterTagsBar/style.tsx +2 -0
- package/src/components/Gallery/GalleryPanel/DetailPanel/index.tsx +2 -1
- package/src/components/Gallery/index.tsx +25 -26
- package/src/components/TableList/TableItem/style.tsx +4 -1
- package/src/components/TableList/index.tsx +3 -3
- package/src/components/TableList/style.tsx +11 -1
- package/src/hooks/bulk.tsx +17 -8
- package/src/hooks/index.tsx +8 -7
- package/src/locales/en-US.ts +47 -0
- package/src/locales/es-ES.ts +47 -0
- package/src/locales/index.ts +11 -0
- package/src/modules/Categories/CategoriesList/BulkHeader/TableHeader/index.tsx +1 -3
- package/src/modules/Categories/CategoriesList/BulkHeader/TableHeader/style.tsx +4 -2
- package/src/modules/Categories/CategoriesList/BulkHeader/index.tsx +6 -2
- package/src/modules/Categories/CategoriesList/index.tsx +29 -28
- package/src/modules/Categories/CategoriesList/utils.tsx +3 -2
- package/src/modules/Content/BulkHeader/TableHeader/style.tsx +4 -3
- package/src/modules/Content/BulkHeader/index.tsx +6 -2
- package/src/modules/Content/index.tsx +51 -51
- package/src/modules/FileDrive/BulkGridHeader/GridHeader/style.tsx +2 -0
- package/src/modules/FileDrive/BulkGridHeader/index.tsx +5 -3
- package/src/modules/FileDrive/BulkGridHeader/style.tsx +6 -4
- package/src/modules/FileDrive/BulkListHeader/TableHeader/style.tsx +5 -3
- package/src/modules/FileDrive/BulkListHeader/index.tsx +15 -4
- package/src/modules/FileDrive/BulkListHeader/style.tsx +5 -4
- package/src/modules/FileDrive/FileModal/DetailPanel/index.tsx +9 -7
- package/src/modules/FileDrive/index.tsx +25 -23
- package/src/modules/Forms/FormCategoriesList/BulkHeader/TableHeader/style.tsx +4 -2
- package/src/modules/Forms/FormCategoriesList/BulkHeader/index.tsx +6 -2
- package/src/modules/Forms/FormCategoriesList/BulkHeader/style.tsx +3 -3
- package/src/modules/Forms/FormCategoriesList/index.tsx +13 -12
- package/src/modules/Forms/FormList/BulkHeader/TableHeader/style.tsx +5 -2
- package/src/modules/Forms/FormList/BulkHeader/index.tsx +6 -2
- package/src/modules/Forms/FormList/index.tsx +20 -19
- package/src/modules/MediaGallery/BulkGridHeader/GridHeader/style.tsx +2 -0
- package/src/modules/MediaGallery/BulkGridHeader/index.tsx +5 -3
- package/src/modules/MediaGallery/BulkGridHeader/style.tsx +6 -4
- package/src/modules/MediaGallery/BulkListHeader/TableHeader/style.tsx +4 -3
- package/src/modules/MediaGallery/BulkListHeader/index.tsx +6 -3
- package/src/modules/MediaGallery/BulkListHeader/style.tsx +3 -4
- package/src/modules/MediaGallery/ImageModal/DetailPanel/index.tsx +7 -6
- package/src/modules/MediaGallery/index.tsx +27 -25
- package/src/modules/Navigation/Defaults/BulkHeader/TableHeader/style.tsx +6 -4
- package/src/modules/Navigation/Defaults/BulkHeader/index.tsx +15 -3
- package/src/modules/Navigation/Defaults/index.tsx +8 -9
- package/src/modules/Redirects/BulkHeader/TableHeader/style.tsx +4 -2
- package/src/modules/Redirects/BulkHeader/index.tsx +7 -2
- package/src/modules/Redirects/index.tsx +12 -12
- package/src/modules/Settings/Integrations/BulkHeader/TableHeader/style.tsx +4 -2
- package/src/modules/Settings/Integrations/BulkHeader/index.tsx +5 -2
- package/src/modules/Settings/Integrations/index.tsx +16 -16
- package/src/modules/Sites/SitesList/ListView/BulkHeader/TableHeader/style.tsx +4 -3
- package/src/modules/Sites/SitesList/ListView/BulkHeader/index.tsx +5 -3
- package/src/modules/Sites/SitesList/ListView/BulkHeader/style.tsx +4 -2
- package/src/modules/Sites/SitesList/index.tsx +25 -18
- package/src/modules/StructuredData/StructuredDataList/BulkHeader/TableHeader/style.tsx +4 -2
- package/src/modules/StructuredData/StructuredDataList/BulkHeader/index.tsx +6 -2
- package/src/modules/StructuredData/StructuredDataList/index.tsx +46 -45
- package/src/modules/StructuredData/StructuredDataList/utils.tsx +7 -5
- package/src/modules/Users/Roles/BulkHeader/TableHeader/style.tsx +4 -2
- package/src/modules/Users/Roles/BulkHeader/index.tsx +6 -2
- package/src/modules/Users/Roles/index.tsx +7 -7
- package/src/modules/Users/UserList/BulkHeader/TableHeader/style.tsx +4 -2
- package/src/modules/Users/UserList/BulkHeader/index.tsx +6 -2
- package/src/modules/Users/UserList/index.tsx +14 -15
- package/src/schemas/pages/GlobalPage.tsx +17 -0
- package/src/schemas/pages/Page.tsx +17 -0
- package/tsconfig.paths.json +1 -0
|
@@ -1,25 +1,27 @@
|
|
|
1
|
-
import
|
|
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
|
-
|
|
14
|
-
Toast,
|
|
13
|
+
MainWrapper,
|
|
15
14
|
Modal,
|
|
16
|
-
Tabs,
|
|
17
|
-
BackFolder,
|
|
18
15
|
SearchField,
|
|
19
16
|
SearchTagsBar,
|
|
20
|
-
|
|
17
|
+
TableList,
|
|
18
|
+
Tabs,
|
|
19
|
+
Toast,
|
|
20
|
+
Tooltip,
|
|
21
21
|
} from "@ax/components";
|
|
22
|
-
import {
|
|
22
|
+
import { galleryActions } from "@ax/containers/Gallery";
|
|
23
|
+
import { useBulkSelection, useIsDirty, useModal, usePermission, useResizable, useToast } from "@ax/hooks";
|
|
24
|
+
import type {
|
|
23
25
|
IBulkAction,
|
|
24
26
|
IFolder,
|
|
25
27
|
IFolderTree,
|
|
@@ -30,26 +32,24 @@ import {
|
|
|
30
32
|
IRootState,
|
|
31
33
|
ISite,
|
|
32
34
|
} from "@ax/types";
|
|
33
|
-
import { useBulkSelection, useIsDirty, useModal, usePermission, useResizable, useToast } from "@ax/hooks";
|
|
34
|
-
import { galleryActions } from "@ax/containers/Gallery";
|
|
35
35
|
|
|
36
|
-
import
|
|
37
|
-
import
|
|
36
|
+
import { DeleteFileModal, MoveItemModal, NewFolderModal, NotSavedModal } from "./atoms";
|
|
37
|
+
import Breadcrumb from "./Breadcrumb";
|
|
38
|
+
import BulkGridHeader from "./BulkGridHeader";
|
|
38
39
|
import BulkListHeader from "./BulkListHeader";
|
|
39
40
|
import FolderItem from "./FolderItem";
|
|
40
|
-
import Breadcrumb from "./Breadcrumb";
|
|
41
41
|
import FolderTree from "./FolderTree";
|
|
42
|
-
import
|
|
43
|
-
import ImageModal from "./ImageModal";
|
|
44
|
-
import BulkGridHeader from "./BulkGridHeader";
|
|
45
|
-
import { DeleteFileModal, MoveItemModal, NewFolderModal, NotSavedModal } from "./atoms";
|
|
42
|
+
import GridItem from "./GridItem";
|
|
46
43
|
import { useFilterQuery, useSortedListStatus } from "./hooks";
|
|
47
|
-
import
|
|
48
|
-
import Type from "./ImageFilters/Type";
|
|
49
|
-
import SortBy from "./ImageFilters/SortBy";
|
|
44
|
+
import ImageDragAndDrop from "./ImageDragAndDrop";
|
|
50
45
|
import Orientation from "./ImageFilters/Orientation";
|
|
46
|
+
import SortBy from "./ImageFilters/SortBy";
|
|
47
|
+
import Type from "./ImageFilters/Type";
|
|
51
48
|
import UsageFilter from "./ImageFilters/Usage";
|
|
49
|
+
import ImageModal from "./ImageModal";
|
|
50
|
+
import ListItem from "./ListItem";
|
|
52
51
|
import UploadItem from "./UploadItem";
|
|
52
|
+
import { getSortedListStatus } from "./utils";
|
|
53
53
|
|
|
54
54
|
import * as S from "./style";
|
|
55
55
|
|
|
@@ -166,12 +166,12 @@ const MediaGallery = (props: IProps) => {
|
|
|
166
166
|
folderID: currentFolderID,
|
|
167
167
|
search: searchQuery,
|
|
168
168
|
query: filterQuery,
|
|
169
|
-
loading: isGrid && page > 1
|
|
169
|
+
loading: !(isGrid && page > 1),
|
|
170
170
|
thumbHeight: 188,
|
|
171
171
|
pagination: true,
|
|
172
172
|
page,
|
|
173
173
|
itemsPerPage,
|
|
174
|
-
infinite: isGrid && page > 1
|
|
174
|
+
infinite: isGrid && page > 1,
|
|
175
175
|
};
|
|
176
176
|
|
|
177
177
|
return params;
|
|
@@ -512,6 +512,7 @@ const MediaGallery = (props: IProps) => {
|
|
|
512
512
|
selectItems={selectItems}
|
|
513
513
|
bulkActions={bulkActions}
|
|
514
514
|
setHoverCheck={setHoverCheck}
|
|
515
|
+
selectedItems={selectedItems}
|
|
515
516
|
/>
|
|
516
517
|
);
|
|
517
518
|
|
|
@@ -671,7 +672,7 @@ const MediaGallery = (props: IProps) => {
|
|
|
671
672
|
<Orientation filterItems={filterItems} />
|
|
672
673
|
<Type filterItems={filterItems} />
|
|
673
674
|
<SortBy sortItems={sortItems} sortedState={sortedListStatus} />
|
|
674
|
-
<UsageFilter filterItems={filterItems} value={filterValues
|
|
675
|
+
<UsageFilter filterItems={filterItems} value={filterValues.usage} />
|
|
675
676
|
</S.Filters>
|
|
676
677
|
);
|
|
677
678
|
|
|
@@ -770,6 +771,7 @@ const MediaGallery = (props: IProps) => {
|
|
|
770
771
|
totalItems={totalItems}
|
|
771
772
|
selectItems={selectItems}
|
|
772
773
|
bulkActions={bulkActions}
|
|
774
|
+
selectedItems={selectedItems}
|
|
773
775
|
/>
|
|
774
776
|
)}
|
|
775
777
|
{!hasFolders && isRoot && !isSearching && <NewFolderButton />}
|
|
@@ -777,7 +779,7 @@ const MediaGallery = (props: IProps) => {
|
|
|
777
779
|
{(totalItems > 0 || progressItems.items.length > 0) && (
|
|
778
780
|
<S.DocumentsWrapper>{isGrid ? gridList : listTable}</S.DocumentsWrapper>
|
|
779
781
|
)}
|
|
780
|
-
{totalItems === 0 && progressItems.items.length
|
|
782
|
+
{totalItems === 0 && progressItems.items.length === 0 && !hasFolders && (
|
|
781
783
|
<S.EmptyStateWrapper data-testid="empty-state" margin={!isRoot}>
|
|
782
784
|
{isSearching && <EmptyState {...emptySearchStateProps} />}
|
|
783
785
|
{!isSearching && isRoot && <EmptyState {...emptyProps} />}
|
|
@@ -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
|
-
|
|
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)`
|
|
@@ -15,7 +17,7 @@ const CheckHeader = styled(Header)`
|
|
|
15
17
|
`;
|
|
16
18
|
|
|
17
19
|
const NameHeader = styled(Header)`
|
|
18
|
-
width:
|
|
20
|
+
width: 60%;
|
|
19
21
|
`;
|
|
20
22
|
|
|
21
23
|
const DefaultHeader = styled(Header)`
|
|
@@ -28,7 +30,7 @@ const TransHeader = styled(Header)`
|
|
|
28
30
|
`;
|
|
29
31
|
|
|
30
32
|
const ActionsHeader = styled(Header)`
|
|
31
|
-
width:
|
|
33
|
+
width: 92px;
|
|
32
34
|
padding-right: 0;
|
|
33
35
|
`;
|
|
34
36
|
|
|
@@ -1,10 +1,20 @@
|
|
|
1
|
-
import React from "react";
|
|
2
1
|
import { BulkSelectionOptions } from "@ax/components";
|
|
2
|
+
import type { IBulkSelectedItems } from "@ax/hooks";
|
|
3
|
+
|
|
3
4
|
import TableHeader from "./TableHeader";
|
|
4
5
|
|
|
5
6
|
const BulkHeader = (props: IProps): JSX.Element => {
|
|
6
|
-
const {
|
|
7
|
-
|
|
7
|
+
const {
|
|
8
|
+
showBulk,
|
|
9
|
+
checkState,
|
|
10
|
+
bulkActions,
|
|
11
|
+
selectItems,
|
|
12
|
+
selectAllItems,
|
|
13
|
+
totalItems,
|
|
14
|
+
isScrolling,
|
|
15
|
+
setHoverCheck,
|
|
16
|
+
selectedItems,
|
|
17
|
+
} = props;
|
|
8
18
|
|
|
9
19
|
return showBulk ? (
|
|
10
20
|
<BulkSelectionOptions
|
|
@@ -12,6 +22,7 @@ const BulkHeader = (props: IProps): JSX.Element => {
|
|
|
12
22
|
actions={bulkActions}
|
|
13
23
|
selectItems={selectItems}
|
|
14
24
|
totalItems={totalItems}
|
|
25
|
+
selectedItems={selectedItems}
|
|
15
26
|
/>
|
|
16
27
|
) : (
|
|
17
28
|
<TableHeader
|
|
@@ -33,6 +44,7 @@ interface IProps {
|
|
|
33
44
|
totalItems: number;
|
|
34
45
|
isScrolling: boolean;
|
|
35
46
|
setHoverCheck: (state: boolean) => void;
|
|
47
|
+
selectedItems: IBulkSelectedItems;
|
|
36
48
|
}
|
|
37
49
|
|
|
38
50
|
export default BulkHeader;
|
|
@@ -1,20 +1,18 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { useCallback, useEffect, useRef, useState } from "react";
|
|
2
2
|
import { connect } from "react-redux";
|
|
3
3
|
|
|
4
|
+
import { ErrorToast, MainWrapper, Notification, TableList, Toast } from "@ax/components";
|
|
4
5
|
import { appActions } from "@ax/containers/App";
|
|
5
|
-
import { menuActions } from "@ax/containers/Navigation";
|
|
6
|
-
import { IRootState, IHeader, IFooter, ISite, ILanguage } from "@ax/types";
|
|
7
|
-
import { useBulkSelection, usePermission, useToast, useModal } from "@ax/hooks";
|
|
6
|
+
import { menuActions, navigationActions } from "@ax/containers/Navigation";
|
|
8
7
|
import { capitalize, isMultipleNavigationModules } from "@ax/helpers";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
8
|
+
import { useBulkSelection, useModal, usePermission, useToast } from "@ax/hooks";
|
|
9
|
+
import type { IFooter, IHeader, ILanguage, IRootState, ISite } from "@ax/types";
|
|
11
10
|
|
|
11
|
+
import { NavigationModulesWarning } from "./atoms";
|
|
12
|
+
import BulkHeader from "./BulkHeader";
|
|
12
13
|
import DefaultItem from "./Item";
|
|
13
14
|
import DefaultNav from "./Nav";
|
|
14
|
-
import BulkHeader from "./BulkHeader";
|
|
15
|
-
import { NavigationModulesWarning } from "./atoms";
|
|
16
15
|
import ReplaceNavModal from "./ReplaceNavModal";
|
|
17
|
-
|
|
18
16
|
import * as S from "./style";
|
|
19
17
|
|
|
20
18
|
const DefaultsList = (props: IProps): JSX.Element => {
|
|
@@ -210,6 +208,7 @@ const DefaultsList = (props: IProps): JSX.Element => {
|
|
|
210
208
|
selectAllItems={handleSelectAll}
|
|
211
209
|
totalItems={totalItems}
|
|
212
210
|
selectItems={selectItems}
|
|
211
|
+
selectedItems={selectedItems}
|
|
213
212
|
checkState={checkState}
|
|
214
213
|
isScrolling={isScrolling}
|
|
215
214
|
setHoverCheck={setHoverCheck}
|
|
@@ -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
|
-
|
|
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,6 +1,8 @@
|
|
|
1
|
-
import React from "react";
|
|
2
1
|
import { BulkSelectionOptions } from "@ax/components";
|
|
3
|
-
import { IQueryValue } from "@ax/types";
|
|
2
|
+
import type { IQueryValue } from "@ax/types";
|
|
3
|
+
|
|
4
|
+
import { IBulkSelectedItems } from "src/hooks/bulk";
|
|
5
|
+
|
|
4
6
|
import TableHeader from "./TableHeader";
|
|
5
7
|
|
|
6
8
|
const BulkHeader = (props: IProps): JSX.Element => {
|
|
@@ -18,6 +20,7 @@ const BulkHeader = (props: IProps): JSX.Element => {
|
|
|
18
20
|
sortItems,
|
|
19
21
|
sortedListStatus,
|
|
20
22
|
setHoverCheck,
|
|
23
|
+
selectedItems,
|
|
21
24
|
} = props;
|
|
22
25
|
|
|
23
26
|
const bulkActions = [
|
|
@@ -34,6 +37,7 @@ const BulkHeader = (props: IProps): JSX.Element => {
|
|
|
34
37
|
actions={bulkActions}
|
|
35
38
|
selectItems={selectItems}
|
|
36
39
|
totalItems={totalItems}
|
|
40
|
+
selectedItems={selectedItems}
|
|
37
41
|
/>
|
|
38
42
|
) : (
|
|
39
43
|
<TableHeader
|
|
@@ -65,6 +69,7 @@ interface IProps {
|
|
|
65
69
|
sortItems: (orderPointer: IQueryValue[], isAscending: boolean) => void;
|
|
66
70
|
sortedListStatus: { isAscending: boolean; sortedByDate: boolean };
|
|
67
71
|
setHoverCheck: (state: boolean) => void;
|
|
72
|
+
selectedItems: IBulkSelectedItems;
|
|
68
73
|
}
|
|
69
74
|
|
|
70
75
|
export default BulkHeader;
|
|
@@ -1,29 +1,28 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { useCallback, useEffect, useRef, useState } from "react";
|
|
2
2
|
import { connect } from "react-redux";
|
|
3
3
|
|
|
4
|
-
import { IEmptyStateProps, INavItem, IQueryValue, IRedirect, IRootState, ISite } from "@ax/types";
|
|
5
|
-
import { appActions } from "@ax/containers/App";
|
|
6
|
-
import { redirectsActions } from "@ax/containers/Redirects";
|
|
7
4
|
import {
|
|
8
|
-
|
|
5
|
+
EmptyState,
|
|
9
6
|
ErrorToast,
|
|
7
|
+
FilterTagsBar,
|
|
8
|
+
MainWrapper,
|
|
10
9
|
Nav,
|
|
10
|
+
SearchTagsBar,
|
|
11
11
|
TableList,
|
|
12
|
-
EmptyState,
|
|
13
12
|
Toast,
|
|
14
|
-
SearchTagsBar,
|
|
15
|
-
FilterTagsBar,
|
|
16
13
|
} from "@ax/components";
|
|
14
|
+
import { appActions } from "@ax/containers/App";
|
|
15
|
+
import { redirectsActions } from "@ax/containers/Redirects";
|
|
17
16
|
import { useBulkSelection, useModal, useToast } from "@ax/hooks";
|
|
17
|
+
import type { IEmptyStateProps, INavItem, IQueryValue, IRedirect, IRootState, ISite } from "@ax/types";
|
|
18
18
|
|
|
19
|
+
import { DeleteModal, ImportCheckModal, ImportModal, OverwriteModal } from "./atoms";
|
|
19
20
|
import BulkHeader from "./BulkHeader";
|
|
21
|
+
import { useFilterQuery, useSortedListStatus } from "./hooks";
|
|
20
22
|
import RedirectItem from "./RedirectItem";
|
|
21
23
|
import RedirectPanel from "./RedirectPanel";
|
|
22
|
-
import { DeleteModal, ImportCheckModal, ImportModal, OverwriteModal } from "./atoms";
|
|
23
|
-
import { getSortedListStatus } from "./utils";
|
|
24
|
-
import { useSortedListStatus, useFilterQuery } from "./hooks";
|
|
25
|
-
|
|
26
24
|
import * as S from "./style";
|
|
25
|
+
import { getSortedListStatus } from "./utils";
|
|
27
26
|
|
|
28
27
|
const Redirects = (props: IProps): JSX.Element => {
|
|
29
28
|
const {
|
|
@@ -174,6 +173,7 @@ const Redirects = (props: IProps): JSX.Element => {
|
|
|
174
173
|
sortItems={sortItems}
|
|
175
174
|
sortedListStatus={sortedListStatus}
|
|
176
175
|
setHoverCheck={setHoverCheck}
|
|
176
|
+
selectedItems={selectedItems}
|
|
177
177
|
/>
|
|
178
178
|
);
|
|
179
179
|
|
|
@@ -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
|
-
|
|
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,6 +1,6 @@
|
|
|
1
|
-
import React from "react";
|
|
2
1
|
import { BulkSelectionOptions } from "@ax/components";
|
|
3
|
-
import {
|
|
2
|
+
import type { IBulkSelectedItems } from "@ax/hooks";
|
|
3
|
+
import type { IQueryValue } from "@ax/types";
|
|
4
4
|
|
|
5
5
|
import TableHeader from "./TableHeader";
|
|
6
6
|
|
|
@@ -16,6 +16,7 @@ const BulkHeader = (props: IProps): JSX.Element => {
|
|
|
16
16
|
filterValues,
|
|
17
17
|
bulkActions,
|
|
18
18
|
setHoverCheck,
|
|
19
|
+
selectedItems,
|
|
19
20
|
} = props;
|
|
20
21
|
|
|
21
22
|
return showBulk ? (
|
|
@@ -24,6 +25,7 @@ const BulkHeader = (props: IProps): JSX.Element => {
|
|
|
24
25
|
actions={bulkActions}
|
|
25
26
|
selectItems={selectItems}
|
|
26
27
|
totalItems={totalItems}
|
|
28
|
+
selectedItems={selectedItems}
|
|
27
29
|
/>
|
|
28
30
|
) : (
|
|
29
31
|
<TableHeader
|
|
@@ -49,6 +51,7 @@ interface IProps {
|
|
|
49
51
|
filterValues: Record<string, IQueryValue[]>;
|
|
50
52
|
bulkActions: { icon: string; text: string; action: () => void }[];
|
|
51
53
|
setHoverCheck: (state: boolean) => void;
|
|
54
|
+
selectedItems: IBulkSelectedItems;
|
|
52
55
|
}
|
|
53
56
|
|
|
54
57
|
export default BulkHeader;
|
|
@@ -1,27 +1,28 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { useCallback, useEffect, useRef, useState } from "react";
|
|
2
2
|
import { connect } from "react-redux";
|
|
3
|
+
|
|
4
|
+
import { EmptyState, ErrorToast, FilterTagsBar, MainWrapper, TableList, Toast } from "@ax/components";
|
|
5
|
+
import { appActions } from "@ax/containers/App";
|
|
6
|
+
import { integrationsActions } from "@ax/containers/Integrations";
|
|
7
|
+
import { useBulkSelection, useEmptyState, useModal, usePermission, useToast } from "@ax/hooks";
|
|
8
|
+
import type { IEmptyStateProps, IIntegration, IQueryValue, IRootState } from "@ax/types";
|
|
9
|
+
|
|
3
10
|
import {
|
|
4
11
|
closestCenter,
|
|
5
12
|
DndContext,
|
|
6
|
-
DragEndEvent,
|
|
13
|
+
type DragEndEvent,
|
|
7
14
|
KeyboardSensor,
|
|
8
15
|
PointerSensor,
|
|
9
|
-
UniqueIdentifier,
|
|
16
|
+
type UniqueIdentifier,
|
|
10
17
|
useSensor,
|
|
11
18
|
useSensors,
|
|
12
19
|
} from "@dnd-kit/core";
|
|
13
20
|
import { SortableContext, sortableKeyboardCoordinates, verticalListSortingStrategy } from "@dnd-kit/sortable";
|
|
14
21
|
|
|
15
|
-
import {
|
|
16
|
-
import { MainWrapper, ErrorToast, TableList, EmptyState, Toast, FilterTagsBar } from "@ax/components";
|
|
17
|
-
import { integrationsActions } from "@ax/containers/Integrations";
|
|
18
|
-
import { appActions } from "@ax/containers/App";
|
|
19
|
-
import { useBulkSelection, useEmptyState, useModal, usePermission, useToast } from "@ax/hooks";
|
|
20
|
-
|
|
22
|
+
import { DeactivateModal, DeleteModal } from "./atoms";
|
|
21
23
|
import BulkHeader from "./BulkHeader";
|
|
22
|
-
import IntegrationItem from "./IntegrationItem";
|
|
23
24
|
import { useFilterQuery } from "./hooks";
|
|
24
|
-
import
|
|
25
|
+
import IntegrationItem from "./IntegrationItem";
|
|
25
26
|
|
|
26
27
|
import * as S from "./style";
|
|
27
28
|
|
|
@@ -86,11 +87,9 @@ const Integrations = (props: IIntegrationsProps): JSX.Element => {
|
|
|
86
87
|
const fetchState = { isLoading, isFiltered };
|
|
87
88
|
const { isEmpty, emptyStateProps } = useEmptyState(integrations, fetchState, { noElementsProps });
|
|
88
89
|
|
|
89
|
-
const filteredIntegrationsIds =
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
.filter((integration: IIntegration) => integration.editable)
|
|
93
|
-
.map((integration: IIntegration) => integration.id);
|
|
90
|
+
const filteredIntegrationsIds = integrations
|
|
91
|
+
?.filter((integration: IIntegration) => integration.editable)
|
|
92
|
+
.map((integration: IIntegration) => integration.id);
|
|
94
93
|
|
|
95
94
|
const integrationsIds = integrations.map((integration: IIntegration) => integration.id as UniqueIdentifier);
|
|
96
95
|
|
|
@@ -185,6 +184,7 @@ const Integrations = (props: IIntegrationsProps): JSX.Element => {
|
|
|
185
184
|
filterValues={filterValues}
|
|
186
185
|
bulkActions={bulkActions}
|
|
187
186
|
setHoverCheck={setHoverCheck}
|
|
187
|
+
selectedItems={selectedItems}
|
|
188
188
|
/>
|
|
189
189
|
);
|
|
190
190
|
|
|
@@ -1,13 +1,14 @@
|
|
|
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
|
-
|
|
9
|
+
align-items: center;
|
|
10
10
|
border-bottom: ${(p) => (p.isScrolling ? `1px solid ${p.theme.color.uiLine};` : "")};
|
|
11
|
+
min-height: 40px;
|
|
11
12
|
`;
|
|
12
13
|
|
|
13
14
|
const HeaderWrapper = styled.div`
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
|
|
3
1
|
import { BulkSelectionOptions } from "@ax/components";
|
|
2
|
+
import type { IBulkSelectedItems } from "@ax/hooks";
|
|
4
3
|
import { usePermission } from "@ax/hooks";
|
|
5
|
-
import { IQueryValue } from "@ax/types";
|
|
4
|
+
import type { IQueryValue } from "@ax/types";
|
|
6
5
|
|
|
7
6
|
import TableHeader from "./TableHeader";
|
|
8
7
|
|
|
@@ -22,6 +21,7 @@ const BulkHeader = (props: IBulkHeaderProps): JSX.Element => {
|
|
|
22
21
|
sortedListStatus,
|
|
23
22
|
filterValues,
|
|
24
23
|
setHoverCheck,
|
|
24
|
+
selectedItems,
|
|
25
25
|
} = props;
|
|
26
26
|
|
|
27
27
|
const allowedToPublishSite = usePermission("general.publishSite");
|
|
@@ -53,6 +53,7 @@ const BulkHeader = (props: IBulkHeaderProps): JSX.Element => {
|
|
|
53
53
|
actions={actions}
|
|
54
54
|
selectItems={selectItems}
|
|
55
55
|
totalItems={totalItems}
|
|
56
|
+
selectedItems={selectedItems}
|
|
56
57
|
/>
|
|
57
58
|
</S.BulkWrapper>
|
|
58
59
|
) : (
|
|
@@ -83,6 +84,7 @@ export interface IBulkHeaderProps {
|
|
|
83
84
|
sortedListStatus: any;
|
|
84
85
|
filterValues: Record<string, IQueryValue[]>;
|
|
85
86
|
setHoverCheck: (state: boolean) => void;
|
|
87
|
+
selectedItems: IBulkSelectedItems;
|
|
86
88
|
}
|
|
87
89
|
|
|
88
90
|
export default BulkHeader;
|
|
@@ -2,7 +2,9 @@ import styled from "styled-components";
|
|
|
2
2
|
|
|
3
3
|
export const BulkWrapper = styled.div`
|
|
4
4
|
width: 100%;
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
/* only modify the first div inside BulkWrapper (the checkbox) */
|
|
6
|
+
& > div:first-child {
|
|
7
|
+
padding-left: ${({ theme }) => theme.spacing.s};
|
|
7
8
|
}
|
|
9
|
+
|
|
8
10
|
`;
|
|
@@ -1,36 +1,42 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { useCallback, useEffect, useRef, useState } from "react";
|
|
2
2
|
import { connect } from "react-redux";
|
|
3
3
|
|
|
4
|
-
import { appActions } from "@ax/containers/App";
|
|
5
|
-
import { sitesActions } from "@ax/containers/Sites";
|
|
6
|
-
import { ICheck, IGetSitesParams, IQueryValue, IRootState, ISettingsForm, ISite, ISiteListConfig } from "@ax/types";
|
|
7
|
-
import { IError } from "@ax/containers/App/reducer";
|
|
8
|
-
import { useBulkSelection, useModal, usePermission } from "@ax/hooks";
|
|
9
4
|
import {
|
|
10
|
-
|
|
11
|
-
Modal,
|
|
5
|
+
EmptyState,
|
|
12
6
|
ErrorToast,
|
|
7
|
+
FilterTagsBar,
|
|
13
8
|
Icon,
|
|
14
9
|
IconAction,
|
|
15
|
-
|
|
16
|
-
|
|
10
|
+
Loading,
|
|
11
|
+
MainWrapper,
|
|
12
|
+
Modal,
|
|
17
13
|
Pagination,
|
|
18
14
|
SearchTagsBar,
|
|
19
|
-
|
|
20
|
-
Loading,
|
|
15
|
+
TableList,
|
|
21
16
|
} from "@ax/components";
|
|
17
|
+
import { appActions } from "@ax/containers/App";
|
|
18
|
+
import type { IError } from "@ax/containers/App/reducer";
|
|
19
|
+
import { sitesActions } from "@ax/containers/Sites";
|
|
20
|
+
import { useBulkSelection, useModal, usePermission } from "@ax/hooks";
|
|
21
|
+
import type {
|
|
22
|
+
ICheck,
|
|
23
|
+
IGetSitesParams,
|
|
24
|
+
IQueryValue,
|
|
25
|
+
IRootState,
|
|
26
|
+
ISettingsForm,
|
|
27
|
+
ISite,
|
|
28
|
+
ISiteListConfig,
|
|
29
|
+
} from "@ax/types";
|
|
22
30
|
|
|
23
|
-
import { useFilterQuery, useSortedListStatus, useIsMount } from "./hooks";
|
|
24
|
-
import { filterByStatus, getSortedListStatus } from "./utils";
|
|
25
|
-
|
|
26
|
-
import SiteModal from "./SiteModal";
|
|
27
|
-
import RecentSiteItem from "./RecentSiteItem";
|
|
28
31
|
import GridHeaderFilter from "./GridView/GridHeaderFilter";
|
|
29
32
|
import GridSiteItem from "./GridView/GridSiteItem";
|
|
33
|
+
import { useFilterQuery, useIsMount, useSortedListStatus } from "./hooks";
|
|
30
34
|
import BulkHeader from "./ListView/BulkHeader";
|
|
31
35
|
import ListSiteItem from "./ListView/ListSiteItem";
|
|
32
|
-
|
|
36
|
+
import RecentSiteItem from "./RecentSiteItem";
|
|
37
|
+
import SiteModal from "./SiteModal";
|
|
33
38
|
import * as S from "./style";
|
|
39
|
+
import { filterByStatus, getSortedListStatus } from "./utils";
|
|
34
40
|
|
|
35
41
|
const SitesList = (props: ISitesListProps): JSX.Element => {
|
|
36
42
|
const {
|
|
@@ -294,6 +300,7 @@ const SitesList = (props: ISitesListProps): JSX.Element => {
|
|
|
294
300
|
filterItems={filterItems}
|
|
295
301
|
filterValues={currentConfig.filterValues}
|
|
296
302
|
setHoverCheck={setHoverCheck}
|
|
303
|
+
selectedItems={selectedItems}
|
|
297
304
|
/>
|
|
298
305
|
);
|
|
299
306
|
|
|
@@ -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
|
-
|
|
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,7 +1,8 @@
|
|
|
1
|
-
import React from "react";
|
|
2
1
|
import { BulkSelectionOptions } from "@ax/components";
|
|
3
|
-
import {
|
|
2
|
+
import type { IBulkSelectedItems } from "@ax/hooks";
|
|
4
3
|
import { usePermission } from "@ax/hooks";
|
|
4
|
+
import type { IColumn, IQueryValue, ISchemaField, IStructuredDataSortedInitialState } from "@ax/types";
|
|
5
|
+
|
|
5
6
|
import TableHeader from "./TableHeader";
|
|
6
7
|
|
|
7
8
|
const BulkHeader = (props: IProps): JSX.Element => {
|
|
@@ -28,6 +29,7 @@ const BulkHeader = (props: IProps): JSX.Element => {
|
|
|
28
29
|
maxColumns,
|
|
29
30
|
exportAction,
|
|
30
31
|
setHoverCheck,
|
|
32
|
+
selectedItems,
|
|
31
33
|
} = props;
|
|
32
34
|
|
|
33
35
|
const isAllowedToPublishPages = usePermission("global.globalData.publishUnpublishAllGlobalData");
|
|
@@ -64,6 +66,7 @@ const BulkHeader = (props: IProps): JSX.Element => {
|
|
|
64
66
|
selectItems={selectItems}
|
|
65
67
|
totalItems={totalItems}
|
|
66
68
|
exportAction={exportAction}
|
|
69
|
+
selectedItems={selectedItems}
|
|
67
70
|
/>
|
|
68
71
|
) : (
|
|
69
72
|
<TableHeader
|
|
@@ -109,6 +112,7 @@ interface IProps {
|
|
|
109
112
|
maxColumns: { value: number; text: string };
|
|
110
113
|
exportAction?(formats: (number | string)[]): void;
|
|
111
114
|
setHoverCheck: (state: boolean) => void;
|
|
115
|
+
selectedItems: IBulkSelectedItems;
|
|
112
116
|
}
|
|
113
117
|
|
|
114
118
|
export default BulkHeader;
|