From 68026382056b9af26aabfe9543a2469a6a351087 Mon Sep 17 00:00:00 2001 From: Dan Labrecque Date: Tue, 15 Oct 2024 22:04:07 -0400 Subject: [PATCH] PatternFly v6 milestone --- package-lock.json | 321 +++++++++++++----- package.json | 21 +- src/App.tsx | 4 +- .../feature-toggle/FeatureToggle.tsx | 9 +- src/components/permissions/Permissions.tsx | 31 +- .../charts/breakdown/BreakdownChart.tsx | 2 +- .../components/charts/common/chart-utils.ts | 2 +- .../components/charts/theme/theme-utils.ts | 2 +- .../components/charts/trend/TrendChart.tsx | 2 +- .../components/data-toolbar/DataToolbar.scss | 6 +- .../components/data-toolbar/DataToolbar.tsx | 30 +- .../components/export/ExportModal.styles.ts | 16 +- src/routes/components/export/ExportModal.tsx | 3 +- .../filterTypeahead/FilterInput.tsx | 13 +- .../page-heading/PageHeading.styles.ts | 4 +- .../components/page-heading/PageHeading.tsx | 10 +- .../perspective/Perspective.styles.ts | 4 +- src/routes/components/selectWrapper/index.ts | 3 +- .../components/selectWrapper/select.styles.ts | 4 +- .../selectWrapper/selectWrapper.scss | 4 +- .../state/empty-filter/EmptyFilterState.tsx | 13 +- .../components/state/error/ErrorState.tsx | 17 +- .../components/state/loading/LoadingState.tsx | 5 +- src/routes/details/Details.styles.ts | 19 +- src/routes/details/Details.tsx | 91 +++-- src/routes/details/DetailsFilterToolbar.tsx | 4 +- src/routes/details/DetailsTable.scss | 18 +- src/routes/details/DetailsTable.styles.ts | 8 +- src/routes/details/DetailsTable.tsx | 12 +- src/routes/details/detailsHeaderToolbar.scss | 6 +- src/routes/overview/Overview.tsx | 8 +- .../ActualSpendBreakdownChart.styles.ts | 4 +- .../actual-spend/ActualSpend.styles.ts | 12 +- .../CommittedSpendTrendChart.styles.ts | 4 +- .../committed-spend/CommittedSpend.styles.ts | 4 +- .../excess-spend/ExcessSpend.styles.ts | 4 +- .../components/excess-spend/ExcessSpend.tsx | 18 +- .../report-summary/ReportSummary.styles.ts | 20 +- src/routes/state/loading/Loading.tsx | 2 +- .../state/not-authorized/NotAuthorized.tsx | 2 +- .../not-authorized/NotAuthorizedState.tsx | 4 +- .../state/not-available/NotAvailable.tsx | 2 +- src/routes/state/not-deal/NotDeal.styles.ts | 4 +- src/routes/state/not-deal/NotDeal.tsx | 2 +- src/routes/state/not-deal/NotDealState.tsx | 12 +- src/routes/state/not-found/NotFound.tsx | 6 +- .../state/not-viewer/NotViewer.styles.ts | 4 +- src/routes/state/not-viewer/NotViewer.tsx | 2 +- .../state/not-viewer/NotViewerState.tsx | 12 +- .../state/not-visible/NotVisible.styles.ts | 4 +- src/routes/state/not-visible/NotVisible.tsx | 2 +- .../state/not-visible/NotVisibleState.tsx | 12 +- .../__snapshots__/featureToggle.test.ts.snap | 1 + .../feature-toggle/featureToggleActions.ts | 1 + .../feature-toggle/featureToggleReducer.ts | 3 + .../feature-toggle/featureToggleSelectors.ts | 2 + src/store/rootReducer.ts | 2 +- src/store/store.ts | 2 +- 58 files changed, 524 insertions(+), 315 deletions(-) diff --git a/package-lock.json b/package-lock.json index d0741643..85abbb87 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,15 +10,15 @@ "hasInstallScript": true, "license": "GNU AGPLv3", "dependencies": { - "@patternfly/patternfly": "5.4.1", - "@patternfly/react-charts": "7.4.3", - "@patternfly/react-component-groups": "^5.4.0", - "@patternfly/react-core": "5.4.1", - "@patternfly/react-icons": "5.4.0", - "@patternfly/react-table": "5.4.1", - "@patternfly/react-tokens": "5.4.0", + "@ausuliv/frontend-components-notifications": "^4.1.6", + "@patternfly/patternfly": "6.0.0-prerelease.15", + "@patternfly/react-charts": "8.0.0-prerelease.14", + "@patternfly/react-component-groups": "6.0.0-prerelease.7", + "@patternfly/react-core": "6.0.0-prerelease.21", + "@patternfly/react-icons": "6.0.0-prerelease.7", + "@patternfly/react-table": "6.0.0-prerelease.22", + "@patternfly/react-tokens": "6.0.0-prerelease.7", "@redhat-cloud-services/frontend-components": "^4.2.16", - "@redhat-cloud-services/frontend-components-notifications": "^4.1.0", "@redhat-cloud-services/frontend-components-translations": "^3.2.8", "@redhat-cloud-services/frontend-components-utilities": "^4.0.17", "@reduxjs/toolkit": "^2.3.0", @@ -65,6 +65,7 @@ "eslint-plugin-jsdoc": "^50.4.1", "eslint-plugin-markdown": "^5.1.0", "eslint-plugin-patternfly-react": "^5.4.0", + "eslint-plugin-prettier": "^5.2.1", "eslint-plugin-react": "^7.37.1", "eslint-plugin-simple-import-sort": "^12.1.1", "eslint-plugin-sort-keys-fix": "^1.1.2", @@ -109,6 +110,172 @@ "node": ">=6.0.0" } }, + "node_modules/@ausuliv/frontend-components": { + "version": "4.2.12", + "resolved": "https://registry.npmjs.org/@ausuliv/frontend-components/-/frontend-components-4.2.12.tgz", + "integrity": "sha512-f8FkVMPy/1uD/pEZyc6NA9BWGzlWO31c3pBFVubPuHeb8AmdA9CdVWDyY5cFx07WgbrEPtXlzHNWyTkMycT85g==", + "license": "Apache-2.0", + "dependencies": { + "@ausuliv/frontend-components-utilities": "^4.0.10", + "@patternfly/react-component-groups": "6.0.0-prerelease.4", + "@redhat-cloud-services/types": "^0.0.24", + "@scalprum/core": "^0.7.0", + "@scalprum/react-core": "^0.7.0", + "classnames": "^2.2.5", + "sanitize-html": "^2.7.2" + }, + "peerDependencies": { + "@patternfly/react-core": "6.0.0-prerelease.21", + "@patternfly/react-icons": "6.0.0-prerelease.7", + "@patternfly/react-table": "6.0.0-prerelease.22", + "lodash": "^4.17.15", + "prop-types": "^15.6.2", + "react": "^18.2.0", + "react-content-loader": "^6.2.0", + "react-dom": "^18.2.0", + "react-redux": ">=7.0.0", + "react-router-dom": "^5.0.0 || ^6.0.0" + } + }, + "node_modules/@ausuliv/frontend-components-notifications": { + "version": "4.1.6", + "resolved": "https://registry.npmjs.org/@ausuliv/frontend-components-notifications/-/frontend-components-notifications-4.1.6.tgz", + "integrity": "sha512-z2QFI2olDv7ypHhvzs8rFGv7HGhYgfu9Fd8Vjk312yzsUxXGiaDdSVdzwKxvKH9IVgBVeR3MZSyNFPvVTlzKKg==", + "license": "Apache-2.0", + "dependencies": { + "@ausuliv/frontend-components": "^4.2.9", + "@ausuliv/frontend-components-utilities": "^4.0.11", + "redux-promise-middleware": "6.1.3" + }, + "peerDependencies": { + "@patternfly/react-core": "6.0.0-prerelease.21", + "@patternfly/react-icons": "6.0.0-prerelease.7", + "prop-types": "^15.6.2", + "react": "^18.2.0", + "react-dom": "^18.2.0", + "react-redux": ">=7.2.9", + "redux": ">=4.2.0" + } + }, + "node_modules/@ausuliv/frontend-components-notifications/node_modules/redux-promise-middleware": { + "version": "6.1.3", + "resolved": "https://registry.npmjs.org/redux-promise-middleware/-/redux-promise-middleware-6.1.3.tgz", + "integrity": "sha512-B/Hi5Ct5d9y5d/KG0f6MZUXKA0nrQh5583mHCx13HY3Avte8KfpoRH/TB5QT6k/FcjT6JCxjv7jedymidy2A1A==", + "license": "MIT", + "peerDependencies": { + "redux": "^2.0.0 || ^3.0.0 || ^4.0.0" + } + }, + "node_modules/@ausuliv/frontend-components-utilities": { + "version": "4.0.14", + "resolved": "https://registry.npmjs.org/@ausuliv/frontend-components-utilities/-/frontend-components-utilities-4.0.14.tgz", + "integrity": "sha512-VTv1tnnY1DcxZZR9XsVgXzM6OEqubsxb5GBV6JpH6UJPZ97cRrijLvNm49FyinUP3ZdUEJkiEC7RZSeDqWHktQ==", + "license": "Apache-2.0", + "dependencies": { + "@redhat-cloud-services/rbac-client": "^1.0.100", + "@redhat-cloud-services/types": "^0.0.24", + "@sentry/browser": "^5.30.0", + "awesome-debounce-promise": "^2.1.0", + "axios": "^0.28.1", + "commander": "^2.20.3", + "mkdirp": "^1.0.4", + "p-all": "^5.0.0", + "react-content-loader": "^6.2.0" + }, + "peerDependencies": { + "@patternfly/react-core": "6.0.0-prerelease.21", + "@patternfly/react-table": "6.0.0-prerelease.22", + "react": "^18.2.0", + "react-dom": "^18.2.0", + "react-redux": ">=7.0.0", + "react-router-dom": "^5.0.0 || ^6.0.0" + } + }, + "node_modules/@ausuliv/frontend-components-utilities/node_modules/@redhat-cloud-services/rbac-client": { + "version": "1.4.5", + "resolved": "https://registry.npmjs.org/@redhat-cloud-services/rbac-client/-/rbac-client-1.4.5.tgz", + "integrity": "sha512-7kryZfzEYuw1V7c8bO5esXnfeYQO4Skz1XhluJ2whZNji8HcVbwDjBsQxy0+ndaSVirh5d86fufb00vK6fyUjw==", + "license": "Apache-2.0", + "dependencies": { + "axios": "^0.27.2", + "tslib": "^2.6.2" + } + }, + "node_modules/@ausuliv/frontend-components-utilities/node_modules/@redhat-cloud-services/rbac-client/node_modules/axios": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.27.2.tgz", + "integrity": "sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==", + "license": "MIT", + "dependencies": { + "follow-redirects": "^1.14.9", + "form-data": "^4.0.0" + } + }, + "node_modules/@ausuliv/frontend-components-utilities/node_modules/@redhat-cloud-services/types": { + "version": "0.0.24", + "resolved": "https://registry.npmjs.org/@redhat-cloud-services/types/-/types-0.0.24.tgz", + "integrity": "sha512-P50stc+mnWLycID46/AKmD/760r5N1eoam//O6MUVriqVorUdht7xkUL78aJZU1vw8WW6xlrDHwz3F6BM148qg==", + "license": "Apache-2.0" + }, + "node_modules/@ausuliv/frontend-components-utilities/node_modules/axios": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.28.1.tgz", + "integrity": "sha512-iUcGA5a7p0mVb4Gm/sy+FSECNkPFT4y7wt6OM/CDpO/OnNCvSs3PoMG8ibrC9jRoGYU0gUK5pXVC4NPXq6lHRQ==", + "license": "MIT", + "dependencies": { + "follow-redirects": "^1.15.0", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" + } + }, + "node_modules/@ausuliv/frontend-components/node_modules/@patternfly/react-component-groups": { + "version": "6.0.0-prerelease.4", + "resolved": "https://registry.npmjs.org/@patternfly/react-component-groups/-/react-component-groups-6.0.0-prerelease.4.tgz", + "integrity": "sha512-0NDPUaIaX5AqaLWo1QrTqiLI7LMkBr5qgC9ZP9nacWGtNhBhIc4pJfcAjvyr/jb8AtJQdDEMnTAUSZkj7aMmZw==", + "license": "MIT", + "dependencies": { + "@patternfly/react-core": "^6.0.0-prerelease.21", + "@patternfly/react-icons": "^6.0.0-prerelease.7", + "@patternfly/react-table": "^6.0.0-prerelease.22", + "clsx": "^2.1.1", + "react-jss": "^10.10.0" + }, + "peerDependencies": { + "react": "^17 || ^18", + "react-dom": "^17 || ^18" + } + }, + "node_modules/@ausuliv/frontend-components/node_modules/@redhat-cloud-services/types": { + "version": "0.0.24", + "resolved": "https://registry.npmjs.org/@redhat-cloud-services/types/-/types-0.0.24.tgz", + "integrity": "sha512-P50stc+mnWLycID46/AKmD/760r5N1eoam//O6MUVriqVorUdht7xkUL78aJZU1vw8WW6xlrDHwz3F6BM148qg==", + "license": "Apache-2.0" + }, + "node_modules/@ausuliv/frontend-components/node_modules/@scalprum/core": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/@scalprum/core/-/core-0.7.0.tgz", + "integrity": "sha512-zvrPXexI+bxHGFY/teuwPI5yjnOuiq8uT+RDsrm3gnpr1AqZQVUiGdskl1ON/ci5lSs1kNadmXceF1BTKlicwg==", + "license": "Apache-2.0", + "dependencies": { + "@openshift/dynamic-plugin-sdk": "^5.0.1", + "tslib": "^2.6.2" + } + }, + "node_modules/@ausuliv/frontend-components/node_modules/@scalprum/react-core": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/@scalprum/react-core/-/react-core-0.7.1.tgz", + "integrity": "sha512-CdLSwg46MYyDqCjWGuim/u0HF6GaPPGxXRD6AkWCkB4o3feBep+2zRAjzNfi3IlhNufWaiswxLpThhTLG4cgMg==", + "license": "Apache-2.0", + "dependencies": { + "@openshift/dynamic-plugin-sdk": "^5.0.1", + "@scalprum/core": "^0.7.0", + "lodash": "^4.17.0" + }, + "peerDependencies": { + "react": ">=16.8.0 || >=17.0.0 || ^18.0.0", + "react-dom": ">=16.8.0 || >=17.0.0 || ^18.0.0" + } + }, "node_modules/@babel/code-frame": { "version": "7.24.7", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.7.tgz", @@ -2322,22 +2489,26 @@ } }, "node_modules/@patternfly/patternfly": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/@patternfly/patternfly/-/patternfly-5.4.1.tgz", - "integrity": "sha512-0+KxsQJrFzOMANALW82BHAO7bSm9tEbG1RrOlGT23ME1CaBoetGSMRLymutvojn/b/EKfJIr5rLzQa+14Lvg2g==", + "version": "6.0.0-prerelease.15", + "resolved": "https://registry.npmjs.org/@patternfly/patternfly/-/patternfly-6.0.0-prerelease.15.tgz", + "integrity": "sha512-7/tRjaWBMX9bvMhIexdAONgxKiVbOCuFffLEKq+p+Q4t8Qq8fqGM7eAznzOx3YbLKIzqVtmbRrgTAIkpsSe1aw==", "license": "MIT" }, "node_modules/@patternfly/react-charts": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/@patternfly/react-charts/-/react-charts-7.4.3.tgz", - "integrity": "sha512-HW55rc7UtuiUSk5kUEdCsbfU+/lVPXDruebQKxzImseiyjeLL3e3Tb8L778ga6Kt0YKaUTaqETuprR9ucRA0+w==", + "version": "8.0.0-prerelease.14", + "resolved": "https://registry.npmjs.org/@patternfly/react-charts/-/react-charts-8.0.0-prerelease.14.tgz", + "integrity": "sha512-YgAkHPnXG6IDPK4x6UxmZC7knMUuA5GOqk4YWMMuyM7tQNaukOjxQhVHZZW3a2ozcHmqcwwqydOUi2Dfw3tweA==", "license": "MIT", "dependencies": { - "@patternfly/react-styles": "^5.4.0", - "@patternfly/react-tokens": "^5.4.0", + "@patternfly/react-styles": "^6.0.0-prerelease.6", + "@patternfly/react-tokens": "^6.0.0-prerelease.7", "hoist-non-react-statics": "^3.3.2", "lodash": "^4.17.21", - "tslib": "^2.6.3", + "tslib": "^2.7.0" + }, + "peerDependencies": { + "react": "^17 || ^18", + "react-dom": "^17 || ^18", "victory-area": "^37.1.1", "victory-axis": "^37.1.1", "victory-bar": "^37.1.1", @@ -2355,21 +2526,17 @@ "victory-tooltip": "^37.1.1", "victory-voronoi-container": "^37.1.1", "victory-zoom-container": "^37.1.1" - }, - "peerDependencies": { - "react": "^17 || ^18", - "react-dom": "^17 || ^18" } }, "node_modules/@patternfly/react-component-groups": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/@patternfly/react-component-groups/-/react-component-groups-5.4.0.tgz", - "integrity": "sha512-faRrjz/D4saTjNgQa2p8tSlEXeeyBMGK9eGqdOKc5DG0smP1e+lN7dXDYNPARpKXj9fmaUltzux+w/7NLwxUhw==", + "version": "6.0.0-prerelease.7", + "resolved": "https://registry.npmjs.org/@patternfly/react-component-groups/-/react-component-groups-6.0.0-prerelease.7.tgz", + "integrity": "sha512-+JYabo0L8ASWSiYHA6mzDrAdPABdcmaEk2Ts06PuGb/nrZdOLvdAHRFpzcnjFva9+tkeItHvAXAT7bK5WVAEEg==", "license": "MIT", "dependencies": { - "@patternfly/react-core": "^5.3.3", - "@patternfly/react-icons": "^5.4.0", - "@patternfly/react-table": "^5.3.3", + "@patternfly/react-core": "^6.0.0-prerelease.21", + "@patternfly/react-icons": "^6.0.0-prerelease.7", + "@patternfly/react-table": "^6.0.0-prerelease.22", "clsx": "^2.1.1", "react-jss": "^10.10.0" }, @@ -2379,17 +2546,17 @@ } }, "node_modules/@patternfly/react-core": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/@patternfly/react-core/-/react-core-5.4.1.tgz", - "integrity": "sha512-PJjwN4OCR7jTdWKi0RzuFdtlSQ8gBR+0REczuDHHPW8ky0bs1cIcqGsn5p/b6OgPlztl3UaXqRYLsroiEMasOw==", + "version": "6.0.0-prerelease.21", + "resolved": "https://registry.npmjs.org/@patternfly/react-core/-/react-core-6.0.0-prerelease.21.tgz", + "integrity": "sha512-EaGcKUPeeR253vY4N0Ahm9oOVtltoI6JycfclwmzjevOzpYvuLj1jcsVwL8wqgWYQVpURoBm1yxIdx34fo5UHA==", "license": "MIT", "dependencies": { - "@patternfly/react-icons": "^5.4.0", - "@patternfly/react-styles": "^5.4.0", - "@patternfly/react-tokens": "^5.4.0", - "focus-trap": "7.5.4", + "@patternfly/react-icons": "^6.0.0-prerelease.7", + "@patternfly/react-styles": "^6.0.0-prerelease.6", + "@patternfly/react-tokens": "^6.0.0-prerelease.7", + "focus-trap": "7.6.0", "react-dropzone": "^14.2.3", - "tslib": "^2.6.3" + "tslib": "^2.7.0" }, "peerDependencies": { "react": "^17 || ^18", @@ -2397,9 +2564,9 @@ } }, "node_modules/@patternfly/react-icons": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/@patternfly/react-icons/-/react-icons-5.4.0.tgz", - "integrity": "sha512-2M3qN/naultvRHeG2laJMmoIroFCGAyfwTVrnCjSkG6/KnRoXV0+dqd+Xrh7xzpzvIJB1klvifC0oX42cEkDrA==", + "version": "6.0.0-prerelease.7", + "resolved": "https://registry.npmjs.org/@patternfly/react-icons/-/react-icons-6.0.0-prerelease.7.tgz", + "integrity": "sha512-DQmecVgXRIiD3ww4KUuJ0qO76TmYMDEJ1ao1+DYuTSP+FzeJLJKuE9QxvL8qn3anyKtuORBuHdTIjM52mVq5Vg==", "license": "MIT", "peerDependencies": { "react": "^17 || ^18", @@ -2407,23 +2574,23 @@ } }, "node_modules/@patternfly/react-styles": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/@patternfly/react-styles/-/react-styles-5.4.0.tgz", - "integrity": "sha512-4ZE0s6LkX/0KsN0FOeogrDoj18m+BPA73YKnabZGB4SDRzrBNeBh2a6bSt546ZseEjkoJ+S81kOG0G8YckPQYg==", + "version": "6.0.0-prerelease.6", + "resolved": "https://registry.npmjs.org/@patternfly/react-styles/-/react-styles-6.0.0-prerelease.6.tgz", + "integrity": "sha512-tI28gIJFgbgVQs7Xj705csfl6T92dr5Bh7ynR5gN4+QdTWCUWmSctp46G2ZewXdrIN+C+2zUPE86o77aFp4CWw==", "license": "MIT" }, "node_modules/@patternfly/react-table": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/@patternfly/react-table/-/react-table-5.4.1.tgz", - "integrity": "sha512-T05djy6YPqjbGWjpnwUs9oqup8oqqIOBnDOcThnHukgzlwnZvLNywgdoMR5XAKxTcIx/iBE1cu8ieETlITOGLw==", + "version": "6.0.0-prerelease.22", + "resolved": "https://registry.npmjs.org/@patternfly/react-table/-/react-table-6.0.0-prerelease.22.tgz", + "integrity": "sha512-vGDWr14YATIY9RnxaOpyjkPlw4aKBM7dhHJRPXY0cwCFehSGwwzQpialZyi+92I2WfBF1Cb75doDAtxTSi8UZQ==", "license": "MIT", "dependencies": { - "@patternfly/react-core": "^5.4.1", - "@patternfly/react-icons": "^5.4.0", - "@patternfly/react-styles": "^5.4.0", - "@patternfly/react-tokens": "^5.4.0", + "@patternfly/react-core": "^6.0.0-prerelease.21", + "@patternfly/react-icons": "^6.0.0-prerelease.7", + "@patternfly/react-styles": "^6.0.0-prerelease.6", + "@patternfly/react-tokens": "^6.0.0-prerelease.7", "lodash": "^4.17.21", - "tslib": "^2.6.3" + "tslib": "^2.7.0" }, "peerDependencies": { "react": "^17 || ^18", @@ -2431,9 +2598,9 @@ } }, "node_modules/@patternfly/react-tokens": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/@patternfly/react-tokens/-/react-tokens-5.4.0.tgz", - "integrity": "sha512-KONkwCVOMyklhuuaYeYgcAsGtCBQXnsBGZeolhOdSzr2Mj0RVSW0oMrQPgZuPVzhhC/kbqgClHJJl6xuG9xheA==", + "version": "6.0.0-prerelease.7", + "resolved": "https://registry.npmjs.org/@patternfly/react-tokens/-/react-tokens-6.0.0-prerelease.7.tgz", + "integrity": "sha512-SLgVwbIgVx26LCjaXkpNlPIZYqWpHJkw3QX/n3URLmIcRlCw536/rKO1PzXaeuCCqhuSq66J6R125zM2eJjM6A==", "license": "MIT" }, "node_modules/@pkgjs/parseargs": { @@ -2801,33 +2968,6 @@ "node": ">=8" } }, - "node_modules/@redhat-cloud-services/frontend-components-notifications": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/@redhat-cloud-services/frontend-components-notifications/-/frontend-components-notifications-4.1.0.tgz", - "integrity": "sha512-bEoAeZMVY+UuSriSeruZ1pIesiPEjScrVFJQ5Wq/w3UFc79oXSYOgpRElxblPUH/LbKqp7inbzqRm2FxMcVxYg==", - "dependencies": { - "@redhat-cloud-services/frontend-components": "^4.0.9", - "@redhat-cloud-services/frontend-components-utilities": "^4.0.2", - "redux-promise-middleware": "6.1.3" - }, - "peerDependencies": { - "@patternfly/react-core": "^5.0.0", - "@patternfly/react-icons": "^5.0.0", - "prop-types": "^15.6.2", - "react": "^18.2.0", - "react-dom": "^18.2.0", - "react-redux": ">=7.2.9", - "redux": ">=4.2.0" - } - }, - "node_modules/@redhat-cloud-services/frontend-components-notifications/node_modules/redux-promise-middleware": { - "version": "6.1.3", - "resolved": "https://registry.npmjs.org/redux-promise-middleware/-/redux-promise-middleware-6.1.3.tgz", - "integrity": "sha512-B/Hi5Ct5d9y5d/KG0f6MZUXKA0nrQh5583mHCx13HY3Avte8KfpoRH/TB5QT6k/FcjT6JCxjv7jedymidy2A1A==", - "peerDependencies": { - "redux": "^2.0.0 || ^3.0.0 || ^4.0.0" - } - }, "node_modules/@redhat-cloud-services/frontend-components-translations": { "version": "3.2.8", "resolved": "https://registry.npmjs.org/@redhat-cloud-services/frontend-components-translations/-/frontend-components-translations-3.2.8.tgz", @@ -2866,6 +3006,23 @@ "react-router-dom": "^5.0.0 || ^6.0.0" } }, + "node_modules/@redhat-cloud-services/frontend-components/node_modules/@patternfly/react-component-groups": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@patternfly/react-component-groups/-/react-component-groups-5.4.0.tgz", + "integrity": "sha512-faRrjz/D4saTjNgQa2p8tSlEXeeyBMGK9eGqdOKc5DG0smP1e+lN7dXDYNPARpKXj9fmaUltzux+w/7NLwxUhw==", + "license": "MIT", + "dependencies": { + "@patternfly/react-core": "^5.3.3", + "@patternfly/react-icons": "^5.4.0", + "@patternfly/react-table": "^5.3.3", + "clsx": "^2.1.1", + "react-jss": "^10.10.0" + }, + "peerDependencies": { + "react": "^17 || ^18", + "react-dom": "^17 || ^18" + } + }, "node_modules/@redhat-cloud-services/javascript-clients-shared": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/@redhat-cloud-services/javascript-clients-shared/-/javascript-clients-shared-1.2.4.tgz", @@ -9837,9 +9994,9 @@ "dev": true }, "node_modules/focus-trap": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/focus-trap/-/focus-trap-7.5.4.tgz", - "integrity": "sha512-N7kHdlgsO/v+iD/dMoJKtsSqs5Dz/dXZVebRgJw23LDk+jMi/974zyiOYDziY2JPp8xivq9BmUGwIJMiuSBi7w==", + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/focus-trap/-/focus-trap-7.6.0.tgz", + "integrity": "sha512-1td0l3pMkWJLFipobUcGaf+5DTY4PLDDrcqoSaKP8ediO/CoWCCYk/fT/Y2A4e6TNB+Sh6clRJCjOPPnKoNHnQ==", "license": "MIT", "dependencies": { "tabbable": "^6.2.0" diff --git a/package.json b/package.json index 4657f7b3..d52725f7 100644 --- a/package.json +++ b/package.json @@ -32,6 +32,7 @@ "start": "HMR=true fec dev", "start:csb": "CLOUD_SERVICES_BACKEND_PORT=8000 npm start", "start:hmr": "HMR=true npm start", + "start:static": "fec static --port=8005", "stats": "npm run build:prod --profile --json > stats.json", "test": "jest --no-cache", "test:clean": "jest --clearCache", @@ -47,15 +48,15 @@ "verify": "npm-run-all build lint test" }, "dependencies": { - "@patternfly/patternfly": "5.4.1", - "@patternfly/react-charts": "7.4.3", - "@patternfly/react-component-groups": "^5.4.0", - "@patternfly/react-core": "5.4.1", - "@patternfly/react-icons": "5.4.0", - "@patternfly/react-table": "5.4.1", - "@patternfly/react-tokens": "5.4.0", + "@patternfly/patternfly": "6.0.0-prerelease.15", + "@patternfly/react-charts": "8.0.0-prerelease.14", + "@patternfly/react-component-groups": "6.0.0-prerelease.7", + "@patternfly/react-core": "6.0.0-prerelease.21", + "@patternfly/react-icons": "6.0.0-prerelease.7", + "@patternfly/react-table": "6.0.0-prerelease.22", + "@patternfly/react-tokens": "6.0.0-prerelease.7", "@redhat-cloud-services/frontend-components": "^4.2.16", - "@redhat-cloud-services/frontend-components-notifications": "^4.1.0", + "@ausuliv/frontend-components-notifications": "^4.1.6", "@redhat-cloud-services/frontend-components-translations": "^3.2.8", "@redhat-cloud-services/frontend-components-utilities": "^4.0.17", "@reduxjs/toolkit": "^2.3.0", @@ -102,6 +103,7 @@ "eslint-plugin-jsdoc": "^50.4.1", "eslint-plugin-markdown": "^5.1.0", "eslint-plugin-patternfly-react": "^5.4.0", + "eslint-plugin-prettier": "^5.2.1", "eslint-plugin-react": "^7.37.1", "eslint-plugin-simple-import-sort": "^12.1.1", "eslint-plugin-sort-keys-fix": "^1.1.2", @@ -123,6 +125,9 @@ "typescript": "^5.6.3" }, "overrides": { + "@patternfly/react-core": "6.0.0-prerelease.21", + "@patternfly/react-icons": "6.0.0-prerelease.7", + "@patternfly/react-table": "6.0.0-prerelease.22", "@typescript-eslint/eslint-plugin": "^8.9.0", "eslint": "^9.12.0", "redux": "^5.0.1" diff --git a/src/App.tsx b/src/App.tsx index 87982ba1..da573d41 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,9 +1,9 @@ import './App.scss'; +import NotificationsPortal from '@ausuliv/frontend-components-notifications/NotificationPortal'; +import { notificationsReducer } from '@ausuliv/frontend-components-notifications/redux'; import { Bullseye, Spinner } from '@patternfly/react-core'; import { useChrome } from '@redhat-cloud-services/frontend-components/useChrome'; -import NotificationsPortal from '@redhat-cloud-services/frontend-components-notifications/NotificationPortal'; -import { notificationsReducer } from '@redhat-cloud-services/frontend-components-notifications/redux'; import { getRegistry } from '@redhat-cloud-services/frontend-components-utilities/Registry'; import React, { useEffect } from 'react'; import { useSelector } from 'react-redux'; diff --git a/src/components/feature-toggle/FeatureToggle.tsx b/src/components/feature-toggle/FeatureToggle.tsx index 8670b515..d650939f 100644 --- a/src/components/feature-toggle/FeatureToggle.tsx +++ b/src/components/feature-toggle/FeatureToggle.tsx @@ -7,6 +7,7 @@ import { featureToggleActions } from 'store/feature-toggle'; export const enum FeatureToggle { billingStage = 'hybrid-committed-spend.ui.billing-stage', // Toggle to enable billing.stage APIs for demos debug = 'hybrid-committed-spend.ui.debug', + overridePermissions = 'hybrid-committed-spend.ui.override-permissions', // Toggle to override permissions for testing } const useIsToggleEnabled = (toggle: FeatureToggle) => { @@ -22,6 +23,10 @@ export const useIsDebugToggleEnabled = () => { return useIsToggleEnabled(FeatureToggle.debug); }; +export const useIsOverridePermissionsToggleEnabled = () => { + return useIsToggleEnabled(FeatureToggle.overridePermissions); +}; + // The FeatureToggle component saves feature toggles in store for places where Unleash hooks not available const useFeatureToggle = () => { const dispatch = useDispatch(); @@ -29,6 +34,7 @@ const useFeatureToggle = () => { const isBillingStageToggleEnabled = useIsBillingStageToggleEnabled(); const isDebugToggleEnabled = useIsDebugToggleEnabled(); + const isOverridePermissionsToggleEnabled = useIsOverridePermissionsToggleEnabled(); const fetchUser = callback => { auth.getUser().then(user => { @@ -42,13 +48,14 @@ const useFeatureToggle = () => { featureToggleActions.setFeatureToggle({ isBillingStageToggleEnabled, isDebugToggleEnabled, + isOverridePermissionsToggleEnabled, }) ); if (isDebugToggleEnabled) { // eslint-disable-next-line no-console fetchUser(identity => console.log('User identity:', identity)); } - }, [isBillingStageToggleEnabled, isDebugToggleEnabled]); + }, [isBillingStageToggleEnabled, isDebugToggleEnabled, isOverridePermissionsToggleEnabled]); }; export default useFeatureToggle; diff --git a/src/components/permissions/Permissions.tsx b/src/components/permissions/Permissions.tsx index 1801b9ab..0208eddc 100644 --- a/src/components/permissions/Permissions.tsx +++ b/src/components/permissions/Permissions.tsx @@ -4,6 +4,8 @@ import { Loading, NotAuthorized, NotAvailable, NotDeal, NotViewer, NotVisible } import { FetchStatus } from 'store/common'; import { useFormatPath, usePathname } from 'utils/paths'; import { hasHcsDataVisibility, hasHcsDeal, hasHcsViewer, useUserAccessMapToProps } from 'utils/userAccess'; + +import { useIsOverridePermissionsToggleEnabled } from '../feature-toggle'; interface PermissionsOwnProps { children?: React.ReactNode; } @@ -19,15 +21,10 @@ const Permissions: React.FC = ({ children = null }) => { if (userAccessFetchStatus !== FetchStatus.complete) { return false; } - const hasDeal = hasHcsDeal(userAccess); - const hasViewer = hasHcsViewer(userAccess); - const hasDataVisibility = hasHcsDataVisibility(userAccess); - switch (pathname) { case formatPath(routes.details.path): - return hasDeal && hasDataVisibility && hasViewer; case formatPath(routes.overview.path): - return hasDeal && hasDataVisibility && hasViewer; + return true; default: return false; } @@ -36,17 +33,31 @@ const Permissions: React.FC = ({ children = null }) => { // Page access denied because user doesn't have RBAC permissions and is not an org admin let result = ; + const isOverridePermissionsToggleEnabled = useIsOverridePermissionsToggleEnabled(); + if (userAccessFetchStatus === FetchStatus.inProgress) { result = ; - } else if (userAccessError?.response?.request?.status === 401) { + } else if (userAccessError?.response?.request?.status === 401 && !isOverridePermissionsToggleEnabled) { result = ; } else if (userAccessError) { result = ; - } else if (userAccessFetchStatus === FetchStatus.complete && !hasHcsDeal(userAccess)) { + } else if ( + userAccessFetchStatus === FetchStatus.complete && + !hasHcsDeal(userAccess) && + !isOverridePermissionsToggleEnabled + ) { result = ; - } else if (userAccessFetchStatus === FetchStatus.complete && !hasHcsDataVisibility(userAccess)) { + } else if ( + userAccessFetchStatus === FetchStatus.complete && + !hasHcsDataVisibility(userAccess) && + !isOverridePermissionsToggleEnabled + ) { result = ; - } else if (userAccessFetchStatus === FetchStatus.complete && !hasHcsViewer(userAccess)) { + } else if ( + userAccessFetchStatus === FetchStatus.complete && + !hasHcsViewer(userAccess) && + !isOverridePermissionsToggleEnabled + ) { result = ; } else if (hasPermissions()) { result = <>{children}; diff --git a/src/routes/components/charts/breakdown/BreakdownChart.tsx b/src/routes/components/charts/breakdown/BreakdownChart.tsx index 19732377..05531d77 100644 --- a/src/routes/components/charts/breakdown/BreakdownChart.tsx +++ b/src/routes/components/charts/breakdown/BreakdownChart.tsx @@ -10,7 +10,7 @@ import { ChartThemeColor, createContainer, getInteractiveLegendEvents, -} from '@patternfly/react-charts'; +} from '@patternfly/react-charts/victory'; import messages from 'locales/messages'; import React, { useEffect, useMemo, useState } from 'react'; import { useIntl } from 'react-intl'; diff --git a/src/routes/components/charts/common/chart-utils.ts b/src/routes/components/charts/common/chart-utils.ts index 6a552094..04f07736 100644 --- a/src/routes/components/charts/common/chart-utils.ts +++ b/src/routes/components/charts/common/chart-utils.ts @@ -1,4 +1,4 @@ -import { getInteractiveLegendItemStyles } from '@patternfly/react-charts'; +import { getInteractiveLegendItemStyles } from '@patternfly/react-charts/victory'; import { intl } from 'components/i18n'; import messages from 'locales/messages'; import type { FormatOptions, Formatter } from 'utils/format'; diff --git a/src/routes/components/charts/theme/theme-utils.ts b/src/routes/components/charts/theme/theme-utils.ts index 2e605073..ca0eb5a9 100644 --- a/src/routes/components/charts/theme/theme-utils.ts +++ b/src/routes/components/charts/theme/theme-utils.ts @@ -1,4 +1,4 @@ -import { ChartThemeColor, getCustomTheme } from '@patternfly/react-charts'; +import { ChartThemeColor, getCustomTheme } from '@patternfly/react-charts/victory'; import { default as ChartTheme } from './theme-hcs'; diff --git a/src/routes/components/charts/trend/TrendChart.tsx b/src/routes/components/charts/trend/TrendChart.tsx index 7ec3750e..0532ca0c 100644 --- a/src/routes/components/charts/trend/TrendChart.tsx +++ b/src/routes/components/charts/trend/TrendChart.tsx @@ -8,7 +8,7 @@ import { ChartLegendTooltip, createContainer, getInteractiveLegendEvents, -} from '@patternfly/react-charts'; +} from '@patternfly/react-charts/victory'; import { Title } from '@patternfly/react-core'; import messages from 'locales/messages'; import React, { useEffect, useMemo, useState } from 'react'; diff --git a/src/routes/components/data-toolbar/DataToolbar.scss b/src/routes/components/data-toolbar/DataToolbar.scss index e4c008a0..81bab375 100644 --- a/src/routes/components/data-toolbar/DataToolbar.scss +++ b/src/routes/components/data-toolbar/DataToolbar.scss @@ -3,14 +3,14 @@ // Workaround for https://github.com/patternfly/patternfly-react/issues/4477 // and https://github.com/patternfly/patternfly-react/issues/6371 .selectOverride { - .pf-v5-c-menu-toggle { + .pf-v6-c-menu-toggle { min-width: 250px; } } -.pf-v5-c-toolbar { +.pf-v6-c-toolbar { &.dataToolbarOverride { // Alternative workaround to overriding table sticky style - // --pf-v5-c-toolbar--ZIndex: auto; z-index: 301; + // --pf-v6-c-toolbar--ZIndex: auto; z-index: 301; } } diff --git a/src/routes/components/data-toolbar/DataToolbar.tsx b/src/routes/components/data-toolbar/DataToolbar.tsx index 925d55f9..ceec3e1c 100644 --- a/src/routes/components/data-toolbar/DataToolbar.tsx +++ b/src/routes/components/data-toolbar/DataToolbar.tsx @@ -1,6 +1,6 @@ import './DataToolbar.scss'; -import type { ToolbarChipGroup } from '@patternfly/react-core'; +import type { ToolbarLabelGroup } from '@patternfly/react-core'; import { Button, ButtonVariant, @@ -36,7 +36,7 @@ interface Filters { interface DataToolbarOwnProps { endDate?: Date; - categoryOptions?: ToolbarChipGroup[]; // Options for category menu + categoryOptions?: ToolbarLabelGroup[]; // Options for category menu filterPathsType?: FilterPathsType; groupBy?: string; // Sync category selection with groupBy value isDisabled?: boolean; @@ -155,14 +155,14 @@ const DataToolbar: React.FC = ({ }; // Category input - const getCategoryInput = (categoryOption: ToolbarChipGroup) => { + const getCategoryInput = (categoryOption: ToolbarLabelGroup) => { const disabled = isDisabled && !hasFilters(); return ( @@ -194,13 +194,12 @@ const DataToolbar: React.FC = ({ value={categoryInput} /> + > )} @@ -209,11 +208,11 @@ const DataToolbar: React.FC = ({ ); }; - const getDefaultCategoryOptions = (): ToolbarChipGroup[] => { + const getDefaultCategoryOptions = (): ToolbarLabelGroup[] => { return [{ name: intl.formatMessage(messages.names, { count: 1 }), key: 'name' }]; }; - const getCategoryOptions = (): ToolbarChipGroup[] => { + const getCategoryOptions = (): ToolbarLabelGroup[] => { return categoryOptions ? categoryOptions : getDefaultCategoryOptions(); }; @@ -279,18 +278,17 @@ const DataToolbar: React.FC = ({ const getExportButton = () => { return ( + /> ); }; @@ -320,7 +318,7 @@ const DataToolbar: React.FC = ({ {getExportButton()} - + {pagination} diff --git a/src/routes/components/export/ExportModal.styles.ts b/src/routes/components/export/ExportModal.styles.ts index f3b7b69d..b2a331e0 100644 --- a/src/routes/components/export/ExportModal.styles.ts +++ b/src/routes/components/export/ExportModal.styles.ts @@ -1,24 +1,24 @@ -import global_spacer_md from '@patternfly/react-tokens/dist/js/global_spacer_md'; -import global_spacer_sm from '@patternfly/react-tokens/dist/js/global_spacer_sm'; -import global_spacer_xs from '@patternfly/react-tokens/dist/js/global_spacer_xs'; +import t_global_spacer_md from '@patternfly/react-tokens/dist/js/t_global_spacer_md'; +import t_global_spacer_sm from '@patternfly/react-tokens/dist/js/t_global_spacer_sm'; +import t_global_spacer_xs from '@patternfly/react-tokens/dist/js/t_global_spacer_xs'; import type React from 'react'; export const styles = { alert: { - marginBottom: global_spacer_md.var, + marginBottom: t_global_spacer_md.var, }, form: { - marginLeft: global_spacer_sm.var, + marginLeft: t_global_spacer_sm.var, }, modal: { input: { - marginRight: global_spacer_xs.var, + marginRight: t_global_spacer_xs.var, }, ul: { - marginLeft: global_spacer_sm.var, + marginLeft: t_global_spacer_sm.var, }, }, title: { - marginBottom: global_spacer_md.var, + marginBottom: t_global_spacer_md.var, }, } as { [className: string]: React.CSSProperties }; diff --git a/src/routes/components/export/ExportModal.tsx b/src/routes/components/export/ExportModal.tsx index f12739ee..3e4712d7 100644 --- a/src/routes/components/export/ExportModal.tsx +++ b/src/routes/components/export/ExportModal.tsx @@ -1,5 +1,6 @@ import type { MessageDescriptor } from '@formatjs/intl/src/types'; -import { Alert, Button, ButtonVariant, Form, FormGroup, Grid, GridItem, Modal, Radio } from '@patternfly/react-core'; +import { Alert, Button, ButtonVariant, Form, FormGroup, Grid, GridItem, Radio } from '@patternfly/react-core'; +import { Modal } from '@patternfly/react-core/deprecated'; import type { ReportPathsType } from 'api/reports/report'; import type { AxiosError } from 'axios'; import messages from 'locales/messages'; diff --git a/src/routes/components/filterTypeahead/FilterInput.tsx b/src/routes/components/filterTypeahead/FilterInput.tsx index cde9c2d1..0164661f 100644 --- a/src/routes/components/filterTypeahead/FilterInput.tsx +++ b/src/routes/components/filterTypeahead/FilterInput.tsx @@ -1,4 +1,4 @@ -import type { ToolbarChipGroup } from '@patternfly/react-core'; +import type { ToolbarLabelGroup } from '@patternfly/react-core'; import { Button, Divider, @@ -109,9 +109,12 @@ const FilterInput: React.FC = ({ /> {search?.length && ( - + + } + aria-label={intl.formatMessage(messages.excessSpendButtonAriaLabel)} + variant={ButtonVariant.plain} + /> ); diff --git a/src/routes/overview/components/report-summary/ReportSummary.styles.ts b/src/routes/overview/components/report-summary/ReportSummary.styles.ts index 7cf0821c..70450c57 100644 --- a/src/routes/overview/components/report-summary/ReportSummary.styles.ts +++ b/src/routes/overview/components/report-summary/ReportSummary.styles.ts @@ -1,11 +1,11 @@ -import { global_Color_200 } from '@patternfly/react-tokens/dist/js/global_Color_200'; -import { global_FontSize_xs } from '@patternfly/react-tokens/dist/js/global_FontSize_xs'; -import { global_spacer_lg } from '@patternfly/react-tokens/dist/js/global_spacer_lg'; -import { global_spacer_md } from '@patternfly/react-tokens/dist/js/global_spacer_md'; +import { t_global_font_size_xs } from '@patternfly/react-tokens/dist/js/t_global_font_size_xs'; +import { t_global_spacer_lg } from '@patternfly/react-tokens/dist/js/t_global_spacer_lg'; +import { t_global_spacer_md } from '@patternfly/react-tokens/dist/js/t_global_spacer_md'; +import { t_global_text_color_200 } from '@patternfly/react-tokens/dist/js/t_global_text_color_200'; export const styles = { alertContainer: { - marginBottom: global_spacer_lg.var, + marginBottom: t_global_spacer_lg.var, }, cardFooter: { display: 'flex', @@ -13,19 +13,19 @@ export const styles = { }, chartSkeleton: { height: '125px', - marginBottom: global_spacer_md.var, - marginTop: global_spacer_md.var, + marginBottom: t_global_spacer_md.var, + marginTop: t_global_spacer_md.var, }, legendSkeleton: { - marginTop: global_spacer_md.var, + marginTop: t_global_spacer_md.var, }, reportSummary: { height: '100%', }, subtitle: { display: 'inline-block', - fontSize: global_FontSize_xs.var, - color: global_Color_200.var, + fontSize: t_global_font_size_xs.var, + color: t_global_text_color_200.var, marginBottom: 0, }, titleContainer: { diff --git a/src/routes/state/loading/Loading.tsx b/src/routes/state/loading/Loading.tsx index 2cf8ab70..101b61c4 100644 --- a/src/routes/state/loading/Loading.tsx +++ b/src/routes/state/loading/Loading.tsx @@ -16,7 +16,7 @@ const Loading = ({ title }: LoadingProps) => { )} - + diff --git a/src/routes/state/not-authorized/NotAuthorized.tsx b/src/routes/state/not-authorized/NotAuthorized.tsx index f7778b7d..718a9029 100644 --- a/src/routes/state/not-authorized/NotAuthorized.tsx +++ b/src/routes/state/not-authorized/NotAuthorized.tsx @@ -19,7 +19,7 @@ const NotAuthorized = ({ pathname, title }: NotAuthorizedProps) => { )} - + diff --git a/src/routes/state/not-authorized/NotAuthorizedState.tsx b/src/routes/state/not-authorized/NotAuthorizedState.tsx index 257c556a..793f8034 100644 --- a/src/routes/state/not-authorized/NotAuthorizedState.tsx +++ b/src/routes/state/not-authorized/NotAuthorizedState.tsx @@ -1,4 +1,4 @@ -import NotAuthorized from '@patternfly/react-component-groups/dist/esm/NotAuthorized'; +import UnauthorizedAccess from '@patternfly/react-component-groups/dist/esm/UnauthorizedAccess'; import messages from 'locales/messages'; import React from 'react'; import { useIntl } from 'react-intl'; @@ -24,7 +24,7 @@ const NotAuthorizedState: React.FC = ({ pathname }) => msg = messages.hcs; break; } - return ; + return ; }; export { NotAuthorizedState }; diff --git a/src/routes/state/not-available/NotAvailable.tsx b/src/routes/state/not-available/NotAvailable.tsx index 5dcdcc34..98ad6984 100644 --- a/src/routes/state/not-available/NotAvailable.tsx +++ b/src/routes/state/not-available/NotAvailable.tsx @@ -17,7 +17,7 @@ const NotAvailable = ({ title }: NotAvailableProps) => { )} - + diff --git a/src/routes/state/not-deal/NotDeal.styles.ts b/src/routes/state/not-deal/NotDeal.styles.ts index 6aadf31c..112ca891 100644 --- a/src/routes/state/not-deal/NotDeal.styles.ts +++ b/src/routes/state/not-deal/NotDeal.styles.ts @@ -1,8 +1,8 @@ -import global_spacer_2xl from '@patternfly/react-tokens/dist/js/global_spacer_2xl'; +import t_global_spacer_2xl from '@patternfly/react-tokens/dist/js/t_global_spacer_2xl'; import type React from 'react'; export const styles = { docs: { - paddingTop: global_spacer_2xl.value, + paddingTop: t_global_spacer_2xl.value, }, } as { [className: string]: React.CSSProperties }; diff --git a/src/routes/state/not-deal/NotDeal.tsx b/src/routes/state/not-deal/NotDeal.tsx index a8e6466b..aa711278 100644 --- a/src/routes/state/not-deal/NotDeal.tsx +++ b/src/routes/state/not-deal/NotDeal.tsx @@ -19,7 +19,7 @@ const NotDeal = ({ pathname, title }: NotDealProps) => { )} - + diff --git a/src/routes/state/not-deal/NotDealState.tsx b/src/routes/state/not-deal/NotDealState.tsx index 31ef8416..1b2de7cd 100644 --- a/src/routes/state/not-deal/NotDealState.tsx +++ b/src/routes/state/not-deal/NotDealState.tsx @@ -1,5 +1,5 @@ +import UnauthorizedAccess from '@patternfly/react-component-groups/dist/esm/UnauthorizedAccess'; import { PauseCircleIcon } from '@patternfly/react-icons/dist/esm/icons/pause-circle-icon'; -import NotAuthorized from '@redhat-cloud-services/frontend-components/NotAuthorized'; import messages from 'locales/messages'; import React from 'react'; import { useIntl } from 'react-intl'; @@ -30,18 +30,18 @@ const NotDealState: React.FC = ({ pathname }) => { break; } return ( - {intl.formatMessage(messages.hcsDocumentation)} } - description={intl.formatMessage(desc)} - icon={PauseCircleIcon} showReturnButton={false} - title={intl.formatMessage(title)} + titleText={intl.formatMessage(title)} /> ); }; diff --git a/src/routes/state/not-found/NotFound.tsx b/src/routes/state/not-found/NotFound.tsx index a503cf38..645530de 100644 --- a/src/routes/state/not-found/NotFound.tsx +++ b/src/routes/state/not-found/NotFound.tsx @@ -1,11 +1,11 @@ +import { MissingPage } from '@patternfly/react-component-groups/dist/esm/MissingPage'; import { PageSection } from '@patternfly/react-core'; -import InvalidObject from '@redhat-cloud-services/frontend-components/InvalidObject'; import React from 'react'; const NotFound = () => { return ( - - + + ); }; diff --git a/src/routes/state/not-viewer/NotViewer.styles.ts b/src/routes/state/not-viewer/NotViewer.styles.ts index 6aadf31c..112ca891 100644 --- a/src/routes/state/not-viewer/NotViewer.styles.ts +++ b/src/routes/state/not-viewer/NotViewer.styles.ts @@ -1,8 +1,8 @@ -import global_spacer_2xl from '@patternfly/react-tokens/dist/js/global_spacer_2xl'; +import t_global_spacer_2xl from '@patternfly/react-tokens/dist/js/t_global_spacer_2xl'; import type React from 'react'; export const styles = { docs: { - paddingTop: global_spacer_2xl.value, + paddingTop: t_global_spacer_2xl.value, }, } as { [className: string]: React.CSSProperties }; diff --git a/src/routes/state/not-viewer/NotViewer.tsx b/src/routes/state/not-viewer/NotViewer.tsx index 75eee7ad..1623b838 100644 --- a/src/routes/state/not-viewer/NotViewer.tsx +++ b/src/routes/state/not-viewer/NotViewer.tsx @@ -19,7 +19,7 @@ const NotViewer = ({ pathname, title }: NotViewerProps) => { )} - + diff --git a/src/routes/state/not-viewer/NotViewerState.tsx b/src/routes/state/not-viewer/NotViewerState.tsx index af442d24..d6fde11b 100644 --- a/src/routes/state/not-viewer/NotViewerState.tsx +++ b/src/routes/state/not-viewer/NotViewerState.tsx @@ -1,5 +1,5 @@ +import UnauthorizedAccess from '@patternfly/react-component-groups/dist/esm/UnauthorizedAccess'; import { PauseCircleIcon } from '@patternfly/react-icons/dist/esm/icons/pause-circle-icon'; -import NotAuthorized from '@redhat-cloud-services/frontend-components/NotAuthorized'; import messages from 'locales/messages'; import React from 'react'; import { useIntl } from 'react-intl'; @@ -30,18 +30,18 @@ const NotViewerState: React.FC = ({ pathname }) => { break; } return ( - {intl.formatMessage(messages.hcsDocumentation)} } - description={intl.formatMessage(desc)} - icon={PauseCircleIcon} showReturnButton={false} - title={intl.formatMessage(title)} + titleText={intl.formatMessage(title)} /> ); }; diff --git a/src/routes/state/not-visible/NotVisible.styles.ts b/src/routes/state/not-visible/NotVisible.styles.ts index 6aadf31c..112ca891 100644 --- a/src/routes/state/not-visible/NotVisible.styles.ts +++ b/src/routes/state/not-visible/NotVisible.styles.ts @@ -1,8 +1,8 @@ -import global_spacer_2xl from '@patternfly/react-tokens/dist/js/global_spacer_2xl'; +import t_global_spacer_2xl from '@patternfly/react-tokens/dist/js/t_global_spacer_2xl'; import type React from 'react'; export const styles = { docs: { - paddingTop: global_spacer_2xl.value, + paddingTop: t_global_spacer_2xl.value, }, } as { [className: string]: React.CSSProperties }; diff --git a/src/routes/state/not-visible/NotVisible.tsx b/src/routes/state/not-visible/NotVisible.tsx index c1baa2f3..e98228b7 100644 --- a/src/routes/state/not-visible/NotVisible.tsx +++ b/src/routes/state/not-visible/NotVisible.tsx @@ -19,7 +19,7 @@ const NotVisible = ({ pathname, title }: NotVisibleProps) => { )} - + diff --git a/src/routes/state/not-visible/NotVisibleState.tsx b/src/routes/state/not-visible/NotVisibleState.tsx index 240de829..9a285c92 100644 --- a/src/routes/state/not-visible/NotVisibleState.tsx +++ b/src/routes/state/not-visible/NotVisibleState.tsx @@ -1,5 +1,5 @@ +import UnauthorizedAccess from '@patternfly/react-component-groups/dist/esm/UnauthorizedAccess'; import { PauseCircleIcon } from '@patternfly/react-icons/dist/esm/icons/pause-circle-icon'; -import NotAuthorized from '@redhat-cloud-services/frontend-components/NotAuthorized'; import messages from 'locales/messages'; import React from 'react'; import { useIntl } from 'react-intl'; @@ -30,18 +30,18 @@ const NotVisibleState: React.FC = ({ pathname }) => { break; } return ( - {intl.formatMessage(messages.hcsDocumentation)} } - description={intl.formatMessage(desc)} - icon={PauseCircleIcon} showReturnButton={false} - title={intl.formatMessage(title)} + titleText={intl.formatMessage(title)} /> ); }; diff --git a/src/store/feature-toggle/__snapshots__/featureToggle.test.ts.snap b/src/store/feature-toggle/__snapshots__/featureToggle.test.ts.snap index 45c6bba6..89814138 100644 --- a/src/store/feature-toggle/__snapshots__/featureToggle.test.ts.snap +++ b/src/store/feature-toggle/__snapshots__/featureToggle.test.ts.snap @@ -5,5 +5,6 @@ exports[`default state 1`] = ` "hasFeatureToggle": false, "isBillingStageToggleEnabled": false, "isDebugToggleEnabled": false, + "isOverridePermissionsToggleEnabled": false, } `; diff --git a/src/store/feature-toggle/featureToggleActions.ts b/src/store/feature-toggle/featureToggleActions.ts index 799d0e3d..e0052df7 100644 --- a/src/store/feature-toggle/featureToggleActions.ts +++ b/src/store/feature-toggle/featureToggleActions.ts @@ -3,6 +3,7 @@ import { createAction } from 'typesafe-actions'; export interface FeatureToggleActionMeta { isBillingStageToggleEnabled?: boolean; isDebugToggleEnabled?: boolean; + isOverridePermissionsToggleEnabled?: boolean; } export const setFeatureToggle = createAction('feature/init_feature_toggle')(); diff --git a/src/store/feature-toggle/featureToggleReducer.ts b/src/store/feature-toggle/featureToggleReducer.ts index cf733133..02133590 100644 --- a/src/store/feature-toggle/featureToggleReducer.ts +++ b/src/store/feature-toggle/featureToggleReducer.ts @@ -10,12 +10,14 @@ export type FeatureToggleState = Readonly<{ hasFeatureToggle: boolean; isBillingStageToggleEnabled: boolean; isDebugToggleEnabled: boolean; + isOverridePermissionsToggleEnabled?: boolean; }>; export const defaultState: FeatureToggleState = { hasFeatureToggle: false, isBillingStageToggleEnabled: false, isDebugToggleEnabled: false, + isOverridePermissionsToggleEnabled: false, }; export const stateKey = 'featureToggle'; @@ -28,6 +30,7 @@ export function featureToggleReducer(state = defaultState, action: FeatureToggle hasFeatureToggle: true, isBillingStageToggleEnabled: action.payload.isBillingStageToggleEnabled, isDebugToggleEnabled: action.payload.isDebugToggleEnabled, + isOverridePermissionsToggleEnabled: action.payload.isOverridePermissionsToggleEnabled, }; default: diff --git a/src/store/feature-toggle/featureToggleSelectors.ts b/src/store/feature-toggle/featureToggleSelectors.ts index ec87321a..c231a629 100644 --- a/src/store/feature-toggle/featureToggleSelectors.ts +++ b/src/store/feature-toggle/featureToggleSelectors.ts @@ -9,3 +9,5 @@ export const selectHasFeatureToggle = (state: RootState) => selectFeatureToggleS export const selectIsBillingStageToggleEnabled = (state: RootState) => selectFeatureToggleState(state).isBillingStageToggleEnabled; export const selectIsDebugToggleEnabled = (state: RootState) => selectFeatureToggleState(state).isDebugToggleEnabled; +export const selectIsOverridePermissionsToggleEnabled = (state: RootState) => + selectFeatureToggleState(state).isOverridePermissionsToggleEnabled; diff --git a/src/store/rootReducer.ts b/src/store/rootReducer.ts index 4919ecf8..5392289c 100644 --- a/src/store/rootReducer.ts +++ b/src/store/rootReducer.ts @@ -1,4 +1,4 @@ -import { notificationsReducer } from '@redhat-cloud-services/frontend-components-notifications/redux'; +import { notificationsReducer } from '@ausuliv/frontend-components-notifications/redux'; import { combineReducers } from 'redux'; import { dashboardReducer, dashboardStateKey } from 'store/dashboard'; import { exportReducer, exportStateKey } from 'store/export'; diff --git a/src/store/store.ts b/src/store/store.ts index a7bdcbf9..e6187ed4 100644 --- a/src/store/store.ts +++ b/src/store/store.ts @@ -1,4 +1,4 @@ -import { notificationsMiddleware } from '@redhat-cloud-services/frontend-components-notifications/notificationsMiddleware'; +import { notificationsMiddleware } from '@ausuliv/frontend-components-notifications/notificationsMiddleware'; import { configureStore as createStore } from '@reduxjs/toolkit'; import { axiosInstance } from 'api';