From 39c0b88a86c7b93c7128db2fac27a8e80a232682 Mon Sep 17 00:00:00 2001 From: Jialecl Date: Thu, 25 Apr 2024 16:47:13 +0200 Subject: [PATCH] HalstackProvider removed from the halTable --- lib/src/components/HalTable.tsx | 160 ++++++++++++++++---------------- package-lock.json | 11 +-- package.json | 2 +- 3 files changed, 84 insertions(+), 89 deletions(-) diff --git a/lib/src/components/HalTable.tsx b/lib/src/components/HalTable.tsx index 784e2ea..82cdec2 100644 --- a/lib/src/components/HalTable.tsx +++ b/lib/src/components/HalTable.tsx @@ -117,91 +117,87 @@ const HalTable = ({ const { onPageChange, sort } = navigationFunctions; return ( - -
- - - - {columns.map((column) => ( - + + + + {columns.map((column) => ( + + sortByColumn(column.sortProperty, sort, sortColumn)} + tabIndex={column.sortProperty ? 0 : -1} + isSortable={column.sortProperty ? true : false} > - sortByColumn(column.sortProperty, sort, sortColumn)} - tabIndex={column.sortProperty ? 0 : -1} - isSortable={column.sortProperty ? true : false} - > - {column.header} - {column.sortProperty && ( - - {getIconForSortableColumn(column.sortProperty, sortColumn)} - + {column.header} + {column.sortProperty && ( + {getIconForSortableColumn(column.sortProperty, sortColumn)} + )} + + + ))} + + + + {!isLoading && + collectionItems.length > 0 && + collectionItems.map((collectionItem, i) => ( + + {columns.map((columnProperty) => ( + + {columnProperty.onClickItemFunction ? ( + { + columnProperty.onClickItemFunction(collectionItem); + }} + > + {getCellInfo(collectionItem, columnProperty)} + + ) : ( + getCellInfo(collectionItem, columnProperty) )} - - - ))} - - - - {!isLoading && - collectionItems.length > 0 && - collectionItems.map((collectionItem, i) => ( - - {columns.map((columnProperty) => ( - - {columnProperty.onClickItemFunction ? ( - { - columnProperty.onClickItemFunction(collectionItem); - }} - > - {getCellInfo(collectionItem, columnProperty)} - - ) : ( - getCellInfo(collectionItem, columnProperty) - )} - - ))} - - ))} - - - {isLoading ? ( - - - - ) : ( - !error && - !collectionItems.length && ( - - There are no items in this list. - - ) - )} - {!error && totalCollectionItems > 0 && ( - - )} - {error && ( - - {error} + + ))} + + ))} + + + {isLoading ? ( + + + + ) : ( + !error && + !collectionItems.length && ( + + There are no items in this list. - )} -
-
+ ) + )} + {!error && totalCollectionItems > 0 && ( + + )} + {error && ( + + {error} + + )} + ); }; diff --git a/package-lock.json b/package-lock.json index 13a8530..dfa1dca 100644 --- a/package-lock.json +++ b/package-lock.json @@ -21,7 +21,7 @@ "devDependencies": { "@babel/core": "^7.14.5", "@babel/preset-react": "^7.14.5", - "@dxc-technology/halstack-react": "^12.0.0", + "@dxc-technology/halstack-react": "^12.0.2", "@nx/cypress": "16.10.0", "@nx/esbuild": "^16.10.0", "@nx/eslint-plugin": "16.10.0", @@ -2021,16 +2021,15 @@ } }, "node_modules/@dxc-technology/halstack-react": { - "version": "12.0.0", - "resolved": "https://registry.npmjs.org/@dxc-technology/halstack-react/-/halstack-react-12.0.0.tgz", - "integrity": "sha512-GENOAA5HohD1/jDiTSFTKzUdZSedXorgjhTepu/UjdsBxcxj1a5xVExPGyup4I23I2H6cVo0f8tOshDvM/kb8w==", + "version": "12.0.2", + "resolved": "https://registry.npmjs.org/@dxc-technology/halstack-react/-/halstack-react-12.0.2.tgz", + "integrity": "sha512-+bkRWtNSjEWXjIrvAf7Oc8uKQUtMxj2FkHNhUOalMr1x/BzCBeV2ZWWR5Fh2e1G+SbNiTrpr++YWa0UExgPp4Q==", "dev": true, "dependencies": { "@radix-ui/react-popover": "^1.0.7", "color": "^3.1.3", "dayjs": "^1.11.1", - "slugify": "^1.6.5", - "uuid": "^8.3.2" + "slugify": "^1.6.5" }, "peerDependencies": { "react": "^18.x", diff --git a/package.json b/package.json index 7937f8a..4d6ffbf 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ "devDependencies": { "@babel/core": "^7.14.5", "@babel/preset-react": "^7.14.5", - "@dxc-technology/halstack-react": "^12.0.0", + "@dxc-technology/halstack-react": "^12.0.2", "@nx/cypress": "16.10.0", "@nx/esbuild": "^16.10.0", "@nx/eslint-plugin": "16.10.0",