@patternfly/chatbot 6.5.0-prerelease.2 → 6.5.0-prerelease.20

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 (152) hide show
  1. package/dist/cjs/AttachMenu/AttachMenu.d.ts +8 -2
  2. package/dist/cjs/AttachMenu/AttachMenu.js +2 -2
  3. package/dist/cjs/ChatbotFooter/ChatbotFooter.d.ts +5 -2
  4. package/dist/cjs/ChatbotFooter/ChatbotFooter.js +2 -2
  5. package/dist/cjs/ChatbotFooter/ChatbotFooter.test.js +5 -1
  6. package/dist/cjs/ChatbotHeader/ChatbotHeaderMenu.js +29 -2
  7. package/dist/cjs/CodeModal/CodeModal.d.ts +2 -0
  8. package/dist/cjs/CodeModal/CodeModal.js +53 -8
  9. package/dist/cjs/FileDetailsLabel/FileDetailsLabel.d.ts +2 -1
  10. package/dist/cjs/Message/CodeBlockMessage/CodeBlockMessage.d.ts +3 -1
  11. package/dist/cjs/Message/CodeBlockMessage/CodeBlockMessage.js +2 -2
  12. package/dist/cjs/Message/Message.d.ts +7 -1
  13. package/dist/cjs/Message/Message.js +11 -8
  14. package/dist/cjs/Message/Message.test.js +36 -0
  15. package/dist/cjs/Message/MessageLoading.d.ts +2 -1
  16. package/dist/cjs/Message/MessageLoading.js +1 -1
  17. package/dist/cjs/Message/TableMessage/TableMessage.d.ts +4 -1
  18. package/dist/cjs/Message/TableMessage/TableMessage.js +2 -2
  19. package/dist/cjs/Message/TextMessage/TextMessage.d.ts +4 -1
  20. package/dist/cjs/Message/TextMessage/TextMessage.js +2 -2
  21. package/dist/cjs/MessageBar/AttachButton.d.ts +2 -0
  22. package/dist/cjs/MessageBar/AttachButton.js +2 -2
  23. package/dist/cjs/MessageBar/AttachButton.test.js +4 -0
  24. package/dist/cjs/MessageBar/MessageBar.d.ts +16 -6
  25. package/dist/cjs/MessageBar/MessageBar.js +6 -5
  26. package/dist/cjs/MessageBar/MessageBar.test.js +62 -0
  27. package/dist/cjs/Onboarding/Onboarding.d.ts +36 -0
  28. package/dist/cjs/Onboarding/Onboarding.js +37 -0
  29. package/dist/cjs/Onboarding/Onboarding.test.d.ts +1 -0
  30. package/dist/cjs/Onboarding/Onboarding.test.js +80 -0
  31. package/dist/cjs/Onboarding/index.d.ts +2 -0
  32. package/dist/cjs/Onboarding/index.js +23 -0
  33. package/dist/cjs/ResponseActions/ResponseActions.d.ts +3 -0
  34. package/dist/cjs/ResponseActions/ResponseActions.js +28 -7
  35. package/dist/cjs/ResponseActions/ResponseActions.test.js +67 -12
  36. package/dist/cjs/__mocks__/monaco-editor.d.ts +11 -0
  37. package/dist/cjs/__mocks__/monaco-editor.js +18 -0
  38. package/dist/cjs/__mocks__/rehype-highlight.d.ts +2 -0
  39. package/dist/cjs/__mocks__/rehype-highlight.js +4 -0
  40. package/dist/cjs/index.d.ts +2 -0
  41. package/dist/cjs/index.js +4 -1
  42. package/dist/css/main.css +219 -21
  43. package/dist/css/main.css.map +1 -1
  44. package/dist/dynamic/Onboarding/package.json +1 -0
  45. package/dist/esm/AttachMenu/AttachMenu.d.ts +8 -2
  46. package/dist/esm/AttachMenu/AttachMenu.js +2 -2
  47. package/dist/esm/ChatbotFooter/ChatbotFooter.d.ts +5 -2
  48. package/dist/esm/ChatbotFooter/ChatbotFooter.js +2 -2
  49. package/dist/esm/ChatbotFooter/ChatbotFooter.test.js +5 -1
  50. package/dist/esm/ChatbotHeader/ChatbotHeaderMenu.js +30 -3
  51. package/dist/esm/CodeModal/CodeModal.d.ts +2 -0
  52. package/dist/esm/CodeModal/CodeModal.js +54 -9
  53. package/dist/esm/FileDetailsLabel/FileDetailsLabel.d.ts +2 -1
  54. package/dist/esm/Message/CodeBlockMessage/CodeBlockMessage.d.ts +3 -1
  55. package/dist/esm/Message/CodeBlockMessage/CodeBlockMessage.js +2 -2
  56. package/dist/esm/Message/Message.d.ts +7 -1
  57. package/dist/esm/Message/Message.js +11 -8
  58. package/dist/esm/Message/Message.test.js +36 -0
  59. package/dist/esm/Message/MessageLoading.d.ts +2 -1
  60. package/dist/esm/Message/MessageLoading.js +1 -1
  61. package/dist/esm/Message/TableMessage/TableMessage.d.ts +4 -1
  62. package/dist/esm/Message/TableMessage/TableMessage.js +2 -2
  63. package/dist/esm/Message/TextMessage/TextMessage.d.ts +4 -1
  64. package/dist/esm/Message/TextMessage/TextMessage.js +2 -2
  65. package/dist/esm/MessageBar/AttachButton.d.ts +2 -0
  66. package/dist/esm/MessageBar/AttachButton.js +2 -2
  67. package/dist/esm/MessageBar/AttachButton.test.js +4 -0
  68. package/dist/esm/MessageBar/MessageBar.d.ts +16 -6
  69. package/dist/esm/MessageBar/MessageBar.js +6 -5
  70. package/dist/esm/MessageBar/MessageBar.test.js +62 -0
  71. package/dist/esm/Onboarding/Onboarding.d.ts +36 -0
  72. package/dist/esm/Onboarding/Onboarding.js +30 -0
  73. package/dist/esm/Onboarding/Onboarding.test.d.ts +1 -0
  74. package/dist/esm/Onboarding/Onboarding.test.js +75 -0
  75. package/dist/esm/Onboarding/index.d.ts +2 -0
  76. package/dist/esm/Onboarding/index.js +2 -0
  77. package/dist/esm/ResponseActions/ResponseActions.d.ts +3 -0
  78. package/dist/esm/ResponseActions/ResponseActions.js +28 -7
  79. package/dist/esm/ResponseActions/ResponseActions.test.js +67 -12
  80. package/dist/esm/__mocks__/monaco-editor.d.ts +11 -0
  81. package/dist/esm/__mocks__/monaco-editor.js +18 -0
  82. package/dist/esm/__mocks__/rehype-highlight.d.ts +2 -0
  83. package/dist/esm/__mocks__/rehype-highlight.js +2 -0
  84. package/dist/esm/index.d.ts +2 -0
  85. package/dist/esm/index.js +2 -0
  86. package/dist/tsconfig.tsbuildinfo +1 -1
  87. package/package.json +14 -2
  88. package/patternfly-docs/content/extensions/chatbot/chatbot.md +57 -0
  89. package/patternfly-docs/content/extensions/chatbot/design-guidelines.md +12 -12
  90. package/patternfly-docs/content/extensions/chatbot/examples/Analytics/Analytics.md +1 -1
  91. package/patternfly-docs/content/extensions/chatbot/examples/Customizing Messages/Customizing Messages.md +1 -1
  92. package/patternfly-docs/content/extensions/chatbot/examples/Messages/BotMessage.tsx +1 -0
  93. package/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithPersistedActions.tsx +22 -0
  94. package/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithQuickResponses.tsx +11 -0
  95. package/patternfly-docs/content/extensions/chatbot/examples/Messages/Messages.md +18 -4
  96. package/patternfly-docs/content/extensions/chatbot/examples/Messages/UserMessage.tsx +1 -0
  97. package/patternfly-docs/content/extensions/chatbot/examples/Messages/UserMessageWithExtraContent.tsx +3 -1
  98. package/patternfly-docs/content/extensions/chatbot/examples/UI/ChatbotMessageBarIndicatorThinking.tsx +15 -0
  99. package/patternfly-docs/content/extensions/chatbot/examples/UI/CompactOnboarding.tsx +141 -0
  100. package/patternfly-docs/content/extensions/chatbot/examples/UI/Onboarding.tsx +151 -0
  101. package/patternfly-docs/content/extensions/chatbot/examples/UI/RH-Hat-Image.svg +9 -0
  102. package/patternfly-docs/content/extensions/chatbot/examples/UI/Settings.tsx +1 -1
  103. package/patternfly-docs/content/extensions/chatbot/examples/UI/UI.md +55 -27
  104. package/patternfly-docs/content/extensions/chatbot/examples/demos/AttachmentDemos.md +18 -18
  105. package/patternfly-docs/content/extensions/chatbot/examples/demos/Chatbot.md +29 -21
  106. package/patternfly-docs/content/extensions/chatbot/examples/demos/WhiteEmbeddedChatbot.tsx +451 -0
  107. package/patternfly-docs/patternfly-docs.config.js +2 -1
  108. package/patternfly-docs/patternfly-docs.source.js +1 -1
  109. package/src/AttachMenu/AttachMenu.tsx +26 -11
  110. package/src/Chatbot/Chatbot.scss +23 -1
  111. package/src/ChatbotConversationHistoryNav/ChatbotConversationHistoryNav.scss +25 -0
  112. package/src/ChatbotFooter/ChatbotFooter.scss +21 -0
  113. package/src/ChatbotFooter/ChatbotFooter.test.tsx +10 -1
  114. package/src/ChatbotFooter/ChatbotFooter.tsx +10 -3
  115. package/src/ChatbotHeader/ChatbotHeader.scss +19 -0
  116. package/src/ChatbotHeader/ChatbotHeaderMenu.tsx +56 -14
  117. package/src/ChatbotModal/ChatbotModal.scss +3 -0
  118. package/src/CodeModal/CodeModal.tsx +72 -23
  119. package/src/DeepThinking/DeepThinking.scss +1 -1
  120. package/src/FileDetailsLabel/FileDetailsLabel.tsx +2 -2
  121. package/src/Message/CodeBlockMessage/CodeBlockMessage.scss +12 -0
  122. package/src/Message/CodeBlockMessage/CodeBlockMessage.tsx +4 -1
  123. package/src/Message/Message.scss +11 -7
  124. package/src/Message/Message.test.tsx +41 -0
  125. package/src/Message/Message.tsx +28 -13
  126. package/src/Message/MessageLoading.scss +7 -0
  127. package/src/Message/MessageLoading.tsx +2 -2
  128. package/src/Message/TableMessage/TableMessage.scss +6 -1
  129. package/src/Message/TableMessage/TableMessage.tsx +6 -2
  130. package/src/Message/TextMessage/TextMessage.scss +10 -0
  131. package/src/Message/TextMessage/TextMessage.tsx +11 -2
  132. package/src/Message/UserFeedback/UserFeedback.scss +2 -1
  133. package/src/MessageBar/AttachButton.test.tsx +4 -0
  134. package/src/MessageBar/AttachButton.tsx +4 -1
  135. package/src/MessageBar/MessageBar.scss +40 -3
  136. package/src/MessageBar/MessageBar.test.tsx +102 -1
  137. package/src/MessageBar/MessageBar.tsx +44 -11
  138. package/src/Onboarding/Onboarding.scss +101 -0
  139. package/src/Onboarding/Onboarding.test.tsx +148 -0
  140. package/src/Onboarding/Onboarding.tsx +126 -0
  141. package/src/Onboarding/index.ts +3 -0
  142. package/src/ResponseActions/ResponseActions.scss +1 -1
  143. package/src/ResponseActions/ResponseActions.test.tsx +111 -12
  144. package/src/ResponseActions/ResponseActions.tsx +38 -10
  145. package/src/ToolCall/ToolCall.scss +1 -1
  146. package/src/ToolResponse/ToolResponse.scss +3 -3
  147. package/src/__mocks__/monaco-editor.ts +19 -0
  148. package/src/__mocks__/rehype-highlight.ts +3 -0
  149. package/src/index.ts +3 -0
  150. package/src/main.scss +1 -0
  151. package/tsconfig.json +1 -1
  152. package/patternfly-docs/content/extensions/chatbot/about-chatbot.md +0 -44
@@ -154,6 +154,48 @@ describe('Message bar', () => {
154
154
  yield userEvent.click(attachButton);
155
155
  expect(attachToggleClickSpy).toHaveBeenCalledTimes(1);
156
156
  }));
157
+ it('can pass searchInputProps to search input in AttachMenu', () => {
158
+ render(_jsx(MessageBar, { onSendMessage: jest.fn, value: "test", attachMenuProps: {
159
+ isAttachMenuOpen: true,
160
+ setIsAttachMenuOpen: jest.fn(),
161
+ onAttachMenuToggleClick: jest.fn(),
162
+ onAttachMenuInputChange: jest.fn(),
163
+ attachMenuItems: ATTACH_MENU_ITEMS,
164
+ searchInputProps: { isDisabled: true }
165
+ } }));
166
+ expect(screen.getByRole('textbox', { name: /Filter menu items/i })).toBeDisabled();
167
+ });
168
+ it('can pass menuSearchProps to search input in AttachMenu', () => {
169
+ render(_jsx(MessageBar, { onSendMessage: jest.fn, value: "test", attachMenuProps: {
170
+ isAttachMenuOpen: true,
171
+ setIsAttachMenuOpen: jest.fn(),
172
+ onAttachMenuToggleClick: jest.fn(),
173
+ onAttachMenuInputChange: jest.fn(),
174
+ attachMenuItems: ATTACH_MENU_ITEMS,
175
+ menuSearchProps: { 'data-testid': 'menu-search' }
176
+ } }));
177
+ expect(screen.getByTestId('menu-search')).toBeTruthy();
178
+ });
179
+ it('can pass menuSearchInputProps to search input in AttachMenu', () => {
180
+ render(_jsx(MessageBar, { onSendMessage: jest.fn, value: "test", attachMenuProps: {
181
+ isAttachMenuOpen: true,
182
+ setIsAttachMenuOpen: jest.fn(),
183
+ onAttachMenuToggleClick: jest.fn(),
184
+ onAttachMenuInputChange: jest.fn(),
185
+ attachMenuItems: ATTACH_MENU_ITEMS,
186
+ menuSearchInputProps: { 'data-testid': 'menu-search-input' }
187
+ } }));
188
+ expect(screen.getByTestId('menu-search-input')).toBeTruthy();
189
+ });
190
+ it('can remove input from attach menu', () => __awaiter(void 0, void 0, void 0, function* () {
191
+ render(_jsx(MessageBar, { onSendMessage: jest.fn, attachMenuProps: {
192
+ isAttachMenuOpen: true,
193
+ setIsAttachMenuOpen: jest.fn(),
194
+ onAttachMenuToggleClick: jest.fn(),
195
+ attachMenuItems: ATTACH_MENU_ITEMS
196
+ } }));
197
+ expect(screen.queryByRole('textbox', { name: /Filter menu items/i })).not.toBeInTheDocument();
198
+ }));
157
199
  it('can hide attach button', () => {
158
200
  render(_jsx(MessageBar, { onSendMessage: jest.fn, hasAttachButton: false }));
159
201
  expect(screen.queryByRole('button', { name: 'Attach' })).toBeFalsy();
@@ -185,6 +227,14 @@ describe('Message bar', () => {
185
227
  render(_jsx(MessageBar, { onSendMessage: jest.fn, hasAttachButton: true, buttonProps: { attach: { props: { 'aria-label': 'Test' } } } }));
186
228
  yield userEvent.click(screen.getByRole('button', { name: 'Test' }));
187
229
  }));
230
+ it('can change attach button icon', () => {
231
+ render(_jsx(MessageBar, { onSendMessage: jest.fn, hasAttachButton: true, buttonProps: {
232
+ attach: {
233
+ icon: _jsx("img", { alt: "", src: "" })
234
+ }
235
+ } }));
236
+ expect(screen.getByRole('img')).toBeVisible();
237
+ });
188
238
  // Stop button
189
239
  // --------------------------------------------------------------------------
190
240
  it('can show stop button', () => {
@@ -264,4 +314,16 @@ describe('Message bar', () => {
264
314
  (_a = ref.current) === null || _a === void 0 ? void 0 : _a.focus();
265
315
  expect(document.activeElement).toBe(screen.getByRole('textbox'));
266
316
  });
317
+ it('should handle isPrimary', () => {
318
+ const { container } = render(_jsx(MessageBar, { isPrimary: true, onSendMessage: jest.fn }));
319
+ expect(container.querySelector('.pf-m-primary')).toBeTruthy();
320
+ });
321
+ it('Renders with class pf-v6-m-ai-indicator when hasAiIndicator is true', () => {
322
+ render(_jsx(MessageBar, { onSendMessage: jest.fn, hasAiIndicator: true }));
323
+ expect(screen.getByRole('textbox').closest('.pf-chatbot__message-bar')).toHaveClass('pf-v6-m-ai-indicator');
324
+ });
325
+ it('Renders with class pf-v6-m-thinking when isThinking is true', () => {
326
+ render(_jsx(MessageBar, { onSendMessage: jest.fn, isThinking: true }));
327
+ expect(screen.getByRole('textbox').closest('.pf-chatbot__message-bar')).toHaveClass('pf-v6-m-thinking');
328
+ });
267
329
  });
@@ -0,0 +1,36 @@
1
+ import type { FunctionComponent } from 'react';
2
+ import { ModalProps } from '@patternfly/react-core';
3
+ import { ChatbotDisplayMode } from '../Chatbot';
4
+ export interface OnboardingProps extends ModalProps {
5
+ /** Class applied to modal */
6
+ className?: string;
7
+ /** Action assigned to primary modal button */
8
+ onPrimaryAction?: (event: React.MouseEvent | MouseEvent | KeyboardEvent) => void;
9
+ /** Action assigned to secondary modal button */
10
+ onSecondaryAction: (event: React.MouseEvent | MouseEvent | KeyboardEvent) => void;
11
+ /** Name of primary modal button */
12
+ primaryActionBtn?: string;
13
+ /** Name of secondary modal button */
14
+ secondaryActionBtn?: string;
15
+ /** Function that handles modal toggle */
16
+ handleModalToggle: (event: React.MouseEvent | MouseEvent | KeyboardEvent) => void;
17
+ /** Whether modal is open */
18
+ isModalOpen: boolean;
19
+ /** Title of modal */
20
+ title?: string;
21
+ /** Display mode for the Chatbot parent; this influences the styles applied */
22
+ displayMode?: ChatbotDisplayMode;
23
+ /** Optional image displayed in header */
24
+ headerImage?: string;
25
+ /** Alt text for optional image displayed in header */
26
+ headerImageAltText?: string;
27
+ /** Ref applied to modal */
28
+ innerRef?: React.Ref<HTMLDivElement>;
29
+ /** OuiaID applied to modal */
30
+ ouiaId?: string;
31
+ /** Sets modal to compact styling. */
32
+ isCompact?: boolean;
33
+ }
34
+ export declare const OnboardingBase: FunctionComponent<OnboardingProps>;
35
+ declare const Onboarding: import("react").ForwardRefExoticComponent<Omit<OnboardingProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
36
+ export default Onboarding;
@@ -0,0 +1,30 @@
1
+ var __rest = (this && this.__rest) || function (s, e) {
2
+ var t = {};
3
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
+ t[p] = s[p];
5
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
+ t[p[i]] = s[p[i]];
9
+ }
10
+ return t;
11
+ };
12
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
13
+ import { forwardRef } from 'react';
14
+ import { Button, Content, ModalBody, ModalFooter } from '@patternfly/react-core';
15
+ import { ChatbotDisplayMode } from '../Chatbot';
16
+ import ChatbotModal from '../ChatbotModal/ChatbotModal';
17
+ export const OnboardingBase = (_a) => {
18
+ var { handleModalToggle, isModalOpen, onPrimaryAction, onSecondaryAction, primaryActionBtn = 'Continue', secondaryActionBtn = 'Skip', title = 'Onboarding', headerImage, headerImageAltText = '', displayMode = ChatbotDisplayMode.default, className, children, innerRef, ouiaId = 'Onboarding', isCompact } = _a, props = __rest(_a, ["handleModalToggle", "isModalOpen", "onPrimaryAction", "onSecondaryAction", "primaryActionBtn", "secondaryActionBtn", "title", "headerImage", "headerImageAltText", "displayMode", "className", "children", "innerRef", "ouiaId", "isCompact"]);
19
+ const handlePrimaryAction = (_event) => {
20
+ handleModalToggle(_event);
21
+ onPrimaryAction && onPrimaryAction(_event);
22
+ };
23
+ const handleSecondaryAction = (_event) => {
24
+ onSecondaryAction(_event);
25
+ };
26
+ const modal = (_jsx(ChatbotModal, Object.assign({ isOpen: isModalOpen, ouiaId: ouiaId, "aria-labelledby": "onboarding-title", "aria-describedby": "onboarding-modal", className: `pf-chatbot__onboarding-modal pf-chatbot__onboarding-modal--${displayMode} ${isCompact ? 'pf-m-compact' : ''} ${className ? className : ''}`, displayMode: displayMode, onClose: handleModalToggle }, props, { children: _jsx("section", { className: `pf-chatbot__onboarding--section`, "aria-label": title, tabIndex: -1, ref: innerRef, children: _jsxs(_Fragment, { children: [_jsxs(ModalBody, { className: "pf-chatbot__onboarding--modal-body", children: [!isCompact && headerImage && (_jsx("div", { className: "pf-chatbot__onboarding--header", children: _jsx("img", { src: headerImage, className: "pf-chatbot__onboarding--image", alt: headerImageAltText }) })), _jsxs("div", { className: "pf-chatbot__onboarding--modal-text", children: [_jsx("h1", { className: "pf-chatbot__onboarding--title", children: title }), _jsx(Content, { children: children })] })] }), _jsxs(ModalFooter, { className: "pf-chatbot__onboarding--footer", children: [_jsx(Button, { isBlock: true, variant: "primary", onClick: handlePrimaryAction, form: "onboarding-form", size: "lg", children: primaryActionBtn }, "onboarding-modal-primary"), _jsx(Button, { isBlock: true, variant: "secondary", onClick: handleSecondaryAction, size: "lg", children: secondaryActionBtn }, "onboarding-modal-secondary")] })] }) }) })));
27
+ return modal;
28
+ };
29
+ const Onboarding = forwardRef((props, ref) => (_jsx(OnboardingBase, Object.assign({ innerRef: ref }, props))));
30
+ export default Onboarding;
@@ -0,0 +1 @@
1
+ import '@testing-library/jest-dom';
@@ -0,0 +1,75 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ import { jsx as _jsx } from "react/jsx-runtime";
11
+ import { render, screen } from '@testing-library/react';
12
+ import '@testing-library/jest-dom';
13
+ import userEvent from '@testing-library/user-event';
14
+ import Onboarding from './Onboarding';
15
+ const handleModalToggle = jest.fn();
16
+ const onPrimaryAction = jest.fn();
17
+ const onSecondaryAction = jest.fn();
18
+ const body = 'Experience personalized assistance and seamless problem-solving, simplifying your journey with Red Hat every step of the way.';
19
+ describe('Onboarding', () => {
20
+ afterEach(() => {
21
+ jest.clearAllMocks();
22
+ });
23
+ it('should render modal correctly', () => {
24
+ render(_jsx(Onboarding, { isModalOpen: true, onSecondaryAction: onSecondaryAction, handleModalToggle: handleModalToggle, ouiaId: "Terms", children: body }));
25
+ expect(screen.getByRole('heading', { name: /Onboarding/i })).toBeTruthy();
26
+ expect(screen.getByRole('button', { name: /Continue/i })).toBeTruthy();
27
+ expect(screen.getByRole('button', { name: /Skip/i })).toBeTruthy();
28
+ expect(screen.getByText(body)).toBeTruthy();
29
+ expect(screen.getByRole('dialog')).toHaveClass('pf-chatbot__onboarding-modal');
30
+ expect(screen.getByRole('dialog')).toHaveClass('pf-chatbot__onboarding-modal--default');
31
+ });
32
+ it('should handle image and altText props', () => {
33
+ render(_jsx(Onboarding, { isModalOpen: true, onSecondaryAction: onSecondaryAction, handleModalToggle: handleModalToggle, headerImage: "./image.png", headerImageAltText: "Test image", children: body }));
34
+ expect(screen.getByRole('img')).toBeTruthy();
35
+ expect(screen.getByRole('img')).toHaveAttribute('alt', 'Test image');
36
+ });
37
+ it('should handle className prop', () => {
38
+ render(_jsx(Onboarding, { isModalOpen: true, onSecondaryAction: onSecondaryAction, handleModalToggle: handleModalToggle, className: "test", children: body }));
39
+ expect(screen.getByRole('dialog')).toHaveClass('pf-chatbot__onboarding-modal');
40
+ expect(screen.getByRole('dialog')).toHaveClass('pf-chatbot__onboarding-modal--default');
41
+ expect(screen.getByRole('dialog')).toHaveClass('test');
42
+ });
43
+ it('should handle title prop', () => {
44
+ render(_jsx(Onboarding, { isModalOpen: true, onSecondaryAction: onSecondaryAction, handleModalToggle: handleModalToggle, title: "Updated title", children: body }));
45
+ expect(screen.getByRole('heading', { name: /Updated title/i })).toBeTruthy();
46
+ expect(screen.queryByRole('heading', { name: /Onboarding/i })).toBeFalsy();
47
+ });
48
+ it('should handle primary button prop', () => {
49
+ render(_jsx(Onboarding, { isModalOpen: true, onSecondaryAction: onSecondaryAction, handleModalToggle: handleModalToggle, primaryActionBtn: "First", children: body }));
50
+ expect(screen.getByRole('button', { name: /First/i })).toBeTruthy();
51
+ expect(screen.queryByRole('button', { name: /Continue/i })).toBeFalsy();
52
+ });
53
+ it('should handle secondary button prop', () => {
54
+ render(_jsx(Onboarding, { isModalOpen: true, onSecondaryAction: onSecondaryAction, handleModalToggle: handleModalToggle, secondaryActionBtn: "Second", children: body }));
55
+ expect(screen.getByRole('button', { name: /Second/i })).toBeTruthy();
56
+ expect(screen.queryByRole('button', { name: /Skip/i })).toBeFalsy();
57
+ });
58
+ it('should handle primary button click', () => __awaiter(void 0, void 0, void 0, function* () {
59
+ render(_jsx(Onboarding, { isModalOpen: true, onPrimaryAction: onPrimaryAction, onSecondaryAction: onSecondaryAction, handleModalToggle: handleModalToggle, children: body }));
60
+ yield userEvent.click(screen.getByRole('button', { name: /Continue/i }));
61
+ expect(onPrimaryAction).toHaveBeenCalledTimes(1);
62
+ expect(handleModalToggle).toHaveBeenCalledTimes(1);
63
+ }));
64
+ it('should handle secondary button click', () => __awaiter(void 0, void 0, void 0, function* () {
65
+ render(_jsx(Onboarding, { isModalOpen: true, onSecondaryAction: onSecondaryAction, handleModalToggle: handleModalToggle, children: body }));
66
+ yield userEvent.click(screen.getByRole('button', { name: /Skip/i }));
67
+ expect(onSecondaryAction).toHaveBeenCalledTimes(1);
68
+ expect(handleModalToggle).not.toHaveBeenCalled();
69
+ }));
70
+ it('should handle isCompact prop', () => {
71
+ render(_jsx(Onboarding, { isModalOpen: true, onSecondaryAction: onSecondaryAction, handleModalToggle: handleModalToggle, isCompact: true, headerImage: "./image.png", headerImageAltText: "Test image", children: body }));
72
+ expect(screen.getByRole('dialog')).toHaveClass('pf-m-compact');
73
+ expect(screen.queryByRole('img')).toBeFalsy();
74
+ });
75
+ });
@@ -0,0 +1,2 @@
1
+ export { default } from './Onboarding';
2
+ export * from './Onboarding';
@@ -0,0 +1,2 @@
1
+ export { default } from './Onboarding';
2
+ export * from './Onboarding';
@@ -40,6 +40,9 @@ export interface ResponseActionProps {
40
40
  listen?: ActionProps;
41
41
  edit?: ActionProps;
42
42
  };
43
+ /** When true, the selected action will persist even when clicking outside the component.
44
+ * When false (default), clicking outside or clicking another action will deselect the current selection. */
45
+ persistActionSelection?: boolean;
43
46
  }
44
47
  export declare const ResponseActions: FunctionComponent<ResponseActionProps>;
45
48
  export default ResponseActions;
@@ -14,10 +14,11 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
14
14
  import { useEffect, useRef, useState } from 'react';
15
15
  import { ExternalLinkAltIcon, VolumeUpIcon, OutlinedThumbsUpIcon, OutlinedThumbsDownIcon, OutlinedCopyIcon, DownloadIcon, PencilAltIcon } from '@patternfly/react-icons';
16
16
  import ResponseActionButton from './ResponseActionButton';
17
- export const ResponseActions = ({ actions }) => {
17
+ export const ResponseActions = ({ actions, persistActionSelection = false }) => {
18
18
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3;
19
19
  const [activeButton, setActiveButton] = useState();
20
20
  const [clickStatePersisted, setClickStatePersisted] = useState(false);
21
+ const { positive, negative, copy, edit, share, download, listen } = actions, additionalActions = __rest(actions, ["positive", "negative", "copy", "edit", "share", "download", "listen"]);
21
22
  useEffect(() => {
22
23
  // Define the order of precedence for checking initial `isClicked`
23
24
  const actionPrecedence = ['positive', 'negative', 'copy', 'edit', 'share', 'download', 'listen'];
@@ -39,11 +40,18 @@ export const ResponseActions = ({ actions }) => {
39
40
  // Click state is explicitly controlled by consumer.
40
41
  setClickStatePersisted(true);
41
42
  }
43
+ // If persistActionSelection is true, all selections are persisted
44
+ if (persistActionSelection) {
45
+ setClickStatePersisted(true);
46
+ }
42
47
  setActiveButton(initialActive);
43
- }, [actions]);
44
- const { positive, negative, copy, edit, share, download, listen } = actions, additionalActions = __rest(actions, ["positive", "negative", "copy", "edit", "share", "download", "listen"]);
48
+ }, [actions, persistActionSelection]);
45
49
  const responseActions = useRef(null);
46
50
  useEffect(() => {
51
+ // Only add click outside listener if not persisting selection
52
+ if (persistActionSelection) {
53
+ return;
54
+ }
47
55
  const handleClickOutside = (e) => {
48
56
  if (responseActions.current && !responseActions.current.contains(e.target) && !clickStatePersisted) {
49
57
  setActiveButton(undefined);
@@ -53,13 +61,26 @@ export const ResponseActions = ({ actions }) => {
53
61
  return () => {
54
62
  window.removeEventListener('click', handleClickOutside);
55
63
  };
56
- }, [clickStatePersisted]);
64
+ }, [clickStatePersisted, persistActionSelection]);
57
65
  const handleClick = (e, id, onClick) => {
58
- setClickStatePersisted(false);
59
- setActiveButton(id);
66
+ if (persistActionSelection) {
67
+ if (activeButton === id) {
68
+ // Toggle off if clicking the same button
69
+ setActiveButton(undefined);
70
+ }
71
+ else {
72
+ // Set new active button
73
+ setActiveButton(id);
74
+ }
75
+ setClickStatePersisted(true);
76
+ }
77
+ else {
78
+ setClickStatePersisted(false);
79
+ setActiveButton(id);
80
+ }
60
81
  onClick && onClick(e);
61
82
  };
62
- return (_jsxs("div", { ref: responseActions, className: "pf-chatbot__response-actions", children: [positive && (_jsx(ResponseActionButton, Object.assign({}, positive, { ariaLabel: (_a = positive.ariaLabel) !== null && _a !== void 0 ? _a : 'Good response', clickedAriaLabel: (_b = positive.ariaLabel) !== null && _b !== void 0 ? _b : 'Response recorded', onClick: (e) => handleClick(e, 'positive', positive.onClick), className: positive.className, isDisabled: positive.isDisabled, tooltipContent: (_c = positive.tooltipContent) !== null && _c !== void 0 ? _c : 'Good response', clickedTooltipContent: (_d = positive.clickedTooltipContent) !== null && _d !== void 0 ? _d : 'Response recorded', tooltipProps: positive.tooltipProps, icon: _jsx(OutlinedThumbsUpIcon, {}), isClicked: activeButton === 'positive', ref: positive.ref, "aria-expanded": positive['aria-expanded'], "aria-controls": positive['aria-controls'] }))), negative && (_jsx(ResponseActionButton, Object.assign({}, negative, { ariaLabel: (_e = negative.ariaLabel) !== null && _e !== void 0 ? _e : 'Bad response', clickedAriaLabel: (_f = negative.ariaLabel) !== null && _f !== void 0 ? _f : 'Response recorded', onClick: (e) => handleClick(e, 'negative', negative.onClick), className: negative.className, isDisabled: negative.isDisabled, tooltipContent: (_g = negative.tooltipContent) !== null && _g !== void 0 ? _g : 'Bad response', clickedTooltipContent: (_h = negative.clickedTooltipContent) !== null && _h !== void 0 ? _h : 'Response recorded', tooltipProps: negative.tooltipProps, icon: _jsx(OutlinedThumbsDownIcon, {}), isClicked: activeButton === 'negative', ref: negative.ref, "aria-expanded": negative['aria-expanded'], "aria-controls": negative['aria-controls'] }))), copy && (_jsx(ResponseActionButton, Object.assign({}, copy, { ariaLabel: (_j = copy.ariaLabel) !== null && _j !== void 0 ? _j : 'Copy', clickedAriaLabel: (_k = copy.ariaLabel) !== null && _k !== void 0 ? _k : 'Copied', onClick: (e) => handleClick(e, 'copy', copy.onClick), className: copy.className, isDisabled: copy.isDisabled, tooltipContent: (_l = copy.tooltipContent) !== null && _l !== void 0 ? _l : 'Copy', clickedTooltipContent: (_m = copy.clickedTooltipContent) !== null && _m !== void 0 ? _m : 'Copied', tooltipProps: copy.tooltipProps, icon: _jsx(OutlinedCopyIcon, {}), isClicked: activeButton === 'copy', ref: copy.ref, "aria-expanded": copy['aria-expanded'], "aria-controls": copy['aria-controls'] }))), edit && (_jsx(ResponseActionButton, Object.assign({}, edit, { ariaLabel: (_o = edit.ariaLabel) !== null && _o !== void 0 ? _o : 'Edit', clickedAriaLabel: (_p = edit.ariaLabel) !== null && _p !== void 0 ? _p : 'Editing', onClick: (e) => handleClick(e, 'edit', edit.onClick), className: edit.className, isDisabled: edit.isDisabled, tooltipContent: (_q = edit.tooltipContent) !== null && _q !== void 0 ? _q : 'Edit ', clickedTooltipContent: (_r = edit.clickedTooltipContent) !== null && _r !== void 0 ? _r : 'Editing', tooltipProps: edit.tooltipProps, icon: _jsx(PencilAltIcon, {}), isClicked: activeButton === 'edit', ref: edit.ref, "aria-expanded": edit['aria-expanded'], "aria-controls": edit['aria-controls'] }))), share && (_jsx(ResponseActionButton, Object.assign({}, share, { ariaLabel: (_s = share.ariaLabel) !== null && _s !== void 0 ? _s : 'Share', clickedAriaLabel: (_t = share.ariaLabel) !== null && _t !== void 0 ? _t : 'Shared', onClick: (e) => handleClick(e, 'share', share.onClick), className: share.className, isDisabled: share.isDisabled, tooltipContent: (_u = share.tooltipContent) !== null && _u !== void 0 ? _u : 'Share', clickedTooltipContent: (_v = share.clickedTooltipContent) !== null && _v !== void 0 ? _v : 'Shared', tooltipProps: share.tooltipProps, icon: _jsx(ExternalLinkAltIcon, {}), isClicked: activeButton === 'share', ref: share.ref, "aria-expanded": share['aria-expanded'], "aria-controls": share['aria-controls'] }))), download && (_jsx(ResponseActionButton, Object.assign({}, download, { ariaLabel: (_w = download.ariaLabel) !== null && _w !== void 0 ? _w : 'Download', clickedAriaLabel: (_x = download.ariaLabel) !== null && _x !== void 0 ? _x : 'Downloaded', onClick: (e) => handleClick(e, 'download', download.onClick), className: download.className, isDisabled: download.isDisabled, tooltipContent: (_y = download.tooltipContent) !== null && _y !== void 0 ? _y : 'Download', clickedTooltipContent: (_z = download.clickedTooltipContent) !== null && _z !== void 0 ? _z : 'Downloaded', tooltipProps: download.tooltipProps, icon: _jsx(DownloadIcon, {}), isClicked: activeButton === 'download', ref: download.ref, "aria-expanded": download['aria-expanded'], "aria-controls": download['aria-controls'] }))), listen && (_jsx(ResponseActionButton, Object.assign({}, listen, { ariaLabel: (_0 = listen.ariaLabel) !== null && _0 !== void 0 ? _0 : 'Listen', clickedAriaLabel: (_1 = listen.ariaLabel) !== null && _1 !== void 0 ? _1 : 'Listening', onClick: (e) => handleClick(e, 'listen', listen.onClick), className: listen.className, isDisabled: listen.isDisabled, tooltipContent: (_2 = listen.tooltipContent) !== null && _2 !== void 0 ? _2 : 'Listen', clickedTooltipContent: (_3 = listen.clickedTooltipContent) !== null && _3 !== void 0 ? _3 : 'Listening', tooltipProps: listen.tooltipProps, icon: _jsx(VolumeUpIcon, {}), isClicked: activeButton === 'listen', ref: listen.ref, "aria-expanded": listen['aria-expanded'], "aria-controls": listen['aria-controls'] }))), Object.keys(additionalActions).map((action) => {
83
+ return (_jsxs("div", { ref: responseActions, className: "pf-chatbot__response-actions", children: [positive && (_jsx(ResponseActionButton, Object.assign({}, positive, { ariaLabel: (_a = positive.ariaLabel) !== null && _a !== void 0 ? _a : 'Good response', clickedAriaLabel: (_b = positive.ariaLabel) !== null && _b !== void 0 ? _b : 'Good response recorded', onClick: (e) => handleClick(e, 'positive', positive.onClick), className: positive.className, isDisabled: positive.isDisabled, tooltipContent: (_c = positive.tooltipContent) !== null && _c !== void 0 ? _c : 'Good response', clickedTooltipContent: (_d = positive.clickedTooltipContent) !== null && _d !== void 0 ? _d : 'Good response recorded', tooltipProps: positive.tooltipProps, icon: _jsx(OutlinedThumbsUpIcon, {}), isClicked: activeButton === 'positive', ref: positive.ref, "aria-expanded": positive['aria-expanded'], "aria-controls": positive['aria-controls'] }))), negative && (_jsx(ResponseActionButton, Object.assign({}, negative, { ariaLabel: (_e = negative.ariaLabel) !== null && _e !== void 0 ? _e : 'Bad response', clickedAriaLabel: (_f = negative.ariaLabel) !== null && _f !== void 0 ? _f : 'Bad response recorded', onClick: (e) => handleClick(e, 'negative', negative.onClick), className: negative.className, isDisabled: negative.isDisabled, tooltipContent: (_g = negative.tooltipContent) !== null && _g !== void 0 ? _g : 'Bad response', clickedTooltipContent: (_h = negative.clickedTooltipContent) !== null && _h !== void 0 ? _h : 'Bad response recorded', tooltipProps: negative.tooltipProps, icon: _jsx(OutlinedThumbsDownIcon, {}), isClicked: activeButton === 'negative', ref: negative.ref, "aria-expanded": negative['aria-expanded'], "aria-controls": negative['aria-controls'] }))), copy && (_jsx(ResponseActionButton, Object.assign({}, copy, { ariaLabel: (_j = copy.ariaLabel) !== null && _j !== void 0 ? _j : 'Copy', clickedAriaLabel: (_k = copy.ariaLabel) !== null && _k !== void 0 ? _k : 'Copied', onClick: (e) => handleClick(e, 'copy', copy.onClick), className: copy.className, isDisabled: copy.isDisabled, tooltipContent: (_l = copy.tooltipContent) !== null && _l !== void 0 ? _l : 'Copy', clickedTooltipContent: (_m = copy.clickedTooltipContent) !== null && _m !== void 0 ? _m : 'Copied', tooltipProps: copy.tooltipProps, icon: _jsx(OutlinedCopyIcon, {}), isClicked: activeButton === 'copy', ref: copy.ref, "aria-expanded": copy['aria-expanded'], "aria-controls": copy['aria-controls'] }))), edit && (_jsx(ResponseActionButton, Object.assign({}, edit, { ariaLabel: (_o = edit.ariaLabel) !== null && _o !== void 0 ? _o : 'Edit', clickedAriaLabel: (_p = edit.ariaLabel) !== null && _p !== void 0 ? _p : 'Editing', onClick: (e) => handleClick(e, 'edit', edit.onClick), className: edit.className, isDisabled: edit.isDisabled, tooltipContent: (_q = edit.tooltipContent) !== null && _q !== void 0 ? _q : 'Edit ', clickedTooltipContent: (_r = edit.clickedTooltipContent) !== null && _r !== void 0 ? _r : 'Editing', tooltipProps: edit.tooltipProps, icon: _jsx(PencilAltIcon, {}), isClicked: activeButton === 'edit', ref: edit.ref, "aria-expanded": edit['aria-expanded'], "aria-controls": edit['aria-controls'] }))), share && (_jsx(ResponseActionButton, Object.assign({}, share, { ariaLabel: (_s = share.ariaLabel) !== null && _s !== void 0 ? _s : 'Share', clickedAriaLabel: (_t = share.ariaLabel) !== null && _t !== void 0 ? _t : 'Shared', onClick: (e) => handleClick(e, 'share', share.onClick), className: share.className, isDisabled: share.isDisabled, tooltipContent: (_u = share.tooltipContent) !== null && _u !== void 0 ? _u : 'Share', clickedTooltipContent: (_v = share.clickedTooltipContent) !== null && _v !== void 0 ? _v : 'Shared', tooltipProps: share.tooltipProps, icon: _jsx(ExternalLinkAltIcon, {}), isClicked: activeButton === 'share', ref: share.ref, "aria-expanded": share['aria-expanded'], "aria-controls": share['aria-controls'] }))), download && (_jsx(ResponseActionButton, Object.assign({}, download, { ariaLabel: (_w = download.ariaLabel) !== null && _w !== void 0 ? _w : 'Download', clickedAriaLabel: (_x = download.ariaLabel) !== null && _x !== void 0 ? _x : 'Downloaded', onClick: (e) => handleClick(e, 'download', download.onClick), className: download.className, isDisabled: download.isDisabled, tooltipContent: (_y = download.tooltipContent) !== null && _y !== void 0 ? _y : 'Download', clickedTooltipContent: (_z = download.clickedTooltipContent) !== null && _z !== void 0 ? _z : 'Downloaded', tooltipProps: download.tooltipProps, icon: _jsx(DownloadIcon, {}), isClicked: activeButton === 'download', ref: download.ref, "aria-expanded": download['aria-expanded'], "aria-controls": download['aria-controls'] }))), listen && (_jsx(ResponseActionButton, Object.assign({}, listen, { ariaLabel: (_0 = listen.ariaLabel) !== null && _0 !== void 0 ? _0 : 'Listen', clickedAriaLabel: (_1 = listen.ariaLabel) !== null && _1 !== void 0 ? _1 : 'Listening', onClick: (e) => handleClick(e, 'listen', listen.onClick), className: listen.className, isDisabled: listen.isDisabled, tooltipContent: (_2 = listen.tooltipContent) !== null && _2 !== void 0 ? _2 : 'Listen', clickedTooltipContent: (_3 = listen.clickedTooltipContent) !== null && _3 !== void 0 ? _3 : 'Listening', tooltipProps: listen.tooltipProps, icon: _jsx(VolumeUpIcon, {}), isClicked: activeButton === 'listen', ref: listen.ref, "aria-expanded": listen['aria-expanded'], "aria-controls": listen['aria-controls'] }))), Object.keys(additionalActions).map((action) => {
63
84
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
64
85
  return (_createElement(ResponseActionButton, Object.assign({}, additionalActions[action], { key: action, ariaLabel: (_a = additionalActions[action]) === null || _a === void 0 ? void 0 : _a.ariaLabel, clickedAriaLabel: (_b = additionalActions[action]) === null || _b === void 0 ? void 0 : _b.clickedAriaLabel, onClick: (e) => { var _a; return handleClick(e, action, (_a = additionalActions[action]) === null || _a === void 0 ? void 0 : _a.onClick); }, className: (_c = additionalActions[action]) === null || _c === void 0 ? void 0 : _c.className, isDisabled: (_d = additionalActions[action]) === null || _d === void 0 ? void 0 : _d.isDisabled, tooltipContent: (_e = additionalActions[action]) === null || _e === void 0 ? void 0 : _e.tooltipContent, tooltipProps: (_f = additionalActions[action]) === null || _f === void 0 ? void 0 : _f.tooltipProps, clickedTooltipContent: (_g = additionalActions[action]) === null || _g === void 0 ? void 0 : _g.clickedTooltipContent, icon: (_h = additionalActions[action]) === null || _h === void 0 ? void 0 : _h.icon, isClicked: activeButton === action, ref: (_j = additionalActions[action]) === null || _j === void 0 ? void 0 : _j.ref, "aria-expanded": (_k = additionalActions[action]) === null || _k === void 0 ? void 0 : _k['aria-expanded'], "aria-controls": (_l = additionalActions[action]) === null || _l === void 0 ? void 0 : _l['aria-controls'] })));
65
86
  })] }));
@@ -15,8 +15,8 @@ import userEvent from '@testing-library/user-event';
15
15
  import { DownloadIcon, InfoCircleIcon, RedoIcon } from '@patternfly/react-icons';
16
16
  import Message from '../Message';
17
17
  const ALL_ACTIONS = [
18
- { type: 'positive', label: 'Good response', clickedLabel: 'Response recorded' },
19
- { type: 'negative', label: 'Bad response', clickedLabel: 'Response recorded' },
18
+ { type: 'positive', label: 'Good response', clickedLabel: 'Good response recorded' },
19
+ { type: 'negative', label: 'Bad response', clickedLabel: 'Bad response recorded' },
20
20
  { type: 'copy', label: 'Copy', clickedLabel: 'Copied' },
21
21
  { type: 'edit', label: 'Edit', clickedLabel: 'Editing' },
22
22
  { type: 'share', label: 'Share', clickedLabel: 'Shared' },
@@ -83,13 +83,13 @@ describe('ResponseActions', () => {
83
83
  expect(button).toBeTruthy();
84
84
  });
85
85
  yield userEvent.click(goodBtn);
86
- expect(screen.getByRole('button', { name: 'Response recorded' })).toHaveClass('pf-chatbot__button--response-action-clicked');
86
+ expect(screen.getByRole('button', { name: 'Good response recorded' })).toHaveClass('pf-chatbot__button--response-action-clicked');
87
87
  let unclickedButtons = buttons.filter((button) => button !== goodBtn);
88
88
  unclickedButtons.forEach((button) => {
89
89
  expect(button).not.toHaveClass('pf-chatbot__button--response-action-clicked');
90
90
  });
91
91
  yield userEvent.click(badBtn);
92
- expect(screen.getByRole('button', { name: 'Response recorded' })).toHaveClass('pf-chatbot__button--response-action-clicked');
92
+ expect(screen.getByRole('button', { name: 'Bad response recorded' })).toHaveClass('pf-chatbot__button--response-action-clicked');
93
93
  unclickedButtons = buttons.filter((button) => button !== badBtn);
94
94
  unclickedButtons.forEach((button) => {
95
95
  expect(button).not.toHaveClass('pf-chatbot__button--response-action-clicked');
@@ -106,10 +106,10 @@ describe('ResponseActions', () => {
106
106
  expect(goodBtn).toBeTruthy();
107
107
  expect(badBtn).toBeTruthy();
108
108
  yield userEvent.click(goodBtn);
109
- expect(screen.getByRole('button', { name: 'Response recorded' })).toHaveClass('pf-chatbot__button--response-action-clicked');
109
+ expect(screen.getByRole('button', { name: 'Good response recorded' })).toHaveClass('pf-chatbot__button--response-action-clicked');
110
110
  expect(badBtn).not.toHaveClass('pf-chatbot__button--response-action-clicked');
111
111
  yield userEvent.click(badBtn);
112
- expect(screen.getByRole('button', { name: 'Response recorded' })).toHaveClass('pf-chatbot__button--response-action-clicked');
112
+ expect(screen.getByRole('button', { name: 'Bad response recorded' })).toHaveClass('pf-chatbot__button--response-action-clicked');
113
113
  expect(goodBtn).not.toHaveClass('pf-chatbot__button--response-action-clicked');
114
114
  yield userEvent.click(screen.getByText("I updated your account with those settings. You're ready to set up your first dashboard!"));
115
115
  expect(goodBtn).not.toHaveClass('pf-chatbot__button--response-action-clicked');
@@ -182,28 +182,28 @@ describe('ResponseActions', () => {
182
182
  });
183
183
  });
184
184
  it('should be able to call onClick correctly', () => __awaiter(void 0, void 0, void 0, function* () {
185
- ALL_ACTIONS.forEach((_a) => __awaiter(void 0, [_a], void 0, function* ({ type, label }) {
185
+ for (const { type, label } of ALL_ACTIONS) {
186
186
  const spy = jest.fn();
187
187
  render(_jsx(ResponseActions, { actions: { [type]: { onClick: spy } } }));
188
188
  yield userEvent.click(screen.getByRole('button', { name: label }));
189
189
  expect(spy).toHaveBeenCalledTimes(1);
190
- }));
190
+ }
191
191
  }));
192
192
  it('should swap clicked and non-clicked aria labels on click', () => __awaiter(void 0, void 0, void 0, function* () {
193
- ALL_ACTIONS.forEach((_a) => __awaiter(void 0, [_a], void 0, function* ({ type, label, clickedLabel }) {
193
+ for (const { type, label, clickedLabel } of ALL_ACTIONS) {
194
194
  render(_jsx(ResponseActions, { actions: { [type]: { onClick: jest.fn() } } }));
195
195
  expect(screen.getByRole('button', { name: label })).toBeTruthy();
196
196
  yield userEvent.click(screen.getByRole('button', { name: label }));
197
197
  expect(screen.getByRole('button', { name: clickedLabel })).toBeTruthy();
198
- }));
198
+ }
199
199
  }));
200
200
  it('should swap clicked and non-clicked tooltips on click', () => __awaiter(void 0, void 0, void 0, function* () {
201
- ALL_ACTIONS.forEach((_a) => __awaiter(void 0, [_a], void 0, function* ({ type, label, clickedLabel }) {
201
+ for (const { type, label, clickedLabel } of ALL_ACTIONS) {
202
202
  render(_jsx(ResponseActions, { actions: { [type]: { onClick: jest.fn() } } }));
203
203
  expect(screen.getByRole('button', { name: label })).toBeTruthy();
204
204
  yield userEvent.click(screen.getByRole('button', { name: label }));
205
205
  expect(screen.getByRole('tooltip', { name: clickedLabel })).toBeTruthy();
206
- }));
206
+ }
207
207
  }));
208
208
  it('should be able to change aria labels', () => {
209
209
  const actions = [
@@ -255,4 +255,59 @@ describe('ResponseActions', () => {
255
255
  expect(screen.getByTestId(action[key])).toBeTruthy();
256
256
  });
257
257
  });
258
+ // we are testing for the reverse case already above
259
+ it('should not deselect when clicking outside when persistActionSelection is true', () => __awaiter(void 0, void 0, void 0, function* () {
260
+ render(_jsx(Message, { name: "Bot", role: "bot", avatar: "", content: "Test content", actions: {
261
+ positive: {},
262
+ negative: {}
263
+ }, persistActionSelection: true }));
264
+ const goodBtn = screen.getByRole('button', { name: 'Good response' });
265
+ yield userEvent.click(goodBtn);
266
+ expect(screen.getByRole('button', { name: 'Good response recorded' })).toHaveClass('pf-chatbot__button--response-action-clicked');
267
+ yield userEvent.click(screen.getByText('Test content'));
268
+ expect(screen.getByRole('button', { name: 'Good response recorded' })).toHaveClass('pf-chatbot__button--response-action-clicked');
269
+ }));
270
+ it('should switch selection to another button when persistActionSelection is true', () => __awaiter(void 0, void 0, void 0, function* () {
271
+ render(_jsx(Message, { name: "Bot", role: "bot", avatar: "", content: "Test content", actions: {
272
+ positive: {},
273
+ negative: {}
274
+ }, persistActionSelection: true }));
275
+ const goodBtn = screen.getByRole('button', { name: 'Good response' });
276
+ const badBtn = screen.getByRole('button', { name: 'Bad response' });
277
+ yield userEvent.click(goodBtn);
278
+ expect(goodBtn).toHaveClass('pf-chatbot__button--response-action-clicked');
279
+ yield userEvent.click(badBtn);
280
+ expect(badBtn).toHaveClass('pf-chatbot__button--response-action-clicked');
281
+ expect(goodBtn).not.toHaveClass('pf-chatbot__button--response-action-clicked');
282
+ }));
283
+ it('should toggle off when clicking the same button when persistActionSelection is true', () => __awaiter(void 0, void 0, void 0, function* () {
284
+ render(_jsx(Message, { name: "Bot", role: "bot", avatar: "", content: "Test content", actions: {
285
+ positive: {},
286
+ negative: {}
287
+ }, persistActionSelection: true }));
288
+ const goodBtn = screen.getByRole('button', { name: 'Good response' });
289
+ yield userEvent.click(goodBtn);
290
+ expect(goodBtn).toHaveClass('pf-chatbot__button--response-action-clicked');
291
+ yield userEvent.click(goodBtn);
292
+ expect(goodBtn).not.toHaveClass('pf-chatbot__button--response-action-clicked');
293
+ }));
294
+ it('should work with custom actions when persistActionSelection is true', () => __awaiter(void 0, void 0, void 0, function* () {
295
+ const actions = {
296
+ positive: { 'data-testid': 'positive', onClick: jest.fn() },
297
+ negative: { 'data-testid': 'negative', onClick: jest.fn() },
298
+ custom: {
299
+ 'data-testid': 'custom',
300
+ onClick: jest.fn(),
301
+ ariaLabel: 'Custom',
302
+ tooltipContent: 'Custom action',
303
+ icon: _jsx(DownloadIcon, {})
304
+ }
305
+ };
306
+ render(_jsx(ResponseActions, { actions: actions, persistActionSelection: true }));
307
+ const customBtn = screen.getByTestId('custom');
308
+ yield userEvent.click(customBtn);
309
+ expect(customBtn).toHaveClass('pf-chatbot__button--response-action-clicked');
310
+ yield userEvent.click(customBtn);
311
+ expect(customBtn).not.toHaveClass('pf-chatbot__button--response-action-clicked');
312
+ }));
258
313
  });
@@ -0,0 +1,11 @@
1
+ declare const mockEditor: {
2
+ layout: jest.Mock<any, any, any>;
3
+ focus: jest.Mock<any, any, any>;
4
+ dispose: jest.Mock<any, any, any>;
5
+ getModel: jest.Mock<any, any, any>;
6
+ updateOptions: jest.Mock<any, any, any>;
7
+ };
8
+ declare const mockModel: {
9
+ updateOptions: jest.Mock<any, any, any>;
10
+ dispose: jest.Mock<any, any, any>;
11
+ };
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ const mockEditor = {
3
+ layout: jest.fn(),
4
+ focus: jest.fn(),
5
+ dispose: jest.fn(),
6
+ getModel: jest.fn(),
7
+ updateOptions: jest.fn()
8
+ };
9
+ const mockModel = {
10
+ updateOptions: jest.fn(),
11
+ dispose: jest.fn()
12
+ };
13
+ module.exports = {
14
+ editor: {
15
+ create: jest.fn(() => mockEditor),
16
+ getModels: jest.fn(() => [mockModel])
17
+ }
18
+ };
@@ -0,0 +1,2 @@
1
+ declare const rehypeHighlight: () => (tree: any) => any;
2
+ export default rehypeHighlight;
@@ -0,0 +1,2 @@
1
+ const rehypeHighlight = () => (tree) => tree;
2
+ export default rehypeHighlight;
@@ -48,6 +48,8 @@ export { default as MessageBox } from './MessageBox';
48
48
  export * from './MessageBox';
49
49
  export { default as MessageDivider } from './MessageDivider';
50
50
  export * from './MessageDivider';
51
+ export { default as Onboarding } from './Onboarding';
52
+ export * from './Onboarding';
51
53
  export { default as PreviewAttachment } from './PreviewAttachment';
52
54
  export * from './PreviewAttachment';
53
55
  export { default as ResponseActions } from './ResponseActions';
package/dist/esm/index.js CHANGED
@@ -49,6 +49,8 @@ export { default as MessageBox } from './MessageBox';
49
49
  export * from './MessageBox';
50
50
  export { default as MessageDivider } from './MessageDivider';
51
51
  export * from './MessageDivider';
52
+ export { default as Onboarding } from './Onboarding';
53
+ export * from './Onboarding';
52
54
  export { default as PreviewAttachment } from './PreviewAttachment';
53
55
  export * from './PreviewAttachment';
54
56
  export { default as ResponseActions } from './ResponseActions';
@@ -1 +1 @@
1
- {"root":["../src/index.ts","../src/AttachMenu/AttachMenu.tsx","../src/AttachMenu/index.ts","../src/AttachmentEdit/AttachmentEdit.test.tsx","../src/AttachmentEdit/AttachmentEdit.tsx","../src/AttachmentEdit/index.ts","../src/Chatbot/Chatbot.test.tsx","../src/Chatbot/Chatbot.tsx","../src/Chatbot/index.ts","../src/ChatbotAlert/ChatbotAlert.test.tsx","../src/ChatbotAlert/ChatbotAlert.tsx","../src/ChatbotAlert/index.ts","../src/ChatbotContent/ChatbotContent.test.tsx","../src/ChatbotContent/ChatbotContent.tsx","../src/ChatbotContent/index.ts","../src/ChatbotConversationHistoryNav/ChatbotConversationHistoryDropdown.test.tsx","../src/ChatbotConversationHistoryNav/ChatbotConversationHistoryDropdown.tsx","../src/ChatbotConversationHistoryNav/ChatbotConversationHistoryNav.test.tsx","../src/ChatbotConversationHistoryNav/ChatbotConversationHistoryNav.tsx","../src/ChatbotConversationHistoryNav/EmptyState.tsx","../src/ChatbotConversationHistoryNav/LoadingState.tsx","../src/ChatbotConversationHistoryNav/index.ts","../src/ChatbotFooter/ChatbotFooter.test.tsx","../src/ChatbotFooter/ChatbotFooter.tsx","../src/ChatbotFooter/ChatbotFooternote.test.tsx","../src/ChatbotFooter/ChatbotFootnote.tsx","../src/ChatbotFooter/index.ts","../src/ChatbotHeader/ChatbotHeader.test.tsx","../src/ChatbotHeader/ChatbotHeader.tsx","../src/ChatbotHeader/ChatbotHeaderActions.test.tsx","../src/ChatbotHeader/ChatbotHeaderActions.tsx","../src/ChatbotHeader/ChatbotHeaderCloseButton.test.tsx","../src/ChatbotHeader/ChatbotHeaderCloseButton.tsx","../src/ChatbotHeader/ChatbotHeaderMain.test.tsx","../src/ChatbotHeader/ChatbotHeaderMain.tsx","../src/ChatbotHeader/ChatbotHeaderMenu.test.tsx","../src/ChatbotHeader/ChatbotHeaderMenu.tsx","../src/ChatbotHeader/ChatbotHeaderNewChatButton.test.tsx","../src/ChatbotHeader/ChatbotHeaderNewChatButton.tsx","../src/ChatbotHeader/ChatbotHeaderOptionsDropdown.test.tsx","../src/ChatbotHeader/ChatbotHeaderOptionsDropdown.tsx","../src/ChatbotHeader/ChatbotHeaderSelectorDropdown.test.tsx","../src/ChatbotHeader/ChatbotHeaderSelectorDropdown.tsx","../src/ChatbotHeader/ChatbotHeaderTitle.test.tsx","../src/ChatbotHeader/ChatbotHeaderTitle.tsx","../src/ChatbotHeader/index.ts","../src/ChatbotModal/ChatbotModal.test.tsx","../src/ChatbotModal/ChatbotModal.tsx","../src/ChatbotModal/index.ts","../src/ChatbotPopover/ChatbotPopover.tsx","../src/ChatbotPopover/index.ts","../src/ChatbotToggle/ChatbotToggle.test.tsx","../src/ChatbotToggle/ChatbotToggle.tsx","../src/ChatbotToggle/index.ts","../src/ChatbotWelcomePrompt/ChatbotWelcomePrompt.test.tsx","../src/ChatbotWelcomePrompt/ChatbotWelcomePrompt.tsx","../src/ChatbotWelcomePrompt/index.ts","../src/CodeModal/CodeModal.test.tsx","../src/CodeModal/CodeModal.tsx","../src/CodeModal/index.ts","../src/Compare/Compare.test.tsx","../src/Compare/Compare.tsx","../src/Compare/index.ts","../src/DeepThinking/DeepThinking.test.tsx","../src/DeepThinking/DeepThinking.tsx","../src/DeepThinking/index.ts","../src/FileDetails/FileDetails.test.tsx","../src/FileDetails/FileDetails.tsx","../src/FileDetails/index.ts","../src/FileDetailsLabel/FileDetailsLabel.test.tsx","../src/FileDetailsLabel/FileDetailsLabel.tsx","../src/FileDetailsLabel/index.ts","../src/FileDropZone/FileDropZone.test.tsx","../src/FileDropZone/FileDropZone.tsx","../src/FileDropZone/index.ts","../src/FilePreview/FilePreview.test.tsx","../src/FilePreview/FilePreview.tsx","../src/FilePreview/index.ts","../src/ImagePreview/ImagePreview.test.tsx","../src/ImagePreview/ImagePreview.tsx","../src/ImagePreview/index.ts","../src/LoadingMessage/LoadingMessage.test.tsx","../src/LoadingMessage/LoadingMessage.tsx","../src/LoadingMessage/index.ts","../src/Message/Message.test.tsx","../src/Message/Message.tsx","../src/Message/MessageInput.tsx","../src/Message/MessageLoading.tsx","../src/Message/index.ts","../src/Message/CodeBlockMessage/CodeBlockMessage.tsx","../src/Message/ErrorMessage/ErrorMessage.tsx","../src/Message/ImageMessage/ImageMessage.tsx","../src/Message/LinkMessage/LinkMessage.tsx","../src/Message/ListMessage/ListItemMessage.tsx","../src/Message/ListMessage/OrderedListMessage.tsx","../src/Message/ListMessage/UnorderedListMessage.tsx","../src/Message/Plugins/index.ts","../src/Message/Plugins/rehypeCodeBlockToggle.ts","../src/Message/Plugins/rehypeMoveImagesOutOfParagraphs.ts","../src/Message/QuickResponse/QuickResponse.tsx","../src/Message/QuickStarts/FallbackImg.tsx","../src/Message/QuickStarts/QuickStartTile.tsx","../src/Message/QuickStarts/QuickStartTileDescription.test.tsx","../src/Message/QuickStarts/QuickStartTileDescription.tsx","../src/Message/QuickStarts/QuickStartTileHeader.tsx","../src/Message/QuickStarts/monitor-sampleapp-quickstart-with-image.ts","../src/Message/QuickStarts/monitor-sampleapp-quickstart.ts","../src/Message/QuickStarts/types.ts","../src/Message/SuperscriptMessage/SuperscriptMessage.tsx","../src/Message/TableMessage/TableMessage.tsx","../src/Message/TableMessage/TbodyMessage.tsx","../src/Message/TableMessage/TdMessage.tsx","../src/Message/TableMessage/ThMessage.tsx","../src/Message/TableMessage/TheadMessage.tsx","../src/Message/TableMessage/TrMessage.tsx","../src/Message/TextMessage/TextMessage.tsx","../src/Message/UserFeedback/CloseButton.tsx","../src/Message/UserFeedback/UserFeedback.test.tsx","../src/Message/UserFeedback/UserFeedback.tsx","../src/Message/UserFeedback/UserFeedbackComplete.test.tsx","../src/Message/UserFeedback/UserFeedbackComplete.tsx","../src/MessageBar/AttachButton.test.tsx","../src/MessageBar/AttachButton.tsx","../src/MessageBar/MessageBar.test.tsx","../src/MessageBar/MessageBar.tsx","../src/MessageBar/MicrophoneButton.tsx","../src/MessageBar/SendButton.test.tsx","../src/MessageBar/SendButton.tsx","../src/MessageBar/StopButton.test.tsx","../src/MessageBar/StopButton.tsx","../src/MessageBar/index.ts","../src/MessageBox/JumpButton.test.tsx","../src/MessageBox/JumpButton.tsx","../src/MessageBox/MessageBox.test.tsx","../src/MessageBox/MessageBox.tsx","../src/MessageBox/index.ts","../src/MessageDivider/MessageDivider.test.tsx","../src/MessageDivider/MessageDivider.tsx","../src/MessageDivider/index.ts","../src/PreviewAttachment/PreviewAttachment.test.tsx","../src/PreviewAttachment/PreviewAttachment.tsx","../src/PreviewAttachment/index.ts","../src/ResponseActions/ResponseActionButton.test.tsx","../src/ResponseActions/ResponseActionButton.tsx","../src/ResponseActions/ResponseActions.test.tsx","../src/ResponseActions/ResponseActions.tsx","../src/ResponseActions/index.ts","../src/Settings/SettingsForm.test.tsx","../src/Settings/SettingsForm.tsx","../src/Settings/index.ts","../src/SourceDetailsMenuItem/SourceDetailsMenuItem.tsx","../src/SourceDetailsMenuItem/index.ts","../src/SourcesCard/SourcesCard.test.tsx","../src/SourcesCard/SourcesCard.tsx","../src/SourcesCard/index.ts","../src/SourcesCardBase/SourcesCardBase.test.tsx","../src/SourcesCardBase/SourcesCardBase.tsx","../src/SourcesCardBase/index.ts","../src/TermsOfUse/TermsOfUse.test.tsx","../src/TermsOfUse/TermsOfUse.tsx","../src/TermsOfUse/index.ts","../src/ToolCall/ToolCall.test.tsx","../src/ToolCall/ToolCall.tsx","../src/ToolCall/index.ts","../src/ToolResponse/ToolResponse.test.tsx","../src/ToolResponse/ToolResponse.tsx","../src/ToolResponse/index.ts","../src/__mocks__/rehype-external-links.ts","../src/__mocks__/rehype-sanitize.ts","../src/__mocks__/rehype-unwrap-images.tsx","../src/tracking/console_tracking_provider.ts","../src/tracking/index.ts","../src/tracking/posthog_tracking_provider.ts","../src/tracking/segment_tracking_provider.ts","../src/tracking/trackingProviderProxy.ts","../src/tracking/tracking_api.ts","../src/tracking/tracking_registry.ts","../src/tracking/tracking_spi.ts","../src/tracking/umami_tracking_provider.ts"],"version":"5.6.3"}
1
+ {"root":["../src/index.ts","../src/AttachMenu/AttachMenu.tsx","../src/AttachMenu/index.ts","../src/AttachmentEdit/AttachmentEdit.test.tsx","../src/AttachmentEdit/AttachmentEdit.tsx","../src/AttachmentEdit/index.ts","../src/Chatbot/Chatbot.test.tsx","../src/Chatbot/Chatbot.tsx","../src/Chatbot/index.ts","../src/ChatbotAlert/ChatbotAlert.test.tsx","../src/ChatbotAlert/ChatbotAlert.tsx","../src/ChatbotAlert/index.ts","../src/ChatbotContent/ChatbotContent.test.tsx","../src/ChatbotContent/ChatbotContent.tsx","../src/ChatbotContent/index.ts","../src/ChatbotConversationHistoryNav/ChatbotConversationHistoryDropdown.test.tsx","../src/ChatbotConversationHistoryNav/ChatbotConversationHistoryDropdown.tsx","../src/ChatbotConversationHistoryNav/ChatbotConversationHistoryNav.test.tsx","../src/ChatbotConversationHistoryNav/ChatbotConversationHistoryNav.tsx","../src/ChatbotConversationHistoryNav/EmptyState.tsx","../src/ChatbotConversationHistoryNav/LoadingState.tsx","../src/ChatbotConversationHistoryNav/index.ts","../src/ChatbotFooter/ChatbotFooter.test.tsx","../src/ChatbotFooter/ChatbotFooter.tsx","../src/ChatbotFooter/ChatbotFooternote.test.tsx","../src/ChatbotFooter/ChatbotFootnote.tsx","../src/ChatbotFooter/index.ts","../src/ChatbotHeader/ChatbotHeader.test.tsx","../src/ChatbotHeader/ChatbotHeader.tsx","../src/ChatbotHeader/ChatbotHeaderActions.test.tsx","../src/ChatbotHeader/ChatbotHeaderActions.tsx","../src/ChatbotHeader/ChatbotHeaderCloseButton.test.tsx","../src/ChatbotHeader/ChatbotHeaderCloseButton.tsx","../src/ChatbotHeader/ChatbotHeaderMain.test.tsx","../src/ChatbotHeader/ChatbotHeaderMain.tsx","../src/ChatbotHeader/ChatbotHeaderMenu.test.tsx","../src/ChatbotHeader/ChatbotHeaderMenu.tsx","../src/ChatbotHeader/ChatbotHeaderNewChatButton.test.tsx","../src/ChatbotHeader/ChatbotHeaderNewChatButton.tsx","../src/ChatbotHeader/ChatbotHeaderOptionsDropdown.test.tsx","../src/ChatbotHeader/ChatbotHeaderOptionsDropdown.tsx","../src/ChatbotHeader/ChatbotHeaderSelectorDropdown.test.tsx","../src/ChatbotHeader/ChatbotHeaderSelectorDropdown.tsx","../src/ChatbotHeader/ChatbotHeaderTitle.test.tsx","../src/ChatbotHeader/ChatbotHeaderTitle.tsx","../src/ChatbotHeader/index.ts","../src/ChatbotModal/ChatbotModal.test.tsx","../src/ChatbotModal/ChatbotModal.tsx","../src/ChatbotModal/index.ts","../src/ChatbotPopover/ChatbotPopover.tsx","../src/ChatbotPopover/index.ts","../src/ChatbotToggle/ChatbotToggle.test.tsx","../src/ChatbotToggle/ChatbotToggle.tsx","../src/ChatbotToggle/index.ts","../src/ChatbotWelcomePrompt/ChatbotWelcomePrompt.test.tsx","../src/ChatbotWelcomePrompt/ChatbotWelcomePrompt.tsx","../src/ChatbotWelcomePrompt/index.ts","../src/CodeModal/CodeModal.test.tsx","../src/CodeModal/CodeModal.tsx","../src/CodeModal/index.ts","../src/Compare/Compare.test.tsx","../src/Compare/Compare.tsx","../src/Compare/index.ts","../src/DeepThinking/DeepThinking.test.tsx","../src/DeepThinking/DeepThinking.tsx","../src/DeepThinking/index.ts","../src/FileDetails/FileDetails.test.tsx","../src/FileDetails/FileDetails.tsx","../src/FileDetails/index.ts","../src/FileDetailsLabel/FileDetailsLabel.test.tsx","../src/FileDetailsLabel/FileDetailsLabel.tsx","../src/FileDetailsLabel/index.ts","../src/FileDropZone/FileDropZone.test.tsx","../src/FileDropZone/FileDropZone.tsx","../src/FileDropZone/index.ts","../src/FilePreview/FilePreview.test.tsx","../src/FilePreview/FilePreview.tsx","../src/FilePreview/index.ts","../src/ImagePreview/ImagePreview.test.tsx","../src/ImagePreview/ImagePreview.tsx","../src/ImagePreview/index.ts","../src/LoadingMessage/LoadingMessage.test.tsx","../src/LoadingMessage/LoadingMessage.tsx","../src/LoadingMessage/index.ts","../src/Message/Message.test.tsx","../src/Message/Message.tsx","../src/Message/MessageInput.tsx","../src/Message/MessageLoading.tsx","../src/Message/index.ts","../src/Message/CodeBlockMessage/CodeBlockMessage.tsx","../src/Message/ErrorMessage/ErrorMessage.tsx","../src/Message/ImageMessage/ImageMessage.tsx","../src/Message/LinkMessage/LinkMessage.tsx","../src/Message/ListMessage/ListItemMessage.tsx","../src/Message/ListMessage/OrderedListMessage.tsx","../src/Message/ListMessage/UnorderedListMessage.tsx","../src/Message/Plugins/index.ts","../src/Message/Plugins/rehypeCodeBlockToggle.ts","../src/Message/Plugins/rehypeMoveImagesOutOfParagraphs.ts","../src/Message/QuickResponse/QuickResponse.tsx","../src/Message/QuickStarts/FallbackImg.tsx","../src/Message/QuickStarts/QuickStartTile.tsx","../src/Message/QuickStarts/QuickStartTileDescription.test.tsx","../src/Message/QuickStarts/QuickStartTileDescription.tsx","../src/Message/QuickStarts/QuickStartTileHeader.tsx","../src/Message/QuickStarts/monitor-sampleapp-quickstart-with-image.ts","../src/Message/QuickStarts/monitor-sampleapp-quickstart.ts","../src/Message/QuickStarts/types.ts","../src/Message/SuperscriptMessage/SuperscriptMessage.tsx","../src/Message/TableMessage/TableMessage.tsx","../src/Message/TableMessage/TbodyMessage.tsx","../src/Message/TableMessage/TdMessage.tsx","../src/Message/TableMessage/ThMessage.tsx","../src/Message/TableMessage/TheadMessage.tsx","../src/Message/TableMessage/TrMessage.tsx","../src/Message/TextMessage/TextMessage.tsx","../src/Message/UserFeedback/CloseButton.tsx","../src/Message/UserFeedback/UserFeedback.test.tsx","../src/Message/UserFeedback/UserFeedback.tsx","../src/Message/UserFeedback/UserFeedbackComplete.test.tsx","../src/Message/UserFeedback/UserFeedbackComplete.tsx","../src/MessageBar/AttachButton.test.tsx","../src/MessageBar/AttachButton.tsx","../src/MessageBar/MessageBar.test.tsx","../src/MessageBar/MessageBar.tsx","../src/MessageBar/MicrophoneButton.tsx","../src/MessageBar/SendButton.test.tsx","../src/MessageBar/SendButton.tsx","../src/MessageBar/StopButton.test.tsx","../src/MessageBar/StopButton.tsx","../src/MessageBar/index.ts","../src/MessageBox/JumpButton.test.tsx","../src/MessageBox/JumpButton.tsx","../src/MessageBox/MessageBox.test.tsx","../src/MessageBox/MessageBox.tsx","../src/MessageBox/index.ts","../src/MessageDivider/MessageDivider.test.tsx","../src/MessageDivider/MessageDivider.tsx","../src/MessageDivider/index.ts","../src/Onboarding/Onboarding.test.tsx","../src/Onboarding/Onboarding.tsx","../src/Onboarding/index.ts","../src/PreviewAttachment/PreviewAttachment.test.tsx","../src/PreviewAttachment/PreviewAttachment.tsx","../src/PreviewAttachment/index.ts","../src/ResponseActions/ResponseActionButton.test.tsx","../src/ResponseActions/ResponseActionButton.tsx","../src/ResponseActions/ResponseActions.test.tsx","../src/ResponseActions/ResponseActions.tsx","../src/ResponseActions/index.ts","../src/Settings/SettingsForm.test.tsx","../src/Settings/SettingsForm.tsx","../src/Settings/index.ts","../src/SourceDetailsMenuItem/SourceDetailsMenuItem.tsx","../src/SourceDetailsMenuItem/index.ts","../src/SourcesCard/SourcesCard.test.tsx","../src/SourcesCard/SourcesCard.tsx","../src/SourcesCard/index.ts","../src/SourcesCardBase/SourcesCardBase.test.tsx","../src/SourcesCardBase/SourcesCardBase.tsx","../src/SourcesCardBase/index.ts","../src/TermsOfUse/TermsOfUse.test.tsx","../src/TermsOfUse/TermsOfUse.tsx","../src/TermsOfUse/index.ts","../src/ToolCall/ToolCall.test.tsx","../src/ToolCall/ToolCall.tsx","../src/ToolCall/index.ts","../src/ToolResponse/ToolResponse.test.tsx","../src/ToolResponse/ToolResponse.tsx","../src/ToolResponse/index.ts","../src/__mocks__/monaco-editor.ts","../src/__mocks__/rehype-external-links.ts","../src/__mocks__/rehype-highlight.ts","../src/__mocks__/rehype-sanitize.ts","../src/__mocks__/rehype-unwrap-images.tsx","../src/tracking/console_tracking_provider.ts","../src/tracking/index.ts","../src/tracking/posthog_tracking_provider.ts","../src/tracking/segment_tracking_provider.ts","../src/tracking/trackingProviderProxy.ts","../src/tracking/tracking_api.ts","../src/tracking/tracking_registry.ts","../src/tracking/tracking_spi.ts","../src/tracking/umami_tracking_provider.ts"],"version":"5.6.3"}