diff --git a/apps/assisted-ui/package.json b/apps/assisted-ui/package.json index bbc0e000aa..36463eec24 100644 --- a/apps/assisted-ui/package.json +++ b/apps/assisted-ui/package.json @@ -3,12 +3,9 @@ "@openshift-assisted/chatbot": "workspace:*", "@openshift-assisted/ui-lib": "workspace:*", "@openshift-console/dynamic-plugin-sdk": "0.0.3", - "@patternfly-6/chatbot": "npm:@patternfly/chatbot@6.3.2", - "@patternfly-6/patternfly": "npm:@patternfly/patternfly@6.2.2", - "@patternfly-6/react-core": "npm:@patternfly/react-core@6.2.2", - "@patternfly-6/react-icons": "npm:@patternfly/react-icons@6.2.2", - "@patternfly-6/react-styles": "npm:@patternfly/react-styles@6.2.2", - "@patternfly-6/react-tokens": "npm:@patternfly/react-tokens@6.2.2", + "@patternfly-6/patternfly": "npm:@patternfly/patternfly@6.3.1", + "@patternfly-6/react-core": "npm:@patternfly/react-core@6.3.1", + "@patternfly/chatbot": "6.4.0-prerelease.4", "@patternfly/patternfly": "5.2.0", "@patternfly/react-code-editor": "5.2.0", "@patternfly/react-core": "5.2.0", diff --git a/apps/assisted-ui/src/components/Chatbot.tsx b/apps/assisted-ui/src/components/Chatbot.tsx index 39cb96af23..72c9a9f80b 100644 --- a/apps/assisted-ui/src/components/Chatbot.tsx +++ b/apps/assisted-ui/src/components/Chatbot.tsx @@ -3,8 +3,8 @@ import { ChatBot as AIChatBot, ChatBotWindowProps } from '@openshift-assisted/ch import { useNavigate } from 'react-router-dom-v5-compat'; import '@patternfly-6/react-core/dist/styles/base.css'; -import '@patternfly-6/chatbot/dist/css/main.css'; -import '@patternfly-6/patternfly/dist/patternfly-addons.css'; +import '@patternfly/chatbot/dist/css/main.css'; +import '@patternfly-6/patternfly/patternfly-addons.css'; export const refreshToken = (import.meta.env.AIUI_OCM_REFRESH_TOKEN as string | undefined) || window.OCM_REFRESH_TOKEN; diff --git a/libs/chatbot/lib/components/ChatBot/BotMessage.tsx b/libs/chatbot/lib/components/ChatBot/BotMessage.tsx index 2cba71e333..20c7fbba64 100644 --- a/libs/chatbot/lib/components/ChatBot/BotMessage.tsx +++ b/libs/chatbot/lib/components/ChatBot/BotMessage.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; -import { Message } from '@patternfly-6/chatbot'; -import MessageLoading from '@patternfly-6/chatbot/dist/cjs/Message/MessageLoading'; +import { Message } from '@patternfly/chatbot'; +import MessageLoading from '@patternfly/chatbot/dist/cjs/Message/MessageLoading'; import { MsgProps } from './helpers'; import { Button, Stack, StackItem } from '@patternfly-6/react-core'; import { saveAs } from 'file-saver'; diff --git a/libs/chatbot/lib/components/ChatBot/ChatBot.tsx b/libs/chatbot/lib/components/ChatBot/ChatBot.tsx index f1ef3cf33b..80eb68b116 100644 --- a/libs/chatbot/lib/components/ChatBot/ChatBot.tsx +++ b/libs/chatbot/lib/components/ChatBot/ChatBot.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import { ChatbotToggle } from '@patternfly-6/chatbot'; +import { ChatbotToggle } from '@patternfly/chatbot'; import ChatBotWindow, { ChatBotWindowProps } from './ChatBotWindow'; import { useMessages } from '../../hooks/use-message'; diff --git a/libs/chatbot/lib/components/ChatBot/ChatBotHistory.tsx b/libs/chatbot/lib/components/ChatBot/ChatBotHistory.tsx index 0895abfe6e..27129dbe3f 100644 --- a/libs/chatbot/lib/components/ChatBot/ChatBotHistory.tsx +++ b/libs/chatbot/lib/components/ChatBot/ChatBotHistory.tsx @@ -3,7 +3,7 @@ import { ChatbotConversationHistoryNav, ChatbotDisplayMode, Conversation, -} from '@patternfly-6/chatbot'; +} from '@patternfly/chatbot'; import { Alert } from '@patternfly-6/react-core'; import { getErrorMessage } from './helpers'; @@ -40,7 +40,7 @@ const ChatBotHistory = ({ setError(undefined); void (async () => { try { - const resp = await onApiCall('/v1/conversations'); + const resp = await onApiCall('/v1/conversations', { signal: abortController.signal }); if (!resp.ok) { throw Error(`Unexpected response code: ${resp.status}`); } @@ -54,7 +54,7 @@ const ChatBotHistory = ({ })), ); } catch (e) { - // aborting fetch trows 'AbortError', we can ignore it + // aborting fetch throws 'AbortError', we can ignore it if (abortController.signal.aborted) { return; } diff --git a/libs/chatbot/lib/components/ChatBot/ChatBotWindow.tsx b/libs/chatbot/lib/components/ChatBot/ChatBotWindow.tsx index b8841f1c04..8a4f3dc299 100644 --- a/libs/chatbot/lib/components/ChatBot/ChatBotWindow.tsx +++ b/libs/chatbot/lib/components/ChatBot/ChatBotWindow.tsx @@ -17,7 +17,7 @@ import { MessageBar, MessageBox, MessageBoxHandle, -} from '@patternfly-6/chatbot'; +} from '@patternfly/chatbot'; import { Brand, EmptyState, Spinner } from '@patternfly-6/react-core'; import BotMessage from './BotMessage'; @@ -181,6 +181,7 @@ const ChatBotWindow = ({ width: 48, }, }} + isMarkdownDisabled /> ); })} diff --git a/libs/chatbot/lib/components/ChatBot/helpers.ts b/libs/chatbot/lib/components/ChatBot/helpers.ts index 2752b5c02c..af92bb5e83 100644 --- a/libs/chatbot/lib/components/ChatBot/helpers.ts +++ b/libs/chatbot/lib/components/ChatBot/helpers.ts @@ -1,5 +1,5 @@ import isString from 'lodash-es/isString.js'; -import { Message } from '@patternfly-6/chatbot'; +import { Message } from '@patternfly/chatbot'; import { validate as uuidValidate } from 'uuid'; type MsgAction = { title: string; url?: string; clusterId?: string }; diff --git a/libs/chatbot/package.json b/libs/chatbot/package.json index a54bce49a9..d6c37dc62a 100644 --- a/libs/chatbot/package.json +++ b/libs/chatbot/package.json @@ -32,12 +32,17 @@ "lint": "yarn run -T eslint --cache --cache-location node_modules/.cache/eslint/.eslint-cache ." }, "dependencies": { - "@patternfly-6/chatbot": "npm:@patternfly/chatbot@6.3.2", - "@patternfly-6/patternfly": "npm:@patternfly/patternfly@6.2.2", - "@patternfly-6/react-core": "npm:@patternfly/react-core@6.2.2", - "@patternfly-6/react-icons": "npm:@patternfly/react-icons@6.2.2", - "@patternfly-6/react-styles": "npm:@patternfly/react-styles@6.2.2", - "@patternfly-6/react-tokens": "npm:@patternfly/react-tokens@6.2.2", + "@patternfly-6/patternfly": "npm:@patternfly/patternfly@6.3.1", + "@patternfly-6/react-core": "npm:@patternfly/react-core@6.3.1", + "@patternfly-6/react-icons": "npm:@patternfly/react-icons@6.3.1", + "@patternfly-6/react-styles": "npm:@patternfly/react-styles@6.3.1", + "@patternfly-6/react-tokens": "npm:@patternfly/react-tokens@6.3.1", + "@patternfly/chatbot": "6.4.0-prerelease.4", + "@patternfly/patternfly": "6.3.1", + "@patternfly/react-core": "6.3.1", + "@patternfly/react-icons": "6.3.1", + "@patternfly/react-styles": "6.3.1", + "@patternfly/react-tokens": "6.3.1", "file-saver": "^2.0.2", "lodash-es": "^4.17.21", "uuid": "^8.1" diff --git a/package.json b/package.json index cb9ce31894..9182aa7667 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,8 @@ "packageManager": "yarn@3.4.1", "private": true, "resolutions": { - "@types/react": "17.0.x" + "@types/react": "17.0.x", + "@patternfly/chatbot/@patternfly/react-icons": "6.3.1" }, "scripts": { "_build:lib": "yarn workspace @openshift-assisted/ui-lib build && yarn workspace @openshift-assisted/chatbot build", diff --git a/yarn.lock b/yarn.lock index 1e73f9e30e..547875bfaf 100644 --- a/yarn.lock +++ b/yarn.lock @@ -792,12 +792,9 @@ __metadata: "@openshift-assisted/chatbot": "workspace:*" "@openshift-assisted/ui-lib": "workspace:*" "@openshift-console/dynamic-plugin-sdk": 0.0.3 - "@patternfly-6/chatbot": "npm:@patternfly/chatbot@6.3.2" - "@patternfly-6/patternfly": "npm:@patternfly/patternfly@6.2.2" - "@patternfly-6/react-core": "npm:@patternfly/react-core@6.2.2" - "@patternfly-6/react-icons": "npm:@patternfly/react-icons@6.2.2" - "@patternfly-6/react-styles": "npm:@patternfly/react-styles@6.2.2" - "@patternfly-6/react-tokens": "npm:@patternfly/react-tokens@6.2.2" + "@patternfly-6/patternfly": "npm:@patternfly/patternfly@6.3.1" + "@patternfly-6/react-core": "npm:@patternfly/react-core@6.3.1" + "@patternfly/chatbot": 6.4.0-prerelease.4 "@patternfly/patternfly": 5.2.0 "@patternfly/react-code-editor": 5.2.0 "@patternfly/react-core": 5.2.0 @@ -835,12 +832,17 @@ __metadata: version: 0.0.0-use.local resolution: "@openshift-assisted/chatbot@workspace:libs/chatbot" dependencies: - "@patternfly-6/chatbot": "npm:@patternfly/chatbot@6.3.2" - "@patternfly-6/patternfly": "npm:@patternfly/patternfly@6.2.2" - "@patternfly-6/react-core": "npm:@patternfly/react-core@6.2.2" - "@patternfly-6/react-icons": "npm:@patternfly/react-icons@6.2.2" - "@patternfly-6/react-styles": "npm:@patternfly/react-styles@6.2.2" - "@patternfly-6/react-tokens": "npm:@patternfly/react-tokens@6.2.2" + "@patternfly-6/patternfly": "npm:@patternfly/patternfly@6.3.1" + "@patternfly-6/react-core": "npm:@patternfly/react-core@6.3.1" + "@patternfly-6/react-icons": "npm:@patternfly/react-icons@6.3.1" + "@patternfly-6/react-styles": "npm:@patternfly/react-styles@6.3.1" + "@patternfly-6/react-tokens": "npm:@patternfly/react-tokens@6.3.1" + "@patternfly/chatbot": 6.4.0-prerelease.4 + "@patternfly/patternfly": 6.3.1 + "@patternfly/react-core": 6.3.1 + "@patternfly/react-icons": 6.3.1 + "@patternfly/react-styles": 6.3.1 + "@patternfly/react-tokens": 6.3.1 "@tsconfig/recommended": ^1.0.2 "@types/node": ^18.14.6 "@types/react": ^18.0.0 @@ -1011,9 +1013,57 @@ __metadata: languageName: node linkType: hard -"@patternfly-6/chatbot@npm:@patternfly/chatbot@6.3.2": - version: 6.3.2 - resolution: "@patternfly/chatbot@npm:6.3.2" +"@patternfly-6/patternfly@npm:@patternfly/patternfly@6.3.1, @patternfly/patternfly@npm:6.3.1": + version: 6.3.1 + resolution: "@patternfly/patternfly@npm:6.3.1" + checksum: ad3a7e94f7880d16210ff02dc09954895f81f9bdc4dee77f3e974b12cf7f398fe62321d26bbce8e876f8c13d4d7910cffd2b37855c90e8990d430903edf86767 + languageName: node + linkType: hard + +"@patternfly-6/react-core@npm:@patternfly/react-core@6.3.1, @patternfly/react-core@npm:6.3.1": + version: 6.3.1 + resolution: "@patternfly/react-core@npm:6.3.1" + dependencies: + "@patternfly/react-icons": ^6.3.1 + "@patternfly/react-styles": ^6.3.1 + "@patternfly/react-tokens": ^6.3.1 + focus-trap: 7.6.4 + react-dropzone: ^14.3.5 + tslib: ^2.8.1 + peerDependencies: + react: ^17 || ^18 || ^19 + react-dom: ^17 || ^18 || ^19 + checksum: 06fd4a36214c91886281b9cecf3439e565e286a4a061198d0452d3060e474f1d59304a6814c263c2ada84b61218faf96a373bb094839df87f5616fbb1b7d0f0b + languageName: node + linkType: hard + +"@patternfly-6/react-icons@npm:@patternfly/react-icons@6.3.1, @patternfly/react-icons@npm:6.3.1, @patternfly/react-icons@npm:^6.3.1": + version: 6.3.1 + resolution: "@patternfly/react-icons@npm:6.3.1" + peerDependencies: + react: ^17 || ^18 || ^19 + react-dom: ^17 || ^18 || ^19 + checksum: 4c3ff2c94c46e0ef8923a340dd4a0bc378c38c5a1b208116014a57390f1a8c1d224f769e361c8fe3117d2c886854368914d3ff3425933e44e7522a9596c7621c + languageName: node + linkType: hard + +"@patternfly-6/react-styles@npm:@patternfly/react-styles@6.3.1, @patternfly/react-styles@npm:6.3.1, @patternfly/react-styles@npm:^6.2.2, @patternfly/react-styles@npm:^6.3.1": + version: 6.3.1 + resolution: "@patternfly/react-styles@npm:6.3.1" + checksum: f8b8e8af84af6a68234685557d063be0bdfae41ce3db515ce86191f6a1749cdf295ea610d63c69797c859e31fa94763844a890fb5105d5149134fcb0ab165258 + languageName: node + linkType: hard + +"@patternfly-6/react-tokens@npm:@patternfly/react-tokens@6.3.1, @patternfly/react-tokens@npm:6.3.1, @patternfly/react-tokens@npm:^6.3.1": + version: 6.3.1 + resolution: "@patternfly/react-tokens@npm:6.3.1" + checksum: 7eacc01ae31713ee797ceff5fd1ace80647147fd1065fbe8730fb9523da5743f6cb7acf22dfc3c94bc0b05fa443969482cdb51ffe9a70081b3ef6829812b1992 + languageName: node + linkType: hard + +"@patternfly/chatbot@npm:6.4.0-prerelease.4": + version: 6.4.0-prerelease.4 + resolution: "@patternfly/chatbot@npm:6.4.0-prerelease.4" dependencies: "@patternfly/react-code-editor": ^6.1.0 "@patternfly/react-core": ^6.1.0 @@ -1033,55 +1083,7 @@ __metadata: peerDependencies: react: ^17 || ^18 || ^19 react-dom: ^17 || ^18 || ^19 - checksum: 7ce6a12f84631e982a607304a829cbf8ca3477febaf016b0682170260880b4b5ff334c970b053e79e2e058d5c17f90517e353b98a033b5a37a6a1a9c6dcc452b - languageName: node - linkType: hard - -"@patternfly-6/patternfly@npm:@patternfly/patternfly@6.2.2": - version: 6.2.2 - resolution: "@patternfly/patternfly@npm:6.2.2" - checksum: 2539939fc1fa542962f98a81a838828d9f9beefe4424c1330bc72099c15a9e933f49fbc883ca168814fce5625613168c4fc4dc2adf79e2ab67c40bb7f8267628 - languageName: node - linkType: hard - -"@patternfly-6/react-core@npm:@patternfly/react-core@6.2.2, @patternfly/react-core@npm:^6.1.0, @patternfly/react-core@npm:^6.2.2": - version: 6.2.2 - resolution: "@patternfly/react-core@npm:6.2.2" - dependencies: - "@patternfly/react-icons": ^6.2.2 - "@patternfly/react-styles": ^6.2.2 - "@patternfly/react-tokens": ^6.2.2 - focus-trap: 7.6.4 - react-dropzone: ^14.3.5 - tslib: ^2.8.1 - peerDependencies: - react: ^17 || ^18 - react-dom: ^17 || ^18 - checksum: a9f05ff2127526dad48565b683fec1f13376e736569be4ae5fe70d86ce0d2254f4802ccd9ad0c92ec27b23b26ad299d5451f78ac6d86d583c8083c432bc28b04 - languageName: node - linkType: hard - -"@patternfly-6/react-icons@npm:@patternfly/react-icons@6.2.2, @patternfly/react-icons@npm:^6.1.0, @patternfly/react-icons@npm:^6.2.2": - version: 6.2.2 - resolution: "@patternfly/react-icons@npm:6.2.2" - peerDependencies: - react: ^17 || ^18 - react-dom: ^17 || ^18 - checksum: 59255579f63ad5dd22b4fe9e18b8868a0e9aadf32e26dfd2b9bcaf25c8792fcc2cab187eda7ea8356c915c354cf3adee6a614e60aad4e769791757b26da90929 - languageName: node - linkType: hard - -"@patternfly-6/react-styles@npm:@patternfly/react-styles@6.2.2, @patternfly/react-styles@npm:^6.2.2": - version: 6.2.2 - resolution: "@patternfly/react-styles@npm:6.2.2" - checksum: 77a8ebcf550fba86ef6e3b73fc60e2eba1210d9fa0fd53a415311bf82615fdc5052d2bf79a57c24a2868ccc543a3155b03cb369fb5703452e1d2f4b96f57f4d1 - languageName: node - linkType: hard - -"@patternfly-6/react-tokens@npm:@patternfly/react-tokens@6.2.2, @patternfly/react-tokens@npm:^6.2.2": - version: 6.2.2 - resolution: "@patternfly/react-tokens@npm:6.2.2" - checksum: 27183f771e400c8fcf611545dd46ade39c6459506bcb9aa020346de69dda9717e75665c8aad92609dab93de4c2f0472e7958d1c127b0f722beb552dda3a1fbca + checksum: a731abd75fc79f0546ec4b780c19cf423f5a29946c650a72b2892031ba0194c630e5a23d79f5d56533c75802b7786453ae1caae0cc79d1cf1b6762f9084a9302 languageName: node linkType: hard @@ -1196,6 +1198,23 @@ __metadata: languageName: node linkType: hard +"@patternfly/react-core@npm:^6.1.0, @patternfly/react-core@npm:^6.2.2": + version: 6.2.2 + resolution: "@patternfly/react-core@npm:6.2.2" + dependencies: + "@patternfly/react-icons": ^6.2.2 + "@patternfly/react-styles": ^6.2.2 + "@patternfly/react-tokens": ^6.2.2 + focus-trap: 7.6.4 + react-dropzone: ^14.3.5 + tslib: ^2.8.1 + peerDependencies: + react: ^17 || ^18 + react-dom: ^17 || ^18 + checksum: a9f05ff2127526dad48565b683fec1f13376e736569be4ae5fe70d86ce0d2254f4802ccd9ad0c92ec27b23b26ad299d5451f78ac6d86d583c8083c432bc28b04 + languageName: node + linkType: hard + "@patternfly/react-icons@npm:5.2.0": version: 5.2.0 resolution: "@patternfly/react-icons@npm:5.2.0" @@ -1226,6 +1245,16 @@ __metadata: languageName: node linkType: hard +"@patternfly/react-icons@npm:^6.2.2": + version: 6.2.2 + resolution: "@patternfly/react-icons@npm:6.2.2" + peerDependencies: + react: ^17 || ^18 + react-dom: ^17 || ^18 + checksum: 59255579f63ad5dd22b4fe9e18b8868a0e9aadf32e26dfd2b9bcaf25c8792fcc2cab187eda7ea8356c915c354cf3adee6a614e60aad4e769791757b26da90929 + languageName: node + linkType: hard + "@patternfly/react-styles@npm:5.2.0": version: 5.2.0 resolution: "@patternfly/react-styles@npm:5.2.0" @@ -1241,9 +1270,9 @@ __metadata: linkType: hard "@patternfly/react-styles@npm:^5.2.0, @patternfly/react-styles@npm:^5.3.0": - version: 5.3.0 - resolution: "@patternfly/react-styles@npm:5.3.0" - checksum: c65198ba20d6dda4b41c14c0785c26dd3febfa6534d02c2d3f477a907d488e70b99cabad39b9bea9c423711881ebcccfef7293c696c5c25450f134e1db9361f7 + version: 5.4.1 + resolution: "@patternfly/react-styles@npm:5.4.1" + checksum: 6fb1ec38a017acd1cf1262b39c69f70a650ed7f205d5433c83087957395e6e487914ed1992a67de37718ea536145fc974d7d9dbc6460ae38d668035f4c6d0c1b languageName: node linkType: hard @@ -1319,6 +1348,13 @@ __metadata: languageName: node linkType: hard +"@patternfly/react-tokens@npm:^6.2.2": + version: 6.2.2 + resolution: "@patternfly/react-tokens@npm:6.2.2" + checksum: 27183f771e400c8fcf611545dd46ade39c6459506bcb9aa020346de69dda9717e75665c8aad92609dab93de4c2f0472e7958d1c127b0f722beb552dda3a1fbca + languageName: node + linkType: hard + "@pkgjs/parseargs@npm:^0.11.0": version: 0.11.0 resolution: "@pkgjs/parseargs@npm:0.11.0"