impact-ui 5.0.4 → 5.0.5-chatbot.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/ArrowBack.js +4 -0
- package/dist/_virtual/AttachFileOutlined.js +4 -0
- package/dist/_virtual/ContentCopyOutlined.js +4 -0
- package/dist/_virtual/Menu.js +4 -0
- package/dist/_virtual/NorthRounded.js +4 -0
- package/dist/_virtual/RefreshOutlined.js +4 -0
- package/dist/_virtual/StopRounded.js +4 -0
- package/dist/_virtual/VolumeUpOutlined.js +4 -0
- package/dist/_virtual/index2.js +2 -2
- package/dist/_virtual/index3.js +2 -2
- package/dist/_virtual/index4.js +4 -2
- package/dist/_virtual/index5.js +3 -3
- package/dist/_virtual/index6.js +2 -4
- package/dist/components/AccordionModern/index.js +1 -1
- package/dist/components/Badge/index.js +1 -1
- package/dist/components/Breadcrumbs/index.js +1 -1
- package/dist/components/Button/index.js +1 -1
- package/dist/components/ButtonGroup/index.js +1 -1
- package/dist/components/Chatbot/Chatbot.types.d.ts +253 -186
- package/dist/components/Chatbot/Chatbot.types.d.ts.map +1 -1
- package/dist/components/Chatbot/chatBotFooter.d.ts +1 -1
- package/dist/components/Chatbot/chatBotFooter.d.ts.map +1 -1
- package/dist/components/Chatbot/chatBotFooter.js +21 -4
- package/dist/components/Chatbot/chatbotComposer.d.ts +4 -0
- package/dist/components/Chatbot/chatbotComposer.d.ts.map +1 -0
- package/dist/components/Chatbot/chatbotComposer.js +328 -0
- package/dist/components/Chatbot/chatbotGreetingHeader.d.ts +4 -0
- package/dist/components/Chatbot/chatbotGreetingHeader.d.ts.map +1 -0
- package/dist/components/Chatbot/chatbotGreetingHeader.js +226 -0
- package/dist/components/Chatbot/greetingWeather.d.ts +23 -0
- package/dist/components/Chatbot/greetingWeather.d.ts.map +1 -0
- package/dist/components/Chatbot/greetingWeather.js +81 -0
- package/dist/components/Chatbot/greetingWeather.test.d.ts +2 -0
- package/dist/components/Chatbot/greetingWeather.test.d.ts.map +1 -0
- package/dist/components/Chatbot/index.d.ts +5 -2
- package/dist/components/Chatbot/index.d.ts.map +1 -1
- package/dist/components/Chatbot/index.js +390 -421
- package/dist/components/Chatbot/irisConversationThread.d.ts +24 -0
- package/dist/components/Chatbot/irisConversationThread.d.ts.map +1 -0
- package/dist/components/Chatbot/irisConversationThread.js +511 -0
- package/dist/components/Chatbot/irisGreetingBackdrop.d.ts +5 -0
- package/dist/components/Chatbot/irisGreetingBackdrop.d.ts.map +1 -0
- package/dist/components/Chatbot/irisGreetingBackdrop.js +62 -0
- package/dist/components/Chatbot/irisMenuListItem.d.ts +11 -0
- package/dist/components/Chatbot/irisMenuListItem.d.ts.map +1 -0
- package/dist/components/Chatbot/irisMenuListItem.js +126 -0
- package/dist/components/Chatbot/irisMenuScreen.d.ts +4 -0
- package/dist/components/Chatbot/irisMenuScreen.d.ts.map +1 -0
- package/dist/components/Chatbot/irisMenuScreen.js +357 -0
- package/dist/components/Chatbot/irisThinking.d.ts +7 -0
- package/dist/components/Chatbot/irisThinking.d.ts.map +1 -0
- package/dist/components/Chatbot/irisThinking.js +219 -0
- package/dist/components/Chatbot/newChatComponent.d.ts +1 -1
- package/dist/components/Chatbot/newChatComponent.d.ts.map +1 -1
- package/dist/components/Chatbot/newChatComponent.js +497 -72
- package/dist/components/Chips/index.js +1 -1
- package/dist/components/CommentsPanel/CommentsPanel.impl.js +1 -1
- package/dist/components/DatePicker/DatePicker.types.d.ts +4 -0
- package/dist/components/DatePicker/DatePicker.types.d.ts.map +1 -1
- package/dist/components/DatePicker/datePickerInput.d.ts +2 -0
- package/dist/components/DatePicker/datePickerInput.d.ts.map +1 -1
- package/dist/components/DatePicker/datePickerInput.js +32 -2
- package/dist/components/DatePicker/index.d.ts.map +1 -1
- package/dist/components/DatePicker/index.js +5 -1
- package/dist/components/DatePicker/showMonthYearSelect.d.ts.map +1 -1
- package/dist/components/DatePicker/showMonthYearSelect.js +2 -0
- package/dist/components/DateRangePicker/index.js +1 -1
- package/dist/components/DateRangePicker/showMonthYearSelect.d.ts.map +1 -1
- package/dist/components/DateRangePicker/showMonthYearSelect.js +2 -0
- package/dist/components/FileUpload/index.js +1 -1
- package/dist/components/FilterPanel/index.js +1 -1
- package/dist/components/FiltersStrip/FilterSlider.js +1 -1
- package/dist/components/FiltersStrip/index.js +1 -1
- package/dist/components/Input/index.js +1 -1
- package/dist/components/KeyboardShortCuts/ShortcutLandingPage.js +1 -1
- package/dist/components/KeyboardShortCuts/ShortcutModal.js +1 -1
- package/dist/components/KeyboardShortCuts/allSetBox.js +1 -1
- package/dist/components/KeyboardShortCuts/index.js +1 -1
- package/dist/components/KeyboardShortCuts/tutorial.js +1 -1
- package/dist/components/Menu/IconMenuItem.js +1 -1
- package/dist/components/Menu/NestedMenuItem.js +1 -1
- package/dist/components/Menu/index.js +1 -1
- package/dist/components/Menu/nestedMenuItemsFromObject.js +1 -1
- package/dist/components/Modal/index.js +1 -1
- package/dist/components/MonthPicker/index.js +1 -1
- package/dist/components/MonthRangePicker/index.js +1 -1
- package/dist/components/NewCreateItemFlow/index.js +1 -1
- package/dist/components/NewDynamicLayout/index.js +1 -1
- package/dist/components/OnboardingTour/index.js +1 -1
- package/dist/components/OnboardingTour/productTourList.js +1 -1
- package/dist/components/OnboardingTour/tooltipCard.js +1 -1
- package/dist/components/Panel/index.js +1 -1
- package/dist/components/Popover/index.js +1 -1
- package/dist/components/Prompt/index.js +1 -1
- package/dist/components/Select/Select.types.d.ts +7 -0
- package/dist/components/Select/Select.types.d.ts.map +1 -1
- package/dist/components/Select/index.d.ts.map +1 -1
- package/dist/components/Select/index.js +44 -26
- package/dist/components/Stepper/index.js +1 -1
- package/dist/components/TableChat/EmptyContainer.js +1 -1
- package/dist/components/TableChat/TableChatSidePanel.js +1 -1
- package/dist/components/TableChat/components/TableChatLeftSection/AddChatContainer/AddChatContainer.js +1 -1
- package/dist/components/TableChat/components/TableChatLeftSection/ChatFilterChips/ChatFilterChips.js +1 -1
- package/dist/components/TableChat/components/TableChatLeftSection/TableChatChannelHeader.js +1 -1
- package/dist/components/TableChat/components/TableChatRightSection/AvatarGroup/AvatarGroup.js +1 -1
- package/dist/components/TableChat/components/TableChatRightSection/ChatDefaultMessageType/ChatDefaultMessageType.js +1 -1
- package/dist/components/TableChat/components/TableChatRightSection/ChatDeleteMessageType/ChatDeletedMessageType.js +1 -1
- package/dist/components/TableChat/components/TableChatRightSection/ChatHeader/ChatHeader.js +1 -1
- package/dist/components/TableChat/components/TableChatRightSection/ChatInlineEdit/ChatInlineEdit.js +1 -1
- package/dist/components/TableChat/components/TableChatRightSection/ChatInput/ChatInput.js +1 -1
- package/dist/components/TableChat/components/TableChatRightSection/ChatMessages/ChatMessage.js +1 -1
- package/dist/components/TableChat/components/TableChatRightSection/ChatNotificationSettings/ChatNotificationSettings.js +1 -1
- package/dist/components/TableChat/components/TableChatRightSection/TableChatRightSection.js +1 -1
- package/dist/components/TableChat/components/TextEditor/EditorToolbar.js +1 -1
- package/dist/components/TableChat/components/TextEditor/Mention.js +1 -1
- package/dist/components/TableChat/components/TextEditor/MentionList.js +1 -1
- package/dist/components/TableV36/AgGridHeader.d.ts.map +1 -1
- package/dist/components/TableV36/AgGridHeader.js +107 -115
- package/dist/components/TableV36/index.d.ts.map +1 -1
- package/dist/components/TableV36/index.js +27 -5
- package/dist/components/TableV36/tableFunctions.d.ts.map +1 -1
- package/dist/components/TableV36/tableFunctions.js +15 -14
- package/dist/components/Tag/index.js +1 -1
- package/dist/components/TextArea/index.js +1 -1
- package/dist/components/common/MentionEditor/MentionList/index.js +1 -1
- package/dist/components/common/MentionEditor/index.js +1 -1
- package/dist/components/index.d.ts +3 -2
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +3 -0
- package/dist/hooks/useDraggableResizable.d.ts +11 -1
- package/dist/hooks/useDraggableResizable.d.ts.map +1 -1
- package/dist/hooks/useDraggableResizable.js +73 -59
- package/dist/locales/de-DE.json.d.ts +50 -30
- package/dist/locales/de-DE.json.js +50 -30
- package/dist/locales/en-US.json.d.ts +50 -30
- package/dist/locales/en-US.json.js +50 -30
- package/dist/locales/es-ES.json.d.ts +50 -30
- package/dist/locales/es-ES.json.js +50 -30
- package/dist/mcp-component-registry.json +65 -263
- package/dist/node_modules/@impactsmartsuite/impact-icons/dist/index.js +293 -53
- package/dist/node_modules/@mui/icons-material/ArrowBack.js +17 -0
- package/dist/node_modules/@mui/icons-material/AttachFileOutlined.js +17 -0
- package/dist/node_modules/@mui/icons-material/ContentCopyOutlined.js +17 -0
- package/dist/node_modules/@mui/icons-material/Menu.js +17 -0
- package/dist/node_modules/@mui/icons-material/NorthRounded.js +17 -0
- package/dist/node_modules/@mui/icons-material/RefreshOutlined.js +17 -0
- package/dist/node_modules/@mui/icons-material/StopRounded.js +17 -0
- package/dist/node_modules/@mui/icons-material/VolumeUpOutlined.js +17 -0
- package/dist/node_modules/@mui/system/colorManipulator.js +2 -2
- package/dist/node_modules/prop-types/index.js +1 -1
- package/dist/node_modules/prop-types/node_modules/react-is/index.js +1 -1
- package/dist/node_modules/react-is/index.js +1 -1
- package/dist/stories/chatBotApiMock.d.ts +91 -0
- package/dist/stories/chatBotApiMock.d.ts.map +1 -0
- package/dist/styles/style.css +1 -1
- package/package.json +2 -2
- package/dist/_virtual/MoreVert.js +0 -4
- package/dist/_virtual/RemoveRounded.js +0 -4
- package/dist/_virtual/SaveOutlined.js +0 -4
- package/dist/components/Chatbot/bookMarkPanel.d.ts +0 -4
- package/dist/components/Chatbot/bookMarkPanel.d.ts.map +0 -1
- package/dist/components/Chatbot/bookMarkPanel.js +0 -64
- package/dist/components/Chatbot/chatBotLandingScreen.d.ts +0 -4
- package/dist/components/Chatbot/chatBotLandingScreen.d.ts.map +0 -1
- package/dist/components/Chatbot/chatBotLandingScreen.js +0 -24
- package/dist/components/Chatbot/chatInput.d.ts +0 -4
- package/dist/components/Chatbot/chatInput.d.ts.map +0 -1
- package/dist/components/Chatbot/chatInput.js +0 -198
- package/dist/components/Chatbot/chatbotModuleMenu.d.ts +0 -4
- package/dist/components/Chatbot/chatbotModuleMenu.d.ts.map +0 -1
- package/dist/components/Chatbot/chatbotModuleMenu.js +0 -248
- package/dist/components/Chatbot/constant.d.ts +0 -6
- package/dist/components/Chatbot/constant.d.ts.map +0 -1
- package/dist/components/Chatbot/constant.js +0 -27
- package/dist/components/Chatbot/conversationScreen.d.ts +0 -4
- package/dist/components/Chatbot/conversationScreen.d.ts.map +0 -1
- package/dist/components/Chatbot/conversationScreen.js +0 -207
- package/dist/components/Chatbot/customScreen.d.ts +0 -4
- package/dist/components/Chatbot/customScreen.d.ts.map +0 -1
- package/dist/components/Chatbot/customScreen.js +0 -66
- package/dist/components/Chatbot/historyPanel.d.ts +0 -4
- package/dist/components/Chatbot/historyPanel.d.ts.map +0 -1
- package/dist/components/Chatbot/historyPanel.js +0 -374
- package/dist/components/Chatbot/utils.d.ts +0 -5
- package/dist/components/Chatbot/utils.d.ts.map +0 -1
- package/dist/components/Chatbot/utils.js +0 -29
- package/dist/node_modules/@mui/icons-material/MoreVert.js +0 -17
- package/dist/node_modules/@mui/icons-material/RemoveRounded.js +0 -17
- package/dist/node_modules/@mui/icons-material/SaveOutlined.js +0 -17
- package/dist/utils/onResize.js +0 -28
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { __exports as ContentCopyOutlined } from "../../../_virtual/ContentCopyOutlined.js";
|
|
2
|
+
import require$$0 from "@babel/runtime/helpers/interopRequireDefault";
|
|
3
|
+
import { __require as requireCreateSvgIcon } from "./utils/createSvgIcon.js";
|
|
4
|
+
import require$$2 from "react/jsx-runtime";
|
|
5
|
+
var _interopRequireDefault = require$$0;
|
|
6
|
+
Object.defineProperty(ContentCopyOutlined, "__esModule", {
|
|
7
|
+
value: true
|
|
8
|
+
});
|
|
9
|
+
var default_1 = ContentCopyOutlined.default = void 0;
|
|
10
|
+
var _createSvgIcon = _interopRequireDefault(requireCreateSvgIcon());
|
|
11
|
+
var _jsxRuntime = require$$2;
|
|
12
|
+
default_1 = ContentCopyOutlined.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", {
|
|
13
|
+
d: "M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z"
|
|
14
|
+
}), "ContentCopyOutlined");
|
|
15
|
+
export {
|
|
16
|
+
default_1 as default
|
|
17
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { __exports as Menu } from "../../../_virtual/Menu.js";
|
|
2
|
+
import require$$0 from "@babel/runtime/helpers/interopRequireDefault";
|
|
3
|
+
import { __require as requireCreateSvgIcon } from "./utils/createSvgIcon.js";
|
|
4
|
+
import require$$2 from "react/jsx-runtime";
|
|
5
|
+
var _interopRequireDefault = require$$0;
|
|
6
|
+
Object.defineProperty(Menu, "__esModule", {
|
|
7
|
+
value: true
|
|
8
|
+
});
|
|
9
|
+
var default_1 = Menu.default = void 0;
|
|
10
|
+
var _createSvgIcon = _interopRequireDefault(requireCreateSvgIcon());
|
|
11
|
+
var _jsxRuntime = require$$2;
|
|
12
|
+
default_1 = Menu.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", {
|
|
13
|
+
d: "M3 18h18v-2H3zm0-5h18v-2H3zm0-7v2h18V6z"
|
|
14
|
+
}), "Menu");
|
|
15
|
+
export {
|
|
16
|
+
default_1 as default
|
|
17
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { __exports as NorthRounded } from "../../../_virtual/NorthRounded.js";
|
|
2
|
+
import require$$0 from "@babel/runtime/helpers/interopRequireDefault";
|
|
3
|
+
import { __require as requireCreateSvgIcon } from "./utils/createSvgIcon.js";
|
|
4
|
+
import require$$2 from "react/jsx-runtime";
|
|
5
|
+
var _interopRequireDefault = require$$0;
|
|
6
|
+
Object.defineProperty(NorthRounded, "__esModule", {
|
|
7
|
+
value: true
|
|
8
|
+
});
|
|
9
|
+
var default_1 = NorthRounded.default = void 0;
|
|
10
|
+
var _createSvgIcon = _interopRequireDefault(requireCreateSvgIcon());
|
|
11
|
+
var _jsxRuntime = require$$2;
|
|
12
|
+
default_1 = NorthRounded.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", {
|
|
13
|
+
d: "M5.71 9.7c.39.39 1.02.39 1.41 0L11 5.83V21c0 .55.45 1 1 1s1-.45 1-1V5.83l3.88 3.88c.39.39 1.02.39 1.41 0 .39-.39.39-1.02 0-1.41L12.7 2.7a.9959.9959 0 0 0-1.41 0L5.71 8.29c-.39.39-.39 1.03 0 1.41"
|
|
14
|
+
}), "NorthRounded");
|
|
15
|
+
export {
|
|
16
|
+
default_1 as default
|
|
17
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { __exports as RefreshOutlined } from "../../../_virtual/RefreshOutlined.js";
|
|
2
|
+
import require$$0 from "@babel/runtime/helpers/interopRequireDefault";
|
|
3
|
+
import { __require as requireCreateSvgIcon } from "./utils/createSvgIcon.js";
|
|
4
|
+
import require$$2 from "react/jsx-runtime";
|
|
5
|
+
var _interopRequireDefault = require$$0;
|
|
6
|
+
Object.defineProperty(RefreshOutlined, "__esModule", {
|
|
7
|
+
value: true
|
|
8
|
+
});
|
|
9
|
+
var default_1 = RefreshOutlined.default = void 0;
|
|
10
|
+
var _createSvgIcon = _interopRequireDefault(requireCreateSvgIcon());
|
|
11
|
+
var _jsxRuntime = require$$2;
|
|
12
|
+
default_1 = RefreshOutlined.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", {
|
|
13
|
+
d: "M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4z"
|
|
14
|
+
}), "RefreshOutlined");
|
|
15
|
+
export {
|
|
16
|
+
default_1 as default
|
|
17
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { __exports as StopRounded } from "../../../_virtual/StopRounded.js";
|
|
2
|
+
import require$$0 from "@babel/runtime/helpers/interopRequireDefault";
|
|
3
|
+
import { __require as requireCreateSvgIcon } from "./utils/createSvgIcon.js";
|
|
4
|
+
import require$$2 from "react/jsx-runtime";
|
|
5
|
+
var _interopRequireDefault = require$$0;
|
|
6
|
+
Object.defineProperty(StopRounded, "__esModule", {
|
|
7
|
+
value: true
|
|
8
|
+
});
|
|
9
|
+
var default_1 = StopRounded.default = void 0;
|
|
10
|
+
var _createSvgIcon = _interopRequireDefault(requireCreateSvgIcon());
|
|
11
|
+
var _jsxRuntime = require$$2;
|
|
12
|
+
default_1 = StopRounded.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", {
|
|
13
|
+
d: "M8 6h8c1.1 0 2 .9 2 2v8c0 1.1-.9 2-2 2H8c-1.1 0-2-.9-2-2V8c0-1.1.9-2 2-2"
|
|
14
|
+
}), "StopRounded");
|
|
15
|
+
export {
|
|
16
|
+
default_1 as default
|
|
17
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { __exports as VolumeUpOutlined } from "../../../_virtual/VolumeUpOutlined.js";
|
|
2
|
+
import require$$0 from "@babel/runtime/helpers/interopRequireDefault";
|
|
3
|
+
import { __require as requireCreateSvgIcon } from "./utils/createSvgIcon.js";
|
|
4
|
+
import require$$2 from "react/jsx-runtime";
|
|
5
|
+
var _interopRequireDefault = require$$0;
|
|
6
|
+
Object.defineProperty(VolumeUpOutlined, "__esModule", {
|
|
7
|
+
value: true
|
|
8
|
+
});
|
|
9
|
+
var default_1 = VolumeUpOutlined.default = void 0;
|
|
10
|
+
var _createSvgIcon = _interopRequireDefault(requireCreateSvgIcon());
|
|
11
|
+
var _jsxRuntime = require$$2;
|
|
12
|
+
default_1 = VolumeUpOutlined.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", {
|
|
13
|
+
d: "M3 9v6h4l5 5V4L7 9zm7-.17v6.34L7.83 13H5v-2h2.83zM16.5 12c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02M14 3.23v2.06c2.89.86 5 3.54 5 6.71s-2.11 5.85-5 6.71v2.06c4.01-.91 7-4.49 7-8.77 0-4.28-2.99-7.86-7-8.77"
|
|
14
|
+
}), "VolumeUpOutlined");
|
|
15
|
+
export {
|
|
16
|
+
default_1 as default
|
|
17
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __exports as colorManipulator } from "../../../_virtual/colorManipulator.js";
|
|
2
2
|
import require$$0 from "@babel/runtime/helpers/interopRequireDefault";
|
|
3
|
-
import require$$1 from "../../../_virtual/
|
|
4
|
-
import require$$2 from "../../../_virtual/
|
|
3
|
+
import require$$1 from "../../../_virtual/index4.js";
|
|
4
|
+
import require$$2 from "../../../_virtual/index5.js";
|
|
5
5
|
var _interopRequireDefault = require$$0;
|
|
6
6
|
Object.defineProperty(colorManipulator, "__esModule", {
|
|
7
7
|
value: true
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getDefaultExportFromCjs } from "../../_virtual/_commonjsHelpers.js";
|
|
2
|
-
import { __module as propTypes } from "../../_virtual/
|
|
2
|
+
import { __module as propTypes } from "../../_virtual/index2.js";
|
|
3
3
|
import { __require as requireReactIs } from "./node_modules/react-is/index.js";
|
|
4
4
|
import { __require as requireFactoryWithTypeCheckers } from "./factoryWithTypeCheckers.js";
|
|
5
5
|
import { __require as requireFactoryWithThrowingShims } from "./factoryWithThrowingShims.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __module as reactIs } from "../../../../_virtual/
|
|
1
|
+
import { __module as reactIs } from "../../../../_virtual/index6.js";
|
|
2
2
|
import { __require as requireReactIs_production_min } from "./cjs/react-is.production.min.js";
|
|
3
3
|
import { __require as requireReactIs_development } from "./cjs/react-is.development.js";
|
|
4
4
|
var hasRequiredReactIs;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __module as reactIs } from "../../_virtual/
|
|
1
|
+
import { __module as reactIs } from "../../_virtual/index3.js";
|
|
2
2
|
import { __require as requireReactIs_production } from "./cjs/react-is.production.js";
|
|
3
3
|
import { __require as requireReactIs_development } from "./cjs/react-is.development.js";
|
|
4
4
|
if (process.env.NODE_ENV === "production") {
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
export declare const irisArtifactsSeed: {
|
|
2
|
+
id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
}[];
|
|
5
|
+
export declare const irisThinkingStepsSeed: ({
|
|
6
|
+
id: string;
|
|
7
|
+
label: string;
|
|
8
|
+
status: string;
|
|
9
|
+
expandable: boolean;
|
|
10
|
+
chip: string;
|
|
11
|
+
} | {
|
|
12
|
+
id: string;
|
|
13
|
+
label: string;
|
|
14
|
+
status: string;
|
|
15
|
+
expandable: boolean;
|
|
16
|
+
chip?: undefined;
|
|
17
|
+
} | {
|
|
18
|
+
id: string;
|
|
19
|
+
label: string;
|
|
20
|
+
status: string;
|
|
21
|
+
expandable?: undefined;
|
|
22
|
+
chip?: undefined;
|
|
23
|
+
})[];
|
|
24
|
+
export declare const irisThinkingCitationsSeed: {
|
|
25
|
+
id: string;
|
|
26
|
+
label: string;
|
|
27
|
+
tags: string[];
|
|
28
|
+
}[];
|
|
29
|
+
export declare const irisSuggestedPrompts: {
|
|
30
|
+
id: string;
|
|
31
|
+
label: string;
|
|
32
|
+
}[];
|
|
33
|
+
export declare const irisMenuHistoryData: {
|
|
34
|
+
group_name: string;
|
|
35
|
+
conversation_list: {
|
|
36
|
+
conversation_id: number;
|
|
37
|
+
name: string;
|
|
38
|
+
}[];
|
|
39
|
+
}[];
|
|
40
|
+
export declare const createUserMessage: (text: any) => {
|
|
41
|
+
type: string;
|
|
42
|
+
text: any;
|
|
43
|
+
bodyType: string;
|
|
44
|
+
bodyText: any;
|
|
45
|
+
timeStamp: string;
|
|
46
|
+
timestamp: string;
|
|
47
|
+
userType: string;
|
|
48
|
+
role: string;
|
|
49
|
+
userName: string;
|
|
50
|
+
};
|
|
51
|
+
export declare const createBotMessage: (text: any, overrides?: {}) => {
|
|
52
|
+
type: string;
|
|
53
|
+
text: any;
|
|
54
|
+
bodyType: string;
|
|
55
|
+
bodyText: string | undefined;
|
|
56
|
+
timeStamp: string;
|
|
57
|
+
timestamp: string;
|
|
58
|
+
userType: string;
|
|
59
|
+
role: string;
|
|
60
|
+
userName: string;
|
|
61
|
+
enableLikes: boolean;
|
|
62
|
+
enableSpeaker: boolean;
|
|
63
|
+
enableCopy: boolean;
|
|
64
|
+
enableRegenerate: boolean;
|
|
65
|
+
enableRevert: boolean;
|
|
66
|
+
actions: string[];
|
|
67
|
+
};
|
|
68
|
+
/** Figma 2135:9596 sample assistant copy with emphasis + positive metrics. */
|
|
69
|
+
export declare const createIrisStyledReply: (userText: any, overrides?: {}) => {
|
|
70
|
+
type: string;
|
|
71
|
+
text: any;
|
|
72
|
+
bodyType: string;
|
|
73
|
+
bodyText: string | undefined;
|
|
74
|
+
timeStamp: string;
|
|
75
|
+
timestamp: string;
|
|
76
|
+
userType: string;
|
|
77
|
+
role: string;
|
|
78
|
+
userName: string;
|
|
79
|
+
enableLikes: boolean;
|
|
80
|
+
enableSpeaker: boolean;
|
|
81
|
+
enableCopy: boolean;
|
|
82
|
+
enableRegenerate: boolean;
|
|
83
|
+
enableRevert: boolean;
|
|
84
|
+
actions: string[];
|
|
85
|
+
};
|
|
86
|
+
/**
|
|
87
|
+
* Stateful API-driven wrapper: owns conversation/history/artifacts and simulates
|
|
88
|
+
* backend latency for send, history, likes, stop, artifacts, and Iris thinking.
|
|
89
|
+
*/
|
|
90
|
+
export declare function ApiDrivenChatBot(args: any): import("react/jsx-runtime").JSX.Element;
|
|
91
|
+
//# sourceMappingURL=chatBotApiMock.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chatBotApiMock.d.ts","sourceRoot":"","sources":["../../src/stories/chatBotApiMock.tsx"],"names":[],"mappings":"AAUA,eAAO,MAAM,iBAAiB;;;GAO7B,CAAC;AAEF,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;IA0BjC,CAAC;AAEF,eAAO,MAAM,yBAAyB;;;;GASrC,CAAC;AAEF,eAAO,MAAM,oBAAoB;;;GAahC,CAAC;AAEF,eAAO,MAAM,mBAAmB;;;;;;GAY/B,CAAC;AAmBF,eAAO,MAAM,iBAAiB,GAAI,SAAI;;;;;;;;;;CAUpC,CAAC;AAEH,eAAO,MAAM,gBAAgB,GAAI,SAAI,EAAE,cAAc;;;;;;;;;;;;;;;;CAiBnD,CAAC;AAEH,8EAA8E;AAC9E,eAAO,MAAM,qBAAqB,GAAI,aAAQ,EAAE,cAAc;;;;;;;;;;;;;;;;CA0B3D,CAAC;AAuCJ;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,KAAA,2CAgVpC"}
|
package/dist/styles/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@keyframes ia-shimmer-horizontal{0%{background-position:100% 0}to{background-position:0 0}}@keyframes ia-shimmer-vertical{0%{background-position:0 100%}to{background-position:0 0}}@property --ia-shimmer-angle{syntax:"<angle>";inherits:false;initial-value:0deg}@keyframes ia-shimmer-circular{0%{--ia-shimmer-angle:0deg}to{--ia-shimmer-angle:360deg}}.ia-shimmer{animation:ia-shimmer-horizontal 1.6s ease-in-out infinite;animation-direction:normal;background-color:#
|
|
1
|
+
@keyframes ia-shimmer-horizontal{0%{background-position:100% 0}to{background-position:0 0}}@keyframes ia-shimmer-vertical{0%{background-position:0 100%}to{background-position:0 0}}@property --ia-shimmer-angle{syntax:"<angle>";inherits:false;initial-value:0deg}@keyframes ia-shimmer-circular{0%{--ia-shimmer-angle:0deg}to{--ia-shimmer-angle:360deg}}.ia-shimmer{animation:ia-shimmer-horizontal 1.6s ease-in-out infinite;animation-direction:normal;background-color:#cacbcc33;background-image:linear-gradient(90deg,#cacbcc33,#cacbcc99 22%,#cacbcc33 48%,#cacbcc1a 62%,#cacbcc33);background-repeat:no-repeat;background-size:300% 100%}@media (prefers-reduced-motion:reduce){.ia-shimmer{animation:none;background-image:linear-gradient(90deg,#cacbcc33,#cacbcc99 40%,#cacbcc1a);background-size:100% 100%}}.ia-shimmer--ltr{animation:ia-shimmer-horizontal 1.6s ease-in-out infinite;animation-direction:normal;background-color:#cacbcc33;background-image:linear-gradient(90deg,#cacbcc33,#cacbcc99 22%,#cacbcc33 48%,#cacbcc1a 62%,#cacbcc33);background-repeat:no-repeat;background-size:300% 100%}@media (prefers-reduced-motion:reduce){.ia-shimmer--ltr{animation:none;background-image:linear-gradient(90deg,#cacbcc33,#cacbcc99 40%,#cacbcc1a);background-size:100% 100%}}.ia-shimmer--rtl{animation:ia-shimmer-horizontal 1.6s ease-in-out infinite;animation-direction:reverse;background-color:#cacbcc33;background-image:linear-gradient(270deg,#cacbcc33,#cacbcc99 22%,#cacbcc33 48%,#cacbcc1a 62%,#cacbcc33);background-repeat:no-repeat;background-size:300% 100%}@media (prefers-reduced-motion:reduce){.ia-shimmer--rtl{animation:none;background-image:linear-gradient(270deg,#cacbcc33,#cacbcc99 40%,#cacbcc1a);background-size:100% 100%}}.ia-shimmer--btt{animation:ia-shimmer-vertical 1.6s ease-in-out infinite;animation-direction:reverse;background-color:#cacbcc33;background-image:linear-gradient(0deg,#cacbcc33,#cacbcc99 22%,#cacbcc33 48%,#cacbcc1a 62%,#cacbcc33);background-repeat:no-repeat;background-size:100% 300%}@media (prefers-reduced-motion:reduce){.ia-shimmer--btt{animation:none;background-image:linear-gradient(0deg,#cacbcc33,#cacbcc99 40%,#cacbcc1a);background-size:100% 100%}}.ia-shimmer--ttb{animation:ia-shimmer-vertical 1.6s ease-in-out infinite;animation-direction:normal;background-color:#cacbcc33;background-image:linear-gradient(0deg,#cacbcc33,#cacbcc99 22%,#cacbcc33 48%,#cacbcc1a 62%,#cacbcc33);background-repeat:no-repeat;background-size:100% 300%}@media (prefers-reduced-motion:reduce){.ia-shimmer--ttb{animation:none;background-image:linear-gradient(0deg,#cacbcc33,#cacbcc99 40%,#cacbcc1a);background-size:100% 100%}}.ia-shimmer--circular{background-color:#cacbcc33;background-repeat:no-repeat;--ia-shimmer-angle:0deg;animation:ia-shimmer-circular 1.6s linear infinite;background-image:conic-gradient(from var(--ia-shimmer-angle),#cacbcc99 0deg,#cacbcc33 80deg,#cacbcc1a 160deg,#cacbcc33 260deg,#cacbcc99 1turn);background-size:100% 100%}@media (prefers-reduced-motion:reduce){.ia-shimmer--circular{animation:none;background-image:conic-gradient(from 0deg,#cacbcc99,#cacbcc33,#cacbcc1a,#cacbcc33 1turn)}}:root{--ia-focus-color:#4259ee;--ia-focus-bg:#fff;--ia-focus-ring-width:2px;--ia-focus-ring-offset:2px;--ia-modal-backdrop:#0d152ccc}*,:after,:before{box-sizing:border-box}body,textarea{font-style:normal;font-weight:500}a,abbr,acronym,address,applet,article,aside,audio,b,big,blockquote,body,canvas,caption,center,cite,code,dd,del,details,dfn,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,i,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{border:0;font-size:100%;font:inherit;margin:0;padding:0;vertical-align:initial}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:after,blockquote:before,q:after,q:before{content:"";content:none}table{border-collapse:collapse;border-spacing:0}body{font-family:Manrope,sans-serif}.impact-notification-separator{background-color:#d9dde7;display:inline-block;height:16px;width:1.5px}.impact-notification-horizontal-separator{background-color:#d9dde7;display:inline-block;height:1px;width:100%}ul.storybook-order-list{list-style-type:disc;padding-left:12px}ul.storybook-order-list li{font-size:12px;line-height:20px;padding-bottom:8px}ul.storybook-order-list li strong{font-weight:800}ul.storybook-order-child-list{list-style-type:circle;padding-left:20px}ul.storybook-order-child-list li{font-size:12px;line-height:20px;padding-bottom:8px}ul.storybook-order-child-list li strong{font-weight:800}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "impact-ui",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.5-chatbot.1",
|
|
4
4
|
"description": "Impact Analytics UI library",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/components/index.js",
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
"@chromatic-com/storybook": "^5.0.1",
|
|
109
109
|
"@emotion/react": "^11.14.0",
|
|
110
110
|
"@emotion/styled": "^11.14.1",
|
|
111
|
-
"@impactsmartsuite/impact-icons": "0.1.8-beta.
|
|
111
|
+
"@impactsmartsuite/impact-icons": "0.1.8-beta.10",
|
|
112
112
|
"@mui/base": "^5.0.0-alpha.82",
|
|
113
113
|
"@mui/docs": "^5.8.0",
|
|
114
114
|
"@mui/envinfo": "^2.0.6",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bookMarkPanel.d.ts","sourceRoot":"","sources":["../../../src/components/Chatbot/bookMarkPanel.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAK1D,wBAAgB,aAAa,CAAC,EAC5B,mBAAmB,EACnB,mBAAmB,EACnB,OAAO,GACR,EAAE,kBAAkB,2CAyDpB"}
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useState } from "react";
|
|
3
|
-
import default_1 from "../../node_modules/@mui/icons-material/Add.js";
|
|
4
|
-
import default_1$1 from "../../node_modules/@mui/icons-material/DragIndicator.js";
|
|
5
|
-
import default_1$2 from "../../node_modules/@mui/icons-material/MoreVert.js";
|
|
6
|
-
import { getAssetUrl } from "../../utils/assetBase.js";
|
|
7
|
-
import { Button } from "../Button/index.js";
|
|
8
|
-
import { useTranslation } from "../../i18n/useTranslation.js";
|
|
9
|
-
const BookMarkIcon = getAssetUrl("icons/bookmarkIcon.svg");
|
|
10
|
-
const CloseIcon = getAssetUrl("icons/close.svg");
|
|
11
|
-
function BookMarkPanel({
|
|
12
|
-
preDefinedQuestions,
|
|
13
|
-
addedByYouQuestions,
|
|
14
|
-
onClose
|
|
15
|
-
}) {
|
|
16
|
-
const { t } = useTranslation();
|
|
17
|
-
const [activeTab, setActiveTab] = useState("preDefined");
|
|
18
|
-
return /* @__PURE__ */ jsx("div", { className: "book-mark-panel-container-wrapper", children: /* @__PURE__ */ jsxs("div", { className: "book-mark-panel-container", children: [
|
|
19
|
-
/* @__PURE__ */ jsxs("div", { className: "book-mark-panel-header", children: [
|
|
20
|
-
/* @__PURE__ */ jsxs("div", { className: "book-mark-panel-header-left", children: [
|
|
21
|
-
/* @__PURE__ */ jsx("img", { alt: t("chatBot.bookmark.alt"), src: BookMarkIcon }),
|
|
22
|
-
/* @__PURE__ */ jsx("span", { className: "book-mark-panel-header-left-title", children: t("chatBot.bookmark.title") })
|
|
23
|
-
] }),
|
|
24
|
-
/* @__PURE__ */ jsxs("div", { className: "book-mark-panel-header-right", children: [
|
|
25
|
-
/* @__PURE__ */ jsx(Button, { icon: /* @__PURE__ */ jsx(default_1, {}), iconPlacement: "right", variant: "secondary", children: t("chatBot.bookmark.add") }),
|
|
26
|
-
/* @__PURE__ */ jsx("img", { alt: t("chatBot.closeAlt"), src: CloseIcon, onClick: onClose })
|
|
27
|
-
] })
|
|
28
|
-
] }),
|
|
29
|
-
/* @__PURE__ */ jsx("div", { className: "book-mark-panel-tabs-container", children: /* @__PURE__ */ jsxs("div", { className: "bookmark-tabs", children: [
|
|
30
|
-
/* @__PURE__ */ jsx(
|
|
31
|
-
"span",
|
|
32
|
-
{
|
|
33
|
-
className: `bookmark-tab ${activeTab === "preDefined" ? "active" : ""}`,
|
|
34
|
-
onClick: () => {
|
|
35
|
-
setActiveTab("preDefined");
|
|
36
|
-
},
|
|
37
|
-
children: t("chatBot.bookmark.preDefined")
|
|
38
|
-
}
|
|
39
|
-
),
|
|
40
|
-
/* @__PURE__ */ jsx(
|
|
41
|
-
"span",
|
|
42
|
-
{
|
|
43
|
-
className: `bookmark-tab ${activeTab === "addedByYou" ? "active" : ""}`,
|
|
44
|
-
onClick: () => {
|
|
45
|
-
setActiveTab("addedByYou");
|
|
46
|
-
},
|
|
47
|
-
children: t("chatBot.bookmark.addedByYou")
|
|
48
|
-
}
|
|
49
|
-
)
|
|
50
|
-
] }) }),
|
|
51
|
-
activeTab === "preDefined" ? preDefinedQuestions == null ? void 0 : preDefinedQuestions.map((item, idx) => /* @__PURE__ */ jsxs("div", { className: "bookmark-panel-body", children: [
|
|
52
|
-
/* @__PURE__ */ jsx("span", { className: "drag-handle", children: "⋮⋮" }),
|
|
53
|
-
/* @__PURE__ */ jsx("span", { className: "bookmark-question-text", children: item.question }),
|
|
54
|
-
/* @__PURE__ */ jsx("span", { className: "bookmark-menu", children: "⋮" })
|
|
55
|
-
] }, idx)) : addedByYouQuestions == null ? void 0 : addedByYouQuestions.map((item, idx) => /* @__PURE__ */ jsxs("div", { className: "bookmark-panel-body", children: [
|
|
56
|
-
/* @__PURE__ */ jsx(default_1$1, { fontSize: "small" }),
|
|
57
|
-
/* @__PURE__ */ jsx("span", { className: "bookmark-question-text", children: item.question }),
|
|
58
|
-
/* @__PURE__ */ jsx(default_1$2, { fontSize: "small" })
|
|
59
|
-
] }, idx))
|
|
60
|
-
] }) });
|
|
61
|
-
}
|
|
62
|
-
export {
|
|
63
|
-
BookMarkPanel
|
|
64
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"chatBotLandingScreen.d.ts","sourceRoot":"","sources":["../../../src/components/Chatbot/chatBotLandingScreen.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AAEjE,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAAC,EAAE,OAAO,EAAE,WAAW,EAAE,EAAE,yBAAyB,2CAoB/F"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import default_1 from "../../node_modules/@mui/icons-material/Clear.js";
|
|
3
|
-
import { Button } from "../Button/index.js";
|
|
4
|
-
function ChatBotLandingScreen({ onClose, isFullWidth }) {
|
|
5
|
-
return /* @__PURE__ */ jsxs("div", { className: "chatbot-landing-screen-container", children: [
|
|
6
|
-
!isFullWidth && /* @__PURE__ */ jsx("div", { className: "chatbot-landing-screen-container-close-icon", children: /* @__PURE__ */ jsx(
|
|
7
|
-
Button,
|
|
8
|
-
{
|
|
9
|
-
className: "chatbot-component-header-close-icon",
|
|
10
|
-
icon: /* @__PURE__ */ jsx(default_1, {}),
|
|
11
|
-
iconPlacement: "left",
|
|
12
|
-
size: "large",
|
|
13
|
-
type: "default",
|
|
14
|
-
variant: "text",
|
|
15
|
-
onClick: onClose
|
|
16
|
-
}
|
|
17
|
-
) }),
|
|
18
|
-
/* @__PURE__ */ jsx("div", { className: "chatbot-landing-screen-container-circle-1" }),
|
|
19
|
-
/* @__PURE__ */ jsx("div", { className: "chatbot-landing-screen-container-circle-2" })
|
|
20
|
-
] });
|
|
21
|
-
}
|
|
22
|
-
export {
|
|
23
|
-
ChatBotLandingScreen as default
|
|
24
|
-
};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { ChatInputProps } from './Chatbot.types';
|
|
2
|
-
|
|
3
|
-
export default function ChatInput({ inputValue, setInputValue, setIsNewChat, onSendIconClick, setUserChats, userChats, handleRefresh, handleSaveChat, handleMicClick, activeList, uniqueId, suggestionBanner, isStopIcon, onStopIconClick, minRows, newChatScreen, customScreen, onCloseSuggestionBanner, showSuggestionBanner, customInputComponent, }: ChatInputProps): import("react/jsx-runtime").JSX.Element;
|
|
4
|
-
//# sourceMappingURL=chatInput.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"chatInput.d.ts","sourceRoot":"","sources":["../../../src/components/Chatbot/chatInput.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,cAAc,EAAe,MAAM,iBAAiB,CAAC;AASnE,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,EAChC,UAAU,EACV,aAAa,EACb,YAAY,EACZ,eAAe,EACf,YAAY,EACZ,SAAS,EACT,aAAa,EACb,cAAc,EACd,cAAc,EACd,UAAU,EACV,QAAQ,EACR,gBAAgB,EAChB,UAAU,EACV,eAAe,EACf,OAAW,EACX,aAAqB,EACrB,YAAoB,EACpB,uBAAuB,EACvB,oBAAoB,EACpB,oBAAoB,GACrB,EAAE,cAAc,2CAuKhB"}
|
|
@@ -1,198 +0,0 @@
|
|
|
1
|
-
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useRef, useState, useEffect } from "react";
|
|
3
|
-
import default_1 from "../../node_modules/@mui/icons-material/Clear.js";
|
|
4
|
-
import default_1$1 from "../../node_modules/@mui/icons-material/SaveOutlined.js";
|
|
5
|
-
import TextareaAutosize from "react-textarea-autosize";
|
|
6
|
-
import { getAssetUrl } from "../../utils/assetBase.js";
|
|
7
|
-
import { onResize } from "../../utils/onResize.js";
|
|
8
|
-
import { Button } from "../Button/index.js";
|
|
9
|
-
import { Tooltip } from "../Tooltip/index.js";
|
|
10
|
-
import { useTranslation } from "../../i18n/useTranslation.js";
|
|
11
|
-
import Box from "../../node_modules/@mui/material/Box/Box.js";
|
|
12
|
-
import IconButton from "../../node_modules/@mui/material/IconButton/IconButton.js";
|
|
13
|
-
const chatbotBannerIcon = getAssetUrl("icons/chatbotBannerIcon.svg");
|
|
14
|
-
const MicIcon = getAssetUrl("icons/chatBotMicIcon.svg");
|
|
15
|
-
const RefreshIcon = getAssetUrl("icons/chatBotRefreshIcon.svg");
|
|
16
|
-
const SendIcon = getAssetUrl("icons/chatBotSendIcon.svg");
|
|
17
|
-
const ChatbotStopIcon = getAssetUrl("icons/chatbotStopIcon.svg");
|
|
18
|
-
const COMPACT_INPUT_WIDTH = 480;
|
|
19
|
-
function ChatInput({
|
|
20
|
-
inputValue,
|
|
21
|
-
setInputValue,
|
|
22
|
-
setIsNewChat,
|
|
23
|
-
onSendIconClick,
|
|
24
|
-
setUserChats,
|
|
25
|
-
userChats,
|
|
26
|
-
handleRefresh,
|
|
27
|
-
handleSaveChat,
|
|
28
|
-
handleMicClick,
|
|
29
|
-
activeList,
|
|
30
|
-
uniqueId,
|
|
31
|
-
suggestionBanner,
|
|
32
|
-
isStopIcon,
|
|
33
|
-
onStopIconClick,
|
|
34
|
-
minRows = 1,
|
|
35
|
-
newChatScreen = false,
|
|
36
|
-
customScreen = false,
|
|
37
|
-
onCloseSuggestionBanner,
|
|
38
|
-
showSuggestionBanner,
|
|
39
|
-
customInputComponent
|
|
40
|
-
}) {
|
|
41
|
-
const { t } = useTranslation();
|
|
42
|
-
const containerRef = useRef(null);
|
|
43
|
-
const inputRef = useRef(null);
|
|
44
|
-
const [isCompact, setIsCompact] = useState(false);
|
|
45
|
-
const [isFixed, setIsFixed] = useState(false);
|
|
46
|
-
const [isScrollable, setIsScrollable] = useState(false);
|
|
47
|
-
const [height, setHeight] = useState("auto");
|
|
48
|
-
const MAX_HEIGHT = 142;
|
|
49
|
-
const handleHeightChange = (textareaHeight) => {
|
|
50
|
-
if (!textareaHeight) return;
|
|
51
|
-
if (!inputValue.trim()) {
|
|
52
|
-
setIsFixed(false);
|
|
53
|
-
setIsScrollable(false);
|
|
54
|
-
setHeight("auto");
|
|
55
|
-
return;
|
|
56
|
-
}
|
|
57
|
-
if (textareaHeight > 40) setIsFixed(true);
|
|
58
|
-
setIsScrollable(textareaHeight >= MAX_HEIGHT);
|
|
59
|
-
const newHeight = textareaHeight > (newChatScreen ? 88 : 40) ? textareaHeight + 40 : "auto";
|
|
60
|
-
if (newHeight !== "auto") setHeight(newHeight <= MAX_HEIGHT ? newHeight : MAX_HEIGHT);
|
|
61
|
-
};
|
|
62
|
-
useEffect(() => {
|
|
63
|
-
if (inputValue === "") {
|
|
64
|
-
setHeight("auto");
|
|
65
|
-
setIsFixed(false);
|
|
66
|
-
}
|
|
67
|
-
}, [inputValue]);
|
|
68
|
-
useEffect(() => {
|
|
69
|
-
const container = containerRef.current;
|
|
70
|
-
if (!container) return;
|
|
71
|
-
return onResize(container, ({ width }) => {
|
|
72
|
-
setIsCompact(width < COMPACT_INPUT_WIDTH);
|
|
73
|
-
});
|
|
74
|
-
}, []);
|
|
75
|
-
const handleSendMessage = () => {
|
|
76
|
-
var _a;
|
|
77
|
-
setIsNewChat == null ? void 0 : setIsNewChat(false);
|
|
78
|
-
setInputValue("");
|
|
79
|
-
(_a = inputRef.current) == null ? void 0 : _a.blur();
|
|
80
|
-
const newUserChat = {
|
|
81
|
-
id: userChats.length + 1,
|
|
82
|
-
text: inputValue,
|
|
83
|
-
role: "user",
|
|
84
|
-
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
85
|
-
};
|
|
86
|
-
setUserChats((prev) => [...prev, newUserChat]);
|
|
87
|
-
onSendIconClick == null ? void 0 : onSendIconClick(newUserChat, activeList, uniqueId);
|
|
88
|
-
};
|
|
89
|
-
const handleStopIconClick = () => {
|
|
90
|
-
onStopIconClick == null ? void 0 : onStopIconClick(activeList);
|
|
91
|
-
};
|
|
92
|
-
return /* @__PURE__ */ jsxs(
|
|
93
|
-
Box,
|
|
94
|
-
{
|
|
95
|
-
ref: containerRef,
|
|
96
|
-
className: `chat-input-box ${newChatScreen ? "new-chat-screen" : ""} ${customScreen ? "custom-screen" : ""}`,
|
|
97
|
-
children: [
|
|
98
|
-
showSuggestionBanner && /* @__PURE__ */ jsxs("div", { className: "suggestion-banner", children: [
|
|
99
|
-
/* @__PURE__ */ jsxs("div", { className: "suggestion-banner-content", children: [
|
|
100
|
-
/* @__PURE__ */ jsx("img", { alt: "suggestion", src: chatbotBannerIcon }),
|
|
101
|
-
/* @__PURE__ */ jsx("span", { className: "suggestion-banner-text", children: suggestionBanner.freeTextContent })
|
|
102
|
-
] }),
|
|
103
|
-
/* @__PURE__ */ jsx(
|
|
104
|
-
IconButton,
|
|
105
|
-
{
|
|
106
|
-
disableRipple: true,
|
|
107
|
-
size: "small",
|
|
108
|
-
sx: { color: "#60697D" },
|
|
109
|
-
onClick: onCloseSuggestionBanner,
|
|
110
|
-
children: /* @__PURE__ */ jsx(default_1, { fontSize: "small", sx: { fontSize: "16px" } })
|
|
111
|
-
}
|
|
112
|
-
)
|
|
113
|
-
] }),
|
|
114
|
-
customInputComponent ? customInputComponent : /* @__PURE__ */ jsx("div", { className: "chat-input-container", children: /* @__PURE__ */ jsxs(
|
|
115
|
-
"div",
|
|
116
|
-
{
|
|
117
|
-
className: `chat-input-wrapper ${isFixed ? "stacked" : ""} ${(!isFixed || inputValue === "") && !newChatScreen ? "empty" : ""} ${!newChatScreen && !isFixed ? "single-line-textarea" : ""}`,
|
|
118
|
-
style: { height },
|
|
119
|
-
children: [
|
|
120
|
-
/* @__PURE__ */ jsx(
|
|
121
|
-
TextareaAutosize,
|
|
122
|
-
{
|
|
123
|
-
ref: inputRef,
|
|
124
|
-
className: `chat-textarea ${isScrollable ? "scrollable" : ""}`,
|
|
125
|
-
minRows,
|
|
126
|
-
placeholder: t("chatBot.inputPlaceholder"),
|
|
127
|
-
value: inputValue,
|
|
128
|
-
onChange: (e) => {
|
|
129
|
-
setInputValue(e.target.value);
|
|
130
|
-
},
|
|
131
|
-
onHeightChange: handleHeightChange,
|
|
132
|
-
onKeyDown: (e) => {
|
|
133
|
-
if (e.key === "Enter" && !e.shiftKey) {
|
|
134
|
-
e.preventDefault();
|
|
135
|
-
if (inputValue.trim().length > 0) handleSendMessage();
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
),
|
|
140
|
-
/* @__PURE__ */ jsxs("div", { className: `chat-actions ${isFixed ? "fixed" : ""}`, children: [
|
|
141
|
-
handleRefresh && /* @__PURE__ */ jsx(
|
|
142
|
-
Button,
|
|
143
|
-
{
|
|
144
|
-
icon: /* @__PURE__ */ jsx("img", { alt: "refresh", src: RefreshIcon }),
|
|
145
|
-
iconPlacement: "left",
|
|
146
|
-
size: isCompact ? "medium" : "large",
|
|
147
|
-
type: "default",
|
|
148
|
-
variant: "url",
|
|
149
|
-
onClick: handleRefresh
|
|
150
|
-
}
|
|
151
|
-
),
|
|
152
|
-
handleMicClick && /* @__PURE__ */ jsx(
|
|
153
|
-
Button,
|
|
154
|
-
{
|
|
155
|
-
icon: /* @__PURE__ */ jsx("img", { alt: "mic", src: MicIcon }),
|
|
156
|
-
iconPlacement: "left",
|
|
157
|
-
size: isCompact ? "medium" : "large",
|
|
158
|
-
type: "default",
|
|
159
|
-
variant: "tertiary",
|
|
160
|
-
onClick: handleMicClick
|
|
161
|
-
}
|
|
162
|
-
),
|
|
163
|
-
handleSaveChat && /* @__PURE__ */ jsx(Tooltip, { title: t("chatBot.saveChat"), variant: "tertiary", children: /* @__PURE__ */ jsx(
|
|
164
|
-
Button,
|
|
165
|
-
{
|
|
166
|
-
icon: /* @__PURE__ */ jsx(default_1$1, {}),
|
|
167
|
-
iconPlacement: "left",
|
|
168
|
-
id: "chat-input-save-button",
|
|
169
|
-
size: isCompact ? "medium" : "large",
|
|
170
|
-
type: "default",
|
|
171
|
-
variant: "tertiary",
|
|
172
|
-
onClick: handleSaveChat
|
|
173
|
-
}
|
|
174
|
-
) }),
|
|
175
|
-
/* @__PURE__ */ jsx(
|
|
176
|
-
Button,
|
|
177
|
-
{
|
|
178
|
-
className: isStopIcon ? "stop-icon-button" : "",
|
|
179
|
-
icon: !isStopIcon ? /* @__PURE__ */ jsx("img", { alt: "send", src: SendIcon }) : /* @__PURE__ */ jsx("img", { alt: "stop", src: ChatbotStopIcon }),
|
|
180
|
-
iconPlacement: "left",
|
|
181
|
-
id: "chat-input-send-button",
|
|
182
|
-
size: isCompact ? "medium" : "large",
|
|
183
|
-
type: "default",
|
|
184
|
-
variant: "primary",
|
|
185
|
-
onClick: !isStopIcon ? handleSendMessage : handleStopIconClick
|
|
186
|
-
}
|
|
187
|
-
)
|
|
188
|
-
] })
|
|
189
|
-
]
|
|
190
|
-
}
|
|
191
|
-
) })
|
|
192
|
-
]
|
|
193
|
-
}
|
|
194
|
-
);
|
|
195
|
-
}
|
|
196
|
-
export {
|
|
197
|
-
ChatInput as default
|
|
198
|
-
};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { ChatbotModuleMenuProps } from './Chatbot.types';
|
|
2
|
-
|
|
3
|
-
export declare function ChatbotModuleMenu({ hideMenuArrow, onModuleClick, moduleList, activeList, hideChildren, isModuleListLoading, hideSmartBotIcon, hideCenterOptions, threadList: threadListProp, activeThread: activeThreadProp, handleSavedChat, onClose, isFullWidth, handleCloseThread: handleCloseThreadProp, handleThreadClick, onMinimiseChatBot, dragHandleProps, isCollapsed, onToggleCollapse, }: ChatbotModuleMenuProps): import("react/jsx-runtime").JSX.Element;
|
|
4
|
-
//# sourceMappingURL=chatbotModuleMenu.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"chatbotModuleMenu.d.ts","sourceRoot":"","sources":["../../../src/components/Chatbot/chatbotModuleMenu.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAS9D,wBAAgB,iBAAiB,CAAC,EAChC,aAAa,EACb,aAAa,EACb,UAAU,EACV,UAAU,EACV,YAAoB,EACpB,mBAAmB,EACnB,gBAAwB,EACxB,iBAAyB,EACzB,UAAU,EAAE,cAAmB,EAC/B,YAAY,EAAE,gBAAgB,EAC9B,eAAe,EACf,OAAO,EACP,WAAW,EACX,iBAAiB,EAAE,qBAAqB,EACxC,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,EACf,WAAmB,EACnB,gBAAgB,GACjB,EAAE,sBAAsB,2CAgOxB"}
|