impact-ui 5.0.4-chatbot.1 → 5.0.5

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 (101) hide show
  1. package/dist/_virtual/index2.js +2 -2
  2. package/dist/_virtual/index3.js +2 -2
  3. package/dist/_virtual/index4.js +4 -2
  4. package/dist/_virtual/index5.js +3 -3
  5. package/dist/_virtual/index6.js +2 -4
  6. package/dist/components/Button/index.js +1 -1
  7. package/dist/components/Chatbot/Chatbot.types.d.ts +18 -191
  8. package/dist/components/Chatbot/Chatbot.types.d.ts.map +1 -1
  9. package/dist/components/Chatbot/chatBotFooter.d.ts +1 -1
  10. package/dist/components/Chatbot/chatBotFooter.d.ts.map +1 -1
  11. package/dist/components/Chatbot/chatBotFooter.js +4 -21
  12. package/dist/components/Chatbot/conversationScreen.d.ts +1 -1
  13. package/dist/components/Chatbot/conversationScreen.d.ts.map +1 -1
  14. package/dist/components/Chatbot/conversationScreen.js +3 -5
  15. package/dist/components/Chatbot/index.d.ts +2 -2
  16. package/dist/components/Chatbot/index.d.ts.map +1 -1
  17. package/dist/components/Chatbot/index.js +50 -100
  18. package/dist/components/Chatbot/newChatComponent.d.ts +1 -1
  19. package/dist/components/Chatbot/newChatComponent.d.ts.map +1 -1
  20. package/dist/components/Chatbot/newChatComponent.js +70 -387
  21. package/dist/components/DatePicker/DatePicker.types.d.ts +4 -0
  22. package/dist/components/DatePicker/DatePicker.types.d.ts.map +1 -1
  23. package/dist/components/DatePicker/datePickerInput.d.ts +2 -0
  24. package/dist/components/DatePicker/datePickerInput.d.ts.map +1 -1
  25. package/dist/components/DatePicker/datePickerInput.js +32 -2
  26. package/dist/components/DatePicker/index.d.ts.map +1 -1
  27. package/dist/components/DatePicker/index.js +5 -1
  28. package/dist/components/DatePicker/showMonthYearSelect.d.ts.map +1 -1
  29. package/dist/components/DatePicker/showMonthYearSelect.js +2 -0
  30. package/dist/components/DateRangePicker/index.js +1 -1
  31. package/dist/components/DateRangePicker/showMonthYearSelect.d.ts.map +1 -1
  32. package/dist/components/DateRangePicker/showMonthYearSelect.js +2 -0
  33. package/dist/components/Input/index.js +1 -1
  34. package/dist/components/Menu/IconMenuItem.js +1 -1
  35. package/dist/components/Menu/NestedMenuItem.js +1 -1
  36. package/dist/components/Menu/index.js +1 -1
  37. package/dist/components/Menu/nestedMenuItemsFromObject.js +1 -1
  38. package/dist/components/Select/Select.types.d.ts +7 -0
  39. package/dist/components/Select/Select.types.d.ts.map +1 -1
  40. package/dist/components/Select/index.d.ts.map +1 -1
  41. package/dist/components/Select/index.js +44 -26
  42. package/dist/components/TableV36/AgGridHeader.d.ts.map +1 -1
  43. package/dist/components/TableV36/AgGridHeader.js +107 -115
  44. package/dist/components/index.d.ts +1 -1
  45. package/dist/components/index.d.ts.map +1 -1
  46. package/dist/locales/de-DE.json.d.ts +0 -51
  47. package/dist/locales/de-DE.json.js +0 -51
  48. package/dist/locales/en-US.json.d.ts +0 -51
  49. package/dist/locales/en-US.json.js +0 -51
  50. package/dist/locales/es-ES.json.d.ts +0 -51
  51. package/dist/locales/es-ES.json.js +0 -51
  52. package/dist/mcp-component-registry.json +182 -256
  53. package/dist/node_modules/@impactsmartsuite/impact-icons/dist/index.js +10 -30
  54. package/dist/node_modules/@mui/system/colorManipulator.js +2 -2
  55. package/dist/node_modules/prop-types/index.js +1 -1
  56. package/dist/node_modules/prop-types/node_modules/react-is/index.js +1 -1
  57. package/dist/node_modules/react-is/index.js +1 -1
  58. package/package.json +2 -2
  59. package/dist/_virtual/ArrowBack.js +0 -4
  60. package/dist/_virtual/AttachFileOutlined.js +0 -4
  61. package/dist/_virtual/ContentCopyOutlined.js +0 -4
  62. package/dist/_virtual/Menu.js +0 -4
  63. package/dist/_virtual/NorthRounded.js +0 -4
  64. package/dist/_virtual/RefreshOutlined.js +0 -4
  65. package/dist/_virtual/StopRounded.js +0 -4
  66. package/dist/_virtual/ThumbDownOutlined.js +0 -4
  67. package/dist/_virtual/ThumbUpOutlined.js +0 -4
  68. package/dist/_virtual/VolumeUpOutlined.js +0 -4
  69. package/dist/components/Chatbot/chatbotComposer.d.ts +0 -4
  70. package/dist/components/Chatbot/chatbotComposer.d.ts.map +0 -1
  71. package/dist/components/Chatbot/chatbotComposer.js +0 -226
  72. package/dist/components/Chatbot/chatbotGreetingHeader.d.ts +0 -4
  73. package/dist/components/Chatbot/chatbotGreetingHeader.d.ts.map +0 -1
  74. package/dist/components/Chatbot/chatbotGreetingHeader.js +0 -213
  75. package/dist/components/Chatbot/irisConversationThread.d.ts +0 -24
  76. package/dist/components/Chatbot/irisConversationThread.d.ts.map +0 -1
  77. package/dist/components/Chatbot/irisConversationThread.js +0 -470
  78. package/dist/components/Chatbot/irisGreetingBackdrop.d.ts +0 -5
  79. package/dist/components/Chatbot/irisGreetingBackdrop.d.ts.map +0 -1
  80. package/dist/components/Chatbot/irisGreetingBackdrop.js +0 -62
  81. package/dist/components/Chatbot/irisMenuListItem.d.ts +0 -11
  82. package/dist/components/Chatbot/irisMenuListItem.d.ts.map +0 -1
  83. package/dist/components/Chatbot/irisMenuListItem.js +0 -126
  84. package/dist/components/Chatbot/irisMenuScreen.d.ts +0 -4
  85. package/dist/components/Chatbot/irisMenuScreen.d.ts.map +0 -1
  86. package/dist/components/Chatbot/irisMenuScreen.js +0 -311
  87. package/dist/components/Chatbot/irisThinking.d.ts +0 -7
  88. package/dist/components/Chatbot/irisThinking.d.ts.map +0 -1
  89. package/dist/components/Chatbot/irisThinking.js +0 -219
  90. package/dist/node_modules/@mui/icons-material/ArrowBack.js +0 -17
  91. package/dist/node_modules/@mui/icons-material/AttachFileOutlined.js +0 -17
  92. package/dist/node_modules/@mui/icons-material/ContentCopyOutlined.js +0 -17
  93. package/dist/node_modules/@mui/icons-material/Menu.js +0 -17
  94. package/dist/node_modules/@mui/icons-material/NorthRounded.js +0 -17
  95. package/dist/node_modules/@mui/icons-material/RefreshOutlined.js +0 -17
  96. package/dist/node_modules/@mui/icons-material/StopRounded.js +0 -17
  97. package/dist/node_modules/@mui/icons-material/ThumbDownOutlined.js +0 -17
  98. package/dist/node_modules/@mui/icons-material/ThumbUpOutlined.js +0 -17
  99. package/dist/node_modules/@mui/icons-material/VolumeUpOutlined.js +0 -17
  100. package/dist/stories/chatBotApiMock.d.ts +0 -476
  101. package/dist/stories/chatBotApiMock.d.ts.map +0 -1
@@ -402,8 +402,7 @@ var ChatbotCollapse = (props, ref) => /* @__PURE__ */ jsx(
402
402
  )
403
403
  }
404
404
  );
405
- var ForwardRef18 = forwardRef(ChatbotCollapse);
406
- var ChatbotCollapse_default = ForwardRef18;
405
+ forwardRef(ChatbotCollapse);
407
406
  var ChatBotDownArrow = (props, ref) => /* @__PURE__ */ jsx(
408
407
  "svg",
409
408
  {
@@ -441,8 +440,7 @@ var ChatbotFloating = (props, ref) => /* @__PURE__ */ jsx(
441
440
  )
442
441
  }
443
442
  );
444
- var ForwardRef20 = forwardRef(ChatbotFloating);
445
- var ChatbotFloating_default = ForwardRef20;
443
+ forwardRef(ChatbotFloating);
446
444
  var ChatbotFullScreen = (props, ref) => /* @__PURE__ */ jsx(
447
445
  "svg",
448
446
  {
@@ -461,8 +459,7 @@ var ChatbotFullScreen = (props, ref) => /* @__PURE__ */ jsx(
461
459
  )
462
460
  }
463
461
  );
464
- var ForwardRef21 = forwardRef(ChatbotFullScreen);
465
- var ChatbotFullScreen_default = ForwardRef21;
462
+ forwardRef(ChatbotFullScreen);
466
463
  var ChatbotIcon = (props, ref) => /* @__PURE__ */ jsxs(
467
464
  "svg",
468
465
  {
@@ -570,8 +567,7 @@ var ChatBotMicIcon = (props, ref) => /* @__PURE__ */ jsx(
570
567
  )
571
568
  }
572
569
  );
573
- var ForwardRef23 = forwardRef(ChatBotMicIcon);
574
- var ChatBotMicIcon_default = ForwardRef23;
570
+ forwardRef(ChatBotMicIcon);
575
571
  var ChatbotNewChat = (props, ref) => /* @__PURE__ */ jsx(
576
572
  "svg",
577
573
  {
@@ -592,8 +588,7 @@ var ChatbotNewChat = (props, ref) => /* @__PURE__ */ jsx(
592
588
  )
593
589
  }
594
590
  );
595
- var ForwardRef24 = forwardRef(ChatbotNewChat);
596
- var ChatbotNewChat_default = ForwardRef24;
591
+ forwardRef(ChatbotNewChat);
597
592
  var ChatBotRefreshIcon = (props, ref) => /* @__PURE__ */ jsxs(
598
593
  "svg",
599
594
  {
@@ -661,8 +656,7 @@ var ChatbotSidebar = (props, ref) => /* @__PURE__ */ jsx(
661
656
  )
662
657
  }
663
658
  );
664
- var ForwardRef27 = forwardRef(ChatbotSidebar);
665
- var ChatbotSidebar_default = ForwardRef27;
659
+ forwardRef(ChatbotSidebar);
666
660
  var ChatbotStopIcon = (props, ref) => /* @__PURE__ */ jsx(
667
661
  "svg",
668
662
  {
@@ -694,8 +688,7 @@ var ChatbotWindow = (props, ref) => /* @__PURE__ */ jsx(
694
688
  )
695
689
  }
696
690
  );
697
- var ForwardRef29 = forwardRef(ChatbotWindow);
698
- var ChatbotWindow_default = ForwardRef29;
691
+ forwardRef(ChatbotWindow);
699
692
  var ChatCheckIcon = (props, ref) => /* @__PURE__ */ jsxs(
700
693
  "svg",
701
694
  {
@@ -1949,8 +1942,7 @@ var DeleteRedIcon = (props, ref) => /* @__PURE__ */ jsx(
1949
1942
  )
1950
1943
  }
1951
1944
  );
1952
- var ForwardRef83 = forwardRef(DeleteRedIcon);
1953
- var DeleteRedIcon_default = ForwardRef83;
1945
+ forwardRef(DeleteRedIcon);
1954
1946
  var DisabledAccordionChevron = (props, ref) => /* @__PURE__ */ jsx(
1955
1947
  "svg",
1956
1948
  {
@@ -2446,8 +2438,7 @@ var FilterFunnel = (props, ref) => /* @__PURE__ */ jsx(
2446
2438
  )
2447
2439
  }
2448
2440
  );
2449
- var ForwardRef104 = forwardRef(FilterFunnel);
2450
- var FilterFunnel_default = ForwardRef104;
2441
+ forwardRef(FilterFunnel);
2451
2442
  var FormatIcon = (props, ref) => /* @__PURE__ */ jsx(
2452
2443
  "svg",
2453
2444
  {
@@ -3624,8 +3615,7 @@ var PinedIcon = (props, ref) => /* @__PURE__ */ jsx(
3624
3615
  )
3625
3616
  }
3626
3617
  );
3627
- var ForwardRef157 = forwardRef(PinedIcon);
3628
- var PinedIcon_default = ForwardRef157;
3618
+ forwardRef(PinedIcon);
3629
3619
  var PinnedIcon = (props, ref) => /* @__PURE__ */ jsx(
3630
3620
  "svg",
3631
3621
  {
@@ -5449,23 +5439,14 @@ Icon.displayName = "Icon";
5449
5439
  export {
5450
5440
  BookDemo_default as BookDemo,
5451
5441
  ChartDropdown_default as ChartDropdown,
5452
- ChatBotMicIcon_default as ChatBotMicIcon,
5453
- ChatbotCollapse_default as ChatbotCollapse,
5454
- ChatbotFloating_default as ChatbotFloating,
5455
- ChatbotFullScreen_default as ChatbotFullScreen,
5456
- ChatbotNewChat_default as ChatbotNewChat,
5457
- ChatbotSidebar_default as ChatbotSidebar,
5458
- ChatbotWindow_default as ChatbotWindow,
5459
5442
  CheckTickAll_default as CheckTickAll,
5460
5443
  CheckboxTick_default as CheckboxTick,
5461
5444
  CollapseNew_default as CollapseNew,
5462
5445
  Comment_default as Comment,
5463
5446
  ConfigurationIcon_default as ConfigurationIcon,
5464
5447
  DeleteBlack_default as DeleteBlack,
5465
- DeleteRedIcon_default as DeleteRedIcon,
5466
5448
  EditBlack_default as EditBlack,
5467
5449
  ExpandIcon_default as ExpandIcon,
5468
- FilterFunnel_default as FilterFunnel,
5469
5450
  Globe_default as Globe,
5470
5451
  Icon,
5471
5452
  LaunchIcon_default as LaunchIcon,
@@ -5473,7 +5454,6 @@ export {
5473
5454
  MoreHorizontal_default as MoreHorizontal,
5474
5455
  PanelView_default as PanelView,
5475
5456
  PersonUser_default as PersonUser,
5476
- PinedIcon_default as PinedIcon,
5477
5457
  PinnedIcon_default as PinnedIcon,
5478
5458
  ReplyChatIcon_default as ReplyChatIcon,
5479
5459
  Search_default as Search,
@@ -1,7 +1,7 @@
1
1
  import { __exports as colorManipulator } from "../../../_virtual/colorManipulator.js";
2
2
  import require$$0 from "@babel/runtime/helpers/interopRequireDefault";
3
- import require$$1 from "../../../_virtual/index5.js";
4
- import require$$2 from "../../../_virtual/index6.js";
3
+ import require$$1 from "../../../_virtual/index4.js";
4
+ import require$$2 from "../../../_virtual/index5.js";
5
5
  var _interopRequireDefault = require$$0;
6
6
  Object.defineProperty(colorManipulator, "__esModule", {
7
7
  value: true
@@ -1,5 +1,5 @@
1
1
  import { getDefaultExportFromCjs } from "../../_virtual/_commonjsHelpers.js";
2
- import { __module as propTypes } from "../../_virtual/index2.js";
2
+ import { __module as propTypes } from "../../_virtual/index3.js";
3
3
  import { __require as requireReactIs } from "./node_modules/react-is/index.js";
4
4
  import { __require as requireFactoryWithTypeCheckers } from "./factoryWithTypeCheckers.js";
5
5
  import { __require as requireFactoryWithThrowingShims } from "./factoryWithThrowingShims.js";
@@ -1,4 +1,4 @@
1
- import { __module as reactIs } from "../../../../_virtual/index4.js";
1
+ import { __module as reactIs } from "../../../../_virtual/index6.js";
2
2
  import { __require as requireReactIs_production_min } from "./cjs/react-is.production.min.js";
3
3
  import { __require as requireReactIs_development } from "./cjs/react-is.development.js";
4
4
  var hasRequiredReactIs;
@@ -1,4 +1,4 @@
1
- import { __module as reactIs } from "../../_virtual/index3.js";
1
+ import { __module as reactIs } from "../../_virtual/index2.js";
2
2
  import { __require as requireReactIs_production } from "./cjs/react-is.production.js";
3
3
  import { __require as requireReactIs_development } from "./cjs/react-is.development.js";
4
4
  if (process.env.NODE_ENV === "production") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "impact-ui",
3
- "version": "5.0.4-chatbot.1",
3
+ "version": "5.0.5",
4
4
  "description": "Impact Analytics UI library",
5
5
  "type": "module",
6
6
  "main": "./dist/components/index.js",
@@ -108,7 +108,7 @@
108
108
  "@chromatic-com/storybook": "^5.0.1",
109
109
  "@emotion/react": "^11.14.0",
110
110
  "@emotion/styled": "^11.14.1",
111
- "@impactsmartsuite/impact-icons": "0.1.8-beta.10",
111
+ "@impactsmartsuite/impact-icons": "0.1.8-beta.3",
112
112
  "@mui/base": "^5.0.0-alpha.82",
113
113
  "@mui/docs": "^5.8.0",
114
114
  "@mui/envinfo": "^2.0.6",
@@ -1,4 +0,0 @@
1
- var ArrowBack = {};
2
- export {
3
- ArrowBack as __exports
4
- };
@@ -1,4 +0,0 @@
1
- var AttachFileOutlined = {};
2
- export {
3
- AttachFileOutlined as __exports
4
- };
@@ -1,4 +0,0 @@
1
- var ContentCopyOutlined = {};
2
- export {
3
- ContentCopyOutlined as __exports
4
- };
@@ -1,4 +0,0 @@
1
- var Menu = {};
2
- export {
3
- Menu as __exports
4
- };
@@ -1,4 +0,0 @@
1
- var NorthRounded = {};
2
- export {
3
- NorthRounded as __exports
4
- };
@@ -1,4 +0,0 @@
1
- var RefreshOutlined = {};
2
- export {
3
- RefreshOutlined as __exports
4
- };
@@ -1,4 +0,0 @@
1
- var StopRounded = {};
2
- export {
3
- StopRounded as __exports
4
- };
@@ -1,4 +0,0 @@
1
- var ThumbDownOutlined = {};
2
- export {
3
- ThumbDownOutlined as __exports
4
- };
@@ -1,4 +0,0 @@
1
- var ThumbUpOutlined = {};
2
- export {
3
- ThumbUpOutlined as __exports
4
- };
@@ -1,4 +0,0 @@
1
- var VolumeUpOutlined = {};
2
- export {
3
- VolumeUpOutlined as __exports
4
- };
@@ -1,4 +0,0 @@
1
- import { ChatbotComposerProps } from './Chatbot.types';
2
-
3
- export declare function ChatbotComposer({ inputValue, setInputValue, handleMicClick, customInputComponent, modelOptions, selectedModel, onModelChange, onAddClick, onAttachClick, onSend, onStop, isStopIcon, placeholder, }: ChatbotComposerProps): import("react/jsx-runtime").JSX.Element;
4
- //# sourceMappingURL=chatbotComposer.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"chatbotComposer.d.ts","sourceRoot":"","sources":["../../../src/components/Chatbot/chatbotComposer.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAM5D,wBAAgB,eAAe,CAAC,EAC9B,UAAU,EACV,aAAa,EACb,cAAc,EACd,oBAAoB,EACpB,YAAY,EACZ,aAAa,EACb,aAAa,EACb,UAAU,EACV,aAAa,EACb,MAAM,EACN,MAAM,EACN,UAAkB,EAClB,WAAW,GACZ,EAAE,oBAAoB,2CAsMtB"}
@@ -1,226 +0,0 @@
1
- import { jsx, jsxs } from "react/jsx-runtime";
2
- import { useRef, useState } from "react";
3
- import default_1 from "../../node_modules/@mui/icons-material/Add.js";
4
- import default_1$1 from "../../node_modules/@mui/icons-material/AttachFileOutlined.js";
5
- import default_1$3 from "../../node_modules/@mui/icons-material/KeyboardArrowDown.js";
6
- import default_1$2 from "../../node_modules/@mui/icons-material/KeyboardArrowUp.js";
7
- import { ChatBotMicIcon as ChatBotMicIcon_default } from "../../node_modules/@impactsmartsuite/impact-icons/dist/index.js";
8
- import default_1$4 from "../../node_modules/@mui/icons-material/StopRounded.js";
9
- import default_1$5 from "../../node_modules/@mui/icons-material/NorthRounded.js";
10
- import TextareaAutosize from "react-textarea-autosize";
11
- import { Button } from "../Button/index.js";
12
- import { Menu } from "../Menu/index.js";
13
- import { Tooltip } from "../Tooltip/index.js";
14
- import { useTranslation } from "../../i18n/useTranslation.js";
15
- const DEFAULT_MODEL = { label: "Auto", value: "auto" };
16
- const COMPOSER_ACTION_SELECTOR = 'button, a, input, textarea, select, label, [role="button"], [role="menuitem"]';
17
- function ChatbotComposer({
18
- inputValue,
19
- setInputValue,
20
- handleMicClick,
21
- customInputComponent,
22
- modelOptions,
23
- selectedModel,
24
- onModelChange,
25
- onAddClick,
26
- onAttachClick,
27
- onSend,
28
- onStop,
29
- isStopIcon = false,
30
- placeholder
31
- }) {
32
- const { t } = useTranslation();
33
- const composerRef = useRef(null);
34
- const textareaRef = useRef(null);
35
- const [modelAnchorEl, setModelAnchorEl] = useState(null);
36
- const [isFocused, setIsFocused] = useState(false);
37
- const isModelOpen = Boolean(modelAnchorEl);
38
- const hasContent = inputValue.trim().length > 0;
39
- const isActive = isFocused || hasContent;
40
- const options = (modelOptions == null ? void 0 : modelOptions.length) ? modelOptions : [DEFAULT_MODEL];
41
- const activeOption = options.find((option) => option.value === selectedModel) ?? options[0] ?? DEFAULT_MODEL;
42
- const handleModelClose = () => {
43
- setModelAnchorEl(null);
44
- };
45
- const handleSend = () => {
46
- if (!hasContent || isStopIcon) return;
47
- onSend == null ? void 0 : onSend();
48
- };
49
- const handleBoxMouseDown = (event) => {
50
- var _a;
51
- const target = event.target;
52
- if (target == null ? void 0 : target.closest(COMPOSER_ACTION_SELECTOR)) return;
53
- event.preventDefault();
54
- (_a = textareaRef.current) == null ? void 0 : _a.focus();
55
- };
56
- if (customInputComponent) {
57
- return /* @__PURE__ */ jsx("div", { className: "chatbot-composer", children: customInputComponent });
58
- }
59
- return /* @__PURE__ */ jsx(
60
- "form",
61
- {
62
- ref: composerRef,
63
- className: "chatbot-composer",
64
- onSubmit: (event) => {
65
- event.preventDefault();
66
- handleSend();
67
- },
68
- children: /* @__PURE__ */ jsxs(
69
- "div",
70
- {
71
- className: [
72
- "chatbot-composer-box",
73
- isActive ? "is-active" : "",
74
- hasContent ? "has-content" : "",
75
- isStopIcon ? "is-stopping" : ""
76
- ].filter(Boolean).join(" "),
77
- onMouseDown: handleBoxMouseDown,
78
- children: [
79
- /* @__PURE__ */ jsx(
80
- TextareaAutosize,
81
- {
82
- ref: textareaRef,
83
- "aria-label": placeholder ?? t("chatBot.irisInputPlaceholder"),
84
- className: "chatbot-composer-textarea",
85
- maxRows: 6,
86
- minRows: 1,
87
- id: "chatbot-composer-textarea",
88
- name: "chatbot-composer-textarea",
89
- placeholder: placeholder ?? t("chatBot.irisInputPlaceholder"),
90
- value: inputValue,
91
- onBlur: () => {
92
- setIsFocused(false);
93
- },
94
- onChange: (event) => {
95
- setInputValue(event.target.value);
96
- },
97
- onFocus: () => {
98
- setIsFocused(true);
99
- },
100
- onKeyDown: (event) => {
101
- if (event.key === "Enter" && !event.shiftKey) {
102
- event.preventDefault();
103
- handleSend();
104
- }
105
- }
106
- }
107
- ),
108
- /* @__PURE__ */ jsxs("div", { className: "chatbot-composer-toolbar", children: [
109
- /* @__PURE__ */ jsxs("div", { className: "chatbot-composer-toolbar-left", children: [
110
- /* @__PURE__ */ jsx(Tooltip, { title: t("chatBot.composer.add"), variant: "tertiary", children: /* @__PURE__ */ jsx(
111
- Button,
112
- {
113
- "aria-label": t("chatBot.composer.add"),
114
- className: "chatbot-composer-icon-button",
115
- icon: /* @__PURE__ */ jsx(default_1, { fontSize: "small" }),
116
- type: "default",
117
- variant: "text",
118
- onClick: onAddClick
119
- }
120
- ) }),
121
- /* @__PURE__ */ jsx(Tooltip, { title: t("chatBot.composer.attach"), variant: "tertiary", children: /* @__PURE__ */ jsx(
122
- Button,
123
- {
124
- "aria-label": t("chatBot.composer.attach"),
125
- className: "chatbot-composer-icon-button",
126
- icon: /* @__PURE__ */ jsx(default_1$1, { fontSize: "small" }),
127
- type: "default",
128
- variant: "text",
129
- onClick: onAttachClick
130
- }
131
- ) })
132
- ] }),
133
- /* @__PURE__ */ jsxs("div", { className: "chatbot-composer-toolbar-right", children: [
134
- /* @__PURE__ */ jsxs("div", { className: "chatbot-composer-model", children: [
135
- /* @__PURE__ */ jsx(Tooltip, { title: t("chatBot.composer.model"), variant: "tertiary", children: /* @__PURE__ */ jsx(
136
- Button,
137
- {
138
- "aria-controls": isModelOpen ? "chatbot-composer-model-menu" : void 0,
139
- "aria-expanded": isModelOpen,
140
- "aria-haspopup": "true",
141
- "aria-label": t("chatBot.composer.model"),
142
- className: "chatbot-composer-model-trigger",
143
- icon: isModelOpen ? /* @__PURE__ */ jsx(default_1$2, { fontSize: "small" }) : /* @__PURE__ */ jsx(default_1$3, { fontSize: "small" }),
144
- iconPlacement: "right",
145
- variant: "text",
146
- onClick: (event) => {
147
- setModelAnchorEl(isModelOpen ? null : event.currentTarget);
148
- },
149
- children: activeOption.label
150
- }
151
- ) }),
152
- /* @__PURE__ */ jsx(
153
- Menu,
154
- {
155
- MenuProps: {
156
- anchorOrigin: {
157
- vertical: "top",
158
- horizontal: "left"
159
- },
160
- transformOrigin: {
161
- vertical: "bottom",
162
- horizontal: "left"
163
- },
164
- PaperProps: {
165
- style: {
166
- width: 200
167
- }
168
- }
169
- },
170
- anchorEl: modelAnchorEl,
171
- id: "chatbot-composer-model-menu",
172
- open: isModelOpen,
173
- options: options.map((option) => ({
174
- label: option.label,
175
- value: option.value,
176
- onClick: () => {
177
- onModelChange == null ? void 0 : onModelChange(option.value);
178
- handleModelClose();
179
- }
180
- })),
181
- selected: { value: activeOption.value },
182
- onClose: handleModelClose
183
- }
184
- )
185
- ] }),
186
- handleMicClick && /* @__PURE__ */ jsx(Tooltip, { title: t("chatBot.composer.mic"), variant: "tertiary", children: /* @__PURE__ */ jsx(
187
- Button,
188
- {
189
- "aria-label": t("chatBot.composer.mic"),
190
- className: "chatbot-composer-icon-button",
191
- icon: /* @__PURE__ */ jsx(ChatBotMicIcon_default, { height: 16, width: 16 }),
192
- type: "default",
193
- variant: "text",
194
- onClick: handleMicClick
195
- }
196
- ) }),
197
- isStopIcon ? /* @__PURE__ */ jsx(Tooltip, { title: t("chatBot.composer.stop"), variant: "tertiary", children: /* @__PURE__ */ jsx(
198
- Button,
199
- {
200
- "aria-label": t("chatBot.composer.stop"),
201
- icon: /* @__PURE__ */ jsx(default_1$4, { height: 16, width: 16 }),
202
- type: "default",
203
- variant: "primary",
204
- onClick: onStop
205
- }
206
- ) }) : hasContent && /* @__PURE__ */ jsx(Tooltip, { title: t("chatBot.composer.send"), variant: "tertiary", children: /* @__PURE__ */ jsx(
207
- Button,
208
- {
209
- "aria-label": t("chatBot.composer.send"),
210
- htmlType: "submit",
211
- icon: /* @__PURE__ */ jsx(default_1$5, { fontSize: "small" }),
212
- type: "default",
213
- variant: "primary"
214
- }
215
- ) })
216
- ] })
217
- ] })
218
- ]
219
- }
220
- )
221
- }
222
- );
223
- }
224
- export {
225
- ChatbotComposer
226
- };
@@ -1,4 +0,0 @@
1
- import { ChatbotGreetingHeaderProps } from './Chatbot.types';
2
-
3
- export declare function ChatbotGreetingHeader({ title, variant, onClose, onMenuClick, onBackClick, onNewChatClick, onToggleCollapse, onMinimiseChatBot, isCollapsed, isFullWidth, dragHandleProps, }: ChatbotGreetingHeaderProps): import("react/jsx-runtime").JSX.Element;
4
- //# sourceMappingURL=chatbotGreetingHeader.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"chatbotGreetingHeader.d.ts","sourceRoot":"","sources":["../../../src/components/Chatbot/chatbotGreetingHeader.tsx"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,iBAAiB,CAAC;AAKlE,wBAAgB,qBAAqB,CAAC,EACpC,KAAK,EACL,OAAoB,EACpB,OAAO,EACP,WAAW,EACX,WAAW,EACX,cAAc,EACd,gBAAgB,EAChB,iBAAiB,EACjB,WAAmB,EACnB,WAAmB,EACnB,eAAe,GAChB,EAAE,0BAA0B,2CAkN5B"}