@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.
- package/dist/cjs/AttachmentEdit/AttachmentEdit.test.d.ts +1 -0
- package/dist/cjs/AttachmentEdit/AttachmentEdit.test.js +52 -0
- package/dist/cjs/Chatbot/Chatbot.d.ts +2 -1
- package/dist/cjs/Chatbot/Chatbot.js +1 -0
- package/dist/cjs/Chatbot/Chatbot.test.d.ts +1 -0
- package/dist/cjs/Chatbot/Chatbot.test.js +28 -0
- package/dist/cjs/ChatbotAlert/ChatbotAlert.test.d.ts +1 -0
- package/dist/cjs/ChatbotAlert/ChatbotAlert.test.js +27 -0
- package/dist/cjs/ChatbotContent/ChatbotContent.test.d.ts +1 -0
- package/dist/cjs/ChatbotContent/ChatbotContent.test.js +18 -0
- package/dist/cjs/ChatbotConversationHistoryNav/ChatbotConversationHistoryDropdown.d.ts +3 -3
- package/dist/cjs/ChatbotConversationHistoryNav/ChatbotConversationHistoryDropdown.js +3 -1
- package/dist/cjs/ChatbotConversationHistoryNav/ChatbotConversationHistoryNav.d.ts +27 -4
- package/dist/cjs/ChatbotConversationHistoryNav/ChatbotConversationHistoryNav.js +24 -12
- package/dist/cjs/ChatbotConversationHistoryNav/ChatbotConversationHistoryNav.test.js +99 -3
- package/dist/cjs/ChatbotConversationHistoryNav/EmptyState.d.ts +11 -0
- package/dist/cjs/ChatbotConversationHistoryNav/EmptyState.js +29 -0
- package/dist/cjs/ChatbotConversationHistoryNav/LoadingState.d.ts +4 -0
- package/dist/cjs/ChatbotConversationHistoryNav/LoadingState.js +45 -0
- package/dist/cjs/ChatbotFooter/ChatbotFooter.test.d.ts +1 -0
- package/dist/cjs/ChatbotFooter/ChatbotFooter.test.js +18 -0
- package/dist/cjs/ChatbotFooter/ChatbotFooternote.test.d.ts +1 -0
- package/dist/cjs/ChatbotFooter/ChatbotFooternote.test.js +87 -0
- package/dist/cjs/ChatbotFooter/ChatbotFootnote.d.ts +1 -1
- package/dist/cjs/ChatbotFooter/ChatbotFootnote.js +1 -1
- package/dist/cjs/ChatbotHeader/ChatbotHeader.test.d.ts +1 -0
- package/dist/cjs/ChatbotHeader/ChatbotHeader.test.js +18 -0
- package/dist/cjs/ChatbotHeader/ChatbotHeaderActions.test.d.ts +1 -0
- package/dist/cjs/ChatbotHeader/ChatbotHeaderActions.test.js +18 -0
- package/dist/cjs/ChatbotHeader/ChatbotHeaderCloseButton.js +3 -1
- package/dist/cjs/ChatbotHeader/ChatbotHeaderCloseButton.test.d.ts +1 -0
- package/dist/cjs/ChatbotHeader/ChatbotHeaderCloseButton.test.js +20 -0
- package/dist/cjs/ChatbotHeader/ChatbotHeaderMain.test.d.ts +1 -0
- package/dist/cjs/ChatbotHeader/ChatbotHeaderMain.test.js +18 -0
- package/dist/cjs/ChatbotHeader/ChatbotHeaderMenu.js +3 -1
- package/dist/cjs/ChatbotHeader/ChatbotHeaderMenu.test.d.ts +1 -0
- package/dist/cjs/ChatbotHeader/ChatbotHeaderMenu.test.js +20 -0
- package/dist/cjs/ChatbotHeader/ChatbotHeaderOptionsDropdown.js +3 -1
- package/dist/cjs/ChatbotHeader/ChatbotHeaderOptionsDropdown.test.d.ts +1 -0
- package/dist/cjs/ChatbotHeader/ChatbotHeaderOptionsDropdown.test.js +43 -0
- package/dist/cjs/ChatbotHeader/ChatbotHeaderSelectorDropdown.js +6 -4
- package/dist/cjs/ChatbotHeader/ChatbotHeaderSelectorDropdown.test.d.ts +1 -0
- package/dist/cjs/ChatbotHeader/ChatbotHeaderSelectorDropdown.test.js +41 -0
- package/dist/cjs/ChatbotHeader/ChatbotHeaderTitle.d.ts +3 -1
- package/dist/cjs/ChatbotHeader/ChatbotHeaderTitle.js +4 -2
- package/dist/cjs/ChatbotHeader/ChatbotHeaderTitle.test.d.ts +1 -0
- package/dist/cjs/ChatbotHeader/ChatbotHeaderTitle.test.js +55 -0
- package/dist/cjs/ChatbotToggle/ChatbotToggle.js +3 -1
- package/dist/cjs/ChatbotWelcomePrompt/ChatbotWelcomePrompt.test.js +19 -11
- package/dist/cjs/Compare/Compare.d.ts +17 -0
- package/dist/cjs/Compare/Compare.js +50 -0
- package/dist/cjs/Compare/Compare.test.d.ts +1 -0
- package/dist/cjs/Compare/Compare.test.js +20 -0
- package/dist/cjs/Compare/index.d.ts +2 -0
- package/dist/cjs/Compare/index.js +23 -0
- package/dist/cjs/Message/ErrorMessage/ErrorMessage.d.ts +4 -0
- package/dist/cjs/Message/ErrorMessage/ErrorMessage.js +26 -0
- package/dist/cjs/Message/ImageMessage/ImageMessage.d.ts +4 -0
- package/dist/cjs/Message/ImageMessage/ImageMessage.js +25 -0
- package/dist/cjs/Message/LinkMessage/LinkMessage.d.ts +4 -0
- package/dist/cjs/Message/LinkMessage/LinkMessage.js +30 -0
- package/dist/cjs/Message/Message.d.ts +35 -8
- package/dist/cjs/Message/Message.js +68 -18
- package/dist/cjs/Message/Message.test.js +239 -3
- package/dist/cjs/Message/QuickResponse/QuickResponse.d.ts +17 -0
- package/dist/cjs/Message/QuickResponse/QuickResponse.js +34 -0
- package/dist/cjs/Message/TableMessage/TableMessage.d.ts +20 -0
- package/dist/cjs/Message/TableMessage/TableMessage.js +67 -0
- package/dist/cjs/Message/TableMessage/TbodyMessage.d.ts +7 -0
- package/dist/cjs/Message/TableMessage/TbodyMessage.js +33 -0
- package/dist/cjs/Message/TableMessage/TdMessage.d.ts +5 -0
- package/dist/cjs/Message/TableMessage/TdMessage.js +26 -0
- package/dist/cjs/Message/TableMessage/ThMessage.d.ts +5 -0
- package/dist/cjs/Message/TableMessage/ThMessage.js +26 -0
- package/dist/cjs/Message/TableMessage/TheadMessage.d.ts +5 -0
- package/dist/cjs/Message/TableMessage/TheadMessage.js +26 -0
- package/dist/cjs/Message/TableMessage/TrMessage.d.ts +7 -0
- package/dist/cjs/Message/TableMessage/TrMessage.js +37 -0
- package/dist/cjs/Message/TextMessage/TextMessage.d.ts +2 -1
- package/dist/cjs/Message/TextMessage/TextMessage.js +2 -2
- package/dist/cjs/Message/UserFeedback/CloseButton.d.ts +10 -0
- package/dist/cjs/Message/UserFeedback/CloseButton.js +14 -0
- package/dist/cjs/Message/UserFeedback/UserFeedback.d.ts +39 -0
- package/dist/cjs/Message/UserFeedback/UserFeedback.js +54 -0
- package/dist/cjs/Message/UserFeedback/UserFeedback.test.d.ts +1 -0
- package/dist/cjs/Message/UserFeedback/UserFeedback.test.js +133 -0
- package/dist/cjs/Message/UserFeedback/UserFeedbackComplete.d.ts +42 -0
- package/dist/cjs/Message/UserFeedback/UserFeedbackComplete.js +117 -0
- package/dist/cjs/Message/UserFeedback/UserFeedbackComplete.test.d.ts +1 -0
- package/dist/cjs/Message/UserFeedback/UserFeedbackComplete.test.js +249 -0
- package/dist/cjs/MessageBar/AttachButton.js +4 -2
- package/dist/cjs/MessageBar/MessageBar.d.ts +11 -4
- package/dist/cjs/MessageBar/MessageBar.js +127 -46
- package/dist/cjs/MessageBar/MessageBar.test.js +12 -4
- package/dist/cjs/MessageBar/MicrophoneButton.d.ts +1 -1
- package/dist/cjs/MessageBar/SendButton.js +3 -1
- package/dist/cjs/MessageBar/StopButton.js +3 -1
- package/dist/cjs/MessageBox/MessageBox.test.d.ts +1 -0
- package/dist/cjs/MessageBox/MessageBox.test.js +22 -0
- package/dist/cjs/PreviewAttachment/PreviewAttachment.test.d.ts +1 -0
- package/dist/cjs/PreviewAttachment/PreviewAttachment.test.js +28 -0
- package/dist/cjs/ResponseActions/ResponseActionButton.d.ts +4 -1
- package/dist/cjs/ResponseActions/ResponseActionButton.js +21 -6
- package/dist/cjs/ResponseActions/ResponseActions.d.ts +8 -2
- package/dist/cjs/ResponseActions/ResponseActions.js +7 -7
- package/dist/cjs/ResponseActions/ResponseActions.test.js +2 -2
- package/dist/cjs/Settings/SettingsForm.test.d.ts +1 -0
- package/dist/cjs/Settings/SettingsForm.test.js +26 -0
- package/dist/cjs/__mocks__/rehype-external-links.d.ts +2 -0
- package/dist/cjs/__mocks__/rehype-external-links.js +4 -0
- package/dist/cjs/__mocks__/rehype-sanitize.d.ts +2 -0
- package/dist/cjs/__mocks__/rehype-sanitize.js +4 -0
- package/dist/cjs/__mocks__/rehype-unwrap-images.d.ts +2 -0
- package/dist/cjs/__mocks__/rehype-unwrap-images.js +4 -0
- package/dist/cjs/index.d.ts +4 -0
- package/dist/cjs/index.js +7 -1
- package/dist/cjs/tracking/console_tracking_provider.d.ts +10 -0
- package/dist/cjs/tracking/console_tracking_provider.js +27 -0
- package/dist/cjs/tracking/index.d.ts +2 -0
- package/dist/cjs/tracking/index.js +23 -0
- package/dist/cjs/tracking/posthog_tracking_provider.d.ts +9 -0
- package/dist/cjs/tracking/posthog_tracking_provider.js +37 -0
- package/dist/cjs/tracking/segment_tracking_provider.d.ts +10 -0
- package/dist/cjs/tracking/segment_tracking_provider.js +50 -0
- package/dist/cjs/tracking/trackingProviderProxy.d.ts +9 -0
- package/dist/cjs/tracking/trackingProviderProxy.js +24 -0
- package/dist/cjs/tracking/tracking_api.d.ts +8 -0
- package/dist/cjs/tracking/tracking_api.js +2 -0
- package/dist/cjs/tracking/tracking_registry.d.ts +4 -0
- package/dist/cjs/tracking/tracking_registry.js +33 -0
- package/dist/cjs/tracking/tracking_spi.d.ts +9 -0
- package/dist/cjs/tracking/tracking_spi.js +2 -0
- package/dist/cjs/tracking/umami_tracking_provider.d.ts +14 -0
- package/dist/cjs/tracking/umami_tracking_provider.js +44 -0
- package/dist/css/main.css +420 -148
- package/dist/css/main.css.map +1 -1
- package/dist/dynamic/Compare/package.json +1 -0
- package/dist/dynamic/tracking/package.json +1 -0
- package/dist/esm/AttachmentEdit/AttachmentEdit.test.d.ts +1 -0
- package/dist/esm/AttachmentEdit/AttachmentEdit.test.js +47 -0
- package/dist/esm/Chatbot/Chatbot.d.ts +2 -1
- package/dist/esm/Chatbot/Chatbot.js +1 -0
- package/dist/esm/Chatbot/Chatbot.test.d.ts +1 -0
- package/dist/esm/Chatbot/Chatbot.test.js +23 -0
- package/dist/esm/ChatbotAlert/ChatbotAlert.test.d.ts +1 -0
- package/dist/esm/ChatbotAlert/ChatbotAlert.test.js +22 -0
- package/dist/esm/ChatbotContent/ChatbotContent.test.d.ts +1 -0
- package/dist/esm/ChatbotContent/ChatbotContent.test.js +13 -0
- package/dist/esm/ChatbotConversationHistoryNav/ChatbotConversationHistoryDropdown.d.ts +3 -3
- package/dist/esm/ChatbotConversationHistoryNav/ChatbotConversationHistoryDropdown.js +3 -1
- package/dist/esm/ChatbotConversationHistoryNav/ChatbotConversationHistoryNav.d.ts +27 -4
- package/dist/esm/ChatbotConversationHistoryNav/ChatbotConversationHistoryNav.js +24 -12
- package/dist/esm/ChatbotConversationHistoryNav/ChatbotConversationHistoryNav.test.js +99 -3
- package/dist/esm/ChatbotConversationHistoryNav/EmptyState.d.ts +11 -0
- package/dist/esm/ChatbotConversationHistoryNav/EmptyState.js +22 -0
- package/dist/esm/ChatbotConversationHistoryNav/LoadingState.d.ts +4 -0
- package/dist/esm/ChatbotConversationHistoryNav/LoadingState.js +38 -0
- package/dist/esm/ChatbotFooter/ChatbotFooter.test.d.ts +1 -0
- package/dist/esm/ChatbotFooter/ChatbotFooter.test.js +13 -0
- package/dist/esm/ChatbotFooter/ChatbotFooternote.test.d.ts +1 -0
- package/dist/esm/ChatbotFooter/ChatbotFooternote.test.js +82 -0
- package/dist/esm/ChatbotFooter/ChatbotFootnote.d.ts +1 -1
- package/dist/esm/ChatbotFooter/ChatbotFootnote.js +1 -1
- package/dist/esm/ChatbotHeader/ChatbotHeader.test.d.ts +1 -0
- package/dist/esm/ChatbotHeader/ChatbotHeader.test.js +13 -0
- package/dist/esm/ChatbotHeader/ChatbotHeaderActions.test.d.ts +1 -0
- package/dist/esm/ChatbotHeader/ChatbotHeaderActions.test.js +13 -0
- package/dist/esm/ChatbotHeader/ChatbotHeaderCloseButton.js +3 -1
- package/dist/esm/ChatbotHeader/ChatbotHeaderCloseButton.test.d.ts +1 -0
- package/dist/esm/ChatbotHeader/ChatbotHeaderCloseButton.test.js +15 -0
- package/dist/esm/ChatbotHeader/ChatbotHeaderMain.test.d.ts +1 -0
- package/dist/esm/ChatbotHeader/ChatbotHeaderMain.test.js +13 -0
- package/dist/esm/ChatbotHeader/ChatbotHeaderMenu.js +3 -1
- package/dist/esm/ChatbotHeader/ChatbotHeaderMenu.test.d.ts +1 -0
- package/dist/esm/ChatbotHeader/ChatbotHeaderMenu.test.js +15 -0
- package/dist/esm/ChatbotHeader/ChatbotHeaderOptionsDropdown.js +3 -1
- package/dist/esm/ChatbotHeader/ChatbotHeaderOptionsDropdown.test.d.ts +1 -0
- package/dist/esm/ChatbotHeader/ChatbotHeaderOptionsDropdown.test.js +38 -0
- package/dist/esm/ChatbotHeader/ChatbotHeaderSelectorDropdown.js +6 -4
- package/dist/esm/ChatbotHeader/ChatbotHeaderSelectorDropdown.test.d.ts +1 -0
- package/dist/esm/ChatbotHeader/ChatbotHeaderSelectorDropdown.test.js +36 -0
- package/dist/esm/ChatbotHeader/ChatbotHeaderTitle.d.ts +3 -1
- package/dist/esm/ChatbotHeader/ChatbotHeaderTitle.js +4 -2
- package/dist/esm/ChatbotHeader/ChatbotHeaderTitle.test.d.ts +1 -0
- package/dist/esm/ChatbotHeader/ChatbotHeaderTitle.test.js +50 -0
- package/dist/esm/ChatbotToggle/ChatbotToggle.js +3 -1
- package/dist/esm/ChatbotWelcomePrompt/ChatbotWelcomePrompt.test.js +19 -11
- package/dist/esm/Compare/Compare.d.ts +17 -0
- package/dist/esm/Compare/Compare.js +43 -0
- package/dist/esm/Compare/Compare.test.d.ts +1 -0
- package/dist/esm/Compare/Compare.test.js +15 -0
- package/dist/esm/Compare/index.d.ts +2 -0
- package/dist/esm/Compare/index.js +2 -0
- package/dist/esm/Message/ErrorMessage/ErrorMessage.d.ts +4 -0
- package/dist/esm/Message/ErrorMessage/ErrorMessage.js +21 -0
- package/dist/esm/Message/ImageMessage/ImageMessage.d.ts +4 -0
- package/dist/esm/Message/ImageMessage/ImageMessage.js +20 -0
- package/dist/esm/Message/LinkMessage/LinkMessage.d.ts +4 -0
- package/dist/esm/Message/LinkMessage/LinkMessage.js +25 -0
- package/dist/esm/Message/Message.d.ts +35 -8
- package/dist/esm/Message/Message.js +66 -16
- package/dist/esm/Message/Message.test.js +239 -3
- package/dist/esm/Message/QuickResponse/QuickResponse.d.ts +17 -0
- package/dist/esm/Message/QuickResponse/QuickResponse.js +27 -0
- package/dist/esm/Message/TableMessage/TableMessage.d.ts +20 -0
- package/dist/esm/Message/TableMessage/TableMessage.js +62 -0
- package/dist/esm/Message/TableMessage/TbodyMessage.d.ts +7 -0
- package/dist/esm/Message/TableMessage/TbodyMessage.js +28 -0
- package/dist/esm/Message/TableMessage/TdMessage.d.ts +5 -0
- package/dist/esm/Message/TableMessage/TdMessage.js +21 -0
- package/dist/esm/Message/TableMessage/ThMessage.d.ts +5 -0
- package/dist/esm/Message/TableMessage/ThMessage.js +21 -0
- package/dist/esm/Message/TableMessage/TheadMessage.d.ts +5 -0
- package/dist/esm/Message/TableMessage/TheadMessage.js +21 -0
- package/dist/esm/Message/TableMessage/TrMessage.d.ts +7 -0
- package/dist/esm/Message/TableMessage/TrMessage.js +32 -0
- package/dist/esm/Message/TextMessage/TextMessage.d.ts +2 -1
- package/dist/esm/Message/TextMessage/TextMessage.js +3 -3
- package/dist/esm/Message/UserFeedback/CloseButton.d.ts +10 -0
- package/dist/esm/Message/UserFeedback/CloseButton.js +9 -0
- package/dist/esm/Message/UserFeedback/UserFeedback.d.ts +39 -0
- package/dist/esm/Message/UserFeedback/UserFeedback.js +49 -0
- package/dist/esm/Message/UserFeedback/UserFeedback.test.d.ts +1 -0
- package/dist/esm/Message/UserFeedback/UserFeedback.test.js +128 -0
- package/dist/esm/Message/UserFeedback/UserFeedbackComplete.d.ts +42 -0
- package/dist/esm/Message/UserFeedback/UserFeedbackComplete.js +112 -0
- package/dist/esm/Message/UserFeedback/UserFeedbackComplete.test.d.ts +1 -0
- package/dist/esm/Message/UserFeedback/UserFeedbackComplete.test.js +244 -0
- package/dist/esm/MessageBar/AttachButton.js +4 -2
- package/dist/esm/MessageBar/MessageBar.d.ts +11 -4
- package/dist/esm/MessageBar/MessageBar.js +127 -46
- package/dist/esm/MessageBar/MessageBar.test.js +12 -4
- package/dist/esm/MessageBar/MicrophoneButton.d.ts +1 -1
- package/dist/esm/MessageBar/SendButton.js +3 -1
- package/dist/esm/MessageBar/StopButton.js +3 -1
- package/dist/esm/MessageBox/MessageBox.test.d.ts +1 -0
- package/dist/esm/MessageBox/MessageBox.test.js +17 -0
- package/dist/esm/PreviewAttachment/PreviewAttachment.test.d.ts +1 -0
- package/dist/esm/PreviewAttachment/PreviewAttachment.test.js +23 -0
- package/dist/esm/ResponseActions/ResponseActionButton.d.ts +4 -1
- package/dist/esm/ResponseActions/ResponseActionButton.js +18 -3
- package/dist/esm/ResponseActions/ResponseActions.d.ts +8 -2
- package/dist/esm/ResponseActions/ResponseActions.js +7 -7
- package/dist/esm/ResponseActions/ResponseActions.test.js +2 -2
- package/dist/esm/Settings/SettingsForm.test.d.ts +1 -0
- package/dist/esm/Settings/SettingsForm.test.js +21 -0
- package/dist/esm/__mocks__/rehype-external-links.d.ts +2 -0
- package/dist/esm/__mocks__/rehype-external-links.js +2 -0
- package/dist/esm/__mocks__/rehype-sanitize.d.ts +2 -0
- package/dist/esm/__mocks__/rehype-sanitize.js +2 -0
- package/dist/esm/__mocks__/rehype-unwrap-images.d.ts +2 -0
- package/dist/esm/__mocks__/rehype-unwrap-images.js +2 -0
- package/dist/esm/index.d.ts +4 -0
- package/dist/esm/index.js +4 -0
- package/dist/esm/tracking/console_tracking_provider.d.ts +10 -0
- package/dist/esm/tracking/console_tracking_provider.js +23 -0
- package/dist/esm/tracking/index.d.ts +2 -0
- package/dist/esm/tracking/index.js +2 -0
- package/dist/esm/tracking/posthog_tracking_provider.d.ts +9 -0
- package/dist/esm/tracking/posthog_tracking_provider.js +33 -0
- package/dist/esm/tracking/segment_tracking_provider.d.ts +10 -0
- package/dist/esm/tracking/segment_tracking_provider.js +46 -0
- package/dist/esm/tracking/trackingProviderProxy.d.ts +9 -0
- package/dist/esm/tracking/trackingProviderProxy.js +22 -0
- package/dist/esm/tracking/tracking_api.d.ts +8 -0
- package/dist/esm/tracking/tracking_api.js +1 -0
- package/dist/esm/tracking/tracking_registry.d.ts +4 -0
- package/dist/esm/tracking/tracking_registry.js +26 -0
- package/dist/esm/tracking/tracking_spi.d.ts +9 -0
- package/dist/esm/tracking/tracking_spi.js +1 -0
- package/dist/esm/tracking/umami_tracking_provider.d.ts +14 -0
- package/dist/esm/tracking/umami_tracking_provider.js +40 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +8 -3
- package/patternfly-docs/content/extensions/chatbot/about-chatbot.md +8 -2
- package/patternfly-docs/content/extensions/chatbot/design-guidelines.md +192 -15
- package/patternfly-docs/content/extensions/chatbot/examples/Analytics/Analytics.md +219 -0
- package/patternfly-docs/content/extensions/chatbot/examples/Messages/AttachmentError.tsx +2 -2
- package/patternfly-docs/content/extensions/chatbot/examples/Messages/BotMessage.tsx +214 -12
- package/patternfly-docs/content/extensions/chatbot/examples/Messages/FileDropZone.tsx +2 -1
- package/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithAttachment.tsx +2 -2
- package/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithCustomResponseActions.tsx +1 -1
- package/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithFeedback.tsx +71 -0
- package/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithFeedbackTimeout.tsx +27 -0
- package/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithQuickResponses.tsx +1 -1
- package/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithQuickStart.tsx +2 -2
- package/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithResponseActions.tsx +1 -1
- package/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithSources.tsx +1 -1
- package/patternfly-docs/content/extensions/chatbot/examples/Messages/Messages.md +49 -8
- package/patternfly-docs/content/extensions/chatbot/examples/Messages/UserMessage.tsx +244 -14
- package/patternfly-docs/content/extensions/chatbot/examples/Messages/UserMessageWithExtraContent.tsx +54 -0
- package/patternfly-docs/content/extensions/chatbot/examples/UI/ChatbotFooter.tsx +1 -1
- package/patternfly-docs/content/extensions/chatbot/examples/UI/ChatbotFootnote.tsx +5 -5
- package/patternfly-docs/content/extensions/chatbot/examples/UI/ChatbotHeaderBasic.tsx +1 -1
- package/patternfly-docs/content/extensions/chatbot/examples/UI/ChatbotHeaderDrawer.tsx +36 -3
- package/patternfly-docs/content/extensions/chatbot/examples/UI/ChatbotHeaderDrawerNavigation.tsx +67 -0
- package/patternfly-docs/content/extensions/chatbot/examples/UI/ChatbotHeaderDrawerResizable.tsx +94 -0
- package/patternfly-docs/content/extensions/chatbot/examples/UI/ChatbotMessageBarAttach.tsx +1 -1
- package/patternfly-docs/content/extensions/chatbot/examples/UI/ChatbotWelcomeInteraction.tsx +1 -1
- package/patternfly-docs/content/extensions/chatbot/examples/UI/ChatbotWelcomePrompt.tsx +7 -7
- package/patternfly-docs/content/extensions/chatbot/examples/UI/UI.md +21 -6
- package/patternfly-docs/content/extensions/chatbot/examples/demos/AttachmentDemos.md +14 -0
- package/patternfly-docs/content/extensions/chatbot/examples/demos/Chatbot.md +39 -1
- package/patternfly-docs/content/extensions/chatbot/examples/demos/Chatbot.tsx +48 -35
- package/patternfly-docs/content/extensions/chatbot/examples/demos/ChatbotAttachment.tsx +2 -2
- package/patternfly-docs/content/extensions/chatbot/examples/demos/ChatbotAttachmentMenu.tsx +3 -3
- package/patternfly-docs/content/extensions/chatbot/examples/demos/ChatbotInDrawer.tsx +453 -0
- package/patternfly-docs/content/extensions/chatbot/examples/demos/EmbeddedChatbot.tsx +11 -11
- package/patternfly-docs/content/extensions/chatbot/examples/demos/EmbeddedComparisonChatbot.tsx +206 -0
- package/patternfly-docs/content/extensions/chatbot/examples/demos/Feedback.tsx +104 -0
- package/patternfly-docs/content/extensions/chatbot/img/ai-action-inpage.svg +85 -0
- package/patternfly-docs/content/extensions/chatbot/img/ai-action-message.svg +63 -0
- package/patternfly-docs/content/extensions/chatbot/img/analytics-example.svg +127 -0
- package/patternfly-docs/content/extensions/chatbot/img/attached-file.svg +24 -29
- package/patternfly-docs/content/extensions/chatbot/img/attachment-menu.svg +4 -4
- package/patternfly-docs/content/extensions/chatbot/img/attachment-unsent.svg +30 -58
- package/patternfly-docs/content/extensions/chatbot/img/chatbot-analytics.svg +51 -0
- package/patternfly-docs/content/extensions/chatbot/img/chatbot-elements.svg +11 -12
- package/patternfly-docs/content/extensions/chatbot/img/chatbot-quickstarts-tile.svg +58 -0
- package/patternfly-docs/content/extensions/chatbot/img/chatbot-settings.svg +83 -0
- package/patternfly-docs/content/extensions/chatbot/img/comparison.svg +45 -0
- package/patternfly-docs/content/extensions/chatbot/img/conversation-history.svg +6 -29
- package/patternfly-docs/content/extensions/chatbot/img/docked.svg +259 -241
- package/patternfly-docs/content/extensions/chatbot/img/drawer.svg +255 -0
- package/patternfly-docs/content/extensions/chatbot/img/error-state.svg +30 -0
- package/patternfly-docs/content/extensions/chatbot/img/feedback-form.svg +88 -0
- package/patternfly-docs/content/extensions/chatbot/img/footnote.svg +1 -1
- package/patternfly-docs/content/extensions/chatbot/img/fullscreen.svg +25 -16
- package/patternfly-docs/content/extensions/chatbot/img/listening-pulse.svg +22 -0
- package/patternfly-docs/content/extensions/chatbot/img/listening.svg +1 -1
- package/patternfly-docs/content/extensions/chatbot/img/loading-state.svg +28 -0
- package/patternfly-docs/content/extensions/chatbot/img/masthead-toggle-notification.svg +49 -0
- package/patternfly-docs/content/extensions/chatbot/img/masthead-toggle.svg +75 -0
- package/patternfly-docs/content/extensions/chatbot/img/message-bar-elements.svg +3 -3
- package/patternfly-docs/content/extensions/chatbot/img/message-elements.svg +84 -142
- package/patternfly-docs/content/extensions/chatbot/img/message-feedback.svg +52 -0
- package/patternfly-docs/content/extensions/chatbot/img/message-responses.svg +54 -0
- package/patternfly-docs/content/extensions/chatbot/img/new-chat-emptystate.svg +27 -0
- package/patternfly-docs/content/extensions/chatbot/img/no-results-emptystate.svg +27 -0
- package/patternfly-docs/content/extensions/chatbot/img/overlay.svg +54 -39
- package/patternfly-docs/content/extensions/chatbot/img/posthog.svg +30 -0
- package/patternfly-docs/content/extensions/chatbot/img/segment.svg +36 -0
- package/patternfly-docs/content/extensions/chatbot/img/settings-menu.svg +122 -0
- package/patternfly-docs/content/extensions/chatbot/img/source-tile.svg +62 -0
- package/patternfly-docs/content/extensions/chatbot/img/thank-you-card.svg +81 -0
- package/patternfly-docs/content/extensions/chatbot/img/toggle-customizations.svg +12 -0
- package/patternfly-docs/content/extensions/chatbot/img/toggle-tooltips.svg +38 -0
- package/patternfly-docs/content/extensions/chatbot/img/umami.svg +30 -0
- package/patternfly-docs/content/extensions/chatbot/img/welcome-elements.svg +82 -0
- package/patternfly-docs/content/extensions/chatbot/img/welcome-message.svg +94 -0
- package/src/AttachMenu/AttachMenu.scss +1 -1
- package/src/AttachmentEdit/AttachmentEdit.test.tsx +55 -0
- package/src/Chatbot/Chatbot.scss +20 -1
- package/src/Chatbot/Chatbot.test.tsx +31 -0
- package/src/Chatbot/Chatbot.tsx +2 -1
- package/src/ChatbotAlert/ChatbotAlert.test.tsx +31 -0
- package/src/ChatbotContent/ChatbotContent.scss +1 -0
- package/src/ChatbotContent/ChatbotContent.test.tsx +15 -0
- package/src/ChatbotConversationHistoryNav/ChatbotConversationHistoryDropdown.tsx +10 -4
- package/src/ChatbotConversationHistoryNav/ChatbotConversationHistoryNav.scss +24 -1
- package/src/ChatbotConversationHistoryNav/ChatbotConversationHistoryNav.test.tsx +242 -3
- package/src/ChatbotConversationHistoryNav/ChatbotConversationHistoryNav.tsx +94 -26
- package/src/ChatbotConversationHistoryNav/EmptyState.tsx +44 -0
- package/src/ChatbotConversationHistoryNav/LoadingState.tsx +38 -0
- package/src/ChatbotFooter/ChatbotFooter.scss +8 -4
- package/src/ChatbotFooter/ChatbotFooter.test.tsx +15 -0
- package/src/ChatbotFooter/ChatbotFooternote.test.tsx +84 -0
- package/src/ChatbotFooter/ChatbotFootnote.tsx +2 -2
- package/src/ChatbotHeader/ChatbotHeader.scss +5 -6
- package/src/ChatbotHeader/ChatbotHeader.test.tsx +15 -0
- package/src/ChatbotHeader/ChatbotHeaderActions.test.tsx +17 -0
- package/src/ChatbotHeader/ChatbotHeaderCloseButton.test.tsx +20 -0
- package/src/ChatbotHeader/ChatbotHeaderCloseButton.tsx +7 -1
- package/src/ChatbotHeader/ChatbotHeaderMain.test.tsx +17 -0
- package/src/ChatbotHeader/ChatbotHeaderMenu.test.tsx +19 -0
- package/src/ChatbotHeader/ChatbotHeaderMenu.tsx +7 -1
- package/src/ChatbotHeader/ChatbotHeaderOptionsDropdown.test.tsx +45 -0
- package/src/ChatbotHeader/ChatbotHeaderOptionsDropdown.tsx +8 -1
- package/src/ChatbotHeader/ChatbotHeaderSelectorDropdown.test.tsx +43 -0
- package/src/ChatbotHeader/ChatbotHeaderSelectorDropdown.tsx +11 -4
- package/src/ChatbotHeader/ChatbotHeaderTitle.test.tsx +75 -0
- package/src/ChatbotHeader/ChatbotHeaderTitle.tsx +7 -2
- package/src/ChatbotModal/ChatbotModal.scss +12 -12
- package/src/ChatbotToggle/ChatbotToggle.tsx +6 -1
- package/src/ChatbotWelcomePrompt/ChatbotWelcomePrompt.scss +2 -0
- package/src/ChatbotWelcomePrompt/ChatbotWelcomePrompt.test.tsx +26 -18
- package/src/ChatbotWelcomePrompt/__snapshots__/ChatbotWelcomePrompt.test.tsx.snap +2 -2
- package/src/CodeModal/CodeModal.scss +7 -4
- package/src/Compare/Compare.scss +72 -0
- package/src/Compare/Compare.test.tsx +31 -0
- package/src/Compare/Compare.tsx +98 -0
- package/src/Compare/index.ts +2 -0
- package/src/FileDetails/FileDetails.scss +1 -1
- package/src/FileDetailsLabel/FileDetailsLabel.scss +2 -2
- package/src/Message/CodeBlockMessage/CodeBlockMessage.scss +4 -4
- package/src/Message/ErrorMessage/ErrorMessage.tsx +14 -0
- package/src/Message/ImageMessage/ImageMessage.scss +9 -0
- package/src/Message/ImageMessage/ImageMessage.tsx +14 -0
- package/src/Message/LinkMessage/LinkMessage.tsx +34 -0
- package/src/Message/ListMessage/ListMessage.scss +6 -6
- package/src/Message/Message.scss +4 -26
- package/src/Message/Message.test.tsx +313 -3
- package/src/Message/Message.tsx +130 -31
- package/src/Message/MessageLoading.scss +2 -2
- package/src/Message/QuickResponse/QuickResponse.scss +33 -0
- package/src/Message/QuickResponse/QuickResponse.tsx +54 -0
- package/src/Message/QuickStarts/QuickStartTile.scss +0 -1
- package/src/Message/TableMessage/TableMessage.scss +23 -0
- package/src/Message/TableMessage/TableMessage.tsx +83 -0
- package/src/Message/TableMessage/TbodyMessage.tsx +20 -0
- package/src/Message/TableMessage/TdMessage.tsx +11 -0
- package/src/Message/TableMessage/ThMessage.tsx +11 -0
- package/src/Message/TableMessage/TheadMessage.tsx +11 -0
- package/src/Message/TableMessage/TrMessage.tsx +27 -0
- package/src/Message/TextMessage/TextMessage.scss +21 -12
- package/src/Message/TextMessage/TextMessage.tsx +3 -3
- package/src/Message/UserFeedback/CloseButton.tsx +21 -0
- package/src/Message/UserFeedback/UserFeedback.scss +53 -0
- package/src/Message/UserFeedback/UserFeedback.test.tsx +236 -0
- package/src/Message/UserFeedback/UserFeedback.tsx +128 -0
- package/src/Message/UserFeedback/UserFeedbackComplete.test.tsx +255 -0
- package/src/Message/UserFeedback/UserFeedbackComplete.tsx +211 -0
- package/src/MessageBar/AttachButton.scss +19 -3
- package/src/MessageBar/AttachButton.tsx +3 -1
- package/src/MessageBar/MessageBar.scss +58 -24
- package/src/MessageBar/MessageBar.test.tsx +12 -4
- package/src/MessageBar/MessageBar.tsx +164 -65
- package/src/MessageBar/MicrophoneButton.scss +8 -8
- package/src/MessageBar/MicrophoneButton.tsx +1 -1
- package/src/MessageBar/SendButton.tsx +2 -0
- package/src/MessageBar/StopButton.scss +17 -3
- package/src/MessageBar/StopButton.tsx +2 -0
- package/src/MessageBox/JumpButton.scss +6 -6
- package/src/MessageBox/MessageBox.scss +1 -0
- package/src/MessageBox/MessageBox.test.tsx +26 -0
- package/src/PreviewAttachment/PreviewAttachment.test.tsx +51 -0
- package/src/ResponseActions/ResponseActionButton.tsx +14 -2
- package/src/ResponseActions/ResponseActions.scss +2 -2
- package/src/ResponseActions/ResponseActions.test.tsx +4 -2
- package/src/ResponseActions/ResponseActions.tsx +26 -2
- package/src/Settings/Settings.scss +2 -2
- package/src/Settings/SettingsForm.test.tsx +28 -0
- package/src/SourceDetailsMenuItem/SourceDetailsMenuItem.scss +2 -2
- package/src/SourcesCard/SourcesCard.scss +9 -3
- package/src/TermsOfUse/TermsOfUse.scss +1 -1
- package/src/__mocks__/rehype-external-links.ts +3 -0
- package/src/__mocks__/rehype-sanitize.ts +3 -0
- package/src/__mocks__/rehype-unwrap-images.tsx +3 -0
- package/src/index.ts +6 -0
- package/src/main.scss +5 -6
- package/src/tracking/console_tracking_provider.ts +30 -0
- package/src/tracking/index.ts +3 -0
- package/src/tracking/posthog_tracking_provider.ts +42 -0
- package/src/tracking/segment_tracking_provider.ts +62 -0
- package/src/tracking/trackingProviderProxy.ts +28 -0
- package/src/tracking/tracking_api.ts +11 -0
- package/src/tracking/tracking_registry.ts +33 -0
- package/src/tracking/tracking_spi.ts +14 -0
- 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,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
|
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": "
|
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
|
-
##
|
15
|
+
## ChatBot demos
|
16
16
|
|
17
|
-
To illustrate the capabilities of the ChatBot, we
|
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
|

|
@@ -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. **
|
20
|
-
1. **Options menu:**
|
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. **
|
41
|
-
|
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
|
+

|
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
|
+

|
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
|
+

|
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
|
+

|
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
|
+

|
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
|
+

|
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
|
+

|
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
|
+

|
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
|
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
|
-

|
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
|
-
|
197
|
+
The ChatBot toggle is the access point for users—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
|
+

|
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
|

|
@@ -126,16 +219,84 @@ When there is an unread message from the ChatBot, a notification badge should be
|
|
126
219
|

|
127
220
|
</div>
|
128
221
|
|
129
|
-
|
222
|
+
If necessary for brand consistency, you can customize the toggle shape and icon.
|
223
|
+
|
224
|
+
<div class="ws-docs-content-img">
|
225
|
+

|
226
|
+
</div>
|
130
227
|
|
131
|
-
|
228
|
+
#### Masthead toggle
|
132
229
|
|
133
|
-
|
230
|
+
When the ChatBot toggle is a masthead utility, use the fa-comments icon:
|
231
|
+
|
232
|
+
<div class="ws-docs-content-img">
|
233
|
+

|
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
|
+

|
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
|
+

|
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
|
+

|
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
|

|
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
|
+

|
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
|
+

|
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
|
+

|
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
|
+

|
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
|

|
186
347
|
</div>
|
187
348
|
|
188
|
-
2. **Docked:** Anchors the ChatBot to the side of the page
|
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
|

|
192
353
|
</div>
|
193
354
|
|
194
|
-
3. **
|
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
|
+

|
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
|

|
198
365
|
</div>
|
199
366
|
|
200
|
-
|
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
|
-

|
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
|
+

|
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).
|