@patternfly/chatbot 2.2.0-prerelease.9 → 2.2.0

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 (459) hide show
  1. package/dist/cjs/AttachmentEdit/AttachmentEdit.test.d.ts +1 -0
  2. package/dist/cjs/AttachmentEdit/AttachmentEdit.test.js +52 -0
  3. package/dist/cjs/Chatbot/Chatbot.d.ts +2 -1
  4. package/dist/cjs/Chatbot/Chatbot.js +1 -0
  5. package/dist/cjs/Chatbot/Chatbot.test.d.ts +1 -0
  6. package/dist/cjs/Chatbot/Chatbot.test.js +28 -0
  7. package/dist/cjs/ChatbotAlert/ChatbotAlert.test.d.ts +1 -0
  8. package/dist/cjs/ChatbotAlert/ChatbotAlert.test.js +27 -0
  9. package/dist/cjs/ChatbotContent/ChatbotContent.test.d.ts +1 -0
  10. package/dist/cjs/ChatbotContent/ChatbotContent.test.js +18 -0
  11. package/dist/cjs/ChatbotConversationHistoryNav/ChatbotConversationHistoryDropdown.d.ts +3 -3
  12. package/dist/cjs/ChatbotConversationHistoryNav/ChatbotConversationHistoryDropdown.js +3 -1
  13. package/dist/cjs/ChatbotConversationHistoryNav/ChatbotConversationHistoryNav.d.ts +27 -4
  14. package/dist/cjs/ChatbotConversationHistoryNav/ChatbotConversationHistoryNav.js +24 -12
  15. package/dist/cjs/ChatbotConversationHistoryNav/ChatbotConversationHistoryNav.test.js +99 -3
  16. package/dist/cjs/ChatbotConversationHistoryNav/EmptyState.d.ts +11 -0
  17. package/dist/cjs/ChatbotConversationHistoryNav/EmptyState.js +29 -0
  18. package/dist/cjs/ChatbotConversationHistoryNav/LoadingState.d.ts +4 -0
  19. package/dist/cjs/ChatbotConversationHistoryNav/LoadingState.js +45 -0
  20. package/dist/cjs/ChatbotFooter/ChatbotFooter.test.d.ts +1 -0
  21. package/dist/cjs/ChatbotFooter/ChatbotFooter.test.js +18 -0
  22. package/dist/cjs/ChatbotFooter/ChatbotFooternote.test.d.ts +1 -0
  23. package/dist/cjs/ChatbotFooter/ChatbotFooternote.test.js +87 -0
  24. package/dist/cjs/ChatbotFooter/ChatbotFootnote.d.ts +1 -1
  25. package/dist/cjs/ChatbotFooter/ChatbotFootnote.js +1 -1
  26. package/dist/cjs/ChatbotHeader/ChatbotHeader.test.d.ts +1 -0
  27. package/dist/cjs/ChatbotHeader/ChatbotHeader.test.js +18 -0
  28. package/dist/cjs/ChatbotHeader/ChatbotHeaderActions.test.d.ts +1 -0
  29. package/dist/cjs/ChatbotHeader/ChatbotHeaderActions.test.js +18 -0
  30. package/dist/cjs/ChatbotHeader/ChatbotHeaderCloseButton.js +3 -1
  31. package/dist/cjs/ChatbotHeader/ChatbotHeaderCloseButton.test.d.ts +1 -0
  32. package/dist/cjs/ChatbotHeader/ChatbotHeaderCloseButton.test.js +20 -0
  33. package/dist/cjs/ChatbotHeader/ChatbotHeaderMain.test.d.ts +1 -0
  34. package/dist/cjs/ChatbotHeader/ChatbotHeaderMain.test.js +18 -0
  35. package/dist/cjs/ChatbotHeader/ChatbotHeaderMenu.js +3 -1
  36. package/dist/cjs/ChatbotHeader/ChatbotHeaderMenu.test.d.ts +1 -0
  37. package/dist/cjs/ChatbotHeader/ChatbotHeaderMenu.test.js +20 -0
  38. package/dist/cjs/ChatbotHeader/ChatbotHeaderOptionsDropdown.js +3 -1
  39. package/dist/cjs/ChatbotHeader/ChatbotHeaderOptionsDropdown.test.d.ts +1 -0
  40. package/dist/cjs/ChatbotHeader/ChatbotHeaderOptionsDropdown.test.js +43 -0
  41. package/dist/cjs/ChatbotHeader/ChatbotHeaderSelectorDropdown.js +6 -4
  42. package/dist/cjs/ChatbotHeader/ChatbotHeaderSelectorDropdown.test.d.ts +1 -0
  43. package/dist/cjs/ChatbotHeader/ChatbotHeaderSelectorDropdown.test.js +41 -0
  44. package/dist/cjs/ChatbotHeader/ChatbotHeaderTitle.d.ts +3 -1
  45. package/dist/cjs/ChatbotHeader/ChatbotHeaderTitle.js +4 -2
  46. package/dist/cjs/ChatbotHeader/ChatbotHeaderTitle.test.d.ts +1 -0
  47. package/dist/cjs/ChatbotHeader/ChatbotHeaderTitle.test.js +55 -0
  48. package/dist/cjs/ChatbotToggle/ChatbotToggle.js +3 -1
  49. package/dist/cjs/ChatbotWelcomePrompt/ChatbotWelcomePrompt.test.js +19 -11
  50. package/dist/cjs/Compare/Compare.d.ts +17 -0
  51. package/dist/cjs/Compare/Compare.js +50 -0
  52. package/dist/cjs/Compare/Compare.test.d.ts +1 -0
  53. package/dist/cjs/Compare/Compare.test.js +20 -0
  54. package/dist/cjs/Compare/index.d.ts +2 -0
  55. package/dist/cjs/Compare/index.js +23 -0
  56. package/dist/cjs/Message/ErrorMessage/ErrorMessage.d.ts +4 -0
  57. package/dist/cjs/Message/ErrorMessage/ErrorMessage.js +26 -0
  58. package/dist/cjs/Message/ImageMessage/ImageMessage.d.ts +4 -0
  59. package/dist/cjs/Message/ImageMessage/ImageMessage.js +25 -0
  60. package/dist/cjs/Message/LinkMessage/LinkMessage.d.ts +4 -0
  61. package/dist/cjs/Message/LinkMessage/LinkMessage.js +30 -0
  62. package/dist/cjs/Message/Message.d.ts +35 -8
  63. package/dist/cjs/Message/Message.js +68 -18
  64. package/dist/cjs/Message/Message.test.js +239 -3
  65. package/dist/cjs/Message/QuickResponse/QuickResponse.d.ts +17 -0
  66. package/dist/cjs/Message/QuickResponse/QuickResponse.js +34 -0
  67. package/dist/cjs/Message/TableMessage/TableMessage.d.ts +20 -0
  68. package/dist/cjs/Message/TableMessage/TableMessage.js +67 -0
  69. package/dist/cjs/Message/TableMessage/TbodyMessage.d.ts +7 -0
  70. package/dist/cjs/Message/TableMessage/TbodyMessage.js +33 -0
  71. package/dist/cjs/Message/TableMessage/TdMessage.d.ts +5 -0
  72. package/dist/cjs/Message/TableMessage/TdMessage.js +26 -0
  73. package/dist/cjs/Message/TableMessage/ThMessage.d.ts +5 -0
  74. package/dist/cjs/Message/TableMessage/ThMessage.js +26 -0
  75. package/dist/cjs/Message/TableMessage/TheadMessage.d.ts +5 -0
  76. package/dist/cjs/Message/TableMessage/TheadMessage.js +26 -0
  77. package/dist/cjs/Message/TableMessage/TrMessage.d.ts +7 -0
  78. package/dist/cjs/Message/TableMessage/TrMessage.js +37 -0
  79. package/dist/cjs/Message/TextMessage/TextMessage.d.ts +2 -1
  80. package/dist/cjs/Message/TextMessage/TextMessage.js +2 -2
  81. package/dist/cjs/Message/UserFeedback/CloseButton.d.ts +10 -0
  82. package/dist/cjs/Message/UserFeedback/CloseButton.js +14 -0
  83. package/dist/cjs/Message/UserFeedback/UserFeedback.d.ts +39 -0
  84. package/dist/cjs/Message/UserFeedback/UserFeedback.js +54 -0
  85. package/dist/cjs/Message/UserFeedback/UserFeedback.test.d.ts +1 -0
  86. package/dist/cjs/Message/UserFeedback/UserFeedback.test.js +133 -0
  87. package/dist/cjs/Message/UserFeedback/UserFeedbackComplete.d.ts +42 -0
  88. package/dist/cjs/Message/UserFeedback/UserFeedbackComplete.js +117 -0
  89. package/dist/cjs/Message/UserFeedback/UserFeedbackComplete.test.d.ts +1 -0
  90. package/dist/cjs/Message/UserFeedback/UserFeedbackComplete.test.js +249 -0
  91. package/dist/cjs/MessageBar/AttachButton.js +4 -2
  92. package/dist/cjs/MessageBar/MessageBar.d.ts +11 -4
  93. package/dist/cjs/MessageBar/MessageBar.js +127 -46
  94. package/dist/cjs/MessageBar/MessageBar.test.js +12 -4
  95. package/dist/cjs/MessageBar/MicrophoneButton.d.ts +1 -1
  96. package/dist/cjs/MessageBar/SendButton.js +3 -1
  97. package/dist/cjs/MessageBar/StopButton.js +3 -1
  98. package/dist/cjs/MessageBox/MessageBox.test.d.ts +1 -0
  99. package/dist/cjs/MessageBox/MessageBox.test.js +22 -0
  100. package/dist/cjs/PreviewAttachment/PreviewAttachment.test.d.ts +1 -0
  101. package/dist/cjs/PreviewAttachment/PreviewAttachment.test.js +28 -0
  102. package/dist/cjs/ResponseActions/ResponseActionButton.d.ts +4 -1
  103. package/dist/cjs/ResponseActions/ResponseActionButton.js +21 -6
  104. package/dist/cjs/ResponseActions/ResponseActions.d.ts +8 -2
  105. package/dist/cjs/ResponseActions/ResponseActions.js +7 -7
  106. package/dist/cjs/ResponseActions/ResponseActions.test.js +2 -2
  107. package/dist/cjs/Settings/SettingsForm.test.d.ts +1 -0
  108. package/dist/cjs/Settings/SettingsForm.test.js +26 -0
  109. package/dist/cjs/__mocks__/rehype-external-links.d.ts +2 -0
  110. package/dist/cjs/__mocks__/rehype-external-links.js +4 -0
  111. package/dist/cjs/__mocks__/rehype-sanitize.d.ts +2 -0
  112. package/dist/cjs/__mocks__/rehype-sanitize.js +4 -0
  113. package/dist/cjs/__mocks__/rehype-unwrap-images.d.ts +2 -0
  114. package/dist/cjs/__mocks__/rehype-unwrap-images.js +4 -0
  115. package/dist/cjs/index.d.ts +4 -0
  116. package/dist/cjs/index.js +7 -1
  117. package/dist/cjs/tracking/console_tracking_provider.d.ts +10 -0
  118. package/dist/cjs/tracking/console_tracking_provider.js +27 -0
  119. package/dist/cjs/tracking/index.d.ts +2 -0
  120. package/dist/cjs/tracking/index.js +23 -0
  121. package/dist/cjs/tracking/posthog_tracking_provider.d.ts +9 -0
  122. package/dist/cjs/tracking/posthog_tracking_provider.js +37 -0
  123. package/dist/cjs/tracking/segment_tracking_provider.d.ts +10 -0
  124. package/dist/cjs/tracking/segment_tracking_provider.js +50 -0
  125. package/dist/cjs/tracking/trackingProviderProxy.d.ts +9 -0
  126. package/dist/cjs/tracking/trackingProviderProxy.js +24 -0
  127. package/dist/cjs/tracking/tracking_api.d.ts +8 -0
  128. package/dist/cjs/tracking/tracking_api.js +2 -0
  129. package/dist/cjs/tracking/tracking_registry.d.ts +4 -0
  130. package/dist/cjs/tracking/tracking_registry.js +33 -0
  131. package/dist/cjs/tracking/tracking_spi.d.ts +9 -0
  132. package/dist/cjs/tracking/tracking_spi.js +2 -0
  133. package/dist/cjs/tracking/umami_tracking_provider.d.ts +14 -0
  134. package/dist/cjs/tracking/umami_tracking_provider.js +44 -0
  135. package/dist/css/main.css +420 -148
  136. package/dist/css/main.css.map +1 -1
  137. package/dist/dynamic/Compare/package.json +1 -0
  138. package/dist/dynamic/tracking/package.json +1 -0
  139. package/dist/esm/AttachmentEdit/AttachmentEdit.test.d.ts +1 -0
  140. package/dist/esm/AttachmentEdit/AttachmentEdit.test.js +47 -0
  141. package/dist/esm/Chatbot/Chatbot.d.ts +2 -1
  142. package/dist/esm/Chatbot/Chatbot.js +1 -0
  143. package/dist/esm/Chatbot/Chatbot.test.d.ts +1 -0
  144. package/dist/esm/Chatbot/Chatbot.test.js +23 -0
  145. package/dist/esm/ChatbotAlert/ChatbotAlert.test.d.ts +1 -0
  146. package/dist/esm/ChatbotAlert/ChatbotAlert.test.js +22 -0
  147. package/dist/esm/ChatbotContent/ChatbotContent.test.d.ts +1 -0
  148. package/dist/esm/ChatbotContent/ChatbotContent.test.js +13 -0
  149. package/dist/esm/ChatbotConversationHistoryNav/ChatbotConversationHistoryDropdown.d.ts +3 -3
  150. package/dist/esm/ChatbotConversationHistoryNav/ChatbotConversationHistoryDropdown.js +3 -1
  151. package/dist/esm/ChatbotConversationHistoryNav/ChatbotConversationHistoryNav.d.ts +27 -4
  152. package/dist/esm/ChatbotConversationHistoryNav/ChatbotConversationHistoryNav.js +24 -12
  153. package/dist/esm/ChatbotConversationHistoryNav/ChatbotConversationHistoryNav.test.js +99 -3
  154. package/dist/esm/ChatbotConversationHistoryNav/EmptyState.d.ts +11 -0
  155. package/dist/esm/ChatbotConversationHistoryNav/EmptyState.js +22 -0
  156. package/dist/esm/ChatbotConversationHistoryNav/LoadingState.d.ts +4 -0
  157. package/dist/esm/ChatbotConversationHistoryNav/LoadingState.js +38 -0
  158. package/dist/esm/ChatbotFooter/ChatbotFooter.test.d.ts +1 -0
  159. package/dist/esm/ChatbotFooter/ChatbotFooter.test.js +13 -0
  160. package/dist/esm/ChatbotFooter/ChatbotFooternote.test.d.ts +1 -0
  161. package/dist/esm/ChatbotFooter/ChatbotFooternote.test.js +82 -0
  162. package/dist/esm/ChatbotFooter/ChatbotFootnote.d.ts +1 -1
  163. package/dist/esm/ChatbotFooter/ChatbotFootnote.js +1 -1
  164. package/dist/esm/ChatbotHeader/ChatbotHeader.test.d.ts +1 -0
  165. package/dist/esm/ChatbotHeader/ChatbotHeader.test.js +13 -0
  166. package/dist/esm/ChatbotHeader/ChatbotHeaderActions.test.d.ts +1 -0
  167. package/dist/esm/ChatbotHeader/ChatbotHeaderActions.test.js +13 -0
  168. package/dist/esm/ChatbotHeader/ChatbotHeaderCloseButton.js +3 -1
  169. package/dist/esm/ChatbotHeader/ChatbotHeaderCloseButton.test.d.ts +1 -0
  170. package/dist/esm/ChatbotHeader/ChatbotHeaderCloseButton.test.js +15 -0
  171. package/dist/esm/ChatbotHeader/ChatbotHeaderMain.test.d.ts +1 -0
  172. package/dist/esm/ChatbotHeader/ChatbotHeaderMain.test.js +13 -0
  173. package/dist/esm/ChatbotHeader/ChatbotHeaderMenu.js +3 -1
  174. package/dist/esm/ChatbotHeader/ChatbotHeaderMenu.test.d.ts +1 -0
  175. package/dist/esm/ChatbotHeader/ChatbotHeaderMenu.test.js +15 -0
  176. package/dist/esm/ChatbotHeader/ChatbotHeaderOptionsDropdown.js +3 -1
  177. package/dist/esm/ChatbotHeader/ChatbotHeaderOptionsDropdown.test.d.ts +1 -0
  178. package/dist/esm/ChatbotHeader/ChatbotHeaderOptionsDropdown.test.js +38 -0
  179. package/dist/esm/ChatbotHeader/ChatbotHeaderSelectorDropdown.js +6 -4
  180. package/dist/esm/ChatbotHeader/ChatbotHeaderSelectorDropdown.test.d.ts +1 -0
  181. package/dist/esm/ChatbotHeader/ChatbotHeaderSelectorDropdown.test.js +36 -0
  182. package/dist/esm/ChatbotHeader/ChatbotHeaderTitle.d.ts +3 -1
  183. package/dist/esm/ChatbotHeader/ChatbotHeaderTitle.js +4 -2
  184. package/dist/esm/ChatbotHeader/ChatbotHeaderTitle.test.d.ts +1 -0
  185. package/dist/esm/ChatbotHeader/ChatbotHeaderTitle.test.js +50 -0
  186. package/dist/esm/ChatbotToggle/ChatbotToggle.js +3 -1
  187. package/dist/esm/ChatbotWelcomePrompt/ChatbotWelcomePrompt.test.js +19 -11
  188. package/dist/esm/Compare/Compare.d.ts +17 -0
  189. package/dist/esm/Compare/Compare.js +43 -0
  190. package/dist/esm/Compare/Compare.test.d.ts +1 -0
  191. package/dist/esm/Compare/Compare.test.js +15 -0
  192. package/dist/esm/Compare/index.d.ts +2 -0
  193. package/dist/esm/Compare/index.js +2 -0
  194. package/dist/esm/Message/ErrorMessage/ErrorMessage.d.ts +4 -0
  195. package/dist/esm/Message/ErrorMessage/ErrorMessage.js +21 -0
  196. package/dist/esm/Message/ImageMessage/ImageMessage.d.ts +4 -0
  197. package/dist/esm/Message/ImageMessage/ImageMessage.js +20 -0
  198. package/dist/esm/Message/LinkMessage/LinkMessage.d.ts +4 -0
  199. package/dist/esm/Message/LinkMessage/LinkMessage.js +25 -0
  200. package/dist/esm/Message/Message.d.ts +35 -8
  201. package/dist/esm/Message/Message.js +66 -16
  202. package/dist/esm/Message/Message.test.js +239 -3
  203. package/dist/esm/Message/QuickResponse/QuickResponse.d.ts +17 -0
  204. package/dist/esm/Message/QuickResponse/QuickResponse.js +27 -0
  205. package/dist/esm/Message/TableMessage/TableMessage.d.ts +20 -0
  206. package/dist/esm/Message/TableMessage/TableMessage.js +62 -0
  207. package/dist/esm/Message/TableMessage/TbodyMessage.d.ts +7 -0
  208. package/dist/esm/Message/TableMessage/TbodyMessage.js +28 -0
  209. package/dist/esm/Message/TableMessage/TdMessage.d.ts +5 -0
  210. package/dist/esm/Message/TableMessage/TdMessage.js +21 -0
  211. package/dist/esm/Message/TableMessage/ThMessage.d.ts +5 -0
  212. package/dist/esm/Message/TableMessage/ThMessage.js +21 -0
  213. package/dist/esm/Message/TableMessage/TheadMessage.d.ts +5 -0
  214. package/dist/esm/Message/TableMessage/TheadMessage.js +21 -0
  215. package/dist/esm/Message/TableMessage/TrMessage.d.ts +7 -0
  216. package/dist/esm/Message/TableMessage/TrMessage.js +32 -0
  217. package/dist/esm/Message/TextMessage/TextMessage.d.ts +2 -1
  218. package/dist/esm/Message/TextMessage/TextMessage.js +3 -3
  219. package/dist/esm/Message/UserFeedback/CloseButton.d.ts +10 -0
  220. package/dist/esm/Message/UserFeedback/CloseButton.js +9 -0
  221. package/dist/esm/Message/UserFeedback/UserFeedback.d.ts +39 -0
  222. package/dist/esm/Message/UserFeedback/UserFeedback.js +49 -0
  223. package/dist/esm/Message/UserFeedback/UserFeedback.test.d.ts +1 -0
  224. package/dist/esm/Message/UserFeedback/UserFeedback.test.js +128 -0
  225. package/dist/esm/Message/UserFeedback/UserFeedbackComplete.d.ts +42 -0
  226. package/dist/esm/Message/UserFeedback/UserFeedbackComplete.js +112 -0
  227. package/dist/esm/Message/UserFeedback/UserFeedbackComplete.test.d.ts +1 -0
  228. package/dist/esm/Message/UserFeedback/UserFeedbackComplete.test.js +244 -0
  229. package/dist/esm/MessageBar/AttachButton.js +4 -2
  230. package/dist/esm/MessageBar/MessageBar.d.ts +11 -4
  231. package/dist/esm/MessageBar/MessageBar.js +127 -46
  232. package/dist/esm/MessageBar/MessageBar.test.js +12 -4
  233. package/dist/esm/MessageBar/MicrophoneButton.d.ts +1 -1
  234. package/dist/esm/MessageBar/SendButton.js +3 -1
  235. package/dist/esm/MessageBar/StopButton.js +3 -1
  236. package/dist/esm/MessageBox/MessageBox.test.d.ts +1 -0
  237. package/dist/esm/MessageBox/MessageBox.test.js +17 -0
  238. package/dist/esm/PreviewAttachment/PreviewAttachment.test.d.ts +1 -0
  239. package/dist/esm/PreviewAttachment/PreviewAttachment.test.js +23 -0
  240. package/dist/esm/ResponseActions/ResponseActionButton.d.ts +4 -1
  241. package/dist/esm/ResponseActions/ResponseActionButton.js +18 -3
  242. package/dist/esm/ResponseActions/ResponseActions.d.ts +8 -2
  243. package/dist/esm/ResponseActions/ResponseActions.js +7 -7
  244. package/dist/esm/ResponseActions/ResponseActions.test.js +2 -2
  245. package/dist/esm/Settings/SettingsForm.test.d.ts +1 -0
  246. package/dist/esm/Settings/SettingsForm.test.js +21 -0
  247. package/dist/esm/__mocks__/rehype-external-links.d.ts +2 -0
  248. package/dist/esm/__mocks__/rehype-external-links.js +2 -0
  249. package/dist/esm/__mocks__/rehype-sanitize.d.ts +2 -0
  250. package/dist/esm/__mocks__/rehype-sanitize.js +2 -0
  251. package/dist/esm/__mocks__/rehype-unwrap-images.d.ts +2 -0
  252. package/dist/esm/__mocks__/rehype-unwrap-images.js +2 -0
  253. package/dist/esm/index.d.ts +4 -0
  254. package/dist/esm/index.js +4 -0
  255. package/dist/esm/tracking/console_tracking_provider.d.ts +10 -0
  256. package/dist/esm/tracking/console_tracking_provider.js +23 -0
  257. package/dist/esm/tracking/index.d.ts +2 -0
  258. package/dist/esm/tracking/index.js +2 -0
  259. package/dist/esm/tracking/posthog_tracking_provider.d.ts +9 -0
  260. package/dist/esm/tracking/posthog_tracking_provider.js +33 -0
  261. package/dist/esm/tracking/segment_tracking_provider.d.ts +10 -0
  262. package/dist/esm/tracking/segment_tracking_provider.js +46 -0
  263. package/dist/esm/tracking/trackingProviderProxy.d.ts +9 -0
  264. package/dist/esm/tracking/trackingProviderProxy.js +22 -0
  265. package/dist/esm/tracking/tracking_api.d.ts +8 -0
  266. package/dist/esm/tracking/tracking_api.js +1 -0
  267. package/dist/esm/tracking/tracking_registry.d.ts +4 -0
  268. package/dist/esm/tracking/tracking_registry.js +26 -0
  269. package/dist/esm/tracking/tracking_spi.d.ts +9 -0
  270. package/dist/esm/tracking/tracking_spi.js +1 -0
  271. package/dist/esm/tracking/umami_tracking_provider.d.ts +14 -0
  272. package/dist/esm/tracking/umami_tracking_provider.js +40 -0
  273. package/dist/tsconfig.tsbuildinfo +1 -1
  274. package/package.json +8 -3
  275. package/patternfly-docs/content/extensions/chatbot/about-chatbot.md +8 -2
  276. package/patternfly-docs/content/extensions/chatbot/design-guidelines.md +192 -15
  277. package/patternfly-docs/content/extensions/chatbot/examples/Analytics/Analytics.md +219 -0
  278. package/patternfly-docs/content/extensions/chatbot/examples/Messages/AttachmentError.tsx +2 -2
  279. package/patternfly-docs/content/extensions/chatbot/examples/Messages/BotMessage.tsx +214 -12
  280. package/patternfly-docs/content/extensions/chatbot/examples/Messages/FileDropZone.tsx +2 -1
  281. package/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithAttachment.tsx +2 -2
  282. package/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithCustomResponseActions.tsx +1 -1
  283. package/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithFeedback.tsx +71 -0
  284. package/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithFeedbackTimeout.tsx +27 -0
  285. package/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithQuickResponses.tsx +1 -1
  286. package/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithQuickStart.tsx +2 -2
  287. package/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithResponseActions.tsx +1 -1
  288. package/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithSources.tsx +1 -1
  289. package/patternfly-docs/content/extensions/chatbot/examples/Messages/Messages.md +49 -8
  290. package/patternfly-docs/content/extensions/chatbot/examples/Messages/UserMessage.tsx +244 -14
  291. package/patternfly-docs/content/extensions/chatbot/examples/Messages/UserMessageWithExtraContent.tsx +54 -0
  292. package/patternfly-docs/content/extensions/chatbot/examples/UI/ChatbotFooter.tsx +1 -1
  293. package/patternfly-docs/content/extensions/chatbot/examples/UI/ChatbotFootnote.tsx +5 -5
  294. package/patternfly-docs/content/extensions/chatbot/examples/UI/ChatbotHeaderBasic.tsx +1 -1
  295. package/patternfly-docs/content/extensions/chatbot/examples/UI/ChatbotHeaderDrawer.tsx +36 -3
  296. package/patternfly-docs/content/extensions/chatbot/examples/UI/ChatbotHeaderDrawerNavigation.tsx +67 -0
  297. package/patternfly-docs/content/extensions/chatbot/examples/UI/ChatbotHeaderDrawerResizable.tsx +94 -0
  298. package/patternfly-docs/content/extensions/chatbot/examples/UI/ChatbotMessageBarAttach.tsx +1 -1
  299. package/patternfly-docs/content/extensions/chatbot/examples/UI/ChatbotWelcomeInteraction.tsx +1 -1
  300. package/patternfly-docs/content/extensions/chatbot/examples/UI/ChatbotWelcomePrompt.tsx +7 -7
  301. package/patternfly-docs/content/extensions/chatbot/examples/UI/UI.md +21 -6
  302. package/patternfly-docs/content/extensions/chatbot/examples/demos/AttachmentDemos.md +14 -0
  303. package/patternfly-docs/content/extensions/chatbot/examples/demos/Chatbot.md +39 -1
  304. package/patternfly-docs/content/extensions/chatbot/examples/demos/Chatbot.tsx +48 -35
  305. package/patternfly-docs/content/extensions/chatbot/examples/demos/ChatbotAttachment.tsx +2 -2
  306. package/patternfly-docs/content/extensions/chatbot/examples/demos/ChatbotAttachmentMenu.tsx +3 -3
  307. package/patternfly-docs/content/extensions/chatbot/examples/demos/ChatbotInDrawer.tsx +453 -0
  308. package/patternfly-docs/content/extensions/chatbot/examples/demos/EmbeddedChatbot.tsx +11 -11
  309. package/patternfly-docs/content/extensions/chatbot/examples/demos/EmbeddedComparisonChatbot.tsx +206 -0
  310. package/patternfly-docs/content/extensions/chatbot/examples/demos/Feedback.tsx +104 -0
  311. package/patternfly-docs/content/extensions/chatbot/img/ai-action-inpage.svg +85 -0
  312. package/patternfly-docs/content/extensions/chatbot/img/ai-action-message.svg +63 -0
  313. package/patternfly-docs/content/extensions/chatbot/img/analytics-example.svg +127 -0
  314. package/patternfly-docs/content/extensions/chatbot/img/attached-file.svg +24 -29
  315. package/patternfly-docs/content/extensions/chatbot/img/attachment-menu.svg +4 -4
  316. package/patternfly-docs/content/extensions/chatbot/img/attachment-unsent.svg +30 -58
  317. package/patternfly-docs/content/extensions/chatbot/img/chatbot-analytics.svg +51 -0
  318. package/patternfly-docs/content/extensions/chatbot/img/chatbot-elements.svg +11 -12
  319. package/patternfly-docs/content/extensions/chatbot/img/chatbot-quickstarts-tile.svg +58 -0
  320. package/patternfly-docs/content/extensions/chatbot/img/chatbot-settings.svg +83 -0
  321. package/patternfly-docs/content/extensions/chatbot/img/comparison.svg +45 -0
  322. package/patternfly-docs/content/extensions/chatbot/img/conversation-history.svg +6 -29
  323. package/patternfly-docs/content/extensions/chatbot/img/docked.svg +259 -241
  324. package/patternfly-docs/content/extensions/chatbot/img/drawer.svg +255 -0
  325. package/patternfly-docs/content/extensions/chatbot/img/error-state.svg +30 -0
  326. package/patternfly-docs/content/extensions/chatbot/img/feedback-form.svg +88 -0
  327. package/patternfly-docs/content/extensions/chatbot/img/footnote.svg +1 -1
  328. package/patternfly-docs/content/extensions/chatbot/img/fullscreen.svg +25 -16
  329. package/patternfly-docs/content/extensions/chatbot/img/listening-pulse.svg +22 -0
  330. package/patternfly-docs/content/extensions/chatbot/img/listening.svg +1 -1
  331. package/patternfly-docs/content/extensions/chatbot/img/loading-state.svg +28 -0
  332. package/patternfly-docs/content/extensions/chatbot/img/masthead-toggle-notification.svg +49 -0
  333. package/patternfly-docs/content/extensions/chatbot/img/masthead-toggle.svg +75 -0
  334. package/patternfly-docs/content/extensions/chatbot/img/message-bar-elements.svg +3 -3
  335. package/patternfly-docs/content/extensions/chatbot/img/message-elements.svg +84 -142
  336. package/patternfly-docs/content/extensions/chatbot/img/message-feedback.svg +52 -0
  337. package/patternfly-docs/content/extensions/chatbot/img/message-responses.svg +54 -0
  338. package/patternfly-docs/content/extensions/chatbot/img/new-chat-emptystate.svg +27 -0
  339. package/patternfly-docs/content/extensions/chatbot/img/no-results-emptystate.svg +27 -0
  340. package/patternfly-docs/content/extensions/chatbot/img/overlay.svg +54 -39
  341. package/patternfly-docs/content/extensions/chatbot/img/posthog.svg +30 -0
  342. package/patternfly-docs/content/extensions/chatbot/img/segment.svg +36 -0
  343. package/patternfly-docs/content/extensions/chatbot/img/settings-menu.svg +122 -0
  344. package/patternfly-docs/content/extensions/chatbot/img/source-tile.svg +62 -0
  345. package/patternfly-docs/content/extensions/chatbot/img/thank-you-card.svg +81 -0
  346. package/patternfly-docs/content/extensions/chatbot/img/toggle-customizations.svg +12 -0
  347. package/patternfly-docs/content/extensions/chatbot/img/toggle-tooltips.svg +38 -0
  348. package/patternfly-docs/content/extensions/chatbot/img/umami.svg +30 -0
  349. package/patternfly-docs/content/extensions/chatbot/img/welcome-elements.svg +82 -0
  350. package/patternfly-docs/content/extensions/chatbot/img/welcome-message.svg +94 -0
  351. package/src/AttachMenu/AttachMenu.scss +1 -1
  352. package/src/AttachmentEdit/AttachmentEdit.test.tsx +55 -0
  353. package/src/Chatbot/Chatbot.scss +20 -1
  354. package/src/Chatbot/Chatbot.test.tsx +31 -0
  355. package/src/Chatbot/Chatbot.tsx +2 -1
  356. package/src/ChatbotAlert/ChatbotAlert.test.tsx +31 -0
  357. package/src/ChatbotContent/ChatbotContent.scss +1 -0
  358. package/src/ChatbotContent/ChatbotContent.test.tsx +15 -0
  359. package/src/ChatbotConversationHistoryNav/ChatbotConversationHistoryDropdown.tsx +10 -4
  360. package/src/ChatbotConversationHistoryNav/ChatbotConversationHistoryNav.scss +24 -1
  361. package/src/ChatbotConversationHistoryNav/ChatbotConversationHistoryNav.test.tsx +242 -3
  362. package/src/ChatbotConversationHistoryNav/ChatbotConversationHistoryNav.tsx +94 -26
  363. package/src/ChatbotConversationHistoryNav/EmptyState.tsx +44 -0
  364. package/src/ChatbotConversationHistoryNav/LoadingState.tsx +38 -0
  365. package/src/ChatbotFooter/ChatbotFooter.scss +8 -4
  366. package/src/ChatbotFooter/ChatbotFooter.test.tsx +15 -0
  367. package/src/ChatbotFooter/ChatbotFooternote.test.tsx +84 -0
  368. package/src/ChatbotFooter/ChatbotFootnote.tsx +2 -2
  369. package/src/ChatbotHeader/ChatbotHeader.scss +5 -6
  370. package/src/ChatbotHeader/ChatbotHeader.test.tsx +15 -0
  371. package/src/ChatbotHeader/ChatbotHeaderActions.test.tsx +17 -0
  372. package/src/ChatbotHeader/ChatbotHeaderCloseButton.test.tsx +20 -0
  373. package/src/ChatbotHeader/ChatbotHeaderCloseButton.tsx +7 -1
  374. package/src/ChatbotHeader/ChatbotHeaderMain.test.tsx +17 -0
  375. package/src/ChatbotHeader/ChatbotHeaderMenu.test.tsx +19 -0
  376. package/src/ChatbotHeader/ChatbotHeaderMenu.tsx +7 -1
  377. package/src/ChatbotHeader/ChatbotHeaderOptionsDropdown.test.tsx +45 -0
  378. package/src/ChatbotHeader/ChatbotHeaderOptionsDropdown.tsx +8 -1
  379. package/src/ChatbotHeader/ChatbotHeaderSelectorDropdown.test.tsx +43 -0
  380. package/src/ChatbotHeader/ChatbotHeaderSelectorDropdown.tsx +11 -4
  381. package/src/ChatbotHeader/ChatbotHeaderTitle.test.tsx +75 -0
  382. package/src/ChatbotHeader/ChatbotHeaderTitle.tsx +7 -2
  383. package/src/ChatbotModal/ChatbotModal.scss +12 -12
  384. package/src/ChatbotToggle/ChatbotToggle.tsx +6 -1
  385. package/src/ChatbotWelcomePrompt/ChatbotWelcomePrompt.scss +2 -0
  386. package/src/ChatbotWelcomePrompt/ChatbotWelcomePrompt.test.tsx +26 -18
  387. package/src/ChatbotWelcomePrompt/__snapshots__/ChatbotWelcomePrompt.test.tsx.snap +2 -2
  388. package/src/CodeModal/CodeModal.scss +7 -4
  389. package/src/Compare/Compare.scss +72 -0
  390. package/src/Compare/Compare.test.tsx +31 -0
  391. package/src/Compare/Compare.tsx +98 -0
  392. package/src/Compare/index.ts +2 -0
  393. package/src/FileDetails/FileDetails.scss +1 -1
  394. package/src/FileDetailsLabel/FileDetailsLabel.scss +2 -2
  395. package/src/Message/CodeBlockMessage/CodeBlockMessage.scss +4 -4
  396. package/src/Message/ErrorMessage/ErrorMessage.tsx +14 -0
  397. package/src/Message/ImageMessage/ImageMessage.scss +9 -0
  398. package/src/Message/ImageMessage/ImageMessage.tsx +14 -0
  399. package/src/Message/LinkMessage/LinkMessage.tsx +34 -0
  400. package/src/Message/ListMessage/ListMessage.scss +6 -6
  401. package/src/Message/Message.scss +4 -26
  402. package/src/Message/Message.test.tsx +313 -3
  403. package/src/Message/Message.tsx +130 -31
  404. package/src/Message/MessageLoading.scss +2 -2
  405. package/src/Message/QuickResponse/QuickResponse.scss +33 -0
  406. package/src/Message/QuickResponse/QuickResponse.tsx +54 -0
  407. package/src/Message/QuickStarts/QuickStartTile.scss +0 -1
  408. package/src/Message/TableMessage/TableMessage.scss +23 -0
  409. package/src/Message/TableMessage/TableMessage.tsx +83 -0
  410. package/src/Message/TableMessage/TbodyMessage.tsx +20 -0
  411. package/src/Message/TableMessage/TdMessage.tsx +11 -0
  412. package/src/Message/TableMessage/ThMessage.tsx +11 -0
  413. package/src/Message/TableMessage/TheadMessage.tsx +11 -0
  414. package/src/Message/TableMessage/TrMessage.tsx +27 -0
  415. package/src/Message/TextMessage/TextMessage.scss +21 -12
  416. package/src/Message/TextMessage/TextMessage.tsx +3 -3
  417. package/src/Message/UserFeedback/CloseButton.tsx +21 -0
  418. package/src/Message/UserFeedback/UserFeedback.scss +53 -0
  419. package/src/Message/UserFeedback/UserFeedback.test.tsx +236 -0
  420. package/src/Message/UserFeedback/UserFeedback.tsx +128 -0
  421. package/src/Message/UserFeedback/UserFeedbackComplete.test.tsx +255 -0
  422. package/src/Message/UserFeedback/UserFeedbackComplete.tsx +211 -0
  423. package/src/MessageBar/AttachButton.scss +19 -3
  424. package/src/MessageBar/AttachButton.tsx +3 -1
  425. package/src/MessageBar/MessageBar.scss +58 -24
  426. package/src/MessageBar/MessageBar.test.tsx +12 -4
  427. package/src/MessageBar/MessageBar.tsx +164 -65
  428. package/src/MessageBar/MicrophoneButton.scss +8 -8
  429. package/src/MessageBar/MicrophoneButton.tsx +1 -1
  430. package/src/MessageBar/SendButton.tsx +2 -0
  431. package/src/MessageBar/StopButton.scss +17 -3
  432. package/src/MessageBar/StopButton.tsx +2 -0
  433. package/src/MessageBox/JumpButton.scss +6 -6
  434. package/src/MessageBox/MessageBox.scss +1 -0
  435. package/src/MessageBox/MessageBox.test.tsx +26 -0
  436. package/src/PreviewAttachment/PreviewAttachment.test.tsx +51 -0
  437. package/src/ResponseActions/ResponseActionButton.tsx +14 -2
  438. package/src/ResponseActions/ResponseActions.scss +2 -2
  439. package/src/ResponseActions/ResponseActions.test.tsx +4 -2
  440. package/src/ResponseActions/ResponseActions.tsx +26 -2
  441. package/src/Settings/Settings.scss +2 -2
  442. package/src/Settings/SettingsForm.test.tsx +28 -0
  443. package/src/SourceDetailsMenuItem/SourceDetailsMenuItem.scss +2 -2
  444. package/src/SourcesCard/SourcesCard.scss +9 -3
  445. package/src/TermsOfUse/TermsOfUse.scss +1 -1
  446. package/src/__mocks__/rehype-external-links.ts +3 -0
  447. package/src/__mocks__/rehype-sanitize.ts +3 -0
  448. package/src/__mocks__/rehype-unwrap-images.tsx +3 -0
  449. package/src/index.ts +6 -0
  450. package/src/main.scss +5 -6
  451. package/src/tracking/console_tracking_provider.ts +30 -0
  452. package/src/tracking/index.ts +3 -0
  453. package/src/tracking/posthog_tracking_provider.ts +42 -0
  454. package/src/tracking/segment_tracking_provider.ts +62 -0
  455. package/src/tracking/trackingProviderProxy.ts +28 -0
  456. package/src/tracking/tracking_api.ts +11 -0
  457. package/src/tracking/tracking_registry.ts +33 -0
  458. package/src/tracking/tracking_spi.ts +14 -0
  459. package/src/tracking/umami_tracking_provider.ts +54 -0
@@ -0,0 +1,33 @@
1
+ import { posthog } from 'posthog-js';
2
+ export class PosthogTrackingProvider {
3
+ getKey() {
4
+ return 'posthogKey';
5
+ }
6
+ initialize(props) {
7
+ // eslint-disable-next-line no-console
8
+ console.log('PosthogProvider initialize');
9
+ const posthogKey = props.posthogKey;
10
+ posthog.init(posthogKey, {
11
+ // eslint-disable-next-line camelcase
12
+ api_host: 'https://us.i.posthog.com',
13
+ // eslint-disable-next-line camelcase
14
+ person_profiles: 'identified_only' // or 'always' to create profiles for anonymous users as well
15
+ });
16
+ }
17
+ identify(userID) {
18
+ // eslint-disable-next-line no-console
19
+ console.log('PosthogProvider userID: ' + userID);
20
+ posthog.identify(userID);
21
+ }
22
+ trackPageView(url) {
23
+ // eslint-disable-next-line no-console
24
+ console.log('PostHogProvider url', url);
25
+ // TODO posthog seems to record that automatically.
26
+ // How to not clash with this here? Just leave as no-op?
27
+ }
28
+ trackSingleItem(item, properties) {
29
+ // eslint-disable-next-line no-console
30
+ console.log('PosthogProvider: trackSingleItem' + item, properties);
31
+ posthog.capture(item, { properties });
32
+ }
33
+ }
@@ -0,0 +1,10 @@
1
+ import { TrackingApi, TrackingEventProperties } from './tracking_api';
2
+ import { InitProps, TrackingSpi } from './tracking_spi';
3
+ export declare class SegmentTrackingProvider implements TrackingSpi, TrackingApi {
4
+ private analytics;
5
+ getKey(): string;
6
+ initialize(props: InitProps): void;
7
+ identify(userID: string): void;
8
+ trackPageView(url: string | undefined): void;
9
+ trackSingleItem(item: string, properties?: TrackingEventProperties): void;
10
+ }
@@ -0,0 +1,46 @@
1
+ import { AnalyticsBrowser } from '@segment/analytics-next';
2
+ export class SegmentTrackingProvider {
3
+ getKey() {
4
+ return 'segmentKey';
5
+ }
6
+ initialize(props) {
7
+ // eslint-disable-next-line no-console
8
+ console.log('SegmentProvider initialize');
9
+ const segmentKey = props.segmentKey;
10
+ // We need to create an object here, as ts lint is unhappy otherwise
11
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
12
+ const integrations = props.segmentIntegrations;
13
+ this.analytics = AnalyticsBrowser.load({
14
+ writeKey: segmentKey,
15
+ cdnURL: props.segmentCdn
16
+ }, {
17
+ integrations: Object.assign({}, integrations)
18
+ });
19
+ }
20
+ identify(userID) {
21
+ // eslint-disable-next-line no-console
22
+ console.log('SegmentProvider userID: ' + userID);
23
+ if (this.analytics) {
24
+ this.analytics.identify(userID);
25
+ }
26
+ }
27
+ trackPageView(url) {
28
+ // eslint-disable-next-line no-console
29
+ console.log('SegmentProvider url', url);
30
+ if (this.analytics) {
31
+ if (url) {
32
+ this.analytics.page(url);
33
+ }
34
+ else {
35
+ this.analytics.page(); // Uses window.url
36
+ }
37
+ }
38
+ }
39
+ trackSingleItem(item, properties) {
40
+ // eslint-disable-next-line no-console
41
+ console.log('SegmentProvider: trackSingleItem' + item, properties);
42
+ if (this.analytics) {
43
+ this.analytics.track(item, { properties });
44
+ }
45
+ }
46
+ }
@@ -0,0 +1,9 @@
1
+ import { TrackingApi, TrackingEventProperties } from './tracking_api';
2
+ declare class TrackingProviderProxy implements TrackingApi {
3
+ providers: TrackingApi[];
4
+ constructor(providers: TrackingApi[]);
5
+ identify(userID: string): void;
6
+ trackSingleItem(eventName: string, properties?: TrackingEventProperties): void;
7
+ trackPageView(url: string | undefined): void;
8
+ }
9
+ export default TrackingProviderProxy;
@@ -0,0 +1,22 @@
1
+ class TrackingProviderProxy {
2
+ constructor(providers) {
3
+ this.providers = [];
4
+ this.providers = providers;
5
+ }
6
+ identify(userID) {
7
+ for (const provider of this.providers) {
8
+ provider.identify(userID);
9
+ }
10
+ }
11
+ trackSingleItem(eventName, properties) {
12
+ for (const provider of this.providers) {
13
+ provider.trackSingleItem(eventName, properties);
14
+ }
15
+ }
16
+ trackPageView(url) {
17
+ for (const provider of this.providers) {
18
+ provider.trackPageView(url);
19
+ }
20
+ }
21
+ }
22
+ export default TrackingProviderProxy;
@@ -0,0 +1,8 @@
1
+ export interface TrackingEventProperties {
2
+ [key: string]: string | number | boolean | undefined;
3
+ }
4
+ export interface TrackingApi {
5
+ identify: (userID: string) => void;
6
+ trackPageView: (url: string | undefined) => void;
7
+ trackSingleItem: (eventName: string, properties: TrackingEventProperties | undefined) => void;
8
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,4 @@
1
+ import { InitProps } from './tracking_spi';
2
+ import { TrackingApi } from './tracking_api';
3
+ export declare const getTrackingProviders: (initProps: InitProps) => TrackingApi;
4
+ export default getTrackingProviders;
@@ -0,0 +1,26 @@
1
+ import TrackingProviderProxy from './trackingProviderProxy';
2
+ import { ConsoleTrackingProvider } from './console_tracking_provider';
3
+ import { SegmentTrackingProvider } from './segment_tracking_provider';
4
+ import { PosthogTrackingProvider } from './posthog_tracking_provider';
5
+ import { UmamiTrackingProvider } from './umami_tracking_provider';
6
+ export const getTrackingProviders = (initProps) => {
7
+ const providers = [];
8
+ providers.push(new SegmentTrackingProvider());
9
+ providers.push(new PosthogTrackingProvider());
10
+ providers.push(new UmamiTrackingProvider());
11
+ // TODO dynamically find and register providers
12
+ // Initialize them
13
+ const enabledProviders = [];
14
+ for (const provider of providers) {
15
+ const key = provider.getKey();
16
+ if (Object.keys(initProps).indexOf(key) > -1) {
17
+ provider.initialize(initProps);
18
+ enabledProviders.push(provider);
19
+ }
20
+ }
21
+ // Add the console provider
22
+ const consoleTrackingProvider = new ConsoleTrackingProvider();
23
+ enabledProviders.push(consoleTrackingProvider); // TODO noop- provider?
24
+ return new TrackingProviderProxy(enabledProviders);
25
+ };
26
+ export default getTrackingProviders;
@@ -0,0 +1,9 @@
1
+ import { TrackingApi, TrackingEventProperties } from './tracking_api';
2
+ export interface InitProps {
3
+ [key: string]: string | number | boolean;
4
+ }
5
+ export interface TrackingSpi extends TrackingApi {
6
+ getKey: () => string;
7
+ initialize: (props: InitProps) => void;
8
+ trackSingleItem: (item: string, properties?: TrackingEventProperties) => void;
9
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,14 @@
1
+ import { InitProps, TrackingSpi } from './tracking_spi';
2
+ import { TrackingApi, TrackingEventProperties } from './tracking_api';
3
+ declare global {
4
+ interface Window {
5
+ umami: any;
6
+ }
7
+ }
8
+ export declare class UmamiTrackingProvider implements TrackingSpi, TrackingApi {
9
+ getKey(): string;
10
+ initialize(props: InitProps): void;
11
+ identify(userID: string): void;
12
+ trackPageView(url: string | undefined): void;
13
+ trackSingleItem(item: string, properties?: TrackingEventProperties): void;
14
+ }
@@ -0,0 +1,40 @@
1
+ export class UmamiTrackingProvider {
2
+ getKey() {
3
+ return 'umamiKey';
4
+ }
5
+ initialize(props) {
6
+ // eslint-disable-next-line no-console
7
+ console.log('UmamiProvider initialize');
8
+ const umamiKey = props.umamiKey;
9
+ const hostUrl = props.umamiHostUrl;
10
+ const script = document.createElement('script');
11
+ script.src = hostUrl + '/script.js';
12
+ script.async = true;
13
+ script.defer = true;
14
+ // Configure Umami properties
15
+ script.setAttribute('data-website-id', umamiKey);
16
+ script.setAttribute('data-domains', 'localhost'); // TODO ?
17
+ script.setAttribute('data-auto-track', 'false');
18
+ script.setAttribute('data-host-url', hostUrl); // TODO ?
19
+ script.setAttribute('data-exclude-search', 'false'); // TODO ?
20
+ document.body.appendChild(script);
21
+ }
22
+ identify(userID) {
23
+ var _a;
24
+ // eslint-disable-next-line no-console
25
+ console.log('UmamiProvider userID: ' + userID);
26
+ (_a = window.umami) === null || _a === void 0 ? void 0 : _a.identify({ userID });
27
+ }
28
+ trackPageView(url) {
29
+ var _a;
30
+ // eslint-disable-next-line no-console
31
+ console.log('UmamiProvider url', url);
32
+ (_a = window.umami) === null || _a === void 0 ? void 0 : _a.track({ url });
33
+ }
34
+ trackSingleItem(item, properties) {
35
+ var _a;
36
+ // eslint-disable-next-line no-console
37
+ console.log('UmamiProvider: trackSingleItem' + item, properties);
38
+ (_a = window.umami) === null || _a === void 0 ? void 0 : _a.track(item, properties);
39
+ }
40
+ }
@@ -1 +1 @@
1
- {"root":["../src/index.ts","../src/AttachMenu/AttachMenu.tsx","../src/AttachMenu/index.ts","../src/AttachmentEdit/AttachmentEdit.tsx","../src/AttachmentEdit/index.ts","../src/Chatbot/Chatbot.tsx","../src/Chatbot/index.ts","../src/ChatbotAlert/ChatbotAlert.tsx","../src/ChatbotAlert/index.ts","../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/index.ts","../src/ChatbotFooter/ChatbotFooter.tsx","../src/ChatbotFooter/ChatbotFootnote.tsx","../src/ChatbotFooter/index.ts","../src/ChatbotHeader/ChatbotHeader.tsx","../src/ChatbotHeader/ChatbotHeaderActions.tsx","../src/ChatbotHeader/ChatbotHeaderCloseButton.tsx","../src/ChatbotHeader/ChatbotHeaderMain.tsx","../src/ChatbotHeader/ChatbotHeaderMenu.tsx","../src/ChatbotHeader/ChatbotHeaderOptionsDropdown.tsx","../src/ChatbotHeader/ChatbotHeaderSelectorDropdown.tsx","../src/ChatbotHeader/ChatbotHeaderTitle.tsx","../src/ChatbotHeader/index.ts","../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.tsx","../src/CodeModal/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/LoadingMessage/LoadingMessage.test.tsx","../src/LoadingMessage/LoadingMessage.tsx","../src/LoadingMessage/index.ts","../src/Message/Message.test.tsx","../src/Message/Message.tsx","../src/Message/MessageLoading.tsx","../src/Message/index.ts","../src/Message/CodeBlockMessage/CodeBlockMessage.tsx","../src/Message/ListMessage/ListItemMessage.tsx","../src/Message/ListMessage/OrderedListMessage.tsx","../src/Message/ListMessage/UnorderedListMessage.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/TextMessage/TextMessage.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.tsx","../src/MessageBox/index.ts","../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.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/TermsOfUse/TermsOfUse.test.tsx","../src/TermsOfUse/TermsOfUse.tsx","../src/TermsOfUse/index.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/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.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.tsx","../src/CodeModal/index.ts","../src/Compare/Compare.test.tsx","../src/Compare/Compare.tsx","../src/Compare/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/LoadingMessage/LoadingMessage.test.tsx","../src/LoadingMessage/LoadingMessage.tsx","../src/LoadingMessage/index.ts","../src/Message/Message.test.tsx","../src/Message/Message.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/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/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/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/TermsOfUse/TermsOfUse.test.tsx","../src/TermsOfUse/TermsOfUse.tsx","../src/TermsOfUse/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"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@patternfly/chatbot",
3
- "version": "2.2.0-prerelease.9",
3
+ "version": "2.2.0",
4
4
  "description": "This library provides React components based on PatternFly 6 that can be used to build chatbots.",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -34,11 +34,17 @@
34
34
  "@patternfly/react-core": "^6.1.0",
35
35
  "@patternfly/react-code-editor": "^6.1.0",
36
36
  "@patternfly/react-icons": "^6.1.0",
37
+ "@patternfly/react-table": "^6.1.0",
38
+ "@segment/analytics-next": "^1.76.0",
39
+ "posthog-js": "^1.194.4",
37
40
  "clsx": "^2.1.0",
38
41
  "framer-motion": "^11.3.28",
39
42
  "react-markdown": "^9.0.1",
40
43
  "react-syntax-highlighter": "^15.5.0",
41
44
  "remark-gfm": "^4.0.0",
45
+ "rehype-unwrap-images": "^1.0.0",
46
+ "rehype-external-links": "^3.0.0",
47
+ "rehype-sanitize": "^6.0.0",
42
48
  "path-browserify": "^1.0.1"
43
49
  },
44
50
  "peerDependencies": {
@@ -46,10 +52,9 @@
46
52
  "react-dom": "^17 || ^18"
47
53
  },
48
54
  "devDependencies": {
49
- "@patternfly/documentation-framework": "^6.5.0",
55
+ "@patternfly/documentation-framework": "6.5.20",
50
56
  "@patternfly/patternfly": "^6.1.0",
51
57
  "@patternfly/patternfly-a11y": "^5.0.0",
52
- "@patternfly/react-table": "^6.1.0",
53
58
  "@types/dom-speech-recognition": "^0.0.4",
54
59
  "@types/react": "^18.2.61",
55
60
  "react": "^18.2.0",
@@ -12,11 +12,13 @@ It is important to leverage AI in a way that improves the experiences of your us
12
12
 
13
13
  _Only use this ChatBot when it adds value to your users' experiences._ Don't use it simply for the sake of novelty—your users will only be excited to interact with a new ChatBot feature if it directly helps them reach their goals.
14
14
 
15
- ## How to use the ChatBot
15
+ ## ChatBot demos
16
16
 
17
- To illustrate the capabilities of the ChatBot, we offer a few demos:
17
+ To illustrate the capabilities of the ChatBot, including more complex interaction patterns, we've created these demos:
18
18
  - [Basic ChatBot](/patternfly-ai/chatbot/overview/demo#basic-chatbot)
19
19
  - [Embedded ChatBot](/patternfly-ai/chatbot/overview/demo#embedded-chatbot)
20
+ - [Comparing ChatBots](/patternfly-ai/chatbot/overview/demo/#comparing-chatbots)
21
+ - [Message feedback](/patternfly-ai/chatbot/messages/demo#message-feedback)
20
22
  - [ChatBot attachments via file upload](/patternfly-ai/chatbot/messages/demo#attach-via-upload-button-in-message-bar)
21
23
  - [ChatBot attachments via built-in menu](/patternfly-ai/chatbot/messages/demo#attach-via-menu-of-options-in-message-bar)
22
24
 
@@ -31,8 +33,12 @@ Explore our documentation, which covers both ChatBot UI components and message-r
31
33
  - [Header](/patternfly-ai/chatbot/ui#header)
32
34
  - [Footer](/patternfly-ai/chatbot/ui#footer)
33
35
  - [Navigation](/patternfly-ai/chatbot/ui#navigation)
36
+ - [Modals](/patternfly-ai/chatbot/ui#modals)
34
37
  - Messages
35
38
  - [Bot and user messages](/patternfly-ai/chatbot/messages)
36
39
  - [File attachments](/patternfly-ai/chatbot/messages#attachments)
40
+ - Analytics support
41
+ - [Overview](/patternfly-ai/chatbot/analytics)
42
+
37
43
 
38
44
  We will continue to grow and evolve our ChatBot. If you notice a bug or have any suggestions, feel free to file an issue in our [GitHub repository!](https://github.com/patternfly/chatbot/issues) Make sure to check if there is already a pre-existing issue before creating a new one.
@@ -8,7 +8,7 @@ source: design-guidelines
8
8
 
9
9
  import "./images.css"
10
10
 
11
- ## Elements
11
+ ## Elements
12
12
 
13
13
  <div class="ws-docs-content-img">
14
14
  ![Main elements of a ChatBot.](./img/chatbot-elements.svg)
@@ -16,8 +16,8 @@ import "./images.css"
16
16
 
17
17
  1. **Container:** The window that contains the entire ChatBot experience and all of its components.
18
18
  1. **Header:** A persistent region at the top of the ChatBot window that contains navigation, branding, and actions.
19
- 1. **Navigation:** A menu that contains navigational options, including access to the conversation history.
20
- 1. **Options menu:** Contains display options and other settings. More details can be found in the [ChatBot variations section](#variations).
19
+ 1. **History menu:** A menu that contains a conversation history of previous chats.
20
+ 1. **Options menu:** A menu that contains settings that are relevant to your product. This typically includes display options (more details in the [ChatBot variations section](#variations)) and other general settings (more details in the [ChatBot settings and preferences section](#chatbot-settings-and-preferences)).
21
21
  1. **Messages:** Elements of the conversation between a ChatBot and user. More details can be found in the [message guidelines](#messages).
22
22
  1. **Attachments:** Details about files that a user has uploaded to the ChatBot.
23
23
  1. **Footer:** A persistent region at the bottom of the ChatBot window that contains the message bar and the footnote.
@@ -37,8 +37,88 @@ import "./images.css"
37
37
  1. **Timestamp:** The relative or absolute time that a message was sent.
38
38
  1. **Label:** Labels ChatBot messages as "AI."
39
39
  1. **Quick responses:** Programmable, clickable actions that allow users to quickly answer questions from the ChatBot.
40
- 1. **Sources:** Cards that link to documentation or other external resources. When multiple sources are included, users can paginate through the different options.
41
- 1. **Response actions:** Actions that allow users to interact with a bot message. these typically include providing feedback, copying, sharing, or reading aloud, but [custom message actions](/patternfly-ai/chatbot/messages#custom-message-actions) are also supported.
40
+ 1. **Message actions:** Actions that allow users to interact with a bot message. These typically include providing feedback, copying, sharing, or reading aloud, but [custom message actions](/patternfly-ai/chatbot/messages#custom-message-actions) are also supported. More details for the feedback actions can be found in the [message feedback](#message-feedback) section.
41
+
42
+ #### Welcome message
43
+
44
+ At the start of a new chat, you should welcome your users to the ChatBot with a greeting.
45
+
46
+ If you have user details from their account information, you can personalize this greeting with their username or name. If you don't have this information, or if you'd prefer to not use their personal details, you should instead introduce the ChatBot:
47
+
48
+ <div class="ws-docs-content-img">
49
+ ![Welcome messages.](./img/welcome-message.svg)
50
+ </div>
51
+
52
+ To help users get started quickly, it can also be helpful to include welcome prompts. When selected, these prompts will become the user's first message to the ChatBot, which the bot will immediately begin to reply to. To avoid overloading your users, present no more than 3 prompts at a time.
53
+
54
+ <div class="ws-docs-content-img">
55
+ ![Welcome message with prompts.](./img/welcome-elements.svg)
56
+ </div>
57
+
58
+ #### Source tiles
59
+
60
+ A ChatBot can share relevant sources with users, like documentation that could provide the information a user is searching for. These sources will be contained in a single tile, which users can paginate through and select to navigate to other resources.
61
+
62
+ To provide users with enough context, sources should have descriptive titles and descriptions. The title is limited to 1 line and the body is limited to 2 lines.
63
+
64
+ <div class="ws-docs-content-img">
65
+ ![Bot message that include multiple source tiles.](./img/source-tile.svg)
66
+ </div>
67
+
68
+ #### Quick start tiles
69
+
70
+ A ChatBot can share a link to a [quick start](/extensions/quick-starts) that will help users complete a given task. Users can either select **Start** or the tile's title to initiate the linked quick start.
71
+
72
+ <div class="ws-docs-content-img">
73
+ ![Bot message that links a quick start tile.](./img/chatbot-quickstarts-tile.svg)
74
+ </div>
75
+
76
+ Selecting the quick start title, or the "Start" link can be configured to launch the quick start in a new window, as an interactive bot conversation within the ChatBot window, or as a separate tab within the ChatBot drawer (as shown in this [quick start/ChatBot concept demo](https://quickstart-chatbot-demo.surge.sh/?quickstart=install-app-and-associate-pipeline)).
77
+
78
+ ### Message actions
79
+
80
+ To allow users to interact with bot messages, utilize message actions. Refer to [the message actions React example](/patternfly-ai/chatbot/messages#message-actions) for an interactive visual.
81
+
82
+ The following actions can be used for some of the most common interactions:
83
+
84
+ <div class="ws-docs-content-img">
85
+ ![Default message response actions.](./img/message-responses.svg)
86
+ </div>
87
+
88
+ 1. **Feedback (good response):** Applies a positive rating to the message.
89
+ 1. **Feedback (bad response):** Applies a negative rating to the message.
90
+ 1. **Copy:** Copies the message content to the clipboard.
91
+ 1. **Listen:** Reads the message content out loud.
92
+
93
+ You can also use [custom message actions](/patternfly-ai/chatbot/messages#custom-message-actions) as needed for your particular use case. When using custom actions, be sure to add a tooltip that describes the effect that the action will have. For more information, view [our tooltips guidelines](/ux-writing/tooltips).
94
+
95
+ #### Message feedback
96
+
97
+ A commonly used message response action is rating, which allows users to give feedback on the quality or helpfulness of a bot message. These actions include a thumbs-up icon, for a positive rating, and a thumbs-down icon, for a negative one:
98
+
99
+ <div class="ws-docs-content-img">
100
+ ![A pointer clicking on an action button for a bot message.](./img/message-feedback.svg)
101
+ </div>
102
+
103
+ When users select either of these icons, you should present them with either:
104
+
105
+ 1. A thank-you card that confirms a user's response was received. Even if you don't use a feedback form, you should still display the thank-you card, so that users can be confident their rating went through.
106
+ <br />
107
+ <br />
108
+ <div class="ws-docs-content-img" style="width:75%">
109
+ ![A card displayed beneath a bot message which communicates that feedback was successfully received.](./img/thank-you-card.svg)
110
+ </div>
111
+ 1. A feedback form that collects more details.
112
+ <br />
113
+ <br />
114
+ <div class="ws-docs-content-img" style="width:75%">
115
+ ![A form beneath a bot message asking for more details about a user's feedback.](./img/feedback-form.svg)
116
+ </div>
117
+
118
+ 1. **Close button (optional):** Closes the feedback form. The original feedback response should still be collected.
119
+ 1. **Quick responses:** Options for users to provide more context around their rating. Customize these to make the most sense for your product. You can present positive and negative options based on the response type originally selected.
120
+ 1. **Text area (optional):** Allows users to provide additional written detail if they'd like.
121
+ 1. **Submit button:** Submits the feedback form and triggers the thank-you card.
42
122
 
43
123
  ### Message bar
44
124
 
@@ -52,10 +132,10 @@ To message the ChatBot, users can type directly into the message bar in the foot
52
132
  1. **Use microphone button:** Supports speech recognition to allow users to use voice input. This feature is currently only available in Chrome and Safari.
53
133
  1. **Send button:** Allows users to send a typed message. This button should be disabled until a user has input text.
54
134
 
55
- When a user chooses to use speech input via the microphone button, the button will display an animation to indicate that the ChatBot is listening to the user (as shown in [this speech recognition example](/patternfly-ai/chatbot/ui#message-bar-with-speech-recognition-and-file-attachment)).
135
+ When a user chooses to use speech input via the microphone button, the button will display a pulsing animation to indicate that the ChatBot is listening to the user (as shown in [this speech recognition example](/patternfly-ai/chatbot/ui#message-bar-with-speech-recognition-and-file-attachment)).
56
136
 
57
137
  <div class="ws-docs-content-img">
58
- ![Active listening button in the message bar.](./img/listening.svg)
138
+ ![Animation phases of the listening button in the message bar.](./img/listening-pulse.svg)
59
139
  </div>
60
140
 
61
141
  When a bot is responding (or "streaming") to the user, a stop button will be displayed as the only action in the message bar. Selecting this button will halt the bot's message where it's at.
@@ -114,7 +194,20 @@ Do not use a ChatBot when:
114
194
 
115
195
  ### Accessing a ChatBot
116
196
 
117
- Users can enter a conversation with a ChatBot by clicking on the toggle. Once the ChatBot window opens, the toggle will change to display an "angle down" icon to indicate that clicking the toggle again will minimize the ChatBot. Users can select the toggle at any point in their journey to open and close the ChatBot as needed.
197
+ The ChatBot toggle is the access point for users&mdash;place it in either of the following UI locations:
198
+ - **Floating toggle:** Consistently located in the bottom-right corner of the screen, this persistent button overlays other page content. Use if a masthead toggle would overcomplicate a masthead that already has many utilities.
199
+ - **Masthead toggle:** A button that's integrated as a masthead utility. Use this location if a floating toggle would obscure important content.
200
+
201
+ To help users further identify the toggle, add a "Launch ChatBot" tooltip. You can swap "ChatBot" in the tooltip for your bot's unique name.
202
+
203
+ <div class="ws-docs-content-img">
204
+ ![Tooltips for ChatBot toggle.](./img/toggle-tooltips.svg)
205
+ </div>
206
+
207
+ Whichever method you choose, it is critical to be consistent with the toggle location and refer to the following the additional guidelines for each.
208
+
209
+ #### Floating toggle
210
+ When users click the toggle, the ChatBot window opens and the toggle will change to display an "angle down" icon to indicate that clicking the toggle again will minimize the ChatBot. Users can select the toggle at any point in their journey to open and close the ChatBot as needed.
118
211
 
119
212
  <div class="ws-docs-content-img">
120
213
  ![2 toggles with open and closed icons.](./img/chatbot-toggle.svg)
@@ -126,16 +219,84 @@ When there is an unread message from the ChatBot, a notification badge should be
126
219
  ![Toggle with notification badge.](./img/chatbot-toggle-notification.svg)
127
220
  </div>
128
221
 
129
- ### Using the navigation menu
222
+ If necessary for brand consistency, you can customize the toggle shape and icon.
223
+
224
+ <div class="ws-docs-content-img">
225
+ ![Different toggle shapes and icons.](./img/toggle-customizations.svg)
226
+ </div>
130
227
 
131
- The ChatBot navigation menu primarily contains a users' conversation history with the ChatBot. Clicking the menu icon opens a side drawer in the ChatBot window.
228
+ #### Masthead toggle
132
229
 
133
- By clicking into the navigation menu, users can search through previous conversations and perform additional actions, such as sharing a conversation with others.
230
+ When the ChatBot toggle is a masthead utility, use the fa-comments icon:
231
+
232
+ <div class="ws-docs-content-img">
233
+ ![ChatBot toggle in a masthead.](./img/masthead-toggle.svg)
234
+ </div>
235
+
236
+ The exception to this is if you have a specific icon that aligns with your product or ChatBot branding.
237
+
238
+ When there is an unread message from the ChatBot, a notification count should be displayed, and the badge should be styled as unread.
239
+
240
+ <div class="ws-docs-content-img">
241
+ ![ChatBot toggle in a masthead with a notification count.](./img/masthead-toggle-notification.svg)
242
+ </div>
243
+
244
+ ### Launching a ChatBot from page content
245
+
246
+ If a UI element within the page content is an AI/ChatBot-supported feature, the ChatBot should be launched when users select the clearly-identified action. These kinds of actions should display your ChatBot's logo beside a label that clearly communicates the intention of the AI action.
247
+
248
+ <div class="ws-docs-content-img">
249
+ ![Menu item for an AI action that launches a ChatBot.](./img/ai-action-inpage.svg)
250
+ </div>
251
+
252
+ When a ChatBot is launches via an AI-supported action, the action should be sent as a user message once the ChatBot opens.
253
+
254
+ <div class="ws-docs-content-img">
255
+ ![User message in ChatBot for an AI action command.](./img/ai-action-message.svg)
256
+ </div>
257
+
258
+ ### Starting a new conversation
259
+
260
+ Each time a user begins a new conversation, display a [welcome message, with prompts](#welcome-message) that help them learn what the ChatBot can help with.
261
+
262
+ As much as possible, the suggested prompts should consider the user’s location in the service or application, or the situation their project is undergoing.
263
+
264
+ ### Using the conversation history menu
265
+
266
+ The ChatBot history menu contains a log of a users' previous chats. Clicking the menu icon opens a side drawer in the ChatBot window.
267
+
268
+ By clicking into the history menu, users can search through previous conversations and perform additional actions, such as sharing a conversation with others.
134
269
 
135
270
  <div class="ws-docs-content-img">
136
271
  ![Conversation history with an options menu opened on a previous conversation.](./img/conversation-history.svg)
137
272
  </div>
138
273
 
274
+ When the conversation history is still loading, display skeleton items:
275
+
276
+ <div class="ws-docs-content-img">
277
+ ![Chat history items loading.](./img/loading-state.svg)
278
+ </div>
279
+
280
+ If there's an error loading the conversation history, display an error screen with steps for resolving the error:
281
+
282
+ <div class="ws-docs-content-img">
283
+ ![Error state in chat history.](./img/error-state.svg)
284
+ </div>
285
+
286
+ ### ChatBot settings and preferences
287
+
288
+ Users can access ChatBot settings and preferences via the options menu.
289
+
290
+ <div class="ws-docs-content-img">
291
+ ![ChatBot options menu dropdown.](./img/settings-menu.svg)
292
+ </div>
293
+
294
+ Within the settings menu, users can select their preferences for a variety of ChatBot features, like theme or language. You can also support additional content management here, like adding or deleting chats. This menu can be customized to meet the needs of your ChatBot's users.
295
+
296
+ <div class="ws-docs-content-img">
297
+ ![ChatBot global settings menu.](./img/chatbot-settings.svg)
298
+ </div>
299
+
139
300
  ### Attaching files
140
301
 
141
302
  Using [the attach button](/patternfly-ai/chatbot/overview/design-guidelines#message-bar) in the message bar, users can [attach files](/patternfly-ai/chatbot/messages#file-attachments) to their message to share with the ChatBot.
@@ -185,28 +346,44 @@ There are a few display modes that users can choose when interacting with a Chat
185
346
  ![ChatBot in overlay mode.](./img/overlay.svg)
186
347
  </div>
187
348
 
188
- 2. **Docked:** Anchors the ChatBot to the side of the page content. When docked, the ChatBot window is persistent, and cannot be toggled.
349
+ 2. **Docked:** Anchors the ChatBot to the side of the page, on top of the page content.
189
350
 
190
351
  <div class="ws-docs-content-img">
191
352
  ![ChatBot in docked mode.](./img/docked.svg)
192
353
  </div>
193
354
 
194
- 3. **Full screen:** Fills the screen with the ChatBot window.
355
+ 3. **Embedded:** Places the ChatBot within a product as its own page. An embedded ChatBot could be displayed in the product's navigation menu.
356
+
357
+ <div class="ws-docs-content-img">
358
+ ![ChatBot embedded in a product.](./img/embedded.svg)
359
+ </div>
360
+
361
+ 4. **Full screen:** Fills the screen with the ChatBot window.
195
362
 
196
363
  <div class="ws-docs-content-img">
197
364
  ![ChatBot in full-screen mode.](./img/fullscreen.svg)
198
365
  </div>
199
366
 
200
- 4. **Embedded:** Places the ChatBot within a product as its own page. An embedded ChatBot could be displayed in the product's navigation menu.
367
+ 5. **Inline drawer**: A ChatBot that can fit and perform within a drawer. This drawer can look different for each product, but will often be placed to the side of the page, inline with the page content.
201
368
 
202
369
  <div class="ws-docs-content-img">
203
- ![ChatBot embedded in a product.](./img/embedded.svg)
370
+ ![ChatBot in drawer mode.](./img/drawer.svg)
371
+ </div>
372
+
373
+ ### Layouts
374
+
375
+ ChatBot supports a side-by-side [comparison layout](/patternfly-ai/chatbot/overview/demo#comparing-chatbots), which allows users to compare 2 chats at once. This can be helpful to let users understand how different models respond to the same prompt.
376
+
377
+ <div class="ws-docs-content-img">
378
+ ![2 ChatBots in comparison mode.](./img/comparison.svg)
204
379
  </div>
205
380
 
206
381
  ## Placement
207
382
 
208
383
  Your users will expect your ChatBot to be in a reliable, permanent location. Overlay displays are placed in the bottom right of the screen by default. If you're using a full screen or embedded ChatBot, stick to a consistent access location, like a button in the masthead or an item in the navigation menu.
209
384
 
385
+ Refer to the additional guidelines for [accessing a ChatBot](#accessing-a-chatbot).
386
+
210
387
  ## Content considerations
211
388
 
212
389
  For guidance on writing ChatBot content, refer to our [conversation design guidelines](/patternfly-ai/conversation-design).