impact-ui 5.0.4 → 5.0.5-alpha.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/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/Chart/index.d.ts.map +1 -1
- package/dist/components/Chart/index.js +105 -4
- 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 +229 -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 +500 -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 +66 -264
- package/dist/node_modules/@impactsmartsuite/impact-icons/dist/index.js +1290 -85
- 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/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,24 @@
|
|
|
1
|
+
import { ChatMessage, IrisAssistantActionKey, IrisThinkingState } from './Chatbot.types';
|
|
2
|
+
|
|
3
|
+
/** Resolve which assistant actions to show — `actions` keys win over `enable*` flags. */
|
|
4
|
+
export declare function resolveIrisAssistantActions(message: ChatMessage, defaults?: IrisAssistantActionKey[]): IrisAssistantActionKey[];
|
|
5
|
+
export interface IrisConversationThreadProps {
|
|
6
|
+
messages: ChatMessage[];
|
|
7
|
+
isThinking?: boolean;
|
|
8
|
+
thinking?: IrisThinkingState;
|
|
9
|
+
/**
|
|
10
|
+
* Default Iris assistant action keys when a message has neither `actions` nor matching `enable*` flags.
|
|
11
|
+
*/
|
|
12
|
+
defaultAssistantActions?: IrisAssistantActionKey[];
|
|
13
|
+
onCopyUserMessage?: (message: ChatMessage, index: number) => void;
|
|
14
|
+
/** Called when the user submits an in-place edit (Cursor-style). */
|
|
15
|
+
onEditUserMessage?: (message: ChatMessage, index: number, nextText: string) => void;
|
|
16
|
+
onCopyAssistantMessage?: (message: ChatMessage, index: number) => void;
|
|
17
|
+
onLikeAssistantMessage?: (message: ChatMessage, index: number) => void;
|
|
18
|
+
onDislikeAssistantMessage?: (message: ChatMessage, index: number) => void;
|
|
19
|
+
onRegenerateAssistantMessage?: (message: ChatMessage, index: number) => void;
|
|
20
|
+
onSpeakAssistantMessage?: (message: ChatMessage, index: number) => void;
|
|
21
|
+
onRevertAssistantMessage?: (message: ChatMessage, index: number) => void;
|
|
22
|
+
}
|
|
23
|
+
export declare function IrisConversationThread({ messages, isThinking, thinking, defaultAssistantActions, onCopyUserMessage, onEditUserMessage, onCopyAssistantMessage, onLikeAssistantMessage, onDislikeAssistantMessage, onRegenerateAssistantMessage, onSpeakAssistantMessage, onRevertAssistantMessage, }: IrisConversationThreadProps): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
//# sourceMappingURL=irisConversationThread.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"irisConversationThread.d.ts","sourceRoot":"","sources":["../../../src/components/Chatbot/irisConversationThread.tsx"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EACV,WAAW,EACX,sBAAsB,EACtB,iBAAiB,EAClB,MAAM,iBAAiB,CAAC;AAoCzB,yFAAyF;AACzF,wBAAgB,2BAA2B,CACzC,OAAO,EAAE,WAAW,EACpB,QAAQ,GAAE,sBAAsB,EAAO,GACtC,sBAAsB,EAAE,CAe1B;AAED,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,EAAE,WAAW,EAAE,CAAC;IACxB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,iBAAiB,CAAC;IAC7B;;OAEG;IACH,uBAAuB,CAAC,EAAE,sBAAsB,EAAE,CAAC;IACnD,iBAAiB,CAAC,EAAE,CAAC,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClE,oEAAoE;IACpE,iBAAiB,CAAC,EAAE,CAAC,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACpF,sBAAsB,CAAC,EAAE,CAAC,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvE,sBAAsB,CAAC,EAAE,CAAC,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvE,yBAAyB,CAAC,EAAE,CAAC,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1E,4BAA4B,CAAC,EAAE,CAAC,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7E,uBAAuB,CAAC,EAAE,CAAC,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACxE,wBAAwB,CAAC,EAAE,CAAC,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CAC1E;AAmWD,wBAAgB,sBAAsB,CAAC,EACrC,QAAQ,EACR,UAAkB,EAClB,QAAQ,EACR,uBAA4B,EAC5B,iBAAiB,EACjB,iBAAiB,EACjB,sBAAsB,EACtB,sBAAsB,EACtB,yBAAyB,EACzB,4BAA4B,EAC5B,uBAAuB,EACvB,wBAAwB,GACzB,EAAE,2BAA2B,2CAuJ7B"}
|
|
@@ -0,0 +1,511 @@
|
|
|
1
|
+
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { useRef, useState, useEffect } from "react";
|
|
3
|
+
import default_1$2 from "../../node_modules/@mui/icons-material/ContentCopyOutlined.js";
|
|
4
|
+
import default_1$1 from "../../node_modules/@mui/icons-material/NorthRounded.js";
|
|
5
|
+
import default_1 from "../../node_modules/@mui/icons-material/Close.js";
|
|
6
|
+
import default_1$3 from "../../node_modules/@mui/icons-material/RefreshOutlined.js";
|
|
7
|
+
import default_1$4 from "../../node_modules/@mui/icons-material/VolumeUpOutlined.js";
|
|
8
|
+
import { EditBlack as EditBlack_default, ThumbsUpFilled as ThumbsUpFilled_default, ThumbsUp as ThumbsUp_default, ThumbsDownFilled as ThumbsDownFilled_default, ThumbsDown as ThumbsDown_default } from "../../node_modules/@impactsmartsuite/impact-icons/dist/index.js";
|
|
9
|
+
import TextareaAutosize from "react-textarea-autosize";
|
|
10
|
+
import { getAssetUrl } from "../../utils/assetBase.js";
|
|
11
|
+
import { Button } from "../Button/index.js";
|
|
12
|
+
import { Tooltip } from "../Tooltip/index.js";
|
|
13
|
+
import { IrisThinking } from "./irisThinking.js";
|
|
14
|
+
import { useTranslation } from "../../i18n/useTranslation.js";
|
|
15
|
+
const SmartBotIcon = getAssetUrl("icons/smartBotAlan.svg");
|
|
16
|
+
const ACTION_ICON_SIZE = 16;
|
|
17
|
+
const REACTION_ICON_SIZE = 20;
|
|
18
|
+
const EDIT_ACTION_SELECTOR = 'button, a, input, textarea, select, label, [role="button"], [role="menuitem"]';
|
|
19
|
+
function formatMessageTime(timestamp) {
|
|
20
|
+
if (!timestamp) return "";
|
|
21
|
+
const date = new Date(timestamp);
|
|
22
|
+
if (Number.isNaN(date.getTime())) {
|
|
23
|
+
if (/[ap]\.?m\.?$/i.test(timestamp)) return timestamp;
|
|
24
|
+
return "";
|
|
25
|
+
}
|
|
26
|
+
return date.toLocaleTimeString(void 0, {
|
|
27
|
+
hour: "2-digit",
|
|
28
|
+
minute: "2-digit",
|
|
29
|
+
hour12: true
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
function getMessageContent(message) {
|
|
33
|
+
if (message.text != null && message.text !== "") return message.text;
|
|
34
|
+
if (message.bodyText != null && message.bodyText !== "") return message.bodyText;
|
|
35
|
+
return null;
|
|
36
|
+
}
|
|
37
|
+
function getPlainText(message) {
|
|
38
|
+
const content = message.text ?? message.bodyText;
|
|
39
|
+
return typeof content === "string" ? content : "";
|
|
40
|
+
}
|
|
41
|
+
function resolveIrisAssistantActions(message, defaults = []) {
|
|
42
|
+
if (Array.isArray(message.actions)) {
|
|
43
|
+
return message.actions;
|
|
44
|
+
}
|
|
45
|
+
const fromFlags = [];
|
|
46
|
+
if (message.enableCopy) fromFlags.push("copy");
|
|
47
|
+
if (message.enableLikes) {
|
|
48
|
+
fromFlags.push("like", "dislike");
|
|
49
|
+
}
|
|
50
|
+
if (message.enableRegenerate) fromFlags.push("regenerate");
|
|
51
|
+
if (message.enableSpeaker) fromFlags.push("speak");
|
|
52
|
+
if (message.enableRevert) fromFlags.push("revert");
|
|
53
|
+
return fromFlags.length > 0 ? fromFlags : defaults;
|
|
54
|
+
}
|
|
55
|
+
function UserMessageActions({
|
|
56
|
+
text,
|
|
57
|
+
onCopy,
|
|
58
|
+
onEdit
|
|
59
|
+
}) {
|
|
60
|
+
const { t } = useTranslation();
|
|
61
|
+
const [copied, setCopied] = useState(false);
|
|
62
|
+
const handleCopy = async () => {
|
|
63
|
+
try {
|
|
64
|
+
await navigator.clipboard.writeText(text);
|
|
65
|
+
setCopied(true);
|
|
66
|
+
window.setTimeout(() => setCopied(false), 1500);
|
|
67
|
+
} catch {
|
|
68
|
+
}
|
|
69
|
+
onCopy();
|
|
70
|
+
};
|
|
71
|
+
return /* @__PURE__ */ jsxs("div", { className: "iris-conversation-user-actions", children: [
|
|
72
|
+
/* @__PURE__ */ jsx(
|
|
73
|
+
Tooltip,
|
|
74
|
+
{
|
|
75
|
+
title: copied ? t("chatBot.message.copied") : t("chatBot.message.copy"),
|
|
76
|
+
variant: "tertiary",
|
|
77
|
+
children: /* @__PURE__ */ jsx(
|
|
78
|
+
Button,
|
|
79
|
+
{
|
|
80
|
+
"aria-label": copied ? t("chatBot.message.copied") : t("chatBot.message.copy"),
|
|
81
|
+
className: "chatbot-composer-icon-button",
|
|
82
|
+
icon: /* @__PURE__ */ jsx(default_1$2, { sx: { fontSize: ACTION_ICON_SIZE } }),
|
|
83
|
+
size: "small",
|
|
84
|
+
type: "default",
|
|
85
|
+
variant: "text",
|
|
86
|
+
onClick: handleCopy
|
|
87
|
+
}
|
|
88
|
+
)
|
|
89
|
+
}
|
|
90
|
+
),
|
|
91
|
+
/* @__PURE__ */ jsx(Tooltip, { title: t("chatBot.message.edit"), variant: "tertiary", children: /* @__PURE__ */ jsx(
|
|
92
|
+
Button,
|
|
93
|
+
{
|
|
94
|
+
"aria-label": t("chatBot.message.edit"),
|
|
95
|
+
className: "chatbot-composer-icon-button",
|
|
96
|
+
icon: /* @__PURE__ */ jsx(EditBlack_default, { height: ACTION_ICON_SIZE, width: ACTION_ICON_SIZE }),
|
|
97
|
+
size: "small",
|
|
98
|
+
type: "default",
|
|
99
|
+
variant: "text",
|
|
100
|
+
onClick: onEdit
|
|
101
|
+
}
|
|
102
|
+
) })
|
|
103
|
+
] });
|
|
104
|
+
}
|
|
105
|
+
const REACTION_ANIM_MS = 1e3;
|
|
106
|
+
function getLikeIcon(active) {
|
|
107
|
+
const Icon = active ? ThumbsUpFilled_default : ThumbsUp_default;
|
|
108
|
+
return /* @__PURE__ */ jsx(Icon, { height: REACTION_ICON_SIZE, width: REACTION_ICON_SIZE });
|
|
109
|
+
}
|
|
110
|
+
function getDislikeIcon(active) {
|
|
111
|
+
const Icon = active ? ThumbsDownFilled_default : ThumbsDown_default;
|
|
112
|
+
return /* @__PURE__ */ jsx(Icon, { height: REACTION_ICON_SIZE, width: REACTION_ICON_SIZE });
|
|
113
|
+
}
|
|
114
|
+
function AssistantMessageActions({
|
|
115
|
+
actions,
|
|
116
|
+
plainText,
|
|
117
|
+
liked,
|
|
118
|
+
disliked,
|
|
119
|
+
onCopy,
|
|
120
|
+
onLike,
|
|
121
|
+
onDislike,
|
|
122
|
+
onRegenerate,
|
|
123
|
+
onSpeak,
|
|
124
|
+
onRevert
|
|
125
|
+
}) {
|
|
126
|
+
const { t } = useTranslation();
|
|
127
|
+
const [copied, setCopied] = useState(false);
|
|
128
|
+
const [reaction, setReaction] = useState(
|
|
129
|
+
() => liked ? "liked" : disliked ? "disliked" : null
|
|
130
|
+
);
|
|
131
|
+
const [animating, setAnimating] = useState(null);
|
|
132
|
+
const animTimerRef = useRef(null);
|
|
133
|
+
useEffect(() => {
|
|
134
|
+
setReaction(liked ? "liked" : disliked ? "disliked" : null);
|
|
135
|
+
}, [liked, disliked]);
|
|
136
|
+
useEffect(() => () => {
|
|
137
|
+
if (animTimerRef.current) clearTimeout(animTimerRef.current);
|
|
138
|
+
}, []);
|
|
139
|
+
const enabled = new Set(actions);
|
|
140
|
+
const showLeft = enabled.has("copy") || enabled.has("like") || enabled.has("dislike") || enabled.has("regenerate") || enabled.has("speak");
|
|
141
|
+
const showRevert = enabled.has("revert");
|
|
142
|
+
if (!showLeft && !showRevert) return null;
|
|
143
|
+
const triggerReaction = (type) => {
|
|
144
|
+
if (animTimerRef.current) clearTimeout(animTimerRef.current);
|
|
145
|
+
setAnimating(type);
|
|
146
|
+
setReaction(type === "like" ? "liked" : "disliked");
|
|
147
|
+
animTimerRef.current = setTimeout(() => setAnimating(null), REACTION_ANIM_MS);
|
|
148
|
+
if (type === "like") onLike();
|
|
149
|
+
else onDislike();
|
|
150
|
+
};
|
|
151
|
+
const handleCopy = async () => {
|
|
152
|
+
if (plainText) {
|
|
153
|
+
try {
|
|
154
|
+
await navigator.clipboard.writeText(plainText);
|
|
155
|
+
setCopied(true);
|
|
156
|
+
window.setTimeout(() => setCopied(false), 1500);
|
|
157
|
+
} catch {
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
onCopy();
|
|
161
|
+
};
|
|
162
|
+
const likeActive = reaction === "liked" || animating === "like";
|
|
163
|
+
const dislikeActive = reaction === "disliked" || animating === "dislike";
|
|
164
|
+
const likeClassName = [
|
|
165
|
+
"iris-conversation-assistant-action",
|
|
166
|
+
"iris-conversation-reaction",
|
|
167
|
+
likeActive ? "is-active" : "",
|
|
168
|
+
animating === "like" ? "is-animating-like" : ""
|
|
169
|
+
].filter(Boolean).join(" ");
|
|
170
|
+
const dislikeClassName = [
|
|
171
|
+
"iris-conversation-assistant-action",
|
|
172
|
+
"iris-conversation-reaction",
|
|
173
|
+
dislikeActive ? "is-active" : "",
|
|
174
|
+
animating === "dislike" ? "is-animating-dislike" : ""
|
|
175
|
+
].filter(Boolean).join(" ");
|
|
176
|
+
return /* @__PURE__ */ jsxs("div", { className: "iris-conversation-assistant-actions", children: [
|
|
177
|
+
showLeft ? /* @__PURE__ */ jsxs("div", { className: "iris-conversation-assistant-actions-left", children: [
|
|
178
|
+
enabled.has("copy") ? /* @__PURE__ */ jsx(
|
|
179
|
+
Tooltip,
|
|
180
|
+
{
|
|
181
|
+
title: copied ? t("chatBot.message.copied") : t("chatBot.message.copy"),
|
|
182
|
+
variant: "tertiary",
|
|
183
|
+
children: /* @__PURE__ */ jsx(
|
|
184
|
+
Button,
|
|
185
|
+
{
|
|
186
|
+
"aria-label": copied ? t("chatBot.message.copied") : t("chatBot.message.copy"),
|
|
187
|
+
className: "iris-conversation-assistant-action",
|
|
188
|
+
icon: /* @__PURE__ */ jsx(default_1$2, { sx: { fontSize: ACTION_ICON_SIZE } }),
|
|
189
|
+
size: "small",
|
|
190
|
+
type: "default",
|
|
191
|
+
variant: "text",
|
|
192
|
+
onClick: handleCopy
|
|
193
|
+
}
|
|
194
|
+
)
|
|
195
|
+
}
|
|
196
|
+
) : null,
|
|
197
|
+
enabled.has("like") ? /* @__PURE__ */ jsx(Tooltip, { title: t("chatBot.message.like"), variant: "tertiary", children: /* @__PURE__ */ jsx(
|
|
198
|
+
Button,
|
|
199
|
+
{
|
|
200
|
+
"aria-label": t("chatBot.message.like"),
|
|
201
|
+
"aria-pressed": likeActive,
|
|
202
|
+
className: likeClassName,
|
|
203
|
+
icon: getLikeIcon(likeActive),
|
|
204
|
+
size: "small",
|
|
205
|
+
type: "default",
|
|
206
|
+
variant: "text",
|
|
207
|
+
onClick: () => triggerReaction("like")
|
|
208
|
+
}
|
|
209
|
+
) }) : null,
|
|
210
|
+
enabled.has("dislike") ? /* @__PURE__ */ jsx(Tooltip, { title: t("chatBot.message.dislike"), variant: "tertiary", children: /* @__PURE__ */ jsx(
|
|
211
|
+
Button,
|
|
212
|
+
{
|
|
213
|
+
"aria-label": t("chatBot.message.dislike"),
|
|
214
|
+
"aria-pressed": dislikeActive,
|
|
215
|
+
className: dislikeClassName,
|
|
216
|
+
icon: getDislikeIcon(dislikeActive),
|
|
217
|
+
size: "small",
|
|
218
|
+
type: "default",
|
|
219
|
+
variant: "text",
|
|
220
|
+
onClick: () => triggerReaction("dislike")
|
|
221
|
+
}
|
|
222
|
+
) }) : null,
|
|
223
|
+
enabled.has("regenerate") ? /* @__PURE__ */ jsx(Tooltip, { title: t("chatBot.message.regenerate"), variant: "tertiary", children: /* @__PURE__ */ jsx(
|
|
224
|
+
Button,
|
|
225
|
+
{
|
|
226
|
+
"aria-label": t("chatBot.message.regenerate"),
|
|
227
|
+
className: "iris-conversation-assistant-action",
|
|
228
|
+
icon: /* @__PURE__ */ jsx(default_1$3, { sx: { fontSize: ACTION_ICON_SIZE } }),
|
|
229
|
+
size: "small",
|
|
230
|
+
type: "default",
|
|
231
|
+
variant: "text",
|
|
232
|
+
onClick: onRegenerate
|
|
233
|
+
}
|
|
234
|
+
) }) : null,
|
|
235
|
+
enabled.has("speak") ? /* @__PURE__ */ jsx(Tooltip, { title: t("chatBot.message.speak"), variant: "tertiary", children: /* @__PURE__ */ jsx(
|
|
236
|
+
Button,
|
|
237
|
+
{
|
|
238
|
+
"aria-label": t("chatBot.message.speak"),
|
|
239
|
+
className: "iris-conversation-assistant-action",
|
|
240
|
+
icon: /* @__PURE__ */ jsx(default_1$4, { sx: { fontSize: ACTION_ICON_SIZE } }),
|
|
241
|
+
size: "small",
|
|
242
|
+
type: "default",
|
|
243
|
+
variant: "text",
|
|
244
|
+
onClick: onSpeak
|
|
245
|
+
}
|
|
246
|
+
) }) : null
|
|
247
|
+
] }) : /* @__PURE__ */ jsx("div", {}),
|
|
248
|
+
showRevert ? /* @__PURE__ */ jsx(
|
|
249
|
+
"button",
|
|
250
|
+
{
|
|
251
|
+
className: "iris-conversation-assistant-revert",
|
|
252
|
+
type: "button",
|
|
253
|
+
onClick: onRevert,
|
|
254
|
+
children: t("chatBot.message.revert")
|
|
255
|
+
}
|
|
256
|
+
) : null
|
|
257
|
+
] });
|
|
258
|
+
}
|
|
259
|
+
function UserMessageEditor({
|
|
260
|
+
initialText,
|
|
261
|
+
onCancel,
|
|
262
|
+
onSubmit
|
|
263
|
+
}) {
|
|
264
|
+
const { t } = useTranslation();
|
|
265
|
+
const textareaRef = useRef(null);
|
|
266
|
+
const [value, setValue] = useState(initialText);
|
|
267
|
+
const [isFocused, setIsFocused] = useState(true);
|
|
268
|
+
const hasContent = value.trim().length > 0;
|
|
269
|
+
const isActive = isFocused || hasContent;
|
|
270
|
+
useEffect(() => {
|
|
271
|
+
const el = textareaRef.current;
|
|
272
|
+
if (!el) return;
|
|
273
|
+
el.focus();
|
|
274
|
+
const len = el.value.length;
|
|
275
|
+
el.setSelectionRange(len, len);
|
|
276
|
+
}, []);
|
|
277
|
+
const handleSubmit = () => {
|
|
278
|
+
if (!hasContent) return;
|
|
279
|
+
onSubmit(value.trim());
|
|
280
|
+
};
|
|
281
|
+
const handleBoxMouseDown = (event) => {
|
|
282
|
+
var _a;
|
|
283
|
+
const target = event.target;
|
|
284
|
+
if (target == null ? void 0 : target.closest(EDIT_ACTION_SELECTOR)) return;
|
|
285
|
+
event.preventDefault();
|
|
286
|
+
(_a = textareaRef.current) == null ? void 0 : _a.focus();
|
|
287
|
+
};
|
|
288
|
+
return /* @__PURE__ */ jsxs(
|
|
289
|
+
"form",
|
|
290
|
+
{
|
|
291
|
+
className: "chatbot-composer iris-conversation-user-editor",
|
|
292
|
+
onSubmit: (event) => {
|
|
293
|
+
event.preventDefault();
|
|
294
|
+
handleSubmit();
|
|
295
|
+
},
|
|
296
|
+
children: [
|
|
297
|
+
/* @__PURE__ */ jsx(
|
|
298
|
+
"div",
|
|
299
|
+
{
|
|
300
|
+
className: [
|
|
301
|
+
"chatbot-composer-box",
|
|
302
|
+
isActive ? "is-active" : "",
|
|
303
|
+
hasContent ? "has-content" : ""
|
|
304
|
+
].filter(Boolean).join(" "),
|
|
305
|
+
onMouseDown: handleBoxMouseDown,
|
|
306
|
+
children: /* @__PURE__ */ jsx(
|
|
307
|
+
TextareaAutosize,
|
|
308
|
+
{
|
|
309
|
+
ref: textareaRef,
|
|
310
|
+
"aria-label": t("chatBot.message.edit"),
|
|
311
|
+
className: "chatbot-composer-textarea",
|
|
312
|
+
maxRows: 6,
|
|
313
|
+
minRows: 1,
|
|
314
|
+
value,
|
|
315
|
+
onBlur: () => setIsFocused(false),
|
|
316
|
+
onChange: (event) => setValue(event.target.value),
|
|
317
|
+
onFocus: () => setIsFocused(true),
|
|
318
|
+
onKeyDown: (event) => {
|
|
319
|
+
if (event.key === "Escape") {
|
|
320
|
+
event.preventDefault();
|
|
321
|
+
onCancel();
|
|
322
|
+
return;
|
|
323
|
+
}
|
|
324
|
+
if (event.key === "Enter" && !event.shiftKey) {
|
|
325
|
+
event.preventDefault();
|
|
326
|
+
handleSubmit();
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
)
|
|
331
|
+
}
|
|
332
|
+
),
|
|
333
|
+
/* @__PURE__ */ jsx("div", { className: "chatbot-composer-toolbar", children: /* @__PURE__ */ jsxs("div", { className: "chatbot-composer-toolbar-right", children: [
|
|
334
|
+
/* @__PURE__ */ jsx(
|
|
335
|
+
Button,
|
|
336
|
+
{
|
|
337
|
+
"aria-label": t("chatBot.message.editCancel", { defaultValue: "Cancel" }),
|
|
338
|
+
icon: /* @__PURE__ */ jsx(default_1, { fontSize: "small" }),
|
|
339
|
+
size: "small",
|
|
340
|
+
type: "default",
|
|
341
|
+
variant: "tertiary",
|
|
342
|
+
onClick: onCancel
|
|
343
|
+
}
|
|
344
|
+
),
|
|
345
|
+
hasContent && /* @__PURE__ */ jsx(Tooltip, { title: t("chatBot.composer.send"), variant: "tertiary", children: /* @__PURE__ */ jsx(
|
|
346
|
+
Button,
|
|
347
|
+
{
|
|
348
|
+
"aria-label": t("chatBot.composer.send"),
|
|
349
|
+
htmlType: "submit",
|
|
350
|
+
icon: /* @__PURE__ */ jsx(default_1$1, { fontSize: "small" }),
|
|
351
|
+
type: "default",
|
|
352
|
+
variant: "primary",
|
|
353
|
+
size: "small"
|
|
354
|
+
}
|
|
355
|
+
) })
|
|
356
|
+
] }) })
|
|
357
|
+
]
|
|
358
|
+
}
|
|
359
|
+
);
|
|
360
|
+
}
|
|
361
|
+
function IrisConversationThread({
|
|
362
|
+
messages,
|
|
363
|
+
isThinking = false,
|
|
364
|
+
thinking,
|
|
365
|
+
defaultAssistantActions = [],
|
|
366
|
+
onCopyUserMessage,
|
|
367
|
+
onEditUserMessage,
|
|
368
|
+
onCopyAssistantMessage,
|
|
369
|
+
onLikeAssistantMessage,
|
|
370
|
+
onDislikeAssistantMessage,
|
|
371
|
+
onRegenerateAssistantMessage,
|
|
372
|
+
onSpeakAssistantMessage,
|
|
373
|
+
onRevertAssistantMessage
|
|
374
|
+
}) {
|
|
375
|
+
const { t } = useTranslation();
|
|
376
|
+
const messagesRef = useRef(null);
|
|
377
|
+
const [editingIndex, setEditingIndex] = useState(null);
|
|
378
|
+
const scrollToBottom = (behavior = "smooth") => {
|
|
379
|
+
const el = messagesRef.current;
|
|
380
|
+
if (!el) return;
|
|
381
|
+
if (typeof el.scrollTo === "function") {
|
|
382
|
+
el.scrollTo({ top: el.scrollHeight, behavior });
|
|
383
|
+
} else {
|
|
384
|
+
el.scrollTop = el.scrollHeight;
|
|
385
|
+
}
|
|
386
|
+
};
|
|
387
|
+
useEffect(() => {
|
|
388
|
+
if (editingIndex == null) return;
|
|
389
|
+
if (editingIndex >= messages.length) setEditingIndex(null);
|
|
390
|
+
}, [editingIndex, messages.length]);
|
|
391
|
+
useEffect(() => {
|
|
392
|
+
scrollToBottom();
|
|
393
|
+
}, [messages, isThinking, thinking]);
|
|
394
|
+
return /* @__PURE__ */ jsxs("div", { className: "iris-conversation-thread", children: [
|
|
395
|
+
/* @__PURE__ */ jsx("div", { className: "iris-conversation-date", children: /* @__PURE__ */ jsx("span", { className: "iris-conversation-date-pill", children: t("chatBot.dateSeparator.today") }) }),
|
|
396
|
+
/* @__PURE__ */ jsxs("div", { ref: messagesRef, className: "iris-conversation-messages", children: [
|
|
397
|
+
messages.map((message, index) => {
|
|
398
|
+
var _a, _b;
|
|
399
|
+
const isUser = message.role === "user" || message.userType === "user";
|
|
400
|
+
const content = getMessageContent(message);
|
|
401
|
+
const plainText = getPlainText(message);
|
|
402
|
+
if (content == null && !message.thinking) return null;
|
|
403
|
+
if (isUser) {
|
|
404
|
+
if (typeof content !== "string" || !content) return null;
|
|
405
|
+
const isEditing = editingIndex === index;
|
|
406
|
+
return /* @__PURE__ */ jsx(
|
|
407
|
+
"div",
|
|
408
|
+
{
|
|
409
|
+
className: "iris-conversation-user-row",
|
|
410
|
+
children: /* @__PURE__ */ jsx("div", { className: "iris-conversation-user-block", children: isEditing ? /* @__PURE__ */ jsx(
|
|
411
|
+
UserMessageEditor,
|
|
412
|
+
{
|
|
413
|
+
initialText: content,
|
|
414
|
+
onCancel: () => setEditingIndex(null),
|
|
415
|
+
onSubmit: (nextText) => {
|
|
416
|
+
setEditingIndex(null);
|
|
417
|
+
onEditUserMessage == null ? void 0 : onEditUserMessage(message, index, nextText);
|
|
418
|
+
requestAnimationFrame(() => scrollToBottom());
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
422
|
+
/* @__PURE__ */ jsxs("div", { className: "iris-conversation-user-bubble", children: [
|
|
423
|
+
/* @__PURE__ */ jsx("p", { className: "iris-conversation-user-text", children: content }),
|
|
424
|
+
/* @__PURE__ */ jsx(
|
|
425
|
+
"time",
|
|
426
|
+
{
|
|
427
|
+
className: "iris-conversation-user-time",
|
|
428
|
+
dateTime: message.timestamp ?? message.timeStamp,
|
|
429
|
+
children: formatMessageTime(message.timestamp ?? message.timeStamp)
|
|
430
|
+
}
|
|
431
|
+
)
|
|
432
|
+
] }),
|
|
433
|
+
/* @__PURE__ */ jsx(
|
|
434
|
+
UserMessageActions,
|
|
435
|
+
{
|
|
436
|
+
text: content,
|
|
437
|
+
onCopy: () => onCopyUserMessage == null ? void 0 : onCopyUserMessage(message, index),
|
|
438
|
+
onEdit: () => setEditingIndex(index)
|
|
439
|
+
}
|
|
440
|
+
)
|
|
441
|
+
] }) })
|
|
442
|
+
},
|
|
443
|
+
`${message.id ?? "user"}-${index}`
|
|
444
|
+
);
|
|
445
|
+
}
|
|
446
|
+
const timeLabel = formatMessageTime(message.timestamp ?? message.timeStamp);
|
|
447
|
+
return /* @__PURE__ */ jsxs(
|
|
448
|
+
"div",
|
|
449
|
+
{
|
|
450
|
+
className: "iris-conversation-assistant-row",
|
|
451
|
+
children: [
|
|
452
|
+
/* @__PURE__ */ jsx("img", { alt: "", className: "iris-conversation-assistant-avatar", src: SmartBotIcon }),
|
|
453
|
+
/* @__PURE__ */ jsxs("div", { className: "iris-conversation-assistant-content", children: [
|
|
454
|
+
message.thinking ? /* @__PURE__ */ jsx("div", { className: "iris-conversation-assistant-thinking", children: /* @__PURE__ */ jsx(IrisThinking, { thinking: { ...message.thinking, phase: "complete" } }) }) : null,
|
|
455
|
+
content != null ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
456
|
+
/* @__PURE__ */ jsxs("div", { className: "iris-conversation-assistant-bubble", children: [
|
|
457
|
+
/* @__PURE__ */ jsx("div", { className: "iris-conversation-assistant-text", children: content }),
|
|
458
|
+
timeLabel ? /* @__PURE__ */ jsx(
|
|
459
|
+
"time",
|
|
460
|
+
{
|
|
461
|
+
className: "iris-conversation-assistant-time",
|
|
462
|
+
dateTime: message.timestamp ?? message.timeStamp,
|
|
463
|
+
children: timeLabel
|
|
464
|
+
}
|
|
465
|
+
) : null
|
|
466
|
+
] }),
|
|
467
|
+
/* @__PURE__ */ jsx(
|
|
468
|
+
AssistantMessageActions,
|
|
469
|
+
{
|
|
470
|
+
actions: resolveIrisAssistantActions(message, defaultAssistantActions),
|
|
471
|
+
disliked: ((_a = message.extra) == null ? void 0 : _a.status) === "disliked",
|
|
472
|
+
liked: ((_b = message.extra) == null ? void 0 : _b.status) === "liked",
|
|
473
|
+
plainText,
|
|
474
|
+
onCopy: () => onCopyAssistantMessage == null ? void 0 : onCopyAssistantMessage(message, index),
|
|
475
|
+
onDislike: () => onDislikeAssistantMessage == null ? void 0 : onDislikeAssistantMessage(message, index),
|
|
476
|
+
onLike: () => onLikeAssistantMessage == null ? void 0 : onLikeAssistantMessage(message, index),
|
|
477
|
+
onRegenerate: () => onRegenerateAssistantMessage == null ? void 0 : onRegenerateAssistantMessage(message, index),
|
|
478
|
+
onRevert: () => onRevertAssistantMessage == null ? void 0 : onRevertAssistantMessage(message, index),
|
|
479
|
+
onSpeak: () => onSpeakAssistantMessage == null ? void 0 : onSpeakAssistantMessage(message, index)
|
|
480
|
+
}
|
|
481
|
+
)
|
|
482
|
+
] }) : null
|
|
483
|
+
] })
|
|
484
|
+
]
|
|
485
|
+
},
|
|
486
|
+
`${message.id ?? "assistant"}-${index}`
|
|
487
|
+
);
|
|
488
|
+
}),
|
|
489
|
+
isThinking ? thinking ? /* @__PURE__ */ jsx("div", { className: "iris-conversation-thinking", children: /* @__PURE__ */ jsx(IrisThinking, { thinking }) }) : /* @__PURE__ */ jsxs(
|
|
490
|
+
"div",
|
|
491
|
+
{
|
|
492
|
+
"aria-label": t("chatBot.irisThinking"),
|
|
493
|
+
"aria-live": "polite",
|
|
494
|
+
className: "iris-conversation-thinking",
|
|
495
|
+
children: [
|
|
496
|
+
/* @__PURE__ */ jsx("img", { alt: "", className: "iris-conversation-assistant-avatar", src: SmartBotIcon }),
|
|
497
|
+
/* @__PURE__ */ jsxs("span", { "aria-hidden": "true", className: "iris-conversation-thinking-dots", children: [
|
|
498
|
+
/* @__PURE__ */ jsx("span", {}),
|
|
499
|
+
/* @__PURE__ */ jsx("span", {}),
|
|
500
|
+
/* @__PURE__ */ jsx("span", {})
|
|
501
|
+
] })
|
|
502
|
+
]
|
|
503
|
+
}
|
|
504
|
+
) : null
|
|
505
|
+
] })
|
|
506
|
+
] });
|
|
507
|
+
}
|
|
508
|
+
export {
|
|
509
|
+
IrisConversationThread,
|
|
510
|
+
resolveIrisAssistantActions
|
|
511
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"irisGreetingBackdrop.d.ts","sourceRoot":"","sources":["../../../src/components/Chatbot/irisGreetingBackdrop.tsx"],"names":[],"mappings":"AAAA,6EAA6E;AAC7E,wBAAgB,oBAAoB,CAAC,EAAE,SAAS,EAAE,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,2CAmDzE"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
function IrisGreetingBackdrop({ className }) {
|
|
3
|
+
return /* @__PURE__ */ jsxs(
|
|
4
|
+
"svg",
|
|
5
|
+
{
|
|
6
|
+
"aria-hidden": "true",
|
|
7
|
+
className,
|
|
8
|
+
fill: "none",
|
|
9
|
+
height: "779",
|
|
10
|
+
overflow: "visible",
|
|
11
|
+
preserveAspectRatio: "none",
|
|
12
|
+
viewBox: "0 0 542 779",
|
|
13
|
+
width: "542",
|
|
14
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
15
|
+
children: [
|
|
16
|
+
/* @__PURE__ */ jsxs("g", { className: "chatbot-greeting-glow-group", opacity: "0.64", children: [
|
|
17
|
+
/* @__PURE__ */ jsx("g", { filter: "url(#chatbot-greeting-glow-pink)", children: /* @__PURE__ */ jsx("circle", { cx: "244", cy: "264", fill: "#FF00BF", fillOpacity: "0.06", r: "108" }) }),
|
|
18
|
+
/* @__PURE__ */ jsx("g", { filter: "url(#chatbot-greeting-glow-cyan)", children: /* @__PURE__ */ jsx("circle", { cx: "309", cy: "600", fill: "#00FFD9", fillOpacity: "0.16", r: "65" }) })
|
|
19
|
+
] }),
|
|
20
|
+
/* @__PURE__ */ jsxs("defs", { children: [
|
|
21
|
+
/* @__PURE__ */ jsxs(
|
|
22
|
+
"filter",
|
|
23
|
+
{
|
|
24
|
+
colorInterpolationFilters: "sRGB",
|
|
25
|
+
filterUnits: "userSpaceOnUse",
|
|
26
|
+
height: "336",
|
|
27
|
+
id: "chatbot-greeting-glow-pink",
|
|
28
|
+
width: "336",
|
|
29
|
+
x: "76",
|
|
30
|
+
y: "96",
|
|
31
|
+
children: [
|
|
32
|
+
/* @__PURE__ */ jsx("feFlood", { floodOpacity: "0", result: "BackgroundImageFix" }),
|
|
33
|
+
/* @__PURE__ */ jsx("feBlend", { in: "SourceGraphic", in2: "BackgroundImageFix", mode: "normal", result: "shape" }),
|
|
34
|
+
/* @__PURE__ */ jsx("feGaussianBlur", { result: "effect1_foregroundBlur", stdDeviation: "30" })
|
|
35
|
+
]
|
|
36
|
+
}
|
|
37
|
+
),
|
|
38
|
+
/* @__PURE__ */ jsxs(
|
|
39
|
+
"filter",
|
|
40
|
+
{
|
|
41
|
+
colorInterpolationFilters: "sRGB",
|
|
42
|
+
filterUnits: "userSpaceOnUse",
|
|
43
|
+
height: "250",
|
|
44
|
+
id: "chatbot-greeting-glow-cyan",
|
|
45
|
+
width: "250",
|
|
46
|
+
x: "184",
|
|
47
|
+
y: "475",
|
|
48
|
+
children: [
|
|
49
|
+
/* @__PURE__ */ jsx("feFlood", { floodOpacity: "0", result: "BackgroundImageFix" }),
|
|
50
|
+
/* @__PURE__ */ jsx("feBlend", { in: "SourceGraphic", in2: "BackgroundImageFix", mode: "normal", result: "shape" }),
|
|
51
|
+
/* @__PURE__ */ jsx("feGaussianBlur", { result: "effect1_foregroundBlur", stdDeviation: "30" })
|
|
52
|
+
]
|
|
53
|
+
}
|
|
54
|
+
)
|
|
55
|
+
] })
|
|
56
|
+
]
|
|
57
|
+
}
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
export {
|
|
61
|
+
IrisGreetingBackdrop
|
|
62
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IrisMenuItemAction } from './Chatbot.types';
|
|
2
|
+
|
|
3
|
+
export interface IrisMenuListItemProps {
|
|
4
|
+
id: string | number;
|
|
5
|
+
label: string;
|
|
6
|
+
isCollapsed?: boolean;
|
|
7
|
+
onSelect?: () => void;
|
|
8
|
+
onAction?: (action: IrisMenuItemAction) => void;
|
|
9
|
+
}
|
|
10
|
+
export declare function IrisMenuListItem({ id, label, isCollapsed, onSelect, onAction, }: IrisMenuListItemProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
//# sourceMappingURL=irisMenuListItem.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"irisMenuListItem.d.ts","sourceRoot":"","sources":["../../../src/components/Chatbot/irisMenuListItem.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAK1D,MAAM,WAAW,qBAAqB;IACpC,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,kBAAkB,KAAK,IAAI,CAAC;CACjD;AAED,wBAAgB,gBAAgB,CAAC,EAC/B,EAAE,EACF,KAAK,EACL,WAAmB,EACnB,QAAQ,EACR,QAAQ,GACT,EAAE,qBAAqB,2CAuGvB"}
|