diff --git a/packages/documentation-framework/scripts/webpack/webpack.base.config.js b/packages/documentation-framework/scripts/webpack/webpack.base.config.js index 1ede2f1a39..1b96658dcd 100644 --- a/packages/documentation-framework/scripts/webpack/webpack.base.config.js +++ b/packages/documentation-framework/scripts/webpack/webpack.base.config.js @@ -39,9 +39,12 @@ module.exports = (_env, argv) => { include: [ path.resolve(process.cwd(), 'src'), path.resolve(process.cwd(), 'patternfly-docs'), + path.resolve(process.cwd(), 'examples'), path.resolve(__dirname, '../..'), // Temporarily compile theme using webpack for development /react-[\w-]+\/src\/.*\/examples/, /react-[\w-]+\\src\\.*\\examples/, // fix for Windows + /react-[\w-]+\/patternfly-docs\/.*\/examples/, //fixes for extensions + /react-[\w-]+\\patternfly-docs\\.*\\examples/, ].concat(includePaths.map(path => new RegExp(path))), exclude: [ path.resolve(__dirname, '../../node_modules'), // Temporarily compile theme using webpack for development diff --git a/packages/v4/package.json b/packages/v4/package.json index c434d7da38..dd4d2342ed 100644 --- a/packages/v4/package.json +++ b/packages/v4/package.json @@ -23,6 +23,7 @@ "@patternfly/react-docs": "5.103.66", "@patternfly/react-log-viewer": "4.87.100", "@patternfly/react-topology": "^4.91.26", + "@patternfly/react-console": "^4.95.3", "react": "^16.8.0 || ^17.0.0", "react-dom": "^16.8.0 || ^17.0.0" }, diff --git a/packages/v4/patternfly-docs/generated/extensions/react-console/react/basic-usage.png b/packages/v4/patternfly-docs/generated/extensions/react-console/react/basic-usage.png new file mode 100644 index 0000000000..4c6067bb5e Binary files /dev/null and b/packages/v4/patternfly-docs/generated/extensions/react-console/react/basic-usage.png differ diff --git a/packages/v4/patternfly-docs/patternfly-docs.source.js b/packages/v4/patternfly-docs/patternfly-docs.source.js index 8ae9431275..90b67318a9 100644 --- a/packages/v4/patternfly-docs/patternfly-docs.source.js +++ b/packages/v4/patternfly-docs/patternfly-docs.source.js @@ -114,4 +114,12 @@ module.exports = (sourceMD, sourceProps) => { sourceProps(path.join(reactCatalogViewSrcPath, "/**/*.tsx"), reactPropsIgnore); sourceMD(path.join(reactCatalogViewDocsPath, '/**/examples/*.md'), 'react'); + + // Console extension + const consolePath = require.resolve("@patternfly/react-console/package.json"); + const consoleDocsPath = consolePath.replace("package.json", "patternfly-docs/content/extensions/react-console"); + const consoleSrcPath = consolePath.replace("package.json", "src/components"); + + sourceProps(path.join(consoleSrcPath, "/**/*.tsx"), reactPropsIgnore); + sourceMD(path.join(consoleDocsPath, "/examples/*.md"), 'react'); } diff --git a/yarn.lock b/yarn.lock index 69e756fac1..419fe7ad75 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2212,6 +2212,11 @@ "@nodelib/fs.scandir" "2.1.3" fastq "^1.6.0" +"@novnc/novnc@^1.3.0": + version "1.3.0" + resolved "https://registry.yarnpkg.com/@novnc/novnc/-/novnc-1.3.0.tgz#06db5ff55eae646a623d3717d8bffaf131ffb93a" + integrity sha512-tR87mY5ADtaELadmZfW937JO/p8fRdz3wkPoqwhqB/vY1XnTQeLSWwkp4yMlr4iIDY0iCficfzFYX5EHMh4MHw== + "@npmcli/fs@^1.0.0": version "1.1.1" resolved "https://registry.yarnpkg.com/@npmcli/fs/-/fs-1.1.1.tgz#72f719fe935e687c56a4faecf3c03d06ba593257" @@ -2366,6 +2371,11 @@ resolved "https://registry.yarnpkg.com/@patternfly/patternfly/-/patternfly-4.122.2.tgz#3e774d78996c7027b8c528edb2e90990676458a5" integrity sha512-kSoW8mt9eEJcAZX2lX4r/SYvFd44GGb8PUSDjMrpKDZqgn9/9VFh1rSChG4v5kCK6cpS99/gdTapZc3ylf8Rpw== +"@patternfly/patternfly@4.224.1": + version "4.224.1" + resolved "https://registry.yarnpkg.com/@patternfly/patternfly/-/patternfly-4.224.1.tgz#67c74405ee2ddd2c74d758f21ad14e2cac485afc" + integrity sha512-ehUcWjBs2LMLw9DOQL7WgZ6dZmrszREQ0HIzQ76bjRpwL005oiJ7tRhxXX96BSGDGgm5mgGal8TgzVWbQJOUTw== + "@patternfly/patternfly@4.224.2": version "4.224.2" resolved "https://registry.yarnpkg.com/@patternfly/patternfly/-/patternfly-4.224.2.tgz#9d1b000c3c43457ae47c3556a334412d164fad90" @@ -2443,6 +2453,22 @@ react-dropzone "9.0.0" tslib "^2.0.0" +"@patternfly/react-console@^4.95.3": + version "4.95.3" + resolved "https://registry.yarnpkg.com/@patternfly/react-console/-/react-console-4.95.3.tgz#7005f5d05f9bd2420ce81847cc24ae68c17812b9" + integrity sha512-/FewUtvzJf6B3hK495zyCcHZMpY1iY/T5iyOym9B8mAVxkMfqLaruTUxa7C8tDXSEXLKUhRogaAcRE22c6sLzA== + dependencies: + "@novnc/novnc" "^1.3.0" + "@patternfly/patternfly" "4.224.1" + "@patternfly/react-core" "^4.273.3" + "@patternfly/react-styles" "^4.92.3" + "@spice-project/spice-html5" "^0.2.1" + "@types/file-saver" "^2.0.1" + file-saver "^1.3.8" + tslib "^2.0.0" + xterm "^4.8.1" + xterm-addon-fit "^0.2.1" + "@patternfly/react-core@^4.135.15": version "4.224.1" resolved "https://registry.yarnpkg.com/@patternfly/react-core/-/react-core-4.224.1.tgz#d8d81e7cf611fd441f9fb970db8e0c3a36fa508b" @@ -2456,7 +2482,7 @@ tippy.js "5.1.2" tslib "^2.0.0" -"@patternfly/react-core@^4.268.0", "@patternfly/react-core@^4.273.1", "@patternfly/react-core@^4.276.6": +"@patternfly/react-core@^4.268.0", "@patternfly/react-core@^4.273.1", "@patternfly/react-core@^4.273.3", "@patternfly/react-core@^4.276.6": version "4.276.6" resolved "https://registry.yarnpkg.com/@patternfly/react-core/-/react-core-4.276.6.tgz#fa39aa61022f70bf350b2efc660bdeb096bda447" integrity sha512-G0K+378jf9jw9g+hCAoKnsAe/UGTRspqPeuAYypF2FgNr+dC7dUpc7/VkNhZBVqSJzUWVEK8NyXcqkfi0IemIg== @@ -2606,6 +2632,11 @@ prop-types "^15.6.1" react-lifecycles-compat "^3.0.4" +"@spice-project/spice-html5@^0.2.1": + version "0.2.1" + resolved "https://registry.yarnpkg.com/@spice-project/spice-html5/-/spice-html5-0.2.1.tgz#9452fc7435a8b1c67937d86ea3b6d6d7e0616725" + integrity sha512-NY86i+x/0ldKK89enXghsXCzWwfb5DQ91hQFu9hbyLcAfCVn+ZKoYsw7xUWX6/HQBRrdu/4F1id7SdOwNqpG9g== + "@testim/chrome-version@^1.1.2": version "1.1.2" resolved "https://registry.yarnpkg.com/@testim/chrome-version/-/chrome-version-1.1.2.tgz#092005c5b77bd3bb6576a4677110a11485e11864" @@ -2888,6 +2919,11 @@ resolved "https://registry.yarnpkg.com/@types/dagre/-/dagre-0.7.42.tgz#2b0cd7678d5fc273df7816a88b8b34016e3a5d85" integrity sha512-knVdi1Ul8xYgJ0wdhQ+/2YGJFKJFa/5srcPII9zvOs4KhsHfpnFrSTQXATYmjslglxRMif3Lg+wEZ0beag+94A== +"@types/file-saver@^2.0.1": + version "2.0.5" + resolved "https://registry.yarnpkg.com/@types/file-saver/-/file-saver-2.0.5.tgz#9ee342a5d1314bb0928375424a2f162f97c310c7" + integrity sha512-zv9kNf3keYegP5oThGLaPk8E081DFDuwfqjtiTzm6PoxChdJ1raSuADf2YGCVIyrSynLrgc8JWv296s7Q7pQSQ== + "@types/geojson@*": version "7946.0.7" resolved "https://registry.yarnpkg.com/@types/geojson/-/geojson-7946.0.7.tgz#c8fa532b60a0042219cdf173ca21a975ef0666ad" @@ -6653,7 +6689,7 @@ file-name@^0.1.0: resolved "https://registry.yarnpkg.com/file-name/-/file-name-0.1.0.tgz#12b122f120f9c34dbc176c1ab81a548aced6def7" integrity sha1-ErEi8SD5w028F2wauBpUis7W3vc= -file-saver@1.3.8: +file-saver@1.3.8, file-saver@^1.3.8: version "1.3.8" resolved "https://registry.yarnpkg.com/file-saver/-/file-saver-1.3.8.tgz#e68a30c7cb044e2fb362b428469feb291c2e09d8" integrity sha512-spKHSBQIxxS81N/O21WmuXA2F6wppUCsutpzenOeZzOCCJ5gEfcbqJP983IrpLXzYmXnMUa6J03SubcNPdKrlg== @@ -14529,6 +14565,16 @@ xtend@^4.0.0, xtend@^4.0.1, xtend@~4.0.1: resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== +xterm-addon-fit@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/xterm-addon-fit/-/xterm-addon-fit-0.2.1.tgz#353f43921eb78e3f9ad3f3afbb14e7ac183ca738" + integrity sha512-BlR57O3t1/bmVcnS81bn9ZnNf+GiGNbeXdNUKSBa9tKEwNUMcU3S+KFLIRv7rm1Ty0D5pMOu0vbz/RDorKRwKQ== + +xterm@^4.8.1: + version "4.19.0" + resolved "https://registry.yarnpkg.com/xterm/-/xterm-4.19.0.tgz#c0f9d09cd61de1d658f43ca75f992197add9ef6d" + integrity sha512-c3Cp4eOVsYY5Q839dR5IejghRPpxciGmLWWaP9g+ppfMeBChMeLa1DCA+pmX/jyDZ+zxFOmlJL/82qVdayVoGQ== + y18n@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41"