impact-ui 5.0.4-alpha.3 → 5.0.4-chatbot.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/ArrowBack.js +4 -0
- package/dist/_virtual/AttachFileOutlined.js +4 -0
- package/dist/_virtual/ContentCopyOutlined.js +4 -0
- package/dist/_virtual/Menu.js +4 -0
- package/dist/_virtual/NorthRounded.js +4 -0
- package/dist/_virtual/RefreshOutlined.js +4 -0
- package/dist/_virtual/StopRounded.js +4 -0
- package/dist/_virtual/VolumeUpOutlined.js +4 -0
- package/dist/_virtual/index2.js +2 -2
- package/dist/_virtual/index3.js +2 -2
- package/dist/components/AccordionModern/index.js +1 -1
- package/dist/components/Badge/index.js +1 -1
- package/dist/components/Breadcrumbs/index.js +1 -1
- package/dist/components/Button/index.js +1 -1
- package/dist/components/ButtonGroup/index.js +1 -1
- package/dist/components/Chatbot/Chatbot.types.d.ts +253 -186
- package/dist/components/Chatbot/Chatbot.types.d.ts.map +1 -1
- package/dist/components/Chatbot/chatBotFooter.d.ts +1 -1
- package/dist/components/Chatbot/chatBotFooter.d.ts.map +1 -1
- package/dist/components/Chatbot/chatBotFooter.js +21 -4
- package/dist/components/Chatbot/chatbotComposer.d.ts +4 -0
- package/dist/components/Chatbot/chatbotComposer.d.ts.map +1 -0
- package/dist/components/Chatbot/chatbotComposer.js +328 -0
- package/dist/components/Chatbot/chatbotGreetingHeader.d.ts +4 -0
- package/dist/components/Chatbot/chatbotGreetingHeader.d.ts.map +1 -0
- package/dist/components/Chatbot/chatbotGreetingHeader.js +226 -0
- package/dist/components/Chatbot/greetingWeather.d.ts +23 -0
- package/dist/components/Chatbot/greetingWeather.d.ts.map +1 -0
- package/dist/components/Chatbot/greetingWeather.js +81 -0
- package/dist/components/Chatbot/greetingWeather.test.d.ts +2 -0
- package/dist/components/Chatbot/greetingWeather.test.d.ts.map +1 -0
- package/dist/components/Chatbot/index.d.ts +5 -2
- package/dist/components/Chatbot/index.d.ts.map +1 -1
- package/dist/components/Chatbot/index.js +390 -421
- package/dist/components/Chatbot/irisConversationThread.d.ts +24 -0
- package/dist/components/Chatbot/irisConversationThread.d.ts.map +1 -0
- package/dist/components/Chatbot/irisConversationThread.js +511 -0
- package/dist/components/Chatbot/irisGreetingBackdrop.d.ts +5 -0
- package/dist/components/Chatbot/irisGreetingBackdrop.d.ts.map +1 -0
- package/dist/components/Chatbot/irisGreetingBackdrop.js +62 -0
- package/dist/components/Chatbot/irisMenuListItem.d.ts +11 -0
- package/dist/components/Chatbot/irisMenuListItem.d.ts.map +1 -0
- package/dist/components/Chatbot/irisMenuListItem.js +126 -0
- package/dist/components/Chatbot/irisMenuScreen.d.ts +4 -0
- package/dist/components/Chatbot/irisMenuScreen.d.ts.map +1 -0
- package/dist/components/Chatbot/irisMenuScreen.js +357 -0
- package/dist/components/Chatbot/irisThinking.d.ts +7 -0
- package/dist/components/Chatbot/irisThinking.d.ts.map +1 -0
- package/dist/components/Chatbot/irisThinking.js +219 -0
- package/dist/components/Chatbot/newChatComponent.d.ts +1 -1
- package/dist/components/Chatbot/newChatComponent.d.ts.map +1 -1
- package/dist/components/Chatbot/newChatComponent.js +497 -72
- package/dist/components/Chips/index.js +1 -1
- package/dist/components/CommentsPanel/CommentsPanel.impl.js +1 -1
- package/dist/components/DatePicker/DatePicker.types.d.ts +0 -4
- package/dist/components/DatePicker/DatePicker.types.d.ts.map +1 -1
- package/dist/components/DatePicker/datePickerInput.d.ts +0 -2
- package/dist/components/DatePicker/datePickerInput.d.ts.map +1 -1
- package/dist/components/DatePicker/datePickerInput.js +2 -32
- package/dist/components/DatePicker/index.d.ts.map +1 -1
- package/dist/components/DatePicker/index.js +1 -5
- package/dist/components/DatePicker/showMonthYearSelect.d.ts.map +1 -1
- package/dist/components/DatePicker/showMonthYearSelect.js +0 -2
- package/dist/components/DateRangePicker/index.js +1 -1
- package/dist/components/DateRangePicker/showMonthYearSelect.d.ts.map +1 -1
- package/dist/components/DateRangePicker/showMonthYearSelect.js +0 -2
- 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 +0 -7
- 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 +26 -44
- 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 +115 -107
- package/dist/components/TableV36/index.js +1 -1
- package/dist/components/Tag/index.js +1 -1
- package/dist/components/TextArea/index.js +1 -1
- package/dist/components/common/MentionEditor/MentionList/index.js +1 -1
- package/dist/components/common/MentionEditor/index.js +1 -1
- package/dist/components/index.d.ts +3 -2
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +3 -0
- package/dist/hooks/useDraggableResizable.d.ts +11 -1
- package/dist/hooks/useDraggableResizable.d.ts.map +1 -1
- package/dist/hooks/useDraggableResizable.js +73 -59
- package/dist/locales/de-DE.json.d.ts +50 -30
- package/dist/locales/de-DE.json.js +50 -30
- package/dist/locales/en-US.json.d.ts +50 -30
- package/dist/locales/en-US.json.js +50 -30
- package/dist/locales/es-ES.json.d.ts +50 -30
- package/dist/locales/es-ES.json.js +50 -30
- package/dist/mcp-component-registry.json +65 -263
- package/dist/node_modules/@impactsmartsuite/impact-icons/dist/index.js +43 -15
- 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/prop-types/index.js +1 -1
- package/dist/node_modules/react-is/index.js +1 -1
- package/dist/stories/chatBotApiMock.d.ts +91 -0
- package/dist/stories/chatBotApiMock.d.ts.map +1 -0
- package/dist/styles/style.css +1 -1
- package/package.json +2 -2
- package/dist/_virtual/MoreVert.js +0 -4
- package/dist/_virtual/RemoveRounded.js +0 -4
- package/dist/_virtual/SaveOutlined.js +0 -4
- package/dist/components/Chatbot/bookMarkPanel.d.ts +0 -4
- package/dist/components/Chatbot/bookMarkPanel.d.ts.map +0 -1
- package/dist/components/Chatbot/bookMarkPanel.js +0 -64
- package/dist/components/Chatbot/chatBotLandingScreen.d.ts +0 -4
- package/dist/components/Chatbot/chatBotLandingScreen.d.ts.map +0 -1
- package/dist/components/Chatbot/chatBotLandingScreen.js +0 -24
- package/dist/components/Chatbot/chatInput.d.ts +0 -4
- package/dist/components/Chatbot/chatInput.d.ts.map +0 -1
- package/dist/components/Chatbot/chatInput.js +0 -198
- package/dist/components/Chatbot/chatbotModuleMenu.d.ts +0 -4
- package/dist/components/Chatbot/chatbotModuleMenu.d.ts.map +0 -1
- package/dist/components/Chatbot/chatbotModuleMenu.js +0 -248
- package/dist/components/Chatbot/constant.d.ts +0 -6
- package/dist/components/Chatbot/constant.d.ts.map +0 -1
- package/dist/components/Chatbot/constant.js +0 -27
- package/dist/components/Chatbot/conversationScreen.d.ts +0 -4
- package/dist/components/Chatbot/conversationScreen.d.ts.map +0 -1
- package/dist/components/Chatbot/conversationScreen.js +0 -207
- package/dist/components/Chatbot/customScreen.d.ts +0 -4
- package/dist/components/Chatbot/customScreen.d.ts.map +0 -1
- package/dist/components/Chatbot/customScreen.js +0 -66
- package/dist/components/Chatbot/historyPanel.d.ts +0 -4
- package/dist/components/Chatbot/historyPanel.d.ts.map +0 -1
- package/dist/components/Chatbot/historyPanel.js +0 -374
- package/dist/components/Chatbot/utils.d.ts +0 -5
- package/dist/components/Chatbot/utils.d.ts.map +0 -1
- package/dist/components/Chatbot/utils.js +0 -29
- package/dist/node_modules/@mui/icons-material/MoreVert.js +0 -17
- package/dist/node_modules/@mui/icons-material/RemoveRounded.js +0 -17
- package/dist/node_modules/@mui/icons-material/SaveOutlined.js +0 -17
- package/dist/utils/onResize.js +0 -28
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from "react";
|
|
3
|
+
import default_1 from "../../node_modules/@mui/icons-material/KeyboardArrowDown.js";
|
|
4
|
+
import default_1$1 from "../../node_modules/@mui/icons-material/KeyboardArrowRight.js";
|
|
5
|
+
import { getAssetUrl } from "../../utils/assetBase.js";
|
|
6
|
+
import { Tag } from "../Tag/index.js";
|
|
7
|
+
import { useTranslation } from "../../i18n/useTranslation.js";
|
|
8
|
+
const SPARKLE_SIZE = 20;
|
|
9
|
+
const CHEVRON_SIZE = 16;
|
|
10
|
+
const IrisAiIcon = getAssetUrl("icons/smartBotAlan.svg");
|
|
11
|
+
function IrisAiSparkle({ size = SPARKLE_SIZE }) {
|
|
12
|
+
return /* @__PURE__ */ jsx(
|
|
13
|
+
"img",
|
|
14
|
+
{
|
|
15
|
+
alt: "",
|
|
16
|
+
"aria-hidden": "true",
|
|
17
|
+
className: "iris-thinking-sparkle",
|
|
18
|
+
height: size,
|
|
19
|
+
src: IrisAiIcon,
|
|
20
|
+
width: size
|
|
21
|
+
}
|
|
22
|
+
);
|
|
23
|
+
}
|
|
24
|
+
function ThinkingDots() {
|
|
25
|
+
return /* @__PURE__ */ jsxs("span", { "aria-hidden": "true", className: "iris-thinking-dots", children: [
|
|
26
|
+
/* @__PURE__ */ jsx("span", {}),
|
|
27
|
+
/* @__PURE__ */ jsx("span", {}),
|
|
28
|
+
/* @__PURE__ */ jsx("span", {})
|
|
29
|
+
] });
|
|
30
|
+
}
|
|
31
|
+
function CompleteStepMarker() {
|
|
32
|
+
return /* @__PURE__ */ jsx("span", { "aria-hidden": "true", className: "iris-thinking-step-marker is-complete", children: /* @__PURE__ */ jsxs("svg", { fill: "none", height: "20", viewBox: "0 0 20 20", width: "20", children: [
|
|
33
|
+
/* @__PURE__ */ jsx("circle", { cx: "10", cy: "10", fill: "#EBF7F1", opacity: "0.8", r: "8" }),
|
|
34
|
+
/* @__PURE__ */ jsx(
|
|
35
|
+
"path",
|
|
36
|
+
{
|
|
37
|
+
d: "M9.3 10.9L8.225 9.825C8.13334 9.73333 8.01667 9.6875 7.875 9.6875C7.73334 9.6875 7.61667 9.73333 7.525 9.825C7.43334 9.91666 7.3875 10.0333 7.3875 10.175C7.3875 10.3167 7.43334 10.4333 7.525 10.525L8.95 11.95C9.05 12.05 9.16667 12.1 9.3 12.1C9.43334 12.1 9.55 12.05 9.65 11.95L12.475 9.125C12.5667 9.03333 12.6125 8.91666 12.6125 8.775C12.6125 8.63333 12.5667 8.51666 12.475 8.425C12.3833 8.33333 12.2667 8.2875 12.125 8.2875C11.9833 8.2875 11.8667 8.33333 11.775 8.425L9.3 10.9ZM10 15C9.30834 15 8.65834 14.8687 8.05 14.6062C7.44167 14.3437 6.9125 13.9875 6.4625 13.5375C6.0125 13.0875 5.65625 12.5583 5.39375 11.95C5.13125 11.3417 5 10.6917 5 10C5 9.30833 5.13125 8.65833 5.39375 8.05C5.65625 7.44166 6.0125 6.9125 6.4625 6.4625C6.9125 6.0125 7.44167 5.65625 8.05 5.39375C8.65834 5.13125 9.30834 5 10 5C10.6917 5 11.3417 5.13125 11.95 5.39375C12.5583 5.65625 13.0875 6.0125 13.5375 6.4625C13.9875 6.9125 14.3438 7.44166 14.6063 8.05C14.8688 8.65833 15 9.30833 15 10C15 10.6917 14.8688 11.3417 14.6063 11.95C14.3438 12.5583 13.9875 13.0875 13.5375 13.5375C13.0875 13.9875 12.5583 14.3437 11.95 14.6062C11.3417 14.8687 10.6917 15 10 15Z",
|
|
38
|
+
fill: "#3BB273"
|
|
39
|
+
}
|
|
40
|
+
)
|
|
41
|
+
] }) });
|
|
42
|
+
}
|
|
43
|
+
function StepMarker({ status }) {
|
|
44
|
+
if (status === "complete") return /* @__PURE__ */ jsx(CompleteStepMarker, {});
|
|
45
|
+
return /* @__PURE__ */ jsxs("span", { "aria-hidden": "true", className: "iris-thinking-step-marker is-active", children: [
|
|
46
|
+
/* @__PURE__ */ jsx("span", { className: "iris-thinking-pop-halo" }),
|
|
47
|
+
/* @__PURE__ */ jsx("span", { className: "iris-thinking-pop-dot" })
|
|
48
|
+
] });
|
|
49
|
+
}
|
|
50
|
+
function StepRow({
|
|
51
|
+
step,
|
|
52
|
+
isLast,
|
|
53
|
+
onToggle
|
|
54
|
+
}) {
|
|
55
|
+
const [uncontrolledExpanded, setUncontrolledExpanded] = useState(false);
|
|
56
|
+
const isControlled = typeof step.expanded === "boolean";
|
|
57
|
+
const expanded = isControlled ? Boolean(step.expanded) : uncontrolledExpanded;
|
|
58
|
+
const showChevron = Boolean(step.expandable);
|
|
59
|
+
const showChip = Boolean(step.chip) && (step.status === "active" || expanded);
|
|
60
|
+
const handleToggle = () => {
|
|
61
|
+
if (!showChevron) return;
|
|
62
|
+
const next = !expanded;
|
|
63
|
+
if (!isControlled) setUncontrolledExpanded(next);
|
|
64
|
+
onToggle == null ? void 0 : onToggle(step.id, next);
|
|
65
|
+
};
|
|
66
|
+
return /* @__PURE__ */ jsxs(
|
|
67
|
+
"div",
|
|
68
|
+
{
|
|
69
|
+
className: `iris-thinking-step${step.status === "complete" ? " is-complete" : " is-active"}${isLast ? " is-last" : ""}`,
|
|
70
|
+
children: [
|
|
71
|
+
/* @__PURE__ */ jsxs("div", { className: "iris-thinking-step-rail", "aria-hidden": "true", children: [
|
|
72
|
+
/* @__PURE__ */ jsx(StepMarker, { status: step.status }),
|
|
73
|
+
!isLast ? /* @__PURE__ */ jsx("span", { className: "iris-thinking-step-connector" }) : null
|
|
74
|
+
] }),
|
|
75
|
+
/* @__PURE__ */ jsxs("div", { className: "iris-thinking-step-body", children: [
|
|
76
|
+
/* @__PURE__ */ jsxs("div", { className: "iris-thinking-step-row", children: [
|
|
77
|
+
/* @__PURE__ */ jsx("p", { className: "iris-thinking-step-label", children: step.label }),
|
|
78
|
+
showChevron ? /* @__PURE__ */ jsx(
|
|
79
|
+
"button",
|
|
80
|
+
{
|
|
81
|
+
"aria-expanded": expanded,
|
|
82
|
+
"aria-label": step.label,
|
|
83
|
+
className: "iris-thinking-step-chevron",
|
|
84
|
+
type: "button",
|
|
85
|
+
onClick: handleToggle,
|
|
86
|
+
children: /* @__PURE__ */ jsx(default_1$1, { sx: { fontSize: CHEVRON_SIZE } })
|
|
87
|
+
}
|
|
88
|
+
) : null
|
|
89
|
+
] }),
|
|
90
|
+
showChip && step.chip ? /* @__PURE__ */ jsx("div", { className: "iris-thinking-step-chip", children: /* @__PURE__ */ jsx("span", { children: step.chip }) }) : null
|
|
91
|
+
] })
|
|
92
|
+
]
|
|
93
|
+
}
|
|
94
|
+
);
|
|
95
|
+
}
|
|
96
|
+
function StepsList({
|
|
97
|
+
steps,
|
|
98
|
+
onToggleStep
|
|
99
|
+
}) {
|
|
100
|
+
if (steps.length === 0) return null;
|
|
101
|
+
return /* @__PURE__ */ jsx("div", { className: "iris-thinking-steps", children: steps.map((step, index) => /* @__PURE__ */ jsx(
|
|
102
|
+
StepRow,
|
|
103
|
+
{
|
|
104
|
+
isLast: index === steps.length - 1,
|
|
105
|
+
step,
|
|
106
|
+
onToggle: onToggleStep
|
|
107
|
+
},
|
|
108
|
+
step.id
|
|
109
|
+
)) });
|
|
110
|
+
}
|
|
111
|
+
function SectionToggle({
|
|
112
|
+
label,
|
|
113
|
+
expanded,
|
|
114
|
+
onToggle
|
|
115
|
+
}) {
|
|
116
|
+
return /* @__PURE__ */ jsxs(
|
|
117
|
+
"button",
|
|
118
|
+
{
|
|
119
|
+
"aria-expanded": expanded,
|
|
120
|
+
className: "iris-thinking-section-toggle",
|
|
121
|
+
type: "button",
|
|
122
|
+
onClick: onToggle,
|
|
123
|
+
children: [
|
|
124
|
+
/* @__PURE__ */ jsx("span", { className: "iris-thinking-section-toggle-label", children: label }),
|
|
125
|
+
expanded ? /* @__PURE__ */ jsx(default_1, { sx: { fontSize: CHEVRON_SIZE } }) : /* @__PURE__ */ jsx(default_1$1, { sx: { fontSize: CHEVRON_SIZE } })
|
|
126
|
+
]
|
|
127
|
+
}
|
|
128
|
+
);
|
|
129
|
+
}
|
|
130
|
+
function IrisThinking({ thinking }) {
|
|
131
|
+
const { t } = useTranslation();
|
|
132
|
+
const phase = thinking.phase ?? "status";
|
|
133
|
+
const steps = thinking.steps ?? [];
|
|
134
|
+
const citations = thinking.citations ?? [];
|
|
135
|
+
const completeCount = steps.filter((step) => step.status === "complete").length;
|
|
136
|
+
const [localStepsExpanded, setLocalStepsExpanded] = useState(false);
|
|
137
|
+
const [localCitationsExpanded, setLocalCitationsExpanded] = useState(false);
|
|
138
|
+
const stepsExpanded = typeof thinking.stepsExpanded === "boolean" ? thinking.stepsExpanded : localStepsExpanded;
|
|
139
|
+
const citationsExpanded = typeof thinking.citationsExpanded === "boolean" ? thinking.citationsExpanded : localCitationsExpanded;
|
|
140
|
+
const liveTitle = thinking.title ?? (steps.length > 0 ? t("chatBot.irisThinking.progress", {
|
|
141
|
+
current: completeCount,
|
|
142
|
+
total: steps.length
|
|
143
|
+
}) : t("chatBot.irisThinking.default"));
|
|
144
|
+
const stepsLabel = thinking.stepsLabel ?? (steps.length > 0 ? t("chatBot.irisThinking.stepsLabel", {
|
|
145
|
+
current: completeCount || steps.length,
|
|
146
|
+
total: steps.length
|
|
147
|
+
}) : t("chatBot.irisThinking.steps"));
|
|
148
|
+
const citationsLabel = thinking.citationsLabel ?? (citations.length > 0 ? t("chatBot.irisThinking.citationsLabel", { count: citations.length }) : t("chatBot.irisThinking.citations"));
|
|
149
|
+
const handleToggleSteps = () => {
|
|
150
|
+
var _a;
|
|
151
|
+
const next = !stepsExpanded;
|
|
152
|
+
if (typeof thinking.stepsExpanded !== "boolean") setLocalStepsExpanded(next);
|
|
153
|
+
(_a = thinking.onToggleSteps) == null ? void 0 : _a.call(thinking, next);
|
|
154
|
+
};
|
|
155
|
+
const handleToggleCitations = () => {
|
|
156
|
+
var _a;
|
|
157
|
+
const next = !citationsExpanded;
|
|
158
|
+
if (typeof thinking.citationsExpanded !== "boolean") setLocalCitationsExpanded(next);
|
|
159
|
+
(_a = thinking.onToggleCitations) == null ? void 0 : _a.call(thinking, next);
|
|
160
|
+
};
|
|
161
|
+
let body = null;
|
|
162
|
+
if (phase === "status") {
|
|
163
|
+
body = /* @__PURE__ */ jsxs("div", { className: "iris-thinking-status", children: [
|
|
164
|
+
/* @__PURE__ */ jsx("span", { className: "iris-thinking-icon", children: /* @__PURE__ */ jsx(IrisAiSparkle, {}) }),
|
|
165
|
+
/* @__PURE__ */ jsxs("div", { className: "iris-thinking-status-content", children: [
|
|
166
|
+
thinking.statusLabel ? /* @__PURE__ */ jsx("span", { className: "iris-thinking-status-label", children: thinking.statusLabel }) : null,
|
|
167
|
+
/* @__PURE__ */ jsx(ThinkingDots, {})
|
|
168
|
+
] })
|
|
169
|
+
] });
|
|
170
|
+
} else if (phase === "steps") {
|
|
171
|
+
body = /* @__PURE__ */ jsxs("div", { className: "iris-thinking-live", children: [
|
|
172
|
+
/* @__PURE__ */ jsxs("div", { className: "iris-thinking-live-header", children: [
|
|
173
|
+
/* @__PURE__ */ jsx("span", { className: "iris-thinking-icon", children: /* @__PURE__ */ jsx(IrisAiSparkle, {}) }),
|
|
174
|
+
/* @__PURE__ */ jsx("p", { className: "iris-thinking-live-title", children: liveTitle })
|
|
175
|
+
] }),
|
|
176
|
+
/* @__PURE__ */ jsx(StepsList, { steps, onToggleStep: thinking.onToggleStep })
|
|
177
|
+
] });
|
|
178
|
+
} else {
|
|
179
|
+
body = /* @__PURE__ */ jsxs("div", { className: "iris-thinking-complete", children: [
|
|
180
|
+
steps.length > 0 || thinking.stepsLabel ? /* @__PURE__ */ jsxs("div", { className: "iris-thinking-complete-section", children: [
|
|
181
|
+
/* @__PURE__ */ jsx(
|
|
182
|
+
SectionToggle,
|
|
183
|
+
{
|
|
184
|
+
expanded: stepsExpanded,
|
|
185
|
+
label: stepsLabel,
|
|
186
|
+
onToggle: handleToggleSteps
|
|
187
|
+
}
|
|
188
|
+
),
|
|
189
|
+
stepsExpanded ? /* @__PURE__ */ jsx(StepsList, { steps, onToggleStep: thinking.onToggleStep }) : null
|
|
190
|
+
] }) : null,
|
|
191
|
+
citations.length > 0 || thinking.citationsLabel ? /* @__PURE__ */ jsxs("div", { className: "iris-thinking-complete-section", children: [
|
|
192
|
+
/* @__PURE__ */ jsx(
|
|
193
|
+
SectionToggle,
|
|
194
|
+
{
|
|
195
|
+
expanded: citationsExpanded,
|
|
196
|
+
label: citationsLabel,
|
|
197
|
+
onToggle: handleToggleCitations
|
|
198
|
+
}
|
|
199
|
+
),
|
|
200
|
+
citationsExpanded ? /* @__PURE__ */ jsx("div", { className: "iris-thinking-citations", children: citations.map((group) => /* @__PURE__ */ jsxs("div", { className: "iris-thinking-citation-card", children: [
|
|
201
|
+
/* @__PURE__ */ jsx("p", { className: "iris-thinking-citation-group", children: group.label }),
|
|
202
|
+
/* @__PURE__ */ jsx("div", { className: "iris-thinking-citation-tags", children: group.tags.map((tag) => /* @__PURE__ */ jsx(Tag, { label: tag, size: "small", variant: "solid" }, `${group.id}-${tag}`)) })
|
|
203
|
+
] }, group.id)) }) : null
|
|
204
|
+
] }) : null
|
|
205
|
+
] });
|
|
206
|
+
}
|
|
207
|
+
return /* @__PURE__ */ jsx(
|
|
208
|
+
"div",
|
|
209
|
+
{
|
|
210
|
+
"aria-label": t("chatBot.irisThinking"),
|
|
211
|
+
"aria-live": phase === "complete" ? "off" : "polite",
|
|
212
|
+
className: `iris-thinking iris-thinking--${phase}`,
|
|
213
|
+
children: body
|
|
214
|
+
}
|
|
215
|
+
);
|
|
216
|
+
}
|
|
217
|
+
export {
|
|
218
|
+
IrisThinking
|
|
219
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { NewChatComponentProps } from './Chatbot.types';
|
|
2
2
|
|
|
3
|
-
export declare function NewChatComponent({ onClose
|
|
3
|
+
export declare function NewChatComponent({ onClose, userName, greetingWeather, autoGreetingWeather, greetingIcon, inputValue, setInputValue, handleMicClick, customInputComponent, footerText, suggestedPrompts, isSuggestedPromptsLoading, onSuggestedPromptClick, modelOptions, selectedModel, onModelChange, onAddClick, onAttachClick, onMenuClick, onFooterLinkClick, onToggleCollapse, onMinimiseChatBot, onEnterFloating, onEnterFullScreen, onExitFullScreen, isFullScreen, onSendIconClick, onNewChatClick, isStopIcon, onStopIconClick, isAssistantThinking, thinking, isCollapsed, isFloating, isFullWidth, dragHandleProps, conversation, historyPanelData, artifacts, isRecentChatsLoading, isArtifactsLoading, onHistorySelectConversation, onSelectArtifact, onIrisMenuFilterSelect, onHistoryMenuAction, onArtifactMenuAction, onLikeClick, onDislikeClick, onRegenerateClick, onSpeakClick, onRevertClick, defaultAssistantActions, }: NewChatComponentProps): import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
//# sourceMappingURL=newChatComponent.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"newChatComponent.d.ts","sourceRoot":"","sources":["../../../src/components/Chatbot/newChatComponent.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"newChatComponent.d.ts","sourceRoot":"","sources":["../../../src/components/Chatbot/newChatComponent.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAMV,qBAAqB,EACtB,MAAM,iBAAiB,CAAC;AAiIzB,wBAAgB,gBAAgB,CAAC,EAC/B,OAAO,EACP,QAAQ,EACR,eAAe,EACf,mBAA2B,EAC3B,YAAY,EACZ,UAAU,EACV,aAAa,EACb,cAAc,EACd,oBAAoB,EACpB,UAAU,EACV,gBAAqB,EACrB,yBAAiC,EACjC,sBAAsB,EACtB,YAAY,EACZ,aAAa,EACb,aAAa,EACb,UAAU,EACV,aAAa,EACb,WAAW,EACX,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,eAAe,EACf,iBAAiB,EACjB,gBAAgB,EAChB,YAAoB,EACpB,eAAe,EACf,cAAc,EACd,UAAkB,EAClB,eAAe,EACf,mBAA2B,EAC3B,QAAQ,EACR,WAAmB,EACnB,UAAkB,EAClB,WAAmB,EACnB,eAAe,EACf,YAAY,EACZ,gBAAqB,EACrB,SAAc,EACd,oBAA4B,EAC5B,kBAA0B,EAC1B,2BAA2B,EAC3B,gBAAgB,EAChB,sBAAsB,EACtB,mBAAmB,EACnB,oBAAoB,EACpB,WAAW,EACX,cAAc,EACd,iBAAiB,EACjB,YAAY,EACZ,aAAa,EACb,uBAAuB,GACxB,EAAE,qBAAqB,2CAwZvB"}
|