From ab9365ee3a8ea6bd5fbcaec70911ad3537839c68 Mon Sep 17 00:00:00 2001 From: Katie McFaul Date: Mon, 15 Apr 2024 11:21:32 -0400 Subject: [PATCH] update to v6 alphas --- packages/module/package.json | 13 +- .../extensions/react-console/react.js | 5 +- .../SerialConsole/SerialConsole.tsx | 15 +- .../src/components/VncConsole/VncConsole.tsx | 15 +- yarn.lock | 461 ++++++++++++------ 5 files changed, 327 insertions(+), 182 deletions(-) diff --git a/packages/module/package.json b/packages/module/package.json index 168a6f5..d6f79ff 100644 --- a/packages/module/package.json +++ b/packages/module/package.json @@ -34,8 +34,8 @@ }, "dependencies": { "@novnc/novnc": "^1.3.0", - "@patternfly/react-core": "^5.0.0", - "@patternfly/react-styles": "^5.0.0", + "@patternfly/react-core": "6.0.0-alpha.50", + "@patternfly/react-styles": "6.0.0-alpha.19", "@spice-project/spice-html5": "^0.2.1", "file-saver": "^1.3.8", "xterm": "^4.8.1", @@ -46,14 +46,13 @@ "react-dom": "^17 || ^18" }, "devDependencies": { - "@patternfly/documentation-framework": "^5.0.15", - "@patternfly/patternfly": "^5.0.0", + "@patternfly/documentation-framework": "6.0.0-alpha.20", + "@patternfly/patternfly": "6.0.0-alpha.117", "@patternfly/patternfly-a11y": "^4.3.1", - "@patternfly/react-code-editor": "^5.0.0", - "@patternfly/react-table": "^5.0.0", + "@patternfly/react-code-editor": "6.0.0-alpha.50", + "@patternfly/react-table": "6.0.0-alpha.50", "rimraf": "^2.6.2", "serve": "^14.1.2", - "react-monaco-editor": "^0.51.0", "monaco-editor": "^0.34.1" } } diff --git a/packages/module/patternfly-docs/generated/extensions/react-console/react.js b/packages/module/patternfly-docs/generated/extensions/react-console/react.js index 6e03733..3cd33f7 100644 --- a/packages/module/patternfly-docs/generated/extensions/react-console/react.js +++ b/packages/module/patternfly-docs/generated/extensions/react-console/react.js @@ -14,6 +14,7 @@ const pageData = { "section": "extensions", "subsection": "", "deprecated": false, + "template": false, "beta": true, "demo": false, "newImplementationLink": false, @@ -362,9 +363,7 @@ pageData.liveContext = { SerialConsoleCustom, debounce }; -pageData.relativeImports = { - -}; +pageData.relativeImports = "import { SerialConsoleCustom } from 'content/extensions/react-console/examples/./SerialConsoleCustom.jsx';" pageData.examples = { 'Basic Usage': props => {\n const [status, setStatus] = React.useState('disconnected');\n const setConnected = React.useRef(debounce(() => setStatus('connected'), 3000)).current;\n const onConnect = React.useCallback(() => {\n setStatus('loading');\n setConnected();\n }, [setConnected])\n const onDisconnect = React.useCallback(() => setStatus('disconnected'), [])\n const ref = React.createRef();\n\n return (\n \n \n {\n ref.current.onDataReceived(data);\n }}\n ref={ref}\n />\n \n \n \n );\n};","title":"Basic Usage","lang":"js","isFullscreen":true}}> diff --git a/packages/module/src/components/SerialConsole/SerialConsole.tsx b/packages/module/src/components/SerialConsole/SerialConsole.tsx index 8ddc7dd..6d7976e 100644 --- a/packages/module/src/components/SerialConsole/SerialConsole.tsx +++ b/packages/module/src/components/SerialConsole/SerialConsole.tsx @@ -1,15 +1,7 @@ import React from 'react'; import { css } from '@patternfly/react-styles'; -import { - Button, - EmptyState, - EmptyStateBody, - EmptyStateIcon, - Spinner, - EmptyStateHeader, - EmptyStateFooter -} from '@patternfly/react-core'; +import { Button, EmptyState, EmptyStateBody, Spinner, EmptyStateFooter } from '@patternfly/react-core'; import { XTerm, XTermProps } from './XTerm'; import { SerialConsoleActions } from './SerialConsoleActions'; @@ -115,7 +107,7 @@ const SerialConsoleBase: React.FunctionComponent = ({ break; case DISCONNECTED: terminal = ( - + {textDisconnected} @@ -126,8 +118,7 @@ const SerialConsoleBase: React.FunctionComponent = ({ case LOADING: default: terminal = ( - - } /> + {textLoading} ); diff --git a/packages/module/src/components/VncConsole/VncConsole.tsx b/packages/module/src/components/VncConsole/VncConsole.tsx index 9ec5130..db66796 100644 --- a/packages/module/src/components/VncConsole/VncConsole.tsx +++ b/packages/module/src/components/VncConsole/VncConsole.tsx @@ -1,15 +1,7 @@ import React from 'react'; import { css } from '@patternfly/react-styles'; -import { - Button, - EmptyState, - EmptyStateBody, - EmptyStateIcon, - Spinner, - EmptyStateHeader, - EmptyStateFooter -} from '@patternfly/react-core'; +import { Button, EmptyState, EmptyStateBody, Spinner, EmptyStateFooter } from '@patternfly/react-core'; import { initLogging } from '@novnc/novnc/core/util/logging'; /** Has bad types. https://github.com/larryprice/novnc-core/issues/5 */ @@ -226,7 +218,7 @@ export const VncConsole: React.FunctionComponent = ({ break; case DISCONNECTED: emptyState = ( - + {textDisconnected}