@patternfly/chatbot 6.3.0-prerelease.2 → 6.3.0-prerelease.21
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/AttachMenu/AttachMenu.d.ts +2 -2
- package/dist/cjs/AttachMenu/AttachMenu.js +2 -12
- package/dist/cjs/AttachmentEdit/AttachmentEdit.d.ts +14 -2
- package/dist/cjs/AttachmentEdit/AttachmentEdit.js +3 -6
- package/dist/cjs/AttachmentEdit/AttachmentEdit.test.d.ts +1 -1
- package/dist/cjs/AttachmentEdit/AttachmentEdit.test.js +33 -8
- package/dist/cjs/Chatbot/Chatbot.d.ts +3 -2
- package/dist/cjs/Chatbot/Chatbot.js +5 -10
- package/dist/cjs/Chatbot/Chatbot.test.js +13 -9
- package/dist/cjs/ChatbotAlert/ChatbotAlert.d.ts +2 -2
- package/dist/cjs/ChatbotAlert/ChatbotAlert.js +4 -8
- package/dist/cjs/ChatbotAlert/ChatbotAlert.test.js +10 -10
- package/dist/cjs/ChatbotContent/ChatbotContent.d.ts +3 -3
- package/dist/cjs/ChatbotContent/ChatbotContent.js +2 -8
- package/dist/cjs/ChatbotContent/ChatbotContent.test.js +5 -5
- package/dist/cjs/ChatbotConversationHistoryNav/ChatbotConversationHistoryDropdown.d.ts +2 -2
- package/dist/cjs/ChatbotConversationHistoryNav/ChatbotConversationHistoryDropdown.js +7 -11
- package/dist/cjs/ChatbotConversationHistoryNav/ChatbotConversationHistoryDropdown.test.js +31 -33
- package/dist/cjs/ChatbotConversationHistoryNav/ChatbotConversationHistoryNav.d.ts +4 -2
- package/dist/cjs/ChatbotConversationHistoryNav/ChatbotConversationHistoryNav.js +17 -34
- package/dist/cjs/ChatbotConversationHistoryNav/ChatbotConversationHistoryNav.test.js +58 -62
- package/dist/cjs/ChatbotConversationHistoryNav/EmptyState.d.ts +2 -2
- package/dist/cjs/ChatbotConversationHistoryNav/EmptyState.js +2 -9
- package/dist/cjs/ChatbotConversationHistoryNav/LoadingState.d.ts +2 -2
- package/dist/cjs/ChatbotConversationHistoryNav/LoadingState.js +2 -25
- package/dist/cjs/ChatbotFooter/ChatbotFooter.d.ts +4 -3
- package/dist/cjs/ChatbotFooter/ChatbotFooter.js +3 -16
- package/dist/cjs/ChatbotFooter/ChatbotFooter.test.d.ts +1 -1
- package/dist/cjs/ChatbotFooter/ChatbotFooter.test.js +10 -5
- package/dist/cjs/ChatbotFooter/ChatbotFooternote.test.js +28 -28
- package/dist/cjs/ChatbotFooter/ChatbotFootnote.d.ts +3 -3
- package/dist/cjs/ChatbotFooter/ChatbotFootnote.js +10 -23
- package/dist/cjs/ChatbotHeader/ChatbotHeader.d.ts +3 -3
- package/dist/cjs/ChatbotHeader/ChatbotHeader.js +2 -7
- package/dist/cjs/ChatbotHeader/ChatbotHeader.test.js +5 -5
- package/dist/cjs/ChatbotHeader/ChatbotHeaderActions.d.ts +2 -2
- package/dist/cjs/ChatbotHeader/ChatbotHeaderActions.js +2 -5
- package/dist/cjs/ChatbotHeader/ChatbotHeaderActions.test.js +5 -5
- package/dist/cjs/ChatbotHeader/ChatbotHeaderCloseButton.d.ts +5 -4
- package/dist/cjs/ChatbotHeader/ChatbotHeaderCloseButton.js +19 -10
- package/dist/cjs/ChatbotHeader/ChatbotHeaderCloseButton.test.d.ts +1 -1
- package/dist/cjs/ChatbotHeader/ChatbotHeaderCloseButton.test.js +10 -8
- package/dist/cjs/ChatbotHeader/ChatbotHeaderMain.d.ts +2 -2
- package/dist/cjs/ChatbotHeader/ChatbotHeaderMain.js +2 -5
- package/dist/cjs/ChatbotHeader/ChatbotHeaderMain.test.js +5 -5
- package/dist/cjs/ChatbotHeader/ChatbotHeaderMenu.d.ts +5 -4
- package/dist/cjs/ChatbotHeader/ChatbotHeaderMenu.js +20 -8
- package/dist/cjs/ChatbotHeader/ChatbotHeaderMenu.test.d.ts +1 -1
- package/dist/cjs/ChatbotHeader/ChatbotHeaderMenu.test.js +10 -8
- package/dist/cjs/ChatbotHeader/ChatbotHeaderOptionsDropdown.d.ts +7 -3
- package/dist/cjs/ChatbotHeader/ChatbotHeaderOptionsDropdown.js +8 -9
- package/dist/cjs/ChatbotHeader/ChatbotHeaderOptionsDropdown.test.d.ts +1 -1
- package/dist/cjs/ChatbotHeader/ChatbotHeaderOptionsDropdown.test.js +22 -19
- package/dist/cjs/ChatbotHeader/ChatbotHeaderSelectorDropdown.d.ts +9 -3
- package/dist/cjs/ChatbotHeader/ChatbotHeaderSelectorDropdown.js +11 -12
- package/dist/cjs/ChatbotHeader/ChatbotHeaderSelectorDropdown.test.d.ts +1 -1
- package/dist/cjs/ChatbotHeader/ChatbotHeaderSelectorDropdown.test.js +20 -17
- package/dist/cjs/ChatbotHeader/ChatbotHeaderTitle.d.ts +2 -2
- package/dist/cjs/ChatbotHeader/ChatbotHeaderTitle.js +2 -5
- package/dist/cjs/ChatbotHeader/ChatbotHeaderTitle.test.js +23 -23
- package/dist/cjs/ChatbotModal/ChatbotModal.d.ts +5 -2
- package/dist/cjs/ChatbotModal/ChatbotModal.js +4 -10
- package/dist/cjs/ChatbotModal/ChatbotModal.test.d.ts +1 -0
- package/dist/cjs/ChatbotModal/ChatbotModal.test.js +16 -0
- package/dist/cjs/ChatbotPopover/ChatbotPopover.d.ts +2 -2
- package/dist/cjs/ChatbotPopover/ChatbotPopover.js +2 -8
- package/dist/cjs/ChatbotToggle/ChatbotToggle.d.ts +1 -2
- package/dist/cjs/ChatbotToggle/ChatbotToggle.js +8 -13
- package/dist/cjs/ChatbotToggle/ChatbotToggle.test.js +25 -25
- package/dist/cjs/ChatbotWelcomePrompt/ChatbotWelcomePrompt.d.ts +3 -2
- package/dist/cjs/ChatbotWelcomePrompt/ChatbotWelcomePrompt.js +7 -21
- package/dist/cjs/ChatbotWelcomePrompt/ChatbotWelcomePrompt.test.js +18 -14
- package/dist/cjs/CodeModal/CodeModal.d.ts +10 -2
- package/dist/cjs/CodeModal/CodeModal.js +8 -20
- package/dist/cjs/CodeModal/CodeModal.test.d.ts +1 -0
- package/dist/cjs/CodeModal/CodeModal.test.js +34 -0
- package/dist/cjs/Compare/Compare.d.ts +2 -2
- package/dist/cjs/Compare/Compare.js +7 -16
- package/dist/cjs/Compare/Compare.test.js +7 -9
- package/dist/cjs/FileDetails/FileDetails.d.ts +2 -2
- package/dist/cjs/FileDetails/FileDetails.js +2 -15
- package/dist/cjs/FileDetails/FileDetails.test.js +10 -10
- package/dist/cjs/FileDetailsLabel/FileDetailsLabel.d.ts +2 -2
- package/dist/cjs/FileDetailsLabel/FileDetailsLabel.js +2 -5
- package/dist/cjs/FileDetailsLabel/FileDetailsLabel.test.js +21 -21
- package/dist/cjs/FileDropZone/FileDropZone.d.ts +9 -2
- package/dist/cjs/FileDropZone/FileDropZone.js +6 -9
- package/dist/cjs/FileDropZone/FileDropZone.test.js +31 -5
- package/dist/cjs/LoadingMessage/LoadingMessage.d.ts +2 -2
- package/dist/cjs/LoadingMessage/LoadingMessage.js +2 -10
- package/dist/cjs/LoadingMessage/LoadingMessage.test.js +6 -6
- package/dist/cjs/Message/CodeBlockMessage/CodeBlockMessage.d.ts +20 -3
- package/dist/cjs/Message/CodeBlockMessage/CodeBlockMessage.js +22 -16
- package/dist/cjs/Message/CodeBlockMessage/ExpandableSectionForSyntaxHighlighter.d.ts +62 -0
- package/dist/cjs/Message/CodeBlockMessage/ExpandableSectionForSyntaxHighlighter.js +136 -0
- package/dist/cjs/Message/ErrorMessage/ErrorMessage.d.ts +1 -2
- package/dist/cjs/Message/ErrorMessage/ErrorMessage.js +5 -8
- package/dist/cjs/Message/ImageMessage/ImageMessage.d.ts +1 -2
- package/dist/cjs/Message/ImageMessage/ImageMessage.js +2 -8
- package/dist/cjs/Message/LinkMessage/LinkMessage.d.ts +1 -2
- package/dist/cjs/Message/LinkMessage/LinkMessage.js +6 -9
- package/dist/cjs/Message/ListMessage/ListItemMessage.d.ts +1 -2
- package/dist/cjs/Message/ListMessage/ListItemMessage.js +2 -8
- package/dist/cjs/Message/ListMessage/OrderedListMessage.d.ts +1 -2
- package/dist/cjs/Message/ListMessage/OrderedListMessage.js +2 -9
- package/dist/cjs/Message/ListMessage/UnorderedListMessage.d.ts +1 -2
- package/dist/cjs/Message/ListMessage/UnorderedListMessage.js +2 -9
- package/dist/cjs/Message/Message.d.ts +26 -8
- package/dist/cjs/Message/Message.js +50 -72
- package/dist/cjs/Message/Message.test.js +123 -81
- package/dist/cjs/Message/MessageInput.d.ts +2 -2
- package/dist/cjs/Message/MessageInput.js +5 -14
- package/dist/cjs/Message/MessageLoading.d.ts +1 -2
- package/dist/cjs/Message/MessageLoading.js +3 -8
- package/dist/cjs/Message/Plugins/rehypeMoveImagesOutOfParagraphs.d.ts +2 -0
- package/dist/cjs/Message/Plugins/rehypeMoveImagesOutOfParagraphs.js +47 -0
- package/dist/cjs/Message/QuickResponse/QuickResponse.d.ts +4 -2
- package/dist/cjs/Message/QuickResponse/QuickResponse.js +8 -10
- package/dist/cjs/Message/QuickStarts/FallbackImg.d.ts +2 -2
- package/dist/cjs/Message/QuickStarts/FallbackImg.js +5 -27
- package/dist/cjs/Message/QuickStarts/QuickStartTile.d.ts +4 -2
- package/dist/cjs/Message/QuickStarts/QuickStartTile.js +8 -44
- package/dist/cjs/Message/QuickStarts/QuickStartTileDescription.d.ts +2 -2
- package/dist/cjs/Message/QuickStarts/QuickStartTileDescription.js +9 -38
- package/dist/cjs/Message/QuickStarts/QuickStartTileDescription.test.js +16 -16
- package/dist/cjs/Message/QuickStarts/QuickStartTileHeader.d.ts +2 -2
- package/dist/cjs/Message/QuickStarts/QuickStartTileHeader.js +2 -26
- package/dist/cjs/Message/QuickStarts/types.d.ts +4 -3
- package/dist/cjs/Message/TableMessage/TableMessage.d.ts +1 -2
- package/dist/cjs/Message/TableMessage/TableMessage.js +8 -10
- package/dist/cjs/Message/TableMessage/TbodyMessage.d.ts +2 -3
- package/dist/cjs/Message/TableMessage/TbodyMessage.js +7 -9
- package/dist/cjs/Message/TableMessage/TdMessage.d.ts +1 -2
- package/dist/cjs/Message/TableMessage/TdMessage.js +2 -8
- package/dist/cjs/Message/TableMessage/ThMessage.d.ts +1 -2
- package/dist/cjs/Message/TableMessage/ThMessage.js +2 -8
- package/dist/cjs/Message/TableMessage/TheadMessage.d.ts +1 -2
- package/dist/cjs/Message/TableMessage/TheadMessage.js +2 -8
- package/dist/cjs/Message/TableMessage/TrMessage.d.ts +2 -3
- package/dist/cjs/Message/TableMessage/TrMessage.js +8 -10
- package/dist/cjs/Message/TextMessage/TextMessage.d.ts +1 -2
- package/dist/cjs/Message/TextMessage/TextMessage.js +2 -9
- package/dist/cjs/Message/UserFeedback/CloseButton.d.ts +2 -2
- package/dist/cjs/Message/UserFeedback/CloseButton.js +2 -8
- package/dist/cjs/Message/UserFeedback/UserFeedback.d.ts +2 -2
- package/dist/cjs/Message/UserFeedback/UserFeedback.js +13 -24
- package/dist/cjs/Message/UserFeedback/UserFeedback.test.js +55 -51
- package/dist/cjs/Message/UserFeedback/UserFeedbackComplete.d.ts +2 -2
- package/dist/cjs/Message/UserFeedback/UserFeedbackComplete.js +21 -45
- package/dist/cjs/Message/UserFeedback/UserFeedbackComplete.test.js +83 -89
- package/dist/cjs/MessageBar/AttachButton.d.ts +9 -2
- package/dist/cjs/MessageBar/AttachButton.js +9 -17
- package/dist/cjs/MessageBar/AttachButton.test.js +50 -22
- package/dist/cjs/MessageBar/MessageBar.d.ts +16 -3
- package/dist/cjs/MessageBar/MessageBar.js +36 -37
- package/dist/cjs/MessageBar/MessageBar.test.js +122 -108
- package/dist/cjs/MessageBar/MicrophoneButton.d.ts +3 -2
- package/dist/cjs/MessageBar/MicrophoneButton.js +8 -15
- package/dist/cjs/MessageBar/SendButton.d.ts +4 -2
- package/dist/cjs/MessageBar/SendButton.js +4 -12
- package/dist/cjs/MessageBar/SendButton.test.js +18 -14
- package/dist/cjs/MessageBar/StopButton.d.ts +4 -2
- package/dist/cjs/MessageBar/StopButton.js +4 -13
- package/dist/cjs/MessageBar/StopButton.test.js +18 -14
- package/dist/cjs/MessageBox/JumpButton.d.ts +2 -2
- package/dist/cjs/MessageBox/JumpButton.js +2 -10
- package/dist/cjs/MessageBox/JumpButton.test.js +10 -10
- package/dist/cjs/MessageBox/MessageBox.d.ts +21 -5
- package/dist/cjs/MessageBox/MessageBox.js +181 -44
- package/dist/cjs/MessageBox/MessageBox.test.js +219 -6
- package/dist/cjs/PreviewAttachment/PreviewAttachment.d.ts +14 -2
- package/dist/cjs/PreviewAttachment/PreviewAttachment.js +3 -6
- package/dist/cjs/PreviewAttachment/PreviewAttachment.test.d.ts +1 -1
- package/dist/cjs/PreviewAttachment/PreviewAttachment.test.js +34 -12
- package/dist/cjs/ResponseActions/ResponseActionButton.d.ts +5 -5
- package/dist/cjs/ResponseActions/ResponseActionButton.js +5 -8
- package/dist/cjs/ResponseActions/ResponseActionButton.test.js +19 -19
- package/dist/cjs/ResponseActions/ResponseActions.d.ts +7 -3
- package/dist/cjs/ResponseActions/ResponseActions.js +12 -16
- package/dist/cjs/ResponseActions/ResponseActions.test.js +60 -41
- package/dist/cjs/Settings/SettingsForm.d.ts +4 -2
- package/dist/cjs/Settings/SettingsForm.js +3 -9
- package/dist/cjs/Settings/SettingsForm.test.d.ts +1 -1
- package/dist/cjs/Settings/SettingsForm.test.js +18 -9
- package/dist/cjs/SourceDetailsMenuItem/SourceDetailsMenuItem.d.ts +2 -2
- package/dist/cjs/SourceDetailsMenuItem/SourceDetailsMenuItem.js +2 -11
- package/dist/cjs/SourcesCard/SourcesCard.d.ts +2 -2
- package/dist/cjs/SourcesCard/SourcesCard.js +17 -43
- package/dist/cjs/SourcesCard/SourcesCard.test.js +60 -60
- package/dist/cjs/TermsOfUse/TermsOfUse.d.ts +5 -3
- package/dist/cjs/TermsOfUse/TermsOfUse.js +5 -17
- package/dist/cjs/TermsOfUse/TermsOfUse.test.js +31 -33
- package/dist/css/main.css +228 -15
- package/dist/css/main.css.map +1 -1
- package/dist/esm/AttachMenu/AttachMenu.d.ts +2 -2
- package/dist/esm/AttachMenu/AttachMenu.js +2 -9
- package/dist/esm/AttachmentEdit/AttachmentEdit.d.ts +14 -2
- package/dist/esm/AttachmentEdit/AttachmentEdit.js +3 -6
- package/dist/esm/AttachmentEdit/AttachmentEdit.test.d.ts +1 -1
- package/dist/esm/AttachmentEdit/AttachmentEdit.test.js +30 -5
- package/dist/esm/Chatbot/Chatbot.d.ts +3 -2
- package/dist/esm/Chatbot/Chatbot.js +5 -7
- package/dist/esm/Chatbot/Chatbot.test.js +9 -5
- package/dist/esm/ChatbotAlert/ChatbotAlert.d.ts +2 -2
- package/dist/esm/ChatbotAlert/ChatbotAlert.js +4 -5
- package/dist/esm/ChatbotAlert/ChatbotAlert.test.js +4 -4
- package/dist/esm/ChatbotContent/ChatbotContent.d.ts +3 -3
- package/dist/esm/ChatbotContent/ChatbotContent.js +2 -5
- package/dist/esm/ChatbotContent/ChatbotContent.test.js +3 -3
- package/dist/esm/ChatbotConversationHistoryNav/ChatbotConversationHistoryDropdown.d.ts +2 -2
- package/dist/esm/ChatbotConversationHistoryNav/ChatbotConversationHistoryDropdown.js +7 -11
- package/dist/esm/ChatbotConversationHistoryNav/ChatbotConversationHistoryDropdown.test.js +8 -10
- package/dist/esm/ChatbotConversationHistoryNav/ChatbotConversationHistoryNav.d.ts +4 -2
- package/dist/esm/ChatbotConversationHistoryNav/ChatbotConversationHistoryNav.js +17 -34
- package/dist/esm/ChatbotConversationHistoryNav/ChatbotConversationHistoryNav.test.js +29 -33
- package/dist/esm/ChatbotConversationHistoryNav/EmptyState.d.ts +2 -2
- package/dist/esm/ChatbotConversationHistoryNav/EmptyState.js +2 -6
- package/dist/esm/ChatbotConversationHistoryNav/LoadingState.d.ts +2 -2
- package/dist/esm/ChatbotConversationHistoryNav/LoadingState.js +2 -22
- package/dist/esm/ChatbotFooter/ChatbotFooter.d.ts +4 -3
- package/dist/esm/ChatbotFooter/ChatbotFooter.js +3 -13
- package/dist/esm/ChatbotFooter/ChatbotFooter.test.d.ts +1 -1
- package/dist/esm/ChatbotFooter/ChatbotFooter.test.js +8 -3
- package/dist/esm/ChatbotFooter/ChatbotFooternote.test.js +5 -5
- package/dist/esm/ChatbotFooter/ChatbotFootnote.d.ts +3 -3
- package/dist/esm/ChatbotFooter/ChatbotFootnote.js +10 -23
- package/dist/esm/ChatbotHeader/ChatbotHeader.d.ts +3 -3
- package/dist/esm/ChatbotHeader/ChatbotHeader.js +2 -4
- package/dist/esm/ChatbotHeader/ChatbotHeader.test.js +3 -3
- package/dist/esm/ChatbotHeader/ChatbotHeaderActions.d.ts +2 -2
- package/dist/esm/ChatbotHeader/ChatbotHeaderActions.js +2 -2
- package/dist/esm/ChatbotHeader/ChatbotHeaderActions.test.js +3 -3
- package/dist/esm/ChatbotHeader/ChatbotHeaderCloseButton.d.ts +5 -4
- package/dist/esm/ChatbotHeader/ChatbotHeaderCloseButton.js +20 -8
- package/dist/esm/ChatbotHeader/ChatbotHeaderCloseButton.test.d.ts +1 -1
- package/dist/esm/ChatbotHeader/ChatbotHeaderCloseButton.test.js +8 -3
- package/dist/esm/ChatbotHeader/ChatbotHeaderMain.d.ts +2 -2
- package/dist/esm/ChatbotHeader/ChatbotHeaderMain.js +2 -2
- package/dist/esm/ChatbotHeader/ChatbotHeaderMain.test.js +3 -3
- package/dist/esm/ChatbotHeader/ChatbotHeaderMenu.d.ts +5 -4
- package/dist/esm/ChatbotHeader/ChatbotHeaderMenu.js +20 -8
- package/dist/esm/ChatbotHeader/ChatbotHeaderMenu.test.d.ts +1 -1
- package/dist/esm/ChatbotHeader/ChatbotHeaderMenu.test.js +8 -3
- package/dist/esm/ChatbotHeader/ChatbotHeaderOptionsDropdown.d.ts +7 -3
- package/dist/esm/ChatbotHeader/ChatbotHeaderOptionsDropdown.js +8 -9
- package/dist/esm/ChatbotHeader/ChatbotHeaderOptionsDropdown.test.d.ts +1 -1
- package/dist/esm/ChatbotHeader/ChatbotHeaderOptionsDropdown.test.js +13 -7
- package/dist/esm/ChatbotHeader/ChatbotHeaderSelectorDropdown.d.ts +9 -3
- package/dist/esm/ChatbotHeader/ChatbotHeaderSelectorDropdown.js +11 -9
- package/dist/esm/ChatbotHeader/ChatbotHeaderSelectorDropdown.test.d.ts +1 -1
- package/dist/esm/ChatbotHeader/ChatbotHeaderSelectorDropdown.test.js +13 -7
- package/dist/esm/ChatbotHeader/ChatbotHeaderTitle.d.ts +2 -2
- package/dist/esm/ChatbotHeader/ChatbotHeaderTitle.js +2 -2
- package/dist/esm/ChatbotHeader/ChatbotHeaderTitle.test.js +12 -12
- package/dist/esm/ChatbotModal/ChatbotModal.d.ts +5 -2
- package/dist/esm/ChatbotModal/ChatbotModal.js +4 -7
- package/dist/esm/ChatbotModal/ChatbotModal.test.d.ts +1 -0
- package/dist/esm/ChatbotModal/ChatbotModal.test.js +11 -0
- package/dist/esm/ChatbotPopover/ChatbotPopover.d.ts +2 -2
- package/dist/esm/ChatbotPopover/ChatbotPopover.js +2 -5
- package/dist/esm/ChatbotToggle/ChatbotToggle.d.ts +1 -2
- package/dist/esm/ChatbotToggle/ChatbotToggle.js +8 -13
- package/dist/esm/ChatbotToggle/ChatbotToggle.test.js +8 -8
- package/dist/esm/ChatbotWelcomePrompt/ChatbotWelcomePrompt.d.ts +3 -2
- package/dist/esm/ChatbotWelcomePrompt/ChatbotWelcomePrompt.js +7 -18
- package/dist/esm/ChatbotWelcomePrompt/ChatbotWelcomePrompt.test.js +11 -7
- package/dist/esm/CodeModal/CodeModal.d.ts +10 -2
- package/dist/esm/CodeModal/CodeModal.js +8 -20
- package/dist/esm/CodeModal/CodeModal.test.d.ts +1 -0
- package/dist/esm/CodeModal/CodeModal.test.js +29 -0
- package/dist/esm/Compare/Compare.d.ts +2 -2
- package/dist/esm/Compare/Compare.js +7 -13
- package/dist/esm/Compare/Compare.test.js +4 -6
- package/dist/esm/FileDetails/FileDetails.d.ts +2 -2
- package/dist/esm/FileDetails/FileDetails.js +2 -15
- package/dist/esm/FileDetails/FileDetails.test.js +4 -4
- package/dist/esm/FileDetailsLabel/FileDetailsLabel.d.ts +2 -2
- package/dist/esm/FileDetailsLabel/FileDetailsLabel.js +2 -5
- package/dist/esm/FileDetailsLabel/FileDetailsLabel.test.js +9 -9
- package/dist/esm/FileDropZone/FileDropZone.d.ts +9 -2
- package/dist/esm/FileDropZone/FileDropZone.js +6 -6
- package/dist/esm/FileDropZone/FileDropZone.test.js +29 -3
- package/dist/esm/LoadingMessage/LoadingMessage.d.ts +2 -2
- package/dist/esm/LoadingMessage/LoadingMessage.js +2 -10
- package/dist/esm/LoadingMessage/LoadingMessage.test.js +3 -3
- package/dist/esm/Message/CodeBlockMessage/CodeBlockMessage.d.ts +20 -3
- package/dist/esm/Message/CodeBlockMessage/CodeBlockMessage.js +23 -17
- package/dist/esm/Message/CodeBlockMessage/ExpandableSectionForSyntaxHighlighter.d.ts +62 -0
- package/dist/esm/Message/CodeBlockMessage/ExpandableSectionForSyntaxHighlighter.js +130 -0
- package/dist/esm/Message/ErrorMessage/ErrorMessage.d.ts +1 -2
- package/dist/esm/Message/ErrorMessage/ErrorMessage.js +5 -5
- package/dist/esm/Message/ImageMessage/ImageMessage.d.ts +1 -2
- package/dist/esm/Message/ImageMessage/ImageMessage.js +2 -5
- package/dist/esm/Message/LinkMessage/LinkMessage.d.ts +1 -2
- package/dist/esm/Message/LinkMessage/LinkMessage.js +6 -6
- package/dist/esm/Message/ListMessage/ListItemMessage.d.ts +1 -2
- package/dist/esm/Message/ListMessage/ListItemMessage.js +2 -5
- package/dist/esm/Message/ListMessage/OrderedListMessage.d.ts +1 -2
- package/dist/esm/Message/ListMessage/OrderedListMessage.js +2 -6
- package/dist/esm/Message/ListMessage/UnorderedListMessage.d.ts +1 -2
- package/dist/esm/Message/ListMessage/UnorderedListMessage.js +2 -6
- package/dist/esm/Message/Message.d.ts +26 -8
- package/dist/esm/Message/Message.js +50 -72
- package/dist/esm/Message/Message.test.js +123 -81
- package/dist/esm/Message/MessageInput.d.ts +2 -2
- package/dist/esm/Message/MessageInput.js +5 -11
- package/dist/esm/Message/MessageLoading.d.ts +1 -2
- package/dist/esm/Message/MessageLoading.js +2 -4
- package/dist/esm/Message/Plugins/rehypeMoveImagesOutOfParagraphs.d.ts +2 -0
- package/dist/esm/Message/Plugins/rehypeMoveImagesOutOfParagraphs.js +43 -0
- package/dist/esm/Message/QuickResponse/QuickResponse.d.ts +4 -2
- package/dist/esm/Message/QuickResponse/QuickResponse.js +8 -7
- package/dist/esm/Message/QuickStarts/FallbackImg.d.ts +2 -2
- package/dist/esm/Message/QuickStarts/FallbackImg.js +5 -4
- package/dist/esm/Message/QuickStarts/QuickStartTile.d.ts +4 -2
- package/dist/esm/Message/QuickStarts/QuickStartTile.js +8 -21
- package/dist/esm/Message/QuickStarts/QuickStartTileDescription.d.ts +2 -2
- package/dist/esm/Message/QuickStarts/QuickStartTileDescription.js +9 -15
- package/dist/esm/Message/QuickStarts/QuickStartTileDescription.test.js +5 -5
- package/dist/esm/Message/QuickStarts/QuickStartTileHeader.d.ts +2 -2
- package/dist/esm/Message/QuickStarts/QuickStartTileHeader.js +2 -3
- package/dist/esm/Message/QuickStarts/types.d.ts +4 -3
- package/dist/esm/Message/TableMessage/TableMessage.d.ts +1 -2
- package/dist/esm/Message/TableMessage/TableMessage.js +8 -7
- package/dist/esm/Message/TableMessage/TbodyMessage.d.ts +2 -3
- package/dist/esm/Message/TableMessage/TbodyMessage.js +7 -6
- package/dist/esm/Message/TableMessage/TdMessage.d.ts +1 -2
- package/dist/esm/Message/TableMessage/TdMessage.js +2 -5
- package/dist/esm/Message/TableMessage/ThMessage.d.ts +1 -2
- package/dist/esm/Message/TableMessage/ThMessage.js +2 -5
- package/dist/esm/Message/TableMessage/TheadMessage.d.ts +1 -2
- package/dist/esm/Message/TableMessage/TheadMessage.js +2 -5
- package/dist/esm/Message/TableMessage/TrMessage.d.ts +2 -3
- package/dist/esm/Message/TableMessage/TrMessage.js +8 -7
- package/dist/esm/Message/TextMessage/TextMessage.d.ts +1 -2
- package/dist/esm/Message/TextMessage/TextMessage.js +2 -6
- package/dist/esm/Message/UserFeedback/CloseButton.d.ts +2 -2
- package/dist/esm/Message/UserFeedback/CloseButton.js +2 -5
- package/dist/esm/Message/UserFeedback/UserFeedback.d.ts +2 -2
- package/dist/esm/Message/UserFeedback/UserFeedback.js +13 -24
- package/dist/esm/Message/UserFeedback/UserFeedback.test.js +24 -20
- package/dist/esm/Message/UserFeedback/UserFeedbackComplete.d.ts +2 -2
- package/dist/esm/Message/UserFeedback/UserFeedbackComplete.js +21 -45
- package/dist/esm/Message/UserFeedback/UserFeedbackComplete.test.js +29 -35
- package/dist/esm/MessageBar/AttachButton.d.ts +9 -2
- package/dist/esm/MessageBar/AttachButton.js +9 -14
- package/dist/esm/MessageBar/AttachButton.test.js +44 -16
- package/dist/esm/MessageBar/MessageBar.d.ts +16 -3
- package/dist/esm/MessageBar/MessageBar.js +34 -35
- package/dist/esm/MessageBar/MessageBar.test.js +87 -73
- package/dist/esm/MessageBar/MicrophoneButton.d.ts +3 -2
- package/dist/esm/MessageBar/MicrophoneButton.js +8 -12
- package/dist/esm/MessageBar/SendButton.d.ts +4 -2
- package/dist/esm/MessageBar/SendButton.js +4 -9
- package/dist/esm/MessageBar/SendButton.test.js +13 -9
- package/dist/esm/MessageBar/StopButton.d.ts +4 -2
- package/dist/esm/MessageBar/StopButton.js +4 -10
- package/dist/esm/MessageBar/StopButton.test.js +13 -9
- package/dist/esm/MessageBox/JumpButton.d.ts +2 -2
- package/dist/esm/MessageBox/JumpButton.js +2 -7
- package/dist/esm/MessageBox/JumpButton.test.js +9 -9
- package/dist/esm/MessageBox/MessageBox.d.ts +21 -5
- package/dist/esm/MessageBox/MessageBox.js +181 -44
- package/dist/esm/MessageBox/MessageBox.test.js +220 -7
- package/dist/esm/PreviewAttachment/PreviewAttachment.d.ts +14 -2
- package/dist/esm/PreviewAttachment/PreviewAttachment.js +3 -6
- package/dist/esm/PreviewAttachment/PreviewAttachment.test.d.ts +1 -1
- package/dist/esm/PreviewAttachment/PreviewAttachment.test.js +30 -5
- package/dist/esm/ResponseActions/ResponseActionButton.d.ts +5 -5
- package/dist/esm/ResponseActions/ResponseActionButton.js +5 -5
- package/dist/esm/ResponseActions/ResponseActionButton.test.js +7 -7
- package/dist/esm/ResponseActions/ResponseActions.d.ts +7 -3
- package/dist/esm/ResponseActions/ResponseActions.js +13 -17
- package/dist/esm/ResponseActions/ResponseActions.test.js +35 -16
- package/dist/esm/Settings/SettingsForm.d.ts +4 -2
- package/dist/esm/Settings/SettingsForm.js +3 -6
- package/dist/esm/Settings/SettingsForm.test.d.ts +1 -1
- package/dist/esm/Settings/SettingsForm.test.js +16 -4
- package/dist/esm/SourceDetailsMenuItem/SourceDetailsMenuItem.d.ts +2 -2
- package/dist/esm/SourceDetailsMenuItem/SourceDetailsMenuItem.js +2 -8
- package/dist/esm/SourcesCard/SourcesCard.d.ts +2 -2
- package/dist/esm/SourcesCard/SourcesCard.js +17 -40
- package/dist/esm/SourcesCard/SourcesCard.test.js +19 -19
- package/dist/esm/TermsOfUse/TermsOfUse.d.ts +5 -3
- package/dist/esm/TermsOfUse/TermsOfUse.js +5 -17
- package/dist/esm/TermsOfUse/TermsOfUse.test.js +10 -12
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +5 -6
- package/patternfly-docs/content/extensions/chatbot/design-guidelines.md +10 -0
- package/patternfly-docs/content/extensions/chatbot/examples/Customizing Messages/Customizing Messages.md +51 -0
- package/patternfly-docs/content/extensions/chatbot/examples/Messages/AttachMenu.tsx +9 -9
- package/patternfly-docs/content/extensions/chatbot/examples/Messages/AttachmentEdit.tsx +14 -5
- package/patternfly-docs/content/extensions/chatbot/examples/Messages/AttachmentError.tsx +2 -2
- package/patternfly-docs/content/extensions/chatbot/examples/Messages/BotMessage.tsx +19 -20
- package/patternfly-docs/content/extensions/chatbot/examples/Messages/FileDetails.tsx +2 -2
- package/patternfly-docs/content/extensions/chatbot/examples/Messages/FileDetailsLabel.tsx +9 -9
- package/patternfly-docs/content/extensions/chatbot/examples/Messages/FileDropZone.tsx +4 -4
- package/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithAttachment.tsx +7 -7
- package/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithCustomResponseActions.tsx +2 -12
- package/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithFeedback.tsx +37 -4
- package/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithFeedbackTimeout.tsx +3 -3
- package/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithQuickResponses.tsx +26 -2
- package/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithQuickStart.tsx +13 -2
- package/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithResponseActions.tsx +3 -3
- package/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithSources.tsx +24 -3
- package/patternfly-docs/content/extensions/chatbot/examples/Messages/Messages.md +1 -0
- package/patternfly-docs/content/extensions/chatbot/examples/Messages/PreviewAttachment.tsx +14 -5
- package/patternfly-docs/content/extensions/chatbot/examples/Messages/UserMessage.tsx +20 -14
- package/patternfly-docs/content/extensions/chatbot/examples/Messages/UserMessageWithExtraContent.tsx +4 -4
- package/patternfly-docs/content/extensions/chatbot/examples/UI/ChatbotContainer.tsx +59 -36
- package/patternfly-docs/content/extensions/chatbot/examples/UI/ChatbotFooter.tsx +2 -2
- package/patternfly-docs/content/extensions/chatbot/examples/UI/ChatbotFootnote.tsx +2 -2
- package/patternfly-docs/content/extensions/chatbot/examples/UI/ChatbotHeaderBasic.tsx +10 -13
- package/patternfly-docs/content/extensions/chatbot/examples/UI/ChatbotHeaderDrawer.tsx +18 -9
- package/patternfly-docs/content/extensions/chatbot/examples/UI/ChatbotHeaderDrawerNavigation.tsx +5 -5
- package/patternfly-docs/content/extensions/chatbot/examples/UI/ChatbotHeaderDrawerResizable.tsx +5 -5
- package/patternfly-docs/content/extensions/chatbot/examples/UI/ChatbotHeaderDrawerWithActions.tsx +14 -5
- package/patternfly-docs/content/extensions/chatbot/examples/UI/ChatbotHeaderDrawerWithSelection.tsx +17 -8
- package/patternfly-docs/content/extensions/chatbot/examples/UI/ChatbotHeaderTitle.tsx +59 -34
- package/patternfly-docs/content/extensions/chatbot/examples/UI/ChatbotMessageBar.tsx +2 -2
- package/patternfly-docs/content/extensions/chatbot/examples/UI/ChatbotMessageBarAttach.tsx +9 -9
- package/patternfly-docs/content/extensions/chatbot/examples/UI/ChatbotMessageBarDisabled.tsx +3 -3
- package/patternfly-docs/content/extensions/chatbot/examples/UI/ChatbotMessageBarLanguage.tsx +2 -2
- package/patternfly-docs/content/extensions/chatbot/examples/UI/ChatbotMessageBarStop.tsx +2 -2
- package/patternfly-docs/content/extensions/chatbot/examples/UI/ChatbotModal.tsx +74 -37
- package/patternfly-docs/content/extensions/chatbot/examples/UI/ChatbotToggleBasic.tsx +3 -3
- package/patternfly-docs/content/extensions/chatbot/examples/UI/ChatbotWelcomeInteraction.tsx +8 -8
- package/patternfly-docs/content/extensions/chatbot/examples/UI/ChatbotWelcomePrompt.tsx +3 -3
- package/patternfly-docs/content/extensions/chatbot/examples/UI/CompactSettings.tsx +282 -0
- package/patternfly-docs/content/extensions/chatbot/examples/UI/CustomClosedIcon.tsx +3 -3
- package/patternfly-docs/content/extensions/chatbot/examples/UI/Settings.tsx +16 -23
- package/patternfly-docs/content/extensions/chatbot/examples/UI/SkipToContent.tsx +5 -5
- package/patternfly-docs/content/extensions/chatbot/examples/UI/SquareChatbotToggle.tsx +3 -3
- package/patternfly-docs/content/extensions/chatbot/examples/UI/TermsOfUse.tsx +91 -48
- package/patternfly-docs/content/extensions/chatbot/examples/UI/TermsOfUseCompact.tsx +179 -0
- package/patternfly-docs/content/extensions/chatbot/examples/UI/UI.md +17 -0
- package/patternfly-docs/content/extensions/chatbot/examples/demos/AttachmentDemos.md +37 -0
- package/patternfly-docs/content/extensions/chatbot/examples/demos/Chatbot.md +9 -1
- package/patternfly-docs/content/extensions/chatbot/examples/demos/Chatbot.tsx +19 -25
- package/patternfly-docs/content/extensions/chatbot/examples/demos/ChatbotAttachment.tsx +23 -14
- package/patternfly-docs/content/extensions/chatbot/examples/demos/ChatbotAttachmentMenu.tsx +14 -14
- package/patternfly-docs/content/extensions/chatbot/examples/demos/ChatbotCompact.tsx +475 -0
- package/patternfly-docs/content/extensions/chatbot/examples/demos/ChatbotInDrawer.tsx +17 -22
- package/patternfly-docs/content/extensions/chatbot/examples/demos/ChatbotScrolling.tsx +536 -0
- package/patternfly-docs/content/extensions/chatbot/examples/demos/EmbeddedChatbot.tsx +17 -22
- package/patternfly-docs/content/extensions/chatbot/examples/demos/EmbeddedComparisonChatbot.tsx +13 -13
- package/patternfly-docs/content/extensions/chatbot/examples/demos/Feedback.tsx +7 -7
- package/patternfly-docs/content/extensions/chatbot/img/quick-response-confirmation.svg +67 -0
- package/src/AttachMenu/AttachMenu.tsx +2 -2
- package/src/AttachmentEdit/AttachmentEdit.test.tsx +46 -2
- package/src/AttachmentEdit/AttachmentEdit.tsx +29 -7
- package/src/Chatbot/Chatbot.scss +7 -0
- package/src/Chatbot/Chatbot.test.tsx +9 -1
- package/src/Chatbot/Chatbot.tsx +9 -4
- package/src/ChatbotAlert/ChatbotAlert.test.tsx +0 -1
- package/src/ChatbotAlert/ChatbotAlert.tsx +2 -2
- package/src/ChatbotContent/ChatbotContent.test.tsx +0 -1
- package/src/ChatbotContent/ChatbotContent.tsx +3 -3
- package/src/ChatbotConversationHistoryNav/ChatbotConversationHistoryDropdown.test.tsx +0 -1
- package/src/ChatbotConversationHistoryNav/ChatbotConversationHistoryDropdown.tsx +6 -4
- package/src/ChatbotConversationHistoryNav/ChatbotConversationHistoryNav.scss +38 -3
- package/src/ChatbotConversationHistoryNav/ChatbotConversationHistoryNav.test.tsx +21 -3
- package/src/ChatbotConversationHistoryNav/ChatbotConversationHistoryNav.tsx +17 -8
- package/src/ChatbotConversationHistoryNav/EmptyState.tsx +2 -2
- package/src/ChatbotConversationHistoryNav/LoadingState.tsx +2 -2
- package/src/ChatbotFooter/ChatbotFooter.scss +5 -0
- package/src/ChatbotFooter/ChatbotFooter.test.tsx +10 -1
- package/src/ChatbotFooter/ChatbotFooter.tsx +6 -4
- package/src/ChatbotFooter/ChatbotFooternote.test.tsx +0 -1
- package/src/ChatbotFooter/ChatbotFootnote.tsx +6 -4
- package/src/ChatbotHeader/ChatbotHeader.scss +25 -0
- package/src/ChatbotHeader/ChatbotHeader.test.tsx +0 -1
- package/src/ChatbotHeader/ChatbotHeader.tsx +4 -7
- package/src/ChatbotHeader/ChatbotHeaderActions.test.tsx +0 -1
- package/src/ChatbotHeader/ChatbotHeaderActions.tsx +2 -2
- package/src/ChatbotHeader/ChatbotHeaderCloseButton.test.tsx +6 -1
- package/src/ChatbotHeader/ChatbotHeaderCloseButton.tsx +17 -10
- package/src/ChatbotHeader/ChatbotHeaderMain.test.tsx +0 -1
- package/src/ChatbotHeader/ChatbotHeaderMain.tsx +5 -3
- package/src/ChatbotHeader/ChatbotHeaderMenu.test.tsx +8 -1
- package/src/ChatbotHeader/ChatbotHeaderMenu.tsx +17 -12
- package/src/ChatbotHeader/ChatbotHeaderOptionsDropdown.test.tsx +15 -1
- package/src/ChatbotHeader/ChatbotHeaderOptionsDropdown.tsx +17 -7
- package/src/ChatbotHeader/ChatbotHeaderSelectorDropdown.test.tsx +19 -1
- package/src/ChatbotHeader/ChatbotHeaderSelectorDropdown.tsx +30 -6
- package/src/ChatbotHeader/ChatbotHeaderTitle.test.tsx +0 -1
- package/src/ChatbotHeader/ChatbotHeaderTitle.tsx +2 -2
- package/src/ChatbotModal/ChatbotModal.scss +15 -4
- package/src/ChatbotModal/ChatbotModal.test.tsx +58 -0
- package/src/ChatbotModal/ChatbotModal.tsx +7 -3
- package/src/ChatbotPopover/ChatbotPopover.scss +9 -5
- package/src/ChatbotPopover/ChatbotPopover.tsx +2 -2
- package/src/ChatbotToggle/ChatbotToggle.test.tsx +0 -1
- package/src/ChatbotToggle/ChatbotToggle.tsx +5 -3
- package/src/ChatbotWelcomePrompt/ChatbotWelcomePrompt.scss +9 -1
- package/src/ChatbotWelcomePrompt/ChatbotWelcomePrompt.test.tsx +13 -1
- package/src/ChatbotWelcomePrompt/ChatbotWelcomePrompt.tsx +15 -4
- package/src/ChatbotWelcomePrompt/__snapshots__/ChatbotWelcomePrompt.test.tsx.snap +1 -1
- package/src/CodeModal/CodeModal.scss +11 -3
- package/src/CodeModal/CodeModal.test.tsx +51 -0
- package/src/CodeModal/CodeModal.tsx +24 -10
- package/src/Compare/Compare.test.tsx +0 -1
- package/src/Compare/Compare.tsx +7 -6
- package/src/FileDetails/FileDetails.test.tsx +0 -1
- package/src/FileDetails/FileDetails.tsx +2 -2
- package/src/FileDetails/__snapshots__/FileDetails.test.tsx.snap +1 -1
- package/src/FileDetailsLabel/FileDetailsLabel.test.tsx +0 -1
- package/src/FileDetailsLabel/FileDetailsLabel.tsx +1 -1
- package/src/FileDetailsLabel/__snapshots__/FileDetailsLabel.test.tsx.snap +1 -1
- package/src/FileDropZone/FileDropZone.test.tsx +29 -1
- package/src/FileDropZone/FileDropZone.tsx +13 -3
- package/src/LoadingMessage/LoadingMessage.test.tsx +0 -1
- package/src/LoadingMessage/LoadingMessage.tsx +2 -2
- package/src/Message/CodeBlockMessage/CodeBlockMessage.scss +7 -0
- package/src/Message/CodeBlockMessage/CodeBlockMessage.tsx +105 -18
- package/src/Message/CodeBlockMessage/ExpandableSectionForSyntaxHighlighter.tsx +220 -0
- package/src/Message/ErrorMessage/ErrorMessage.tsx +0 -1
- package/src/Message/ImageMessage/ImageMessage.tsx +1 -2
- package/src/Message/LinkMessage/LinkMessage.tsx +0 -1
- package/src/Message/ListMessage/ListItemMessage.tsx +0 -1
- package/src/Message/ListMessage/OrderedListMessage.tsx +0 -1
- package/src/Message/ListMessage/UnorderedListMessage.tsx +0 -1
- package/src/Message/Message.scss +27 -0
- package/src/Message/Message.test.tsx +70 -6
- package/src/Message/Message.tsx +41 -17
- package/src/Message/MessageInput.tsx +5 -5
- package/src/Message/MessageLoading.tsx +0 -2
- package/src/Message/Plugins/rehypeMoveImagesOutOfParagraphs.ts +53 -0
- package/src/Message/QuickResponse/QuickResponse.tsx +9 -4
- package/src/Message/QuickStarts/FallbackImg.tsx +4 -3
- package/src/Message/QuickStarts/QuickStartTile.tsx +8 -4
- package/src/Message/QuickStarts/QuickStartTileDescription.test.tsx +0 -1
- package/src/Message/QuickStarts/QuickStartTileDescription.tsx +4 -3
- package/src/Message/QuickStarts/QuickStartTileHeader.tsx +2 -2
- package/src/Message/QuickStarts/types.ts +4 -3
- package/src/Message/TableMessage/TableMessage.tsx +4 -4
- package/src/Message/TableMessage/TbodyMessage.tsx +3 -3
- package/src/Message/TableMessage/TdMessage.tsx +1 -2
- package/src/Message/TableMessage/ThMessage.tsx +1 -2
- package/src/Message/TableMessage/TheadMessage.tsx +3 -2
- package/src/Message/TableMessage/TrMessage.tsx +4 -4
- package/src/Message/TextMessage/TextMessage.scss +25 -0
- package/src/Message/TextMessage/TextMessage.tsx +1 -2
- package/src/Message/UserFeedback/CloseButton.tsx +2 -2
- package/src/Message/UserFeedback/UserFeedback.scss +24 -3
- package/src/Message/UserFeedback/UserFeedback.test.tsx +13 -1
- package/src/Message/UserFeedback/UserFeedback.tsx +12 -8
- package/src/Message/UserFeedback/UserFeedbackComplete.test.tsx +4 -1
- package/src/Message/UserFeedback/UserFeedbackComplete.tsx +26 -16
- package/src/MessageBar/AttachButton.scss +10 -0
- package/src/MessageBar/AttachButton.test.tsx +56 -8
- package/src/MessageBar/AttachButton.tsx +21 -8
- package/src/MessageBar/MessageBar.scss +17 -0
- package/src/MessageBar/MessageBar.test.tsx +81 -30
- package/src/MessageBar/MessageBar.tsx +60 -25
- package/src/MessageBar/MicrophoneButton.scss +10 -0
- package/src/MessageBar/MicrophoneButton.tsx +15 -9
- package/src/MessageBar/SendButton.scss +10 -0
- package/src/MessageBar/SendButton.test.tsx +10 -7
- package/src/MessageBar/SendButton.tsx +9 -5
- package/src/MessageBar/StopButton.scss +10 -0
- package/src/MessageBar/StopButton.test.tsx +10 -7
- package/src/MessageBar/StopButton.tsx +9 -5
- package/src/MessageBox/JumpButton.test.tsx +4 -5
- package/src/MessageBox/JumpButton.tsx +3 -3
- package/src/MessageBox/MessageBox.scss +6 -0
- package/src/MessageBox/MessageBox.test.tsx +295 -5
- package/src/MessageBox/MessageBox.tsx +301 -82
- package/src/PreviewAttachment/PreviewAttachment.test.tsx +44 -2
- package/src/PreviewAttachment/PreviewAttachment.tsx +29 -7
- package/src/ResponseActions/ResponseActionButton.test.tsx +0 -1
- package/src/ResponseActions/ResponseActionButton.tsx +6 -5
- package/src/ResponseActions/ResponseActions.test.tsx +23 -3
- package/src/ResponseActions/ResponseActions.tsx +40 -10
- package/src/Settings/Settings.scss +11 -0
- package/src/Settings/SettingsForm.test.tsx +17 -1
- package/src/Settings/SettingsForm.tsx +8 -3
- package/src/SourceDetailsMenuItem/SourceDetailsMenuItem.tsx +2 -2
- package/src/SourcesCard/SourcesCard.scss +8 -0
- package/src/SourcesCard/SourcesCard.test.tsx +0 -1
- package/src/SourcesCard/SourcesCard.tsx +9 -8
- package/src/TermsOfUse/TermsOfUse.scss +20 -0
- package/src/TermsOfUse/TermsOfUse.test.tsx +0 -1
- package/src/TermsOfUse/TermsOfUse.tsx +15 -9
- package/tsconfig.cjs.json +0 -1
- package/tsconfig.json +3 -3
@@ -1,5 +1,5 @@
|
|
1
1
|
import { EmptyStateProps } from '@patternfly/react-core';
|
2
|
-
import
|
2
|
+
import type { FunctionComponent } from 'react';
|
3
3
|
export interface HistoryEmptyStateProps extends EmptyStateProps {
|
4
4
|
onClick?: () => void;
|
5
5
|
bodyText?: string | React.ReactNode;
|
@@ -7,5 +7,5 @@ export interface HistoryEmptyStateProps extends EmptyStateProps {
|
|
7
7
|
buttonIcon?: React.ReactNode;
|
8
8
|
hasButton?: boolean;
|
9
9
|
}
|
10
|
-
export declare const HistoryEmptyState:
|
10
|
+
export declare const HistoryEmptyState: FunctionComponent<HistoryEmptyStateProps>;
|
11
11
|
export default HistoryEmptyState;
|
@@ -9,14 +9,10 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
9
9
|
}
|
10
10
|
return t;
|
11
11
|
};
|
12
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
12
13
|
import { Button, EmptyState, EmptyStateActions, EmptyStateBody, EmptyStateFooter } from '@patternfly/react-core';
|
13
|
-
import React from 'react';
|
14
14
|
export const HistoryEmptyState = (_a) => {
|
15
15
|
var { bodyText, buttonIcon, buttonText, status, titleText, headingLevel, onClick, hasButton = false } = _a, props = __rest(_a, ["bodyText", "buttonIcon", "buttonText", "status", "titleText", "headingLevel", "onClick", "hasButton"]);
|
16
|
-
return (
|
17
|
-
React.createElement(EmptyStateBody, null, bodyText),
|
18
|
-
hasButton && (React.createElement(EmptyStateFooter, null,
|
19
|
-
React.createElement(EmptyStateActions, null,
|
20
|
-
React.createElement(Button, { icon: buttonIcon, variant: "secondary", onClick: onClick }, buttonText))))));
|
16
|
+
return (_jsxs(EmptyState, Object.assign({ status: status, titleText: titleText, headingLevel: headingLevel }, props, { children: [_jsx(EmptyStateBody, { children: bodyText }), hasButton && (_jsx(EmptyStateFooter, { children: _jsx(EmptyStateActions, { children: _jsx(Button, { icon: buttonIcon, variant: "secondary", onClick: onClick, children: buttonText }) }) }))] })));
|
21
17
|
};
|
22
18
|
export default HistoryEmptyState;
|
@@ -1,4 +1,4 @@
|
|
1
1
|
import { SkeletonProps } from '@patternfly/react-core';
|
2
|
-
import
|
3
|
-
export declare const LoadingState:
|
2
|
+
import type { FunctionComponent } from 'react';
|
3
|
+
export declare const LoadingState: FunctionComponent<SkeletonProps>;
|
4
4
|
export default LoadingState;
|
@@ -9,30 +9,10 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
9
9
|
}
|
10
10
|
return t;
|
11
11
|
};
|
12
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
12
13
|
import { Skeleton } from '@patternfly/react-core';
|
13
|
-
import React from 'react';
|
14
14
|
export const LoadingState = (_a) => {
|
15
15
|
var { screenreaderText } = _a, rest = __rest(_a, ["screenreaderText"]);
|
16
|
-
return (
|
17
|
-
React.createElement("div", { className: "pf-chatbot__history-loading-block" },
|
18
|
-
React.createElement(Skeleton, Object.assign({ screenreaderText: screenreaderText !== null && screenreaderText !== void 0 ? screenreaderText : 'Loading chatbot conversation history', fontSize: "3xl" }, rest))),
|
19
|
-
React.createElement("div", { className: "pf-chatbot__history-loading-block" },
|
20
|
-
React.createElement(Skeleton, Object.assign({ fontSize: "sm", width: "70%" }, rest)),
|
21
|
-
React.createElement(Skeleton, Object.assign({ fontSize: "3xl" }, rest)),
|
22
|
-
React.createElement(Skeleton, Object.assign({ fontSize: "3xl" }, rest))),
|
23
|
-
React.createElement("div", { className: "pf-chatbot__history-loading-block" },
|
24
|
-
React.createElement(Skeleton, Object.assign({ fontSize: "sm", width: "70%" }, rest)),
|
25
|
-
React.createElement(Skeleton, Object.assign({ fontSize: "3xl" }, rest)),
|
26
|
-
React.createElement(Skeleton, Object.assign({ fontSize: "3xl" }, rest)),
|
27
|
-
React.createElement(Skeleton, Object.assign({ fontSize: "3xl" }, rest))),
|
28
|
-
React.createElement("div", { className: "pf-chatbot__history-loading-block" },
|
29
|
-
React.createElement(Skeleton, Object.assign({ fontSize: "sm", width: "70%" }, rest)),
|
30
|
-
React.createElement(Skeleton, Object.assign({ fontSize: "3xl" }, rest)),
|
31
|
-
React.createElement(Skeleton, Object.assign({ fontSize: "3xl" }, rest)),
|
32
|
-
React.createElement(Skeleton, Object.assign({ fontSize: "3xl" }, rest)),
|
33
|
-
React.createElement(Skeleton, Object.assign({ fontSize: "3xl" }, rest))),
|
34
|
-
React.createElement("div", { className: "pf-chatbot__history-loading-block" },
|
35
|
-
React.createElement(Skeleton, Object.assign({ fontSize: "sm", width: "70%" }, rest)),
|
36
|
-
React.createElement(Skeleton, Object.assign({ fontSize: "3xl" }, rest)))));
|
16
|
+
return (_jsxs("div", { className: "pf-chatbot__history-loading", children: [_jsx("div", { className: "pf-chatbot__history-loading-block", children: _jsx(Skeleton, Object.assign({ screenreaderText: screenreaderText !== null && screenreaderText !== void 0 ? screenreaderText : 'Loading chatbot conversation history', fontSize: "3xl" }, rest)) }), _jsxs("div", { className: "pf-chatbot__history-loading-block", children: [_jsx(Skeleton, Object.assign({ fontSize: "sm", width: "70%" }, rest)), _jsx(Skeleton, Object.assign({ fontSize: "3xl" }, rest)), _jsx(Skeleton, Object.assign({ fontSize: "3xl" }, rest))] }), _jsxs("div", { className: "pf-chatbot__history-loading-block", children: [_jsx(Skeleton, Object.assign({ fontSize: "sm", width: "70%" }, rest)), _jsx(Skeleton, Object.assign({ fontSize: "3xl" }, rest)), _jsx(Skeleton, Object.assign({ fontSize: "3xl" }, rest)), _jsx(Skeleton, Object.assign({ fontSize: "3xl" }, rest))] }), _jsxs("div", { className: "pf-chatbot__history-loading-block", children: [_jsx(Skeleton, Object.assign({ fontSize: "sm", width: "70%" }, rest)), _jsx(Skeleton, Object.assign({ fontSize: "3xl" }, rest)), _jsx(Skeleton, Object.assign({ fontSize: "3xl" }, rest)), _jsx(Skeleton, Object.assign({ fontSize: "3xl" }, rest)), _jsx(Skeleton, Object.assign({ fontSize: "3xl" }, rest))] }), _jsxs("div", { className: "pf-chatbot__history-loading-block", children: [_jsx(Skeleton, Object.assign({ fontSize: "sm", width: "70%" }, rest)), _jsx(Skeleton, Object.assign({ fontSize: "3xl" }, rest))] })] }));
|
37
17
|
};
|
38
18
|
export default LoadingState;
|
@@ -1,9 +1,10 @@
|
|
1
|
-
import
|
2
|
-
export interface ChatbotFooterProps extends
|
1
|
+
import type { HTMLProps, FunctionComponent } from 'react';
|
2
|
+
export interface ChatbotFooterProps extends HTMLProps<HTMLDivElement> {
|
3
3
|
/** Children for the Footer that supports MessageBar and FootNote components*/
|
4
4
|
children?: React.ReactNode;
|
5
5
|
/** Custom classname for the Footer component */
|
6
6
|
className?: string;
|
7
|
+
isCompact?: boolean;
|
7
8
|
}
|
8
|
-
export declare const ChatbotFooter:
|
9
|
+
export declare const ChatbotFooter: FunctionComponent<ChatbotFooterProps>;
|
9
10
|
export default ChatbotFooter;
|
@@ -1,6 +1,3 @@
|
|
1
|
-
// ============================================================================
|
2
|
-
// Chatbot Footer
|
3
|
-
// ============================================================================
|
4
1
|
var __rest = (this && this.__rest) || function (s, e) {
|
5
2
|
var t = {};
|
6
3
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
@@ -12,17 +9,10 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
12
9
|
}
|
13
10
|
return t;
|
14
11
|
};
|
15
|
-
|
16
|
-
// Supports:
|
17
|
-
// - Message bar
|
18
|
-
// - Footnote
|
19
|
-
// - Footnote popover
|
20
|
-
import React from 'react';
|
12
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
21
13
|
import { Divider } from '@patternfly/react-core';
|
22
14
|
export const ChatbotFooter = (_a) => {
|
23
|
-
var { children, className } = _a, props = __rest(_a, ["children", "className"]);
|
24
|
-
return (
|
25
|
-
React.createElement(Divider, null),
|
26
|
-
React.createElement("div", { className: "pf-chatbot__footer-container" }, children)));
|
15
|
+
var { children, className, isCompact } = _a, props = __rest(_a, ["children", "className", "isCompact"]);
|
16
|
+
return (_jsxs("div", Object.assign({ className: `pf-chatbot__footer ${isCompact ? 'pf-m-compact' : ''} ${className !== null && className !== void 0 ? className : ''}` }, props, { children: [_jsx(Divider, {}), _jsx("div", { className: "pf-chatbot__footer-container", children: children })] })));
|
27
17
|
};
|
28
18
|
export default ChatbotFooter;
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
import '@testing-library/jest-dom';
|
@@ -1,13 +1,18 @@
|
|
1
|
-
import
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
2
2
|
import { render, screen } from '@testing-library/react';
|
3
3
|
import ChatbotFooter from './ChatbotFooter';
|
4
|
+
import '@testing-library/jest-dom';
|
4
5
|
describe('ChatbotFooter', () => {
|
5
6
|
it('should render ChatbotFooter with children', () => {
|
6
|
-
render(
|
7
|
+
render(_jsx(ChatbotFooter, { children: "Chatbot Content" }));
|
7
8
|
expect(screen.getByText('Chatbot Content')).toBeTruthy();
|
8
9
|
});
|
9
10
|
it('should render ChatbotFooter with custom classname', () => {
|
10
|
-
const { container } = render(
|
11
|
+
const { container } = render(_jsx(ChatbotFooter, { className: "custom-class", children: "Chatbot Content" }));
|
11
12
|
expect(container.querySelector('.custom-class')).toBeTruthy();
|
12
13
|
});
|
14
|
+
it('should handle isCompact', () => {
|
15
|
+
render(_jsx(ChatbotFooter, { className: "custom-class", isCompact: true, "data-testid": "footer", children: "Chatbot Content" }));
|
16
|
+
expect(screen.getByTestId('footer')).toHaveClass('pf-m-compact');
|
17
|
+
});
|
13
18
|
});
|
@@ -7,7 +7,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
7
7
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
8
8
|
});
|
9
9
|
};
|
10
|
-
import
|
10
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
11
11
|
import { act, fireEvent, render, screen, waitFor } from '@testing-library/react';
|
12
12
|
import ChatbotFootnote from './ChatbotFootnote';
|
13
13
|
describe('ChatbotFooternote', () => {
|
@@ -29,11 +29,11 @@ describe('ChatbotFooternote', () => {
|
|
29
29
|
}
|
30
30
|
};
|
31
31
|
it('should render ChatbotFooternote', () => {
|
32
|
-
render(
|
32
|
+
render(_jsx(ChatbotFootnote, { label: "Chatbot footer" }));
|
33
33
|
expect(screen.getByText('Chatbot footer')).toBeTruthy();
|
34
34
|
});
|
35
35
|
it('should render ChatbotFooternote with popover', () => __awaiter(void 0, void 0, void 0, function* () {
|
36
|
-
render(
|
36
|
+
render(_jsx(ChatbotFootnote, { label: "Chatbot footer", popover: popoverProps }));
|
37
37
|
// click on the footer button
|
38
38
|
act(() => {
|
39
39
|
fireEvent.click(screen.getByRole('button'));
|
@@ -47,7 +47,7 @@ describe('ChatbotFooternote', () => {
|
|
47
47
|
});
|
48
48
|
}));
|
49
49
|
it('should call onClick handler when popover cta button is clicked', () => __awaiter(void 0, void 0, void 0, function* () {
|
50
|
-
render(
|
50
|
+
render(_jsx(ChatbotFootnote, { label: "Chatbot footer", popover: popoverProps }));
|
51
51
|
// click on the footer button
|
52
52
|
act(() => {
|
53
53
|
fireEvent.click(screen.getByRole('button'));
|
@@ -61,7 +61,7 @@ describe('ChatbotFooternote', () => {
|
|
61
61
|
});
|
62
62
|
}));
|
63
63
|
it('should close the popover when escape is pressed', () => __awaiter(void 0, void 0, void 0, function* () {
|
64
|
-
render(
|
64
|
+
render(_jsx(ChatbotFootnote, { label: "Chatbot footer", popover: popoverProps }));
|
65
65
|
// click on the footer button
|
66
66
|
act(() => {
|
67
67
|
fireEvent.click(screen.getByRole('button'));
|
@@ -1,6 +1,6 @@
|
|
1
|
-
import
|
1
|
+
import type { HTMLProps, FunctionComponent } from 'react';
|
2
2
|
import { PopoverProps } from '@patternfly/react-core';
|
3
|
-
export interface ChatbotFootnoteProps extends
|
3
|
+
export interface ChatbotFootnoteProps extends Omit<HTMLProps<HTMLDivElement>, 'popover'> {
|
4
4
|
/** Label to show for the footnote */
|
5
5
|
label: string;
|
6
6
|
/** Config for the popover which opens up when footnote is clicked */
|
@@ -40,5 +40,5 @@ export interface ChatbotFootnotePopoverLink {
|
|
40
40
|
/** URL for the Link */
|
41
41
|
url: string;
|
42
42
|
}
|
43
|
-
export declare const ChatbotFootnote:
|
43
|
+
export declare const ChatbotFootnote: FunctionComponent<ChatbotFootnoteProps>;
|
44
44
|
export default ChatbotFootnote;
|
@@ -1,6 +1,3 @@
|
|
1
|
-
// ============================================================================
|
2
|
-
// Chatbot Footer - Footnote
|
3
|
-
// ============================================================================
|
4
1
|
var __rest = (this && this.__rest) || function (s, e) {
|
5
2
|
var t = {};
|
6
3
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
@@ -12,7 +9,8 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
12
9
|
}
|
13
10
|
return t;
|
14
11
|
};
|
15
|
-
import
|
12
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
13
|
+
import { useState } from 'react';
|
16
14
|
// Import Patternfly components
|
17
15
|
import { Button, Content, ContentVariants, Flex } from '@patternfly/react-core';
|
18
16
|
// Import Patternfly icons
|
@@ -24,26 +22,15 @@ export const ChatbotFootnote = (_a) => {
|
|
24
22
|
var _b, _c, _d, _e, _f;
|
25
23
|
var { label, popover, className } = _a, props = __rest(_a, ["label", "popover", "className"]);
|
26
24
|
// Popover visibility state
|
27
|
-
const [isVisible, setIsVisible] =
|
25
|
+
const [isVisible, setIsVisible] = useState(false);
|
28
26
|
// Define popover body content
|
29
|
-
const popoverBodyContent = (
|
30
|
-
(popover === null || popover === void 0 ? void 0 : popover.bannerImage) && React.createElement("img", { src: popover.bannerImage.src, alt: popover.bannerImage.alt }),
|
31
|
-
React.createElement(Content, { component: ContentVariants.h3 }, popover === null || popover === void 0 ? void 0 : popover.title),
|
32
|
-
React.createElement(Content, { component: ContentVariants.p }, popover === null || popover === void 0 ? void 0 : popover.description)));
|
27
|
+
const popoverBodyContent = (_jsxs(_Fragment, { children: [(popover === null || popover === void 0 ? void 0 : popover.bannerImage) && _jsx("img", { src: popover.bannerImage.src, alt: popover.bannerImage.alt }), _jsx(Content, { component: ContentVariants.h3, children: popover === null || popover === void 0 ? void 0 : popover.title }), _jsx(Content, { component: ContentVariants.p, children: popover === null || popover === void 0 ? void 0 : popover.description })] }));
|
33
28
|
// Define popover footer content
|
34
|
-
const popoverFooterContent = (
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
(
|
39
|
-
|
40
|
-
(popover === null || popover === void 0 ? void 0 : popover.link) && (React.createElement(Button, { variant: "link", component: "a", href: popover.link.url, target: "_blank", icon: React.createElement(ExternalLinkAltIcon, null), iconPosition: "end" }, popover.link.label))));
|
41
|
-
return (React.createElement("div", Object.assign({ className: `pf-chatbot__footnote ${className !== null && className !== void 0 ? className : ''}` }, props),
|
42
|
-
popover && (React.createElement(ChatbotPopover, Object.assign({ className: "pf-chatbot__popover--footnote", "aria-label": ((_c = popover.popoverProps) === null || _c === void 0 ? void 0 : _c['aria-label']) || 'More information', isVisible: isVisible, shouldOpen: (_event, _fn) => setIsVisible(true), shouldClose: (_event, _fn) => setIsVisible(false), bodyContent: popoverBodyContent, footerContent: popoverFooterContent, minWidth: ((_d = popover.popoverProps) === null || _d === void 0 ? void 0 : _d.minWidth) || '432', maxWidth: ((_e = popover.popoverProps) === null || _e === void 0 ? void 0 : _e.maxWidth) || '432', distance: ((_f = popover.popoverProps) === null || _f === void 0 ? void 0 : _f.distance) || 16, showClose: false }, popover.popoverProps),
|
43
|
-
React.createElement(Button, { variant: "link", size: "sm" },
|
44
|
-
label,
|
45
|
-
" ",
|
46
|
-
React.createElement(InfoCircleIcon, null)))),
|
47
|
-
!popover && React.createElement(Content, { component: ContentVariants.small }, label)));
|
29
|
+
const popoverFooterContent = (_jsxs(Flex, { gap: { default: 'gapSm' }, children: [(popover === null || popover === void 0 ? void 0 : popover.cta) && (_jsx(Button, { variant: "secondary", onClick: () => {
|
30
|
+
var _a;
|
31
|
+
setIsVisible(false);
|
32
|
+
(_a = popover.cta) === null || _a === void 0 ? void 0 : _a.onClick();
|
33
|
+
}, children: ((_b = popover.cta) === null || _b === void 0 ? void 0 : _b.label) || 'Dismiss' })), (popover === null || popover === void 0 ? void 0 : popover.link) && (_jsx(Button, { variant: "link", component: "a", href: popover.link.url, target: "_blank", icon: _jsx(ExternalLinkAltIcon, {}), iconPosition: "end", children: popover.link.label }))] }));
|
34
|
+
return (_jsxs("div", Object.assign({ className: `pf-chatbot__footnote ${className !== null && className !== void 0 ? className : ''}` }, props, { children: [popover && (_jsx(ChatbotPopover, Object.assign({ className: "pf-chatbot__popover--footnote", "aria-label": ((_c = popover.popoverProps) === null || _c === void 0 ? void 0 : _c['aria-label']) || 'More information', isVisible: isVisible, shouldOpen: (_event, _fn) => setIsVisible(true), shouldClose: (_event, _fn) => setIsVisible(false), bodyContent: popoverBodyContent, footerContent: popoverFooterContent, minWidth: ((_d = popover.popoverProps) === null || _d === void 0 ? void 0 : _d.minWidth) || '432', maxWidth: ((_e = popover.popoverProps) === null || _e === void 0 ? void 0 : _e.maxWidth) || '432', distance: ((_f = popover.popoverProps) === null || _f === void 0 ? void 0 : _f.distance) || 16, showClose: false }, popover.popoverProps, { children: _jsxs(Button, { variant: "link", size: "sm", children: [label, " ", _jsx(InfoCircleIcon, {})] }) }))), !popover && _jsx(Content, { component: ContentVariants.small, children: label })] })));
|
48
35
|
};
|
49
36
|
export default ChatbotFootnote;
|
@@ -1,9 +1,9 @@
|
|
1
|
-
import
|
2
|
-
export interface ChatbotHeaderProps extends
|
1
|
+
import type { HTMLProps, FunctionComponent } from 'react';
|
2
|
+
export interface ChatbotHeaderProps extends HTMLProps<HTMLDivElement> {
|
3
3
|
/** Content to be displayed in the chatbot header */
|
4
4
|
children: React.ReactNode;
|
5
5
|
/** Custom classname for the header component */
|
6
6
|
className?: string;
|
7
7
|
}
|
8
|
-
export declare const ChatbotHeader:
|
8
|
+
export declare const ChatbotHeader: FunctionComponent<ChatbotHeaderProps>;
|
9
9
|
export default ChatbotHeader;
|
@@ -1,6 +1,4 @@
|
|
1
|
-
import
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
2
|
import { Divider } from '@patternfly/react-core';
|
3
|
-
export const ChatbotHeader = ({ className, children }) => (
|
4
|
-
React.createElement("div", { className: `pf-chatbot__header ${className !== null && className !== void 0 ? className : ''}` }, children),
|
5
|
-
React.createElement(Divider, { className: "pf-chatbot__header__divider" })));
|
3
|
+
export const ChatbotHeader = ({ className, children }) => (_jsxs("div", { className: "pf-chatbot__header-container", children: [_jsx("div", { className: `pf-chatbot__header${className ? ` ${className}` : ''}`, children: children }), _jsx(Divider, { className: "pf-chatbot__header__divider" })] }));
|
6
4
|
export default ChatbotHeader;
|
@@ -1,13 +1,13 @@
|
|
1
|
-
import
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
2
2
|
import { render, screen } from '@testing-library/react';
|
3
3
|
import ChatbotHeader from './ChatbotHeader';
|
4
4
|
describe('ChatbotHeader', () => {
|
5
5
|
it('should render ChatbotHeader with children', () => {
|
6
|
-
render(
|
6
|
+
render(_jsx(ChatbotHeader, { children: "Chatbot Header" }));
|
7
7
|
expect(screen.getByText('Chatbot Header')).toBeTruthy();
|
8
8
|
});
|
9
9
|
it('should render ChatbotHeader with custom classname', () => {
|
10
|
-
const { container } = render(
|
10
|
+
const { container } = render(_jsx(ChatbotHeader, { className: "custom-header-class", children: "Chatbot Content" }));
|
11
11
|
expect(container.querySelector('.custom-header-class')).toBeTruthy();
|
12
12
|
});
|
13
13
|
});
|
@@ -1,9 +1,9 @@
|
|
1
|
-
import
|
1
|
+
import type { FunctionComponent } from 'react';
|
2
2
|
export interface ChatbotHeaderActionsProps {
|
3
3
|
/** Content to be displayed in the chatbot header */
|
4
4
|
children: React.ReactNode;
|
5
5
|
/** Custom classname for the header component */
|
6
6
|
className?: string;
|
7
7
|
}
|
8
|
-
export declare const ChatbotHeaderActions:
|
8
|
+
export declare const ChatbotHeaderActions: FunctionComponent<ChatbotHeaderActionsProps>;
|
9
9
|
export default ChatbotHeaderActions;
|
@@ -1,3 +1,3 @@
|
|
1
|
-
import
|
2
|
-
export const ChatbotHeaderActions = ({ className, children }) =>
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
2
|
+
export const ChatbotHeaderActions = ({ className, children }) => _jsx("div", { className: `pf-chatbot__actions ${className || ''}`, children: children });
|
3
3
|
export default ChatbotHeaderActions;
|
@@ -1,13 +1,13 @@
|
|
1
|
-
import
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
2
2
|
import { render, screen } from '@testing-library/react';
|
3
3
|
import ChatbotHeaderActions from './ChatbotHeaderActions';
|
4
4
|
describe('ChatbotHeaderActions', () => {
|
5
5
|
it('should render ChatbotHeaderActions with children', () => {
|
6
|
-
render(
|
6
|
+
render(_jsx(ChatbotHeaderActions, { children: "Chatbot Header" }));
|
7
7
|
expect(screen.getByText('Chatbot Header')).toBeTruthy();
|
8
8
|
});
|
9
9
|
it('should render ChatbotHeaderActions with custom classname', () => {
|
10
|
-
const { container } = render(
|
10
|
+
const { container } = render(_jsx(ChatbotHeaderActions, { className: "custom-header-action-class", children: "Chatbot Content" }));
|
11
11
|
expect(container.querySelector('.custom-header-action-class')).toBeTruthy();
|
12
12
|
});
|
13
13
|
});
|
@@ -1,6 +1,5 @@
|
|
1
|
-
import
|
2
|
-
|
3
|
-
export interface ChatbotHeaderCloseButtonProps {
|
1
|
+
import { ButtonProps, TooltipProps } from '@patternfly/react-core';
|
2
|
+
export interface ChatbotHeaderCloseButtonProps extends ButtonProps {
|
4
3
|
/** Callback function for when button is clicked */
|
5
4
|
onClick: () => void;
|
6
5
|
/** Custom classname for the header component */
|
@@ -13,5 +12,7 @@ export interface ChatbotHeaderCloseButtonProps {
|
|
13
12
|
innerRef?: React.Ref<HTMLButtonElement>;
|
14
13
|
/** Content used in tooltip */
|
15
14
|
tooltipContent?: string;
|
15
|
+
/** Sets button to compact styling. */
|
16
|
+
isCompact?: boolean;
|
16
17
|
}
|
17
|
-
export declare const ChatbotHeaderCloseButton:
|
18
|
+
export declare const ChatbotHeaderCloseButton: import("react").ForwardRefExoticComponent<ChatbotHeaderCloseButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
|
@@ -1,10 +1,22 @@
|
|
1
|
-
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
2
|
+
var t = {};
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
4
|
+
t[p] = s[p];
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
8
|
+
t[p[i]] = s[p[i]];
|
9
|
+
}
|
10
|
+
return t;
|
11
|
+
};
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
13
|
+
import { forwardRef } from 'react';
|
2
14
|
import { Button, Icon, Tooltip } from '@patternfly/react-core';
|
3
15
|
import { CloseIcon } from '@patternfly/react-icons';
|
4
|
-
const ChatbotHeaderCloseButtonBase = (
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
export const ChatbotHeaderCloseButton =
|
16
|
+
const ChatbotHeaderCloseButtonBase = (_a) => {
|
17
|
+
var { className, onClick, tooltipProps, menuAriaLabel = 'Close', innerRef, tooltipContent = 'Close', isCompact } = _a, props = __rest(_a, ["className", "onClick", "tooltipProps", "menuAriaLabel", "innerRef", "tooltipContent", "isCompact"]);
|
18
|
+
return (_jsx("div", { className: `pf-chatbot__menu${className ? ` ${className}` : ''}`, children: _jsx(Tooltip, Object.assign({ content: tooltipContent, position: "bottom",
|
19
|
+
// prevents VO announcements of both aria label and tooltip
|
20
|
+
aria: "none" }, tooltipProps, { children: _jsx(Button, Object.assign({ className: `pf-chatbot__button--toggle-menu ${isCompact ? 'pf-m-compact' : ''}`, variant: "plain", onClick: onClick, "aria-label": menuAriaLabel, ref: innerRef, icon: _jsx(Icon, { size: isCompact ? 'lg' : 'xl', isInline: true, children: _jsx(CloseIcon, {}) }), size: isCompact ? 'sm' : undefined }, props)) })) }));
|
21
|
+
};
|
22
|
+
export const ChatbotHeaderCloseButton = forwardRef((props, ref) => (_jsx(ChatbotHeaderCloseButtonBase, Object.assign({ innerRef: ref }, props))));
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
import '@testing-library/jest-dom';
|
@@ -1,15 +1,20 @@
|
|
1
|
-
import
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
2
2
|
import { fireEvent, render, screen } from '@testing-library/react';
|
3
3
|
import { ChatbotHeaderCloseButton } from './ChatbotHeaderCloseButton';
|
4
|
+
import '@testing-library/jest-dom';
|
4
5
|
describe('ChatbotHeaderCloseButton', () => {
|
5
6
|
it('should render ChatbotHeaderCloseButton', () => {
|
6
|
-
const { container } = render(
|
7
|
+
const { container } = render(_jsx(ChatbotHeaderCloseButton, { className: "custom-header-close-button", onClick: jest.fn() }));
|
7
8
|
expect(container.querySelector('.custom-header-close-button')).toBeTruthy();
|
8
9
|
});
|
9
10
|
it('should call onClick handler when close button is pressed', () => {
|
10
11
|
const onClick = jest.fn();
|
11
|
-
render(
|
12
|
+
render(_jsx(ChatbotHeaderCloseButton, { className: "custom-header-close-button", onClick: onClick }));
|
12
13
|
fireEvent.click(screen.getByRole('button', { name: 'Close' }));
|
13
14
|
expect(onClick).toHaveBeenCalled();
|
14
15
|
});
|
16
|
+
it('should render button with isCompact', () => {
|
17
|
+
render(_jsx(ChatbotHeaderCloseButton, { "data-testid": "close-button", onClick: jest.fn(), isCompact: true }));
|
18
|
+
expect(screen.getByTestId('close-button')).toHaveClass('pf-m-compact');
|
19
|
+
});
|
15
20
|
});
|
@@ -1,9 +1,9 @@
|
|
1
|
-
import
|
1
|
+
import type { FunctionComponent } from 'react';
|
2
2
|
export interface ChatbotHeaderMainProps {
|
3
3
|
/** Custom classname for the header component */
|
4
4
|
className?: string;
|
5
5
|
/** Menu and/or chatbot header components */
|
6
6
|
children: React.ReactNode;
|
7
7
|
}
|
8
|
-
export declare const ChatbotHeaderMain:
|
8
|
+
export declare const ChatbotHeaderMain: FunctionComponent<ChatbotHeaderMainProps>;
|
9
9
|
export default ChatbotHeaderMain;
|
@@ -1,3 +1,3 @@
|
|
1
|
-
import
|
2
|
-
export const ChatbotHeaderMain = ({ className, children }) =>
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
2
|
+
export const ChatbotHeaderMain = ({ className, children }) => (_jsx("div", { className: `pf-chatbot__header-main${className ? ` ${className}` : ''}`, children: children }));
|
3
3
|
export default ChatbotHeaderMain;
|
@@ -1,13 +1,13 @@
|
|
1
|
-
import
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
2
2
|
import { render, screen } from '@testing-library/react';
|
3
3
|
import ChatbotHeaderMain from './ChatbotHeaderMain';
|
4
4
|
describe('ChatbotHeaderMain', () => {
|
5
5
|
it('should render ChatbotHeaderMain with children', () => {
|
6
|
-
render(
|
6
|
+
render(_jsx(ChatbotHeaderMain, { children: "Chatbot Header Main" }));
|
7
7
|
expect(screen.getByText('Chatbot Header Main')).toBeTruthy();
|
8
8
|
});
|
9
9
|
it('should render ChatbotHeaderMain with custom classname', () => {
|
10
|
-
const { container } = render(
|
10
|
+
const { container } = render(_jsx(ChatbotHeaderMain, { className: "custom-header-class", children: "Chatbot Content" }));
|
11
11
|
expect(container.querySelector('.custom-header-class')).toBeTruthy();
|
12
12
|
});
|
13
13
|
});
|
@@ -1,6 +1,5 @@
|
|
1
|
-
import
|
2
|
-
|
3
|
-
export interface ChatbotHeaderMenuProps {
|
1
|
+
import { ButtonProps, TooltipProps } from '@patternfly/react-core';
|
2
|
+
export interface ChatbotHeaderMenuProps extends ButtonProps {
|
4
3
|
/** Callback function to attach to menu toggle on top right of chatbot header. */
|
5
4
|
onMenuToggle: () => void;
|
6
5
|
/** Custom classname for the header component */
|
@@ -13,5 +12,7 @@ export interface ChatbotHeaderMenuProps {
|
|
13
12
|
innerRef?: React.Ref<HTMLButtonElement>;
|
14
13
|
/** Content used in tooltip */
|
15
14
|
tooltipContent?: string;
|
15
|
+
/** Sets menu to compact styling. */
|
16
|
+
isCompact?: boolean;
|
16
17
|
}
|
17
|
-
export declare const ChatbotHeaderMenu:
|
18
|
+
export declare const ChatbotHeaderMenu: import("react").ForwardRefExoticComponent<ChatbotHeaderMenuProps & import("react").RefAttributes<HTMLButtonElement>>;
|
@@ -1,10 +1,22 @@
|
|
1
|
-
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
2
|
+
var t = {};
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
4
|
+
t[p] = s[p];
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
8
|
+
t[p[i]] = s[p[i]];
|
9
|
+
}
|
10
|
+
return t;
|
11
|
+
};
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
13
|
+
import { forwardRef } from 'react';
|
2
14
|
import { Button, Icon, Tooltip } from '@patternfly/react-core';
|
3
15
|
import BarsIcon from '@patternfly/react-icons/dist/esm/icons/bars-icon';
|
4
|
-
const ChatbotHeaderMenuBase = (
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
export const ChatbotHeaderMenu =
|
16
|
+
const ChatbotHeaderMenuBase = (_a) => {
|
17
|
+
var { className, onMenuToggle, tooltipProps, menuAriaLabel = 'Toggle menu', innerRef, tooltipContent = 'Menu', isCompact } = _a, props = __rest(_a, ["className", "onMenuToggle", "tooltipProps", "menuAriaLabel", "innerRef", "tooltipContent", "isCompact"]);
|
18
|
+
return (_jsx("div", { className: `pf-chatbot__menu ${className}`, children: _jsx(Tooltip, Object.assign({ content: tooltipContent, position: "bottom",
|
19
|
+
// prevents VO announcements of both aria label and tooltip
|
20
|
+
aria: "none" }, tooltipProps, { children: _jsx(Button, Object.assign({ className: `pf-chatbot__button--toggle-menu ${isCompact ? 'pf-m-compact' : ''}`, variant: "plain", onClick: onMenuToggle, "aria-label": menuAriaLabel, ref: innerRef, icon: _jsx(Icon, { size: isCompact ? 'lg' : 'xl', isInline: true, children: _jsx(BarsIcon, {}) }), size: isCompact ? 'sm' : undefined }, props)) })) }));
|
21
|
+
};
|
22
|
+
export const ChatbotHeaderMenu = forwardRef((props, ref) => (_jsx(ChatbotHeaderMenuBase, Object.assign({ innerRef: ref }, props))));
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
import '@testing-library/jest-dom';
|
@@ -1,15 +1,20 @@
|
|
1
|
-
import
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
2
2
|
import { fireEvent, render, screen } from '@testing-library/react';
|
3
3
|
import { ChatbotHeaderMenu } from './ChatbotHeaderMenu';
|
4
|
+
import '@testing-library/jest-dom';
|
4
5
|
describe('ChatbotHeaderMenu', () => {
|
5
6
|
it('should render ChatbotHeaderMenu with custom class', () => {
|
6
|
-
const { container } = render(
|
7
|
+
const { container } = render(_jsx(ChatbotHeaderMenu, { className: "custom-header-menu", onMenuToggle: jest.fn() }));
|
7
8
|
expect(container.querySelector('.custom-header-menu')).toBeTruthy();
|
8
9
|
});
|
9
10
|
it('should call onMenuToggle when ChatbotHeaderMenu button is clicked', () => {
|
10
11
|
const onMenuToggle = jest.fn();
|
11
|
-
render(
|
12
|
+
render(_jsx(ChatbotHeaderMenu, { className: "custom-header-menu", onMenuToggle: onMenuToggle }));
|
12
13
|
fireEvent.click(screen.getByRole('button', { name: 'Toggle menu' }));
|
13
14
|
expect(onMenuToggle).toHaveBeenCalled();
|
14
15
|
});
|
16
|
+
it('should handle isCompact', () => {
|
17
|
+
render(_jsx(ChatbotHeaderMenu, { className: "custom-header-menu", onMenuToggle: jest.fn(), isCompact: true, "data-testid": "button" }));
|
18
|
+
expect(screen.getByTestId('button')).toHaveClass('pf-m-compact');
|
19
|
+
});
|
15
20
|
});
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import
|
2
|
-
import { TooltipProps, DropdownProps } from '@patternfly/react-core';
|
1
|
+
import type { FunctionComponent } from 'react';
|
2
|
+
import { TooltipProps, DropdownProps, MenuToggleProps } from '@patternfly/react-core';
|
3
3
|
export interface ChatbotHeaderOptionsDropdownProps extends Omit<DropdownProps, 'toggle'> {
|
4
4
|
/** Content to be displayed in the chatbot header */
|
5
5
|
children: React.ReactNode;
|
@@ -9,6 +9,10 @@ export interface ChatbotHeaderOptionsDropdownProps extends Omit<DropdownProps, '
|
|
9
9
|
tooltipProps?: TooltipProps;
|
10
10
|
/** Aria label for menu toggle */
|
11
11
|
menuToggleAriaLabel?: string;
|
12
|
+
/** Sets menu to compact styling. */
|
13
|
+
isCompact?: boolean;
|
14
|
+
/** Additional props passed to toggle */
|
15
|
+
toggleProps?: MenuToggleProps;
|
12
16
|
}
|
13
|
-
export declare const ChatbotHeaderOptionsDropdown:
|
17
|
+
export declare const ChatbotHeaderOptionsDropdown: FunctionComponent<ChatbotHeaderOptionsDropdownProps>;
|
14
18
|
export default ChatbotHeaderOptionsDropdown;
|