From e2c0be348cb5dfa68dac3d6cdfcff7e13f234ec0 Mon Sep 17 00:00:00 2001 From: Austin Sullivan Date: Thu, 19 Jan 2023 16:43:03 -0500 Subject: [PATCH] feat(docs): update documentation --- packages/module/package.json | 2 +- .../react-console/examples/DesktopViewer.md | 22 - .../{AccessConsoles.md => ReactConsole.md} | 7 +- .../consoles/desktopviewer/extensions.js | 172 -------- .../generated/consoles/desktopviewer/react.js | 172 -------- .../extensions/access-consoles/extensions.js | 88 ---- .../extensions/access-consoles/react.js | 90 ---- .../extensions/react-console/react.js | 386 ++++++++++++++++++ .../module/patternfly-docs/generated/index.js | 18 +- yarn.lock | 14 +- 10 files changed, 400 insertions(+), 571 deletions(-) delete mode 100644 packages/module/patternfly-docs/content/extensions/react-console/examples/DesktopViewer.md rename packages/module/patternfly-docs/content/extensions/react-console/examples/{AccessConsoles.md => ReactConsole.md} (84%) delete mode 100644 packages/module/patternfly-docs/generated/consoles/desktopviewer/extensions.js delete mode 100644 packages/module/patternfly-docs/generated/consoles/desktopviewer/react.js delete mode 100644 packages/module/patternfly-docs/generated/extensions/access-consoles/extensions.js delete mode 100644 packages/module/patternfly-docs/generated/extensions/access-consoles/react.js create mode 100644 packages/module/patternfly-docs/generated/extensions/react-console/react.js diff --git a/packages/module/package.json b/packages/module/package.json index 2b3155b..277a6c9 100644 --- a/packages/module/package.json +++ b/packages/module/package.json @@ -44,7 +44,7 @@ "react-dom": "^16.8 || ^17 || ^18" }, "devDependencies": { - "@patternfly/documentation-framework": "^1.2.55", + "@patternfly/documentation-framework": "^1.4.3", "@patternfly/patternfly": "^4.217.1", "@patternfly/react-table": "^4.111.4", "@patternfly/react-code-editor": "^4.82.26", diff --git a/packages/module/patternfly-docs/content/extensions/react-console/examples/DesktopViewer.md b/packages/module/patternfly-docs/content/extensions/react-console/examples/DesktopViewer.md deleted file mode 100644 index 1e62eb1..0000000 --- a/packages/module/patternfly-docs/content/extensions/react-console/examples/DesktopViewer.md +++ /dev/null @@ -1,22 +0,0 @@ ---- -id: DesktopViewer -section: consoles -source: react -propComponents: ['DesktopViewer'] -ouia: false -beta: true ---- -### Note -DesktopViewer lives in its own package at [`@patternfly/react-console`](https://www.npmjs.com/package/@patternfly/react-console) - -import { DesktopViewer } from '@patternfly/react-console'; - -## Examples - -### Basic Usage -```js -import React from 'react'; -import { DesktopViewer } from '@patternfly/react-console'; - - -``` diff --git a/packages/module/patternfly-docs/content/extensions/react-console/examples/AccessConsoles.md b/packages/module/patternfly-docs/content/extensions/react-console/examples/ReactConsole.md similarity index 84% rename from packages/module/patternfly-docs/content/extensions/react-console/examples/AccessConsoles.md rename to packages/module/patternfly-docs/content/extensions/react-console/examples/ReactConsole.md index 80be412..05dcd6f 100644 --- a/packages/module/patternfly-docs/content/extensions/react-console/examples/AccessConsoles.md +++ b/packages/module/patternfly-docs/content/extensions/react-console/examples/ReactConsole.md @@ -1,14 +1,15 @@ --- -id: Access consoles +id: React console section: extensions source: react -propComponents: ['AccessConsoles'] +propComponents: ['AccessConsoles', 'SerialConsole', 'VncConsole', 'DesktopViewer'] ouia: false beta: true +sourceLink: https://github.com/patternfly/react-console --- ### Note -AccessConsoles lives in its own package at [`@patternfly/react-console`](https://www.npmjs.com/package/@patternfly/react-console) +React console lives in its own package at [`@patternfly/react-console`](https://www.npmjs.com/package/@patternfly/react-console) import { AccessConsoles, SerialConsole, VncConsole, DesktopViewer } from '@patternfly/react-console'; import { SerialConsoleCustom } from './SerialConsoleCustom.jsx'; diff --git a/packages/module/patternfly-docs/generated/consoles/desktopviewer/extensions.js b/packages/module/patternfly-docs/generated/consoles/desktopviewer/extensions.js deleted file mode 100644 index 272225c..0000000 --- a/packages/module/patternfly-docs/generated/consoles/desktopviewer/extensions.js +++ /dev/null @@ -1,172 +0,0 @@ -import React from 'react'; -import { AutoLinkHeader, Example, Link as PatternflyThemeLink } from '@patternfly/documentation-framework/components'; -import { DesktopViewer } from '@patternfly/react-console'; -const pageData = { - "id": "DesktopViewer", - "section": "consoles", - "source": "extensions", - "slug": "/consoles/desktopviewer/extensions", - "sourceLink": "https://github.com/patternfly/patternfly-org/blob/main/packages/module/patternfly-docs/content/extensions/react-console/examples/DesktopViewer.md", - "propComponents": [ - { - "name": "DesktopViewer", - "description": "", - "props": [ - { - "name": "children", - "type": "React.ReactNode", - "description": "Custom content of more-info section", - "defaultValue": "null" - }, - { - "name": "rdp", - "type": "ConsoleDetailPropType", - "description": "Connection details for RDP", - "defaultValue": "null" - }, - { - "name": "spice", - "type": "ConsoleDetailPropType", - "description": "Connection details for Spice", - "defaultValue": "null" - }, - { - "name": "textAddress", - "type": "string", - "description": "" - }, - { - "name": "textConnectWith", - "type": "string", - "description": "" - }, - { - "name": "textConnectWithRDP", - "type": "string", - "description": "" - }, - { - "name": "textConnectWithRemoteViewer", - "type": "string", - "description": "" - }, - { - "name": "textManualConnection", - "type": "string", - "description": "" - }, - { - "name": "textMoreInfo", - "type": "string", - "description": "Text that appears in the toggle" - }, - { - "name": "textMoreInfoContent", - "type": "string | React.ReactNode", - "description": "The information content appearing above the description list for guidelines to install virt-viewer" - }, - { - "name": "textMoreRDPInfo", - "type": "string", - "description": "Text that appears in the toggle" - }, - { - "name": "textMoreRDPInfoContent", - "type": "string | React.ReactNode", - "description": "The information content appearing above the description list for guidelines to install virt-viewer" - }, - { - "name": "textNoProtocol", - "type": "string", - "description": "" - }, - { - "name": "textRdpAddress", - "type": "string", - "description": "" - }, - { - "name": "textRDPPort", - "type": "string", - "description": "" - }, - { - "name": "textSpiceAddress", - "type": "string", - "description": "" - }, - { - "name": "textSpicePort", - "type": "string", - "description": "" - }, - { - "name": "textSpiceTlsPort", - "type": "string", - "description": "" - }, - { - "name": "textVNCAddress", - "type": "string", - "description": "" - }, - { - "name": "textVNCPort", - "type": "string", - "description": "" - }, - { - "name": "textVNCTlsPort", - "type": "string", - "description": "" - }, - { - "name": "vnc", - "type": "ConsoleDetailPropType", - "description": "Connection details for VNC", - "defaultValue": "null" - } - ] - } - ], - "beta": true, - "examples": [ - "Basic Usage" - ] -}; -pageData.liveContext = { - DesktopViewer -}; -pageData.relativeImports = { - -}; -pageData.examples = { - 'Basic Usage': props => - ","title":"Basic Usage","lang":"js"}}> - - -}; - -const Component = () => ( - - - {`Note`} - -

- {`DesktopViewer lives in its own package at `} - - - {`@patternfly/react-console`} - - -

- - {`Examples`} - - {React.createElement(pageData.examples["Basic Usage"])} -
-); -Component.displayName = 'ConsolesDesktopviewerExtensionsDocs'; -Component.pageData = pageData; - -export default Component; diff --git a/packages/module/patternfly-docs/generated/consoles/desktopviewer/react.js b/packages/module/patternfly-docs/generated/consoles/desktopviewer/react.js deleted file mode 100644 index 7c6b88f..0000000 --- a/packages/module/patternfly-docs/generated/consoles/desktopviewer/react.js +++ /dev/null @@ -1,172 +0,0 @@ -import React from 'react'; -import { AutoLinkHeader, Example, Link as PatternflyThemeLink } from '@patternfly/documentation-framework/components'; -import { DesktopViewer } from '@patternfly/react-console'; -const pageData = { - "id": "DesktopViewer", - "section": "consoles", - "source": "react", - "slug": "/consoles/desktopviewer/react", - "sourceLink": "https://github.com/patternfly/patternfly-react/blob/main/packages/module/patternfly-docs/content/extensions/react-console/examples/DesktopViewer.md", - "propComponents": [ - { - "name": "DesktopViewer", - "description": "", - "props": [ - { - "name": "children", - "type": "React.ReactNode", - "description": "Custom content of more-info section", - "defaultValue": "null" - }, - { - "name": "rdp", - "type": "ConsoleDetailPropType", - "description": "Connection details for RDP", - "defaultValue": "null" - }, - { - "name": "spice", - "type": "ConsoleDetailPropType", - "description": "Connection details for Spice", - "defaultValue": "null" - }, - { - "name": "textAddress", - "type": "string", - "description": "" - }, - { - "name": "textConnectWith", - "type": "string", - "description": "" - }, - { - "name": "textConnectWithRDP", - "type": "string", - "description": "" - }, - { - "name": "textConnectWithRemoteViewer", - "type": "string", - "description": "" - }, - { - "name": "textManualConnection", - "type": "string", - "description": "" - }, - { - "name": "textMoreInfo", - "type": "string", - "description": "Text that appears in the toggle" - }, - { - "name": "textMoreInfoContent", - "type": "string | React.ReactNode", - "description": "The information content appearing above the description list for guidelines to install virt-viewer" - }, - { - "name": "textMoreRDPInfo", - "type": "string", - "description": "Text that appears in the toggle" - }, - { - "name": "textMoreRDPInfoContent", - "type": "string | React.ReactNode", - "description": "The information content appearing above the description list for guidelines to install virt-viewer" - }, - { - "name": "textNoProtocol", - "type": "string", - "description": "" - }, - { - "name": "textRdpAddress", - "type": "string", - "description": "" - }, - { - "name": "textRDPPort", - "type": "string", - "description": "" - }, - { - "name": "textSpiceAddress", - "type": "string", - "description": "" - }, - { - "name": "textSpicePort", - "type": "string", - "description": "" - }, - { - "name": "textSpiceTlsPort", - "type": "string", - "description": "" - }, - { - "name": "textVNCAddress", - "type": "string", - "description": "" - }, - { - "name": "textVNCPort", - "type": "string", - "description": "" - }, - { - "name": "textVNCTlsPort", - "type": "string", - "description": "" - }, - { - "name": "vnc", - "type": "ConsoleDetailPropType", - "description": "Connection details for VNC", - "defaultValue": "null" - } - ] - } - ], - "beta": true, - "examples": [ - "Basic Usage" - ] -}; -pageData.liveContext = { - DesktopViewer -}; -pageData.relativeImports = { - -}; -pageData.examples = { - 'Basic Usage': props => - ","title":"Basic Usage","lang":"js"}}> - - -}; - -const Component = () => ( - - - {`Note`} - -

- {`DesktopViewer lives in its own package at `} - - - {`@patternfly/react-console`} - - -

- - {`Examples`} - - {React.createElement(pageData.examples["Basic Usage"])} -
-); -Component.displayName = 'ConsolesDesktopviewerReactDocs'; -Component.pageData = pageData; - -export default Component; diff --git a/packages/module/patternfly-docs/generated/extensions/access-consoles/extensions.js b/packages/module/patternfly-docs/generated/extensions/access-consoles/extensions.js deleted file mode 100644 index 4e75289..0000000 --- a/packages/module/patternfly-docs/generated/extensions/access-consoles/extensions.js +++ /dev/null @@ -1,88 +0,0 @@ -import React from 'react'; -import { AutoLinkHeader, Example, Link as PatternflyThemeLink } from '@patternfly/documentation-framework/components'; -import { AccessConsoles, SerialConsole, VncConsole, DesktopViewer } from '@patternfly/react-console'; -import { SerialConsoleCustom } from '../../../content/extensions/react-console/examples/./SerialConsoleCustom.jsx'; -const pageData = { - "id": "Access consoles", - "section": "extensions", - "source": "extensions", - "slug": "/extensions/access-consoles/extensions", - "sourceLink": "https://github.com/patternfly/patternfly-org/blob/main/packages/module/patternfly-docs/content/extensions/react-console/examples/AccessConsoles.md", - "propComponents": [ - { - "name": "AccessConsoles", - "description": "", - "props": [ - { - "name": "preselectedType", - "type": "No type info", - "defaultValue": "null" - }, - { - "name": "textDesktopViewerConsole", - "type": "No type info", - "defaultValue": "'Desktop viewer'" - }, - { - "name": "textSelectConsoleType", - "type": "No type info", - "defaultValue": "'Select console type'" - }, - { - "name": "textSerialConsole", - "type": "No type info", - "defaultValue": "'Serial console'" - }, - { - "name": "textVncConsole", - "type": "No type info", - "defaultValue": "'VNC console'" - } - ] - } - ], - "beta": true, - "examples": [ - "Basic Usage" - ] -}; -pageData.liveContext = { - AccessConsoles, - SerialConsole, - VncConsole, - DesktopViewer, - SerialConsoleCustom -}; -pageData.relativeImports = { - -}; -pageData.examples = { - 'Basic Usage': props => - {\n const [status, setStatus] = React.useState('disconnected');\n const setConnected = React.useRef(debounce(() => setStatus('connected'), 3000)).current;\n const ref = React.createRef();\n\n return (\n \n \n {\n setStatus('loading');\n setConnected();\n }}\n status={status}\n onDisconnect={() => setStatus('disconnected')}\n onData={data => {\n ref.current.onDataReceived(data);\n }}\n ref={ref}\n />\n \n \n \n );\n};","title":"Basic Usage","lang":"js"}}> - - -}; - -const Component = () => ( - - - {`Note`} - -

- {`AccessConsoles lives in its own package at `} - - - {`@patternfly/react-console`} - - -

- - {`Examples`} - - {React.createElement(pageData.examples["Basic Usage"])} -
-); -Component.displayName = 'ExtensionsAccessConsolesExtensionsDocs'; -Component.pageData = pageData; - -export default Component; diff --git a/packages/module/patternfly-docs/generated/extensions/access-consoles/react.js b/packages/module/patternfly-docs/generated/extensions/access-consoles/react.js deleted file mode 100644 index d0348e1..0000000 --- a/packages/module/patternfly-docs/generated/extensions/access-consoles/react.js +++ /dev/null @@ -1,90 +0,0 @@ -import React from 'react'; -import { AutoLinkHeader, Example, Link as PatternflyThemeLink } from '@patternfly/documentation-framework/components'; -import { AccessConsoles, SerialConsole, VncConsole, DesktopViewer } from '@patternfly/react-console'; -import { SerialConsoleCustom } from '../../../content/extensions/react-console/examples/./SerialConsoleCustom.jsx'; -import { debounce } from '@patternfly/react-core'; -const pageData = { - "id": "Access consoles", - "section": "extensions", - "source": "react", - "slug": "/extensions/access-consoles/react", - "sourceLink": "https://github.com/patternfly/patternfly-react/blob/main/packages/module/patternfly-docs/content/extensions/react-console/examples/AccessConsoles.md", - "propComponents": [ - { - "name": "AccessConsoles", - "description": "", - "props": [ - { - "name": "preselectedType", - "type": "No type info", - "defaultValue": "null" - }, - { - "name": "textDesktopViewerConsole", - "type": "No type info", - "defaultValue": "'Desktop viewer'" - }, - { - "name": "textSelectConsoleType", - "type": "No type info", - "defaultValue": "'Select console type'" - }, - { - "name": "textSerialConsole", - "type": "No type info", - "defaultValue": "'Serial console'" - }, - { - "name": "textVncConsole", - "type": "No type info", - "defaultValue": "'VNC console'" - } - ] - } - ], - "beta": true, - "examples": [ - "Basic Usage" - ] -}; -pageData.liveContext = { - AccessConsoles, - SerialConsole, - VncConsole, - DesktopViewer, - SerialConsoleCustom, - debounce -}; -pageData.relativeImports = { - -}; -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"}}> - - -}; - -const Component = () => ( - - - {`Note`} - -

- {`AccessConsoles lives in its own package at `} - - - {`@patternfly/react-console`} - - -

- - {`Examples`} - - {React.createElement(pageData.examples["Basic Usage"])} -
-); -Component.displayName = 'ExtensionsAccessConsolesReactDocs'; -Component.pageData = pageData; - -export default Component; diff --git a/packages/module/patternfly-docs/generated/extensions/react-console/react.js b/packages/module/patternfly-docs/generated/extensions/react-console/react.js new file mode 100644 index 0000000..0e7e982 --- /dev/null +++ b/packages/module/patternfly-docs/generated/extensions/react-console/react.js @@ -0,0 +1,386 @@ +import React from 'react'; +import { AutoLinkHeader, Example, Link as PatternflyThemeLink } from '@patternfly/documentation-framework/components'; +import { AccessConsoles, SerialConsole, VncConsole, DesktopViewer } from '@patternfly/react-console'; +import { SerialConsoleCustom } from '../../../content/extensions/react-console/examples/./SerialConsoleCustom.jsx'; +import { debounce } from '@patternfly/react-core'; +const pageData = { + "id": "React console", + "section": "extensions", + "subsection": "", + "source": "react", + "slug": "/extensions/react-console/react", + "sourceLink": "https://github.com/patternfly/react-console", + "propComponents": [ + { + "name": "AccessConsoles", + "description": "", + "props": [ + { + "name": "preselectedType", + "type": "No type info", + "defaultValue": "null" + }, + { + "name": "textDesktopViewerConsole", + "type": "No type info", + "defaultValue": "'Desktop viewer'" + }, + { + "name": "textSelectConsoleType", + "type": "No type info", + "defaultValue": "'Select console type'" + }, + { + "name": "textSerialConsole", + "type": "No type info", + "defaultValue": "'Serial console'" + }, + { + "name": "textVncConsole", + "type": "No type info", + "defaultValue": "'VNC console'" + } + ] + }, + { + "name": "SerialConsole", + "description": "", + "props": [ + { + "name": "cols", + "type": "number", + "description": "The number of columns to resize to" + }, + { + "name": "fontFamily", + "type": "string", + "description": "" + }, + { + "name": "fontSize", + "type": "number", + "description": "" + }, + { + "name": "innerRef", + "type": "React.RefObject", + "description": "A reference object to attach to the SerialConsole." + }, + { + "name": "onConnect", + "type": "() => void", + "description": "Initiate connection to backend. In other words, the calling components manages connection state.", + "required": true + }, + { + "name": "onData", + "type": "(e: string) => void", + "description": "Terminal produced data, like key-press", + "required": true + }, + { + "name": "onDisconnect", + "type": "() => void", + "description": "Close connection to backend", + "required": true + }, + { + "name": "onTitleChanged", + "type": "() => void", + "description": "Terminal title has been changed" + }, + { + "name": "rows", + "type": "number", + "description": "The number of rows to resize to" + }, + { + "name": "status", + "type": "string", + "description": "" + }, + { + "name": "textConnect", + "type": "string", + "description": "Text content rendered inside the Connect button" + }, + { + "name": "textDisconnect", + "type": "string", + "description": "Text content rendered inside the Disconnect button" + }, + { + "name": "textDisconnected", + "type": "string", + "description": "" + }, + { + "name": "textLoading", + "type": "string", + "description": "" + }, + { + "name": "textReset", + "type": "string", + "description": "Text content rendered inside the Reset button" + } + ] + }, + { + "name": "VncConsole", + "description": "", + "props": [ + { + "name": "additionalButtons", + "type": "No type info", + "defaultValue": "[]" + }, + { + "name": "clipViewport", + "type": "No type info", + "defaultValue": "false" + }, + { + "name": "dragViewport", + "type": "No type info", + "defaultValue": "false" + }, + { + "name": "encrypt", + "type": "No type info", + "defaultValue": "false" + }, + { + "name": "onDisconnected", + "type": "No type info", + "defaultValue": "() => {}" + }, + { + "name": "path", + "type": "No type info", + "defaultValue": "''" + }, + { + "name": "port", + "type": "No type info", + "defaultValue": "'80'" + }, + { + "name": "repeaterID", + "type": "No type info", + "defaultValue": "''" + }, + { + "name": "resizeSession", + "type": "No type info", + "defaultValue": "true" + }, + { + "name": "scaleViewport", + "type": "No type info", + "defaultValue": "false" + }, + { + "name": "shared", + "type": "No type info", + "defaultValue": "false" + }, + { + "name": "textConnect", + "type": "No type info", + "defaultValue": "'Connect'" + }, + { + "name": "textConnecting", + "type": "No type info", + "defaultValue": "'Connecting'" + }, + { + "name": "textDisconnect", + "type": "No type info", + "defaultValue": "'Disconnect'" + }, + { + "name": "textDisconnected", + "type": "No type info", + "defaultValue": "'Click Connect to open the VNC console.'" + }, + { + "name": "viewOnly", + "type": "No type info", + "defaultValue": "false" + }, + { + "name": "vncLogging", + "type": "No type info", + "defaultValue": "'warn'" + } + ] + }, + { + "name": "DesktopViewer", + "description": "", + "props": [ + { + "name": "children", + "type": "React.ReactNode", + "description": "Custom content of more-info section", + "defaultValue": "null" + }, + { + "name": "rdp", + "type": "ConsoleDetailPropType", + "description": "Connection details for RDP", + "defaultValue": "null" + }, + { + "name": "spice", + "type": "ConsoleDetailPropType", + "description": "Connection details for Spice", + "defaultValue": "null" + }, + { + "name": "textAddress", + "type": "string", + "description": "" + }, + { + "name": "textConnectWith", + "type": "string", + "description": "" + }, + { + "name": "textConnectWithRDP", + "type": "string", + "description": "" + }, + { + "name": "textConnectWithRemoteViewer", + "type": "string", + "description": "" + }, + { + "name": "textManualConnection", + "type": "string", + "description": "" + }, + { + "name": "textMoreInfo", + "type": "string", + "description": "Text that appears in the toggle" + }, + { + "name": "textMoreInfoContent", + "type": "string | React.ReactNode", + "description": "The information content appearing above the description list for guidelines to install virt-viewer" + }, + { + "name": "textMoreRDPInfo", + "type": "string", + "description": "Text that appears in the toggle" + }, + { + "name": "textMoreRDPInfoContent", + "type": "string | React.ReactNode", + "description": "The information content appearing above the description list for guidelines to install virt-viewer" + }, + { + "name": "textNoProtocol", + "type": "string", + "description": "" + }, + { + "name": "textRdpAddress", + "type": "string", + "description": "" + }, + { + "name": "textRDPPort", + "type": "string", + "description": "" + }, + { + "name": "textSpiceAddress", + "type": "string", + "description": "" + }, + { + "name": "textSpicePort", + "type": "string", + "description": "" + }, + { + "name": "textSpiceTlsPort", + "type": "string", + "description": "" + }, + { + "name": "textVNCAddress", + "type": "string", + "description": "" + }, + { + "name": "textVNCPort", + "type": "string", + "description": "" + }, + { + "name": "textVNCTlsPort", + "type": "string", + "description": "" + }, + { + "name": "vnc", + "type": "ConsoleDetailPropType", + "description": "Connection details for VNC", + "defaultValue": "null" + } + ] + } + ], + "beta": true, + "examples": [ + "Basic Usage" + ] +}; +pageData.liveContext = { + AccessConsoles, + SerialConsole, + VncConsole, + DesktopViewer, + SerialConsoleCustom, + debounce +}; +pageData.relativeImports = { + +}; +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"}}> + + +}; + +const Component = () => ( + + + {`Note`} + +

+ {`React console lives in its own package at `} + + + {`@patternfly/react-console`} + + +

+ + {`Examples`} + + {React.createElement(pageData.examples["Basic Usage"])} +
+); +Component.displayName = 'ExtensionsReactConsoleReactDocs'; +Component.pageData = pageData; + +export default Component; diff --git a/packages/module/patternfly-docs/generated/index.js b/packages/module/patternfly-docs/generated/index.js index 718a406..a47c061 100644 --- a/packages/module/patternfly-docs/generated/index.js +++ b/packages/module/patternfly-docs/generated/index.js @@ -1,20 +1,12 @@ module.exports = { - '/extensions/access-consoles/react': { - id: "Access consoles", - title: "Access consoles", + '/extensions/react-console/react': { + id: "React console", + title: "React console", toc: [[{"text":"Note"}],{"text":"Examples"},[{"text":"Basic Usage"}]], examples: ["Basic Usage"], section: "extensions", + subsection: "", source: "react", - Component: () => import(/* webpackChunkName: "extensions/access-consoles/react/index" */ './extensions/access-consoles/react') - }, - '/consoles/desktopviewer/react': { - id: "DesktopViewer", - title: "DesktopViewer", - toc: [[{"text":"Note"}],{"text":"Examples"},[{"text":"Basic Usage"}]], - examples: ["Basic Usage"], - section: "consoles", - source: "react", - Component: () => import(/* webpackChunkName: "consoles/desktopviewer/react/index" */ './consoles/desktopviewer/react') + Component: () => import(/* webpackChunkName: "extensions/react-console/react/index" */ './extensions/react-console/react') } }; \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index dd4af8a..f9194dd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1599,10 +1599,10 @@ acorn-static-class-features "^1.0.0" astring "^1.7.5" -"@patternfly/documentation-framework@^1.2.55": - version "1.2.55" - resolved "https://registry.yarnpkg.com/@patternfly/documentation-framework/-/documentation-framework-1.2.55.tgz#c4c304ae720cc85da8a31c1d6921b26c88cb0715" - integrity sha512-uPfC5rHBcbYJpfh1wUojfxBoHaA7/UCkCvSFKNzO2IlkgGMm4cQv0R9ESjbaZrXtmB/FKaw7m5L+oBTTZTSzqA== +"@patternfly/documentation-framework@^1.4.3": + version "1.4.3" + resolved "https://registry.yarnpkg.com/@patternfly/documentation-framework/-/documentation-framework-1.4.3.tgz#bbabc6e14875d20d1bf0b9b3c336733abd59d12a" + integrity sha512-EWCTs2+IoaM3rYjJKQOvXFq6yqGebTvRWqrwW0FEBB/ROmcejJy/A6LRcdz8TvYKE+b8Zrw349JaupmT6LgptA== dependencies: "@babel/core" "7.18.2" "@babel/plugin-proposal-class-properties" "7.17.12" @@ -1635,7 +1635,6 @@ html-formatter "0.1.9" html-webpack-plugin "4.4.1" js-yaml "3.14.0" - lodash-es "4.17.15" mdast-util-to-hast "9.1.1" mdurl "1.0.1" mini-css-extract-plugin "1.3.9" @@ -7805,11 +7804,6 @@ locate-path@^6.0.0: dependencies: p-locate "^5.0.0" -lodash-es@4.17.15: - version "4.17.15" - resolved "https://registry.yarnpkg.com/lodash-es/-/lodash-es-4.17.15.tgz#21bd96839354412f23d7a10340e5eac6ee455d78" - integrity sha512-rlrc3yU3+JNOpZ9zj5pQtxnx2THmvRykwL4Xlxoa8I9lHBlVbbyPhgyPMioxVZ4NqyxaVVtaJnzsyOidQIhyyQ== - lodash.debounce@^4.0.8: version "4.0.8" resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af"