@patternfly/chatbot 6.3.0-prerelease.9 → 6.4.0-prerelease.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.
Files changed (595) hide show
  1. package/dist/cjs/AttachMenu/AttachMenu.d.ts +2 -2
  2. package/dist/cjs/AttachMenu/AttachMenu.js +2 -12
  3. package/dist/cjs/AttachmentEdit/AttachmentEdit.d.ts +12 -2
  4. package/dist/cjs/AttachmentEdit/AttachmentEdit.js +3 -6
  5. package/dist/cjs/AttachmentEdit/AttachmentEdit.test.d.ts +1 -1
  6. package/dist/cjs/AttachmentEdit/AttachmentEdit.test.js +33 -8
  7. package/dist/cjs/Chatbot/Chatbot.d.ts +1 -2
  8. package/dist/cjs/Chatbot/Chatbot.js +4 -9
  9. package/dist/cjs/Chatbot/Chatbot.test.js +11 -11
  10. package/dist/cjs/ChatbotAlert/ChatbotAlert.d.ts +2 -2
  11. package/dist/cjs/ChatbotAlert/ChatbotAlert.js +4 -8
  12. package/dist/cjs/ChatbotAlert/ChatbotAlert.test.js +10 -10
  13. package/dist/cjs/ChatbotContent/ChatbotContent.d.ts +3 -3
  14. package/dist/cjs/ChatbotContent/ChatbotContent.js +2 -8
  15. package/dist/cjs/ChatbotContent/ChatbotContent.test.js +5 -5
  16. package/dist/cjs/ChatbotConversationHistoryNav/ChatbotConversationHistoryDropdown.d.ts +2 -2
  17. package/dist/cjs/ChatbotConversationHistoryNav/ChatbotConversationHistoryDropdown.js +7 -11
  18. package/dist/cjs/ChatbotConversationHistoryNav/ChatbotConversationHistoryDropdown.test.js +31 -33
  19. package/dist/cjs/ChatbotConversationHistoryNav/ChatbotConversationHistoryNav.d.ts +7 -3
  20. package/dist/cjs/ChatbotConversationHistoryNav/ChatbotConversationHistoryNav.js +17 -34
  21. package/dist/cjs/ChatbotConversationHistoryNav/ChatbotConversationHistoryNav.test.js +73 -64
  22. package/dist/cjs/ChatbotConversationHistoryNav/EmptyState.d.ts +2 -2
  23. package/dist/cjs/ChatbotConversationHistoryNav/EmptyState.js +2 -9
  24. package/dist/cjs/ChatbotConversationHistoryNav/LoadingState.d.ts +2 -2
  25. package/dist/cjs/ChatbotConversationHistoryNav/LoadingState.js +2 -25
  26. package/dist/cjs/ChatbotFooter/ChatbotFooter.d.ts +3 -3
  27. package/dist/cjs/ChatbotFooter/ChatbotFooter.js +2 -15
  28. package/dist/cjs/ChatbotFooter/ChatbotFooter.test.js +7 -7
  29. package/dist/cjs/ChatbotFooter/ChatbotFooternote.test.js +28 -28
  30. package/dist/cjs/ChatbotFooter/ChatbotFootnote.d.ts +3 -3
  31. package/dist/cjs/ChatbotFooter/ChatbotFootnote.js +10 -23
  32. package/dist/cjs/ChatbotHeader/ChatbotHeader.d.ts +3 -3
  33. package/dist/cjs/ChatbotHeader/ChatbotHeader.js +2 -7
  34. package/dist/cjs/ChatbotHeader/ChatbotHeader.test.js +5 -5
  35. package/dist/cjs/ChatbotHeader/ChatbotHeaderActions.d.ts +2 -2
  36. package/dist/cjs/ChatbotHeader/ChatbotHeaderActions.js +2 -5
  37. package/dist/cjs/ChatbotHeader/ChatbotHeaderActions.test.js +5 -5
  38. package/dist/cjs/ChatbotHeader/ChatbotHeaderCloseButton.d.ts +1 -2
  39. package/dist/cjs/ChatbotHeader/ChatbotHeaderCloseButton.js +5 -10
  40. package/dist/cjs/ChatbotHeader/ChatbotHeaderCloseButton.test.js +7 -10
  41. package/dist/cjs/ChatbotHeader/ChatbotHeaderMain.d.ts +2 -2
  42. package/dist/cjs/ChatbotHeader/ChatbotHeaderMain.js +2 -5
  43. package/dist/cjs/ChatbotHeader/ChatbotHeaderMain.test.js +5 -5
  44. package/dist/cjs/ChatbotHeader/ChatbotHeaderMenu.d.ts +2 -2
  45. package/dist/cjs/ChatbotHeader/ChatbotHeaderMenu.js +5 -7
  46. package/dist/cjs/ChatbotHeader/ChatbotHeaderMenu.test.js +7 -10
  47. package/dist/cjs/ChatbotHeader/ChatbotHeaderOptionsDropdown.d.ts +6 -3
  48. package/dist/cjs/ChatbotHeader/ChatbotHeaderOptionsDropdown.js +8 -9
  49. package/dist/cjs/ChatbotHeader/ChatbotHeaderOptionsDropdown.test.js +19 -21
  50. package/dist/cjs/ChatbotHeader/ChatbotHeaderSelectorDropdown.d.ts +8 -3
  51. package/dist/cjs/ChatbotHeader/ChatbotHeaderSelectorDropdown.js +11 -12
  52. package/dist/cjs/ChatbotHeader/ChatbotHeaderSelectorDropdown.test.js +17 -19
  53. package/dist/cjs/ChatbotHeader/ChatbotHeaderTitle.d.ts +2 -2
  54. package/dist/cjs/ChatbotHeader/ChatbotHeaderTitle.js +2 -5
  55. package/dist/cjs/ChatbotHeader/ChatbotHeaderTitle.test.js +23 -23
  56. package/dist/cjs/ChatbotModal/ChatbotModal.d.ts +2 -2
  57. package/dist/cjs/ChatbotModal/ChatbotModal.js +3 -9
  58. package/dist/cjs/ChatbotModal/ChatbotModal.test.js +4 -16
  59. package/dist/cjs/ChatbotPopover/ChatbotPopover.d.ts +2 -2
  60. package/dist/cjs/ChatbotPopover/ChatbotPopover.js +2 -8
  61. package/dist/cjs/ChatbotToggle/ChatbotToggle.d.ts +1 -2
  62. package/dist/cjs/ChatbotToggle/ChatbotToggle.js +8 -13
  63. package/dist/cjs/ChatbotToggle/ChatbotToggle.test.js +25 -25
  64. package/dist/cjs/ChatbotWelcomePrompt/ChatbotWelcomePrompt.d.ts +2 -2
  65. package/dist/cjs/ChatbotWelcomePrompt/ChatbotWelcomePrompt.js +6 -20
  66. package/dist/cjs/ChatbotWelcomePrompt/ChatbotWelcomePrompt.test.js +16 -16
  67. package/dist/cjs/CodeModal/CodeModal.d.ts +8 -2
  68. package/dist/cjs/CodeModal/CodeModal.js +8 -20
  69. package/dist/cjs/CodeModal/CodeModal.test.js +23 -4
  70. package/dist/cjs/Compare/Compare.d.ts +2 -2
  71. package/dist/cjs/Compare/Compare.js +7 -16
  72. package/dist/cjs/Compare/Compare.test.js +7 -9
  73. package/dist/cjs/FileDetails/FileDetails.d.ts +2 -2
  74. package/dist/cjs/FileDetails/FileDetails.js +2 -15
  75. package/dist/cjs/FileDetails/FileDetails.test.js +10 -10
  76. package/dist/cjs/FileDetailsLabel/FileDetailsLabel.d.ts +2 -2
  77. package/dist/cjs/FileDetailsLabel/FileDetailsLabel.js +2 -5
  78. package/dist/cjs/FileDetailsLabel/FileDetailsLabel.test.js +21 -21
  79. package/dist/cjs/FileDropZone/FileDropZone.d.ts +23 -3
  80. package/dist/cjs/FileDropZone/FileDropZone.js +11 -9
  81. package/dist/cjs/FileDropZone/FileDropZone.test.js +86 -5
  82. package/dist/cjs/LoadingMessage/LoadingMessage.d.ts +2 -2
  83. package/dist/cjs/LoadingMessage/LoadingMessage.js +2 -10
  84. package/dist/cjs/LoadingMessage/LoadingMessage.test.js +6 -6
  85. package/dist/cjs/Message/CodeBlockMessage/CodeBlockMessage.d.ts +20 -3
  86. package/dist/cjs/Message/CodeBlockMessage/CodeBlockMessage.js +30 -21
  87. package/dist/cjs/Message/ErrorMessage/ErrorMessage.d.ts +1 -2
  88. package/dist/cjs/Message/ErrorMessage/ErrorMessage.js +5 -8
  89. package/dist/cjs/Message/ImageMessage/ImageMessage.d.ts +1 -2
  90. package/dist/cjs/Message/ImageMessage/ImageMessage.js +2 -8
  91. package/dist/cjs/Message/LinkMessage/LinkMessage.d.ts +1 -2
  92. package/dist/cjs/Message/LinkMessage/LinkMessage.js +6 -9
  93. package/dist/cjs/Message/ListMessage/ListItemMessage.d.ts +1 -2
  94. package/dist/cjs/Message/ListMessage/ListItemMessage.js +2 -8
  95. package/dist/cjs/Message/ListMessage/OrderedListMessage.d.ts +1 -2
  96. package/dist/cjs/Message/ListMessage/OrderedListMessage.js +2 -9
  97. package/dist/cjs/Message/ListMessage/UnorderedListMessage.d.ts +1 -2
  98. package/dist/cjs/Message/ListMessage/UnorderedListMessage.js +2 -9
  99. package/dist/cjs/Message/Message.d.ts +28 -10
  100. package/dist/cjs/Message/Message.js +50 -72
  101. package/dist/cjs/Message/Message.test.js +138 -82
  102. package/dist/cjs/Message/MessageInput.d.ts +4 -2
  103. package/dist/cjs/Message/MessageInput.js +6 -15
  104. package/dist/cjs/Message/MessageLoading.d.ts +1 -2
  105. package/dist/cjs/Message/MessageLoading.js +3 -8
  106. package/dist/cjs/Message/Plugins/index.d.ts +1 -0
  107. package/dist/cjs/Message/Plugins/index.js +5 -0
  108. package/dist/cjs/Message/Plugins/rehypeCodeBlockToggle.d.ts +2 -0
  109. package/dist/cjs/Message/Plugins/rehypeCodeBlockToggle.js +24 -0
  110. package/dist/cjs/Message/Plugins/rehypeMoveImagesOutOfParagraphs.d.ts +2 -0
  111. package/dist/cjs/Message/Plugins/rehypeMoveImagesOutOfParagraphs.js +47 -0
  112. package/dist/cjs/Message/QuickResponse/QuickResponse.d.ts +2 -2
  113. package/dist/cjs/Message/QuickResponse/QuickResponse.js +7 -9
  114. package/dist/cjs/Message/QuickStarts/FallbackImg.d.ts +2 -2
  115. package/dist/cjs/Message/QuickStarts/FallbackImg.js +5 -27
  116. package/dist/cjs/Message/QuickStarts/QuickStartTile.d.ts +2 -2
  117. package/dist/cjs/Message/QuickStarts/QuickStartTile.js +7 -43
  118. package/dist/cjs/Message/QuickStarts/QuickStartTileDescription.d.ts +2 -2
  119. package/dist/cjs/Message/QuickStarts/QuickStartTileDescription.js +9 -38
  120. package/dist/cjs/Message/QuickStarts/QuickStartTileDescription.test.js +16 -16
  121. package/dist/cjs/Message/QuickStarts/QuickStartTileHeader.d.ts +2 -2
  122. package/dist/cjs/Message/QuickStarts/QuickStartTileHeader.js +2 -26
  123. package/dist/cjs/Message/QuickStarts/types.d.ts +4 -3
  124. package/dist/cjs/Message/TableMessage/TableMessage.d.ts +1 -2
  125. package/dist/cjs/Message/TableMessage/TableMessage.js +8 -10
  126. package/dist/cjs/Message/TableMessage/TbodyMessage.d.ts +2 -3
  127. package/dist/cjs/Message/TableMessage/TbodyMessage.js +7 -9
  128. package/dist/cjs/Message/TableMessage/TdMessage.d.ts +1 -2
  129. package/dist/cjs/Message/TableMessage/TdMessage.js +2 -8
  130. package/dist/cjs/Message/TableMessage/ThMessage.d.ts +1 -2
  131. package/dist/cjs/Message/TableMessage/ThMessage.js +2 -8
  132. package/dist/cjs/Message/TableMessage/TheadMessage.d.ts +1 -2
  133. package/dist/cjs/Message/TableMessage/TheadMessage.js +2 -8
  134. package/dist/cjs/Message/TableMessage/TrMessage.d.ts +2 -3
  135. package/dist/cjs/Message/TableMessage/TrMessage.js +8 -10
  136. package/dist/cjs/Message/TextMessage/TextMessage.d.ts +1 -2
  137. package/dist/cjs/Message/TextMessage/TextMessage.js +2 -9
  138. package/dist/cjs/Message/UserFeedback/CloseButton.d.ts +2 -2
  139. package/dist/cjs/Message/UserFeedback/CloseButton.js +2 -8
  140. package/dist/cjs/Message/UserFeedback/UserFeedback.d.ts +2 -2
  141. package/dist/cjs/Message/UserFeedback/UserFeedback.js +12 -23
  142. package/dist/cjs/Message/UserFeedback/UserFeedback.test.js +53 -53
  143. package/dist/cjs/Message/UserFeedback/UserFeedbackComplete.d.ts +2 -2
  144. package/dist/cjs/Message/UserFeedback/UserFeedbackComplete.js +20 -44
  145. package/dist/cjs/Message/UserFeedback/UserFeedbackComplete.test.js +81 -91
  146. package/dist/cjs/Message/index.d.ts +1 -0
  147. package/dist/cjs/Message/index.js +3 -1
  148. package/dist/cjs/MessageBar/AttachButton.d.ts +26 -3
  149. package/dist/cjs/MessageBar/AttachButton.js +10 -20
  150. package/dist/cjs/MessageBar/AttachButton.test.js +102 -24
  151. package/dist/cjs/MessageBar/MessageBar.d.ts +32 -4
  152. package/dist/cjs/MessageBar/MessageBar.js +30 -32
  153. package/dist/cjs/MessageBar/MessageBar.test.js +122 -108
  154. package/dist/cjs/MessageBar/MicrophoneButton.d.ts +2 -2
  155. package/dist/cjs/MessageBar/MicrophoneButton.js +7 -14
  156. package/dist/cjs/MessageBar/SendButton.d.ts +3 -2
  157. package/dist/cjs/MessageBar/SendButton.js +3 -11
  158. package/dist/cjs/MessageBar/SendButton.test.js +15 -15
  159. package/dist/cjs/MessageBar/StopButton.d.ts +3 -2
  160. package/dist/cjs/MessageBar/StopButton.js +3 -12
  161. package/dist/cjs/MessageBar/StopButton.test.js +15 -15
  162. package/dist/cjs/MessageBox/JumpButton.d.ts +2 -2
  163. package/dist/cjs/MessageBox/JumpButton.js +2 -10
  164. package/dist/cjs/MessageBox/JumpButton.test.js +10 -10
  165. package/dist/cjs/MessageBox/MessageBox.d.ts +21 -5
  166. package/dist/cjs/MessageBox/MessageBox.js +170 -45
  167. package/dist/cjs/MessageBox/MessageBox.test.js +219 -6
  168. package/dist/cjs/MessageDivider/MessageDivider.d.ts +9 -0
  169. package/dist/cjs/MessageDivider/MessageDivider.js +23 -0
  170. package/dist/cjs/MessageDivider/MessageDivider.test.d.ts +1 -0
  171. package/dist/cjs/MessageDivider/MessageDivider.test.js +29 -0
  172. package/dist/cjs/MessageDivider/index.d.ts +2 -0
  173. package/dist/cjs/MessageDivider/index.js +23 -0
  174. package/dist/cjs/PreviewAttachment/PreviewAttachment.d.ts +12 -2
  175. package/dist/cjs/PreviewAttachment/PreviewAttachment.js +3 -6
  176. package/dist/cjs/PreviewAttachment/PreviewAttachment.test.d.ts +1 -1
  177. package/dist/cjs/PreviewAttachment/PreviewAttachment.test.js +34 -12
  178. package/dist/cjs/ResponseActions/ResponseActionButton.d.ts +5 -5
  179. package/dist/cjs/ResponseActions/ResponseActionButton.js +5 -8
  180. package/dist/cjs/ResponseActions/ResponseActionButton.test.js +19 -19
  181. package/dist/cjs/ResponseActions/ResponseActions.d.ts +8 -3
  182. package/dist/cjs/ResponseActions/ResponseActions.js +39 -18
  183. package/dist/cjs/ResponseActions/ResponseActions.test.js +125 -41
  184. package/dist/cjs/Settings/SettingsForm.d.ts +2 -2
  185. package/dist/cjs/Settings/SettingsForm.js +2 -8
  186. package/dist/cjs/Settings/SettingsForm.test.js +9 -12
  187. package/dist/cjs/SourceDetailsMenuItem/SourceDetailsMenuItem.d.ts +2 -2
  188. package/dist/cjs/SourceDetailsMenuItem/SourceDetailsMenuItem.js +2 -11
  189. package/dist/cjs/SourcesCard/SourcesCard.d.ts +12 -3
  190. package/dist/cjs/SourcesCard/SourcesCard.js +17 -42
  191. package/dist/cjs/SourcesCard/SourcesCard.test.js +70 -60
  192. package/dist/cjs/TermsOfUse/TermsOfUse.d.ts +3 -3
  193. package/dist/cjs/TermsOfUse/TermsOfUse.js +4 -16
  194. package/dist/cjs/TermsOfUse/TermsOfUse.test.js +31 -33
  195. package/dist/cjs/index.d.ts +2 -0
  196. package/dist/cjs/index.js +4 -1
  197. package/dist/css/main.css +71 -62
  198. package/dist/css/main.css.map +1 -1
  199. package/dist/dynamic/MessageDivider/package.json +1 -0
  200. package/dist/esm/AttachMenu/AttachMenu.d.ts +2 -2
  201. package/dist/esm/AttachMenu/AttachMenu.js +2 -9
  202. package/dist/esm/AttachmentEdit/AttachmentEdit.d.ts +12 -2
  203. package/dist/esm/AttachmentEdit/AttachmentEdit.js +3 -6
  204. package/dist/esm/AttachmentEdit/AttachmentEdit.test.d.ts +1 -1
  205. package/dist/esm/AttachmentEdit/AttachmentEdit.test.js +30 -5
  206. package/dist/esm/Chatbot/Chatbot.d.ts +1 -2
  207. package/dist/esm/Chatbot/Chatbot.js +4 -6
  208. package/dist/esm/Chatbot/Chatbot.test.js +6 -6
  209. package/dist/esm/ChatbotAlert/ChatbotAlert.d.ts +2 -2
  210. package/dist/esm/ChatbotAlert/ChatbotAlert.js +4 -5
  211. package/dist/esm/ChatbotAlert/ChatbotAlert.test.js +4 -4
  212. package/dist/esm/ChatbotContent/ChatbotContent.d.ts +3 -3
  213. package/dist/esm/ChatbotContent/ChatbotContent.js +2 -5
  214. package/dist/esm/ChatbotContent/ChatbotContent.test.js +3 -3
  215. package/dist/esm/ChatbotConversationHistoryNav/ChatbotConversationHistoryDropdown.d.ts +2 -2
  216. package/dist/esm/ChatbotConversationHistoryNav/ChatbotConversationHistoryDropdown.js +7 -11
  217. package/dist/esm/ChatbotConversationHistoryNav/ChatbotConversationHistoryDropdown.test.js +8 -10
  218. package/dist/esm/ChatbotConversationHistoryNav/ChatbotConversationHistoryNav.d.ts +7 -3
  219. package/dist/esm/ChatbotConversationHistoryNav/ChatbotConversationHistoryNav.js +19 -36
  220. package/dist/esm/ChatbotConversationHistoryNav/ChatbotConversationHistoryNav.test.js +43 -34
  221. package/dist/esm/ChatbotConversationHistoryNav/EmptyState.d.ts +2 -2
  222. package/dist/esm/ChatbotConversationHistoryNav/EmptyState.js +2 -6
  223. package/dist/esm/ChatbotConversationHistoryNav/LoadingState.d.ts +2 -2
  224. package/dist/esm/ChatbotConversationHistoryNav/LoadingState.js +2 -22
  225. package/dist/esm/ChatbotFooter/ChatbotFooter.d.ts +3 -3
  226. package/dist/esm/ChatbotFooter/ChatbotFooter.js +2 -12
  227. package/dist/esm/ChatbotFooter/ChatbotFooter.test.js +4 -4
  228. package/dist/esm/ChatbotFooter/ChatbotFooternote.test.js +5 -5
  229. package/dist/esm/ChatbotFooter/ChatbotFootnote.d.ts +3 -3
  230. package/dist/esm/ChatbotFooter/ChatbotFootnote.js +10 -23
  231. package/dist/esm/ChatbotHeader/ChatbotHeader.d.ts +3 -3
  232. package/dist/esm/ChatbotHeader/ChatbotHeader.js +2 -4
  233. package/dist/esm/ChatbotHeader/ChatbotHeader.test.js +3 -3
  234. package/dist/esm/ChatbotHeader/ChatbotHeaderActions.d.ts +2 -2
  235. package/dist/esm/ChatbotHeader/ChatbotHeaderActions.js +2 -2
  236. package/dist/esm/ChatbotHeader/ChatbotHeaderActions.test.js +3 -3
  237. package/dist/esm/ChatbotHeader/ChatbotHeaderCloseButton.d.ts +1 -2
  238. package/dist/esm/ChatbotHeader/ChatbotHeaderCloseButton.js +5 -7
  239. package/dist/esm/ChatbotHeader/ChatbotHeaderCloseButton.test.js +4 -4
  240. package/dist/esm/ChatbotHeader/ChatbotHeaderMain.d.ts +2 -2
  241. package/dist/esm/ChatbotHeader/ChatbotHeaderMain.js +2 -2
  242. package/dist/esm/ChatbotHeader/ChatbotHeaderMain.test.js +3 -3
  243. package/dist/esm/ChatbotHeader/ChatbotHeaderMenu.d.ts +2 -2
  244. package/dist/esm/ChatbotHeader/ChatbotHeaderMenu.js +5 -7
  245. package/dist/esm/ChatbotHeader/ChatbotHeaderMenu.test.js +4 -4
  246. package/dist/esm/ChatbotHeader/ChatbotHeaderOptionsDropdown.d.ts +6 -3
  247. package/dist/esm/ChatbotHeader/ChatbotHeaderOptionsDropdown.js +8 -9
  248. package/dist/esm/ChatbotHeader/ChatbotHeaderOptionsDropdown.test.js +9 -8
  249. package/dist/esm/ChatbotHeader/ChatbotHeaderSelectorDropdown.d.ts +8 -3
  250. package/dist/esm/ChatbotHeader/ChatbotHeaderSelectorDropdown.js +11 -9
  251. package/dist/esm/ChatbotHeader/ChatbotHeaderSelectorDropdown.test.js +9 -8
  252. package/dist/esm/ChatbotHeader/ChatbotHeaderTitle.d.ts +2 -2
  253. package/dist/esm/ChatbotHeader/ChatbotHeaderTitle.js +2 -2
  254. package/dist/esm/ChatbotHeader/ChatbotHeaderTitle.test.js +12 -12
  255. package/dist/esm/ChatbotModal/ChatbotModal.d.ts +2 -2
  256. package/dist/esm/ChatbotModal/ChatbotModal.js +3 -6
  257. package/dist/esm/ChatbotModal/ChatbotModal.test.js +2 -14
  258. package/dist/esm/ChatbotPopover/ChatbotPopover.d.ts +2 -2
  259. package/dist/esm/ChatbotPopover/ChatbotPopover.js +2 -5
  260. package/dist/esm/ChatbotToggle/ChatbotToggle.d.ts +1 -2
  261. package/dist/esm/ChatbotToggle/ChatbotToggle.js +8 -13
  262. package/dist/esm/ChatbotToggle/ChatbotToggle.test.js +8 -8
  263. package/dist/esm/ChatbotWelcomePrompt/ChatbotWelcomePrompt.d.ts +2 -2
  264. package/dist/esm/ChatbotWelcomePrompt/ChatbotWelcomePrompt.js +6 -17
  265. package/dist/esm/ChatbotWelcomePrompt/ChatbotWelcomePrompt.test.js +8 -8
  266. package/dist/esm/CodeModal/CodeModal.d.ts +8 -2
  267. package/dist/esm/CodeModal/CodeModal.js +8 -20
  268. package/dist/esm/CodeModal/CodeModal.test.js +22 -3
  269. package/dist/esm/Compare/Compare.d.ts +2 -2
  270. package/dist/esm/Compare/Compare.js +7 -13
  271. package/dist/esm/Compare/Compare.test.js +4 -6
  272. package/dist/esm/FileDetails/FileDetails.d.ts +2 -2
  273. package/dist/esm/FileDetails/FileDetails.js +2 -15
  274. package/dist/esm/FileDetails/FileDetails.test.js +4 -4
  275. package/dist/esm/FileDetailsLabel/FileDetailsLabel.d.ts +2 -2
  276. package/dist/esm/FileDetailsLabel/FileDetailsLabel.js +2 -5
  277. package/dist/esm/FileDetailsLabel/FileDetailsLabel.test.js +9 -9
  278. package/dist/esm/FileDropZone/FileDropZone.d.ts +23 -3
  279. package/dist/esm/FileDropZone/FileDropZone.js +11 -6
  280. package/dist/esm/FileDropZone/FileDropZone.test.js +84 -3
  281. package/dist/esm/LoadingMessage/LoadingMessage.d.ts +2 -2
  282. package/dist/esm/LoadingMessage/LoadingMessage.js +2 -10
  283. package/dist/esm/LoadingMessage/LoadingMessage.test.js +3 -3
  284. package/dist/esm/Message/CodeBlockMessage/CodeBlockMessage.d.ts +20 -3
  285. package/dist/esm/Message/CodeBlockMessage/CodeBlockMessage.js +31 -19
  286. package/dist/esm/Message/ErrorMessage/ErrorMessage.d.ts +1 -2
  287. package/dist/esm/Message/ErrorMessage/ErrorMessage.js +5 -5
  288. package/dist/esm/Message/ImageMessage/ImageMessage.d.ts +1 -2
  289. package/dist/esm/Message/ImageMessage/ImageMessage.js +2 -5
  290. package/dist/esm/Message/LinkMessage/LinkMessage.d.ts +1 -2
  291. package/dist/esm/Message/LinkMessage/LinkMessage.js +6 -6
  292. package/dist/esm/Message/ListMessage/ListItemMessage.d.ts +1 -2
  293. package/dist/esm/Message/ListMessage/ListItemMessage.js +2 -5
  294. package/dist/esm/Message/ListMessage/OrderedListMessage.d.ts +1 -2
  295. package/dist/esm/Message/ListMessage/OrderedListMessage.js +2 -6
  296. package/dist/esm/Message/ListMessage/UnorderedListMessage.d.ts +1 -2
  297. package/dist/esm/Message/ListMessage/UnorderedListMessage.js +2 -6
  298. package/dist/esm/Message/Message.d.ts +28 -10
  299. package/dist/esm/Message/Message.js +50 -72
  300. package/dist/esm/Message/Message.test.js +138 -82
  301. package/dist/esm/Message/MessageInput.d.ts +4 -2
  302. package/dist/esm/Message/MessageInput.js +6 -12
  303. package/dist/esm/Message/MessageLoading.d.ts +1 -2
  304. package/dist/esm/Message/MessageLoading.js +2 -4
  305. package/dist/esm/Message/Plugins/index.d.ts +1 -0
  306. package/dist/esm/Message/Plugins/index.js +1 -0
  307. package/dist/esm/Message/Plugins/rehypeCodeBlockToggle.d.ts +2 -0
  308. package/dist/esm/Message/Plugins/rehypeCodeBlockToggle.js +20 -0
  309. package/dist/esm/Message/Plugins/rehypeMoveImagesOutOfParagraphs.d.ts +2 -0
  310. package/dist/esm/Message/Plugins/rehypeMoveImagesOutOfParagraphs.js +43 -0
  311. package/dist/esm/Message/QuickResponse/QuickResponse.d.ts +2 -2
  312. package/dist/esm/Message/QuickResponse/QuickResponse.js +7 -6
  313. package/dist/esm/Message/QuickStarts/FallbackImg.d.ts +2 -2
  314. package/dist/esm/Message/QuickStarts/FallbackImg.js +5 -4
  315. package/dist/esm/Message/QuickStarts/QuickStartTile.d.ts +2 -2
  316. package/dist/esm/Message/QuickStarts/QuickStartTile.js +7 -20
  317. package/dist/esm/Message/QuickStarts/QuickStartTileDescription.d.ts +2 -2
  318. package/dist/esm/Message/QuickStarts/QuickStartTileDescription.js +9 -15
  319. package/dist/esm/Message/QuickStarts/QuickStartTileDescription.test.js +5 -5
  320. package/dist/esm/Message/QuickStarts/QuickStartTileHeader.d.ts +2 -2
  321. package/dist/esm/Message/QuickStarts/QuickStartTileHeader.js +2 -3
  322. package/dist/esm/Message/QuickStarts/types.d.ts +4 -3
  323. package/dist/esm/Message/TableMessage/TableMessage.d.ts +1 -2
  324. package/dist/esm/Message/TableMessage/TableMessage.js +8 -7
  325. package/dist/esm/Message/TableMessage/TbodyMessage.d.ts +2 -3
  326. package/dist/esm/Message/TableMessage/TbodyMessage.js +7 -6
  327. package/dist/esm/Message/TableMessage/TdMessage.d.ts +1 -2
  328. package/dist/esm/Message/TableMessage/TdMessage.js +2 -5
  329. package/dist/esm/Message/TableMessage/ThMessage.d.ts +1 -2
  330. package/dist/esm/Message/TableMessage/ThMessage.js +2 -5
  331. package/dist/esm/Message/TableMessage/TheadMessage.d.ts +1 -2
  332. package/dist/esm/Message/TableMessage/TheadMessage.js +2 -5
  333. package/dist/esm/Message/TableMessage/TrMessage.d.ts +2 -3
  334. package/dist/esm/Message/TableMessage/TrMessage.js +8 -7
  335. package/dist/esm/Message/TextMessage/TextMessage.d.ts +1 -2
  336. package/dist/esm/Message/TextMessage/TextMessage.js +2 -6
  337. package/dist/esm/Message/UserFeedback/CloseButton.d.ts +2 -2
  338. package/dist/esm/Message/UserFeedback/CloseButton.js +2 -5
  339. package/dist/esm/Message/UserFeedback/UserFeedback.d.ts +2 -2
  340. package/dist/esm/Message/UserFeedback/UserFeedback.js +12 -23
  341. package/dist/esm/Message/UserFeedback/UserFeedback.test.js +21 -21
  342. package/dist/esm/Message/UserFeedback/UserFeedbackComplete.d.ts +2 -2
  343. package/dist/esm/Message/UserFeedback/UserFeedbackComplete.js +20 -44
  344. package/dist/esm/Message/UserFeedback/UserFeedbackComplete.test.js +26 -36
  345. package/dist/esm/Message/index.d.ts +1 -0
  346. package/dist/esm/Message/index.js +1 -0
  347. package/dist/esm/MessageBar/AttachButton.d.ts +26 -3
  348. package/dist/esm/MessageBar/AttachButton.js +10 -17
  349. package/dist/esm/MessageBar/AttachButton.test.js +95 -17
  350. package/dist/esm/MessageBar/MessageBar.d.ts +32 -4
  351. package/dist/esm/MessageBar/MessageBar.js +28 -30
  352. package/dist/esm/MessageBar/MessageBar.test.js +87 -73
  353. package/dist/esm/MessageBar/MicrophoneButton.d.ts +2 -2
  354. package/dist/esm/MessageBar/MicrophoneButton.js +7 -11
  355. package/dist/esm/MessageBar/SendButton.d.ts +3 -2
  356. package/dist/esm/MessageBar/SendButton.js +3 -8
  357. package/dist/esm/MessageBar/SendButton.test.js +9 -9
  358. package/dist/esm/MessageBar/StopButton.d.ts +3 -2
  359. package/dist/esm/MessageBar/StopButton.js +3 -9
  360. package/dist/esm/MessageBar/StopButton.test.js +9 -9
  361. package/dist/esm/MessageBox/JumpButton.d.ts +2 -2
  362. package/dist/esm/MessageBox/JumpButton.js +2 -7
  363. package/dist/esm/MessageBox/JumpButton.test.js +9 -9
  364. package/dist/esm/MessageBox/MessageBox.d.ts +21 -5
  365. package/dist/esm/MessageBox/MessageBox.js +170 -45
  366. package/dist/esm/MessageBox/MessageBox.test.js +220 -7
  367. package/dist/esm/MessageDivider/MessageDivider.d.ts +9 -0
  368. package/dist/esm/MessageDivider/MessageDivider.js +21 -0
  369. package/dist/esm/MessageDivider/MessageDivider.test.d.ts +1 -0
  370. package/dist/esm/MessageDivider/MessageDivider.test.js +24 -0
  371. package/dist/esm/MessageDivider/index.d.ts +2 -0
  372. package/dist/esm/MessageDivider/index.js +2 -0
  373. package/dist/esm/PreviewAttachment/PreviewAttachment.d.ts +12 -2
  374. package/dist/esm/PreviewAttachment/PreviewAttachment.js +3 -6
  375. package/dist/esm/PreviewAttachment/PreviewAttachment.test.d.ts +1 -1
  376. package/dist/esm/PreviewAttachment/PreviewAttachment.test.js +30 -5
  377. package/dist/esm/ResponseActions/ResponseActionButton.d.ts +5 -5
  378. package/dist/esm/ResponseActions/ResponseActionButton.js +5 -5
  379. package/dist/esm/ResponseActions/ResponseActionButton.test.js +7 -7
  380. package/dist/esm/ResponseActions/ResponseActions.d.ts +8 -3
  381. package/dist/esm/ResponseActions/ResponseActions.js +40 -19
  382. package/dist/esm/ResponseActions/ResponseActions.test.js +100 -16
  383. package/dist/esm/Settings/SettingsForm.d.ts +2 -2
  384. package/dist/esm/Settings/SettingsForm.js +2 -5
  385. package/dist/esm/Settings/SettingsForm.test.js +6 -6
  386. package/dist/esm/SourceDetailsMenuItem/SourceDetailsMenuItem.d.ts +2 -2
  387. package/dist/esm/SourceDetailsMenuItem/SourceDetailsMenuItem.js +2 -8
  388. package/dist/esm/SourcesCard/SourcesCard.d.ts +12 -3
  389. package/dist/esm/SourcesCard/SourcesCard.js +17 -39
  390. package/dist/esm/SourcesCard/SourcesCard.test.js +29 -19
  391. package/dist/esm/TermsOfUse/TermsOfUse.d.ts +3 -3
  392. package/dist/esm/TermsOfUse/TermsOfUse.js +4 -16
  393. package/dist/esm/TermsOfUse/TermsOfUse.test.js +10 -12
  394. package/dist/esm/index.d.ts +2 -0
  395. package/dist/esm/index.js +2 -0
  396. package/dist/tsconfig.tsbuildinfo +1 -1
  397. package/package.json +9 -8
  398. package/patternfly-docs/content/extensions/chatbot/design-guidelines.md +10 -0
  399. package/patternfly-docs/content/extensions/chatbot/examples/Customizing Messages/Customizing Messages.md +51 -0
  400. package/patternfly-docs/content/extensions/chatbot/examples/Messages/AttachMenu.tsx +9 -9
  401. package/patternfly-docs/content/extensions/chatbot/examples/Messages/AttachmentEdit.tsx +5 -5
  402. package/patternfly-docs/content/extensions/chatbot/examples/Messages/AttachmentError.tsx +2 -2
  403. package/patternfly-docs/content/extensions/chatbot/examples/Messages/BotMessage.tsx +24 -20
  404. package/patternfly-docs/content/extensions/chatbot/examples/Messages/FileDetails.tsx +2 -2
  405. package/patternfly-docs/content/extensions/chatbot/examples/Messages/FileDetailsLabel.tsx +9 -9
  406. package/patternfly-docs/content/extensions/chatbot/examples/Messages/FileDropZone.tsx +4 -4
  407. package/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithAttachment.tsx +7 -7
  408. package/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithClickedResponseActions.tsx +25 -0
  409. package/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithCustomResponseActions.tsx +3 -12
  410. package/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithDividers.tsx +24 -0
  411. package/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithFeedback.tsx +4 -4
  412. package/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithFeedbackTimeout.tsx +3 -3
  413. package/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithQuickResponses.tsx +2 -2
  414. package/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithQuickStart.tsx +2 -2
  415. package/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithResponseActions.tsx +3 -3
  416. package/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithSources.tsx +3 -3
  417. package/patternfly-docs/content/extensions/chatbot/examples/Messages/Messages.md +33 -0
  418. package/patternfly-docs/content/extensions/chatbot/examples/Messages/PreviewAttachment.tsx +5 -5
  419. package/patternfly-docs/content/extensions/chatbot/examples/Messages/UserMessage.tsx +61 -18
  420. package/patternfly-docs/content/extensions/chatbot/examples/Messages/UserMessageWithExtraContent.tsx +4 -4
  421. package/patternfly-docs/content/extensions/chatbot/examples/UI/ChatbotContainer.tsx +59 -36
  422. package/patternfly-docs/content/extensions/chatbot/examples/UI/ChatbotFooter.tsx +2 -2
  423. package/patternfly-docs/content/extensions/chatbot/examples/UI/ChatbotFootnote.tsx +2 -2
  424. package/patternfly-docs/content/extensions/chatbot/examples/UI/ChatbotHeaderBasic.tsx +10 -13
  425. package/patternfly-docs/content/extensions/chatbot/examples/UI/ChatbotHeaderDrawer.tsx +19 -10
  426. package/patternfly-docs/content/extensions/chatbot/examples/UI/ChatbotHeaderDrawerNavigation.tsx +5 -5
  427. package/patternfly-docs/content/extensions/chatbot/examples/UI/ChatbotHeaderDrawerResizable.tsx +5 -5
  428. package/patternfly-docs/content/extensions/chatbot/examples/UI/ChatbotHeaderDrawerWithActions.tsx +6 -6
  429. package/patternfly-docs/content/extensions/chatbot/examples/UI/ChatbotHeaderDrawerWithPin.tsx +196 -0
  430. package/patternfly-docs/content/extensions/chatbot/examples/UI/ChatbotHeaderDrawerWithSelection.tsx +7 -7
  431. package/patternfly-docs/content/extensions/chatbot/examples/UI/ChatbotHeaderTitle.tsx +59 -34
  432. package/patternfly-docs/content/extensions/chatbot/examples/UI/ChatbotMessageBar.tsx +2 -2
  433. package/patternfly-docs/content/extensions/chatbot/examples/UI/ChatbotMessageBarAttach.tsx +9 -9
  434. package/patternfly-docs/content/extensions/chatbot/examples/UI/ChatbotMessageBarDisabled.tsx +3 -3
  435. package/patternfly-docs/content/extensions/chatbot/examples/UI/ChatbotMessageBarLanguage.tsx +2 -2
  436. package/patternfly-docs/content/extensions/chatbot/examples/UI/ChatbotMessageBarStop.tsx +2 -2
  437. package/patternfly-docs/content/extensions/chatbot/examples/UI/ChatbotModal.tsx +74 -37
  438. package/patternfly-docs/content/extensions/chatbot/examples/UI/ChatbotToggleBasic.tsx +3 -3
  439. package/patternfly-docs/content/extensions/chatbot/examples/UI/ChatbotWelcomeInteraction.tsx +8 -8
  440. package/patternfly-docs/content/extensions/chatbot/examples/UI/ChatbotWelcomePrompt.tsx +3 -3
  441. package/patternfly-docs/content/extensions/chatbot/examples/UI/CompactSettings.tsx +16 -23
  442. package/patternfly-docs/content/extensions/chatbot/examples/UI/CustomClosedIcon.tsx +3 -3
  443. package/patternfly-docs/content/extensions/chatbot/examples/UI/Settings.tsx +16 -23
  444. package/patternfly-docs/content/extensions/chatbot/examples/UI/SkipToContent.tsx +5 -5
  445. package/patternfly-docs/content/extensions/chatbot/examples/UI/SquareChatbotToggle.tsx +3 -3
  446. package/patternfly-docs/content/extensions/chatbot/examples/UI/TermsOfUse.tsx +91 -48
  447. package/patternfly-docs/content/extensions/chatbot/examples/UI/TermsOfUseCompact.tsx +82 -39
  448. package/patternfly-docs/content/extensions/chatbot/examples/UI/UI.md +12 -1
  449. package/patternfly-docs/content/extensions/chatbot/examples/demos/AttachmentDemos.md +37 -0
  450. package/patternfly-docs/content/extensions/chatbot/examples/demos/Chatbot.md +34 -1
  451. package/patternfly-docs/content/extensions/chatbot/examples/demos/Chatbot.tsx +19 -25
  452. package/patternfly-docs/content/extensions/chatbot/examples/demos/ChatbotAttachment.tsx +42 -15
  453. package/patternfly-docs/content/extensions/chatbot/examples/demos/ChatbotAttachmentMenu.tsx +15 -14
  454. package/patternfly-docs/content/extensions/chatbot/examples/demos/ChatbotCompact.tsx +19 -25
  455. package/patternfly-docs/content/extensions/chatbot/examples/demos/ChatbotDisplayMode.tsx +486 -0
  456. package/patternfly-docs/content/extensions/chatbot/examples/demos/ChatbotInDrawer.tsx +17 -22
  457. package/patternfly-docs/content/extensions/chatbot/examples/demos/ChatbotScrolling.tsx +536 -0
  458. package/patternfly-docs/content/extensions/chatbot/examples/demos/ChatbotTranscripts.tsx +565 -0
  459. package/patternfly-docs/content/extensions/chatbot/examples/demos/EmbeddedChatbot.tsx +17 -22
  460. package/patternfly-docs/content/extensions/chatbot/examples/demos/EmbeddedComparisonChatbot.tsx +13 -13
  461. package/patternfly-docs/content/extensions/chatbot/examples/demos/Feedback.tsx +7 -7
  462. package/patternfly-docs/content/extensions/chatbot/img/quick-response-confirmation.svg +67 -0
  463. package/src/AttachMenu/AttachMenu.tsx +2 -2
  464. package/src/AttachmentEdit/AttachmentEdit.test.tsx +46 -2
  465. package/src/AttachmentEdit/AttachmentEdit.tsx +25 -7
  466. package/src/Chatbot/Chatbot.scss +1 -1
  467. package/src/Chatbot/Chatbot.test.tsx +0 -1
  468. package/src/Chatbot/Chatbot.tsx +5 -3
  469. package/src/ChatbotAlert/ChatbotAlert.test.tsx +0 -1
  470. package/src/ChatbotAlert/ChatbotAlert.tsx +2 -2
  471. package/src/ChatbotContent/ChatbotContent.scss +1 -1
  472. package/src/ChatbotContent/ChatbotContent.test.tsx +0 -1
  473. package/src/ChatbotContent/ChatbotContent.tsx +3 -3
  474. package/src/ChatbotConversationHistoryNav/ChatbotConversationHistoryDropdown.test.tsx +0 -1
  475. package/src/ChatbotConversationHistoryNav/ChatbotConversationHistoryDropdown.tsx +6 -4
  476. package/src/ChatbotConversationHistoryNav/ChatbotConversationHistoryNav.scss +14 -2
  477. package/src/ChatbotConversationHistoryNav/ChatbotConversationHistoryNav.test.tsx +61 -3
  478. package/src/ChatbotConversationHistoryNav/ChatbotConversationHistoryNav.tsx +37 -18
  479. package/src/ChatbotConversationHistoryNav/EmptyState.tsx +2 -2
  480. package/src/ChatbotConversationHistoryNav/LoadingState.tsx +2 -2
  481. package/src/ChatbotFooter/ChatbotFooter.scss +1 -1
  482. package/src/ChatbotFooter/ChatbotFooter.test.tsx +0 -1
  483. package/src/ChatbotFooter/ChatbotFooter.tsx +3 -3
  484. package/src/ChatbotFooter/ChatbotFooternote.test.tsx +0 -1
  485. package/src/ChatbotFooter/ChatbotFootnote.tsx +6 -4
  486. package/src/ChatbotHeader/ChatbotHeader.scss +3 -3
  487. package/src/ChatbotHeader/ChatbotHeader.test.tsx +0 -1
  488. package/src/ChatbotHeader/ChatbotHeader.tsx +3 -6
  489. package/src/ChatbotHeader/ChatbotHeaderActions.test.tsx +0 -1
  490. package/src/ChatbotHeader/ChatbotHeaderActions.tsx +2 -2
  491. package/src/ChatbotHeader/ChatbotHeaderCloseButton.test.tsx +0 -1
  492. package/src/ChatbotHeader/ChatbotHeaderCloseButton.tsx +5 -4
  493. package/src/ChatbotHeader/ChatbotHeaderMain.test.tsx +0 -1
  494. package/src/ChatbotHeader/ChatbotHeaderMain.tsx +2 -2
  495. package/src/ChatbotHeader/ChatbotHeaderMenu.test.tsx +0 -1
  496. package/src/ChatbotHeader/ChatbotHeaderMenu.tsx +7 -7
  497. package/src/ChatbotHeader/ChatbotHeaderOptionsDropdown.test.tsx +9 -1
  498. package/src/ChatbotHeader/ChatbotHeaderOptionsDropdown.tsx +12 -5
  499. package/src/ChatbotHeader/ChatbotHeaderSelectorDropdown.test.tsx +9 -1
  500. package/src/ChatbotHeader/ChatbotHeaderSelectorDropdown.tsx +26 -6
  501. package/src/ChatbotHeader/ChatbotHeaderTitle.test.tsx +0 -1
  502. package/src/ChatbotHeader/ChatbotHeaderTitle.tsx +2 -2
  503. package/src/ChatbotModal/ChatbotModal.test.tsx +0 -1
  504. package/src/ChatbotModal/ChatbotModal.tsx +2 -2
  505. package/src/ChatbotPopover/ChatbotPopover.tsx +3 -3
  506. package/src/ChatbotToggle/ChatbotToggle.scss +2 -2
  507. package/src/ChatbotToggle/ChatbotToggle.test.tsx +0 -1
  508. package/src/ChatbotToggle/ChatbotToggle.tsx +5 -3
  509. package/src/ChatbotWelcomePrompt/ChatbotWelcomePrompt.test.tsx +0 -1
  510. package/src/ChatbotWelcomePrompt/ChatbotWelcomePrompt.tsx +2 -2
  511. package/src/CodeModal/CodeModal.test.tsx +29 -2
  512. package/src/CodeModal/CodeModal.tsx +18 -8
  513. package/src/Compare/Compare.test.tsx +0 -1
  514. package/src/Compare/Compare.tsx +7 -6
  515. package/src/FileDetails/FileDetails.test.tsx +0 -1
  516. package/src/FileDetails/FileDetails.tsx +1 -1
  517. package/src/FileDetailsLabel/FileDetailsLabel.test.tsx +0 -1
  518. package/src/FileDetailsLabel/FileDetailsLabel.tsx +1 -1
  519. package/src/FileDropZone/FileDropZone.test.tsx +112 -1
  520. package/src/FileDropZone/FileDropZone.tsx +45 -5
  521. package/src/LoadingMessage/LoadingMessage.test.tsx +0 -1
  522. package/src/LoadingMessage/LoadingMessage.tsx +2 -2
  523. package/src/Message/CodeBlockMessage/CodeBlockMessage.scss +7 -0
  524. package/src/Message/CodeBlockMessage/CodeBlockMessage.tsx +104 -20
  525. package/src/Message/ErrorMessage/ErrorMessage.tsx +0 -1
  526. package/src/Message/ImageMessage/ImageMessage.tsx +1 -2
  527. package/src/Message/LinkMessage/LinkMessage.tsx +0 -1
  528. package/src/Message/ListMessage/ListItemMessage.tsx +0 -1
  529. package/src/Message/ListMessage/OrderedListMessage.tsx +0 -1
  530. package/src/Message/ListMessage/UnorderedListMessage.tsx +0 -1
  531. package/src/Message/Message.scss +9 -7
  532. package/src/Message/Message.test.tsx +84 -6
  533. package/src/Message/Message.tsx +39 -18
  534. package/src/Message/MessageInput.tsx +9 -5
  535. package/src/Message/MessageLoading.tsx +0 -2
  536. package/src/Message/Plugins/index.ts +1 -0
  537. package/src/Message/Plugins/rehypeCodeBlockToggle.ts +24 -0
  538. package/src/Message/Plugins/rehypeMoveImagesOutOfParagraphs.ts +53 -0
  539. package/src/Message/QuickResponse/QuickResponse.tsx +4 -3
  540. package/src/Message/QuickStarts/FallbackImg.tsx +4 -3
  541. package/src/Message/QuickStarts/QuickStartTile.tsx +3 -3
  542. package/src/Message/QuickStarts/QuickStartTileDescription.test.tsx +0 -1
  543. package/src/Message/QuickStarts/QuickStartTileDescription.tsx +4 -3
  544. package/src/Message/QuickStarts/QuickStartTileHeader.tsx +2 -2
  545. package/src/Message/QuickStarts/types.ts +4 -3
  546. package/src/Message/TableMessage/TableMessage.tsx +4 -4
  547. package/src/Message/TableMessage/TbodyMessage.tsx +3 -3
  548. package/src/Message/TableMessage/TdMessage.tsx +1 -2
  549. package/src/Message/TableMessage/ThMessage.tsx +1 -2
  550. package/src/Message/TableMessage/TheadMessage.tsx +3 -2
  551. package/src/Message/TableMessage/TrMessage.tsx +4 -4
  552. package/src/Message/TextMessage/TextMessage.scss +2 -5
  553. package/src/Message/TextMessage/TextMessage.tsx +1 -2
  554. package/src/Message/UserFeedback/CloseButton.tsx +2 -2
  555. package/src/Message/UserFeedback/UserFeedback.test.tsx +0 -1
  556. package/src/Message/UserFeedback/UserFeedback.tsx +8 -6
  557. package/src/Message/UserFeedback/UserFeedbackComplete.test.tsx +0 -1
  558. package/src/Message/UserFeedback/UserFeedbackComplete.tsx +16 -14
  559. package/src/Message/index.ts +1 -0
  560. package/src/MessageBar/AttachButton.test.tsx +127 -8
  561. package/src/MessageBar/AttachButton.tsx +50 -7
  562. package/src/MessageBar/MessageBar.test.tsx +81 -30
  563. package/src/MessageBar/MessageBar.tsx +86 -20
  564. package/src/MessageBar/MicrophoneButton.tsx +10 -7
  565. package/src/MessageBar/SendButton.scss +3 -3
  566. package/src/MessageBar/SendButton.test.tsx +5 -6
  567. package/src/MessageBar/SendButton.tsx +4 -3
  568. package/src/MessageBar/StopButton.test.tsx +5 -6
  569. package/src/MessageBar/StopButton.tsx +4 -3
  570. package/src/MessageBox/JumpButton.scss +1 -1
  571. package/src/MessageBox/JumpButton.test.tsx +4 -5
  572. package/src/MessageBox/JumpButton.tsx +3 -3
  573. package/src/MessageBox/MessageBox.test.tsx +295 -5
  574. package/src/MessageBox/MessageBox.tsx +301 -84
  575. package/src/MessageDivider/MessageDivider.scss +45 -0
  576. package/src/MessageDivider/MessageDivider.test.tsx +24 -0
  577. package/src/MessageDivider/MessageDivider.tsx +35 -0
  578. package/src/MessageDivider/index.ts +3 -0
  579. package/src/PreviewAttachment/PreviewAttachment.test.tsx +44 -2
  580. package/src/PreviewAttachment/PreviewAttachment.tsx +24 -6
  581. package/src/ResponseActions/ResponseActionButton.test.tsx +0 -1
  582. package/src/ResponseActions/ResponseActionButton.tsx +6 -5
  583. package/src/ResponseActions/ResponseActions.test.tsx +126 -4
  584. package/src/ResponseActions/ResponseActions.tsx +92 -12
  585. package/src/Settings/SettingsForm.test.tsx +0 -1
  586. package/src/Settings/SettingsForm.tsx +2 -7
  587. package/src/SourceDetailsMenuItem/SourceDetailsMenuItem.tsx +2 -2
  588. package/src/SourcesCard/SourcesCard.test.tsx +14 -1
  589. package/src/SourcesCard/SourcesCard.tsx +19 -7
  590. package/src/TermsOfUse/TermsOfUse.test.tsx +0 -1
  591. package/src/TermsOfUse/TermsOfUse.tsx +6 -5
  592. package/src/index.ts +3 -0
  593. package/src/main.scss +1 -52
  594. package/tsconfig.cjs.json +0 -1
  595. package/tsconfig.json +3 -3
@@ -1,10 +1,11 @@
1
- import React from 'react';
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { useEffect, useState } from 'react';
2
3
  import { ToggleGroup, ToggleGroupItem } from '@patternfly/react-core';
3
4
  export const Compare = ({ firstChild, secondChild, firstChildDisplayName, secondChildDisplayName, onToggleClick, toggleGroupAriaLabel = 'Select which chatbot to display' }) => {
4
- const [isSelected, setIsSelected] = React.useState('toggle-group-chatbot-1');
5
- const [showFirstChatbot, setShowFirstChatbot] = React.useState(true);
6
- const [showSecondChatbot, setShowSecondChatbot] = React.useState(false);
7
- React.useEffect(() => {
5
+ const [isSelected, setIsSelected] = useState('toggle-group-chatbot-1');
6
+ const [showFirstChatbot, setShowFirstChatbot] = useState(true);
7
+ const [showSecondChatbot, setShowSecondChatbot] = useState(false);
8
+ useEffect(() => {
8
9
  // we want to show the first if we switch to the mobile toggle view
9
10
  // and reset/switch back to normal otherwise
10
11
  const updateChatbotVisibility = () => {
@@ -31,13 +32,6 @@ export const Compare = ({ firstChild, secondChild, firstChildDisplayName, second
31
32
  setShowFirstChatbot(!showFirstChatbot);
32
33
  onToggleClick && onToggleClick(event);
33
34
  };
34
- return (React.createElement(React.Fragment, null,
35
- React.createElement("div", { className: "pf-chatbot__compare-mobile-controls" },
36
- React.createElement(ToggleGroup, { "aria-label": toggleGroupAriaLabel },
37
- React.createElement(ToggleGroupItem, { className: "pf-chatbot__compare-toggle", text: firstChildDisplayName, buttonId: "toggle-group-chatbot-1", isSelected: isSelected === 'toggle-group-chatbot-1', onChange: handleChildToggleClick }),
38
- React.createElement(ToggleGroupItem, { className: "pf-chatbot__compare-toggle", text: secondChildDisplayName, buttonId: "toggle-group-chatbot-2", isSelected: isSelected === 'toggle-group-chatbot-2', onChange: handleChildToggleClick }))),
39
- React.createElement("div", { className: "pf-chatbot__compare" },
40
- React.createElement("div", { className: `pf-chatbot__compare-item ${!showFirstChatbot ? 'pf-chatbot__compare-item-hidden' : undefined}` }, firstChild),
41
- React.createElement("div", { className: `pf-chatbot__compare-item ${!showSecondChatbot ? 'pf-chatbot__compare-item-hidden' : undefined}` }, secondChild))));
35
+ return (_jsxs(_Fragment, { children: [_jsx("div", { className: "pf-chatbot__compare-mobile-controls", children: _jsxs(ToggleGroup, { "aria-label": toggleGroupAriaLabel, children: [_jsx(ToggleGroupItem, { className: "pf-chatbot__compare-toggle", text: firstChildDisplayName, buttonId: "toggle-group-chatbot-1", isSelected: isSelected === 'toggle-group-chatbot-1', onChange: handleChildToggleClick }), _jsx(ToggleGroupItem, { className: "pf-chatbot__compare-toggle", text: secondChildDisplayName, buttonId: "toggle-group-chatbot-2", isSelected: isSelected === 'toggle-group-chatbot-2', onChange: handleChildToggleClick })] }) }), _jsxs("div", { className: "pf-chatbot__compare", children: [_jsx("div", { className: `pf-chatbot__compare-item ${!showFirstChatbot ? 'pf-chatbot__compare-item-hidden' : undefined}`, children: firstChild }), _jsx("div", { className: `pf-chatbot__compare-item ${!showSecondChatbot ? 'pf-chatbot__compare-item-hidden' : undefined}`, children: secondChild })] })] }));
42
36
  };
43
37
  export default Compare;
@@ -1,14 +1,12 @@
1
- import React from 'react';
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { render, screen } from '@testing-library/react';
3
3
  import '@testing-library/jest-dom';
4
4
  import Compare from './Compare';
5
- const firstChild = (React.createElement("div", null,
6
- React.createElement("h1", null, "Child 1")));
7
- const secondChild = (React.createElement("div", null,
8
- React.createElement("h1", null, "Child 2")));
5
+ const firstChild = (_jsx("div", { children: _jsx("h1", { children: "Child 1" }) }));
6
+ const secondChild = (_jsx("div", { children: _jsx("h1", { children: "Child 2" }) }));
9
7
  describe('Compare', () => {
10
8
  it('should render compare correctly', () => {
11
- render(React.createElement(Compare, { firstChildDisplayName: "Child 1", secondChildDisplayName: "Child 2", firstChild: firstChild, secondChild: secondChild }));
9
+ render(_jsx(Compare, { firstChildDisplayName: "Child 1", secondChildDisplayName: "Child 2", firstChild: firstChild, secondChild: secondChild }));
12
10
  expect(screen.getByRole('heading', { name: /Child 1/i })).toBeTruthy();
13
11
  expect(screen.getByRole('heading', { name: /Child 2/i })).toBeTruthy();
14
12
  });
@@ -1,4 +1,4 @@
1
- import React, { PropsWithChildren } from 'react';
1
+ import { PropsWithChildren } from 'react';
2
2
  interface FileDetailsProps {
3
3
  /** Class name applied to container */
4
4
  className?: string;
@@ -918,5 +918,5 @@ export declare const extensionToLanguage: {
918
918
  odp: string;
919
919
  pdf: string;
920
920
  };
921
- export declare const FileDetails: ({ className, fileName, fileNameClassName, languageTestId }: PropsWithChildren<FileDetailsProps>) => React.JSX.Element;
921
+ export declare const FileDetails: ({ className, fileName, fileNameClassName, languageTestId }: PropsWithChildren<FileDetailsProps>) => import("react/jsx-runtime").JSX.Element;
922
922
  export default FileDetails;
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Flex, Stack, StackItem, Truncate } from '@patternfly/react-core';
3
3
  import path from 'path-browserify';
4
4
  // source https://gist.github.com/ppisarczyk/43962d06686722d26d176fad46879d41
@@ -929,19 +929,6 @@ export const extensionToLanguage = {
929
929
  export const FileDetails = ({ className, fileName, fileNameClassName, languageTestId }) => {
930
930
  var _a;
931
931
  const language = (_a = extensionToLanguage[path.extname(fileName).slice(1)]) === null || _a === void 0 ? void 0 : _a.toUpperCase();
932
- return (React.createElement(Flex, { className: `pf-chatbot__file-details ${className ? className : ''}`, gap: { default: 'gapSm' } },
933
- React.createElement(Flex, { className: "pf-chatbot__code-icon", justifyContent: { default: 'justifyContentCenter' }, alignItems: { default: 'alignItemsCenter' }, alignSelf: { default: 'alignSelfCenter' } },
934
- React.createElement("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "currentColor", xmlns: "http://www.w3.org/2000/svg" },
935
- React.createElement("path", { d: "M0 4C0 1.79086 1.79086 0 4 0H20C22.2091 0 24 1.79086 24 4V20C24 22.2091 22.2091 24 20 24H4C1.79086 24 0 22.2091 0 20V4Z", fill: "currentColor" }),
936
- React.createElement("g", { clipPath: "url(#clip0_3280_27505)" },
937
- React.createElement("path", { d: "M13.8204 5.63002C13.3954 5.50752 12.9529 5.75502 12.8304 6.18002L9.63035 17.38C9.50785 17.805 9.75535 18.2475 10.1804 18.37C10.6054 18.4925 11.0479 18.245 11.1704 17.82L14.3704 6.62002C14.4929 6.19502 14.2454 5.75252 13.8204 5.63002ZM15.8354 8.63252C15.5229 8.94502 15.5229 9.45252 15.8354 9.76502L18.0679 12L15.8329 14.235C15.5204 14.5475 15.5204 15.055 15.8329 15.3675C16.1454 15.68 16.6529 15.68 16.9654 15.3675L19.7654 12.5675C20.0779 12.255 20.0779 11.7475 19.7654 11.435L16.9654 8.63502C16.6529 8.32252 16.1454 8.32252 15.8329 8.63502L15.8354 8.63252ZM8.16785 8.63252C7.85535 8.32002 7.34785 8.32002 7.03535 8.63252L4.23535 11.4325C3.92285 11.745 3.92285 12.2525 4.23535 12.565L7.03535 15.365C7.34785 15.6775 7.85535 15.6775 8.16785 15.365C8.48035 15.0525 8.48035 14.545 8.16785 14.2325L5.93285 12L8.16785 9.76502C8.48035 9.45252 8.48035 8.94502 8.16785 8.63252Z", fill: "white" })),
938
- React.createElement("defs", null,
939
- React.createElement("clipPath", null,
940
- React.createElement("rect", { width: "16", height: "12.8", fill: "white", transform: "translate(4 5.60001)" }))))),
941
- React.createElement(Stack, null,
942
- React.createElement(StackItem, null,
943
- React.createElement("span", { className: "pf-chatbot__code-fileName" },
944
- React.createElement(Truncate, { className: fileNameClassName, content: path.parse(fileName).name }))),
945
- language && (React.createElement(StackItem, { "data-testid": languageTestId, className: "pf-chatbot__code-language" }, language)))));
932
+ return (_jsxs(Flex, { className: `pf-chatbot__file-details ${className ? className : ''}`, gap: { default: 'gapSm' }, children: [_jsx(Flex, { className: "pf-chatbot__code-icon", justifyContent: { default: 'justifyContentCenter' }, alignItems: { default: 'alignItemsCenter' }, alignSelf: { default: 'alignSelfCenter' }, children: _jsxs("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "currentColor", xmlns: "http://www.w3.org/2000/svg", children: [_jsx("path", { d: "M0 4C0 1.79086 1.79086 0 4 0H20C22.2091 0 24 1.79086 24 4V20C24 22.2091 22.2091 24 20 24H4C1.79086 24 0 22.2091 0 20V4Z", fill: "currentColor" }), _jsx("g", { clipPath: "url(#clip0_3280_27505)", children: _jsx("path", { d: "M13.8204 5.63002C13.3954 5.50752 12.9529 5.75502 12.8304 6.18002L9.63035 17.38C9.50785 17.805 9.75535 18.2475 10.1804 18.37C10.6054 18.4925 11.0479 18.245 11.1704 17.82L14.3704 6.62002C14.4929 6.19502 14.2454 5.75252 13.8204 5.63002ZM15.8354 8.63252C15.5229 8.94502 15.5229 9.45252 15.8354 9.76502L18.0679 12L15.8329 14.235C15.5204 14.5475 15.5204 15.055 15.8329 15.3675C16.1454 15.68 16.6529 15.68 16.9654 15.3675L19.7654 12.5675C20.0779 12.255 20.0779 11.7475 19.7654 11.435L16.9654 8.63502C16.6529 8.32252 16.1454 8.32252 15.8329 8.63502L15.8354 8.63252ZM8.16785 8.63252C7.85535 8.32002 7.34785 8.32002 7.03535 8.63252L4.23535 11.4325C3.92285 11.745 3.92285 12.2525 4.23535 12.565L7.03535 15.365C7.34785 15.6775 7.85535 15.6775 8.16785 15.365C8.48035 15.0525 8.48035 14.545 8.16785 14.2325L5.93285 12L8.16785 9.76502C8.48035 9.45252 8.48035 8.94502 8.16785 8.63252Z", fill: "white" }) }), _jsx("defs", { children: _jsx("clipPath", { children: _jsx("rect", { width: "16", height: "12.8", fill: "white", transform: "translate(4 5.60001)" }) }) })] }) }), _jsxs(Stack, { children: [_jsx(StackItem, { children: _jsx("span", { className: "pf-chatbot__code-fileName", children: _jsx(Truncate, { className: fileNameClassName, content: path.parse(fileName).name }) }) }), language && (_jsx(StackItem, { "data-testid": languageTestId, className: "pf-chatbot__code-language", children: language }))] })] }));
946
933
  };
947
934
  export default FileDetails;
@@ -1,20 +1,20 @@
1
- import React from 'react';
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { render, screen } from '@testing-library/react';
3
3
  import '@testing-library/jest-dom';
4
4
  import FileDetails from './FileDetails';
5
5
  describe('FileDetails', () => {
6
6
  it('should render file details', () => {
7
- const { container } = render(React.createElement(FileDetails, { fileName: "test.txt" }));
7
+ const { container } = render(_jsx(FileDetails, { fileName: "test.txt" }));
8
8
  expect(container).toMatchSnapshot();
9
9
  });
10
10
  it('should render file details correctly if an extension we support is passed in', () => {
11
- render(React.createElement(FileDetails, { fileName: "test.txt", languageTestId: "language" }));
11
+ render(_jsx(FileDetails, { fileName: "test.txt", languageTestId: "language" }));
12
12
  expect(screen.getByText('test')).toBeTruthy();
13
13
  expect(screen.getByText('TEXT')).toBeTruthy();
14
14
  expect(screen.getByTestId('language')).toBeTruthy();
15
15
  });
16
16
  it('should skip language if we do not support an extension', () => {
17
- render(React.createElement(FileDetails, { fileName: "test.joke", languageTestId: "language" }));
17
+ render(_jsx(FileDetails, { fileName: "test.joke", languageTestId: "language" }));
18
18
  expect(screen.getByText('test')).toBeTruthy();
19
19
  expect(screen.queryByTestId('language')).toBeFalsy();
20
20
  });
@@ -1,4 +1,4 @@
1
- import React, { PropsWithChildren } from 'react';
1
+ import { PropsWithChildren } from 'react';
2
2
  interface FileDetailsLabelProps {
3
3
  /** Name of file, including extension */
4
4
  fileName: string;
@@ -17,5 +17,5 @@ interface FileDetailsLabelProps {
17
17
  /** Custom test id for the loading spinner in the component */
18
18
  spinnerTestId?: string;
19
19
  }
20
- export declare const FileDetailsLabel: ({ fileName, fileId, isLoading, onClick, onClose, closeButtonAriaLabel, languageTestId, spinnerTestId }: PropsWithChildren<FileDetailsLabelProps>) => React.JSX.Element;
20
+ export declare const FileDetailsLabel: ({ fileName, fileId, isLoading, onClick, onClose, closeButtonAriaLabel, languageTestId, spinnerTestId }: PropsWithChildren<FileDetailsLabelProps>) => import("react/jsx-runtime").JSX.Element;
21
21
  export default FileDetailsLabel;
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Button, Label } from '@patternfly/react-core';
3
3
  import FileDetails from '../FileDetails';
4
4
  import { Spinner } from '@patternfly/react-core';
@@ -7,9 +7,6 @@ export const FileDetailsLabel = ({ fileName, fileId, isLoading, onClick, onClose
7
7
  const handleClose = (event) => {
8
8
  onClose && onClose(event, fileName, fileId);
9
9
  };
10
- return (React.createElement(Label, Object.assign({ className: "pf-chatbot__file-label" }, (onClose && { onClose: (event) => onClose(event, fileName, fileId) }), { closeBtn: React.createElement(Button, { type: "button", variant: "plain", "aria-label": closeButtonAriaLabel !== null && closeButtonAriaLabel !== void 0 ? closeButtonAriaLabel : `Close ${fileName}`, icon: React.createElement(TimesIcon, null), onClick: handleClose }) }, (onClick && { onClick: (event) => onClick(event, fileName, fileId) })),
11
- React.createElement("div", { className: "pf-chatbot__file-label-contents" },
12
- React.createElement(FileDetails, { className: isLoading ? 'pf-chatbot__file-label-loading' : undefined, fileName: fileName, languageTestId: languageTestId }),
13
- isLoading && React.createElement(Spinner, { "data-testid": spinnerTestId, size: "sm" }))));
10
+ return (_jsx(Label, Object.assign({ className: "pf-chatbot__file-label" }, (onClose && { onClose: (event) => onClose(event, fileName, fileId) }), { closeBtn: _jsx(Button, { type: "button", variant: "plain", "aria-label": closeButtonAriaLabel !== null && closeButtonAriaLabel !== void 0 ? closeButtonAriaLabel : `Close ${fileName}`, icon: _jsx(TimesIcon, {}), onClick: handleClose }) }, (onClick && { onClick: (event) => onClick(event, fileName, fileId) }), { children: _jsxs("div", { className: "pf-chatbot__file-label-contents", children: [_jsx(FileDetails, { className: isLoading ? 'pf-chatbot__file-label-loading' : undefined, fileName: fileName, languageTestId: languageTestId }), isLoading && _jsx(Spinner, { "data-testid": spinnerTestId, size: "sm" })] }) })));
14
11
  };
15
12
  export default FileDetailsLabel;
@@ -7,50 +7,50 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
7
7
  step((generator = generator.apply(thisArg, _arguments || [])).next());
8
8
  });
9
9
  };
10
- import React from 'react';
10
+ import { jsx as _jsx } from "react/jsx-runtime";
11
11
  import { render, screen } from '@testing-library/react';
12
12
  import '@testing-library/jest-dom';
13
13
  import FileDetailsLabel from './FileDetailsLabel';
14
14
  import userEvent from '@testing-library/user-event';
15
15
  describe('FileDetailsLabel', () => {
16
16
  it('should render file details label', () => {
17
- const { container } = render(React.createElement(FileDetailsLabel, { fileName: "test.txt" }));
17
+ const { container } = render(_jsx(FileDetailsLabel, { fileName: "test.txt" }));
18
18
  expect(container).toMatchSnapshot();
19
19
  });
20
20
  it('should render file details correctly if an extension we support is passed in', () => {
21
- render(React.createElement(FileDetailsLabel, { fileName: "test.txt" }));
21
+ render(_jsx(FileDetailsLabel, { fileName: "test.txt" }));
22
22
  expect(screen.getByText('test')).toBeTruthy();
23
23
  expect(screen.getByText('TEXT')).toBeTruthy();
24
24
  });
25
25
  it('should skip language if we do not support an extension', () => {
26
- render(React.createElement(FileDetailsLabel, { fileName: "test.joke", languageTestId: "language" }));
26
+ render(_jsx(FileDetailsLabel, { fileName: "test.joke", languageTestId: "language" }));
27
27
  expect(screen.getByText('test')).toBeTruthy();
28
28
  expect(screen.queryByTestId('language')).toBeFalsy();
29
29
  });
30
30
  it('should not show spinner by default', () => {
31
- render(React.createElement(FileDetailsLabel, { fileName: "test.txt", spinnerTestId: "spinner" }));
31
+ render(_jsx(FileDetailsLabel, { fileName: "test.txt", spinnerTestId: "spinner" }));
32
32
  expect(screen.queryByTestId('spinner')).toBeFalsy();
33
33
  });
34
34
  it('should show spinner if loading', () => {
35
- render(React.createElement(FileDetailsLabel, { fileName: "test.txt", isLoading: true, spinnerTestId: "spinner" }));
35
+ render(_jsx(FileDetailsLabel, { fileName: "test.txt", isLoading: true, spinnerTestId: "spinner" }));
36
36
  expect(screen.getByText('test')).toBeTruthy();
37
37
  expect(screen.getByText('TEXT')).toBeTruthy();
38
38
  expect(screen.queryByTestId('spinner')).toBeTruthy();
39
39
  });
40
40
  it('should call onClick prop', () => __awaiter(void 0, void 0, void 0, function* () {
41
41
  const spy = jest.fn();
42
- render(React.createElement(FileDetailsLabel, { fileName: "test.txt", onClick: spy }));
42
+ render(_jsx(FileDetailsLabel, { fileName: "test.txt", onClick: spy }));
43
43
  yield userEvent.click(screen.getByRole('button'));
44
44
  expect(spy).toHaveBeenCalledTimes(1);
45
45
  }));
46
46
  it('should call onClose prop', () => __awaiter(void 0, void 0, void 0, function* () {
47
47
  const spy = jest.fn();
48
- render(React.createElement(FileDetailsLabel, { fileName: "test.txt", onClose: spy }));
48
+ render(_jsx(FileDetailsLabel, { fileName: "test.txt", onClose: spy }));
49
49
  yield userEvent.click(screen.getByRole('button', { name: /Close test.txt/i }));
50
50
  expect(spy).toHaveBeenCalledTimes(1);
51
51
  }));
52
52
  it('should use closeButtonAriaLabel prop appropriately', () => {
53
- render(React.createElement(FileDetailsLabel, { fileName: "test.txt", onClose: jest.fn(), closeButtonAriaLabel: "Delete file" }));
53
+ render(_jsx(FileDetailsLabel, { fileName: "test.txt", onClose: jest.fn(), closeButtonAriaLabel: "Delete file" }));
54
54
  screen.getByRole('button', { name: /Delete file/i });
55
55
  });
56
56
  });
@@ -1,6 +1,6 @@
1
- import { DropEvent } from '@patternfly/react-core';
2
- import React from 'react';
1
+ import type { FunctionComponent } from 'react';
3
2
  import { ChatbotDisplayMode } from '../Chatbot';
3
+ import { Accept, DropEvent, FileError, FileRejection } from 'react-dropzone';
4
4
  export interface FileDropZoneProps {
5
5
  /** Content displayed when the drop zone is not currently in use */
6
6
  children?: React.ReactNode;
@@ -10,8 +10,28 @@ export interface FileDropZoneProps {
10
10
  infoText?: string;
11
11
  /** When files are dropped or uploaded this callback will be called with all accepted files */
12
12
  onFileDrop: (event: DropEvent, data: File[]) => void;
13
+ /** Specifies the file types accepted by the attachment upload component.
14
+ * Files that don't match the accepted types will be disabled in the file picker.
15
+ * For example,
16
+ * allowedFileTypes: { 'application/json': ['.json'], 'text/plain': ['.txt'] }
17
+ **/
18
+ allowedFileTypes?: Accept;
13
19
  /** Display mode for the Chatbot parent; this influences the styles applied */
14
20
  displayMode?: ChatbotDisplayMode;
21
+ /** Minimum file size allowed */
22
+ minSize?: number;
23
+ /** Max file size allowed */
24
+ maxSize?: number;
25
+ /** Max number of files allowed */
26
+ maxFiles?: number;
27
+ /** Whether attachments are disabled */
28
+ isAttachmentDisabled?: boolean;
29
+ /** Callback when file(s) are attached */
30
+ onAttach?: <T extends File>(acceptedFiles: T[], fileRejections: FileRejection[], event: DropEvent) => void;
31
+ /** Callback function for AttachButton when an attachment fails */
32
+ onAttachRejected?: (fileRejections: FileRejection[], event: DropEvent) => void;
33
+ /** Validator for files; see https://react-dropzone.js.org/#!/Custom%20validation for more information */
34
+ validator?: <T extends File>(file: T) => FileError | readonly FileError[] | null;
15
35
  }
16
- declare const FileDropZone: React.FunctionComponent<FileDropZoneProps>;
36
+ declare const FileDropZone: FunctionComponent<FileDropZoneProps>;
17
37
  export default FileDropZone;
@@ -9,15 +9,20 @@ var __rest = (this && this.__rest) || function (s, e) {
9
9
  }
10
10
  return t;
11
11
  };
12
+ import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
12
13
  import { MultipleFileUpload, MultipleFileUploadMain } from '@patternfly/react-core';
13
- import React from 'react';
14
+ import { useState } from 'react';
14
15
  import { ChatbotDisplayMode } from '../Chatbot';
15
16
  import { UploadIcon } from '@patternfly/react-icons';
16
17
  const FileDropZone = (_a) => {
17
- var { children, className, infoText = 'Maximum file size is 25 MB', onFileDrop, displayMode = ChatbotDisplayMode.default } = _a, props = __rest(_a, ["children", "className", "infoText", "onFileDrop", "displayMode"]);
18
- const [showDropZone, setShowDropZone] = React.useState(false);
19
- const renderDropZone = () => (React.createElement(React.Fragment, null,
20
- React.createElement(MultipleFileUploadMain, { titleIcon: React.createElement(UploadIcon, null), titleText: "Drag and drop your file here", infoText: infoText, isUploadButtonHidden: true })));
21
- return (React.createElement(MultipleFileUpload, { dropzoneProps: Object.assign({ onDrop: () => setShowDropZone(false) }, props), onDragEnter: () => setShowDropZone(true), onDragLeave: () => setShowDropZone(false), onFileDrop: onFileDrop, className: `pf-chatbot__dropzone pf-chatbot__dropzone--${displayMode} pf-chatbot__dropzone--${showDropZone ? 'visible' : 'invisible'} ${className ? className : ''}` }, showDropZone ? renderDropZone() : children));
18
+ var { children, className, infoText = 'Maximum file size is 25 MB', onFileDrop, allowedFileTypes, minSize, maxSize, maxFiles, isAttachmentDisabled, onAttach, onAttachRejected, validator, displayMode = ChatbotDisplayMode.default } = _a, props = __rest(_a, ["children", "className", "infoText", "onFileDrop", "allowedFileTypes", "minSize", "maxSize", "maxFiles", "isAttachmentDisabled", "onAttach", "onAttachRejected", "validator", "displayMode"]);
19
+ const [showDropZone, setShowDropZone] = useState(false);
20
+ const renderDropZone = () => (_jsx(_Fragment, { children: _jsx(MultipleFileUploadMain, { titleIcon: _jsx(UploadIcon, {}), titleText: "Drag and drop your file here", infoText: infoText, isUploadButtonHidden: true }) }));
21
+ return (_jsx(MultipleFileUpload, { dropzoneProps: Object.assign({ accept: allowedFileTypes, onDrop: (acceptedFiles, fileRejections, event) => {
22
+ setShowDropZone(false);
23
+ onAttach && onAttach(acceptedFiles, fileRejections, event);
24
+ }, minSize,
25
+ maxSize,
26
+ maxFiles, disabled: isAttachmentDisabled, onDropRejected: onAttachRejected, validator }, props), onDragEnter: () => setShowDropZone(true), onDragLeave: () => setShowDropZone(false), onFileDrop: onFileDrop, className: `pf-chatbot__dropzone pf-chatbot__dropzone--${displayMode} pf-chatbot__dropzone--${showDropZone ? 'visible' : 'invisible'} ${className ? className : ''}`, children: showDropZone ? renderDropZone() : children }));
22
27
  };
23
28
  export default FileDropZone;
@@ -1,14 +1,95 @@
1
- import React from 'react';
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";
2
11
  import { render, screen } from '@testing-library/react';
3
12
  import '@testing-library/jest-dom';
4
13
  import FileDropZone from './FileDropZone';
14
+ import userEvent from '@testing-library/user-event';
5
15
  describe('FileDropZone', () => {
6
16
  it('should render file drop zone', () => {
7
- const { container } = render(React.createElement(FileDropZone, { onFileDrop: jest.fn() }));
17
+ const { container } = render(_jsx(FileDropZone, { onFileDrop: jest.fn() }));
8
18
  expect(container).toMatchSnapshot();
9
19
  });
10
20
  it('should render children', () => {
11
- render(React.createElement(FileDropZone, { onFileDrop: jest.fn() }, "Hi"));
21
+ render(_jsx(FileDropZone, { onFileDrop: jest.fn(), children: "Hi" }));
12
22
  expect(screen.getByText('Hi')).toBeTruthy();
13
23
  });
24
+ it('should call onFileDrop when file type is accepted', () => __awaiter(void 0, void 0, void 0, function* () {
25
+ const onFileDrop = jest.fn();
26
+ const { container } = render(_jsx(FileDropZone, { "data-testid": "input", allowedFileTypes: { 'text/plain': ['.txt'] }, onFileDrop: onFileDrop }));
27
+ const file = new File(['Test'], 'example.text', { type: 'text/plain' });
28
+ const fileInput = container.querySelector('input[type="file"]');
29
+ yield userEvent.upload(fileInput, file);
30
+ expect(onFileDrop).toHaveBeenCalled();
31
+ }));
32
+ it('should not call onFileDrop when file type is not accepted', () => __awaiter(void 0, void 0, void 0, function* () {
33
+ const onFileDrop = jest.fn();
34
+ const { container } = render(_jsx(FileDropZone, { "data-testid": "input", allowedFileTypes: { 'text/plain': ['.txt'] }, onFileDrop: onFileDrop }));
35
+ const file = new File(['[]'], 'example.json', { type: 'application/json' });
36
+ const fileInput = container.querySelector('input[type="file"]');
37
+ yield userEvent.upload(fileInput, file);
38
+ expect(onFileDrop).not.toHaveBeenCalled();
39
+ }));
40
+ it('should respect minSize restriction', () => __awaiter(void 0, void 0, void 0, function* () {
41
+ const onAttachRejected = jest.fn();
42
+ const { container } = render(_jsx(FileDropZone, { onFileDrop: jest.fn(), minSize: 1000, onAttachRejected: onAttachRejected }));
43
+ const file = new File(['Test'], 'example.txt', { type: 'text/plain' });
44
+ const fileInput = container.querySelector('input[type="file"]');
45
+ yield userEvent.upload(fileInput, file);
46
+ expect(onAttachRejected).toHaveBeenCalled();
47
+ }));
48
+ it('should respect maxSize restriction', () => __awaiter(void 0, void 0, void 0, function* () {
49
+ const onAttachRejected = jest.fn();
50
+ const { container } = render(_jsx(FileDropZone, { onFileDrop: jest.fn(), maxSize: 100, onAttachRejected: onAttachRejected }));
51
+ const largeContent = 'x'.repeat(200);
52
+ const file = new File([largeContent], 'example.txt', { type: 'text/plain' });
53
+ const fileInput = container.querySelector('input[type="file"]');
54
+ yield userEvent.upload(fileInput, file);
55
+ expect(onAttachRejected).toHaveBeenCalled();
56
+ }));
57
+ it('should respect maxFiles restriction', () => __awaiter(void 0, void 0, void 0, function* () {
58
+ const onAttachRejected = jest.fn();
59
+ const { container } = render(_jsx(FileDropZone, { onFileDrop: jest.fn(), maxFiles: 1, onAttachRejected: onAttachRejected }));
60
+ const files = [
61
+ new File(['Test1'], 'example1.txt', { type: 'text/plain' }),
62
+ new File(['Test2'], 'example2.txt', { type: 'text/plain' })
63
+ ];
64
+ const fileInput = container.querySelector('input[type="file"]');
65
+ yield userEvent.upload(fileInput, files);
66
+ expect(onAttachRejected).toHaveBeenCalled();
67
+ }));
68
+ it('should be disabled when isAttachmentDisabled is true', () => __awaiter(void 0, void 0, void 0, function* () {
69
+ const onFileDrop = jest.fn();
70
+ const { container } = render(_jsx(FileDropZone, { onFileDrop: onFileDrop, isAttachmentDisabled: true }));
71
+ const file = new File(['Test'], 'example.text', { type: 'text/plain' });
72
+ const fileInput = container.querySelector('input[type="file"]');
73
+ yield userEvent.upload(fileInput, file);
74
+ expect(onFileDrop).not.toHaveBeenCalled();
75
+ }));
76
+ it('should call onAttach when files are attached', () => __awaiter(void 0, void 0, void 0, function* () {
77
+ const onAttach = jest.fn();
78
+ const { container } = render(_jsx(FileDropZone, { onFileDrop: jest.fn(), onAttach: onAttach }));
79
+ const file = new File(['Test'], 'example.txt', { type: 'text/plain' });
80
+ const fileInput = container.querySelector('input[type="file"]');
81
+ yield userEvent.upload(fileInput, file);
82
+ expect(onAttach).toHaveBeenCalled();
83
+ }));
84
+ it('should use custom validator when provided', () => __awaiter(void 0, void 0, void 0, function* () {
85
+ const validator = jest.fn().mockReturnValue({ message: 'Custom error' });
86
+ const onAttachRejected = jest.fn();
87
+ const onFileDrop = jest.fn();
88
+ const { container } = render(_jsx(FileDropZone, { onFileDrop: onFileDrop, validator: validator, onAttachRejected: onAttachRejected }));
89
+ const file = new File(['Test'], 'example.txt', { type: 'text/plain' });
90
+ const fileInput = container.querySelector('input[type="file"]');
91
+ yield userEvent.upload(fileInput, file);
92
+ expect(validator).toHaveBeenCalledWith(file);
93
+ expect(onAttachRejected).toHaveBeenCalled();
94
+ }));
14
95
  });
@@ -1,6 +1,6 @@
1
- import React from 'react';
1
+ import type { FunctionComponent } from 'react';
2
2
  export interface LoadingMessageProps {
3
3
  icon?: React.ComponentType;
4
4
  }
5
- export declare const LoadingMessage: React.FunctionComponent<LoadingMessageProps>;
5
+ export declare const LoadingMessage: FunctionComponent<LoadingMessageProps>;
6
6
  export default LoadingMessage;
@@ -1,13 +1,5 @@
1
- import React from 'react';
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Icon, Split, SplitItem } from '@patternfly/react-core';
3
3
  import RobotIcon from '@patternfly/react-icons/dist/js/icons/robot-icon';
4
- export const LoadingMessage = ({ icon: IconComponent = RobotIcon }) => (React.createElement(Split, null,
5
- React.createElement(SplitItem, null,
6
- React.createElement(Icon, { size: "lg", className: "pf-v6-u-mr-sm pf-v6-u-pt-md" },
7
- React.createElement(IconComponent, null))),
8
- React.createElement(SplitItem, { className: "pf-u-background-color-200" },
9
- React.createElement("div", { className: "pf-v6-u-display-flex pf-u-align-items-center" },
10
- React.createElement("div", null, "."),
11
- React.createElement("div", null, "."),
12
- React.createElement("div", null, ".")))));
4
+ export const LoadingMessage = ({ icon: IconComponent = RobotIcon }) => (_jsxs(Split, { children: [_jsx(SplitItem, { children: _jsx(Icon, { size: "lg", className: "pf-v6-u-mr-sm pf-v6-u-pt-md", children: _jsx(IconComponent, {}) }) }), _jsx(SplitItem, { className: "pf-u-background-color-200", children: _jsxs("div", { className: "pf-v6-u-display-flex pf-u-align-items-center", children: [_jsx("div", { children: "." }), _jsx("div", { children: "." }), _jsx("div", { children: "." })] }) })] }));
13
5
  export default LoadingMessage;
@@ -1,14 +1,14 @@
1
- import React from 'react';
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { render, screen } from '@testing-library/react';
3
3
  import '@testing-library/jest-dom';
4
4
  import LoadingMessage from './LoadingMessage';
5
5
  describe('LoadingMessage', () => {
6
6
  it('should render loading message', () => {
7
- const { container } = render(React.createElement(LoadingMessage, null));
7
+ const { container } = render(_jsx(LoadingMessage, {}));
8
8
  expect(container).toMatchSnapshot();
9
9
  });
10
10
  it('should render loading message correctly', () => {
11
- render(React.createElement(LoadingMessage, null));
11
+ render(_jsx(LoadingMessage, {}));
12
12
  expect(screen.getAllByText('.')).toBeTruthy();
13
13
  expect(screen.getAllByText('.')).toHaveLength(3);
14
14
  });
@@ -1,4 +1,21 @@
1
- import React from 'react';
2
- import { ExtraProps } from 'react-markdown';
3
- declare const CodeBlockMessage: ({ children, className, "aria-label": ariaLabel, ...props }: JSX.IntrinsicElements["code"] & ExtraProps) => React.JSX.Element;
1
+ import { ExpandableSectionProps, ExpandableSectionToggleProps } from '@patternfly/react-core';
2
+ export interface CodeBlockMessageProps {
3
+ /** Content rendered in code block */
4
+ children?: React.ReactNode;
5
+ /** Aria label applied to code block */
6
+ 'aria-label'?: string;
7
+ /** Class name applied to code block */
8
+ className?: string;
9
+ /** Whether code block is expandable */
10
+ isExpandable?: boolean;
11
+ /** Additional props passed to expandable section if isExpandable is applied */
12
+ expandableSectionProps?: Omit<ExpandableSectionProps, 'ref'>;
13
+ /** Additional props passed to expandable toggle if isExpandable is applied */
14
+ expandableSectionToggleProps?: ExpandableSectionToggleProps;
15
+ /** Link text applied to expandable toggle when expanded */
16
+ expandedText?: string;
17
+ /** Link text applied to expandable toggle when collapsed */
18
+ collapsedText?: string;
19
+ }
20
+ declare const CodeBlockMessage: ({ children, className, "aria-label": ariaLabel, isExpandable, expandableSectionProps, expandableSectionToggleProps, expandedText, collapsedText, ...props }: CodeBlockMessageProps) => import("react/jsx-runtime").JSX.Element;
4
21
  export default CodeBlockMessage;
@@ -9,30 +9,48 @@ var __rest = (this && this.__rest) || function (s, e) {
9
9
  }
10
10
  return t;
11
11
  };
12
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
12
13
  // ============================================================================
13
14
  // Chatbot Main - Message - Content - Code Block
14
15
  // ============================================================================
15
- import React from 'react';
16
- import SyntaxHighlighter from 'react-syntax-highlighter';
17
- import { obsidian } from 'react-syntax-highlighter/dist/esm/styles/hljs';
16
+ import { useState, useRef, useId, useCallback, useEffect } from 'react';
18
17
  // Import PatternFly components
19
- import { CodeBlock, CodeBlockAction, CodeBlockCode, Button, Tooltip } from '@patternfly/react-core';
18
+ import { CodeBlock, CodeBlockAction, CodeBlockCode, Button, Tooltip, ExpandableSection, ExpandableSectionToggle, ExpandableSectionVariant } from '@patternfly/react-core';
20
19
  import { CheckIcon } from '@patternfly/react-icons/dist/esm/icons/check-icon';
21
20
  import { CopyIcon } from '@patternfly/react-icons/dist/esm/icons/copy-icon';
21
+ const DEFAULT_EXPANDED_TEXT = 'Show less';
22
+ const DEFAULT_COLLAPSED_TEXT = 'Show more';
22
23
  const CodeBlockMessage = (_a) => {
23
24
  var _b;
24
- var { children, className, 'aria-label': ariaLabel } = _a, props = __rest(_a, ["children", "className", 'aria-label']);
25
- const [copied, setCopied] = React.useState(false);
26
- const buttonRef = React.useRef();
27
- const tooltipID = React.useId();
25
+ var { children, className, 'aria-label': ariaLabel, isExpandable = false, expandableSectionProps, expandableSectionToggleProps, expandedText = DEFAULT_EXPANDED_TEXT, collapsedText = DEFAULT_COLLAPSED_TEXT } = _a, props = __rest(_a, ["children", "className", 'aria-label', "isExpandable", "expandableSectionProps", "expandableSectionToggleProps", "expandedText", "collapsedText"]);
26
+ const [copied, setCopied] = useState(false);
27
+ const [isExpanded, setIsExpanded] = useState(false);
28
+ const buttonRef = useRef();
29
+ const tooltipID = useId();
30
+ const toggleId = useId();
31
+ const contentId = useId();
32
+ const codeBlockRef = useRef(null);
28
33
  const language = (_b = /language-(\w+)/.exec(className || '')) === null || _b === void 0 ? void 0 : _b[1];
34
+ // Get custom toggle text from data attributes if available - for use with rehype plugins
35
+ const customExpandedText = props['data-expanded-text'];
36
+ const customCollapsedText = props['data-collapsed-text'];
37
+ const finalExpandedText = customExpandedText || expandedText;
38
+ const finalCollapsedText = customCollapsedText || collapsedText;
39
+ if ((customExpandedText && expandedText !== DEFAULT_EXPANDED_TEXT) ||
40
+ (customCollapsedText && collapsedText !== DEFAULT_COLLAPSED_TEXT)) {
41
+ // eslint-disable-next-line no-console
42
+ console.error('Message:', 'Custom rehype plugins that rely on data-expanded-text or data-collapsed-text will override expandedText and collapsedText props if both are passed in.');
43
+ }
44
+ const onToggle = (isExpanded) => {
45
+ setIsExpanded(isExpanded);
46
+ };
29
47
  // Handle clicking copy button
30
- const handleCopy = React.useCallback((event, text) => {
48
+ const handleCopy = useCallback((event, text) => {
31
49
  navigator.clipboard.writeText(text.toString());
32
50
  setCopied(true);
33
51
  }, []);
34
52
  // Reset copied state
35
- React.useEffect(() => {
53
+ useEffect(() => {
36
54
  if (copied) {
37
55
  const timer = setTimeout(() => {
38
56
  setCopied(false);
@@ -41,16 +59,10 @@ const CodeBlockMessage = (_a) => {
41
59
  }
42
60
  });
43
61
  if (!String(children).includes('\n')) {
44
- return (React.createElement("code", Object.assign({}, props, { className: "pf-chatbot__message-inline-code" }), children));
62
+ return (_jsx("code", Object.assign({}, props, { className: "pf-chatbot__message-inline-code", children: children })));
45
63
  }
46
64
  // Setup code block header
47
- const actions = (React.createElement(React.Fragment, null,
48
- React.createElement(CodeBlockAction, null,
49
- language && React.createElement("div", { className: "pf-chatbot__message-code-block-language" }, language),
50
- React.createElement(Button, { ref: buttonRef, "aria-label": ariaLabel !== null && ariaLabel !== void 0 ? ariaLabel : 'Copy code button', variant: "plain", className: "pf-chatbot__button--copy", onClick: (event) => handleCopy(event, children) }, copied ? React.createElement(CheckIcon, null) : React.createElement(CopyIcon, null)),
51
- React.createElement(Tooltip, { id: tooltipID, content: "Copy", position: "top", triggerRef: buttonRef }))));
52
- return (React.createElement("div", { className: "pf-chatbot__message-code-block" },
53
- React.createElement(CodeBlock, { actions: actions },
54
- React.createElement(CodeBlockCode, null, language ? (React.createElement(SyntaxHighlighter, Object.assign({}, props, { language: language, style: obsidian, PreTag: "div", CodeTag: "div", wrapLongLines: true }), String(children).replace(/\n$/, ''))) : (React.createElement(React.Fragment, null, children))))));
65
+ const actions = (_jsx(_Fragment, { children: _jsxs(CodeBlockAction, { children: [language && _jsx("div", { className: "pf-chatbot__message-code-block-language", children: language }), _jsx(Button, { ref: buttonRef, "aria-label": ariaLabel !== null && ariaLabel !== void 0 ? ariaLabel : 'Copy code', variant: "plain", className: "pf-chatbot__button--copy", onClick: (event) => handleCopy(event, children), children: copied ? _jsx(CheckIcon, {}) : _jsx(CopyIcon, {}) }), _jsx(Tooltip, { id: tooltipID, content: "Copy", position: "top", triggerRef: buttonRef })] }) }));
66
+ return (_jsx("div", { className: "pf-chatbot__message-code-block", ref: codeBlockRef, children: _jsxs(CodeBlock, { actions: actions, children: [_jsx(CodeBlockCode, { children: _jsx(_Fragment, { children: isExpandable ? (_jsx(ExpandableSection, Object.assign({ variant: ExpandableSectionVariant.truncate, isExpanded: isExpanded, isDetached: true, toggleId: toggleId, contentId: contentId }, expandableSectionProps, { children: children }))) : (children) }) }), isExpandable && (_jsx(ExpandableSectionToggle, Object.assign({ isExpanded: isExpanded, onToggle: onToggle, direction: "up", toggleId: toggleId, contentId: contentId, hasTruncatedContent: true, className: "pf-chatbot__message-code-toggle" }, expandableSectionToggleProps, { children: isExpanded ? finalExpandedText : finalCollapsedText })))] }) }));
55
67
  };
56
68
  export default CodeBlockMessage;
@@ -1,4 +1,3 @@
1
- import React from 'react';
2
1
  import { AlertProps } from '@patternfly/react-core';
3
- declare const ErrorMessage: ({ title, actionLinks, children, ...props }: AlertProps) => React.JSX.Element;
2
+ declare const ErrorMessage: ({ title, actionLinks, children, ...props }: AlertProps) => import("react/jsx-runtime").JSX.Element;
4
3
  export default ErrorMessage;
@@ -1,6 +1,3 @@
1
- // ============================================================================
2
- // Chatbot Main - Message - Content - Error
3
- // ============================================================================
4
1
  var __rest = (this && this.__rest) || function (s, e) {
5
2
  var t = {};
6
3
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
@@ -12,10 +9,13 @@ var __rest = (this && this.__rest) || function (s, e) {
12
9
  }
13
10
  return t;
14
11
  };
15
- import React from 'react';
12
+ import { jsx as _jsx } from "react/jsx-runtime";
13
+ // ============================================================================
14
+ // Chatbot Main - Message - Content - Error
15
+ // ============================================================================
16
16
  import { Alert } from '@patternfly/react-core';
17
17
  const ErrorMessage = (_a) => {
18
18
  var { title, actionLinks, children } = _a, props = __rest(_a, ["title", "actionLinks", "children"]);
19
- return (React.createElement(Alert, Object.assign({ isInline: true, variant: "danger", title: title, actionLinks: actionLinks }, props), children));
19
+ return (_jsx(Alert, Object.assign({ isInline: true, variant: "danger", title: title, actionLinks: actionLinks }, props, { children: children })));
20
20
  };
21
21
  export default ErrorMessage;
@@ -1,4 +1,3 @@
1
- import React from 'react';
2
1
  import { ExtraProps } from 'react-markdown';
3
- declare const ImageMessage: ({ children, ...props }: JSX.IntrinsicElements["img"] & ExtraProps) => React.JSX.Element;
2
+ declare const ImageMessage: ({ children, ...props }: Omit<JSX.IntrinsicElements["img"], "ref"> & ExtraProps) => import("react/jsx-runtime").JSX.Element;
4
3
  export default ImageMessage;
@@ -1,6 +1,3 @@
1
- // ============================================================================
2
- // Chatbot Main - Message - Content - Image
3
- // ============================================================================
4
1
  var __rest = (this && this.__rest) || function (s, e) {
5
2
  var t = {};
6
3
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
@@ -12,9 +9,9 @@ var __rest = (this && this.__rest) || function (s, e) {
12
9
  }
13
10
  return t;
14
11
  };
15
- import React from 'react';
12
+ import { jsx as _jsx } from "react/jsx-runtime";
16
13
  const ImageMessage = (_a) => {
17
14
  var { children } = _a, props = __rest(_a, ["children"]);
18
- return (React.createElement("img", Object.assign({ className: "pf-chatbot__message-image" }, props), children));
15
+ return (_jsx("img", Object.assign({ className: "pf-chatbot__message-image" }, props, { children: children })));
19
16
  };
20
17
  export default ImageMessage;