diff --git a/package-lock.json b/package-lock.json index 3fee86d18..596b2cc6f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -73,7 +73,7 @@ "lodash": "^4.6.0", "minimist": "^1.2.6", "mobx": "^6.1.5", - "mongodb-chatbot-ui": "^0.1.2", + "mongodb-chatbot-ui": "^0.4.0", "no-scroll": "^2.1.1", "node-fetch": "^3.3.2", "process": "^0.11.10", @@ -3664,27 +3664,28 @@ } }, "node_modules/@leafygreen-ui/a11y": { - "version": "1.4.10", - "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@leafygreen-ui/a11y/-/a11y-1.4.10.tgz", - "integrity": "sha512-Mp3ttmutq1yDr27DXGQaqsBe4AuGyIBuBH9yQWIluIF/raTF7GLFceqa0Fa9k228FfoBis+ApASHvmS+57Gctw==", + "version": "1.4.12", + "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@leafygreen-ui/a11y/-/a11y-1.4.12.tgz", + "integrity": "sha512-JYpXbcPN6cbURBYEVW186gU/n4ibmmoBsD0IEtnxDl7jGir7aT7s6hd3L9nbOQEzcYfzDNHYg1CWvOHktanpkQ==", "dependencies": { "@leafygreen-ui/emotion": "^4.0.7", - "@leafygreen-ui/hooks": "^8.0.0", - "@leafygreen-ui/lib": "^12.0.0" + "@leafygreen-ui/hooks": "^8.1.0", + "@leafygreen-ui/lib": "^13.2.0" } }, "node_modules/@leafygreen-ui/a11y/node_modules/@leafygreen-ui/hooks": { - "version": "8.0.0", - "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@leafygreen-ui/hooks/-/hooks-8.0.0.tgz", - "integrity": "sha512-SpcjqRlPsRW5DsfqGdjf11N0f3JJw+bl5dOlp43Biz0RuJHJtt0h8b0D5Ig5dCn0jBDNiGNazG2lshX+btd9iA==", + "version": "8.1.1", + "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@leafygreen-ui/hooks/-/hooks-8.1.1.tgz", + "integrity": "sha512-Ovh4/huQbM3UVSnHDQE0rWWG8bxZG7qdI2RZYtmUW/YbAL66GQx3jkfpuLlL3Npu5SxuS6b/Ai42sB2U6+Df0A==", "dependencies": { + "@leafygreen-ui/lib": "^13.2.1", "lodash": "^4.17.21" } }, "node_modules/@leafygreen-ui/a11y/node_modules/@leafygreen-ui/lib": { - "version": "12.0.0", - "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@leafygreen-ui/lib/-/lib-12.0.0.tgz", - "integrity": "sha512-nhaxi4oBesnizxO0YK7XwcmiLL9U5QuN7lkZdWGDdmoJgNNL+aRju4W5vmZc7vcazSHfr3gAL+NFAGaAuopyRA==", + "version": "13.2.1", + "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@leafygreen-ui/lib/-/lib-13.2.1.tgz", + "integrity": "sha512-b9EwTr65RU05rAh/dF8SHZ6yV6jPvPx6tu0IlXB/upk7Mdswjad83CI1ceF2pDlo8GPhCKlwFvPZlQCR1jqBXA==", "dependencies": { "@storybook/csf": "^0.1.0", "lodash": "^4.17.21", @@ -3695,9 +3696,9 @@ } }, "node_modules/@leafygreen-ui/a11y/node_modules/@storybook/csf": { - "version": "0.1.1", - "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@storybook/csf/-/csf-0.1.1.tgz", - "integrity": "sha512-4hE3AlNVxR60Wc5KSC68ASYzUobjPqtSKyhV6G+ge0FIXU55N5nTY7dXGRZHQGDBPq+XqchMkIdlkHPRs8nTHg==", + "version": "0.1.2", + "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@storybook/csf/-/csf-0.1.2.tgz", + "integrity": "sha512-ePrvE/pS1vsKR9Xr+o+YwdqNgHUyXvg+1Xjx0h9LrVx7Zq4zNe06pd63F5EvzTbCbJsHj7GHr9tkiaqm7U8WRA==", "dependencies": { "type-fest": "^2.19.0" } @@ -9872,8 +9873,9 @@ "license": "MIT" }, "node_modules/classnames": { - "version": "2.3.2", - "license": "MIT" + "version": "2.5.1", + "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/classnames/-/classnames-2.5.1.tgz", + "integrity": "sha512-saHYOzhIQs6wy2sVxTM6bUDsQO4F50V9RQ22qBpEdCW+I+/Wmke2HOl6lS6dTpdxVhb88/I6+Hs+438c3lfUow==" }, "node_modules/clean-stack": { "version": "2.2.0", @@ -19207,9 +19209,9 @@ } }, "node_modules/mongodb-chatbot-ui": { - "version": "0.1.2", - "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/mongodb-chatbot-ui/-/mongodb-chatbot-ui-0.1.2.tgz", - "integrity": "sha512-VWuDmbDfUlJgqnIuEMWX7EkaZfbXEoberkKrhKeNvq+cVkvvw52KoNL9awAUuGiu5kBfjHZFYaugvy9aZQ8o7A==", + "version": "0.4.0", + "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/mongodb-chatbot-ui/-/mongodb-chatbot-ui-0.4.0.tgz", + "integrity": "sha512-TqY5L1fFL2EeDgbMk2+duTn4BFiwy08C/SZ4zMNEDY7NE5Dt0zKIC7CepSJd6yjyaiNEbb2KcYg/b4zGHWTDOg==", "bundleDependencies": [ "mongodb-rag-core", "@lg-chat/avatar", @@ -19220,6 +19222,7 @@ "@lg-chat/leafygreen-chat-provider", "@lg-chat/message", "@lg-chat/message-feed", + "@lg-chat/message-feedback", "@lg-chat/message-prompts", "@lg-chat/message-rating" ], @@ -19236,7 +19239,7 @@ "@leafygreen-ui/leafygreen-provider": "^3.1.6", "@leafygreen-ui/loading-indicator": "^2.0.3", "@leafygreen-ui/menu": "^22.0.5", - "@leafygreen-ui/modal": "^15.0.6", + "@leafygreen-ui/modal": "^16.0.3", "@leafygreen-ui/palette": "^4.0.7", "@leafygreen-ui/skeleton-loader": "^1.0.5", "@leafygreen-ui/text-input": "^12.1.18", @@ -19250,10 +19253,12 @@ "@lg-chat/leafygreen-chat-provider": "^1.0.2", "@lg-chat/message": "^2.0.8", "@lg-chat/message-feed": "^2.0.7", + "@lg-chat/message-feedback": "^1.0.0", "@lg-chat/message-prompts": "^1.0.2", "@lg-chat/message-rating": "^1.1.3", "@microsoft/fetch-event-source": "^2.0.1", "buffer": "^6.0.3", + "classnames": "^2.5.1", "esbuild": "^0.17.19", "mongodb-rag-core": "^0.0.5", "prettier": "^2.8.8", @@ -19350,20 +19355,33 @@ } }, "node_modules/mongodb-chatbot-ui/node_modules/@leafygreen-ui/icon-button": { - "version": "15.0.17", - "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@leafygreen-ui/icon-button/-/icon-button-15.0.17.tgz", - "integrity": "sha512-2gKZKLwGDoyhOmiYvSDRssk1OU/jSraIU4prT40lLgqZFCmA2nqDr7Hfb+W62QNvEGchoXNOXzm8KG/yrJBl2Q==", + "version": "15.0.19", + "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@leafygreen-ui/icon-button/-/icon-button-15.0.19.tgz", + "integrity": "sha512-TXNFHpfuMXIcMQHW/D31GEFby63qhBLyeI5CLL8KQjD5Xom3Q6fqviu/eyXE097jTzQtd1dO/2IIiqyyLRW30g==", "dependencies": { - "@leafygreen-ui/a11y": "^1.4.8", + "@leafygreen-ui/a11y": "^1.4.11", "@leafygreen-ui/box": "^3.1.8", "@leafygreen-ui/emotion": "^4.0.7", "@leafygreen-ui/icon": "^11.22.2", - "@leafygreen-ui/lib": "^11.0.0", + "@leafygreen-ui/lib": "^13.0.0", "@leafygreen-ui/palette": "^4.0.7", "@leafygreen-ui/tokens": "^2.1.4" }, "peerDependencies": { - "@leafygreen-ui/leafygreen-provider": "^3.1.7" + "@leafygreen-ui/leafygreen-provider": "^3.1.10" + } + }, + "node_modules/mongodb-chatbot-ui/node_modules/@leafygreen-ui/icon-button/node_modules/@leafygreen-ui/lib": { + "version": "13.2.1", + "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@leafygreen-ui/lib/-/lib-13.2.1.tgz", + "integrity": "sha512-b9EwTr65RU05rAh/dF8SHZ6yV6jPvPx6tu0IlXB/upk7Mdswjad83CI1ceF2pDlo8GPhCKlwFvPZlQCR1jqBXA==", + "dependencies": { + "@storybook/csf": "^0.1.0", + "lodash": "^4.17.21", + "prop-types": "^15.7.2" + }, + "peerDependencies": { + "react": "^17.0.0 || ^18.0.0" } }, "node_modules/mongodb-chatbot-ui/node_modules/@leafygreen-ui/leafygreen-provider": { @@ -19389,46 +19407,39 @@ } }, "node_modules/mongodb-chatbot-ui/node_modules/@leafygreen-ui/modal": { - "version": "15.0.6", - "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@leafygreen-ui/modal/-/modal-15.0.6.tgz", - "integrity": "sha512-GJ4SEwKQ1NU8xm1P/KJvRfCZVD0yZrXtI1xh0Lay/w4wy4XCAYwIUHm2sV2ydrGLd2VeCT1onflJsZDLU6MrOw==", + "version": "16.0.4", + "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@leafygreen-ui/modal/-/modal-16.0.4.tgz", + "integrity": "sha512-A/pN07zdLRKZG/gm0b8sf7689ZCQQAZs2MGWiyCVyBHPuGMEmoUO6f/pSU+oA/LsW9S9QAKD6Wdyyi6WLPD7qw==", "dependencies": { "@leafygreen-ui/emotion": "^4.0.7", - "@leafygreen-ui/hooks": "^7.7.8", - "@leafygreen-ui/icon": "^11.22.1", - "@leafygreen-ui/icon-button": "^15.0.16", - "@leafygreen-ui/lib": "^10.4.3", + "@leafygreen-ui/hooks": "^8.0.0", + "@leafygreen-ui/icon": "^11.23.0", + "@leafygreen-ui/icon-button": "^15.0.19", + "@leafygreen-ui/lib": "^13.0.0", "@leafygreen-ui/palette": "^4.0.7", - "@leafygreen-ui/portal": "^4.1.7", - "@leafygreen-ui/tokens": "^2.1.4", - "focus-trap-react": "^8.10.0", + "@leafygreen-ui/portal": "^5.0.3", + "@leafygreen-ui/tokens": "^2.2.0", + "focus-trap": "6.9.4", + "focus-trap-react": "^9.0.2", "polished": "^4.2.2", "prop-types": "^15.8.1", - "react-transition-group": "^4.4.1" + "react-transition-group": "^4.4.5" }, "peerDependencies": { - "@leafygreen-ui/leafygreen-provider": "^3.1.6" - } - }, - "node_modules/mongodb-chatbot-ui/node_modules/@leafygreen-ui/modal/node_modules/@leafygreen-ui/hooks": { - "version": "7.7.8", - "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@leafygreen-ui/hooks/-/hooks-7.7.8.tgz", - "integrity": "sha512-8n0GjAxIxXN1e7XcZ2bobdI56XCqbtH3AZTbWTgQdILnTdxuA/9+yif1zIP4L8shoUbcosuMwU5HRu4UnX9n1g==", - "dependencies": { - "lodash": "^4.17.21" + "@leafygreen-ui/leafygreen-provider": "^3.1.10" } }, "node_modules/mongodb-chatbot-ui/node_modules/@leafygreen-ui/modal/node_modules/@leafygreen-ui/lib": { - "version": "10.4.3", - "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@leafygreen-ui/lib/-/lib-10.4.3.tgz", - "integrity": "sha512-p5BtXHeQsvLnnrN0eunPFZeaMtW9z7Mbvm2WOS9lvnAySj8xZp5Vn9Y3XjyYLbPhpGVBhhOAJFP3YMxbP9DKgg==", + "version": "13.2.1", + "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@leafygreen-ui/lib/-/lib-13.2.1.tgz", + "integrity": "sha512-b9EwTr65RU05rAh/dF8SHZ6yV6jPvPx6tu0IlXB/upk7Mdswjad83CI1ceF2pDlo8GPhCKlwFvPZlQCR1jqBXA==", "dependencies": { "@storybook/csf": "^0.1.0", "lodash": "^4.17.21", "prop-types": "^15.7.2" }, "peerDependencies": { - "react": "^17.0.0" + "react": "^17.0.0 || ^18.0.0" } }, "node_modules/mongodb-chatbot-ui/node_modules/@leafygreen-ui/palette": { @@ -19452,18 +19463,31 @@ "@leafygreen-ui/leafygreen-provider": "^3.1.8" } }, - "node_modules/mongodb-chatbot-ui/node_modules/@leafygreen-ui/popover/node_modules/@leafygreen-ui/portal": { - "version": "5.0.1", - "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@leafygreen-ui/portal/-/portal-5.0.1.tgz", - "integrity": "sha512-SL+Kw2088aopilmzKOTfzWE4tVKyRyClr1nnOaX+xplQ+6gu22C+LDFL4cJZkkWyP8WlqAE+2s1C631W3uHbPg==", + "node_modules/mongodb-chatbot-ui/node_modules/@leafygreen-ui/portal": { + "version": "5.0.3", + "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@leafygreen-ui/portal/-/portal-5.0.3.tgz", + "integrity": "sha512-vwoZHtdrMzR5uBsfxAvl1kdB/xtQwtfpRTuCqC5Q3X+DsLg9JReDl+5dsGMegwDwkqwzsndYVGpq0BcFuDITXQ==", "dependencies": { "@leafygreen-ui/hooks": "^8.0.0", - "@leafygreen-ui/lib": "^11.0.0" + "@leafygreen-ui/lib": "^13.0.0" }, "peerDependencies": { "react-dom": "^17.0.0 || ^18.0.0" } }, + "node_modules/mongodb-chatbot-ui/node_modules/@leafygreen-ui/portal/node_modules/@leafygreen-ui/lib": { + "version": "13.2.1", + "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@leafygreen-ui/lib/-/lib-13.2.1.tgz", + "integrity": "sha512-b9EwTr65RU05rAh/dF8SHZ6yV6jPvPx6tu0IlXB/upk7Mdswjad83CI1ceF2pDlo8GPhCKlwFvPZlQCR1jqBXA==", + "dependencies": { + "@storybook/csf": "^0.1.0", + "lodash": "^4.17.21", + "prop-types": "^15.7.2" + }, + "peerDependencies": { + "react": "^17.0.0 || ^18.0.0" + } + }, "node_modules/mongodb-chatbot-ui/node_modules/@leafygreen-ui/select": { "version": "10.3.14", "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@leafygreen-ui/select/-/select-10.3.14.tgz", @@ -19520,6 +19544,20 @@ "@types/react": "*" } }, + "node_modules/mongodb-chatbot-ui/node_modules/focus-trap-react": { + "version": "9.0.2", + "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/focus-trap-react/-/focus-trap-react-9.0.2.tgz", + "integrity": "sha512-ZwhO5by6KG5r3dy48Lk00A1/0zNYw1Z3RZTN6O6kgAPsWFcwTFszOcQ1dLSfM8pIxpS/ttc7wTttJowjVT3jpg==", + "dependencies": { + "focus-trap": "^6.9.4", + "tabbable": "^5.3.3" + }, + "peerDependencies": { + "prop-types": "^15.8.1", + "react": ">=16.3.0", + "react-dom": ">=16.3.0" + } + }, "node_modules/mongodb-chatbot-ui/node_modules/react-is": { "version": "18.2.0", "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/react-is/-/react-is-18.2.0.tgz", @@ -27741,27 +27779,28 @@ } }, "@leafygreen-ui/a11y": { - "version": "1.4.10", - "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@leafygreen-ui/a11y/-/a11y-1.4.10.tgz", - "integrity": "sha512-Mp3ttmutq1yDr27DXGQaqsBe4AuGyIBuBH9yQWIluIF/raTF7GLFceqa0Fa9k228FfoBis+ApASHvmS+57Gctw==", + "version": "1.4.12", + "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@leafygreen-ui/a11y/-/a11y-1.4.12.tgz", + "integrity": "sha512-JYpXbcPN6cbURBYEVW186gU/n4ibmmoBsD0IEtnxDl7jGir7aT7s6hd3L9nbOQEzcYfzDNHYg1CWvOHktanpkQ==", "requires": { "@leafygreen-ui/emotion": "^4.0.7", - "@leafygreen-ui/hooks": "^8.0.0", - "@leafygreen-ui/lib": "^12.0.0" + "@leafygreen-ui/hooks": "^8.1.0", + "@leafygreen-ui/lib": "^13.2.0" }, "dependencies": { "@leafygreen-ui/hooks": { - "version": "8.0.0", - "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@leafygreen-ui/hooks/-/hooks-8.0.0.tgz", - "integrity": "sha512-SpcjqRlPsRW5DsfqGdjf11N0f3JJw+bl5dOlp43Biz0RuJHJtt0h8b0D5Ig5dCn0jBDNiGNazG2lshX+btd9iA==", + "version": "8.1.1", + "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@leafygreen-ui/hooks/-/hooks-8.1.1.tgz", + "integrity": "sha512-Ovh4/huQbM3UVSnHDQE0rWWG8bxZG7qdI2RZYtmUW/YbAL66GQx3jkfpuLlL3Npu5SxuS6b/Ai42sB2U6+Df0A==", "requires": { + "@leafygreen-ui/lib": "^13.2.1", "lodash": "^4.17.21" } }, "@leafygreen-ui/lib": { - "version": "12.0.0", - "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@leafygreen-ui/lib/-/lib-12.0.0.tgz", - "integrity": "sha512-nhaxi4oBesnizxO0YK7XwcmiLL9U5QuN7lkZdWGDdmoJgNNL+aRju4W5vmZc7vcazSHfr3gAL+NFAGaAuopyRA==", + "version": "13.2.1", + "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@leafygreen-ui/lib/-/lib-13.2.1.tgz", + "integrity": "sha512-b9EwTr65RU05rAh/dF8SHZ6yV6jPvPx6tu0IlXB/upk7Mdswjad83CI1ceF2pDlo8GPhCKlwFvPZlQCR1jqBXA==", "requires": { "@storybook/csf": "^0.1.0", "lodash": "^4.17.21", @@ -27769,9 +27808,9 @@ } }, "@storybook/csf": { - "version": "0.1.1", - "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@storybook/csf/-/csf-0.1.1.tgz", - "integrity": "sha512-4hE3AlNVxR60Wc5KSC68ASYzUobjPqtSKyhV6G+ge0FIXU55N5nTY7dXGRZHQGDBPq+XqchMkIdlkHPRs8nTHg==", + "version": "0.1.2", + "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@storybook/csf/-/csf-0.1.2.tgz", + "integrity": "sha512-ePrvE/pS1vsKR9Xr+o+YwdqNgHUyXvg+1Xjx0h9LrVx7Zq4zNe06pd63F5EvzTbCbJsHj7GHr9tkiaqm7U8WRA==", "requires": { "type-fest": "^2.19.0" } @@ -32106,7 +32145,9 @@ "dev": true }, "classnames": { - "version": "2.3.2" + "version": "2.5.1", + "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/classnames/-/classnames-2.5.1.tgz", + "integrity": "sha512-saHYOzhIQs6wy2sVxTM6bUDsQO4F50V9RQ22qBpEdCW+I+/Wmke2HOl6lS6dTpdxVhb88/I6+Hs+438c3lfUow==" }, "clean-stack": { "version": "2.2.0", @@ -38090,9 +38131,9 @@ "version": "2.29.4" }, "mongodb-chatbot-ui": { - "version": "0.1.2", - "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/mongodb-chatbot-ui/-/mongodb-chatbot-ui-0.1.2.tgz", - "integrity": "sha512-VWuDmbDfUlJgqnIuEMWX7EkaZfbXEoberkKrhKeNvq+cVkvvw52KoNL9awAUuGiu5kBfjHZFYaugvy9aZQ8o7A==", + "version": "0.4.0", + "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/mongodb-chatbot-ui/-/mongodb-chatbot-ui-0.4.0.tgz", + "integrity": "sha512-TqY5L1fFL2EeDgbMk2+duTn4BFiwy08C/SZ4zMNEDY7NE5Dt0zKIC7CepSJd6yjyaiNEbb2KcYg/b4zGHWTDOg==", "requires": { "@emotion/css": "^11.11.2", "@leafygreen-ui/badge": "^8.0.11", @@ -38106,7 +38147,7 @@ "@leafygreen-ui/leafygreen-provider": "^3.1.6", "@leafygreen-ui/loading-indicator": "^2.0.3", "@leafygreen-ui/menu": "^22.0.5", - "@leafygreen-ui/modal": "^15.0.6", + "@leafygreen-ui/modal": "^16.0.3", "@leafygreen-ui/palette": "^4.0.7", "@leafygreen-ui/skeleton-loader": "^1.0.5", "@leafygreen-ui/text-input": "^12.1.18", @@ -38120,10 +38161,12 @@ "@lg-chat/leafygreen-chat-provider": "^1.0.2", "@lg-chat/message": "^2.0.8", "@lg-chat/message-feed": "^2.0.7", + "@lg-chat/message-feedback": "^1.0.0", "@lg-chat/message-prompts": "^1.0.2", "@lg-chat/message-rating": "^1.1.3", "@microsoft/fetch-event-source": "^2.0.1", "buffer": "^6.0.3", + "classnames": "^2.5.1", "esbuild": "^0.17.19", "mongodb-rag-core": "^0.0.5", "prettier": "^2.8.8", @@ -38204,17 +38247,29 @@ } }, "@leafygreen-ui/icon-button": { - "version": "15.0.17", - "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@leafygreen-ui/icon-button/-/icon-button-15.0.17.tgz", - "integrity": "sha512-2gKZKLwGDoyhOmiYvSDRssk1OU/jSraIU4prT40lLgqZFCmA2nqDr7Hfb+W62QNvEGchoXNOXzm8KG/yrJBl2Q==", + "version": "15.0.19", + "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@leafygreen-ui/icon-button/-/icon-button-15.0.19.tgz", + "integrity": "sha512-TXNFHpfuMXIcMQHW/D31GEFby63qhBLyeI5CLL8KQjD5Xom3Q6fqviu/eyXE097jTzQtd1dO/2IIiqyyLRW30g==", "requires": { - "@leafygreen-ui/a11y": "^1.4.8", + "@leafygreen-ui/a11y": "^1.4.11", "@leafygreen-ui/box": "^3.1.8", "@leafygreen-ui/emotion": "^4.0.7", "@leafygreen-ui/icon": "^11.22.2", - "@leafygreen-ui/lib": "^11.0.0", + "@leafygreen-ui/lib": "^13.0.0", "@leafygreen-ui/palette": "^4.0.7", "@leafygreen-ui/tokens": "^2.1.4" + }, + "dependencies": { + "@leafygreen-ui/lib": { + "version": "13.2.1", + "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@leafygreen-ui/lib/-/lib-13.2.1.tgz", + "integrity": "sha512-b9EwTr65RU05rAh/dF8SHZ6yV6jPvPx6tu0IlXB/upk7Mdswjad83CI1ceF2pDlo8GPhCKlwFvPZlQCR1jqBXA==", + "requires": { + "@storybook/csf": "^0.1.0", + "lodash": "^4.17.21", + "prop-types": "^15.7.2" + } + } } }, "@leafygreen-ui/leafygreen-provider": { @@ -38237,36 +38292,29 @@ } }, "@leafygreen-ui/modal": { - "version": "15.0.6", - "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@leafygreen-ui/modal/-/modal-15.0.6.tgz", - "integrity": "sha512-GJ4SEwKQ1NU8xm1P/KJvRfCZVD0yZrXtI1xh0Lay/w4wy4XCAYwIUHm2sV2ydrGLd2VeCT1onflJsZDLU6MrOw==", + "version": "16.0.4", + "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@leafygreen-ui/modal/-/modal-16.0.4.tgz", + "integrity": "sha512-A/pN07zdLRKZG/gm0b8sf7689ZCQQAZs2MGWiyCVyBHPuGMEmoUO6f/pSU+oA/LsW9S9QAKD6Wdyyi6WLPD7qw==", "requires": { "@leafygreen-ui/emotion": "^4.0.7", - "@leafygreen-ui/hooks": "^7.7.8", - "@leafygreen-ui/icon": "^11.22.1", - "@leafygreen-ui/icon-button": "^15.0.16", - "@leafygreen-ui/lib": "^10.4.3", + "@leafygreen-ui/hooks": "^8.0.0", + "@leafygreen-ui/icon": "^11.23.0", + "@leafygreen-ui/icon-button": "^15.0.19", + "@leafygreen-ui/lib": "^13.0.0", "@leafygreen-ui/palette": "^4.0.7", - "@leafygreen-ui/portal": "^4.1.7", - "@leafygreen-ui/tokens": "^2.1.4", - "focus-trap-react": "^8.10.0", + "@leafygreen-ui/portal": "^5.0.3", + "@leafygreen-ui/tokens": "^2.2.0", + "focus-trap": "6.9.4", + "focus-trap-react": "^9.0.2", "polished": "^4.2.2", "prop-types": "^15.8.1", - "react-transition-group": "^4.4.1" + "react-transition-group": "^4.4.5" }, "dependencies": { - "@leafygreen-ui/hooks": { - "version": "7.7.8", - "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@leafygreen-ui/hooks/-/hooks-7.7.8.tgz", - "integrity": "sha512-8n0GjAxIxXN1e7XcZ2bobdI56XCqbtH3AZTbWTgQdILnTdxuA/9+yif1zIP4L8shoUbcosuMwU5HRu4UnX9n1g==", - "requires": { - "lodash": "^4.17.21" - } - }, "@leafygreen-ui/lib": { - "version": "10.4.3", - "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@leafygreen-ui/lib/-/lib-10.4.3.tgz", - "integrity": "sha512-p5BtXHeQsvLnnrN0eunPFZeaMtW9z7Mbvm2WOS9lvnAySj8xZp5Vn9Y3XjyYLbPhpGVBhhOAJFP3YMxbP9DKgg==", + "version": "13.2.1", + "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@leafygreen-ui/lib/-/lib-13.2.1.tgz", + "integrity": "sha512-b9EwTr65RU05rAh/dF8SHZ6yV6jPvPx6tu0IlXB/upk7Mdswjad83CI1ceF2pDlo8GPhCKlwFvPZlQCR1jqBXA==", "requires": { "@storybook/csf": "^0.1.0", "lodash": "^4.17.21", @@ -38291,15 +38339,25 @@ "@leafygreen-ui/portal": "^5.0.1", "@leafygreen-ui/tokens": "^2.2.0", "react-transition-group": "^4.4.5" + } + }, + "@leafygreen-ui/portal": { + "version": "5.0.3", + "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@leafygreen-ui/portal/-/portal-5.0.3.tgz", + "integrity": "sha512-vwoZHtdrMzR5uBsfxAvl1kdB/xtQwtfpRTuCqC5Q3X+DsLg9JReDl+5dsGMegwDwkqwzsndYVGpq0BcFuDITXQ==", + "requires": { + "@leafygreen-ui/hooks": "^8.0.0", + "@leafygreen-ui/lib": "^13.0.0" }, "dependencies": { - "@leafygreen-ui/portal": { - "version": "5.0.1", - "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@leafygreen-ui/portal/-/portal-5.0.1.tgz", - "integrity": "sha512-SL+Kw2088aopilmzKOTfzWE4tVKyRyClr1nnOaX+xplQ+6gu22C+LDFL4cJZkkWyP8WlqAE+2s1C631W3uHbPg==", + "@leafygreen-ui/lib": { + "version": "13.2.1", + "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@leafygreen-ui/lib/-/lib-13.2.1.tgz", + "integrity": "sha512-b9EwTr65RU05rAh/dF8SHZ6yV6jPvPx6tu0IlXB/upk7Mdswjad83CI1ceF2pDlo8GPhCKlwFvPZlQCR1jqBXA==", "requires": { - "@leafygreen-ui/hooks": "^8.0.0", - "@leafygreen-ui/lib": "^11.0.0" + "@storybook/csf": "^0.1.0", + "lodash": "^4.17.21", + "prop-types": "^15.7.2" } } } @@ -38354,6 +38412,15 @@ "@types/react": "*" } }, + "focus-trap-react": { + "version": "9.0.2", + "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/focus-trap-react/-/focus-trap-react-9.0.2.tgz", + "integrity": "sha512-ZwhO5by6KG5r3dy48Lk00A1/0zNYw1Z3RZTN6O6kgAPsWFcwTFszOcQ1dLSfM8pIxpS/ttc7wTttJowjVT3jpg==", + "requires": { + "focus-trap": "^6.9.4", + "tabbable": "^5.3.3" + } + }, "react-is": { "version": "18.2.0", "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/react-is/-/react-is-18.2.0.tgz", diff --git a/package.json b/package.json index a2b114004..f68621143 100644 --- a/package.json +++ b/package.json @@ -122,7 +122,7 @@ "lodash": "^4.6.0", "minimist": "^1.2.6", "mobx": "^6.1.5", - "mongodb-chatbot-ui": "^0.1.2", + "mongodb-chatbot-ui": "^0.4.0", "no-scroll": "^2.1.1", "node-fetch": "^3.3.2", "process": "^0.11.10", diff --git a/src/components/ChatbotUi.js b/src/components/ChatbotUi.js index 27a71b53e..c9864db60 100644 --- a/src/components/ChatbotUi.js +++ b/src/components/ChatbotUi.js @@ -95,7 +95,7 @@ const ChatbotUi = ({ template }) => { {/* We wrapped this in a Suspense. We can use this opportunity to render a loading state if we decided we want that */} }> - + { }; export default ChatbotUi; +export const DEFAULT_MAX_INPUT = 300; diff --git a/src/components/Widgets/ChatbotWidget/ChatbotFab.js b/src/components/Widgets/ChatbotWidget/ChatbotFab.js index 45b0d1236..01a251b92 100644 --- a/src/components/Widgets/ChatbotWidget/ChatbotFab.js +++ b/src/components/Widgets/ChatbotWidget/ChatbotFab.js @@ -1,6 +1,8 @@ import { lazy } from 'react'; import styled from '@emotion/styled'; import { useSiteMetadata } from '../../../hooks/use-site-metadata'; +import { DEFAULT_MAX_INPUT } from '../../ChatbotUi'; +import MongoDbLegalDisclosure from './MongoDBLegal'; const Chatbot = lazy(() => import('mongodb-chatbot-ui')); const FloatingActionButtonTrigger = lazy(() => @@ -32,12 +34,13 @@ const ChatbotFab = () => { // Classname below to help ignore element for screenshots className={fabChatbot} > - + } initialMessageText="Welcome to MongoDB AI Assistant. What can I help you with?" initialMessageSuggestedPrompts={suggestedPrompts} - showDisclaimer + inputBottomText={BOTTOM_TEXT} /> @@ -46,4 +49,6 @@ const ChatbotFab = () => { export const fabChatbot = 'fab-chatbot'; export const CHATBOT_WIDGET_TEXT = 'Ask MongoDB AI'; +export const BOTTOM_TEXT = + 'This is an experimental generative AI chatbot. All information should be verified prior to use.'; export default ChatbotFab; diff --git a/src/components/Widgets/ChatbotWidget/MongoDBLegal.js b/src/components/Widgets/ChatbotWidget/MongoDBLegal.js new file mode 100644 index 000000000..8019c9934 --- /dev/null +++ b/src/components/Widgets/ChatbotWidget/MongoDBLegal.js @@ -0,0 +1,23 @@ +import { Body, Link } from '@leafygreen-ui/typography'; + +const MongoDbLegalDisclosure = () => { + const TermsOfUse = () => ( + + Terms of Use + + ); + const AcceptableUsePolicy = () => ( + + Acceptable Use Policy + + ); + + return ( + + This is a generative AI chatbot. By interacting with it, you agree to MongoDB's and{' '} + . + + ); +}; + +export default MongoDbLegalDisclosure;