impact-ui 4.0.12 → 4.0.13
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/index13.js +2 -2
- package/dist/_virtual/index14.js +2 -2
- package/dist/_virtual/index15.js +2 -2
- package/dist/_virtual/index16.js +2 -2
- package/dist/_virtual/index3.js +2 -4
- package/dist/_virtual/index4.js +3 -3
- package/dist/_virtual/index5.js +4 -2
- package/dist/components/Chatbot/Chatbot.types.d.ts +12 -1
- package/dist/components/Chatbot/Chatbot.types.d.ts.map +1 -1
- package/dist/components/Chatbot/chatInput.d.ts.map +1 -1
- package/dist/components/Chatbot/chatInput.js +22 -4
- package/dist/components/Chatbot/chatbotModuleMenu.d.ts +1 -1
- package/dist/components/Chatbot/chatbotModuleMenu.d.ts.map +1 -1
- package/dist/components/Chatbot/chatbotModuleMenu.js +162 -186
- package/dist/components/Chatbot/conversationScreen.d.ts +1 -1
- package/dist/components/Chatbot/conversationScreen.d.ts.map +1 -1
- package/dist/components/Chatbot/conversationScreen.js +7 -3
- package/dist/components/Chatbot/customScreen.d.ts +1 -1
- package/dist/components/Chatbot/customScreen.d.ts.map +1 -1
- package/dist/components/Chatbot/customScreen.js +26 -25
- package/dist/components/Chatbot/index.d.ts.map +1 -1
- package/dist/components/Chatbot/index.js +330 -240
- 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 +5 -2
- package/dist/components/Table/index.js +1 -1
- package/dist/components/TableOld/index.js +1 -1
- package/dist/hooks/useDraggableResizable.d.ts +104 -0
- package/dist/hooks/useDraggableResizable.d.ts.map +1 -0
- package/dist/hooks/useDraggableResizable.js +323 -0
- package/dist/hooks/useMediaQuery.d.ts +9 -0
- package/dist/hooks/useMediaQuery.d.ts.map +1 -0
- package/dist/mcp-component-registry.json +1 -1
- package/dist/node_modules/@mui/system/colorManipulator.js +2 -2
- package/dist/node_modules/call-bind/index.js +1 -1
- package/dist/node_modules/hoist-non-react-statics/node_modules/react-is/index.js +1 -1
- package/dist/node_modules/is-symbol/index.js +1 -1
- package/dist/node_modules/react-is/index.js +1 -1
- package/dist/node_modules/react-with-styles-interface-css/dist/index.js +1 -1
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/onResize.d.ts +24 -0
- package/dist/utils/onResize.d.ts.map +1 -0
- package/dist/utils/onResize.js +28 -0
- package/package.json +1 -1
|
@@ -13,6 +13,8 @@ const ActiveIcon = getAssetUrl("icons/activeModuleIcon.svg");
|
|
|
13
13
|
const HomeIcon = getAssetUrl("icons/chat-home-icon.svg");
|
|
14
14
|
const CloseThreadIcon = getAssetUrl("icons/close.svg");
|
|
15
15
|
const SmartBotIcon = getAssetUrl("icons/smartBotAlan.svg");
|
|
16
|
+
const CollapseIcon = getAssetUrl("icons/Collapse.svg");
|
|
17
|
+
const ExpandIcon = getAssetUrl("icons/expand-icon.svg");
|
|
16
18
|
function ChatbotModuleMenu({
|
|
17
19
|
hideMenuArrow,
|
|
18
20
|
onModuleClick,
|
|
@@ -29,7 +31,10 @@ function ChatbotModuleMenu({
|
|
|
29
31
|
isFullWidth,
|
|
30
32
|
handleCloseThread: handleCloseThreadProp,
|
|
31
33
|
handleThreadClick,
|
|
32
|
-
onMinimiseChatBot
|
|
34
|
+
onMinimiseChatBot,
|
|
35
|
+
dragHandleProps,
|
|
36
|
+
isCollapsed = false,
|
|
37
|
+
onToggleCollapse
|
|
33
38
|
}) {
|
|
34
39
|
var _a;
|
|
35
40
|
const { t } = useTranslation();
|
|
@@ -62,210 +67,181 @@ function ChatbotModuleMenu({
|
|
|
62
67
|
document.removeEventListener("mousedown", handleClickOutside);
|
|
63
68
|
};
|
|
64
69
|
}, []);
|
|
65
|
-
return /* @__PURE__ */ jsxs(
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
variant: "text",
|
|
77
|
-
onClick: () => {
|
|
78
|
-
setIsDropdownOpen(!isDropdownOpen);
|
|
79
|
-
},
|
|
80
|
-
children: !hideChildren && t("chatBot.moduleMenu.module")
|
|
81
|
-
}
|
|
82
|
-
),
|
|
83
|
-
isDropdownOpen && /* @__PURE__ */ jsx(
|
|
84
|
-
"div",
|
|
85
|
-
{
|
|
86
|
-
className: `chatbot-component-header-dropdown-container ${isDropdownOpen ? "open" : ""}`,
|
|
87
|
-
style: {
|
|
88
|
-
width: 397,
|
|
89
|
-
position: "absolute",
|
|
90
|
-
boxShadow: "0px 1px 6px 0px #1933451A",
|
|
91
|
-
top: 52,
|
|
92
|
-
zIndex: 999999,
|
|
93
|
-
backgroundColor: "white",
|
|
94
|
-
padding: "16px",
|
|
95
|
-
borderRadius: "18px"
|
|
96
|
-
},
|
|
97
|
-
children: isModuleListLoading ? /* @__PURE__ */ jsx(Loader, {}) : /* @__PURE__ */ jsx(
|
|
98
|
-
"div",
|
|
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,
|
|
99
81
|
{
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
cursor: "pointer"
|
|
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);
|
|
108
89
|
},
|
|
109
|
-
children:
|
|
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(
|
|
110
98
|
"div",
|
|
111
99
|
{
|
|
112
|
-
className:
|
|
113
|
-
style: {
|
|
114
|
-
display: "flex",
|
|
115
|
-
height: 66,
|
|
116
|
-
alignItems: "center",
|
|
117
|
-
justifyContent: "space-between",
|
|
118
|
-
padding: "12px"
|
|
119
|
-
},
|
|
100
|
+
className: `item-container ${isCollapsed ? "isCollapsed" : ""}`,
|
|
120
101
|
onClick: () => {
|
|
121
102
|
setActiveModule(module.name ?? "");
|
|
122
103
|
onModuleClick == null ? void 0 : onModuleClick(module.id, module.name, activeList);
|
|
123
104
|
setIsDropdownOpen(false);
|
|
124
105
|
},
|
|
125
106
|
children: [
|
|
126
|
-
/* @__PURE__ */ jsxs(
|
|
127
|
-
"
|
|
128
|
-
{
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
fontSize: 16,
|
|
146
|
-
lineHeight: "24px",
|
|
147
|
-
color: "#1F2B4D"
|
|
148
|
-
},
|
|
149
|
-
children: module.name
|
|
150
|
-
}
|
|
151
|
-
),
|
|
152
|
-
/* @__PURE__ */ jsx(
|
|
153
|
-
"span",
|
|
154
|
-
{
|
|
155
|
-
className: "chatbot-component-header-dropdown-item-content-text-description",
|
|
156
|
-
style: {
|
|
157
|
-
fontWeight: 500,
|
|
158
|
-
fontSize: 12,
|
|
159
|
-
lineHeight: "16px",
|
|
160
|
-
color: "#7A8294"
|
|
161
|
-
},
|
|
162
|
-
children: module.description
|
|
163
|
-
}
|
|
164
|
-
)
|
|
165
|
-
]
|
|
166
|
-
}
|
|
167
|
-
)
|
|
168
|
-
]
|
|
169
|
-
}
|
|
170
|
-
),
|
|
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
|
+
] }),
|
|
171
126
|
activeModule === module.name && /* @__PURE__ */ jsx("img", { alt: "active", src: ActiveIcon })
|
|
172
127
|
]
|
|
173
128
|
},
|
|
174
129
|
`${module.id ?? module.name ?? idx}`
|
|
175
|
-
))
|
|
130
|
+
)) })
|
|
176
131
|
}
|
|
177
132
|
)
|
|
178
|
-
}
|
|
179
|
-
)
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
/* @__PURE__ */ jsx(
|
|
203
|
-
"span",
|
|
204
|
-
{
|
|
205
|
-
className: "close_thread",
|
|
206
|
-
role: "button",
|
|
207
|
-
tabIndex: 0,
|
|
208
|
-
onKeyDown: (e) => {
|
|
209
|
-
if (e.key === "Enter" || e.key === " ") {
|
|
210
|
-
e.preventDefault();
|
|
211
|
-
e.stopPropagation();
|
|
212
|
-
handleCloseThread(e, idx);
|
|
213
|
-
}
|
|
214
|
-
},
|
|
215
|
-
children: /* @__PURE__ */ jsx(
|
|
216
|
-
"img",
|
|
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",
|
|
217
157
|
{
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
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
|
+
)
|
|
223
179
|
}
|
|
224
180
|
)
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
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
|
+
);
|
|
269
245
|
}
|
|
270
246
|
export {
|
|
271
247
|
ChatbotModuleMenu
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { ConversationScreenProps } from './Chatbot.types';
|
|
2
2
|
|
|
3
|
-
export declare function ConversationScreen({ userChats, setUserChats, onSendIconClick, conversation, isAssistantThinking, activeList, onLikeClick, onDislikeClick, inputText, handleRefresh, handleSaveChat, handleMicClick, suggestionBanner, isStopIcon, onStopIconClick, onCloseSuggestionBanner, showSuggestionBanner, customInputComponent, }: ConversationScreenProps): import("react/jsx-runtime").JSX.Element;
|
|
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
4
|
//# sourceMappingURL=conversationScreen.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversationScreen.d.ts","sourceRoot":"","sources":["../../../src/components/Chatbot/conversationScreen.tsx"],"names":[],"mappings":"
|
|
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,6 +1,7 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useState, useRef, useEffect, Fragment } from "react";
|
|
3
3
|
import moment from "moment";
|
|
4
|
+
import { ChatBotFooter } from "./chatBotFooter.js";
|
|
4
5
|
import ChatInput from "./chatInput.js";
|
|
5
6
|
import { getDateLabel, formatAMPM } from "./utils.js";
|
|
6
7
|
import { useTranslation } from "../../i18n/useTranslation.js";
|
|
@@ -22,7 +23,9 @@ function ConversationScreen({
|
|
|
22
23
|
onStopIconClick,
|
|
23
24
|
onCloseSuggestionBanner,
|
|
24
25
|
showSuggestionBanner,
|
|
25
|
-
customInputComponent
|
|
26
|
+
customInputComponent,
|
|
27
|
+
footerText,
|
|
28
|
+
isCollapsed
|
|
26
29
|
}) {
|
|
27
30
|
const { t, locale } = useTranslation();
|
|
28
31
|
const [input, setInput] = useState(inputText ?? "");
|
|
@@ -86,7 +89,7 @@ function ConversationScreen({
|
|
|
86
89
|
"div",
|
|
87
90
|
{
|
|
88
91
|
ref: conversationBodyRef,
|
|
89
|
-
className: `conversation-body-container ${showSuggestionBanner ? "show-suggestion-banner" : ""}`,
|
|
92
|
+
className: `conversation-body-container ${showSuggestionBanner ? "show-suggestion-banner" : ""} ${isCollapsed ? "collapsed" : ""}`,
|
|
90
93
|
children: [
|
|
91
94
|
conversationMessages.map((chat, idx) => {
|
|
92
95
|
var _a, _b, _c;
|
|
@@ -195,7 +198,8 @@ function ConversationScreen({
|
|
|
195
198
|
onSendIconClick,
|
|
196
199
|
onStopIconClick
|
|
197
200
|
}
|
|
198
|
-
) })
|
|
201
|
+
) }),
|
|
202
|
+
/* @__PURE__ */ jsx(ChatBotFooter, { footerText })
|
|
199
203
|
] });
|
|
200
204
|
}
|
|
201
205
|
export {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { CustomScreenProps } from './Chatbot.types';
|
|
2
2
|
|
|
3
|
-
export declare function CustomScreen({ onClose, customScreenJsx, userChats, setUserChats, onSendIconClick, activeList, handleRefresh, handleMicClick, suggestionBanner, isStopIcon, onStopIconClick, onCloseSuggestionBanner, showSuggestionBanner, customInputComponent, isFullWidth, }: CustomScreenProps): import("react/jsx-runtime").JSX.Element;
|
|
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
4
|
//# sourceMappingURL=customScreen.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"customScreen.d.ts","sourceRoot":"","sources":["../../../src/components/Chatbot/customScreen.tsx"],"names":[],"mappings":"
|
|
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"}
|
|
@@ -2,6 +2,7 @@ import { jsxs, jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { useState } from "react";
|
|
3
3
|
import default_1 from "../../node_modules/@mui/icons-material/Clear.js";
|
|
4
4
|
import { Button } from "../Button/index.js";
|
|
5
|
+
import { ChatBotFooter } from "./chatBotFooter.js";
|
|
5
6
|
import ChatInput from "./chatInput.js";
|
|
6
7
|
function CustomScreen({
|
|
7
8
|
onClose,
|
|
@@ -18,7 +19,8 @@ function CustomScreen({
|
|
|
18
19
|
onCloseSuggestionBanner,
|
|
19
20
|
showSuggestionBanner,
|
|
20
21
|
customInputComponent,
|
|
21
|
-
isFullWidth
|
|
22
|
+
isFullWidth,
|
|
23
|
+
footerText
|
|
22
24
|
}) {
|
|
23
25
|
const [input, setInput] = useState("");
|
|
24
26
|
return /* @__PURE__ */ jsxs("div", { className: "chatbot-landing-screen-container", style: { pointerEvents: "auto" }, children: [
|
|
@@ -34,30 +36,29 @@ function CustomScreen({
|
|
|
34
36
|
onClick: onClose
|
|
35
37
|
}
|
|
36
38
|
) }),
|
|
37
|
-
/* @__PURE__ */
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
] })
|
|
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 })
|
|
61
62
|
] });
|
|
62
63
|
}
|
|
63
64
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Chatbot/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Chatbot/index.tsx"],"names":[],"mappings":"AA4BA,OAAO,KAAK,EAAE,YAAY,EAAwB,MAAM,iBAAiB,CAAC;AAC1E,OAAO,sBAAsB,CAAC;AAiD9B,YAAY,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAoCpD,wBAAgB,gBAAgB,CAAC,EAC/B,OAAO,EACP,QAAQ,EACR,aAAa,EACb,gBAAgB,EAChB,YAAiD,EACjD,QAAQ,EAAE,SAAS,EACnB,aAAa,EAAE,cAAc,EAC7B,cAAc,EAAE,eAAe,EAC/B,mBAAmB,EACnB,mBAAmB,EACnB,eAA0B,EAC1B,cAAc,EAAE,eAAoB,EACpC,mBAA2B,EAC3B,UAAe,EACf,aAAwB,EACxB,OAAO,EACP,eAAe,EACf,UAA6C,EAC7C,YAAmB,EACnB,cAAsB,EACtB,eAAsB,EACtB,WAAsB,EACtB,cAAyB,EACzB,kBAA6B,EAC7B,SAAc,EACd,aAAa,EACb,cAAc,EACd,cAAc,EACd,aAAqB,EACrB,aAAqB,EACrB,mBAA2B,EAC3B,gBAAgB,EAChB,UAAkB,EAClB,eAA0B,EAC1B,aAAqB,EACrB,UAAU,EACV,uBAAkC,EAClC,oBAA4B,EAC5B,WAAgB,EAChB,oBAA2B,EAC3B,mBAA8B,EAC9B,gBAAqB,EACrB,qBAAgC,EAChC,2BAAsC,EACtC,oBAA+B,EAC/B,iBAAiB,EACjB,mBAA8B,EAC9B,gBAAuB,EACvB,WAAmB,EACnB,oBAAoB,EACpB,iBAA4B,EAC5B,iBAA4B,EAC5B,iBAAiB,EACjB,eAA0B,GAC3B,EAAE,YAAY,kDAqcd;yBA5fe,gBAAgB"}
|