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.
Files changed (190) hide show
  1. package/dist/_virtual/ArrowBack.js +4 -0
  2. package/dist/_virtual/AttachFileOutlined.js +4 -0
  3. package/dist/_virtual/ContentCopyOutlined.js +4 -0
  4. package/dist/_virtual/Menu.js +4 -0
  5. package/dist/_virtual/NorthRounded.js +4 -0
  6. package/dist/_virtual/RefreshOutlined.js +4 -0
  7. package/dist/_virtual/StopRounded.js +4 -0
  8. package/dist/_virtual/VolumeUpOutlined.js +4 -0
  9. package/dist/_virtual/index2.js +2 -2
  10. package/dist/_virtual/index3.js +2 -2
  11. package/dist/_virtual/index4.js +4 -2
  12. package/dist/_virtual/index5.js +3 -3
  13. package/dist/_virtual/index6.js +2 -4
  14. package/dist/components/AccordionModern/index.js +1 -1
  15. package/dist/components/Badge/index.js +1 -1
  16. package/dist/components/Breadcrumbs/index.js +1 -1
  17. package/dist/components/Button/index.js +1 -1
  18. package/dist/components/ButtonGroup/index.js +1 -1
  19. package/dist/components/Chatbot/Chatbot.types.d.ts +253 -186
  20. package/dist/components/Chatbot/Chatbot.types.d.ts.map +1 -1
  21. package/dist/components/Chatbot/chatBotFooter.d.ts +1 -1
  22. package/dist/components/Chatbot/chatBotFooter.d.ts.map +1 -1
  23. package/dist/components/Chatbot/chatBotFooter.js +21 -4
  24. package/dist/components/Chatbot/chatbotComposer.d.ts +4 -0
  25. package/dist/components/Chatbot/chatbotComposer.d.ts.map +1 -0
  26. package/dist/components/Chatbot/chatbotComposer.js +328 -0
  27. package/dist/components/Chatbot/chatbotGreetingHeader.d.ts +4 -0
  28. package/dist/components/Chatbot/chatbotGreetingHeader.d.ts.map +1 -0
  29. package/dist/components/Chatbot/chatbotGreetingHeader.js +226 -0
  30. package/dist/components/Chatbot/greetingWeather.d.ts +23 -0
  31. package/dist/components/Chatbot/greetingWeather.d.ts.map +1 -0
  32. package/dist/components/Chatbot/greetingWeather.js +81 -0
  33. package/dist/components/Chatbot/greetingWeather.test.d.ts +2 -0
  34. package/dist/components/Chatbot/greetingWeather.test.d.ts.map +1 -0
  35. package/dist/components/Chatbot/index.d.ts +5 -2
  36. package/dist/components/Chatbot/index.d.ts.map +1 -1
  37. package/dist/components/Chatbot/index.js +390 -421
  38. package/dist/components/Chatbot/irisConversationThread.d.ts +24 -0
  39. package/dist/components/Chatbot/irisConversationThread.d.ts.map +1 -0
  40. package/dist/components/Chatbot/irisConversationThread.js +511 -0
  41. package/dist/components/Chatbot/irisGreetingBackdrop.d.ts +5 -0
  42. package/dist/components/Chatbot/irisGreetingBackdrop.d.ts.map +1 -0
  43. package/dist/components/Chatbot/irisGreetingBackdrop.js +62 -0
  44. package/dist/components/Chatbot/irisMenuListItem.d.ts +11 -0
  45. package/dist/components/Chatbot/irisMenuListItem.d.ts.map +1 -0
  46. package/dist/components/Chatbot/irisMenuListItem.js +126 -0
  47. package/dist/components/Chatbot/irisMenuScreen.d.ts +4 -0
  48. package/dist/components/Chatbot/irisMenuScreen.d.ts.map +1 -0
  49. package/dist/components/Chatbot/irisMenuScreen.js +357 -0
  50. package/dist/components/Chatbot/irisThinking.d.ts +7 -0
  51. package/dist/components/Chatbot/irisThinking.d.ts.map +1 -0
  52. package/dist/components/Chatbot/irisThinking.js +219 -0
  53. package/dist/components/Chatbot/newChatComponent.d.ts +1 -1
  54. package/dist/components/Chatbot/newChatComponent.d.ts.map +1 -1
  55. package/dist/components/Chatbot/newChatComponent.js +497 -72
  56. package/dist/components/Chips/index.js +1 -1
  57. package/dist/components/CommentsPanel/CommentsPanel.impl.js +1 -1
  58. package/dist/components/DatePicker/DatePicker.types.d.ts +4 -0
  59. package/dist/components/DatePicker/DatePicker.types.d.ts.map +1 -1
  60. package/dist/components/DatePicker/datePickerInput.d.ts +2 -0
  61. package/dist/components/DatePicker/datePickerInput.d.ts.map +1 -1
  62. package/dist/components/DatePicker/datePickerInput.js +32 -2
  63. package/dist/components/DatePicker/index.d.ts.map +1 -1
  64. package/dist/components/DatePicker/index.js +5 -1
  65. package/dist/components/DatePicker/showMonthYearSelect.d.ts.map +1 -1
  66. package/dist/components/DatePicker/showMonthYearSelect.js +2 -0
  67. package/dist/components/DateRangePicker/index.js +1 -1
  68. package/dist/components/DateRangePicker/showMonthYearSelect.d.ts.map +1 -1
  69. package/dist/components/DateRangePicker/showMonthYearSelect.js +2 -0
  70. package/dist/components/FileUpload/index.js +1 -1
  71. package/dist/components/FilterPanel/index.js +1 -1
  72. package/dist/components/FiltersStrip/FilterSlider.js +1 -1
  73. package/dist/components/FiltersStrip/index.js +1 -1
  74. package/dist/components/Input/index.js +1 -1
  75. package/dist/components/KeyboardShortCuts/ShortcutLandingPage.js +1 -1
  76. package/dist/components/KeyboardShortCuts/ShortcutModal.js +1 -1
  77. package/dist/components/KeyboardShortCuts/allSetBox.js +1 -1
  78. package/dist/components/KeyboardShortCuts/index.js +1 -1
  79. package/dist/components/KeyboardShortCuts/tutorial.js +1 -1
  80. package/dist/components/Menu/IconMenuItem.js +1 -1
  81. package/dist/components/Menu/NestedMenuItem.js +1 -1
  82. package/dist/components/Menu/index.js +1 -1
  83. package/dist/components/Menu/nestedMenuItemsFromObject.js +1 -1
  84. package/dist/components/Modal/index.js +1 -1
  85. package/dist/components/MonthPicker/index.js +1 -1
  86. package/dist/components/MonthRangePicker/index.js +1 -1
  87. package/dist/components/NewCreateItemFlow/index.js +1 -1
  88. package/dist/components/NewDynamicLayout/index.js +1 -1
  89. package/dist/components/OnboardingTour/index.js +1 -1
  90. package/dist/components/OnboardingTour/productTourList.js +1 -1
  91. package/dist/components/OnboardingTour/tooltipCard.js +1 -1
  92. package/dist/components/Panel/index.js +1 -1
  93. package/dist/components/Popover/index.js +1 -1
  94. package/dist/components/Prompt/index.js +1 -1
  95. package/dist/components/Select/Select.types.d.ts +7 -0
  96. package/dist/components/Select/Select.types.d.ts.map +1 -1
  97. package/dist/components/Select/index.d.ts.map +1 -1
  98. package/dist/components/Select/index.js +44 -26
  99. package/dist/components/Stepper/index.js +1 -1
  100. package/dist/components/TableChat/EmptyContainer.js +1 -1
  101. package/dist/components/TableChat/TableChatSidePanel.js +1 -1
  102. package/dist/components/TableChat/components/TableChatLeftSection/AddChatContainer/AddChatContainer.js +1 -1
  103. package/dist/components/TableChat/components/TableChatLeftSection/ChatFilterChips/ChatFilterChips.js +1 -1
  104. package/dist/components/TableChat/components/TableChatLeftSection/TableChatChannelHeader.js +1 -1
  105. package/dist/components/TableChat/components/TableChatRightSection/AvatarGroup/AvatarGroup.js +1 -1
  106. package/dist/components/TableChat/components/TableChatRightSection/ChatDefaultMessageType/ChatDefaultMessageType.js +1 -1
  107. package/dist/components/TableChat/components/TableChatRightSection/ChatDeleteMessageType/ChatDeletedMessageType.js +1 -1
  108. package/dist/components/TableChat/components/TableChatRightSection/ChatHeader/ChatHeader.js +1 -1
  109. package/dist/components/TableChat/components/TableChatRightSection/ChatInlineEdit/ChatInlineEdit.js +1 -1
  110. package/dist/components/TableChat/components/TableChatRightSection/ChatInput/ChatInput.js +1 -1
  111. package/dist/components/TableChat/components/TableChatRightSection/ChatMessages/ChatMessage.js +1 -1
  112. package/dist/components/TableChat/components/TableChatRightSection/ChatNotificationSettings/ChatNotificationSettings.js +1 -1
  113. package/dist/components/TableChat/components/TableChatRightSection/TableChatRightSection.js +1 -1
  114. package/dist/components/TableChat/components/TextEditor/EditorToolbar.js +1 -1
  115. package/dist/components/TableChat/components/TextEditor/Mention.js +1 -1
  116. package/dist/components/TableChat/components/TextEditor/MentionList.js +1 -1
  117. package/dist/components/TableV36/AgGridHeader.d.ts.map +1 -1
  118. package/dist/components/TableV36/AgGridHeader.js +107 -115
  119. package/dist/components/TableV36/index.d.ts.map +1 -1
  120. package/dist/components/TableV36/index.js +27 -5
  121. package/dist/components/TableV36/tableFunctions.d.ts.map +1 -1
  122. package/dist/components/TableV36/tableFunctions.js +15 -14
  123. package/dist/components/Tag/index.js +1 -1
  124. package/dist/components/TextArea/index.js +1 -1
  125. package/dist/components/common/MentionEditor/MentionList/index.js +1 -1
  126. package/dist/components/common/MentionEditor/index.js +1 -1
  127. package/dist/components/index.d.ts +3 -2
  128. package/dist/components/index.d.ts.map +1 -1
  129. package/dist/components/index.js +3 -0
  130. package/dist/hooks/useDraggableResizable.d.ts +11 -1
  131. package/dist/hooks/useDraggableResizable.d.ts.map +1 -1
  132. package/dist/hooks/useDraggableResizable.js +73 -59
  133. package/dist/locales/de-DE.json.d.ts +50 -30
  134. package/dist/locales/de-DE.json.js +50 -30
  135. package/dist/locales/en-US.json.d.ts +50 -30
  136. package/dist/locales/en-US.json.js +50 -30
  137. package/dist/locales/es-ES.json.d.ts +50 -30
  138. package/dist/locales/es-ES.json.js +50 -30
  139. package/dist/mcp-component-registry.json +65 -263
  140. package/dist/node_modules/@impactsmartsuite/impact-icons/dist/index.js +293 -53
  141. package/dist/node_modules/@mui/icons-material/ArrowBack.js +17 -0
  142. package/dist/node_modules/@mui/icons-material/AttachFileOutlined.js +17 -0
  143. package/dist/node_modules/@mui/icons-material/ContentCopyOutlined.js +17 -0
  144. package/dist/node_modules/@mui/icons-material/Menu.js +17 -0
  145. package/dist/node_modules/@mui/icons-material/NorthRounded.js +17 -0
  146. package/dist/node_modules/@mui/icons-material/RefreshOutlined.js +17 -0
  147. package/dist/node_modules/@mui/icons-material/StopRounded.js +17 -0
  148. package/dist/node_modules/@mui/icons-material/VolumeUpOutlined.js +17 -0
  149. package/dist/node_modules/@mui/system/colorManipulator.js +2 -2
  150. package/dist/node_modules/prop-types/index.js +1 -1
  151. package/dist/node_modules/prop-types/node_modules/react-is/index.js +1 -1
  152. package/dist/node_modules/react-is/index.js +1 -1
  153. package/dist/stories/chatBotApiMock.d.ts +91 -0
  154. package/dist/stories/chatBotApiMock.d.ts.map +1 -0
  155. package/dist/styles/style.css +1 -1
  156. package/package.json +2 -2
  157. package/dist/_virtual/MoreVert.js +0 -4
  158. package/dist/_virtual/RemoveRounded.js +0 -4
  159. package/dist/_virtual/SaveOutlined.js +0 -4
  160. package/dist/components/Chatbot/bookMarkPanel.d.ts +0 -4
  161. package/dist/components/Chatbot/bookMarkPanel.d.ts.map +0 -1
  162. package/dist/components/Chatbot/bookMarkPanel.js +0 -64
  163. package/dist/components/Chatbot/chatBotLandingScreen.d.ts +0 -4
  164. package/dist/components/Chatbot/chatBotLandingScreen.d.ts.map +0 -1
  165. package/dist/components/Chatbot/chatBotLandingScreen.js +0 -24
  166. package/dist/components/Chatbot/chatInput.d.ts +0 -4
  167. package/dist/components/Chatbot/chatInput.d.ts.map +0 -1
  168. package/dist/components/Chatbot/chatInput.js +0 -198
  169. package/dist/components/Chatbot/chatbotModuleMenu.d.ts +0 -4
  170. package/dist/components/Chatbot/chatbotModuleMenu.d.ts.map +0 -1
  171. package/dist/components/Chatbot/chatbotModuleMenu.js +0 -248
  172. package/dist/components/Chatbot/constant.d.ts +0 -6
  173. package/dist/components/Chatbot/constant.d.ts.map +0 -1
  174. package/dist/components/Chatbot/constant.js +0 -27
  175. package/dist/components/Chatbot/conversationScreen.d.ts +0 -4
  176. package/dist/components/Chatbot/conversationScreen.d.ts.map +0 -1
  177. package/dist/components/Chatbot/conversationScreen.js +0 -207
  178. package/dist/components/Chatbot/customScreen.d.ts +0 -4
  179. package/dist/components/Chatbot/customScreen.d.ts.map +0 -1
  180. package/dist/components/Chatbot/customScreen.js +0 -66
  181. package/dist/components/Chatbot/historyPanel.d.ts +0 -4
  182. package/dist/components/Chatbot/historyPanel.d.ts.map +0 -1
  183. package/dist/components/Chatbot/historyPanel.js +0 -374
  184. package/dist/components/Chatbot/utils.d.ts +0 -5
  185. package/dist/components/Chatbot/utils.d.ts.map +0 -1
  186. package/dist/components/Chatbot/utils.js +0 -29
  187. package/dist/node_modules/@mui/icons-material/MoreVert.js +0 -17
  188. package/dist/node_modules/@mui/icons-material/RemoveRounded.js +0 -17
  189. package/dist/node_modules/@mui/icons-material/SaveOutlined.js +0 -17
  190. package/dist/utils/onResize.js +0 -28
@@ -1,248 +0,0 @@
1
- import { jsxs, jsx, Fragment } from "react/jsx-runtime";
2
- import { useState, useEffect } from "react";
3
- import default_1$4 from "../../node_modules/@mui/icons-material/Clear.js";
4
- import default_1$1 from "../../node_modules/@mui/icons-material/KeyboardArrowDown.js";
5
- import default_1 from "../../node_modules/@mui/icons-material/KeyboardArrowUp.js";
6
- import default_1$2 from "../../node_modules/@mui/icons-material/RemoveRounded.js";
7
- import default_1$3 from "../../node_modules/@mui/icons-material/SaveOutlined.js";
8
- import { getAssetUrl } from "../../utils/assetBase.js";
9
- import { Button } from "../Button/index.js";
10
- import { Loader } from "../Loader/index.js";
11
- import { useTranslation } from "../../i18n/useTranslation.js";
12
- const ActiveIcon = getAssetUrl("icons/activeModuleIcon.svg");
13
- const HomeIcon = getAssetUrl("icons/chat-home-icon.svg");
14
- const CloseThreadIcon = getAssetUrl("icons/close.svg");
15
- const SmartBotIcon = getAssetUrl("icons/smartBotAlan.svg");
16
- const CollapseIcon = getAssetUrl("icons/Collapse.svg");
17
- const ExpandIcon = getAssetUrl("icons/expand-icon.svg");
18
- function ChatbotModuleMenu({
19
- hideMenuArrow,
20
- onModuleClick,
21
- moduleList,
22
- activeList,
23
- hideChildren = false,
24
- isModuleListLoading,
25
- hideSmartBotIcon = false,
26
- hideCenterOptions = false,
27
- threadList: threadListProp = [],
28
- activeThread: activeThreadProp,
29
- handleSavedChat,
30
- onClose,
31
- isFullWidth,
32
- handleCloseThread: handleCloseThreadProp,
33
- handleThreadClick,
34
- onMinimiseChatBot,
35
- dragHandleProps,
36
- isCollapsed = false,
37
- onToggleCollapse
38
- }) {
39
- var _a;
40
- const { t } = useTranslation();
41
- const [isDropdownOpen, setIsDropdownOpen] = useState(false);
42
- const [activeModule, setActiveModule] = useState(
43
- ((_a = moduleList.find((module) => module.isActive)) == null ? void 0 : _a.name) || ""
44
- );
45
- const [threadList, setThreadList] = useState(threadListProp);
46
- const [activeThread, setActiveThread] = useState(activeThreadProp || threadListProp[0]);
47
- const handleCloseThread = (e, idx) => {
48
- e.stopPropagation();
49
- e.preventDefault();
50
- if (handleCloseThreadProp) {
51
- handleCloseThreadProp(e, idx);
52
- } else {
53
- const newThreadList = [...threadList];
54
- newThreadList.splice(idx, 1);
55
- setThreadList(newThreadList);
56
- }
57
- };
58
- useEffect(() => {
59
- const handleClickOutside = (e) => {
60
- const target = e.target;
61
- if (!target.closest(".chatbot-component-header-dropdown-container")) {
62
- setIsDropdownOpen(false);
63
- }
64
- };
65
- document.addEventListener("mousedown", handleClickOutside);
66
- return () => {
67
- document.removeEventListener("mousedown", handleClickOutside);
68
- };
69
- }, []);
70
- return /* @__PURE__ */ jsxs(
71
- "div",
72
- {
73
- className: `conversation-screen-container-header ${dragHandleProps ? "draggable" : ""} ${isCollapsed ? "collapsed" : ""}`,
74
- onPointerDown: dragHandleProps == null ? void 0 : dragHandleProps.onPointerDown,
75
- children: [
76
- /* @__PURE__ */ jsxs("div", { className: "left_logo_arrow_container", children: [
77
- !hideSmartBotIcon && /* @__PURE__ */ jsx("div", { className: "conversation_chatbot_logo_container", children: /* @__PURE__ */ jsx("img", { alt: "smartbot", draggable: false, src: SmartBotIcon }) }),
78
- !hideMenuArrow && /* @__PURE__ */ jsxs("div", { className: "menu_arrow", children: [
79
- /* @__PURE__ */ jsx(
80
- Button,
81
- {
82
- icon: isDropdownOpen ? /* @__PURE__ */ jsx(default_1, {}) : /* @__PURE__ */ jsx(default_1$1, {}),
83
- iconPlacement: "right",
84
- size: hideChildren ? "small" : "medium",
85
- type: "default",
86
- variant: "text",
87
- onClick: () => {
88
- setIsDropdownOpen(!isDropdownOpen);
89
- },
90
- children: !hideChildren && t("chatBot.moduleMenu.module")
91
- }
92
- ),
93
- isDropdownOpen && /* @__PURE__ */ jsx(
94
- "div",
95
- {
96
- className: `chatbot-component-header-dropdown-container ${isDropdownOpen ? "open" : ""}`,
97
- children: isModuleListLoading ? /* @__PURE__ */ jsx(Loader, {}) : /* @__PURE__ */ jsx("div", { className: `item ${isCollapsed ? "isCollapsed" : ""}`, children: moduleList.map((module, idx) => /* @__PURE__ */ jsxs(
98
- "div",
99
- {
100
- className: `item-container ${isCollapsed ? "isCollapsed" : ""}`,
101
- onClick: () => {
102
- setActiveModule(module.name ?? "");
103
- onModuleClick == null ? void 0 : onModuleClick(module.id, module.name, activeList);
104
- setIsDropdownOpen(false);
105
- },
106
- children: [
107
- /* @__PURE__ */ jsxs("div", { className: "item-content", children: [
108
- typeof module.icon === "string" ? /* @__PURE__ */ jsx("img", { alt: module.key ?? module.name, src: module.icon }) : module.icon,
109
- /* @__PURE__ */ jsxs("div", { className: "item-content-text", children: [
110
- /* @__PURE__ */ jsx(
111
- "span",
112
- {
113
- className: `item-content-text-name ${isCollapsed ? "collapsed" : ""}`,
114
- children: module.name
115
- }
116
- ),
117
- /* @__PURE__ */ jsx(
118
- "span",
119
- {
120
- className: `item-content-text-description ${isCollapsed ? "collapsed" : ""}`,
121
- children: module.description
122
- }
123
- )
124
- ] })
125
- ] }),
126
- activeModule === module.name && /* @__PURE__ */ jsx("img", { alt: "active", src: ActiveIcon })
127
- ]
128
- },
129
- `${module.id ?? module.name ?? idx}`
130
- )) })
131
- }
132
- )
133
- ] })
134
- ] }),
135
- !isCollapsed && !hideCenterOptions && /* @__PURE__ */ jsxs("div", { className: "center_options_container", children: [
136
- /* @__PURE__ */ jsx("div", { className: "left_tabs_container", children: /* @__PURE__ */ jsx("ul", { children: threadList.map((thread, idx) => /* @__PURE__ */ jsx(
137
- "li",
138
- {
139
- className: `${activeThread === thread ? "active" : ""} ${thread === "Home" ? "home" : ""}`,
140
- role: "tab",
141
- tabIndex: 0,
142
- onClick: () => {
143
- setActiveThread(thread);
144
- handleThreadClick == null ? void 0 : handleThreadClick(thread, idx);
145
- },
146
- onKeyDown: (e) => {
147
- if (e.key === "Enter" || e.key === " ") {
148
- e.preventDefault();
149
- setActiveThread(thread);
150
- handleThreadClick == null ? void 0 : handleThreadClick(thread, idx);
151
- }
152
- },
153
- children: thread === "Home" ? /* @__PURE__ */ jsx("img", { alt: t("chatBot.moduleMenu.homeAlt"), draggable: false, src: HomeIcon }) : /* @__PURE__ */ jsxs(Fragment, { children: [
154
- thread,
155
- /* @__PURE__ */ jsx(
156
- "span",
157
- {
158
- className: "close_thread",
159
- role: "button",
160
- tabIndex: 0,
161
- onKeyDown: (e) => {
162
- if (e.key === "Enter" || e.key === " ") {
163
- e.preventDefault();
164
- e.stopPropagation();
165
- handleCloseThread(e, idx);
166
- }
167
- },
168
- children: /* @__PURE__ */ jsx(
169
- "img",
170
- {
171
- alt: t("chatBot.moduleMenu.closeThreadAlt"),
172
- draggable: false,
173
- src: CloseThreadIcon,
174
- onClick: (e) => {
175
- handleCloseThread(e, idx);
176
- }
177
- }
178
- )
179
- }
180
- )
181
- ] })
182
- },
183
- idx
184
- )) }) }),
185
- /* @__PURE__ */ jsx("div", { className: "right_info_container" })
186
- ] }),
187
- /* @__PURE__ */ jsxs("div", { className: "right_close_save_icon_container", children: [
188
- onMinimiseChatBot && !isFullWidth && /* @__PURE__ */ jsx("div", { className: "minimise_icon_container", children: /* @__PURE__ */ jsx(
189
- Button,
190
- {
191
- className: "chatbot-component-header-close-icon",
192
- icon: /* @__PURE__ */ jsx(default_1$2, {}),
193
- size: "small",
194
- type: "default",
195
- variant: "text",
196
- onClick: onMinimiseChatBot
197
- }
198
- ) }),
199
- handleSavedChat && /* @__PURE__ */ jsx("div", { className: "save_icon_container", children: /* @__PURE__ */ jsx(
200
- Button,
201
- {
202
- icon: /* @__PURE__ */ jsx(default_1$3, {}),
203
- iconPlacement: "left",
204
- size: "small",
205
- type: "default",
206
- variant: "text",
207
- onClick: handleSavedChat
208
- }
209
- ) }),
210
- onToggleCollapse && !isFullWidth && /* @__PURE__ */ jsx("div", { className: "collapse_icon_container", children: /* @__PURE__ */ jsx(
211
- Button,
212
- {
213
- "aria-label": isCollapsed ? "Expand chatbot" : "Collapse chatbot",
214
- icon: /* @__PURE__ */ jsx(
215
- "img",
216
- {
217
- alt: "",
218
- draggable: false,
219
- height: isCollapsed ? 24 : 26,
220
- src: isCollapsed ? ExpandIcon : CollapseIcon,
221
- width: isCollapsed ? 24 : 26
222
- }
223
- ),
224
- size: "small",
225
- type: "default",
226
- variant: "text",
227
- onClick: onToggleCollapse
228
- }
229
- ) }),
230
- !isFullWidth && /* @__PURE__ */ jsx("div", { className: "close_icon_container", children: /* @__PURE__ */ jsx(
231
- Button,
232
- {
233
- icon: /* @__PURE__ */ jsx(default_1$4, {}),
234
- iconPlacement: "left",
235
- size: "small",
236
- type: "default",
237
- variant: "text",
238
- onClick: onClose
239
- }
240
- ) })
241
- ] })
242
- ]
243
- }
244
- );
245
- }
246
- export {
247
- ChatbotModuleMenu
248
- };
@@ -1,6 +0,0 @@
1
- import { TabItem } from './Chatbot.types';
2
-
3
- export declare const menuItems: TabItem[];
4
- export declare const mandatoryTabList: TabItem[];
5
- export declare const newChatMenuItem: TabItem;
6
- //# sourceMappingURL=constant.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"constant.d.ts","sourceRoot":"","sources":["../../../src/components/Chatbot/constant.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAQ/C,eAAO,MAAM,SAAS,EAAE,OAAO,EAS9B,CAAC;AACF,eAAO,MAAM,gBAAgB,EAAE,OAAO,EAA4C,CAAC;AACnF,eAAO,MAAM,eAAe,EAAE,OAI7B,CAAC"}
@@ -1,27 +0,0 @@
1
- import { getAssetUrl } from "../../utils/assetBase.js";
2
- const NotificationIcon = getAssetUrl("icons/bell.svg");
3
- const BookMarkIcon = getAssetUrl("icons/bookmarkIcon.svg");
4
- const HistoryIcon = getAssetUrl("icons/historyIcon.svg");
5
- const NewChatIcon = getAssetUrl("icons/newChatIcon.svg");
6
- const PageIcon = getAssetUrl("icons/pageIcon.svg");
7
- const menuItems = [
8
- { key: "bookmark", icon: BookMarkIcon },
9
- { key: "history", icon: HistoryIcon },
10
- { key: "page", icon: PageIcon },
11
- {
12
- key: "notification",
13
- icon: NotificationIcon,
14
- iconClassName: "chatbot-component-menu-container-icon-notification"
15
- }
16
- ];
17
- const mandatoryTabList = [{ key: "history", icon: HistoryIcon }];
18
- const newChatMenuItem = {
19
- key: "newchat",
20
- icon: NewChatIcon,
21
- className: "chatbot-component-menu-container-icon-new-chat"
22
- };
23
- export {
24
- mandatoryTabList,
25
- menuItems,
26
- newChatMenuItem
27
- };
@@ -1,4 +0,0 @@
1
- import { ConversationScreenProps } from './Chatbot.types';
2
-
3
- export declare function ConversationScreen({ userChats, setUserChats, onSendIconClick, conversation, isAssistantThinking, activeList, onLikeClick, onDislikeClick, inputText, handleRefresh, handleSaveChat, handleMicClick, suggestionBanner, isStopIcon, onStopIconClick, onCloseSuggestionBanner, showSuggestionBanner, customInputComponent, footerText, isCollapsed, }: ConversationScreenProps): import("react/jsx-runtime").JSX.Element;
4
- //# sourceMappingURL=conversationScreen.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"conversationScreen.d.ts","sourceRoot":"","sources":["../../../src/components/Chatbot/conversationScreen.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAe,uBAAuB,EAAsB,MAAM,iBAAiB,CAAC;AAEhG,wBAAgB,kBAAkB,CAAC,EACjC,SAAS,EACT,YAAY,EACZ,eAAe,EACf,YAAY,EACZ,mBAAmB,EACnB,UAAU,EACV,WAAW,EACX,cAAc,EACd,SAAS,EACT,aAAa,EACb,cAAc,EACd,cAAc,EACd,gBAAgB,EAChB,UAAU,EACV,eAAe,EACf,uBAAuB,EACvB,oBAAoB,EACpB,oBAAoB,EACpB,UAAU,EACV,WAAW,GACZ,EAAE,uBAAuB,2CAwNzB"}
@@ -1,207 +0,0 @@
1
- import { jsxs, jsx } from "react/jsx-runtime";
2
- import { useState, useRef, useEffect, Fragment } from "react";
3
- import moment from "moment";
4
- import { ChatBotFooter } from "./chatBotFooter.js";
5
- import ChatInput from "./chatInput.js";
6
- import { getDateLabel, formatAMPM } from "./utils.js";
7
- import { useTranslation } from "../../i18n/useTranslation.js";
8
- function ConversationScreen({
9
- userChats,
10
- setUserChats,
11
- onSendIconClick,
12
- conversation,
13
- isAssistantThinking,
14
- activeList,
15
- onLikeClick,
16
- onDislikeClick,
17
- inputText,
18
- handleRefresh,
19
- handleSaveChat,
20
- handleMicClick,
21
- suggestionBanner,
22
- isStopIcon,
23
- onStopIconClick,
24
- onCloseSuggestionBanner,
25
- showSuggestionBanner,
26
- customInputComponent,
27
- footerText,
28
- isCollapsed
29
- }) {
30
- const { t, locale } = useTranslation();
31
- const [input, setInput] = useState(inputText ?? "");
32
- const [conversationMessages, setConversationMessages] = useState([]);
33
- const conversationBodyRef = useRef(null);
34
- useEffect(() => {
35
- setInput(inputText ?? "");
36
- }, [inputText]);
37
- useEffect(() => {
38
- const conversationsObj = conversation.conversations || {};
39
- const firstKey = Object.keys(conversationsObj)[0];
40
- const thread = firstKey ? conversationsObj[firstKey] : void 0;
41
- const messagesArr = (thread == null ? void 0 : thread.messages) || [];
42
- const mapped = messagesArr.map((msg) => ({
43
- ...msg,
44
- role: msg.userType === "bot" ? "assistant" : "user",
45
- text: msg.bodyText,
46
- type: msg.jsx ? "jsx" : msg.bodyType,
47
- formComponent: msg.bodyType === "form" ? msg.formComponent : void 0,
48
- tableComponent: msg.bodyType === "table" ? msg.tableComponent : void 0,
49
- timestamp: msg.timeStamp === "" ? "" : moment(msg.timeStamp, "DD-MM-YYYY HH:mm:ss").format("MM-DD-YYYY HH:mm:ss"),
50
- jsx: msg.jsx,
51
- thinkingResponse: msg.thinkingResponse
52
- }));
53
- setConversationMessages(mapped);
54
- }, [conversation]);
55
- useEffect(() => {
56
- const body = conversationBodyRef.current;
57
- if (!body) return;
58
- if (typeof body.scrollTo === "function") {
59
- body.scrollTo({
60
- top: body.scrollHeight,
61
- behavior: "smooth"
62
- });
63
- } else {
64
- body.scrollTop = body.scrollHeight;
65
- }
66
- }, [conversationMessages, isAssistantThinking, conversation]);
67
- const handleLikeClick = (chat, idx) => {
68
- chat.isAnimateLike = true;
69
- const timeout = setTimeout(() => {
70
- chat.isAnimateLike = false;
71
- }, 1e3);
72
- onLikeClick == null ? void 0 : onLikeClick(chat, idx);
73
- return () => {
74
- clearTimeout(timeout);
75
- };
76
- };
77
- const handleDislikeClick = (chat, idx) => {
78
- chat.isAnimateDislike = true;
79
- const timeout = setTimeout(() => {
80
- chat.isAnimateDislike = false;
81
- }, 1e3);
82
- onDislikeClick == null ? void 0 : onDislikeClick(chat, idx);
83
- return () => {
84
- clearTimeout(timeout);
85
- };
86
- };
87
- return /* @__PURE__ */ jsxs("div", { className: "conversation-screen-container", children: [
88
- /* @__PURE__ */ jsxs(
89
- "div",
90
- {
91
- ref: conversationBodyRef,
92
- className: `conversation-body-container ${showSuggestionBanner ? "show-suggestion-banner" : ""} ${isCollapsed ? "collapsed" : ""}`,
93
- children: [
94
- conversationMessages.map((chat, idx) => {
95
- var _a, _b, _c;
96
- const prevMsg = conversationMessages[idx - 1];
97
- const showDateLabel = idx === 0 || chat.timestamp && (prevMsg == null ? void 0 : prevMsg.timestamp) && new Date(chat.timestamp).toDateString() !== new Date(prevMsg.timestamp).toDateString();
98
- return /* @__PURE__ */ jsxs(Fragment, { children: [
99
- showDateLabel && /* @__PURE__ */ jsx("div", { className: "time_stamp_badge_chat_container", children: /* @__PURE__ */ jsx("div", { className: "time_stamp_badge_chat", children: getDateLabel(chat.timestamp, t, locale) }) }),
100
- chat.role === "user" ? /* @__PURE__ */ jsx("div", { className: "user_chat_messages_container", children: /* @__PURE__ */ jsxs("div", { className: "user_chat_message", children: [
101
- /* @__PURE__ */ jsx("div", { className: "user_chat_message_text", children: chat.text }),
102
- /* @__PURE__ */ jsx("div", { className: "time_chat", children: chat.timestamp ? formatAMPM(new Date(chat.timestamp)) : "" })
103
- ] }) }) : chat.role === "assistant" ? /* @__PURE__ */ jsxs("div", { className: "assistant_chat_messages_container", children: [
104
- chat.firstMessage ? /* @__PURE__ */ jsx("div", { className: "chat_logo_circle" }) : /* @__PURE__ */ jsx("div", { className: "chat_logo_circle_empty" }),
105
- /* @__PURE__ */ jsxs("div", { className: "response_main_container", children: [
106
- /* @__PURE__ */ jsx(
107
- "div",
108
- {
109
- className: `assistant_with_dropdown_container ${chat.thinkingResponse ? "" : "dis_none"}`,
110
- children: (_a = chat.thinkingResponse) == null ? void 0 : _a.thinkingHeading
111
- }
112
- ),
113
- /* @__PURE__ */ jsxs(
114
- "div",
115
- {
116
- className: `assistant_main_container ${chat.bodyType === "questions" ? "questions-container" : ""}`,
117
- children: [
118
- /* @__PURE__ */ jsxs("div", { className: "assistant_text_container", children: [
119
- chat.type === "jsx" && chat.jsx,
120
- chat.type === "form" && chat.formComponent,
121
- chat.type === "table" && chat.tableComponent,
122
- chat.type === "text" && chat.text
123
- ] }),
124
- /* @__PURE__ */ jsx("div", { className: "time_chat", children: chat.timestamp ? formatAMPM(new Date(chat.timestamp)) : "" })
125
- ]
126
- }
127
- ),
128
- /* @__PURE__ */ jsxs("div", { className: "assistant_actions_container", children: [
129
- /* @__PURE__ */ jsxs("div", { className: "left_icon_container_action", children: [
130
- /* @__PURE__ */ jsx(
131
- "button",
132
- {
133
- className: `asst_feedback_buttons good_feedback ${chat.enableLikes ? "" : "dis_none"} ${((_b = chat.extra) == null ? void 0 : _b.status) === "liked" ? "liked" : ""} ${chat.isAnimateLike ? "animatingLike" : ""}`,
134
- onClick: () => handleLikeClick(chat, idx)
135
- }
136
- ),
137
- /* @__PURE__ */ jsx(
138
- "button",
139
- {
140
- className: `asst_feedback_buttons bad_feedback ${chat.enableLikes ? "" : "dis_none"} ${((_c = chat.extra) == null ? void 0 : _c.status) === "disliked" ? "disliked" : ""} ${chat.isAnimateDislike ? "animatingDislike" : ""}`,
141
- onClick: () => handleDislikeClick(chat, idx)
142
- }
143
- ),
144
- /* @__PURE__ */ jsx(
145
- "button",
146
- {
147
- className: `asst_feedback_buttons speaker ${chat.enableSpeaker ? "" : "dis_none"}`
148
- }
149
- )
150
- ] }),
151
- /* @__PURE__ */ jsx("div", { className: "button_url_container", children: /* @__PURE__ */ jsx(
152
- "button",
153
- {
154
- className: `asst_feedback_buttons ${chat.enableNewThread ? "" : "dis_none"}`,
155
- children: t("chatBot.newThread")
156
- }
157
- ) }),
158
- /* @__PURE__ */ jsx("div", { className: "button_url_container", children: /* @__PURE__ */ jsx(
159
- "button",
160
- {
161
- className: `asst_feedback_buttons ${chat.enableAddToPage ? "" : "dis_none"}`,
162
- children: t("chatBot.addToPage")
163
- }
164
- ) })
165
- ] })
166
- ] })
167
- ] }) : null
168
- ] }, idx);
169
- }),
170
- isAssistantThinking && /* @__PURE__ */ jsxs("div", { className: "assistant_chat_messages_container", children: [
171
- /* @__PURE__ */ jsx("div", { className: "chat_logo_circle" }),
172
- /* @__PURE__ */ jsxs("div", { className: `loading_messages ${isAssistantThinking ? "" : "dis_none"}`, children: [
173
- /* @__PURE__ */ jsx("span", { className: "dot" }),
174
- /* @__PURE__ */ jsx("span", { className: "dot" }),
175
- /* @__PURE__ */ jsx("span", { className: "dot" })
176
- ] })
177
- ] })
178
- ]
179
- }
180
- ),
181
- /* @__PURE__ */ jsx("div", { className: "conversation-footer-container", children: /* @__PURE__ */ jsx(
182
- ChatInput,
183
- {
184
- activeList,
185
- customInputComponent,
186
- handleMicClick,
187
- handleRefresh,
188
- handleSaveChat,
189
- inputValue: input,
190
- isStopIcon,
191
- minRows: 1,
192
- setInputValue: setInput,
193
- setUserChats,
194
- showSuggestionBanner,
195
- suggestionBanner,
196
- userChats,
197
- onCloseSuggestionBanner,
198
- onSendIconClick,
199
- onStopIconClick
200
- }
201
- ) }),
202
- /* @__PURE__ */ jsx(ChatBotFooter, { footerText })
203
- ] });
204
- }
205
- export {
206
- ConversationScreen
207
- };
@@ -1,4 +0,0 @@
1
- import { CustomScreenProps } from './Chatbot.types';
2
-
3
- export declare function CustomScreen({ onClose, customScreenJsx, userChats, setUserChats, onSendIconClick, activeList, handleRefresh, handleMicClick, suggestionBanner, isStopIcon, onStopIconClick, onCloseSuggestionBanner, showSuggestionBanner, customInputComponent, isFullWidth, footerText, }: CustomScreenProps): import("react/jsx-runtime").JSX.Element;
4
- //# sourceMappingURL=customScreen.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"customScreen.d.ts","sourceRoot":"","sources":["../../../src/components/Chatbot/customScreen.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEzD,wBAAgB,YAAY,CAAC,EAC3B,OAAO,EACP,eAAe,EACf,SAAS,EACT,YAAY,EACZ,eAAe,EACf,UAAU,EACV,aAAa,EACb,cAAc,EACd,gBAAgB,EAChB,UAAU,EACV,eAAe,EACf,uBAAuB,EACvB,oBAAoB,EACpB,oBAAoB,EACpB,WAAW,EACX,UAAU,GACX,EAAE,iBAAiB,2CA0CnB"}
@@ -1,66 +0,0 @@
1
- import { jsxs, jsx } from "react/jsx-runtime";
2
- import { useState } from "react";
3
- import default_1 from "../../node_modules/@mui/icons-material/Clear.js";
4
- import { Button } from "../Button/index.js";
5
- import { ChatBotFooter } from "./chatBotFooter.js";
6
- import ChatInput from "./chatInput.js";
7
- function CustomScreen({
8
- onClose,
9
- customScreenJsx,
10
- userChats,
11
- setUserChats,
12
- onSendIconClick,
13
- activeList,
14
- handleRefresh,
15
- handleMicClick,
16
- suggestionBanner,
17
- isStopIcon,
18
- onStopIconClick,
19
- onCloseSuggestionBanner,
20
- showSuggestionBanner,
21
- customInputComponent,
22
- isFullWidth,
23
- footerText
24
- }) {
25
- const [input, setInput] = useState("");
26
- return /* @__PURE__ */ jsxs("div", { className: "chatbot-landing-screen-container", style: { pointerEvents: "auto" }, children: [
27
- !isFullWidth && /* @__PURE__ */ jsx("div", { className: "chatbot-landing-screen-container-close-icon", children: /* @__PURE__ */ jsx(
28
- Button,
29
- {
30
- className: "chatbot-component-header-close-icon",
31
- icon: /* @__PURE__ */ jsx(default_1, {}),
32
- iconPlacement: "left",
33
- size: "large",
34
- type: "default",
35
- variant: "text",
36
- onClick: onClose
37
- }
38
- ) }),
39
- /* @__PURE__ */ jsx("div", { className: "chatbot-landing-screen-container-body", children: customScreenJsx }),
40
- /* @__PURE__ */ jsx("div", { className: "conversation-footer-container", children: /* @__PURE__ */ jsx(
41
- ChatInput,
42
- {
43
- customScreen: true,
44
- activeList,
45
- customInputComponent,
46
- handleMicClick,
47
- handleRefresh,
48
- inputValue: input,
49
- isStopIcon,
50
- minRows: 1,
51
- setInputValue: setInput,
52
- setUserChats,
53
- showSuggestionBanner,
54
- suggestionBanner,
55
- userChats,
56
- onCloseSuggestionBanner,
57
- onSendIconClick,
58
- onStopIconClick
59
- }
60
- ) }),
61
- /* @__PURE__ */ jsx(ChatBotFooter, { footerText })
62
- ] });
63
- }
64
- export {
65
- CustomScreen
66
- };
@@ -1,4 +0,0 @@
1
- import { HistoryPanelProps } from './Chatbot.types';
2
-
3
- export declare function HistoryPanel({ historyPanelData, isConversationLoading, onClose, onSearchChange, onSelectConversation, onToggleGroup, openGroups, onMenuAction, activeConversationId, }: HistoryPanelProps): import("react/jsx-runtime").JSX.Element;
4
- //# sourceMappingURL=historyPanel.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"historyPanel.d.ts","sourceRoot":"","sources":["../../../src/components/Chatbot/historyPanel.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAA2B,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AA0DlF,wBAAgB,YAAY,CAAC,EAC3B,gBAAqB,EACrB,qBAA6B,EAC7B,OAAO,EACP,cAAc,EACd,oBAAoB,EACpB,aAAa,EACb,UAAU,EACV,YAAY,EACZ,oBAAoB,GACrB,EAAE,iBAAiB,2CAqXnB"}