From 5390a5d2ff7bb41b86676c23ed4085d492fd663b Mon Sep 17 00:00:00 2001
From: Victor Frunze <silverberserk@gmail.com>
Date: Wed, 29 Jan 2025 14:05:09 +0200
Subject: [PATCH] MWB-12-33: update paginations on project

---
 .../app/conceptual-mapping-rule/develop/list-table.js    | 2 +-
 .../sections/app/conceptual-mapping-rule/list-table.js   | 2 +-
 .../src/sections/app/fields-registry/list-table.js       | 2 +-
 .../app/file-manager/file-collection-list-table.js       | 2 +-
 .../app/file-manager/test-data-collection-list-table.js  | 2 +-
 .../frontend/src/sections/app/files-form/item-list.js    | 6 +++---
 .../app/generic-triple-map-fragment/list-table.js        | 2 +-
 .../src/sections/app/mapping-package/list-table.js       | 2 +-
 .../src/sections/app/mapping-package/state/list-table.js | 2 +-
 .../sections/app/ontology-namespace-custom/list-table.js | 2 +-
 .../src/sections/app/ontology-namespace/list-table.js    | 2 +-
 .../src/sections/app/ontology-term/list-table.js         | 9 +++------
 .../frontend/src/sections/app/project/list-table.js      | 2 +-
 .../app/shacl-validation-report/list-table-file.js       | 2 +-
 .../sections/app/shacl-validation-report/list-table.js   | 2 +-
 .../app/sparql-validation-report/list-table-file.js      | 2 +-
 .../sections/app/sparql-validation-report/list-table.js  | 2 +-
 .../frontend/src/sections/app/tasks/list-table.js        | 2 +-
 .../app/xpath-validation-report/list-table-file.js       | 2 +-
 .../sections/app/xpath-validation-report/list-table.js   | 2 +-
 .../frontend/src/sections/components/table-pagination.js | 4 ++--
 21 files changed, 26 insertions(+), 29 deletions(-)

diff --git a/mapping_workbench/frontend/src/sections/app/conceptual-mapping-rule/develop/list-table.js b/mapping_workbench/frontend/src/sections/app/conceptual-mapping-rule/develop/list-table.js
index c4789f35f..52294c84a 100644
--- a/mapping_workbench/frontend/src/sections/app/conceptual-mapping-rule/develop/list-table.js
+++ b/mapping_workbench/frontend/src/sections/app/conceptual-mapping-rule/develop/list-table.js
@@ -24,7 +24,7 @@ import {useHighlighterTheme} from "src/hooks/use-highlighter-theme";
 import ConfirmDialog from "src/components/app/dialog/confirm-dialog";
 import {MenuActionButton, MenuActions} from 'src/components/menu-actions';
 import TableSorterHeader from "src/sections/components/table-sorter-header";
-import TablePagination from "src/sections/components/table-pagination-pages";
+import TablePagination from "src/sections/components/table-pagination";
 
 export const ListTableRow = (props) => {
     const {
diff --git a/mapping_workbench/frontend/src/sections/app/conceptual-mapping-rule/list-table.js b/mapping_workbench/frontend/src/sections/app/conceptual-mapping-rule/list-table.js
index b77e78464..2a6327436 100644
--- a/mapping_workbench/frontend/src/sections/app/conceptual-mapping-rule/list-table.js
+++ b/mapping_workbench/frontend/src/sections/app/conceptual-mapping-rule/list-table.js
@@ -55,7 +55,7 @@ import {ChevronButton} from 'src/sections/components/chevron-button';
 import {FormCodeTextArea} from "src/components/app/form/code-text-area";
 import {ListItemActions} from 'src/components/app/list/list-item-actions';
 import TableSorterHeader from 'src/sections/components/table-sorter-header';
-import TablePagination from "src/sections/components/table-pagination-pages";
+import TablePagination from "src/sections/components/table-pagination";
 import {ForListItemAction} from 'src/contexts/app/section/for-list-item-action';
 import {genericTripleMapFragmentsApi} from "src/api/triple-map-fragments/generic";
 import {sparqlTestFileResourcesApi} from "src/api/sparql-test-suites/file-resources";
diff --git a/mapping_workbench/frontend/src/sections/app/fields-registry/list-table.js b/mapping_workbench/frontend/src/sections/app/fields-registry/list-table.js
index aa2953c8b..c8ea2efec 100644
--- a/mapping_workbench/frontend/src/sections/app/fields-registry/list-table.js
+++ b/mapping_workbench/frontend/src/sections/app/fields-registry/list-table.js
@@ -24,7 +24,7 @@ import {useHighlighterTheme} from "src/hooks/use-highlighter-theme";
 import {ChevronButton} from 'src/sections/components/chevron-button';
 import {ListItemActions} from 'src/components/app/list/list-item-actions';
 import TableSorterHeader from "src/sections/components/table-sorter-header";
-import TablePagination from "src/sections/components/table-pagination-pages";
+import TablePagination from "src/sections/components/table-pagination";
 import {ForListItemAction} from 'src/contexts/app/section/for-list-item-action';
 
 
diff --git a/mapping_workbench/frontend/src/sections/app/file-manager/file-collection-list-table.js b/mapping_workbench/frontend/src/sections/app/file-manager/file-collection-list-table.js
index 295cb85d6..22cad5946 100644
--- a/mapping_workbench/frontend/src/sections/app/file-manager/file-collection-list-table.js
+++ b/mapping_workbench/frontend/src/sections/app/file-manager/file-collection-list-table.js
@@ -32,7 +32,7 @@ import {ChevronButton} from 'src/sections/components/chevron-button';
 import {FileUploader} from "src/sections/app/file-manager/file-uploader";
 import {MenuActionButton, MenuActions} from 'src/components/menu-actions';
 import TableSorterHeader from 'src/sections/components/table-sorter-header';
-import TablePagination from "src/sections/components/table-pagination-pages";
+import TablePagination from "src/sections/components/table-pagination";
 import {ForListItemAction} from 'src/contexts/app/section/for-list-item-action';
 import {ListFileCollectionActions} from "src/components/app/list/list-file-collection-actions";
 import {MappingPackagesBulkAssigner} from "src/sections/app/mapping-package/components/mapping-packages-bulk-assigner";
diff --git a/mapping_workbench/frontend/src/sections/app/file-manager/test-data-collection-list-table.js b/mapping_workbench/frontend/src/sections/app/file-manager/test-data-collection-list-table.js
index b5a7ec72f..c4dd02446 100644
--- a/mapping_workbench/frontend/src/sections/app/file-manager/test-data-collection-list-table.js
+++ b/mapping_workbench/frontend/src/sections/app/file-manager/test-data-collection-list-table.js
@@ -32,7 +32,7 @@ import {mappingPackagesApi} from "src/api/mapping-packages";
 import {PropertyListItem} from "src/components/property-list-item";
 import {ChevronButton} from 'src/sections/components/chevron-button';
 import ConfirmDialog from "src/components/app/dialog/confirm-dialog";
-import TablePagination from "src/sections/components/table-pagination-pages";
+import TablePagination from "src/sections/components/table-pagination";
 import {MenuActions, MenuActionButton} from 'src/components/menu-actions';
 import {ListItemActions} from "src/components/app/list/list-item-actions";
 import TableSorterHeader from 'src/sections/components/table-sorter-header';
diff --git a/mapping_workbench/frontend/src/sections/app/files-form/item-list.js b/mapping_workbench/frontend/src/sections/app/files-form/item-list.js
index 5f098d889..bbec59d1e 100644
--- a/mapping_workbench/frontend/src/sections/app/files-form/item-list.js
+++ b/mapping_workbench/frontend/src/sections/app/files-form/item-list.js
@@ -6,11 +6,11 @@ import Stack from '@mui/material/Stack';
 import Table from '@mui/material/Table';
 import TableBody from '@mui/material/TableBody';
 
+import {ItemListRow} from './item-list-row';
+import {ItemListCard} from './item-list-card';
 import {Scrollbar} from 'src/components/scrollbar';
 import {TableNoData} from '../shacl-validation-report/utils';
-import {ItemListCard} from './item-list-card';
-import {ItemListRow} from './item-list-row';
-import TablePagination from "../../components/table-pagination-pages";
+import TablePagination from "src/sections/components/table-pagination";
 
 export const ItemList = (props) => {
         const {
diff --git a/mapping_workbench/frontend/src/sections/app/generic-triple-map-fragment/list-table.js b/mapping_workbench/frontend/src/sections/app/generic-triple-map-fragment/list-table.js
index 0f61eee50..30106f3f1 100644
--- a/mapping_workbench/frontend/src/sections/app/generic-triple-map-fragment/list-table.js
+++ b/mapping_workbench/frontend/src/sections/app/generic-triple-map-fragment/list-table.js
@@ -31,7 +31,7 @@ import {ChevronButton} from 'src/sections/components/chevron-button';
 import CodeMirrorDefault from 'src/components/app/form/codeMirrorDefault';
 import {ListItemActions} from 'src/components/app/list/list-item-actions';
 import TableSorterHeader from "src/sections/components/table-sorter-header";
-import TablePagination from "src/sections/components/table-pagination-pages";
+import TablePagination from "src/sections/components/table-pagination";
 import {genericTripleMapFragmentsApi} from 'src/api/triple-map-fragments/generic';
 import {ForListItemAction} from 'src/contexts/app/section/for-list-item-action';
 import {
diff --git a/mapping_workbench/frontend/src/sections/app/mapping-package/list-table.js b/mapping_workbench/frontend/src/sections/app/mapping-package/list-table.js
index badf0d0cf..c0e3025a2 100644
--- a/mapping_workbench/frontend/src/sections/app/mapping-package/list-table.js
+++ b/mapping_workbench/frontend/src/sections/app/mapping-package/list-table.js
@@ -31,7 +31,7 @@ import {ChevronButton} from 'src/sections/components/chevron-button';
 import {MenuActionButton, MenuActions} from 'src/components/menu-actions';
 import {ListItemActions} from 'src/components/app/list/list-item-actions';
 import TableSorterHeader from 'src/sections/components/table-sorter-header';
-import TablePagination from "src/sections/components/table-pagination-pages";
+import TablePagination from "src/sections/components/table-pagination";
 import {ForListItemAction} from 'src/contexts/app/section/for-list-item-action';
 import {MappingPackageProcessForm} from './components/mapping-package-process-form';
 import {MappingPackagesBulkActions} from './components/mapping-packages-bulk-actions';
diff --git a/mapping_workbench/frontend/src/sections/app/mapping-package/state/list-table.js b/mapping_workbench/frontend/src/sections/app/mapping-package/state/list-table.js
index f5124cf92..57da2a260 100644
--- a/mapping_workbench/frontend/src/sections/app/mapping-package/state/list-table.js
+++ b/mapping_workbench/frontend/src/sections/app/mapping-package/state/list-table.js
@@ -20,7 +20,7 @@ import exportPackage from "src/utils/export-mapping-package";
 import {MenuActionButton, MenuActions} from 'src/components/menu-actions';
 import {ListItemActions} from 'src/components/app/list/list-item-actions';
 import TableSorterHeader from 'src/sections/components/table-sorter-header';
-import TablePagination from "src/sections/components/table-pagination-pages";
+import TablePagination from "src/sections/components/table-pagination";
 import {ForListItemAction} from 'src/contexts/app/section/for-list-item-action';
 
 export const ListTable = (props) => {
diff --git a/mapping_workbench/frontend/src/sections/app/ontology-namespace-custom/list-table.js b/mapping_workbench/frontend/src/sections/app/ontology-namespace-custom/list-table.js
index 9ff0d7675..cd439530e 100644
--- a/mapping_workbench/frontend/src/sections/app/ontology-namespace-custom/list-table.js
+++ b/mapping_workbench/frontend/src/sections/app/ontology-namespace-custom/list-table.js
@@ -9,7 +9,7 @@ import TableHead from '@mui/material/TableHead';
 import Typography from '@mui/material/Typography';
 
 import {Scrollbar} from 'src/components/scrollbar';
-import TablePagination from 'src/sections/components/table-pagination-pages';
+import TablePagination from 'src/sections/components/table-pagination';
 import {ListItemActions} from 'src/components/app/list/list-item-actions';
 import TableSorterHeader from 'src/sections/components/table-sorter-header';
 import {toastError, toastLoad, toastSuccess} from "src/components/app-toast";
diff --git a/mapping_workbench/frontend/src/sections/app/ontology-namespace/list-table.js b/mapping_workbench/frontend/src/sections/app/ontology-namespace/list-table.js
index 77abe2ebb..fedfad3ab 100644
--- a/mapping_workbench/frontend/src/sections/app/ontology-namespace/list-table.js
+++ b/mapping_workbench/frontend/src/sections/app/ontology-namespace/list-table.js
@@ -13,7 +13,7 @@ import {Scrollbar} from 'src/components/scrollbar';
 import {MenuActions} from 'src/components/menu-actions';
 import {ListItemActions} from 'src/components/app/list/list-item-actions';
 import TableSorterHeader from 'src/sections/components/table-sorter-header';
-import TablePagination from "src/sections/components/table-pagination-pages";
+import TablePagination from "src/sections/components/table-pagination";
 import {toastError, toastLoad, toastSuccess} from "src/components/app-toast";
 import {ForListItemAction} from 'src/contexts/app/section/for-list-item-action';
 
diff --git a/mapping_workbench/frontend/src/sections/app/ontology-term/list-table.js b/mapping_workbench/frontend/src/sections/app/ontology-term/list-table.js
index 05925c08f..55df95211 100644
--- a/mapping_workbench/frontend/src/sections/app/ontology-term/list-table.js
+++ b/mapping_workbench/frontend/src/sections/app/ontology-term/list-table.js
@@ -12,12 +12,9 @@ import Typography from '@mui/material/Typography';
 import CardContent from '@mui/material/CardContent';
 
 import {Scrollbar} from 'src/components/scrollbar';
-import {ListItemActions} from 'src/components/app/list/list-item-actions';
-import {ForListItemAction} from 'src/contexts/app/section/for-list-item-action';
-import {MenuActions} from '../../../components/menu-actions';
-import {ChevronButton} from '../../components/chevron-button';
-import TablePagination from "../../components/table-pagination-pages";
-import TableSorterHeader from "../../components/table-sorter-header";
+import {ChevronButton} from 'src/sections/components/chevron-button';
+import TablePagination from "src/sections/components/table-pagination";
+import TableSorterHeader from "src/sections/components/table-sorter-header";
 
 
 export const ListTable = (props) => {
diff --git a/mapping_workbench/frontend/src/sections/app/project/list-table.js b/mapping_workbench/frontend/src/sections/app/project/list-table.js
index 5d29b9e9c..f140386ac 100644
--- a/mapping_workbench/frontend/src/sections/app/project/list-table.js
+++ b/mapping_workbench/frontend/src/sections/app/project/list-table.js
@@ -25,7 +25,7 @@ import {PropertyListItem} from 'src/components/property-list-item';
 import {ChevronButton} from 'src/sections/components/chevron-button';
 import {ListItemActions} from 'src/components/app/list/list-item-actions';
 import {MenuActionButton, MenuActions} from 'src/components/menu-actions';
-import TablePagination from "src/sections/components/table-pagination-pages";
+import TablePagination from "src/sections/components/table-pagination";
 import TableSorterHeader from "src/sections/components/table-sorter-header";
 import {ForListItemAction} from 'src/contexts/app/section/for-list-item-action';
 
diff --git a/mapping_workbench/frontend/src/sections/app/shacl-validation-report/list-table-file.js b/mapping_workbench/frontend/src/sections/app/shacl-validation-report/list-table-file.js
index 0ebd990de..00fcc4ccd 100644
--- a/mapping_workbench/frontend/src/sections/app/shacl-validation-report/list-table-file.js
+++ b/mapping_workbench/frontend/src/sections/app/shacl-validation-report/list-table-file.js
@@ -9,7 +9,7 @@ import TableRow from '@mui/material/TableRow';
 
 import {Scrollbar} from 'src/components/scrollbar';
 import {useHighlighterTheme} from "src/hooks/use-highlighter-theme";
-import TablePagination from 'src/sections/components/table-pagination-pages';
+import TablePagination from 'src/sections/components/table-pagination';
 import {TableFilterHeader} from "src/layouts/app/table-filter-header/table-filter-header";
 
 const LocalHighlighter = ({text, language, theme}) => {
diff --git a/mapping_workbench/frontend/src/sections/app/shacl-validation-report/list-table.js b/mapping_workbench/frontend/src/sections/app/shacl-validation-report/list-table.js
index 2023bd55a..96d08e764 100644
--- a/mapping_workbench/frontend/src/sections/app/shacl-validation-report/list-table.js
+++ b/mapping_workbench/frontend/src/sections/app/shacl-validation-report/list-table.js
@@ -21,7 +21,7 @@ import {ValueChip} from '../xpath-validation-report/utils';
 import {useHighlighterTheme} from "src/hooks/use-highlighter-theme";
 import {Prism as SyntaxHighlighter} from 'react-syntax-highlighter';
 import TableSorterHeader from "src/sections/components/table-sorter-header";
-import TablePagination from "src/sections/components/table-pagination-pages";
+import TablePagination from "src/sections/components/table-pagination";
 import {TableFilterHeader} from "src/layouts/app/table-filter-header/table-filter-header";
 
 export const ListTable = (props) => {
diff --git a/mapping_workbench/frontend/src/sections/app/sparql-validation-report/list-table-file.js b/mapping_workbench/frontend/src/sections/app/sparql-validation-report/list-table-file.js
index e8f24bbeb..b3424fc6f 100644
--- a/mapping_workbench/frontend/src/sections/app/sparql-validation-report/list-table-file.js
+++ b/mapping_workbench/frontend/src/sections/app/sparql-validation-report/list-table-file.js
@@ -19,7 +19,7 @@ import {Scrollbar} from 'src/components/scrollbar';
 import {getValidationColor} from '../mapping-package/state/utils';
 import {useHighlighterTheme} from "src/hooks/use-highlighter-theme"
 import TableSorterHeader from "src/sections/components/table-sorter-header";
-import TablePagination from "src/sections/components/table-pagination-pages";
+import TablePagination from "src/sections/components/table-pagination";
 import {TableFilterHeader} from "src/layouts/app/table-filter-header/table-filter-header";
 
 const Condition = ({text, value}) => {
diff --git a/mapping_workbench/frontend/src/sections/app/sparql-validation-report/list-table.js b/mapping_workbench/frontend/src/sections/app/sparql-validation-report/list-table.js
index 09ea22fbf..5399ef0d5 100644
--- a/mapping_workbench/frontend/src/sections/app/sparql-validation-report/list-table.js
+++ b/mapping_workbench/frontend/src/sections/app/sparql-validation-report/list-table.js
@@ -27,7 +27,7 @@ import {Scrollbar} from 'src/components/scrollbar';
 import {ValueChip} from '../xpath-validation-report/utils';
 import {getValidationColor} from '../mapping-package/state/utils';
 import {useHighlighterTheme} from "src/hooks/use-highlighter-theme";
-import TablePagination from "src/sections/components/table-pagination-pages";
+import TablePagination from "src/sections/components/table-pagination";
 import {TableFilterHeader} from "src/layouts/app/table-filter-header/table-filter-header";
 
 const ResultCell = ({item, onClick}) => {
diff --git a/mapping_workbench/frontend/src/sections/app/tasks/list-table.js b/mapping_workbench/frontend/src/sections/app/tasks/list-table.js
index 8d7db33cb..5a123aa58 100644
--- a/mapping_workbench/frontend/src/sections/app/tasks/list-table.js
+++ b/mapping_workbench/frontend/src/sections/app/tasks/list-table.js
@@ -28,7 +28,7 @@ import {SeverityPill} from "src/components/severity-pill";
 import {ChevronButton} from 'src/sections/components/chevron-button';
 import {MenuActionButton, MenuActions} from 'src/components/menu-actions';
 import TableSorterHeader from "src/sections/components/table-sorter-header";
-import TablePagination from "src/sections/components/table-pagination-pages";
+import TablePagination from "src/sections/components/table-pagination";
 import {mapStatusColor, TaskActions, TaskLine, taskProgressStatus as taskStatuses} from "./task-actions";
 import {Box} from "@mui/system";
 
diff --git a/mapping_workbench/frontend/src/sections/app/xpath-validation-report/list-table-file.js b/mapping_workbench/frontend/src/sections/app/xpath-validation-report/list-table-file.js
index 6eca1e14f..2af8033ea 100644
--- a/mapping_workbench/frontend/src/sections/app/xpath-validation-report/list-table-file.js
+++ b/mapping_workbench/frontend/src/sections/app/xpath-validation-report/list-table-file.js
@@ -20,7 +20,7 @@ import DialogContentText from "@mui/material/DialogContentText";
 
 import {Scrollbar} from 'src/components/scrollbar';
 import {useHighlighterTheme} from "src/hooks/use-highlighter-theme";
-import TablePagination from "src/sections/components/table-pagination-pages";
+import TablePagination from "src/sections/components/table-pagination";
 import TableSorterHeader from "src/sections/components/table-sorter-header";
 import {TableFilterHeader} from "../../../layouts/app/table-filter-header/table-filter-header";
 import {getValidationColor} from '../mapping-package/state/utils';
diff --git a/mapping_workbench/frontend/src/sections/app/xpath-validation-report/list-table.js b/mapping_workbench/frontend/src/sections/app/xpath-validation-report/list-table.js
index 040fdf34b..afe72a9b2 100644
--- a/mapping_workbench/frontend/src/sections/app/xpath-validation-report/list-table.js
+++ b/mapping_workbench/frontend/src/sections/app/xpath-validation-report/list-table.js
@@ -22,7 +22,7 @@ import DialogActions from "@mui/material/DialogActions";
 import {Scrollbar} from 'src/components/scrollbar';
 import {useHighlighterTheme} from "src/hooks/use-highlighter-theme";
 import TableSorterHeader from "src/sections/components/table-sorter-header";
-import TablePagination from "src/sections/components/table-pagination-pages";
+import TablePagination from "src/sections/components/table-pagination";
 import {TableFilterHeader} from "src/layouts/app/table-filter-header/table-filter-header";
 import {getValidationColor} from '../mapping-package/state/utils';
 import {ValueChip} from './utils';
diff --git a/mapping_workbench/frontend/src/sections/components/table-pagination.js b/mapping_workbench/frontend/src/sections/components/table-pagination.js
index e40cedd51..78b7fe02a 100644
--- a/mapping_workbench/frontend/src/sections/components/table-pagination.js
+++ b/mapping_workbench/frontend/src/sections/components/table-pagination.js
@@ -1,10 +1,10 @@
 import MuiTablePagination from '@mui/material/TablePagination'
 
 const TablePagination = (props) => {
-    const {children, ...otherProps} = props
+    const {children, showTop,...otherProps} = props
     return (
         <>
-            <MuiTablePagination {...otherProps}/>
+            {showTop && <MuiTablePagination {...otherProps}/>}
                 {children}
             <MuiTablePagination {...otherProps}/>
         </>