diff --git a/.archive/routes/components/dataToolbar/workloadType.tsx b/.archive/routes/components/dataToolbar/workloadType.tsx index 8ba61f9777..2d358ef924 100644 --- a/.archive/routes/components/dataToolbar/workloadType.tsx +++ b/.archive/routes/components/dataToolbar/workloadType.tsx @@ -1,7 +1,8 @@ import './dataToolbar.scss'; -import type { SelectOptionObject, ToolbarChipGroup } from '@patternfly/react-core'; -import { Select, SelectOption, SelectVariant } from '@patternfly/react-core'; +import type { ToolbarChipGroup } from '@patternfly/react-core'; +import type { SelectOptionObject } from '@patternfly/react-core/deprecated'; +import { Select, SelectOption, SelectVariant } from '@patternfly/react-core/deprecated'; import messages from 'locales/messages'; import React from 'react'; import type { WrappedComponentProps } from 'react-intl'; @@ -60,8 +61,8 @@ class WorkloadTypeBase extends React.Component this.onToggle(isExpanded)} selections={selections} isOpen={isWorkloadTypeExpanded} placeholderText={intl.formatMessage(messages.chooseValuePlaceholder)} diff --git a/fec.config.js b/fec.config.js index dd95b1d9cd..e2424f8bb5 100644 --- a/fec.config.js +++ b/fec.config.js @@ -37,6 +37,8 @@ module.exports = { interceptChromeConfig: false, // Change to false after your app is registered in configuration files proxyVerbose: true, sassPrefix: `.${moduleName}`, + // sassPrefix: 'body', // For PF v5 testing only + // bundlePfModules: true, // For PF v5 testing only stats, standalone: process.env.LOCAL_API_PORT ? true : false, useCache: true, @@ -61,9 +63,9 @@ module.exports = { './RootApp': path.resolve(__dirname, './src/appEntry.tsx'), }, shared: [ - { 'react-redux': { requiredVersion: dependencies['react-redux'] } }, - { 'react-router-dom': { import: false, requiredVersion: '*', singleton: true } }, - { '@unleash/proxy-client-react': { requiredVersion: '*', singleton: true } }, + { 'react-redux': { version: dependencies['react-redux'] } }, + { 'react-router-dom': { version: dependencies['react-router-dom'], import: false, singleton: true } }, + { '@unleash/proxy-client-react': { version: dependencies['@unleash/proxy-client-react'], singleton: true } }, ], }, /** diff --git a/package-lock.json b/package-lock.json index 641f42bd5c..f47c7ec38b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,17 +10,16 @@ "hasInstallScript": true, "license": "GNU AGPLv3", "dependencies": { - "@patternfly/patternfly": "4.224.2", - "@patternfly/react-charts": "6.94.19", - "@patternfly/react-core": "4.276.8", - "@patternfly/react-icons": "4.93.6", - "@patternfly/react-styles": "4.92.6", - "@patternfly/react-table": "4.113.0", - "@patternfly/react-tokens": "4.94.6", - "@redhat-cloud-services/frontend-components": "^3.11.5", - "@redhat-cloud-services/frontend-components-notifications": "^3.2.16", + "@patternfly/patternfly": "5.0.2", + "@patternfly/react-charts": "7.0.0", + "@patternfly/react-core": "5.0.0", + "@patternfly/react-icons": "5.0.0", + "@patternfly/react-table": "5.0.0", + "@patternfly/react-tokens": "5.0.0", + "@redhat-cloud-services/frontend-components": "^4.0.1", + "@redhat-cloud-services/frontend-components-notifications": "^4.0.0", "@redhat-cloud-services/frontend-components-translations": "^3.2.6", - "@redhat-cloud-services/frontend-components-utilities": "^3.7.6", + "@redhat-cloud-services/frontend-components-utilities": "^4.0.0", "@redhat-cloud-services/rbac-client": "^1.2.6", "@unleash/proxy-client-react": "^3.6.0", "axios": "^1.5.0", @@ -44,7 +43,8 @@ "devDependencies": { "@formatjs/cli": "^6.1.3", "@redhat-cloud-services/eslint-config-redhat-cloud-services": "^1.3.0", - "@redhat-cloud-services/frontend-components-config": "^5.1.1", + "@redhat-cloud-services/frontend-components-config": "^6.0.2", + "@redhat-cloud-services/tsc-transform-imports": "^1.0.3", "@testing-library/react": "^14.0.0", "@testing-library/user-event": "^14.4.3", "@types/jest": "^29.5.4", @@ -2099,95 +2099,95 @@ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" }, "node_modules/@patternfly/patternfly": { - "version": "4.224.2", - "resolved": "https://registry.npmjs.org/@patternfly/patternfly/-/patternfly-4.224.2.tgz", - "integrity": "sha512-HGNV26uyHSIECuhjPg/WGn0mXbAotcs6ODfhAOkfYjIgGylddgiwElxUe1rpEHV5mQJJ2rMn4OdeJIIpzRX61g==" + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/@patternfly/patternfly/-/patternfly-5.0.2.tgz", + "integrity": "sha512-PB8+MLdYVgF1hIOxGmnVsZG+YHUX3RePe5W1oMS4gS00EmSgw1cobr1Qbpy/BqqS8/R9DRN4hZ2FKDT0d5tkFQ==" }, "node_modules/@patternfly/react-charts": { - "version": "6.94.19", - "resolved": "https://registry.npmjs.org/@patternfly/react-charts/-/react-charts-6.94.19.tgz", - "integrity": "sha512-+yYwXAy/GBH2bTHFzMpdVKc8LUJCCNEqqS7bqovNkNLd0m3FP3q9fKJ22QxNnP9NeFHK6UFa4KfouQAb2fInfQ==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@patternfly/react-charts/-/react-charts-7.0.0.tgz", + "integrity": "sha512-lRR5iXJeTWbEqMlIcqnVA9DHurn8MJNDnwtEDcrzCH5g28MCXGosQjhXqsnz3LVGtHcBsQcpxMIv8WO5rfJHOA==", "dependencies": { - "@patternfly/react-styles": "^4.92.6", - "@patternfly/react-tokens": "^4.94.6", + "@patternfly/react-styles": "^5.0.0", + "@patternfly/react-tokens": "^5.0.0", "hoist-non-react-statics": "^3.3.0", "lodash": "^4.17.19", - "tslib": "^2.0.0", - "victory-area": "^36.6.7", - "victory-axis": "^36.6.7", - "victory-bar": "^36.6.7", - "victory-chart": "^36.6.7", - "victory-core": "^36.6.7", - "victory-create-container": "^36.6.7", - "victory-cursor-container": "^36.6.7", - "victory-group": "^36.6.7", - "victory-legend": "^36.6.7", - "victory-line": "^36.6.7", - "victory-pie": "^36.6.7", - "victory-scatter": "^36.6.7", - "victory-stack": "^36.6.7", - "victory-tooltip": "^36.6.7", - "victory-voronoi-container": "^36.6.7", - "victory-zoom-container": "^36.6.7" + "tslib": "^2.5.0", + "victory-area": "^36.6.11", + "victory-axis": "^36.6.11", + "victory-bar": "^36.6.11", + "victory-box-plot": "^36.6.11", + "victory-chart": "^36.6.11", + "victory-core": "^36.6.11", + "victory-create-container": "^36.6.11", + "victory-cursor-container": "^36.6.11", + "victory-group": "^36.6.11", + "victory-legend": "^36.6.11", + "victory-line": "^36.6.11", + "victory-pie": "^36.6.11", + "victory-scatter": "^36.6.11", + "victory-stack": "^36.6.11", + "victory-tooltip": "^36.6.11", + "victory-voronoi-container": "^36.6.11", + "victory-zoom-container": "^36.6.11" }, "peerDependencies": { - "react": "^16.8 || ^17 || ^18", - "react-dom": "^16.8 || ^17 || ^18" + "react": "^17 || ^18", + "react-dom": "^17 || ^18" } }, "node_modules/@patternfly/react-core": { - "version": "4.276.8", - "resolved": "https://registry.npmjs.org/@patternfly/react-core/-/react-core-4.276.8.tgz", - "integrity": "sha512-dn322rEzBeiVztZEuCZMUUittNb8l1hk30h9ZN31FLZLLVtXGlThFNV9ieqOJYA9zrYxYZrHMkTnOxSWVacMZg==", - "dependencies": { - "@patternfly/react-icons": "^4.93.6", - "@patternfly/react-styles": "^4.92.6", - "@patternfly/react-tokens": "^4.94.6", - "focus-trap": "6.9.2", - "react-dropzone": "9.0.0", - "tippy.js": "5.1.2", - "tslib": "^2.0.0" + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@patternfly/react-core/-/react-core-5.0.0.tgz", + "integrity": "sha512-kewRVFhLw0Dvt8250pqrO47sVRx8E93sMGZbHQomJnZdachYeQ9STnQTP2gvOBq/GPnMei0LZLv0T99g8mPE4w==", + "dependencies": { + "@patternfly/react-icons": "^5.0.0", + "@patternfly/react-styles": "^5.0.0", + "@patternfly/react-tokens": "^5.0.0", + "focus-trap": "7.4.3", + "react-dropzone": "^14.2.3", + "tslib": "^2.5.0" }, "peerDependencies": { - "react": "^16.8 || ^17 || ^18", - "react-dom": "^16.8 || ^17 || ^18" + "react": "^17 || ^18", + "react-dom": "^17 || ^18" } }, "node_modules/@patternfly/react-icons": { - "version": "4.93.6", - "resolved": "https://registry.npmjs.org/@patternfly/react-icons/-/react-icons-4.93.6.tgz", - "integrity": "sha512-ZrXegc/81oiuTIeWvoHb3nG/eZODbB4rYmekBEsrbiysyO7m/sUFoi/RLvgFINrRoh6YCJqL5fj06Jg6d7jX1g==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@patternfly/react-icons/-/react-icons-5.0.0.tgz", + "integrity": "sha512-GG5Y/UYl0h346MyDU9U650Csaq4Mxk8S6U8XC7ERk/xIrRr2RF67O2uY7zKBDMTNLYdBvPzgc2s3OMV1+d2/mg==", "peerDependencies": { - "react": "^16.8 || ^17 || ^18", - "react-dom": "^16.8 || ^17 || ^18" + "react": "^17 || ^18", + "react-dom": "^17 || ^18" } }, "node_modules/@patternfly/react-styles": { - "version": "4.92.6", - "resolved": "https://registry.npmjs.org/@patternfly/react-styles/-/react-styles-4.92.6.tgz", - "integrity": "sha512-b8uQdEReMyeoMzjpMri845QxqtupY/tIFFYfVeKoB2neno8gkcW1RvDdDe62LF88q45OktCwAe/8A99ker10Iw==" + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@patternfly/react-styles/-/react-styles-5.0.0.tgz", + "integrity": "sha512-xbSCgjx+fPrXbIzUznwTFWtJEbzVS0Wn4zrejdKJYQTY+4YcuPlFkeq2tl3syzwGsaYMpHiFwQiTaKyTvlwtuw==" }, "node_modules/@patternfly/react-table": { - "version": "4.113.0", - "resolved": "https://registry.npmjs.org/@patternfly/react-table/-/react-table-4.113.0.tgz", - "integrity": "sha512-qxa3NWCdYasqQQL1rqEd8DyNa8oWr6HNveNW5YJRakE7imWZhUPG2Nd6Op60+KYX8kbCSl7gwSmgAZAYMBMZkQ==", - "dependencies": { - "@patternfly/react-core": "^4.276.8", - "@patternfly/react-icons": "^4.93.6", - "@patternfly/react-styles": "^4.92.6", - "@patternfly/react-tokens": "^4.94.6", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@patternfly/react-table/-/react-table-5.0.0.tgz", + "integrity": "sha512-Q3MBo9+ZmBvLJzVHxmV9f/4qQAz5Si743zVLHRwjh+tjbn/DrcbxJdT8Uxa3NGKkpvszzgi/LPeXipJOHOELug==", + "dependencies": { + "@patternfly/react-core": "^5.0.0", + "@patternfly/react-icons": "^5.0.0", + "@patternfly/react-styles": "^5.0.0", + "@patternfly/react-tokens": "^5.0.0", "lodash": "^4.17.19", - "tslib": "^2.0.0" + "tslib": "^2.5.0" }, "peerDependencies": { - "react": "^16.8 || ^17 || ^18", - "react-dom": "^16.8 || ^17 || ^18" + "react": "^17 || ^18", + "react-dom": "^17 || ^18" } }, "node_modules/@patternfly/react-tokens": { - "version": "4.94.6", - "resolved": "https://registry.npmjs.org/@patternfly/react-tokens/-/react-tokens-4.94.6.tgz", - "integrity": "sha512-tm7C6nat+uKMr1hrapis7hS3rN9cr41tpcCKhx6cod6FLU8KwF2Yt5KUxakhIOCEcE/M/EhXhAw/qejp8w0r7Q==" + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@patternfly/react-tokens/-/react-tokens-5.0.0.tgz", + "integrity": "sha512-to2CXIZ6WTuzBcjLZ+nXi5LhnYkSIDu3RBMRZwrplmECOoUWv87CC+2T0EVxtASRtpQfikjD2PDKMsif5i0BxQ==" }, "node_modules/@pkgjs/parseargs": { "version": "0.11.0", @@ -2353,41 +2353,42 @@ } }, "node_modules/@redhat-cloud-services/frontend-components": { - "version": "3.11.5", - "resolved": "https://registry.npmjs.org/@redhat-cloud-services/frontend-components/-/frontend-components-3.11.5.tgz", - "integrity": "sha512-QQz3l1GJ5R1QdcsCabRhf+1EXomW/Nz5UA6dkj4/tYoMaDX1eAFnOzemaLfmymOAF/aMsIDkBOCJlfSrNyxp1A==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@redhat-cloud-services/frontend-components/-/frontend-components-4.0.1.tgz", + "integrity": "sha512-0QMmCJcT2mUSqiV89jXkCR5g/sydhpsbdqJcNnf/yEVCEaTxkbKVVRcX0Kv0sqshQv2fF7fBvsLoueKPJDkmsA==", "dependencies": { - "@redhat-cloud-services/frontend-components-utilities": "^3.2.25", + "@redhat-cloud-services/frontend-components-utilities": "^4.0.0", "@redhat-cloud-services/types": "^0.0.24", "@scalprum/core": "^0.5.1", "@scalprum/react-core": "^0.5.1", "sanitize-html": "^2.7.2" }, "peerDependencies": { - "@patternfly/react-core": "^4.18.5", - "@patternfly/react-icons": "^4.53.16", - "@patternfly/react-table": "^4.5.7", + "@patternfly/react-core": "^5.0.0", + "@patternfly/react-icons": "^5.0.0", + "@patternfly/react-table": "^5.0.0", "classnames": "^2.2.5", "lodash": "^4.17.15", "prop-types": "^15.6.2", - "react": "^16.14.0 || ^17.0.0 || ^18.0.0", + "react": "^18.2.0", "react-content-loader": "^6.2.0", - "react-dom": "^16.14.0 || ^17.0.0 || ^18.0.0", + "react-dom": "^18.2.0", "react-redux": ">=7.0.0", "react-router-dom": "^5.0.0 || ^6.0.0" } }, "node_modules/@redhat-cloud-services/frontend-components-config": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/@redhat-cloud-services/frontend-components-config/-/frontend-components-config-5.1.1.tgz", - "integrity": "sha512-13vZTD06IO5TxSy+1+Y4flpReC45gJTOci3b1QmR5+HvWL5nY0pB7TmmGMWxr5JeVk45v3EYOlXzdLWQuy0pOw==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/@redhat-cloud-services/frontend-components-config/-/frontend-components-config-6.0.2.tgz", + "integrity": "sha512-YziGMm13UP/3pn5R7MJCTdQvrAS2gQx/aIWEUmrBNESiYVDDS4N10nSQ41vUsZLRZcPm0y/GqPg3+H006znI4g==", "dev": true, "dependencies": { "@pmmmwh/react-refresh-webpack-plugin": "^0.5.8", - "@redhat-cloud-services/frontend-components-config-utilities": "^2.0.3", + "@redhat-cloud-services/frontend-components-config-utilities": "^3.0.0", + "@redhat-cloud-services/tsc-transform-imports": "^1.0.0", + "@swc/core": "^1.3.76", "assert": "^2.0.0", "axios": "^0.27.2", - "babel-loader": "^8.2.5", "browserify-zlib": "^0.2.0", "buffer": "^6.0.3", "chalk": "^4.1.2", @@ -2414,7 +2415,8 @@ "sass-loader": "^11.1.1", "source-map-loader": "^3.0.1", "stream-browserify": "^3.0.0", - "ts-loader": "^8.4.0", + "swc-loader": "^0.2.3", + "ts-loader": "^9.4.4", "url": "^0.11.0", "util": "^0.12.4", "webpack": "^5.88.0", @@ -2427,9 +2429,9 @@ } }, "node_modules/@redhat-cloud-services/frontend-components-config-utilities": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@redhat-cloud-services/frontend-components-config-utilities/-/frontend-components-config-utilities-2.1.0.tgz", - "integrity": "sha512-RQcXn+0WEVzBk98XHHOA3SIatT7qw30h/7UW/oWAYfGGceXeE5/5IjdRIZmuUaNym9v24nv1F4M9+RTdvXrWPA==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@redhat-cloud-services/frontend-components-config-utilities/-/frontend-components-config-utilities-3.0.0.tgz", + "integrity": "sha512-TKSV0ILeg3PWD+Tk/sA+T8HoY+YS69h30AdhJt9pTyfDutxh8uWK65ckLOwyo7HSZuWsV0cyerH7yVWzqseB/g==", "dev": true, "dependencies": { "@openshift/dynamic-plugin-sdk-webpack": "^3.0.0", @@ -2600,20 +2602,20 @@ } }, "node_modules/@redhat-cloud-services/frontend-components-notifications": { - "version": "3.2.16", - "resolved": "https://registry.npmjs.org/@redhat-cloud-services/frontend-components-notifications/-/frontend-components-notifications-3.2.16.tgz", - "integrity": "sha512-MpuUip15IPuRjZK+FePnVZespKJ/NpUbIimy5BKyE0JcvXS79nCMRvf6I9Xak+5R3fnsX+TStLC6vC2s5WkxRg==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@redhat-cloud-services/frontend-components-notifications/-/frontend-components-notifications-4.0.0.tgz", + "integrity": "sha512-SBpHAdtvb2wWbWRLGi40DtLSB/zsncQZHXFu/E6Qxyjoa4rSMPYJRjNo8G3OD+eASL2cF2srnXzi+iIVNWsXiQ==", "dependencies": { - "@redhat-cloud-services/frontend-components": "*", - "@redhat-cloud-services/frontend-components-utilities": "*", + "@redhat-cloud-services/frontend-components": "^4.0.0", + "@redhat-cloud-services/frontend-components-utilities": "^4.0.0", "redux-promise-middleware": "6.1.3" }, "peerDependencies": { - "@patternfly/react-core": "^4.18.5", - "@patternfly/react-icons": "^4.3.5", + "@patternfly/react-core": "^5.0.0", + "@patternfly/react-icons": "^5.0.0", "prop-types": "^15.6.2", - "react": "^16.14.0 || ^17.0.0 || ^18.0.0", - "react-dom": "^16.14.0 || ^17.0.0 || ^18.0.0", + "react": "^18.2.0", + "react-dom": "^18.2.0", "react-redux": ">=7.2.9", "redux": ">=4.2.0" } @@ -2632,10 +2634,75 @@ "react-intl": "^5.17.4" } }, - "node_modules/@redhat-cloud-services/frontend-components-utilities": { + "node_modules/@redhat-cloud-services/frontend-components-translations/node_modules/@patternfly/react-core": { + "version": "4.276.12", + "resolved": "https://registry.npmjs.org/@patternfly/react-core/-/react-core-4.276.12.tgz", + "integrity": "sha512-bBN2BMFhWjl/27zmTG5z3+6aH7XMO8our9nsaryxuzN5wFn6S8cIDILsw5NY7N8SLOOtmqbFJUgcM5GAn1ZAXg==", + "optional": true, + "peer": true, + "dependencies": { + "@patternfly/react-icons": "^4.93.7", + "@patternfly/react-styles": "^4.92.8", + "@patternfly/react-tokens": "^4.94.7", + "focus-trap": "6.9.2", + "react-dropzone": "9.0.0", + "tippy.js": "5.1.2", + "tslib": "^2.0.0" + }, + "peerDependencies": { + "react": "^16.8 || ^17 || ^18", + "react-dom": "^16.8 || ^17 || ^18" + } + }, + "node_modules/@redhat-cloud-services/frontend-components-translations/node_modules/@patternfly/react-icons": { + "version": "4.93.7", + "resolved": "https://registry.npmjs.org/@patternfly/react-icons/-/react-icons-4.93.7.tgz", + "integrity": "sha512-3kr35dgba7Qz5CSzmfH0rIjSvBC5xkmiknf3SvVUVxaiVA7KRowID8viYHeZlf3v/Oa3sEewaH830Q0t+nWsZQ==", + "optional": true, + "peer": true, + "peerDependencies": { + "react": "^16.8 || ^17 || ^18", + "react-dom": "^16.8 || ^17 || ^18" + } + }, + "node_modules/@redhat-cloud-services/frontend-components-translations/node_modules/@patternfly/react-styles": { + "version": "4.92.8", + "resolved": "https://registry.npmjs.org/@patternfly/react-styles/-/react-styles-4.92.8.tgz", + "integrity": "sha512-K4lUU8O4HiCX9NeuNUIrPgN3wlGERCxJVio+PAjd8hpJD/PKnjFfOJ9u6/Cii3qLy/5ZviWPRNHbGiwA/+YUhg==", + "optional": true, + "peer": true + }, + "node_modules/@redhat-cloud-services/frontend-components-translations/node_modules/@patternfly/react-table": { + "version": "4.113.4", + "resolved": "https://registry.npmjs.org/@patternfly/react-table/-/react-table-4.113.4.tgz", + "integrity": "sha512-WN00JBlJR8VVXpNH/IBmuTj70/Ww4vNQwB67mJ8yPzZ0refgAMqMGHCsp9yo5GImJhcBqQr4xlQNpHpeJIKphQ==", + "optional": true, + "peer": true, + "dependencies": { + "@patternfly/react-core": "^4.276.12", + "@patternfly/react-icons": "^4.93.7", + "@patternfly/react-styles": "^4.92.8", + "@patternfly/react-tokens": "^4.94.7", + "lodash": "^4.17.19", + "tslib": "^2.0.0" + }, + "peerDependencies": { + "react": "^16.8 || ^17 || ^18", + "react-dom": "^16.8 || ^17 || ^18" + } + }, + "node_modules/@redhat-cloud-services/frontend-components-translations/node_modules/@patternfly/react-tokens": { + "version": "4.94.7", + "resolved": "https://registry.npmjs.org/@patternfly/react-tokens/-/react-tokens-4.94.7.tgz", + "integrity": "sha512-h+ducOLDMSxcuec3+YY3x+stM5ZUSnrl/lC/eVmjypil2El08NuE2MNEPMQWdhrod6VRRZFMNqZw/m82iv6U1A==", + "optional": true, + "peer": true + }, + "node_modules/@redhat-cloud-services/frontend-components-translations/node_modules/@redhat-cloud-services/frontend-components-utilities": { "version": "3.7.6", "resolved": "https://registry.npmjs.org/@redhat-cloud-services/frontend-components-utilities/-/frontend-components-utilities-3.7.6.tgz", "integrity": "sha512-qXevUW8Clj1AoBLwfZAmS+oFJCWKZaMp8O33cyUhkoGjrwkQaL5eJg28zjLVa1uQhdJAvAdwTNtE+Gt3hJTC1g==", + "optional": true, "dependencies": { "@redhat-cloud-services/types": "^0.0.24", "@sentry/browser": "^5.30.0", @@ -2656,6 +2723,102 @@ "react-router-dom": "^5.0.0 || ^6.0.0" } }, + "node_modules/@redhat-cloud-services/frontend-components-translations/node_modules/attr-accept": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/attr-accept/-/attr-accept-1.1.3.tgz", + "integrity": "sha512-iT40nudw8zmCweivz6j58g+RT33I4KbaIvRUhjNmDwO2WmsQUxFEZZYZ5w3vXe5x5MX9D7mfvA/XaLOZYFR9EQ==", + "optional": true, + "peer": true, + "dependencies": { + "core-js": "^2.5.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@redhat-cloud-services/frontend-components-translations/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==", + "optional": true, + "dependencies": { + "follow-redirects": "^1.14.9", + "form-data": "^4.0.0" + } + }, + "node_modules/@redhat-cloud-services/frontend-components-translations/node_modules/file-selector": { + "version": "0.1.19", + "resolved": "https://registry.npmjs.org/file-selector/-/file-selector-0.1.19.tgz", + "integrity": "sha512-kCWw3+Aai8Uox+5tHCNgMFaUdgidxvMnLWO6fM5sZ0hA2wlHP5/DHGF0ECe84BiB95qdJbKNEJhWKVDvMN+JDQ==", + "optional": true, + "peer": true, + "dependencies": { + "tslib": "^2.0.1" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/@redhat-cloud-services/frontend-components-translations/node_modules/focus-trap": { + "version": "6.9.2", + "resolved": "https://registry.npmjs.org/focus-trap/-/focus-trap-6.9.2.tgz", + "integrity": "sha512-gBEuXOPNOKPrLdZpMFUSTyIo1eT2NSZRrwZ9r/0Jqw5tmT3Yvxfmu8KBHw8xW2XQkw6E/JoG+OlEq7UDtSUNgw==", + "optional": true, + "peer": true, + "dependencies": { + "tabbable": "^5.3.2" + } + }, + "node_modules/@redhat-cloud-services/frontend-components-translations/node_modules/react-dropzone": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/react-dropzone/-/react-dropzone-9.0.0.tgz", + "integrity": "sha512-wZ2o9B2qkdE3RumWhfyZT9swgJYJPeU5qHEcMU8weYpmLex1eeWX0CC32/Y0VutB+BBi2D+iePV/YZIiB4kZGw==", + "optional": true, + "peer": true, + "dependencies": { + "attr-accept": "^1.1.3", + "file-selector": "^0.1.8", + "prop-types": "^15.6.2", + "prop-types-extra": "^1.1.0" + }, + "engines": { + "node": ">= 6" + }, + "peerDependencies": { + "react": ">=0.14.0" + } + }, + "node_modules/@redhat-cloud-services/frontend-components-translations/node_modules/tabbable": { + "version": "5.3.3", + "resolved": "https://registry.npmjs.org/tabbable/-/tabbable-5.3.3.tgz", + "integrity": "sha512-QD9qKY3StfbZqWOPLp0++pOrAVb/HbUi5xCc8cUo4XjP19808oaMiDzn0leBY5mCespIBM0CIZePzZjgzR83kA==", + "optional": true, + "peer": true + }, + "node_modules/@redhat-cloud-services/frontend-components-utilities": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@redhat-cloud-services/frontend-components-utilities/-/frontend-components-utilities-4.0.0.tgz", + "integrity": "sha512-0QQ9BS287vF53QsoxMDRY7E3YZcTH3ZyB6lAgwy7rwc/NhXTqxgcSvHx/eUqw4DscKlUJ61HjLAZghIf+7NuXQ==", + "dependencies": { + "@redhat-cloud-services/types": "^0.0.24", + "@sentry/browser": "^5.30.0", + "awesome-debounce-promise": "^2.1.0", + "axios": "^0.27.2", + "commander": "^2.20.3", + "mkdirp": "^1.0.4", + "react-content-loader": "^6.2.0" + }, + "peerDependencies": { + "@patternfly/react-core": "^5.0.0", + "@patternfly/react-table": "^5.0.0", + "@redhat-cloud-services/rbac-client": "^1.0.100", + "cypress": ">=12.0.0 < 13.0.0", + "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/@redhat-cloud-services/frontend-components-utilities/node_modules/axios": { "version": "0.27.2", "resolved": "https://registry.npmjs.org/axios/-/axios-0.27.2.tgz", @@ -2682,6 +2845,64 @@ "form-data": "^4.0.0" } }, + "node_modules/@redhat-cloud-services/tsc-transform-imports": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@redhat-cloud-services/tsc-transform-imports/-/tsc-transform-imports-1.0.3.tgz", + "integrity": "sha512-tPWpa1BoW/O0wQtgD3R8kCvSxU8rEXL+U7xZ6z+DIhBpugOMaiFDDynRt8z1Tz1llhFpc0UgXTyAFRdbkJkMSA==", + "dev": true, + "dependencies": { + "glob": "10.3.3" + }, + "peerDependencies": { + "typescript": "^5.0.0" + } + }, + "node_modules/@redhat-cloud-services/tsc-transform-imports/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/@redhat-cloud-services/tsc-transform-imports/node_modules/glob": { + "version": "10.3.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.3.tgz", + "integrity": "sha512-92vPiMb/iqpmEgsOoIDvTjc50wf9CCCvMzsi6W0JLPeUKE8TWP1a73PgqSrqy7iAZxaSD1YdzU7QZR5LF51MJw==", + "dev": true, + "dependencies": { + "foreground-child": "^3.1.0", + "jackspeak": "^2.0.3", + "minimatch": "^9.0.1", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0", + "path-scurry": "^1.10.1" + }, + "bin": { + "glob": "dist/cjs/src/bin.js" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@redhat-cloud-services/tsc-transform-imports/node_modules/minimatch": { + "version": "9.0.3", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", + "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/@redhat-cloud-services/types": { "version": "0.0.24", "resolved": "https://registry.npmjs.org/@redhat-cloud-services/types/-/types-0.0.24.tgz", @@ -2823,61 +3044,258 @@ "tslib": "^1.9.3" }, "engines": { - "node": ">=6" + "node": ">=6" + } + }, + "node_modules/@sentry/minimal/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + }, + "node_modules/@sentry/types": { + "version": "5.30.0", + "resolved": "https://registry.npmjs.org/@sentry/types/-/types-5.30.0.tgz", + "integrity": "sha512-R8xOqlSTZ+htqrfteCWU5Nk0CDN5ApUTvrlvBuiH1DyP6czDZ4ktbZB0hAgBlVcK0U+qpD3ag3Tqqpa5Q67rPw==", + "engines": { + "node": ">=6" + } + }, + "node_modules/@sentry/utils": { + "version": "5.30.0", + "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-5.30.0.tgz", + "integrity": "sha512-zaYmoH0NWWtvnJjC9/CBseXMtKHm/tm40sz3YfJRxeQjyzRqNQPgivpd9R/oDJCYj999mzdW382p/qi2ypjLww==", + "dependencies": { + "@sentry/types": "5.30.0", + "tslib": "^1.9.3" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/@sentry/utils/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + }, + "node_modules/@sinclair/typebox": { + "version": "0.27.8", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", + "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==", + "dev": true + }, + "node_modules/@sinonjs/commons": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.0.tgz", + "integrity": "sha512-jXBtWAF4vmdNmZgD5FoKsVLv3rPgDnLgPbU84LIJ3otV44vJlDRokVng5v8NFJdCf/da9legHcKaRuZs4L7faA==", + "dev": true, + "dependencies": { + "type-detect": "4.0.8" + } + }, + "node_modules/@sinonjs/fake-timers": { + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz", + "integrity": "sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==", + "dev": true, + "dependencies": { + "@sinonjs/commons": "^3.0.0" + } + }, + "node_modules/@swc/core": { + "version": "1.3.80", + "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.3.80.tgz", + "integrity": "sha512-yX2xV5I/lYswHHR+44TPvzBgq3/Y8N1YWpTQADYuvSiX3Jxyvemk5Jpx3rRtigYb8WBkWAAf2i5d5ZJ2M7hhgw==", + "dev": true, + "hasInstallScript": true, + "dependencies": { + "@swc/types": "^0.1.3" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/swc" + }, + "optionalDependencies": { + "@swc/core-darwin-arm64": "1.3.80", + "@swc/core-darwin-x64": "1.3.80", + "@swc/core-linux-arm-gnueabihf": "1.3.80", + "@swc/core-linux-arm64-gnu": "1.3.80", + "@swc/core-linux-arm64-musl": "1.3.80", + "@swc/core-linux-x64-gnu": "1.3.80", + "@swc/core-linux-x64-musl": "1.3.80", + "@swc/core-win32-arm64-msvc": "1.3.80", + "@swc/core-win32-ia32-msvc": "1.3.80", + "@swc/core-win32-x64-msvc": "1.3.80" + }, + "peerDependencies": { + "@swc/helpers": "^0.5.0" + }, + "peerDependenciesMeta": { + "@swc/helpers": { + "optional": true + } + } + }, + "node_modules/@swc/core-darwin-arm64": { + "version": "1.3.80", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.3.80.tgz", + "integrity": "sha512-rhoFTcQMUGfO7IkfOnopPSF6O0/aVJ58B7KueIKbvrMe6YvSfFj9QfObELFjYCcrJZTvUWBhig0QrsfPIiUphA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-darwin-x64": { + "version": "1.3.80", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.3.80.tgz", + "integrity": "sha512-0dOLedFpVXe+ugkKHXsqSxMKqvQYfFtibWbrZ7j8wOaErzSGPr0VpyWvepNVb9s046725kPXSw+fsGhqZR8wrw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-linux-arm-gnueabihf": { + "version": "1.3.80", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.3.80.tgz", + "integrity": "sha512-QIjwP3PtDeHBDkwF6+ZZqdUsqAhORbMpxrw2jq3mHe4lQrxBttSFTq018vlMRo2mFEorOvXdadzaD9m+NymPrw==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-linux-arm64-gnu": { + "version": "1.3.80", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.3.80.tgz", + "integrity": "sha512-cg8WriIueab58ZwkzXmIACnjSzFLzOBwxlC9k65gPXMNgCjab2YbqEYvAbjBqneuqaao02gW6tad2uhjgYaExw==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-linux-arm64-musl": { + "version": "1.3.80", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.3.80.tgz", + "integrity": "sha512-AhdCQ7QKx5mWrtpaOA1mFRiWWvuiiUtspvo0QSpspDetRKTND1rlf/3UB5+gp0kCeCNUTsVmJWU7fIA9ICZtXA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-linux-x64-gnu": { + "version": "1.3.80", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.3.80.tgz", + "integrity": "sha512-+2e5oni1vOrLIjM5Q2/GIzK/uS2YEtuJqnjPvCK8SciRJsSl8OgVsRvyCDbmKeZNtJ2Q+o/O2AQ2w1qpAJG6jg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=10" } }, - "node_modules/@sentry/minimal/node_modules/tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" - }, - "node_modules/@sentry/types": { - "version": "5.30.0", - "resolved": "https://registry.npmjs.org/@sentry/types/-/types-5.30.0.tgz", - "integrity": "sha512-R8xOqlSTZ+htqrfteCWU5Nk0CDN5ApUTvrlvBuiH1DyP6czDZ4ktbZB0hAgBlVcK0U+qpD3ag3Tqqpa5Q67rPw==", + "node_modules/@swc/core-linux-x64-musl": { + "version": "1.3.80", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.3.80.tgz", + "integrity": "sha512-8OK9IlI1zpWOm7vIp1iXmZSEzLAwFpqhsGSEhxPavpOx2m54kLFdPcw/Uv3n461f6TCtszIxkGq1kSqBUdfUBA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=6" + "node": ">=10" } }, - "node_modules/@sentry/utils": { - "version": "5.30.0", - "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-5.30.0.tgz", - "integrity": "sha512-zaYmoH0NWWtvnJjC9/CBseXMtKHm/tm40sz3YfJRxeQjyzRqNQPgivpd9R/oDJCYj999mzdW382p/qi2ypjLww==", - "dependencies": { - "@sentry/types": "5.30.0", - "tslib": "^1.9.3" - }, + "node_modules/@swc/core-win32-arm64-msvc": { + "version": "1.3.80", + "resolved": "https://registry.npmjs.org/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.3.80.tgz", + "integrity": "sha512-RKhatwiAGlffnF6z2Mm3Ddid0v3KB+uf5m/Gc7N9zO/EUAV0PnHRuYuZSGyqodHmGFC+mK8YrCooFCEmHL9n+w==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], "engines": { - "node": ">=6" + "node": ">=10" } }, - "node_modules/@sentry/utils/node_modules/tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" - }, - "node_modules/@sinclair/typebox": { - "version": "0.27.8", - "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", - "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==", - "dev": true - }, - "node_modules/@sinonjs/commons": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.0.tgz", - "integrity": "sha512-jXBtWAF4vmdNmZgD5FoKsVLv3rPgDnLgPbU84LIJ3otV44vJlDRokVng5v8NFJdCf/da9legHcKaRuZs4L7faA==", + "node_modules/@swc/core-win32-ia32-msvc": { + "version": "1.3.80", + "resolved": "https://registry.npmjs.org/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.3.80.tgz", + "integrity": "sha512-3jiiZzU/kaw7k4zUp1yMq1QiUe4wJVtCEXIhf+fKuBsIwm7rdvyK/+PIx5KHnZy4TGQnYczKBRhJA5nuBcrUCQ==", + "cpu": [ + "ia32" + ], "dev": true, - "dependencies": { - "type-detect": "4.0.8" + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=10" } }, - "node_modules/@sinonjs/fake-timers": { - "version": "10.3.0", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz", - "integrity": "sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==", + "node_modules/@swc/core-win32-x64-msvc": { + "version": "1.3.80", + "resolved": "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.3.80.tgz", + "integrity": "sha512-2eZtIoIWQBWqykfms92Zd37lveYOBWQTZjdooBGlsLHtcoQLkNpf1NXmR6TKY0yy8q6Yl3OhPvY+izjmO08MSg==", + "cpu": [ + "x64" + ], "dev": true, - "dependencies": { - "@sinonjs/commons": "^3.0.0" + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=10" } }, "node_modules/@swc/helpers": { @@ -2888,6 +3306,12 @@ "tslib": "^2.4.0" } }, + "node_modules/@swc/types": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@swc/types/-/types-0.1.3.tgz", + "integrity": "sha512-3Oq9V7tRV5+hlKHPr/8RpByJ1HXB4mAbZxh/sKAjyvNRBxTASjBx4j+gN9iXMBTllhZCZgYUfOqvbCtU3tqOHQ==", + "dev": true + }, "node_modules/@testing-library/dom": { "version": "9.3.1", "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-9.3.1.tgz", @@ -4713,12 +5137,9 @@ } }, "node_modules/attr-accept": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/attr-accept/-/attr-accept-1.1.3.tgz", - "integrity": "sha512-iT40nudw8zmCweivz6j58g+RT33I4KbaIvRUhjNmDwO2WmsQUxFEZZYZ5w3vXe5x5MX9D7mfvA/XaLOZYFR9EQ==", - "dependencies": { - "core-js": "^2.5.0" - }, + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/attr-accept/-/attr-accept-2.2.2.tgz", + "integrity": "sha512-7prDjvt9HmqiZ0cl5CRjtS84sEyhsHP2coDkaZKRKVfCDo9s7iw7ChVmar78Gu9pC4SoR/28wFu/G5JJhTnqEg==", "engines": { "node": ">=4" } @@ -4905,43 +5326,6 @@ "node": ">=8" } }, - "node_modules/babel-loader": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-8.3.0.tgz", - "integrity": "sha512-H8SvsMF+m9t15HNLMipppzkC+Y2Yq+v3SonZyU70RBL/h1gxPkH08Ot8pEE9Z4Kd+czyWJClmFS8qzIP9OZ04Q==", - "dev": true, - "dependencies": { - "find-cache-dir": "^3.3.1", - "loader-utils": "^2.0.0", - "make-dir": "^3.1.0", - "schema-utils": "^2.6.5" - }, - "engines": { - "node": ">= 8.9" - }, - "peerDependencies": { - "@babel/core": "^7.0.0", - "webpack": ">=2" - } - }, - "node_modules/babel-loader/node_modules/schema-utils": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-2.7.1.tgz", - "integrity": "sha512-SHiNtMOUGWBQJwzISiVYKu82GiV4QYGePp3odlY1tuKO7gPtphAT5R/py0fA6xtbgLL/RvtJZnU9b8s0F1q0Xg==", - "dev": true, - "dependencies": { - "@types/json-schema": "^7.0.5", - "ajv": "^6.12.4", - "ajv-keywords": "^3.5.2" - }, - "engines": { - "node": ">= 8.9.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - } - }, "node_modules/babel-plugin-istanbul": { "version": "6.1.1", "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz", @@ -5938,12 +6322,6 @@ "node": ">=4.0.0" } }, - "node_modules/commondir": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", - "integrity": "sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==", - "dev": true - }, "node_modules/compressible": { "version": "2.0.18", "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.18.tgz", @@ -6291,7 +6669,9 @@ "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.12.tgz", "integrity": "sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==", "deprecated": "core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.", - "hasInstallScript": true + "hasInstallScript": true, + "optional": true, + "peer": true }, "node_modules/core-js-pure": { "version": "3.32.1", @@ -7586,26 +7966,16 @@ } }, "node_modules/enhanced-resolve": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-4.5.0.tgz", - "integrity": "sha512-Nv9m36S/vxpsI+Hc4/ZGRs0n9mXqSWGGq49zxb/cJfPAQMbUtttJAlNPS4AQzaBdw/pKskw5bMbekT/Y7W/Wlg==", + "version": "5.15.0", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.15.0.tgz", + "integrity": "sha512-LXYT42KJ7lpIKECr2mAXIaMldcNCh/7E0KBKOu4KSfkHmP+mZmSs+8V5gBAqisWBy0OO4W5Oyys0GO1Y8KtdKg==", "dev": true, "dependencies": { - "graceful-fs": "^4.1.2", - "memory-fs": "^0.5.0", - "tapable": "^1.0.0" + "graceful-fs": "^4.2.4", + "tapable": "^2.2.0" }, "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/enhanced-resolve/node_modules/tapable": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/tapable/-/tapable-1.1.3.tgz", - "integrity": "sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA==", - "dev": true, - "engines": { - "node": ">=6" + "node": ">=10.13.0" } }, "node_modules/enquirer": { @@ -7644,18 +8014,6 @@ "node": ">=4" } }, - "node_modules/errno": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.8.tgz", - "integrity": "sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A==", - "dev": true, - "dependencies": { - "prr": "~1.0.1" - }, - "bin": { - "errno": "cli.js" - } - }, "node_modules/error-ex": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", @@ -9768,14 +10126,14 @@ } }, "node_modules/file-selector": { - "version": "0.1.19", - "resolved": "https://registry.npmjs.org/file-selector/-/file-selector-0.1.19.tgz", - "integrity": "sha512-kCWw3+Aai8Uox+5tHCNgMFaUdgidxvMnLWO6fM5sZ0hA2wlHP5/DHGF0ECe84BiB95qdJbKNEJhWKVDvMN+JDQ==", + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/file-selector/-/file-selector-0.6.0.tgz", + "integrity": "sha512-QlZ5yJC0VxHxQQsQhXvBaC7VRJ2uaxTf+Tfpu4Z/OcVQJVpZO+DGU0rkoVW5ce2SccxugvpBJoMvUs59iILYdw==", "dependencies": { - "tslib": "^2.0.1" + "tslib": "^2.4.0" }, "engines": { - "node": ">= 10" + "node": ">= 12" } }, "node_modules/fill-range": { @@ -9823,23 +10181,6 @@ "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", "dev": true }, - "node_modules/find-cache-dir": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.2.tgz", - "integrity": "sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig==", - "dev": true, - "dependencies": { - "commondir": "^1.0.1", - "make-dir": "^3.0.2", - "pkg-dir": "^4.1.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/avajs/find-cache-dir?sponsor=1" - } - }, "node_modules/find-up": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", @@ -9892,11 +10233,11 @@ "dev": true }, "node_modules/focus-trap": { - "version": "6.9.2", - "resolved": "https://registry.npmjs.org/focus-trap/-/focus-trap-6.9.2.tgz", - "integrity": "sha512-gBEuXOPNOKPrLdZpMFUSTyIo1eT2NSZRrwZ9r/0Jqw5tmT3Yvxfmu8KBHw8xW2XQkw6E/JoG+OlEq7UDtSUNgw==", + "version": "7.4.3", + "resolved": "https://registry.npmjs.org/focus-trap/-/focus-trap-7.4.3.tgz", + "integrity": "sha512-BgSSbK4GPnS2VbtZ50VtOv1Sti6DIkj3+LkVjiWMNjLeAp1SH1UlLx3ULu/DCu4vq5R4/uvTm+zrvsMsuYmGLg==", "dependencies": { - "tabbable": "^5.3.2" + "tabbable": "^6.1.2" } }, "node_modules/follow-redirects": { @@ -14832,21 +15173,6 @@ "node": ">=12" } }, - "node_modules/make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", - "dev": true, - "dependencies": { - "semver": "^6.0.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/makeerror": { "version": "1.0.12", "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz", @@ -14904,55 +15230,6 @@ "node": ">= 4.0.0" } }, - "node_modules/memory-fs": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.5.0.tgz", - "integrity": "sha512-jA0rdU5KoQMC0e6ppoNRtpp6vjFq6+NY7r8hywnC7V+1Xj/MtHwGIbB1QaK/dunyjWteJzmkpd7ooeWg10T7GA==", - "dev": true, - "dependencies": { - "errno": "^0.1.3", - "readable-stream": "^2.0.1" - }, - "engines": { - "node": ">=4.3.0 <5.0.0 || >=5.10" - } - }, - "node_modules/memory-fs/node_modules/isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", - "dev": true - }, - "node_modules/memory-fs/node_modules/readable-stream": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", - "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", - "dev": true, - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "node_modules/memory-fs/node_modules/safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - }, - "node_modules/memory-fs/node_modules/string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "dependencies": { - "safe-buffer": "~5.1.0" - } - }, "node_modules/memorystream": { "version": "0.3.1", "resolved": "https://registry.npmjs.org/memorystream/-/memorystream-0.3.1.tgz", @@ -16218,6 +16495,8 @@ "resolved": "https://registry.npmjs.org/popper.js/-/popper.js-1.16.1.tgz", "integrity": "sha512-Wb4p1J4zyFTbM+u6WuO4XstYx4Ky9Cewe4DWrel7B0w6VVICvPwdOpotjzcf6eD8TsckVnIMNONQyPIUFOUbCQ==", "deprecated": "You can find the new Popper v2 at @popperjs/core, this package is dedicated to the legacy v1", + "optional": true, + "peer": true, "funding": { "type": "opencollective", "url": "https://opencollective.com/popperjs" @@ -16534,12 +16813,6 @@ "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" }, - "node_modules/prr": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", - "integrity": "sha512-yPw4Sng1gWghHQWj0B3ZggWUm4qVbPwPFcRG8KyxiU7J2OHFSoEHKS+EZ3fv5l1t9CyCiop6l/ZYeWbrgoQejw==", - "dev": true - }, "node_modules/psl": { "version": "1.9.0", "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", @@ -16715,20 +16988,19 @@ } }, "node_modules/react-dropzone": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/react-dropzone/-/react-dropzone-9.0.0.tgz", - "integrity": "sha512-wZ2o9B2qkdE3RumWhfyZT9swgJYJPeU5qHEcMU8weYpmLex1eeWX0CC32/Y0VutB+BBi2D+iePV/YZIiB4kZGw==", + "version": "14.2.3", + "resolved": "https://registry.npmjs.org/react-dropzone/-/react-dropzone-14.2.3.tgz", + "integrity": "sha512-O3om8I+PkFKbxCukfIR3QAGftYXDZfOE2N1mr/7qebQJHs7U+/RSL/9xomJNpRg9kM5h9soQSdf0Gc7OHF5Fug==", "dependencies": { - "attr-accept": "^1.1.3", - "file-selector": "^0.1.8", - "prop-types": "^15.6.2", - "prop-types-extra": "^1.1.0" + "attr-accept": "^2.2.2", + "file-selector": "^0.6.0", + "prop-types": "^15.8.1" }, "engines": { - "node": ">= 6" + "node": ">= 10.13" }, "peerDependencies": { - "react": ">=0.14.0" + "react": ">= 16.8 || 18.0.0" } }, "node_modules/react-fast-compare": { @@ -18348,6 +18620,16 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/swc-loader": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/swc-loader/-/swc-loader-0.2.3.tgz", + "integrity": "sha512-D1p6XXURfSPleZZA/Lipb3A8pZ17fP4NObZvFCDjK/OKljroqDpPmsBdTraWhVBqUNpcWBQY1imWdoPScRlQ7A==", + "dev": true, + "peerDependencies": { + "@swc/core": "^1.2.147", + "webpack": ">=2" + } + }, "node_modules/symbol-tree": { "version": "3.2.4", "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", @@ -18377,9 +18659,9 @@ } }, "node_modules/tabbable": { - "version": "5.3.3", - "resolved": "https://registry.npmjs.org/tabbable/-/tabbable-5.3.3.tgz", - "integrity": "sha512-QD9qKY3StfbZqWOPLp0++pOrAVb/HbUi5xCc8cUo4XjP19808oaMiDzn0leBY5mCespIBM0CIZePzZjgzR83kA==" + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/tabbable/-/tabbable-6.2.0.tgz", + "integrity": "sha512-Cat63mxsVJlzYvN51JmVXIgNoUokrIaT2zLclCXjRd8boZ0004U4KCs/sToJ75C6sdlByWxpYnb5Boif1VSFew==" }, "node_modules/tapable": { "version": "2.2.1", @@ -18545,6 +18827,8 @@ "version": "5.1.2", "resolved": "https://registry.npmjs.org/tippy.js/-/tippy.js-5.1.2.tgz", "integrity": "sha512-Qtrv2wqbRbaKMUb6bWWBQWPayvcDKNrGlvihxtsyowhT7RLGEh1STWuy6EMXC6QLkfKPB2MLnf8W2mzql9VDAw==", + "optional": true, + "peer": true, "dependencies": { "popper.js": "^1.16.0" } @@ -18694,23 +18978,22 @@ } }, "node_modules/ts-loader": { - "version": "8.4.0", - "resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-8.4.0.tgz", - "integrity": "sha512-6nFY3IZ2//mrPc+ImY3hNWx1vCHyEhl6V+wLmL4CZcm6g1CqX7UKrkc6y0i4FwcfOhxyMPCfaEvh20f4r9GNpw==", + "version": "9.4.4", + "resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-9.4.4.tgz", + "integrity": "sha512-MLukxDHBl8OJ5Dk3y69IsKVFRA/6MwzEqBgh+OXMPB/OD01KQuWPFd1WAQP8a5PeSCAxfnkhiuWqfmFJzJQt9w==", "dev": true, "dependencies": { "chalk": "^4.1.0", - "enhanced-resolve": "^4.0.0", - "loader-utils": "^2.0.0", + "enhanced-resolve": "^5.0.0", "micromatch": "^4.0.0", "semver": "^7.3.4" }, "engines": { - "node": ">=10.0.0" + "node": ">=12.0.0" }, "peerDependencies": { "typescript": "*", - "webpack": "*" + "webpack": "^5.0.0" } }, "node_modules/ts-loader/node_modules/ansi-styles": { @@ -19450,6 +19733,20 @@ "react": ">=16.6.0" } }, + "node_modules/victory-box-plot": { + "version": "36.6.11", + "resolved": "https://registry.npmjs.org/victory-box-plot/-/victory-box-plot-36.6.11.tgz", + "integrity": "sha512-+J7Hb0Vf6cQe+qZyRhm6sM7V7AMS43jSTXnrFtRP7Bn+HdAb7p2S7h8abtgUhg3uVeTQa9UUqJBmC/maP8V3Nw==", + "dependencies": { + "lodash": "^4.17.19", + "prop-types": "^15.8.1", + "victory-core": "^36.6.11", + "victory-vendor": "^36.6.11" + }, + "peerDependencies": { + "react": ">=16.6.0" + } + }, "node_modules/victory-brush-container": { "version": "36.6.11", "resolved": "https://registry.npmjs.org/victory-brush-container/-/victory-brush-container-36.6.11.tgz", @@ -20282,19 +20579,6 @@ "node": ">=10.13.0" } }, - "node_modules/webpack/node_modules/enhanced-resolve": { - "version": "5.15.0", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.15.0.tgz", - "integrity": "sha512-LXYT42KJ7lpIKECr2mAXIaMldcNCh/7E0KBKOu4KSfkHmP+mZmSs+8V5gBAqisWBy0OO4W5Oyys0GO1Y8KtdKg==", - "dev": true, - "dependencies": { - "graceful-fs": "^4.2.4", - "tapable": "^2.2.0" - }, - "engines": { - "node": ">=10.13.0" - } - }, "node_modules/websocket-driver": { "version": "0.7.4", "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.4.tgz", diff --git a/package.json b/package.json index 92784b2e5d..200ce4c947 100644 --- a/package.json +++ b/package.json @@ -19,13 +19,15 @@ "check:milestone": "npx npm-check-updates -t newest -f '/^(@patternfly|@redhat-cloud-services)/'", "check:milestone:update": "npx npm-check-updates -t newest -f '/^(@patternfly|@redhat-cloud-services)/' -u", "clean": "rimraf dist .cache", + "codemods": "npx @patternfly/pf-codemods@latest src", "deploy": "npm-run-all build lint test", "install:pkgs": "npm install", + "install:pkgs:force": "npm install --force", "lint": "npm-run-all lint:*", "lint:ts": "eslint src", "lint:ts:fix": "eslint src --fix", "patch:hosts": "fec patch-etc-hosts", - "postinstall": "rm -rf .cache", + "postinstall": "ts-patch install && rm -rf .cache", "start": "HMR=true fec dev", "start:csc": "CLOUD_SERVICES_CONFIG_PORT=8889 npm start", "start:ephemeral": "EPHEMERAL_PORT=8000 npm start", @@ -45,17 +47,16 @@ "verify": "npm-run-all build lint test" }, "dependencies": { - "@patternfly/patternfly": "4.224.2", - "@patternfly/react-charts": "6.94.19", - "@patternfly/react-core": "4.276.8", - "@patternfly/react-icons": "4.93.6", - "@patternfly/react-styles": "4.92.6", - "@patternfly/react-table": "4.113.0", - "@patternfly/react-tokens": "4.94.6", - "@redhat-cloud-services/frontend-components": "^3.11.5", - "@redhat-cloud-services/frontend-components-notifications": "^3.2.16", + "@patternfly/patternfly": "5.0.2", + "@patternfly/react-charts": "7.0.0", + "@patternfly/react-core": "5.0.0", + "@patternfly/react-icons": "5.0.0", + "@patternfly/react-table": "5.0.0", + "@patternfly/react-tokens": "5.0.0", + "@redhat-cloud-services/frontend-components": "^4.0.1", + "@redhat-cloud-services/frontend-components-notifications": "^4.0.0", "@redhat-cloud-services/frontend-components-translations": "^3.2.6", - "@redhat-cloud-services/frontend-components-utilities": "^3.7.6", + "@redhat-cloud-services/frontend-components-utilities": "^4.0.0", "@redhat-cloud-services/rbac-client": "^1.2.6", "@unleash/proxy-client-react": "^3.6.0", "axios": "^1.5.0", @@ -79,7 +80,8 @@ "devDependencies": { "@formatjs/cli": "^6.1.3", "@redhat-cloud-services/eslint-config-redhat-cloud-services": "^1.3.0", - "@redhat-cloud-services/frontend-components-config": "^5.1.1", + "@redhat-cloud-services/frontend-components-config": "^6.0.2", + "@redhat-cloud-services/tsc-transform-imports": "^1.0.3", "@testing-library/react": "^14.0.0", "@testing-library/user-event": "^14.4.3", "@types/jest": "^29.5.4", @@ -117,7 +119,6 @@ "webpack-bundle-analyzer": "^4.9.0" }, "overrides": { - "eslint": "^8.48.0", "react-intl": "^6.4.4" }, "insights": { diff --git a/src/appEntry.tsx b/src/appEntry.tsx index ecb1d2bf78..32a639b401 100644 --- a/src/appEntry.tsx +++ b/src/appEntry.tsx @@ -12,7 +12,7 @@ import App from './app'; import { configureStore } from './store'; // Todo: Uncomment for use with non-shared PatternFly packages -// require.resolve('@patternfly/patternfly/patternfly.css'); +require.resolve('@patternfly/patternfly/patternfly.css'); require.resolve('@patternfly/patternfly/patternfly-addons.css'); import './styles/global.css'; diff --git a/src/components/drawers/commonDrawer/commonDrawer.scss b/src/components/drawers/commonDrawer/commonDrawer.scss index 9c7ecdcbaf..465c7d210b 100644 --- a/src/components/drawers/commonDrawer/commonDrawer.scss +++ b/src/components/drawers/commonDrawer/commonDrawer.scss @@ -1,5 +1,5 @@ .drawerOverride { - .pf-c-drawer__content { + .pf-v5-c-drawer__content { background-color: unset; } } diff --git a/src/components/drawers/commonDrawer/commonDrawer.tsx b/src/components/drawers/commonDrawer/commonDrawer.tsx index 528819eca2..21922e66f2 100644 --- a/src/components/drawers/commonDrawer/commonDrawer.tsx +++ b/src/components/drawers/commonDrawer/commonDrawer.tsx @@ -57,7 +57,9 @@ class CommonDrawerBase extends React.Component { return ( - {children} + + {children} + ); diff --git a/src/components/drawers/exports/exportActions.tsx b/src/components/drawers/exports/exportActions.tsx index 308771e97d..03e80819bb 100644 --- a/src/components/drawers/exports/exportActions.tsx +++ b/src/components/drawers/exports/exportActions.tsx @@ -1,4 +1,4 @@ -import { Dropdown, DropdownItem, KebabToggle } from '@patternfly/react-core'; +import { Dropdown, DropdownItem, KebabToggle } from '@patternfly/react-core/deprecated'; import messages from 'locales/messages'; import React from 'react'; import type { WrappedComponentProps } from 'react-intl'; @@ -61,7 +61,7 @@ class ExportsActionsBase extends React.Component } + toggle={ this.handleOnToggle(isOpen)} />} isOpen={isDropdownOpen} isPlain position="right" diff --git a/src/components/drawers/exports/exportsContent.tsx b/src/components/drawers/exports/exportsContent.tsx index e6ea9c8257..9df5e1bec6 100644 --- a/src/components/drawers/exports/exportsContent.tsx +++ b/src/components/drawers/exports/exportsContent.tsx @@ -82,7 +82,7 @@ class ExportsContentBase extends React.Component { // @redhat-cloud-services/frontend-components-notifications does not expose PatternFly's actionLinks prop if (isActionLink) { return ( -
+
{intl.formatMessage(messages.exportsTitle)}
); diff --git a/src/components/drawers/exports/exportsTable.tsx b/src/components/drawers/exports/exportsTable.tsx index aabbba3608..1c879327b1 100644 --- a/src/components/drawers/exports/exportsTable.tsx +++ b/src/components/drawers/exports/exportsTable.tsx @@ -4,19 +4,20 @@ import { ButtonVariant, EmptyState, EmptyStateBody, + EmptyStateFooter, + EmptyStateHeader, EmptyStateIcon, Label, Popover, Spinner, - Title, - TitleSizes, } from '@patternfly/react-core'; import { DownloadIcon } from '@patternfly/react-icons/dist/esm/icons/download-icon'; import { ExclamationCircleIcon } from '@patternfly/react-icons/dist/esm/icons/exclamation-circle-icon'; import { OutlinedClockIcon } from '@patternfly/react-icons/dist/esm/icons/outlined-clock-icon'; import { PlusCircleIcon } from '@patternfly/react-icons/dist/esm/icons/plus-circle-icon'; import { SyncIcon } from '@patternfly/react-icons/dist/esm/icons/sync-icon'; -import { sortable, SortByDirection, Table, TableBody, TableHeader, TableVariant } from '@patternfly/react-table'; +import { sortable, SortByDirection, TableVariant } from '@patternfly/react-table'; +import { Table, TableBody, TableHeader } from '@patternfly/react-table/deprecated'; import type { Query } from 'api/queries/query'; import { getQuery } from 'api/queries/query'; import type { Report } from 'api/reports/report'; @@ -169,14 +170,17 @@ class ExportsTableBase extends React.Component - - - {intl.formatMessage(messages.noExportsStateTitle)} - + {intl.formatMessage(messages.noExportsStateTitle)}} + icon={} + headingLevel="h5" + /> {intl.formatMessage(messages.exportsEmptyState)} - + + + ); }; diff --git a/src/components/drawers/optimzations/optimizations.scss b/src/components/drawers/optimzations/optimizations.scss index fea98da1d8..91ae5bbaf6 100644 --- a/src/components/drawers/optimzations/optimizations.scss +++ b/src/components/drawers/optimzations/optimizations.scss @@ -4,13 +4,13 @@ div { display: block; margin-right: 0; - margin-bottom: var(--pf-global--spacer--xs); + margin-bottom: var(--pf-v5-global--spacer--xs); &.iconOverride { &.decrease { - // color: var(--pf-global--success-color--100); + // color: var(--pf-v5-global--success-color--100); } &.increase { - // color: var(--pf-global--danger-color--100); + // color: var(--pf-v5-global--danger-color--100); } .fa-equals { margin-left: 25px; @@ -27,10 +27,10 @@ top: -3px; } .fa-sort-up::before { - // color: var(--pf-global--danger-color--100); + // color: var(--pf-v5-global--danger-color--100); } .fa-sort-down::before { - // color: var(--pf-global--success-color--100); + // color: var(--pf-v5-global--success-color--100); } span { margin-right: -17px !important; diff --git a/src/components/drawers/optimzations/optimizationsContent.tsx b/src/components/drawers/optimzations/optimizationsContent.tsx index 30cc66403a..5d708a3598 100644 --- a/src/components/drawers/optimzations/optimizationsContent.tsx +++ b/src/components/drawers/optimzations/optimizationsContent.tsx @@ -13,7 +13,7 @@ import { TextListVariants, } from '@patternfly/react-core'; import { ExclamationTriangleIcon } from '@patternfly/react-icons/dist/esm/icons/exclamation-triangle-icon'; -import { TableComposable, TableVariant, Tbody, Td, Th, Thead, Tr } from '@patternfly/react-table'; +import { Table /* data-codemods */, TableVariant, Tbody, Td, Th, Thead, Tr } from '@patternfly/react-table'; import type { RecommendationItem, RecommendationReportData } from 'api/ros/recommendations'; import { RosPathsType, RosType } from 'api/ros/ros'; import type { AxiosError } from 'axios'; @@ -265,10 +265,9 @@ class OptimizationsContentBase extends React.Component @@ -313,7 +312,7 @@ class OptimizationsContentBase extends React.Component{this.getChangeValue(memVariation, memVariationUnits)} - + ); }; @@ -377,10 +376,9 @@ class OptimizationsContentBase extends React.Component @@ -425,7 +423,7 @@ class OptimizationsContentBase extends React.Component{this.getChangeValue(memVariation, memVariationUnits)} - + ); }; diff --git a/src/components/drawers/optimzations/optimizationsLink.tsx b/src/components/drawers/optimzations/optimizationsLink.tsx index f9dac93876..b2f98d5e72 100644 --- a/src/components/drawers/optimzations/optimizationsLink.tsx +++ b/src/components/drawers/optimzations/optimizationsLink.tsx @@ -111,11 +111,7 @@ class OptimizationsLinkBase extends React.Component ); if (isDisabled) { - return ( - - {buttonComponent} - - ); + return {buttonComponent}; } return buttonComponent; } diff --git a/src/components/inactiveSources/inactiveSources.scss b/src/components/inactiveSources/inactiveSources.scss index 242012ffad..b46cf0a92e 100644 --- a/src/components/inactiveSources/inactiveSources.scss +++ b/src/components/inactiveSources/inactiveSources.scss @@ -1,8 +1,8 @@ @import url("~@patternfly/patternfly/base/patternfly-variables.css"); .alert { - background-color: var(--pf-global--BackgroundColor--light-100); - padding-left: var(--pf-global--spacer--lg); - padding-right: var(--pf-global--spacer--lg); - padding-top: var(--pf-global--spacer--lg); + background-color: var(--pf-v5-global--BackgroundColor--light-100); + padding-left: var(--pf-v5-global--spacer--lg); + padding-right: var(--pf-v5-global--spacer--lg); + padding-top: var(--pf-v5-global--spacer--lg); } diff --git a/src/routes/components/charts/chartTheme/theme-utils.ts b/src/routes/components/charts/chartTheme/theme-utils.ts index a496be99f2..e8df95739f 100644 --- a/src/routes/components/charts/chartTheme/theme-utils.ts +++ b/src/routes/components/charts/chartTheme/theme-utils.ts @@ -3,6 +3,6 @@ import { ChartThemeColor, getCustomTheme } from '@patternfly/react-charts'; import { default as ChartTheme } from './theme-koku'; // Applies theme color and variant to base theme -const getTheme = () => getCustomTheme(ChartThemeColor.default, null, ChartTheme); +const getTheme = () => getCustomTheme(ChartThemeColor.default, ChartTheme); export default getTheme; diff --git a/src/routes/components/charts/historicalCostChart/__snapshots__/historicalCostChart.test.tsx.snap b/src/routes/components/charts/historicalCostChart/__snapshots__/historicalCostChart.test.tsx.snap index 6401aa7c68..4bc66bb906 100644 --- a/src/routes/components/charts/historicalCostChart/__snapshots__/historicalCostChart.test.tsx.snap +++ b/src/routes/components/charts/historicalCostChart/__snapshots__/historicalCostChart.test.tsx.snap @@ -6,9 +6,9 @@ exports[`null previous and current reports are handled 1`] = ` class="chartOverride" >

@@ -22,7 +22,7 @@ exports[`null previous and current reports are handled 1`] = ` style="height: 100px; width: 0px;" >
@@ -139,7 +139,7 @@ exports[`null previous and current reports are handled 1`] = ` @@ -160,7 +160,7 @@ exports[`null previous and current reports are handled 1`] = ` @@ -181,7 +181,7 @@ exports[`null previous and current reports are handled 1`] = ` @@ -196,7 +196,7 @@ exports[`null previous and current reports are handled 1`] = ` @@ -234,7 +234,7 @@ exports[`null previous and current reports are handled 1`] = ` @@ -255,7 +255,7 @@ exports[`null previous and current reports are handled 1`] = ` @@ -276,7 +276,7 @@ exports[`null previous and current reports are handled 1`] = ` @@ -297,7 +297,7 @@ exports[`null previous and current reports are handled 1`] = ` @@ -318,7 +318,7 @@ exports[`null previous and current reports are handled 1`] = ` @@ -368,7 +368,7 @@ exports[`null previous and current reports are handled 1`] = ` @@ -385,7 +385,7 @@ exports[`null previous and current reports are handled 1`] = ` @@ -417,9 +417,9 @@ exports[`reports are formatted to datums 1`] = ` class="chartOverride" >

@@ -433,7 +433,7 @@ exports[`reports are formatted to datums 1`] = ` style="height: 100px; width: 0px;" >
@@ -550,7 +550,7 @@ exports[`reports are formatted to datums 1`] = ` @@ -571,7 +571,7 @@ exports[`reports are formatted to datums 1`] = ` @@ -592,7 +592,7 @@ exports[`reports are formatted to datums 1`] = ` @@ -607,7 +607,7 @@ exports[`reports are formatted to datums 1`] = ` @@ -645,7 +645,7 @@ exports[`reports are formatted to datums 1`] = ` @@ -666,7 +666,7 @@ exports[`reports are formatted to datums 1`] = ` @@ -687,7 +687,7 @@ exports[`reports are formatted to datums 1`] = ` @@ -737,7 +737,7 @@ exports[`reports are formatted to datums 1`] = ` @@ -754,7 +754,7 @@ exports[`reports are formatted to datums 1`] = ` diff --git a/src/routes/components/charts/historicalTrendChart/__snapshots__/historicalTrendChart.test.tsx.snap b/src/routes/components/charts/historicalTrendChart/__snapshots__/historicalTrendChart.test.tsx.snap index 97fffa9ec6..91c0fbe30f 100644 --- a/src/routes/components/charts/historicalTrendChart/__snapshots__/historicalTrendChart.test.tsx.snap +++ b/src/routes/components/charts/historicalTrendChart/__snapshots__/historicalTrendChart.test.tsx.snap @@ -5,9 +5,9 @@ exports[`null previous and current reports are handled 1`] = ` class="chartOverride" >

@@ -21,7 +21,7 @@ exports[`null previous and current reports are handled 1`] = ` style="height: 100px; width: 0px;" >
@@ -142,7 +142,7 @@ exports[`null previous and current reports are handled 1`] = ` @@ -163,7 +163,7 @@ exports[`null previous and current reports are handled 1`] = ` @@ -178,7 +178,7 @@ exports[`null previous and current reports are handled 1`] = ` @@ -219,7 +219,7 @@ exports[`null previous and current reports are handled 1`] = ` @@ -240,7 +240,7 @@ exports[`null previous and current reports are handled 1`] = ` @@ -261,7 +261,7 @@ exports[`null previous and current reports are handled 1`] = ` @@ -282,7 +282,7 @@ exports[`null previous and current reports are handled 1`] = ` @@ -332,7 +332,7 @@ exports[`null previous and current reports are handled 1`] = ` @@ -349,7 +349,7 @@ exports[`null previous and current reports are handled 1`] = ` @@ -379,9 +379,9 @@ exports[`reports are formatted to datums 1`] = ` class="chartOverride" >

@@ -395,7 +395,7 @@ exports[`reports are formatted to datums 1`] = ` style="height: 100px; width: 0px;" >
@@ -516,7 +516,7 @@ exports[`reports are formatted to datums 1`] = ` @@ -537,7 +537,7 @@ exports[`reports are formatted to datums 1`] = ` @@ -552,7 +552,7 @@ exports[`reports are formatted to datums 1`] = ` @@ -593,7 +593,7 @@ exports[`reports are formatted to datums 1`] = ` @@ -614,7 +614,7 @@ exports[`reports are formatted to datums 1`] = ` @@ -635,7 +635,7 @@ exports[`reports are formatted to datums 1`] = ` @@ -685,7 +685,7 @@ exports[`reports are formatted to datums 1`] = ` @@ -702,7 +702,7 @@ exports[`reports are formatted to datums 1`] = ` diff --git a/src/routes/components/charts/historicalUsageChart/__snapshots__/historicalUsageChart.test.tsx.snap b/src/routes/components/charts/historicalUsageChart/__snapshots__/historicalUsageChart.test.tsx.snap index 15de8cfb3f..6f07f85bae 100644 --- a/src/routes/components/charts/historicalUsageChart/__snapshots__/historicalUsageChart.test.tsx.snap +++ b/src/routes/components/charts/historicalUsageChart/__snapshots__/historicalUsageChart.test.tsx.snap @@ -5,9 +5,9 @@ exports[`reports are formatted to datums 1`] = ` class="chartOverride" >

@@ -21,7 +21,7 @@ exports[`reports are formatted to datums 1`] = ` style="height: 100px; width: 0px;" >
@@ -266,7 +266,7 @@ exports[`reports are formatted to datums 1`] = ` @@ -287,7 +287,7 @@ exports[`reports are formatted to datums 1`] = ` @@ -302,7 +302,7 @@ exports[`reports are formatted to datums 1`] = ` @@ -343,7 +343,7 @@ exports[`reports are formatted to datums 1`] = ` @@ -364,7 +364,7 @@ exports[`reports are formatted to datums 1`] = ` @@ -385,7 +385,7 @@ exports[`reports are formatted to datums 1`] = ` @@ -495,7 +495,7 @@ exports[`reports are formatted to datums 1`] = ` @@ -512,7 +512,7 @@ exports[`reports are formatted to datums 1`] = ` @@ -529,7 +529,7 @@ exports[`reports are formatted to datums 1`] = ` @@ -546,7 +546,7 @@ exports[`reports are formatted to datums 1`] = ` @@ -563,7 +563,7 @@ exports[`reports are formatted to datums 1`] = ` @@ -580,7 +580,7 @@ exports[`reports are formatted to datums 1`] = ` diff --git a/src/routes/components/charts/trendChart/__snapshots__/trendChart.test.tsx.snap b/src/routes/components/charts/trendChart/__snapshots__/trendChart.test.tsx.snap index caccd3d0be..7a5992bc87 100644 --- a/src/routes/components/charts/trendChart/__snapshots__/trendChart.test.tsx.snap +++ b/src/routes/components/charts/trendChart/__snapshots__/trendChart.test.tsx.snap @@ -3,9 +3,9 @@ exports[`reports are formatted to datums 1`] = `

Example Trend Title @@ -19,7 +19,7 @@ exports[`reports are formatted to datums 1`] = ` style="height: 100px; width: 0px;" >
@@ -146,7 +146,7 @@ exports[`reports are formatted to datums 1`] = ` @@ -167,7 +167,7 @@ exports[`reports are formatted to datums 1`] = ` @@ -182,7 +182,7 @@ exports[`reports are formatted to datums 1`] = ` @@ -223,7 +223,7 @@ exports[`reports are formatted to datums 1`] = ` @@ -244,7 +244,7 @@ exports[`reports are formatted to datums 1`] = ` @@ -265,7 +265,7 @@ exports[`reports are formatted to datums 1`] = ` @@ -315,7 +315,7 @@ exports[`reports are formatted to datums 1`] = ` @@ -332,7 +332,7 @@ exports[`reports are formatted to datums 1`] = ` diff --git a/src/routes/components/charts/usageChart/__snapshots__/usageChart.test.tsx.snap b/src/routes/components/charts/usageChart/__snapshots__/usageChart.test.tsx.snap index 93a9910b45..bae2eb6d2c 100644 --- a/src/routes/components/charts/usageChart/__snapshots__/usageChart.test.tsx.snap +++ b/src/routes/components/charts/usageChart/__snapshots__/usageChart.test.tsx.snap @@ -6,7 +6,7 @@ exports[`reports are formatted to datums 1`] = ` style="height: 100px; width: 0px;" >
@@ -193,7 +193,7 @@ exports[`reports are formatted to datums 1`] = ` @@ -214,7 +214,7 @@ exports[`reports are formatted to datums 1`] = ` @@ -229,7 +229,7 @@ exports[`reports are formatted to datums 1`] = ` @@ -270,7 +270,7 @@ exports[`reports are formatted to datums 1`] = ` @@ -291,7 +291,7 @@ exports[`reports are formatted to datums 1`] = ` @@ -312,7 +312,7 @@ exports[`reports are formatted to datums 1`] = ` @@ -402,7 +402,7 @@ exports[`reports are formatted to datums 1`] = ` @@ -419,7 +419,7 @@ exports[`reports are formatted to datums 1`] = ` @@ -436,7 +436,7 @@ exports[`reports are formatted to datums 1`] = ` @@ -453,7 +453,7 @@ exports[`reports are formatted to datums 1`] = ` diff --git a/src/routes/components/costDistribution/costDistribution.scss b/src/routes/components/costDistribution/costDistribution.scss index 8c47570820..9a3ce90478 100644 --- a/src/routes/components/costDistribution/costDistribution.scss +++ b/src/routes/components/costDistribution/costDistribution.scss @@ -2,8 +2,8 @@ // Workaround for https://github.com/patternfly/patternfly-react/issues/6371 .selectOverride { - &.pf-c-select { - .pf-c-select__menu-item-description { + &.pf-v5-c-select { + .pf-v5-c-select__menu-item-description { width: max-content; } } diff --git a/src/routes/components/costDistribution/costDistribution.tsx b/src/routes/components/costDistribution/costDistribution.tsx index 8a8dcbd432..8c9aca6851 100644 --- a/src/routes/components/costDistribution/costDistribution.tsx +++ b/src/routes/components/costDistribution/costDistribution.tsx @@ -1,8 +1,9 @@ import './costDistribution.scss'; import type { MessageDescriptor } from '@formatjs/intl/src/types'; -import type { SelectOptionObject } from '@patternfly/react-core'; -import { Select, SelectOption, SelectVariant, Title, TitleSizes } from '@patternfly/react-core'; +import { Title, TitleSizes } from '@patternfly/react-core'; +import type { SelectOptionObject } from '@patternfly/react-core/deprecated'; +import { Select, SelectOption, SelectVariant } from '@patternfly/react-core/deprecated'; import messages from 'locales/messages'; import React from 'react'; import type { WrappedComponentProps } from 'react-intl'; @@ -70,8 +71,8 @@ class CostDistributionBase extends React.Component this.handleSelect(value)} + onToggle={(_evt, isExpanded) => this.handleToggle(isExpanded)} selections={selection} variant={SelectVariant.single} > @@ -96,7 +97,7 @@ class CostDistributionBase extends React.Component { + private handleSelect = (selection: CostDistributionOption) => { const { onSelect } = this.props; setCostDistribution(selection.value); // Set cost distribution in local storage diff --git a/src/routes/components/costType/costType.scss b/src/routes/components/costType/costType.scss index 8c47570820..9a3ce90478 100644 --- a/src/routes/components/costType/costType.scss +++ b/src/routes/components/costType/costType.scss @@ -2,8 +2,8 @@ // Workaround for https://github.com/patternfly/patternfly-react/issues/6371 .selectOverride { - &.pf-c-select { - .pf-c-select__menu-item-description { + &.pf-v5-c-select { + .pf-v5-c-select__menu-item-description { width: max-content; } } diff --git a/src/routes/components/costType/costType.tsx b/src/routes/components/costType/costType.tsx index 73341ef046..4a65e6c69d 100644 --- a/src/routes/components/costType/costType.tsx +++ b/src/routes/components/costType/costType.tsx @@ -1,8 +1,9 @@ import './costType.scss'; import type { MessageDescriptor } from '@formatjs/intl/src/types'; -import type { SelectOptionObject } from '@patternfly/react-core'; -import { Select, SelectOption, SelectVariant, Title, TitleSizes } from '@patternfly/react-core'; +import { Title, TitleSizes } from '@patternfly/react-core'; +import type { SelectOptionObject } from '@patternfly/react-core/deprecated'; +import { Select, SelectOption, SelectVariant } from '@patternfly/react-core/deprecated'; import messages from 'locales/messages'; import React from 'react'; import type { WrappedComponentProps } from 'react-intl'; @@ -77,8 +78,8 @@ class CostTypeBase extends React.Component { id="costTypeSelect" isDisabled={isDisabled} isOpen={isSelectOpen} - onSelect={this.handleOnSelect} - onToggle={this.handleOnToggle} + onSelect={(_evt, value) => this.handleOnSelect(value)} + onToggle={(_evt, isExpanded) => this.handleOnToggle(isExpanded)} selections={selection} variant={SelectVariant.single} > @@ -104,7 +105,7 @@ class CostTypeBase extends React.Component { return options; }; - private handleOnSelect = (event, selection: CostTypeOption) => { + private handleOnSelect = (selection: CostTypeOption) => { const { isLocalStorage = true, onSelect } = this.props; // Set cost type in local storage diff --git a/src/routes/components/currency/currency.scss b/src/routes/components/currency/currency.scss index 374ceb421f..eafea7f5d4 100644 --- a/src/routes/components/currency/currency.scss +++ b/src/routes/components/currency/currency.scss @@ -2,7 +2,7 @@ // Workaround for missing "position" property .currencyOverride { - .pf-c-select__menu { + .pf-v5-c-select__menu { right: 0; } } diff --git a/src/routes/components/currency/currency.tsx b/src/routes/components/currency/currency.tsx index 51a364d989..7788c562f4 100644 --- a/src/routes/components/currency/currency.tsx +++ b/src/routes/components/currency/currency.tsx @@ -1,8 +1,9 @@ import './currency.scss'; import type { MessageDescriptor } from '@formatjs/intl/src/types'; -import type { SelectOptionObject } from '@patternfly/react-core'; -import { Select, SelectOption, SelectVariant, Title, TitleSizes } from '@patternfly/react-core'; +import { Title, TitleSizes } from '@patternfly/react-core'; +import type { SelectOptionObject } from '@patternfly/react-core/deprecated'; +import { Select, SelectOption, SelectVariant } from '@patternfly/react-core/deprecated'; import messages from 'locales/messages'; import React from 'react'; import type { WrappedComponentProps } from 'react-intl'; @@ -80,8 +81,8 @@ class CurrencyBase extends React.Component { id="currencySelect" isDisabled={isDisabled} isOpen={isSelectOpen} - onSelect={this.handleOnSelect} - onToggle={this.handleOnToggle} + onSelect={(_evt, value) => this.handleOnSelect(value)} + onToggle={(_evt, isExpanded) => this.handleOnToggle(isExpanded)} selections={selection} variant={SelectVariant.single} > @@ -106,7 +107,7 @@ class CurrencyBase extends React.Component { return options; }; - private handleOnSelect = (event, selection: CurrencyOption) => { + private handleOnSelect = (selection: CurrencyOption) => { const { isLocalStorage = true, onSelect } = this.props; // Set currency units via local storage diff --git a/src/routes/components/dataTable/dataTable.scss b/src/routes/components/dataTable/dataTable.scss index ef5b85fd80..d97c63d360 100644 --- a/src/routes/components/dataTable/dataTable.scss +++ b/src/routes/components/dataTable/dataTable.scss @@ -4,13 +4,13 @@ div { display: block; margin-right: 0; - margin-bottom: var(--pf-global--spacer--xs); + margin-bottom: var(--pf-v5-global--spacer--xs); &.iconOverride { &.decrease { - color: var(--pf-global--success-color--100); + color: var(--pf-v5-global--success-color--100); } &.increase { - color: var(--pf-global--danger-color--100); + color: var(--pf-v5-global--danger-color--100); } .fa-sort-up { margin-left: 10px; @@ -19,10 +19,10 @@ margin-left: 10px; } .fa-sort-up::before { - color: var(--pf-global--danger-color--100); + color: var(--pf-v5-global--danger-color--100); } .fa-sort-down::before { - color: var(--pf-global--success-color--100); + color: var(--pf-v5-global--success-color--100); } span { margin-right: -17px !important; @@ -32,7 +32,7 @@ } .tableOverride { - &.pf-c-table tbody .pf-c-table__check input { + &.pf-v5-c-table tbody .pf-v5-c-table__check input { margin-top: .40rem; } } diff --git a/src/routes/components/dataTable/dataTable.tsx b/src/routes/components/dataTable/dataTable.tsx index 47d3226619..a84580a7f5 100644 --- a/src/routes/components/dataTable/dataTable.tsx +++ b/src/routes/components/dataTable/dataTable.tsx @@ -1,9 +1,25 @@ import './dataTable.scss'; -import { Bullseye, EmptyState, EmptyStateBody, EmptyStateIcon, Spinner } from '@patternfly/react-core'; +import { + Bullseye, + EmptyState, + EmptyStateBody, + EmptyStateHeader, + EmptyStateIcon, + Spinner, +} from '@patternfly/react-core'; import { CalculatorIcon } from '@patternfly/react-icons/dist/esm/icons/calculator-icon'; import type { ThProps } from '@patternfly/react-table'; -import { SortByDirection, TableComposable, TableVariant, Tbody, Td, Th, Thead, Tr } from '@patternfly/react-table'; +import { + SortByDirection, + Table /* data-codemods */, + TableVariant, + Tbody, + Td, + Th, + Thead, + Tr, +} from '@patternfly/react-table'; import messages from 'locales/messages'; import React from 'react'; import type { WrappedComponentProps } from 'react-intl'; @@ -48,7 +64,7 @@ class DataTable extends React.Component { } return ( - + } /> {intl.formatMessage(messages.detailsEmptyState)} ); @@ -70,12 +86,12 @@ class DataTable extends React.Component { private getSortParams = (index: number): ThProps['sort'] => { return { sortBy: this.getSortBy(index), - onSort: this.handleOnSort, + onSort: (_evt, i, direction) => this.handleOnSort(i, direction), columnIndex: index, }; }; - private handleOnSelect = (event, isSelected, rowId) => { + private handleOnSelect = (isSelected, rowId) => { const { onSelected, rows } = this.props; let newRows; @@ -97,7 +113,7 @@ class DataTable extends React.Component { }); }; - private handleOnSort = (event, index, direction) => { + private handleOnSort = (index, direction) => { const { columns, onSort } = this.props; if (onSort) { @@ -112,7 +128,7 @@ class DataTable extends React.Component { return ( <> - { key={`cell-${cellIndex}-${rowIndex}`} modifier="nowrap" select={{ - disable: row.selectionDisabled, // Disable select for "no-project" + isDisabled: row.selectionDisabled, // Disable select for "no-project" isSelected: row.selected, - onSelect: (_event, isSelected) => this.handleOnSelect(_event, isSelected, rowIndex), + onSelect: (_evt, isSelected) => this.handleOnSelect(isSelected, rowIndex), rowIndex, }} style={item.style} @@ -176,7 +192,7 @@ class DataTable extends React.Component { )) )} - + {rows.length === 0 &&
{this.getEmptyState()}
} ); diff --git a/src/routes/components/dataTable/selectableTable.tsx b/src/routes/components/dataTable/selectableTable.tsx index 83bb60d615..c755ca12a2 100644 --- a/src/routes/components/dataTable/selectableTable.tsx +++ b/src/routes/components/dataTable/selectableTable.tsx @@ -1,7 +1,23 @@ -import { Bullseye, EmptyState, EmptyStateBody, EmptyStateIcon, Spinner } from '@patternfly/react-core'; +import { + Bullseye, + EmptyState, + EmptyStateBody, + EmptyStateHeader, + EmptyStateIcon, + Spinner, +} from '@patternfly/react-core'; import { CalculatorIcon } from '@patternfly/react-icons/dist/esm/icons/calculator-icon'; import type { ThProps } from '@patternfly/react-table'; -import { SortByDirection, TableComposable, TableVariant, Tbody, Td, Th, Thead, Tr } from '@patternfly/react-table'; +import { + SortByDirection, + Table /* data-codemods */, + TableVariant, + Tbody, + Td, + Th, + Thead, + Tr, +} from '@patternfly/react-table'; import messages from 'locales/messages'; import type { ReactNode } from 'react'; import React from 'react'; @@ -18,7 +34,7 @@ interface SelectableTableOwnProps { filterBy: any; isLoading?: boolean; onSort(value: string, isSortAscending: boolean); - onRowClick(event: React.KeyboardEvent | React.MouseEvent, rowIndex: number); + onRowClick(rowIndex: number); orderBy: any; rows?: any[]; } @@ -47,7 +63,7 @@ class SelectableTable extends React.Component { } return ( - + } /> {intl.formatMessage(messages.detailsEmptyState)} ); @@ -74,7 +90,7 @@ class SelectableTable extends React.Component { }; }; - private handleOnSort = (event, index, direction) => { + private handleOnSort = (index, direction) => { const { columns, onSort } = this.props; if (onSort) { @@ -84,7 +100,7 @@ class SelectableTable extends React.Component { } }; - private handleOnRowClick = (event, rowIndex) => { + private handleOnRowClick = (rowIndex: number) => { const { onRowClick, rows } = this.props; rows.map(row => (row.selected = false)); @@ -92,7 +108,7 @@ class SelectableTable extends React.Component { this.setState({ rows }, () => { if (onRowClick) { - onRowClick(event, rowIndex); + onRowClick(rowIndex); } }); }; @@ -102,10 +118,9 @@ class SelectableTable extends React.Component { return ( <> - @@ -138,9 +153,9 @@ class SelectableTable extends React.Component { this.handleOnRowClick(_event, rowIndex)} + onRowClick={() => this.handleOnRowClick(rowIndex)} key={`row-${rowIndex}`} > {row.cells.map((item, cellIndex) => @@ -169,7 +184,7 @@ class SelectableTable extends React.Component { )) )} - + {rows.length === 0 &&
{this.getEmptyState()}
} ); diff --git a/src/routes/components/dataToolbar/basicToolbar.tsx b/src/routes/components/dataToolbar/basicToolbar.tsx index c3c45cc7f6..cb8b3bbf96 100644 --- a/src/routes/components/dataToolbar/basicToolbar.tsx +++ b/src/routes/components/dataToolbar/basicToolbar.tsx @@ -194,7 +194,7 @@ export class BasicToolbarBase extends React.Component { + private handleOnCategorySelect = (selection: CategoryOption) => { this.setState({ categoryInput: '', currentCategory: selection.value, @@ -359,7 +359,7 @@ export class BasicToolbarBase extends React.Component )} {actions && {actions}} - + {pagination} diff --git a/src/routes/components/dataToolbar/costCategoryValue.tsx b/src/routes/components/dataToolbar/costCategoryValue.tsx index 9b55647024..5b212bca6a 100644 --- a/src/routes/components/dataToolbar/costCategoryValue.tsx +++ b/src/routes/components/dataToolbar/costCategoryValue.tsx @@ -1,13 +1,7 @@ -import type { SelectOptionObject, ToolbarChipGroup } from '@patternfly/react-core'; -import { - Button, - ButtonVariant, - InputGroup, - Select, - SelectOption, - SelectVariant, - TextInput, -} from '@patternfly/react-core'; +import type { ToolbarChipGroup } from '@patternfly/react-core'; +import { Button, ButtonVariant, InputGroup, InputGroupItem, TextInput } from '@patternfly/react-core'; +import type { SelectOptionObject } from '@patternfly/react-core/deprecated'; +import { Select, SelectOption, SelectVariant } from '@patternfly/react-core/deprecated'; import { SearchIcon } from '@patternfly/react-icons/dist/esm/icons/search-icon'; import type { Query } from 'api/queries/query'; import { getQuery, parseQuery } from 'api/queries/query'; @@ -141,8 +135,8 @@ class CostCategoryValueBase extends React.Component this.onCostCategoryValueToggle(isExpanded)} selections={selections} isOpen={isCostCategoryValueExpanded} placeholderText={intl.formatMessage(messages.chooseValuePlaceholder)} @@ -153,25 +147,29 @@ class CostCategoryValueBase extends React.Component - onCostCategoryValueInput(evt)} - /> - + + this.onCostCategoryValueChange(value)} + value={costCategoryKeyValue} + placeholder={intl.formatMessage(messages.filterByValuePlaceholder)} + onKeyDown={evt => onCostCategoryValueInput(evt)} + /> + + + + ); } diff --git a/src/routes/components/dataToolbar/customSelect.tsx b/src/routes/components/dataToolbar/customSelect.tsx index e9e3147d0e..8ef166633d 100644 --- a/src/routes/components/dataToolbar/customSelect.tsx +++ b/src/routes/components/dataToolbar/customSelect.tsx @@ -1,7 +1,7 @@ import './dataToolbar.scss'; -import type { SelectOptionObject } from '@patternfly/react-core'; -import { Select, SelectOption, SelectVariant } from '@patternfly/react-core'; +import type { SelectOptionObject } from '@patternfly/react-core/deprecated'; +import { Select, SelectOption, SelectVariant } from '@patternfly/react-core/deprecated'; import messages from 'locales/messages'; import React from 'react'; import type { WrappedComponentProps } from 'react-intl'; @@ -28,7 +28,7 @@ interface CustomSelectDispatchProps { } interface CustomSelectState { - isExpanded?: boolean; + isCustomSelectExpanded?: boolean; } export interface SelectOptionObjectExt extends SelectOptionObject { @@ -40,13 +40,13 @@ type CustomSelectProps = CustomSelectOwnProps & CustomSelectStateProps & CustomS class CustomSelectBase extends React.Component { protected defaultState: CustomSelectState = { - isExpanded: false, + isCustomSelectExpanded: false, }; public state: CustomSelectState = { ...this.defaultState }; private onCustomSelectToggle = isOpen => { this.setState({ - isExpanded: isOpen, + isCustomSelectExpanded: isOpen, }); }; @@ -66,7 +66,7 @@ class CustomSelectBase extends React.Component { @@ -79,10 +79,10 @@ class CustomSelectBase extends React.Component this.onCustomSelectToggle(isExpanded)} onSelect={onSelect} selections={selections} - isOpen={isExpanded} + isOpen={isCustomSelectExpanded} placeholderText={intl.formatMessage(messages.chooseValuePlaceholder)} > {selectOptions.map(option => ( diff --git a/src/routes/components/dataToolbar/dataKebab.tsx b/src/routes/components/dataToolbar/dataKebab.tsx index 995f4f7a0f..ca31796c1d 100644 --- a/src/routes/components/dataToolbar/dataKebab.tsx +++ b/src/routes/components/dataToolbar/dataKebab.tsx @@ -1,5 +1,5 @@ import type { MessageDescriptor } from '@formatjs/intl/src/types'; -import { Dropdown, DropdownItem, DropdownPosition, KebabToggle } from '@patternfly/react-core'; +import { Dropdown, DropdownItem, DropdownPosition, KebabToggle } from '@patternfly/react-core/deprecated'; import React from 'react'; import type { WrappedComponentProps } from 'react-intl'; import { injectIntl } from 'react-intl'; diff --git a/src/routes/components/dataToolbar/dataToolbar.scss b/src/routes/components/dataToolbar/dataToolbar.scss index 63c426fdbf..7502b8ca36 100644 --- a/src/routes/components/dataToolbar/dataToolbar.scss +++ b/src/routes/components/dataToolbar/dataToolbar.scss @@ -3,15 +3,15 @@ // Workaround for https://github.com/patternfly/patternfly-react/issues/4477 // and https://github.com/patternfly/patternfly-react/issues/6371 .selectOverride { - &.pf-c-select { + &.pf-v5-c-select { min-width: 250px; } } .toolbarOverride { - .pf-c-button.pf-m-control::after { + .pf-v5-c-button.pf-m-control::after { border-left: none; } // Alternative workaround to overriding table sticky style - // --pf-c-toolbar--ZIndex: auto; z-index: 301; + // --pf-v5-c-toolbar--ZIndex: auto; z-index: 301; } diff --git a/src/routes/components/dataToolbar/dataToolbar.tsx b/src/routes/components/dataToolbar/dataToolbar.tsx index cc5340281a..f0164bcaab 100644 --- a/src/routes/components/dataToolbar/dataToolbar.tsx +++ b/src/routes/components/dataToolbar/dataToolbar.tsx @@ -234,7 +234,7 @@ export class DataToolbarBase extends React.Component { + private handleOnCategorySelect = (selection: CategoryOption) => { this.setState({ categoryInput: '', currentCategory: selection.value, @@ -278,7 +278,7 @@ export class DataToolbarBase extends React.Component { + private handleOnCategoryInput = (event: React.FormEvent, key) => { const { onFilterAdded } = this.props; const { categoryInput, currentCategory, currentExclude, filters: currentFilters } = this.state; @@ -354,7 +354,7 @@ export class DataToolbarBase extends React.Component { + private handleOnCostCategoryKeySelect = selection => { this.setState({ currentCostCategoryKey: selection, isCostCategoryKeySelectExpanded: !this.state.isCostCategoryKeySelectExpanded, @@ -514,7 +514,7 @@ export class DataToolbarBase extends React.Component { + private handleOnExcludeSelect = (selection: ExcludeOption) => { this.setState({ currentExclude: selection.value, isExcludeSelectOpen: !this.state.isExcludeSelectOpen, @@ -605,7 +605,7 @@ export class DataToolbarBase extends React.Component { + private handleOnTagKeySelect = selection => { this.setState({ currentTagKey: selection, isTagKeySelectExpanded: !this.state.isTagKeySelectExpanded, @@ -836,7 +836,7 @@ export class DataToolbarBase extends React.Component )} - + {pagination} diff --git a/src/routes/components/dataToolbar/tagValue.tsx b/src/routes/components/dataToolbar/tagValue.tsx index 484c6a1791..ba3e91f14f 100644 --- a/src/routes/components/dataToolbar/tagValue.tsx +++ b/src/routes/components/dataToolbar/tagValue.tsx @@ -1,13 +1,7 @@ -import type { SelectOptionObject, ToolbarChipGroup } from '@patternfly/react-core'; -import { - Button, - ButtonVariant, - InputGroup, - Select, - SelectOption, - SelectVariant, - TextInput, -} from '@patternfly/react-core'; +import type { ToolbarChipGroup } from '@patternfly/react-core'; +import { Button, ButtonVariant, InputGroup, InputGroupItem, TextInput } from '@patternfly/react-core'; +import type { SelectOptionObject } from '@patternfly/react-core/deprecated'; +import { Select, SelectOption, SelectVariant } from '@patternfly/react-core/deprecated'; import { SearchIcon } from '@patternfly/react-icons/dist/esm/icons/search-icon'; import type { Query } from 'api/queries/query'; import { getQuery, parseQuery } from 'api/queries/query'; @@ -140,8 +134,8 @@ class TagValueBase extends React.Component { isDisabled={isDisabled} variant={SelectVariant.checkbox} aria-label={intl.formatMessage(messages.filterByTagValueAriaLabel)} - onToggle={this.onTagValueToggle} onSelect={onTagValueSelect} + onToggle={(_evt, isExpanded) => this.onTagValueToggle(isExpanded)} selections={selections} isOpen={isTagValueExpanded} placeholderText={intl.formatMessage(messages.chooseValuePlaceholder)} @@ -152,25 +146,29 @@ class TagValueBase extends React.Component { } return ( - onTagValueInput(evt)} - /> - + + this.onTagValueChange(value)} + value={tagKeyValue} + placeholder={intl.formatMessage(messages.filterByValuePlaceholder)} + onKeyDown={evt => onTagValueInput(evt)} + /> + + + + ); } diff --git a/src/routes/components/dataToolbar/utils/actions.tsx b/src/routes/components/dataToolbar/utils/actions.tsx index dae5af2d5e..40997a9c93 100644 --- a/src/routes/components/dataToolbar/utils/actions.tsx +++ b/src/routes/components/dataToolbar/utils/actions.tsx @@ -70,7 +70,7 @@ export const getPlatformCosts = ({ label={intl.formatMessage(messages.sumPlatformCosts)} isChecked={isPlatformCostsChecked} isDisabled={isDisabled} - onChange={onPlatformCostsChanged} + onChange={(_evt, checked) => onPlatformCostsChanged(checked)} /> ); diff --git a/src/routes/components/dataToolbar/utils/bulkSelect.tsx b/src/routes/components/dataToolbar/utils/bulkSelect.tsx index ba77de447d..e49c4e5275 100644 --- a/src/routes/components/dataToolbar/utils/bulkSelect.tsx +++ b/src/routes/components/dataToolbar/utils/bulkSelect.tsx @@ -1,11 +1,11 @@ +import { Tooltip } from '@patternfly/react-core'; import { Dropdown, DropdownItem, DropdownPosition, DropdownToggle, DropdownToggleCheckbox, - Tooltip, -} from '@patternfly/react-core'; +} from '@patternfly/react-core/deprecated'; import { intl } from 'components/i18n'; import messages from 'locales/messages'; import React from 'react'; @@ -82,7 +82,7 @@ export const getBulkSelect = ({ }} />, ]} - onToggle={onBulkSelectToggle} + onToggle={(_evt, isOpen) => onBulkSelectToggle(isOpen)} > {numSelected !== 0 && ( {intl.formatMessage(messages.selected, { value: numSelected })} diff --git a/src/routes/components/dataToolbar/utils/category.tsx b/src/routes/components/dataToolbar/utils/category.tsx index 6380ceca46..93da2469c9 100644 --- a/src/routes/components/dataToolbar/utils/category.tsx +++ b/src/routes/components/dataToolbar/utils/category.tsx @@ -1,15 +1,15 @@ -import type { SelectOptionObject, ToolbarChipGroup } from '@patternfly/react-core'; +import type { ToolbarChipGroup } from '@patternfly/react-core'; import { Button, ButtonVariant, InputGroup, - Select, - SelectOption, - SelectVariant, + InputGroupItem, TextInput, ToolbarFilter, ToolbarItem, } from '@patternfly/react-core'; +import type { SelectOptionObject } from '@patternfly/react-core/deprecated'; +import { Select, SelectOption, SelectVariant } from '@patternfly/react-core/deprecated'; import { FilterIcon } from '@patternfly/react-icons/dist/esm/icons/filter-icon'; import { SearchIcon } from '@patternfly/react-icons/dist/esm/icons/search-icon'; import type { ResourceType } from 'api/resources/resource'; @@ -70,39 +70,41 @@ export const getCategoryInput = ({ showToolbarItem={currentCategory === categoryOption.key} > - {isResourceTypeValid(resourcePathsType, categoryOption.key as ResourceType) ? ( - onCategoryInputSelect(value, categoryOption.key)} - placeholder={intl.formatMessage(messages.filterByPlaceholder, { value: placeholderKey })} - resourcePathsType={resourcePathsType} - resourceType={categoryOption.key as ResourceType} - /> - ) : ( - <> - + {isResourceTypeValid(resourcePathsType, categoryOption.key as ResourceType) ? ( + onCategoryInputSelect(value, categoryOption.key)} placeholder={intl.formatMessage(messages.filterByPlaceholder, { value: placeholderKey })} - onKeyDown={evt => onCategoryInput(evt, categoryOption.key)} - size={intl.formatMessage(messages.filterByPlaceholder, { value: placeholderKey }).length} + resourcePathsType={resourcePathsType} + resourceType={categoryOption.key as ResourceType} /> - - - )} + ) : ( + <> + onCategoryInputChange(value)} + value={categoryInput} + placeholder={intl.formatMessage(messages.filterByPlaceholder, { value: placeholderKey })} + onKeyDown={evt => onCategoryInput(evt, categoryOption.key)} + size={intl.formatMessage(messages.filterByPlaceholder, { value: placeholderKey }).length} + /> + + + )} + ); @@ -205,7 +207,7 @@ export const getCategorySelect = ({ currentCategory?: string; filters?: Filters; isDisabled?: boolean; - onCategorySelect?: (event, selection: CategoryOption) => void; + onCategorySelect?: (selection: CategoryOption) => void; onCategoryToggle?: (isOpen: boolean) => void; isCategorySelectOpen?: boolean; }) => { @@ -222,8 +224,8 @@ export const getCategorySelect = ({ id="category-select" isDisabled={isDisabled && !hasFilters(filters)} isOpen={isCategorySelectOpen} - onSelect={onCategorySelect} - onToggle={onCategoryToggle} + onSelect={(_evt, value) => onCategorySelect(value)} + onToggle={(_evt, isExpanded) => onCategoryToggle(isExpanded)} selections={selection} toggleIcon={} variant={SelectVariant.single} diff --git a/src/routes/components/dataToolbar/utils/costCategory.tsx b/src/routes/components/dataToolbar/utils/costCategory.tsx index 7bf27aea36..101e38cf18 100644 --- a/src/routes/components/dataToolbar/utils/costCategory.tsx +++ b/src/routes/components/dataToolbar/utils/costCategory.tsx @@ -1,5 +1,7 @@ import type { ToolbarChipGroup } from '@patternfly/react-core'; -import { Select, SelectOption, SelectVariant, ToolbarFilter, ToolbarItem } from '@patternfly/react-core'; +import { ToolbarFilter, ToolbarItem } from '@patternfly/react-core'; +import type { SelectOptionObject } from '@patternfly/react-core/deprecated'; +import { Select, SelectOption, SelectVariant } from '@patternfly/react-core/deprecated'; import type { Resource } from 'api/resources/resource'; import type { ResourcePathsType } from 'api/resources/resource'; import { intl } from 'components/i18n'; @@ -32,7 +34,7 @@ export const getCostCategoryKeySelect = ({ isCostCategoryKeySelectExpanded?: boolean; isDisabled?: boolean; onCostCategoryKeyClear?: () => void; - onCostCategoryKeySelect?: (event, selection) => void; + onCostCategoryKeySelect?: (selection: SelectOptionObject) => void; onCostCategoryKeyToggle?: (isOpen: boolean) => void; resourceReport?: Resource; }) => { @@ -50,10 +52,10 @@ export const getCostCategoryKeySelect = ({ isDisabled={isDisabled && !hasFilters(filters)} variant={SelectVariant.typeahead} typeAheadAriaLabel={intl.formatMessage(messages.filterByCostCategoryKeyAriaLabel)} - onClear={onCostCategoryKeyClear} - onToggle={onCostCategoryKeyToggle} - onSelect={onCostCategoryKeySelect} isOpen={isCostCategoryKeySelectExpanded} + onClear={onCostCategoryKeyClear} + onSelect={(_evt, value) => onCostCategoryKeySelect(value)} + onToggle={(_evt, isExpanded) => onCostCategoryKeyToggle(isExpanded)} placeholderText={intl.formatMessage(messages.chooseKeyPlaceholder)} selections={currentCostCategoryKey} > diff --git a/src/routes/components/dataToolbar/utils/exclude.tsx b/src/routes/components/dataToolbar/utils/exclude.tsx index 2af24681b4..f093e975e9 100644 --- a/src/routes/components/dataToolbar/utils/exclude.tsx +++ b/src/routes/components/dataToolbar/utils/exclude.tsx @@ -1,5 +1,6 @@ -import type { SelectOptionObject } from '@patternfly/react-core'; -import { Select, SelectOption, SelectVariant, ToolbarItem } from '@patternfly/react-core'; +import { ToolbarItem } from '@patternfly/react-core'; +import type { SelectOptionObject } from '@patternfly/react-core/deprecated'; +import { Select, SelectOption, SelectVariant } from '@patternfly/react-core/deprecated'; import { intl } from 'components/i18n'; import messages from 'locales/messages'; import React from 'react'; @@ -32,7 +33,7 @@ export const getExcludeSelect = ({ filters?: Filters; isDisabled?: boolean; isExcludeSelectOpen?: boolean; - onExcludeSelect: (event: any, selection: ExcludeOption) => void; + onExcludeSelect: (selection: ExcludeOption) => void; onExcludeToggle: (isOpen: boolean) => void; }) => { const selectOptions = getExcludeSelectOptions(); @@ -44,8 +45,8 @@ export const getExcludeSelect = ({ id="exclude-select" isDisabled={isDisabled && !hasFilters(filters)} isOpen={isExcludeSelectOpen} - onSelect={onExcludeSelect} - onToggle={onExcludeToggle} + onSelect={(_evt, value) => onExcludeSelect(value)} + onToggle={(_evt, isExpanded) => onExcludeToggle(isExpanded)} selections={selection} variant={SelectVariant.single} > diff --git a/src/routes/components/dataToolbar/utils/orgUntits.tsx b/src/routes/components/dataToolbar/utils/orgUntits.tsx index 04f412393b..d678f2de9c 100644 --- a/src/routes/components/dataToolbar/utils/orgUntits.tsx +++ b/src/routes/components/dataToolbar/utils/orgUntits.tsx @@ -1,5 +1,7 @@ -import type { SelectOptionObject, ToolbarChipGroup } from '@patternfly/react-core'; -import { Select, SelectOption, SelectVariant, ToolbarFilter } from '@patternfly/react-core'; +import type { ToolbarChipGroup } from '@patternfly/react-core'; +import { ToolbarFilter } from '@patternfly/react-core'; +import type { SelectOptionObject } from '@patternfly/react-core/deprecated'; +import { Select, SelectOption, SelectVariant } from '@patternfly/react-core/deprecated'; import type { Org } from 'api/orgs/org'; import { intl } from 'components/i18n'; import messages from 'locales/messages'; @@ -32,7 +34,7 @@ export const getOrgUnitSelect = ({ isDisabled?: boolean; isOrgUnitSelectExpanded?: boolean; onDelete?: (type: any, chip: any) => void; - onOrgUnitSelect?: (event, selection: string) => void; + onOrgUnitSelect?: (event: React.MouseEvent, selection: string) => void; onOrgUnitToggle?: (isOpen: boolean) => void; orgReport: Org; }) => { @@ -78,8 +80,8 @@ export const getOrgUnitSelect = ({ className="selectOverride" variant={SelectVariant.checkbox} aria-label={intl.formatMessage(messages.filterByOrgUnitAriaLabel)} - onToggle={onOrgUnitToggle} onSelect={onOrgUnitSelect} + onToggle={(_evt, isExpanded) => onOrgUnitToggle(isExpanded)} selections={selections} isOpen={isOrgUnitSelectExpanded} placeholderText={intl.formatMessage(messages.filterByOrgUnitPlaceholder)} diff --git a/src/routes/components/dataToolbar/utils/tags.tsx b/src/routes/components/dataToolbar/utils/tags.tsx index a49a1f0705..9432298e49 100644 --- a/src/routes/components/dataToolbar/utils/tags.tsx +++ b/src/routes/components/dataToolbar/utils/tags.tsx @@ -1,5 +1,7 @@ import type { ToolbarChipGroup } from '@patternfly/react-core'; -import { Select, SelectOption, SelectVariant, ToolbarFilter, ToolbarItem } from '@patternfly/react-core'; +import { ToolbarFilter, ToolbarItem } from '@patternfly/react-core'; +import type { SelectOptionObject } from '@patternfly/react-core/deprecated'; +import { Select, SelectOption, SelectVariant } from '@patternfly/react-core/deprecated'; import type { Tag } from 'api/tags/tag'; import type { TagPathsType } from 'api/tags/tag'; import { intl } from 'components/i18n'; @@ -30,7 +32,7 @@ export const getTagKeySelect = ({ isDisabled?: boolean; isTagKeySelectExpanded?: boolean; onTagKeyClear?: () => void; - onTagKeySelect?: (event, selection) => void; + onTagKeySelect?: (value: SelectOptionObject) => void; onTagKeyToggle?: (isOpen: boolean) => void; tagReport?: Tag; }) => { @@ -49,8 +51,8 @@ export const getTagKeySelect = ({ variant={SelectVariant.typeahead} typeAheadAriaLabel={intl.formatMessage(messages.filterByTagKeyAriaLabel)} onClear={onTagKeyClear} - onToggle={onTagKeyToggle} - onSelect={onTagKeySelect} + onSelect={(_evt, value) => onTagKeySelect(value)} + onToggle={(_evt, isExpanded) => onTagKeyToggle(isExpanded)} isOpen={isTagKeySelectExpanded} placeholderText={intl.formatMessage(messages.chooseKeyPlaceholder)} selections={currentTagKey} diff --git a/src/routes/components/export/exportModal.tsx b/src/routes/components/export/exportModal.tsx index 96c644e814..ad3afd5e1e 100644 --- a/src/routes/components/export/exportModal.tsx +++ b/src/routes/components/export/exportModal.tsx @@ -7,6 +7,8 @@ import { FormGroup, Grid, GridItem, + HelperText, + HelperTextItem, Modal, Radio, TextInput, @@ -108,19 +110,19 @@ export class ExportModalBase extends React.Component { + private handleOnMonthChange = event => { this.setState({ timeScope: event.currentTarget.value }); }; - private handleOnNameChange = (_, event) => { + private handleOnNameChange = event => { this.setState({ name: event.currentTarget.value }); }; - private handleOnResolutionChange = (_, event) => { + private handleOnResolutionChange = event => { this.setState({ resolution: event.currentTarget.value }); }; - private handleOnTypeChange = (_, event) => { + private handleOnTypeChange = event => { this.setState({ formatType: event.currentTarget.value }); }; @@ -227,13 +229,7 @@ export class ExportModalBase extends React.Component {isExportsFeatureEnabled && ( - + + {validated === 'error' && ( + + {intl.formatMessage(helpText)} + + )} )} diff --git a/src/routes/components/groupBy/groupBy.tsx b/src/routes/components/groupBy/groupBy.tsx index 60a85d8be4..4ceede1078 100644 --- a/src/routes/components/groupBy/groupBy.tsx +++ b/src/routes/components/groupBy/groupBy.tsx @@ -1,5 +1,6 @@ -import type { SelectOptionObject } from '@patternfly/react-core'; -import { Select, SelectOption, SelectVariant, Title } from '@patternfly/react-core'; +import { Title } from '@patternfly/react-core'; +import type { SelectOptionObject } from '@patternfly/react-core/deprecated'; +import { Select, SelectOption, SelectVariant } from '@patternfly/react-core/deprecated'; import type { Org, OrgPathsType } from 'api/orgs/org'; import { OrgType } from 'api/orgs/org'; import type { Query } from 'api/queries/query'; @@ -198,8 +199,8 @@ class GroupByBase extends React.Component { id="groupBySelect" isDisabled={isDisabled} isOpen={isGroupByOpen} - onSelect={this.handleOnSelect} - onToggle={this.handleOnToggle} + onSelect={(_evt, value) => this.handleOnSelect(value)} + onToggle={(_evt, isExpanded) => this.handleOnToggle(isExpanded)} selections={selection} variant={SelectVariant.single} > @@ -239,7 +240,7 @@ class GroupByBase extends React.Component { }); }; - private handleOnSelect = (event, selection: GroupByOption) => { + private handleOnSelect = (selection: GroupByOption) => { const { onSelected } = this.props; if (selection.value === orgUnitIdKey || selection.value === awsCategoryKey || selection.value === tagKey) { diff --git a/src/routes/components/groupBy/groupByOrg.tsx b/src/routes/components/groupBy/groupByOrg.tsx index 65bc374319..4511f3b715 100644 --- a/src/routes/components/groupBy/groupByOrg.tsx +++ b/src/routes/components/groupBy/groupByOrg.tsx @@ -1,5 +1,5 @@ -import type { SelectOptionObject } from '@patternfly/react-core'; -import { Select, SelectOption, SelectVariant } from '@patternfly/react-core'; +import type { SelectOptionObject } from '@patternfly/react-core/deprecated'; +import { Select, SelectOption, SelectVariant } from '@patternfly/react-core/deprecated'; import type { Org } from 'api/orgs/org'; import type { Query } from 'api/queries/query'; import { parseQuery } from 'api/queries/query'; @@ -120,7 +120,7 @@ class GroupByOrgBase extends React.Component { }); }; - private handleOnSelect = (event, selection: GroupByOrgOption) => { + private handleOnSelect = (selection: GroupByOrgOption) => { const { onSelected } = this.props; this.setState({ @@ -149,8 +149,8 @@ class GroupByOrgBase extends React.Component { aria-label={intl.formatMessage(messages.filterByOrgUnitAriaLabel)} isDisabled={isDisabled} onClear={this.handleOnClear} - onToggle={this.handleOnToggle} - onSelect={this.handleOnSelect} + onSelect={(_evt, value) => this.handleOnSelect(value)} + onToggle={(_evt, isExpanded) => this.handleOnToggle(isExpanded)} isOpen={isGroupByOpen} placeholderText={intl.formatMessage(messages.filterByOrgUnitPlaceholder)} selections={selection} diff --git a/src/routes/components/groupBy/groupBySelect.tsx b/src/routes/components/groupBy/groupBySelect.tsx index 8e3d5657b7..50e4720db6 100644 --- a/src/routes/components/groupBy/groupBySelect.tsx +++ b/src/routes/components/groupBy/groupBySelect.tsx @@ -1,4 +1,4 @@ -import { Select, SelectOption, SelectVariant } from '@patternfly/react-core'; +import { Select, SelectOption, SelectVariant } from '@patternfly/react-core/deprecated'; import type { Query } from 'api/queries/query'; import { parseQuery } from 'api/queries/query'; import type { Resource } from 'api/resources/resource'; @@ -120,16 +120,16 @@ class GroupBySelectBase extends React.Component { + private handleOnSelected = value => { const { onSelected } = this.props; const { prefix } = this.state; this.setState({ - currentItem: selection, + currentItem: value, isGroupByOpen: false, }); if (onSelected) { - onSelected(`${prefix}${selection}`); + onSelected(`${prefix}${value}`); } }; @@ -149,8 +149,8 @@ class GroupBySelectBase extends React.Component this.handleOnSelected(value)} + onToggle={(_evt, isExpanded) => this.handleOnToggle(isExpanded)} isOpen={isGroupByOpen} placeholderText={intl.formatMessage(messages.chooseKeyPlaceholder)} selections={currentItem} diff --git a/src/routes/components/optimizations/optimizationsTable.tsx b/src/routes/components/optimizations/optimizationsTable.tsx index 613126eb26..d73d03a3b3 100644 --- a/src/routes/components/optimizations/optimizationsTable.tsx +++ b/src/routes/components/optimizations/optimizationsTable.tsx @@ -174,7 +174,7 @@ class OptimizationsTableBase extends React.Component { + private handleOnRowClick = (rowIndex: number) => { const { closeOptimizationsDrawer, isOpen, openOptimizationsDrawer } = this.props; const { currentRow, rows } = this.state; diff --git a/src/routes/components/page/noData/noDataState.tsx b/src/routes/components/page/noData/noDataState.tsx index 10560d6257..6912fff878 100644 --- a/src/routes/components/page/noData/noDataState.tsx +++ b/src/routes/components/page/noData/noDataState.tsx @@ -2,10 +2,10 @@ import { Button, EmptyState, EmptyStateBody, + EmptyStateFooter, + EmptyStateHeader, EmptyStateIcon, EmptyStateVariant, - Title, - TitleSizes, } from '@patternfly/react-core'; import { PlusCircleIcon } from '@patternfly/react-icons/dist/esm/icons/plus-circle-icon'; import messages from 'locales/messages'; @@ -24,17 +24,20 @@ class NoDataStateBase extends React.Component { const { intl, showReload = true } = this.props; return ( - - - - {intl.formatMessage(messages.noDataStateTitle)} - + + {intl.formatMessage(messages.noDataStateTitle)}} + icon={} + headingLevel="h5" + /> {intl.formatMessage(messages.noDataStateDesc)} - {showReload && ( - - )} + + {showReload && ( + + )} + ); } diff --git a/src/routes/components/page/noOptimizations/noOptimizationsState.tsx b/src/routes/components/page/noOptimizations/noOptimizationsState.tsx index 2cf0d3df80..771c8275f9 100644 --- a/src/routes/components/page/noOptimizations/noOptimizationsState.tsx +++ b/src/routes/components/page/noOptimizations/noOptimizationsState.tsx @@ -1,10 +1,9 @@ import { EmptyState, EmptyStateBody, + EmptyStateHeader, EmptyStateIcon, EmptyStateVariant, - Title, - TitleSizes, } from '@patternfly/react-core'; import messages from 'locales/messages'; import React from 'react'; @@ -23,11 +22,12 @@ class NoOptimizationsStateBase extends React.Component - - - {intl.formatMessage(messages.noOptimizationsTitle)} - + + {intl.formatMessage(messages.noOptimizationsTitle)}} + icon={} + headingLevel="h1" + /> {intl.formatMessage(messages.noOptimizationsDesc)} ); diff --git a/src/routes/components/page/noProviders/noProvidersState.tsx b/src/routes/components/page/noProviders/noProvidersState.tsx index 31faf92eb5..175364ee1f 100644 --- a/src/routes/components/page/noProviders/noProvidersState.tsx +++ b/src/routes/components/page/noProviders/noProvidersState.tsx @@ -3,10 +3,10 @@ import { Button, EmptyState, EmptyStateBody, + EmptyStateFooter, + EmptyStateHeader, EmptyStateIcon, EmptyStateVariant, - Title, - TitleSizes, } from '@patternfly/react-core'; import { ExternalLinkAltIcon } from '@patternfly/react-icons/dist/esm/icons/external-link-alt-icon'; import { PlusCircleIcon } from '@patternfly/react-icons/dist/esm/icons/plus-circle-icon'; @@ -82,19 +82,22 @@ class NoProvidersStateBase extends React.Component { icon = CostIcon; } return ( - - - - {intl.formatMessage(titleKey)} - + + {intl.formatMessage(titleKey)}} + icon={} + headingLevel="h1" + /> {intl.formatMessage(descKey)} - {docUrlKey && textKey ? ( -
{this.getDocLink(textKey, docUrlKey)}
- ) : ( - - )} + + {docUrlKey && textKey ? ( +
{this.getDocLink(textKey, docUrlKey)}
+ ) : ( + + )} +
); } diff --git a/src/routes/components/perspective/perspectiveSelect.tsx b/src/routes/components/perspective/perspectiveSelect.tsx index a036b356a0..cb7c069e63 100644 --- a/src/routes/components/perspective/perspectiveSelect.tsx +++ b/src/routes/components/perspective/perspectiveSelect.tsx @@ -1,6 +1,7 @@ import type { MessageDescriptor } from '@formatjs/intl/src/types'; -import type { SelectOptionObject } from '@patternfly/react-core'; -import { Select, SelectOption, SelectVariant, Title } from '@patternfly/react-core'; +import { Title } from '@patternfly/react-core'; +import type { SelectOptionObject } from '@patternfly/react-core/deprecated'; +import { Select, SelectOption, SelectVariant } from '@patternfly/react-core/deprecated'; import messages from 'locales/messages'; import React from 'react'; import type { WrappedComponentProps } from 'react-intl'; @@ -73,8 +74,8 @@ class PerspectiveSelectBase extends React.Component this.handleSelect(value)} + onToggle={(_evt, isExpanded) => this.handleToggle(isExpanded)} selections={selection} variant={SelectVariant.single} > @@ -85,7 +86,7 @@ class PerspectiveSelectBase extends React.Component { + private handleSelect = (selection: PerspectiveOption) => { const { onSelected } = this.props; if (onSelected) { diff --git a/src/routes/components/reports/reportSummary/__snapshots__/reportSummaryItems.test.tsx.snap b/src/routes/components/reports/reportSummary/__snapshots__/reportSummaryItems.test.tsx.snap index ff9e4a88d0..71e2bd5e47 100644 --- a/src/routes/components/reports/reportSummary/__snapshots__/reportSummaryItems.test.tsx.snap +++ b/src/routes/components/reports/reportSummary/__snapshots__/reportSummaryItems.test.tsx.snap @@ -3,35 +3,35 @@ exports[`contains skeleton readers if in progress 1`] = `
diff --git a/src/routes/components/reports/reportSummary/reportSummary.scss b/src/routes/components/reports/reportSummary/reportSummary.scss index 52822992fd..e556562823 100644 --- a/src/routes/components/reports/reportSummary/reportSummary.scss +++ b/src/routes/components/reports/reportSummary/reportSummary.scss @@ -2,12 +2,12 @@ .chartSkeleton { height: 125px; - margin-bottom: var(--pf-global--spacer--md); - margin-top: var(--pf-global--spacer--md); + margin-bottom: var(--pf-v5-global--spacer--md); + margin-top: var(--pf-v5-global--spacer--md); } .legendSkeleton { - margin-top: var(--pf-global--spacer--md), + margin-top: var(--pf-v5-global--spacer--md), } .reportSummary { @@ -16,7 +16,7 @@ .subtitle { display: inline-block; - font-size: var(--pf-global--FontSize--xs); - color: var(--pf-global--Color--200); + font-size: var(--pf-v5-global--FontSize--xs); + color: var(--pf-v5-global--Color--200); margin-bottom: 0; } diff --git a/src/routes/components/reports/reportSummary/reportSummaryAlt.scss b/src/routes/components/reports/reportSummary/reportSummaryAlt.scss index 6d6ca62d8a..c73fe7209f 100644 --- a/src/routes/components/reports/reportSummary/reportSummaryAlt.scss +++ b/src/routes/components/reports/reportSummary/reportSummaryAlt.scss @@ -2,18 +2,18 @@ .chartSkeleton { height: 175px; - margin-bottom: var(--pf-global--spacer--md); - margin-top: var(--pf-global--spacer--md); + margin-bottom: var(--pf-v5-global--spacer--md); + margin-top: var(--pf-v5-global--spacer--md); } .cost { flex-grow: 1; min-height: 470px; - margin-tight: var(--pf-global--spacer--md); + margin-tight: var(--pf-v5-global--spacer--md); } .legendSkeleton { - margin-top: var(--pf-global--spacer--md), + margin-top: var(--pf-v5-global--spacer--md), } .reportSummary { @@ -22,11 +22,11 @@ .subtitle { display: inline-block; - font-size: var(--pf-global--FontSize--xs); - color: var(--pf-global--Color--200); + font-size: var(--pf-v5-global--FontSize--xs); + color: var(--pf-v5-global--Color--200); margin-bottom: 0; } .tops { - margin-top: var(--pf-global--spacer--lg), + margin-top: var(--pf-v5-global--spacer--lg), } diff --git a/src/routes/components/reports/reportSummary/reportSummaryCost.scss b/src/routes/components/reports/reportSummary/reportSummaryCost.scss index c9f1e03a97..22b63d7963 100644 --- a/src/routes/components/reports/reportSummary/reportSummaryCost.scss +++ b/src/routes/components/reports/reportSummary/reportSummaryCost.scss @@ -1,5 +1,5 @@ @import url("~@patternfly/patternfly/base/patternfly-variables.css"); .chart { - margin-bottom: var(--pf-global--spacer--sm); + margin-bottom: var(--pf-v5-global--spacer--sm); } diff --git a/src/routes/components/reports/reportSummary/reportSummaryDailyCost.scss b/src/routes/components/reports/reportSummary/reportSummaryDailyCost.scss index c9f1e03a97..22b63d7963 100644 --- a/src/routes/components/reports/reportSummary/reportSummaryDailyCost.scss +++ b/src/routes/components/reports/reportSummary/reportSummaryDailyCost.scss @@ -1,5 +1,5 @@ @import url("~@patternfly/patternfly/base/patternfly-variables.css"); .chart { - margin-bottom: var(--pf-global--spacer--sm); + margin-bottom: var(--pf-v5-global--spacer--sm); } diff --git a/src/routes/components/reports/reportSummary/reportSummaryDailyTrend.scss b/src/routes/components/reports/reportSummary/reportSummaryDailyTrend.scss index 0a23f9d307..47363e31f4 100644 --- a/src/routes/components/reports/reportSummary/reportSummaryDailyTrend.scss +++ b/src/routes/components/reports/reportSummary/reportSummaryDailyTrend.scss @@ -1,5 +1,5 @@ @import url("~@patternfly/patternfly/base/patternfly-variables.css"); .chart { - margin-nottom: var(--pf-global--spacer--sm); + margin-nottom: var(--pf-v5-global--spacer--sm); } diff --git a/src/routes/components/reports/reportSummary/reportSummaryDetails.scss b/src/routes/components/reports/reportSummary/reportSummaryDetails.scss index f7bac986d2..c569b949f7 100644 --- a/src/routes/components/reports/reportSummary/reportSummaryDetails.scss +++ b/src/routes/components/reports/reportSummary/reportSummaryDetails.scss @@ -1,40 +1,40 @@ @import url("~@patternfly/patternfly/base/patternfly-variables.css"); .reportSummaryDetails { - margin-bottom: var(--pf-global--spacer--md); + margin-bottom: var(--pf-v5-global--spacer--md); display: flex; align-Items: flex-end; } .text { - padding-bottom: var(--pf-global--spacer--sm); - line-height: var(--pf-global--LineHeight--sm); - font-size: var(--pf-global--FontSize--xs); + padding-bottom: var(--pf-v5-global--spacer--sm); + line-height: var(--pf-v5-global--LineHeight--sm); + font-size: var(--pf-v5-global--FontSize--xs); } .units { - padding-left: var(--pf-global--spacer--xs); - padding-bottom: var(--pf-global--spacer--sm); - line-height: var(--pf-global--LineHeight--sm); - font-size: var(--pf-global--FontSize--xs); + padding-left: var(--pf-v5-global--spacer--xs); + padding-bottom: var(--pf-v5-global--spacer--sm); + line-height: var(--pf-v5-global--LineHeight--sm); + font-size: var(--pf-v5-global--FontSize--xs); white-space: nowrap; } .value { - color: var(--pf-global--Color--100); - margin-right: var(--pf-global--spacer--sm); - font-size: var(--pf-global--FontSize--2xl); + color: var(--pf-v5-global--Color--100); + margin-right: var(--pf-v5-global--spacer--sm); + font-size: var(--pf-v5-global--FontSize--2xl); } .valueAlt { - color: var(--pf-global--Color--100); - margin-right: var(--pf-global--spacer--sm); - font-size: var(--pf-global--FontSize--4xl); + color: var(--pf-v5-global--Color--100); + margin-right: var(--pf-v5-global--spacer--sm); + font-size: var(--pf-v5-global--FontSize--4xl); } .valueContainer { display: inline-block; - margin-bottom: var(--pf-global--spacer--md); + margin-bottom: var(--pf-v5-global--spacer--md); width: 50%; word-Wrap: break-word; } diff --git a/src/routes/components/reports/reportSummary/reportSummaryItem.scss b/src/routes/components/reports/reportSummary/reportSummaryItem.scss index 418c0e6c9a..7bcc047b70 100644 --- a/src/routes/components/reports/reportSummary/reportSummaryItem.scss +++ b/src/routes/components/reports/reportSummary/reportSummaryItem.scss @@ -1,5 +1,5 @@ @import url("~@patternfly/patternfly/base/patternfly-variables.css"); .reportSummaryItem:not(:last-child) { - margin-bottom: var(--pf-global--spacer--md); + margin-bottom: var(--pf-v5-global--spacer--md); } diff --git a/src/routes/components/reports/reportSummary/reportSummaryItems.scss b/src/routes/components/reports/reportSummary/reportSummaryItems.scss index 63a966fc8b..b8f585f231 100644 --- a/src/routes/components/reports/reportSummary/reportSummaryItems.scss +++ b/src/routes/components/reports/reportSummary/reportSummaryItems.scss @@ -1,5 +1,5 @@ @import url("~@patternfly/patternfly/base/patternfly-variables.css"); .skeleton { - margin-top: var(--pf-global--spacer--md); + margin-top: var(--pf-v5-global--spacer--md); } diff --git a/src/routes/components/reports/reportSummary/reportSummaryTrend.scss b/src/routes/components/reports/reportSummary/reportSummaryTrend.scss index 0a23f9d307..47363e31f4 100644 --- a/src/routes/components/reports/reportSummary/reportSummaryTrend.scss +++ b/src/routes/components/reports/reportSummary/reportSummaryTrend.scss @@ -1,5 +1,5 @@ @import url("~@patternfly/patternfly/base/patternfly-variables.css"); .chart { - margin-nottom: var(--pf-global--spacer--sm); + margin-nottom: var(--pf-v5-global--spacer--sm); } diff --git a/src/routes/components/reports/reportSummary/reportSummaryUsage.scss b/src/routes/components/reports/reportSummary/reportSummaryUsage.scss index c9f1e03a97..22b63d7963 100644 --- a/src/routes/components/reports/reportSummary/reportSummaryUsage.scss +++ b/src/routes/components/reports/reportSummary/reportSummaryUsage.scss @@ -1,5 +1,5 @@ @import url("~@patternfly/patternfly/base/patternfly-variables.css"); .chart { - margin-bottom: var(--pf-global--spacer--sm); + margin-bottom: var(--pf-v5-global--spacer--sm); } diff --git a/src/routes/components/resourceTypeahead/resourceInput.tsx b/src/routes/components/resourceTypeahead/resourceInput.tsx index 54db5163bd..f6220ee970 100644 --- a/src/routes/components/resourceTypeahead/resourceInput.tsx +++ b/src/routes/components/resourceTypeahead/resourceInput.tsx @@ -124,17 +124,13 @@ class ResourceInputBase extends React.Component { - const { search } = this.props; - return (
- {search && search.length && ( - - - {this.getMenuItems()} - - - )} + + + {this.getMenuItems()} + +
); }; diff --git a/src/routes/components/state/emptyFilterState/emptyFilterState.tsx b/src/routes/components/state/emptyFilterState/emptyFilterState.tsx index 6da659ebab..c2593d564f 100644 --- a/src/routes/components/state/emptyFilterState/emptyFilterState.tsx +++ b/src/routes/components/state/emptyFilterState/emptyFilterState.tsx @@ -1,5 +1,5 @@ import type { MessageDescriptor } from '@formatjs/intl/src/types'; -import { EmptyState, EmptyStateBody, EmptyStateIcon, Title, TitleSizes } from '@patternfly/react-core'; +import { EmptyState, EmptyStateBody, EmptyStateHeader, EmptyStateIcon } from '@patternfly/react-core'; import { Bullseye } from '@patternfly/react-core'; import { SearchIcon } from '@patternfly/react-icons/dist/esm/icons/search-icon'; import type { Query } from 'api/queries/query'; @@ -115,9 +115,7 @@ const EmptyFilterStateBase: React.FC = ({ > {getItem()} - - {intl.formatMessage(title)} - + {intl.formatMessage(title)}} headingLevel="h2" /> {intl.formatMessage(subTitle)}
diff --git a/src/routes/components/state/emptyValueState/emptyValueState.scss b/src/routes/components/state/emptyValueState/emptyValueState.scss index 11de799fab..ada2615611 100644 --- a/src/routes/components/state/emptyValueState/emptyValueState.scss +++ b/src/routes/components/state/emptyValueState/emptyValueState.scss @@ -1,5 +1,5 @@ @import url("~@patternfly/patternfly/base/patternfly-variables.css"); .emptyValueContainer { - font-size: var(--pf-global--FontSize--sm); + font-size: var(--pf-v5-global--FontSize--sm); } diff --git a/src/routes/components/state/errorState/errorState.tsx b/src/routes/components/state/errorState/errorState.tsx index 579bb821eb..9daa76d01a 100644 --- a/src/routes/components/state/errorState/errorState.tsx +++ b/src/routes/components/state/errorState/errorState.tsx @@ -1,10 +1,9 @@ import { EmptyState, EmptyStateBody, + EmptyStateHeader, EmptyStateIcon, EmptyStateVariant, - Title, - TitleSizes, } from '@patternfly/react-core'; import { ErrorCircleOIcon } from '@patternfly/react-icons/dist/esm/icons/error-circle-o-icon'; import { LockIcon } from '@patternfly/react-icons/dist/esm/icons/lock-icon'; @@ -30,11 +29,8 @@ const ErrorStateBase: React.FC = ({ error, icon = ErrorCircleOI } return ( - - - - {title} - + + {title}} icon={} headingLevel="h5" /> {subTitle} ); diff --git a/src/routes/components/state/loadingState/loadingState.tsx b/src/routes/components/state/loadingState/loadingState.tsx index 6e2eb0ca3b..eed2a95d8f 100644 --- a/src/routes/components/state/loadingState/loadingState.tsx +++ b/src/routes/components/state/loadingState/loadingState.tsx @@ -1,4 +1,4 @@ -import { EmptyState, EmptyStateBody, EmptyStateVariant, Spinner, Title, TitleSizes } from '@patternfly/react-core'; +import { EmptyState, EmptyStateBody, EmptyStateHeader, EmptyStateVariant, Spinner } from '@patternfly/react-core'; import { intl as defaultIntl } from 'components/i18n'; import messages from 'locales/messages'; import React from 'react'; @@ -19,11 +19,9 @@ const LoadingStateBase: React.FC = ({ heading = intl.formatMessage(messages.loadingStateTitle), }) => { return ( - + - - {heading} - + {heading}} headingLevel="h5" /> {body} ); diff --git a/src/routes/costModels/components/__snapshots__/rateTable.test.tsx.snap b/src/routes/costModels/components/__snapshots__/rateTable.test.tsx.snap index 0251cde18b..12b6b07f3c 100644 --- a/src/routes/costModels/components/__snapshots__/rateTable.test.tsx.snap +++ b/src/routes/costModels/components/__snapshots__/rateTable.test.tsx.snap @@ -3,22 +3,26 @@ exports[`rate-table sort by metric & measurement 1`] = ` [ {value, select, cpu {CPU} cluster {Cluster} memory {Memory} node {Node} persistent_volume_claims {Persistent volume claims} storage {Storage} other {}}{"value":"Node"} , {value, select, cpu {CPU} cluster {Cluster} memory {Memory} node {Node} persistent_volume_claims {Persistent volume claims} storage {Storage} other {}}{"value":"CPU"} , {value, select, cpu {CPU} cluster {Cluster} memory {Memory} node {Node} persistent_volume_claims {Persistent volume claims} storage {Storage} other {}}{"value":"CPU"} , {value, select, cpu {CPU} cluster {Cluster} memory {Memory} node {Node} persistent_volume_claims {Persistent volume claims} storage {Storage} other {}}{"value":"CPU"} , diff --git a/src/routes/costModels/components/__snapshots__/warningIcon.test.tsx.snap b/src/routes/costModels/components/__snapshots__/warningIcon.test.tsx.snap index d0379a6883..10ecfed78b 100644 --- a/src/routes/costModels/components/__snapshots__/warningIcon.test.tsx.snap +++ b/src/routes/costModels/components/__snapshots__/warningIcon.test.tsx.snap @@ -3,10 +3,11 @@ exports[`warning icon 1`] = `
+
); }; diff --git a/src/routes/costModels/components/rateForm/rateForm.tsx b/src/routes/costModels/components/rateForm/rateForm.tsx index 47220e2e78..f8fd9ad2f6 100644 --- a/src/routes/costModels/components/rateForm/rateForm.tsx +++ b/src/routes/costModels/components/rateForm/rateForm.tsx @@ -103,7 +103,7 @@ const RateFormBase: React.FC = ({ currencyUnits, intl = defaultIn value={description} validated={errors.description ? 'error' : 'default'} helperTextInvalid={errors.description} - onChange={setDescription} + onChange={(_evt, value) => setDescription(value)} /> @@ -115,7 +115,7 @@ const RateFormBase: React.FC = ({ currencyUnits, intl = defaultIn label={intl.formatMessage(messages.metric)} placeholderText={intl.formatMessage(messages.select)} value={metric} - onChange={setMetric} + onChange={(_evt, value) => setMetric(value)} options={[ ...metricOptions.map(opt => { return { @@ -142,7 +142,7 @@ const RateFormBase: React.FC = ({ currencyUnits, intl = defaultIn ? measurement : getMeasurementLabel(measurement, metricsHash[metric][measurement].label_measurement_unit) } - onChange={setMeasurement} + onChange={(_evt, value) => setMeasurement(value)} placeholderText="Select..." options={[ ...measurementOptions.map(opt => { @@ -197,7 +197,7 @@ const RateFormBase: React.FC = ({ currencyUnits, intl = defaultIn currencyUnits={currencyUnits} fieldId="regular-rate" helperTextInvalid={errors.tieredRates} - onChange={setRegular} + onChange={(_evt, value) => setRegular(value)} style={style} validated={errors.tieredRates && regularDirty ? 'error' : 'default'} value={inputValue} @@ -208,7 +208,7 @@ const RateFormBase: React.FC = ({ currencyUnits, intl = defaultIn isRequired style={style} value={tagKey} - onChange={setTagKey} + onChange={(_evt, value) => setTagKey(value)} id="tag-key" label={messages.costModelsFilterTagKey} placeholder={intl.formatMessage(messages.costModelsEnterTagKey)} diff --git a/src/routes/costModels/components/rateForm/taggingRatesForm.tsx b/src/routes/costModels/components/rateForm/taggingRatesForm.tsx index 83fe854870..bf8142ae89 100644 --- a/src/routes/costModels/components/rateForm/taggingRatesForm.tsx +++ b/src/routes/costModels/components/rateForm/taggingRatesForm.tsx @@ -53,7 +53,7 @@ const TaggingRatesFormBase: React.FC = ({ label={messages.costModelsTagRateTableValue} placeholder={intl.formatMessage(messages.costModelsEnterTagValue)} value={tag.tagValue} - onChange={value => updateTag({ tagValue: value }, ix)} + onChange={(_evt, value) => updateTag({ tagValue: value }, ix)} validated={tagValues[ix].isTagValueDirty && errors.tagValueValues[ix] ? 'error' : 'default'} helperTextInvalid={errors.tagValueValues[ix]} /> @@ -63,7 +63,7 @@ const TaggingRatesFormBase: React.FC = ({ currencyUnits={currencyUnits} fieldId={`rate_${ix}`} helperTextInvalid={errors.tagValues[ix]} - onChange={value => updateTag({ value }, ix)} + onChange={(_evt, value) => updateTag({ value }, ix)} style={style} validated={tagValues[ix].isDirty && errors.tagValues[ix] ? 'error' : 'default'} value={tag.inputValue} @@ -77,7 +77,7 @@ const TaggingRatesFormBase: React.FC = ({ validated={errors.tagDescription[ix] ? 'error' : 'default'} placeholder={intl.formatMessage(messages.costModelsEnterTagDesc)} value={tag.description} - onChange={value => updateTag({ description: value }, ix)} + onChange={(_evt, value) => updateTag({ description: value }, ix)} helperTextInvalid={errors.tagDescription[ix]} /> diff --git a/src/routes/costModels/components/rateTable.tsx b/src/routes/costModels/components/rateTable.tsx index f922eb2954..ea488dbbf7 100644 --- a/src/routes/costModels/components/rateTable.tsx +++ b/src/routes/costModels/components/rateTable.tsx @@ -2,7 +2,7 @@ import type { IActions, ThProps } from '@patternfly/react-table'; import { ActionsColumn, ExpandableRowContent, - TableComposable, + Table /* data-codemods */, TableVariant, Tbody, Td, @@ -89,7 +89,7 @@ const RateTableBase: React.FC = ({ direction: activeSortDirection, defaultDirection: 'asc', }, - onSort: (_event, index, direction) => { + onSort: (_evt, index, direction) => { setActiveSortIndex(index); setActiveSortDirection(direction); sortCallback({ index, direction }); @@ -122,10 +122,7 @@ const RateTableBase: React.FC = ({ }); return ( - + {columns.map((col: { title?: string; sortable?: boolean }, i) => ( @@ -170,7 +167,7 @@ const RateTableBase: React.FC = ({ @@ -197,7 +194,7 @@ const RateTableBase: React.FC = ({ ); })} - +
- + {tagColumns.map((tag, tagIndex) => ( @@ -189,7 +186,7 @@ const RateTableBase: React.FC = ({ ))} - +
); }; diff --git a/src/routes/costModels/components/toolbar/checkboxSelector.tsx b/src/routes/costModels/components/toolbar/checkboxSelector.tsx index 4518c2e488..e763600037 100644 --- a/src/routes/costModels/components/toolbar/checkboxSelector.tsx +++ b/src/routes/costModels/components/toolbar/checkboxSelector.tsx @@ -1,4 +1,4 @@ -import { Select, SelectOption, SelectVariant } from '@patternfly/react-core'; +import { Select, SelectOption, SelectVariant } from '@patternfly/react-core/deprecated'; import React from 'react'; import { WithStateMachine } from 'routes/costModels/components/hoc/withStateMachine'; import { selectMachineState } from 'routes/costModels/components/logic/selectStateMachine'; diff --git a/src/routes/costModels/components/toolbar/primarySelector.tsx b/src/routes/costModels/components/toolbar/primarySelector.tsx index a9485bfb0b..a383fcb483 100644 --- a/src/routes/costModels/components/toolbar/primarySelector.tsx +++ b/src/routes/costModels/components/toolbar/primarySelector.tsx @@ -1,4 +1,4 @@ -import { Select, SelectOption } from '@patternfly/react-core'; +import { Select, SelectOption } from '@patternfly/react-core/deprecated'; import { FilterIcon } from '@patternfly/react-icons/dist/esm/icons/filter-icon'; import React from 'react'; import { WithStateMachine } from 'routes/costModels/components/hoc/withStateMachine'; diff --git a/src/routes/costModels/costModel/__snapshots__/dialog.test.tsx.snap b/src/routes/costModels/costModel/__snapshots__/dialog.test.tsx.snap index 8b19b8da9d..2db1195f93 100644 --- a/src/routes/costModels/costModel/__snapshots__/dialog.test.tsx.snap +++ b/src/routes/costModels/costModel/__snapshots__/dialog.test.tsx.snap @@ -2,17 +2,18 @@ exports[`dialog title renders correctly with icon and title text 1`] = `

- ) : undefined, + tooltipProps: { + content: !isWritePermission ? ( +
{intl.formatMessage(messages.readOnlyPermissions)}
+ ) : undefined, + }, onClick: (_evt, _rowIndex, rowData) => { this.setState({ deleteRate: null, @@ -329,9 +331,11 @@ class PriceListTable extends React.Component{intl.formatMessage(messages.readOnlyPermissions)}

- ) : undefined, + tooltipProps: { + content: !isWritePermission ? ( +
{intl.formatMessage(messages.readOnlyPermissions)}
+ ) : undefined, + }, onClick: (_evt, _rowIndex, rowData) => { const rowIndex = rowData.data.stateIndex; this.setState({ @@ -372,7 +376,7 @@ class PriceListTable extends React.Component = ({ canWrite, costModels, intl, return [ { style: { pointerEvents: 'auto' }, - tooltip: intl.formatMessage(messages.readOnlyPermissions), + tooltipProps: { + content: intl.formatMessage(messages.readOnlyPermissions), + }, isDisabled: true, title: intl.formatMessage(messages.costModelsSourceDelete), }, @@ -45,7 +56,7 @@ const SourcesTable: React.FC = ({ canWrite, costModels, intl, const rows: (IRow | string[])[] = costModels.length > 0 ? costModels[0].sources.map(source => [source.name]) : []; return ( - = ({ canWrite, costModels, intl, ))} - + ); }; diff --git a/src/routes/costModels/costModel/sourcesToolbar.tsx b/src/routes/costModels/costModel/sourcesToolbar.tsx index 44076f5f31..07d2bf2e1d 100644 --- a/src/routes/costModels/costModel/sourcesToolbar.tsx +++ b/src/routes/costModels/costModel/sourcesToolbar.tsx @@ -2,6 +2,7 @@ import type { ButtonProps, PaginationProps } from '@patternfly/react-core'; import { Button, InputGroup, + InputGroupItem, InputGroupText, Pagination, TextInput, @@ -19,26 +20,28 @@ import { ReadOnlyTooltip } from 'routes/costModels/components/readOnlyTooltip'; interface FilterInputProps { id: string; value: string; - onChange: (value: string, event: React.FormEvent) => void; - onSearch: (evt: React.KeyboardEvent) => void; + onChange: (value: string) => void; + onSearch: (event: React.KeyboardEvent) => void; placeholder?: string; } const FilterInput: React.FC = ({ id, placeholder = '', value, onChange, onSearch }) => { return ( - ) => { - if (evt.key !== 'Enter' || value === '') { - return; - } - onSearch(evt); - }} - /> + + onChange(val)} + onKeyPress={(evt: React.KeyboardEvent) => { + if (evt.key !== 'Enter' || value === '') { + return; + } + onSearch(evt); + }} + /> + diff --git a/src/routes/costModels/costModel/table.tsx b/src/routes/costModels/costModel/table.tsx index 6a25cd07c3..cc44c73f1a 100644 --- a/src/routes/costModels/costModel/table.tsx +++ b/src/routes/costModels/costModel/table.tsx @@ -1,4 +1,11 @@ -import { EmptyState, EmptyStateBody, EmptyStateIcon, Title, TitleSizes } from '@patternfly/react-core'; +import { + EmptyState, + EmptyStateBody, + EmptyStateHeader, + EmptyStateIcon, + Title, + TitleSizes, +} from '@patternfly/react-core'; import { PlusCircleIcon } from '@patternfly/react-icons/dist/esm/icons/plus-circle-icon'; import type { CostModel } from 'api/costModels'; import messages from 'locales/messages'; @@ -118,10 +125,11 @@ class TableBase extends React.Component { {rows.length === 0 && (
- - - {intl.formatMessage(messages.costModelsSourceEmptyStateDesc)} - + {intl.formatMessage(messages.costModelsSourceEmptyStateDesc)}} + icon={} + headingLevel="h2" + /> {intl.formatMessage(messages.costModelsSourceEmptyStateTitle)}
diff --git a/src/routes/costModels/costModel/updateCostModel.tsx b/src/routes/costModels/costModel/updateCostModel.tsx index 4f9bfef1b4..8aa4a07078 100644 --- a/src/routes/costModels/costModel/updateCostModel.tsx +++ b/src/routes/costModels/costModel/updateCostModel.tsx @@ -93,7 +93,7 @@ class UpdateCostModelBase extends React.Component this.setState({ name: value })} + onChange={(_evt, value) => this.setState({ name: value })} /> @@ -102,7 +102,7 @@ class UpdateCostModelBase extends React.Component this.setState({ description: value })} + onChange={(_evt, value) => this.setState({ description: value })} /> diff --git a/src/routes/costModels/costModel/updateDistributionDialog.tsx b/src/routes/costModels/costModel/updateDistributionDialog.tsx index fd16b7b882..0265a36733 100644 --- a/src/routes/costModels/costModel/updateDistributionDialog.tsx +++ b/src/routes/costModels/costModel/updateDistributionDialog.tsx @@ -61,17 +61,17 @@ class UpdateDistributionDialogBase extends React.Component< }; } - private handleDistributionChange = (_, event) => { + private handleDistributionChange = event => { const { value } = event.currentTarget; this.setState({ distribution: value }); }; - private handleDistributePlatformUnallocatedChange = (_, event) => { + private handleDistributePlatformUnallocatedChange = event => { const { value } = event.currentTarget; this.setState({ distributePlatformUnallocated: value === 'true' }); }; - private handleDistributeWorkerUnallocatedChange = (_, event) => { + private handleDistributeWorkerUnallocatedChange = event => { const { value } = event.currentTarget; this.setState({ distributeWorkerUnallocated: value === 'true' }); }; diff --git a/src/routes/costModels/costModel/updateMarkupDialog.tsx b/src/routes/costModels/costModel/updateMarkupDialog.tsx index 74857dd8ae..50c1f675bc 100644 --- a/src/routes/costModels/costModel/updateMarkupDialog.tsx +++ b/src/routes/costModels/costModel/updateMarkupDialog.tsx @@ -5,7 +5,10 @@ import { FlexItem, Form, FormGroup, + HelperText, + HelperTextItem, InputGroup, + InputGroupItem, InputGroupText, List, ListItem, @@ -66,12 +69,12 @@ class UpdateMarkupDialogBase extends React.Component { + private handleOnSignChange = event => { const { value } = event.currentTarget; this.setState({ isDiscount: value === 'true' }); }; - private handleOnMarkupDiscountChange = (_, event) => { + private handleOnMarkupDiscountChange = event => { const { value } = event.currentTarget; this.setState({ markup: value }); @@ -187,34 +190,36 @@ class UpdateMarkupDialogBase extends React.Component
- + {isDiscount ? intl.formatMessage(messages.discountMinus) : intl.formatMessage(messages.markupPlus)} - + + + {intl.formatMessage(messages.percentSymbol)} + {validated === 'error' && ( + + {intl.formatMessage(helpText)} + + )}
diff --git a/src/routes/costModels/costModelWizard/assignSourcesToolbar.tsx b/src/routes/costModels/costModelWizard/assignSourcesToolbar.tsx index c0ab3f66fb..3d49c49407 100644 --- a/src/routes/costModels/costModelWizard/assignSourcesToolbar.tsx +++ b/src/routes/costModels/costModelWizard/assignSourcesToolbar.tsx @@ -1,6 +1,7 @@ import type { PaginationProps } from '@patternfly/react-core'; import { InputGroup, + InputGroupItem, InputGroupText, Pagination, TextInput, @@ -20,26 +21,28 @@ import { injectIntl } from 'react-intl'; interface FilterInputProps { id: string; value: string; - onChange: (value: string, event: React.FormEvent) => void; - onSearch: (evt: React.KeyboardEvent) => void; + onChange: (value: string) => void; + onSearch: (event: React.KeyboardEvent) => void; placeholder?: string; } const FilterInput: React.FC = ({ id, placeholder = '', value, onChange, onSearch }) => { return ( - ) => { - if (evt.key !== 'Enter' || value === '') { - return; - } - onSearch(evt); - }} - /> + + onChange(val)} + onKeyPress={(evt: React.KeyboardEvent) => { + if (evt.key !== 'Enter' || value === '') { + return; + } + onSearch(evt); + }} + /> + @@ -85,7 +88,7 @@ export const AssignSourcesToolbarBase: React.FC = onSetPage={paginationProps.onSetPage} onPerPageSelect={paginationProps.onPerPageSelect} titles={{ - paginationTitle: intl.formatMessage(messages.paginationTitle, { + paginationAriaLabel: intl.formatMessage(messages.paginationTitle, { title: intl.formatMessage(messages.costModelsAssignSourcesParen), placement: 'bottom', }), diff --git a/src/routes/costModels/costModelWizard/context.ts b/src/routes/costModels/costModelWizard/context.ts index 603780bc13..7e49f7583c 100644 --- a/src/routes/costModels/costModelWizard/context.ts +++ b/src/routes/costModels/costModelWizard/context.ts @@ -35,8 +35,8 @@ export const defaultCostModelContext = { onCurrencyChange: (value: string) => null, onDescChange: (value: string) => null, onFilterChange: (value: string) => null, - onPageChange: (_evt, value: number) => null, - onPerPageChange: (_evt, value: number) => null, + onPageChange: (value: number) => null, + onPerPageChange: (value: number) => null, onTypeChange: (value: string) => null, onNameChange: (value: string) => null, onSourceSelect: (...args: any[]) => null, @@ -45,8 +45,8 @@ export const defaultCostModelContext = { priceListPagination: { page: 1, perPage: 4, - onPerPageSet: (_evt, perPage: number) => null, - onPageSet: (_evt, page: number) => null, + onPerPageSet: (perPage: number) => null, + onPageSet: (page: number) => null, }, query: {}, step: 1, diff --git a/src/routes/costModels/costModelWizard/costModelWizard.tsx b/src/routes/costModels/costModelWizard/costModelWizard.tsx index 1c7292f2d8..757f0477cf 100644 --- a/src/routes/costModels/costModelWizard/costModelWizard.tsx +++ b/src/routes/costModels/costModelWizard/costModelWizard.tsx @@ -1,6 +1,7 @@ -import type { WizardStepFunctionType } from '@patternfly/react-core'; -import { Title, TitleSizes, Wizard } from '@patternfly/react-core'; +import { Title, TitleSizes } from '@patternfly/react-core'; import { Button, Modal } from '@patternfly/react-core'; +import type { WizardStepFunctionType } from '@patternfly/react-core/deprecated'; +import { Wizard } from '@patternfly/react-core/deprecated'; import { ExclamationTriangleIcon } from '@patternfly/react-icons/dist/esm/icons/exclamation-triangle-icon'; import { addCostModel } from 'api/costModels'; import type { MetricHash } from 'api/metrics'; @@ -413,23 +414,23 @@ class CostModelWizardBase extends React.Component { + handleDistributionChange: event => { const { value } = event.currentTarget; this.setState({ distribution: value }); }, - handleDistributePlatformUnallocatedChange: (_, event) => { + handleDistributePlatformUnallocatedChange: event => { const { value } = event.currentTarget; this.setState({ distributePlatformUnallocated: value === 'true' }); }, - handleDistributeWorkerUnallocatedChange: (_, event) => { + handleDistributeWorkerUnallocatedChange: event => { const { value } = event.currentTarget; this.setState({ distributeWorkerUnallocated: value === 'true' }); }, - handleMarkupDiscountChange: (_, event) => { + handleMarkupDiscountChange: event => { const { value } = event.currentTarget; this.setState({ markup: value }); }, - handleSignChange: (_, event) => { + handleSignChange: event => { const { value } = event.currentTarget; this.setState({ isDiscount: value === 'true' }); }, @@ -437,14 +438,14 @@ class CostModelWizardBase extends React.Component this.setState({ ...this.defaultState }, this.props.closeWizard), - onCurrencyChange: value => + onCurrencyChange: (value: string) => this.setState({ currencyUnits: value, tiers: updateTiersCurrency(this.state.tiers, value) }), - onDescChange: value => this.setState({ description: value }), - onFilterChange: value => this.setState({ filterName: value }), - onNameChange: value => this.setState({ name: value, dirtyName: true }), - onPageChange: (_evt, page) => this.setState({ page }), - onPerPageChange: (_evt, perPage) => this.setState({ page: 1, perPage }), - onSourceSelect: (rowId, isSelected) => { + onDescChange: (value: string) => this.setState({ description: value }), + onFilterChange: (value: string) => this.setState({ filterName: value }), + onNameChange: (value: string) => this.setState({ name: value, dirtyName: true }), + onPageChange: (page: number) => this.setState({ page }), + onPerPageChange: (perPage: number) => this.setState({ page: 1, perPage }), + onSourceSelect: (rowId: number, isSelected: boolean) => { if (rowId === -1) { const pageSelections = this.state.sources.map(s => ({ [s.uuid]: { selected: isSelected, meta: s }, @@ -464,19 +465,19 @@ class CostModelWizardBase extends React.Component this.setState({ type: value, dataFetched: false, loading: false }), + onTypeChange: (value: string) => this.setState({ type: value, dataFetched: false, loading: false }), page: this.state.page, priceListPagination: { page: this.state.priceListPagination.page, perPage: this.state.priceListPagination.perPage, - onPageSet: (_evt, page) => + onPageSet: (page: number) => this.setState({ priceListPagination: { ...this.state.priceListPagination, page, }, }), - onPerPageSet: (_evt, perPage) => + onPerPageSet: (perPage: number) => this.setState({ priceListPagination: { page: 1, diff --git a/src/routes/costModels/costModelWizard/generalInformation.tsx b/src/routes/costModels/costModelWizard/generalInformation.tsx index ea3aff6c56..8a54eede28 100644 --- a/src/routes/costModels/costModelWizard/generalInformation.tsx +++ b/src/routes/costModels/costModelWizard/generalInformation.tsx @@ -1,6 +1,7 @@ import { FormGroup, - SelectDirection, + HelperText, + HelperTextItem, Stack, StackItem, TextArea, @@ -8,6 +9,7 @@ import { Title, TitleSizes, } from '@patternfly/react-core'; +import { SelectDirection } from '@patternfly/react-core/deprecated'; import messages from 'locales/messages'; import React from 'react'; import type { WrappedComponentProps } from 'react-intl'; @@ -89,13 +91,7 @@ class GeneralInformation extends React.Component {
- + { id="name" name="name" value={name} - onChange={onNameChange} + onChange={(_evt, value) => onNameChange(value)} /> + {dirtyName && nameErrors(name) && ( + + {intl.formatMessage(nameErrors(name))} + + )} - +