From 3abb7f25d986ca255e70c0603dec1420ad51e8a3 Mon Sep 17 00:00:00 2001 From: nage1234 <88926279+nage1234@users.noreply.github.com> Date: Tue, 26 Mar 2024 23:40:58 +0530 Subject: [PATCH 01/23] PAC-1569-added codes for Packs API fetch --- plugins/packs-integrations.js | 98 +++++++++++++++++++++++++++++++++-- 1 file changed, 95 insertions(+), 3 deletions(-) diff --git a/plugins/packs-integrations.js b/plugins/packs-integrations.js index 695c7550b9..91c622be49 100644 --- a/plugins/packs-integrations.js +++ b/plugins/packs-integrations.js @@ -1,3 +1,26 @@ +import api from "../src/services/api"; +import { setTimeout } from "timers/promises"; + +const layerMap = { + k8s: "Kubernetes", + cni: "network", + os: "operating system", + servicemesh: "service mesh", + monitoring: "monitoring", + csi: "storage", + logging: "logging", + "load balancer": "load balancer", + ingress: "ingress", + authentication: "authentication", + registry: "registry", + "system app": "system app", + spectro: "spectro", + security: "security", + serverless: "serverless", + "app services": "app services", + +} + function generateIntegrationData(allContent) { const packsData = allContent["docusaurus-plugin-content-docs"].default.loadedVersions[0].docs .filter((doc) => { @@ -20,14 +43,83 @@ function generatePacksData(allContent) { return packsData; } +function combineAPICustomPackData(packsMData, packsPaletteDetailsData, customPacksData) { + const filteredPalattePackData = packsPaletteDetailsData.filter((packContent) => { + const packName = packContent.name; + return ((packsMData[packName].spec.layer === "addon" && packsMData[packName].spec.addonType) || packsMData[packName].spec.layer !== "addon"); + }); + return filteredPalattePackData.map((packContent) => { + const packName = packContent.name; + if (packsMData[packName]) { + const packMDValue = packsMData[packName]; + const layer = packMDValue.spec.layer === "addon" ? packMDValue.spec.addonType : layerMap[packMDValue.spec.layer]; + return { + fields: { + sidebar_label: packMDValue.spec.name, + title: packMDValue.spec.displayName, + description: 'dynamically generated', + hide_table_of_contents: true, + type: 'integration', + category: [layer], + sidebar_class_name: 'hide-from-sidebar', + logoUrl: packMDValue.spec.registries[0].logoUrl, + tags: [], + slug: '/integrations/${packMDValue.spec.name}', + id: 'integrations/${packMDValue.spec.name}', + } + }; + } + }); +} + +async function fetchPackListItems(queryParams, packDataArr, counter) { + const payload = {filter: { type: ["spectro", "oci"],environment:["aws"]}}; + counter+=1; + if(counter%10 === 0) { + await setTimeout(2000); + } + const response = await api.post('/v1/packs/search'+queryParams, payload); + const tempPackArr = packDataArr.concat(response.data.items); + if(response.data.listmeta.continue) { + return fetchPackListItems("?limit=100&continue="+response.data.listmeta.continue, tempPackArr, counter); + } else { + return tempPackArr; + } +} + async function pluginPacksAndIntegrationsData() { return { name: "plugin-packs-integrations", - async contentLoaded({ allContent, actions }) { + async loadContent() { + const packDataArr = await fetchPackListItems("?limit=100", [], 0); + const packUrl = "v1/packs/"; + const packMDMap = new Map(); + let apiPacksData = []; + let counter = 0; + let promises = new Array(); + for (let i = 0; i < packDataArr.length; i++) { + counter+=1 + const packData = packDataArr[i]; + packMDMap[packData.spec.name]=packData; + promises.push(api.get(packUrl + packData.spec.registries[0].latestPackUid)); + if(counter%10 === 0 || i === packDataArr.length-1) { + await setTimeout(2000); + const response2 = await Promise.all(promises); + apiPacksData = apiPacksData.concat(response2.map((pack) => pack.data)); + promises = []; + } + } + return {packsPaletteData: packMDMap, packsPaletteDetailsData: apiPacksData} ; + }, + async contentLoaded({ allContent, content, actions }) { const { setGlobalData } = actions; + const { packsPaletteData, packsPaletteDetailsData } = content; const integrationsData = generateIntegrationData(allContent); - const packsData = generatePacksData(allContent); - setGlobalData({ integrations: integrationsData, packs: packsData }); + const customPacksData = generatePacksData(allContent); + //console.log("hello here packData is ---- ", customPacksData); + //console.log("hello here packData is ---- ", packsPaletteDetailsData.length); + const unionPackData = combineAPICustomPackData(packsPaletteData, packsPaletteDetailsData, customPacksData) + setGlobalData({ integrations: integrationsData, packs: unionPackData }); }, }; } From 5d5b209e59be6d9b2d0d61eeb16f1d18a83e986a Mon Sep 17 00:00:00 2001 From: nage1234 <88926279+nage1234@users.noreply.github.com> Date: Sun, 31 Mar 2024 23:21:33 +0530 Subject: [PATCH 02/23] PAC-1569-added few components for filtering, changed exisitng Technology card as per mockup --- package-lock.json | 636 +++++++++--------- package.json | 3 +- plugins/packs-integrations.js | 14 +- src/components/IconMapper/IconMapper.tsx | 31 + .../Integrations/IntegrationTypes.ts | 1 + .../CategorySelector/AdditionalFilters.tsx | 34 + .../CategorySelector/CategorySelector.tsx | 26 - .../CategorySelector/CloudProviderSelecor.tsx | 34 + .../CategorySelector/CustomLabel.module.scss | 9 + .../CategorySelector/CustomLabel.tsx | 16 + .../CategorySelector/TypeSelector.tsx | 36 + .../additionalFilters.antd.css | 9 + .../Technologies/CategorySelector/index.ts | 3 - .../Technologies/PackCardIcon.module.scss | 12 + src/components/Technologies/PackCardIcon.tsx | 34 + src/components/Technologies/PackConstants.ts | 54 ++ .../Technologies/PackFilters.module.scss | 8 + src/components/Technologies/PacksFilters.tsx | 36 + .../Technologies/Technologies.module.scss | 17 +- src/components/Technologies/Technologies.tsx | 96 +-- .../Technologies/TechnologyCard.tsx | 18 +- .../Technologies/technologies.antd.css | 12 + src/theme/Root/Root.tsx | 2 + static/assets/packs/app_layer.svg | 1 + static/assets/packs/authentication_layer.svg | 4 + static/assets/packs/cni_layer.svg | 11 + static/assets/packs/csi_layer.svg | 4 + static/assets/packs/ingress_layer.svg | 5 + static/assets/packs/k8s_layer.svg | 3 + static/assets/packs/load_balancer_layer.svg | 10 + static/assets/packs/logging_layer.svg | 3 + static/assets/packs/misc_layer.svg | 3 + static/assets/packs/monitoring_layer.svg | 3 + static/assets/packs/os_layer.svg | 3 + static/assets/packs/registry_layer.svg | 3 + static/assets/packs/security_layer.svg | 3 + static/assets/packs/service_mesh_layer.svg | 3 + static/assets/packs/system_app_layer.svg | 3 + 38 files changed, 790 insertions(+), 413 deletions(-) create mode 100644 src/components/Technologies/CategorySelector/AdditionalFilters.tsx delete mode 100644 src/components/Technologies/CategorySelector/CategorySelector.tsx create mode 100644 src/components/Technologies/CategorySelector/CloudProviderSelecor.tsx create mode 100644 src/components/Technologies/CategorySelector/CustomLabel.module.scss create mode 100644 src/components/Technologies/CategorySelector/CustomLabel.tsx create mode 100644 src/components/Technologies/CategorySelector/TypeSelector.tsx create mode 100644 src/components/Technologies/CategorySelector/additionalFilters.antd.css delete mode 100644 src/components/Technologies/CategorySelector/index.ts create mode 100644 src/components/Technologies/PackCardIcon.module.scss create mode 100644 src/components/Technologies/PackCardIcon.tsx create mode 100644 src/components/Technologies/PackConstants.ts create mode 100644 src/components/Technologies/PackFilters.module.scss create mode 100644 src/components/Technologies/PacksFilters.tsx create mode 100644 src/components/Technologies/technologies.antd.css create mode 100644 static/assets/packs/app_layer.svg create mode 100644 static/assets/packs/authentication_layer.svg create mode 100644 static/assets/packs/cni_layer.svg create mode 100644 static/assets/packs/csi_layer.svg create mode 100644 static/assets/packs/ingress_layer.svg create mode 100644 static/assets/packs/k8s_layer.svg create mode 100644 static/assets/packs/load_balancer_layer.svg create mode 100644 static/assets/packs/logging_layer.svg create mode 100644 static/assets/packs/misc_layer.svg create mode 100644 static/assets/packs/monitoring_layer.svg create mode 100644 static/assets/packs/os_layer.svg create mode 100644 static/assets/packs/registry_layer.svg create mode 100644 static/assets/packs/security_layer.svg create mode 100644 static/assets/packs/service_mesh_layer.svg create mode 100644 static/assets/packs/system_app_layer.svg diff --git a/package-lock.json b/package-lock.json index d9917d74ad..08094f9af0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,6 +8,7 @@ "name": "spectro-cloud-docs", "version": "4.2.0", "dependencies": { + "@ant-design/icons": "^4.8.3", "@commitlint/cli": "^17.6.7", "@commitlint/config-conventional": "^17.6.7", "@docusaurus/core": "^3.1.1", @@ -19,7 +20,7 @@ "@fortawesome/free-solid-svg-icons": "^6.4.0", "@fortawesome/react-fontawesome": "^0.2.0", "@mdx-js/react": "^3.0.0", - "antd": "^5.6.2", + "antd": "^4.22.6", "axios-retry": "^3.8.0", "babel-plugin-macros": "^3.1.0", "clsx": "^1.2.1", @@ -261,42 +262,24 @@ } }, "node_modules/@ant-design/colors": { - "version": "7.0.0", - "license": "MIT", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/@ant-design/colors/-/colors-6.0.0.tgz", + "integrity": "sha512-qAZRvPzfdWHtfameEGP2Qvuf838NhergR35o+EuVyB5XvSA98xod5r4utvi4TJ3ywmevm290g9nsCG5MryrdWQ==", "dependencies": { "@ctrl/tinycolor": "^3.4.0" } }, - "node_modules/@ant-design/cssinjs": { - "version": "1.18.1", - "license": "MIT", - "dependencies": { - "@babel/runtime": "^7.11.1", - "@emotion/hash": "^0.8.0", - "@emotion/unitless": "^0.7.5", - "classnames": "^2.3.1", - "csstype": "3.1.2", - "rc-util": "^5.35.0", - "stylis": "^4.0.13" - }, - "peerDependencies": { - "react": ">=16.0.0", - "react-dom": ">=16.0.0" - } - }, - "node_modules/@ant-design/cssinjs/node_modules/csstype": { - "version": "3.1.2", - "license": "MIT" - }, "node_modules/@ant-design/icons": { - "version": "5.2.6", - "license": "MIT", + "version": "4.8.3", + "resolved": "https://registry.npmjs.org/@ant-design/icons/-/icons-4.8.3.tgz", + "integrity": "sha512-HGlIQZzrEbAhpJR6+IGdzfbPym94Owr6JZkJ2QCCnOkPVIWMO2xgIVcOKnl8YcpijIo39V7l2qQL5fmtw56cMw==", "dependencies": { - "@ant-design/colors": "^7.0.0", + "@ant-design/colors": "^6.0.0", "@ant-design/icons-svg": "^4.3.0", "@babel/runtime": "^7.11.2", "classnames": "^2.2.6", - "rc-util": "^5.31.1" + "lodash": "^4.17.15", + "rc-util": "^5.9.4" }, "engines": { "node": ">=8" @@ -307,8 +290,9 @@ } }, "node_modules/@ant-design/icons-svg": { - "version": "4.3.1", - "license": "MIT" + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/@ant-design/icons-svg/-/icons-svg-4.4.2.tgz", + "integrity": "sha512-vHbT+zJEVzllwP+CM+ul7reTEfBR0vgxFe7+lREAsAA7YGsYpboiq2sQNeQeRvh09GfQgs/GyFEvZpJ9cLXpXA==" }, "node_modules/@ant-design/react-slick": { "version": "1.0.2", @@ -2415,7 +2399,8 @@ }, "node_modules/@ctrl/tinycolor": { "version": "3.6.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/@ctrl/tinycolor/-/tinycolor-3.6.1.tgz", + "integrity": "sha512-SITSV6aIXsuVNV3f3O0f2n/cgyEDWoSqtZMYiAmcsYHydcKrOz3gUxB/iXd/Qf08+IZX4KpgNbvUdMBmWz+kcA==", "engines": { "node": ">=10" } @@ -3313,14 +3298,6 @@ "node": ">=18.0" } }, - "node_modules/@emotion/hash": { - "version": "0.8.0", - "license": "MIT" - }, - "node_modules/@emotion/unitless": { - "version": "0.7.5", - "license": "MIT" - }, "node_modules/@eslint-community/eslint-utils": { "version": "4.4.0", "devOptional": true, @@ -4952,61 +4929,10 @@ "version": "1.0.0-next.24", "license": "MIT" }, - "node_modules/@rc-component/color-picker": { - "version": "1.4.1", - "license": "MIT", - "dependencies": { - "@babel/runtime": "^7.10.1", - "@ctrl/tinycolor": "^3.6.0", - "classnames": "^2.2.6", - "rc-util": "^5.30.0" - }, - "peerDependencies": { - "react": ">=16.9.0", - "react-dom": ">=16.9.0" - } - }, - "node_modules/@rc-component/context": { - "version": "1.4.0", - "license": "MIT", - "dependencies": { - "@babel/runtime": "^7.10.1", - "rc-util": "^5.27.0" - }, - "peerDependencies": { - "react": ">=16.9.0", - "react-dom": ">=16.9.0" - } - }, - "node_modules/@rc-component/mini-decimal": { - "version": "1.1.0", - "license": "MIT", - "dependencies": { - "@babel/runtime": "^7.18.0" - }, - "engines": { - "node": ">=8.x" - } - }, - "node_modules/@rc-component/mutate-observer": { - "version": "1.1.0", - "license": "MIT", - "dependencies": { - "@babel/runtime": "^7.18.0", - "classnames": "^2.3.2", - "rc-util": "^5.24.4" - }, - "engines": { - "node": ">=8.x" - }, - "peerDependencies": { - "react": ">=16.9.0", - "react-dom": ">=16.9.0" - } - }, "node_modules/@rc-component/portal": { "version": "1.1.2", - "license": "MIT", + "resolved": "https://registry.npmjs.org/@rc-component/portal/-/portal-1.1.2.tgz", + "integrity": "sha512-6f813C0IsasTZms08kfA8kPAGxbbkYToa8ALaiDIGGECU4i9hj8Plgbx0sNJDrey3EtHO30hmdaxtT0138xZcg==", "dependencies": { "@babel/runtime": "^7.18.0", "classnames": "^2.3.2", @@ -5020,43 +4946,6 @@ "react-dom": ">=16.9.0" } }, - "node_modules/@rc-component/tour": { - "version": "1.11.1", - "license": "MIT", - "dependencies": { - "@babel/runtime": "^7.18.0", - "@rc-component/portal": "^1.0.0-9", - "@rc-component/trigger": "^1.3.6", - "classnames": "^2.3.2", - "rc-util": "^5.24.4" - }, - "engines": { - "node": ">=8.x" - }, - "peerDependencies": { - "react": ">=16.9.0", - "react-dom": ">=16.9.0" - } - }, - "node_modules/@rc-component/trigger": { - "version": "1.18.2", - "license": "MIT", - "dependencies": { - "@babel/runtime": "^7.23.2", - "@rc-component/portal": "^1.1.0", - "classnames": "^2.3.2", - "rc-motion": "^2.0.0", - "rc-resize-observer": "^1.3.1", - "rc-util": "^5.38.0" - }, - "engines": { - "node": ">=8.x" - }, - "peerDependencies": { - "react": ">=16.9.0", - "react-dom": ">=16.9.0" - } - }, "node_modules/@redocly/ajv": { "version": "8.11.0", "license": "MIT", @@ -7466,57 +7355,53 @@ "license": "MIT" }, "node_modules/antd": { - "version": "5.12.2", - "license": "MIT", + "version": "4.24.16", + "resolved": "https://registry.npmjs.org/antd/-/antd-4.24.16.tgz", + "integrity": "sha512-zZrK4UYxHtU6tGOOf0uG/kBRx1kTvypfuSB3GqE/SBQxFhZ/TZ+yj7Z1qwI8vGfMtUUJdLeuoCAqGDa1zPsXnQ==", "dependencies": { - "@ant-design/colors": "^7.0.0", - "@ant-design/cssinjs": "^1.18.1", - "@ant-design/icons": "^5.2.6", + "@ant-design/colors": "^6.0.0", + "@ant-design/icons": "^4.8.2", "@ant-design/react-slick": "~1.0.2", - "@babel/runtime": "^7.23.4", + "@babel/runtime": "^7.18.3", "@ctrl/tinycolor": "^3.6.1", - "@rc-component/color-picker": "~1.4.1", - "@rc-component/mutate-observer": "^1.1.0", - "@rc-component/tour": "~1.11.1", - "@rc-component/trigger": "^1.18.2", - "classnames": "^2.3.2", - "copy-to-clipboard": "^3.3.3", - "dayjs": "^1.11.1", - "qrcode.react": "^3.1.0", - "rc-cascader": "~3.20.0", - "rc-checkbox": "~3.1.0", - "rc-collapse": "~3.7.2", - "rc-dialog": "~9.3.4", - "rc-drawer": "~6.5.2", - "rc-dropdown": "~4.1.0", - "rc-field-form": "~1.41.0", - "rc-image": "~7.5.1", - "rc-input": "~1.3.6", - "rc-input-number": "~8.4.0", - "rc-mentions": "~2.9.1", - "rc-menu": "~9.12.4", + "classnames": "^2.2.6", + "copy-to-clipboard": "^3.2.0", + "lodash": "^4.17.21", + "moment": "^2.29.2", + "rc-cascader": "~3.7.3", + "rc-checkbox": "~3.0.1", + "rc-collapse": "~3.4.2", + "rc-dialog": "~9.0.2", + "rc-drawer": "~6.3.0", + "rc-dropdown": "~4.0.1", + "rc-field-form": "~1.38.2", + "rc-image": "~5.13.0", + "rc-input": "~0.1.4", + "rc-input-number": "~7.3.11", + "rc-mentions": "~1.13.1", + "rc-menu": "~9.8.4", "rc-motion": "^2.9.0", - "rc-notification": "~5.3.0", - "rc-pagination": "~4.0.3", - "rc-picker": "~3.14.6", - "rc-progress": "~3.5.1", - "rc-rate": "~2.12.0", - "rc-resize-observer": "^1.4.0", - "rc-segmented": "~2.2.2", - "rc-select": "~14.10.0", - "rc-slider": "~10.5.0", - "rc-steps": "~6.0.1", - "rc-switch": "~4.1.0", - "rc-table": "~7.36.0", - "rc-tabs": "~12.14.1", - "rc-textarea": "~1.5.3", - "rc-tooltip": "~6.1.2", - "rc-tree": "~5.8.2", - "rc-tree-select": "~5.15.0", - "rc-upload": "~4.3.5", - "rc-util": "^5.38.1", - "scroll-into-view-if-needed": "^3.1.0", - "throttle-debounce": "^5.0.0" + "rc-notification": "~4.6.1", + "rc-pagination": "~3.2.0", + "rc-picker": "~2.7.6", + "rc-progress": "~3.4.2", + "rc-rate": "~2.9.3", + "rc-resize-observer": "^1.3.1", + "rc-segmented": "~2.3.0", + "rc-select": "~14.1.18", + "rc-slider": "~10.0.1", + "rc-steps": "~5.0.0", + "rc-switch": "~3.2.2", + "rc-table": "~7.26.0", + "rc-tabs": "~12.5.10", + "rc-textarea": "~0.4.7", + "rc-tooltip": "~5.2.2", + "rc-tree": "~5.7.12", + "rc-tree-select": "~5.5.5", + "rc-trigger": "^5.3.4", + "rc-upload": "~4.3.6", + "rc-util": "^5.37.0", + "scroll-into-view-if-needed": "^2.2.25" }, "funding": { "type": "opencollective", @@ -7798,7 +7683,8 @@ }, "node_modules/array-tree-filter": { "version": "2.1.0", - "license": "MIT" + "resolved": "https://registry.npmjs.org/array-tree-filter/-/array-tree-filter-2.1.0.tgz", + "integrity": "sha512-4ROwICNlNw/Hqa9v+rk5h22KjmzB1JGTMVKP2AKJBOCgb0yL0ASf0+YvCcLNNwquOHNX48jkeZIJ3a+oOQqKcw==" }, "node_modules/array-union": { "version": "2.1.0", @@ -8014,7 +7900,8 @@ }, "node_modules/async-validator": { "version": "4.2.5", - "license": "MIT" + "resolved": "https://registry.npmjs.org/async-validator/-/async-validator-4.2.5.tgz", + "integrity": "sha512-7HhHjtERjqlNbZtqNqy2rckN/SpOOlmDliet+lP7k+eKZEjPk3DgyeU9lIXLdeLz0uBbbVp+9Qdow9wJWgwwfg==" }, "node_modules/asynciterator.prototype": { "version": "1.0.0", @@ -9137,6 +9024,15 @@ "node": ">=0.10.0" } }, + "node_modules/bin-wrapper/node_modules/is-retry-allowed": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.2.0.tgz", + "integrity": "sha512-RUbUeKwvm3XG2VYamhJL1xFktgjvPzL0Hq8C+6yrWIswDy3BIXGqCxhxkc30N9jqK311gVU137K8Ei55/zVJRg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/bin-wrapper/node_modules/json-buffer": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz", @@ -10741,8 +10637,9 @@ } }, "node_modules/compute-scroll-into-view": { - "version": "3.1.0", - "license": "MIT" + "version": "1.0.20", + "resolved": "https://registry.npmjs.org/compute-scroll-into-view/-/compute-scroll-into-view-1.0.20.tgz", + "integrity": "sha512-UCB0ioiyj8CRjtrvaceBLqqhZCVP+1B8+NWQhmdsm0VXOJtobBCf1dBQmebCCo34qZmUwZfIH2MZLqNHazrfjg==" }, "node_modules/concat-map": { "version": "0.0.1", @@ -11669,6 +11566,21 @@ "node": ">=12" } }, + "node_modules/date-fns": { + "version": "2.30.0", + "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.30.0.tgz", + "integrity": "sha512-fnULvOpxnC5/Vg3NCiWelDsLiUc9bRwAPs/+LfTLNvetFCtCTN+yQz15C/fs4AwX1R9K5GLtLfn8QW+dWisaAw==", + "dependencies": { + "@babel/runtime": "^7.21.0" + }, + "engines": { + "node": ">=0.11" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/date-fns" + } + }, "node_modules/dateformat": { "version": "3.0.3", "dev": true, @@ -11679,7 +11591,8 @@ }, "node_modules/dayjs": { "version": "1.11.10", - "license": "MIT" + "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.10.tgz", + "integrity": "sha512-vjAczensTgRcqDERK0SR2XMwsF/tSvnvlv6VcF2GIhg6Sx4yOIt/irsr1RDJsKiIyBzJDpCoXiWWq28MqH2cnQ==" }, "node_modules/debounce": { "version": "1.2.1", @@ -12956,6 +12869,11 @@ "dev": true, "license": "MIT" }, + "node_modules/dom-align": { + "version": "1.12.4", + "resolved": "https://registry.npmjs.org/dom-align/-/dom-align-1.12.4.tgz", + "integrity": "sha512-R8LUSEay/68zE5c8/3BDxiTEvgb4xZTF0RKmAHfiEVN3klfIpXfi2/QCoiWPccVQ0J/ZGdz9OjzL4uJEP/MRAw==" + }, "node_modules/dom-converter": { "version": "0.2.0", "license": "MIT", @@ -13146,6 +13064,15 @@ "node": ">=0.10.0" } }, + "node_modules/download/node_modules/is-retry-allowed": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.2.0.tgz", + "integrity": "sha512-RUbUeKwvm3XG2VYamhJL1xFktgjvPzL0Hq8C+6yrWIswDy3BIXGqCxhxkc30N9jqK311gVU137K8Ei55/zVJRg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/download/node_modules/is-stream": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", @@ -21694,6 +21621,18 @@ "node": ">=0.10.0" } }, + "node_modules/is-relative": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-relative/-/is-relative-1.0.0.tgz", + "integrity": "sha512-Kw/ReK0iqwKeu0MITLFuj0jbPAmEiOsIwyIXvvbfa6QfmN9pkD1M+8pdk7Rl/dTKbH34/XBFMbgD4iMJhLQbGA==", + "dev": true, + "dependencies": { + "is-unc-path": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/is-retry-allowed": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-2.2.0.tgz", @@ -31221,6 +31160,14 @@ "node": ">=0.10.0" } }, + "node_modules/moment": { + "version": "2.30.1", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.30.1.tgz", + "integrity": "sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how==", + "engines": { + "node": "*" + } + }, "node_modules/mozjpeg": { "version": "7.1.1", "resolved": "https://registry.npmjs.org/mozjpeg/-/mozjpeg-7.1.1.tgz", @@ -53323,13 +53270,6 @@ "teleport": ">=0.2.0" } }, - "node_modules/qrcode.react": { - "version": "3.1.0", - "license": "ISC", - "peerDependencies": { - "react": "^16.8.0 || ^17.0.0 || ^18.0.0" - } - }, "node_modules/qs": { "version": "6.5.3", "dev": true, @@ -53469,16 +53409,33 @@ "rc": "cli.js" } }, + "node_modules/rc-align": { + "version": "4.0.15", + "resolved": "https://registry.npmjs.org/rc-align/-/rc-align-4.0.15.tgz", + "integrity": "sha512-wqJtVH60pka/nOX7/IspElA8gjPNQKIx/ZqJ6heATCkXpe1Zg4cPVrMD2vC96wjsFFL8WsmhPbx9tdMo1qqlIA==", + "dependencies": { + "@babel/runtime": "^7.10.1", + "classnames": "2.x", + "dom-align": "^1.7.0", + "rc-util": "^5.26.0", + "resize-observer-polyfill": "^1.5.1" + }, + "peerDependencies": { + "react": ">=16.9.0", + "react-dom": ">=16.9.0" + } + }, "node_modules/rc-cascader": { - "version": "3.20.0", - "license": "MIT", + "version": "3.7.3", + "resolved": "https://registry.npmjs.org/rc-cascader/-/rc-cascader-3.7.3.tgz", + "integrity": "sha512-KBpT+kzhxDW+hxPiNk4zaKa99+Lie2/8nnI11XF+FIOPl4Bj9VlFZi61GrnWzhLGA7VEN+dTxAkNOjkySDa0dA==", "dependencies": { "@babel/runtime": "^7.12.5", "array-tree-filter": "^2.1.0", "classnames": "^2.3.1", - "rc-select": "~14.10.0", - "rc-tree": "~5.8.1", - "rc-util": "^5.37.0" + "rc-select": "~14.1.0", + "rc-tree": "~5.7.0", + "rc-util": "^5.6.1" }, "peerDependencies": { "react": ">=16.9.0", @@ -53486,8 +53443,9 @@ } }, "node_modules/rc-checkbox": { - "version": "3.1.0", - "license": "MIT", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/rc-checkbox/-/rc-checkbox-3.0.1.tgz", + "integrity": "sha512-k7nxDWxYF+jDI0ZcCvuvj71xONmWRVe5+1MKcERRR9MRyP3tZ69b+yUCSXXh+sik4/Hc9P5wHr2nnUoGS2zBjA==", "dependencies": { "@babel/runtime": "^7.10.1", "classnames": "^2.3.2", @@ -53499,13 +53457,15 @@ } }, "node_modules/rc-collapse": { - "version": "3.7.2", - "license": "MIT", + "version": "3.4.2", + "resolved": "https://registry.npmjs.org/rc-collapse/-/rc-collapse-3.4.2.tgz", + "integrity": "sha512-jpTwLgJzkhAgp2Wpi3xmbTbbYExg6fkptL67Uu5LCRVEj6wqmy0DHTjjeynsjOLsppHGHu41t1ELntZ0lEvS/Q==", "dependencies": { "@babel/runtime": "^7.10.1", "classnames": "2.x", "rc-motion": "^2.3.4", - "rc-util": "^5.27.0" + "rc-util": "^5.2.1", + "shallowequal": "^1.1.0" }, "peerDependencies": { "react": ">=16.9.0", @@ -53513,8 +53473,9 @@ } }, "node_modules/rc-dialog": { - "version": "9.3.4", - "license": "MIT", + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/rc-dialog/-/rc-dialog-9.0.2.tgz", + "integrity": "sha512-s3U+24xWUuB6Bn2Lk/Qt6rufy+uT+QvWkiFhNBcO9APLxcFFczWamaq7x9h8SCuhfc1nHcW4y8NbMsnAjNnWyg==", "dependencies": { "@babel/runtime": "^7.10.1", "@rc-component/portal": "^1.0.0-8", @@ -53528,14 +53489,15 @@ } }, "node_modules/rc-drawer": { - "version": "6.5.2", - "license": "MIT", + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/rc-drawer/-/rc-drawer-6.3.0.tgz", + "integrity": "sha512-uBZVb3xTAR+dBV53d/bUhTctCw3pwcwJoM7g5aX+7vgwt2zzVzoJ6aqFjYJpBlZ9zp0dVYN8fV+hykFE7c4lig==", "dependencies": { "@babel/runtime": "^7.10.1", "@rc-component/portal": "^1.1.1", "classnames": "^2.2.6", "rc-motion": "^2.6.1", - "rc-util": "^5.36.0" + "rc-util": "^5.21.2" }, "peerDependencies": { "react": ">=16.9.0", @@ -53543,12 +53505,13 @@ } }, "node_modules/rc-dropdown": { - "version": "4.1.0", - "license": "MIT", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/rc-dropdown/-/rc-dropdown-4.0.1.tgz", + "integrity": "sha512-OdpXuOcme1rm45cR0Jzgfl1otzmU4vuBVb+etXM8vcaULGokAKVpKlw8p6xzspG7jGd/XxShvq+N3VNEfk/l5g==", "dependencies": { "@babel/runtime": "^7.18.3", - "@rc-component/trigger": "^1.7.0", "classnames": "^2.2.6", + "rc-trigger": "^5.3.1", "rc-util": "^5.17.0" }, "peerDependencies": { @@ -53557,8 +53520,9 @@ } }, "node_modules/rc-field-form": { - "version": "1.41.0", - "license": "MIT", + "version": "1.38.2", + "resolved": "https://registry.npmjs.org/rc-field-form/-/rc-field-form-1.38.2.tgz", + "integrity": "sha512-O83Oi1qPyEv31Sg+Jwvsj6pXc8uQI2BtIAkURr5lvEYHVggXJhdU/nynK8wY1gbw0qR48k731sN5ON4egRCROA==", "dependencies": { "@babel/runtime": "^7.18.0", "async-validator": "^4.1.0", @@ -53573,15 +53537,16 @@ } }, "node_modules/rc-image": { - "version": "7.5.1", - "license": "MIT", + "version": "5.13.0", + "resolved": "https://registry.npmjs.org/rc-image/-/rc-image-5.13.0.tgz", + "integrity": "sha512-iZTOmw5eWo2+gcrJMMcnd7SsxVHl3w5xlyCgsULUdJhJbnuI8i/AL0tVOsE7aLn9VfOh1qgDT3mC2G75/c7mqg==", "dependencies": { "@babel/runtime": "^7.11.2", "@rc-component/portal": "^1.0.2", "classnames": "^2.2.6", - "rc-dialog": "~9.3.4", + "rc-dialog": "~9.0.0", "rc-motion": "^2.6.2", - "rc-util": "^5.34.1" + "rc-util": "^5.0.6" }, "peerDependencies": { "react": ">=16.9.0", @@ -53589,8 +53554,9 @@ } }, "node_modules/rc-input": { - "version": "1.3.11", - "license": "MIT", + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/rc-input/-/rc-input-0.1.4.tgz", + "integrity": "sha512-FqDdNz+fV2dKNgfXzcSLKvC+jEs1709t7nD+WdfjrdSaOcefpgc7BUJYadc3usaING+b7ediMTfKxuJBsEFbXA==", "dependencies": { "@babel/runtime": "^7.11.1", "classnames": "^2.2.1", @@ -53602,14 +53568,13 @@ } }, "node_modules/rc-input-number": { - "version": "8.4.0", - "license": "MIT", + "version": "7.3.11", + "resolved": "https://registry.npmjs.org/rc-input-number/-/rc-input-number-7.3.11.tgz", + "integrity": "sha512-aMWPEjFeles6PQnMqP5eWpxzsvHm9rh1jQOWXExUEIxhX62Fyl/ptifLHOn17+waDG1T/YUb6flfJbvwRhHrbA==", "dependencies": { "@babel/runtime": "^7.10.1", - "@rc-component/mini-decimal": "^1.0.1", "classnames": "^2.2.5", - "rc-input": "~1.3.5", - "rc-util": "^5.28.0" + "rc-util": "^5.23.0" }, "peerDependencies": { "react": ">=16.9.0", @@ -53617,16 +53582,16 @@ } }, "node_modules/rc-mentions": { - "version": "2.9.1", - "license": "MIT", + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/rc-mentions/-/rc-mentions-1.13.1.tgz", + "integrity": "sha512-FCkaWw6JQygtOz0+Vxz/M/NWqrWHB9LwqlY2RtcuFqWJNFK9njijOOzTSsBGANliGufVUzx/xuPHmZPBV0+Hgw==", "dependencies": { - "@babel/runtime": "^7.22.5", - "@rc-component/trigger": "^1.5.0", + "@babel/runtime": "^7.10.1", "classnames": "^2.2.6", - "rc-input": "~1.3.5", - "rc-menu": "~9.12.0", - "rc-textarea": "~1.5.0", - "rc-util": "^5.34.1" + "rc-menu": "~9.8.0", + "rc-textarea": "^0.4.0", + "rc-trigger": "^5.0.4", + "rc-util": "^5.22.5" }, "peerDependencies": { "react": ">=16.9.0", @@ -53634,14 +53599,15 @@ } }, "node_modules/rc-menu": { - "version": "9.12.4", - "license": "MIT", + "version": "9.8.4", + "resolved": "https://registry.npmjs.org/rc-menu/-/rc-menu-9.8.4.tgz", + "integrity": "sha512-lmw2j8I2fhdIzHmC9ajfImfckt0WDb2KVJJBBRIsxPEw2kGkEfjLMUoB1NgiNT/Q5cC8PdjGOGQjHJIJMwyNMw==", "dependencies": { "@babel/runtime": "^7.10.1", - "@rc-component/trigger": "^1.17.0", "classnames": "2.x", "rc-motion": "^2.4.3", - "rc-overflow": "^1.3.1", + "rc-overflow": "^1.2.8", + "rc-trigger": "^5.1.2", "rc-util": "^5.27.0" }, "peerDependencies": { @@ -53651,7 +53617,8 @@ }, "node_modules/rc-motion": { "version": "2.9.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/rc-motion/-/rc-motion-2.9.0.tgz", + "integrity": "sha512-XIU2+xLkdIr1/h6ohPZXyPBMvOmuyFZQ/T0xnawz+Rh+gh4FINcnZmMT5UTIj6hgI0VLDjTaPeRd+smJeSPqiQ==", "dependencies": { "@babel/runtime": "^7.11.1", "classnames": "^2.2.1", @@ -53663,12 +53630,13 @@ } }, "node_modules/rc-notification": { - "version": "5.3.0", - "license": "MIT", + "version": "4.6.1", + "resolved": "https://registry.npmjs.org/rc-notification/-/rc-notification-4.6.1.tgz", + "integrity": "sha512-NSmFYwrrdY3+un1GvDAJQw62Xi9LNMSsoQyo95tuaYrcad5Bn9gJUL8AREufRxSQAQnr64u3LtP3EUyLYT6bhw==", "dependencies": { "@babel/runtime": "^7.10.1", "classnames": "2.x", - "rc-motion": "^2.9.0", + "rc-motion": "^2.2.0", "rc-util": "^5.20.1" }, "engines": { @@ -53681,7 +53649,8 @@ }, "node_modules/rc-overflow": { "version": "1.3.2", - "license": "MIT", + "resolved": "https://registry.npmjs.org/rc-overflow/-/rc-overflow-1.3.2.tgz", + "integrity": "sha512-nsUm78jkYAoPygDAcGZeC2VwIg/IBGSodtOY3pMof4W3M9qRJgqaDYm03ZayHlde3I6ipliAxbN0RUcGf5KOzw==", "dependencies": { "@babel/runtime": "^7.11.1", "classnames": "^2.2.1", @@ -53694,12 +53663,12 @@ } }, "node_modules/rc-pagination": { - "version": "4.0.3", - "license": "MIT", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/rc-pagination/-/rc-pagination-3.2.0.tgz", + "integrity": "sha512-5tIXjB670WwwcAJzAqp2J+cOBS9W3cH/WU1EiYwXljuZ4vtZXKlY2Idq8FZrnYBz8KhN3vwPo9CoV/SJS6SL1w==", "dependencies": { "@babel/runtime": "^7.10.1", - "classnames": "^2.3.2", - "rc-util": "^5.38.0" + "classnames": "^2.2.1" }, "peerDependencies": { "react": ">=16.9.0", @@ -53707,43 +53676,31 @@ } }, "node_modules/rc-picker": { - "version": "3.14.6", - "license": "MIT", + "version": "2.7.6", + "resolved": "https://registry.npmjs.org/rc-picker/-/rc-picker-2.7.6.tgz", + "integrity": "sha512-H9if/BUJUZBOhPfWcPeT15JUI3/ntrG9muzERrXDkSoWmDj4yzmBvumozpxYrHwjcKnjyDGAke68d+whWwvhHA==", "dependencies": { "@babel/runtime": "^7.10.1", - "@rc-component/trigger": "^1.5.0", "classnames": "^2.2.1", - "rc-util": "^5.30.0" + "date-fns": "2.x", + "dayjs": "1.x", + "moment": "^2.24.0", + "rc-trigger": "^5.0.4", + "rc-util": "^5.37.0", + "shallowequal": "^1.1.0" }, "engines": { "node": ">=8.x" }, "peerDependencies": { - "date-fns": ">= 2.x", - "dayjs": ">= 1.x", - "luxon": ">= 3.x", - "moment": ">= 2.x", "react": ">=16.9.0", "react-dom": ">=16.9.0" - }, - "peerDependenciesMeta": { - "date-fns": { - "optional": true - }, - "dayjs": { - "optional": true - }, - "luxon": { - "optional": true - }, - "moment": { - "optional": true - } } }, "node_modules/rc-progress": { - "version": "3.5.1", - "license": "MIT", + "version": "3.4.2", + "resolved": "https://registry.npmjs.org/rc-progress/-/rc-progress-3.4.2.tgz", + "integrity": "sha512-iAGhwWU+tsayP+Jkl9T4+6rHeQTG9kDz8JAHZk4XtQOcYN5fj9H34NXNEdRdZx94VUDHMqCb1yOIvi8eJRh67w==", "dependencies": { "@babel/runtime": "^7.10.1", "classnames": "^2.2.6", @@ -53755,8 +53712,9 @@ } }, "node_modules/rc-rate": { - "version": "2.12.0", - "license": "MIT", + "version": "2.9.3", + "resolved": "https://registry.npmjs.org/rc-rate/-/rc-rate-2.9.3.tgz", + "integrity": "sha512-2THssUSnRhtqIouQIIXqsZGzRczvp4WsH4WvGuhiwm+LG2fVpDUJliP9O1zeDOZvYfBE/Bup4SgHun/eCkbjgQ==", "dependencies": { "@babel/runtime": "^7.10.1", "classnames": "^2.2.5", @@ -53772,7 +53730,8 @@ }, "node_modules/rc-resize-observer": { "version": "1.4.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/rc-resize-observer/-/rc-resize-observer-1.4.0.tgz", + "integrity": "sha512-PnMVyRid9JLxFavTjeDXEXo65HCRqbmLBw9xX9gfC4BZiSzbLXKzW3jPz+J0P71pLbD5tBMTT+mkstV5gD0c9Q==", "dependencies": { "@babel/runtime": "^7.20.7", "classnames": "^2.2.1", @@ -53785,8 +53744,9 @@ } }, "node_modules/rc-segmented": { - "version": "2.2.2", - "license": "MIT", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/rc-segmented/-/rc-segmented-2.3.0.tgz", + "integrity": "sha512-I3FtM5Smua/ESXutFfb8gJ8ZPcvFR+qUgeeGFQHBOvRiRKyAk4aBE5nfqrxXx+h8/vn60DQjOt6i4RNtrbOobg==", "dependencies": { "@babel/runtime": "^7.11.1", "classnames": "^2.2.1", @@ -53799,16 +53759,17 @@ } }, "node_modules/rc-select": { - "version": "14.10.0", - "license": "MIT", + "version": "14.1.18", + "resolved": "https://registry.npmjs.org/rc-select/-/rc-select-14.1.18.tgz", + "integrity": "sha512-4JgY3oG2Yz68ECMUSCON7mtxuJvCSj+LJpHEg/AONaaVBxIIrmI/ZTuMJkyojall/X50YdBe5oMKqHHPNiPzEg==", "dependencies": { "@babel/runtime": "^7.10.1", - "@rc-component/trigger": "^1.5.0", "classnames": "2.x", "rc-motion": "^2.0.1", - "rc-overflow": "^1.3.1", + "rc-overflow": "^1.0.0", + "rc-trigger": "^5.0.4", "rc-util": "^5.16.1", - "rc-virtual-list": "^3.5.2" + "rc-virtual-list": "^3.2.0" }, "engines": { "node": ">=8.x" @@ -53819,12 +53780,14 @@ } }, "node_modules/rc-slider": { - "version": "10.5.0", - "license": "MIT", + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/rc-slider/-/rc-slider-10.0.1.tgz", + "integrity": "sha512-igTKF3zBet7oS/3yNiIlmU8KnZ45npmrmHlUUio8PNbIhzMcsh+oE/r2UD42Y6YD2D/s+kzCQkzQrPD6RY435Q==", "dependencies": { "@babel/runtime": "^7.10.1", "classnames": "^2.2.5", - "rc-util": "^5.27.0" + "rc-util": "^5.18.1", + "shallowequal": "^1.1.0" }, "engines": { "node": ">=8.x" @@ -53835,8 +53798,9 @@ } }, "node_modules/rc-steps": { - "version": "6.0.1", - "license": "MIT", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/rc-steps/-/rc-steps-5.0.0.tgz", + "integrity": "sha512-9TgRvnVYirdhbV0C3syJFj9EhCRqoJAsxt4i1rED5o8/ZcSv5TLIYyo4H8MCjLPvbe2R+oBAm/IYBEtC+OS1Rw==", "dependencies": { "@babel/runtime": "^7.16.7", "classnames": "^2.2.3", @@ -53851,12 +53815,13 @@ } }, "node_modules/rc-switch": { - "version": "4.1.0", - "license": "MIT", + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/rc-switch/-/rc-switch-3.2.2.tgz", + "integrity": "sha512-+gUJClsZZzvAHGy1vZfnwySxj+MjLlGRyXKXScrtCTcmiYNPzxDFOxdQ/3pK1Kt/0POvwJ/6ALOR8gwdXGhs+A==", "dependencies": { - "@babel/runtime": "^7.21.0", + "@babel/runtime": "^7.10.1", "classnames": "^2.2.1", - "rc-util": "^5.30.0" + "rc-util": "^5.0.1" }, "peerDependencies": { "react": ">=16.9.0", @@ -53864,15 +53829,15 @@ } }, "node_modules/rc-table": { - "version": "7.36.0", - "license": "MIT", + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/rc-table/-/rc-table-7.26.0.tgz", + "integrity": "sha512-0cD8e6S+DTGAt5nBZQIPFYEaIukn17sfa5uFL98faHlH/whZzD8ii3dbFL4wmUDEL4BLybhYop+QUfZJ4CPvNQ==", "dependencies": { "@babel/runtime": "^7.10.1", - "@rc-component/context": "^1.4.0", "classnames": "^2.2.5", "rc-resize-observer": "^1.1.0", - "rc-util": "^5.37.0", - "rc-virtual-list": "^3.11.1" + "rc-util": "^5.22.5", + "shallowequal": "^1.1.0" }, "engines": { "node": ">=8.x" @@ -53883,16 +53848,17 @@ } }, "node_modules/rc-tabs": { - "version": "12.14.1", - "license": "MIT", + "version": "12.5.10", + "resolved": "https://registry.npmjs.org/rc-tabs/-/rc-tabs-12.5.10.tgz", + "integrity": "sha512-Ay0l0jtd4eXepFH9vWBvinBjqOpqzcsJTerBGwJy435P2S90Uu38q8U/mvc1sxUEVOXX5ZCFbxcWPnfG3dH+tQ==", "dependencies": { "@babel/runtime": "^7.11.2", "classnames": "2.x", - "rc-dropdown": "~4.1.0", - "rc-menu": "~9.12.0", + "rc-dropdown": "~4.0.0", + "rc-menu": "~9.8.0", "rc-motion": "^2.6.2", "rc-resize-observer": "^1.0.0", - "rc-util": "^5.34.1" + "rc-util": "^5.16.0" }, "engines": { "node": ">=8.x" @@ -53903,14 +53869,15 @@ } }, "node_modules/rc-textarea": { - "version": "1.5.3", - "license": "MIT", + "version": "0.4.7", + "resolved": "https://registry.npmjs.org/rc-textarea/-/rc-textarea-0.4.7.tgz", + "integrity": "sha512-IQPd1CDI3mnMlkFyzt2O4gQ2lxUsnBAeJEoZGJnkkXgORNqyM9qovdrCj9NzcRfpHgLdzaEbU3AmobNFGUznwQ==", "dependencies": { "@babel/runtime": "^7.10.1", "classnames": "^2.2.1", - "rc-input": "~1.3.5", "rc-resize-observer": "^1.0.0", - "rc-util": "^5.27.0" + "rc-util": "^5.24.4", + "shallowequal": "^1.1.0" }, "peerDependencies": { "react": ">=16.9.0", @@ -53918,12 +53885,13 @@ } }, "node_modules/rc-tooltip": { - "version": "6.1.2", - "license": "MIT", + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/rc-tooltip/-/rc-tooltip-5.2.2.tgz", + "integrity": "sha512-jtQzU/18S6EI3lhSGoDYhPqNpWajMtS5VV/ld1LwyfrDByQpYmw/LW6U7oFXXLukjfDHQ7Ju705A82PRNFWYhg==", "dependencies": { "@babel/runtime": "^7.11.2", - "@rc-component/trigger": "^1.18.0", - "classnames": "^2.3.1" + "classnames": "^2.3.1", + "rc-trigger": "^5.0.0" }, "peerDependencies": { "react": ">=16.9.0", @@ -53931,8 +53899,9 @@ } }, "node_modules/rc-tree": { - "version": "5.8.2", - "license": "MIT", + "version": "5.7.12", + "resolved": "https://registry.npmjs.org/rc-tree/-/rc-tree-5.7.12.tgz", + "integrity": "sha512-LXA5nY2hG5koIAlHW5sgXgLpOMz+bFRbnZZ+cCg0tQs4Wv1AmY7EDi1SK7iFXhslYockbqUerQan82jljoaItg==", "dependencies": { "@babel/runtime": "^7.10.1", "classnames": "2.x", @@ -53949,13 +53918,14 @@ } }, "node_modules/rc-tree-select": { - "version": "5.15.0", - "license": "MIT", + "version": "5.5.5", + "resolved": "https://registry.npmjs.org/rc-tree-select/-/rc-tree-select-5.5.5.tgz", + "integrity": "sha512-k2av7jF6tW9bIO4mQhaVdV4kJ1c54oxV3/hHVU+oD251Gb5JN+m1RbJFTMf1o0rAFqkvto33rxMdpafaGKQRJw==", "dependencies": { "@babel/runtime": "^7.10.1", "classnames": "2.x", - "rc-select": "~14.10.0", - "rc-tree": "~5.8.1", + "rc-select": "~14.1.0", + "rc-tree": "~5.7.0", "rc-util": "^5.16.1" }, "peerDependencies": { @@ -53963,9 +53933,29 @@ "react-dom": "*" } }, + "node_modules/rc-trigger": { + "version": "5.3.4", + "resolved": "https://registry.npmjs.org/rc-trigger/-/rc-trigger-5.3.4.tgz", + "integrity": "sha512-mQv+vas0TwKcjAO2izNPkqR4j86OemLRmvL2nOzdP9OWNWA1ivoTt5hzFqYNW9zACwmTezRiN8bttrC7cZzYSw==", + "dependencies": { + "@babel/runtime": "^7.18.3", + "classnames": "^2.2.6", + "rc-align": "^4.0.0", + "rc-motion": "^2.0.0", + "rc-util": "^5.19.2" + }, + "engines": { + "node": ">=8.x" + }, + "peerDependencies": { + "react": ">=16.9.0", + "react-dom": ">=16.9.0" + } + }, "node_modules/rc-upload": { - "version": "4.3.5", - "license": "MIT", + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/rc-upload/-/rc-upload-4.3.6.tgz", + "integrity": "sha512-Bt7ESeG5tT3IY82fZcP+s0tQU2xmo1W6P3S8NboUUliquJLQYLkUcsaExi3IlBVr43GQMCjo30RA2o0i70+NjA==", "dependencies": { "@babel/runtime": "^7.18.3", "classnames": "^2.2.5", @@ -53977,8 +53967,9 @@ } }, "node_modules/rc-util": { - "version": "5.38.1", - "license": "MIT", + "version": "5.39.1", + "resolved": "https://registry.npmjs.org/rc-util/-/rc-util-5.39.1.tgz", + "integrity": "sha512-OW/ERynNDgNr4y0oiFmtes3rbEamXw7GHGbkbNd9iRr7kgT03T6fT0b9WpJ3mbxKhyOcAHnGcIoh5u/cjrC2OQ==", "dependencies": { "@babel/runtime": "^7.18.3", "react-is": "^18.2.0" @@ -53990,11 +53981,13 @@ }, "node_modules/rc-util/node_modules/react-is": { "version": "18.2.0", - "license": "MIT" + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", + "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==" }, "node_modules/rc-virtual-list": { - "version": "3.11.3", - "license": "MIT", + "version": "3.11.4", + "resolved": "https://registry.npmjs.org/rc-virtual-list/-/rc-virtual-list-3.11.4.tgz", + "integrity": "sha512-NbBi0fvyIu26gP69nQBiWgUMTPX3mr4FcuBQiVqagU0BnuX8WQkiivnMs105JROeuUIFczLrlgUhLQwTWV1XDA==", "dependencies": { "@babel/runtime": "^7.20.0", "classnames": "^2.2.6", @@ -54005,8 +53998,8 @@ "node": ">=8.x" }, "peerDependencies": { - "react": "*", - "react-dom": "*" + "react": ">=16.9.0", + "react-dom": ">=16.9.0" } }, "node_modules/rc/node_modules/strip-json-comments": { @@ -56820,10 +56813,11 @@ } }, "node_modules/scroll-into-view-if-needed": { - "version": "3.1.0", - "license": "MIT", + "version": "2.2.31", + "resolved": "https://registry.npmjs.org/scroll-into-view-if-needed/-/scroll-into-view-if-needed-2.2.31.tgz", + "integrity": "sha512-dGCXy99wZQivjmjIqihaBQNjryrz5rueJY7eHfTdyWEiR4ttYpsajb14rn9s5d4DY4EcY6+4+U/maARBXJedkA==", "dependencies": { - "compute-scroll-into-view": "^3.0.2" + "compute-scroll-into-view": "^1.0.20" } }, "node_modules/search-insights": { @@ -61905,10 +61899,6 @@ "postcss": "^8.2.15" } }, - "node_modules/stylis": { - "version": "4.3.0", - "license": "MIT" - }, "node_modules/stylus": { "version": "0.59.0", "dev": true, diff --git a/package.json b/package.json index b5a57e9dd0..44bf3d647c 100644 --- a/package.json +++ b/package.json @@ -34,6 +34,7 @@ "react-live": ">=3.1.1 <4.0.0" }, "dependencies": { + "@ant-design/icons": "^4.8.3", "@commitlint/cli": "^17.6.7", "@commitlint/config-conventional": "^17.6.7", "@docusaurus/core": "^3.1.1", @@ -45,7 +46,7 @@ "@fortawesome/free-solid-svg-icons": "^6.4.0", "@fortawesome/react-fontawesome": "^0.2.0", "@mdx-js/react": "^3.0.0", - "antd": "^5.6.2", + "antd": "^4.22.6", "axios-retry": "^3.8.0", "babel-plugin-macros": "^3.1.0", "clsx": "^1.2.1", diff --git a/plugins/packs-integrations.js b/plugins/packs-integrations.js index 91c622be49..c6b0b27a9c 100644 --- a/plugins/packs-integrations.js +++ b/plugins/packs-integrations.js @@ -1,7 +1,8 @@ import api from "../src/services/api"; import { setTimeout } from "timers/promises"; +import { packTypeNames } from "../src/components/Technologies/PackConstants"; -const layerMap = { +/*const layerMap = { k8s: "Kubernetes", cni: "network", os: "operating system", @@ -19,7 +20,7 @@ const layerMap = { serverless: "serverless", "app services": "app services", -} +}*/ function generateIntegrationData(allContent) { const packsData = allContent["docusaurus-plugin-content-docs"].default.loadedVersions[0].docs @@ -52,15 +53,19 @@ function combineAPICustomPackData(packsMData, packsPaletteDetailsData, customPac const packName = packContent.name; if (packsMData[packName]) { const packMDValue = packsMData[packName]; - const layer = packMDValue.spec.layer === "addon" ? packMDValue.spec.addonType : layerMap[packMDValue.spec.layer]; + const packType = packMDValue.spec.layer === "addon" ? packMDValue.spec.addonType : packMDValue.spec.layer; + const layer = packMDValue.spec.layer === "addon" ? packMDValue.spec.addonType : packTypeNames[packMDValue.spec.layer]; return { fields: { sidebar_label: packMDValue.spec.name, + name: packMDValue.spec.name, title: packMDValue.spec.displayName, description: 'dynamically generated', hide_table_of_contents: true, + cloudTypes: packMDValue.spec.cloudTypes, type: 'integration', category: [layer], + packType: packType, sidebar_class_name: 'hide-from-sidebar', logoUrl: packMDValue.spec.registries[0].logoUrl, tags: [], @@ -74,11 +79,14 @@ function combineAPICustomPackData(packsMData, packsPaletteDetailsData, customPac async function fetchPackListItems(queryParams, packDataArr, counter) { const payload = {filter: { type: ["spectro", "oci"],environment:["aws"]}}; + //const payload = {filter: { type: ["spectro", "oci"], layer: ["os", "k8s"], environment:["aws"]}} + //const payload = {filter: { type: ["spectro", "oci"], layer: ["addon"], "environment":["all"] }}; counter+=1; if(counter%10 === 0) { await setTimeout(2000); } const response = await api.post('/v1/packs/search'+queryParams, payload); + console.log("response.data.listmeta.count = ", response.data.listmeta.count); const tempPackArr = packDataArr.concat(response.data.items); if(response.data.listmeta.continue) { return fetchPackListItems("?limit=100&continue="+response.data.listmeta.continue, tempPackArr, counter); diff --git a/src/components/IconMapper/IconMapper.tsx b/src/components/IconMapper/IconMapper.tsx index 22c06aaa02..6a594bfa58 100644 --- a/src/components/IconMapper/IconMapper.tsx +++ b/src/components/IconMapper/IconMapper.tsx @@ -18,6 +18,21 @@ import RolesIcon from "@site/static/assets/icons/roles.svg"; import TeamsIcon from "@site/static/assets/icons/teams.svg"; import WorkspacesIcon from "@site/static/assets/icons/workspaces.svg"; import TerraformIcon from "@site/static/assets/icons/terraform.svg"; +import K8sIcon from '@site/static/assets/packs/k8s_layer.svg'; +import CniIcon from '@site/static/assets/packs/cni_layer.svg'; +import OsIcon from '@site/static/assets/packs/os_layer.svg'; +import ServiceMeshIcon from '@site/static/assets/packs/service_mesh_layer.svg'; +import MonitoringIcon from '@site/static/assets/packs/monitoring_layer.svg'; +import CsiIcon from '@site/static/assets/packs/csi_layer.svg'; +import LoggingIcon from '@site/static/assets/packs/logging_layer.svg'; +import LoadBalancerIcon from '@site/static/assets/packs/load_balancer_layer.svg'; +import IngressIcon from '@site/static/assets/packs/ingress_layer.svg'; +import AuthenticationIcon from '@site/static/assets/packs/authentication_layer.svg'; +import RegistryIcon from '@site/static/assets/packs/registry_layer.svg'; +import SystemAppIcon from '@site/static/assets/packs/system_app_layer.svg'; +import SecurityIcon from '@site/static/assets/packs/security_layer.svg'; +import AppServicesIcon from '@site/static/assets/packs/app_layer.svg'; +import MiscIcon from '@site/static/assets/packs/misc_layer.svg'; import { IconProp } from "@fortawesome/fontawesome-svg-core"; import { fontAwesomeIcons } from "./dynamicFontAwesomeImports"; @@ -44,6 +59,22 @@ export const icons: IconsMap = { teams: , workspaces: , terraform: , + k8s: , + cni: , + os: , + servicemesh: , + monitoring: , + csi: , + logging: , + 'load balancer': , + ingress: , + authentication: , + registry: , + 'system app': , + spectro: , + security: , + serverless: , + 'app services': , }; function IconMapper({ type }: { type: string }): React.ReactElement { diff --git a/src/components/Integrations/IntegrationTypes.ts b/src/components/Integrations/IntegrationTypes.ts index beb6fa5e6f..2f0fbc7504 100644 --- a/src/components/Integrations/IntegrationTypes.ts +++ b/src/components/Integrations/IntegrationTypes.ts @@ -8,6 +8,7 @@ export interface FrontMatterData { logoUrl: string; slug: string; id: string; + packType: string; } export interface PacksData { diff --git a/src/components/Technologies/CategorySelector/AdditionalFilters.tsx b/src/components/Technologies/CategorySelector/AdditionalFilters.tsx new file mode 100644 index 0000000000..ccd116d55d --- /dev/null +++ b/src/components/Technologies/CategorySelector/AdditionalFilters.tsx @@ -0,0 +1,34 @@ +import React, { useState } from "react"; +import { Dropdown, Tag, MenuProps, Space } from 'antd'; +import { fontAwesomeIcons } from "../../IconMapper/dynamicFontAwesomeImports"; +import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; +import { PlusCircleOutlined } from '@ant-design/icons'; +import styles from "./CategorySelector.module.scss"; +import "./additionalFilters.antd.css"; + +export default function AdditionalFilters() { + const items: MenuProps['items'] = [ + { + label: 'FIPS', + key: 'FIPS', + }, + { + label: 'Verified', + key: 'Verified', + }, + { + label: 'Community', + key: 'Community', + }, + ]; + + return( +
+ + } placement="bottomCenter"> + Additional Filter + + +
+ ) +} diff --git a/src/components/Technologies/CategorySelector/CategorySelector.tsx b/src/components/Technologies/CategorySelector/CategorySelector.tsx deleted file mode 100644 index 533cf3a18c..0000000000 --- a/src/components/Technologies/CategorySelector/CategorySelector.tsx +++ /dev/null @@ -1,26 +0,0 @@ -import React from "react"; -import styles from "./CategorySelector.module.scss"; - -interface CategorySelectorProps { - categories: string[]; - selected: string; - selectCategory: (category: string) => void; -} - -export default function CategorySelector({ categories, selected = "all", selectCategory }: CategorySelectorProps) { - return ( -
- {categories.map((category, index) => ( -
{ - selectCategory(category); - }} - > - {category.split("_").join(" ")} -
- ))} -
- ); -} diff --git a/src/components/Technologies/CategorySelector/CloudProviderSelecor.tsx b/src/components/Technologies/CategorySelector/CloudProviderSelecor.tsx new file mode 100644 index 0000000000..51f8363c1a --- /dev/null +++ b/src/components/Technologies/CategorySelector/CloudProviderSelecor.tsx @@ -0,0 +1,34 @@ +import React from "react"; +import { Select } from "antd"; +import { cloudProviderTypes } from "../PackConstants"; +import styles from "./CategorySelector.module.scss"; + +interface CategorySelectorProps { + selected: string; // Update the type to string[] + selectCloudProvider: (provider: string) => void; +} + +export default function CloudProviderSelecor({ selected="", selectCloudProvider }: CategorySelectorProps) { + const getOptions = () => { + const providers = Object.keys(cloudProviderTypes); + const providersMap = providers.map((provider) => { + return ( + + {cloudProviderTypes[provider as keyof typeof cloudProviderTypes] || provider} + + ); + }); + return providersMap; + } + return( +
+ +
+ ) +}; diff --git a/src/components/Technologies/CategorySelector/CustomLabel.module.scss b/src/components/Technologies/CategorySelector/CustomLabel.module.scss new file mode 100644 index 0000000000..bbf834a581 --- /dev/null +++ b/src/components/Technologies/CategorySelector/CustomLabel.module.scss @@ -0,0 +1,9 @@ +.customLabel { + font-size: 14px; + background-color: #dee1ea; + height: 32px; + align-self: center; + padding-top: 5px; + padding-left: 5px; + padding-right: 5px; +} diff --git a/src/components/Technologies/CategorySelector/CustomLabel.tsx b/src/components/Technologies/CategorySelector/CustomLabel.tsx new file mode 100644 index 0000000000..b31b44a20c --- /dev/null +++ b/src/components/Technologies/CategorySelector/CustomLabel.tsx @@ -0,0 +1,16 @@ +import React from "react"; +import { Typography } from "antd"; +import styles from "./CustomLabel.module.scss"; + +interface CustomLabelProps { + label: string; +} + +export default function CustomLabel({ label }: CustomLabelProps) { + const { Text } = Typography; + return ( +
+ {label} +
+ ); +} diff --git a/src/components/Technologies/CategorySelector/TypeSelector.tsx b/src/components/Technologies/CategorySelector/TypeSelector.tsx new file mode 100644 index 0000000000..13ce8d38fa --- /dev/null +++ b/src/components/Technologies/CategorySelector/TypeSelector.tsx @@ -0,0 +1,36 @@ +import React from "react"; +import styles from "./CategorySelector.module.scss"; +import { Select } from "antd"; +import { packTypeNames } from "../PackConstants"; + +interface TypeSelectorProps { + categories: string[]; + selected: string[]; // Update the type to string[] + selectCategory: (category: string[]) => void; +} + +export default function TypeSelector({ categories, selected = [""], selectCategory }: TypeSelectorProps) { + function getOptions(categories: string[]) { + const categoriesMap = categories.map((category) => { + return ( + + {packTypeNames[category as keyof typeof packTypeNames]} + + ); + }); + return categoriesMap; + } + + return ( +
+ +
+ ); +} diff --git a/src/components/Technologies/CategorySelector/additionalFilters.antd.css b/src/components/Technologies/CategorySelector/additionalFilters.antd.css new file mode 100644 index 0000000000..c842d6b610 --- /dev/null +++ b/src/components/Technologies/CategorySelector/additionalFilters.antd.css @@ -0,0 +1,9 @@ +.ant-space-compact-block { + flex-direction: row-reverse; +} +.ant-btn-compact-item { + background-color: #d9d9d9; +} +.ant-btn { + background-color: #d9d9d9; +} diff --git a/src/components/Technologies/CategorySelector/index.ts b/src/components/Technologies/CategorySelector/index.ts deleted file mode 100644 index 4da20365ba..0000000000 --- a/src/components/Technologies/CategorySelector/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -import CategorySelector from "./CategorySelector"; - -export default CategorySelector; diff --git a/src/components/Technologies/PackCardIcon.module.scss b/src/components/Technologies/PackCardIcon.module.scss new file mode 100644 index 0000000000..966d1c54af --- /dev/null +++ b/src/components/Technologies/PackCardIcon.module.scss @@ -0,0 +1,12 @@ +.imageWrapper { + display: flex; + justify-content: center; + align-items: center; + height: 52px; + width: 100%; + margin: 5px 0 5px; + svg { + width: 52px; + height: 52px; + } +} diff --git a/src/components/Technologies/PackCardIcon.tsx b/src/components/Technologies/PackCardIcon.tsx new file mode 100644 index 0000000000..e21138d8af --- /dev/null +++ b/src/components/Technologies/PackCardIcon.tsx @@ -0,0 +1,34 @@ +import React, { useState } from "react"; +import styles from "./PackCardIcon.module.scss"; +import IconMapper from "@site/src/components/IconMapper/IconMapper"; +import { Image } from "antd"; + +interface PackCardIconProps { + title: string; + logoUrl: string; + type: string; +} + +export default function PackCardIcon({ title, logoUrl, type }: PackCardIconProps) { + const [ isError, setIsError ] = useState(false); + console.log("type", type, " title ", title); + const handleImageError = (e: any) => { + console.log(`Failed to load e.target.src: ${e.target.src}`); + e.target.style.display = "none"; + setIsError(true); + // + }; + + return ( +
+ {isError ?() : + ({`${title}) + } +
+ ); +} diff --git a/src/components/Technologies/PackConstants.ts b/src/components/Technologies/PackConstants.ts new file mode 100644 index 0000000000..18e80759e0 --- /dev/null +++ b/src/components/Technologies/PackConstants.ts @@ -0,0 +1,54 @@ +export const packTypes = [ + 'k8s', + 'cni', + 'os', + 'servicemesh', + 'monitoring', + 'csi', + 'logging', + 'load balancer', + 'ingress', + 'authentication', + 'registry', + 'system app', + 'spectro', + 'security', + 'serverless', + 'app services', +] as const; + +type packType = typeof packTypes[number]; + +export const packTypeNames: Record = { + k8s: 'Kubernetes', + cni: 'Network', + os: 'Operating System', + servicemesh: 'Service Mesh', + monitoring: 'Monitoring', + csi: 'Storage', + logging: 'Logging', + 'load balancer': 'Load Balancer', + ingress: 'Ingress', + authentication: 'Authentication', + registry: 'Registry', + 'system app': 'System App', + spectro: 'Spectro', + security: 'Security', + serverless: 'Serverless', + 'app services': 'App Services', +} as const; + +export const cloudProviderTypes = { + aws: 'AWS IaaS', + eks: 'AWS EKS', + aks: 'Azure AKS', + gke: 'GCP GKE', + azure: 'Azure IaaS', + gcp: 'GCP IaaS', + vsphere: 'VMware', + openstack: 'OpenStack', + maas: 'MAAS', + tke: 'TKE', + 'edge-native': 'Edge Native', + custom: 'Custom', +} as const; diff --git a/src/components/Technologies/PackFilters.module.scss b/src/components/Technologies/PackFilters.module.scss new file mode 100644 index 0000000000..d607428991 --- /dev/null +++ b/src/components/Technologies/PackFilters.module.scss @@ -0,0 +1,8 @@ +.wrapper { + display: flex; + flex-wrap: wrap; + .filterItems { + display: flex; + padding-right: 10px; + } +} diff --git a/src/components/Technologies/PacksFilters.tsx b/src/components/Technologies/PacksFilters.tsx new file mode 100644 index 0000000000..8216885a4b --- /dev/null +++ b/src/components/Technologies/PacksFilters.tsx @@ -0,0 +1,36 @@ +import React from "react"; +import TypeSelector from "./CategorySelector/TypeSelector"; +import CloudProviderSelecor from "./CategorySelector/CloudProviderSelecor"; +import styles from "./PackFilters.module.scss"; +import CustomLabel from "./CategorySelector/CustomLabel"; +import AdditionalFilters from "./CategorySelector/AdditionalFilters"; +interface PackFiltersProps { + categories: string[]; + selectedFilters: { category: string[], provider: string}; + setSelectedSearchFilters: (...args: any[]) => void; +} +export default function PacksFilters({ categories, selectedFilters, setSelectedSearchFilters }: PackFiltersProps) { + function setSelectedCategory(category: string[]) { + setSelectedSearchFilters({category: category}); + console.log("category", category); + } + function setSelectedProvider(provider: string) { + setSelectedSearchFilters({provider: provider}); + console.log("provider", provider); + } + return ( +
+
+ + +
+
+ + +
+
+ +
+
+ ); +} diff --git a/src/components/Technologies/Technologies.module.scss b/src/components/Technologies/Technologies.module.scss index ae777eea6a..7985a058f1 100644 --- a/src/components/Technologies/Technologies.module.scss +++ b/src/components/Technologies/Technologies.module.scss @@ -1,8 +1,6 @@ .wrapper { padding: 15px 0; .technologyWrapper { - display: flex; - flex-wrap: wrap; margin-top: 32px; } .imageWrapper { @@ -13,11 +11,6 @@ width: 100%; margin: 5px 0 5px; } - - .imageWrapper > img { - max-height: 100%; - max-width: 100%; - } .card { width: 120px; height: 120px; @@ -44,4 +37,14 @@ text-align: center; word-break: break-word; } + .ant-collapse { + width: 100%; + border: 0 none; + background: white; + } +} +.ant-collapse { + width: 100%; + border: 0 none; + background: white; } diff --git a/src/components/Technologies/Technologies.tsx b/src/components/Technologies/Technologies.tsx index b0a8cdb156..b443b33b19 100644 --- a/src/components/Technologies/Technologies.tsx +++ b/src/components/Technologies/Technologies.tsx @@ -2,9 +2,12 @@ import React, { useState, useMemo } from "react"; import Fuse from "fuse.js"; import styles from "./Technologies.module.scss"; import Search from "./Search"; -import CategorySelector from "./CategorySelector"; import { PacksData, IntegrationsData } from "../Integrations/IntegrationTypes"; import TechnologyCard from "./TechnologyCard"; +import PacksFilters from "./PacksFilters"; +import { packTypeNames } from "./PackConstants"; +import { Collapse } from "antd"; +import "./technologies.antd.css"; const searchOptions = { threshold: 0.5, @@ -16,64 +19,65 @@ interface TechnologiesProps { } export default function Technologies({ data }: TechnologiesProps) { - const [selectedCategory, setSelectedCategory] = useState("all"); + const [selectedFilters, setSelectedFilters] = useState({ category: [""]}); const [searchValue, setSearchValue] = useState(""); const categories = useMemo(() => { - const categoriesSet = data.reduce( - (accumulator, technology) => { - const categories = technology.fields.category || []; - categories.forEach((category) => { - accumulator.add(category); - }); - return accumulator; - }, - new Set(["all"]) - ); - return new Set([...categoriesSet].sort()); - }, [data]); - - const technologies = useMemo(() => { - let technologies = [...data].sort((pack1, pack2) => { - const category1 = pack1.fields.category[0]; - const category2 = pack2.fields.category[0]; - - if (category1 < category2) { - return -1; - } - - if (category1 > category2) { - return 1; + const categoriesMap = new Map(); + data.forEach((technology) => { + const key = technology.fields.packType; + if(categoriesMap.has(key)){ + categoriesMap.get(key).push(technology.fields); + } else { + categoriesMap.set(key, new Array(technology.fields)); } - - return 0; }); - - if (searchValue) { - const fuse = new Fuse(technologies, searchOptions); - technologies = fuse.search(searchValue).map(({ item }) => item); - } - - if (selectedCategory !== "all") { - technologies = technologies.filter(({ fields }) => fields.category.includes(selectedCategory)) || []; - } - - return technologies; - }, [data, searchValue, selectedCategory]); + const sortedCategoriesMap = new Map([...categoriesMap.entries()].sort()); + const categoryKeys = Array.from(sortedCategoriesMap.keys()); + categoryKeys.forEach((category) => { + const fields = sortedCategoriesMap.get(category); + fields.sort((field1, field2) => { + if(field1.name > field2.name){ + return 1; + } else if(field1.name < field2.name){ + return -1; + } else { + return 0; + } + }); + }) + return sortedCategoriesMap; + }, [data]); const onSearch = (event: React.ChangeEvent) => { setSearchValue(event.target.value); }; - + const renderPacks = (fields) => { + return fields.map((field) => { + const { title, slug, logoUrl, packType } = field; + return ; + }); + }; + const renderPacksCategories = () => { + const categoryKeys = Array.from(categories.keys()); + const categoryItems = []; + categoryKeys.forEach((category) => { + const obj = ({renderPacks(categories.get(category))}) + categoryItems.push(obj) + }); + return categoryItems; + }; + const setSelectedSearchFilters = (selectedSearchFilters) => { + setSelectedFilters(selectedSearchFilters) + } return (
- +
- {technologies.map(({ fields }) => { - const { title, slug, logoUrl } = fields; - return ; - })} + + {renderPacksCategories()} +
); diff --git a/src/components/Technologies/TechnologyCard.tsx b/src/components/Technologies/TechnologyCard.tsx index 67a7c9c382..3185aa3ddd 100644 --- a/src/components/Technologies/TechnologyCard.tsx +++ b/src/components/Technologies/TechnologyCard.tsx @@ -1,20 +1,30 @@ import React from "react"; import Link from "@docusaurus/Link"; import styles from "./Technologies.module.scss"; +import PackCardIcon from "./PackCardIcon"; +import osLayerIcon from "@site/static/assets/packs/os_layer.svg"; +import Image from "@theme/IdealImage"; +import IconMapper from "@site/src/components/IconMapper/IconMapper"; + interface TechnologyCardProps { title: string; slug: string; logoUrl: string; + type: string; } -export default function TechnologyCard({ title, slug, logoUrl }: TechnologyCardProps) { +export default function TechnologyCard({ title, slug, logoUrl, type }: TechnologyCardProps) { + const handleImageError = (e: any) => { + console.log(`Failed to load e.target.src: ${e.target.src}`); + e.target.src.display = "none" + // + }; + return (
-
- {`${title} -
+
{title}
diff --git a/src/components/Technologies/technologies.antd.css b/src/components/Technologies/technologies.antd.css new file mode 100644 index 0000000000..e00e015ae8 --- /dev/null +++ b/src/components/Technologies/technologies.antd.css @@ -0,0 +1,12 @@ +.ant-collapse { + width: 100%; + border: 0 none; + background: white; +} +.ant-collapse-content-box { + display: flex; + flex-wrap: wrap; +} +.ant-select { + width: 200px +} diff --git a/src/theme/Root/Root.tsx b/src/theme/Root/Root.tsx index e962534a39..55abde4a2f 100644 --- a/src/theme/Root/Root.tsx +++ b/src/theme/Root/Root.tsx @@ -1,5 +1,7 @@ import React from "react"; import MendableAIWidget from "../../components/MendableAIWidget"; +import "antd/dist/antd.css"; + export default function Root({ children }: { children: React.ReactNode }) { return ( diff --git a/static/assets/packs/app_layer.svg b/static/assets/packs/app_layer.svg new file mode 100644 index 0000000000..0546d733ca --- /dev/null +++ b/static/assets/packs/app_layer.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/static/assets/packs/authentication_layer.svg b/static/assets/packs/authentication_layer.svg new file mode 100644 index 0000000000..5b54c141ef --- /dev/null +++ b/static/assets/packs/authentication_layer.svg @@ -0,0 +1,4 @@ + + + + diff --git a/static/assets/packs/cni_layer.svg b/static/assets/packs/cni_layer.svg new file mode 100644 index 0000000000..6190df0eca --- /dev/null +++ b/static/assets/packs/cni_layer.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/static/assets/packs/csi_layer.svg b/static/assets/packs/csi_layer.svg new file mode 100644 index 0000000000..4dff687862 --- /dev/null +++ b/static/assets/packs/csi_layer.svg @@ -0,0 +1,4 @@ + + + + diff --git a/static/assets/packs/ingress_layer.svg b/static/assets/packs/ingress_layer.svg new file mode 100644 index 0000000000..28a02fefb6 --- /dev/null +++ b/static/assets/packs/ingress_layer.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/static/assets/packs/k8s_layer.svg b/static/assets/packs/k8s_layer.svg new file mode 100644 index 0000000000..643cb21c2a --- /dev/null +++ b/static/assets/packs/k8s_layer.svg @@ -0,0 +1,3 @@ + + + diff --git a/static/assets/packs/load_balancer_layer.svg b/static/assets/packs/load_balancer_layer.svg new file mode 100644 index 0000000000..b676b5f9d1 --- /dev/null +++ b/static/assets/packs/load_balancer_layer.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/static/assets/packs/logging_layer.svg b/static/assets/packs/logging_layer.svg new file mode 100644 index 0000000000..491f49d8fa --- /dev/null +++ b/static/assets/packs/logging_layer.svg @@ -0,0 +1,3 @@ + + + diff --git a/static/assets/packs/misc_layer.svg b/static/assets/packs/misc_layer.svg new file mode 100644 index 0000000000..806f5d04fb --- /dev/null +++ b/static/assets/packs/misc_layer.svg @@ -0,0 +1,3 @@ + + + diff --git a/static/assets/packs/monitoring_layer.svg b/static/assets/packs/monitoring_layer.svg new file mode 100644 index 0000000000..fcf3bf26b3 --- /dev/null +++ b/static/assets/packs/monitoring_layer.svg @@ -0,0 +1,3 @@ + + + diff --git a/static/assets/packs/os_layer.svg b/static/assets/packs/os_layer.svg new file mode 100644 index 0000000000..4d8a3e8b9e --- /dev/null +++ b/static/assets/packs/os_layer.svg @@ -0,0 +1,3 @@ + + + diff --git a/static/assets/packs/registry_layer.svg b/static/assets/packs/registry_layer.svg new file mode 100644 index 0000000000..1408268e00 --- /dev/null +++ b/static/assets/packs/registry_layer.svg @@ -0,0 +1,3 @@ + + + diff --git a/static/assets/packs/security_layer.svg b/static/assets/packs/security_layer.svg new file mode 100644 index 0000000000..216408aefd --- /dev/null +++ b/static/assets/packs/security_layer.svg @@ -0,0 +1,3 @@ + + + diff --git a/static/assets/packs/service_mesh_layer.svg b/static/assets/packs/service_mesh_layer.svg new file mode 100644 index 0000000000..87f68780ee --- /dev/null +++ b/static/assets/packs/service_mesh_layer.svg @@ -0,0 +1,3 @@ + + + diff --git a/static/assets/packs/system_app_layer.svg b/static/assets/packs/system_app_layer.svg new file mode 100644 index 0000000000..462a2fb7bb --- /dev/null +++ b/static/assets/packs/system_app_layer.svg @@ -0,0 +1,3 @@ + + + From af3e9aac18766b824d74fb3227b2817b49fabc12 Mon Sep 17 00:00:00 2001 From: nage1234 <88926279+nage1234@users.noreply.github.com> Date: Tue, 2 Apr 2024 13:29:39 +0530 Subject: [PATCH 03/23] filters logic added for various pack filters --- plugins/packs-integrations.js | 39 ++++--------- .../Integrations/IntegrationTypes.ts | 2 + .../CategorySelector/AdditionalFilters.tsx | 57 +++++++++++++++---- .../CategorySelector.module.scss | 1 + .../additionalFilters.antd.css | 4 ++ src/components/Technologies/PacksFilters.tsx | 8 ++- src/components/Technologies/Technologies.tsx | 39 ++++++++++--- 7 files changed, 100 insertions(+), 50 deletions(-) diff --git a/plugins/packs-integrations.js b/plugins/packs-integrations.js index c6b0b27a9c..043ab06678 100644 --- a/plugins/packs-integrations.js +++ b/plugins/packs-integrations.js @@ -2,25 +2,6 @@ import api from "../src/services/api"; import { setTimeout } from "timers/promises"; import { packTypeNames } from "../src/components/Technologies/PackConstants"; -/*const layerMap = { - k8s: "Kubernetes", - cni: "network", - os: "operating system", - servicemesh: "service mesh", - monitoring: "monitoring", - csi: "storage", - logging: "logging", - "load balancer": "load balancer", - ingress: "ingress", - authentication: "authentication", - registry: "registry", - "system app": "system app", - spectro: "spectro", - security: "security", - serverless: "serverless", - "app services": "app services", - -}*/ function generateIntegrationData(allContent) { const packsData = allContent["docusaurus-plugin-content-docs"].default.loadedVersions[0].docs @@ -57,7 +38,6 @@ function combineAPICustomPackData(packsMData, packsPaletteDetailsData, customPac const layer = packMDValue.spec.layer === "addon" ? packMDValue.spec.addonType : packTypeNames[packMDValue.spec.layer]; return { fields: { - sidebar_label: packMDValue.spec.name, name: packMDValue.spec.name, title: packMDValue.spec.displayName, description: 'dynamically generated', @@ -71,6 +51,7 @@ function combineAPICustomPackData(packsMData, packsPaletteDetailsData, customPac tags: [], slug: '/integrations/${packMDValue.spec.name}', id: 'integrations/${packMDValue.spec.name}', + verified: packMDValue.spec.registries[0].annotations?.source === "spectrocloud", } }; } @@ -106,15 +87,17 @@ async function pluginPacksAndIntegrationsData() { let counter = 0; let promises = new Array(); for (let i = 0; i < packDataArr.length; i++) { - counter+=1 const packData = packDataArr[i]; - packMDMap[packData.spec.name]=packData; - promises.push(api.get(packUrl + packData.spec.registries[0].latestPackUid)); - if(counter%10 === 0 || i === packDataArr.length-1) { - await setTimeout(2000); - const response2 = await Promise.all(promises); - apiPacksData = apiPacksData.concat(response2.map((pack) => pack.data)); - promises = []; + if(packData.spec.registries.length) { + counter+=1 + packMDMap[packData.spec.name]=packData; + promises.push(api.get(packUrl + packData.spec.registries[0].latestPackUid)); + if(counter%10 === 0 || i === packDataArr.length-1) { + await setTimeout(2000); + const response2 = await Promise.all(promises); + apiPacksData = apiPacksData.concat(response2.map((pack) => pack.data)); + promises = []; + } } } return {packsPaletteData: packMDMap, packsPaletteDetailsData: apiPacksData} ; diff --git a/src/components/Integrations/IntegrationTypes.ts b/src/components/Integrations/IntegrationTypes.ts index 2f0fbc7504..4638929188 100644 --- a/src/components/Integrations/IntegrationTypes.ts +++ b/src/components/Integrations/IntegrationTypes.ts @@ -9,6 +9,8 @@ export interface FrontMatterData { slug: string; id: string; packType: string; + verified: boolean; + cloudTypes: string[]; } export interface PacksData { diff --git a/src/components/Technologies/CategorySelector/AdditionalFilters.tsx b/src/components/Technologies/CategorySelector/AdditionalFilters.tsx index ccd116d55d..c502596455 100644 --- a/src/components/Technologies/CategorySelector/AdditionalFilters.tsx +++ b/src/components/Technologies/CategorySelector/AdditionalFilters.tsx @@ -1,13 +1,20 @@ import React, { useState } from "react"; -import { Dropdown, Tag, MenuProps, Space } from 'antd'; -import { fontAwesomeIcons } from "../../IconMapper/dynamicFontAwesomeImports"; -import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; +import { Tag, Space, Menu } from 'antd'; +import type { MenuProps } from 'antd'; import { PlusCircleOutlined } from '@ant-design/icons'; import styles from "./CategorySelector.module.scss"; import "./additionalFilters.antd.css"; -export default function AdditionalFilters() { - const items: MenuProps['items'] = [ +interface MenuItemProps { + label: string; + key: string; +} +interface AdditionalFiltersProps { + selectAdditionalFilters: (additionalFilters: string[]) => void; +} + +export default function AdditionalFilters({ selectAdditionalFilters }: AdditionalFiltersProps) { + const [items, setItems] = useState([ { label: 'FIPS', key: 'FIPS', @@ -19,16 +26,44 @@ export default function AdditionalFilters() { { label: 'Community', key: 'Community', + } + ]); + const [selectedItems, setSelectedItems] = useState([]); + + const additionalMenu: MenuProps['items'] = [ + { + label: 'Additional Filter', + key: 'additionalFilter', + icon: , + children: items, }, ]; - return( + const loadMenu = (key: string) => { + const selItem = items.find((item) => item.key === key); + if (selItem) { + const _selectedItems = [...selectedItems, selItem]; + selectAdditionalFilters(_selectedItems.map((item) => item.label)); + setSelectedItems(_selectedItems); + setItems(items.filter((item) => item.key !== key)) + } + }; + + const removeItem = (key: string) => { + const newItems = selectedItems.filter((item) => item.key !== key); + setSelectedItems(newItems); + setItems([...items, selectedItems.find((item) => item.key === key)!]); + selectAdditionalFilters(newItems.map((item) => item.label)); + }; + + return (
- - } placement="bottomCenter"> - Additional Filter - + + {selectedItems.map((item) => ( + removeItem(item.key)}>{item.label} + ))} + loadMenu(key)} mode="horizontal" items={additionalMenu} />
- ) + ); } diff --git a/src/components/Technologies/CategorySelector/CategorySelector.module.scss b/src/components/Technologies/CategorySelector/CategorySelector.module.scss index efc4875655..0024c3d3a7 100644 --- a/src/components/Technologies/CategorySelector/CategorySelector.module.scss +++ b/src/components/Technologies/CategorySelector/CategorySelector.module.scss @@ -3,6 +3,7 @@ flex-wrap: wrap; margin-top: 15px; margin-bottom: 15px; + align-items: center; .selectorCard { padding: 4px 12px; background: var(--ifm-breadcrumb-item-background-active); diff --git a/src/components/Technologies/CategorySelector/additionalFilters.antd.css b/src/components/Technologies/CategorySelector/additionalFilters.antd.css index c842d6b610..2f1e668ecd 100644 --- a/src/components/Technologies/CategorySelector/additionalFilters.antd.css +++ b/src/components/Technologies/CategorySelector/additionalFilters.antd.css @@ -7,3 +7,7 @@ .ant-btn { background-color: #d9d9d9; } +.ant-menu-horizontal { + background-color: #d9d9d9; + line-height: 32px; +} diff --git a/src/components/Technologies/PacksFilters.tsx b/src/components/Technologies/PacksFilters.tsx index 8216885a4b..03b4f87202 100644 --- a/src/components/Technologies/PacksFilters.tsx +++ b/src/components/Technologies/PacksFilters.tsx @@ -6,7 +6,7 @@ import CustomLabel from "./CategorySelector/CustomLabel"; import AdditionalFilters from "./CategorySelector/AdditionalFilters"; interface PackFiltersProps { categories: string[]; - selectedFilters: { category: string[], provider: string}; + selectedFilters: { category: string[], provider: string, additionalFilters: string[]}; setSelectedSearchFilters: (...args: any[]) => void; } export default function PacksFilters({ categories, selectedFilters, setSelectedSearchFilters }: PackFiltersProps) { @@ -18,6 +18,10 @@ export default function PacksFilters({ categories, selectedFilters, setSelectedS setSelectedSearchFilters({provider: provider}); console.log("provider", provider); } + function selectAdditionalFilters(additionalFilters: string[]) { + setSelectedSearchFilters({additionalFilters: additionalFilters}); + console.log("additionalFilters", additionalFilters); + } return (
@@ -29,7 +33,7 @@ export default function PacksFilters({ categories, selectedFilters, setSelectedS
- +
); diff --git a/src/components/Technologies/Technologies.tsx b/src/components/Technologies/Technologies.tsx index b443b33b19..330c985402 100644 --- a/src/components/Technologies/Technologies.tsx +++ b/src/components/Technologies/Technologies.tsx @@ -2,7 +2,7 @@ import React, { useState, useMemo } from "react"; import Fuse from "fuse.js"; import styles from "./Technologies.module.scss"; import Search from "./Search"; -import { PacksData, IntegrationsData } from "../Integrations/IntegrationTypes"; +import { PacksData, IntegrationsData, FrontMatterData } from "../Integrations/IntegrationTypes"; import TechnologyCard from "./TechnologyCard"; import PacksFilters from "./PacksFilters"; import { packTypeNames } from "./PackConstants"; @@ -19,7 +19,7 @@ interface TechnologiesProps { } export default function Technologies({ data }: TechnologiesProps) { - const [selectedFilters, setSelectedFilters] = useState({ category: [""]}); + const [selectedFilters, setSelectedFilters] = useState({ category: [], provider: "", additionalFilters: []}); const [searchValue, setSearchValue] = useState(""); const categories = useMemo(() => { @@ -52,24 +52,45 @@ export default function Technologies({ data }: TechnologiesProps) { const onSearch = (event: React.ChangeEvent) => { setSearchValue(event.target.value); }; - const renderPacks = (fields) => { + const renderPacks = (fields: FrontMatterData[]) => { return fields.map((field) => { const { title, slug, logoUrl, packType } = field; return ; }); }; const renderPacksCategories = () => { - const categoryKeys = Array.from(categories.keys()); - const categoryItems = []; + let categoryKeys: string[] = Array.from(categories.keys()); + const categoryItems: JSX.Element[] = []; + if(selectedFilters.category.length > 0) { + categoryKeys = categoryKeys.filter((category: string) => { // Add type annotation for category parameter + return selectedFilters.category.includes(category); + }); + } categoryKeys.forEach((category) => { - const obj = ({renderPacks(categories.get(category))}) + let filteredTechCards = categories.get(category); + if (selectedFilters.provider) { + filteredTechCards = filteredTechCards.filter((techCard: FrontMatterData) => { + return techCard.cloudTypes.includes("all") || techCard.cloudTypes.includes(selectedFilters.provider); + }); + } + //TODO: Add additional filter logic based on backend API data like community, FIPs + if (selectedFilters.additionalFilters.length && selectedFilters.additionalFilters.includes("Verified")) { + filteredTechCards = filteredTechCards.filter((techCard: FrontMatterData) => { + return techCard.verified; + }); + } + + const obj = ({renderPacks(filteredTechCards)}) categoryItems.push(obj) }); return categoryItems; }; - const setSelectedSearchFilters = (selectedSearchFilters) => { - setSelectedFilters(selectedSearchFilters) - } + const setSelectedSearchFilters = (selectedSearchFilters: Record) => { + setSelectedFilters((prevState) => ({ + ...prevState, + ...selectedSearchFilters + })); + }; return (
From 87a48d85075b41a232e2a53749e137fbbc5dae0d Mon Sep 17 00:00:00 2001 From: nage1234 <88926279+nage1234@users.noreply.github.com> Date: Thu, 11 Apr 2024 16:43:39 +0530 Subject: [PATCH 04/23] added some more changes for routing, integrated the readme and customreadme --- declarations.d.ts | 6 +- docs/docs-content/integrations/packs.mdx | 10 + package-lock.json | 1990 ++++++----------- package.json | 6 +- plugins/packs-integrations.js | 170 +- .../Integrations/IntegrationTypes.ts | 10 + .../PacksInformation/PacksInformation.tsx | 32 + src/components/PacksInformation/index.ts | 3 + src/components/PacksReadme/NewComponent.tsx | 14 + .../PacksReadme/PacksReadme.antd.css | 5 + .../PacksReadme/PacksReadme.module.scss | 54 + src/components/PacksReadme/PacksReadme.tsx | 178 ++ src/components/PacksReadme/index.ts | 3 + .../CategorySelector.test.tsx | 2 +- .../CategorySelector/CustomLabel.tsx | 11 +- src/components/Technologies/PackCardIcon.tsx | 8 +- src/components/Technologies/PackConstants.ts | 56 +- .../Technologies/Technologies.module.scss | 4 + src/components/Technologies/Technologies.tsx | 15 +- .../Technologies/TechnologyCard.tsx | 27 +- src/declarations.d.ts | 4 + src/services/api/index.js | 1 + src/theme/MDXComponents/MDXComponents.ts | 2 + src/types/index.d.ts | 5 + static/packs-data/packs_information.json | 18 + 25 files changed, 1235 insertions(+), 1399 deletions(-) create mode 100644 docs/docs-content/integrations/packs.mdx create mode 100644 src/components/PacksInformation/PacksInformation.tsx create mode 100644 src/components/PacksInformation/index.ts create mode 100644 src/components/PacksReadme/NewComponent.tsx create mode 100644 src/components/PacksReadme/PacksReadme.antd.css create mode 100644 src/components/PacksReadme/PacksReadme.module.scss create mode 100644 src/components/PacksReadme/PacksReadme.tsx create mode 100644 src/components/PacksReadme/index.ts create mode 100644 static/packs-data/packs_information.json diff --git a/declarations.d.ts b/declarations.d.ts index 95771c99c6..c42385c0a0 100644 --- a/declarations.d.ts +++ b/declarations.d.ts @@ -5,6 +5,11 @@ declare module "*.module.scss" { export default classes; } +declare module '*.md' { + const value: string; // markdown is just a string + export default value; +} + declare module "*.scss" { const src: string; export default src; @@ -13,5 +18,4 @@ declare module "*.scss" { interface Mendable { initialize: () => void; } // Add other methods or properties as needed } - // Extend the global Window interface declare global { interface Window { Mendable: Mendable; } } diff --git a/docs/docs-content/integrations/packs.mdx b/docs/docs-content/integrations/packs.mdx new file mode 100644 index 0000000000..10d2aefd94 --- /dev/null +++ b/docs/docs-content/integrations/packs.mdx @@ -0,0 +1,10 @@ +--- +sidebar_label: "Pack Information" +title: "Pack Information" +description: "Learn about packs that Palette offers and choose from Pallette packs." +hide_table_of_contents: false +icon: "teams" +tags: ["packs"] +--- + + diff --git a/package-lock.json b/package-lock.json index 08094f9af0..91b6319a9e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -29,10 +29,14 @@ "docusaurus-plugin-sass": "^0.2.5", "docusaurus-theme-openapi-docs": "^3.0.0-beta.3", "fuse.js": "^6.6.2", + "markdown-to-jsx": "^7.0.0", "prism-react-renderer": "^2.1.0", "react": "^18.2.0", "react-dom": "^18.2.0", - "sass": "^1.64.1" + "react-markdown": "9.0.1", + "remark-gfm": "4.0.0", + "sass": "^1.64.1", + "semver": "^7.3.7" }, "devDependencies": { "@semantic-release/changelog": "^6.0.1", @@ -371,6 +375,14 @@ "url": "https://opencollective.com/babel" } }, + "node_modules/@babel/core/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "bin": { + "semver": "bin/semver.js" + } + }, "node_modules/@babel/generator": { "version": "7.23.6", "license": "MIT", @@ -418,6 +430,14 @@ "node": ">=6.9.0" } }, + "node_modules/@babel/helper-compilation-targets/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "bin": { + "semver": "bin/semver.js" + } + }, "node_modules/@babel/helper-create-class-features-plugin": { "version": "7.23.6", "license": "MIT", @@ -439,6 +459,14 @@ "@babel/core": "^7.0.0" } }, + "node_modules/@babel/helper-create-class-features-plugin/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "bin": { + "semver": "bin/semver.js" + } + }, "node_modules/@babel/helper-create-regexp-features-plugin": { "version": "7.22.15", "license": "MIT", @@ -454,6 +482,14 @@ "@babel/core": "^7.0.0" } }, + "node_modules/@babel/helper-create-regexp-features-plugin/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "bin": { + "semver": "bin/semver.js" + } + }, "node_modules/@babel/helper-define-polyfill-provider": { "version": "0.4.4", "license": "MIT", @@ -1609,6 +1645,14 @@ "@babel/core": "^7.0.0-0" } }, + "node_modules/@babel/plugin-transform-runtime/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "bin": { + "semver": "bin/semver.js" + } + }, "node_modules/@babel/plugin-transform-shorthand-properties": { "version": "7.23.3", "license": "MIT", @@ -1838,6 +1882,14 @@ "@babel/core": "^7.0.0-0" } }, + "node_modules/@babel/preset-env/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "bin": { + "semver": "bin/semver.js" + } + }, "node_modules/@babel/preset-modules": { "version": "0.1.6-no-external-plugins", "license": "MIT", @@ -1890,8 +1942,9 @@ "license": "MIT" }, "node_modules/@babel/runtime": { - "version": "7.23.6", - "license": "MIT", + "version": "7.24.4", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.24.4.tgz", + "integrity": "sha512-dkxf7+hn8mFBwKjs9bvBlArzLVxVbS8usaPUDd5p2a9JCL9tB8OaOVN1isD4+Xyk4ns89/xeOmbQvgdK7IIVdA==", "dependencies": { "regenerator-runtime": "^0.14.0" }, @@ -2582,29 +2635,6 @@ "node": ">=8" } }, - "node_modules/@docusaurus/core/node_modules/lru-cache": { - "version": "6.0.0", - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/@docusaurus/core/node_modules/semver": { - "version": "7.5.4", - "license": "ISC", - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/@docusaurus/core/node_modules/supports-color": { "version": "7.2.0", "license": "MIT", @@ -2615,10 +2645,6 @@ "node": ">=8" } }, - "node_modules/@docusaurus/core/node_modules/yallist": { - "version": "4.0.0", - "license": "ISC" - }, "node_modules/@docusaurus/cssnano-preset": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/@docusaurus/cssnano-preset/-/cssnano-preset-3.1.1.tgz", @@ -4066,31 +4092,6 @@ "node": ">=10" } }, - "node_modules/@jest/reporters/node_modules/lru-cache": { - "version": "6.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/@jest/reporters/node_modules/semver": { - "version": "7.5.4", - "dev": true, - "license": "ISC", - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/@jest/reporters/node_modules/supports-color": { "version": "7.2.0", "dev": true, @@ -4102,11 +4103,6 @@ "node": ">=8" } }, - "node_modules/@jest/reporters/node_modules/yallist": { - "version": "4.0.0", - "dev": true, - "license": "ISC" - }, "node_modules/@jest/schemas": { "version": "29.6.3", "license": "MIT", @@ -4486,36 +4482,6 @@ "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "node_modules/@npmcli/config/node_modules/lru-cache": { - "version": "6.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/@npmcli/config/node_modules/semver": { - "version": "7.5.4", - "dev": true, - "license": "ISC", - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/@npmcli/config/node_modules/yallist": { - "version": "4.0.0", - "dev": true, - "license": "ISC" - }, "node_modules/@npmcli/map-workspaces": { "version": "3.0.4", "dev": true, @@ -5391,17 +5357,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@semantic-release/npm/node_modules/lru-cache": { - "version": "6.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/@semantic-release/npm/node_modules/mimic-fn": { "version": "4.0.0", "dev": true, @@ -5452,20 +5407,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@semantic-release/npm/node_modules/semver": { - "version": "7.5.4", - "dev": true, - "license": "ISC", - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/@semantic-release/npm/node_modules/signal-exit": { "version": "4.1.0", "dev": true, @@ -5488,11 +5429,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@semantic-release/npm/node_modules/yallist": { - "version": "4.0.0", - "dev": true, - "license": "ISC" - }, "node_modules/@semantic-release/release-notes-generator": { "version": "10.0.3", "dev": true, @@ -6695,36 +6631,6 @@ } } }, - "node_modules/@typescript-eslint/eslint-plugin/node_modules/lru-cache": { - "version": "6.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/@typescript-eslint/eslint-plugin/node_modules/semver": { - "version": "7.5.4", - "dev": true, - "license": "ISC", - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/@typescript-eslint/eslint-plugin/node_modules/yallist": { - "version": "4.0.0", - "dev": true, - "license": "ISC" - }, "node_modules/@typescript-eslint/parser": { "version": "6.14.0", "dev": true, @@ -6832,36 +6738,6 @@ } } }, - "node_modules/@typescript-eslint/typescript-estree/node_modules/lru-cache": { - "version": "6.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/@typescript-eslint/typescript-estree/node_modules/semver": { - "version": "7.5.4", - "dev": true, - "license": "ISC", - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/@typescript-eslint/typescript-estree/node_modules/yallist": { - "version": "4.0.0", - "dev": true, - "license": "ISC" - }, "node_modules/@typescript-eslint/utils": { "version": "6.14.0", "dev": true, @@ -6886,36 +6762,6 @@ "eslint": "^7.0.0 || ^8.0.0" } }, - "node_modules/@typescript-eslint/utils/node_modules/lru-cache": { - "version": "6.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/@typescript-eslint/utils/node_modules/semver": { - "version": "7.5.4", - "dev": true, - "license": "ISC", - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/@typescript-eslint/utils/node_modules/yallist": { - "version": "4.0.0", - "dev": true, - "license": "ISC" - }, "node_modules/@typescript-eslint/visitor-keys": { "version": "6.14.0", "dev": true, @@ -8221,6 +8067,14 @@ "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" } }, + "node_modules/babel-plugin-polyfill-corejs2/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "bin": { + "semver": "bin/semver.js" + } + }, "node_modules/babel-plugin-polyfill-corejs3": { "version": "0.8.7", "license": "MIT", @@ -9655,36 +9509,6 @@ "semver": "^7.0.0" } }, - "node_modules/builtins/node_modules/lru-cache": { - "version": "6.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/builtins/node_modules/semver": { - "version": "7.5.4", - "dev": true, - "license": "ISC", - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/builtins/node_modules/yallist": { - "version": "4.0.0", - "dev": true, - "license": "ISC" - }, "node_modules/bundle-name": { "version": "3.0.0", "dev": true, @@ -10798,6 +10622,15 @@ "node": ">=10" } }, + "node_modules/conventional-changelog-writer/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, "node_modules/conventional-commits-filter": { "version": "2.0.7", "dev": true, @@ -11241,33 +11074,6 @@ "webpack": "^5.0.0" } }, - "node_modules/css-loader/node_modules/lru-cache": { - "version": "6.0.0", - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/css-loader/node_modules/semver": { - "version": "7.5.4", - "license": "ISC", - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/css-loader/node_modules/yallist": { - "version": "4.0.0", - "license": "ISC" - }, "node_modules/css-minimizer-webpack-plugin": { "version": "4.2.2", "license": "MIT", @@ -12676,6 +12482,15 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/docusaurus-theme-openapi-docs/node_modules/hast-util-whitespace": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/hast-util-whitespace/-/hast-util-whitespace-2.0.1.tgz", + "integrity": "sha512-nAxA0v8+vXSBDt3AnRUNjyRIQ0rD+ntpbAp4LnPkumc5M9yUbSMa4XDU9Q6etY4f1Wp4bNgvc1yjiZtsTTrSng==", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/docusaurus-theme-openapi-docs/node_modules/hastscript": { "version": "7.2.0", "license": "MIT", @@ -12699,10 +12514,466 @@ "url": "https://github.com/sponsors/wooorm" } }, + "node_modules/docusaurus-theme-openapi-docs/node_modules/mdast-util-definitions": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/mdast-util-definitions/-/mdast-util-definitions-5.1.2.tgz", + "integrity": "sha512-8SVPMuHqlPME/z3gqVwWY4zVXn8lqKv/pAhC57FuJ40ImXyBpmO5ukh98zB2v7Blql2FiHjHv9LVztSIqjY+MA==", + "dependencies": { + "@types/mdast": "^3.0.0", + "@types/unist": "^2.0.0", + "unist-util-visit": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/docusaurus-theme-openapi-docs/node_modules/mdast-util-from-markdown": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/mdast-util-from-markdown/-/mdast-util-from-markdown-1.3.1.tgz", + "integrity": "sha512-4xTO/M8c82qBcnQc1tgpNtubGUW/Y1tBQ1B0i5CtSoelOLKFYlElIr3bvgREYYO5iRqbMY1YuqZng0GVOI8Qww==", + "dependencies": { + "@types/mdast": "^3.0.0", + "@types/unist": "^2.0.0", + "decode-named-character-reference": "^1.0.0", + "mdast-util-to-string": "^3.1.0", + "micromark": "^3.0.0", + "micromark-util-decode-numeric-character-reference": "^1.0.0", + "micromark-util-decode-string": "^1.0.0", + "micromark-util-normalize-identifier": "^1.0.0", + "micromark-util-symbol": "^1.0.0", + "micromark-util-types": "^1.0.0", + "unist-util-stringify-position": "^3.0.0", + "uvu": "^0.5.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/docusaurus-theme-openapi-docs/node_modules/mdast-util-to-hast": { + "version": "12.3.0", + "resolved": "https://registry.npmjs.org/mdast-util-to-hast/-/mdast-util-to-hast-12.3.0.tgz", + "integrity": "sha512-pits93r8PhnIoU4Vy9bjW39M2jJ6/tdHyja9rrot9uujkN7UTU9SDnE6WNJz/IGyQk3XHX6yNNtrBH6cQzm8Hw==", + "dependencies": { + "@types/hast": "^2.0.0", + "@types/mdast": "^3.0.0", + "mdast-util-definitions": "^5.0.0", + "micromark-util-sanitize-uri": "^1.1.0", + "trim-lines": "^3.0.0", + "unist-util-generated": "^2.0.0", + "unist-util-position": "^4.0.0", + "unist-util-visit": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/docusaurus-theme-openapi-docs/node_modules/mdast-util-to-string": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/mdast-util-to-string/-/mdast-util-to-string-3.2.0.tgz", + "integrity": "sha512-V4Zn/ncyN1QNSqSBxTrMOLpjr+IKdHl2v3KVLoWmDPscP4r9GcCi71gjgvUV1SFSKh92AjAG4peFuBl2/YgCJg==", + "dependencies": { + "@types/mdast": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/docusaurus-theme-openapi-docs/node_modules/micromark": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/micromark/-/micromark-3.2.0.tgz", + "integrity": "sha512-uD66tJj54JLYq0De10AhWycZWGQNUvDI55xPgk2sQM5kn1JYlhbCMTtEeT27+vAhW2FBQxLlOmS3pmA7/2z4aA==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "@types/debug": "^4.0.0", + "debug": "^4.0.0", + "decode-named-character-reference": "^1.0.0", + "micromark-core-commonmark": "^1.0.1", + "micromark-factory-space": "^1.0.0", + "micromark-util-character": "^1.0.0", + "micromark-util-chunked": "^1.0.0", + "micromark-util-combine-extensions": "^1.0.0", + "micromark-util-decode-numeric-character-reference": "^1.0.0", + "micromark-util-encode": "^1.0.0", + "micromark-util-normalize-identifier": "^1.0.0", + "micromark-util-resolve-all": "^1.0.0", + "micromark-util-sanitize-uri": "^1.0.0", + "micromark-util-subtokenize": "^1.0.0", + "micromark-util-symbol": "^1.0.0", + "micromark-util-types": "^1.0.1", + "uvu": "^0.5.0" + } + }, + "node_modules/docusaurus-theme-openapi-docs/node_modules/micromark-core-commonmark": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/micromark-core-commonmark/-/micromark-core-commonmark-1.1.0.tgz", + "integrity": "sha512-BgHO1aRbolh2hcrzL2d1La37V0Aoz73ymF8rAcKnohLy93titmv62E0gP8Hrx9PKcKrqCZ1BbLGbP3bEhoXYlw==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "decode-named-character-reference": "^1.0.0", + "micromark-factory-destination": "^1.0.0", + "micromark-factory-label": "^1.0.0", + "micromark-factory-space": "^1.0.0", + "micromark-factory-title": "^1.0.0", + "micromark-factory-whitespace": "^1.0.0", + "micromark-util-character": "^1.0.0", + "micromark-util-chunked": "^1.0.0", + "micromark-util-classify-character": "^1.0.0", + "micromark-util-html-tag-name": "^1.0.0", + "micromark-util-normalize-identifier": "^1.0.0", + "micromark-util-resolve-all": "^1.0.0", + "micromark-util-subtokenize": "^1.0.0", + "micromark-util-symbol": "^1.0.0", + "micromark-util-types": "^1.0.1", + "uvu": "^0.5.0" + } + }, + "node_modules/docusaurus-theme-openapi-docs/node_modules/micromark-factory-destination": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/micromark-factory-destination/-/micromark-factory-destination-1.1.0.tgz", + "integrity": "sha512-XaNDROBgx9SgSChd69pjiGKbV+nfHGDPVYFs5dOoDd7ZnMAE+Cuu91BCpsY8RT2NP9vo/B8pds2VQNCLiu0zhg==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "micromark-util-character": "^1.0.0", + "micromark-util-symbol": "^1.0.0", + "micromark-util-types": "^1.0.0" + } + }, + "node_modules/docusaurus-theme-openapi-docs/node_modules/micromark-factory-label": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/micromark-factory-label/-/micromark-factory-label-1.1.0.tgz", + "integrity": "sha512-OLtyez4vZo/1NjxGhcpDSbHQ+m0IIGnT8BoPamh+7jVlzLJBH98zzuCoUeMxvM6WsNeh8wx8cKvqLiPHEACn0w==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "micromark-util-character": "^1.0.0", + "micromark-util-symbol": "^1.0.0", + "micromark-util-types": "^1.0.0", + "uvu": "^0.5.0" + } + }, + "node_modules/docusaurus-theme-openapi-docs/node_modules/micromark-factory-title": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/micromark-factory-title/-/micromark-factory-title-1.1.0.tgz", + "integrity": "sha512-J7n9R3vMmgjDOCY8NPw55jiyaQnH5kBdV2/UXCtZIpnHH3P6nHUKaH7XXEYuWwx/xUJcawa8plLBEjMPU24HzQ==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "micromark-factory-space": "^1.0.0", + "micromark-util-character": "^1.0.0", + "micromark-util-symbol": "^1.0.0", + "micromark-util-types": "^1.0.0" + } + }, + "node_modules/docusaurus-theme-openapi-docs/node_modules/micromark-factory-whitespace": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/micromark-factory-whitespace/-/micromark-factory-whitespace-1.1.0.tgz", + "integrity": "sha512-v2WlmiymVSp5oMg+1Q0N1Lxmt6pMhIHD457whWM7/GUlEks1hI9xj5w3zbc4uuMKXGisksZk8DzP2UyGbGqNsQ==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "micromark-factory-space": "^1.0.0", + "micromark-util-character": "^1.0.0", + "micromark-util-symbol": "^1.0.0", + "micromark-util-types": "^1.0.0" + } + }, + "node_modules/docusaurus-theme-openapi-docs/node_modules/micromark-util-chunked": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/micromark-util-chunked/-/micromark-util-chunked-1.1.0.tgz", + "integrity": "sha512-Ye01HXpkZPNcV6FiyoW2fGZDUw4Yc7vT0E9Sad83+bEDiCJ1uXu0S3mr8WLpsz3HaG3x2q0HM6CTuPdcZcluFQ==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "micromark-util-symbol": "^1.0.0" + } + }, + "node_modules/docusaurus-theme-openapi-docs/node_modules/micromark-util-classify-character": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/micromark-util-classify-character/-/micromark-util-classify-character-1.1.0.tgz", + "integrity": "sha512-SL0wLxtKSnklKSUplok1WQFoGhUdWYKggKUiqhX+Swala+BtptGCu5iPRc+xvzJ4PXE/hwM3FNXsfEVgoZsWbw==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "micromark-util-character": "^1.0.0", + "micromark-util-symbol": "^1.0.0", + "micromark-util-types": "^1.0.0" + } + }, + "node_modules/docusaurus-theme-openapi-docs/node_modules/micromark-util-combine-extensions": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/micromark-util-combine-extensions/-/micromark-util-combine-extensions-1.1.0.tgz", + "integrity": "sha512-Q20sp4mfNf9yEqDL50WwuWZHUrCO4fEyeDCnMGmG5Pr0Cz15Uo7KBs6jq+dq0EgX4DPwwrh9m0X+zPV1ypFvUA==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "micromark-util-chunked": "^1.0.0", + "micromark-util-types": "^1.0.0" + } + }, + "node_modules/docusaurus-theme-openapi-docs/node_modules/micromark-util-decode-numeric-character-reference": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/micromark-util-decode-numeric-character-reference/-/micromark-util-decode-numeric-character-reference-1.1.0.tgz", + "integrity": "sha512-m9V0ExGv0jB1OT21mrWcuf4QhP46pH1KkfWy9ZEezqHKAxkj4mPCy3nIH1rkbdMlChLHX531eOrymlwyZIf2iw==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "micromark-util-symbol": "^1.0.0" + } + }, + "node_modules/docusaurus-theme-openapi-docs/node_modules/micromark-util-decode-string": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/micromark-util-decode-string/-/micromark-util-decode-string-1.1.0.tgz", + "integrity": "sha512-YphLGCK8gM1tG1bd54azwyrQRjCFcmgj2S2GoJDNnh4vYtnL38JS8M4gpxzOPNyHdNEpheyWXCTnnTDY3N+NVQ==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "decode-named-character-reference": "^1.0.0", + "micromark-util-character": "^1.0.0", + "micromark-util-decode-numeric-character-reference": "^1.0.0", + "micromark-util-symbol": "^1.0.0" + } + }, + "node_modules/docusaurus-theme-openapi-docs/node_modules/micromark-util-encode": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/micromark-util-encode/-/micromark-util-encode-1.1.0.tgz", + "integrity": "sha512-EuEzTWSTAj9PA5GOAs992GzNh2dGQO52UvAbtSOMvXTxv3Criqb6IOzJUBCmEqrrXSblJIJBbFFv6zPxpreiJw==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ] + }, + "node_modules/docusaurus-theme-openapi-docs/node_modules/micromark-util-html-tag-name": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/micromark-util-html-tag-name/-/micromark-util-html-tag-name-1.2.0.tgz", + "integrity": "sha512-VTQzcuQgFUD7yYztuQFKXT49KghjtETQ+Wv/zUjGSGBioZnkA4P1XXZPT1FHeJA6RwRXSF47yvJ1tsJdoxwO+Q==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ] + }, + "node_modules/docusaurus-theme-openapi-docs/node_modules/micromark-util-normalize-identifier": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/micromark-util-normalize-identifier/-/micromark-util-normalize-identifier-1.1.0.tgz", + "integrity": "sha512-N+w5vhqrBihhjdpM8+5Xsxy71QWqGn7HYNUvch71iV2PM7+E3uWGox1Qp90loa1ephtCxG2ftRV/Conitc6P2Q==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "micromark-util-symbol": "^1.0.0" + } + }, + "node_modules/docusaurus-theme-openapi-docs/node_modules/micromark-util-resolve-all": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/micromark-util-resolve-all/-/micromark-util-resolve-all-1.1.0.tgz", + "integrity": "sha512-b/G6BTMSg+bX+xVCshPTPyAu2tmA0E4X98NSR7eIbeC6ycCqCeE7wjfDIgzEbkzdEVJXRtOG4FbEm/uGbCRouA==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "micromark-util-types": "^1.0.0" + } + }, + "node_modules/docusaurus-theme-openapi-docs/node_modules/micromark-util-sanitize-uri": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/micromark-util-sanitize-uri/-/micromark-util-sanitize-uri-1.2.0.tgz", + "integrity": "sha512-QO4GXv0XZfWey4pYFndLUKEAktKkG5kZTdUNaTAkzbuJxn2tNBOr+QtxR2XpWaMhbImT2dPzyLrPXLlPhph34A==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "micromark-util-character": "^1.0.0", + "micromark-util-encode": "^1.0.0", + "micromark-util-symbol": "^1.0.0" + } + }, + "node_modules/docusaurus-theme-openapi-docs/node_modules/micromark-util-subtokenize": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/micromark-util-subtokenize/-/micromark-util-subtokenize-1.1.0.tgz", + "integrity": "sha512-kUQHyzRoxvZO2PuLzMt2P/dwVsTiivCK8icYTeR+3WgbuPqfHgPPy7nFKbeqRivBvn/3N3GBiNC+JRTMSxEC7A==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "micromark-util-chunked": "^1.0.0", + "micromark-util-symbol": "^1.0.0", + "micromark-util-types": "^1.0.0", + "uvu": "^0.5.0" + } + }, "node_modules/docusaurus-theme-openapi-docs/node_modules/parse5": { "version": "6.0.1", "license": "MIT" }, + "node_modules/docusaurus-theme-openapi-docs/node_modules/react-is": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", + "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==" + }, + "node_modules/docusaurus-theme-openapi-docs/node_modules/react-markdown": { + "version": "8.0.7", + "resolved": "https://registry.npmjs.org/react-markdown/-/react-markdown-8.0.7.tgz", + "integrity": "sha512-bvWbzG4MtOU62XqBx3Xx+zB2raaFFsq4mYiAzfjXJMEz2sixgeAfraA3tvzULF02ZdOMUOKTBFFaZJDDrq+BJQ==", + "dependencies": { + "@types/hast": "^2.0.0", + "@types/prop-types": "^15.0.0", + "@types/unist": "^2.0.0", + "comma-separated-tokens": "^2.0.0", + "hast-util-whitespace": "^2.0.0", + "prop-types": "^15.0.0", + "property-information": "^6.0.0", + "react-is": "^18.0.0", + "remark-parse": "^10.0.0", + "remark-rehype": "^10.0.0", + "space-separated-tokens": "^2.0.0", + "style-to-object": "^0.4.0", + "unified": "^10.0.0", + "unist-util-visit": "^4.0.0", + "vfile": "^5.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + }, + "peerDependencies": { + "@types/react": ">=16", + "react": ">=16" + } + }, "node_modules/docusaurus-theme-openapi-docs/node_modules/rehype-raw": { "version": "6.1.1", "license": "MIT", @@ -12716,6 +12987,35 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/docusaurus-theme-openapi-docs/node_modules/remark-parse": { + "version": "10.0.2", + "resolved": "https://registry.npmjs.org/remark-parse/-/remark-parse-10.0.2.tgz", + "integrity": "sha512-3ydxgHa/ZQzG8LvC7jTXccARYDcRld3VfcgIIFs7bI6vbRSxJJmzgLEIIoYKyrfhaY+ujuWaf/PJiMZXoiCXgw==", + "dependencies": { + "@types/mdast": "^3.0.0", + "mdast-util-from-markdown": "^1.0.0", + "unified": "^10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/docusaurus-theme-openapi-docs/node_modules/remark-rehype": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/remark-rehype/-/remark-rehype-10.1.0.tgz", + "integrity": "sha512-EFmR5zppdBp0WQeDVZ/b66CWJipB2q2VLNFMabzDSGR66Z2fQii83G5gTBbgGEnEEA0QRussvrFHxk1HWGJskw==", + "dependencies": { + "@types/hast": "^2.0.0", + "@types/mdast": "^3.0.0", + "mdast-util-to-hast": "^12.1.0", + "unified": "^10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/docusaurus-theme-openapi-docs/node_modules/sass-loader": { "version": "13.3.2", "license": "MIT", @@ -12768,6 +13068,15 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/docusaurus-theme-openapi-docs/node_modules/unist-util-generated": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/unist-util-generated/-/unist-util-generated-2.0.1.tgz", + "integrity": "sha512-qF72kLmPxAw0oN2fwpWIqbXAVyEqUzDHMsbtPvOudIlUzXYFIeQIuxXQCRCFh22B7cixvU0MG7m3MW8FTq/S+A==", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/docusaurus-theme-openapi-docs/node_modules/unist-util-is": { "version": "5.2.1", "license": "MIT", @@ -14878,6 +15187,15 @@ "node": "*" } }, + "node_modules/eslint-plugin-import/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, "node_modules/eslint-plugin-jsx-a11y": { "version": "6.8.0", "dev": true, @@ -15887,17 +16205,6 @@ "concat-map": "0.0.1" } }, - "node_modules/eslint-plugin-n/node_modules/lru-cache": { - "version": "6.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/eslint-plugin-n/node_modules/minimatch": { "version": "3.1.2", "dev": true, @@ -15909,25 +16216,6 @@ "node": "*" } }, - "node_modules/eslint-plugin-n/node_modules/semver": { - "version": "7.5.4", - "dev": true, - "license": "ISC", - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/eslint-plugin-n/node_modules/yallist": { - "version": "4.0.0", - "dev": true, - "license": "ISC" - }, "node_modules/eslint-plugin-promise": { "version": "6.1.1", "dev": true, @@ -16015,6 +16303,15 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/eslint-plugin-react/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, "node_modules/eslint-scope": { "version": "7.2.2", "devOptional": true, @@ -17735,16 +18032,6 @@ "version": "0.4.1", "license": "MIT" }, - "node_modules/fork-ts-checker-webpack-plugin/node_modules/lru-cache": { - "version": "6.0.0", - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/fork-ts-checker-webpack-plugin/node_modules/minimatch": { "version": "3.1.2", "license": "ISC", @@ -17771,19 +18058,6 @@ "url": "https://opencollective.com/webpack" } }, - "node_modules/fork-ts-checker-webpack-plugin/node_modules/semver": { - "version": "7.5.4", - "license": "ISC", - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/fork-ts-checker-webpack-plugin/node_modules/supports-color": { "version": "7.2.0", "license": "MIT", @@ -17801,10 +18075,6 @@ "node": ">=6" } }, - "node_modules/fork-ts-checker-webpack-plugin/node_modules/yallist": { - "version": "4.0.0", - "license": "ISC" - }, "node_modules/form-data": { "version": "4.0.0", "dev": true, @@ -20101,6 +20371,15 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/html-url-attributes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/html-url-attributes/-/html-url-attributes-3.0.0.tgz", + "integrity": "sha512-/sXbVCWayk6GDVg3ctOX6nxaVj7So40FcFAnWlWGNAB1LpYKcV5Cd10APjPjW80O7zYW2MsjBV4zZ7IZO5fVow==", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/html-void-elements": { "version": "3.0.0", "license": "MIT", @@ -21927,6 +22206,15 @@ "node": ">=8" } }, + "node_modules/istanbul-lib-instrument/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, "node_modules/istanbul-lib-report": { "version": "3.0.1", "dev": true, @@ -23266,17 +23554,6 @@ "node": ">=0.10.0" } }, - "node_modules/jest-config-docusaurus/node_modules/lru-cache": { - "version": "6.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/jest-config-docusaurus/node_modules/make-dir": { "version": "3.1.0", "dev": true, @@ -23664,20 +23941,6 @@ "url": "https://opencollective.com/webpack" } }, - "node_modules/jest-config-docusaurus/node_modules/semver": { - "version": "7.5.4", - "dev": true, - "license": "ISC", - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/jest-config-docusaurus/node_modules/semver-diff": { "version": "3.1.1", "dev": true, @@ -24003,11 +24266,6 @@ "node": ">=8" } }, - "node_modules/jest-config-docusaurus/node_modules/yallist": { - "version": "4.0.0", - "dev": true, - "license": "ISC" - }, "node_modules/jest-config-docusaurus/node_modules/zwitch": { "version": "1.0.5", "dev": true, @@ -25085,17 +25343,6 @@ "node": ">=8" } }, - "node_modules/jest-snapshot/node_modules/lru-cache": { - "version": "6.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/jest-snapshot/node_modules/pretty-format": { "version": "29.7.0", "dev": true, @@ -25125,20 +25372,6 @@ "dev": true, "license": "MIT" }, - "node_modules/jest-snapshot/node_modules/semver": { - "version": "7.5.4", - "dev": true, - "license": "ISC", - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/jest-snapshot/node_modules/supports-color": { "version": "7.2.0", "dev": true, @@ -25150,11 +25383,6 @@ "node": ">=8" } }, - "node_modules/jest-snapshot/node_modules/yallist": { - "version": "4.0.0", - "dev": true, - "license": "ISC" - }, "node_modules/jest-util": { "version": "29.7.0", "license": "MIT", @@ -26527,36 +26755,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/make-dir/node_modules/lru-cache": { - "version": "6.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/make-dir/node_modules/semver": { - "version": "7.5.4", - "dev": true, - "license": "ISC", - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/make-dir/node_modules/yallist": { - "version": "4.0.0", - "dev": true, - "license": "ISC" - }, "node_modules/make-error": { "version": "1.3.6", "license": "ISC" @@ -26639,6 +26837,17 @@ "url": "https://github.com/sponsors/wooorm" } }, + "node_modules/markdown-to-jsx": { + "version": "7.4.5", + "resolved": "https://registry.npmjs.org/markdown-to-jsx/-/markdown-to-jsx-7.4.5.tgz", + "integrity": "sha512-c8NB0H/ig+FOWssE9be0PKsYbCDhcWEkicxMnpdfUuHbFljnen4LAdgUShOyR/PgO3/qKvt9cwfQ0U/zQvZ44A==", + "engines": { + "node": ">= 10" + }, + "peerDependencies": { + "react": ">= 0.14.0" + } + }, "node_modules/marked": { "version": "4.3.0", "dev": true, @@ -47485,33 +47694,6 @@ "node": ">=10" } }, - "node_modules/node-abi/node_modules/lru-cache": { - "version": "6.0.0", - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/node-abi/node_modules/semver": { - "version": "7.5.4", - "license": "ISC", - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/node-abi/node_modules/yallist": { - "version": "4.0.0", - "license": "ISC" - }, "node_modules/node-addon-api": { "version": "6.1.0", "license": "MIT" @@ -47660,33 +47842,6 @@ "node": ">=10" } }, - "node_modules/normalize-package-data/node_modules/lru-cache": { - "version": "6.0.0", - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/normalize-package-data/node_modules/semver": { - "version": "7.5.4", - "license": "ISC", - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/normalize-package-data/node_modules/yallist": { - "version": "4.0.0", - "license": "ISC" - }, "node_modules/normalize-path": { "version": "3.0.0", "license": "MIT", @@ -51607,33 +51762,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/package-json/node_modules/lru-cache": { - "version": "6.0.0", - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/package-json/node_modules/semver": { - "version": "7.5.4", - "license": "ISC", - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/package-json/node_modules/yallist": { - "version": "4.0.0", - "license": "ISC" - }, "node_modules/pako": { "version": "1.0.11", "license": "(MIT AND Zlib)" @@ -52477,33 +52605,6 @@ "webpack": "^5.0.0" } }, - "node_modules/postcss-loader/node_modules/lru-cache": { - "version": "6.0.0", - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/postcss-loader/node_modules/semver": { - "version": "7.5.4", - "license": "ISC", - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/postcss-loader/node_modules/yallist": { - "version": "4.0.0", - "license": "ISC" - }, "node_modules/postcss-merge-idents": { "version": "5.1.1", "license": "MIT", @@ -54236,591 +54337,28 @@ "license": "MIT" }, "node_modules/react-markdown": { - "version": "8.0.7", - "license": "MIT", + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/react-markdown/-/react-markdown-9.0.1.tgz", + "integrity": "sha512-186Gw/vF1uRkydbsOIkcGXw7aHq0sZOCRFFjGrr7b9+nVZg4UfA4enXCaxm4fUzecU38sWfrNDitGhshuU7rdg==", "dependencies": { - "@types/hast": "^2.0.0", - "@types/prop-types": "^15.0.0", - "@types/unist": "^2.0.0", - "comma-separated-tokens": "^2.0.0", - "hast-util-whitespace": "^2.0.0", - "prop-types": "^15.0.0", - "property-information": "^6.0.0", - "react-is": "^18.0.0", - "remark-parse": "^10.0.0", - "remark-rehype": "^10.0.0", - "space-separated-tokens": "^2.0.0", - "style-to-object": "^0.4.0", - "unified": "^10.0.0", - "unist-util-visit": "^4.0.0", - "vfile": "^5.0.0" + "@types/hast": "^3.0.0", + "devlop": "^1.0.0", + "hast-util-to-jsx-runtime": "^2.0.0", + "html-url-attributes": "^3.0.0", + "mdast-util-to-hast": "^13.0.0", + "remark-parse": "^11.0.0", + "remark-rehype": "^11.0.0", + "unified": "^11.0.0", + "unist-util-visit": "^5.0.0", + "vfile": "^6.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/unified" }, "peerDependencies": { - "@types/react": ">=16", - "react": ">=16" - } - }, - "node_modules/react-markdown/node_modules/@types/hast": { - "version": "2.3.8", - "license": "MIT", - "dependencies": { - "@types/unist": "^2" - } - }, - "node_modules/react-markdown/node_modules/@types/unist": { - "version": "2.0.10", - "license": "MIT" - }, - "node_modules/react-markdown/node_modules/hast-util-whitespace": { - "version": "2.0.1", - "license": "MIT", - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/react-markdown/node_modules/mdast-util-definitions": { - "version": "5.1.2", - "license": "MIT", - "dependencies": { - "@types/mdast": "^3.0.0", - "@types/unist": "^2.0.0", - "unist-util-visit": "^4.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/react-markdown/node_modules/mdast-util-from-markdown": { - "version": "1.3.1", - "license": "MIT", - "dependencies": { - "@types/mdast": "^3.0.0", - "@types/unist": "^2.0.0", - "decode-named-character-reference": "^1.0.0", - "mdast-util-to-string": "^3.1.0", - "micromark": "^3.0.0", - "micromark-util-decode-numeric-character-reference": "^1.0.0", - "micromark-util-decode-string": "^1.0.0", - "micromark-util-normalize-identifier": "^1.0.0", - "micromark-util-symbol": "^1.0.0", - "micromark-util-types": "^1.0.0", - "unist-util-stringify-position": "^3.0.0", - "uvu": "^0.5.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/react-markdown/node_modules/mdast-util-to-hast": { - "version": "12.3.0", - "license": "MIT", - "dependencies": { - "@types/hast": "^2.0.0", - "@types/mdast": "^3.0.0", - "mdast-util-definitions": "^5.0.0", - "micromark-util-sanitize-uri": "^1.1.0", - "trim-lines": "^3.0.0", - "unist-util-generated": "^2.0.0", - "unist-util-position": "^4.0.0", - "unist-util-visit": "^4.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/react-markdown/node_modules/mdast-util-to-string": { - "version": "3.2.0", - "license": "MIT", - "dependencies": { - "@types/mdast": "^3.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/react-markdown/node_modules/micromark": { - "version": "3.2.0", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT", - "dependencies": { - "@types/debug": "^4.0.0", - "debug": "^4.0.0", - "decode-named-character-reference": "^1.0.0", - "micromark-core-commonmark": "^1.0.1", - "micromark-factory-space": "^1.0.0", - "micromark-util-character": "^1.0.0", - "micromark-util-chunked": "^1.0.0", - "micromark-util-combine-extensions": "^1.0.0", - "micromark-util-decode-numeric-character-reference": "^1.0.0", - "micromark-util-encode": "^1.0.0", - "micromark-util-normalize-identifier": "^1.0.0", - "micromark-util-resolve-all": "^1.0.0", - "micromark-util-sanitize-uri": "^1.0.0", - "micromark-util-subtokenize": "^1.0.0", - "micromark-util-symbol": "^1.0.0", - "micromark-util-types": "^1.0.1", - "uvu": "^0.5.0" - } - }, - "node_modules/react-markdown/node_modules/micromark-core-commonmark": { - "version": "1.1.0", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT", - "dependencies": { - "decode-named-character-reference": "^1.0.0", - "micromark-factory-destination": "^1.0.0", - "micromark-factory-label": "^1.0.0", - "micromark-factory-space": "^1.0.0", - "micromark-factory-title": "^1.0.0", - "micromark-factory-whitespace": "^1.0.0", - "micromark-util-character": "^1.0.0", - "micromark-util-chunked": "^1.0.0", - "micromark-util-classify-character": "^1.0.0", - "micromark-util-html-tag-name": "^1.0.0", - "micromark-util-normalize-identifier": "^1.0.0", - "micromark-util-resolve-all": "^1.0.0", - "micromark-util-subtokenize": "^1.0.0", - "micromark-util-symbol": "^1.0.0", - "micromark-util-types": "^1.0.1", - "uvu": "^0.5.0" - } - }, - "node_modules/react-markdown/node_modules/micromark-factory-destination": { - "version": "1.1.0", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT", - "dependencies": { - "micromark-util-character": "^1.0.0", - "micromark-util-symbol": "^1.0.0", - "micromark-util-types": "^1.0.0" - } - }, - "node_modules/react-markdown/node_modules/micromark-factory-label": { - "version": "1.1.0", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT", - "dependencies": { - "micromark-util-character": "^1.0.0", - "micromark-util-symbol": "^1.0.0", - "micromark-util-types": "^1.0.0", - "uvu": "^0.5.0" - } - }, - "node_modules/react-markdown/node_modules/micromark-factory-title": { - "version": "1.1.0", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT", - "dependencies": { - "micromark-factory-space": "^1.0.0", - "micromark-util-character": "^1.0.0", - "micromark-util-symbol": "^1.0.0", - "micromark-util-types": "^1.0.0" - } - }, - "node_modules/react-markdown/node_modules/micromark-factory-whitespace": { - "version": "1.1.0", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT", - "dependencies": { - "micromark-factory-space": "^1.0.0", - "micromark-util-character": "^1.0.0", - "micromark-util-symbol": "^1.0.0", - "micromark-util-types": "^1.0.0" - } - }, - "node_modules/react-markdown/node_modules/micromark-util-chunked": { - "version": "1.1.0", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT", - "dependencies": { - "micromark-util-symbol": "^1.0.0" - } - }, - "node_modules/react-markdown/node_modules/micromark-util-classify-character": { - "version": "1.1.0", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT", - "dependencies": { - "micromark-util-character": "^1.0.0", - "micromark-util-symbol": "^1.0.0", - "micromark-util-types": "^1.0.0" - } - }, - "node_modules/react-markdown/node_modules/micromark-util-combine-extensions": { - "version": "1.1.0", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT", - "dependencies": { - "micromark-util-chunked": "^1.0.0", - "micromark-util-types": "^1.0.0" - } - }, - "node_modules/react-markdown/node_modules/micromark-util-decode-numeric-character-reference": { - "version": "1.1.0", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT", - "dependencies": { - "micromark-util-symbol": "^1.0.0" - } - }, - "node_modules/react-markdown/node_modules/micromark-util-decode-string": { - "version": "1.1.0", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT", - "dependencies": { - "decode-named-character-reference": "^1.0.0", - "micromark-util-character": "^1.0.0", - "micromark-util-decode-numeric-character-reference": "^1.0.0", - "micromark-util-symbol": "^1.0.0" - } - }, - "node_modules/react-markdown/node_modules/micromark-util-encode": { - "version": "1.1.0", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT" - }, - "node_modules/react-markdown/node_modules/micromark-util-html-tag-name": { - "version": "1.2.0", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT" - }, - "node_modules/react-markdown/node_modules/micromark-util-normalize-identifier": { - "version": "1.1.0", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT", - "dependencies": { - "micromark-util-symbol": "^1.0.0" - } - }, - "node_modules/react-markdown/node_modules/micromark-util-resolve-all": { - "version": "1.1.0", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT", - "dependencies": { - "micromark-util-types": "^1.0.0" - } - }, - "node_modules/react-markdown/node_modules/micromark-util-sanitize-uri": { - "version": "1.2.0", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT", - "dependencies": { - "micromark-util-character": "^1.0.0", - "micromark-util-encode": "^1.0.0", - "micromark-util-symbol": "^1.0.0" - } - }, - "node_modules/react-markdown/node_modules/micromark-util-subtokenize": { - "version": "1.1.0", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT", - "dependencies": { - "micromark-util-chunked": "^1.0.0", - "micromark-util-symbol": "^1.0.0", - "micromark-util-types": "^1.0.0", - "uvu": "^0.5.0" - } - }, - "node_modules/react-markdown/node_modules/react-is": { - "version": "18.2.0", - "license": "MIT" - }, - "node_modules/react-markdown/node_modules/remark-parse": { - "version": "10.0.2", - "license": "MIT", - "dependencies": { - "@types/mdast": "^3.0.0", - "mdast-util-from-markdown": "^1.0.0", - "unified": "^10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/react-markdown/node_modules/remark-rehype": { - "version": "10.1.0", - "license": "MIT", - "dependencies": { - "@types/hast": "^2.0.0", - "@types/mdast": "^3.0.0", - "mdast-util-to-hast": "^12.1.0", - "unified": "^10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/react-markdown/node_modules/unified": { - "version": "10.1.2", - "license": "MIT", - "dependencies": { - "@types/unist": "^2.0.0", - "bail": "^2.0.0", - "extend": "^3.0.0", - "is-buffer": "^2.0.0", - "is-plain-obj": "^4.0.0", - "trough": "^2.0.0", - "vfile": "^5.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/react-markdown/node_modules/unist-util-generated": { - "version": "2.0.1", - "license": "MIT", - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/react-markdown/node_modules/unist-util-is": { - "version": "5.2.1", - "license": "MIT", - "dependencies": { - "@types/unist": "^2.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/react-markdown/node_modules/unist-util-position": { - "version": "4.0.4", - "license": "MIT", - "dependencies": { - "@types/unist": "^2.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/react-markdown/node_modules/unist-util-stringify-position": { - "version": "3.0.3", - "license": "MIT", - "dependencies": { - "@types/unist": "^2.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/react-markdown/node_modules/unist-util-visit": { - "version": "4.1.2", - "license": "MIT", - "dependencies": { - "@types/unist": "^2.0.0", - "unist-util-is": "^5.0.0", - "unist-util-visit-parents": "^5.1.1" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/react-markdown/node_modules/unist-util-visit-parents": { - "version": "5.1.3", - "license": "MIT", - "dependencies": { - "@types/unist": "^2.0.0", - "unist-util-is": "^5.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/react-markdown/node_modules/vfile": { - "version": "5.3.7", - "license": "MIT", - "dependencies": { - "@types/unist": "^2.0.0", - "is-buffer": "^2.0.0", - "unist-util-stringify-position": "^3.0.0", - "vfile-message": "^3.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/react-markdown/node_modules/vfile-message": { - "version": "3.1.4", - "license": "MIT", - "dependencies": { - "@types/unist": "^2.0.0", - "unist-util-stringify-position": "^3.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" + "@types/react": ">=18", + "react": ">=18" } }, "node_modules/react-modal": { @@ -55119,31 +54657,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/read-pkg/node_modules/semver": { - "version": "7.5.4", - "dev": true, - "license": "ISC", - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/read-pkg/node_modules/semver/node_modules/lru-cache": { - "version": "6.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/read-pkg/node_modules/type-fest": { "version": "4.8.3", "dev": true, @@ -55155,11 +54668,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/read-pkg/node_modules/yallist": { - "version": "4.0.0", - "dev": true, - "license": "ISC" - }, "node_modules/readable-stream": { "version": "4.4.2", "license": "MIT", @@ -55588,8 +55096,9 @@ } }, "node_modules/remark-mdx": { - "version": "3.0.0", - "license": "MIT", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/remark-mdx/-/remark-mdx-3.0.1.tgz", + "integrity": "sha512-3Pz3yPQ5Rht2pM5R+0J2MrGoBSrzf+tJG94N+t/ilfdh8YLyyKYtidAYwTveB20BoHAcwIopOUqhcmh2F7hGYA==", "dependencies": { "mdast-util-mdx": "^3.0.0", "micromark-extension-mdxjs": "^3.0.0" @@ -56730,16 +56239,6 @@ "version": "0.4.1", "license": "MIT" }, - "node_modules/sass-loader/node_modules/lru-cache": { - "version": "6.0.0", - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/sass-loader/node_modules/schema-utils": { "version": "3.3.0", "license": "MIT", @@ -56756,23 +56255,6 @@ "url": "https://opencollective.com/webpack" } }, - "node_modules/sass-loader/node_modules/semver": { - "version": "7.5.4", - "license": "ISC", - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/sass-loader/node_modules/yallist": { - "version": "4.0.0", - "license": "ISC" - }, "node_modules/sax": { "version": "1.3.0", "license": "ISC" @@ -60134,31 +59616,6 @@ "node": ">=8" } }, - "node_modules/semantic-release/node_modules/semver": { - "version": "7.5.4", - "dev": true, - "license": "ISC", - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/semantic-release/node_modules/semver/node_modules/lru-cache": { - "version": "6.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/semantic-release/node_modules/temp-dir": { "version": "2.0.0", "dev": true, @@ -60229,10 +59686,17 @@ } }, "node_modules/semver": { - "version": "6.3.1", - "license": "ISC", + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", + "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", + "dependencies": { + "lru-cache": "^6.0.0" + }, "bin": { "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" } }, "node_modules/semver-diff": { @@ -60248,33 +59712,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/semver-diff/node_modules/lru-cache": { - "version": "6.0.0", - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/semver-diff/node_modules/semver": { - "version": "7.5.4", - "license": "ISC", - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/semver-diff/node_modules/yallist": { - "version": "4.0.0", - "license": "ISC" - }, "node_modules/semver-greatest-satisfied-range": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/semver-greatest-satisfied-range/-/semver-greatest-satisfied-range-1.1.0.tgz", @@ -60319,6 +59756,22 @@ "semver": "bin/semver" } }, + "node_modules/semver/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/semver/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + }, "node_modules/send": { "version": "0.18.0", "license": "MIT", @@ -60619,33 +60072,6 @@ "url": "https://opencollective.com/libvips" } }, - "node_modules/sharp/node_modules/lru-cache": { - "version": "6.0.0", - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/sharp/node_modules/semver": { - "version": "7.5.4", - "license": "ISC", - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/sharp/node_modules/yallist": { - "version": "4.0.0", - "license": "ISC" - }, "node_modules/shebang-command": { "version": "2.0.0", "license": "MIT", @@ -63466,36 +62892,6 @@ } } }, - "node_modules/ts-jest/node_modules/lru-cache": { - "version": "6.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/ts-jest/node_modules/semver": { - "version": "7.5.4", - "dev": true, - "license": "ISC", - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/ts-jest/node_modules/yallist": { - "version": "4.0.0", - "dev": true, - "license": "ISC" - }, "node_modules/ts-jest/node_modules/yargs-parser": { "version": "21.1.1", "dev": true, @@ -64451,33 +63847,6 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/update-notifier/node_modules/lru-cache": { - "version": "6.0.0", - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/update-notifier/node_modules/semver": { - "version": "7.5.4", - "license": "ISC", - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/update-notifier/node_modules/yallist": { - "version": "4.0.0", - "license": "ISC" - }, "node_modules/uri-js": { "version": "4.4.1", "license": "BSD-2-Clause", @@ -64754,33 +64123,6 @@ "node": ">= 12" } }, - "node_modules/validate-peer-dependencies/node_modules/lru-cache": { - "version": "6.0.0", - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/validate-peer-dependencies/node_modules/semver": { - "version": "7.5.4", - "license": "ISC", - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/validate-peer-dependencies/node_modules/yallist": { - "version": "4.0.0", - "license": "ISC" - }, "node_modules/validate.io-array": { "version": "1.0.6", "license": "MIT" diff --git a/package.json b/package.json index 44bf3d647c..094fc58ef7 100644 --- a/package.json +++ b/package.json @@ -55,10 +55,14 @@ "docusaurus-plugin-sass": "^0.2.5", "docusaurus-theme-openapi-docs": "^3.0.0-beta.3", "fuse.js": "^6.6.2", + "markdown-to-jsx": "^7.0.0", "prism-react-renderer": "^2.1.0", "react": "^18.2.0", "react-dom": "^18.2.0", - "sass": "^1.64.1" + "react-markdown": "9.0.1", + "remark-gfm": "4.0.0", + "sass": "^1.64.1", + "semver": "^7.3.7" }, "devDependencies": { "@semantic-release/changelog": "^6.0.1", diff --git a/plugins/packs-integrations.js b/plugins/packs-integrations.js index 043ab06678..3358b86f51 100644 --- a/plugins/packs-integrations.js +++ b/plugins/packs-integrations.js @@ -1,7 +1,8 @@ -import api from "../src/services/api"; -import { setTimeout } from "timers/promises"; -import { packTypeNames } from "../src/components/Technologies/PackConstants"; - +const api = require("../src/services/api"); +const { setTimeout } = require("timers/promises"); +const { packTypeNames, addOnTypes, layerTypes } = require("../src/components/Technologies/PackConstants"); +const packDescription = require("../static/packs-data/packs_information.json"); +const { coerce, rcompare } = require('semver'); function generateIntegrationData(allContent) { const packsData = allContent["docusaurus-plugin-content-docs"].default.loadedVersions[0].docs @@ -14,15 +15,14 @@ function generateIntegrationData(allContent) { return packsData; } -function generatePacksData(allContent) { - const packsData = allContent["docusaurus-plugin-content-docs"].default.loadedVersions[0].docs - .filter((doc) => { - return doc.frontMatter.type === "integration"; - }) - .map((doc) => { - return { fields: { ...doc.frontMatter, slug: doc.slug, id: doc.id } }; - }); - return packsData; +function getReadMeMap(packValues) { + const map = new Map(); + packValues.forEach((packValue) => { + map[packValue.packUid] = packValue.readme; + console.log("packValue.packUid = ---------- ", packValue.packUid); + console.log("packValue.readme =************* ", packValue.readme); + }); + return map; } function combineAPICustomPackData(packsMData, packsPaletteDetailsData, customPacksData) { @@ -36,12 +36,14 @@ function combineAPICustomPackData(packsMData, packsPaletteDetailsData, customPac const packMDValue = packsMData[packName]; const packType = packMDValue.spec.layer === "addon" ? packMDValue.spec.addonType : packMDValue.spec.layer; const layer = packMDValue.spec.layer === "addon" ? packMDValue.spec.addonType : packTypeNames[packMDValue.spec.layer]; + const packValues = packContent.packValues; return { fields: { - name: packMDValue.spec.name, + name: packName, title: packMDValue.spec.displayName, - description: 'dynamically generated', - hide_table_of_contents: true, + description: customPacksData?.[packName], + readme: getReadMeMap(packValues), + hide_table_of_contents: false, cloudTypes: packMDValue.spec.cloudTypes, type: 'integration', category: [layer], @@ -51,17 +53,125 @@ function combineAPICustomPackData(packsMData, packsPaletteDetailsData, customPac tags: [], slug: '/integrations/${packMDValue.spec.name}', id: 'integrations/${packMDValue.spec.name}', + community: packMDValue.spec.registries[0].annotations?.source === "community", verified: packMDValue.spec.registries[0].annotations?.source === "spectrocloud", + versions: getAggregatedVersions(packContent.tags, packValues, packName, layer) } }; } }); } +function matchAmbiguousPatch(tag) { + const [major, minor, patch] = tag.split("."); + return major !== undefined && minor !== undefined && patch === "x"; +} + +export function sanitizeVersion(version) { + let sanitizedVersion = version; + if (version.split(".").length < 3) { + sanitizedVersion = `${version}.0`; + } + return sanitizedVersion + .split(".") + .map((subVersion) => { + if (subVersion.startsWith("0")) { + return subVersion.replace("0", ""); + } + + return subVersion; + }) + .join("."); +} + +function sortVersions(tags) { + let sortedVersions = [...tags].sort((pack1, pack2) => { + let version1 = sanitizeVersion(pack1.version); + let version2 = sanitizeVersion(pack2.version); + + + if (coerce(version1) !== null) { + version1 = coerce(version1).version; + } + + if (coerce(version2) !== null) { + version2 = coerce(version2).version; + } + + try { + return rcompare(version1, version2, true); + } catch (e) { + return 0; + } + }); + return sortedVersions; +} + +function getAggregatedVersions(tags, packValues, packName, layer) { + const _sortedVersions = sortVersions(tags); + const roots = _sortedVersions + .filter((version) => { + return matchAmbiguousPatch(version.tag); + }) + .map((version) => { + return { + title: version.tag, + value: version.version, + packUid: version.packUid, + }; + }); + console.log("roots length= ", roots.length); + console.log("_sortedVersions length= ", _sortedVersions.length); + _sortedVersions.forEach((version) => { + const parentTags = version?.parentTags || []; + const parent = parentTags.find(matchAmbiguousPatch); + + if (!parent) return; + + const parentVersion = roots.find( + (rootVersion) => rootVersion.title === parent + ); + + if (parentVersion) { + parentVersion.children = parentVersion.children || []; + parentVersion.children.push({ + title: version.tag, + value: version.version, + packUid: version.packUid, + }); + } + }); + console.log("roots = ", JSON.stringify(roots)); + + return roots; +} + +function generateCustomData(packsDescription) { + const customPackMap = new Map(); + packsDescription.forEach((pack) => { + customPackMap[pack.name] = pack.description; + }); + return customPackMap; +} + +function generateRoutes(packDataMap, packsData) { + return Object.keys(packDataMap).map((packName) => { + return { + path: `/integrations/packs/${packName}`, + exact: false, + component: '@site/src/components/PacksInformation', + metadata: { + sourceFilePath: '../docs/docs-content/integrations/packs.mdx', + }, + data: packName, + } + }); +} + async function fetchPackListItems(queryParams, packDataArr, counter) { - const payload = {filter: { type: ["spectro", "oci"],environment:["aws"]}}; + const payload = {filter: { type: ["spectro", "oci"], environment:["aws"]}}; //const payload = {filter: { type: ["spectro", "oci"], layer: ["os", "k8s"], environment:["aws"]}} - //const payload = {filter: { type: ["spectro", "oci"], layer: ["addon"], "environment":["all"] }}; + //const payload = {"filter":{"displayName":{"contains":""},"ignoreCase":true,"type":["spectro"],"layer":["csi"],"environment":["openstack"],"registryUid":["5e2031962f090e2d3d8a3290"]}}; counter+=1; if(counter%10 === 0) { await setTimeout(2000); @@ -80,7 +190,11 @@ async function pluginPacksAndIntegrationsData() { return { name: "plugin-packs-integrations", async loadContent() { - const packDataArr = await fetchPackListItems("?limit=100", [], 0); + let packDataArr = await fetchPackListItems("?limit=100", [], 0); + packDataArr = packDataArr.filter((pack) => { + return layerTypes.includes(pack.spec.layer) || (pack.spec.layer === "addon" && addOnTypes.includes(pack.spec.addonType)); + }) + console.log("packDataArr length = ", packDataArr.length) const packUrl = "v1/packs/"; const packMDMap = new Map(); let apiPacksData = []; @@ -91,7 +205,8 @@ async function pluginPacksAndIntegrationsData() { if(packData.spec.registries.length) { counter+=1 packMDMap[packData.spec.name]=packData; - promises.push(api.get(packUrl + packData.spec.registries[0].latestPackUid)); + const cloudType = packData.spec.cloudTypes.includes("all") ? "aws" : packData.spec.cloudTypes[0]; + promises.push(api.get(`${packUrl}${packData.spec.name}/registries/${packData.spec.registries[0].uid}?cloudType=${cloudType}&layer=${packData.spec.layer}`)); if(counter%10 === 0 || i === packDataArr.length-1) { await setTimeout(2000); const response2 = await Promise.all(promises); @@ -100,16 +215,17 @@ async function pluginPacksAndIntegrationsData() { } } } - return {packsPaletteData: packMDMap, packsPaletteDetailsData: apiPacksData} ; + console.log("packDescription = ", packDescription); + return {packsPaletteData: packMDMap, packsPaletteDetailsData: apiPacksData, packsDescription: packDescription} ; }, async contentLoaded({ allContent, content, actions }) { - const { setGlobalData } = actions; - const { packsPaletteData, packsPaletteDetailsData } = content; + const { setGlobalData, addRoute } = actions; + const { packsPaletteData, packsPaletteDetailsData, packsDescription } = content; const integrationsData = generateIntegrationData(allContent); - const customPacksData = generatePacksData(allContent); - //console.log("hello here packData is ---- ", customPacksData); - //console.log("hello here packData is ---- ", packsPaletteDetailsData.length); - const unionPackData = combineAPICustomPackData(packsPaletteData, packsPaletteDetailsData, customPacksData) + const customPacksData = generateCustomData(packsDescription); + const unionPackData = combineAPICustomPackData(packsPaletteData, packsPaletteDetailsData, customPacksData); + const routes = generateRoutes(packsPaletteData, unionPackData); + routes.map(route => addRoute(route)); setGlobalData({ integrations: integrationsData, packs: unionPackData }); }, }; diff --git a/src/components/Integrations/IntegrationTypes.ts b/src/components/Integrations/IntegrationTypes.ts index 4638929188..337cab3acc 100644 --- a/src/components/Integrations/IntegrationTypes.ts +++ b/src/components/Integrations/IntegrationTypes.ts @@ -1,4 +1,5 @@ export interface FrontMatterData { + name: string; sidebar_label: string; title: string; description: string; @@ -11,6 +12,15 @@ export interface FrontMatterData { packType: string; verified: boolean; cloudTypes: string[]; + readme: Map; + versions: VersionTemplate[]; +} + +export interface VersionTemplate { + title: string; + version: string; + packUid: string; + children: VersionTemplate[]; } export interface PacksData { diff --git a/src/components/PacksInformation/PacksInformation.tsx b/src/components/PacksInformation/PacksInformation.tsx new file mode 100644 index 0000000000..9784097bcc --- /dev/null +++ b/src/components/PacksInformation/PacksInformation.tsx @@ -0,0 +1,32 @@ +import React from "react"; +import { useLocation } from 'react-router-dom'; +import PacksReadme from "@site/src/components/PacksReadme"; +import { usePluginData } from "@docusaurus/useGlobalData"; +import PacksIntegrationsPluginData from "../Integrations/IntegrationTypes"; +import Layout from '@theme/Layout'; +import { Switch, Route, useRouteMatch, Redirect } from 'react-router-dom' + +interface PackInfoProps { + custom: any; +}; + + +export default function Packs(props:any) { + //const { packs } = usePluginData("plugin-packs-integrations") as PacksIntegrationsPluginData; + + //return ; + let match = useRouteMatch(); + const location = useLocation(); + const packName = location?.state?.id; + return ( + <> + { props?.route?.data ? + ( + + ) : ( + + ) + } + + ); +} diff --git a/src/components/PacksInformation/index.ts b/src/components/PacksInformation/index.ts new file mode 100644 index 0000000000..e2877bba87 --- /dev/null +++ b/src/components/PacksInformation/index.ts @@ -0,0 +1,3 @@ +import PacksInformation from "./PacksInformation"; + +export default PacksInformation; diff --git a/src/components/PacksReadme/NewComponent.tsx b/src/components/PacksReadme/NewComponent.tsx new file mode 100644 index 0000000000..d53f3c73b6 --- /dev/null +++ b/src/components/PacksReadme/NewComponent.tsx @@ -0,0 +1,14 @@ +import React from 'react'; + +async function created() { + let fileExists; + try { + fileExists = await import('@site/docs/docs-content/integrations/falco.md').then((res) => res.default); + } catch (err) { + fileExists = null; + } + return fileExists; +} + +const NewComponent = created(); +export default NewComponent; diff --git a/src/components/PacksReadme/PacksReadme.antd.css b/src/components/PacksReadme/PacksReadme.antd.css new file mode 100644 index 0000000000..80835a915b --- /dev/null +++ b/src/components/PacksReadme/PacksReadme.antd.css @@ -0,0 +1,5 @@ +.ant-list-header { + padding-bottom: 0px; + font-size: 16px; + font-weight: bold; +} diff --git a/src/components/PacksReadme/PacksReadme.module.scss b/src/components/PacksReadme/PacksReadme.module.scss new file mode 100644 index 0000000000..ccdec01983 --- /dev/null +++ b/src/components/PacksReadme/PacksReadme.module.scss @@ -0,0 +1,54 @@ +.wrapper { + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + padding: 20px; + .versionsection { + align-self: start; + } + .bullets::before { + content: "•"; + padding-right: 8px; + font-size: 20px; + font-weight: bold; + } + .description { + display: flex; + width: 100%; + background-color: #edeef4; + flex-direction: column; + padding: 10px; + .packdescfirstrow { + display: flex; + width: 100%; + justify-content: space-between; + .packname { + font-size: 16px; + font-weight: bold; + width: 50%; + display: flex; + } + + .customlabel { + margin-top: 15px; + } + .versionselect { + width: 50%; + display: flex; + place-content: end; + } + } + .packdescription { + font-size: 14px; + width: 100%; + display: flex; + padding-bottom: 10px; + padding-top: 15px; + } + .packdescription :first-child { + width: 80px; + margin-right: 15px; + } + } +} diff --git a/src/components/PacksReadme/PacksReadme.tsx b/src/components/PacksReadme/PacksReadme.tsx new file mode 100644 index 0000000000..5712da8235 --- /dev/null +++ b/src/components/PacksReadme/PacksReadme.tsx @@ -0,0 +1,178 @@ +import React, { useEffect, useState, useMemo, lazy, Suspense, ReactElement } from "react"; +import { useLocation } from 'react-router-dom'; +import { IntegrationsData, PacksData } from "../Integrations/IntegrationTypes"; +import styles from "./PacksReadme.module.scss"; +import { Select, List, Tabs } from "antd"; +import CustomLabel from "../Technologies/CategorySelector/CustomLabel"; +import PackCardIcon from "../Technologies/PackCardIcon"; +import { Typography } from "antd"; +import Markdown from 'markdown-to-jsx'; +import "./PacksReadme.antd.css"; +import { usePluginData } from "@docusaurus/useGlobalData"; +import PacksIntegrationsPluginData from "../Integrations/IntegrationTypes"; + + +interface TechnologiesProps { + data: PacksData | IntegrationsData; +} + +export default function PacksReadme() { + const { Text } = Typography; + //const location = useLocation(); + //const packName = location?.state?.id || ""; + const [selectedVersion, setSelectedVersion] = useState(""); + //const [md, setMd] = useState(null); + //let Custom = falco; + + //const [md, setMd] = useState | null>(null); + + const [md, setMd] = useState | null>(null); + const packName = new URLSearchParams(window.location.search).get("pack") + + + useEffect(() => { + const importComponent = async () => { + try { + console.log("packName", packName); + const module = await import(`../../../docs/docs-content/integrations/${packName}.md`); + const PackReadMeComponent = module.default; + setMd(); + } + catch (error) { + setMd(null); + } + }; + importComponent(); + }, []); + + const packData = useMemo(() => { + const { packs } = usePluginData("plugin-packs-integrations") as PacksIntegrationsPluginData; + + const _packData = packs.filter((pack) => pack.fields.name === packName)[0]; + if(_packData) { + setSelectedVersion(_packData.fields.versions[0].title); + return { + customDescription: _packData.fields.description, + packReadme: _packData.fields.readme, + versions: _packData.fields.versions, + title: _packData.fields.title, + logoUrl: _packData.fields.logoUrl, + type: _packData.fields.packType, + }; + } + return { + customDescription: "", + packReadme: {}, + versions: [], + title: "", + logoUrl: "", + type: "", + }; + }, [packName]); + + function versionChange(version: string) { + setSelectedVersion(version); + } + + function getOptions() { + return packData.versions.map((_version) => { + return ( + {_version.title} + ) + }); + } + + function versionSupportedTextRender() { + if(selectedVersion) { + const listVersion = packData.versions?.find((ver) => ver.title === selectedVersion); + if(listVersion) { + return ( + <> + Versions Supported
} + dataSource={listVersion.children} + renderItem={child =>
{child.title}
} + /> + + + ) + } + } + return null; + } + + function changeReadMeTab() { + + } + + function renderTabs() { + let readme = ""; + if (Object.keys(packData.packReadme).length && md) { + const packUid = packData.versions.find((ver) => ver.title === selectedVersion)?.packUid; + readme = packUid ? packData.packReadme[packUid] : ""; + const items = [ + { + label: `Pack details`, + key: '1', + children: (), + }, + { + label: `Additional details`, + key: '2', + children: md, + }, + ] + return ( + + {items.map((item) => { + return ( + + {item.children} + + ) + })} + + ) + } else if(Object.keys(packData.packReadme).length) { + const packUid = packData.versions.find((ver) => ver.title === selectedVersion)?.packUid; + readme = packUid ? packData.packReadme[packUid] : ""; + return () + } else if(md) { + return md; + } else { + return null; + } + + } + return ( +
+
+
+
{packName}
+
+ + +
+
+
+ +
{packData.customDescription}
+
+
+
+ {versionSupportedTextRender()} +
+
+ {renderTabs()} +
+
+ ); +} diff --git a/src/components/PacksReadme/index.ts b/src/components/PacksReadme/index.ts new file mode 100644 index 0000000000..c24c28cf29 --- /dev/null +++ b/src/components/PacksReadme/index.ts @@ -0,0 +1,3 @@ +import PacksReadme from "./PacksReadme"; + +export default PacksReadme; diff --git a/src/components/Technologies/CategorySelector/CategorySelector.test.tsx b/src/components/Technologies/CategorySelector/CategorySelector.test.tsx index d728c06eca..53e680c813 100644 --- a/src/components/Technologies/CategorySelector/CategorySelector.test.tsx +++ b/src/components/Technologies/CategorySelector/CategorySelector.test.tsx @@ -1,6 +1,6 @@ import React from "react"; import { render, fireEvent, screen } from "@testing-library/react"; -import CategorySelector from "./CategorySelector"; +import CategorySelector from "./TypeSelector"; describe("CategorySelector Component", () => { const mockSelectCategory = jest.fn(); diff --git a/src/components/Technologies/CategorySelector/CustomLabel.tsx b/src/components/Technologies/CategorySelector/CustomLabel.tsx index b31b44a20c..b7ec114277 100644 --- a/src/components/Technologies/CategorySelector/CustomLabel.tsx +++ b/src/components/Technologies/CategorySelector/CustomLabel.tsx @@ -4,13 +4,16 @@ import styles from "./CustomLabel.module.scss"; interface CustomLabelProps { label: string; + className?: string; } -export default function CustomLabel({ label }: CustomLabelProps) { +export default function CustomLabel({ label, className = "" }: CustomLabelProps) { const { Text } = Typography; return ( -
- {label} -
+ <> +
+ {label} +
+ ); } diff --git a/src/components/Technologies/PackCardIcon.tsx b/src/components/Technologies/PackCardIcon.tsx index e21138d8af..f5be6be57d 100644 --- a/src/components/Technologies/PackCardIcon.tsx +++ b/src/components/Technologies/PackCardIcon.tsx @@ -4,9 +4,9 @@ import IconMapper from "@site/src/components/IconMapper/IconMapper"; import { Image } from "antd"; interface PackCardIconProps { - title: string; - logoUrl: string; - type: string; + title?: string; + logoUrl?: string; + type?: string; } export default function PackCardIcon({ title, logoUrl, type }: PackCardIconProps) { @@ -16,13 +16,13 @@ export default function PackCardIcon({ title, logoUrl, type }: PackCardIconProps console.log(`Failed to load e.target.src: ${e.target.src}`); e.target.style.display = "none"; setIsError(true); - // }; return (
{isError ?() : ({`${title} = { + 'app services': 'App Services', + authentication: 'Authentication', + ingress: 'Ingress', k8s: 'Kubernetes', + 'load balancer': 'Load Balancer', + logging: 'Logging', + monitoring: 'Monitoring', cni: 'Network', os: 'Operating System', + registry: 'Registry', + security: 'Security', servicemesh: 'Service Mesh', - monitoring: 'Monitoring', csi: 'Storage', - logging: 'Logging', - 'load balancer': 'Load Balancer', - ingress: 'Ingress', - authentication: 'Authentication', - registry: 'Registry', 'system app': 'System App', - spectro: 'Spectro', - security: 'Security', - serverless: 'Serverless', - 'app services': 'App Services', } as const; export const cloudProviderTypes = { @@ -52,3 +48,23 @@ export const cloudProviderTypes = { 'edge-native': 'Edge Native', custom: 'Custom', } as const; + +export const layerTypes = [ + 'k8s', + 'cni', + 'os', + 'csi', +] as const; + +export const addOnTypes = [ + 'app services', + 'authentication', + 'ingress', + 'load balancer', + 'logging', + 'monitoring', + 'registry', + 'security', + 'servicemesh', + 'system app', +] as const; diff --git a/src/components/Technologies/Technologies.module.scss b/src/components/Technologies/Technologies.module.scss index 7985a058f1..5dee3eb926 100644 --- a/src/components/Technologies/Technologies.module.scss +++ b/src/components/Technologies/Technologies.module.scss @@ -2,6 +2,10 @@ padding: 15px 0; .technologyWrapper { margin-top: 32px; + svg { + vertical-align: bottom; + margin-right: 5px; + } } .imageWrapper { display: flex; diff --git a/src/components/Technologies/Technologies.tsx b/src/components/Technologies/Technologies.tsx index 330c985402..de0db0f785 100644 --- a/src/components/Technologies/Technologies.tsx +++ b/src/components/Technologies/Technologies.tsx @@ -8,6 +8,7 @@ import PacksFilters from "./PacksFilters"; import { packTypeNames } from "./PackConstants"; import { Collapse } from "antd"; import "./technologies.antd.css"; +import IconMapper from "../IconMapper/IconMapper"; const searchOptions = { threshold: 0.5, @@ -54,8 +55,8 @@ export default function Technologies({ data }: TechnologiesProps) { }; const renderPacks = (fields: FrontMatterData[]) => { return fields.map((field) => { - const { title, slug, logoUrl, packType } = field; - return ; + const { title, logoUrl, packType, name } = field; + return ; }); }; const renderPacksCategories = () => { @@ -80,11 +81,19 @@ export default function Technologies({ data }: TechnologiesProps) { }); } - const obj = ({renderPacks(filteredTechCards)}) + const obj = ({renderPacks(filteredTechCards)}) categoryItems.push(obj) }); return categoryItems; }; + function addPanelHeader(category: string) { + return ( + <> + + {packTypeNames[category as keyof typeof packTypeNames]} + + ); + } const setSelectedSearchFilters = (selectedSearchFilters: Record) => { setSelectedFilters((prevState) => ({ ...prevState, diff --git a/src/components/Technologies/TechnologyCard.tsx b/src/components/Technologies/TechnologyCard.tsx index 3185aa3ddd..f0b8316ef7 100644 --- a/src/components/Technologies/TechnologyCard.tsx +++ b/src/components/Technologies/TechnologyCard.tsx @@ -1,32 +1,31 @@ import React from "react"; -import Link from "@docusaurus/Link"; +import { useHistory } from "react-router-dom"; import styles from "./Technologies.module.scss"; import PackCardIcon from "./PackCardIcon"; -import osLayerIcon from "@site/static/assets/packs/os_layer.svg"; -import Image from "@theme/IdealImage"; -import IconMapper from "@site/src/components/IconMapper/IconMapper"; - interface TechnologyCardProps { + name: string; title: string; - slug: string; logoUrl: string; type: string; } -export default function TechnologyCard({ title, slug, logoUrl, type }: TechnologyCardProps) { +export default function TechnologyCard({ name, title, logoUrl, type }: TechnologyCardProps) { + const history = useHistory(); const handleImageError = (e: any) => { console.log(`Failed to load e.target.src: ${e.target.src}`); e.target.src.display = "none" - // + }; + const handleClick = () => { + history.push({ + pathname: `/integrations/packs/${name}`, + }); }; return ( - -
- -
{title}
-
- +
handleClick()}> + +
{title}
+
); } diff --git a/src/declarations.d.ts b/src/declarations.d.ts index 98ead581ce..0bed73a2cb 100644 --- a/src/declarations.d.ts +++ b/src/declarations.d.ts @@ -4,6 +4,10 @@ declare module "*.module.scss"; declare module "*.png"; +declare module '*.md' { + const value: string; // markdown is just a string + export default value; +} interface Mendable { /* eslint-disable @typescript-eslint/no-explicit-any */ initialize: (config: any) => void; diff --git a/src/services/api/index.js b/src/services/api/index.js index e8448cf35a..3db7236ddb 100644 --- a/src/services/api/index.js +++ b/src/services/api/index.js @@ -14,6 +14,7 @@ axiosRetry(api, { retries: 3, retryDelay: (...arg) => axiosRetry.exponentialDelay(...arg, 1000), retryCondition(error) { + console.log("error === ", error); switch (error.response.status) { case 500: case 501: diff --git a/src/theme/MDXComponents/MDXComponents.ts b/src/theme/MDXComponents/MDXComponents.ts index 6323974fac..9094f1488a 100644 --- a/src/theme/MDXComponents/MDXComponents.ts +++ b/src/theme/MDXComponents/MDXComponents.ts @@ -6,6 +6,7 @@ import Tooltip from "@site/src/components/Tooltip/Tooltip"; import PointsOfInterest from "@site/src/components/PointOfInterest/index"; import YouTube from "@site/src/components/Youtube/Youtube"; import Packs from "@site/src/components/Integrations/Packs/Packs"; +import PacksInformation from "@site/src/components/PacksInformation/PacksInformation"; import AppTiers from "@site/src/components/Integrations/AppTiers/AppTiers"; import PacksTable from "@site/src/components/PacksTable/PacksTable"; import TOCInline from "@theme/TOCInline"; @@ -20,6 +21,7 @@ export default { PointsOfInterest, YouTube, Packs, + PacksInformation, AppTiers, PacksTable, TOCInline, diff --git a/src/types/index.d.ts b/src/types/index.d.ts index 2f73749538..ef7f29bd74 100644 --- a/src/types/index.d.ts +++ b/src/types/index.d.ts @@ -4,6 +4,11 @@ declare module "*.module.scss"; declare module "*.png"; +declare module '*.md' { + const value: string; // markdown is just a string + export default value; +} + interface Mendable { initialize: () => void; // Add other methods or properties as needed diff --git a/static/packs-data/packs_information.json b/static/packs-data/packs_information.json new file mode 100644 index 0000000000..8ffa0540b4 --- /dev/null +++ b/static/packs-data/packs_information.json @@ -0,0 +1,18 @@ +[ + { + "name": "centos", + "description": "CentOS Linux distribution is a stable, predictable, manageable and reproducible platform derived from the sources of RedHat Enterprise Linux (RHEL). It provides a rich base platform for open source communities to build upon. Spectro Cloudprovides CentOS as a development framework for its users." + }, + { + "name": "cni-flannel", + "description": "Flannel is a network layer, layer three, fabric for Kubernetes. It is designed to work with Linux routing infrastructure and creates a virtual network that gives each computing host a subnet. Flannel uses either the Kubernetes API or etcd directly to store the network configuration, the allocated subnets, and any auxiliary data such as the host’s public IP address." + }, + { + "name": "cni-cilium", + "description": "The Cilium agent runs on all clusters and servers to provide networking, security and observability to the workload running on that node." + }, + { + "name": "csi-rook", + "description": "Rook is a cloud-native storage orchestrator for Kubernetes, providing the platform, framework, and support for a diverse set of storage solutions to natively integrate with cloud-native environments. Rook turns storage" + } +] From 2a78b10604f646c999f4660242d6dc3d6e2acec3 Mon Sep 17 00:00:00 2001 From: nage1234 <88926279+nage1234@users.noreply.github.com> Date: Fri, 12 Apr 2024 12:08:08 +0530 Subject: [PATCH 05/23] fixed the filter issue, handled api failure, eslint error fixed --- plugins/packs-integrations.js | 22 +++++----- .../Integrations/IntegrationTypes.ts | 3 +- src/components/PacksReadme/PacksReadme.tsx | 43 ++++++++----------- .../CategorySelector/AdditionalFilters.tsx | 4 -- src/components/Technologies/Technologies.tsx | 22 ++++++---- src/services/api/index.js | 3 +- 6 files changed, 48 insertions(+), 49 deletions(-) diff --git a/plugins/packs-integrations.js b/plugins/packs-integrations.js index 3358b86f51..4d76fa7e95 100644 --- a/plugins/packs-integrations.js +++ b/plugins/packs-integrations.js @@ -19,8 +19,6 @@ function getReadMeMap(packValues) { const map = new Map(); packValues.forEach((packValue) => { map[packValue.packUid] = packValue.readme; - console.log("packValue.packUid = ---------- ", packValue.packUid); - console.log("packValue.readme =************* ", packValue.readme); }); return map; } @@ -120,8 +118,8 @@ function getAggregatedVersions(tags, packValues, packName, layer) { packUid: version.packUid, }; }); - console.log("roots length= ", roots.length); - console.log("_sortedVersions length= ", _sortedVersions.length); + //console.log("roots length= ", roots.length); + //console.log("_sortedVersions length= ", _sortedVersions.length); _sortedVersions.forEach((version) => { const parentTags = version?.parentTags || []; const parent = parentTags.find(matchAmbiguousPatch); @@ -141,7 +139,7 @@ function getAggregatedVersions(tags, packValues, packName, layer) { }); } }); - console.log("roots = ", JSON.stringify(roots)); + //console.log("roots = ", JSON.stringify(roots)); return roots; } @@ -169,7 +167,7 @@ function generateRoutes(packDataMap, packsData) { } async function fetchPackListItems(queryParams, packDataArr, counter) { - const payload = {filter: { type: ["spectro", "oci"], environment:["aws"]}}; + const payload = {filter: { type: ["spectro", "oci"], environment:["aws"] }}; //const payload = {filter: { type: ["spectro", "oci"], layer: ["os", "k8s"], environment:["aws"]}} //const payload = {"filter":{"displayName":{"contains":""},"ignoreCase":true,"type":["spectro"],"layer":["csi"],"environment":["openstack"],"registryUid":["5e2031962f090e2d3d8a3290"]}}; counter+=1; @@ -177,7 +175,7 @@ async function fetchPackListItems(queryParams, packDataArr, counter) { await setTimeout(2000); } const response = await api.post('/v1/packs/search'+queryParams, payload); - console.log("response.data.listmeta.count = ", response.data.listmeta.count); + //console.log("response.data.listmeta.count = ", response.data.listmeta.count); const tempPackArr = packDataArr.concat(response.data.items); if(response.data.listmeta.continue) { return fetchPackListItems("?limit=100&continue="+response.data.listmeta.continue, tempPackArr, counter); @@ -194,7 +192,7 @@ async function pluginPacksAndIntegrationsData() { packDataArr = packDataArr.filter((pack) => { return layerTypes.includes(pack.spec.layer) || (pack.spec.layer === "addon" && addOnTypes.includes(pack.spec.addonType)); }) - console.log("packDataArr length = ", packDataArr.length) + //console.log("packDataArr length = ", packDataArr.length) const packUrl = "v1/packs/"; const packMDMap = new Map(); let apiPacksData = []; @@ -209,13 +207,15 @@ async function pluginPacksAndIntegrationsData() { promises.push(api.get(`${packUrl}${packData.spec.name}/registries/${packData.spec.registries[0].uid}?cloudType=${cloudType}&layer=${packData.spec.layer}`)); if(counter%10 === 0 || i === packDataArr.length-1) { await setTimeout(2000); - const response2 = await Promise.all(promises); - apiPacksData = apiPacksData.concat(response2.map((pack) => pack.data)); + //const response2 = await Promise.all(promises); + const results = await Promise.all(promises.map(p => p.catch(e => e))); + const validResults = results.filter(result => !(result instanceof Error)); + apiPacksData = apiPacksData.concat(validResults.map((pack) => pack.data)); promises = []; } } } - console.log("packDescription = ", packDescription); + //console.log("packDescription = ", packDescription); return {packsPaletteData: packMDMap, packsPaletteDetailsData: apiPacksData, packsDescription: packDescription} ; }, async contentLoaded({ allContent, content, actions }) { diff --git a/src/components/Integrations/IntegrationTypes.ts b/src/components/Integrations/IntegrationTypes.ts index 337cab3acc..699417ac88 100644 --- a/src/components/Integrations/IntegrationTypes.ts +++ b/src/components/Integrations/IntegrationTypes.ts @@ -12,8 +12,9 @@ export interface FrontMatterData { packType: string; verified: boolean; cloudTypes: string[]; - readme: Map; + readme: Map; versions: VersionTemplate[]; + community: boolean; } export interface VersionTemplate { diff --git a/src/components/PacksReadme/PacksReadme.tsx b/src/components/PacksReadme/PacksReadme.tsx index 5712da8235..ca35ff9b70 100644 --- a/src/components/PacksReadme/PacksReadme.tsx +++ b/src/components/PacksReadme/PacksReadme.tsx @@ -1,11 +1,9 @@ import React, { useEffect, useState, useMemo, lazy, Suspense, ReactElement } from "react"; -import { useLocation } from 'react-router-dom'; import { IntegrationsData, PacksData } from "../Integrations/IntegrationTypes"; import styles from "./PacksReadme.module.scss"; import { Select, List, Tabs } from "antd"; import CustomLabel from "../Technologies/CategorySelector/CustomLabel"; import PackCardIcon from "../Technologies/PackCardIcon"; -import { Typography } from "antd"; import Markdown from 'markdown-to-jsx'; import "./PacksReadme.antd.css"; import { usePluginData } from "@docusaurus/useGlobalData"; @@ -15,21 +13,19 @@ import PacksIntegrationsPluginData from "../Integrations/IntegrationTypes"; interface TechnologiesProps { data: PacksData | IntegrationsData; } +interface PackReadmeProps { + customDescription: string, + packReadme: any, + versions: Array, + title: string, + logoUrl: string, + type: string +} export default function PacksReadme() { - const { Text } = Typography; - //const location = useLocation(); - //const packName = location?.state?.id || ""; const [selectedVersion, setSelectedVersion] = useState(""); - //const [md, setMd] = useState(null); - //let Custom = falco; - - //const [md, setMd] = useState | null>(null); - const [md, setMd] = useState | null>(null); const packName = new URLSearchParams(window.location.search).get("pack") - - useEffect(() => { const importComponent = async () => { try { @@ -51,7 +47,7 @@ export default function PacksReadme() { const _packData = packs.filter((pack) => pack.fields.name === packName)[0]; if(_packData) { setSelectedVersion(_packData.fields.versions[0].title); - return { + const packDataInfo: PackReadmeProps = { customDescription: _packData.fields.description, packReadme: _packData.fields.readme, versions: _packData.fields.versions, @@ -59,6 +55,7 @@ export default function PacksReadme() { logoUrl: _packData.fields.logoUrl, type: _packData.fields.packType, }; + return packDataInfo; } return { customDescription: "", @@ -85,16 +82,15 @@ export default function PacksReadme() { function versionSupportedTextRender() { if(selectedVersion) { const listVersion = packData.versions?.find((ver) => ver.title === selectedVersion); - if(listVersion) { + if (listVersion) { return ( <> Versions Supported
} dataSource={listVersion.children} - renderItem={child =>
{child.title}
} + renderItem={(child: any) =>
{child.title}
} /> - ) } @@ -102,10 +98,6 @@ export default function PacksReadme() { return null; } - function changeReadMeTab() { - - } - function renderTabs() { let readme = ""; if (Object.keys(packData.packReadme).length && md) { @@ -122,7 +114,8 @@ export default function PacksReadme() { key: '2', children: md, }, - ] + ] as { label: string, key: string, children: JSX.Element }[]; + return ( {items.map((item) => { @@ -134,11 +127,13 @@ export default function PacksReadme() { })} ) - } else if(Object.keys(packData.packReadme).length) { + } else if (Object.keys(packData.packReadme).length) { const packUid = packData.versions.find((ver) => ver.title === selectedVersion)?.packUid; - readme = packUid ? packData.packReadme[packUid] : ""; + //const temp = someObj[field as keyof ObjectType] + + readme = packUid ? packData.packReadme[packUid as keyof string] : ""; return () - } else if(md) { + } else if (md) { return md; } else { return null; diff --git a/src/components/Technologies/CategorySelector/AdditionalFilters.tsx b/src/components/Technologies/CategorySelector/AdditionalFilters.tsx index c502596455..1a1cb0bbae 100644 --- a/src/components/Technologies/CategorySelector/AdditionalFilters.tsx +++ b/src/components/Technologies/CategorySelector/AdditionalFilters.tsx @@ -15,10 +15,6 @@ interface AdditionalFiltersProps { export default function AdditionalFilters({ selectAdditionalFilters }: AdditionalFiltersProps) { const [items, setItems] = useState([ - { - label: 'FIPS', - key: 'FIPS', - }, { label: 'Verified', key: 'Verified', diff --git a/src/components/Technologies/Technologies.tsx b/src/components/Technologies/Technologies.tsx index de0db0f785..378d7fd81e 100644 --- a/src/components/Technologies/Technologies.tsx +++ b/src/components/Technologies/Technologies.tsx @@ -20,7 +20,7 @@ interface TechnologiesProps { } export default function Technologies({ data }: TechnologiesProps) { - const [selectedFilters, setSelectedFilters] = useState({ category: [], provider: "", additionalFilters: []}); + const [selectedFilters, setSelectedFilters] = useState<{category: string[], provider: string, additionalFilters: string[]}>({category: [], provider: "", additionalFilters: []}) const [searchValue, setSearchValue] = useState(""); const categories = useMemo(() => { @@ -37,7 +37,7 @@ export default function Technologies({ data }: TechnologiesProps) { const categoryKeys = Array.from(sortedCategoriesMap.keys()); categoryKeys.forEach((category) => { const fields = sortedCategoriesMap.get(category); - fields.sort((field1, field2) => { + fields.sort((field1: any, field2: any) => { if(field1.name > field2.name){ return 1; } else if(field1.name < field2.name){ @@ -64,7 +64,7 @@ export default function Technologies({ data }: TechnologiesProps) { const categoryItems: JSX.Element[] = []; if(selectedFilters.category.length > 0) { categoryKeys = categoryKeys.filter((category: string) => { // Add type annotation for category parameter - return selectedFilters.category.includes(category); + return selectedFilters.category.includes(category as never); }); } categoryKeys.forEach((category) => { @@ -74,15 +74,21 @@ export default function Technologies({ data }: TechnologiesProps) { return techCard.cloudTypes.includes("all") || techCard.cloudTypes.includes(selectedFilters.provider); }); } - //TODO: Add additional filter logic based on backend API data like community, FIPs - if (selectedFilters.additionalFilters.length && selectedFilters.additionalFilters.includes("Verified")) { + //TODO: Add additional filter logic based on backend API data like community, FIPs + if (selectedFilters.additionalFilters?.length && selectedFilters.additionalFilters.includes("Verified")) { filteredTechCards = filteredTechCards.filter((techCard: FrontMatterData) => { return techCard.verified; }); } - - const obj = ({renderPacks(filteredTechCards)}) - categoryItems.push(obj) + if (selectedFilters.additionalFilters?.length && selectedFilters.additionalFilters.includes("Community")) { + filteredTechCards = filteredTechCards.filter((techCard: FrontMatterData) => { + return techCard.community; + }); + } + if (filteredTechCards.length) { + const obj = ({renderPacks(filteredTechCards)}) + categoryItems.push(obj); + } }); return categoryItems; }; diff --git a/src/services/api/index.js b/src/services/api/index.js index 3db7236ddb..70d95c8c3a 100644 --- a/src/services/api/index.js +++ b/src/services/api/index.js @@ -14,9 +14,10 @@ axiosRetry(api, { retries: 3, retryDelay: (...arg) => axiosRetry.exponentialDelay(...arg, 1000), retryCondition(error) { - console.log("error === ", error); + //console.log("error === "); switch (error.response.status) { case 500: + case 404: case 501: case 429: return true; From c3c662cbdbaef5a2e3163f1a02973c76f5140f79 Mon Sep 17 00:00:00 2001 From: nage1234 <88926279+nage1234@users.noreply.github.com> Date: Fri, 12 Apr 2024 12:11:37 +0530 Subject: [PATCH 06/23] removed the unused component --- src/components/PacksReadme/NewComponent.tsx | 14 -------------- 1 file changed, 14 deletions(-) delete mode 100644 src/components/PacksReadme/NewComponent.tsx diff --git a/src/components/PacksReadme/NewComponent.tsx b/src/components/PacksReadme/NewComponent.tsx deleted file mode 100644 index d53f3c73b6..0000000000 --- a/src/components/PacksReadme/NewComponent.tsx +++ /dev/null @@ -1,14 +0,0 @@ -import React from 'react'; - -async function created() { - let fileExists; - try { - fileExists = await import('@site/docs/docs-content/integrations/falco.md').then((res) => res.default); - } catch (err) { - fileExists = null; - } - return fileExists; -} - -const NewComponent = created(); -export default NewComponent; From cb515d8140b865ccb021a0e616b387ee8c7e6a55 Mon Sep 17 00:00:00 2001 From: nage1234 <88926279+nage1234@users.noreply.github.com> Date: Sat, 13 Apr 2024 00:14:23 +0530 Subject: [PATCH 07/23] addressed the review comments --- docs/docs-content/integrations/packs.mdx | 3 +- plugins/packs-integrations.js | 33 +++++++------------ .../PacksInformation/PacksInformation.tsx | 15 ++------- src/components/PacksReadme/PacksReadme.tsx | 12 +++---- .../CategorySelector/CloudProviderSelecor.tsx | 6 ++-- src/components/Technologies/Technologies.tsx | 12 +++---- src/services/api/index.js | 1 - src/theme/Root/Root.tsx | 2 -- 8 files changed, 30 insertions(+), 54 deletions(-) diff --git a/docs/docs-content/integrations/packs.mdx b/docs/docs-content/integrations/packs.mdx index 10d2aefd94..0433ef8494 100644 --- a/docs/docs-content/integrations/packs.mdx +++ b/docs/docs-content/integrations/packs.mdx @@ -2,7 +2,8 @@ sidebar_label: "Pack Information" title: "Pack Information" description: "Learn about packs that Palette offers and choose from Pallette packs." -hide_table_of_contents: false +hide_table_of_contents: true +sidebar_class_name: "hide-from-sidebar" icon: "teams" tags: ["packs"] --- diff --git a/plugins/packs-integrations.js b/plugins/packs-integrations.js index 4d76fa7e95..c13a07a8fa 100644 --- a/plugins/packs-integrations.js +++ b/plugins/packs-integrations.js @@ -16,11 +16,9 @@ function generateIntegrationData(allContent) { } function getReadMeMap(packValues) { - const map = new Map(); - packValues.forEach((packValue) => { - map[packValue.packUid] = packValue.readme; - }); - return map; + const generatedReadMeData = packValues.reduce((packValuesMap, packValue) => + Object.assign(packValuesMap, {[packValue.packUid]: packValue.readme}), {}); + return generatedReadMeData; } function combineAPICustomPackData(packsMData, packsPaletteDetailsData, customPacksData) { @@ -35,7 +33,7 @@ function combineAPICustomPackData(packsMData, packsPaletteDetailsData, customPac const packType = packMDValue.spec.layer === "addon" ? packMDValue.spec.addonType : packMDValue.spec.layer; const layer = packMDValue.spec.layer === "addon" ? packMDValue.spec.addonType : packTypeNames[packMDValue.spec.layer]; const packValues = packContent.packValues; - return { + const packValueMap = { fields: { name: packName, title: packMDValue.spec.displayName, @@ -56,6 +54,7 @@ function combineAPICustomPackData(packsMData, packsPaletteDetailsData, customPac versions: getAggregatedVersions(packContent.tags, packValues, packName, layer) } }; + return packValueMap; } }); } @@ -118,8 +117,6 @@ function getAggregatedVersions(tags, packValues, packName, layer) { packUid: version.packUid, }; }); - //console.log("roots length= ", roots.length); - //console.log("_sortedVersions length= ", _sortedVersions.length); _sortedVersions.forEach((version) => { const parentTags = version?.parentTags || []; const parent = parentTags.find(matchAmbiguousPatch); @@ -139,17 +136,14 @@ function getAggregatedVersions(tags, packValues, packName, layer) { }); } }); - //console.log("roots = ", JSON.stringify(roots)); - return roots; } function generateCustomData(packsDescription) { - const customPackMap = new Map(); - packsDescription.forEach((pack) => { - customPackMap[pack.name] = pack.description; - }); - return customPackMap; + const generatedCustomData = packsDescription.reduce((obj, desc) => + Object.assign(obj, {[desc.name]: desc.description}), {}); + console.log("completed custom data description generation"); + return generatedCustomData; } function generateRoutes(packDataMap, packsData) { @@ -168,14 +162,11 @@ function generateRoutes(packDataMap, packsData) { async function fetchPackListItems(queryParams, packDataArr, counter) { const payload = {filter: { type: ["spectro", "oci"], environment:["aws"] }}; - //const payload = {filter: { type: ["spectro", "oci"], layer: ["os", "k8s"], environment:["aws"]}} - //const payload = {"filter":{"displayName":{"contains":""},"ignoreCase":true,"type":["spectro"],"layer":["csi"],"environment":["openstack"],"registryUid":["5e2031962f090e2d3d8a3290"]}}; counter+=1; if(counter%10 === 0) { await setTimeout(2000); } const response = await api.post('/v1/packs/search'+queryParams, payload); - //console.log("response.data.listmeta.count = ", response.data.listmeta.count); const tempPackArr = packDataArr.concat(response.data.items); if(response.data.listmeta.continue) { return fetchPackListItems("?limit=100&continue="+response.data.listmeta.continue, tempPackArr, counter); @@ -189,10 +180,10 @@ async function pluginPacksAndIntegrationsData() { name: "plugin-packs-integrations", async loadContent() { let packDataArr = await fetchPackListItems("?limit=100", [], 0); + console.log("completed the fetch of all the names of the pack") packDataArr = packDataArr.filter((pack) => { return layerTypes.includes(pack.spec.layer) || (pack.spec.layer === "addon" && addOnTypes.includes(pack.spec.addonType)); }) - //console.log("packDataArr length = ", packDataArr.length) const packUrl = "v1/packs/"; const packMDMap = new Map(); let apiPacksData = []; @@ -207,7 +198,6 @@ async function pluginPacksAndIntegrationsData() { promises.push(api.get(`${packUrl}${packData.spec.name}/registries/${packData.spec.registries[0].uid}?cloudType=${cloudType}&layer=${packData.spec.layer}`)); if(counter%10 === 0 || i === packDataArr.length-1) { await setTimeout(2000); - //const response2 = await Promise.all(promises); const results = await Promise.all(promises.map(p => p.catch(e => e))); const validResults = results.filter(result => !(result instanceof Error)); apiPacksData = apiPacksData.concat(validResults.map((pack) => pack.data)); @@ -215,7 +205,7 @@ async function pluginPacksAndIntegrationsData() { } } } - //console.log("packDescription = ", packDescription); + console.log("completed the fetch of all the pack details"); return {packsPaletteData: packMDMap, packsPaletteDetailsData: apiPacksData, packsDescription: packDescription} ; }, async contentLoaded({ allContent, content, actions }) { @@ -225,6 +215,7 @@ async function pluginPacksAndIntegrationsData() { const customPacksData = generateCustomData(packsDescription); const unionPackData = combineAPICustomPackData(packsPaletteData, packsPaletteDetailsData, customPacksData); const routes = generateRoutes(packsPaletteData, unionPackData); + console.log("completed the generation of the routes"); routes.map(route => addRoute(route)); setGlobalData({ integrations: integrationsData, packs: unionPackData }); }, diff --git a/src/components/PacksInformation/PacksInformation.tsx b/src/components/PacksInformation/PacksInformation.tsx index 9784097bcc..a32f600e19 100644 --- a/src/components/PacksInformation/PacksInformation.tsx +++ b/src/components/PacksInformation/PacksInformation.tsx @@ -1,20 +1,9 @@ import React from "react"; import { useLocation } from 'react-router-dom'; import PacksReadme from "@site/src/components/PacksReadme"; -import { usePluginData } from "@docusaurus/useGlobalData"; -import PacksIntegrationsPluginData from "../Integrations/IntegrationTypes"; -import Layout from '@theme/Layout'; -import { Switch, Route, useRouteMatch, Redirect } from 'react-router-dom' - -interface PackInfoProps { - custom: any; -}; - +import { Switch, useRouteMatch, Redirect } from 'react-router-dom' export default function Packs(props:any) { - //const { packs } = usePluginData("plugin-packs-integrations") as PacksIntegrationsPluginData; - - //return ; let match = useRouteMatch(); const location = useLocation(); const packName = location?.state?.id; @@ -27,6 +16,6 @@ export default function Packs(props:any) { ) } - + ); } diff --git a/src/components/PacksReadme/PacksReadme.tsx b/src/components/PacksReadme/PacksReadme.tsx index ca35ff9b70..a472eb5d45 100644 --- a/src/components/PacksReadme/PacksReadme.tsx +++ b/src/components/PacksReadme/PacksReadme.tsx @@ -45,8 +45,8 @@ export default function PacksReadme() { const { packs } = usePluginData("plugin-packs-integrations") as PacksIntegrationsPluginData; const _packData = packs.filter((pack) => pack.fields.name === packName)[0]; - if(_packData) { - setSelectedVersion(_packData.fields.versions[0].title); + if (_packData) { + setSelectedVersion(`${_packData.fields.versions[0].title}`); const packDataInfo: PackReadmeProps = { customDescription: _packData.fields.description, packReadme: _packData.fields.readme, @@ -80,7 +80,7 @@ export default function PacksReadme() { } function versionSupportedTextRender() { - if(selectedVersion) { + if (selectedVersion) { const listVersion = packData.versions?.find((ver) => ver.title === selectedVersion); if (listVersion) { return ( @@ -129,8 +129,6 @@ export default function PacksReadme() { ) } else if (Object.keys(packData.packReadme).length) { const packUid = packData.versions.find((ver) => ver.title === selectedVersion)?.packUid; - //const temp = someObj[field as keyof ObjectType] - readme = packUid ? packData.packReadme[packUid as keyof string] : ""; return () } else if (md) { @@ -150,8 +148,8 @@ export default function PacksReadme() { diff --git a/src/components/Technologies/CategorySelector/CloudProviderSelecor.tsx b/src/components/Technologies/CategorySelector/CloudProviderSelecor.tsx index 51f8363c1a..8c06e851bb 100644 --- a/src/components/Technologies/CategorySelector/CloudProviderSelecor.tsx +++ b/src/components/Technologies/CategorySelector/CloudProviderSelecor.tsx @@ -3,12 +3,12 @@ import { Select } from "antd"; import { cloudProviderTypes } from "../PackConstants"; import styles from "./CategorySelector.module.scss"; -interface CategorySelectorProps { - selected: string; // Update the type to string[] +interface CloudProviderSelectorProps { + selected: string; selectCloudProvider: (provider: string) => void; } -export default function CloudProviderSelecor({ selected="", selectCloudProvider }: CategorySelectorProps) { +export default function CloudProviderSelecor({ selected="", selectCloudProvider }: CloudProviderSelectorProps) { const getOptions = () => { const providers = Object.keys(cloudProviderTypes); const providersMap = providers.map((provider) => { diff --git a/src/components/Technologies/Technologies.tsx b/src/components/Technologies/Technologies.tsx index 378d7fd81e..fd2f0b79cb 100644 --- a/src/components/Technologies/Technologies.tsx +++ b/src/components/Technologies/Technologies.tsx @@ -27,7 +27,7 @@ export default function Technologies({ data }: TechnologiesProps) { const categoriesMap = new Map(); data.forEach((technology) => { const key = technology.fields.packType; - if(categoriesMap.has(key)){ + if (categoriesMap.has(key)){ categoriesMap.get(key).push(technology.fields); } else { categoriesMap.set(key, new Array(technology.fields)); @@ -38,9 +38,9 @@ export default function Technologies({ data }: TechnologiesProps) { categoryKeys.forEach((category) => { const fields = sortedCategoriesMap.get(category); fields.sort((field1: any, field2: any) => { - if(field1.name > field2.name){ + if (field1.name > field2.name){ return 1; - } else if(field1.name < field2.name){ + } else if (field1.name < field2.name){ return -1; } else { return 0; @@ -62,8 +62,8 @@ export default function Technologies({ data }: TechnologiesProps) { const renderPacksCategories = () => { let categoryKeys: string[] = Array.from(categories.keys()); const categoryItems: JSX.Element[] = []; - if(selectedFilters.category.length > 0) { - categoryKeys = categoryKeys.filter((category: string) => { // Add type annotation for category parameter + if (selectedFilters.category.length > 0) { + categoryKeys = categoryKeys.filter((category: string) => { return selectedFilters.category.includes(category as never); }); } @@ -74,7 +74,7 @@ export default function Technologies({ data }: TechnologiesProps) { return techCard.cloudTypes.includes("all") || techCard.cloudTypes.includes(selectedFilters.provider); }); } - //TODO: Add additional filter logic based on backend API data like community, FIPs + if (selectedFilters.additionalFilters?.length && selectedFilters.additionalFilters.includes("Verified")) { filteredTechCards = filteredTechCards.filter((techCard: FrontMatterData) => { return techCard.verified; diff --git a/src/services/api/index.js b/src/services/api/index.js index 70d95c8c3a..c61ca5f062 100644 --- a/src/services/api/index.js +++ b/src/services/api/index.js @@ -14,7 +14,6 @@ axiosRetry(api, { retries: 3, retryDelay: (...arg) => axiosRetry.exponentialDelay(...arg, 1000), retryCondition(error) { - //console.log("error === "); switch (error.response.status) { case 500: case 404: diff --git a/src/theme/Root/Root.tsx b/src/theme/Root/Root.tsx index 55abde4a2f..e962534a39 100644 --- a/src/theme/Root/Root.tsx +++ b/src/theme/Root/Root.tsx @@ -1,7 +1,5 @@ import React from "react"; import MendableAIWidget from "../../components/MendableAIWidget"; -import "antd/dist/antd.css"; - export default function Root({ children }: { children: React.ReactNode }) { return ( From 00d15144560e74f6031db46bff6bf8334047c892 Mon Sep 17 00:00:00 2001 From: nage1234 <88926279+nage1234@users.noreply.github.com> Date: Sat, 13 Apr 2024 00:17:19 +0530 Subject: [PATCH 08/23] reverted the antd version --- package-lock.json | 632 ++++++++++++++++++++++++++++------------------ package.json | 2 +- 2 files changed, 382 insertions(+), 252 deletions(-) diff --git a/package-lock.json b/package-lock.json index 91b6319a9e..9c3a82d25b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20,7 +20,7 @@ "@fortawesome/free-solid-svg-icons": "^6.4.0", "@fortawesome/react-fontawesome": "^0.2.0", "@mdx-js/react": "^3.0.0", - "antd": "^4.22.6", + "antd": "^5.6.2", "axios-retry": "^3.8.0", "babel-plugin-macros": "^3.1.0", "clsx": "^1.2.1", @@ -273,6 +273,24 @@ "@ctrl/tinycolor": "^3.4.0" } }, + "node_modules/@ant-design/cssinjs": { + "version": "1.19.1", + "resolved": "https://registry.npmjs.org/@ant-design/cssinjs/-/cssinjs-1.19.1.tgz", + "integrity": "sha512-hgQ3wiys3X0sqDKWkqCJ6EYdF79i9JCvtavmIGwuuPUKmoJXV8Ff0sY+yQQSxk2dRmMyam/bYKo/Bwor45hnZw==", + "dependencies": { + "@babel/runtime": "^7.11.1", + "@emotion/hash": "^0.8.0", + "@emotion/unitless": "^0.7.5", + "classnames": "^2.3.1", + "csstype": "^3.1.3", + "rc-util": "^5.35.0", + "stylis": "^4.0.13" + }, + "peerDependencies": { + "react": ">=16.0.0", + "react-dom": ">=16.0.0" + } + }, "node_modules/@ant-design/icons": { "version": "4.8.3", "resolved": "https://registry.npmjs.org/@ant-design/icons/-/icons-4.8.3.tgz", @@ -299,8 +317,9 @@ "integrity": "sha512-vHbT+zJEVzllwP+CM+ul7reTEfBR0vgxFe7+lREAsAA7YGsYpboiq2sQNeQeRvh09GfQgs/GyFEvZpJ9cLXpXA==" }, "node_modules/@ant-design/react-slick": { - "version": "1.0.2", - "license": "MIT", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@ant-design/react-slick/-/react-slick-1.1.2.tgz", + "integrity": "sha512-EzlvzE6xQUBrZuuhSAFTdsr4P2bBBHGZwKFemEfq8gIGyIQCxalYfZW/T2ORbtQx5rU69o+WycP3exY/7T1hGA==", "dependencies": { "@babel/runtime": "^7.10.4", "classnames": "^2.2.5", @@ -3324,6 +3343,16 @@ "node": ">=18.0" } }, + "node_modules/@emotion/hash": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/@emotion/hash/-/hash-0.8.0.tgz", + "integrity": "sha512-kBJtf7PH6aWwZ6fka3zQ0p6SBYzx4fl1LoZXE2RrnYST9Xljm7WfKJrU4g/Xr3Beg72MLrp1AWNUmuYJTL7Cow==" + }, + "node_modules/@emotion/unitless": { + "version": "0.7.5", + "resolved": "https://registry.npmjs.org/@emotion/unitless/-/unitless-0.7.5.tgz", + "integrity": "sha512-OWORNpfjMsSSUBVrRBVGECkhWcULOAJz9ZW8uK9qgxD+87M7jHRcvh/A96XXNhXTLmKcoYSQtBEX7lHMO7YRwg==" + }, "node_modules/@eslint-community/eslint-utils": { "version": "4.4.0", "devOptional": true, @@ -4895,6 +4924,62 @@ "version": "1.0.0-next.24", "license": "MIT" }, + "node_modules/@rc-component/color-picker": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/@rc-component/color-picker/-/color-picker-1.5.3.tgz", + "integrity": "sha512-+tGGH3nLmYXTalVe0L8hSZNs73VTP5ueSHwUlDC77KKRaN7G4DS4wcpG5DTDzdcV/Yas+rzA6UGgIyzd8fS4cw==", + "dependencies": { + "@babel/runtime": "^7.23.6", + "@ctrl/tinycolor": "^3.6.1", + "classnames": "^2.2.6", + "rc-util": "^5.38.1" + }, + "peerDependencies": { + "react": ">=16.9.0", + "react-dom": ">=16.9.0" + } + }, + "node_modules/@rc-component/context": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@rc-component/context/-/context-1.4.0.tgz", + "integrity": "sha512-kFcNxg9oLRMoL3qki0OMxK+7g5mypjgaaJp/pkOis/6rVxma9nJBF/8kCIuTYHUQNr0ii7MxqE33wirPZLJQ2w==", + "dependencies": { + "@babel/runtime": "^7.10.1", + "rc-util": "^5.27.0" + }, + "peerDependencies": { + "react": ">=16.9.0", + "react-dom": ">=16.9.0" + } + }, + "node_modules/@rc-component/mini-decimal": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@rc-component/mini-decimal/-/mini-decimal-1.1.0.tgz", + "integrity": "sha512-jS4E7T9Li2GuYwI6PyiVXmxTiM6b07rlD9Ge8uGZSCz3WlzcG5ZK7g5bbuKNeZ9pgUuPK/5guV781ujdVpm4HQ==", + "dependencies": { + "@babel/runtime": "^7.18.0" + }, + "engines": { + "node": ">=8.x" + } + }, + "node_modules/@rc-component/mutate-observer": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@rc-component/mutate-observer/-/mutate-observer-1.1.0.tgz", + "integrity": "sha512-QjrOsDXQusNwGZPf4/qRQasg7UFEj06XiCJ8iuiq/Io7CrHrgVi6Uuetw60WAMG1799v+aM8kyc+1L/GBbHSlw==", + "dependencies": { + "@babel/runtime": "^7.18.0", + "classnames": "^2.3.2", + "rc-util": "^5.24.4" + }, + "engines": { + "node": ">=8.x" + }, + "peerDependencies": { + "react": ">=16.9.0", + "react-dom": ">=16.9.0" + } + }, "node_modules/@rc-component/portal": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@rc-component/portal/-/portal-1.1.2.tgz", @@ -4912,6 +4997,45 @@ "react-dom": ">=16.9.0" } }, + "node_modules/@rc-component/tour": { + "version": "1.14.2", + "resolved": "https://registry.npmjs.org/@rc-component/tour/-/tour-1.14.2.tgz", + "integrity": "sha512-A75DZ8LVvahBIvxooj3Gvf2sxe+CGOkmzPNX7ek0i0AJHyKZ1HXe5ieIGo3m0FMdZfVOlbCJ952Duq8VKAHk6g==", + "dependencies": { + "@babel/runtime": "^7.18.0", + "@rc-component/portal": "^1.0.0-9", + "@rc-component/trigger": "^2.0.0", + "classnames": "^2.3.2", + "rc-util": "^5.24.4" + }, + "engines": { + "node": ">=8.x" + }, + "peerDependencies": { + "react": ">=16.9.0", + "react-dom": ">=16.9.0" + } + }, + "node_modules/@rc-component/trigger": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@rc-component/trigger/-/trigger-2.1.1.tgz", + "integrity": "sha512-UjHkedkgtEcgQu87w1VuWug1idoDJV7VUt0swxHXRcmei2uu1AuUzGBPEUlmOmXGJ+YtTgZfVLi7kuAUKoZTMA==", + "dependencies": { + "@babel/runtime": "^7.23.2", + "@rc-component/portal": "^1.1.0", + "classnames": "^2.3.2", + "rc-motion": "^2.0.0", + "rc-resize-observer": "^1.3.1", + "rc-util": "^5.38.0" + }, + "engines": { + "node": ">=8.x" + }, + "peerDependencies": { + "react": ">=16.9.0", + "react-dom": ">=16.9.0" + } + }, "node_modules/@redocly/ajv": { "version": "8.11.0", "license": "MIT", @@ -7201,53 +7325,58 @@ "license": "MIT" }, "node_modules/antd": { - "version": "4.24.16", - "resolved": "https://registry.npmjs.org/antd/-/antd-4.24.16.tgz", - "integrity": "sha512-zZrK4UYxHtU6tGOOf0uG/kBRx1kTvypfuSB3GqE/SBQxFhZ/TZ+yj7Z1qwI8vGfMtUUJdLeuoCAqGDa1zPsXnQ==", - "dependencies": { - "@ant-design/colors": "^6.0.0", - "@ant-design/icons": "^4.8.2", - "@ant-design/react-slick": "~1.0.2", - "@babel/runtime": "^7.18.3", + "version": "5.16.1", + "resolved": "https://registry.npmjs.org/antd/-/antd-5.16.1.tgz", + "integrity": "sha512-XAlLRrgYV+nj9FHnkXEPS6HNcKcluEa8v44e7Cixjlp8aOXRhUI6IfZaKpc2MPGjQ+06rp62/dsxOUNJW9kfLA==", + "dependencies": { + "@ant-design/colors": "^7.0.2", + "@ant-design/cssinjs": "^1.18.5", + "@ant-design/icons": "^5.3.6", + "@ant-design/react-slick": "~1.1.2", + "@babel/runtime": "^7.24.4", "@ctrl/tinycolor": "^3.6.1", - "classnames": "^2.2.6", - "copy-to-clipboard": "^3.2.0", - "lodash": "^4.17.21", - "moment": "^2.29.2", - "rc-cascader": "~3.7.3", - "rc-checkbox": "~3.0.1", - "rc-collapse": "~3.4.2", - "rc-dialog": "~9.0.2", - "rc-drawer": "~6.3.0", - "rc-dropdown": "~4.0.1", - "rc-field-form": "~1.38.2", - "rc-image": "~5.13.0", - "rc-input": "~0.1.4", - "rc-input-number": "~7.3.11", - "rc-mentions": "~1.13.1", - "rc-menu": "~9.8.4", + "@rc-component/color-picker": "~1.5.3", + "@rc-component/mutate-observer": "^1.1.0", + "@rc-component/tour": "~1.14.2", + "@rc-component/trigger": "^2.0.0", + "classnames": "^2.5.1", + "copy-to-clipboard": "^3.3.3", + "dayjs": "^1.11.10", + "qrcode.react": "^3.1.0", + "rc-cascader": "~3.24.0", + "rc-checkbox": "~3.2.0", + "rc-collapse": "~3.7.3", + "rc-dialog": "~9.4.0", + "rc-drawer": "~7.1.0", + "rc-dropdown": "~4.2.0", + "rc-field-form": "~1.44.0", + "rc-image": "~7.6.0", + "rc-input": "~1.4.5", + "rc-input-number": "~9.0.0", + "rc-mentions": "~2.11.1", + "rc-menu": "~9.13.0", "rc-motion": "^2.9.0", - "rc-notification": "~4.6.1", - "rc-pagination": "~3.2.0", - "rc-picker": "~2.7.6", - "rc-progress": "~3.4.2", - "rc-rate": "~2.9.3", - "rc-resize-observer": "^1.3.1", + "rc-notification": "~5.4.0", + "rc-pagination": "~4.0.4", + "rc-picker": "~4.3.0", + "rc-progress": "~4.0.0", + "rc-rate": "~2.12.0", + "rc-resize-observer": "^1.4.0", "rc-segmented": "~2.3.0", - "rc-select": "~14.1.18", - "rc-slider": "~10.0.1", - "rc-steps": "~5.0.0", - "rc-switch": "~3.2.2", - "rc-table": "~7.26.0", - "rc-tabs": "~12.5.10", - "rc-textarea": "~0.4.7", - "rc-tooltip": "~5.2.2", - "rc-tree": "~5.7.12", - "rc-tree-select": "~5.5.5", - "rc-trigger": "^5.3.4", - "rc-upload": "~4.3.6", - "rc-util": "^5.37.0", - "scroll-into-view-if-needed": "^2.2.25" + "rc-select": "~14.13.0", + "rc-slider": "~10.5.0", + "rc-steps": "~6.0.1", + "rc-switch": "~4.1.0", + "rc-table": "~7.45.4", + "rc-tabs": "~14.1.1", + "rc-textarea": "~1.6.3", + "rc-tooltip": "~6.2.0", + "rc-tree": "~5.8.5", + "rc-tree-select": "~5.19.0", + "rc-upload": "~4.5.2", + "rc-util": "^5.39.1", + "scroll-into-view-if-needed": "^3.1.0", + "throttle-debounce": "^5.0.0" }, "funding": { "type": "opencollective", @@ -7258,6 +7387,33 @@ "react-dom": ">=16.9.0" } }, + "node_modules/antd/node_modules/@ant-design/colors": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@ant-design/colors/-/colors-7.0.2.tgz", + "integrity": "sha512-7KJkhTiPiLHSu+LmMJnehfJ6242OCxSlR3xHVBecYxnMW8MS/878NXct1GqYARyL59fyeFdKRxXTfvR9SnDgJg==", + "dependencies": { + "@ctrl/tinycolor": "^3.6.1" + } + }, + "node_modules/antd/node_modules/@ant-design/icons": { + "version": "5.3.6", + "resolved": "https://registry.npmjs.org/@ant-design/icons/-/icons-5.3.6.tgz", + "integrity": "sha512-JeWsgNjvkTTC73YDPgWOgdScRku/iHN9JU0qk39OSEmJSCiRghQMLlxGTCY5ovbRRoXjxHXnUKgQEgBDnQfKmA==", + "dependencies": { + "@ant-design/colors": "^7.0.0", + "@ant-design/icons-svg": "^4.4.0", + "@babel/runtime": "^7.11.2", + "classnames": "^2.2.6", + "rc-util": "^5.31.1" + }, + "engines": { + "node": ">=8" + }, + "peerDependencies": { + "react": ">=16.0.0", + "react-dom": ">=16.0.0" + } + }, "node_modules/any-promise": { "version": "1.3.0", "license": "MIT" @@ -9926,8 +10082,9 @@ } }, "node_modules/classnames": { - "version": "2.3.2", - "license": "MIT" + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.5.1.tgz", + "integrity": "sha512-saHYOzhIQs6wy2sVxTM6bUDsQO4F50V9RQ22qBpEdCW+I+/Wmke2HOl6lS6dTpdxVhb88/I6+Hs+438c3lfUow==" }, "node_modules/clean-css": { "version": "5.3.3", @@ -10461,9 +10618,9 @@ } }, "node_modules/compute-scroll-into-view": { - "version": "1.0.20", - "resolved": "https://registry.npmjs.org/compute-scroll-into-view/-/compute-scroll-into-view-1.0.20.tgz", - "integrity": "sha512-UCB0ioiyj8CRjtrvaceBLqqhZCVP+1B8+NWQhmdsm0VXOJtobBCf1dBQmebCCo34qZmUwZfIH2MZLqNHazrfjg==" + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/compute-scroll-into-view/-/compute-scroll-into-view-3.1.0.tgz", + "integrity": "sha512-rj8l8pD4bJ1nx+dAkMhV1xB5RuZEyVysfxJqB1pRchh1KVvwOv9b7CGB8ZfjTImVv2oF+sYMUkMZq6Na5Ftmbg==" }, "node_modules/concat-map": { "version": "0.0.1", @@ -11372,21 +11529,6 @@ "node": ">=12" } }, - "node_modules/date-fns": { - "version": "2.30.0", - "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.30.0.tgz", - "integrity": "sha512-fnULvOpxnC5/Vg3NCiWelDsLiUc9bRwAPs/+LfTLNvetFCtCTN+yQz15C/fs4AwX1R9K5GLtLfn8QW+dWisaAw==", - "dependencies": { - "@babel/runtime": "^7.21.0" - }, - "engines": { - "node": ">=0.11" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/date-fns" - } - }, "node_modules/dateformat": { "version": "3.0.3", "dev": true, @@ -13178,11 +13320,6 @@ "dev": true, "license": "MIT" }, - "node_modules/dom-align": { - "version": "1.12.4", - "resolved": "https://registry.npmjs.org/dom-align/-/dom-align-1.12.4.tgz", - "integrity": "sha512-R8LUSEay/68zE5c8/3BDxiTEvgb4xZTF0RKmAHfiEVN3klfIpXfi2/QCoiWPccVQ0J/ZGdz9OjzL4uJEP/MRAw==" - }, "node_modules/dom-converter": { "version": "0.2.0", "license": "MIT", @@ -25874,7 +26011,8 @@ }, "node_modules/json2mq": { "version": "0.2.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/json2mq/-/json2mq-0.2.0.tgz", + "integrity": "sha512-SzoRg7ux5DWTII9J2qkrZrqV1gt+rTaoufMxEzXbS26Uid0NwaJd123HcoB80TgubEppxxIGdNxCx50fEoEWQA==", "dependencies": { "string-convert": "^0.2.0" } @@ -31369,14 +31507,6 @@ "node": ">=0.10.0" } }, - "node_modules/moment": { - "version": "2.30.1", - "resolved": "https://registry.npmjs.org/moment/-/moment-2.30.1.tgz", - "integrity": "sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how==", - "engines": { - "node": "*" - } - }, "node_modules/mozjpeg": { "version": "7.1.1", "resolved": "https://registry.npmjs.org/mozjpeg/-/mozjpeg-7.1.1.tgz", @@ -53371,6 +53501,14 @@ "teleport": ">=0.2.0" } }, + "node_modules/qrcode.react": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/qrcode.react/-/qrcode.react-3.1.0.tgz", + "integrity": "sha512-oyF+Urr3oAMUG/OiOuONL3HXM+53wvuH3mtIWQrYmsXoAq0DkvZp2RYUWFSMFtbdOpuS++9v+WAkzNVkMlNW6Q==", + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0" + } + }, "node_modules/qs": { "version": "6.5.3", "dev": true, @@ -53510,33 +53648,17 @@ "rc": "cli.js" } }, - "node_modules/rc-align": { - "version": "4.0.15", - "resolved": "https://registry.npmjs.org/rc-align/-/rc-align-4.0.15.tgz", - "integrity": "sha512-wqJtVH60pka/nOX7/IspElA8gjPNQKIx/ZqJ6heATCkXpe1Zg4cPVrMD2vC96wjsFFL8WsmhPbx9tdMo1qqlIA==", - "dependencies": { - "@babel/runtime": "^7.10.1", - "classnames": "2.x", - "dom-align": "^1.7.0", - "rc-util": "^5.26.0", - "resize-observer-polyfill": "^1.5.1" - }, - "peerDependencies": { - "react": ">=16.9.0", - "react-dom": ">=16.9.0" - } - }, "node_modules/rc-cascader": { - "version": "3.7.3", - "resolved": "https://registry.npmjs.org/rc-cascader/-/rc-cascader-3.7.3.tgz", - "integrity": "sha512-KBpT+kzhxDW+hxPiNk4zaKa99+Lie2/8nnI11XF+FIOPl4Bj9VlFZi61GrnWzhLGA7VEN+dTxAkNOjkySDa0dA==", + "version": "3.24.1", + "resolved": "https://registry.npmjs.org/rc-cascader/-/rc-cascader-3.24.1.tgz", + "integrity": "sha512-RgKuYgEGPx+6wCgguYFHjMsDZdCyydZd58YJRCfYQ8FObqLnZW0x/vUcEyPjhWIj1EhjV958IcR+NFPDbbj9kg==", "dependencies": { "@babel/runtime": "^7.12.5", "array-tree-filter": "^2.1.0", "classnames": "^2.3.1", - "rc-select": "~14.1.0", - "rc-tree": "~5.7.0", - "rc-util": "^5.6.1" + "rc-select": "~14.13.0", + "rc-tree": "~5.8.1", + "rc-util": "^5.37.0" }, "peerDependencies": { "react": ">=16.9.0", @@ -53544,9 +53666,9 @@ } }, "node_modules/rc-checkbox": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/rc-checkbox/-/rc-checkbox-3.0.1.tgz", - "integrity": "sha512-k7nxDWxYF+jDI0ZcCvuvj71xONmWRVe5+1MKcERRR9MRyP3tZ69b+yUCSXXh+sik4/Hc9P5wHr2nnUoGS2zBjA==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/rc-checkbox/-/rc-checkbox-3.2.0.tgz", + "integrity": "sha512-8inzw4y9dAhZmv/Ydl59Qdy5tdp9CKg4oPVcRigi+ga/yKPZS5m5SyyQPtYSgbcqHRYOdUhiPSeKfktc76du1A==", "dependencies": { "@babel/runtime": "^7.10.1", "classnames": "^2.3.2", @@ -53558,15 +53680,14 @@ } }, "node_modules/rc-collapse": { - "version": "3.4.2", - "resolved": "https://registry.npmjs.org/rc-collapse/-/rc-collapse-3.4.2.tgz", - "integrity": "sha512-jpTwLgJzkhAgp2Wpi3xmbTbbYExg6fkptL67Uu5LCRVEj6wqmy0DHTjjeynsjOLsppHGHu41t1ELntZ0lEvS/Q==", + "version": "3.7.3", + "resolved": "https://registry.npmjs.org/rc-collapse/-/rc-collapse-3.7.3.tgz", + "integrity": "sha512-60FJcdTRn0X5sELF18TANwtVi7FtModq649H11mYF1jh83DniMoM4MqY627sEKRCTm4+WXfGDcB7hY5oW6xhyw==", "dependencies": { "@babel/runtime": "^7.10.1", "classnames": "2.x", "rc-motion": "^2.3.4", - "rc-util": "^5.2.1", - "shallowequal": "^1.1.0" + "rc-util": "^5.27.0" }, "peerDependencies": { "react": ">=16.9.0", @@ -53574,9 +53695,9 @@ } }, "node_modules/rc-dialog": { - "version": "9.0.2", - "resolved": "https://registry.npmjs.org/rc-dialog/-/rc-dialog-9.0.2.tgz", - "integrity": "sha512-s3U+24xWUuB6Bn2Lk/Qt6rufy+uT+QvWkiFhNBcO9APLxcFFczWamaq7x9h8SCuhfc1nHcW4y8NbMsnAjNnWyg==", + "version": "9.4.0", + "resolved": "https://registry.npmjs.org/rc-dialog/-/rc-dialog-9.4.0.tgz", + "integrity": "sha512-AScCexaLACvf8KZRqCPz12BJ8olszXOS4lKlkMyzDQHS1m0zj1KZMYgmMCh39ee0Dcv8kyrj8mTqxuLyhH+QuQ==", "dependencies": { "@babel/runtime": "^7.10.1", "@rc-component/portal": "^1.0.0-8", @@ -53590,15 +53711,15 @@ } }, "node_modules/rc-drawer": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/rc-drawer/-/rc-drawer-6.3.0.tgz", - "integrity": "sha512-uBZVb3xTAR+dBV53d/bUhTctCw3pwcwJoM7g5aX+7vgwt2zzVzoJ6aqFjYJpBlZ9zp0dVYN8fV+hykFE7c4lig==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/rc-drawer/-/rc-drawer-7.1.0.tgz", + "integrity": "sha512-nBE1rF5iZvpavoyqhSSz2mk/yANltA7g3aF0U45xkx381n3we/RKs9cJfNKp9mSWCedOKWt9FLEwZDaAaOGn2w==", "dependencies": { - "@babel/runtime": "^7.10.1", + "@babel/runtime": "^7.23.9", "@rc-component/portal": "^1.1.1", "classnames": "^2.2.6", "rc-motion": "^2.6.1", - "rc-util": "^5.21.2" + "rc-util": "^5.38.1" }, "peerDependencies": { "react": ">=16.9.0", @@ -53606,13 +53727,13 @@ } }, "node_modules/rc-dropdown": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/rc-dropdown/-/rc-dropdown-4.0.1.tgz", - "integrity": "sha512-OdpXuOcme1rm45cR0Jzgfl1otzmU4vuBVb+etXM8vcaULGokAKVpKlw8p6xzspG7jGd/XxShvq+N3VNEfk/l5g==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/rc-dropdown/-/rc-dropdown-4.2.0.tgz", + "integrity": "sha512-odM8Ove+gSh0zU27DUj5cG1gNKg7mLWBYzB5E4nNLrLwBmYEgYP43vHKDGOVZcJSVElQBI0+jTQgjnq0NfLjng==", "dependencies": { "@babel/runtime": "^7.18.3", + "@rc-component/trigger": "^2.0.0", "classnames": "^2.2.6", - "rc-trigger": "^5.3.1", "rc-util": "^5.17.0" }, "peerDependencies": { @@ -53621,9 +53742,9 @@ } }, "node_modules/rc-field-form": { - "version": "1.38.2", - "resolved": "https://registry.npmjs.org/rc-field-form/-/rc-field-form-1.38.2.tgz", - "integrity": "sha512-O83Oi1qPyEv31Sg+Jwvsj6pXc8uQI2BtIAkURr5lvEYHVggXJhdU/nynK8wY1gbw0qR48k731sN5ON4egRCROA==", + "version": "1.44.0", + "resolved": "https://registry.npmjs.org/rc-field-form/-/rc-field-form-1.44.0.tgz", + "integrity": "sha512-el7w87fyDUsca63Y/s8qJcq9kNkf/J5h+iTdqG5WsSHLH0e6Usl7QuYSmSVzJMgtp40mOVZIY/W/QP9zwrp1FA==", "dependencies": { "@babel/runtime": "^7.18.0", "async-validator": "^4.1.0", @@ -53638,16 +53759,16 @@ } }, "node_modules/rc-image": { - "version": "5.13.0", - "resolved": "https://registry.npmjs.org/rc-image/-/rc-image-5.13.0.tgz", - "integrity": "sha512-iZTOmw5eWo2+gcrJMMcnd7SsxVHl3w5xlyCgsULUdJhJbnuI8i/AL0tVOsE7aLn9VfOh1qgDT3mC2G75/c7mqg==", + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/rc-image/-/rc-image-7.6.0.tgz", + "integrity": "sha512-tL3Rvd1sS+frZQ01i+tkeUPaOeFz2iG9/scAt/Cfs0hyCRVA/w0Pu1J/JxIX8blalvmHE0bZQRYdOmRAzWu4Hg==", "dependencies": { "@babel/runtime": "^7.11.2", "@rc-component/portal": "^1.0.2", "classnames": "^2.2.6", - "rc-dialog": "~9.0.0", + "rc-dialog": "~9.4.0", "rc-motion": "^2.6.2", - "rc-util": "^5.0.6" + "rc-util": "^5.34.1" }, "peerDependencies": { "react": ">=16.9.0", @@ -53655,9 +53776,9 @@ } }, "node_modules/rc-input": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/rc-input/-/rc-input-0.1.4.tgz", - "integrity": "sha512-FqDdNz+fV2dKNgfXzcSLKvC+jEs1709t7nD+WdfjrdSaOcefpgc7BUJYadc3usaING+b7ediMTfKxuJBsEFbXA==", + "version": "1.4.5", + "resolved": "https://registry.npmjs.org/rc-input/-/rc-input-1.4.5.tgz", + "integrity": "sha512-AjzykhwnwYTRSwwgCu70CGKBIAv6bP2nqnFptnNTprph/TF1BAs0Qxl91mie/BR6n827WIJB6ZjaRf9iiMwAfw==", "dependencies": { "@babel/runtime": "^7.11.1", "classnames": "^2.2.1", @@ -53669,13 +53790,15 @@ } }, "node_modules/rc-input-number": { - "version": "7.3.11", - "resolved": "https://registry.npmjs.org/rc-input-number/-/rc-input-number-7.3.11.tgz", - "integrity": "sha512-aMWPEjFeles6PQnMqP5eWpxzsvHm9rh1jQOWXExUEIxhX62Fyl/ptifLHOn17+waDG1T/YUb6flfJbvwRhHrbA==", + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/rc-input-number/-/rc-input-number-9.0.0.tgz", + "integrity": "sha512-RfcDBDdWFFetouWFXBA+WPEC8LzBXyngr9b+yTLVIygfFu7HiLRGn/s/v9wwno94X7KFvnb28FNynMGj9XJlDQ==", "dependencies": { "@babel/runtime": "^7.10.1", + "@rc-component/mini-decimal": "^1.0.1", "classnames": "^2.2.5", - "rc-util": "^5.23.0" + "rc-input": "~1.4.0", + "rc-util": "^5.28.0" }, "peerDependencies": { "react": ">=16.9.0", @@ -53683,16 +53806,17 @@ } }, "node_modules/rc-mentions": { - "version": "1.13.1", - "resolved": "https://registry.npmjs.org/rc-mentions/-/rc-mentions-1.13.1.tgz", - "integrity": "sha512-FCkaWw6JQygtOz0+Vxz/M/NWqrWHB9LwqlY2RtcuFqWJNFK9njijOOzTSsBGANliGufVUzx/xuPHmZPBV0+Hgw==", + "version": "2.11.1", + "resolved": "https://registry.npmjs.org/rc-mentions/-/rc-mentions-2.11.1.tgz", + "integrity": "sha512-upb4AK1SRFql7qGnbLEvJqLMugVVIyjmwBJW9L0eLoN9po4JmJZaBzmKA4089fNtsU8k6l/tdZiVafyooeKnLw==", "dependencies": { - "@babel/runtime": "^7.10.1", + "@babel/runtime": "^7.22.5", + "@rc-component/trigger": "^2.0.0", "classnames": "^2.2.6", - "rc-menu": "~9.8.0", - "rc-textarea": "^0.4.0", - "rc-trigger": "^5.0.4", - "rc-util": "^5.22.5" + "rc-input": "~1.4.0", + "rc-menu": "~9.13.0", + "rc-textarea": "~1.6.1", + "rc-util": "^5.34.1" }, "peerDependencies": { "react": ">=16.9.0", @@ -53700,15 +53824,15 @@ } }, "node_modules/rc-menu": { - "version": "9.8.4", - "resolved": "https://registry.npmjs.org/rc-menu/-/rc-menu-9.8.4.tgz", - "integrity": "sha512-lmw2j8I2fhdIzHmC9ajfImfckt0WDb2KVJJBBRIsxPEw2kGkEfjLMUoB1NgiNT/Q5cC8PdjGOGQjHJIJMwyNMw==", + "version": "9.13.0", + "resolved": "https://registry.npmjs.org/rc-menu/-/rc-menu-9.13.0.tgz", + "integrity": "sha512-1l8ooCB3HcYJKCltC/s7OxRKRjgymdl9htrCeGZcXNaMct0RxZRK6OPV3lPhVksIvAGMgzPd54ClpZ5J4b8cZA==", "dependencies": { "@babel/runtime": "^7.10.1", + "@rc-component/trigger": "^2.0.0", "classnames": "2.x", "rc-motion": "^2.4.3", - "rc-overflow": "^1.2.8", - "rc-trigger": "^5.1.2", + "rc-overflow": "^1.3.1", "rc-util": "^5.27.0" }, "peerDependencies": { @@ -53731,13 +53855,13 @@ } }, "node_modules/rc-notification": { - "version": "4.6.1", - "resolved": "https://registry.npmjs.org/rc-notification/-/rc-notification-4.6.1.tgz", - "integrity": "sha512-NSmFYwrrdY3+un1GvDAJQw62Xi9LNMSsoQyo95tuaYrcad5Bn9gJUL8AREufRxSQAQnr64u3LtP3EUyLYT6bhw==", + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/rc-notification/-/rc-notification-5.4.0.tgz", + "integrity": "sha512-li19y9RoYJciF3WRFvD+DvWS70jdL8Fr+Gfb/OshK+iY6iTkwzoigmSIp76/kWh5tF5i/i9im12X3nsF85GYdA==", "dependencies": { "@babel/runtime": "^7.10.1", "classnames": "2.x", - "rc-motion": "^2.2.0", + "rc-motion": "^2.9.0", "rc-util": "^5.20.1" }, "engines": { @@ -53764,12 +53888,13 @@ } }, "node_modules/rc-pagination": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/rc-pagination/-/rc-pagination-3.2.0.tgz", - "integrity": "sha512-5tIXjB670WwwcAJzAqp2J+cOBS9W3cH/WU1EiYwXljuZ4vtZXKlY2Idq8FZrnYBz8KhN3vwPo9CoV/SJS6SL1w==", + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/rc-pagination/-/rc-pagination-4.0.4.tgz", + "integrity": "sha512-GGrLT4NgG6wgJpT/hHIpL9nELv27A1XbSZzECIuQBQTVSf4xGKxWr6I/jhpRPauYEWEbWVw22ObG6tJQqwJqWQ==", "dependencies": { "@babel/runtime": "^7.10.1", - "classnames": "^2.2.1" + "classnames": "^2.3.2", + "rc-util": "^5.38.0" }, "peerDependencies": { "react": ">=16.9.0", @@ -53777,31 +53902,47 @@ } }, "node_modules/rc-picker": { - "version": "2.7.6", - "resolved": "https://registry.npmjs.org/rc-picker/-/rc-picker-2.7.6.tgz", - "integrity": "sha512-H9if/BUJUZBOhPfWcPeT15JUI3/ntrG9muzERrXDkSoWmDj4yzmBvumozpxYrHwjcKnjyDGAke68d+whWwvhHA==", + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/rc-picker/-/rc-picker-4.3.2.tgz", + "integrity": "sha512-2NtobLxG2YqllXn4YczbupgIH6PSqzjCfFCnGlgPIY9k0HZti8WmBPjS1OD9JKQl+Tdg0pMVUeTEc07y4X9ZRQ==", "dependencies": { "@babel/runtime": "^7.10.1", + "@rc-component/trigger": "^2.0.0", "classnames": "^2.2.1", - "date-fns": "2.x", - "dayjs": "1.x", - "moment": "^2.24.0", - "rc-trigger": "^5.0.4", - "rc-util": "^5.37.0", - "shallowequal": "^1.1.0" + "rc-overflow": "^1.3.2", + "rc-resize-observer": "^1.4.0", + "rc-util": "^5.38.1" }, "engines": { "node": ">=8.x" }, "peerDependencies": { + "date-fns": ">= 2.x", + "dayjs": ">= 1.x", + "luxon": ">= 3.x", + "moment": ">= 2.x", "react": ">=16.9.0", "react-dom": ">=16.9.0" + }, + "peerDependenciesMeta": { + "date-fns": { + "optional": true + }, + "dayjs": { + "optional": true + }, + "luxon": { + "optional": true + }, + "moment": { + "optional": true + } } }, "node_modules/rc-progress": { - "version": "3.4.2", - "resolved": "https://registry.npmjs.org/rc-progress/-/rc-progress-3.4.2.tgz", - "integrity": "sha512-iAGhwWU+tsayP+Jkl9T4+6rHeQTG9kDz8JAHZk4XtQOcYN5fj9H34NXNEdRdZx94VUDHMqCb1yOIvi8eJRh67w==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/rc-progress/-/rc-progress-4.0.0.tgz", + "integrity": "sha512-oofVMMafOCokIUIBnZLNcOZFsABaUw8PPrf1/y0ZBvKZNpOiu5h4AO9vv11Sw0p4Hb3D0yGWuEattcQGtNJ/aw==", "dependencies": { "@babel/runtime": "^7.10.1", "classnames": "^2.2.6", @@ -53813,9 +53954,9 @@ } }, "node_modules/rc-rate": { - "version": "2.9.3", - "resolved": "https://registry.npmjs.org/rc-rate/-/rc-rate-2.9.3.tgz", - "integrity": "sha512-2THssUSnRhtqIouQIIXqsZGzRczvp4WsH4WvGuhiwm+LG2fVpDUJliP9O1zeDOZvYfBE/Bup4SgHun/eCkbjgQ==", + "version": "2.12.0", + "resolved": "https://registry.npmjs.org/rc-rate/-/rc-rate-2.12.0.tgz", + "integrity": "sha512-g092v5iZCdVzbjdn28FzvWebK2IutoVoiTeqoLTj9WM7SjA/gOJIw5/JFZMRyJYYVe1jLAU2UhAfstIpCNRozg==", "dependencies": { "@babel/runtime": "^7.10.1", "classnames": "^2.2.5", @@ -53860,17 +54001,17 @@ } }, "node_modules/rc-select": { - "version": "14.1.18", - "resolved": "https://registry.npmjs.org/rc-select/-/rc-select-14.1.18.tgz", - "integrity": "sha512-4JgY3oG2Yz68ECMUSCON7mtxuJvCSj+LJpHEg/AONaaVBxIIrmI/ZTuMJkyojall/X50YdBe5oMKqHHPNiPzEg==", + "version": "14.13.1", + "resolved": "https://registry.npmjs.org/rc-select/-/rc-select-14.13.1.tgz", + "integrity": "sha512-A1VHqjIOemxLnUGRxLGVqXBs8jGcJemI5NXxOJwU5PQc1wigAu1T4PRLgMkTPDOz8gPhlY9dwsPzMgakMc2QjQ==", "dependencies": { "@babel/runtime": "^7.10.1", + "@rc-component/trigger": "^2.1.1", "classnames": "2.x", "rc-motion": "^2.0.1", - "rc-overflow": "^1.0.0", - "rc-trigger": "^5.0.4", + "rc-overflow": "^1.3.1", "rc-util": "^5.16.1", - "rc-virtual-list": "^3.2.0" + "rc-virtual-list": "^3.5.2" }, "engines": { "node": ">=8.x" @@ -53881,14 +54022,13 @@ } }, "node_modules/rc-slider": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/rc-slider/-/rc-slider-10.0.1.tgz", - "integrity": "sha512-igTKF3zBet7oS/3yNiIlmU8KnZ45npmrmHlUUio8PNbIhzMcsh+oE/r2UD42Y6YD2D/s+kzCQkzQrPD6RY435Q==", + "version": "10.5.0", + "resolved": "https://registry.npmjs.org/rc-slider/-/rc-slider-10.5.0.tgz", + "integrity": "sha512-xiYght50cvoODZYI43v3Ylsqiw14+D7ELsgzR40boDZaya1HFa1Etnv9MDkQE8X/UrXAffwv2AcNAhslgYuDTw==", "dependencies": { "@babel/runtime": "^7.10.1", "classnames": "^2.2.5", - "rc-util": "^5.18.1", - "shallowequal": "^1.1.0" + "rc-util": "^5.27.0" }, "engines": { "node": ">=8.x" @@ -53899,9 +54039,9 @@ } }, "node_modules/rc-steps": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/rc-steps/-/rc-steps-5.0.0.tgz", - "integrity": "sha512-9TgRvnVYirdhbV0C3syJFj9EhCRqoJAsxt4i1rED5o8/ZcSv5TLIYyo4H8MCjLPvbe2R+oBAm/IYBEtC+OS1Rw==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/rc-steps/-/rc-steps-6.0.1.tgz", + "integrity": "sha512-lKHL+Sny0SeHkQKKDJlAjV5oZ8DwCdS2hFhAkIjuQt1/pB81M0cA0ErVFdHq9+jmPmFw1vJB2F5NBzFXLJxV+g==", "dependencies": { "@babel/runtime": "^7.16.7", "classnames": "^2.2.3", @@ -53916,13 +54056,13 @@ } }, "node_modules/rc-switch": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/rc-switch/-/rc-switch-3.2.2.tgz", - "integrity": "sha512-+gUJClsZZzvAHGy1vZfnwySxj+MjLlGRyXKXScrtCTcmiYNPzxDFOxdQ/3pK1Kt/0POvwJ/6ALOR8gwdXGhs+A==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/rc-switch/-/rc-switch-4.1.0.tgz", + "integrity": "sha512-TI8ufP2Az9oEbvyCeVE4+90PDSljGyuwix3fV58p7HV2o4wBnVToEyomJRVyTaZeqNPAp+vqeo4Wnj5u0ZZQBg==", "dependencies": { - "@babel/runtime": "^7.10.1", + "@babel/runtime": "^7.21.0", "classnames": "^2.2.1", - "rc-util": "^5.0.1" + "rc-util": "^5.30.0" }, "peerDependencies": { "react": ">=16.9.0", @@ -53930,15 +54070,16 @@ } }, "node_modules/rc-table": { - "version": "7.26.0", - "resolved": "https://registry.npmjs.org/rc-table/-/rc-table-7.26.0.tgz", - "integrity": "sha512-0cD8e6S+DTGAt5nBZQIPFYEaIukn17sfa5uFL98faHlH/whZzD8ii3dbFL4wmUDEL4BLybhYop+QUfZJ4CPvNQ==", + "version": "7.45.4", + "resolved": "https://registry.npmjs.org/rc-table/-/rc-table-7.45.4.tgz", + "integrity": "sha512-6aSbGrnkN2GLSt3s1x+wa4f3j/VEgg1uKPpaLY5qHH1/nFyreS2V7DFJ0TfUb18allf2FQl7oVYEjTixlBXEyQ==", "dependencies": { "@babel/runtime": "^7.10.1", + "@rc-component/context": "^1.4.0", "classnames": "^2.2.5", "rc-resize-observer": "^1.1.0", - "rc-util": "^5.22.5", - "shallowequal": "^1.1.0" + "rc-util": "^5.37.0", + "rc-virtual-list": "^3.11.1" }, "engines": { "node": ">=8.x" @@ -53949,17 +54090,17 @@ } }, "node_modules/rc-tabs": { - "version": "12.5.10", - "resolved": "https://registry.npmjs.org/rc-tabs/-/rc-tabs-12.5.10.tgz", - "integrity": "sha512-Ay0l0jtd4eXepFH9vWBvinBjqOpqzcsJTerBGwJy435P2S90Uu38q8U/mvc1sxUEVOXX5ZCFbxcWPnfG3dH+tQ==", + "version": "14.1.1", + "resolved": "https://registry.npmjs.org/rc-tabs/-/rc-tabs-14.1.1.tgz", + "integrity": "sha512-5nOr9PVpJy2SWHTLgv1+kESDOb0tFzl0cYU9r9d8LfL0Wg9i/n1B558rmkxdQHgBwMqxmwoyPSAbQROxMQe8nw==", "dependencies": { "@babel/runtime": "^7.11.2", "classnames": "2.x", - "rc-dropdown": "~4.0.0", - "rc-menu": "~9.8.0", + "rc-dropdown": "~4.2.0", + "rc-menu": "~9.13.0", "rc-motion": "^2.6.2", "rc-resize-observer": "^1.0.0", - "rc-util": "^5.16.0" + "rc-util": "^5.34.1" }, "engines": { "node": ">=8.x" @@ -53970,15 +54111,15 @@ } }, "node_modules/rc-textarea": { - "version": "0.4.7", - "resolved": "https://registry.npmjs.org/rc-textarea/-/rc-textarea-0.4.7.tgz", - "integrity": "sha512-IQPd1CDI3mnMlkFyzt2O4gQ2lxUsnBAeJEoZGJnkkXgORNqyM9qovdrCj9NzcRfpHgLdzaEbU3AmobNFGUznwQ==", + "version": "1.6.3", + "resolved": "https://registry.npmjs.org/rc-textarea/-/rc-textarea-1.6.3.tgz", + "integrity": "sha512-8k7+8Y2GJ/cQLiClFMg8kUXOOdvcFQrnGeSchOvI2ZMIVvX5a3zQpLxoODL0HTrvU63fPkRmMuqaEcOF9dQemA==", "dependencies": { "@babel/runtime": "^7.10.1", "classnames": "^2.2.1", + "rc-input": "~1.4.0", "rc-resize-observer": "^1.0.0", - "rc-util": "^5.24.4", - "shallowequal": "^1.1.0" + "rc-util": "^5.27.0" }, "peerDependencies": { "react": ">=16.9.0", @@ -53986,13 +54127,13 @@ } }, "node_modules/rc-tooltip": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/rc-tooltip/-/rc-tooltip-5.2.2.tgz", - "integrity": "sha512-jtQzU/18S6EI3lhSGoDYhPqNpWajMtS5VV/ld1LwyfrDByQpYmw/LW6U7oFXXLukjfDHQ7Ju705A82PRNFWYhg==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/rc-tooltip/-/rc-tooltip-6.2.0.tgz", + "integrity": "sha512-iS/3iOAvtDh9GIx1ulY7EFUXUtktFccNLsARo3NPgLf0QW9oT0w3dA9cYWlhqAKmD+uriEwdWz1kH0Qs4zk2Aw==", "dependencies": { "@babel/runtime": "^7.11.2", - "classnames": "^2.3.1", - "rc-trigger": "^5.0.0" + "@rc-component/trigger": "^2.0.0", + "classnames": "^2.3.1" }, "peerDependencies": { "react": ">=16.9.0", @@ -54000,9 +54141,9 @@ } }, "node_modules/rc-tree": { - "version": "5.7.12", - "resolved": "https://registry.npmjs.org/rc-tree/-/rc-tree-5.7.12.tgz", - "integrity": "sha512-LXA5nY2hG5koIAlHW5sgXgLpOMz+bFRbnZZ+cCg0tQs4Wv1AmY7EDi1SK7iFXhslYockbqUerQan82jljoaItg==", + "version": "5.8.5", + "resolved": "https://registry.npmjs.org/rc-tree/-/rc-tree-5.8.5.tgz", + "integrity": "sha512-PRfcZtVDNkR7oh26RuNe1hpw11c1wfgzwmPFL0lnxGnYefe9lDAO6cg5wJKIAwyXFVt5zHgpjYmaz0CPy1ZtKg==", "dependencies": { "@babel/runtime": "^7.10.1", "classnames": "2.x", @@ -54019,14 +54160,14 @@ } }, "node_modules/rc-tree-select": { - "version": "5.5.5", - "resolved": "https://registry.npmjs.org/rc-tree-select/-/rc-tree-select-5.5.5.tgz", - "integrity": "sha512-k2av7jF6tW9bIO4mQhaVdV4kJ1c54oxV3/hHVU+oD251Gb5JN+m1RbJFTMf1o0rAFqkvto33rxMdpafaGKQRJw==", + "version": "5.19.0", + "resolved": "https://registry.npmjs.org/rc-tree-select/-/rc-tree-select-5.19.0.tgz", + "integrity": "sha512-f4l5EsmSGF3ggj76YTzKNPY9SnXfFaer7ZccTSGb3urUf54L+cCqyT+UsPr+S5TAr8mZSxJ7g3CgkCe+cVQ6sw==", "dependencies": { "@babel/runtime": "^7.10.1", "classnames": "2.x", - "rc-select": "~14.1.0", - "rc-tree": "~5.7.0", + "rc-select": "~14.13.0", + "rc-tree": "~5.8.1", "rc-util": "^5.16.1" }, "peerDependencies": { @@ -54034,29 +54175,10 @@ "react-dom": "*" } }, - "node_modules/rc-trigger": { - "version": "5.3.4", - "resolved": "https://registry.npmjs.org/rc-trigger/-/rc-trigger-5.3.4.tgz", - "integrity": "sha512-mQv+vas0TwKcjAO2izNPkqR4j86OemLRmvL2nOzdP9OWNWA1ivoTt5hzFqYNW9zACwmTezRiN8bttrC7cZzYSw==", - "dependencies": { - "@babel/runtime": "^7.18.3", - "classnames": "^2.2.6", - "rc-align": "^4.0.0", - "rc-motion": "^2.0.0", - "rc-util": "^5.19.2" - }, - "engines": { - "node": ">=8.x" - }, - "peerDependencies": { - "react": ">=16.9.0", - "react-dom": ">=16.9.0" - } - }, "node_modules/rc-upload": { - "version": "4.3.6", - "resolved": "https://registry.npmjs.org/rc-upload/-/rc-upload-4.3.6.tgz", - "integrity": "sha512-Bt7ESeG5tT3IY82fZcP+s0tQU2xmo1W6P3S8NboUUliquJLQYLkUcsaExi3IlBVr43GQMCjo30RA2o0i70+NjA==", + "version": "4.5.2", + "resolved": "https://registry.npmjs.org/rc-upload/-/rc-upload-4.5.2.tgz", + "integrity": "sha512-QO3ne77DwnAPKFn0bA5qJM81QBjQi0e0NHdkvpFyY73Bea2NfITiotqJqVjHgeYPOJu5lLVR32TNGP084aSoXA==", "dependencies": { "@babel/runtime": "^7.18.3", "classnames": "^2.2.5", @@ -55794,7 +55916,8 @@ }, "node_modules/resize-observer-polyfill": { "version": "1.5.1", - "license": "MIT" + "resolved": "https://registry.npmjs.org/resize-observer-polyfill/-/resize-observer-polyfill-1.5.1.tgz", + "integrity": "sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg==" }, "node_modules/resolve": { "version": "1.22.8", @@ -56295,11 +56418,11 @@ } }, "node_modules/scroll-into-view-if-needed": { - "version": "2.2.31", - "resolved": "https://registry.npmjs.org/scroll-into-view-if-needed/-/scroll-into-view-if-needed-2.2.31.tgz", - "integrity": "sha512-dGCXy99wZQivjmjIqihaBQNjryrz5rueJY7eHfTdyWEiR4ttYpsajb14rn9s5d4DY4EcY6+4+U/maARBXJedkA==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/scroll-into-view-if-needed/-/scroll-into-view-if-needed-3.1.0.tgz", + "integrity": "sha512-49oNpRjWRvnU8NyGVmUaYG4jtTkNonFZI86MmGRDqBphEK2EXT9gdEUoQPZhuBM8yWHxCWbobltqYO5M4XrUvQ==", "dependencies": { - "compute-scroll-into-view": "^1.0.20" + "compute-scroll-into-view": "^3.0.2" } }, "node_modules/search-insights": { @@ -60998,7 +61121,8 @@ }, "node_modules/string-convert": { "version": "0.2.1", - "license": "MIT" + "resolved": "https://registry.npmjs.org/string-convert/-/string-convert-0.2.1.tgz", + "integrity": "sha512-u/1tdPl4yQnPBjnVrmdLo9gtuLvELKsAoRapekWggdiQNvvvum+jYF329d84NAa660KQw7pB2n36KrIKVoXa3A==" }, "node_modules/string-length": { "version": "4.0.2", @@ -61325,6 +61449,11 @@ "postcss": "^8.2.15" } }, + "node_modules/stylis": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/stylis/-/stylis-4.3.1.tgz", + "integrity": "sha512-EQepAV+wMsIaGVGX1RECzgrcqRRU/0sYOHkeLsZ3fzHaHXZy4DaOOX0vOlGQdlsjkh3mFHAIlVimpwAs4dslyQ==" + }, "node_modules/stylus": { "version": "0.59.0", "dev": true, @@ -62265,7 +62394,8 @@ }, "node_modules/throttle-debounce": { "version": "5.0.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/throttle-debounce/-/throttle-debounce-5.0.0.tgz", + "integrity": "sha512-2iQTSgkkc1Zyk0MeVrt/3BvuOXYPl/R8Z0U2xxo9rjwNciaHDG3R+Lm6dh4EeUci49DanvBnuqI6jshoQQRGEg==", "engines": { "node": ">=12.22" } diff --git a/package.json b/package.json index 094fc58ef7..37bdac5e2c 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "@fortawesome/free-solid-svg-icons": "^6.4.0", "@fortawesome/react-fontawesome": "^0.2.0", "@mdx-js/react": "^3.0.0", - "antd": "^4.22.6", + "antd": "^5.6.2", "axios-retry": "^3.8.0", "babel-plugin-macros": "^3.1.0", "clsx": "^1.2.1", From e222d9dfd42a9bcce437a26cb6ddffcb03f2e668 Mon Sep 17 00:00:00 2001 From: nage1234 <88926279+nage1234@users.noreply.github.com> Date: Mon, 15 Apr 2024 11:16:45 +0530 Subject: [PATCH 09/23] search support added --- src/components/Technologies/Technologies.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/components/Technologies/Technologies.tsx b/src/components/Technologies/Technologies.tsx index fd2f0b79cb..01e46b388d 100644 --- a/src/components/Technologies/Technologies.tsx +++ b/src/components/Technologies/Technologies.tsx @@ -12,7 +12,7 @@ import IconMapper from "../IconMapper/IconMapper"; const searchOptions = { threshold: 0.5, - keys: ["fields.title"], + keys: ["title"], }; interface TechnologiesProps { @@ -67,8 +67,13 @@ export default function Technologies({ data }: TechnologiesProps) { return selectedFilters.category.includes(category as never); }); } + categoryKeys.forEach((category) => { let filteredTechCards = categories.get(category); + if (searchValue) { + const fuse = new Fuse(filteredTechCards, searchOptions); + filteredTechCards = fuse.search(searchValue).map(({ item }) => item); + } if (selectedFilters.provider) { filteredTechCards = filteredTechCards.filter((techCard: FrontMatterData) => { return techCard.cloudTypes.includes("all") || techCard.cloudTypes.includes(selectedFilters.provider); From 93355b8ae3a1f4e53b43c73914ba7d7e9feded4f Mon Sep 17 00:00:00 2001 From: nage1234 <88926279+nage1234@users.noreply.github.com> Date: Mon, 15 Apr 2024 21:50:06 +0530 Subject: [PATCH 10/23] addressed few review comments --- package-lock.json | 9 ++ package.json | 1 + plugins/packs-integrations.js | 83 +++++++++---------- src/components/PacksReadme/PacksReadme.tsx | 4 +- src/components/Technologies/PacksFilters.tsx | 10 +-- .../Technologies/Technologies.module.scss | 1 + src/components/Technologies/Technologies.tsx | 20 ++--- .../Technologies/TechnologyCard.tsx | 4 +- src/services/api/index.js | 15 +++- 9 files changed, 82 insertions(+), 65 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9c3a82d25b..df38d928a9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -30,6 +30,7 @@ "docusaurus-theme-openapi-docs": "^3.0.0-beta.3", "fuse.js": "^6.6.2", "markdown-to-jsx": "^7.0.0", + "p-ratelimit": "^1.0.1", "prism-react-renderer": "^2.1.0", "react": "^18.2.0", "react-dom": "^18.2.0", @@ -51838,6 +51839,14 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/p-ratelimit": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/p-ratelimit/-/p-ratelimit-1.0.1.tgz", + "integrity": "sha512-tKBGoow6aWRH68K2eQx+qc1gSegjd5VLirZYc1Yms9pPFsYQ9TFI6aMn0vJH2vmvzjNpjlWZOFft4aPUen2w0A==", + "engines": { + "node": ">=10.23.0" + } + }, "node_modules/p-reduce": { "version": "2.1.0", "dev": true, diff --git a/package.json b/package.json index 37bdac5e2c..71a2f6c57b 100644 --- a/package.json +++ b/package.json @@ -56,6 +56,7 @@ "docusaurus-theme-openapi-docs": "^3.0.0-beta.3", "fuse.js": "^6.6.2", "markdown-to-jsx": "^7.0.0", + "p-ratelimit":"^1.0.1", "prism-react-renderer": "^2.1.0", "react": "^18.2.0", "react-dom": "^18.2.0", diff --git a/plugins/packs-integrations.js b/plugins/packs-integrations.js index c13a07a8fa..157a92ceed 100644 --- a/plugins/packs-integrations.js +++ b/plugins/packs-integrations.js @@ -1,4 +1,4 @@ -const api = require("../src/services/api"); +const { api, callRateLimitAPI } = require("../src/services/api"); const { setTimeout } = require("timers/promises"); const { packTypeNames, addOnTypes, layerTypes } = require("../src/components/Technologies/PackConstants"); const packDescription = require("../static/packs-data/packs_information.json"); @@ -17,7 +17,7 @@ function generateIntegrationData(allContent) { function getReadMeMap(packValues) { const generatedReadMeData = packValues.reduce((packValuesMap, packValue) => - Object.assign(packValuesMap, {[packValue.packUid]: packValue.readme}), {}); + Object.assign(packValuesMap, { [packValue.packUid]: packValue.readme }), {}); return generatedReadMeData; } @@ -117,32 +117,32 @@ function getAggregatedVersions(tags, packValues, packName, layer) { packUid: version.packUid, }; }); - _sortedVersions.forEach((version) => { - const parentTags = version?.parentTags || []; - const parent = parentTags.find(matchAmbiguousPatch); - - if (!parent) return; - - const parentVersion = roots.find( - (rootVersion) => rootVersion.title === parent - ); - - if (parentVersion) { - parentVersion.children = parentVersion.children || []; - parentVersion.children.push({ - title: version.tag, - value: version.version, - packUid: version.packUid, - }); - } - }); + _sortedVersions.forEach((version) => { + const parentTags = version?.parentTags || []; + const parent = parentTags.find(matchAmbiguousPatch); + + if (!parent) return; + + const parentVersion = roots.find( + (rootVersion) => rootVersion.title === parent + ); + + if (parentVersion) { + parentVersion.children = parentVersion.children || []; + parentVersion.children.push({ + title: version.tag, + value: version.version, + packUid: version.packUid, + }); + } + }); return roots; } function generateCustomData(packsDescription) { const generatedCustomData = packsDescription.reduce((obj, desc) => - Object.assign(obj, {[desc.name]: desc.description}), {}); - console.log("completed custom data description generation"); + Object.assign(obj, { [desc.name]: desc.description }), {}); + console.info("completed custom data description generation"); return generatedCustomData; } @@ -161,15 +161,15 @@ function generateRoutes(packDataMap, packsData) { } async function fetchPackListItems(queryParams, packDataArr, counter) { - const payload = {filter: { type: ["spectro", "oci"], environment:["aws"] }}; - counter+=1; - if(counter%10 === 0) { + const payload = { filter: { type: ["spectro", "oci"]} }; + counter += 1; + if (counter % 10 === 0) { await setTimeout(2000); } - const response = await api.post('/v1/packs/search'+queryParams, payload); + const response = await api.post('/v1/packs/search' + queryParams, payload); const tempPackArr = packDataArr.concat(response.data.items); - if(response.data.listmeta.continue) { - return fetchPackListItems("?limit=100&continue="+response.data.listmeta.continue, tempPackArr, counter); + if (response.data.listmeta.continue) { + return fetchPackListItems("?limit=100&continue=" + response.data.listmeta.continue, tempPackArr, counter); } else { return tempPackArr; } @@ -180,33 +180,26 @@ async function pluginPacksAndIntegrationsData() { name: "plugin-packs-integrations", async loadContent() { let packDataArr = await fetchPackListItems("?limit=100", [], 0); - console.log("completed the fetch of all the names of the pack") + console.info("completed the fetch of all the names of the pack") packDataArr = packDataArr.filter((pack) => { return layerTypes.includes(pack.spec.layer) || (pack.spec.layer === "addon" && addOnTypes.includes(pack.spec.addonType)); }) const packUrl = "v1/packs/"; const packMDMap = new Map(); let apiPacksData = []; - let counter = 0; let promises = new Array(); for (let i = 0; i < packDataArr.length; i++) { const packData = packDataArr[i]; - if(packData.spec.registries.length) { - counter+=1 - packMDMap[packData.spec.name]=packData; + if (packData.spec.registries.length) { + packMDMap[packData.spec.name] = packData; const cloudType = packData.spec.cloudTypes.includes("all") ? "aws" : packData.spec.cloudTypes[0]; - promises.push(api.get(`${packUrl}${packData.spec.name}/registries/${packData.spec.registries[0].uid}?cloudType=${cloudType}&layer=${packData.spec.layer}`)); - if(counter%10 === 0 || i === packDataArr.length-1) { - await setTimeout(2000); - const results = await Promise.all(promises.map(p => p.catch(e => e))); - const validResults = results.filter(result => !(result instanceof Error)); - apiPacksData = apiPacksData.concat(validResults.map((pack) => pack.data)); - promises = []; - } + promises.push(`${packUrl}${packData.spec.name}/registries/${packData.spec.registries[0].uid}?cloudType=${cloudType}&layer=${packData.spec.layer}`); } } - console.log("completed the fetch of all the pack details"); - return {packsPaletteData: packMDMap, packsPaletteDetailsData: apiPacksData, packsDescription: packDescription} ; + const results = await callRateLimitAPI(promises); + apiPacksData = results.filter(result => result.status === "fulfilled" && result.value?.data).map((pack) => pack.value?.data); + console.info("completed the fetch of all the pack details"); + return { packsPaletteData: packMDMap, packsPaletteDetailsData: apiPacksData, packsDescription: packDescription }; }, async contentLoaded({ allContent, content, actions }) { const { setGlobalData, addRoute } = actions; @@ -215,7 +208,7 @@ async function pluginPacksAndIntegrationsData() { const customPacksData = generateCustomData(packsDescription); const unionPackData = combineAPICustomPackData(packsPaletteData, packsPaletteDetailsData, customPacksData); const routes = generateRoutes(packsPaletteData, unionPackData); - console.log("completed the generation of the routes"); + console.info("completed the generation of the routes"); routes.map(route => addRoute(route)); setGlobalData({ integrations: integrationsData, packs: unionPackData }); }, diff --git a/src/components/PacksReadme/PacksReadme.tsx b/src/components/PacksReadme/PacksReadme.tsx index a472eb5d45..8cc42a777e 100644 --- a/src/components/PacksReadme/PacksReadme.tsx +++ b/src/components/PacksReadme/PacksReadme.tsx @@ -76,7 +76,7 @@ export default function PacksReadme() { return ( {_version.title} ) - }); + }); } function versionSupportedTextRender() { @@ -149,7 +149,7 @@ export default function PacksReadme() { allowClear placeholder="Search" onChange={(item) => versionChange(item as string)} - value={selectedVersion === packData.versions[0].title ? `${selectedVersion} (latest)` : selectedVersion} + value={selectedVersion === packData.versions[0]?.title ? `${selectedVersion} (latest)` : selectedVersion} > {getOptions()} diff --git a/src/components/Technologies/PacksFilters.tsx b/src/components/Technologies/PacksFilters.tsx index 03b4f87202..c5fba5ed11 100644 --- a/src/components/Technologies/PacksFilters.tsx +++ b/src/components/Technologies/PacksFilters.tsx @@ -6,20 +6,20 @@ import CustomLabel from "./CategorySelector/CustomLabel"; import AdditionalFilters from "./CategorySelector/AdditionalFilters"; interface PackFiltersProps { categories: string[]; - selectedFilters: { category: string[], provider: string, additionalFilters: string[]}; + selectedFilters: { category: string[], provider: string, additionalFilters: string[] }; setSelectedSearchFilters: (...args: any[]) => void; } export default function PacksFilters({ categories, selectedFilters, setSelectedSearchFilters }: PackFiltersProps) { function setSelectedCategory(category: string[]) { - setSelectedSearchFilters({category: category}); + setSelectedSearchFilters({ category: category }); console.log("category", category); } function setSelectedProvider(provider: string) { - setSelectedSearchFilters({provider: provider}); + setSelectedSearchFilters({ provider: provider }); console.log("provider", provider); } function selectAdditionalFilters(additionalFilters: string[]) { - setSelectedSearchFilters({additionalFilters: additionalFilters}); + setSelectedSearchFilters({ additionalFilters: additionalFilters }); console.log("additionalFilters", additionalFilters); } return ( @@ -33,7 +33,7 @@ export default function PacksFilters({ categories, selectedFilters, setSelectedS
- +
); diff --git a/src/components/Technologies/Technologies.module.scss b/src/components/Technologies/Technologies.module.scss index 5dee3eb926..89057f21e6 100644 --- a/src/components/Technologies/Technologies.module.scss +++ b/src/components/Technologies/Technologies.module.scss @@ -31,6 +31,7 @@ 0px 0px 2px rgba(0, 0, 0, 0.2), 0px 2px 0px rgba(0, 0, 0, 0.2); border-radius: 8px; + cursor: pointer; } .title { diff --git a/src/components/Technologies/Technologies.tsx b/src/components/Technologies/Technologies.tsx index 01e46b388d..ef4d761f0b 100644 --- a/src/components/Technologies/Technologies.tsx +++ b/src/components/Technologies/Technologies.tsx @@ -20,27 +20,27 @@ interface TechnologiesProps { } export default function Technologies({ data }: TechnologiesProps) { - const [selectedFilters, setSelectedFilters] = useState<{category: string[], provider: string, additionalFilters: string[]}>({category: [], provider: "", additionalFilters: []}) + const [selectedFilters, setSelectedFilters] = useState<{ category: string[], provider: string, additionalFilters: string[] }>({ category: [], provider: "", additionalFilters: [] }) const [searchValue, setSearchValue] = useState(""); const categories = useMemo(() => { - const categoriesMap = new Map(); - data.forEach((technology) => { - const key = technology.fields.packType; - if (categoriesMap.has(key)){ - categoriesMap.get(key).push(technology.fields); + const categoriesMap = data.reduce((acc: Map, technology: PacksData | IntegrationsData) => { + let packType = technology.fields.packType; + if (acc.has(packType)) { + acc.get(packType).push(technology.fields); } else { - categoriesMap.set(key, new Array(technology.fields)); + acc.set(packType, [technology.fields]); } - }); + return acc; + }, new Map()); const sortedCategoriesMap = new Map([...categoriesMap.entries()].sort()); const categoryKeys = Array.from(sortedCategoriesMap.keys()); categoryKeys.forEach((category) => { const fields = sortedCategoriesMap.get(category); fields.sort((field1: any, field2: any) => { - if (field1.name > field2.name){ + if (field1.name > field2.name) { return 1; - } else if (field1.name < field2.name){ + } else if (field1.name < field2.name) { return -1; } else { return 0; diff --git a/src/components/Technologies/TechnologyCard.tsx b/src/components/Technologies/TechnologyCard.tsx index f0b8316ef7..e80ac27903 100644 --- a/src/components/Technologies/TechnologyCard.tsx +++ b/src/components/Technologies/TechnologyCard.tsx @@ -23,8 +23,8 @@ export default function TechnologyCard({ name, title, logoUrl, type }: Technolog }; return ( -
handleClick()}> - +
handleClick()}> +
{title}
); diff --git a/src/services/api/index.js b/src/services/api/index.js index c61ca5f062..520e361571 100644 --- a/src/services/api/index.js +++ b/src/services/api/index.js @@ -1,5 +1,6 @@ import axios from 'axios'; import axiosRetry from 'axios-retry'; +import { pRateLimit } from 'p-ratelimit'; const api = axios.create({ baseURL: 'https://dev.spectrocloud.com', @@ -10,6 +11,12 @@ const api = axios.create({ } }); +const limit = pRateLimit({ + interval: 2000, // 1000 ms == 1 second + rate: 10, // 30 API calls per interval + concurrency: 10, // no more than 10 running at once +}); + axiosRetry(api, { retries: 3, retryDelay: (...arg) => axiosRetry.exponentialDelay(...arg, 1000), @@ -27,4 +34,10 @@ axiosRetry(api, { }); -module.exports = api; +function callRateLimitAPI(urls) { + return Promise.allSettled( + urls.map(url => limit(() => (api.get(url)).catch(e => e))) + ); +} + +module.exports = { api, callRateLimitAPI }; From 369e37ee4d45b1554f5e564f4ab564761e0eb36f Mon Sep 17 00:00:00 2001 From: nage1234 <88926279+nage1234@users.noreply.github.com> Date: Tue, 16 Apr 2024 21:55:23 +0530 Subject: [PATCH 11/23] fixed broken search, moved the filtering logic to memo --- src/components/Technologies/Search/Search.tsx | 5 +- src/components/Technologies/Technologies.tsx | 61 +++++++++++-------- 2 files changed, 40 insertions(+), 26 deletions(-) diff --git a/src/components/Technologies/Search/Search.tsx b/src/components/Technologies/Search/Search.tsx index c471eaa8c2..fb6fc3f0d6 100644 --- a/src/components/Technologies/Search/Search.tsx +++ b/src/components/Technologies/Search/Search.tsx @@ -4,7 +4,7 @@ import styles from "./Search.module.scss"; import { faSearch, faTimes } from "@fortawesome/free-solid-svg-icons"; interface IntegrationSearchProps { - onSearch: (searchString: React.ChangeEvent) => void; + onSearch: (searchString: string) => void; placeholder: string; } @@ -22,7 +22,7 @@ export default function IntegrationSearch({ onSearch, placeholder }: Integration value={inputValue} onChange={(e) => { setInputValue(e.target.value); - onSearch(e); + onSearch(e.target.value); }} /> { setInputValue(""); + onSearch(""); ref.current?.focus(); }} /> diff --git a/src/components/Technologies/Technologies.tsx b/src/components/Technologies/Technologies.tsx index ef4d761f0b..78a06a3d22 100644 --- a/src/components/Technologies/Technologies.tsx +++ b/src/components/Technologies/Technologies.tsx @@ -50,52 +50,65 @@ export default function Technologies({ data }: TechnologiesProps) { return sortedCategoriesMap; }, [data]); - const onSearch = (event: React.ChangeEvent) => { - setSearchValue(event.target.value); - }; - const renderPacks = (fields: FrontMatterData[]) => { - return fields.map((field) => { - const { title, logoUrl, packType, name } = field; - return ; - }); - }; - const renderPacksCategories = () => { + const filteredTechCards = useMemo(() => { let categoryKeys: string[] = Array.from(categories.keys()); - const categoryItems: JSX.Element[] = []; if (selectedFilters.category.length > 0) { categoryKeys = categoryKeys.filter((category: string) => { - return selectedFilters.category.includes(category as never); + return selectedFilters.category.includes(category); }); } - + const selectedCategoryItems = new Map(); categoryKeys.forEach((category) => { - let filteredTechCards = categories.get(category); + let filteredCards = categories.get(category); if (searchValue) { - const fuse = new Fuse(filteredTechCards, searchOptions); - filteredTechCards = fuse.search(searchValue).map(({ item }) => item); + const fuse = new Fuse(filteredCards, searchOptions); + filteredCards = fuse.search(searchValue).map(({ item }) => item); } if (selectedFilters.provider) { - filteredTechCards = filteredTechCards.filter((techCard: FrontMatterData) => { + filteredCards = filteredCards.filter((techCard: FrontMatterData) => { return techCard.cloudTypes.includes("all") || techCard.cloudTypes.includes(selectedFilters.provider); }); } if (selectedFilters.additionalFilters?.length && selectedFilters.additionalFilters.includes("Verified")) { - filteredTechCards = filteredTechCards.filter((techCard: FrontMatterData) => { + filteredCards = filteredCards.filter((techCard: FrontMatterData) => { return techCard.verified; - }); + }) as FrontMatterData[]; } if (selectedFilters.additionalFilters?.length && selectedFilters.additionalFilters.includes("Community")) { - filteredTechCards = filteredTechCards.filter((techCard: FrontMatterData) => { + filteredCards = filteredCards.filter((techCard: FrontMatterData) => { return techCard.community; }); } - if (filteredTechCards.length) { - const obj = ({renderPacks(filteredTechCards)}) - categoryItems.push(obj); + selectedCategoryItems.set(category, filteredCards); + }); + if (!selectedFilters.category.length && !selectedFilters.provider && !selectedFilters.additionalFilters.length && !searchValue) { + return categories; + } else { + return selectedCategoryItems; + } + }, [data, selectedFilters, searchValue]); + + const onSearch = (value: string) => { + setSearchValue(value); + }; + const renderPacks = (fields: FrontMatterData[]) => { + return fields.map((field) => { + const { title, logoUrl, packType, name } = field; + return ; + }); + }; + const renderPacksCategories = () => { + const renderedCategoryItems: React.ReactNode[] = []; + let categoryKeys: string[] = Array.from(filteredTechCards.keys()); + categoryKeys.forEach((category) => { + const categoryItems = filteredTechCards.get(category); + if (categoryItems.length) { + const obj = ({renderPacks(categoryItems)}) + renderedCategoryItems.push(obj); } }); - return categoryItems; + return renderedCategoryItems; }; function addPanelHeader(category: string) { return ( From 71ad8d639de1a61b285529b7b540f3729fc026e5 Mon Sep 17 00:00:00 2001 From: nage1234 <88926279+nage1234@users.noreply.github.com> Date: Tue, 16 Apr 2024 21:59:46 +0530 Subject: [PATCH 12/23] formatted the doc --- src/components/PacksInformation/PacksInformation.tsx | 6 +++--- src/components/PacksReadme/PacksReadme.tsx | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/components/PacksInformation/PacksInformation.tsx b/src/components/PacksInformation/PacksInformation.tsx index a32f600e19..b2645a8402 100644 --- a/src/components/PacksInformation/PacksInformation.tsx +++ b/src/components/PacksInformation/PacksInformation.tsx @@ -3,15 +3,15 @@ import { useLocation } from 'react-router-dom'; import PacksReadme from "@site/src/components/PacksReadme"; import { Switch, useRouteMatch, Redirect } from 'react-router-dom' -export default function Packs(props:any) { +export default function Packs(props: any) { let match = useRouteMatch(); const location = useLocation(); const packName = location?.state?.id; return ( <> - { props?.route?.data ? + {props?.route?.data ? ( - + ) : ( ) diff --git a/src/components/PacksReadme/PacksReadme.tsx b/src/components/PacksReadme/PacksReadme.tsx index 8cc42a777e..2fd0f7aae9 100644 --- a/src/components/PacksReadme/PacksReadme.tsx +++ b/src/components/PacksReadme/PacksReadme.tsx @@ -29,7 +29,6 @@ export default function PacksReadme() { useEffect(() => { const importComponent = async () => { try { - console.log("packName", packName); const module = await import(`../../../docs/docs-content/integrations/${packName}.md`); const PackReadMeComponent = module.default; setMd(); From 0243674adc76df357b21a511205e23a77e26b43d Mon Sep 17 00:00:00 2001 From: nage1234 <88926279+nage1234@users.noreply.github.com> Date: Wed, 17 Apr 2024 22:10:43 +0530 Subject: [PATCH 13/23] fixed dark mode Ant components, added empty content packs --- .../PacksReadme/PacksReadme.module.scss | 37 ++++-- src/components/PacksReadme/PacksReadme.tsx | 105 +++++++++--------- .../CategorySelector/CustomLabel.module.scss | 4 + .../CategorySelector/CustomLabel.tsx | 2 +- .../CategorySelector/TypeSelector.tsx | 4 +- .../additionalFilters.antd.css | 15 +++ src/components/Technologies/PackCardIcon.tsx | 4 +- src/components/Technologies/PacksFilters.tsx | 3 - src/components/Technologies/Technologies.tsx | 25 +++-- .../Technologies/TechnologyCard.tsx | 4 - .../Technologies/technologies.antd.css | 4 + static/img/empty_icon_table_dark.svg | 28 +++++ static/img/empty_icon_table_light.svg | 28 +++++ 13 files changed, 181 insertions(+), 82 deletions(-) create mode 100644 static/img/empty_icon_table_dark.svg create mode 100644 static/img/empty_icon_table_light.svg diff --git a/src/components/PacksReadme/PacksReadme.module.scss b/src/components/PacksReadme/PacksReadme.module.scss index ccdec01983..c5c42ea112 100644 --- a/src/components/PacksReadme/PacksReadme.module.scss +++ b/src/components/PacksReadme/PacksReadme.module.scss @@ -4,19 +4,40 @@ align-items: center; justify-content: center; padding: 20px; - .versionsection { - align-self: start; - } - .bullets::before { - content: "•"; - padding-right: 8px; - font-size: 20px; - font-weight: bold; + .emptyContent { + padding-top: 20px; + display: flex; + flex-direction: column; + text-align: center; + .emptyContentTitle { + font-size: 20px; + color: #545f7e; + font-weight: 500; + line-height: 24px; + html[data-theme="dark"] & { + color: #b5bdd4; + background-color: #111726; + } + } + .emptyContentDescription { + font-size: 16px; + color: #545f7e; + font-weight: 400; + line-height: 24px; + html[data-theme="dark"] & { + color: #b5bdd4; + background-color: #111726; + } + margin-top: 10px; + } } .description { display: flex; width: 100%; background-color: #edeef4; + html[data-theme="dark"] & { + background-color: #1c202b; + } flex-direction: column; padding: 10px; .packdescfirstrow { diff --git a/src/components/PacksReadme/PacksReadme.tsx b/src/components/PacksReadme/PacksReadme.tsx index 2fd0f7aae9..0502585994 100644 --- a/src/components/PacksReadme/PacksReadme.tsx +++ b/src/components/PacksReadme/PacksReadme.tsx @@ -1,18 +1,16 @@ -import React, { useEffect, useState, useMemo, lazy, Suspense, ReactElement } from "react"; -import { IntegrationsData, PacksData } from "../Integrations/IntegrationTypes"; +import React, { useEffect, useState, useMemo, ReactElement } from "react"; import styles from "./PacksReadme.module.scss"; -import { Select, List, Tabs } from "antd"; +import { Select, Tabs, ConfigProvider, theme } from "antd"; import CustomLabel from "../Technologies/CategorySelector/CustomLabel"; import PackCardIcon from "../Technologies/PackCardIcon"; import Markdown from 'markdown-to-jsx'; import "./PacksReadme.antd.css"; import { usePluginData } from "@docusaurus/useGlobalData"; import PacksIntegrationsPluginData from "../Integrations/IntegrationTypes"; +import ThemedImage from '@theme/ThemedImage'; +import useBaseUrl from "@docusaurus/useBaseUrl" +import { useColorMode } from "@docusaurus/theme-common"; - -interface TechnologiesProps { - data: PacksData | IntegrationsData; -} interface PackReadmeProps { customDescription: string, packReadme: any, @@ -25,6 +23,10 @@ interface PackReadmeProps { export default function PacksReadme() { const [selectedVersion, setSelectedVersion] = useState(""); const [md, setMd] = useState | null>(null); + const empty_icon_light = useBaseUrl('/img/empty_icon_table_light.svg'); + const empty_icon_dark = useBaseUrl('/img/empty_icon_table_dark.svg'); + const { isDarkTheme } = useColorMode(); + const { defaultAlgorithm, darkAlgorithm } = theme; const packName = new URLSearchParams(window.location.search).get("pack") useEffect(() => { const importComponent = async () => { @@ -42,7 +44,6 @@ export default function PacksReadme() { const packData = useMemo(() => { const { packs } = usePluginData("plugin-packs-integrations") as PacksIntegrationsPluginData; - const _packData = packs.filter((pack) => pack.fields.name === packName)[0]; if (_packData) { setSelectedVersion(`${_packData.fields.versions[0].title}`); @@ -78,25 +79,6 @@ export default function PacksReadme() { }); } - function versionSupportedTextRender() { - if (selectedVersion) { - const listVersion = packData.versions?.find((ver) => ver.title === selectedVersion); - if (listVersion) { - return ( - <> - Versions Supported
} - dataSource={listVersion.children} - renderItem={(child: any) =>
{child.title}
} - /> - - ) - } - } - return null; - } - function renderTabs() { let readme = ""; if (Object.keys(packData.packReadme).length && md) { @@ -125,46 +107,61 @@ export default function PacksReadme() { ) })} - ) + ); } else if (Object.keys(packData.packReadme).length) { const packUid = packData.versions.find((ver) => ver.title === selectedVersion)?.packUid; readme = packUid ? packData.packReadme[packUid as keyof string] : ""; - return () + return (); } else if (md) { return md; } else { - return null; + return renderEmptyContent(); } - + } + function renderEmptyContent() { + return ( +
+ +
No content available
+
The content for this pack is not available.
+
+ ); } return (
-
-
-
{packName}
-
- - + +
+
+
{packName}
+
+ + +
+
+
+ +
{packData.customDescription}
-
- -
{packData.customDescription}
+
+ {renderTabs()}
-
-
- {versionSupportedTextRender()} -
-
- {renderTabs()} -
+
); } diff --git a/src/components/Technologies/CategorySelector/CustomLabel.module.scss b/src/components/Technologies/CategorySelector/CustomLabel.module.scss index bbf834a581..511a015d6c 100644 --- a/src/components/Technologies/CategorySelector/CustomLabel.module.scss +++ b/src/components/Technologies/CategorySelector/CustomLabel.module.scss @@ -1,6 +1,10 @@ .customLabel { font-size: 14px; background-color: #dee1ea; + html[data-theme="dark"] & { + color: white; + background-color: #1c202b; + } height: 32px; align-self: center; padding-top: 5px; diff --git a/src/components/Technologies/CategorySelector/CustomLabel.tsx b/src/components/Technologies/CategorySelector/CustomLabel.tsx index b7ec114277..17be4e5afe 100644 --- a/src/components/Technologies/CategorySelector/CustomLabel.tsx +++ b/src/components/Technologies/CategorySelector/CustomLabel.tsx @@ -12,7 +12,7 @@ export default function CustomLabel({ label, className = "" }: CustomLabelProps) return ( <>
- {label} + {label}
); diff --git a/src/components/Technologies/CategorySelector/TypeSelector.tsx b/src/components/Technologies/CategorySelector/TypeSelector.tsx index 13ce8d38fa..787506e780 100644 --- a/src/components/Technologies/CategorySelector/TypeSelector.tsx +++ b/src/components/Technologies/CategorySelector/TypeSelector.tsx @@ -1,7 +1,8 @@ import React from "react"; import styles from "./CategorySelector.module.scss"; -import { Select } from "antd"; +import { Select, ConfigProvider, ThemeConfig, theme } from "antd"; import { packTypeNames } from "../PackConstants"; +import { useColorMode } from "@docusaurus/theme-common"; interface TypeSelectorProps { categories: string[]; @@ -23,6 +24,7 @@ export default function TypeSelector({ categories, selected = [""], selectCatego return (
+
-
-
- -
{packData.customDescription}
+
+
+ {`Type: ${packTypeNames[packData.type as keyof typeof packTypeNames]}`} +
+
+ {`Cloud Providers: ${getProviders()}`} +
+
diff --git a/src/components/Technologies/CategorySelector/CloudProviderSelecor.tsx b/src/components/Technologies/CategorySelector/CloudProviderSelecor.tsx index 8c06e851bb..aa1480efd6 100644 --- a/src/components/Technologies/CategorySelector/CloudProviderSelecor.tsx +++ b/src/components/Technologies/CategorySelector/CloudProviderSelecor.tsx @@ -24,7 +24,7 @@ export default function CloudProviderSelecor({ selected="", selectCloudProvider
selectRegistries(item)} + > + {getOptions()} + +
+ ); +} diff --git a/src/components/Technologies/CategorySelector/TypeSelector.tsx b/src/components/Technologies/CategorySelector/TypeSelector.tsx index 787506e780..7da8e338f4 100644 --- a/src/components/Technologies/CategorySelector/TypeSelector.tsx +++ b/src/components/Technologies/CategorySelector/TypeSelector.tsx @@ -6,7 +6,7 @@ import { useColorMode } from "@docusaurus/theme-common"; interface TypeSelectorProps { categories: string[]; - selected: string[]; // Update the type to string[] + selected: string[]; selectCategory: (category: string[]) => void; } @@ -24,12 +24,11 @@ export default function TypeSelector({ categories, selected = [""], selectCatego return (
- diff --git a/src/components/Technologies/PackCardIcon.module.scss b/src/components/Technologies/PackCardIcon.module.scss index 966d1c54af..4c3b8471b8 100644 --- a/src/components/Technologies/PackCardIcon.module.scss +++ b/src/components/Technologies/PackCardIcon.module.scss @@ -3,7 +3,6 @@ justify-content: center; align-items: center; height: 52px; - width: 100%; margin: 5px 0 5px; svg { width: 52px; diff --git a/src/components/Technologies/PacksFilters.tsx b/src/components/Technologies/PacksFilters.tsx index 4c48a99f5f..0f4b400267 100644 --- a/src/components/Technologies/PacksFilters.tsx +++ b/src/components/Technologies/PacksFilters.tsx @@ -4,12 +4,15 @@ import CloudProviderSelecor from "./CategorySelector/CloudProviderSelecor"; import styles from "./PackFilters.module.scss"; import CustomLabel from "./CategorySelector/CustomLabel"; import AdditionalFilters from "./CategorySelector/AdditionalFilters"; +import RegistrySelector from "./CategorySelector/RegistrySelector"; +import { Select } from "antd"; interface PackFiltersProps { categories: string[]; + registries: any[]; selectedFilters: { category: string[], provider: string, additionalFilters: string[] }; setSelectedSearchFilters: (...args: any[]) => void; } -export default function PacksFilters({ categories, selectedFilters, setSelectedSearchFilters }: PackFiltersProps) { +export default function PacksFilters({ categories, registries, selectedFilters, setSelectedSearchFilters }: PackFiltersProps) { function setSelectedCategory(category: string[]) { setSelectedSearchFilters({ category: category }); } @@ -19,12 +22,19 @@ export default function PacksFilters({ categories, selectedFilters, setSelectedS function selectAdditionalFilters(additionalFilters: string[]) { setSelectedSearchFilters({ additionalFilters: additionalFilters }); } + function setSelectedRegistries(registries: string[]) { + setSelectedSearchFilters({ registries: registries }); + } return (
+
+ + +
diff --git a/src/components/Technologies/Technologies.tsx b/src/components/Technologies/Technologies.tsx index 941c3359c3..61f786b2c1 100644 --- a/src/components/Technologies/Technologies.tsx +++ b/src/components/Technologies/Technologies.tsx @@ -18,12 +18,13 @@ const searchOptions = { interface TechnologiesProps { data: PacksData[] | IntegrationsData[]; + repositories: any[]; } -export default function Technologies({ data }: TechnologiesProps) { +export default function Technologies({ data, repositories }: TechnologiesProps) { const { isDarkTheme } = useColorMode(); const { defaultAlgorithm, darkAlgorithm } = theme; - const [selectedFilters, setSelectedFilters] = useState<{ category: string[], provider: string, additionalFilters: string[] }>({ category: [], provider: "", additionalFilters: [] }) + const [selectedFilters, setSelectedFilters] = useState<{ category: string[], registries: string[], provider: string, additionalFilters: string[] }>({ category: [], registries: [], provider: "", additionalFilters: [] }) const [searchValue, setSearchValue] = useState(""); const categories = useMemo(() => { @@ -72,6 +73,11 @@ export default function Technologies({ data }: TechnologiesProps) { return techCard.cloudTypes.includes("all") || techCard.cloudTypes.includes(selectedFilters.provider); }); } + if (selectedFilters.registries.length) { + filteredCards = filteredCards.filter((techCard: FrontMatterData) => { + return selectedFilters.registries.some((registry)=>techCard.registries.includes(registry)); + }); + } if (selectedFilters.additionalFilters?.length && selectedFilters.additionalFilters.includes("Verified")) { filteredCards = filteredCards.filter((techCard: FrontMatterData) => { @@ -134,7 +140,7 @@ export default function Technologies({ data }: TechnologiesProps) { - +
diff --git a/src/services/api/index.js b/src/services/api/index.js index 520e361571..5f960f3f8f 100644 --- a/src/services/api/index.js +++ b/src/services/api/index.js @@ -21,7 +21,7 @@ axiosRetry(api, { retries: 3, retryDelay: (...arg) => axiosRetry.exponentialDelay(...arg, 1000), retryCondition(error) { - switch (error.response.status) { + switch (error.response?.status) { case 500: case 404: case 501: From 26ed76c9e53dac9a013b34bed809e3853fbfbce6 Mon Sep 17 00:00:00 2001 From: nage1234 <88926279+nage1234@users.noreply.github.com> Date: Mon, 22 Apr 2024 11:46:50 +0530 Subject: [PATCH 16/23] added config file passed registries param --- docusaurus.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docusaurus.config.js b/docusaurus.config.js index 120c8d746d..231cbc9b32 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -193,7 +193,7 @@ const config = { id: "enable-source-map", }, ], - pluginPacksAndIntegrationsData, + [pluginPacksAndIntegrationsData, { repositories: ["Public Repo", "palette"] }], pluginImportFontAwesomeIcons, function () { return { From a780ec9d000e358b652e493d452aef0dfa7afc7c Mon Sep 17 00:00:00 2001 From: nage1234 <88926279+nage1234@users.noreply.github.com> Date: Wed, 24 Apr 2024 13:24:32 +0530 Subject: [PATCH 17/23] addressed the review comments --- plugins/packs-integrations.js | 5 +- .../Integrations/IntegrationTypes.ts | 2 - .../PacksInformation/PacksInformation.tsx | 2 +- .../PacksReadme/PacksReadme.antd.css | 3 + .../PacksReadme/PacksReadme.module.scss | 22 +++ src/components/PacksReadme/PacksReadme.tsx | 81 ++++++---- src/components/PacksReadme/index.ts | 3 - .../CategorySelector/AdditionalFilters.tsx | 12 +- .../CategorySelector.module.scss | 3 + .../CategorySelector/CloudProviderSelecor.tsx | 34 ----- .../CategorySelector/RegistrySelector.tsx | 34 ----- .../CategorySelector/TypeSelector.tsx | 37 ----- .../additionalFilters.antd.css | 20 +-- src/components/Technologies/PackCardIcon.tsx | 24 +-- src/components/Technologies/PackConstants.ts | 45 ++++-- src/components/Technologies/PacksFilters.tsx | 74 ++++++--- src/components/Technologies/Technologies.tsx | 141 ++++++++++-------- .../Technologies/technologies.antd.css | 4 +- src/services/api/index.js | 6 +- 19 files changed, 269 insertions(+), 283 deletions(-) delete mode 100644 src/components/PacksReadme/index.ts delete mode 100644 src/components/Technologies/CategorySelector/CloudProviderSelecor.tsx delete mode 100644 src/components/Technologies/CategorySelector/RegistrySelector.tsx delete mode 100644 src/components/Technologies/CategorySelector/TypeSelector.tsx diff --git a/plugins/packs-integrations.js b/plugins/packs-integrations.js index ea76dcdde8..4cf30d6221 100644 --- a/plugins/packs-integrations.js +++ b/plugins/packs-integrations.js @@ -33,18 +33,16 @@ function combineAPICustomPackData(packsMData, packsPaletteDetailsData, customPac const packType = packMDValue.spec.layer === "addon" ? packMDValue.spec.addonType : packMDValue.spec.layer; const layer = packMDValue.spec.layer === "addon" ? packMDValue.spec.addonType : packTypeNames[packMDValue.spec.layer]; const packValues = packContent.packValues; - const packValueMap = { + return { fields: { name: packName, title: packMDValue.spec.displayName, description: customPacksData?.[packName], readme: getReadMeMap(packValues), - hide_table_of_contents: false, cloudTypes: packMDValue.spec.cloudTypes, type: 'integration', category: [layer], packType: packType, - sidebar_class_name: 'hide-from-sidebar', logoUrl: packMDValue.spec.registries[0].logoUrl, tags: [], slug: '/integrations/${packMDValue.spec.name}', @@ -55,7 +53,6 @@ function combineAPICustomPackData(packsMData, packsPaletteDetailsData, customPac versions: getAggregatedVersions(packContent.tags, packValues, packName, layer) } }; - return packValueMap; } }); } diff --git a/src/components/Integrations/IntegrationTypes.ts b/src/components/Integrations/IntegrationTypes.ts index c5ae8e0f97..22808ed7d7 100644 --- a/src/components/Integrations/IntegrationTypes.ts +++ b/src/components/Integrations/IntegrationTypes.ts @@ -1,9 +1,7 @@ export interface FrontMatterData { name: string; - sidebar_label: string; title: string; description: string; - hide_table_of_contents: boolean; type: string; category: string[]; logoUrl: string; diff --git a/src/components/PacksInformation/PacksInformation.tsx b/src/components/PacksInformation/PacksInformation.tsx index b2645a8402..3c38029b55 100644 --- a/src/components/PacksInformation/PacksInformation.tsx +++ b/src/components/PacksInformation/PacksInformation.tsx @@ -1,6 +1,6 @@ import React from "react"; import { useLocation } from 'react-router-dom'; -import PacksReadme from "@site/src/components/PacksReadme"; +import PacksReadme from "@site/src/components/PacksReadme/PacksReadme"; import { Switch, useRouteMatch, Redirect } from 'react-router-dom' export default function Packs(props: any) { diff --git a/src/components/PacksReadme/PacksReadme.antd.css b/src/components/PacksReadme/PacksReadme.antd.css index 80835a915b..352cc53b3b 100644 --- a/src/components/PacksReadme/PacksReadme.antd.css +++ b/src/components/PacksReadme/PacksReadme.antd.css @@ -3,3 +3,6 @@ font-size: 16px; font-weight: bold; } +p { + font-size: 16px; +} diff --git a/src/components/PacksReadme/PacksReadme.module.scss b/src/components/PacksReadme/PacksReadme.module.scss index ad2a83dbf8..8aff782ab9 100644 --- a/src/components/PacksReadme/PacksReadme.module.scss +++ b/src/components/PacksReadme/PacksReadme.module.scss @@ -3,6 +3,10 @@ flex-direction: column; align-items: center; justify-content: center; + .tabpane { + padding-top: 15px; + font-size: 16px; + } .emptyContent { padding-top: 20px; display: flex; @@ -44,8 +48,23 @@ display: flex; flex-direction: column; width: 70%; + .packname { + font-size: 16px; + font-weight: 600; + line-height: 20px; + } .descriptioncontent { display: flex; + height: 100%; + font-size: 14px; + font-weight: 400; + .packicon { + height: 100%; + } + .customdesc { + padding-top: 12px; + padding-left: 16px; + } } } .packdescsecondcol { @@ -69,6 +88,9 @@ border: 1px solid #1f263c; } } + .versionselectbox { + width: 300px; + } .packdesc { display: flex; flex-direction: column; diff --git a/src/components/PacksReadme/PacksReadme.tsx b/src/components/PacksReadme/PacksReadme.tsx index 60c4b401eb..38cc7ef251 100644 --- a/src/components/PacksReadme/PacksReadme.tsx +++ b/src/components/PacksReadme/PacksReadme.tsx @@ -10,7 +10,7 @@ import PacksIntegrationsPluginData from "../Integrations/IntegrationTypes"; import ThemedImage from '@theme/ThemedImage'; import useBaseUrl from "@docusaurus/useBaseUrl" import { useColorMode } from "@docusaurus/theme-common"; -import { packTypeNames } from "../Technologies/PackConstants"; +import { packTypeNames, cloudDisplayNames } from "../Technologies/PackConstants"; interface PackReadmeProps { customDescription: string, @@ -20,6 +20,8 @@ interface PackReadmeProps { logoUrl: string, type: string, provider: Array, + registries: Array, + selectedRepositories: Array, } export default function PacksReadme() { @@ -45,7 +47,7 @@ export default function PacksReadme() { }, []); const packData = useMemo(() => { - const { packs } = usePluginData("plugin-packs-integrations") as PacksIntegrationsPluginData; + const { packs, repositories } = usePluginData("plugin-packs-integrations") as PacksIntegrationsPluginData; const _packData = packs.filter((pack) => pack.fields.name === packName)[0]; if (_packData) { setSelectedVersion(`${_packData.fields.versions[0].title}`); @@ -57,6 +59,8 @@ export default function PacksReadme() { logoUrl: _packData.fields.logoUrl, type: _packData.fields.packType, provider: _packData.fields.cloudTypes, + registries: _packData.fields.registries, + selectedRepositories: repositories, }; return packDataInfo; } @@ -68,6 +72,8 @@ export default function PacksReadme() { logoUrl: "", type: "", provider: [], + selectedRepositories: [], + registries: [], }; }, [packName]); @@ -75,7 +81,7 @@ export default function PacksReadme() { setSelectedVersion(version); } - function getOptions() { + function renderVersionOptions() { return packData.versions.map((_version) => { return ( {_version.title} @@ -112,40 +118,45 @@ export default function PacksReadme() { })} ); - } else if (Object.keys(packData.packReadme).length) { - const packUid = packData.versions.find((ver) => ver.title === selectedVersion)?.packUid; - readme = packUid ? packData.packReadme[packUid as keyof string] : ""; - return (); - } else if (md) { - return md; - } else { - return renderEmptyContent(); } - } - function renderEmptyContent() { return ( -
- -
No content available
-
The content for this pack is not available.
-
+ <> + {Object.keys(packData.packReadme).length ? () + : md ? md + : (
+ +
No content available
+
The content for this pack is not available.
+
)} + ); } + function getProviders() { - if(packData.provider.includes("all")) { + if (packData.provider.includes("all")) { return "All"; } else { - return packData.provider.join(", "); + return packData.provider.map((_provider) => cloudDisplayNames[_provider as keyof typeof cloudDisplayNames] || _provider).join(", "); } } + function getRegistries() { + const consolidatedRegistries = packData.registries.reduce((accumulator: string[], registry) => { + const regObj = packData.selectedRepositories.find((repo) => repo.uid === registry); + if (regObj) { + accumulator.push(regObj.name); + } + return accumulator; + }, []); + return consolidatedRegistries.join(", "); + } return (
-
{packName}
+
{packData.title}
- -
{packData.customDescription}
+ +
{packData.customDescription}
@@ -178,10 +190,13 @@ export default function PacksReadme() {
{`Cloud Providers: ${getProviders()}`}
+
+ {`Registry: ${getRegistries()}`} +
-
+
{renderTabs()}
diff --git a/src/components/PacksReadme/index.ts b/src/components/PacksReadme/index.ts deleted file mode 100644 index c24c28cf29..0000000000 --- a/src/components/PacksReadme/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -import PacksReadme from "./PacksReadme"; - -export default PacksReadme; diff --git a/src/components/Technologies/CategorySelector/AdditionalFilters.tsx b/src/components/Technologies/CategorySelector/AdditionalFilters.tsx index 1a1cb0bbae..21751fd8de 100644 --- a/src/components/Technologies/CategorySelector/AdditionalFilters.tsx +++ b/src/components/Technologies/CategorySelector/AdditionalFilters.tsx @@ -17,11 +17,11 @@ export default function AdditionalFilters({ selectAdditionalFilters }: Additiona const [items, setItems] = useState([ { label: 'Verified', - key: 'Verified', + key: 'verified', }, { label: 'Community', - key: 'Community', + key: 'community', } ]); const [selectedItems, setSelectedItems] = useState([]); @@ -39,7 +39,7 @@ export default function AdditionalFilters({ selectAdditionalFilters }: Additiona const selItem = items.find((item) => item.key === key); if (selItem) { const _selectedItems = [...selectedItems, selItem]; - selectAdditionalFilters(_selectedItems.map((item) => item.label)); + selectAdditionalFilters(_selectedItems.map((item) => item.key)); setSelectedItems(_selectedItems); setItems(items.filter((item) => item.key !== key)) } @@ -49,16 +49,16 @@ export default function AdditionalFilters({ selectAdditionalFilters }: Additiona const newItems = selectedItems.filter((item) => item.key !== key); setSelectedItems(newItems); setItems([...items, selectedItems.find((item) => item.key === key)!]); - selectAdditionalFilters(newItems.map((item) => item.label)); + selectAdditionalFilters(newItems.map((item) => item.key)); }; return (
{selectedItems.map((item) => ( - removeItem(item.key)}>{item.label} + removeItem(item.key)}>{item.label} ))} - loadMenu(key)} mode="horizontal" items={additionalMenu} /> + loadMenu(key)} mode="horizontal" items={additionalMenu} />
); diff --git a/src/components/Technologies/CategorySelector/CategorySelector.module.scss b/src/components/Technologies/CategorySelector/CategorySelector.module.scss index 0024c3d3a7..c71d144e97 100644 --- a/src/components/Technologies/CategorySelector/CategorySelector.module.scss +++ b/src/components/Technologies/CategorySelector/CategorySelector.module.scss @@ -4,6 +4,9 @@ margin-top: 15px; margin-bottom: 15px; align-items: center; + .selectbox { + width: 200px; + } .selectorCard { padding: 4px 12px; background: var(--ifm-breadcrumb-item-background-active); diff --git a/src/components/Technologies/CategorySelector/CloudProviderSelecor.tsx b/src/components/Technologies/CategorySelector/CloudProviderSelecor.tsx deleted file mode 100644 index aa1480efd6..0000000000 --- a/src/components/Technologies/CategorySelector/CloudProviderSelecor.tsx +++ /dev/null @@ -1,34 +0,0 @@ -import React from "react"; -import { Select } from "antd"; -import { cloudProviderTypes } from "../PackConstants"; -import styles from "./CategorySelector.module.scss"; - -interface CloudProviderSelectorProps { - selected: string; - selectCloudProvider: (provider: string) => void; -} - -export default function CloudProviderSelecor({ selected="", selectCloudProvider }: CloudProviderSelectorProps) { - const getOptions = () => { - const providers = Object.keys(cloudProviderTypes); - const providersMap = providers.map((provider) => { - return ( - - {cloudProviderTypes[provider as keyof typeof cloudProviderTypes] || provider} - - ); - }); - return providersMap; - } - return( -
- -
- ) -}; diff --git a/src/components/Technologies/CategorySelector/RegistrySelector.tsx b/src/components/Technologies/CategorySelector/RegistrySelector.tsx deleted file mode 100644 index 867dc6fa1f..0000000000 --- a/src/components/Technologies/CategorySelector/RegistrySelector.tsx +++ /dev/null @@ -1,34 +0,0 @@ -import React from "react"; -import styles from "./CategorySelector.module.scss"; -import { Select, ConfigProvider, ThemeConfig, theme } from "antd"; - -interface RegistrySelectorProps { - registries: any[]; - selected: string[]; - selectRegistries: (registry: string[]) => void; -} - -export default function RegistrySelector({ registries, selected = [""], selectRegistries }: RegistrySelectorProps) { - function getOptions() { - return Array.from(registries).map((registry) => { - return ( - - {registry.name} - - ); - }); - } - - return ( -
- -
- ); -} diff --git a/src/components/Technologies/CategorySelector/TypeSelector.tsx b/src/components/Technologies/CategorySelector/TypeSelector.tsx deleted file mode 100644 index 7da8e338f4..0000000000 --- a/src/components/Technologies/CategorySelector/TypeSelector.tsx +++ /dev/null @@ -1,37 +0,0 @@ -import React from "react"; -import styles from "./CategorySelector.module.scss"; -import { Select, ConfigProvider, ThemeConfig, theme } from "antd"; -import { packTypeNames } from "../PackConstants"; -import { useColorMode } from "@docusaurus/theme-common"; - -interface TypeSelectorProps { - categories: string[]; - selected: string[]; - selectCategory: (category: string[]) => void; -} - -export default function TypeSelector({ categories, selected = [""], selectCategory }: TypeSelectorProps) { - function getOptions(categories: string[]) { - const categoriesMap = categories.map((category) => { - return ( - - {packTypeNames[category as keyof typeof packTypeNames]} - - ); - }); - return categoriesMap; - } - - return ( -
- -
- ); -} diff --git a/src/components/Technologies/CategorySelector/additionalFilters.antd.css b/src/components/Technologies/CategorySelector/additionalFilters.antd.css index b2fe9a8f5f..18ce78fcdb 100644 --- a/src/components/Technologies/CategorySelector/additionalFilters.antd.css +++ b/src/components/Technologies/CategorySelector/additionalFilters.antd.css @@ -1,22 +1,7 @@ .ant-space-compact-block { flex-direction: row-reverse; } -.ant-btn-compact-item { - background-color: #d9d9d9; - color: black; - html[data-theme="dark"] & { - color: white; - background-color: #1c202b; - } -} -.ant-btn { - background-color: #d9d9d9; - color: black; - html[data-theme="dark"] & { - color: white; - background-color: #1c202b; - } -} + .ant-menu-horizontal { background-color: #d9d9d9; color: black; @@ -26,3 +11,6 @@ } line-height: 32px; } +.ant-tag { + font-size: 14px; +} diff --git a/src/components/Technologies/PackCardIcon.tsx b/src/components/Technologies/PackCardIcon.tsx index 635048b352..7880cccae8 100644 --- a/src/components/Technologies/PackCardIcon.tsx +++ b/src/components/Technologies/PackCardIcon.tsx @@ -7,25 +7,25 @@ interface PackCardIconProps { title?: string; logoUrl?: string; type?: any; + className?: any; } -export default function PackCardIcon({ title, logoUrl, type }: PackCardIconProps) { - const [ isError, setIsError ] = useState(false); +export default function PackCardIcon({ title, logoUrl, type, className }: PackCardIconProps) { + const [isError, setIsError] = useState(false); const handleImageError = (e: any) => { - e.target.style.display = "none"; setIsError(true); }; return ( -
- {isError ?() : - ({`${title}) +
+ {isError || !logoUrl ? () : + ({`${title}) }
); diff --git a/src/components/Technologies/PackConstants.ts b/src/components/Technologies/PackConstants.ts index 4fd8c037b9..15df9a9bcf 100644 --- a/src/components/Technologies/PackConstants.ts +++ b/src/components/Technologies/PackConstants.ts @@ -17,7 +17,7 @@ export const packTypes = [ type packType = typeof packTypes[number]; -export const packTypeNames: Record = { +export const packTypeNames: Record = { 'app services': 'App Services', authentication: 'Authentication', ingress: 'Ingress', @@ -34,20 +34,20 @@ export const packTypeNames: Record = { 'system app': 'System App', } as const; -export const cloudProviderTypes = { - aws: 'AWS IaaS', - eks: 'AWS EKS', - aks: 'Azure AKS', - gke: 'GCP GKE', - azure: 'Azure IaaS', - gcp: 'GCP IaaS', - vsphere: 'VMware', - openstack: 'OpenStack', - maas: 'MAAS', - tke: 'TKE', - 'edge-native': 'Edge Native', - custom: 'Custom', -} as const; +export const cloudProviderTypes = [ + { name: 'aws', displayName: 'AWS IaaS' }, + { name: 'eks', displayName: 'AWS EKS' }, + { name: 'azure', displayName: 'Azure IaaS' }, + { name: 'aks', displayName: 'Azure AKS' }, + { name: 'gcp', displayName: 'GCP IaaS' }, + { name: 'gke', displayName: 'GCP GKE' }, + { name: 'tke', displayName: 'TKE' }, + { name: 'vsphere', displayName: 'VMware' }, + { name: 'openstack', displayName: 'OpenStack' }, + { name: 'maas', displayName: 'MAAS' }, + { name: 'edge-native', displayName: 'Edge Native' }, + { name: 'custom', displayName: 'Custom' }, +] as const; export const layerTypes = [ 'k8s', @@ -68,3 +68,18 @@ export const addOnTypes = [ 'servicemesh', 'system app', ] as const; + +export const cloudDisplayNames = { + aws: 'AWS', + eks: 'AWS EKS', + aks: 'Azure AKS', + gke: 'GCP GKE', + azure: 'Azure', + gcp: 'GCP', + vsphere: 'VMware', + openstack: 'OpenStack', + maas: 'MAAS', + tke: 'Tencent', + 'edge-native': 'Edge Native', + custom: 'Custom', +} as const; diff --git a/src/components/Technologies/PacksFilters.tsx b/src/components/Technologies/PacksFilters.tsx index 0f4b400267..34ad3ef044 100644 --- a/src/components/Technologies/PacksFilters.tsx +++ b/src/components/Technologies/PacksFilters.tsx @@ -1,47 +1,85 @@ import React from "react"; -import TypeSelector from "./CategorySelector/TypeSelector"; -import CloudProviderSelecor from "./CategorySelector/CloudProviderSelecor"; import styles from "./PackFilters.module.scss"; +import filterStyles from "./CategorySelector/CategorySelector.module.scss"; import CustomLabel from "./CategorySelector/CustomLabel"; import AdditionalFilters from "./CategorySelector/AdditionalFilters"; -import RegistrySelector from "./CategorySelector/RegistrySelector"; +import { packTypeNames, cloudProviderTypes } from "./PackConstants"; import { Select } from "antd"; interface PackFiltersProps { categories: string[]; registries: any[]; - selectedFilters: { category: string[], provider: string, additionalFilters: string[] }; setSelectedSearchFilters: (...args: any[]) => void; } -export default function PacksFilters({ categories, registries, selectedFilters, setSelectedSearchFilters }: PackFiltersProps) { - function setSelectedCategory(category: string[]) { - setSelectedSearchFilters({ category: category }); - } - function setSelectedProvider(provider: string) { - setSelectedSearchFilters({ provider: provider }); - } +export default function PacksFilters({ categories, registries, setSelectedSearchFilters }: PackFiltersProps) { function selectAdditionalFilters(additionalFilters: string[]) { setSelectedSearchFilters({ additionalFilters: additionalFilters }); } - function setSelectedRegistries(registries: string[]) { - setSelectedSearchFilters({ registries: registries }); - } return (
- +
+ +
- +
+ +
- +
+ +
-
+
); } diff --git a/src/components/Technologies/Technologies.tsx b/src/components/Technologies/Technologies.tsx index 61f786b2c1..d7241e5024 100644 --- a/src/components/Technologies/Technologies.tsx +++ b/src/components/Technologies/Technologies.tsx @@ -5,7 +5,7 @@ import Search from "./Search"; import { PacksData, IntegrationsData, FrontMatterData } from "../Integrations/IntegrationTypes"; import TechnologyCard from "./TechnologyCard"; import PacksFilters from "./PacksFilters"; -import { packTypeNames } from "./PackConstants"; +import { packTypeNames, packTypes } from "./PackConstants"; import { Collapse, ConfigProvider, ThemeConfig, theme } from "antd"; import "./technologies.antd.css"; import IconMapper from "../IconMapper/IconMapper"; @@ -13,7 +13,7 @@ import { useColorMode } from "@docusaurus/theme-common"; const searchOptions = { threshold: 0.5, - keys: ["title"], + keys: ["title",], }; interface TechnologiesProps { @@ -21,14 +21,62 @@ interface TechnologiesProps { repositories: any[]; } +interface SearchFilter { + name: string; + values: any; +} + export default function Technologies({ data, repositories }: TechnologiesProps) { const { isDarkTheme } = useColorMode(); const { defaultAlgorithm, darkAlgorithm } = theme; - const [selectedFilters, setSelectedFilters] = useState<{ category: string[], registries: string[], provider: string, additionalFilters: string[] }>({ category: [], registries: [], provider: "", additionalFilters: [] }) - const [searchValue, setSearchValue] = useState(""); + const [selectedFilters, setSelectedFilters] = useState<{ category: string[], registries: string[], cloudTypes: string, additionalFilters: string[] }>({ category: [], registries: [], cloudTypes: "", additionalFilters: [] }) + const [searchValue, setSearchValue] = useState(""); - const categories = useMemo(() => { - const categoriesMap = data.reduce((acc: Map, technology: PacksData | IntegrationsData) => { + const filteredTechCards = useMemo(() => { + let _selectedFilters = [] as SearchFilter[]; + Object.keys(selectedFilters).forEach((key) => { + const _values = selectedFilters[key as keyof typeof selectedFilters]; + if (!_values || _values.length === 0) { + return; + } + if (key === "additionalFilters") { + const additionalFilters = Array.isArray(_values) ? _values.reduce((acc, _value) => { + acc.push({ + name: _value, + values: true + }); + return acc; + }, [] as SearchFilter[]) : []; + _selectedFilters = _selectedFilters.concat(additionalFilters); + } else { + _selectedFilters.push({ + name: key, + values: _values + }); + } + }); + let filteredCards: any[] = []; + filteredCards = data.filter((techCard) => { + const card = techCard.fields; + return _selectedFilters.every((condition) => { + if (condition.name === "category") { + return condition.values.includes(card.packType); + } else if (condition.name === "registries") { + return condition.values.some((registry: string) => card.registries.includes(registry)); + } else if (condition.name === "cloudTypes") { + return card.cloudTypes.includes("all") || card.cloudTypes.includes(condition.values); + } else if (["verified", "community"].includes(condition.name)) { + return card[condition.name as keyof FrontMatterData]; + } else { + return true; + } + }) + }) + if (searchValue) { + const fuse = new Fuse(filteredCards, searchOptions); + filteredCards = fuse.search(searchValue).map(({ item }) => item); + } + const categoriesMap = filteredCards.reduce((acc: Map, technology: PacksData | IntegrationsData) => { let packType = technology.fields.packType; if (acc.has(packType)) { acc.get(packType).push(technology.fields); @@ -37,65 +85,32 @@ export default function Technologies({ data, repositories }: TechnologiesProps) } return acc; }, new Map()); - const sortedCategoriesMap = new Map([...categoriesMap.entries()].sort()); - const categoryKeys = Array.from(sortedCategoriesMap.keys()); + + const sortedCategoriesMap = new Map([...categoriesMap.entries()].sort((field1: string, field2: string) => { + const packType1: keyof typeof packTypeNames = field1; + const packType2: keyof typeof packTypeNames = field2; + if (packTypeNames[field1[0]] > packTypeNames[field2[0]]) { + return 1; + } else if (packTypeNames[field1[0]] < packTypeNames[field2[0]]) { + return -1; + } else { + return 0; + } + })); + const categoryKeys = Array.from(sortedCategoriesMap.keys()) as string[]; categoryKeys.forEach((category) => { - const fields = sortedCategoriesMap.get(category); - fields.sort((field1: any, field2: any) => { - if (field1.name > field2.name) { + let techCards: any = sortedCategoriesMap.get(category); + techCards.sort((a: FrontMatterData, b: FrontMatterData) => { + if (a.title > b.title) { return 1; - } else if (field1.name < field2.name) { + } else if (a.title < b.title) { return -1; } else { return 0; } }); - }) - return sortedCategoriesMap; - }, [data]); - - const filteredTechCards = useMemo(() => { - let categoryKeys: string[] = Array.from(categories.keys()); - if (selectedFilters.category.length > 0) { - categoryKeys = categoryKeys.filter((category: string) => { - return selectedFilters.category.includes(category); - }); - } - const selectedCategoryItems = new Map(); - categoryKeys.forEach((category) => { - let filteredCards = categories.get(category); - if (searchValue) { - const fuse = new Fuse(filteredCards, searchOptions); - filteredCards = fuse.search(searchValue).map(({ item }) => item); - } - if (selectedFilters.provider) { - filteredCards = filteredCards.filter((techCard: FrontMatterData) => { - return techCard.cloudTypes.includes("all") || techCard.cloudTypes.includes(selectedFilters.provider); - }); - } - if (selectedFilters.registries.length) { - filteredCards = filteredCards.filter((techCard: FrontMatterData) => { - return selectedFilters.registries.some((registry)=>techCard.registries.includes(registry)); - }); - } - - if (selectedFilters.additionalFilters?.length && selectedFilters.additionalFilters.includes("Verified")) { - filteredCards = filteredCards.filter((techCard: FrontMatterData) => { - return techCard.verified; - }) as FrontMatterData[]; - } - if (selectedFilters.additionalFilters?.length && selectedFilters.additionalFilters.includes("Community")) { - filteredCards = filteredCards.filter((techCard: FrontMatterData) => { - return techCard.community; - }); - } - selectedCategoryItems.set(category, filteredCards); }); - if (!selectedFilters.category.length && !selectedFilters.provider && !selectedFilters.additionalFilters.length && !searchValue) { - return categories; - } else { - return selectedCategoryItems; - } + return sortedCategoriesMap; }, [data, selectedFilters, searchValue]); const onSearch = (value: string) => { @@ -109,9 +124,9 @@ export default function Technologies({ data, repositories }: TechnologiesProps) }; const renderPacksCategories = () => { const renderedCategoryItems: React.ReactNode[] = []; - let categoryKeys: string[] = Array.from(filteredTechCards.keys()); + let categoryKeys: string[] = Array.from(filteredTechCards.keys()) as string[]; categoryKeys.forEach((category) => { - const categoryItems = filteredTechCards.get(category); + const categoryItems = filteredTechCards.get(category) as FrontMatterData[]; if (categoryItems.length) { const obj = ({renderPacks(categoryItems)}) renderedCategoryItems.push(obj); @@ -127,23 +142,23 @@ export default function Technologies({ data, repositories }: TechnologiesProps) ); } + const setSelectedSearchFilters = (selectedSearchFilters: Record) => { setSelectedFilters((prevState) => ({ ...prevState, ...selectedSearchFilters })); - }; - + } return (
- +
- + {renderPacksCategories()}
diff --git a/src/components/Technologies/technologies.antd.css b/src/components/Technologies/technologies.antd.css index b47a825213..1ff10cc14a 100644 --- a/src/components/Technologies/technologies.antd.css +++ b/src/components/Technologies/technologies.antd.css @@ -11,6 +11,6 @@ display: flex; flex-wrap: wrap; } -.ant-select { - width: 200px +.ant-menu-horizontal >.ant-menu-submenu:hover::after { + border-bottom-color: transparent !important } diff --git a/src/services/api/index.js b/src/services/api/index.js index 5f960f3f8f..59ecef096c 100644 --- a/src/services/api/index.js +++ b/src/services/api/index.js @@ -3,17 +3,17 @@ import axiosRetry from 'axios-retry'; import { pRateLimit } from 'p-ratelimit'; const api = axios.create({ - baseURL: 'https://dev.spectrocloud.com', + baseURL: 'https://console.spectrocloud.com', timeout: 10000, headers: { 'Content-Type': 'application/json', - "ApiKey": "NGU5MTNhNjBhNzM4OWI1ZTc0N2M5ZmQ0NDI1ZTk4ZTc=", + "ApiKey": process.env.API_KEY, } }); const limit = pRateLimit({ interval: 2000, // 1000 ms == 1 second - rate: 10, // 30 API calls per interval + rate: 10, // 10 API calls per interval concurrency: 10, // no more than 10 running at once }); From cc6d2b22438e86cf30ec767364d4114606dbb7a8 Mon Sep 17 00:00:00 2001 From: nage1234 <88926279+nage1234@users.noreply.github.com> Date: Wed, 24 Apr 2024 15:16:14 +0530 Subject: [PATCH 18/23] a small fix - version wise readme --- src/components/PacksReadme/PacksReadme.tsx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/components/PacksReadme/PacksReadme.tsx b/src/components/PacksReadme/PacksReadme.tsx index 38cc7ef251..50486d3946 100644 --- a/src/components/PacksReadme/PacksReadme.tsx +++ b/src/components/PacksReadme/PacksReadme.tsx @@ -90,10 +90,9 @@ export default function PacksReadme() { } function renderTabs() { - let readme = ""; - if (Object.keys(packData.packReadme).length && md) { - const packUid = packData.versions.find((ver) => ver.title === selectedVersion)?.packUid; - readme = packUid ? packData.packReadme[packUid] : ""; + const packUid = packData.versions.find((ver) => ver.title === selectedVersion)?.packUid; + let readme = packUid ? packData.packReadme[packUid] : ""; + if (readme && md) { const items = [ { label: `Readme`, @@ -121,7 +120,7 @@ export default function PacksReadme() { } return ( <> - {Object.keys(packData.packReadme).length ? () + {readme ? () : md ? md : (
Date: Wed, 24 Apr 2024 17:14:55 +0530 Subject: [PATCH 19/23] removed unwanted file and correct variable name --- .../CategorySelector/AdditionalFilters.tsx | 6 ++-- .../CategorySelector.test.tsx | 29 ------------------- src/components/Technologies/Technologies.tsx | 2 +- 3 files changed, 4 insertions(+), 33 deletions(-) delete mode 100644 src/components/Technologies/CategorySelector/CategorySelector.test.tsx diff --git a/src/components/Technologies/CategorySelector/AdditionalFilters.tsx b/src/components/Technologies/CategorySelector/AdditionalFilters.tsx index 21751fd8de..cb4c95c624 100644 --- a/src/components/Technologies/CategorySelector/AdditionalFilters.tsx +++ b/src/components/Technologies/CategorySelector/AdditionalFilters.tsx @@ -36,9 +36,9 @@ export default function AdditionalFilters({ selectAdditionalFilters }: Additiona ]; const loadMenu = (key: string) => { - const selItem = items.find((item) => item.key === key); - if (selItem) { - const _selectedItems = [...selectedItems, selItem]; + const _selectedItem = items.find((item) => item.key === key); + if (_selectedItem) { + const _selectedItems = [...selectedItems, _selectedItem]; selectAdditionalFilters(_selectedItems.map((item) => item.key)); setSelectedItems(_selectedItems); setItems(items.filter((item) => item.key !== key)) diff --git a/src/components/Technologies/CategorySelector/CategorySelector.test.tsx b/src/components/Technologies/CategorySelector/CategorySelector.test.tsx deleted file mode 100644 index 53e680c813..0000000000 --- a/src/components/Technologies/CategorySelector/CategorySelector.test.tsx +++ /dev/null @@ -1,29 +0,0 @@ -import React from "react"; -import { render, fireEvent, screen } from "@testing-library/react"; -import CategorySelector from "./TypeSelector"; - -describe("CategorySelector Component", () => { - const mockSelectCategory = jest.fn(); - const categories = ["all", "category_one", "category_two"]; - - beforeEach(() => { - render(); - }); - - it("renders all categories", () => { - categories.forEach((category) => { - expect(screen.getByText(category.split("_").join(" "))).toBeInTheDocument(); - }); - }); - - it("indicates which category is selected", () => { - const selectedCategory = screen.getByText("all"); - expect(selectedCategory).toHaveClass("isSelected"); - }); - - it("calls the selectCategory function with the correct argument when clicked", () => { - const unselectedCategory = screen.getByText("category one"); - fireEvent.click(unselectedCategory); - expect(mockSelectCategory).toHaveBeenCalledWith("category_one"); - }); -}); diff --git a/src/components/Technologies/Technologies.tsx b/src/components/Technologies/Technologies.tsx index d7241e5024..24f4c60286 100644 --- a/src/components/Technologies/Technologies.tsx +++ b/src/components/Technologies/Technologies.tsx @@ -13,7 +13,7 @@ import { useColorMode } from "@docusaurus/theme-common"; const searchOptions = { threshold: 0.5, - keys: ["title",], + keys: ["title"], }; interface TechnologiesProps { From cfb6c05f8429f4ee0f54e208fd9affebc46b966a Mon Sep 17 00:00:00 2001 From: nage1234 <88926279+nage1234@users.noreply.github.com> Date: Thu, 25 Apr 2024 14:50:19 +0530 Subject: [PATCH 20/23] fixed a small issue with search --- src/components/Technologies/Technologies.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Technologies/Technologies.tsx b/src/components/Technologies/Technologies.tsx index 24f4c60286..84f9c1c475 100644 --- a/src/components/Technologies/Technologies.tsx +++ b/src/components/Technologies/Technologies.tsx @@ -13,7 +13,7 @@ import { useColorMode } from "@docusaurus/theme-common"; const searchOptions = { threshold: 0.5, - keys: ["title"], + keys: ["fields.title"], }; interface TechnologiesProps { From dca42b8fcce5f76d151eb4534a53ed7e02bf1ef2 Mon Sep 17 00:00:00 2001 From: nage1234 <88926279+nage1234@users.noreply.github.com> Date: Mon, 29 Apr 2024 14:13:14 +0530 Subject: [PATCH 21/23] Addressed the comments and restructured the codes --- plugins/packs-integrations.js | 83 +++++----- .../Integrations/IntegrationTypes.ts | 12 +- .../PacksInformation/PacksInformation.tsx | 6 +- .../PacksReadme/PacksReadme.module.scss | 44 ++++-- src/components/PacksReadme/PacksReadme.tsx | 124 +++++++-------- .../CategorySelector.module.scss | 2 +- .../CategorySelector/FilterSelect.tsx | 33 ++++ src/components/Technologies/PacksFilters.tsx | 89 +++++------ src/components/Technologies/Technologies.tsx | 148 ++++++++---------- .../Technologies/TechnologyCard.tsx | 17 +- .../PackConstants.ts => constants/packs.ts} | 0 src/services/api/index.js | 4 +- 12 files changed, 280 insertions(+), 282 deletions(-) create mode 100644 src/components/Technologies/CategorySelector/FilterSelect.tsx rename src/{components/Technologies/PackConstants.ts => constants/packs.ts} (100%) diff --git a/plugins/packs-integrations.js b/plugins/packs-integrations.js index 4cf30d6221..a6f36e4419 100644 --- a/plugins/packs-integrations.js +++ b/plugins/packs-integrations.js @@ -1,6 +1,6 @@ -const { api, callRateLimitAPI } = require("../src/services/api"); +const { api, callRateLimitAPI } = require("../src/services/api"); const { setTimeout } = require("timers/promises"); -const { packTypeNames, addOnTypes, layerTypes } = require("../src/components/Technologies/PackConstants"); +const { packTypeNames, addOnTypes, layerTypes } = require("../src/constants//packs"); const packDescription = require("../static/packs-data/packs_information.json"); const { coerce, rcompare } = require('semver'); @@ -34,24 +34,22 @@ function combineAPICustomPackData(packsMData, packsPaletteDetailsData, customPac const layer = packMDValue.spec.layer === "addon" ? packMDValue.spec.addonType : packTypeNames[packMDValue.spec.layer]; const packValues = packContent.packValues; return { - fields: { - name: packName, - title: packMDValue.spec.displayName, - description: customPacksData?.[packName], - readme: getReadMeMap(packValues), - cloudTypes: packMDValue.spec.cloudTypes, - type: 'integration', - category: [layer], - packType: packType, - logoUrl: packMDValue.spec.registries[0].logoUrl, - tags: [], - slug: '/integrations/${packMDValue.spec.name}', - id: 'integrations/${packMDValue.spec.name}', - registries: packMDValue.spec.registries.map((registry) => registry.uid), - community: packMDValue.spec.registries[0].annotations?.source === "community", - verified: packMDValue.spec.registries[0].annotations?.source === "spectrocloud", - versions: getAggregatedVersions(packContent.tags, packValues, packName, layer) - } + name: packName, + title: packMDValue.spec.displayName, + description: customPacksData?.[packName], + readme: getReadMeMap(packValues), + cloudTypes: packMDValue.spec.cloudTypes, + type: 'integration', + category: [layer], + packType: packType, + logoUrl: packMDValue.spec.registries[0].logoUrl, + tags: [], + slug: '/integrations/${packMDValue.spec.name}', + id: 'integrations/${packMDValue.spec.name}', + registries: packMDValue.spec.registries.map((registry) => registry.uid), + community: packMDValue.spec.registries[0].annotations?.source === "community", + verified: packMDValue.spec.registries[0].annotations?.source === "spectrocloud", + versions: getAggregatedVersions(packContent.tags), }; } }); @@ -102,9 +100,9 @@ function sortVersions(tags) { return sortedVersions; } -function getAggregatedVersions(tags, packValues, packName, layer) { - const _sortedVersions = sortVersions(tags); - const roots = _sortedVersions +function getAggregatedVersions(tags) { + const sortedVersions = sortVersions(tags); + const roots = sortedVersions .filter((version) => { return matchAmbiguousPatch(version.tag); }) @@ -115,7 +113,7 @@ function getAggregatedVersions(tags, packValues, packName, layer) { packUid: version.packUid, }; }); - _sortedVersions.forEach((version) => { + sortedVersions.forEach((version) => { const parentTags = version?.parentTags || []; const parent = parentTags.find(matchAmbiguousPatch); @@ -159,15 +157,11 @@ function generateRoutes(packDataMap, packsData) { } async function fetchPackListItems(queryParams, packDataArr, counter) { - const payload = { filter: { type: ["spectro", "oci"]} }; - counter += 1; - if (counter % 10 === 0) { - await setTimeout(2000); - } - const response = await api.post('/v1/packs/search' + queryParams, payload); - const tempPackArr = packDataArr.concat(response.data.items); - if (response.data.listmeta.continue) { - return fetchPackListItems("?limit=100&continue=" + response.data.listmeta.continue, tempPackArr, counter); + const payload = { filter: { type: ["spectro", "oci"] } }; + const response = await callRateLimitAPI(["/v1/packs/search" + queryParams], 'post', payload); + const tempPackArr = packDataArr.concat(response[0]?.value.data.items); + if (response[0]?.value.data.listmeta.continue) { + return fetchPackListItems("?limit=100&continue=" + response[0]?.value.data.listmeta.continue, tempPackArr, counter); } else { return tempPackArr; } @@ -188,7 +182,7 @@ async function mapRepositories(repositories) { } function isSelectedRegistry(registries, selectedRepositories) { - if(!selectedRepositories || !selectedRepositories.length) { + if (!selectedRepositories || !selectedRepositories.length) { return true; } return registries.some((registry) => { @@ -205,24 +199,21 @@ async function pluginPacksAndIntegrationsData(context, options) { let packDataArr = await fetchPackListItems("?limit=100", [], 0); console.info("completed the fetch of all the names of the pack") packDataArr = packDataArr.filter((pack) => { - return layerTypes.includes(pack.spec.layer) || (pack.spec.layer === "addon" && addOnTypes.includes(pack.spec.addonType)); + return (((layerTypes.includes(pack.spec.layer) || (pack.spec.layer === "addon") && (addOnTypes.includes(pack.spec.addonType))) && + pack.spec.registries.length && isSelectedRegistry(pack.spec.registries, mappedRepos))) }) const packUrl = "v1/packs/"; const packMDMap = new Map(); let apiPacksData = []; - let promises = new Array(); - for (let i = 0; i < packDataArr.length; i++) { - const packData = packDataArr[i]; - if (packData.spec.registries.length && isSelectedRegistry(packData.spec.registries, mappedRepos)) { - packMDMap[packData.spec.name] = packData; - const cloudType = packData.spec.cloudTypes.includes("all") ? "aws" : packData.spec.cloudTypes[0]; - promises.push(`${packUrl}${packData.spec.name}/registries/${packData.spec.registries[0].uid}?cloudType=${cloudType}&layer=${packData.spec.layer}`); - } - } - const results = await callRateLimitAPI(promises); + const urls = packDataArr.map((packData) => { + packMDMap[packData.spec.name] = packData; + const cloudType = packData.spec.cloudTypes.includes("all") ? "aws" : packData.spec.cloudTypes[0]; + return (`${packUrl}${packData.spec.name}/registries/${packData.spec.registries[0].uid}?cloudType=${cloudType}&layer=${packData.spec.layer}`); + }) + const results = await callRateLimitAPI(urls, 'get', {}); apiPacksData = results.filter(result => result.status === "fulfilled" && result.value?.data).map((pack) => pack.value?.data); console.info("completed the fetch of all the pack details"); - return { packsPaletteData: packMDMap, packsPaletteDetailsData: apiPacksData, packsDescription: packDescription, repositories: mappedRepos}; + return { packsPaletteData: packMDMap, packsPaletteDetailsData: apiPacksData, packsDescription: packDescription, repositories: mappedRepos }; }, async contentLoaded({ allContent, content, actions }) { const { setGlobalData, addRoute } = actions; diff --git a/src/components/Integrations/IntegrationTypes.ts b/src/components/Integrations/IntegrationTypes.ts index 22808ed7d7..a95104471d 100644 --- a/src/components/Integrations/IntegrationTypes.ts +++ b/src/components/Integrations/IntegrationTypes.ts @@ -23,21 +23,13 @@ export interface VersionTemplate { children: VersionTemplate[]; } -export interface PacksData { - fields: FrontMatterData; -} - -export interface IntegrationsData { - fields: FrontMatterData; -} - export interface RepositoryData { name: string; uid: string; } export default interface PacksIntegrationsPluginData { - integrations: PacksData[]; - packs: IntegrationsData[]; + integrations: FrontMatterData[]; + packs: FrontMatterData[]; repositories: RepositoryData[]; } diff --git a/src/components/PacksInformation/PacksInformation.tsx b/src/components/PacksInformation/PacksInformation.tsx index 3c38029b55..fb8a5c0887 100644 --- a/src/components/PacksInformation/PacksInformation.tsx +++ b/src/components/PacksInformation/PacksInformation.tsx @@ -1,12 +1,8 @@ import React from "react"; -import { useLocation } from 'react-router-dom'; import PacksReadme from "@site/src/components/PacksReadme/PacksReadme"; -import { Switch, useRouteMatch, Redirect } from 'react-router-dom' +import { Switch, Redirect } from 'react-router-dom' export default function Packs(props: any) { - let match = useRouteMatch(); - const location = useLocation(); - const packName = location?.state?.id; return ( <> {props?.route?.data ? diff --git a/src/components/PacksReadme/PacksReadme.module.scss b/src/components/PacksReadme/PacksReadme.module.scss index 8aff782ab9..a1663e4098 100644 --- a/src/components/PacksReadme/PacksReadme.module.scss +++ b/src/components/PacksReadme/PacksReadme.module.scss @@ -3,101 +3,123 @@ flex-direction: column; align-items: center; justify-content: center; - .tabpane { + + .tabPane { padding-top: 15px; font-size: 16px; } + .emptyContent { padding-top: 20px; display: flex; flex-direction: column; text-align: center; align-items: center; + .emptyContentTitle { padding-top: 15px; font-size: 20px; color: #545f7e; font-weight: 500; line-height: 24px; + html[data-theme="dark"] & { color: #b5bdd4; background-color: #111726; } } + .emptyContentDescription { font-size: 16px; color: #545f7e; font-weight: 400; line-height: 24px; + html[data-theme="dark"] & { color: #b5bdd4; background-color: #111726; } + margin-top: 10px; } } + .description { display: flex; width: 100%; background-color: #edeef4; + html[data-theme="dark"] & { background-color: #1c202b; } + padding: 10px; - .packdescfirstcol { + + .packDescFirstCol { display: flex; flex-direction: column; width: 70%; - .packname { + + .packName { font-size: 16px; font-weight: 600; line-height: 20px; } - .descriptioncontent { + + .descriptionContent { display: flex; height: 100%; font-size: 14px; font-weight: 400; - .packicon { + + .packIcon { height: 100%; } - .customdesc { + + .customDesc { padding-top: 12px; padding-left: 16px; } } } - .packdescsecondcol { + + .packDescSecondCol { display: flex; flex-direction: column; width: 30%; padding: 10px; background-color: white; border: 1px solid #dee1ea; + html[data-theme="dark"] & { background-color: black; border: 1px solid #1f263c; } - .versionselect { + + .versionSelect { height: max-content; display: flex; flex-direction: row; padding: 10px; border: 1px solid #b6bed4; + html[data-theme="dark"] & { border: 1px solid #1f263c; } } - .versionselectbox { + + .versionSelectBox { width: 300px; } - .packdesc { + + .packDesc { display: flex; flex-direction: column; font-size: 12px; font-weight: 400; line-height: 16px; - .packdescitem { + + .packDescItem { padding-top: 8px; padding-left: 5px; } diff --git a/src/components/PacksReadme/PacksReadme.tsx b/src/components/PacksReadme/PacksReadme.tsx index 50486d3946..31c037bdfa 100644 --- a/src/components/PacksReadme/PacksReadme.tsx +++ b/src/components/PacksReadme/PacksReadme.tsx @@ -10,7 +10,7 @@ import PacksIntegrationsPluginData from "../Integrations/IntegrationTypes"; import ThemedImage from '@theme/ThemedImage'; import useBaseUrl from "@docusaurus/useBaseUrl" import { useColorMode } from "@docusaurus/theme-common"; -import { packTypeNames, cloudDisplayNames } from "../Technologies/PackConstants"; +import { packTypeNames, cloudDisplayNames } from "../../constants/packs"; interface PackReadmeProps { customDescription: string, @@ -25,8 +25,8 @@ interface PackReadmeProps { } export default function PacksReadme() { - const [selectedVersion, setSelectedVersion] = useState(""); - const [md, setMd] = useState | null>(null); + const { packs, repositories } = usePluginData("plugin-packs-integrations") as PacksIntegrationsPluginData; + const [customReadme, setCustomReadme] = useState | null>(null); const empty_icon_light = useBaseUrl('/img/empty_icon_table_light.svg'); const empty_icon_dark = useBaseUrl('/img/empty_icon_table_dark.svg'); const { isDarkTheme } = useColorMode(); @@ -37,29 +37,27 @@ export default function PacksReadme() { try { const module = await import(`../../../docs/docs-content/integrations/${packName}.md`); const PackReadMeComponent = module.default; - setMd(); + setCustomReadme(); } catch (error) { - setMd(null); + setCustomReadme(null); } }; importComponent(); }, []); const packData = useMemo(() => { - const { packs, repositories } = usePluginData("plugin-packs-integrations") as PacksIntegrationsPluginData; - const _packData = packs.filter((pack) => pack.fields.name === packName)[0]; + const _packData = packs.find((pack) => pack.name === packName); if (_packData) { - setSelectedVersion(`${_packData.fields.versions[0].title}`); const packDataInfo: PackReadmeProps = { - customDescription: _packData.fields.description, - packReadme: _packData.fields.readme, - versions: _packData.fields.versions, - title: _packData.fields.title, - logoUrl: _packData.fields.logoUrl, - type: _packData.fields.packType, - provider: _packData.fields.cloudTypes, - registries: _packData.fields.registries, + customDescription: _packData.description, + packReadme: _packData.readme, + versions: _packData.versions, + title: _packData.title, + logoUrl: _packData.logoUrl, + type: _packData.packType, + provider: _packData.cloudTypes, + registries: _packData.registries, selectedRepositories: repositories, }; return packDataInfo; @@ -76,6 +74,7 @@ export default function PacksReadme() { registries: [], }; }, [packName]); + const [selectedVersion, setSelectedVersion] = useState(packData.versions?.[0]?.title || ""); function versionChange(version: string) { setSelectedVersion(version); @@ -92,23 +91,23 @@ export default function PacksReadme() { function renderTabs() { const packUid = packData.versions.find((ver) => ver.title === selectedVersion)?.packUid; let readme = packUid ? packData.packReadme[packUid] : ""; - if (readme && md) { - const items = [ - { - label: `Readme`, - key: '1', - children: (), - }, - { - label: `Additional details`, - key: '2', - children: md, - }, - ] as { label: string, key: string, children: JSX.Element }[]; + const tabs = [ + readme && { + label: `Readme`, + key: '1', + children: (), + }, + customReadme && { + label: `Additional details`, + key: '2', + children: customReadme, + }, + ].filter(Boolean) as { label: string, key: string, children: JSX.Element }[]; + if (tabs.length > 1) { return ( - {items.map((item) => { + {tabs.map((item) => { return ( {item.children} @@ -118,33 +117,30 @@ export default function PacksReadme() { ); } - return ( - <> - {readme ? () - : md ? md - : (
- -
No content available
-
The content for this pack is not available.
-
)} - - ); + if (tabs.length === 1) { + return tabs[0].children; + } + return (
+ +
No content available
+
The content for this pack is not available.
+
) } function getProviders() { if (packData.provider.includes("all")) { return "All"; - } else { - return packData.provider.map((_provider) => cloudDisplayNames[_provider as keyof typeof cloudDisplayNames] || _provider).join(", "); } + return packData.provider.map((_provider) => cloudDisplayNames[_provider as keyof typeof cloudDisplayNames] || _provider).join(", "); + } function getRegistries() { const consolidatedRegistries = packData.registries.reduce((accumulator: string[], registry) => { @@ -162,18 +158,18 @@ export default function PacksReadme() { algorithm: isDarkTheme ? darkAlgorithm : defaultAlgorithm, }}>
-
-
{packData.title}
-
- -
{packData.customDescription}
+
+
{packData.title}
+
+ +
{packData.customDescription}
-
-
+
+
-
-
+
+
{`Type: ${packTypeNames[packData.type as keyof typeof packTypeNames]}`}
-
+
{`Cloud Providers: ${getProviders()}`}
-
+
{`Registry: ${getRegistries()}`}
-
+
{renderTabs()}
diff --git a/src/components/Technologies/CategorySelector/CategorySelector.module.scss b/src/components/Technologies/CategorySelector/CategorySelector.module.scss index c71d144e97..b1a4ff7a25 100644 --- a/src/components/Technologies/CategorySelector/CategorySelector.module.scss +++ b/src/components/Technologies/CategorySelector/CategorySelector.module.scss @@ -4,7 +4,7 @@ margin-top: 15px; margin-bottom: 15px; align-items: center; - .selectbox { + .selectBox { width: 200px; } .selectorCard { diff --git a/src/components/Technologies/CategorySelector/FilterSelect.tsx b/src/components/Technologies/CategorySelector/FilterSelect.tsx new file mode 100644 index 0000000000..2b27611aa5 --- /dev/null +++ b/src/components/Technologies/CategorySelector/FilterSelect.tsx @@ -0,0 +1,33 @@ +import React from "react"; +import { Select } from "antd"; +import filterStyles from "./CategorySelector.module.scss"; +interface FilterSelectProps { + selectMode?: string; + options: any[]; + setSelectedSearchFilters: (...args: any) => void; +}; +interface SelectOption { + key: string, + name: string +} +export default function FilterSelect({ selectMode, options, setSelectedSearchFilters }: FilterSelectProps) { + return ( +
+ +
+ ); +} diff --git a/src/components/Technologies/PacksFilters.tsx b/src/components/Technologies/PacksFilters.tsx index 34ad3ef044..4e1ab01be0 100644 --- a/src/components/Technologies/PacksFilters.tsx +++ b/src/components/Technologies/PacksFilters.tsx @@ -3,79 +3,62 @@ import styles from "./PackFilters.module.scss"; import filterStyles from "./CategorySelector/CategorySelector.module.scss"; import CustomLabel from "./CategorySelector/CustomLabel"; import AdditionalFilters from "./CategorySelector/AdditionalFilters"; -import { packTypeNames, cloudProviderTypes } from "./PackConstants"; +import FilterSelect from "./CategorySelector/FilterSelect"; +import { packTypeNames, cloudProviderTypes } from "../../constants/packs"; import { Select } from "antd"; interface PackFiltersProps { categories: string[]; registries: any[]; setSelectedSearchFilters: (...args: any[]) => void; } + export default function PacksFilters({ categories, registries, setSelectedSearchFilters }: PackFiltersProps) { + const additionalFiltersProps: string[] = [ + "verified", "community" + ]; function selectAdditionalFilters(additionalFilters: string[]) { - setSelectedSearchFilters({ additionalFilters: additionalFilters }); + const mappedAdditionalFilters: { [key: string]: boolean[] } = additionalFiltersProps.reduce((accumulator, filter) => { + accumulator[filter] = additionalFilters.includes(filter) ? [true] : []; + return accumulator; + }, {} as { [key: string]: boolean[] }); // Add index signature + setSelectedSearchFilters(mappedAdditionalFilters); } return (
-
- -
+ { + return { key: category, name: packTypeNames[category as keyof typeof packTypeNames] }; + })} + setSelectedSearchFilters={(items) => setSelectedSearchFilters({ category: items })} + />
-
- -
+ { + return { key: registry.uid, name: registry.name }; + })} + setSelectedSearchFilters={(items) => setSelectedSearchFilters({ registries: items })} + />
-
- -
+ }} + />
diff --git a/src/components/Technologies/Technologies.tsx b/src/components/Technologies/Technologies.tsx index 84f9c1c475..3262c1ee0b 100644 --- a/src/components/Technologies/Technologies.tsx +++ b/src/components/Technologies/Technologies.tsx @@ -2,86 +2,93 @@ import React, { useState, useMemo } from "react"; import Fuse from "fuse.js"; import styles from "./Technologies.module.scss"; import Search from "./Search"; -import { PacksData, IntegrationsData, FrontMatterData } from "../Integrations/IntegrationTypes"; +import { FrontMatterData } from "../Integrations/IntegrationTypes"; import TechnologyCard from "./TechnologyCard"; import PacksFilters from "./PacksFilters"; -import { packTypeNames, packTypes } from "./PackConstants"; -import { Collapse, ConfigProvider, ThemeConfig, theme } from "antd"; +import { packTypeNames, packTypes } from "../../constants/packs"; +import { Collapse, ConfigProvider, theme } from "antd"; import "./technologies.antd.css"; import IconMapper from "../IconMapper/IconMapper"; import { useColorMode } from "@docusaurus/theme-common"; const searchOptions = { threshold: 0.5, - keys: ["fields.title"], + keys: ["title"], }; interface TechnologiesProps { - data: PacksData[] | IntegrationsData[]; + data: FrontMatterData[]; repositories: any[]; } -interface SearchFilter { - name: string; - values: any; -} - export default function Technologies({ data, repositories }: TechnologiesProps) { const { isDarkTheme } = useColorMode(); const { defaultAlgorithm, darkAlgorithm } = theme; - const [selectedFilters, setSelectedFilters] = useState<{ category: string[], registries: string[], cloudTypes: string, additionalFilters: string[] }>({ category: [], registries: [], cloudTypes: "", additionalFilters: [] }) + const [selectedFilters, setSelectedFilters] = useState<{ category: any[], registries: any[], cloudTypes: any[], verified: any[], community: any[] }>({ category: [], registries: [], cloudTypes: [], verified: [], community: [] }) const [searchValue, setSearchValue] = useState(""); const filteredTechCards = useMemo(() => { - let _selectedFilters = [] as SearchFilter[]; - Object.keys(selectedFilters).forEach((key) => { - const _values = selectedFilters[key as keyof typeof selectedFilters]; - if (!_values || _values.length === 0) { - return; + const selectedFiltersKeys = Object.keys(selectedFilters) + let filteredCards: any[] = []; + + const conditions = selectedFiltersKeys.reduce((acc, key) => { + const selectedFiltersValue = selectedFilters[key as keyof typeof selectedFilters]; + if (selectedFiltersValue.length) { + let condition; + if (selectedFiltersValue && selectedFiltersValue.length) { + switch (key) { + case "category": + condition = (techCard: FrontMatterData) => { + return selectedFiltersValue.includes(techCard.packType); + } + break; + case "registries": + condition = (techCard: FrontMatterData) => { + return selectedFiltersValue.some((value) => techCard.registries.includes(value)); + } + break; + case "cloudTypes": + condition = (techCard: FrontMatterData) => { + return selectedFiltersValue.some((value) => techCard.cloudTypes.includes("all") || techCard.cloudTypes.includes(value)); + } + break; + case "verified": + condition = (techCard: FrontMatterData) => { + return techCard["verified"] + } + break; + case "community": + condition = (techCard: FrontMatterData) => { + return techCard["community"] + } + break; + } + if (condition) { + acc.push(condition) + } + } } - if (key === "additionalFilters") { - const additionalFilters = Array.isArray(_values) ? _values.reduce((acc, _value) => { - acc.push({ - name: _value, - values: true - }); - return acc; - }, [] as SearchFilter[]) : []; - _selectedFilters = _selectedFilters.concat(additionalFilters); + return acc; + }, new Array()); + filteredCards = data.filter((card) => { + if (conditions.length) { + return conditions.every((condition) => { + return condition(card); + }) } else { - _selectedFilters.push({ - name: key, - values: _values - }); + return true; } - }); - let filteredCards: any[] = []; - filteredCards = data.filter((techCard) => { - const card = techCard.fields; - return _selectedFilters.every((condition) => { - if (condition.name === "category") { - return condition.values.includes(card.packType); - } else if (condition.name === "registries") { - return condition.values.some((registry: string) => card.registries.includes(registry)); - } else if (condition.name === "cloudTypes") { - return card.cloudTypes.includes("all") || card.cloudTypes.includes(condition.values); - } else if (["verified", "community"].includes(condition.name)) { - return card[condition.name as keyof FrontMatterData]; - } else { - return true; - } - }) }) if (searchValue) { const fuse = new Fuse(filteredCards, searchOptions); filteredCards = fuse.search(searchValue).map(({ item }) => item); } - const categoriesMap = filteredCards.reduce((acc: Map, technology: PacksData | IntegrationsData) => { - let packType = technology.fields.packType; + const categoriesMap = filteredCards.reduce((acc: Map, technology: FrontMatterData) => { + let packType = technology.packType; if (acc.has(packType)) { - acc.get(packType).push(technology.fields); + acc.get(packType).push(technology); } else { - acc.set(packType, [technology.fields]); + acc.set(packType, [technology]); } return acc; }, new Map()); @@ -89,47 +96,30 @@ export default function Technologies({ data, repositories }: TechnologiesProps) const sortedCategoriesMap = new Map([...categoriesMap.entries()].sort((field1: string, field2: string) => { const packType1: keyof typeof packTypeNames = field1; const packType2: keyof typeof packTypeNames = field2; - if (packTypeNames[field1[0]] > packTypeNames[field2[0]]) { - return 1; - } else if (packTypeNames[field1[0]] < packTypeNames[field2[0]]) { - return -1; - } else { - return 0; - } + return packTypeNames[field1[0]].localeCompare(packTypeNames[field2[0]]); })); const categoryKeys = Array.from(sortedCategoriesMap.keys()) as string[]; categoryKeys.forEach((category) => { let techCards: any = sortedCategoriesMap.get(category); techCards.sort((a: FrontMatterData, b: FrontMatterData) => { - if (a.title > b.title) { - return 1; - } else if (a.title < b.title) { - return -1; - } else { - return 0; - } + return (a.title.localeCompare(b.title)) }); }); return sortedCategoriesMap; }, [data, selectedFilters, searchValue]); - const onSearch = (value: string) => { - setSearchValue(value); - }; - const renderPacks = (fields: FrontMatterData[]) => { - return fields.map((field) => { - const { title, logoUrl, packType, name } = field; - return ; - }); - }; const renderPacksCategories = () => { - const renderedCategoryItems: React.ReactNode[] = []; let categoryKeys: string[] = Array.from(filteredTechCards.keys()) as string[]; - categoryKeys.forEach((category) => { + const renderedCategoryItems = categoryKeys.map((category) => { const categoryItems = filteredTechCards.get(category) as FrontMatterData[]; if (categoryItems.length) { - const obj = ({renderPacks(categoryItems)}) - renderedCategoryItems.push(obj); + const obj = ({ + categoryItems.map((field) => { + const { title, logoUrl, packType, name } = field; + return ; + }) + }) + return obj; } }); return renderedCategoryItems; @@ -156,9 +146,9 @@ export default function Technologies({ data, repositories }: TechnologiesProps) algorithm: isDarkTheme ? darkAlgorithm : defaultAlgorithm, }}> - +
- + {renderPacksCategories()}
diff --git a/src/components/Technologies/TechnologyCard.tsx b/src/components/Technologies/TechnologyCard.tsx index 394a7cd224..3735eb3dff 100644 --- a/src/components/Technologies/TechnologyCard.tsx +++ b/src/components/Technologies/TechnologyCard.tsx @@ -1,7 +1,7 @@ import React from "react"; -import { useHistory } from "react-router-dom"; import styles from "./Technologies.module.scss"; import PackCardIcon from "./PackCardIcon"; +import Link from "@docusaurus/Link"; interface TechnologyCardProps { name: string; @@ -11,17 +11,12 @@ interface TechnologyCardProps { } export default function TechnologyCard({ name, title, logoUrl, type }: TechnologyCardProps) { - const history = useHistory(); - const handleClick = () => { - history.push({ - pathname: `/integrations/packs/${name}`, - }); - }; - return ( -
handleClick()}> - -
{title}
+
+ + +
{title}
+
); } diff --git a/src/components/Technologies/PackConstants.ts b/src/constants/packs.ts similarity index 100% rename from src/components/Technologies/PackConstants.ts rename to src/constants/packs.ts diff --git a/src/services/api/index.js b/src/services/api/index.js index 59ecef096c..a4aec3cbff 100644 --- a/src/services/api/index.js +++ b/src/services/api/index.js @@ -34,9 +34,9 @@ axiosRetry(api, { }); -function callRateLimitAPI(urls) { +function callRateLimitAPI(urls, method, payload) { return Promise.allSettled( - urls.map(url => limit(() => (api.get(url)).catch(e => e))) + urls.map(url => limit(() => (api[method](url, payload)).catch(e => e))) ); } From 954d6f59034adff3163b4eb96af4a6efbef8d8f0 Mon Sep 17 00:00:00 2001 From: nage1234 <88926279+nage1234@users.noreply.github.com> Date: Tue, 30 Apr 2024 00:20:26 +0530 Subject: [PATCH 22/23] addressed few more review comments --- plugins/packs-integrations.js | 20 +++++++++---------- src/components/PacksReadme/PacksReadme.tsx | 20 +++++++++---------- .../CategorySelector/FilterSelect.tsx | 19 ++++++++---------- src/components/Technologies/PacksFilters.tsx | 12 +++++------ src/services/api/index.js | 6 ++---- 5 files changed, 36 insertions(+), 41 deletions(-) diff --git a/plugins/packs-integrations.js b/plugins/packs-integrations.js index a6f36e4419..aff831ce10 100644 --- a/plugins/packs-integrations.js +++ b/plugins/packs-integrations.js @@ -1,5 +1,4 @@ const { api, callRateLimitAPI } = require("../src/services/api"); -const { setTimeout } = require("timers/promises"); const { packTypeNames, addOnTypes, layerTypes } = require("../src/constants//packs"); const packDescription = require("../static/packs-data/packs_information.json"); const { coerce, rcompare } = require('semver'); @@ -158,10 +157,10 @@ function generateRoutes(packDataMap, packsData) { async function fetchPackListItems(queryParams, packDataArr, counter) { const payload = { filter: { type: ["spectro", "oci"] } }; - const response = await callRateLimitAPI(["/v1/packs/search" + queryParams], 'post', payload); - const tempPackArr = packDataArr.concat(response[0]?.value.data.items); - if (response[0]?.value.data.listmeta.continue) { - return fetchPackListItems("?limit=100&continue=" + response[0]?.value.data.listmeta.continue, tempPackArr, counter); + const response = await callRateLimitAPI("/v1/packs/search" + queryParams, 'post', payload); + const tempPackArr = packDataArr.concat(response?.data?.items); + if (response?.data?.listmeta?.continue) { + return fetchPackListItems("?limit=100&continue=" + response.data.listmeta.continue, tempPackArr, counter); } else { return tempPackArr; } @@ -197,7 +196,7 @@ async function pluginPacksAndIntegrationsData(context, options) { const repositories = options.repositories || []; const mappedRepos = await mapRepositories(repositories); let packDataArr = await fetchPackListItems("?limit=100", [], 0); - console.info("completed the fetch of all the names of the pack") + console.info("completed the fetch of all the names of the pack"); packDataArr = packDataArr.filter((pack) => { return (((layerTypes.includes(pack.spec.layer) || (pack.spec.layer === "addon") && (addOnTypes.includes(pack.spec.addonType))) && pack.spec.registries.length && isSelectedRegistry(pack.spec.registries, mappedRepos))) @@ -205,12 +204,13 @@ async function pluginPacksAndIntegrationsData(context, options) { const packUrl = "v1/packs/"; const packMDMap = new Map(); let apiPacksData = []; - const urls = packDataArr.map((packData) => { + const promises = packDataArr.map((packData) => { packMDMap[packData.spec.name] = packData; const cloudType = packData.spec.cloudTypes.includes("all") ? "aws" : packData.spec.cloudTypes[0]; - return (`${packUrl}${packData.spec.name}/registries/${packData.spec.registries[0].uid}?cloudType=${cloudType}&layer=${packData.spec.layer}`); - }) - const results = await callRateLimitAPI(urls, 'get', {}); + const url = `${packUrl}${packData.spec.name}/registries/${packData.spec.registries[0].uid}?cloudType=${cloudType}&layer=${packData.spec.layer}`; + return callRateLimitAPI(url, 'get', {}); + }); + const results = await Promise.allSettled(promises); apiPacksData = results.filter(result => result.status === "fulfilled" && result.value?.data).map((pack) => pack.value?.data); console.info("completed the fetch of all the pack details"); return { packsPaletteData: packMDMap, packsPaletteDetailsData: apiPacksData, packsDescription: packDescription, repositories: mappedRepos }; diff --git a/src/components/PacksReadme/PacksReadme.tsx b/src/components/PacksReadme/PacksReadme.tsx index 31c037bdfa..b343c9d7d5 100644 --- a/src/components/PacksReadme/PacksReadme.tsx +++ b/src/components/PacksReadme/PacksReadme.tsx @@ -47,17 +47,17 @@ export default function PacksReadme() { }, []); const packData = useMemo(() => { - const _packData = packs.find((pack) => pack.name === packName); - if (_packData) { + const pack = packs.find((pack) => pack.name === packName); + if (pack) { const packDataInfo: PackReadmeProps = { - customDescription: _packData.description, - packReadme: _packData.readme, - versions: _packData.versions, - title: _packData.title, - logoUrl: _packData.logoUrl, - type: _packData.packType, - provider: _packData.cloudTypes, - registries: _packData.registries, + customDescription: pack.description, + packReadme: pack.readme, + versions: pack.versions, + title: pack.title, + logoUrl: pack.logoUrl, + type: pack.packType, + provider: pack.cloudTypes, + registries: pack.registries, selectedRepositories: repositories, }; return packDataInfo; diff --git a/src/components/Technologies/CategorySelector/FilterSelect.tsx b/src/components/Technologies/CategorySelector/FilterSelect.tsx index 2b27611aa5..3aaaf7c6bf 100644 --- a/src/components/Technologies/CategorySelector/FilterSelect.tsx +++ b/src/components/Technologies/CategorySelector/FilterSelect.tsx @@ -3,14 +3,11 @@ import { Select } from "antd"; import filterStyles from "./CategorySelector.module.scss"; interface FilterSelectProps { selectMode?: string; - options: any[]; - setSelectedSearchFilters: (...args: any) => void; + options: { value: string, label: string }[]; + onChange: (...args: any) => void; }; -interface SelectOption { - key: string, - name: string -} -export default function FilterSelect({ selectMode, options, setSelectedSearchFilters }: FilterSelectProps) { + +export default function FilterSelect({ selectMode, options, onChange }: FilterSelectProps) { return (
onChange(item)} + onChange={onChange} + value={value} > {options.map((item) => { return ( diff --git a/src/components/Technologies/PacksFilters.tsx b/src/components/Technologies/PacksFilters.tsx index cd95adf473..fd65a83764 100644 --- a/src/components/Technologies/PacksFilters.tsx +++ b/src/components/Technologies/PacksFilters.tsx @@ -1,18 +1,17 @@ import React from "react"; import styles from "./PackFilters.module.scss"; -import filterStyles from "./CategorySelector/CategorySelector.module.scss"; import CustomLabel from "./CategorySelector/CustomLabel"; import AdditionalFilters from "./CategorySelector/AdditionalFilters"; import FilterSelect from "./CategorySelector/FilterSelect"; import { packTypeNames, cloudProviderTypes } from "../../constants/packs"; -import { Select } from "antd"; interface PackFiltersProps { categories: string[]; registries: any[]; setSelectedSearchFilters: (...args: any[]) => void; + selectedFilters: any; } -export default function PacksFilters({ categories, registries, setSelectedSearchFilters }: PackFiltersProps) { +export default function PacksFilters({ categories, registries, setSelectedSearchFilters, selectedFilters }: PackFiltersProps) { const additionalFiltersProps: string[] = [ "verified", "community" ]; @@ -28,11 +27,12 @@ export default function PacksFilters({ categories, registries, setSelectedSearch
{ return { value: category, label: packTypeNames[category as keyof typeof packTypeNames] }; })} onChange={(items) => setSelectedSearchFilters({ category: items })} + value={selectedFilters.category} />
@@ -43,6 +43,7 @@ export default function PacksFilters({ categories, registries, setSelectedSearch return { value: registry.uid, label: registry.name }; })} onChange={(items) => setSelectedSearchFilters({ registries: items })} + value={selectedFilters.registries} />
@@ -52,12 +53,13 @@ export default function PacksFilters({ categories, registries, setSelectedSearch return { value: provider.name, label: provider.displayName }; })} onChange={(item) => { - if(item) { + if (item) { setSelectedSearchFilters({ cloudTypes: [item] }) } else { setSelectedSearchFilters({ cloudTypes: [] }) } }} + value={selectedFilters.cloudTypes.length ? selectedFilters.cloudTypes[0] : ""} />
diff --git a/src/components/Technologies/Technologies.tsx b/src/components/Technologies/Technologies.tsx index 3262c1ee0b..e504506c3c 100644 --- a/src/components/Technologies/Technologies.tsx +++ b/src/components/Technologies/Technologies.tsx @@ -145,7 +145,7 @@ export default function Technologies({ data, repositories }: TechnologiesProps) - +
diff --git a/src/services/api/index.js b/src/services/api/index.js index 598d8a91c3..9cc91f61e1 100644 --- a/src/services/api/index.js +++ b/src/services/api/index.js @@ -34,8 +34,8 @@ axiosRetry(api, { }); -function callRateLimitAPI(url, method, payload) { - return limit(() => (api[method](url, payload)).catch(e => e)); +function callRateLimitAPI(delayedApiCall) { + return limit(delayedApiCall) } module.exports = { api, callRateLimitAPI };