@patternfly/chatbot 6.3.0-prerelease.8 → 6.3.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/AttachMenu/AttachMenu.d.ts +2 -2
- package/dist/cjs/AttachMenu/AttachMenu.js +2 -12
- package/dist/cjs/AttachmentEdit/AttachmentEdit.d.ts +12 -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 +1 -2
- package/dist/cjs/Chatbot/Chatbot.js +4 -9
- package/dist/cjs/Chatbot/Chatbot.test.js +11 -11
- 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 +2 -2
- package/dist/cjs/ChatbotConversationHistoryNav/ChatbotConversationHistoryNav.js +16 -33
- package/dist/cjs/ChatbotConversationHistoryNav/ChatbotConversationHistoryNav.test.js +56 -64
- 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 +3 -3
- package/dist/cjs/ChatbotFooter/ChatbotFooter.js +2 -15
- package/dist/cjs/ChatbotFooter/ChatbotFooter.test.js +7 -7
- 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 +1 -2
- package/dist/cjs/ChatbotHeader/ChatbotHeaderCloseButton.js +5 -10
- package/dist/cjs/ChatbotHeader/ChatbotHeaderCloseButton.test.js +7 -10
- 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 +2 -2
- package/dist/cjs/ChatbotHeader/ChatbotHeaderMenu.js +5 -7
- package/dist/cjs/ChatbotHeader/ChatbotHeaderMenu.test.js +7 -10
- package/dist/cjs/ChatbotHeader/ChatbotHeaderOptionsDropdown.d.ts +6 -3
- package/dist/cjs/ChatbotHeader/ChatbotHeaderOptionsDropdown.js +8 -9
- package/dist/cjs/ChatbotHeader/ChatbotHeaderOptionsDropdown.test.js +19 -21
- package/dist/cjs/ChatbotHeader/ChatbotHeaderSelectorDropdown.d.ts +8 -3
- package/dist/cjs/ChatbotHeader/ChatbotHeaderSelectorDropdown.js +11 -12
- package/dist/cjs/ChatbotHeader/ChatbotHeaderSelectorDropdown.test.js +17 -19
- 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 +2 -2
- package/dist/cjs/ChatbotModal/ChatbotModal.js +3 -9
- package/dist/cjs/ChatbotModal/ChatbotModal.test.js +4 -16
- 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 +2 -2
- package/dist/cjs/ChatbotWelcomePrompt/ChatbotWelcomePrompt.js +6 -20
- package/dist/cjs/ChatbotWelcomePrompt/ChatbotWelcomePrompt.test.js +16 -16
- package/dist/cjs/CodeModal/CodeModal.d.ts +8 -2
- package/dist/cjs/CodeModal/CodeModal.js +8 -20
- package/dist/cjs/CodeModal/CodeModal.test.js +23 -4
- 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 +23 -2
- package/dist/cjs/FileDropZone/FileDropZone.js +11 -9
- package/dist/cjs/FileDropZone/FileDropZone.test.js +86 -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 +34 -16
- package/dist/cjs/Message/CodeBlockMessage/ExpandableSectionForSyntaxHighlighter.d.ts +62 -0
- package/dist/cjs/Message/CodeBlockMessage/ExpandableSectionForSyntaxHighlighter.js +139 -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 +24 -8
- package/dist/cjs/Message/Message.js +49 -71
- package/dist/cjs/Message/Message.test.js +112 -82
- 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/index.d.ts +1 -0
- package/dist/cjs/Message/Plugins/index.js +5 -0
- package/dist/cjs/Message/Plugins/rehypeCodeBlockToggle.d.ts +2 -0
- package/dist/cjs/Message/Plugins/rehypeCodeBlockToggle.js +24 -0
- 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 +2 -2
- package/dist/cjs/Message/QuickResponse/QuickResponse.js +7 -9
- 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 +2 -2
- package/dist/cjs/Message/QuickStarts/QuickStartTile.js +7 -43
- 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 +12 -23
- package/dist/cjs/Message/UserFeedback/UserFeedback.test.js +53 -53
- package/dist/cjs/Message/UserFeedback/UserFeedbackComplete.d.ts +2 -2
- package/dist/cjs/Message/UserFeedback/UserFeedbackComplete.js +20 -44
- package/dist/cjs/Message/UserFeedback/UserFeedbackComplete.test.js +81 -91
- package/dist/cjs/Message/index.d.ts +1 -0
- package/dist/cjs/Message/index.js +3 -1
- package/dist/cjs/MessageBar/AttachButton.d.ts +25 -2
- package/dist/cjs/MessageBar/AttachButton.js +10 -20
- package/dist/cjs/MessageBar/AttachButton.test.js +102 -24
- package/dist/cjs/MessageBar/MessageBar.d.ts +31 -3
- package/dist/cjs/MessageBar/MessageBar.js +30 -32
- package/dist/cjs/MessageBar/MessageBar.test.js +122 -108
- package/dist/cjs/MessageBar/MicrophoneButton.d.ts +2 -2
- package/dist/cjs/MessageBar/MicrophoneButton.js +7 -14
- package/dist/cjs/MessageBar/SendButton.d.ts +3 -2
- package/dist/cjs/MessageBar/SendButton.js +3 -11
- package/dist/cjs/MessageBar/SendButton.test.js +15 -15
- package/dist/cjs/MessageBar/StopButton.d.ts +3 -2
- package/dist/cjs/MessageBar/StopButton.js +3 -12
- package/dist/cjs/MessageBar/StopButton.test.js +15 -15
- 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 +12 -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 +39 -18
- package/dist/cjs/ResponseActions/ResponseActions.test.js +120 -41
- package/dist/cjs/Settings/SettingsForm.d.ts +2 -2
- package/dist/cjs/Settings/SettingsForm.js +2 -8
- package/dist/cjs/Settings/SettingsForm.test.js +9 -12
- package/dist/cjs/SourceDetailsMenuItem/SourceDetailsMenuItem.d.ts +2 -2
- package/dist/cjs/SourceDetailsMenuItem/SourceDetailsMenuItem.js +2 -11
- package/dist/cjs/SourcesCard/SourcesCard.d.ts +12 -3
- package/dist/cjs/SourcesCard/SourcesCard.js +17 -42
- package/dist/cjs/SourcesCard/SourcesCard.test.js +70 -60
- package/dist/cjs/TermsOfUse/TermsOfUse.d.ts +3 -3
- package/dist/cjs/TermsOfUse/TermsOfUse.js +4 -16
- package/dist/cjs/TermsOfUse/TermsOfUse.test.js +31 -33
- package/dist/css/main.css +15 -7
- 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 +12 -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 +1 -2
- package/dist/esm/Chatbot/Chatbot.js +4 -6
- package/dist/esm/Chatbot/Chatbot.test.js +6 -6
- 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 +2 -2
- package/dist/esm/ChatbotConversationHistoryNav/ChatbotConversationHistoryNav.js +16 -33
- package/dist/esm/ChatbotConversationHistoryNav/ChatbotConversationHistoryNav.test.js +26 -34
- 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 +3 -3
- package/dist/esm/ChatbotFooter/ChatbotFooter.js +2 -12
- package/dist/esm/ChatbotFooter/ChatbotFooter.test.js +4 -4
- 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 +1 -2
- package/dist/esm/ChatbotHeader/ChatbotHeaderCloseButton.js +5 -7
- package/dist/esm/ChatbotHeader/ChatbotHeaderCloseButton.test.js +4 -4
- 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 +2 -2
- package/dist/esm/ChatbotHeader/ChatbotHeaderMenu.js +5 -7
- package/dist/esm/ChatbotHeader/ChatbotHeaderMenu.test.js +4 -4
- package/dist/esm/ChatbotHeader/ChatbotHeaderOptionsDropdown.d.ts +6 -3
- package/dist/esm/ChatbotHeader/ChatbotHeaderOptionsDropdown.js +8 -9
- package/dist/esm/ChatbotHeader/ChatbotHeaderOptionsDropdown.test.js +9 -8
- package/dist/esm/ChatbotHeader/ChatbotHeaderSelectorDropdown.d.ts +8 -3
- package/dist/esm/ChatbotHeader/ChatbotHeaderSelectorDropdown.js +11 -9
- package/dist/esm/ChatbotHeader/ChatbotHeaderSelectorDropdown.test.js +9 -8
- 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 +2 -2
- package/dist/esm/ChatbotModal/ChatbotModal.js +3 -6
- package/dist/esm/ChatbotModal/ChatbotModal.test.js +2 -14
- 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 +2 -2
- package/dist/esm/ChatbotWelcomePrompt/ChatbotWelcomePrompt.js +6 -17
- package/dist/esm/ChatbotWelcomePrompt/ChatbotWelcomePrompt.test.js +8 -8
- package/dist/esm/CodeModal/CodeModal.d.ts +8 -2
- package/dist/esm/CodeModal/CodeModal.js +8 -20
- package/dist/esm/CodeModal/CodeModal.test.js +22 -3
- 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 +23 -2
- package/dist/esm/FileDropZone/FileDropZone.js +11 -6
- package/dist/esm/FileDropZone/FileDropZone.test.js +84 -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 +35 -17
- package/dist/esm/Message/CodeBlockMessage/ExpandableSectionForSyntaxHighlighter.d.ts +62 -0
- package/dist/esm/Message/CodeBlockMessage/ExpandableSectionForSyntaxHighlighter.js +133 -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 +24 -8
- package/dist/esm/Message/Message.js +49 -71
- package/dist/esm/Message/Message.test.js +112 -82
- 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/index.d.ts +1 -0
- package/dist/esm/Message/Plugins/index.js +1 -0
- package/dist/esm/Message/Plugins/rehypeCodeBlockToggle.d.ts +2 -0
- package/dist/esm/Message/Plugins/rehypeCodeBlockToggle.js +20 -0
- 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 +2 -2
- package/dist/esm/Message/QuickResponse/QuickResponse.js +7 -6
- 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 +2 -2
- package/dist/esm/Message/QuickStarts/QuickStartTile.js +7 -20
- 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 +12 -23
- package/dist/esm/Message/UserFeedback/UserFeedback.test.js +21 -21
- package/dist/esm/Message/UserFeedback/UserFeedbackComplete.d.ts +2 -2
- package/dist/esm/Message/UserFeedback/UserFeedbackComplete.js +20 -44
- package/dist/esm/Message/UserFeedback/UserFeedbackComplete.test.js +26 -36
- package/dist/esm/Message/index.d.ts +1 -0
- package/dist/esm/Message/index.js +1 -0
- package/dist/esm/MessageBar/AttachButton.d.ts +25 -2
- package/dist/esm/MessageBar/AttachButton.js +10 -17
- package/dist/esm/MessageBar/AttachButton.test.js +95 -17
- package/dist/esm/MessageBar/MessageBar.d.ts +31 -3
- package/dist/esm/MessageBar/MessageBar.js +28 -30
- package/dist/esm/MessageBar/MessageBar.test.js +87 -73
- package/dist/esm/MessageBar/MicrophoneButton.d.ts +2 -2
- package/dist/esm/MessageBar/MicrophoneButton.js +7 -11
- package/dist/esm/MessageBar/SendButton.d.ts +3 -2
- package/dist/esm/MessageBar/SendButton.js +3 -8
- package/dist/esm/MessageBar/SendButton.test.js +9 -9
- package/dist/esm/MessageBar/StopButton.d.ts +3 -2
- package/dist/esm/MessageBar/StopButton.js +3 -9
- package/dist/esm/MessageBar/StopButton.test.js +9 -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 +12 -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 +40 -19
- package/dist/esm/ResponseActions/ResponseActions.test.js +95 -16
- package/dist/esm/Settings/SettingsForm.d.ts +2 -2
- package/dist/esm/Settings/SettingsForm.js +2 -5
- package/dist/esm/Settings/SettingsForm.test.js +6 -6
- package/dist/esm/SourceDetailsMenuItem/SourceDetailsMenuItem.d.ts +2 -2
- package/dist/esm/SourceDetailsMenuItem/SourceDetailsMenuItem.js +2 -8
- package/dist/esm/SourcesCard/SourcesCard.d.ts +12 -3
- package/dist/esm/SourcesCard/SourcesCard.js +17 -39
- package/dist/esm/SourcesCard/SourcesCard.test.js +29 -19
- package/dist/esm/TermsOfUse/TermsOfUse.d.ts +3 -3
- package/dist/esm/TermsOfUse/TermsOfUse.js +4 -16
- 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 +5 -5
- package/patternfly-docs/content/extensions/chatbot/examples/Messages/AttachmentError.tsx +2 -2
- package/patternfly-docs/content/extensions/chatbot/examples/Messages/BotMessage.tsx +24 -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/MessageWithClickedResponseActions.tsx +25 -0
- package/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithCustomResponseActions.tsx +3 -12
- package/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithFeedback.tsx +4 -4
- package/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithFeedbackTimeout.tsx +3 -3
- package/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithQuickResponses.tsx +2 -2
- package/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithQuickStart.tsx +2 -2
- package/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithResponseActions.tsx +3 -3
- package/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithSources.tsx +3 -3
- package/patternfly-docs/content/extensions/chatbot/examples/Messages/Messages.md +19 -0
- package/patternfly-docs/content/extensions/chatbot/examples/Messages/PreviewAttachment.tsx +5 -5
- package/patternfly-docs/content/extensions/chatbot/examples/Messages/UserMessage.tsx +25 -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 +10 -10
- 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 +6 -6
- package/patternfly-docs/content/extensions/chatbot/examples/UI/ChatbotHeaderDrawerWithSelection.tsx +7 -7
- 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 +16 -23
- 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 +82 -39
- package/patternfly-docs/content/extensions/chatbot/examples/UI/UI.md +3 -0
- package/patternfly-docs/content/extensions/chatbot/examples/demos/AttachmentDemos.md +37 -0
- package/patternfly-docs/content/extensions/chatbot/examples/demos/Chatbot.md +1 -0
- package/patternfly-docs/content/extensions/chatbot/examples/demos/Chatbot.tsx +19 -25
- package/patternfly-docs/content/extensions/chatbot/examples/demos/ChatbotAttachment.tsx +42 -15
- package/patternfly-docs/content/extensions/chatbot/examples/demos/ChatbotAttachmentMenu.tsx +15 -14
- package/patternfly-docs/content/extensions/chatbot/examples/demos/ChatbotCompact.tsx +19 -25
- 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 +25 -7
- package/src/Chatbot/Chatbot.test.tsx +0 -1
- package/src/Chatbot/Chatbot.tsx +5 -3
- 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.test.tsx +3 -3
- package/src/ChatbotConversationHistoryNav/ChatbotConversationHistoryNav.tsx +8 -6
- package/src/ChatbotConversationHistoryNav/EmptyState.tsx +2 -2
- package/src/ChatbotConversationHistoryNav/LoadingState.tsx +2 -2
- package/src/ChatbotFooter/ChatbotFooter.test.tsx +0 -1
- package/src/ChatbotFooter/ChatbotFooter.tsx +3 -3
- package/src/ChatbotFooter/ChatbotFooternote.test.tsx +0 -1
- package/src/ChatbotFooter/ChatbotFootnote.tsx +6 -4
- package/src/ChatbotHeader/ChatbotHeader.test.tsx +0 -1
- package/src/ChatbotHeader/ChatbotHeader.tsx +3 -6
- package/src/ChatbotHeader/ChatbotHeaderActions.test.tsx +0 -1
- package/src/ChatbotHeader/ChatbotHeaderActions.tsx +2 -2
- package/src/ChatbotHeader/ChatbotHeaderCloseButton.test.tsx +0 -1
- package/src/ChatbotHeader/ChatbotHeaderCloseButton.tsx +5 -4
- package/src/ChatbotHeader/ChatbotHeaderMain.test.tsx +0 -1
- package/src/ChatbotHeader/ChatbotHeaderMain.tsx +2 -2
- package/src/ChatbotHeader/ChatbotHeaderMenu.test.tsx +0 -1
- package/src/ChatbotHeader/ChatbotHeaderMenu.tsx +7 -7
- package/src/ChatbotHeader/ChatbotHeaderOptionsDropdown.test.tsx +9 -1
- package/src/ChatbotHeader/ChatbotHeaderOptionsDropdown.tsx +12 -5
- package/src/ChatbotHeader/ChatbotHeaderSelectorDropdown.test.tsx +9 -1
- package/src/ChatbotHeader/ChatbotHeaderSelectorDropdown.tsx +26 -6
- package/src/ChatbotHeader/ChatbotHeaderTitle.test.tsx +0 -1
- package/src/ChatbotHeader/ChatbotHeaderTitle.tsx +2 -2
- package/src/ChatbotModal/ChatbotModal.test.tsx +0 -1
- package/src/ChatbotModal/ChatbotModal.tsx +2 -2
- package/src/ChatbotPopover/ChatbotPopover.tsx +3 -3
- package/src/ChatbotToggle/ChatbotToggle.test.tsx +0 -1
- package/src/ChatbotToggle/ChatbotToggle.tsx +5 -3
- package/src/ChatbotWelcomePrompt/ChatbotWelcomePrompt.test.tsx +0 -1
- package/src/ChatbotWelcomePrompt/ChatbotWelcomePrompt.tsx +2 -2
- package/src/CodeModal/CodeModal.test.tsx +29 -2
- package/src/CodeModal/CodeModal.tsx +18 -8
- 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 +1 -1
- package/src/FileDetailsLabel/FileDetailsLabel.test.tsx +0 -1
- package/src/FileDetailsLabel/FileDetailsLabel.tsx +1 -1
- package/src/FileDropZone/FileDropZone.test.tsx +112 -1
- package/src/FileDropZone/FileDropZone.tsx +44 -4
- 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 +126 -18
- package/src/Message/CodeBlockMessage/ExpandableSectionForSyntaxHighlighter.tsx +223 -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.test.tsx +49 -6
- package/src/Message/Message.tsx +31 -14
- package/src/Message/MessageInput.tsx +5 -5
- package/src/Message/MessageLoading.tsx +0 -2
- package/src/Message/Plugins/index.ts +1 -0
- package/src/Message/Plugins/rehypeCodeBlockToggle.ts +24 -0
- package/src/Message/Plugins/rehypeMoveImagesOutOfParagraphs.ts +53 -0
- package/src/Message/QuickResponse/QuickResponse.tsx +4 -3
- package/src/Message/QuickStarts/FallbackImg.tsx +4 -3
- package/src/Message/QuickStarts/QuickStartTile.tsx +3 -3
- 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 +2 -5
- package/src/Message/TextMessage/TextMessage.tsx +1 -2
- package/src/Message/UserFeedback/CloseButton.tsx +2 -2
- package/src/Message/UserFeedback/UserFeedback.test.tsx +0 -1
- package/src/Message/UserFeedback/UserFeedback.tsx +8 -6
- package/src/Message/UserFeedback/UserFeedbackComplete.test.tsx +0 -1
- package/src/Message/UserFeedback/UserFeedbackComplete.tsx +16 -14
- package/src/Message/index.ts +1 -0
- package/src/MessageBar/AttachButton.test.tsx +127 -8
- package/src/MessageBar/AttachButton.tsx +49 -6
- package/src/MessageBar/MessageBar.test.tsx +81 -30
- package/src/MessageBar/MessageBar.tsx +85 -19
- package/src/MessageBar/MicrophoneButton.tsx +10 -7
- package/src/MessageBar/SendButton.test.tsx +5 -6
- package/src/MessageBar/SendButton.tsx +4 -3
- package/src/MessageBar/StopButton.test.tsx +5 -6
- package/src/MessageBar/StopButton.tsx +4 -3
- package/src/MessageBox/JumpButton.test.tsx +4 -5
- package/src/MessageBox/JumpButton.tsx +3 -3
- 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 +24 -6
- package/src/ResponseActions/ResponseActionButton.test.tsx +0 -1
- package/src/ResponseActions/ResponseActionButton.tsx +6 -5
- package/src/ResponseActions/ResponseActions.test.tsx +121 -4
- package/src/ResponseActions/ResponseActions.tsx +71 -12
- package/src/Settings/SettingsForm.test.tsx +0 -1
- package/src/Settings/SettingsForm.tsx +2 -7
- package/src/SourceDetailsMenuItem/SourceDetailsMenuItem.tsx +2 -2
- package/src/SourcesCard/SourcesCard.test.tsx +14 -1
- package/src/SourcesCard/SourcesCard.tsx +19 -7
- package/src/TermsOfUse/TermsOfUse.test.tsx +0 -1
- package/src/TermsOfUse/TermsOfUse.tsx +6 -5
- package/tsconfig.cjs.json +0 -1
- package/tsconfig.json +3 -3
|
@@ -14,36 +14,34 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
14
14
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
// ============================================================================
|
|
20
|
-
const react_1 = __importDefault(require("react"));
|
|
17
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
18
|
+
const react_1 = require("react");
|
|
21
19
|
// Import PatternFly components
|
|
22
20
|
const react_core_1 = require("@patternfly/react-core");
|
|
23
21
|
const CloseButton_1 = __importDefault(require("./CloseButton"));
|
|
24
22
|
const UserFeedbackComplete = (_a) => {
|
|
25
23
|
var { className, title = 'Feedback submitted', body = "We've received your response. Thank you for sharing your feedback!", timestamp, timeout = false, timeoutAnimation = 3000, onTimeout, onClose, closeButtonAriaLabel = `Close feedback for message received at ${timestamp}`, onMouseEnter, onMouseLeave, ouiaId, ouiaSafe, isLiveRegion, id, focusOnLoad = true, isCompact } = _a, props = __rest(_a, ["className", "title", "body", "timestamp", "timeout", "timeoutAnimation", "onTimeout", "onClose", "closeButtonAriaLabel", "onMouseEnter", "onMouseLeave", "ouiaId", "ouiaSafe", "isLiveRegion", "id", "focusOnLoad", "isCompact"]);
|
|
26
|
-
const [timedOut, setTimedOut] = react_1.
|
|
27
|
-
const [timedOutAnimation, setTimedOutAnimation] = react_1.
|
|
28
|
-
const [isMouseOver, setIsMouseOver] = react_1.
|
|
29
|
-
const [containsFocus, setContainsFocus] = react_1.
|
|
24
|
+
const [timedOut, setTimedOut] = (0, react_1.useState)(false);
|
|
25
|
+
const [timedOutAnimation, setTimedOutAnimation] = (0, react_1.useState)(true);
|
|
26
|
+
const [isMouseOver, setIsMouseOver] = (0, react_1.useState)();
|
|
27
|
+
const [containsFocus, setContainsFocus] = (0, react_1.useState)();
|
|
30
28
|
const dismissed = timedOut && timedOutAnimation && !isMouseOver && !containsFocus;
|
|
31
|
-
const divRef = react_1.
|
|
29
|
+
const divRef = (0, react_1.useRef)(null);
|
|
32
30
|
const ouiaProps = (0, react_core_1.useOUIAProps)('User Feedback Complete', ouiaId, ouiaSafe);
|
|
33
|
-
react_1.
|
|
31
|
+
(0, react_1.useEffect)(() => {
|
|
34
32
|
var _a;
|
|
35
33
|
if (focusOnLoad) {
|
|
36
34
|
(_a = divRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
37
35
|
}
|
|
38
36
|
}, []);
|
|
39
|
-
react_1.
|
|
37
|
+
(0, react_1.useEffect)(() => {
|
|
40
38
|
const calculatedTimeout = timeout === true ? 8000 : Number(timeout);
|
|
41
39
|
if (calculatedTimeout > 0) {
|
|
42
40
|
const timer = setTimeout(() => setTimedOut(true), calculatedTimeout);
|
|
43
41
|
return () => clearTimeout(timer);
|
|
44
42
|
}
|
|
45
43
|
}, [timeout]);
|
|
46
|
-
react_1.
|
|
44
|
+
(0, react_1.useEffect)(() => {
|
|
47
45
|
const onDocumentFocus = () => {
|
|
48
46
|
if (divRef.current) {
|
|
49
47
|
if (divRef.current.contains(document.activeElement)) {
|
|
@@ -58,13 +56,13 @@ const UserFeedbackComplete = (_a) => {
|
|
|
58
56
|
document.addEventListener('focus', onDocumentFocus, true);
|
|
59
57
|
return () => document.removeEventListener('focus', onDocumentFocus, true);
|
|
60
58
|
}, [containsFocus]);
|
|
61
|
-
react_1.
|
|
59
|
+
(0, react_1.useEffect)(() => {
|
|
62
60
|
if (containsFocus === false || isMouseOver === false) {
|
|
63
61
|
const timer = setTimeout(() => setTimedOutAnimation(true), timeoutAnimation);
|
|
64
62
|
return () => clearTimeout(timer);
|
|
65
63
|
}
|
|
66
64
|
}, [containsFocus, isMouseOver, timeoutAnimation]);
|
|
67
|
-
react_1.
|
|
65
|
+
(0, react_1.useEffect)(() => {
|
|
68
66
|
dismissed && onTimeout && onTimeout();
|
|
69
67
|
}, [dismissed, onTimeout]);
|
|
70
68
|
if (dismissed) {
|
|
@@ -81,37 +79,15 @@ const UserFeedbackComplete = (_a) => {
|
|
|
81
79
|
};
|
|
82
80
|
return (
|
|
83
81
|
/* card does not have ref forwarding; hence wrapper div */
|
|
84
|
-
|
|
82
|
+
(0, jsx_runtime_1.jsx)("div", Object.assign({ ref: divRef, onMouseEnter: myOnMouseEnter, onMouseLeave: myOnMouseLeave }, (isLiveRegion && {
|
|
85
83
|
'aria-live': 'polite',
|
|
86
84
|
'aria-atomic': 'false'
|
|
87
|
-
}), { id: id, tabIndex: 0, "aria-label": title }, ouiaProps),
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
}
|
|
95
|
-
: undefined }),
|
|
96
|
-
react_1.default.createElement("div", { className: "pf-chatbot__feedback-complete-body" },
|
|
97
|
-
react_1.default.createElement("div", { className: "pf-chatbot__feedback-complete-image" },
|
|
98
|
-
react_1.default.createElement("svg", { width: "60", height: "64", viewBox: "0 0 60 64", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
99
|
-
react_1.default.createElement("path", { d: "M53.0555 21.5975H6.94323C3.57013 21.5975 0.835693 24.3319 0.835693 27.705V57.8925C0.835693 61.2656 3.57013 64 6.94323 64H53.0555C56.4286 64 59.1631 61.2656 59.1631 57.8925V27.705C59.1631 24.3319 56.4286 21.5975 53.0555 21.5975Z", fill: "#F8AE54" }),
|
|
100
|
-
react_1.default.createElement("path", { d: "M55.8973 19.8247C52.5894 15.7926 29.9992 0 29.9992 0C29.9992 0 7.40996 15.7926 4.10102 19.8247C0.79312 23.8568 0.835476 25.7184 0.835476 27.8899H59.1629C59.1629 25.7184 59.2052 23.8578 55.8973 19.8257V19.8247Z", fill: "#FFCC17" }),
|
|
101
|
-
react_1.default.createElement("g", null,
|
|
102
|
-
react_1.default.createElement("path", { d: "M53.0567 8.48981H6.94336V61.8388H53.0567V8.48981Z", fill: "#F2F2F2" })),
|
|
103
|
-
react_1.default.createElement("path", { d: "M51.6589 7.49908H8.34204V60.8481H51.6589V7.49908Z", fill: "white" }),
|
|
104
|
-
react_1.default.createElement("path", { d: "M0.835693 29.1296V57.8925C0.835693 59.2375 1.27165 60.4803 2.00823 61.4896L23.0303 43.5462L0.835693 29.1296Z", fill: "#FFCC17" }),
|
|
105
|
-
react_1.default.createElement("path", { d: "M36.9695 43.5472L57.9905 61.4907C58.7271 60.4813 59.1631 59.2386 59.1631 57.8935V29.1306L36.9685 43.5472H36.9695Z", fill: "#FFF4CC" }),
|
|
106
|
-
react_1.default.createElement("path", { d: "M0.835693 57.8925V57.8067L22.4146 42.7992L29.9994 37.5244L37.5842 42.7992L59.1641 57.8067V57.8925C59.1641 61.2665 56.4296 64 53.0566 64H6.94323C3.57024 64 0.835693 61.2665 0.835693 57.8925Z", fill: "#FFE072" }),
|
|
107
|
-
react_1.default.createElement("g", null,
|
|
108
|
-
react_1.default.createElement("path", { d: "M22.1563 42.978L0.835693 57.8067V56.6993L22.1563 42.978Z", fill: "#FEF07C" })),
|
|
109
|
-
react_1.default.createElement("g", null,
|
|
110
|
-
react_1.default.createElement("path", { d: "M37.8425 42.978L59.1631 57.8067V56.6993L37.8425 42.978Z", fill: "#FEF07C" })),
|
|
111
|
-
react_1.default.createElement("path", { d: "M37.8037 32.2373C42.1136 27.9273 42.1136 20.9395 37.8037 16.6295C33.4937 12.3196 26.5059 12.3196 22.196 16.6295C17.886 20.9395 17.886 27.9273 22.196 32.2373C26.5059 36.5472 33.4937 36.5472 37.8037 32.2373Z", fill: "#0066CC" }),
|
|
112
|
-
react_1.default.createElement("path", { d: "M27.7803 30.1276C27.6098 30.1276 27.4497 30.0614 27.3298 29.9406L22.9465 25.5562C22.8267 25.4364 22.7595 25.2762 22.7595 25.1068C22.7595 24.9374 22.8256 24.7762 22.9465 24.6554L24.2379 23.364C24.3577 23.2442 24.5178 23.177 24.6883 23.177C24.8587 23.177 25.0168 23.2431 25.1377 23.363L27.7803 26.0056L34.861 18.9259C34.9808 18.8061 35.1409 18.7389 35.3103 18.7389C35.4798 18.7389 35.6389 18.8051 35.7597 18.9239L37.0531 20.2173C37.173 20.3361 37.2401 20.4962 37.2401 20.6677C37.2401 20.8392 37.174 20.9983 37.0531 21.1181L28.2317 29.9406C28.1119 30.0604 27.9518 30.1265 27.7823 30.1265L27.7803 30.1276Z", fill: "white" }))),
|
|
113
|
-
react_1.default.createElement("div", { className: "pf-chatbot__feedback-complete-text" },
|
|
114
|
-
react_1.default.createElement(react_core_1.CardTitle, { className: "pf-chatbot__feedback-complete-title" }, title),
|
|
115
|
-
react_1.default.createElement(react_core_1.CardBody, { className: `pf-chatbot__feedback-complete-card-body` }, body))))));
|
|
85
|
+
}), { id: id, tabIndex: 0, "aria-label": title }, ouiaProps, { children: (0, jsx_runtime_1.jsxs)(react_core_1.Card, Object.assign({ isCompact: isCompact, className: `pf-chatbot__feedback-card pf-chatbot__feedback-card-complete${className ? ` ${className}` : ''}` }, props, { children: [(0, jsx_runtime_1.jsx)(react_core_1.CardHeader, { className: onClose ? 'pf-chatbot__feedback-card-complete-header' : 'pf-chatbot__feedback-card-complete-empty-header', actions:
|
|
86
|
+
/* eslint-disable indent */
|
|
87
|
+
onClose
|
|
88
|
+
? {
|
|
89
|
+
actions: (0, jsx_runtime_1.jsx)(CloseButton_1.default, { onClose: onClose, ariaLabel: closeButtonAriaLabel })
|
|
90
|
+
}
|
|
91
|
+
: undefined }), (0, jsx_runtime_1.jsxs)("div", { className: "pf-chatbot__feedback-complete-body", children: [(0, jsx_runtime_1.jsx)("div", { className: "pf-chatbot__feedback-complete-image", children: (0, jsx_runtime_1.jsxs)("svg", { width: "60", height: "64", viewBox: "0 0 60 64", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [(0, jsx_runtime_1.jsx)("path", { d: "M53.0555 21.5975H6.94323C3.57013 21.5975 0.835693 24.3319 0.835693 27.705V57.8925C0.835693 61.2656 3.57013 64 6.94323 64H53.0555C56.4286 64 59.1631 61.2656 59.1631 57.8925V27.705C59.1631 24.3319 56.4286 21.5975 53.0555 21.5975Z", fill: "#F8AE54" }), (0, jsx_runtime_1.jsx)("path", { d: "M55.8973 19.8247C52.5894 15.7926 29.9992 0 29.9992 0C29.9992 0 7.40996 15.7926 4.10102 19.8247C0.79312 23.8568 0.835476 25.7184 0.835476 27.8899H59.1629C59.1629 25.7184 59.2052 23.8578 55.8973 19.8257V19.8247Z", fill: "#FFCC17" }), (0, jsx_runtime_1.jsx)("g", { children: (0, jsx_runtime_1.jsx)("path", { d: "M53.0567 8.48981H6.94336V61.8388H53.0567V8.48981Z", fill: "#F2F2F2" }) }), (0, jsx_runtime_1.jsx)("path", { d: "M51.6589 7.49908H8.34204V60.8481H51.6589V7.49908Z", fill: "white" }), (0, jsx_runtime_1.jsx)("path", { d: "M0.835693 29.1296V57.8925C0.835693 59.2375 1.27165 60.4803 2.00823 61.4896L23.0303 43.5462L0.835693 29.1296Z", fill: "#FFCC17" }), (0, jsx_runtime_1.jsx)("path", { d: "M36.9695 43.5472L57.9905 61.4907C58.7271 60.4813 59.1631 59.2386 59.1631 57.8935V29.1306L36.9685 43.5472H36.9695Z", fill: "#FFF4CC" }), (0, jsx_runtime_1.jsx)("path", { d: "M0.835693 57.8925V57.8067L22.4146 42.7992L29.9994 37.5244L37.5842 42.7992L59.1641 57.8067V57.8925C59.1641 61.2665 56.4296 64 53.0566 64H6.94323C3.57024 64 0.835693 61.2665 0.835693 57.8925Z", fill: "#FFE072" }), (0, jsx_runtime_1.jsx)("g", { children: (0, jsx_runtime_1.jsx)("path", { d: "M22.1563 42.978L0.835693 57.8067V56.6993L22.1563 42.978Z", fill: "#FEF07C" }) }), (0, jsx_runtime_1.jsx)("g", { children: (0, jsx_runtime_1.jsx)("path", { d: "M37.8425 42.978L59.1631 57.8067V56.6993L37.8425 42.978Z", fill: "#FEF07C" }) }), (0, jsx_runtime_1.jsx)("path", { d: "M37.8037 32.2373C42.1136 27.9273 42.1136 20.9395 37.8037 16.6295C33.4937 12.3196 26.5059 12.3196 22.196 16.6295C17.886 20.9395 17.886 27.9273 22.196 32.2373C26.5059 36.5472 33.4937 36.5472 37.8037 32.2373Z", fill: "#0066CC" }), (0, jsx_runtime_1.jsx)("path", { d: "M27.7803 30.1276C27.6098 30.1276 27.4497 30.0614 27.3298 29.9406L22.9465 25.5562C22.8267 25.4364 22.7595 25.2762 22.7595 25.1068C22.7595 24.9374 22.8256 24.7762 22.9465 24.6554L24.2379 23.364C24.3577 23.2442 24.5178 23.177 24.6883 23.177C24.8587 23.177 25.0168 23.2431 25.1377 23.363L27.7803 26.0056L34.861 18.9259C34.9808 18.8061 35.1409 18.7389 35.3103 18.7389C35.4798 18.7389 35.6389 18.8051 35.7597 18.9239L37.0531 20.2173C37.173 20.3361 37.2401 20.4962 37.2401 20.6677C37.2401 20.8392 37.174 20.9983 37.0531 21.1181L28.2317 29.9406C28.1119 30.0604 27.9518 30.1265 27.7823 30.1265L27.7803 30.1276Z", fill: "white" })] }) }), (0, jsx_runtime_1.jsxs)("div", { className: "pf-chatbot__feedback-complete-text", children: [(0, jsx_runtime_1.jsx)(react_core_1.CardTitle, { className: "pf-chatbot__feedback-complete-title", children: title }), (0, jsx_runtime_1.jsx)(react_core_1.CardBody, { className: `pf-chatbot__feedback-complete-card-body`, children: body })] })] })] })) })));
|
|
116
92
|
};
|
|
117
93
|
exports.default = UserFeedbackComplete;
|
|
@@ -12,87 +12,87 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
12
12
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
13
|
};
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
const
|
|
16
|
-
const
|
|
15
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
16
|
+
const react_1 = require("@testing-library/react");
|
|
17
17
|
require("@testing-library/jest-dom");
|
|
18
18
|
const user_event_1 = __importDefault(require("@testing-library/user-event"));
|
|
19
19
|
const UserFeedbackComplete_1 = __importDefault(require("./UserFeedbackComplete"));
|
|
20
20
|
describe('UserFeedbackComplete', () => {
|
|
21
21
|
it('should render correctly', () => {
|
|
22
|
-
(0,
|
|
23
|
-
expect(
|
|
24
|
-
|
|
25
|
-
expect(
|
|
22
|
+
(0, react_1.render)((0, jsx_runtime_1.jsx)(UserFeedbackComplete_1.default, { timestamp: "12/12/12" }));
|
|
23
|
+
expect(react_1.screen.getByText('Feedback submitted')).toBeTruthy();
|
|
24
|
+
react_1.screen.getByText(/We've received your response. Thank you for sharing your feedback!/i);
|
|
25
|
+
expect(react_1.screen.queryByRole('button', { name: /Close/i })).toBeFalsy();
|
|
26
26
|
});
|
|
27
27
|
it('should render different title correctly', () => {
|
|
28
|
-
(0,
|
|
29
|
-
expect(
|
|
30
|
-
|
|
28
|
+
(0, react_1.render)((0, jsx_runtime_1.jsx)(UserFeedbackComplete_1.default, { timestamp: "12/12/12", title: "Thanks!" }));
|
|
29
|
+
expect(react_1.screen.getByText('Thanks!')).toBeTruthy();
|
|
30
|
+
react_1.screen.getByText(/We've received your response. Thank you for sharing your feedback!/i);
|
|
31
31
|
});
|
|
32
32
|
it('should render different string body correctly', () => {
|
|
33
|
-
(0,
|
|
34
|
-
expect(
|
|
35
|
-
expect(
|
|
33
|
+
(0, react_1.render)((0, jsx_runtime_1.jsx)(UserFeedbackComplete_1.default, { timestamp: "12/12/12", body: "Thanks!" }));
|
|
34
|
+
expect(react_1.screen.getByText('Feedback submitted')).toBeTruthy();
|
|
35
|
+
expect(react_1.screen.getByText('Thanks!')).toBeTruthy();
|
|
36
36
|
});
|
|
37
37
|
it('should render different node body correctly', () => {
|
|
38
|
-
(0,
|
|
39
|
-
expect(
|
|
40
|
-
expect(
|
|
38
|
+
(0, react_1.render)((0, jsx_runtime_1.jsx)(UserFeedbackComplete_1.default, { timestamp: "12/12/12", body: (0, jsx_runtime_1.jsx)("div", { children: "Thanks!" }) }));
|
|
39
|
+
expect(react_1.screen.getByText('Feedback submitted')).toBeTruthy();
|
|
40
|
+
expect(react_1.screen.getByText('Thanks!')).toBeTruthy();
|
|
41
41
|
});
|
|
42
42
|
it('should handle onClose correctly', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
43
43
|
const spy = jest.fn();
|
|
44
|
-
(0,
|
|
45
|
-
const closeButton =
|
|
44
|
+
(0, react_1.render)((0, jsx_runtime_1.jsx)(UserFeedbackComplete_1.default, { timestamp: "12/12/12", onClose: spy }));
|
|
45
|
+
const closeButton = react_1.screen.getByRole('button', { name: 'Close feedback for message received at 12/12/12' });
|
|
46
46
|
expect(closeButton).toBeTruthy();
|
|
47
47
|
yield user_event_1.default.click(closeButton);
|
|
48
48
|
expect(spy).toHaveBeenCalledTimes(1);
|
|
49
49
|
}));
|
|
50
50
|
it('should be able to change close button aria label', () => {
|
|
51
51
|
const spy = jest.fn();
|
|
52
|
-
(0,
|
|
53
|
-
expect(
|
|
52
|
+
(0, react_1.render)((0, jsx_runtime_1.jsx)(UserFeedbackComplete_1.default, { timestamp: "12/12/12", onClose: spy, closeButtonAriaLabel: "Ima button" }));
|
|
53
|
+
expect(react_1.screen.getByRole('button', { name: /Ima button/i })).toBeTruthy();
|
|
54
54
|
});
|
|
55
55
|
it('should handle className', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
56
|
-
(0,
|
|
57
|
-
expect(
|
|
56
|
+
(0, react_1.render)((0, jsx_runtime_1.jsx)(UserFeedbackComplete_1.default, { timestamp: "12/12/12", className: "test", "data-testid": "card" }));
|
|
57
|
+
expect(react_1.screen.getByTestId('card')).toHaveClass('test');
|
|
58
58
|
}));
|
|
59
59
|
it('should apply id', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
60
|
-
(0,
|
|
61
|
-
expect(
|
|
60
|
+
(0, react_1.render)((0, jsx_runtime_1.jsx)(UserFeedbackComplete_1.default, { timestamp: "12/12/12", id: "test", "data-testid": "card" }));
|
|
61
|
+
expect(react_1.screen.getByTestId('card').parentElement).toHaveAttribute('id', 'test');
|
|
62
62
|
}));
|
|
63
63
|
it('renders with no timeout by default', () => {
|
|
64
64
|
jest.useFakeTimers();
|
|
65
|
-
(0,
|
|
66
|
-
(0,
|
|
65
|
+
(0, react_1.render)((0, jsx_runtime_1.jsx)(UserFeedbackComplete_1.default, { timestamp: "12/12/12" }));
|
|
66
|
+
(0, react_1.act)(() => {
|
|
67
67
|
jest.advanceTimersByTime(8000);
|
|
68
68
|
});
|
|
69
|
-
expect(
|
|
69
|
+
expect(react_1.screen.getByText('Feedback submitted')).toBeVisible();
|
|
70
70
|
jest.useRealTimers();
|
|
71
71
|
});
|
|
72
72
|
it('should handle timeout correctly after 8000ms when timeout = true', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
73
73
|
jest.useFakeTimers();
|
|
74
|
-
(0,
|
|
75
|
-
(0,
|
|
74
|
+
(0, react_1.render)((0, jsx_runtime_1.jsx)(UserFeedbackComplete_1.default, { timestamp: "12/12/12", timeout: true }));
|
|
75
|
+
(0, react_1.act)(() => {
|
|
76
76
|
jest.advanceTimersByTime(7999);
|
|
77
77
|
});
|
|
78
|
-
expect(
|
|
79
|
-
(0,
|
|
78
|
+
expect(react_1.screen.getByText('Feedback submitted')).toBeVisible();
|
|
79
|
+
(0, react_1.act)(() => {
|
|
80
80
|
jest.advanceTimersByTime(1);
|
|
81
81
|
});
|
|
82
|
-
expect(
|
|
82
|
+
expect(react_1.screen.queryByText('Feedback submitted')).not.toBeInTheDocument();
|
|
83
83
|
jest.useRealTimers();
|
|
84
84
|
}));
|
|
85
85
|
it('should handle timeout correctly when timeout = numeric value', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
86
86
|
jest.useFakeTimers();
|
|
87
|
-
(0,
|
|
88
|
-
(0,
|
|
87
|
+
(0, react_1.render)((0, jsx_runtime_1.jsx)(UserFeedbackComplete_1.default, { timestamp: "12/12/12", timeout: 300 }));
|
|
88
|
+
(0, react_1.act)(() => {
|
|
89
89
|
jest.advanceTimersByTime(299);
|
|
90
90
|
});
|
|
91
|
-
expect(
|
|
92
|
-
(0,
|
|
91
|
+
expect(react_1.screen.getByText('Feedback submitted')).toBeVisible();
|
|
92
|
+
(0, react_1.act)(() => {
|
|
93
93
|
jest.advanceTimersByTime(1);
|
|
94
94
|
});
|
|
95
|
-
expect(
|
|
95
|
+
expect(react_1.screen.queryByText('Feedback submitted')).not.toBeInTheDocument();
|
|
96
96
|
jest.useRealTimers();
|
|
97
97
|
}));
|
|
98
98
|
it('does not get removed on timeout if the user is focused on the card', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
@@ -100,13 +100,13 @@ describe('UserFeedbackComplete', () => {
|
|
|
100
100
|
advanceTimers: (delay) => jest.advanceTimersByTime(delay)
|
|
101
101
|
});
|
|
102
102
|
jest.useFakeTimers();
|
|
103
|
-
(0,
|
|
104
|
-
expect(
|
|
105
|
-
yield user.click(
|
|
106
|
-
(0,
|
|
103
|
+
(0, react_1.render)((0, jsx_runtime_1.jsx)(UserFeedbackComplete_1.default, { timestamp: "12/12/12", timeout: true, "data-testid": "card" }));
|
|
104
|
+
expect(react_1.screen.getByText('Feedback submitted')).toBeTruthy();
|
|
105
|
+
yield user.click(react_1.screen.getByTestId('card'));
|
|
106
|
+
(0, react_1.act)(() => {
|
|
107
107
|
jest.advanceTimersByTime(8000);
|
|
108
108
|
});
|
|
109
|
-
expect(
|
|
109
|
+
expect(react_1.screen.getByText('Feedback submitted')).toBeTruthy();
|
|
110
110
|
jest.useRealTimers();
|
|
111
111
|
}));
|
|
112
112
|
it('does not remove the card on timeout if the user is hovered over it', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
@@ -114,10 +114,10 @@ describe('UserFeedbackComplete', () => {
|
|
|
114
114
|
advanceTimers: (delay) => jest.advanceTimersByTime(delay)
|
|
115
115
|
});
|
|
116
116
|
jest.useFakeTimers();
|
|
117
|
-
(0,
|
|
118
|
-
const card =
|
|
117
|
+
(0, react_1.render)((0, jsx_runtime_1.jsx)(UserFeedbackComplete_1.default, { timestamp: "12/12/12", timeout: true, "data-testid": "card" }));
|
|
118
|
+
const card = react_1.screen.getByTestId('card');
|
|
119
119
|
yield user.hover(card);
|
|
120
|
-
(0,
|
|
120
|
+
(0, react_1.act)(() => {
|
|
121
121
|
jest.advanceTimersByTime(8000);
|
|
122
122
|
});
|
|
123
123
|
expect(card).toBeVisible();
|
|
@@ -128,19 +128,17 @@ describe('UserFeedbackComplete', () => {
|
|
|
128
128
|
advanceTimers: (delay) => jest.advanceTimersByTime(delay)
|
|
129
129
|
});
|
|
130
130
|
jest.useFakeTimers();
|
|
131
|
-
(0,
|
|
132
|
-
|
|
133
|
-
react_1.default.createElement(UserFeedbackComplete_1.default, { timestamp: "12/12/12", timeout: true, "data-testid": "card" })));
|
|
134
|
-
const card = react_2.screen.getByTestId('card');
|
|
131
|
+
(0, react_1.render)((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("input", {}), (0, jsx_runtime_1.jsx)(UserFeedbackComplete_1.default, { timestamp: "12/12/12", timeout: true, "data-testid": "card" })] }));
|
|
132
|
+
const card = react_1.screen.getByTestId('card');
|
|
135
133
|
yield user.click(card);
|
|
136
|
-
(0,
|
|
134
|
+
(0, react_1.act)(() => {
|
|
137
135
|
jest.advanceTimersByTime(8000);
|
|
138
136
|
});
|
|
139
|
-
yield user.click(
|
|
140
|
-
(0,
|
|
137
|
+
yield user.click(react_1.screen.getByRole('textbox'));
|
|
138
|
+
(0, react_1.act)(() => {
|
|
141
139
|
jest.advanceTimersByTime(3000);
|
|
142
140
|
});
|
|
143
|
-
expect(
|
|
141
|
+
expect(react_1.screen.queryByText('Feedback submitted')).not.toBeInTheDocument();
|
|
144
142
|
jest.useRealTimers();
|
|
145
143
|
}));
|
|
146
144
|
it('removes the card after the user removes hover from the card and 3000ms have passed', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
@@ -148,19 +146,17 @@ describe('UserFeedbackComplete', () => {
|
|
|
148
146
|
advanceTimers: (delay) => jest.advanceTimersByTime(delay)
|
|
149
147
|
});
|
|
150
148
|
jest.useFakeTimers();
|
|
151
|
-
(0,
|
|
152
|
-
|
|
153
|
-
react_1.default.createElement(UserFeedbackComplete_1.default, { timestamp: "12/12/12", timeout: true, "data-testid": "card" })));
|
|
154
|
-
const card = react_2.screen.getByTestId('card');
|
|
149
|
+
(0, react_1.render)((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("input", {}), (0, jsx_runtime_1.jsx)(UserFeedbackComplete_1.default, { timestamp: "12/12/12", timeout: true, "data-testid": "card" })] }));
|
|
150
|
+
const card = react_1.screen.getByTestId('card');
|
|
155
151
|
yield user.hover(card);
|
|
156
|
-
(0,
|
|
152
|
+
(0, react_1.act)(() => {
|
|
157
153
|
jest.advanceTimersByTime(8000);
|
|
158
154
|
});
|
|
159
|
-
yield user.hover(
|
|
160
|
-
(0,
|
|
155
|
+
yield user.hover(react_1.screen.getByRole('textbox'));
|
|
156
|
+
(0, react_1.act)(() => {
|
|
161
157
|
jest.advanceTimersByTime(3000);
|
|
162
158
|
});
|
|
163
|
-
expect(
|
|
159
|
+
expect(react_1.screen.queryByText('Feedback submitted')).not.toBeInTheDocument();
|
|
164
160
|
jest.useRealTimers();
|
|
165
161
|
}));
|
|
166
162
|
it('removes the card after the user removes hover from the card and timeoutAnimation time has passed', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
@@ -168,26 +164,24 @@ describe('UserFeedbackComplete', () => {
|
|
|
168
164
|
advanceTimers: (delay) => jest.advanceTimersByTime(delay)
|
|
169
165
|
});
|
|
170
166
|
jest.useFakeTimers();
|
|
171
|
-
(0,
|
|
172
|
-
|
|
173
|
-
react_1.default.createElement(UserFeedbackComplete_1.default, { timestamp: "12/12/12", timeout: true, "data-testid": "card", timeoutAnimation: 1000 })));
|
|
174
|
-
const card = react_2.screen.getByTestId('card');
|
|
167
|
+
(0, react_1.render)((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("input", {}), (0, jsx_runtime_1.jsx)(UserFeedbackComplete_1.default, { timestamp: "12/12/12", timeout: true, "data-testid": "card", timeoutAnimation: 1000 })] }));
|
|
168
|
+
const card = react_1.screen.getByTestId('card');
|
|
175
169
|
yield user.hover(card);
|
|
176
|
-
(0,
|
|
170
|
+
(0, react_1.act)(() => {
|
|
177
171
|
jest.advanceTimersByTime(8000);
|
|
178
172
|
});
|
|
179
|
-
yield user.hover(
|
|
180
|
-
(0,
|
|
173
|
+
yield user.hover(react_1.screen.getByRole('textbox'));
|
|
174
|
+
(0, react_1.act)(() => {
|
|
181
175
|
jest.advanceTimersByTime(1000);
|
|
182
176
|
});
|
|
183
|
-
expect(
|
|
177
|
+
expect(react_1.screen.queryByText('Feedback submitted')).not.toBeInTheDocument();
|
|
184
178
|
jest.useRealTimers();
|
|
185
179
|
}));
|
|
186
180
|
it('does not call the onTimeout callback before the timeout period has expired', () => {
|
|
187
181
|
const spy = jest.fn();
|
|
188
182
|
jest.useFakeTimers();
|
|
189
|
-
(0,
|
|
190
|
-
(0,
|
|
183
|
+
(0, react_1.render)((0, jsx_runtime_1.jsx)(UserFeedbackComplete_1.default, { timestamp: "12/12/12", timeout: true, "data-testid": "card", onTimeout: spy }));
|
|
184
|
+
(0, react_1.act)(() => {
|
|
191
185
|
jest.advanceTimersByTime(7999);
|
|
192
186
|
});
|
|
193
187
|
expect(spy).not.toHaveBeenCalled();
|
|
@@ -196,32 +190,30 @@ describe('UserFeedbackComplete', () => {
|
|
|
196
190
|
it('calls the onTimeout callback after the timeout period has expired', () => {
|
|
197
191
|
jest.useFakeTimers();
|
|
198
192
|
const spy = jest.fn();
|
|
199
|
-
(0,
|
|
200
|
-
(0,
|
|
193
|
+
(0, react_1.render)((0, jsx_runtime_1.jsx)(UserFeedbackComplete_1.default, { timestamp: "12/12/12", timeout: true, "data-testid": "card", onTimeout: spy }));
|
|
194
|
+
(0, react_1.act)(() => {
|
|
201
195
|
jest.advanceTimersByTime(8000);
|
|
202
196
|
});
|
|
203
197
|
expect(spy).toHaveBeenCalledTimes(1);
|
|
204
198
|
jest.useRealTimers();
|
|
205
199
|
});
|
|
206
200
|
it('renders without aria-live and aria-atomic attributes by default', () => {
|
|
207
|
-
(0,
|
|
208
|
-
const card =
|
|
201
|
+
(0, react_1.render)((0, jsx_runtime_1.jsx)(UserFeedbackComplete_1.default, { timestamp: "12/12/12", timeout: true, "data-testid": "card" }));
|
|
202
|
+
const card = react_1.screen.getByTestId('card').parentElement;
|
|
209
203
|
expect(card).not.toHaveAttribute('aria-live');
|
|
210
204
|
expect(card).not.toHaveAttribute('aria-atomic');
|
|
211
205
|
});
|
|
212
206
|
it('has an aria-live value of polite and aria-atomic value of false when isLiveRegion = true', () => {
|
|
213
|
-
(0,
|
|
214
|
-
const card =
|
|
207
|
+
(0, react_1.render)((0, jsx_runtime_1.jsx)(UserFeedbackComplete_1.default, { timestamp: "12/12/12", timeout: true, "data-testid": "card", isLiveRegion: true }));
|
|
208
|
+
const card = react_1.screen.getByTestId('card').parentElement;
|
|
215
209
|
expect(card).toHaveAttribute('aria-live', 'polite');
|
|
216
210
|
expect(card).toHaveAttribute('aria-atomic', 'false');
|
|
217
211
|
});
|
|
218
212
|
it('calls onMouseEnter appropriately', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
219
213
|
const spy = jest.fn();
|
|
220
214
|
const user = user_event_1.default.setup();
|
|
221
|
-
(0,
|
|
222
|
-
|
|
223
|
-
react_1.default.createElement(UserFeedbackComplete_1.default, { timestamp: "12/12/12", "data-testid": "card", onMouseEnter: spy })));
|
|
224
|
-
const card = react_2.screen.getByTestId('card');
|
|
215
|
+
(0, react_1.render)((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("input", {}), (0, jsx_runtime_1.jsx)(UserFeedbackComplete_1.default, { timestamp: "12/12/12", "data-testid": "card", onMouseEnter: spy })] }));
|
|
216
|
+
const card = react_1.screen.getByTestId('card');
|
|
225
217
|
expect(spy).toHaveBeenCalledTimes(0);
|
|
226
218
|
yield user.hover(card);
|
|
227
219
|
expect(spy).toHaveBeenCalledTimes(1);
|
|
@@ -229,25 +221,23 @@ describe('UserFeedbackComplete', () => {
|
|
|
229
221
|
it('calls onMouseLeave appropriately', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
230
222
|
const spy = jest.fn();
|
|
231
223
|
const user = user_event_1.default.setup();
|
|
232
|
-
(0,
|
|
233
|
-
|
|
234
|
-
react_1.default.createElement(UserFeedbackComplete_1.default, { timestamp: "12/12/12", "data-testid": "card", onMouseLeave: spy })));
|
|
235
|
-
const card = react_2.screen.getByTestId('card');
|
|
224
|
+
(0, react_1.render)((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("input", {}), (0, jsx_runtime_1.jsx)(UserFeedbackComplete_1.default, { timestamp: "12/12/12", "data-testid": "card", onMouseLeave: spy })] }));
|
|
225
|
+
const card = react_1.screen.getByTestId('card');
|
|
236
226
|
expect(spy).toHaveBeenCalledTimes(0);
|
|
237
227
|
yield user.hover(card);
|
|
238
|
-
yield user.hover(
|
|
228
|
+
yield user.hover(react_1.screen.getByRole('textbox'));
|
|
239
229
|
expect(spy).toHaveBeenCalledTimes(1);
|
|
240
230
|
}));
|
|
241
231
|
it('should focus on load by default', () => {
|
|
242
|
-
(0,
|
|
243
|
-
expect(
|
|
232
|
+
(0, react_1.render)((0, jsx_runtime_1.jsx)(UserFeedbackComplete_1.default, { timestamp: "12/12/12", "data-testid": "card" }));
|
|
233
|
+
expect(react_1.screen.getByTestId('card').parentElement).toHaveFocus();
|
|
244
234
|
});
|
|
245
235
|
it('should not focus on load if focusOnLoad = false', () => {
|
|
246
|
-
(0,
|
|
247
|
-
expect(
|
|
236
|
+
(0, react_1.render)((0, jsx_runtime_1.jsx)(UserFeedbackComplete_1.default, { timestamp: "12/12/12", "data-testid": "card", focusOnLoad: false }));
|
|
237
|
+
expect(react_1.screen.getByTestId('card').parentElement).not.toHaveFocus();
|
|
248
238
|
});
|
|
249
239
|
it('should handle isCompact', () => {
|
|
250
|
-
(0,
|
|
251
|
-
expect(
|
|
240
|
+
(0, react_1.render)((0, jsx_runtime_1.jsx)(UserFeedbackComplete_1.default, { timestamp: "12/12/12", "data-testid": "card", isCompact: true }));
|
|
241
|
+
expect(react_1.screen.getByTestId('card')).toHaveClass('pf-m-compact');
|
|
252
242
|
});
|
|
253
243
|
});
|
|
@@ -17,7 +17,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
17
17
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
18
18
|
};
|
|
19
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
-
exports.default = void 0;
|
|
20
|
+
exports.rehypeCodeBlockToggle = exports.default = void 0;
|
|
21
21
|
var Message_1 = require("./Message");
|
|
22
22
|
Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(Message_1).default; } });
|
|
23
|
+
var rehypeCodeBlockToggle_1 = require("./Plugins/rehypeCodeBlockToggle");
|
|
24
|
+
Object.defineProperty(exports, "rehypeCodeBlockToggle", { enumerable: true, get: function () { return rehypeCodeBlockToggle_1.rehypeCodeBlockToggle; } });
|
|
23
25
|
__exportStar(require("./Message"), exports);
|
|
@@ -1,10 +1,16 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { ButtonProps, DropEvent, TooltipProps } from '@patternfly/react-core';
|
|
2
|
+
import { Accept, DropzoneOptions, FileError, FileRejection } from 'react-dropzone';
|
|
3
3
|
export interface AttachButtonProps extends ButtonProps {
|
|
4
4
|
/** Callback for when button is clicked */
|
|
5
5
|
onClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
6
6
|
/** Callback function for AttachButton when an attachment is made */
|
|
7
7
|
onAttachAccepted?: (data: File[], event: DropEvent) => void;
|
|
8
|
+
/** Specifies the file types accepted by the attachment upload component.
|
|
9
|
+
* Files that don't match the accepted types will be disabled in the file picker.
|
|
10
|
+
* For example,
|
|
11
|
+
* allowedFileTypes: { 'application/json': ['.json'], 'text/plain': ['.txt'] }
|
|
12
|
+
**/
|
|
13
|
+
allowedFileTypes?: Accept;
|
|
8
14
|
/** Class name for AttachButton */
|
|
9
15
|
className?: string;
|
|
10
16
|
/** Props to control if the AttachButton should be disabled */
|
|
@@ -17,6 +23,23 @@ export interface AttachButtonProps extends ButtonProps {
|
|
|
17
23
|
tooltipContent?: string;
|
|
18
24
|
/** Test id applied to input */
|
|
19
25
|
inputTestId?: string;
|
|
26
|
+
/** Whether button is compact */
|
|
20
27
|
isCompact?: boolean;
|
|
28
|
+
/** Minimum file size allowed */
|
|
29
|
+
minSize?: number;
|
|
30
|
+
/** Max file size allowed */
|
|
31
|
+
maxSize?: number;
|
|
32
|
+
/** Max number of files allowed */
|
|
33
|
+
maxFiles?: number;
|
|
34
|
+
/** Whether attachments are disabled */
|
|
35
|
+
isAttachmentDisabled?: boolean;
|
|
36
|
+
/** Callback when file(s) are attached */
|
|
37
|
+
onAttach?: <T extends File>(acceptedFiles: T[], fileRejections: FileRejection[], event: DropEvent) => void;
|
|
38
|
+
/** Callback function for AttachButton when an attachment fails */
|
|
39
|
+
onAttachRejected?: (fileRejections: FileRejection[], event: DropEvent) => void;
|
|
40
|
+
/** Validator for files; see https://react-dropzone.js.org/#!/Custom%20validation for more information */
|
|
41
|
+
validator?: <T extends File>(file: T) => FileError | readonly FileError[] | null;
|
|
42
|
+
/** Additional props passed to react-dropzone */
|
|
43
|
+
dropzoneProps?: DropzoneOptions;
|
|
21
44
|
}
|
|
22
|
-
export declare const AttachButton:
|
|
45
|
+
export declare const AttachButton: import("react").ForwardRefExoticComponent<AttachButtonProps & import("react").RefAttributes<any>>;
|
|
@@ -10,31 +10,21 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
10
10
|
}
|
|
11
11
|
return t;
|
|
12
12
|
};
|
|
13
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
-
};
|
|
16
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
14
|
exports.AttachButton = void 0;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
// ============================================================================
|
|
21
|
-
const react_1 = __importDefault(require("react"));
|
|
15
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
16
|
+
const react_1 = require("react");
|
|
22
17
|
// Import PatternFly components
|
|
23
18
|
const react_core_1 = require("@patternfly/react-core");
|
|
24
19
|
const react_dropzone_1 = require("react-dropzone");
|
|
25
20
|
const paperclip_icon_1 = require("@patternfly/react-icons/dist/esm/icons/paperclip-icon");
|
|
26
21
|
const AttachButtonBase = (_a) => {
|
|
27
|
-
var { onAttachAccepted, onClick, isDisabled, className, tooltipProps, innerRef, tooltipContent = 'Attach', inputTestId, isCompact } = _a, props = __rest(_a, ["onAttachAccepted", "onClick", "isDisabled", "className", "tooltipProps", "innerRef", "tooltipContent", "inputTestId", "isCompact"]);
|
|
28
|
-
const { open, getInputProps } = (0, react_dropzone_1.useDropzone)({
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
})
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
react_1.default.createElement(react_core_1.Tooltip, Object.assign({ id: "pf-chatbot__tooltip--attach", content: tooltipContent, position: "top", entryDelay: (tooltipProps === null || tooltipProps === void 0 ? void 0 : tooltipProps.entryDelay) || 0, exitDelay: (tooltipProps === null || tooltipProps === void 0 ? void 0 : tooltipProps.exitDelay) || 0, distance: (tooltipProps === null || tooltipProps === void 0 ? void 0 : tooltipProps.distance) || 8, animationDuration: (tooltipProps === null || tooltipProps === void 0 ? void 0 : tooltipProps.animationDuration) || 0,
|
|
35
|
-
// prevents VO announcements of both aria label and tooltip
|
|
36
|
-
aria: "none" }, tooltipProps),
|
|
37
|
-
react_1.default.createElement(react_core_1.Button, Object.assign({ variant: "plain", ref: innerRef, className: `pf-chatbot__button--attach ${isCompact ? 'pf-m-compact' : ''} ${className !== null && className !== void 0 ? className : ''}`, "aria-label": props['aria-label'] || 'Attach button', isDisabled: isDisabled, onClick: onClick !== null && onClick !== void 0 ? onClick : open, icon: react_1.default.createElement(react_core_1.Icon, { iconSize: isCompact ? 'lg' : 'xl', isInline: true },
|
|
38
|
-
react_1.default.createElement(paperclip_icon_1.PaperclipIcon, null)), size: isCompact ? 'sm' : undefined }, props)))));
|
|
22
|
+
var { onAttachAccepted, onClick, isDisabled, className, tooltipProps, innerRef, tooltipContent = 'Attach', inputTestId, isCompact, allowedFileTypes, minSize, maxSize, maxFiles, isAttachmentDisabled, onAttach, onAttachRejected, validator, dropzoneProps } = _a, props = __rest(_a, ["onAttachAccepted", "onClick", "isDisabled", "className", "tooltipProps", "innerRef", "tooltipContent", "inputTestId", "isCompact", "allowedFileTypes", "minSize", "maxSize", "maxFiles", "isAttachmentDisabled", "onAttach", "onAttachRejected", "validator", "dropzoneProps"]);
|
|
23
|
+
const { open, getInputProps } = (0, react_dropzone_1.useDropzone)(Object.assign({ multiple: true, onDropAccepted: onAttachAccepted, accept: allowedFileTypes, minSize,
|
|
24
|
+
maxSize,
|
|
25
|
+
maxFiles, disabled: isAttachmentDisabled, onDrop: onAttach, onDropRejected: onAttachRejected, validator }, dropzoneProps));
|
|
26
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("input", Object.assign({ "data-testid": inputTestId }, getInputProps(), { hidden: true })), (0, jsx_runtime_1.jsx)(react_core_1.Tooltip, Object.assign({ id: "pf-chatbot__tooltip--attach", content: tooltipContent, position: "top", entryDelay: (tooltipProps === null || tooltipProps === void 0 ? void 0 : tooltipProps.entryDelay) || 0, exitDelay: (tooltipProps === null || tooltipProps === void 0 ? void 0 : tooltipProps.exitDelay) || 0, distance: (tooltipProps === null || tooltipProps === void 0 ? void 0 : tooltipProps.distance) || 8, animationDuration: (tooltipProps === null || tooltipProps === void 0 ? void 0 : tooltipProps.animationDuration) || 0,
|
|
27
|
+
// prevents VO announcements of both aria label and tooltip
|
|
28
|
+
aria: "none" }, tooltipProps, { children: (0, jsx_runtime_1.jsx)(react_core_1.Button, Object.assign({ variant: "plain", ref: innerRef, className: `pf-chatbot__button--attach ${isCompact ? 'pf-m-compact' : ''} ${className !== null && className !== void 0 ? className : ''}`, "aria-label": props['aria-label'] || 'Attach', isDisabled: isDisabled, onClick: onClick !== null && onClick !== void 0 ? onClick : open, icon: (0, jsx_runtime_1.jsx)(react_core_1.Icon, { iconSize: isCompact ? 'lg' : 'xl', isInline: true, children: (0, jsx_runtime_1.jsx)(paperclip_icon_1.PaperclipIcon, {}) }), size: isCompact ? 'sm' : undefined }, props)) }))] }));
|
|
39
29
|
};
|
|
40
|
-
exports.AttachButton = react_1.
|
|
30
|
+
exports.AttachButton = (0, react_1.forwardRef)((props, ref) => ((0, jsx_runtime_1.jsx)(AttachButtonBase, Object.assign({ innerRef: ref }, props))));
|